Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

12-27-2018 , 06:29 PM
Oh is it this time of the month again?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-27-2018 , 07:25 PM
Quote:
Originally Posted by PJo336
Oh is it this time of the month again?
Yeah sorry. I was mostly looking for input from JS devs. I'm aware non JS people like it a lot.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-27-2018 , 07:28 PM
Quote:
Originally Posted by Grue
Yeah sorry. I was mostly looking for input from JS devs. I'm aware non JS people like it a lot.
Idk what a Js person implies. I do node professionally but typescript and go on hobby stuff. I just think if you don't like it, don't use it, who cares. Not sure why you and Suzzer seem stuck on it if you don't care for it
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-27-2018 , 07:31 PM
Its pretty nice to be able to instantly know the type of something and find its fields and objects. Esp with observables where its not readily apparent and you need to call it out at times.

I mean, its hard for me to actually prefer less data or information.

And you still have access to most every part of the javascrpit language.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-27-2018 , 07:32 PM
Quote:
Originally Posted by Wolfram
I'm a big proponent of static typed languages, but I've never tried TypeScript and I've heard it has some warts since it's an add-on and js wasn't intended to be statically typed.

I'd just stick with as pure js as I could and use unit tests to cover my ass for type related errors.
What warts?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-27-2018 , 11:25 PM
Quote:
Originally Posted by Victor
Its pretty nice to be able to instantly know the type of something and find its fields and objects.
Could you expand on this? How do you know this outside of console logs or breakpoints (that you wouldn't normally get with normal dynamic JS)?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 12:03 AM
Quote:
Originally Posted by Grue
So this has been done before, but has anyone was primarily a JS/ES6 developer who picked up TypeScript and loved it and never went back? I took a serious look at it for the first real time and frankly I just don't get it. Why would I want all this stuff, just so functions have ironclad type checking? This just isn't a problem for me. Generally the bugs I write have nothing to do with wrong types or something TS would have caught. And there's just so much more typing and characters and colons and <> and yeah. Anyone?
I'll go you one further - Java dev for 10 years but also did plenty of JS along the way. Tried and tried with Typescript and I still hate it. Yes please slow my development down to 25% speed with no clear benefit except auto-complete (which is nice, but not worth a 4x drop off in speed and 2-4x increase in amount of code).

Btw I've changed my mind on plenty of stuff once I forced myself to do it for a while. I thought swagger was kind of a nuisance at first, now I love it. I'm warming up to react, compared to angular for sure. I used to think IDE linters were dumb - no it was I that was very very dumb. I'm actually starting to like bash scripting. I went from testing agnostic to testing evangelist.

But no, I just cant' get into typescript. The only people I know personally who love it came straight over from Java or C# and never really got to experience the ease and speed of building functionality in well-written JS.

I'm currently going back and forth between node lambdas and C# lambdas. The ease of building and testing stuff is like night and day. When I realize I need to change something like an input or output object in my C# lambdas, I heave a big sigh. In node it's done in 30 seconds, including update the tests. Yes it helps that I have a lot more node experience, but most of what I'm doing is just vanilla JS.

Last edited by suzzer99; 12-28-2018 at 12:09 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 12:04 AM
Quote:
Originally Posted by Grue
Could you expand on this? How do you know this outside of console logs or breakpoints (that you wouldn't normally get with normal dynamic JS)?
Auto-complete in your IDE. Also JS Docs I assume. But I've yet to meet a single person who uses those. But with TS they'd have a lot more information.

Last edited by suzzer99; 12-28-2018 at 12:10 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 12:21 AM
Quote:
Originally Posted by Grue
Could you expand on this? How do you know this outside of console logs or breakpoints (that you wouldn't normally get with normal dynamic JS)?
Man, talk about how the other half live. No wonder you guys don't see the point of static typing. (I don't like TS, btw, but I haven't had much experience with it).

Quote:
Originally Posted by suzzer99
I'm currently going back and forth between node lambdas and C# lambdas. The ease of building and testing stuff is like night and day. When I realize I need to change something like an input or output object in my C# lambdas, I heave a big sigh. In node it's done in 30 seconds, including update the tests. Yes it helps that I have a lot more node experience, but most of what I'm doing is just vanilla JS.
Curious what is so onerous about a change like that in C#.

Edit: You using full Visual Studio?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 12:33 AM
C# is fine. I like it better than Java. Async/await is awesome. It's just the whole strongly typed thing. I did it for 10 years then walked out into the sunshine a free man. No more interfaces. No more setters and getters - even if there are shortcuts. No more constructors (JS classes/inheritance sucks too - avoid). No more factories. No more introspection. No more a bunch of other **** I'm forgetting.

I'm sure for some things it's still the best possible solution. But for lambdas we're only using it because we already have a battle-tested C# library to talk to our CRM system (Blackbaud) over SOAP. And node sucks at SOAP. Otherwise I don't think it's the optimal choice for something small and independent like microservices.

No I haven't figured out all the vagaries of Visual Studio for Mac yet. But I know only the PC version has the AWS SDK - which is the killer app that would really pull me in. But the lambdas do all exist as projects in a master solution with some shared libs. So that works great. The solution builds and runs all tests. No complaints about visual studio so far. VS Code is awesome too.

However I still have to run the serverless.com build script and their deploy script - so I'm not always in Visual Studio. The PC version with AWS SDK has it's own form of that - but we're all in on serverless for lambdas. If the C# devs eventually want to abandon serverless and use the VS+AWS SDK flow I'll let them. But I'd rather have one flow for all lamdbas that works on PC or Mac.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 01:33 AM
Yeah my point is just that I think a lot of these gripes come down to platform and tooling. I develop on Windows. Trying to use something like the node ecosystem is a huge pain in the ass because any time I want to google for help on anything, I have to sift through 800 pages telling me that the solution begins with typing sudo apt-get something or other.

In the case of C#, Resharper has some pretty funky refactoring tools. So when we talk about messing around with method signatures, we're not actually discussing the same process. When I'm writing in C# I probably spend more time instructing the IDE to write code for me (either with tools or simply by pressing down arrow and Tab a lot) than I do actually typing out code. Similarly, Grue's question kind of blew my mind as it's the question of someone who just writes their code in vi or whatever, just an extremely different process, but I'm sure equally as productive - there are benefits to keeping things lightweight. But if you haven't really got to grips with a large modern IDE, of course you'll be mystified at what benefit type-inference is supposed to be providing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 01:39 AM
I often forget what is vanilla Visual Studio and what is Resharper. I thought a lot of that stuff was vanilla VS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 01:40 AM
Just post your node questions here. You'll get better support You should never need sudo apt-get for anything in the node ecosystem that I can think of. At least not npm modules.

Yeah obviously IDEs make static typing a whole different ballgame. It's just not worth it right now for me to learn all that for a few C# lambdas when I'm just prototyping and other devs will do most of the actual work.

There are no such game-changing IDEs for typescript as far as I can tell. You get auto-complete and compile checking - but afaik no help refactoring.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 02:09 AM
My little experience with "sudo apt-get" is that is something I was doing to install/update python and mariadb on linux. I've only installed node on widows and that was downloading the exe followed by npm for installing packages/modules/libraries or whatever you call them.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 02:19 AM
Quote:
Originally Posted by Grue
So this has been done before, but has anyone was primarily a JS/ES6 developer who picked up TypeScript and loved it and never went back? I took a serious look at it for the first real time and frankly I just don't get it. Why would I want all this stuff, just so functions have ironclad type checking? This just isn't a problem for me. Generally the bugs I write have nothing to do with wrong types or something TS would have caught. And there's just so much more typing and characters and colons and <> and yeah. Anyone?
It makes a lot more sense when you have to work on someone else's code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2018 , 08:27 AM
Quote:
Originally Posted by Grue
Could you expand on this? How do you know this outside of console logs or breakpoints (that you wouldn't normally get with normal dynamic JS)?
ChrisV (and Suzzer) are correct. it has more to do with how I use my VS Code IDE. you get autocomplete or can hover over a variable to see the type. and depending on how your linting is set up and what your organization standards are, you may need to specify all types and then you can right click on the type and go to definition to see what that object entails.

here the highlighted types are optional, but they make it easier to readily see (dont need to hover) and it is faster to see what is in them (can right click and go to definition rather than hover, then ctrl+p on the hover result). but obv it takes time and is tedious to add. in this case the, since it is a combineLatest, the syntax requires a bit more knowledge too.



but, as maxtower said, this makes it very easy for a person coming into this file to understand and change/expand.

and ya, it may be more work than its worth. it has certainly helped me go from complete newb but still be able to make meaningful contributions. now, it is completely unnecessary for me as I have full understanding of what is going on. but it still makes some things faster to look up.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 12:08 AM
Chrome for Mac: Hey why don't I just stop remembering your passwords for you out of the blue, and forget all the remembered ones?

The Internet: Well if you just delete these Google folders from your Library Cache, and Application Support folders, the problem will correct itself.

Me, an idiot: Hurr durr, better empty my trash too since Mac app folders have a way of still doing things from the trash.

And now I have no more bookmarks, history, extension or preferences. Also stuff like Picasa is starting over from scratch. Woo hoo.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 12:36 AM
lol Macs. I am pointing and laughing at you while I am in the process of separately applying a 2GB windows update to 9 virtual machines, something Microsoft requires me to do every few hours.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 01:17 AM
Quote:
Originally Posted by suzzer99
Chrome for Mac: Hey why don't I just stop remembering your passwords for you out of the blue, and forget all the remembered ones?

The Internet: Well if you just delete these Google folders from your Library Cache, and Application Support folders, the problem will correct itself.

Me, an idiot: Hurr durr, better empty my trash too since Mac app folders have a way of still doing things from the trash.

And now I have no more bookmarks, history, extension or preferences. Also stuff like Picasa is starting over from scratch. Woo hoo.
Can you time machine it from yesterday or something?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 01:47 AM
Quote:
Originally Posted by ChrisV
lol Macs. I am pointing and laughing at you while I am in the process of separately applying a 2GB windows update to 9 virtual machines, something Microsoft requires me to do every few hours.
I currently can't revert a file I changed due to not having proper admin permissions in windows. Fun times for all in OS land
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 01:53 AM
Quote:
Originally Posted by kerowo
Can you time machine it from yesterday or something?
Lol Time Machine - you mean that thing I have to plug in an external drive for and keeps telling me it's been 70 days or whatever?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 04:55 AM
My big Mac problem is that, once a day or so, my build process stops working because subprocesses start erroring out on "too many open files in system".

Every single time, I google the solution for "too many open files in system", and I sigh and once again close Firefox to free up enough of these mysterious "open file" resources. Like, there is a solution, but look at this ****: https://superuser.com/questions/4337...on-os-x-10-7-1

Quote:
You can increase the limits (at your own risk) with:

sysctl -w kern.maxfiles=20480 (or whatever number you choose)
sysctl -w kern.maxfilesperproc=18000 (or whatever number you choose)
Quote:
To make the change permanent, use sudo to put your settings in /etc/sysctl.conf (which you may have to create), like this:

kern.maxfiles=20480
kern.maxfilesperproc=18000
Quote:
Note: In OS X 10.10 or lower, you can add setting in /etc/launchd.conf like limit maxfiles and it will override whatever you put here.
Quote:
Again, from the article:

Once you’ve done this, the kernel itself will have a maximum number of files but the shell might not. And since most processes that will take up this many files are going to be initiated by the shell you’re gonna want to increase that.

The command for that is:

ulimit -S -n 2048 # or whatever number you choose

That change is also temporary; it only lasts for the current shell session.
Jesus H ****ing Christ, so:
- I can increase these to any limit I choose (then why is there a limit??), but
- it won't be permanent unless I do something else, and
- that permanent change might be different depending on my version, and
- it's possible none of that matters depending on whether we're talking shell processes, and are these shell processes, and
- the command for that is not permanent

IT'S TOO MUCH. So I close Firefox and leave the mental strain for another day. Repeat ad nauseum.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 05:29 AM
Switch to Chrome?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 05:59 AM
This may or may not be interesting to anyone who doesn't use modern C++ on a regular basis, but: what the **** is going on in C++20? (through the eyes of a particular feature that was approved and potentially requires a PhD to understand correctly and will increase your compile times by ~150x if used)



I've also never seen this C# syntax before, as he compares implementation in other languages:

Code:
var triples =
    from z in Enumerable.Range(1, int.MaxValue)
    from x in Enumerable.Range(1, z)
    from y in Enumerable.Range(x, z)
    where x*x+y*y==z*z
    select (x:x, y:y, z:z);
wat
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-29-2018 , 06:00 AM
Quote:
Originally Posted by ChrisV
Switch to Chrome?
Firefox is the biggest hog, but when I look at what programs are using the most files, all Chromium-based apps (Chrome, Spotify, Sublime, VS Code) are up there too. Presumably if Chrome was my main browser it would use even more. idk if it would really help, and I like Firefox, so ¯\_(ツ)_/¯
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m