• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:04
CET 17:04
KST 01:04
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy7ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289
Community News
Weekly Cups (March 16-22): herO doubles, Cure surprises3Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool43Weekly Cups (March 9-15): herO, Clem, ByuN win42026 KungFu Cup Announcement6BGE Stara Zagora 2026 cancelled12
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Weekly Cups (March 16-22): herO doubles, Cure surprises Weekly Cups (August 25-31): Clem's Last Straw? Team Liquid Map Contest #22 - Presented by Monster Energy What mix of new & old maps do you want in the next ladder pool? (SC2)
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament World University TeamLeague (500$+) | Signups Open RSL Season 4 announced for March-April WardiTV Team League Season 10 KSL Week 87
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026]
External Content
The PondCast: SC2 News & Results Mutation # 518 Radiation Zone Mutation # 517 Distant Threat Mutation # 516 Specter of Death
Brood War
General
mca64Launcher - New Version with StarCraft: Remast BGH Auto Balance -> http://bghmmr.eu/ ASL21 General Discussion Soulkey's decision to leave C9 JaeDong's form before ASL
Tourneys
[ASL21] Ro24 Group B 2026 Changsha Offline Cup [ASL21] Ro24 Group A ASL Season 21 LIVESTREAM with English Commentary
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread European Politico-economics QA Mega-thread YouTube Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books Movie Discussion! [Manga] One Piece
Sports
2024 - 2026 Football Thread Cricket [SPORT] Formula 1 Discussion Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 3237 users

The Big Programming Thread - Page 963

Forum Index > General Forum
Post a Reply
Prev 1 961 962 963 964 965 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
May 26 2018 11:47 GMT
#19241
On May 26 2018 20:26 Excludos wrote:
Show nested quote +
On May 26 2018 08:53 nunez wrote:
@excludos
qt should be quarantined to the code that deals with the gui, and even there it should be used as sparingly as possible. for that it's an ok option, but for anything else there are better alternatives. if someone suggested that we use qt for signals / slots at work, he / she would also be quarantined to code that deals with gui.

some never get comfortable with the complexity of c++, and seek refuge in the abstract comfort of Qt or C# or python or whatever. parading this retreat as ersatz critique seems common.


What do you base your answer on here? Qt has loads of plugins and tools for back end purposes and is made to work equally well for that as front end. I wouldn't suggest you use it just because of signals and slots, but because it literally has an answer for all of your problems (Hyperbole of course. There's loads of things it doesn't do as well. Like heavy calculations or image operations). A lot of those problems can be solved with a external library each..or you can just remove all of them and use Qt instead. I'm also not saying it's the only tool for the job or something you must use in all situations, just that it's very good for a lot of them, and not something you should just dismiss based on..whatever you think you're basing it on. I don't know what kind of misconceptions you have about it, but I'd love to know


experience.
conspired against by a confederacy of dunces.
Excludos
Profile Blog Joined April 2010
Norway8243 Posts
May 26 2018 11:50 GMT
#19242
On May 26 2018 20:47 nunez wrote:
Show nested quote +
On May 26 2018 20:26 Excludos wrote:
On May 26 2018 08:53 nunez wrote:
@excludos
qt should be quarantined to the code that deals with the gui, and even there it should be used as sparingly as possible. for that it's an ok option, but for anything else there are better alternatives. if someone suggested that we use qt for signals / slots at work, he / she would also be quarantined to code that deals with gui.

some never get comfortable with the complexity of c++, and seek refuge in the abstract comfort of Qt or C# or python or whatever. parading this retreat as ersatz critique seems common.


What do you base your answer on here? Qt has loads of plugins and tools for back end purposes and is made to work equally well for that as front end. I wouldn't suggest you use it just because of signals and slots, but because it literally has an answer for all of your problems (Hyperbole of course. There's loads of things it doesn't do as well. Like heavy calculations or image operations). A lot of those problems can be solved with a external library each..or you can just remove all of them and use Qt instead. I'm also not saying it's the only tool for the job or something you must use in all situations, just that it's very good for a lot of them, and not something you should just dismiss based on..whatever you think you're basing it on. I don't know what kind of misconceptions you have about it, but I'd love to know


experience.


Again why bother with non-answers such as these? It's so damn pointless. Next time you're writing a one word answer, stop, think to yourself: "Does this provide anything?", realise the answer is "no", and then press backspace
nunez
Profile Blog Joined February 2011
Norway4003 Posts
May 26 2018 11:51 GMT
#19243
On May 26 2018 20:10 bo1b wrote:
With gratuitous template usage you can make c++ faster then c, at least when the problem crosses a certain threshold of complexity. There are many reasons c++ is used pretty much universally where time matters the most, more then anything. And then there are reasons why it's not used in operating system development, many to do with run time size and how it compiles, believe it or not c++ and c do not compile to the same machine code.

Again, c++ is only as safe as you allow yourself to be, as soon as you start using templates you'll start enjoying that "safety"


yes. i think inlining, copy-elision, etc, etc, is also worth mentioning when discussing performance. the prevalence of high-quality header-only libraries makes the thought of letting everything run through python unbearable just in terms of the potential compiler magic you miss out on.
conspired against by a confederacy of dunces.
Silvanel
Profile Blog Joined March 2003
Poland4744 Posts
Last Edited: 2018-05-26 12:01:46
May 26 2018 11:59 GMT
#19244
On May 26 2018 20:13 sc-darkness wrote:
What operating systems have been developed since C++ became popular though?


Tizen, Android, Symbian to name major ones but just to be clear i dont know detalis of their implementation.

Edit: Apparently Tizen is written both in C and C++
Pathetic Greta hater.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
May 26 2018 12:01 GMT
#19245
On May 26 2018 20:50 Excludos wrote:
Show nested quote +
On May 26 2018 20:47 nunez wrote:
On May 26 2018 20:26 Excludos wrote:
On May 26 2018 08:53 nunez wrote:
@excludos
qt should be quarantined to the code that deals with the gui, and even there it should be used as sparingly as possible. for that it's an ok option, but for anything else there are better alternatives. if someone suggested that we use qt for signals / slots at work, he / she would also be quarantined to code that deals with gui.

some never get comfortable with the complexity of c++, and seek refuge in the abstract comfort of Qt or C# or python or whatever. parading this retreat as ersatz critique seems common.


What do you base your answer on here? Qt has loads of plugins and tools for back end purposes and is made to work equally well for that as front end. I wouldn't suggest you use it just because of signals and slots, but because it literally has an answer for all of your problems (Hyperbole of course. There's loads of things it doesn't do as well. Like heavy calculations or image operations). A lot of those problems can be solved with a external library each..or you can just remove all of them and use Qt instead. I'm also not saying it's the only tool for the job or something you must use in all situations, just that it's very good for a lot of them, and not something you should just dismiss based on..whatever you think you're basing it on. I don't know what kind of misconceptions you have about it, but I'd love to know


experience.


Again why bother with non-answers such as these? It's so damn pointless. Next time you're writing a one word answer, stop, think to yourself: "Does this provide anything?", realise the answer is "no", and then press backspace


it's my honest answer.
conspired against by a confederacy of dunces.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2018-05-26 12:05:47
May 26 2018 12:05 GMT
#19246
On May 26 2018 19:54 bo1b wrote:
std::vector<int> sortThis = {3, 6, 1, 9, 8, 2, 0, 5, 7, 4};
std::sort(sortThis.begin(),sortThis.end());

modern (ok, ranges is not quite here yet, but very soon):
std::vector v{3,6,1,9,8,2,0,5,7,4};
std::sort(v);
conspired against by a confederacy of dunces.
Excludos
Profile Blog Joined April 2010
Norway8243 Posts
Last Edited: 2018-05-26 12:18:49
May 26 2018 12:15 GMT
#19247
edit: fuck it. I have better things to do than feeding a troll
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2018-05-26 12:22:12
May 26 2018 12:21 GMT
#19248
On May 26 2018 21:05 nunez wrote:
Show nested quote +
On May 26 2018 19:54 bo1b wrote:
std::vector<int> sortThis = {3, 6, 1, 9, 8, 2, 0, 5, 7, 4};
std::sort(sortThis.begin(),sortThis.end());

modern (ok, ranges is not quite here yet, but very soon):
std::vector v{3,6,1,9,8,2,0,5,7,4};
std::sort(v);


Initializer list reminds me of something I've read from Google's C++ Code Style. To feed C++ haters:

std::vector<int> v(100, 1); // A vector containing 100 items: All 1s.
std::vector<int> v{100, 1}; // A vector containing 2 items: 100 and 1.
Hanh
Profile Joined June 2016
146 Posts
May 26 2018 12:26 GMT
#19249
Most kernels use multiple languages. For Android/Linux/MacOS, most of it is in C. C++ for some small parts and C#/Java/Objective-C for libraries. Some assembly when needed. These days, the arguments pro/con C++ are quite outdated and often show an unwillingness to try new things. True, GC was pathetic in the early days but now manual memory management isn't necessarily better because ARC has issues than GC doesn't. ARC adds memory overhead, trashes the cache, can cause unpredictable pauses, requires special handling to break cycles, is unfriendly to multi-threaded programs, etc.

My advice would be: don't overthink that stuff and have fun. The language is just a tool and no tool is the best for every scenario. If you spend your energy defending your favorite language, you will miss out on many of the other cool stuff out there.
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2018-05-26 12:36:39
May 26 2018 12:32 GMT
#19250
I don't know how C++ shared_ptr is implemented, but unique_ptr is neither ARC nor GC. It's simply deallocated when it's out of scope without magic from compiler. It's so simple: constructor allocates, scope ends, then destructor is called and memory is released.


void SomeFunction()
{
// constructor is called here
std::unique_ptr<Class> obj = std::make_unique<Class>(parameters);
obj.method();
} // memory is deallocated when scope ends here which means Class' destructor is called


I'd pick modern C++ memory management over GC any day. I just don't stand checking memory usage of my program, then wondering if it's leaking memory or if GC hasn't kicked in. Also, when will memory be released? It's so annoying.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
May 26 2018 12:38 GMT
#19251
On May 26 2018 21:21 sc-darkness wrote:
Show nested quote +
On May 26 2018 21:05 nunez wrote:
On May 26 2018 19:54 bo1b wrote:
std::vector<int> sortThis = {3, 6, 1, 9, 8, 2, 0, 5, 7, 4};
std::sort(sortThis.begin(),sortThis.end());

modern (ok, ranges is not quite here yet, but very soon):
std::vector v{3,6,1,9,8,2,0,5,7,4};
std::sort(v);


Initializer list reminds me of something I've read from Google's C++ Code Style. To feed C++ haters:
Show nested quote +

std::vector<int> v(100, 1); // A vector containing 100 items: All 1s.
std::vector<int> v{100, 1}; // A vector containing 2 items: 100 and 1.

yes... i was aiming for class template argument deduction though. maybe you picked up on that, i couldn't tell.
conspired against by a confederacy of dunces.
Liquid`Jinro
Profile Blog Joined September 2002
Sweden33719 Posts
Last Edited: 2018-05-26 12:46:59
May 26 2018 12:42 GMT
#19252
Jinro unfortunately not everything is written in c/c++ with a python library attached, and for those many cases getting dirty with a lower level language is sometimes unavoidable. I also disagree to a certain degree about not needing to know the underlying library, if only because an awful lot of it is years or decades old and may not interface well with the newest version or w/e language you're running.

I've already experienced that second one on my own (actually almost the very first project I ever attempted a few years back, I ran into it) so I see what you mean!
Moderatortell the guy that interplanatar interaction is pivotal to terrans variety of optionitudals in the pre-midgame preperatories as well as the protosstinal deterriggation of elite zergling strikes - Stimey n | Formerly FrozenArbiter
sc-darkness
Profile Joined August 2017
856 Posts
May 26 2018 12:59 GMT
#19253
On May 26 2018 21:38 nunez wrote:
Show nested quote +
On May 26 2018 21:21 sc-darkness wrote:
On May 26 2018 21:05 nunez wrote:
On May 26 2018 19:54 bo1b wrote:
std::vector<int> sortThis = {3, 6, 1, 9, 8, 2, 0, 5, 7, 4};
std::sort(sortThis.begin(),sortThis.end());

modern (ok, ranges is not quite here yet, but very soon):
std::vector v{3,6,1,9,8,2,0,5,7,4};
std::sort(v);


Initializer list reminds me of something I've read from Google's C++ Code Style. To feed C++ haters:

std::vector<int> v(100, 1); // A vector containing 100 items: All 1s.
std::vector<int> v{100, 1}; // A vector containing 2 items: 100 and 1.

yes... i was aiming for class template argument deduction though. maybe you picked up on that, i couldn't tell.


Well, since this is C++14, I definitely didn't mean something from C++17. I doubt C++17 will change it for backwards compatibility reasons. It's just that braces change semantics in that example which is one of the ugly sides of C++, but it's totally avoidable.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
May 26 2018 13:04 GMT
#19254
what is c++14?
conspired against by a confederacy of dunces.
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2018-05-26 13:10:48
May 26 2018 13:08 GMT
#19255
Did you see example?

std::vector<int> v(100, 1); // A vector containing 100 items: All 1s.
std::vector<int> v{100, 1}; // A vector containing 2 items: 100 and 1.


The second line is C++14 (uniform initialization & initializer list). It's ugly to have 2 different outcomes based on what brackets you use. Luckily, this could be avoided with good coding conventions.
Hanh
Profile Joined June 2016
146 Posts
May 26 2018 13:10 GMT
#19256
On May 26 2018 21:32 sc-darkness wrote:
I don't know how C++ shared_ptr is implemented, but unique_ptr is neither ARC nor GC. It's simply deallocated when it's out of scope without magic from compiler. It's so simple: constructor allocates, scope ends, then destructor is called and memory is released.


void SomeFunction()
{
// constructor is called here
std::unique_ptr<Class> obj = std::make_unique<Class>(parameters);
obj.method();
} // memory is deallocated when scope ends here which means Class' destructor is called


I'd pick modern C++ memory management over GC any day. I just don't stand checking memory usage of my program, then wondering if it's leaking memory or if GC hasn't kicked in. Also, when will memory be released? It's so annoying.


Yes, but unique_ptr fills this particular role only. shared_ptr is ARC.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
May 26 2018 13:12 GMT
#19257
initializer-lists are c++14 now? hm... i don't know kev.

vector (see overload 8)
initializer_list (see initializer_list)
conspired against by a confederacy of dunces.
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2018-05-26 13:21:52
May 26 2018 13:17 GMT
#19258
Ok, I don't remember correctly then. Uniform initialization is what makes the second example ugly then.

All of them are 10.

int number(10);
int number{10}; // uniform initialization
int number = 10;



It's not the same story here.

std::vector<int> v(100, 1); // A vector containing 100 items: All 1s.
std::vector<int> v{100, 1}; // A vector containing 2 items: 100 and 1.
^ uniform initialization
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2018-05-26 13:23:20
May 26 2018 13:22 GMT
#19259
list_initialization

in particular:
Otherwise, the constructors of T are considered, in two phases:

All constructors that take std::initializer_list as the only argument, or as the first argument if the remaining arguments have default values, are examined, and matched by overload resolution against a single argument of type std::initializer_list.

don't see why this is c++14.

note, you're using direct-list-initialization, see (1).
conspired against by a confederacy of dunces.
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2018-05-26 13:30:06
May 26 2018 13:28 GMT
#19260
Yes, same problem regardless if it's C++11 or C++14. Just different standard. It doesn't really matter which of the two it is. It's still going to compile with recent compilers.

So you're saying it's only fine because it's a better match to compiler. I understand that. I'm just against confusing syntax in that case. They should be significantly more different than a single character. The question is, do you agree or not?
Prev 1 961 962 963 964 965 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 7h 56m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko502
LamboSC2 323
Trikslyr41
Rex 25
Codebar 21
StarCraft: Brood War
Britney 26733
Calm 7919
Bisu 2798
Shuttle 1233
Larva 664
BeSt 544
Mini 420
Rush 396
firebathero 380
Soma 376
[ Show more ]
Stork 358
Snow 316
ZerO 305
EffOrt 288
Light 287
ggaemo 224
Leta 185
actioN 167
PianO 103
Zeus 81
Mind 78
Sea.KH 75
Sharp 70
Backho 66
sorry 43
HiyA 42
[sc1f]eonzerg 40
Barracks 40
Free 39
Movie 25
soO 19
Terrorterran 16
IntoTheRainbow 16
Shinee 15
Sacsri 12
ajuk12(nOOB) 8
ivOry 7
Dota 2
Gorgc7195
Counter-Strike
fl0m1163
edward111
oskar85
adren_tv57
Heroes of the Storm
MindelVK19
Other Games
singsing1968
B2W.Neo840
hiko813
FrodaN713
DeMusliM312
crisheroes160
Hui .158
Liquid`VortiX111
QueenE104
ArmadaUGS102
Sick101
Grubby43
ZerO(Twitch)19
Organizations
Dota 2
PGL Dota 2 - Main Stream39
StarCraft: Brood War
Kim Chul Min (afreeca) 8
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• poizon28 48
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• FirePhoenix0
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis3622
• TFBlade988
• Shiphtur111
Upcoming Events
PiGosaur Cup
7h 56m
Replay Cast
16h 56m
Afreeca Starleague
17h 56m
hero vs YSC
Larva vs Shine
Kung Fu Cup
18h 56m
Replay Cast
1d 7h
KCM Race Survival
1d 16h
The PondCast
1d 17h
WardiTV Team League
1d 19h
OSC
1d 19h
Replay Cast
2 days
[ Show More ]
WardiTV Team League
2 days
RSL Revival
3 days
Cure vs Zoun
herO vs Rogue
WardiTV Team League
3 days
Platinum Heroes Events
3 days
BSL
4 days
RSL Revival
4 days
ByuN vs Maru
MaxPax vs TriGGeR
WardiTV Team League
4 days
BSL
5 days
Replay Cast
5 days
Replay Cast
5 days
Afreeca Starleague
5 days
Light vs Calm
Royal vs Mind
Wardi Open
5 days
Monday Night Weeklies
5 days
OSC
6 days
Sparkling Tuna Cup
6 days
Afreeca Starleague
6 days
Rush vs PianO
Flash vs Speed
Liquipedia Results

Completed

Proleague 2026-03-23
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
BSL Season 22
CSL Elite League 2026
CSL Season 20: Qualifier 1
ASL Season 21
Acropolis #4 - TS6
RSL Revival: Season 4
Nations Cup 2026
NationLESS Cup
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

2026 Changsha Offline CUP
CSL Season 20: Qualifier 2
CSL 2026 SPRING (S20)
Acropolis #4
IPSL Spring 2026
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.