• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:10
CEST 03:10
KST 10:10
  • 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
[ASL19] Finals Recap: Standing Tall10HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Weekly Cups (June 30 - July 6): Classic Doubles2[BSL20] Non-Korean Championship 4x BSL + 4x China9Flash Announces Hiatus From ASL66Weekly Cups (June 23-29): Reynor in world title form?14FEL Cracov 2025 (July 27) - $8000 live event22
StarCraft 2
General
The GOAT ranking of GOAT rankings The SCII GOAT: A statistical Evaluation Weekly Cups (June 23-29): Reynor in world title form? Weekly Cups (June 30 - July 6): Classic Doubles Program: SC2 / XSplit / OBS Scene Switcher
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps [ASL19] Finals Recap: Standing Tall SC uni coach streams logging into betting site Flash Announces Hiatus From ASL
Tourneys
[BSL20] Non-Korean Championship 4x BSL + 4x China [BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Summer Games Done Quick 2025! Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2024!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 711 users

The Big Programming Thread - Page 760

Forum Index > General Forum
Post a Reply
Prev 1 758 759 760 761 762 1031 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.
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
September 07 2016 23:49 GMT
#15181
On September 08 2016 08:31 Birdie wrote:
Isn't a mix of OO and procedural pretty standard?


Depends on the language. It's true that most of the modern stuff tends to be pretty flexible, offering a mix of OO, procedural and functional so that you can choose the best thing for the job.
Time is precious. Waste it wisely.
Wrath
Profile Blog Joined July 2014
3174 Posts
September 08 2016 04:13 GMT
#15182
Thanks a lot guys
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
September 08 2016 18:29 GMT
#15183
I just found a small community site for developers, registered for that shit aaaaaaaaaaaaand... discovered that the site stores user passwords in plain fucking text. Fuck that shit.
"windows bash is a steaming heap of shit" tofucake
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
September 08 2016 22:04 GMT
#15184
On September 09 2016 03:29 Djagulingu wrote:
I just found a small community site for developers, registered for that shit aaaaaaaaaaaaand... discovered that the site stores user passwords in plain fucking text. Fuck that shit.


So apparently I've noticed people complaining about this on Hacker News and I feel like I should start using a password manager. There's just so much inertia to get over before getting started.

On a similar vein a lot of people seem to use unique email accounts e.g. "myusername_teamliquid@gmail.com" because they've been noticing that non-big websites will sell your email, but if you use an unique email you can tell which website is doing that.
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
Last Edited: 2016-09-08 22:08:13
September 08 2016 22:06 GMT
#15185
On September 09 2016 07:04 Blisse wrote:
Show nested quote +
On September 09 2016 03:29 Djagulingu wrote:
I just found a small community site for developers, registered for that shit aaaaaaaaaaaaand... discovered that the site stores user passwords in plain fucking text. Fuck that shit.


So apparently I've noticed people complaining about this on Hacker News and I feel like I should start using a password manager. There's just so much inertia to get over before getting started.

On a similar vein a lot of people seem to use unique email accounts e.g. "myusername_teamliquid@gmail.com" because they've been noticing that non-big websites will sell your email, but if you use an unique email you can tell which website is doing that.


I use gmail for everything. Discovering that the dots don't matter was a big thing (someone@gmail is the same as s.omeone@gmail, some.one@gmail, som.on.e@gmail etc.). It's a great way of doing things with one shitty account for spam when you need it a bit randomized. You can basically get a huge amount of email addresses out of one if need be and they'll all deliver your mail.
Time is precious. Waste it wisely.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
September 08 2016 22:56 GMT
#15186
I use gmail too but I have a lot of old stuff hooked up to my hotmail.

IDK why I didn't use the actual example, but in case you didn't know, you can use the + sign in your gmail and it actually forwards to you.

For example,

someone+liquid@gmail.com
someone+ebay@gmail.com
someone+spam@gmail.com

should all forward to someone@gmail.com, but in the To: field it should say +liquid, so you can filter by that.

Also yeah dots don't matter but my email is my name so I always type the dots as spaces anyways lol
There is no one like you in the universe.
Ropid
Profile Joined March 2009
Germany3557 Posts
Last Edited: 2016-09-09 02:35:58
September 09 2016 02:35 GMT
#15187
The password manager stuff is less work than you'd think. For things you do on websites, your passwords will be saved by your browser, so you don't have to deal with the password manager database at all most of the time. You only need to work with it when you create a new account somewhere.

About something simple for saving passwords, you could use tools that use the "KeePass" program's database format. You can sync your file between all your machines and your phone, and you'll find Windows programs and Linux command line tools and Android apps etc., that can read and write into the file.
"My goal is to replace my soul with coffee and become immortal."
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
September 09 2016 08:11 GMT
#15188
Lesson for today: If you want to build geographic applications, use python. Fuck java or node. Don't take any of that shit. Use python. Don't be a wussy pussy. Use python.
"windows bash is a steaming heap of shit" tofucake
Wrath
Profile Blog Joined July 2014
3174 Posts
September 09 2016 11:19 GMT
#15189
Just how the fuck setters and getters work in PHP? What is the point of the magical setters and getters? What the fuck is this, Java setters and getters are much much easier than this...
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
Last Edited: 2016-09-09 12:02:00
September 09 2016 12:01 GMT
#15190
On September 09 2016 20:19 Wrath wrote:
Just how the fuck setters and getters work in PHP? What is the point of the magical setters and getters? What the fuck is this, Java setters and getters are much much easier than this...


You shouldn't really use magical setters and getters (try avoiding magic methods alltogether).

You can simply write them like in any other OO language:


class myClass
{
protected $a;

public function __construct($a = null) // if you need constructors
{
$this->a = $a;
}

public function getA()
{
return $this->a;
}

public function setA($a)
{
$this->a = $a;

return $this; // if you need fluent interfaces
}
}


And a question to all you C/C++ guys. There's this thing that's annoying the hell out of me in gdb:

Program received signal SIGABRT, Aborted.
0x00007ffff7a66067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.


How can I get rid of it in Debian? Searching the interwebz yielded no useful results.
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-09-09 12:19:32
September 09 2016 12:16 GMT
#15191
--- Nuked ---
tofucake
Profile Blog Joined October 2009
Hyrule19031 Posts
September 09 2016 12:40 GMT
#15192
magic methods are the bane of my existence. Our old codebase uses a weird fork of Cake 1.3 that's full of them. All the DB stuff is like User::findUserByLastNameAndLastLoginDateAndZipCodeLimit('Smith', '2001-06-30', '12345', 10)

holy fuck debugging that stuff is a pain
Liquipediaasante sana squash banana
Wrath
Profile Blog Joined July 2014
3174 Posts
September 09 2016 12:56 GMT
#15193
On September 09 2016 21:16 Nesserev wrote:
Show nested quote +
On September 09 2016 20:19 Wrath wrote:
Just how the fuck setters and getters work in PHP? What is the point of the magical setters and getters? What the fuck is this, Java setters and getters are much much easier than this...

As far as I understand, regular getter and setter methods in PHP work the same as in any other language: you wrap the access to a hidden(private/protected) class property in a class method.

If magic methods like __get and/or __set are implemented, they are called when you try to access an inaccessible class property/method directly (inaccessible = is not public OR DOES NOT EXIST). This allows you to:
- react to inaccessible properties/methods being called
- dynamically add properties and methods
- manipulate properties directly as though they were public properties (but secretly, you're just calling the __get or __set method)

In short, these are all very shitty things that nobody needs in the first place. It's called magic for a reason, stay away for it.



... accessing inaccessible properties? Isn't the whole point of having inaccessible properties to NOT access it?
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
Last Edited: 2016-09-09 13:15:43
September 09 2016 13:11 GMT
#15194
On September 09 2016 21:56 Wrath wrote:
Show nested quote +
On September 09 2016 21:16 Nesserev wrote:
On September 09 2016 20:19 Wrath wrote:
Just how the fuck setters and getters work in PHP? What is the point of the magical setters and getters? What the fuck is this, Java setters and getters are much much easier than this...

As far as I understand, regular getter and setter methods in PHP work the same as in any other language: you wrap the access to a hidden(private/protected) class property in a class method.

If magic methods like __get and/or __set are implemented, they are called when you try to access an inaccessible class property/method directly (inaccessible = is not public OR DOES NOT EXIST). This allows you to:
- react to inaccessible properties/methods being called
- dynamically add properties and methods
- manipulate properties directly as though they were public properties (but secretly, you're just calling the __get or __set method)

In short, these are all very shitty things that nobody needs in the first place. It's called magic for a reason, stay away for it.



... accessing inaccessible properties? Isn't the whole point of having inaccessible properties to NOT access it?


It's PHP's scripting heritage. You can do funny stuff with this shit like creating reflection of a class to get all of its constants for example. http://php.net/manual/en/reflectionclass.getconstants.php

Just forget those things exist and do everything as usual. It will be better for your sanity

If you're not using magic getters and setters (or reflections) your private/protected properties won't be readily accessible so don't worry about it.
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
September 09 2016 14:57 GMT
#15195
--- Nuked ---
phar
Profile Joined August 2011
United States1080 Posts
September 09 2016 16:37 GMT
#15196
Yea this is likely not the important part of the error message. (In fact if you run with sudo the bit about a file not found may go away depending on your setup).
Who after all is today speaking about the destruction of the Armenians?
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
Last Edited: 2016-09-09 23:49:21
September 09 2016 23:42 GMT
#15197
On September 10 2016 01:37 phar wrote:
Yea this is likely not the important part of the error message. (In fact if you run with sudo the bit about a file not found may go away depending on your setup).


Please give me some credit...

1. I've tried running it with sudo (same result).
2. I've read somewhere on the interwebz that it might be the result of someone using their libraries and paths to compile the code which breaks on my machine. I've created a new C file with a single assert that's failing, compiled it and dbg'd it, the result is the same.
3. I've installed a ton of additional libraries I don't need but might be used by it (libc6-dev etc.), same thing.
4. People on the interwebz keep saying that you should ignore this error but it's driving me mad.

I did stuff like whreis file.c, which returned a manual but not the file. I've found the file eventually but under completely different path (somewhere inside /usr/share/).

I don't even know what provides this specific file and there's no info about it on the net. Please help. My perfectionist soul is dying here because I don't know if valgrind/dbg stop because of this error or errors in the application...

Edit: So far it seems to only show up on uncaught throws and asserts. Need to do more testing but I'm too drunk atm.
Time is precious. Waste it wisely.
Hhanh00
Profile Joined May 2016
34 Posts
September 10 2016 08:55 GMT
#15198
Your question is about the 'No such file or directory.' or about the reason of the abort?
teamamerica
Profile Blog Joined July 2010
United States958 Posts
Last Edited: 2016-09-10 09:24:41
September 10 2016 09:22 GMT
#15199
On September 09 2016 20:19 Wrath wrote:
Just how the fuck setters and getters work in PHP? What is the point of the magical setters and getters? What the fuck is this, Java setters and getters are much much easier than this...


In writing application code you might not find a lot of use for them. But any PHP framework you use uses them. At some point you might be writing some application code for you job and realize you're doing the same thing a lot and abstract it into some generic code and maybe you can find a use for it then.

edit: realized the rest of this post is less about magic get/set the way PHP implements and just using getters/setters overall.

Otherwise you can just use normal getters and setters. Python has something similar with properties and setters based on them.

If you're used to code without boilerplate getter/setters (i.e. with lombok @data, or scala/kotlin classes or just python classes) there's a few reasons to like not having them. I know it's all boilerplate your IDE can autogenerate, but with less code it's more clear what is going on (imho).

So beyond the dynamic lookup that frameworks tend to use them for (or doing something like mapping a object based on a dictionary, which can be a big performance win in some cases), one advantage is you can start out defining something entirely with public final properties, and if things can you can refactor the $object.proprety into being a method without changing all the calls sites if any get/set has to become more complicated. This is more idiomatic in Python though perhaps, I'm not into PHP community enough to know if people really use it that way (but I'd assume not).
RIP GOMTV. RIP PROLEAGUE.
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
September 10 2016 09:58 GMT
#15200
On September 10 2016 17:55 Hhanh00 wrote:
Your question is about the 'No such file or directory.' or about the reason of the abort?


No such file or directory.
Time is precious. Waste it wisely.
Prev 1 758 759 760 761 762 1031 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
Korean StarCraft League #77
CranKy Ducklings119
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft404
Livibee 121
ProTech69
RuFF_SC2 54
Vindicta 8
StarCraft: Brood War
MaD[AoV]35
Bale 30
Icarus 4
Dota 2
monkeys_forever379
NeuroSwarm117
League of Legends
JimRising 609
Counter-Strike
summit1g10964
tarik_tv5375
Super Smash Bros
Mew2King154
Other Games
shahzam867
Maynarde148
Day[9].tv122
JuggernautJason93
ToD86
WinterStarcraft17
Organizations
Other Games
gamesdonequick49546
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 21 non-featured ]
StarCraft 2
• davetesta28
• Berry_CruncH28
• HeavenSC 15
• Mapu3
• IndyKCrew
• sooper7s
• Migwel
• AfreecaTV YouTube
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• Pr0nogo 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2708
League of Legends
• Jankos1484
• Stunt262
Other Games
• Scarra1671
• WagamamaTV192
• Day9tv122
Upcoming Events
Sparkling Tuna Cup
8h 50m
WardiTV European League
14h 50m
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
22h 50m
The PondCast
1d 8h
WardiTV European League
1d 10h
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
uThermal 2v2 Circuit
1d 14h
Replay Cast
1d 22h
RSL Revival
2 days
ByuN vs SHIN
Clem vs Reynor
Replay Cast
2 days
RSL Revival
3 days
Classic vs Cure
[ Show More ]
FEL
3 days
RSL Revival
4 days
FEL
4 days
FEL
4 days
CSO Cup
4 days
BSL20 Non-Korean Champi…
4 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
5 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Liquipedia Results

Completed

BSL Season 20
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #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 © 2025 TLnet. All Rights Reserved.