Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 10-06-2018, 08:36 AM   #35576
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,631
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

India is the craziest place in the world.
Grue is offline   Reply With Quote
Old 10-06-2018, 10:00 AM   #35577
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

What city are you in?
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 11:13 AM   #35578
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,631
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Bangalore so its probably not even anywhere near as crazy as, at least, New Delhi.
Grue is offline   Reply With Quote
Old 10-06-2018, 12:08 PM   #35579
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I didn't spend any time in Bangalore but it seemed like the most cosmopolitan place in the whole region - from what everyone said and the people I met from there. Is there zero infrastructure and cows wandering through every intersection?

The only place in Chennai (4th largest city in India) that didn't have cows on it was the elevated cloverleaf in the center of town - which was also the only thing resembling a modern highway or interchange.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 03:18 PM   #35580
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,258
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

So, taste great or less filling?, I mean, end your lines in javascript with or without ";"?
microbet is offline   Reply With Quote
Old 10-06-2018, 03:41 PM   #35581
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

No one seems to agree. I can't look at lines w/o semi-colons so I'm in that camp. If I have to look at your code for more than 15 seconds I will put semi-colons on every line just so I don't lose my mind.

Just be aware if you don't use a semi-colon you can't start the next line with [,(,{ or some other stuff which is legal code to start a line with. The no-semi-colon camp recommends you do this:

Code:
;[a, b] = [10, 20]
which I believe is grounds for justifiable *****-slap.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 03:50 PM   #35582
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,875
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Semi colon crew checking in
PJo336 is offline   Reply With Quote
Old 10-06-2018, 03:55 PM   #35583
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

FWIW Mattias - my JS hero - was no semi-colons. But I think eventually gave in because he got tired of every youtube comment stream turning into a debate about semi-colons.

suzzer99 is offline   Reply With Quote
Old 10-06-2018, 03:59 PM   #35584
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Micro if you really want to learn and understand JS - whenever you get a free chunk of time - watch one of his videos. I've never seen someone who makes learning so much fun.

Start at the beginning imo: https://www.youtube.com/channel/UCO1...t=da&flow=grid

Also I have a bunch of little books about stuff like scope, closures and "this" - which I've never actually read but you're more than welcome to borrow.

And if you ever get into node I can teach you better than any tutorial. Every thing I've seen makes node/express way too complicated imo.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 04:34 PM   #35585
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,258
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Thanks. I do really want/need to understand javascript. My hunt for side jobs/contract programming was pretty brief. I sent out three emails and I have one paid React project lined up as well as a couple learning/free projects with people who will help me. I have a ways to go, but I'm working very hard at it and am making definite progress. It's fun, so it's not really hard work - but I'm spending basically all the time I can on this including listening to relevant podcasts or the audio from youtubes when I'm doing something else. I basically stopped mega-posting in politics, which is a good thing in and of itself.

I will watch those videos.

I was pro-semicolon back in the day, but one of the speculative projects I've been working on is in python and I've really liked that - more than js/react (though I like that too) and the lack of semicolons grew on me. I was even liking the enforced tab/spacing and I would have expected to hate that. My javascript gets very ugly, though that's not that big a deal anymore because I just run it though prettier when it gets out of hand.

As far as node/express lessons go, anytime, at your convenience and much appreciated. The first projects aren't node/express, but I have a game that I did in phaser/js. It has a backend version in PHP and also a version in python. I'd like to do a version in node as well.
microbet is offline   Reply With Quote
Old 10-06-2018, 04:37 PM   #35586
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I'm a huge fan of programmatic indentation. I wish JS used it.

YAML >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> JSON

Every now and then I see a swagger file in JSON instead of YAML and want to throw up.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 04:43 PM   #35587
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,258
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I'm going to a super nerd meetup in Culver City today if you want to go.

https://www.meetup.com/CRASH-Space/

I'm immersing myself.

I'll be working on my python project I guess. I'm way more into a React thing right now, but that's all on my desktop and I don't want to get everything working on my cheap old laptop that barely works or have time to set anything else up to do it remotely. The python thing is way more portable.

Not just regular programmer meet-up nerd level. This Crash thing looks to be mega nerdy.
microbet is offline   Reply With Quote
Old 10-06-2018, 04:45 PM   #35588
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I can't make it tonight, but have fun.

I've got a side project idea that could conceivably go somewhere - but I don't have enough time to really get it going on my own. If you get some time after these projects lmk.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 04:48 PM   #35589
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,258
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
I'm a huge fan of programmatic indentation. I wish JS used it.

YAML >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> JSON

Every now and then I see a swagger file in JSON instead of YAML and want to throw up.
And you're an awesome resource. The React thing I'm doing it going to read data from a file. There will be an interface to save the data too. At first I just hard coded some sample data in the program, but I was going to put it in a JSON file. I'll look into YAML, which I've only heard people talking about on podcasts and not known what they were talking about other than it having to do with data.
microbet is offline   Reply With Quote
Old 10-06-2018, 04:50 PM   #35590
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,258
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
I can't make it tonight, but have fun.

I've got a side project idea that could conceivably go somewhere - but I don't have enough time to really get it going on my own. If you get some time after these projects lmk.
That would be great. When you have time we should meet to discuss. I do have a lot to do, but I'm doing some stuff purely for the learning now and if I know what might be coming up it would direct my education a bit.
microbet is offline   Reply With Quote
Old 10-06-2018, 04:53 PM   #35591
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by microbet View Post
And you're an awesome resource. The React thing I'm doing it going to read data from a file. There will be an interface to save the data too. At first I just hard coded some sample data in the program, but I was going to put it in a JSON file. I'll look into YAML, which I've only heard people talking about on podcasts and not known what they were talking about other than it having to do with data.
Well it depends. If a human isn't editing the file much, and JS is creating/consuming it - then JSON makes sense.

YAML to me is far superior for properties files that drive applications or behavior and are created or edited a lot by humans.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 04:54 PM   #35592
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 30,695
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

With shell scripting you dont need to mess with any of this yaml gibberish. Just source a config file, boom done.
jmakin is online now   Reply With Quote
Old 10-06-2018, 04:55 PM   #35593
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

What format is your config file in?
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 04:56 PM   #35594
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 30,695
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

You just set your variables/arrays/whatever to whatever you want. Hell, you can even put code in there if you want. Its just bash.
jmakin is online now   Reply With Quote
Old 10-06-2018, 04:58 PM   #35595
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Right - which breaks down a little if you need complex nested properties.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 05:04 PM   #35596
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,258
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

The React projects are websites and I don't even know where they'll be hosted at this point, what operating system or what permissions I'll have. Seems like that might complicate things if doing it with shell scripts.

That is an interesting idea though and if I get time I'll try it out on the linux machine I have access to.

I also don't mind rolling my own CSV format and it could really be best for this project, but I haven't done much with JSON/XML and nothing with YAML, so I want to do some. The easiest thing for me would be to just use mysql as I've used it a ton.
microbet is offline   Reply With Quote
Old 10-06-2018, 05:46 PM   #35597
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,875
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

First person I've heard prefer yaml over Json
PJo336 is offline   Reply With Quote
Old 10-06-2018, 05:58 PM   #35598
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by PJo336 View Post
First person I've heard prefer yaml over Json
Scroll through this and tell me which examples are less cluttered and easy to read (which also translates to easier to muck with of course): https://github.com/OAI/OpenAPI-Speci...sions/3.0.0.md



Yaml can have comments, you don't need to double quote everything, there's no annoying trailing comma issues to worry about, and it's much less code w/o all those curly braces. Absolutely no comparison imo.



I'd like to see all the developer hours wasted on missing or extra trailing commas in JSON files.

Last edited by suzzer99; 10-06-2018 at 06:04 PM.
suzzer99 is offline   Reply With Quote
Old 10-06-2018, 06:30 PM   #35599
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,295
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post

I'd like to see all the developer hours wasted on missing or extra trailing commas in JSON files.
The JSON spec should be like python's interpretation of it - trailing commas are fine, either kind of quotes, a means of multi-line strings, etc.
RustyBrooks is online now   Reply With Quote
Old 10-06-2018, 06:41 PM   #35600
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 91,985
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Few things I've worked with don't barf on trailing commas. Also no comments is a huge PITA.

We always put our JSON configs in .js files and then require them from node - specifically so we don't have to deal with the extreme strictness. But of course package.json you can't do that and I pretty much always have at least one trailing comma fail every time I have to mess with it. My linter should probably catch that but it doesn't and I haven't bothered to mess with it.

Look at the JSON example above with 5 closing braces looking like some kind of ascii art mario floating staircase, whereas the YAML one just ends. It's so pretty it makes me want to cry. Think of all the wasted space just to show those meaningless (to humans) 5 lines.

The first time you boil down an HTML file into a jade template you see the amazingness of programmatic indentation.

Last edited by suzzer99; 10-06-2018 at 06:47 PM.
suzzer99 is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 12:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online