• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 12:22
CET 18:22
KST 02:22
  • 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
[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win2RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge2[TLMC] Fall/Winter 2025 Ladder Map Rotation14
StarCraft 2
General
When will we find out if there are more tournament Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win SC: Evo Complete - Ranked Ladder OPEN ALPHA Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge RSL Season 3: RO16 results & RO8 bracket
Tourneys
Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death
Brood War
General
Data analysis on 70 million replays Which season is the best in ASL? sas.vorti stream [BSL21] Ro.16 Group Stage (C->B->A->D) FlaSh on: Biggest Problem With SnOw's Playstyle
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Nintendo Switch Thread Beyond All Reason Should offensive tower rushing be viable in RTS games?
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
TL Mafia Community Thread Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread YouTube Thread Things Aren’t Peaceful in Palestine
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 MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
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
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1854 users

The Big Programming Thread - Page 918

Forum Index > General Forum
Post a Reply
Prev 1 916 917 918 919 920 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.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 15 2017 21:39 GMT
#18341
On November 16 2017 00:12 Manit0u wrote:
Show nested quote +
On November 15 2017 22:40 bo1b wrote:
That letter looks like it's from Victoria, Australia - most likely in melbourne. I didn't know we had any companies in this area which used erlang.


Atlassian maybe? Although from what I hear they're switching all of their architecture to Java now.

Atlassian is based in Sydney, new South Wales and they use rust as the uncommon language. They're also trying to be a mega tech company so I just can't see them doing this.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
November 15 2017 21:45 GMT
#18342
On November 15 2017 22:40 bo1b wrote:
That letter looks like it's from Victoria, Australia - most likely in melbourne. I didn't know we had any companies in this area which used erlang.


Out of curiosity, You based it on what?
Pathetic Greta hater.
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
November 15 2017 21:48 GMT
#18343
On November 16 2017 06:45 Silvanel wrote:
Show nested quote +
On November 15 2017 22:40 bo1b wrote:
That letter looks like it's from Victoria, Australia - most likely in melbourne. I didn't know we had any companies in this area which used erlang.


Out of curiosity, You based it on what?


https://en.wikipedia.org/wiki/Victorian_Civil_and_Administrative_Tribunal
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 16 2017 06:40 GMT
#18344
On November 16 2017 06:45 Silvanel wrote:
Show nested quote +
On November 15 2017 22:40 bo1b wrote:
That letter looks like it's from Victoria, Australia - most likely in melbourne. I didn't know we had any companies in this area which used erlang.


Out of curiosity, You based it on what?

The letter referenced something called vcat. More than possible theres another tribunal somewhere around the world called vcat, but im fairly certain it's located in Australia, Victoria, Melbourne.
TMG26
Profile Joined July 2012
Portugal2017 Posts
November 16 2017 09:02 GMT
#18345
Invoicing for an interview is already ridiculous. But saying the guy lied about having loads of experience in distributed systems because he didn't knew Erlang is also bullshit.
Supporter of the situational Blink Dagger on Storm.
Manit0u
Profile Blog Joined August 2004
Poland17473 Posts
Last Edited: 2017-11-16 10:00:14
November 16 2017 09:59 GMT
#18346
Ruby:

JSON.generate({ num: 1.0 })
# => {"num":1.0}


JavaScript:

JSON.stringify({ num: 1.0 })
// => {"num":1}


Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).
Time is precious. Waste it wisely.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 16 2017 11:33 GMT
#18347
Could go for the super convoluted option and use webasm? Technically it's still javascript right?
Deckard.666
Profile Joined September 2012
152 Posts
November 16 2017 14:21 GMT
#18348
On November 16 2017 18:59 Manit0u wrote:
Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).


Like this, maybe?


let encoded = JSON.stringify({num: 1.0}).replace(/(?!\.)\d+(?!\.)/,"$&.0")
console.log(encoded) // {"num":1.0}


Kinda ugly using regex to modify the JSON, but I don't think you can make JSON.stringify output it like that directly.
Manit0u
Profile Blog Joined August 2004
Poland17473 Posts
Last Edited: 2017-11-16 15:22:40
November 16 2017 15:21 GMT
#18349
On November 16 2017 23:21 Deckard.666 wrote:
Show nested quote +
On November 16 2017 18:59 Manit0u wrote:
Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).


Like this, maybe?


let encoded = JSON.stringify({num: 1.0}).replace(/(?!\.)\d+(?!\.)/,"$&.0")
console.log(encoded) // {"num":1.0}


Kinda ugly using regex to modify the JSON, but I don't think you can make JSON.stringify output it like that directly.


Unfortunately this won't fly. The problem is that we have to pass user input from the front-end form (many values are being passed, strings, floats, integers, booleans to the API as JSON, it is then passed on to external tools which require that all float values have decimal notation.

The input is validated for type and it would be stupid to convert some values to float since technically the user could input invalid float (passed as string and cast to float) and casting it could skew the validation.

JavaScript is so awful at times Would it be so hard for them to implement simple functions like toFloat() (kinda stupid for JS since every number is a float by default, they just show it as int) or toInt()?
Time is precious. Waste it wisely.
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
November 16 2017 17:14 GMT
#18350
I need to build a simple Windows desktop app (not universal windows apps, for windows 7). What is the go to technology for that nowadays? Everything today is mobile and web apps

I am most familiar with java but I hate swing.
Age of Mythology forever!
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
November 16 2017 19:47 GMT
#18351
On November 17 2017 02:14 mantequilla wrote:
I need to build a simple Windows desktop app (not universal windows apps, for windows 7). What is the go to technology for that nowadays? Everything today is mobile and web apps

I am most familiar with java but I hate swing.

Well, first, why Windows 7 specifically? I can understand liking Windows 7 better than the other options, but seems weird focusing your development on it.

But in general, I'd say if you're focusing solely on Windows OS applications, you can't really go wrong with C# and using WPF for your UI.
Average means I'm better than half of you.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 16 2017 22:47 GMT
#18352
On November 17 2017 00:21 Manit0u wrote:
Show nested quote +
On November 16 2017 23:21 Deckard.666 wrote:
On November 16 2017 18:59 Manit0u wrote:
Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).


Like this, maybe?


let encoded = JSON.stringify({num: 1.0}).replace(/(?!\.)\d+(?!\.)/,"$&.0")
console.log(encoded) // {"num":1.0}


Kinda ugly using regex to modify the JSON, but I don't think you can make JSON.stringify output it like that directly.


Unfortunately this won't fly. The problem is that we have to pass user input from the front-end form (many values are being passed, strings, floats, integers, booleans to the API as JSON, it is then passed on to external tools which require that all float values have decimal notation.

The input is validated for type and it would be stupid to convert some values to float since technically the user could input invalid float (passed as string and cast to float) and casting it could skew the validation.

JavaScript is so awful at times Would it be so hard for them to implement simple functions like toFloat() (kinda stupid for JS since every number is a float by default, they just show it as int) or toInt()?

Could you hack around it by doing 0.0+x? Or x*1.0?
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Hanh
Profile Joined June 2016
146 Posts
November 17 2017 00:26 GMT
#18353
On November 17 2017 00:21 Manit0u wrote:
JavaScript is so awful at times Would it be so hard for them to implement simple functions like toFloat() (kinda stupid for JS since every number is a float by default, they just show it as int) or toInt()?


JS having a unified number type is maybe debatable. If in your requirement you have distinguish between int & float, don't use it without a schema. You are complaining that it's hard to cut a tree with a spoon.


R1CH
Profile Blog Joined May 2007
Netherlands10341 Posts
November 17 2017 11:30 GMT
#18354
On November 17 2017 02:14 mantequilla wrote:
I need to build a simple Windows desktop app (not universal windows apps, for windows 7). What is the go to technology for that nowadays? Everything today is mobile and web apps

I am most familiar with java but I hate swing.

Electron! Take all the bloat and slowness of javascript, bundle it with an entire browser and a 70MB .exe file and you have your "desktop" app.

Or learn some Win32 and C and make one of the smallest and fastest programs you've ever written.
AdministratorTwitter: @R1CH_TL
TL+ Member
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
November 17 2017 11:57 GMT
#18355
Well if we are going outside of Java then i would say use QT or PyQT for simple desktop app.
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17473 Posts
Last Edited: 2017-11-17 15:48:01
November 17 2017 15:46 GMT
#18356
I second the C# and WPF option. Did that in the past. Worked fine.

On November 17 2017 07:47 WarSame wrote:
Show nested quote +
On November 17 2017 00:21 Manit0u wrote:
On November 16 2017 23:21 Deckard.666 wrote:
On November 16 2017 18:59 Manit0u wrote:
Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).


Like this, maybe?


let encoded = JSON.stringify({num: 1.0}).replace(/(?!\.)\d+(?!\.)/,"$&.0")
console.log(encoded) // {"num":1.0}


Kinda ugly using regex to modify the JSON, but I don't think you can make JSON.stringify output it like that directly.


Unfortunately this won't fly. The problem is that we have to pass user input from the front-end form (many values are being passed, strings, floats, integers, booleans to the API as JSON, it is then passed on to external tools which require that all float values have decimal notation.

The input is validated for type and it would be stupid to convert some values to float since technically the user could input invalid float (passed as string and cast to float) and casting it could skew the validation.

JavaScript is so awful at times Would it be so hard for them to implement simple functions like toFloat() (kinda stupid for JS since every number is a float by default, they just show it as int) or toInt()?

Could you hack around it by doing 0.0+x? Or x*1.0?


This doesn't work in JS. It still outputs the number as if it were an integer.
Time is precious. Waste it wisely.
AKnopf
Profile Blog Joined March 2011
Germany259 Posts
November 17 2017 16:13 GMT
#18357
On November 18 2017 00:46 Manit0u wrote:
I second the C# and WPF option. Did that in the past. Worked fine.

Show nested quote +
On November 17 2017 07:47 WarSame wrote:
On November 17 2017 00:21 Manit0u wrote:
On November 16 2017 23:21 Deckard.666 wrote:
On November 16 2017 18:59 Manit0u wrote:
Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).


Like this, maybe?


let encoded = JSON.stringify({num: 1.0}).replace(/(?!\.)\d+(?!\.)/,"$&.0")
console.log(encoded) // {"num":1.0}


Kinda ugly using regex to modify the JSON, but I don't think you can make JSON.stringify output it like that directly.


Unfortunately this won't fly. The problem is that we have to pass user input from the front-end form (many values are being passed, strings, floats, integers, booleans to the API as JSON, it is then passed on to external tools which require that all float values have decimal notation.

The input is validated for type and it would be stupid to convert some values to float since technically the user could input invalid float (passed as string and cast to float) and casting it could skew the validation.

JavaScript is so awful at times Would it be so hard for them to implement simple functions like toFloat() (kinda stupid for JS since every number is a float by default, they just show it as int) or toInt()?

Could you hack around it by doing 0.0+x? Or x*1.0?


This doesn't work in JS. It still outputs the number as if it were an integer.



Could you use toFixed() to convert the number into a string that looks like float first and then use JSON.stringify on the whole thing?
https://stackoverflow.com/questions/41399380/force-float-value-when-using-json-stringify#answer-41399477
The world - its a funny place
Manit0u
Profile Blog Joined August 2004
Poland17473 Posts
November 17 2017 20:39 GMT
#18358
On November 18 2017 01:13 AKnopf wrote:
Show nested quote +
On November 18 2017 00:46 Manit0u wrote:
I second the C# and WPF option. Did that in the past. Worked fine.

On November 17 2017 07:47 WarSame wrote:
On November 17 2017 00:21 Manit0u wrote:
On November 16 2017 23:21 Deckard.666 wrote:
On November 16 2017 18:59 Manit0u wrote:
Is there a way to make JavaScript print 1.0 into JSON? It's super dumb considering that every number in JS is a float, but you can't display them as floats if they only have 0's in decimal places (and I need it to do so).


Like this, maybe?


let encoded = JSON.stringify({num: 1.0}).replace(/(?!\.)\d+(?!\.)/,"$&.0")
console.log(encoded) // {"num":1.0}


Kinda ugly using regex to modify the JSON, but I don't think you can make JSON.stringify output it like that directly.


Unfortunately this won't fly. The problem is that we have to pass user input from the front-end form (many values are being passed, strings, floats, integers, booleans to the API as JSON, it is then passed on to external tools which require that all float values have decimal notation.

The input is validated for type and it would be stupid to convert some values to float since technically the user could input invalid float (passed as string and cast to float) and casting it could skew the validation.

JavaScript is so awful at times Would it be so hard for them to implement simple functions like toFloat() (kinda stupid for JS since every number is a float by default, they just show it as int) or toInt()?

Could you hack around it by doing 0.0+x? Or x*1.0?


This doesn't work in JS. It still outputs the number as if it were an integer.



Could you use toFixed() to convert the number into a string that looks like float first and then use JSON.stringify on the whole thing?
https://stackoverflow.com/questions/41399380/force-float-value-when-using-json-stringify#answer-41399477


Even in the example you posted it doesn't work as intended This produces JSON number with quotation marks (a string).
Time is precious. Waste it wisely.
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2017-11-18 06:57:20
November 18 2017 06:56 GMT
#18359
On November 16 2017 15:40 bo1b wrote:
Show nested quote +
On November 16 2017 06:45 Silvanel wrote:
On November 15 2017 22:40 bo1b wrote:
That letter looks like it's from Victoria, Australia - most likely in melbourne. I didn't know we had any companies in this area which used erlang.


Out of curiosity, You based it on what?

The letter referenced something called vcat. More than possible theres another tribunal somewhere around the world called vcat, but im fairly certain it's located in Australia, Victoria, Melbourne.

Jesus $55/hr is the going rate for "lead developer" in Melbourne?

Actually nvm if the owner is still interviewing people that place has gotta be tiny as shit
Who after all is today speaking about the destruction of the Armenians?
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 18 2017 08:27 GMT
#18360
On November 18 2017 15:56 phar wrote:
Show nested quote +
On November 16 2017 15:40 bo1b wrote:
On November 16 2017 06:45 Silvanel wrote:
On November 15 2017 22:40 bo1b wrote:
That letter looks like it's from Victoria, Australia - most likely in melbourne. I didn't know we had any companies in this area which used erlang.


Out of curiosity, You based it on what?

The letter referenced something called vcat. More than possible theres another tribunal somewhere around the world called vcat, but im fairly certain it's located in Australia, Victoria, Melbourne.

Jesus $55/hr is the going rate for "lead developer" in Melbourne?

Actually nvm if the owner is still interviewing people that place has gotta be tiny as shit

55 an hour is no where near the going rate for lead dev in Melbourne.

Having a forklift license qualifies you for ~50 an hour here, a lead dev is on > 180k a year before stock generally.
Prev 1 916 917 918 919 920 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 6h 38m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 345
Livibee 79
MindelVK 44
Codebar 7
StarCraft: Brood War
Britney 23472
Bisu 3749
Calm 2445
Shinee 730
Shuttle 656
firebathero 418
BeSt 249
Hyun 135
Rush 102
Larva 84
[ Show more ]
Zeus 63
Barracks 35
Free 26
ToSsGirL 24
soO 24
Dewaltoss 21
scan(afreeca) 20
Aegong 19
sorry 11
Mong 10
SilentControl 7
Bale 5
Dota 2
Gorgc4449
singsing3140
420jenkins185
XcaliburYe109
capcasts39
Counter-Strike
fl0m7297
Other Games
FrodaN1450
Mlord453
crisheroes377
ceh9326
RotterdaM275
Hui .158
ArmadaUGS152
Mew2King143
KnowMe137
XaKoH 86
Organizations
Dota 2
PGL Dota 2 - Main Stream164
StarCraft: Brood War
lovetv 7
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• poizon28 51
• OhrlRock 1
• IndyKCrew
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• LaughNgamezSOOP
StarCraft: Brood War
• FirePhoenix1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 1862
• Noizen44
League of Legends
• TFBlade1359
Other Games
• WagamamaTV331
• Shiphtur127
Upcoming Events
Replay Cast
6h 38m
OSC
23h 38m
LAN Event
1d
Replay Cast
1d 5h
Replay Cast
1d 15h
WardiTV Korean Royale
1d 18h
Sparkling Tuna Cup
2 days
WardiTV Korean Royale
2 days
Replay Cast
3 days
Wardi Open
3 days
[ Show More ]
Monday Night Weeklies
3 days
StarCraft2.fi
3 days
Replay Cast
4 days
Wardi Open
4 days
StarCraft2.fi
4 days
Wardi Open
5 days
StarCraft2.fi
5 days
The PondCast
6 days
Liquipedia Results

Completed

SOOP Univ League 2025
RSL Revival: Season 3
Eternal Conflict S1

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
META Madness #9
SL Budapest Major 2025
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
HSC XXVIII
RSL Offline Finals
WardiTV 2025
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
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.