Konlanx
@Konlanx@feddit.de
- Comment on Which side are you? Javascript or Typescript 1 year ago:
(30,27): error TS7006: Parameter ‘fuck’ implicitly has an ‘any’ type.
- Comment on I'll just sort it myself 1 year ago:
This is due to the default sorter in JavaScript sorting by the string value. The reason for that is that this won’t create errors at runtime. Since JavaScript does not have types, this is the safest way of sorting.
This works:
const unsorted = [1, 100000, 21, 30, 4] const sorted = unsorted.sort((a, b) => a - b)
- Comment on Pick a side Javascript 1 year ago:
JS !== Java
Try Javascript some day!
We have truthy and falsy! Empty string or null? Yeah, that’s false! Of course we can parse a string to number, but if it’s not a number it’s NaN! null >= 0 is true! Assign a variable with =, test type equality with == and test actual equality with ===. You will NEVER use the wrong amount of = anywhere, trust me! Our default sort converts everything to string, then sorts by UTF-16 code. So yes, [1, 10, 3] is sorted and you are going to live with it. True + true = 2. You know I’m right.
Try Javascript today!
- Comment on My own mail server 1 year ago:
I have my own mailserver just for me and it wasn’t that complicated to be honest. I set it up with Mailcow in Docker in under a day so far it has been stable with regular backups and updates through Lighthouse.
Maintenance comes down to 5 minutes every three months because somehow Let’s Encrypt and Mailcow don’t like each other and I have to renew the certificate manually.