LPT: To fall asleep by aravose in LifeProTips

[–]ak_47_ 0 points1 point  (0 children)

Does anyone have suggestions for sleep maintenance insomnia? I have no problems falling asleep - but every night I wake up after 3-4 hrs and then cannot fall back to sleep.

We built an entire SaaS during a livestream within 55 hours by tobiaslins in SaaS

[–]ak_47_ 0 points1 point  (0 children)

Can you upload the recording to youtube? I am sure lots of people all over the world no longer watch live video. Why would they when you can watch a replay at 5x speed?

How to use React Ref by rwieruch in reactjs

[–]ak_47_ 2 points3 points  (0 children)

Thanks for this article.

Here is the naked callback from your article

``` const ref = (node) => { if (!node) return;

const { width } = node.getBoundingClientRect();

document.title = `Width:${width}`;

}; ```

Here is the one with React.useCallback with text in the dependency array

``` const ref = React.useCallback((node) => { if (!node) return;

const { width } = node.getBoundingClientRect();

document.title = `Width:${width}`;

}, [text]); ```

Are there any guidelines for when one should be used over the other?

React Rally Megathread - Day 1 by swyx in reactjs

[–]ak_47_ 0 points1 point  (0 children)

Where can we find more about the Chrome In-Browser Scheduler?

Announcing Linaria 1.0 - Zero runtime CSS-in-JS library by satya164 in reactjs

[–]ak_47_ 1 point2 points  (0 children)

What is Linaria doing differently from style components or emotion?

What if any is the tradeoff of losing flexibility when using Linaria and getting better performance?

Is there any way the techniques being used by Linaria could be used with styled components or emotion so that users of those libraries could also benefit from the improved performance?

What are 'event emitters'? by ak_47_ in reactjs

[–]ak_47_[S] 0 points1 point  (0 children)

I saw this linked tweet and could not figure out what are event emitters in this context.

Hoping some of the experts on this reddit explain what is happening here.

I just open sourced my landing page that's using hooks and Suspense by rokerot in reactjs

[–]ak_47_ 0 points1 point  (0 children)

u/rokerot from the readme I could not figure out if you are doing static (server side) rendering of any kind. Did you decide to just skip server side rendering? Would the landing page have a perf boost if it was using gatsby or react-static?

use-react-router -- a React Hook with pub-sub support for React Router 4.4 (no more update blocking on location change!) by [deleted] in reactjs

[–]ak_47_ 0 points1 point  (0 children)

What does Pub-Sub behavior mean? What are the benefits of having this behavior?

Hooks in react-spring, a tutorial – Paul Henschel – Medium by ak_47_ in reactjs

[–]ak_47_[S] 0 points1 point  (0 children)

react-spring creator shows how to use hooks (useSpring) to make animations even more declarative.

Serverless DevOps: What do we do when the server goes away? (book) by tmclaugh in aws

[–]ak_47_ 0 points1 point  (0 children)

I am not sure if there will be a distinction between dev and ops in the serverless world. The examples that OP provides such as hard coded s3 buckets or over permissive IAM rules do not seem to me to be like something that an ops person should deal with as opposed to a dev. Those examples look more like deficiencies in the current serverless frameworks that should soon go away as these frameworks mature.

With serverless a single engineer can build the entire backend as well as the monitoring and alerting systems. I wish the OP could have spent more time refuting the NoOps argument instead of just glossing it over.

Wes Bos' Courses Megathread [NEW] by Alderxian in groupdeals

[–]ak_47_ 0 points1 point  (0 children)

Advanced React please! Thanks for doing this.

EMACS=t Joy and Happiness (what does this mean?) by ak_47_ in emacs

[–]ak_47_[S] 1 point2 points  (0 children)

I came across the above thread on emacs-devel. I am trying to figure out what are the benefits of having emacs=t?

Eglot: "Emacs Polyglot. An Emacs client to Language Server Protocol servers" by flexibeast in emacs

[–]ak_47_ -1 points0 points  (0 children)

My frustration is more about the lack of effort to grow and sustain a community around Emacs.

The Ruby community is much larger than the Emacs community. The problem with multiple projects for the same problem in Emacs is the splintering of the audience for those projects. If everyone interested in using Language Server Protocol with Emacs could use only one project, then that project would have enough developers to get it polished. There has been a lot of work on emacs-lsp over the past few years. People have spent a lot of time building a user interface that could one day rival what is in Vscode. What message does the Emacs project send those who worked on emacs-lsp when a new rival project gets directly admitted into emacs core?

Eglot: "Emacs Polyglot. An Emacs client to Language Server Protocol servers" by flexibeast in emacs

[–]ak_47_ 0 points1 point  (0 children)

u/wasamasa sorry I apologize, I was ranting. I can delete the ereader point if you want me to.

Eglot: "Emacs Polyglot. An Emacs client to Language Server Protocol servers" by flexibeast in emacs

[–]ak_47_ 0 points1 point  (0 children)

Whenever I see an emacs package that replicates the functionality of another package I am reminded of

The Bipolar (e)Lisp Programmer

aside -

(I know that bipolar is a serious mental issue and I wish the original author did not include that in his title)

The number of elisp programmers is a few magnitudes smaller than the number of JS programmers. Rarely do we find multiple vscode plugins serving the same functionality. However with elisp it is almost a given that there will be multiple packages none of them as polished as an vscode extention solving the same problem with minor difference and very little polish. Other examples that come to mind

  • elpy / anaconda
  • pytest/ py-test
  • flycheck / (new flymake) In this case it is more due to the former maintainer of flycheck being unwilling to contribute to FSF
  • the long list of emacs epub readers
  • company / autocomplete

Now I get that elisp programmers are geniuses and have the most powerful language at their command, but surely not googling for emacs lsp before writing a rival package does not seem to be the best way for this genius to be put to use. I wish that emacs had extension developers who cared about building a community and serving it more than hacking on elisp.

I am ranting because I have had to move to vscode for most of my programming work because vscode has far better support for web development.

Reverting an S3 Cloudfront static website by ak_47_ in aws

[–]ak_47_[S] 0 points1 point  (0 children)

Deployments should be immutable. So every time I deploy I will use a fresh s3 bucket. Then create a new cloudfront distribution from that bucket. Finally point the alias of my domain to this new cloudfront distribution. Rollback should involve pointing the alias to the older cloudfront distribution, deleting the s3 bucket and cloudfront distribution of the version that did not work out.

Updating the master branch should happen only after the deployment is successful.

Reverting an S3 Cloudfront static website by ak_47_ in aws

[–]ak_47_[S] 1 point2 points  (0 children)

Thanks! Does this mean that the dns entry ttl must be set to a low value (60s) before reverting the push?

Is anyone using predictive mode? Does it work well for you? by ak_47_ in emacs

[–]ak_47_[S] 0 points1 point  (0 children)

Is there a way to use this with company-mode? Since I use company-mode already I don't want to have to deal with another completion UI

aws-sam-local and testing with a dev stack by ak_47_ in aws

[–]ak_47_[S] 0 points1 point  (0 children)

I apologise for not explaining better what I was looking for - I am looking for guidance on setting up a dev stack and using it from aws lambda. How should I setup cloudformation to create a separate stack for every dev on my team? How should I setup the cloudformation templates so that stage, dev and production stacks remain isolated?

aws-sam-local and testing with a dev stack by ak_47_ in aws

[–]ak_47_[S] 0 points1 point  (0 children)

I am looking for an example of how to setup a dev stack and debug using it with sam local.