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
Beef
Jul 26, 2004
Please #define
:smugdog:

Adbot
ADBOT LOVES YOU

Absurd Alhazred
Mar 27, 2010

by Athanatos

rjmccall posted:

C# is also much easier to make a good IDE for than C++ for like twenty reasons.

And it's only twenty reasons because thirty other reasons were held up in committee.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Absurd Alhazred posted:

They keep adding new C++ features and 2019 has way better template parsing for IntelliSense error marking and compile-time error reporting. I'm sorry, I don't get the impression that they're not taking C++ seriously enough, but maybe their C# tools are just way more impressive and I don't know because I've not had a chance to use them much.
They've only been focusing on C++ since around 2017. Before they were actually considering dropping VS for Windows Desktop entirely (back when "apps" were all the rage), and clearly that backfired so badly they had to do a full 180. Don't get me wrong, it's come leaps and bounds since, but for anyone that's followed VS for years it's understandable to be skeptical and see it as much ado about nothing.

Casey is correct on one thing, Microsoft teams very obviously work based on mandates from up high and you have to hope your interests line up with theirs because they won't acknowledge anything else. This is apparent if you ever report an issue to them, anything that's their current focus will be immediately addressed by the relevant engineer, anything else will languish and eventually be "closed as it's not in the current roadmap". So there's always the concern they'll pivot to something else and forget all about you again. At least they're focused on CMake support now so maybe the bulky clunky vcxproj format will finally bite the dust.

Of course there isn't much competition because we all have stockholm syndrome and either live with slow broken IDEs or go full vim command line. :unsmigghh:

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


I used vim for C++ all throughout college and wouldn't wish it on my enemies.

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

SupSuper posted:

Casey is correct on one thing, Microsoft teams very obviously work based on mandates from up high and you have to hope your interests line up with theirs because they won't acknowledge anything else. This is apparent if you ever report an issue to them, anything that's their current focus will be immediately addressed by the relevant engineer, anything else will languish and eventually be "closed as it's not in the current roadmap". So there's always the concern they'll pivot to something else and forget all about you again. At least they're focused on CMake support now so maybe the bulky clunky vcxproj format will finally bite the dust.

I work in Xamarin on the Hot Reload team and deal with VS Feedback tickets from time to time. This is my general experience with it.

After you put in a ticket, it gets linked up to the team's area path, where they get to triage them. Each team does it differently; sometimes a PM or a manager will handle them and pass them to engineers, in our team's case we trade off each week. If you have a bug, there's (generally) no QA team to handle actually researching them, it's up to the dev to go figure it out to reproduce and fix it, or ask the person for more info (a reproducible project, steps, etc). And that's on top of their other tasks, so it's scheduling time between working on new features, fixing bugs / refactoring code I already know of, and researching feedback ticket issues and talking with customers.

For me, it ends up boiling down to:
- How many people are affected (Either through upvotes, telemetry markers I see, etc)
- Do I have time to work on it, and when will I.
- If it's not me, who else do I need to help me look at it?

If you have an issue in a part of the code I'm already working in (say, for a given feature I'm working on), then it's easier for me to get back with the exact solution and what's going on. If it's not, unless you've given reproduction steps, I need to research it and figure out how.

For example, I got a ticket for someone who was having issues where they couldn't debug their app while our Hot Reload code was enabled while they were under their corporate VPN (their app would deploy and debug fine, but our code would not inject into their running app, so Hot Reload wouldn't work.). Looking at the logs, it looks like a combination issue between VS Mac, Mono (and the Mono Soft Debugger), and our library being injected. It's complex to reproduce and potentially involves multiple teams to get involved to fix. Judging by our telemetry, there's only a handful of people being hit by this, including the person who submitted it.

It's serious, clearly a bug, and it's on my backlog to figure out... but going by other issues and priorities, it's not the most pressing.

For me, the best way to submit feedback and bugs is to give a reproducible project and steps. That, in combination with logs the IDE exports when you submit feedback, make it much much easier to diagnose and get back with an answer. And also easier to get a fix in, so even if it's not in the immediate code I'm working in, I can make time in the sprint to get a fix in.

Whereas, if you write a long, drawn-out, scree about opening solutions taking forever and then make a 45 minute YouTube video about it? That's not something that's really actionable.

Absurd Alhazred
Mar 27, 2010

by Athanatos

Drastic Actions posted:

I work in Xamarin on the Hot Reload team and deal with VS Feedback tickets from time to time. This is my general experience with it.

After you put in a ticket, it gets linked up to the team's area path, where they get to triage them. Each team does it differently; sometimes a PM or a manager will handle them and pass them to engineers, in our team's case we trade off each week. If you have a bug, there's (generally) no QA team to handle actually researching them, it's up to the dev to go figure it out to reproduce and fix it, or ask the person for more info (a reproducible project, steps, etc). And that's on top of their other tasks, so it's scheduling time between working on new features, fixing bugs / refactoring code I already know of, and researching feedback ticket issues and talking with customers.

For me, it ends up boiling down to:
- How many people are affected (Either through upvotes, telemetry markers I see, etc)
- Do I have time to work on it, and when will I.
- If it's not me, who else do I need to help me look at it?

If you have an issue in a part of the code I'm already working in (say, for a given feature I'm working on), then it's easier for me to get back with the exact solution and what's going on. If it's not, unless you've given reproduction steps, I need to research it and figure out how.

For example, I got a ticket for someone who was having issues where they couldn't debug their app while our Hot Reload code was enabled while they were under their corporate VPN (their app would deploy and debug fine, but our code would not inject into their running app, so Hot Reload wouldn't work.). Looking at the logs, it looks like a combination issue between VS Mac, Mono (and the Mono Soft Debugger), and our library being injected. It's complex to reproduce and potentially involves multiple teams to get involved to fix. Judging by our telemetry, there's only a handful of people being hit by this, including the person who submitted it.

It's serious, clearly a bug, and it's on my backlog to figure out... but going by other issues and priorities, it's not the most pressing.

For me, the best way to submit feedback and bugs is to give a reproducible project and steps. That, in combination with logs the IDE exports when you submit feedback, make it much much easier to diagnose and get back with an answer. And also easier to get a fix in, so even if it's not in the immediate code I'm working in, I can make time in the sprint to get a fix in.

Whereas, if you write a long, drawn-out, scree about opening solutions taking forever and then make a 45 minute YouTube video about it? That's not something that's really actionable.

Yeah, to be fair, the C++ team came back to us quickly with a fix when I provided them with a testable sample of the error, and a few small variations that did compile correctly; I also made sure the sample compiled correctly in clang so I knew I wasn't crazy expecting it to work as is.

NtotheTC
Dec 31, 2007


I write all my bug reports like they're an Internet recipe for bolognaise sauce.

"it was a warm summer's evening in mid August when I met my first wife.."

Nth Doctor
Sep 7, 2010

Darkrai used Dream Eater!
It's super effective!


more falafel please posted:

The game industry just uses VS. The last platform where you didn't use VS was the PS2, which used MetroWerks CodeWarrior. The one thing it's not good at is understanding C++ when build options aren't defined through project properties (because the project is built with CMake or basically any other external build system). This is basically all games, though. It's sort of impossible, though -- how can visual studio know that the external build tool is going to add "/DFOOBAR" to your compile command line because of a conditional?

Oh poo poo I used to use CodeWarrior in my High School C++ class. Thanks for reminding me of something I haven't thought about in nearly two decades.

Sir Bobert Fishbone
Jan 16, 2006

Beebort
https://twitter.com/yephph/status/1249246702126546944

Hammerite
Mar 9, 2007

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

Someone get in touch with Lowtax and let him know his coder is trying to get a job somewhere less hosed up

QuarkJets
Sep 8, 2008

Visual Studio is the best IDE for C++ work by far! *proceeds to list features that every C++ IDE has, then describes problems that CLion solved over a decade ago*

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

QuarkJets posted:

Visual Studio is the best IDE for C++ work by far! *proceeds to list features that every C++ IDE has, then describes problems that CLion solved over a decade ago*
CLion came out in 2015. :confused:

Zopotantor
Feb 24, 2013

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

SupSuper posted:

CLion came out in 2015. :confused:

It feels like 2020 has been going on for at least seven years, so

QuarkJets
Sep 8, 2008

SupSuper posted:

CLion came out in 2015. :confused:

5 years ago then, I don't care

Xarn
Jun 26, 2015
I have had a real, reproducible cl.exe bug closed with message of "this is low priority, bye", and that is my report-bugs-to-MS-dev story. :v:

Also devcom is amazingly lovely and it actively discourages me from even trying to report bugs.

Tei
Feb 19, 2011


Sounds like Jeffrey somehow triggers a regex trying to stop a sql injection somewhere (probably in the host machine, and not the database. )

Could be \FF is part of some exploit?

Hammerite
Mar 9, 2007

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

Tei posted:

Sounds like Jeffrey somehow triggers a regex trying to stop a sql injection somewhere (probably in the host machine, and not the database. )

Could be \FF is part of some exploit?

Sounds like Jeffrey had a lucky escape, wouldn't want to work somewhere where caffeine is outlawed by the database

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Attention all employees. Everyone is to work from home until further notice. It has nothing to do with Covid-19, our database team has advised us that we are no longer allowed to have an office as it is against the schema

tankadillo
Aug 15, 2006

Just put on a fake mustache and reapply as Jeffrey1.

Winter Stormer
Oct 17, 2012

First name is the primary key in their employees table

Falcorum
Oct 21, 2010

Winter Stormer posted:

First name is the primary key in their employees table

It's an elegant solution to the "Speak with James about it" "Which one"-problem

more falafel please
Feb 26, 2005

forums poster

Nth Doctor posted:

Oh poo poo I used to use CodeWarrior in my High School C++ class. Thanks for reminding me of something I haven't thought about in nearly two decades.

Only real AP kids remember AquaFish.cpp

Nth Doctor
Sep 7, 2010

Darkrai used Dream Eater!
It's super effective!


more falafel please posted:

Only real AP kids remember AquaFish.cpp

><>

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


https://twitter.com/lexi_lambda/status/1249687733582340103

Aramis
Sep 22, 2009




The fact that the code it emits is not as optimized as it should be is kinda moot when it shouldn't have emitted that code in the first place. Clang should be collapsing that as a constant during compilation (which gcc correctly does).

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Well, the two questions the example raises are:

- why is this inlined code so much slower than the same non-inlined code?

- why does source file organisation affect the generated ASM?

and they're still interesting questions (at least to a c/c++ layman like me) even if in this particular case there is a better solution that can bypass them.

Suspicious Dish
Sep 24, 2011

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

NihilCredo posted:

Well, the two questions the example raises are:

- why is this inlined code so much slower than the same non-inlined code?

- why does source file organisation affect the generated ASM?

and they're still interesting questions (at least to a c/c++ layman like me) even if in this particular case there is a better solution that can bypass them.

The latter is an easy one to explain: if they are separate compilation units, inlining won't happen, since they're compiled separately and don't know about it. You can sometimes get it with link-time optimization, but that happens after codegen, losing a lot of the relevant high-level C structures and analysis, so it's trickier and won't generate the ASM.

This is why people put inline functions into headers.

The former seems to be a limitation of the optimizer when the constant overflows 4294967295 (32-bit max), and it's just generating a worse loop in that case. Unless there's something preventing the compiler from generating good code (and I can't think of any, here, compilers *want* 64-bit loop counters on x64!), it's just an LLVM bug. Not the first one of these I've seen.

Beef
Jul 26, 2004
AFAIK, LTO stuffs compiler IR into the object file to avoid throwing away relevant information.

edit: yep, GCC just dumps gimple to disk

CPColin
Sep 9, 2003

Big ol' smile.
It's me, I'm the horror:
Kotlin code:
        fun prepareRestTemplate(restTemplate: RestTemplate) {
            val messageConverter = object : ResourceHttpMessageConverter() {
                override fun writeInternal(resource: Resource, outputMessage: HttpOutputMessage) {
                    outputMessage.headers.remove(HttpHeaders.CONTENT_LENGTH)

                    super.writeInternal(resource, outputMessage)
                }
            }

            (restTemplate.messageConverters
                .find { it is AllEncompassingFormHttpMessageConverter }
                as AllEncompassingFormHttpMessageConverter)
                .setPartConverters(listOf(messageConverter))
        }
Why did I have to jump through these dumb, fragile hoops in order to keep the Content-Length header out of the request I'm about to POST? Because this piece of poo poo is at the other end:
code:
'***************************************
' File:	         Upload.asp
' Author:        Jacob "Beezle" Gilley
' Email:         [email]avis7@airmail.net[/email]
' Date:          12/07/2000
' Updated:       12/20/2002
' Modified by:   Will Bickford
' Email:         [email]wbic16@hotmail.com[/email]
' Comments: The code for the Upload, CByteString, 
'    CWideString subroutines was originally 
'    written by Philippe Collignon...or so 
'    he claims. This script is provided
'    "AS-IS" without support of any kind.
'****************************************
It looks for Content-Type and Content-Disposition, then skips four characters (two CRLF's) and merrily stars reading the file data. Sucks to be you if you send a Content-Length header and your uploaded file now starts with "ontent-Length: 1234"!

Now my precious code gets to have that stupid function in it until I can learn enough VBScript to upgrade some garbage code that's old enough to vote!

OddObserver
Apr 3, 2009
...I ought to know this, but I don't: how does a POST w/o a content-length even work, do you have to close the connection
(or use chunked?)

CPColin
Sep 9, 2003

Big ol' smile.
I should have clarified: this is a multi-part request, so each part can have its own headers. I'm guessing there's a Content-Length header for the whole request. That upload.asp script was choking on the header if it appeared in the part that contained the file data.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

OddObserver posted:

...I ought to know this, but I don't: how does a POST w/o a content-length even work, do you have to close the connection
(or use chunked?)

By spec you have to have content length or chunked.

Aramis
Sep 22, 2009



Wouldn't just reordering Content-Length before Content-Type and Content-Disposition satisfy the script without breaking the protocol?

Edit: Lemme guess: that particular framework doesn't allow control over header ordering...

Aramis fucked around with this message at 19:55 on Apr 15, 2020

CPColin
Sep 9, 2003

Big ol' smile.
[img-shrug-emoji-made-out-of-springs.gif]

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Aramis posted:

The fact that the code it emits is not as optimized as it should be is kinda moot when it shouldn't have emitted that code in the first place. Clang should be collapsing that as a constant during compilation (which gcc correctly does).

That seems just a bit over-stated. This kind of closed-form loop transformation is more of a silly compiler party trick rather than something that optimizes real code in practice. Especially with XOR; I mean, really, I have no idea what the closed form of that would be. And it's clearly unreasonable to expect the compiler to find a non-closed-form solution, i.e. to simulate a loop with 50 billion iterations at compile time.

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
I've used Rider quite a lot but it never stuck, I much prefer Visual Studio. VS 2019 in particular dramatically changed the experience of using it, it's much much faster. The AI assisted Intellisense is loving cool too. I can't imagine why that guy is opening his IDE so frequently that 5-6 seconds load time is unconscionable. He's also using an old version of Windows - maybe 8?

putin is a cunt fucked around with this message at 00:10 on Apr 17, 2020

Aramis
Sep 22, 2009



rjmccall posted:

That seems just a bit over-stated. This kind of closed-form loop transformation is more of a silly compiler party trick rather than something that optimizes real code in practice. Especially with XOR; I mean, really, I have no idea what the closed form of that would be. And it's clearly unreasonable to expect the compiler to find a non-closed-form solution, i.e. to simulate a loop with 50 billion iterations at compile time.

Yeah, I took GCC's success as blind evidence that it was an expected optimizations, but poking at it for a bit more thickens the plot quite a bit.

GCC will happily collapse it to a constant during optimization, but actually refuses to evaluate it as a constexpr if I try to force its hand.

https://godbolt.org/z/u9yVEh

I'm going to guess it's some fancy IR pass that's actually performing the collapsing.

Carbon dioxide
Oct 9, 2012

a hot gujju bhabhi posted:

I've used Rider quite a lot but it never stuck, I much prefer Visual Studio. VS 2019 in particular dramatically changed the experience of using it, it's much much faster. The AI assisted Intellisense is loving cool too. I can't imagine why that guy is opening his IDE so frequently that 5-6 seconds load time is unconscionable. He's also using an old version of Windows - maybe 8?

I use IntelliJ for all my jvm programming needs but a couple months I switched to VSCode (no, not visual studio, just Code) as my main text editor for editing scripts and keeping notes and all that.

Why?

- Notepad++ doesn't exist on Linux and its clones are garbage.
- Most keyboard shortcuts won't stick in my brain so I have no chance of ever learning to use a CLI editor like vim with any efficiency.
- There are other decent options like SublimeText. Sublime is free to use but the nag screen "We'd rather you pay up now" makes me prefer something that is actually free.
- VSCode has great Linux support, it Just Works, has fine syntax highlighting, default settings are mostly good and if not, it's easy to change them (unlike certain editors that have you dig around and change stuff manually in their config files, or have a janky menu interface where you never can find anything), and is entirely free to use.

FOSS purists will be mad at me for using a MS tool on my Linux dev environment but gently caress them, I'll use what works for me.

Xik
Mar 10, 2011

Dinosaur Gum

a hot gujju bhabhi posted:

He's also using an old version of Windows - maybe 8?

smh at picking the literal worst os to be stubborn about not upgrading from

Adbot
ADBOT LOVES YOU

Tei
Feb 19, 2011

Carbon dioxide posted:

I use IntelliJ for all my jvm programming needs but a couple months I switched to VSCode (no, not visual studio, just Code) as my main text editor for editing scripts and keeping notes and all that.

Why?

- Notepad++ doesn't exist on Linux and its clones are garbage.

Maybe you can use Sublime and SciTE.

Notepad is ugly and Sublime is beautiful. Maybe using pretty tools will help you write beautiful code.


quote:

- Most keyboard shortcuts won't stick in my brain so I have no chance of ever learning to use a CLI editor like vim with any efficiency.

Thats fine. I use nano myself on console.

But a good Vi or Emacs users is like a god compared to us, they fly on the text and we crawl.


quote:

- There are other decent options like SublimeText. Sublime is free to use but the nag screen "We'd rather you pay up now" makes me prefer something that is actually free.

Money is mostly useless, only have a use and is buy stuff. So go and buy it, if the nag screen gets under your skin.

quote:

- VSCode has great Linux support, it Just Works, has fine syntax highlighting, default settings are mostly good and if not, it's easy to change them (unlike certain editors that have you dig around and change stuff manually in their config files, or have a janky menu interface where you never can find anything), and is entirely free to use.

FOSS purists will be mad at me for using a MS tool on my Linux dev environment but gently caress them, I'll use what works for me.

What? No. FOSS is about freedom to use whatever you feel like. You are using that freedom to use the best tool you know.

*gives a FOSS free pass*. You are cool in my book.

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