News for hackers. Stuff that matters.

cuddlecake

Re:A proposal to add signals to JavaScript on Sunday March 31, 2024 @07:18PM (#39889133)
Promises are, technically speaking, "abstracted crap".

So is abstracted crap only ok if it's already in the JS standard library?

Re:The Negative Impact of Mobile-First Web Design on Desktop on Thursday October 26, 2023 @05:00PM (#38031633)
How _do_ you get a 3px gap though?
Re:The Decline of Usability (2020) on Sunday September 10, 2023 @03:06PM (#37458916)
As a frontend dev, what are good resources to learn about principles and heuristics that I can apply in my work?

I have some knowledge, albeit very primitive, that I picked up from an HCI introduction and some good designers, but nothing too technical / formal yet.

Re:The Most Important Coding Habits on Saturday July 22, 2023 @02:38PM (#36828593)
What do you do, when you straighten out your spine? I mean in terms of movement, or do you just change your posture?
Re:Angular v16 on Thursday May 04, 2023 @02:49AM (#35812078)
> In no time we'll see SO spammed with questions using `computed(async () => ...` or race conditions when using `effect`.

As opposed to the very few questions about rxjs, where people understand everything perfectly.

Re:Leap: Neovim’s Answer to the Mouse on Sunday October 09, 2022 @03:02PM (#33144192)
Good to know, thank you
Re:Leap: Neovim’s Answer to the Mouse on Sunday October 09, 2022 @04:20AM (#33139075)
Wouldn't just `.` do the same as `d;` in that case?
Re:Parent time on Monday October 03, 2022 @08:31AM (#33066568)
As most people will - die without legacy and respect, because they are not a corporate overlord.

I guess.

Hi, congrats on the launch.

On my screen, the website is scrollable. Not sure if the animation needs to have top: 30vh and height: 80%

Also: there is a big layout shift right after loading.

Re:TypeScript is terrible for library developers on Thursday August 25, 2022 @11:40AM (#32595244)
You can also write the array first, without using enum:

const tokens = ['parenOpen', 'bang', 'plus', 'minus'] as const;

type Token = typeof tokens[number];

type TokenTable<T> = Record<Token, T> // alias for { [key in Token]: T }

const isToken = (t: string): t is Token => tokens.includes(t);

const patterns: TokenTable<RegExp> = { bang: /\+/, // rest }

Re:TypeScript is terrible for library developers on Tuesday August 23, 2022 @03:39PM (#32570299)
Do you have an example for what you want to do, with an object before and after mapping? I don't understand what you mean by "functionally map over a typed object by key"
Re:React PDF Viewer on Monday August 22, 2022 @03:28AM (#32548384)
For one, it's a wrapper in React, so no need to implement the glue code yourself if you want to integrate PDFs in your web app.

Also, it appears to be feature-rich and yet easy to use for simple use cases.

Re:Sol: Open-source Alfred/Raycast alternative for macOS on Tuesday August 09, 2022 @07:19PM (#32405905)
If you connect raycast with your calendar, you can view your schedule from within raycast.

If there is an upcoming meeting with a zoom/teams/<call app> link attached, you can join by pressing enter.

Never had to look for a meeting link again.

I'm not sure if Alfred has this as well, but nevertheless, i just love this feature

Tried it, wouldn't recommend it. The file data would be stored in the browser tab's memory. It usually ends in crashes.
Re:Why long-term plans don't work and how to fix them on Monday July 18, 2022 @04:27AM (#32135891)
Deadlines feel like they are mainly useful to induce stress and urgency. The stress and urgency being useful (or important) is another matter.

In a perfect world (for me, from my point of view), there are no deadlines, but rather short plans and enough understanding of the plan to decide whether doing something specific is useful or a hindrance (and to what degree) for executing that plan.

But alas, deadlines are easier to decide on.

The link feels irrelevant, because it is not related to vim and text editing. Or does it?
Re:Show HN: Copy React code from any site on Saturday July 09, 2022 @05:06PM (#32039304)
I feel like "availability to copy" or "inspectable" is not a reason to abandon Copyright protection.

After all, it is currently the nature of web software that the source code must be available (for browsers to interpret)

table.fatitem,td.default{max-width:90ch}body,body>center>table,input,textarea{background-color:#262626!important}body>center>table>tbody>tr:first-child>td{background-color:#f60!important}.c00,.c00 a:link,a>u,a[href="http://www.ycombinator.com/apply/"],a[href="https://www.ycom... font,span.comment font a:link,span.yclinks a:link,table.fatitem tbody tr td,td.title a:link,td:nth-child(2):not(.subtext)>a:link,textarea,u a:link{color:#ccc!important;font-size:15px}table.fatitem tbody tr:nth-child(n+3):not(:last-child) td{color:#bbb!important}.admin td{color:#aaa!important}table.fatitem{margin:auto}table.comment-tree{margin:auto;border-left:2px solid #444}input,textarea{border:1px solid #828282!important}a.togg.clicky{margin-left:4px;margin-right:4px;font-size:16px}
> if HN is still one of the best places to communicate and post serious matters

citation needed.

Other than that, I would love to see a bit better semantic markup, not because I'm some sort of HTML purist who demands everything to be pure, but because it would make it easier to style with CSS (which I did, to add dark mode, bigger font sizes and max widths). Currently, it's nested tables with occasional classes and ids, but not for everything.

The only cookie I see on hackernews is for authentication, so I don't think a cookie banner is neccessary (though I might be misinformed)
Re:Angular without SSR is faster than Next.js with SSR on Tuesday June 28, 2022 @04:18AM (#31905416)
I'd be more interested in why you think DX in Angular is great (especially with Nx).
In another tweet[0], Jen Simmons asks the question:

> Do we really want to live in a 95% Chromium browser world? That would be a horrible future for the web. We need more voices, not fewer.

It's difficult to become a voice for Safari, if Safari is hiding behind a hefty price tag.

Debugging Safari issues on Linux or Windows machines make it easy to grow a disliking for the browser. There are ways to do it effectively, of course, but no simple or pleasant ones.

[0]: https://twitter.com/jensimmons/status/1490747578526404608

Re:Web3 is not going to change the world on Thursday February 03, 2022 @01:24PM (#30196421)
Is there any need for the Blockchain for that? Like... Setup a server and host the content. I can't imagine it being simpler than that.

Why would I engage in the dance of crypto just to host some content no one will read anyway?

What's IPFS?

Re:Web3 is not going to change the world on Thursday February 03, 2022 @12:09PM (#30195145)
It is unfortunate that the one useful thing I have found about blockchain to be true is that it is great for gambling
Re:Web3 is not going to change the world on Thursday February 03, 2022 @11:22AM (#30194387)
But over long enough time it _must_ be somewhere where somebody can provide Computational power and evergrowing storage capacity, right?

So.. not anywhere.

Or can the data be available in a highly fragmented fashion _and_ still be useful? I just can't imagine any content system that does not end up being centralized or highly inconvenient.

Re:Web3 is not going to change the world on Thursday February 03, 2022 @09:25AM (#30192757)
They don't enjoy participating in the space, they enjoy avatars and art.

And probably spending an absurd amount of money for more or less Auto-Generated art?

Re:Web3 is not going to change the world on Thursday February 03, 2022 @09:19AM (#30192693)
But the infrastructure must be <somewhere>, right?
Re:Simple.css – A classless CSS framework on Saturday January 15, 2022 @06:37AM (#29945628)
> Bonus points if we agree onto some standard set for variable names

They try: https://www.w3.org/community/design-tokens/

Re:Github Copilot Wants to Play Chess Instead of Code on Thursday January 13, 2022 @09:59AM (#29921401)
I think IntelliJ generally has the feature to autocomplete code in markdown code blocks based on the current project. So that in itself is not a Copilot feature.

It's really useful because it will even understand Angular2 codebases and autocomplete custom components in html snippets.

As a current developer, what pisses me off about anyone is sweeping statements like this :(

Older »