Volte posted:Yes, but it tends to be a lot more invasive because you actually have to wrap each function call in an identity function with side effects, and if you're trying to analyze all the intermediate values to see where things went wrong, it can get tedious fast. Not so! You can use Debug.Trace to smuggle in your nefarious value-printing side effects.
|
|
# ? Aug 24, 2019 01:53 |
|
|
# ? Jun 8, 2024 05:46 |
|
VikingofRock posted:Not so! You can use Debug.Trace to smuggle in your nefarious value-printing side effects.
|
# ? Aug 24, 2019 02:08 |
|
Volte posted:Well, sure. Debug.Trace is an example of the identity function with side effects I was talking about. My point was that it's not just a matter of adding a bunch of extra lines that you can then delete, you actually have to change the bindings to incorporate the trace function, when in an imperative language it would be as simple as putting a breakpoint at the end of the function and using the debugger to inspect each variable without having to change the code at all. I've only dabbled with Haskell, but I've had some success with this pattern: code:
|
# ? Aug 24, 2019 09:26 |
|
The technique I usually use for this is pattern guards:code:
In a monadic context, you can just put traces in front of most monadic operations.
|
# ? Aug 24, 2019 14:05 |
|
JavaScript code:
isObject and isArray are other utility functions which do pretty much what you would expect but are not horrific enough in their own right to be worth sharing.
|
# ? Aug 24, 2019 15:17 |
|
Aww, confusing for ... in with the in operator. How adorable.
|
# ? Aug 24, 2019 15:35 |
|
Javascript drama : https://github.com/standard/standard/issues/1381quote:What's the experiment? Whenever standard 14 is installed, we'll display a message from a company that supports open source. Currently, these are Linode and LogRocket. The sponsorship pays directly for maintainer time. That is, writing new features, fixing bugs, answering user questions, and improving documentation. (the package appears to be some kind of config file for someone else's linter)
|
# ? Aug 24, 2019 23:13 |
|
lmao feross
|
# ? Aug 25, 2019 00:46 |
|
also lmao @ github putting a political compass on everyone's profile page
|
# ? Aug 25, 2019 00:49 |
|
Is there anybody who does mostly PRs? I'm not even sure how that would work.
|
# ? Aug 25, 2019 01:10 |
|
ultrafilter posted:Is there anybody who does mostly PRs? I'm not even sure how that would work. Erling?
|
# ? Aug 25, 2019 01:41 |
|
edit: nvm, I thought PRs meant code reviews
|
# ? Aug 25, 2019 01:52 |
|
ultrafilter posted:Is there anybody who does mostly PRs? I'm not even sure how that would work. Some of the linux intermediary people who spend their time gathering changes from other people and pushing them to linus might be mostly PRs (although obviously they aren't doing it on github).
|
# ? Aug 25, 2019 03:49 |
|
It's really perfect that as far as I can tell that package is a wrapper script and an eslint config file and like nothing else
|
# ? Aug 25, 2019 14:11 |
|
Phobeste posted:It's really perfect that as far as I can tell that package is a wrapper script and an eslint config file and like nothing else It's far too heavyweight for JS. Strip the wrapper out into it's own NPM package. Bonus: double the ads!
|
# ? Aug 25, 2019 14:29 |
|
One comment on that issue went something like "I use this in all my js projects" and I couldn’t help but read it as an indictment.
|
# ? Aug 25, 2019 15:03 |
|
Having a highly popular public canned configuration for ESLint is surprisingly valuable because it enables us to immediately terminate all kinds of tedious, expensive bikeshedding discussions about code style and formatting and many kinds of best practice. Every question about correct brace placement or tabs versus spaces or string quoting just goes away instantly and we can get on with actual work. Even in the cases where there are rules I personally disagree with (there are one or two), the value from just having consistent formatting and best practices across all of our repos is worth it. That doesn't mean "Standard" is the last word in canned configurations for ESLint, it's a pretty obnoxious and fundamentally inaccurate name and there are others out there which are just as good.
|
# ? Aug 25, 2019 16:47 |
|
Is there a particular reason why eslint can't just provide some sane defaults?
|
# ? Aug 25, 2019 17:09 |
|
Pie Colony posted:edit: nvm, I thought PRs meant code reviews But, yes:
|
# ? Aug 25, 2019 17:32 |
|
I don't like anything that makes it more obvious to my coworkers how little work I do
|
# ? Aug 25, 2019 18:28 |
|
Doom Mathematic posted:Having a highly popular public canned configuration for ESLint is surprisingly valuable because it enables us to immediately terminate all kinds of tedious, expensive bikeshedding discussions about code style and formatting and many kinds of best practice. Every question about correct brace placement or tabs versus spaces or string quoting just goes away instantly and we can get on with actual work. Even in the cases where there are rules I personally disagree with (there are one or two), the value from just having consistent formatting and best practices across all of our repos is worth it. This is true, but right now we've moved the bikeshedding from configuration options to which configuration-free linter to use. Thankfully, I think it seems like prettier is winning that war.
|
# ? Aug 25, 2019 20:45 |
|
xtal posted:I don't like anything that makes it more obvious to my coworkers how little work I do Oh, I don't there's anything that could make it more obvious.
|
# ? Aug 25, 2019 22:01 |
|
Suspicious Dish posted:also lmao @ github putting a political compass on everyone's profile page Issues = Libertarian Code reviews = Authoritarian Pull requests = Left Commits = Right Stalin sends you to the gulags if your pull requests don't pass CI. Hitler force pushes to master.
|
# ? Aug 26, 2019 12:48 |
|
Volguus posted:This proves you cannot ever please everyone. If there would just only be a way to allow multiple kinds of clients talk with the central server and between themselves. You know, to open the protocol and allow other people that prefer the black client/white client/pink client/compact client to just ... you know, use it and don't worry about it. And the protocol to be well designed that a client only implementing a part of it can still function perfectly fine. I guess the technology is simply not there yet. What's proven to not be there time and again is the small army of people to implement good, useable clients, HTH.
|
# ? Aug 26, 2019 14:22 |
|
Sagacity posted:Is there a particular reason why eslint can't just provide some sane defaults? It does.
|
# ? Aug 26, 2019 16:45 |
|
reminder that feross is already a millioniare because yahoo bought his stupid company lol it was a cdn where the user visiting the site also dn'd the c to other users visiting the site only yahoo was dumb enough to fall for it https://web.archive.org/web/20150810065820/https://peercdn.com/
|
# ? Aug 26, 2019 17:22 |
|
dn'd the c what?
|
# ? Aug 26, 2019 18:10 |
deliverynetworked the content
|
|
# ? Aug 26, 2019 18:12 |
|
Thermopyle posted:dn'd the c cdn's dn the c
|
# ? Aug 26, 2019 18:17 |
|
LOOK I AM A TURTLE posted:Issues = Libertarian i always knew stalin was a good guy
|
# ? Aug 26, 2019 18:30 |
|
Suspicious Dish posted:cdn's dn the c they're an n to d the c
|
# ? Aug 26, 2019 18:40 |
|
I assumed the name peercdn was the result of "I’m making a cdn, I’ll call it *spins wheel of tech-ish words* peer. Peer cdn". I had no idea it was... that.
|
# ? Aug 26, 2019 23:39 |
|
BCDN Blockchain Delivery Network Investors:
|
# ? Aug 26, 2019 23:45 |
|
I mean, peer-to-peer content distribution isn't that bad of an idea. It's like realtime bittorrent!
|
# ? Aug 27, 2019 00:41 |
|
it should be of no surprise that feross's next gig was webtorrent, which implements torrent, in web https://github.com/webtorrent/webtorrent
|
# ? Aug 27, 2019 04:44 |
|
Sagacity posted:Is there a particular reason why eslint can't just provide some sane defaults? eslint's defaults are arguably better than what Standard picks.
|
# ? Aug 27, 2019 07:36 |
|
Absurd Alhazred posted:I mean, peer-to-peer content distribution isn't that bad of an idea. It's like realtime bittorrent! The Blizzard Battle.net App does this
|
# ? Aug 27, 2019 11:18 |
|
It’s always funny to me how Standard’s name is literally “Standard.” Gonna publish my ESlint config with the name “Official ISO-420-69."
|
# ? Aug 27, 2019 13:52 |
|
Suspicious Dish posted:it should be of no surprise that feross's next gig was webtorrent, which implements torrent, in web Sponsored by Brave e: still, first BT client I ever used was written in Python ~2.2 or so
|
# ? Aug 27, 2019 14:48 |
|
|
# ? Jun 8, 2024 05:46 |
|
moostaffa posted:The Blizzard Battle.net App does this They moved away from bittorrent something like a decade ago.
|
# ? Aug 27, 2019 15:56 |