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
Nomnom Cookie
Aug 30, 2009



i tried to run the gradle build and it didnt work. pls send the working build script

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006

Nomnom Cookie posted:

if someone else is using it, ok...im not gonna be the one to set it up in maven tho

it would be ez to setup in maven cause its just another jdk. you'd just switch the java_home that build runs w/. but all other builds would be normal.

FamDav
Mar 29, 2008
so we were talking about how c++ invites complexity in all the wrong places a page or two back and here's the best description of its issues:

  • a willingness to let issues that are rooted in the internals of the language and its design spill into programmers’ everyday lives,
  • a tendency towards experimentation, a tendency to focus on the immediate benefit of a feature and fix problems later, and
  • a tendency to increase the volume and surface area of the language lightly, with little regard for the combinatorial complexity that arises from the interaction of features.

from http://blog.greaterthanzero.com/post/58482859780/c-and-the-culture-of-complexity

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

FamDav posted:

so we were talking about how c++ invites complexity in all the wrong places a page or two back and here's the best description of its issues:

  • a willingness to let issues that are rooted in the internals of the language and its design spill into programmers’ everyday lives,
  • a tendency towards experimentation, a tendency to focus on the immediate benefit of a feature and fix problems later, and
  • a tendency to increase the volume and surface area of the language lightly, with little regard for the combinatorial complexity that arises from the interaction of features.

from http://blog.greaterthanzero.com/post/58482859780/c-and-the-culture-of-complexity

The last footnote is interesting:

quote:

Anybody who has been around C++ since the mid-1990’s will have to admit that the amount of time and resources spent on discussing the C++ copy assignment operator, and the problems that it has caused in code, are absolutely staggering. I’ve heard people say that this has gotten better because of a new best practice recommendation to shun C-style pointers altogether and use shared_ptr instead, as the latter plays well with the assignment’s default behavior of memberwise copying. If this is indeed the new best practice, then we have the following situaion: we set out to decouple the OO paradigm from GC-supported reference semantics and combine it with the low-level efficiency of C. Instead, we’re now using shared_ptr, which gives us reference semantics supported by per-object reference counting. Compared to GC-supported reference semantics, reference semantics supported by per-object reference counting is

not faster (the details of the performance comparisons are gory, but by no stretch of the imagination is per-object reference counting the faster alternative),
more brittle (the programmer has to watch out for cyclic references and handle them via weak pointers, see also my conjecture 1 above), and
less powerful (the participants in cyclic references cannot be peers as is the case under a garbage collector, there has to be an ownership relation).

Should this indeed be the state of affairs, I believe that the stewards of C++ owe us an explanation of what the direction and vision for the language is.

I don't know enough about C++ to say if he's right or wrong, but it does sound very C++-like in looking at two alternatives, and choosing the worst parts of both.

Nomnom Cookie
Aug 30, 2009



iirc the #1 goal of the c++ standard committee is don't pay for what you don't use. maybe the language is monstrous but you can turn off rtti and exceptions

Posting Principle
Dec 10, 2011

by Ralp

Nomnom Cookie posted:

iirc the #1 goal of the c++ standard committee is don't pay for what you don't use. maybe the language is monstrous but you can turn off rtti and exceptions

yep, this ruthlessness is a big part of the reason that there are many problems with c++, but also the reason why there is still no mature language that can do what c++ does

blog post is spot on though

FamDav
Mar 29, 2008

PleasingFungus posted:

The last footnote is interesting:

quote:

Anybody who has been around C++ since the mid-1990’s will have to admit that the amount of time and resources spent on discussing the C++ copy assignment operator, and the problems that it has caused in code, are absolutely staggering. I’ve heard people say that this has gotten better because of a new best practice recommendation to shun C-style pointers altogether and use shared_ptr instead, as the latter plays well with the assignment’s default behavior of memberwise copying. If this is indeed the new best practice, then we have the following situaion: we set out to decouple the OO paradigm from GC-supported reference semantics and combine it with the low-level efficiency of C. Instead, we’re now using shared_ptr, which gives us reference semantics supported by per-object reference counting. Compared to GC-supported reference semantics, reference semantics supported by per-object reference counting is

not faster (the details of the performance comparisons are gory, but by no stretch of the imagination is per-object reference counting the faster alternative),
more brittle (the programmer has to watch out for cyclic references and handle them via weak pointers, see also my conjecture 1 above), and
less powerful (the participants in cyclic references cannot be peers as is the case under a garbage collector, there has to be an ownership relation).

Should this indeed be the state of affairs, I believe that the stewards of C++ owe us an explanation of what the direction and vision for the language is.

I don't know enough about C++ to say if he's right or wrong, but it does sound very C++-like in looking at two alternatives, and choosing the worst parts of both.

his premise is flawed. we should use shared/unique_ptr instead of pointers, but we should not use pointers when alternatives present themselves.

the point of shared_ptr/unique_ptr is not give you something "stronger" than c pointers; theyre meant to encapsulate the two most common uses of pointers in ways that play nicely with RAII and conform to our understanding that variables going out of scope get taken care of correctly.

side problem: every bit of intuition you should have about a block of c++ code can be easily undone, and accidentally.

FamDav
Mar 29, 2008
there should be a class polymorphic<T> which contains a pointer to something of base type T that copies correctly for assignment so you can use polymorphic types transparently in classes

edit: god i wish you could overload the dot operator in c++. just force it to evaluate to a reference like how arrow has to evaluate to a pointer eventually.

suffix
Jul 27, 2013

Wheeee!

Nomnom Cookie posted:

iirc the #1 goal of the c++ standard committee is don't pay for what you don't use. maybe the language is monstrous but you can turn off rtti and exceptions

that's just the runtime cost, though. doesn't mean it can't take forever to compile, or that a typo won't give you five pages of garbage errors, or even make your code do something different and wrong because they only have so much syntax to work with here.

Brain Candy
May 18, 2006

seriously, as a dumb baby, refactoring c++ is Not Nice. you have a minefield of corner cases that you hope people were not stupid enough to use. but they did, and you can't tell at a glance.

this isn't an excuse not to test or do code reviews or whatever but there are like 4+ languages in there that you may or may not be using. choice requires discipline to not be poo poo. you know the thing that programmers hate hate hate hate because its such a contrast to the freedom and power to being able to go from nothing to something in practically no time.

crazypenguin
Mar 9, 2005
nothing witty here, move along
it's as easy to dump on c++ as it is to make fun of php or perl.

my biggest gripe is that it's almost impossible to parse. oh sure, c committed the original sin of needing name binding information to parse, but c++ ramps that all the way up to needing type check everything as it is parsed. and on top of that, it's still ambiguous, and you have to speculatively parse things and backtrack when it doesn't work out

Brain Candy posted:

you have a minefield of corner cases that you hope people were not stupid enough to use. but they did, and you can't tell at a glance.

it's impossible to do safe refactoring of c++. rename a function? oops, it was called in a template somewhere, and a refactoring engine can't know that those two names were meant to be the same, since it was resolved at the template instantiation site via koenig lookup.

big shtick energy
May 27, 2004


you know, when I started this project, this whole notion of using object oriented programming even though we were using C with static memory allocation kind of annoyed me, but now I really, really hate it and wish I had had a choice not to use it

for anyone wondering wtf object oriented C is, just imagine shitload of structs full of function pointers, and then sometimes to do abstraction you typecast one struct full of function pointers and variables to another one and of course in all of the functions it has to check that the structs mapped correctly and the functions got mapped into the structs full of function pointers by an init function somewhere

this was all done in the name of maintainability and future proofing but of course it's turned the code into this massive, difficult to understand blob because something like >50% of the lines of code are essentially "busy work" to try and make it do an object oriented dance that does nothing but make it more difficult to understand, because the actual place where a thing happens is buried 15 functions calls and function macros deep.

the worst part is it was too late to change it when I joined the project, and it's way too late to change it now. you can't help me now, but let my life be lesson to you: Just because you can make a UML diagram of it, that doesn't necessarily make it a good, sustainable design.

FamDav
Mar 29, 2008
i know this after the fact, but did you guys ever take a look at cello?

Brain Candy
May 18, 2006

DuckConference, sorry about your lots, language mismatch is such awful poo poo.

has UML ever been useful to anyone ever? why would anyone, except for managers/"architects" so they can pretend they had useful input, want to put code design in two places? seems like its dumb cs 101 comments all over again

big shtick energy
May 27, 2004


FamDav posted:

i know this after the fact, but did you guys ever take a look at cello?

just plain C with a decent set of coding standards and maybe some OO-inspired structural rules would have been just fine. that's the worst part, what the code actually needs to do ultimately isn't THAT complex.

you can't do a complete build without using a decent number of python scripts, some of which are 3.x and some of which are 2.x, but it's okay I guess because the 2.x ones only work in linux and the IDE is windows-only anyway.

when I actually type this out it sounds so much worse.

EDIT: to clarify the scripts call an external tool which is linux-only. We were unable to create another working installation of the tool when we tried earlier this week so in the meantime I'm just using my coworker's VM image (which he doesn't remember how he modified to get the tool to install and run properly)

big shtick energy fucked around with this message at 04:10 on Aug 24, 2013

FamDav
Mar 29, 2008
wait is this an actual real world project or is this something youre doing for school

this is important

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Brain Candy posted:

DuckConference, sorry about your lots, language mismatch is such awful poo poo.

has UML ever been useful to anyone ever? why would anyone, except for managers/"architects" so they can pretend they had useful input, want to put code design in two places? seems like its dumb cs 101 comments all over again

I think high level designs need to be somewhere so you can explain how it works without having to dive into code. It's just another part of the necessary documentation for the project. That being said, just like normal comments you have to be vigilant that if the code changes you need to update the diagrams.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

DuckConference posted:

just imagine shitload of structs full of function pointers, and then sometimes to do abstraction you typecast one struct full of function pointers and variables to another one and of course in all of the functions it has to check that the structs mapped correctly and the functions got mapped into the structs full of function pointers by an init function somewhere
mmmm yeah i love me some com

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Seriously idk what you're so upset about, bring in some c++ templates and macros to capture your repeating patterns and go on your merry way

What were you saying about only static memory though

shrughes
Oct 11, 2008

(call/cc call/cc)
I'm convinced that people who poo poo on C++ are all dumb. This isn't because C++ is great, it's just that every time you see somebody complain about C++, it turns out that they only give specious arguments and vapid blather. What's the probability that we'll ever come across an existential C++ rant that isn't written by a dumb person? I'd say 0.3% right now.

What really happens when people make complaints like this? It's people seeing others doing stuff they don't understand, because they're too new or too stupid, and assume somebody else is the problem. Look at the complaint about rvalue references. This person can't see rvalue references improving people's lives and the robustness of programs, because he's ignorant and doesn't know what he's talking about.

Another recent rant about C++ was done by the 0mq guy. Anybody who's looked at the 0mq source code can tell you that it's complete poo poo, and it's not C++'s fault.

Here is the real fact about C++: It's not about C++. It's about making a language suitable for efficiently writing non-garbage collected efficient programs. If and when C++ sees a suitable replacement, it'll be a language that is at least as complicated. It might lose a few superficial complications that C++ has, thanks to its C legacy, but the superficial complications are not the real problem that C++ has or that C++ programmers have. It's the problem of writing code without garbage collection itself, and C++ only helps.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
agreed

big shtick energy
May 27, 2004


Gazpacho posted:

Seriously idk what you're so upset about, bring in some c++ templates and macros to capture your repeating patterns and go on your merry way

What were you saying about only static memory though

it's a microcontroller with pretty limited RAM so memory allocation is always static. well, you still have a stack, but there's no dynamic memory allocation, your "objects" and buffers and such are all statically allocated. that part I have no problem with because it makes sense and it's the way I've always done it on microcontrollers

and no this is not a student project, this is my job, and this is the code for the company's most important product. if the product fails, I don't know if I'll even still have a job

Brain Candy
May 18, 2006

shrughes posted:

I'm convinced that people who poo poo on C++ are all dumb. This isn't because C++ is great, it's just that every time you see somebody complain about C++, it turns out that they only give specious arguments and vapid blather. What's the probability that we'll ever come across an existential C++ rant that isn't written by a dumb person? I'd say 0.3% right now.

What really happens when people make complaints like this? It's people seeing others doing stuff they don't understand, because they're too new or too stupid, and assume somebody else is the problem. Look at the complaint about rvalue references. This person can't see rvalue references improving people's lives and the robustness of programs, because he's ignorant and doesn't know what he's talking about.

Another recent rant about C++ was done by the 0mq guy. Anybody who's looked at the 0mq source code can tell you that it's complete poo poo, and it's not C++'s fault.

Here is the real fact about C++: It's not about C++. It's about making a language suitable for efficiently writing non-garbage collected efficient programs. If and when C++ sees a suitable replacement, it'll be a language that is at least as complicated. It might lose a few superficial complications that C++ has, thanks to its C legacy, but the superficial complications are not the real problem that C++ has or that C++ programmers have. It's the problem of writing code without garbage collection itself, and C++ only helps.

lol why don't you go gently caress yourself. here's is real fact, it is a language with warts from being formed over decades. there are some people who think c++ has problems, called the standards committee, you arrogant poo poo turd.

Deus Rex
Mar 5, 2005

Brain Candy posted:

lol why don't you go gently caress yourself. here's is real fact, it is a language with warts from being formed over decades. there are some people who think c++ has problems, called the standards committee, you arrogant poo poo turd.

Stringent
Dec 22, 2004


image text goes here

Brain Candy posted:

lol why don't you go gently caress yourself. here's is real fact, it is a language with warts from being formed over decades. there are some people who think c++ has problems, called the standards committee, you arrogant poo poo turd.

the biggest problem with c++ is the people who write c++

Deus Rex
Mar 5, 2005

Brain Candy posted:

lol why don't you go gently caress yourself. here's is real fact, it is a language with warts from being formed over decades. there are some people who think c++ has problems, called the standards committee, you arrogant poo poo turd.

Keep nastygrams out of the PL megathread. Please edit your post to follow the standard laid out in http://www.defmacro.org/2013/04/03/issue-etiquette.html.

Bloody
Mar 3, 2013

shrughes posted:

I'm convinced that people who poo poo on C++ are all dumb. This isn't because C++ is great, it's just that every time you see somebody complain about C++, it turns out that they only give specious arguments and vapid blather. What's the probability that we'll ever come across an existential C++ rant that isn't written by a dumb person? I'd say 0.3% right now.

What really happens when people make complaints like this? It's people seeing others doing stuff they don't understand, because they're too new or too stupid, and assume somebody else is the problem. Look at the complaint about rvalue references. This person can't see rvalue references improving people's lives and the robustness of programs, because he's ignorant and doesn't know what he's talking about.

Another recent rant about C++ was done by the 0mq guy. Anybody who's looked at the 0mq source code can tell you that it's complete poo poo, and it's not C++'s fault.

Here is the real fact about C++: It's not about C++. It's about making a language suitable for efficiently writing non-garbage collected efficient programs. If and when C++ sees a suitable replacement, it'll be a language that is at least as complicated. It might lose a few superficial complications that C++ has, thanks to its C legacy, but the superficial complications are not the real problem that C++ has or that C++ programmers have. It's the problem of writing code without garbage collection itself, and C++ only helps.

cite your quotes

Posting Principle
Dec 10, 2011

by Ralp
edit: this isn't about the current discussion its just something neat i found

in Qt5 you can now easily work around having to use QSignalMappers to map multiple signals to the same slot, and then distinguish between the senders in the slot. the only setup you need is the usual enum or group of strings that will be used to distinguish the senders, then in the connect call you can you use the new connect syntax to connect directly to a member function, which you bind the identifier to.

C++ code:
 connect(btnFoo, &QPushButton::clicked, std::bind(&SomeClass::doAThing, someInstance, Buttons::Foo));

that replaces the old way of
C++ code:
QSignalMapper mapper; // set up somewhere else
mapper->setMapping(btnFoo, Buttons::Foo);
connect(btnFoo, SIGNAL(cliked()), mapper, SLOT(map()));
connect(mapper, SIGNAL(mapped(int)), someInstance, SLOT(doAThing(int))); 
the new way also gets you the nice compile time checking, whereas the old one will fail at runtime if the connect fails :eng101:

this is using qt5 and c++11, so expect to see this nice new syntax in production sometime in 2030 :eng99:

suffix
Jul 27, 2013

Wheeee!

shrughes posted:

I'm convinced that people who poo poo on C++ are all dumb. This isn't because C++ is great, it's just that every time you see somebody complain about C++, it turns out that they only give specious arguments and vapid blather. What's the probability that we'll ever come across an existential C++ rant that isn't written by a dumb person? I'd say 0.3% right now.

source your quotes.

like this, here are some sourced quotes: http://port70.net/~nsz/16_c++.html

Posting Principle
Dec 10, 2011

by Ralp
the 2nd point on that page is factually wrong so i didn't read the rest

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Posting Principle posted:

the 2nd point on that page is factually wrong so i didn't read the rest

some of the quotes are pretty interesting, but i don't know enough to judge their quality. how's this one?


quote: Brian Kernighan (2000)

[..] Sometimes I do write C++ instead of C. C++ I think is basically too big a language, although there's a reason for almost everything that's in it. When I write a C program of any size, I probably will wind-up using 75, 80, 90% of the language features. In other words, most of the language is useful in almost any kind of program. By contrast, if I write in C++ I probably don't use even 10% of the language, and in fact the other 90% I don't think I understand. In that sense I would argue that C++ is too big, but C++ does give you may of the things that you need to write big programs: it does really make it possible for you to create objects, to protect the internal representation of information so that it presents a nice facade that you can't look behind. C++ has an enormous amount of mechanism that I think is very useful, and that C doesn't give you. [..]

[..] The languages that succeed are very pragmatic, and are very often fairly dirty because they try to solve real problems. C++ is a great example of a language that in many ways has serious flaws. One of the flaws is that it tried very hard to be compatible with C: compatible at the object level, compatible very closely at the source level. Because of this there are places where there's something ugly in the language, weird syntactic problems, strange semantic behaviors. In one sense this is bad, and nobody should ever do that, but one of the reasons that C++ succeeded was precisely that it was compatible with C, it was able to use the C libraries, it was usable by the base of existing C programmers, and therefore people could back into it and use it fairly effectively without having to buy into a whole new way of doing business. And this is not the case for ML, which was being done at about the same time and, at least partly, in almost the same place, but which took a very different view of the world. As a pragmatic thing, C++ is extremely successful but it paid a certain price by being compatible with the previous language. [..]

Brain Candy
May 18, 2006

that's a good quote, but theres deffo some crud in that link. it links esr. and like Posting Principle pointed out, the second bullet point is basically that things that were added in c++0xb are missing.

Brain Candy fucked around with this message at 17:17 on Aug 24, 2013

Posting Principle
Dec 10, 2011

by Ralp
That's a good quote by Knuth, but he rightly points out that you don't need the entirety of C++ to write programs. Like the FQA, that page convinces me even further that the people who complain most about C++ have a big crossover with bitcoiners.

"I don't understand moneyC++, but please read this long incoherent rant about how it's broken. Google Ron PaulPaul Graham"

FamDav
Mar 29, 2008
i like the quote from scott meyers

DAT NIGGA SCOTT MEYERS posted:

I'd like to answer this question with "complexity, complexity, complexity!", but naming the same thing three times is cheating. Still, I think that C++'s greatest weakness is complexity. For almost every rule in C++, there are exceptions, and often there are exceptions to the exceptions. For example, const objects can't be modified, unless you cast away their constness, in which case they can, unless they were originally defined to be const, in which case the attempted modifications yield undefined behavior.

As another example, names in base classes are visible in derived classes, unless the base class is instantiated from a template, in which case they're not, unless the derived class has employed a using declaration for them, in which case they are.

Such complexity affects more than just people who write programs in C++. It also affects people who want to write tools that analyze C++ programs. One of the reasons why there is a relative dearth of tools such as refactoring browsers for C++ is that C++ is just so darned complicated.

A related aspect of C++ I dislike has to do with what I perceive to be an attitude on the part of the standardization committee that such complexity is not a problem. I suspect that many members of the committee would object to my characterizing their attitude that way, but I'm talking only about my perception of their attitude. I know that the people on the committee work hard to make C++ as good as it can be. I also know that there are proposals before the committee whose goal is to simplify C++. Still, my impression is that the committee as a whole is unsympathetic to arguments that C++ has become too complex, and I find that frustrating. [..]

his complaints (and mine) have nothing to do with the inherent complexity of dealing with unmanaged code. its the poorly thought out features that were put on top or next to other poorly thought out features that force exceptions to exceptions and unintuitive behavior when composed together.

rust has inherent complexity. there are three different pointer types and associated rules for what happens you use and them pass them around. but these rules are clear, are lacking in exceptions to rules, and compose well with the other features of the language. these are exactly the things missing from c++ and what any sane person who works in it every day should complain about.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

FamDav posted:

i like the quote from scott meyers


his complaints (and mine) have nothing to do with the inherent complexity of dealing with unmanaged code. its the poorly thought out features that were put on top or next to other poorly thought out features that force exceptions to exceptions and unintuitive behavior when composed together.

rust has inherent complexity. there are three different pointer types and associated rules for what happens you use and them pass them around. but these rules are clear, are lacking in exceptions to rules, and compose well with the other features of the language. these are exactly the things missing from c++ and what any sane person who works in it every day should complain about.

does rust have behaviors that are "undefined" and can be handled different ways by different compilers?

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Posting Principle posted:

That's a good quote by Knuth, but he rightly points out that you don't need the entirety of C++ to write programs. Like the FQA, that page convinces me even further that the people who complain most about C++ have a big crossover with bitcoiners.

"I don't understand moneyC++, but please read this long incoherent rant about how it's broken. Google Ron PaulPaul Graham"

i prefer the quotes where it's not "this is a bad language", but "i don't like this language for this reason". i usually suspect the extreme opinion-havers are wildly overstating things, possibly for humorous effect

FamDav
Mar 29, 2008
rust has unsafe { ... } which are blocks where you are allowed to do things like dereference a c-like pointer, so you run into the same issue of dereferencing an invalid pointer. otherwise, no, there is no undefined behavior*.

some things have unspecified results which are dependent on what the processor does for certain kinds of arithmetic operations.

http://static.rust-lang.org/doc/rust.html#unsafe-functions

*the language is still in flux and so nobody has really cared to rigorously check that this is true

double sulk
Jul 2, 2010

holy moley rubygems is loving retarded. I never really thought about it but if you wanna name your gem the same thing as another that's on there already, welp gotta come up with another name even if the existing same named gem hasn't been updated for two years or more

tef
May 30, 2004

-> some l-system crap ->
:rolleyes:

Adbot
ADBOT LOVES YOU

shrughes
Oct 11, 2008

(call/cc call/cc)
Also it's for Ruby.

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