• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 01:45
CET 07:45
KST 15:45
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband
Tourneys
StarCraft Evolution League (SC Evo Biweekly) RSL Offline Finals Info - Dec 13 and 14! RSL Offline FInals Sea Duckling Open (Global, Bronze-Diamond) $5,000+ WardiTV 2025 Championship
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
BW General Discussion Which season is the best in ASL? Data analysis on 70 million replays BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[BSL21] RO16 Group D - Sunday 21:00 CET [BSL21] RO16 Group A - Saturday 21:00 CET [Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread ZeroSpace Megathread Nintendo Switch Thread The Perfect Game Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1735 users

The Big Programming Thread - Page 513

Forum Index > General Forum
Post a Reply
Prev 1 511 512 513 514 515 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.
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
August 27 2014 07:29 GMT
#10241
One quick question for the Python guys out there: One of the Python guides I'm looking at in the OP is based on Python 3.2.1. I'm assuming that's just because that was the most recent version when the guide was put out, but am I safe to use 3.4.1 for the guide or should I expect some notable differences?
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
Morga
Profile Joined August 2010
Belgium35 Posts
August 27 2014 08:04 GMT
#10242
Nah you should be good.
meatpudding
Profile Joined March 2011
Australia520 Posts
August 27 2014 08:06 GMT
#10243
On August 27 2014 16:29 Grobyc wrote:
One quick question for the Python guys out there: One of the Python guides I'm looking at in the OP is based on Python 3.2.1. I'm assuming that's just because that was the most recent version when the guide was put out, but am I safe to use 3.4.1 for the guide or should I expect some notable differences?


I would guess it's ok. I don't know for sure but if you're looking at python.org then you can find an up-to-date one. Also keep in mind that the latest Python 2.x.x branch still sees a lot of use (possibly more than the 3.x.x branch) . Just something to keep in mind that both version 2 and 3 are perfectly fine to use.
Be excellent to each other.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
August 27 2014 08:18 GMT
#10244
--- Nuked ---
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
Last Edited: 2014-08-27 08:24:46
August 27 2014 08:24 GMT
#10245
Thanks for the quick responses guys
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
delHospital
Profile Blog Joined December 2010
Poland261 Posts
Last Edited: 2014-08-27 12:49:43
August 27 2014 12:47 GMT
#10246
On August 27 2014 07:16 Nesserev wrote:
Well, there are many choices, but you probably would want:
- a general scripting language
- a web front-end language
- a language to write programs

Python can do all 3, but it shines the most as a general scripting language. Alternatively, Perl is also used a lot.
PHP/Python as web front-end languages are probably all you will need (and javascript and the whole mess).
If you want to write programs... almost any general programming language will suffice

My recommendation: Python, C++ and Bash(Unix shell scripting) will get you very far.

Web front-end is HTML, CSS, and JS. PHP, Python, and Perl are back-end languages.

@Grobyc, if you want to create websites, you need to know HTML, CSS, JS, a back-end language (PHP, Python, Perl, Ruby, JS, C#, almost any language), and SQL. You will also have to learn how to use libraries like jQuery and Django/RoR/ASP.NET/whatever-applies-in-your-case, how to configure web servers (Apache, nginx), SQL severs (PostgreSQL, MySQL/MariaDB, MSSQL). And you need to know how HTTP works.

If you want to create network clients and servers, you most likely need C and C++. Possibly a higher level language like Java. Possibly even Erlang. You also need to know how to use the tools provided by your operating system and programming language library/runtime system (processes, threads, other kinds of IO concurrency, IPC, sockets, etc.). And obviously, you will need knowledge of network protocols.

Unless you only develop on Windows and for Windows, you should also know shell scripting (not only syntax, but also commonly used utilities and all kinds of traps you can fall into).

Oh, and use git. It's pretty useful
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
August 27 2014 13:09 GMT
#10247
--- Nuked ---
tofucake
Profile Blog Joined October 2009
Hyrule19173 Posts
August 27 2014 14:33 GMT
#10248
For backend, stick with PHP. It's ubiquitous and easy (though that makes it easy to write really bad code). Most hosts won't let you run Node on shared servers, so it's best to learn JS for front end stuff and then fiddle with Node on your own.
Liquipediaasante sana squash banana
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2014-08-27 15:13:33
August 27 2014 15:12 GMT
#10249
Is python 2.7 still more popular than 3? People say there's a lot of backwards compatibility. Last year I wanted to do simple guis for an app and I can't find any good libraries and there are bugs everywhere and windows binaries are all 2.7 and documentation is still all 2.7 :/
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
CatNzHat
Profile Blog Joined February 2011
United States1599 Posts
August 27 2014 16:29 GMT
#10250
From a web perspective Python 3 is definitely used more: http://trends.builtwith.com/framework/Python

I'd put Ruby high on the list for web back-end languages. Sinatra and Rails make it easy to get something up and running without too much effort, which is important to keep from losing interest.
delHospital
Profile Blog Joined December 2010
Poland261 Posts
Last Edited: 2014-08-27 17:46:54
August 27 2014 17:43 GMT
#10251
On August 28 2014 01:29 CatNzHat wrote:
From a web perspective Python 3 is definitely used more: http://trends.builtwith.com/framework/Python

I'd put Ruby high on the list for web back-end languages. Sinatra and Rails make it easy to get something up and running without too much effort, which is important to keep from losing interest.

from the website you linked: python 2.6: 400k, how is python 3 used more??

e: oh, the question was specifically about 2.7. sorry, didn't see
Manit0u
Profile Blog Joined August 2004
Poland17496 Posts
Last Edited: 2014-08-29 08:33:42
August 29 2014 08:33 GMT
#10252
Have any of you used the PHP Excel library before?

I have this little thingie in my code...


if ($testType == 'before') {
$objPHPExcel->getSheetByName($spreadsheetTitle)->mergeCells('J1:N1')
->mergeCells('O1:R1')
->mergeCells('U1:X1')
->mergeCells('Y1:AB1')
->mergeCells('AC1:AF1');
} else {
$objPHPExcel->getSheetByName($spreadsheetTitle)->mergeCells('J1:M1')
->mergeCells('P1:S1')
->mergeCells('T1:W1')
->mergeCells('X1:AA1')
->mergeCells('AH1:AL1');
}


It works correctly for the 'before' part but the else part doesn't for some reason (cells disappear).

Expectations:
|-----|-----| <-- merged cells (preserving all cells, just expanding them)
|--|--|--|--|

Reality:
|-----------| <-- some cells disappear
|--|--|--|--|

Documentation:
https://github.com/PHPOffice/PHPExcel/wiki/User Documentation
Time is precious. Waste it wisely.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-08-29 11:35:55
August 29 2014 11:30 GMT
#10253
ah, just finished a pet project i have been working / thinking on for months (?) after having fever dreams about it last night where it seemed hopeless.
an nnary-apply_visitor for my variant (now called mux_t) that i posted earlier.

apply_visitor(visitor,visitable0,...,visitableN-1);
( demux(demuxer,mux0,...,muxN-1) )

took a some shortcuts and will have to tinker with it, some of the machinery behind it looks absolutely horryfying. finally solving the problem feels good, and going from a trivial unary apply_visitor to an nnary apply_visitor is pretty effin' sweet if i may say so myself. allthough i think compilation time when N grows large will be insane.

can now write:
struct print_t{
typedef void return_type;
template<class t_i>
void operator()(t_i&& v_i){
std::cout<<typeid(t_i).name()<<": "<<v_i<<std::endl;
}
template<class t_i,class... t_j>
void operator()(t_i&& v_i,t_j&&... v_j){
(*this)(std::forward<t_i>(v_i)),(*this)(std::forward<t_j>(v_j)...);
}
};

typedef mux_t<int,char,float,std::string> mux;

int main(){
mux a(int(2));
mux b(char('a'));
mux c(float(3.14));
mux d(std::string("teamliquid"));

demux(print_t(),a,b,c,d);
std::cout<<std::endl;
demux(print_t(),d,b,d,c,a);
}

[jeh@gloin workbench]$ make
g++ -std=c++14 -O3 -I. -I../ -fdiagnostics-color=auto -c main.cpp -o main.o
g++ -std=c++14 -O3 -I. -I../ -fdiagnostics-color=auto main.o -o workbench
rm -rf *o
[jeh@gloin workbench]$ ./workbench
i: 2
c: a
f: 3.14
Ss: teamliquid

Ss: teamliquid
c: a
Ss: teamliquid
f: 3.14
i: 2
[jeh@gloin workbench]$
conspired against by a confederacy of dunces.
delHospital
Profile Blog Joined December 2010
Poland261 Posts
August 29 2014 21:12 GMT
#10254
On August 29 2014 20:30 nunez wrote:
[jeh@gloin workbench]$ make
g++ -std=c++14 -O3 -I. -I../ -fdiagnostics-color=auto -c main.cpp -o main.o
g++ -std=c++14 -O3 -I. -I../ -fdiagnostics-color=auto main.o -o workbench
rm -rf *o

Forcefully removing all files and directories ending with an "o" when you run make... ballsy.
bardtown
Profile Joined June 2011
England2313 Posts
August 29 2014 22:38 GMT
#10255
I have started with Python this week, after a long break from programming (in the past I used C++, and I miss everything about it but I needed to be able to produce functional programs more quickly, and most modelling seems to use scripting languages). Now familiar with most of the basics of the language.

I would like to create a graph of hexagons, in which each hexagon will change its state based on the surrounding hexagons. Is there some sort of visual library which will allow me to do this simply, or would it be more straightforward for me to use a coordinate system and perhaps add the hexagons later as a visual aid? Hope that makes sense.
meatpudding
Profile Joined March 2011
Australia520 Posts
August 30 2014 00:02 GMT
#10256
On August 30 2014 07:38 bardtown wrote:
I have started with Python this week, after a long break from programming (in the past I used C++, and I miss everything about it but I needed to be able to produce functional programs more quickly, and most modelling seems to use scripting languages). Now familiar with most of the basics of the language.

I would like to create a graph of hexagons, in which each hexagon will change its state based on the surrounding hexagons. Is there some sort of visual library which will allow me to do this simply, or would it be more straightforward for me to use a coordinate system and perhaps add the hexagons later as a visual aid? Hope that makes sense.


Pygame is an easy but basic graphics library. I've used it. It's ok but I don't strongly recommend it.

Maybe take a look at SciPy and Numeric libraries for a visual plot library, I don't know of any off the top of my head.

If you don't mind outputting to data (text) files and running another process to produce images, then use gnuplot. It can take a while to learn but I've been using it for almost everything since I picked it up.
Be excellent to each other.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-08-30 02:23:52
August 30 2014 02:23 GMT
#10257
If I wanted to hold a direct connection to a computer/device from another computer/device, how would I do that? I mean like, not routing the connection to a server then back down. Directly. Is that even possible? What would be the closest?
There is no one like you in the universe.
Cyx.
Profile Joined November 2010
Canada806 Posts
August 30 2014 02:28 GMT
#10258
On August 29 2014 20:30 nunez wrote:<snip>

yo nunez I'm about to go away for like a week but I swear to god when I get back I'm going to sit down and actually understand some of the shit you post... it always looks cool but I never have time to actually sit down and look at what it is
Prillan
Profile Joined August 2011
Sweden350 Posts
August 30 2014 07:55 GMT
#10259
On August 30 2014 11:23 Blisse wrote:
If I wanted to hold a direct connection to a computer/device from another computer/device, how would I do that? I mean like, not routing the connection to a server then back down. Directly. Is that even possible? What would be the closest?

Of course, take a look at sockets. It can look very different depending on your language.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-08-30 09:23:06
August 30 2014 09:22 GMT
#10260
On August 30 2014 16:55 Prillan wrote:
Show nested quote +
On August 30 2014 11:23 Blisse wrote:
If I wanted to hold a direct connection to a computer/device from another computer/device, how would I do that? I mean like, not routing the connection to a server then back down. Directly. Is that even possible? What would be the closest?

Of course, take a look at sockets. It can look very different depending on your language.


I know what sockets are. Am I just asking if I can host my own server at home? I think I'm basically asking that.
There is no one like you in the universe.
Prev 1 511 512 513 514 515 1032 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
WardiTV Mondays #62
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 154
SortOf 93
-ZergGirl 20
StarCraft: Brood War
Stork 924
Tasteless 228
Shine 71
Sacsri 46
Bale 36
ZergMaN 14
Dota 2
NeuroSwarm113
febbydoto31
League of Legends
JimRising 713
Other Games
summit1g11426
WinterStarcraft535
C9.Mang0293
ViBE129
Mew2King45
Organizations
Other Games
gamesdonequick683
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH132
• practicex 34
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki26
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1141
Upcoming Events
The PondCast
3h 15m
OSC
9h 15m
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
17h 15m
Korean StarCraft League
1d 20h
CranKy Ducklings
2 days
WardiTV 2025
2 days
SC Evo League
2 days
BSL 21
2 days
Sziky vs OyAji
Gypsy vs eOnzErG
OSC
2 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
3 days
[ Show More ]
WardiTV 2025
3 days
OSC
3 days
BSL 21
3 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
4 days
Wardi Open
4 days
StarCraft2.fi
4 days
Monday Night Weeklies
4 days
Replay Cast
4 days
WardiTV 2025
5 days
StarCraft2.fi
5 days
PiGosaur Monday
5 days
StarCraft2.fi
6 days
Tenacious Turtle Tussle
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
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 © 2025 TLnet. All Rights Reserved.