• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:45
CEST 13:45
KST 20: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
[ASL19] Finals Recap: Standing Tall8HomeStory 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
Flash Announces Hiatus From ASL42Weekly Cups (June 23-29): Reynor in world title form?12FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
RELIABLE USDT RECOVERY SERVICE//TECHY FORCE CYBER The SCII GOAT: A statistical Evaluation Statistics for vetoed/disliked maps Esports World Cup 2025 - Final Player Roster How does the number of casters affect your enjoyment of esports?
Tourneys
RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo) FEL Cracov 2025 (July 27) - $8000 live event HomeStory Cup 27 (June 27-29)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
Flash Announces Hiatus From ASL BW General Discussion [ASL19] Finals Recap: Standing Tall BGH Auto Balance -> http://bghmmr.eu/ Help: rep cant save
Tourneys
[Megathread] Daily Proleagues [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET The Casual Games of the Week Thread [BSL20] ProLeague LB Final - Saturday 20:00 CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread 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
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread Trading/Investing Thread The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread NBA General Discussion Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
Game Sound vs. Music: The Im…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 685 users

The Big Programming Thread - Page 915

Forum Index > General Forum
Post a Reply
Prev 1 913 914 915 916 917 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.
Acrofales
Profile Joined August 2010
Spain17969 Posts
November 02 2017 11:20 GMT
#18281
To be fair, I don't think fixing the WSL i/o speed is a very high priority for Microsoft. Do they really care that cross compiling Linux binaries is slow?

The fact that it's now even possible without needing cygwin and a huge amount of pain is already a win, imho.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
Last Edited: 2017-11-02 11:36:13
November 02 2017 11:32 GMT
#18282
It isn't just cross compiling which is affected though. Also consider that linux in a lot of ways is not much more then a really well made ide for c, and now windows can host a copy of it with minimal performance loss outside of a few cases (which unfortunately really, really matter).

I would think that if the performance was not critically slow enough people would jump ship from linux onto windows just from the sheer convenience of it all.

Really, there aren't a ton of things that would be missing for me to really consider doing it. In fact, it's two.

1) fix the filesystem performance issues
2) create some sort of Xwindow system which doesn't suck and integrate it into bash

All of a sudden I have i3, emacs, visual studio, pathofexile and an overall fantastic operating system. It's already really really good though. Unfortunately I just can't justify it when my job is built around both linux and c++, because 1) the tools on linux for c+ are amazing (rtags, aspell etc), and 2) I'm targetting linux lol.
Hanh
Profile Joined June 2016
146 Posts
Last Edited: 2017-11-02 12:16:48
November 02 2017 12:12 GMT
#18283
aah - I didn't see you were talking about WSL either. I have never used it seriously myself because I think using a Linux VM on Windows is easier and arguably nicer (no need to figure out what is supported or not).

In case someone is interested, I run the Oracle Virtualbox Debian VM in headless mode and SSH to it with mobaxterm. It has a decent X-Window server so tools like sublime text can run. Most of my work is command line driven (in rust, python & F#) and the occasional Visual Code.
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
Last Edited: 2017-11-02 17:29:37
November 02 2017 17:22 GMT
#18284
Question on Microsoft SQL Server: see the following script.
select *
from TableA
inner join TableB on TableA.Column1 = TableB.Column1 and TableA.Column2 = 1

Suppose there's an index on TableA on Column1 and Column2, and an index on TableB on Column1. Will that join utilize both indexes for best performance? Or will the index on TableA be ignored because I'm substituting an actual SQL column with a literal value?

Apologize if this is an easy Google search. I tried on my own but didn't really know how to phrase it right to get an answer. Thanks!
supereddie
Profile Joined March 2011
Netherlands151 Posts
November 02 2017 18:15 GMT
#18285
Just enable the Execution Plan and it'll show you. Learning to read the Execution Plan will help you understand how the server does things.

I think the query will be slightly altered to:

select *
from TableA
inner join TableB on TableA.Column1 = TableB.Column1
where TableA.Column2 = 1

This will utilize the index on TableB.Column1 for the join condition. The index on TableA(Column1, Column2) will be used for condition TableA.Column2 = 1.
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
November 02 2017 20:30 GMT
#18286
On November 03 2017 03:15 supereddie wrote:
Just enable the Execution Plan and it'll show you. Learning to read the Execution Plan will help you understand how the server does things.

I think the query will be slightly altered to:

select *
from TableA
inner join TableB on TableA.Column1 = TableB.Column1
where TableA.Column2 = 1

This will utilize the index on TableB.Column1 for the join condition. The index on TableA(Column1, Column2) will be used for condition TableA.Column2 = 1.

I always forget about checking the execution plan. Thank you!
Thaniri
Profile Blog Joined March 2011
1264 Posts
November 03 2017 04:13 GMT
#18287
On November 02 2017 10:34 bo1b wrote:
Going all in on rust, wish me a lot of luck getting a job, cause there is no going back now. This language is amazing (I feel like a televangelist).

Also, intellij is providing support to it now, and more importantly they're working on support for the windows subsystem. All I need now is microsoft to finally fix it's i/o speed and I'll be one happy man.

For anyone newish to low level languages but knows enough basics to understand functions, strings etc a good project is literally anything simple which has a gui - one of the best things I ever did was learn how to use qt to make a sine wave generator which used mouse position in a window to select the output frequency.


Of the "new C" meme languages I didn't know if I should pick Rust or Golang. I happened to pick Golang just because of exposure through my social/work circles.

One reason I bet my marbles on Golang is that it's done by Google to be an easy parallel language. So in my pipe dream ambitions, if I need to manage tens of data centers with thousands of machines on them I want to be able to get the task done quickly, safely, and concurrently with other related tasks.

Rust is similar in use-case to Golang, it's just reputed to be more difficult. It also works "closer to the metal" the way C does. I suppose Golang is probably like the Java of systems programming. Or maybe the Javascript of systems programming

I'll hopefully see articles in the future written by programmers way better than me telling describing the different use cases for each language.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 03 2017 05:17 GMT
#18288
Years of c++ work has resulted in a language called c++17 which comes with modules, super safe memory usage, incremental compiling and more! I'm lying it's actually called rust, and if anything it's probably closer to what I think c++ should have been. A proper, newer version of c.

On the other hand until you get used to it you'll hate the compiler, after you do some pretty incredible things have been done with it, such as ripgrep and the new Mozilla engine.
Silvanel
Profile Blog Joined March 2003
Poland4725 Posts
November 03 2017 08:01 GMT
#18289
Granted i dont know Rust and Golang but from use cases i found on net they dont realy seem like replacment for C. C isnt used becuase its safe or easy. Its used when every bit count. When You have 700KB of flash memory and have to run 50 applications on it.
I did see some microkernel mentioned in relation to Rust some maybe i am wrong but thats the feel i getting working in this field. And again thats just "feeling" didnt do any serious research into this.
Pathetic Greta hater.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
Last Edited: 2017-11-03 09:46:01
November 03 2017 09:33 GMT
#18290
On November 03 2017 17:01 Silvanel wrote:
Granted i dont know Rust and Golang but from use cases i found on net they dont realy seem like replacment for C. C isnt used becuase its safe or easy. Its used when every bit count. When You have 700KB of flash memory and have to run 50 applications on it.
I did see some microkernel mentioned in relation to Rust some maybe i am wrong but thats the feel i getting working in this field. And again thats just "feeling" didnt do any serious research into this.

Rust can absolutely do super low level programming. Golang cannot.

Rusts memory management is a little wierd, but you can definitely do pointer manipulation etc so there isn't a lot of reason you can't do it.

Actually having thought about it all, I don't think you'd want to use rust for that type of thing, but you definitely could. In sort of the same way you wouldn't want to write web apps in c... just not as dramatic haha.
dekibeki
Profile Joined June 2011
Australia34 Posts
November 03 2017 10:59 GMT
#18291
On November 03 2017 14:17 bo1b wrote:
Years of c++ work has resulted in a language called c++17 which comes with modules, super safe memory usage, incremental compiling and more!.


Besides modules slated for C++20, this is true...
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 03 2017 11:55 GMT
#18292
I may be programming c++ completely wrong but I don't think you can compare the type safety between the two languages.
R1CH
Profile Blog Joined May 2007
Netherlands10340 Posts
November 03 2017 12:45 GMT
#18293
A little late to the party, but SHA256 is absolutely not OK for password hashing.

As a hash function, it's super fast and resistant to collisions which is what you want. But password hashing is a different thing altogether. If someone steals your database, you don't want a super fast hash function, as the attacker can then easily brute force all the hashes. Salts prevent rainbow table attacks, but a modern GPU can still process millions of hashes/sec, so the hashing offers very little protection.

You want a hash function that's slow by design. Something like bcrypt2 or argon2i are the best choices as you can set the work factor required, allowing for a small delay that isn't noticeable to the user, but greatly reduces brute force effectiveness.

As an example, my GTX 1080 can crack 1942.8 MH/s of SHA256, but only 77 H/s of bcrypt2. This works out to just over 1 minute to break all 8 character lower case passwords for SHA256, but 99 YEARS to break the equivalent in bcrypt2.
AdministratorTwitter: @R1CH_TL
R1CH
Profile Blog Joined May 2007
Netherlands10340 Posts
Last Edited: 2017-11-03 12:51:35
November 03 2017 12:51 GMT
#18294
On October 29 2017 11:26 WarSame wrote:
For the app I want to be able to store the user's private ethereum key(if this is stupid/if there is a better way to do it please let me know). I need to be able to store and retrieve, but I want to encrypt it(for security). In order to encrypt/decrypt I need a key. However, that key can't be encrypted(because I need it to do so), so it must presumably be stored in plain text. If I store it in the DB then if they have DB access they can just decrypt. If I store it in a secrets file and they have server access they can just decrypt. What am I missing about this? Is it worth it to encrypt, and if so where do I store this key?

Apologies for my lack of knowledge, but I'm obviously not experience with implementing encryption.


To be brutally honest, you have no business being near a cryptocurrency project from what I can tell of your current knowledge. You need a much stronger background in cryptography and web security, as well as strong server security fundamentals. You WILL be hacked and your users WILL lose their money.
AdministratorTwitter: @R1CH_TL
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
November 03 2017 14:43 GMT
#18295
Cryptography can be a bitch
Time is precious. Waste it wisely.
sc-darkness
Profile Joined August 2017
856 Posts
November 04 2017 11:28 GMT
#18296
To make sure file/application isn't modified, is it reliable to read the file and hash it even though it could be in binary? I think this concept is called checksum.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-11-04 13:28:16
November 04 2017 13:27 GMT
#18297
Can someone explain to me what the purpose of a masked array is? Why is invalidating entries preferrable to simply setting entries to some sort of value your program can recognize as invalid?

Is it so that you avoid using invalid entries in calculations that take the entire array as an input? Basically, is it so that you can use premade functions rather than having to write your own functions to handle whatever kind of special circumstance?
Thaniri
Profile Blog Joined March 2011
1264 Posts
November 04 2017 17:50 GMT
#18298
I don't have a comp-sci background but in databases with time sensitive data this is a pretty common practice. You simply flag data that is "stale." Supposedly this is faster than a query like select * where date > some day. You just say select * where valid = true or something like that.

Perhaps a masked array would be used to work with this type of data in memory.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 04 2017 19:20 GMT
#18299
On November 03 2017 21:51 R1CH wrote:
Show nested quote +
On October 29 2017 11:26 WarSame wrote:
For the app I want to be able to store the user's private ethereum key(if this is stupid/if there is a better way to do it please let me know). I need to be able to store and retrieve, but I want to encrypt it(for security). In order to encrypt/decrypt I need a key. However, that key can't be encrypted(because I need it to do so), so it must presumably be stored in plain text. If I store it in the DB then if they have DB access they can just decrypt. If I store it in a secrets file and they have server access they can just decrypt. What am I missing about this? Is it worth it to encrypt, and if so where do I store this key?

Apologies for my lack of knowledge, but I'm obviously not experience with implementing encryption.


To be brutally honest, you have no business being near a cryptocurrency project from what I can tell of your current knowledge. You need a much stronger background in cryptography and web security, as well as strong server security fundamentals. You WILL be hacked and your users WILL lose their money.

No offense taken. This was a project for my own education, and so I could show it on my Github(both of which are why I appreciate the feedback). I was never planning to make it available for customers, for obvious reasons.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 06 2017 00:51 GMT
#18300
I just saw the most unethical Github project ever. OAuth using 23andme so you can use demographic discrimination for access to a site.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Prev 1 913 914 915 916 917 1031 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
10:00
Season 1: Playoffs Day 1
ByuN vs Classic
Clem vs Cham
Crank 1636
Tasteless1161
IndyStarCraft 140
Rex135
3DClanTV 81
IntoTheiNu 63
LiquipediaDiscussion
The PondCast
10:00
Episode 53
CranKy Ducklings29
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 1636
Tasteless 1161
IndyStarCraft 140
Rex 135
Harstem 108
ProTech54
EnDerr 4
StarCraft: Brood War
Britney 35486
Sea 3662
Rain 3520
Horang2 3155
Jaedong 1082
BeSt 716
EffOrt 472
Larva 461
Mini 434
Light 336
[ Show more ]
actioN 313
Stork 278
ToSsGirL 220
Killer 155
Last 155
Pusan 102
Mong 86
ZerO 80
Sharp 69
Snow 68
Mind 51
hero 50
sSak 47
Rush 42
Noble 35
Nal_rA 32
sorry 26
yabsab 25
Shinee 21
Sacsri 18
ajuk12(nOOB) 16
soO 14
Icarus 13
Movie 12
JulyZerg 12
Sea.KH 10
NaDa 9
SilentControl 8
IntoTheRainbow 5
Bale 3
Dota 2
BananaSlamJamma536
XcaliburYe427
420jenkins389
Counter-Strike
shoxiejesuss815
x6flipin557
allub150
Super Smash Bros
Mew2King151
Other Games
B2W.Neo584
DeMusliM477
crisheroes314
Lowko158
SortOf60
Pyrionflax49
ArmadaUGS15
ZerO(Twitch)13
Organizations
StarCraft: Brood War
Kim Chul Min (afreeca) 1401
StarCraft 2
ComeBackTV 850
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 23
• iHatsuTV 3
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 4
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV398
Upcoming Events
WardiTV European League
4h 15m
ByuN vs NightPhoenix
HeRoMaRinE vs HiGhDrA
Krystianer vs sebesdes
MaxPax vs Babymarine
SKillous vs Mixu
ShoWTimE vs MaNa
Replay Cast
12h 15m
RSL Revival
22h 15m
herO vs SHIN
Reynor vs Cure
OSC
1d 1h
WardiTV European League
1d 4h
Scarlett vs Percival
Jumy vs ArT
YoungYakov vs Shameless
uThermal vs Fjant
Nicoract vs goblin
Harstem vs Gerald
FEL
1d 4h
Korean StarCraft League
1d 15h
CranKy Ducklings
1d 22h
RSL Revival
1d 22h
FEL
2 days
[ Show More ]
Sparkling Tuna Cup
2 days
RSL Revival
2 days
FEL
3 days
BSL: ProLeague
3 days
Dewalt vs Bonyth
Replay Cast
4 days
Replay Cast
4 days
The PondCast
5 days
Replay Cast
6 days
RSL Revival
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
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
YaLLa Compass Qatar 2025

Upcoming

CSLPRO Last Chance 2025
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.