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
Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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.

Adbot
ADBOT LOVES YOU

feedmegin
Jul 30, 2008

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).
Specifically, from that paper:

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.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

yikes

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

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.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

rjmccall posted:

Having a constant condition doesn't change the type-checking rules or anything.

Are you 100% sure about this?

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

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.)

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

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.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

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:
if (&fart != NULL) {
  ...
}
around code that was actually doing some really important stuff.

Qwertycoatl
Dec 31, 2008

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.

Volte
Oct 4, 2004

woosh woosh

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.
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
Mar 27, 2010

by Athanatos

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*.

Hughlander
May 11, 2005

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
code:
if (&fart != NULL) {
  ...
}
around code that was actually doing some really important stuff.

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.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

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.

Coffee Mugshot
Jun 26, 2010

by Lowtax
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??

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

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.

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.

I stand corrected :geno: 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 :shobon: 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

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

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?

TheresaJayne
Jul 1, 2011

itskage posted:

Every time this dumb IDE conversation comes up all I hear is a bunch of grumpy old men complaining about change.
Say hi to a grumpy not so old woman :)

itskage posted:


IDEs continue to improve as time goes on, and lots of the modern ones are pretty configurable. I'm reminded of all of the blogs out there along the lines of "I tried VS Code over emacs and it was good, but it's still has these annoying modern things that I don't like. Edit: 5 mins after this post twitter has informed me that I can disable all of the things I don't like, while keeping the things I do."

I mean nothing's perfect, but it's the whiny reluctance and the blatant bias that it will suck before even trying it that gets me.


Tooltips with parameters and documentation, or the ability to peep into functions.
Ctrl click to navigate right to it.
Realtime linting and BPA, which means not only do you let CI enforce company policy for formatting and documentation, but everyone can get instant feedback.
Collapsible classes, methods, schema.
VCS integration with diff tools and automatic nagging of newbie devs that never remember to pull before working.
Debugging right in the editor.


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.

Athas
Aug 6, 2007

fuck that joker

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.

...

Generic macros are designed for a useful level of consistency with C++ overloaded math functions.

Those are not the languages you want to cite for prior work.

Xarn
Jun 26, 2015
Yeah, C has had some Fortran envy for quite a while.

Coffee Mugshot
Jun 26, 2010

by Lowtax
Macros were the original mistake and Fortran's design is perfect in every way

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Fortran 90 is a perfectly good language

b0lt
Apr 29, 2005

Xarn posted:

Yeah, C has had some Fortran envy for quite a while.

see also: restrict

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Coffee Mugshot posted:

Macros were the original mistake and Fortran's design is perfect in every way

But Fortran does have macros!

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

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.
OK, let’s just agree to disagree. Because...

Absurd Alhazred posted:

"I am not owned! I am not owned!", he yells as he slowly becomes a void*.
...I'm not going to be that guy.

canis minor
May 4, 2011

https://isomorphic-git.github.io

Is this a horror? I feel it is

The Fool
Oct 16, 2003


I'm surprised they're not releasing it as an electron app.

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
i had good experiences with dulwich, which implements git protocol in python

i am suspecting that this is awful

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

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/

Volguus
Mar 3, 2009

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.

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice
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

feedmegin
Jul 30, 2008

bob dobbs is dead posted:

i had good experiences with dulwich, which implements git protocol in python

i am suspecting that this is awful

https://en.m.wikipedia.org/wiki/Dunwich_(Lovecraft) ?

:cthulhu:

blorpy
Jan 5, 2005


Let's add a bunch of subtle bugs and edge cases to our version control! Yay!

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost

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

fritz
Jul 26, 2003

poemdexter posted:

Can't wait to pull a 400MB git repo into my browser.


It took over 4 seconds to load this page. What the hell. Even Sourcetree 2 loads faster than that.

I closed the tab at 12 seconds and it wasn't done loading.

fritz
Jul 26, 2003


Either way, it's still a horror.

xtal
Jan 9, 2011

by Fluffdaddy

poemdexter posted:

Can't wait to pull a 400MB git repo into my browser.


It took over 4 seconds to load this page. What the hell. Even Sourcetree 2 loads faster than that.

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.

Volguus
Mar 3, 2009

xtal posted:

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.

Can we nuke all browsers and start over? Without javascript but with some sane scripting language?

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

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?

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

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.

Adbot
ADBOT LOVES YOU

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
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. :v:

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