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.
 
  • Locked thread
Mao Zedong Thot
Oct 16, 2008


wide stance posted:

Fuckin a I love working from home. Tranquility vs. the knuckle cracking olympics.

So much more productive too.

Took remote job like 5 yrs ago. On my second remote job. Literally never going back lmao

Adbot
ADBOT LOVES YOU

Xarn
Jun 26, 2015

quiggy posted:

std::function has some scary fuckin' syntax too, and if you have access to that you also have access to the modern version of auto which helps alleviate a lot of the function pointer stress

tbh though if you feel the need to pass functions around in c++ either wrap them in a custom class or switch to a different language

code:
std::function<poop(butt)> poop_extractor;
Don't see what is so scary about it, especially since it was made to resemble functions with "return-type(args1, arg2, ...)" syntax. :shrug:

tef
May 30, 2004

-> some l-system crap ->

so loving future posted:

Took remote job like 5 yrs ago. On my second remote job. Literally never going back lmao

sup five years of remote working buddy

ps https://www.youtube.com/watch?v=co_DNpTMKXk

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

LeftistMuslimObama posted:

holy poo poo. no wonder vb6 was so popular when it came out. making a com object in vb6 is literally just a matter of writing your regular vb code and then setting com as the compile target. its fuckin painless comparatively.

you aren't really supposed to do COM in C. it's supported officially (see the tons of macros tool and poo poo), but microsoft assumed C++ at the very least. problem with that is that the C++ compiler has to create vtables with the layout COM expects, which is a really low bar to clear re. C++ ABI but still gcc for years wasn't compatible

anyway COM is kid's stuff, OLE is a whole another matter. what VB really helped with was OLE/automation. implementing OLE objects in bare C/C++ is not hard, just incredibly tedious (an embeddable OLE control means implementing over a dozen interfaces before you even start giving it some behavior) and even easier to get wrong accidentally. what's really hard (i.e. massively more tedious) is calling OLE objects, especially dynamically. in VB you don't even notice if you're calling an object statically or dynamically, the syntax is exactly the same. in C or C++, you have to look up the method name, build the argument list as an array of VARIANTs (looking up the ids of named arguments, if you use them), call the method, unpack the outputs from an array of VARIANTs. not to mention that VB can generate and consume type metadata natively while in C or C++ you have to write the metadata in IDL, compile with MIDL, and then use MIDL or your compiler's tools to generate the header files from the type library (jesus)

I need to find some trivial WSH script and try to rewrite it in C to show you just how much poo poo goes behind the scenes. I won't demonstrate how to write an ActiveX control manually because that strays into self-harm territory

nobody writes COM/OLE poo poo in C though, and who does it in C++ uses frameworks like ATL to make it a little less than ridiculous. I do wonder if C++1x can make it better though, especially now that we can almost do compile-time introspection

echinopsis
Apr 13, 2004

by Fluffdaddy

hackbunny posted:

you aren't really supposed to do COM in C. it's supported officially (see the tons of macros tool and poo poo), but microsoft assumed C++ at the very least. problem with that is that the C++ compiler has to create vtables with the layout COM expects, which is a really low bar to clear re. C++ ABI but still gcc for years wasn't compatible

anyway COM is kid's stuff, OLE is a whole another matter. what VB really helped with was OLE/automation. implementing OLE objects in bare C/C++ is not hard, just incredibly tedious (an embeddable OLE control means implementing over a dozen interfaces before you even start giving it some behavior) and even easier to get wrong accidentally. what's really hard (i.e. massively more tedious) is calling OLE objects, especially dynamically. in VB you don't even notice if you're calling an object statically or dynamically, the syntax is exactly the same. in C or C++, you have to look up the method name, build the argument list as an array of VARIANTs (looking up the ids of named arguments, if you use them), call the method, unpack the outputs from an array of VARIANTs. not to mention that VB can generate and consume type metadata natively while in C or C++ you have to write the metadata in IDL, compile with MIDL, and then use MIDL or your compiler's tools to generate the header files from the type library (jesus)

I need to find some trivial WSH script and try to rewrite it in C to show you just how much poo poo goes behind the scenes. I won't demonstrate how to write an ActiveX control manually because that strays into self-harm territory

nobody writes COM/OLE poo poo in C though, and who does it in C++ uses frameworks like ATL to make it a little less than ridiculous. I do wonder if C++1x can make it better though, especially now that we can almost do compile-time introspection

these hackbunny quotes are some of my favorite things in yospos

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
yeah, you can plagiarize some choice hackbunny's quotes to pretend you have some C++ proficiency and get a job

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
this C# thing where it takes a WSDL and autogenerates a proxy class for the services is kind of cool

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Symbolic Butt posted:

this C# thing where it takes a WSDL and autogenerates a proxy class for the services is kind of cool

i love how every six-figgy support contract enterprise software ships with invalid or not working WSDLs

EVGA Longoria
Dec 25, 2005

Let's go exploring!

so loving future posted:

Took remote job like 5 yrs ago. On my second remote job. Literally never going back lmao

the only thing that makes work bearable is good people

i'll take a local job with a good team over remote work any day

quiggy
Aug 7, 2010

[in Russian] Oof.


fritz posted:

std::function syntax is incredibly better than function pointer syntax


i know youre stuck on c++03, are you using punch cards too

i wish, that might actually be fun!

jony neuemonic
Nov 13, 2009

EVGA Longoria posted:

the only thing that makes work bearable is good people

i'll take a local job with a good team over remote work any day

same.

though i'd like it a lot more if every tech company hadn't bit down hard on open offices.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

EVGA Longoria posted:

the only thing that makes work bearable is good people

i'll take a local job with a good team over remote work any day

same

I can like pretend I have friends this way

gonadic io
Feb 16, 2011

>>=

Symbolic Butt posted:

same

I can like pretend I have friends this way

we have office drinks once a week! such socialising

VikingofRock
Aug 24, 2008




quiggy posted:

std::function has some scary fuckin' syntax too, and if you have access to that you also have access to the modern version of auto which helps alleviate a lot of the function pointer stress

tbh though if you feel the need to pass functions around in c++ either wrap them in a custom class or switch to a different language

IMO use a template for this, because it can take any callable:

C++ code:
template<typename ButtFunc>
Poo getOnePoo(const ButtFunc& f) {
	return f(1);
}
Some people say using lots of templates like this bloats your executable but IMO they only do that if you are using all those variations anyways so yolo.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

hackbunny posted:

you aren't really supposed to do COM in C. it's supported officially (see the tons of macros tool and poo poo), but microsoft assumed C++ at the very least. problem with that is that the C++ compiler has to create vtables with the layout COM expects, which is a really low bar to clear re. C++ ABI but still gcc for years wasn't compatible

anyway COM is kid's stuff, OLE is a whole another matter. what VB really helped with was OLE/automation. implementing OLE objects in bare C/C++ is not hard, just incredibly tedious (an embeddable OLE control means implementing over a dozen interfaces before you even start giving it some behavior) and even easier to get wrong accidentally. what's really hard (i.e. massively more tedious) is calling OLE objects, especially dynamically. in VB you don't even notice if you're calling an object statically or dynamically, the syntax is exactly the same. in C or C++, you have to look up the method name, build the argument list as an array of VARIANTs (looking up the ids of named arguments, if you use them), call the method, unpack the outputs from an array of VARIANTs. not to mention that VB can generate and consume type metadata natively while in C or C++ you have to write the metadata in IDL, compile with MIDL, and then use MIDL or your compiler's tools to generate the header files from the type library (jesus)

I need to find some trivial WSH script and try to rewrite it in C to show you just how much poo poo goes behind the scenes. I won't demonstrate how to write an ActiveX control manually because that strays into self-harm territory

nobody writes COM/OLE poo poo in C though, and who does it in C++ uses frameworks like ATL to make it a little less than ridiculous. I do wonder if C++1x can make it better though, especially now that we can almost do compile-time introspection

no poo poo, you would probably make $300k a year here. i dont think anyone here has nearly as much understanding of any of this as you do and our whole infrastructure is based on COM and embedded activex controls. you could fix so much poo poo!

hobbesmaster
Jan 28, 2008

thats because anyone that understands COM understands enough to run far far away

Sapozhnik
Jan 2, 2005

Nap Ghost

hobbesmaster posted:

thats because anyone that understands COM understands enough to run far far away

COM itself is ok. Not great but ok.

COM Automation though.... holky gently caress

COM+ is the monstrous peak of 90s Enterprise Architecture but that's ok because absolutely nobody uses it.

hobbesmaster
Jan 28, 2008

the year is 2016, anyone that is paying $TEXAS for a COM/WIN32 developer has an unholy mess on their hands

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
i wish i could explain our build process in enough detail without breaking ndas, but suffice it to say that its a horrorshow. if the phrase "binary break" means anything to you, it sends shudders down spines here.

Shaggar
Apr 26, 2006

Mr Dog posted:

COM itself is ok. Not great but ok.

COM Automation though.... holky gently caress

COM+ is the monstrous peak of 90s Enterprise Architecture but that's ok because absolutely nobody uses it.

the #1 problem with com is its stuck in win32 backwards compat hell.

nowdays everyone does what com did with webservices but in a less convenient way.

Mao Zedong Thot
Oct 16, 2008


EVGA Longoria posted:

the only thing that makes work bearable is good people

i'll take a local job with a good team over remote work any day

different strokes and stuff -- i work with awesome people, just mostly over github and hangouts :shrug:

it's not for everybody though -- at my last job you could see some people just really not cut out for remote work, constantly depressed and complaining about feeling isolated (and that place was gross and huggy and familial and straight out of disrupted :2bong:)

brap
Aug 23, 2004

Grimey Drawer

Symbolic Butt posted:

this C# thing where it takes a WSDL and autogenerates a proxy class for the services is kind of cool

you know what's really cool? putting your service interface and all the associated Plain Old Data objects in a common assembly referenced on client and server side instead of generating code to duplicate poo poo you already have

Sapozhnik
Jan 2, 2005

Nap Ghost

fleshweasel posted:

you know what's really cool? putting your service interface and all the associated Plain Old Data objects in a common assembly referenced on client and server side instead of generating code to duplicate poo poo you already have

same, except the interfaces go in one assembly and all the enums and dumb tuple types go into another because you need to reference those from your db entities assembly

GameCube
Nov 21, 2006

hackbunny posted:

always posting 959s on page 959



he'll yeah

Sapozhnik
Jan 2, 2005

Nap Ghost
loving dbus-daemon

never trust a program that is configured using xml

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
i hate xml but i'll give it a pass for config files because at least it's not some bespoke custom format poo poo

NihilCredo
Jun 6, 2011

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

YeOldeButchere posted:

i hate xml but i'll give it a pass for config files because at least it's not some bespoke custom format poo poo

for config files YAML is probably the sweet spot of "easy to read and manually edit by humans" + "easy to find a good library for it in any language"

i agree that anything > custom format though

and XML does have the huge advantage over everything else of having an actually well-supported schema format which means anybody can check the validity of their files at any time

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
our project uses java 8, and yet people are writing code like this
Java code:
for(Butt butt: butts) {
	if(!butt.isEmpty()) {
		for(Turd turd: butt.getTurds()) {
			if(turd.isSolid()){

			}
		}
	}
}
:negative:

Sapozhnik
Jan 2, 2005

Nap Ghost
eh it's not even the fact that it uses xml per se, i was just making fun of that aspect

my embedded bullshit was working on my laptop and on a rpi test rig but mysteriously shat itself when i compiled a system image and loaded it into the target device

come to find out, loving NetworkManager was masking the issue on my laptop and the pi

because it drops a dropfile into dbus-daemon's configuration directory that globally increases the hardcoded limit for how many event sources a single dbus connection is allowed to listen to

fml

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Wheany posted:

our project uses java 8, and yet people are writing code like this
Java code:
for(Butt butt: butts) {
	if(!butt.isEmpty()) {
		for(Turd turd: butt.getTurds()) {
			if(turd.isSolid()){

			}
		}
	}
}
:negative:

that's not so bad, at least they're not iterating through indices

Space Whale
Nov 6, 2014
So in multiple parts of this JS app there's loving loopy lookups and additions all over the place of ABigFuckingArray™ of various financial infos over a length of months for a whole deal, and products in the deal.

poo poo like

code:
for (var i = 0; i < arrayLOL.length; i++) {
    if arrayLOL[i].someProp = "someValue";
    this.FuckingGlobal += arrayLOL[i].someOtherProp;
}
// Imagine a dozen of these loving for loops each making GBS threads into another global! 
Can't you just go over the whole array once , making buckets as necessary based on unique values of someProp, and summate things accordingly?

In some places it's loving O(n^2) :psyduck:

Space Whale
Nov 6, 2014

Symbolic Butt posted:

that's not so bad, at least they're not iterating through indices

hahahahahahaahahahahaaaaaaaaaaaaaaaaaa

Kill me why are we doing financial poo poo in JavaScript

Bloody
Mar 3, 2013

because you work at the circus

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Symbolic Butt posted:

that's not so bad, at least they're not iterating through indices

and my manager thought we weren't using java 8

i said, "i just showed you how our event listeners use lambdas in my demo"
he was all "yeah, you've just used some lambdas so you can put 'java 8 expert' on your cv :smug:"

i've used streams and lambdas extensively (and sometimes method references), and java.time. :rant:

I'm kind of unreasonably upset by that comment.

Space Whale
Nov 6, 2014

Bloody posted:

because you work at the circus

No I work for a consultancy that fixes a circus's poo poo.

What's kind of scary is this is a BIG ISP.

hobbesmaster
Jan 28, 2008

Space Whale posted:

hahahahahahaahahahahaaaaaaaaaaaaaaaaaa

Kill me why are we doing financial poo poo in JavaScript

this is why java is acceptable: otherwise everything will be on some retarded web language

Shaggar
Apr 26, 2006
javascript is the loving worst. its absolutely indefensible. anyone who has promoted javascript should be put to death I'm not even kidding.

Shaggar
Apr 26, 2006
spent 3 loving hours trying to figure out why dates weren't parsing right, turns out every browser handles date parsing a little bit different. the official solution? Parse the date out into individual parts and build the date object yourself. gently caress javascript.

Space Whale
Nov 6, 2014
It's not even JS in itself that I'm mad at anymore.

It's the terrible, terrible code that it seems to force people to write, or enable them to write.

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
the language itself is fundamentally a failure and should have been discontinued years ago but failfox retards decided to try to make a platform out of it and goog was happy enough to index the garbage applications they were making. if you've ever championed chome or failfox then javascript is directly your fault.

Shaggar fucked around with this message at 21:00 on Aug 17, 2016

  • Locked thread