News for hackers. Stuff that matters.

citrons

Re:Rewriting TypeScript in Rust? You'D have to be on Wednesday December 14, 2022 @05:26PM (#33991563)
Also agree, with each release I get an "Eureka effect" that now I can solve the type issue I strugled couple months ago trying to create to just make some highly used function safer/easier to use for the developers.

Example the new satisfies and some upcomign "as const" features to generics I'm looking forward to

Actually liked that it lacked a minimap. Got a better sense of scale. After going trough most of the tunnels and getting stuck and kings chamber there, couldn't crawl back, I zomemed out and was shocked by the scale of the tunnels.
I have so far had very good npm workspace experience. Just define "workspaces" property in package.json and your off. https://docs.npmjs.com/cli/v8/using-npm/workspaces

Right now only pain-point with npm is that "npm link" can't be forced to install peer dependencies so I'm unable to easily test typesscript built libraries within other projects.

Re:Index bloat reduced in PostgreSQL v14 on Saturday September 11, 2021 @04:48AM (#28490433)
I'm currently having a similar issue where the query planner refuses to use the indexes on a search query (was fine for w hile, but one day it just started de-optimizing itself). Instead just does a seq-scan. Instead of the execution taking ~40ms with indexes the query planner thinks that the seq scan of ~1.5s is better...

Re-indexes the db and run analyze the table. It gets better for max 30min then PG de-optimizes itself again.

I'm kinda stuck on it, any ideas what can I do to resolve it?

Re:I don't want to do front-end anymore on Tuesday February 09, 2021 @05:12AM (#26075752)
Yeah the setup-project boilerplaye stuff is a mess.

Luckily for backend it's super easy to set up typescript as the default are good enough for weekend projects/prototypes:

``` mkdir my-project cd my-project npm init -f npm i -D typescript ts-node @types/node npx tsc init touch index.ts npx ts-node index.ts ```

Re:Centering in CSS on Friday December 18, 2020 @07:36AM (#25466462)
Stuff like 99% support flexbox and high % for grid makes working with layout so good.

Only wish "gap" property would be adopted easier to make working collapsing flex rows way easier.

Even the basic things like :last-child selector is good quality-of-life improvement.

Re:EA to buy Dirt Rally-maker Codemasters for £1B on Monday December 14, 2020 @11:46AM (#25419650)
For 15$ moreyou can get the deluxe edition with 2 exclusives cars and 5 soundtracks.
Re:Why I Love Tailwind on Monday December 07, 2020 @10:57AM (#25333364)
+1 for styled-components my prefered choice now over tailwind. Styled-components have good integration with typescript - no need for custom utility classes or inline css, also doesn't have a way writing an invalid css-classname and styled-component written css can be easily linted.
Re:Upgrade Raspberry Pi 4 with a NVMe boot drive on Monday November 23, 2020 @04:48PM (#25192343)
Incognito helps override this.
Re:TailwindCSS v2.0 on Thursday November 19, 2020 @03:05AM (#25147249)
I took over a fairly large project which used tailwind v1. Have a low-hate relationship with it.

I like how fast you can do stuff, but when when a designer creates something a bit custom it all falls part really quick.

I understand it solve the issue with reusability and style-guides, but for modern apps that would also mean everything should already be react componentized, so you shoudl not really care about css at that point idealy.

I rather use a mix styled-components (easily extendable if you need something custom) and css-variables for dark mode and defining global variables like colors,paddings etc. Plus I route-split so page only has it's related styles.

Re:A web of trust for NPM on Saturday October 03, 2020 @07:10PM (#24675350)
Yeah, for building files in docker try using multi-stage builds. They on the "final" image you can only use prod dependencies.
Re:Zappy – Screen capture tool on Wednesday April 08, 2020 @04:40PM (#22816837)
Yeah, now it Catalina it's pretty good.

Also, you can record the screen using Quicktime for years... But noticed as of Catalina it works much better with the high-res screen recording.

I think it helps more with the issue of you just overcoming laziness and wasting time otherwise - naps, games, phone,...
Re:Show HN: Simple 2D car physics with JavaScript on Wednesday January 01, 2020 @08:52AM (#21927992)
Nice!
Re:Redux – Not Dead Yet on Wednesday April 25, 2018 @03:59AM (#16919413)
I also had a bit trouble learning redux (adopted quite early), but now there is video series by Dan Abramv that goes trough entire redux features is is easy to understand.

But the conectps in redux IMO are worth learning, made me think about my own code different. More pure functions, less sideeffects...

Re:Redux – Not Dead Yet on Wednesday April 25, 2018 @03:56AM (#16919396)
If you read their docs, you learn even more cool "hidden" (not promoted) features.

For new project I also prefer mobx-state-tree over redux.

Re:React vs. Angular 2 on Saturday November 21, 2015 @06:39PM (#10608485)
Here a discussion on React github about WebComponents: https://github.com/facebook/react/issues/5052
For my notes use private GISTS or Evernote. For projects use BitBucket or GitHub. For syncing program configurations use my own written script that creates symlink to hard drive from Google Drive folder. Chrome does a decent job syncing all web related stuff for me.

Not perfect but it is ok.