|
Athas posted:What exactly was the motivation for this travesty? Surely it cannot be the tiny amount of function overloading it permits? Allowing tgmath.h to be implemented without compiler support. I actually think it's entirely possible to with the ICE ternary trick and clever sizeof usage, but it's pretty unobvious.
|
# ? May 13, 2018 20:17 |
|
|
# ? May 29, 2024 23:52 |
|
Zopotantor posted:OK, that came out 14 years ago, and I haven't followed developments for ~25 years. I still maintain that C++ shared_ptr alone won't give you a good garbage collector unless you pay careful attention to ownership (which is usually what you want a GC to free you from). Am I correct in understanding you haven't written a garbage collector or followed the field in literally a quarter of a century and yet you feel qualified to dictate from on high what is and isn't considered garbage collection by the industry in TYOOL 2018? Because your surname had better be, like, Knuth.
|
# ? May 13, 2018 20:20 |
|
Qwertycoatl posted:Fresh from the front page of HN, How to turn your bad but correct embedded C into worse and incorrect embedded C++ yikes
|
# ? May 13, 2018 20:25 |
|
feedmegin posted:Am I correct in understanding you haven't written a garbage collector or followed the field in literally a quarter of a century and yet you feel qualified to dictate from on high what is and isn't considered garbage collection by the industry in TYOOL 2018? Because your surname had better be, like, Knuth. I have a pretty good idea about what shared_ptr does and doesn't provide, and I stand by my claim that it does not do enough to be called a garbage collector. I am willing to admit that I'm behind the times on GC implementation; but I literally have never heard anybody else claiming shared_ptr to do garbage collection.
|
# ? May 13, 2018 20:30 |
|
rjmccall posted:Having a constant condition doesn't change the type-checking rules or anything. Are you 100% sure about this?
|
# ? May 13, 2018 20:37 |
|
Qwertycoatl posted:Fresh from the front page of HN, How to turn your bad but correct embedded C into worse and incorrect embedded C++ At work we force the ASIC/FPGA teams to give us formally specified address maps with register and bitfield definitions, that we can turn into C macros and/or C++ classes automatically. (Some of the HW guys also use them to generate HDL for address decoders etc., which eliminates stupid errors and duplicate implementation effort.)
|
# ? May 13, 2018 20:45 |
|
Blotto Skorzany posted:In brief: Not a footgun, opaque types provide at least as much obscurity here as PIMPL, not a footgun and also you are Wrong (good grief, as an embedded dev you should know that null references are easily possible and that the by-default-adversarial C++ compiler is free to optimize away your checks for them due to the dogmatic belief that they are Impossible), not a footgun, slightly wrong in how you describe this but yes this is dumb and you should always turn on compiler flags to yell about it, not a footgun. I mean I guess we can just disagree about what footguns are then, that's fine. My point about the references is that - as opposed to pointers - you can be a bit more sure that they aren't null, or at least that they're only null if you hosed something up. Serves a different purpose than a pointer.
|
# ? May 13, 2018 20:58 |
|
Phobeste posted:I mean I guess we can just disagree about what footguns are then, that's fine. My point about the references is that - as opposed to pointers - you can be a bit more sure that they aren't null, or at least that they're only null if you hosed something up. Serves a different purpose than a pointer. You haven't seen true horror until you've had to work on a codebase together with some cowboys who routinely (a) create null references and (b) when told to fix the SEGV they caused, just put code:
|
# ? May 13, 2018 21:13 |
|
Zopotantor posted:At work we force the ASIC/FPGA teams to give us formally specified address maps with register and bitfield definitions, that we can turn into C macros and/or C++ classes automatically. (Some of the HW guys also use them to generate HDL for address decoders etc., which eliminates stupid errors and duplicate implementation effort.) Same here, anything else is madness.
|
# ? May 13, 2018 21:16 |
|
Zopotantor posted:I have a pretty good idea about what shared_ptr does and doesn't provide, and I stand by my claim that it does not do enough to be called a garbage collector. I am willing to admit that I'm behind the times on GC implementation; but I literally have never heard anybody else claiming shared_ptr to do garbage collection.
|
# ? May 13, 2018 21:21 |
|
Volte posted:Even if so, it still fills in the same blank as garbage collection. It's just a taxonomic quibble over whether you consider all systems that perform automatic heap management to be garbage collectors or not. Personally I consider unneeded heap memory to be garbage, so a system that automatically collects it can reasonably be called a garbage collector as far as I'm concerned. I don't see why a garbage collector should have to "free you" from thinking about object ownership, since object ownership isn't just a technical issue affecting memory management. It's also an engineering consideration and honestly, having separate notation for owning and non-owning pointers means you're forced to think about it and document it directly in your API. "I am not owned! I am not owned!", he yells as he slowly becomes a void*.
|
# ? May 13, 2018 21:22 |
|
Zopotantor posted:You haven't seen true horror until you've had to work on a codebase together with some cowboys who routinely (a) create null references and (b) when told to fix the SEGV they caused, just put I keep trying to bang this into people’s head at work. Don’t add a dozen null checks to functions. Think top down about what programming error lets a null propagate that long and fix it. Don’t just skip blocks on impossible nulls but throw exceptions to find and fix the defect that got you there.
|
# ? May 13, 2018 21:39 |
|
hackbunny posted:Are you 100% sure about this? Yes. I also don’t know any compiler which does that as an extension, or even any C-family language which adds that to the rule. GCC is extremely lax about integer/pointer conversions in C, and compilers like Clang that have to be GCC-compatible follow suit, but even then the rule doesn’t consider the constantness of the condition.
|
# ? May 13, 2018 21:47 |
|
shared_ptr is definitely a primitive you could use for GC, but using a shared_ptr in your C++ seems rather unrelated to implementing even a conservative GC. But I'm not an expert on GC either so maybe I'm missing the nuance that hackbunny meant to imply when making that claim. Also, generics aren't really necessary when I've got my buddy, void*, and arbitrary reinterpret casting syntax to help me out. How could generics possibly be more powerful than interpreting values stored as random memory addresses as data-sliced floating point numbers??
|
# ? May 13, 2018 21:47 |
|
rjmccall posted:Yes. I also don’t know any compiler which does that as an extension, or even any C-family language which adds that to the rule. I stand corrected I guess I misremembered some exotic use of the ternary operator Coffee Mugshot posted:shared_ptr is definitely a primitive you could use for GC, but using a shared_ptr in your C++ seems rather unrelated to implementing even a conservative GC. But I'm not an expert on GC either so maybe I'm missing the nuance that hackbunny meant to imply when making that claim. Yes, I like to stretch the truth a little, but I do it for good No, shared_ptr isn't really a GC, and ADL is "extension methods" and SFINAE is "pattern matching" only very loosely. But I find that they are useful ways to think of C++ features, the too rarely seen "why" vs the "how". A saner language would add those as actual, first-class features with a dedicated syntax, but C++ has never been sane, and inches closer to exolanguage territory with every release My point stands, though: calling shared_ptr a "smart pointer" is about as accurate as calling it a "reference counting GC" (or rather, a building block of one - just like all C++ features, really), but of the two wrong definitions, one is limiting and the other is liberating hackbunny fucked around with this message at 00:08 on May 14, 2018 |
# ? May 14, 2018 00:04 |
|
Coffee Mugshot posted:Also, generics aren't really necessary when I've got my buddy, void*, and arbitrary reinterpret casting syntax to help me out. How could generics possibly be more powerful than interpreting values stored as random memory addresses as data-sliced floating point numbers?? Are they supposed to be more powerful or are they supposed to be more specific and less powerful?
|
# ? May 14, 2018 00:36 |
|
itskage posted:Every time this dumb IDE conversation comes up all I hear is a bunch of grumpy old men complaining about change. itskage posted:
I have used JavaEd and netbeans and eclipse and really hated VS VC++ and intellij for a while, But now I would say Intellij Idea - The most useful system out there at the moment ReSharper - the addon for VS that adds the intellij code hints and refactoring tools Both of these I would buy for myself in an instant and have in the past.
|
# ? May 14, 2018 06:58 |
|
Suspicious Dish posted:Allowing tgmath.h to be implemented without compiler support. I actually think it's entirely possible to with the ICE ternary trick and clever sizeof usage, but it's pretty unobvious. And why is this something one wants? I was never particularly bothered by having to suffix an "f" or whatever to functions if I want the single-precision form. It seems a really minor problem that has been solved by introducing a super gross language feature. Oh poo poo; from Rationale: quote:Generic math functions are a widely appreciated feature of Fortran. Those are not the languages you want to cite for prior work.
|
# ? May 14, 2018 07:50 |
|
Yeah, C has had some Fortran envy for quite a while.
|
# ? May 14, 2018 09:03 |
|
Macros were the original mistake and Fortran's design is perfect in every way
|
# ? May 14, 2018 09:04 |
|
Fortran 90 is a perfectly good language
|
# ? May 14, 2018 09:23 |
|
Xarn posted:Yeah, C has had some Fortran envy for quite a while. see also: restrict
|
# ? May 14, 2018 09:28 |
|
Coffee Mugshot posted:Macros were the original mistake and Fortran's design is perfect in every way But Fortran does have macros!
|
# ? May 14, 2018 10:22 |
|
Volte posted:Even if so, it still fills in the same blank as garbage collection. It's just a taxonomic quibble over whether you consider all systems that perform automatic heap management to be garbage collectors or not. Personally I consider unneeded heap memory to be garbage, so a system that automatically collects it can reasonably be called a garbage collector as far as I'm concerned. I don't see why a garbage collector should have to "free you" from thinking about object ownership, since object ownership isn't just a technical issue affecting memory management. It's also an engineering consideration and honestly, having separate notation for owning and non-owning pointers means you're forced to think about it and document it directly in your API. Absurd Alhazred posted:"I am not owned! I am not owned!", he yells as he slowly becomes a void*.
|
# ? May 14, 2018 16:44 |
|
https://isomorphic-git.github.io Is this a horror? I feel it is
|
# ? May 16, 2018 19:34 |
|
I'm surprised they're not releasing it as an electron app.
|
# ? May 16, 2018 19:38 |
|
i had good experiences with dulwich, which implements git protocol in python i am suspecting that this is awful
|
# ? May 16, 2018 19:39 |
|
The Fool posted:I'm surprised they're not releasing it as an electron app. no instead the single "project using this" is a browser based "IDE" https://wmhilton.github.io/nde/
|
# ? May 16, 2018 20:14 |
|
necrotic posted:no instead the single "project using this" is a browser based "IDE" https://wmhilton.github.io/nde/ Developers really loving hate the editors/IDEs they have at their disposal. Just like email clients and bug tracking software, everybody just looooves to make a new editor/IDE. In the browser, on the desktop, console based, doesn't matter. Thousands of choices with new ones popping up every day.
|
# ? May 16, 2018 20:51 |
|
Can't wait to pull a 400MB git repo into my browser.necrotic posted:no instead the single "project using this" is a browser based "IDE" https://wmhilton.github.io/nde/ It took over 4 seconds to load this page. What the hell. Even Sourcetree 2 loads faster than that. poemdexter fucked around with this message at 21:48 on May 16, 2018 |
# ? May 16, 2018 21:44 |
|
bob dobbs is dead posted:i had good experiences with dulwich, which implements git protocol in python https://en.m.wikipedia.org/wiki/Dunwich_(Lovecraft) ?
|
# ? May 16, 2018 22:44 |
|
canis minor posted:https://isomorphic-git.github.io Let's add a bunch of subtle bugs and edge cases to our version control! Yay!
|
# ? May 16, 2018 22:56 |
|
https://github.com/dulwich/dulwich one of the only python libs which actually implements the grand prime directive of python of naming poo poo after monty python skits https://www.youtube.com/watch?v=HtyO4tmpPdk
|
# ? May 16, 2018 23:56 |
|
poemdexter posted:Can't wait to pull a 400MB git repo into my browser. I closed the tab at 12 seconds and it wasn't done loading.
|
# ? May 17, 2018 03:49 |
|
Either way, it's still a horror.
|
# ? May 17, 2018 03:49 |
|
poemdexter posted:Can't wait to pull a 400MB git repo into my browser. For me it downloads/parses/etc for about 30 seconds while failing to render at all. If you're writing something in JavaScript right now, please introspect and reconsider that decision.
|
# ? May 17, 2018 04:38 |
|
xtal posted:For me it downloads/parses/etc for about 30 seconds while failing to render at all. Can we nuke all browsers and start over? Without javascript but with some sane scripting language?
|
# ? May 17, 2018 04:55 |
|
fritz posted:I closed the tab at 12 seconds and it wasn't done loading. xtal posted:For me it downloads/parses/etc for about 30 seconds while failing to render at all. Okay, it's terrible, we all get that, but what kind of a potato are you working with that it doesn't work at all, or takes 12 seconds?
|
# ? May 17, 2018 05:06 |
|
Volguus posted:Can we nuke all browsers and start over? Without javascript but with some sane scripting language? If we were gonna start from scratch we'd just skip the "scripting language" step altogether and go straight to WebAssembly.
|
# ? May 17, 2018 05:07 |
|
|
# ? May 29, 2024 23:52 |
|
What is a browser, really, besides a sandboxed program execution environment with some utilities for rendering UI layouts? Let's just make everyone use VMs with preinstalled Qt and then run whatever software they want to download.
|
# ? May 17, 2018 05:15 |