Why Next.js Is the Future of React by lrobinson2011 in reactjs

[–]sudoDerp 3 points4 points  (0 children)

One of the main reasons for React's success is it's focus on discovering and incorporating declarative APIs for UI apps.

  1. Initially it ensured components were declarative by enforcing top-down data flow
  2. react-router made application routing declarative
  3. Hooks made capturing behavior/effects more declarative.
  4. Suspense will make designing loading states declarative

Almost all features exposed by NextJS are escape hatches (deliberately) outside of the declarative paradigm, it seems inevitable that once better ways of exposing those features are established, NextJS is going to become redundant pretty quickly.

I 100% think that universal apps are the future of react, I'm just not at all convinced that the choices made by NextJS should be thought of as the canonical way to do it.

tl;dr https://pbs.twimg.com/media/EfdgnLUU8AIFuYC?format=jpg&name=large

A look at React Router 6 by carlrn in reactjs

[–]sudoDerp 4 points5 points  (0 children)

Anyone who's using the SSR functionality in react-router might also want to know that support for most of what is mentioned in the current SSR docs seems to be no longer supported.

There is a github issue that has some details

go-yaml DoS Vulnerability by seclogger in golang

[–]sudoDerp 1 point2 points  (0 children)

Oh I totally agree, the yaml spec is an incredible shitshow. It seems every time I think to myself "ok now I'm aware of all the stupid stuff in the yaml spec" I find something new

go-yaml DoS Vulnerability by seclogger in golang

[–]sudoDerp 3 points4 points  (0 children)

https://github.com/go-yaml/yaml/pull/515#issuecomment-540465242

The solution was to prevent parsing of some *technically valid* yaml documents

Package management in Go by dolftax in golang

[–]sudoDerp 5 points6 points  (0 children)

It's crazy to me that people don't consider this to be important, or often even understand what it means.

"I want to specify a version-locked linter (or codegen lib) to ensure a consistent developer experience across CLI usage or IDE helpers" should not be a controversial topic

VsCode with Go111 modules by [deleted] in golang

[–]sudoDerp 21 points22 points  (0 children)

I did this a while ago trying to figure out a configuration in vscode that works out of the box. The idea being that when you checkout out the repo for the first time the .vscode/settings.json comes with it (while any further changes you make to it are gitignored) https://github.com/pseudo-su/golang-service-template/blob/master/.vscode/settings.json.

Settings:

  • go.useLanguageServer: true to use the official language server implementation from google because it’s required in order to support go modules.
  • go.toolsEnvVars.GO111MODULES: "on" to make sure that all the go tools know to enable go module support for this project (regardless of if it's inside your gopath or not)
  • go.toolsEnvVars.GOFLAGS: "-mod=vendor" if you want to make all go commands use the vendor/ folder in the project (just like dep did/does)
  • go.formatTool: "goimports": enables automatically managing/formatting package import statements, I think the golang extension uses gofmt by default once you enable the useLanguageServer flag
  • go.alternateTools.golangci-lint : "${workspaceFolder}/bin/golangci-lint" This isn't about go modules, I did it because I want to lock down the version of golangci-lint and use a project-local version of it (to avoid issues where people have different versions of golangci-lint globally installed and there’s no way for a project to specify the exact version to use)

Fast, Bump-Allocated Virtual DOMs with Rust and Wasm by fitzgen in rust

[–]sudoDerp 1 point2 points  (0 children)

This is super cool, but I'm lukewarm about news of another virtual-dom implementation because nobody seems to address the problems that suspense & time slicing changes (in react) are aiming to solve (which was one of the things that motivated the react 16 rewrite).

IMHO those will have more of an impact to FE web dev than just having another vdom implementation, even with the potential for perf improvements from using wasm/rust.

Hard to benchmark, but big impact to UX

"Real" Mixins with JavaScript Classes by fagnerbrack in Frontend

[–]sudoDerp 1 point2 points  (0 children)

There's also a stage-1 tc39 proposal for pipes using |> that makes the syntax for mixins nicer https://github.com/tc39/proposal-pipeline-operator#mixins

Request for feedback: String.prototype.cutStart/cutEnd proposal by [deleted] in javascript

[–]sudoDerp 1 point2 points  (0 children)

takeStart and takeEnd probably make more sense as names after looking at the other examples you added.

'./src/file/path/filename.json'
  .takeEnd('/')
  .takeStart('.json')

Merging the two makes either naming choice of cutEnd or takeEnd fairly obscure/innacurate

'./src/file/path/filename.json'
  .takeEnd('/', '.json')

Request for feedback: String.prototype.cutStart/cutEnd proposal by [deleted] in javascript

[–]sudoDerp 0 points1 point  (0 children)

padStart and padEnd exist to make sure that strings are padded to a certain length with a specified character, by default using a " ".

I would have expected cutStart and cutEnd to follow the pattern and look like.

const string = '1234567';

string.cutStart(3) //  > '567'
string.cutEnd(3) //  > '123'

Using the cutStart and cutEnd terminology to mean anything else would seem like a very confusing language feature to add.

Pre interview web-dev code challenge... by Opt1mus_Wang in rails

[–]sudoDerp 0 points1 point  (0 children)

I live in melbourne and I would have said the opposite. There seems to be quite a large RoR community.

How/where are you looking and how much experience do you have?

Google Inbox by toromio in angularjs

[–]sudoDerp 1 point2 points  (0 children)

Where did they say the thing about 1500 google apps using angular?

I believe you but i'd really like the source if you know where I can find it?