• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:42
CEST 15:42
KST 22:42
  • 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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
IntoTheTV X SOOP SC2 League : Weekly & Monthly4Clem: "I don't have that much hope in Blizzard"2ZeroSpace Early Access is Now Live!24Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters2Balance hotfix patch 5.0.16b (July 16)90
StarCraft 2
General
Reynor: GSL Loss Wasn't About Preparation Format Balance hotfix patch 5.0.16b (July 16) How would you feel about frequent/monthly balance patches for SC2? Clem: "I don't have that much hope in Blizzard" Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters
Tourneys
IntoTheTV X SOOP SC2 League : Weekly & Monthly INu's Battles#18 - Cure, herO, Rogue & ByuN RSL Revival: Season 6 - Qualifiers and Main Event Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026
Strategy
[G] Having the right mentality to improve
Custom Maps
[M] (2) Industrial Park New Map Maker - Looking for Advice - Love or Hate
External Content
Mutation # 535 Assembly of Vengeance The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together
Brood War
General
ASL22 General Discussion BW General Discussion How Famous was FlaSh before his Debut? Animated Gateway BGH Auto Balance -> http://bghmmr.eu/
Tourneys
Escore Tournament - Season 3 Small VOD Thread 2.0 [Megathread] Daily Proleagues [IPSL] Spring 2026 Grand Finals - This Weekend!
Strategy
Simple Questions, Simple Answers PvT advise for noobs Fighting Spirit mining rates Creating a full chart of Zerg builds
Other Games
General Games
Path of Exile ZeroSpace Early Access is Now Live! General RTS Discussion Thread Nintendo Switch Thread Diablo IV
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance Vanilla Mini Mafia
Community
General
Artificial Intelligence Thread US Politics Mega-thread Russo-Ukrainian War Thread How to buy a book - shipping from Korea to Europe The Games Industry And ATVI
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
How Games can Help with Majo…
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
An Exploration of th…
waywardstrategy
Customize Sidebar...

Website Feedback

Closed Threads



Active: 4690 users

The Big Programming Thread - Page 507

Forum Index > General Forum
Post a Reply
Prev 1 505 506 507 508 509 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.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2014-08-04 14:05:56
August 04 2014 14:03 GMT
#10121
Is there some kind of JComboBox in Java that lets you introduce categories? E.g.

Fruit
- Apple
- Orange
Vegetable
- Onion
- Carrot

Obviously categories shouldn't be selectable. I've searched Google but I wasn't lucky to find anything useful about JComboBox with groups. Does Java even support groups/categories?
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-08-04 15:34:36
August 04 2014 15:29 GMT
#10122
i was writing some slick code in vs 2013 pre-update 2, using alias templates (in particular std::enable_if_t), because that's how you roll these days. however after running update 2 nothing compiled, and not only that, the compiler crashed!

it silently strangled itself at the callsite of functions that used alias templates for convenience in SFINAE-induced static polymorphism! update 2 had broken alias templates (how do you break something that simple? something something default template parameter).

at the time i thought the updated compiler was calling me out, that i was out of my league. what a relief to find out it simply couldn't keep up with my fly std::moves.

another battle i recently had with vs 2013 was over a non-conforming extension that allowed a senior programmer to write something akin to:
struct t{};
template<class T> void f(T&){ }
...
t v;
f(v); //c++
f(t()); //not c++, binding lvalue ref to rvalue
due to compatability concerns with some old windows code. it does not emit warning unless you're on /W4 and no error since extensions are turned on by default.

the time in purgatory between raising concerns about the code we were being showed, being told that 'no, this works completely fine, what are you talking about', looking like a fool on the scrum floor, and finding out that the compiler was once again attempting mutiny made my eventual self-righteous triumph even sweeter.

gcc, how i miss you.

#humblebrag
conspired against by a confederacy of dunces.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
August 04 2014 16:59 GMT
#10123
Why do you use vs (2013)?
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-08-04 17:08:27
August 04 2014 17:07 GMT
#10124
it's what the company i work at this summer uses!
good prac for me too. gotta get familiar.
conspired against by a confederacy of dunces.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
August 04 2014 20:28 GMT
#10125
True that! What company?
Luckily in the company I worked for you could use whatever you wanted. I've become a Vim master, MOAHHAHA
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
nunez
Profile Blog Joined February 2011
Norway4003 Posts
August 04 2014 22:14 GMT
#10126
ah that's slick, it's a daily bummer for me. maybe the set up at the workplace isn't the best, but i wouldn't actually know since i don't have any experience with a codebase that big.

powel in trondheim actually.

my vim skills have stagnated lately, but getting familiar with regexps as i am utilizing flex / bison.
conspired against by a confederacy of dunces.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
August 04 2014 22:16 GMT
#10127
Yeah, I've also learnt a bunch of regex this summer, it's awesome! Learning an IDE isn't bad though, I should probably learn one. Still, if I don't have to, I won't
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
nunez
Profile Blog Joined February 2011
Norway4003 Posts
August 04 2014 22:30 GMT
#10128
ah, where? i feel some ways off from saying i have it in my toolkit still unfortunately.

does anyone use m4 or any other preprocessing language (separate from the native one) in their deving? some input on its uses and usefulness would be appreciated.
conspired against by a confederacy of dunces.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2014-08-05 04:11:40
August 05 2014 04:10 GMT
#10129
I know Linus Torvalds' comment about C++ has been brought up many times, yet I know almost nothing about C++. But isn't he too extreme? I've heard C++ has a bunch of everything but I'm sure if there are certain programming standards within an organisation, then even that could be more or less avoided.

Frankly, his bite at OOP makes me think he is that retarded. Yes, Linus is a legend but his opinions aren't.
tofucake
Profile Blog Joined October 2009
Hyrule19229 Posts
August 05 2014 04:15 GMT
#10130
His arguments are silly and most people ignore them.
Liquipediaasante sana squash banana
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
August 05 2014 05:21 GMT
#10131
--- Nuked ---
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
August 05 2014 09:22 GMT
#10132
I think void pointers are the coolest thing ever TBH much more fun than "Objects"
There is no one like you in the universe.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
August 05 2014 10:01 GMT
#10133
On August 05 2014 18:22 Blisse wrote:
I think void pointers are the coolest thing ever TBH much more fun than "Objects"



The void pointer, also known as the generic pointer, is a special type of pointer that can be pointed at objects of any data type! A void pointer is declared like a normal pointer, using the void keyword as the pointer’s type:
1

void *pVoid; // pVoid is a void pointer


Erm, whether you write your template stuff in C++ or Java generics is kind of the same compared to void pointers. I don't see what the big deal is. Generics is actually a smarter concept because you (hopefully) don't have to cast your stuff like in the case of C.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-08-05 10:26:01
August 05 2014 10:20 GMT
#10134
I know what it is. I'm saying that it's more fun to play around with void pointers than with objects.
There is no one like you in the universe.
bangsholt
Profile Joined June 2011
Denmark138 Posts
August 05 2014 16:01 GMT
#10135
On August 05 2014 13:10 darkness wrote:
I know Linus Torvalds' comment about C++ has been brought up many times, yet I know almost nothing about C++. But isn't he too extreme? I've heard C++ has a bunch of everything but I'm sure if there are certain programming standards within an organisation, then even that could be more or less avoided.

Frankly, his bite at OOP makes me think he is that retarded. Yes, Linus is a legend but his opinions aren't.


Try to learn C++, it's a carwreck of a language because you have three different ISOs, you have the C++11, C++03, C++98 which all strives not to introduce any major code breaking, meaning that you have 3 distinct ways of programming in C++ that are all valid, correct and will compile as expected, which unless as you say, you have a coding standard in place, everyone will use what they are most familiar with.

It's only natural to be wanting to use the newest features, which is why quite a few C++ codebases are scattered across all of standards.

So basically you *need* to remove parts of the language that you don't want, in order to have a subset of the language that is possibly to understand thoroughly.

With regards to the OOP comment, why do you think he's retarded? No matter how you look at it, you do lose *some* (not much, but some) performance by using OOP (i.e. Java/C# is ~5-10% slower in most cases), so when performance is the most important thing, you go with C on Linux - which was one of the main criteria that was behind the decision not to use Monotone when the big switch of version control software happened with the linux kernel.
Ninoah
Profile Joined August 2014
7 Posts
August 05 2014 16:03 GMT
#10136
So I came a across a problem where someone tries to write a program that reads a Unicode text file of unlimited size and unlimited words. The end result of it would be outputting a text file with everything sorted.

I've been thinking about external sorting, but are there any other approaches to this problem?
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2014-08-05 16:40:16
August 05 2014 16:36 GMT
#10137
On August 06 2014 01:01 bangsholt wrote:
With regards to the OOP comment, why do you think he's retarded? No matter how you look at it, you do lose *some* (not much, but some) performance by using OOP (i.e. Java/C# is ~5-10% slower in most cases), so when performance is the most important thing, you go with C on Linux - which was one of the main criteria that was behind the decision not to use Monotone when the big switch of version control software happened with the linux kernel.

When performance is the most important thing, you sometimes use Fortran. You might use a limited amount of ASM. C is not the end all be all of performance. Also performance is never the most important thing, you have to be able to afford the programmer time needed to achieve sufficient performance and correctness. With a given amount of resources, you might achieve far better performance in non-C languages.

On August 06 2014 01:03 Ninoah wrote:
So I came a across a problem where someone tries to write a program that reads a Unicode text file of unlimited size and unlimited words. The end result of it would be outputting a text file with everything sorted.

I've been thinking about external sorting, but are there any other approaches to this problem?

Maybe checking out how databases sort datasets too large to fit into memory would be a good starting point.
How large is "unlimited size", anyways? Are we talking "unlimited, but in the range of 1GB or less", or "as large as physically possible"?
If you have a good reason to disagree with the above, please tell me. Thank you.
bangsholt
Profile Joined June 2011
Denmark138 Posts
August 05 2014 17:07 GMT
#10138
On August 06 2014 01:36 spinesheath wrote:
Show nested quote +
On August 06 2014 01:01 bangsholt wrote:
With regards to the OOP comment, why do you think he's retarded? No matter how you look at it, you do lose *some* (not much, but some) performance by using OOP (i.e. Java/C# is ~5-10% slower in most cases), so when performance is the most important thing, you go with C on Linux - which was one of the main criteria that was behind the decision not to use Monotone when the big switch of version control software happened with the linux kernel.

When performance is the most important thing, you sometimes use Fortran. You might use a limited amount of ASM. C is not the end all be all of performance. Also performance is never the most important thing, you have to be able to afford the programmer time needed to achieve sufficient performance and correctness. With a given amount of resources, you might achieve far better performance in non-C languages.


It of course depends on the application. Now I was talking about Git - as the comment linked to is about it - and there's of course languages that can be just as performance tuned as C, heck Mercurial is written in Python and is as fast as Git (of course they cheat a bit by using a lot of C extensions, but details), but I don't think you would want to write Git or Mercurial in FORTRAN - it's after all build to do calculations, not to write a DCVS :o)

While you can "easily" get better performance than C in specific cases (See: Heavy calculation -> FORTRAN), in the general case, which language can you tune to run faster than C?

Please be aware, I'm not saying that writing C is a magic fix to get slow code to run fast, bad algorithms will be bad regardless of your language choice

(In the professional part I do C - but that's exclusively for embedded. For desktops I use Java/C#)

Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
August 05 2014 17:37 GMT
#10139
--- Nuked ---
tofucake
Profile Blog Joined October 2009
Hyrule19229 Posts
August 05 2014 17:54 GMT
#10140
I just really can't get past his "it has lots of bad programmers so it's a bad language" argument, it makes no sense.

And performance is usually not significant enough a factor to say "C always over C++". Hell, Northrup Grumman uses loads of .Net and they have a lot of stuff that relies on performance (e.g. Predator drones).

Torvalds falls into the category of fantatic, in the true sense of the word. He sees languages as a way of life, not as a tool. Different tools for different jobs.
Liquipediaasante sana squash banana
Prev 1 505 506 507 508 509 1032 Next
Please log in or register to reply.
Live Events Refresh
WardiTV Summer Champion…
12:00
Summer Cup Group D
WardiTV1037
IntoTheiNu 904
TKL 199
Rex120
IndyStarCraft 117
LiquipediaDiscussion
Escore
10:00
Season 3 Week 4
escodisco2644
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ByuN 318
TKL 199
Rex 120
IndyStarCraft 117
RushiSC 11
ProTech2
StarCraft: Brood War
Hyuk 2565
Shuttle 2181
Horang2 786
Mini 677
BeSt 556
EffOrt 409
firebathero 402
Soulkey 325
Light 275
ggaemo 227
[ Show more ]
Snow 190
actioN 176
JYJ 168
hero 137
Rush 123
Sea.KH 61
Hyun 58
Sharp 58
ToSsGirL 47
Free 42
Hm[arnc] 40
Aegong 38
Mind 37
Bale 36
soO 36
910 26
Barracks 26
Sexy 21
NaDa 18
scan(afreeca) 17
Shine 15
IntoTheRainbow 14
HiyA 13
Rock 13
Yoon 12
zelot 9
ajuk12(nOOB) 7
Dota 2
qojqva1186
syndereN301
League of Legends
KnowMe38
Counter-Strike
fl0m2477
Other Games
FrodaN1918
singsing1890
B2W.Neo821
hiko746
Lowko427
uThermal394
crisheroes296
Mlord252
Hui .247
DeMusliM176
Liquid`VortiX114
XaKoH 109
ToD98
djWHEAT75
CosmosSc2 70
QueenE66
Trikslyr18
Organizations
StarCraft 2
angryscii 18
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV453
League of Legends
• Nemesis1480
• Jankos1346
• TFBlade320
Upcoming Events
Big Brain Bouts
2h 18m
Soulspirit vs goblin
TriGGeR vs Bunny
OSC
8h 18m
Korean StarCraft League
13h 18m
Afreeca Starleague
14h 18m
RSL Revival
19h 18m
Serral vs SHIN
herO vs Solar
Online Event
1d 1h
Replay Cast
1d 10h
RSL Revival
1d 19h
Clem vs ByuN
Rogue vs Lambo
OSC
1d 22h
WardiTV Weekly
2 days
[ Show More ]
Sparkling Tuna Cup
3 days
INu's Battles
3 days
Cure vs herO
ByuN vs Rogue
PiGosaur Cup
4 days
The PondCast
4 days
Kung Fu Cup
4 days
Patches Events
5 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-07-22
HSC XXIX
Eternal Conflict S2 E3

Ongoing

CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
Escore Tournament S3: W4
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026

Upcoming

ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
ASL Season 22: Qualifier #1
ASL Season 22: Qualifier #2
CSLAN 4
ASL Season 22
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
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.