Better HN
topnewbestaskshowjobs
Log inSign up

acdibble

36 karma · joined Apr 20, 2020 (6y ago) · 20 submissions

Submissions

comment 2y ago · link · parent

https://archive.ph/SOTUY

comment 3y ago · link · parent

It’ll bundle the entire V8 engine. You can expect probably close to 80mb for a hello world app.

comment 3y ago · link · parent

This is possible with type predicates, example: https://www.typescriptlang.org/play?#code/C4TwDgpgBAYg9nKBeK...

docs: https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...

comment 3y ago · link · parent

HexFiend (https://hexfiend.com/) works well for files of enormous size but is only a hex editor.

5.

Use Universal Clipboard to copy and paste between your Apple devices(support.apple.com ↗)

2 points · by acdibble · 3y ago · discuss

comment 3y ago · link · parent

> Make ESLint type-aware. This seems to be something we keep banging our heads against -- we just don't have any way of knowing what type of value a variable contains. If we knew that, we'd be able to catch a lot more errors. Maybe we could find a way to consume TypeScript data for this?

An ESLint plugin manages to do this well[1]. Would be nice to have this functionality built in natively although you do take a performance hit because you have to run the compiler.

[1] https://typescript-eslint.io/docs/linting/typed-linting

comment 4y ago · link · parent

Also known as "well-known symbols".

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

comment 4y ago · link · parent

Just this past weekend, I created a service for transferring files that is built on websockets (https://qr.dibble.codes / https://github.com/acdibble/qr-transfer). It's still rough and very MVP, but it's functional.

My use case was I wanted to transfer a PDF to an Android-based tablet but in the moment didn't want to log into my email. I couldn't think of any quick, easy, and cross-platform solutions so I decided to write the service.

It's built on socket.io which is a godsend for websockets because it automatically handles so much grunt work and your app just works.

comment 4y ago · link · parent

This looks neat. Am I understanding it correctly that it's written in pseudocode?

comment 5y ago · link · parent

Probably just a typo due to the topic of the thread, but esbuild is written in Go.

comment 5y ago · link · parent

Deno linter: https://deno.land/manual/tools/linter

Deno format: https://deno.land/manual/tools/formatter

Deno bundle: https://deno.land/manual/tools/bundler

Not sure about polyfilling, but it might leverage TSC for that?

Added bonus is Deno compile, for creating standalone executables: https://deno.land/manual/tools/compiler

comment 5y ago · link · parent

Elixir includes IO.inspect[1], which prints a value and then returns it. It makes it easy to insert this function into a pipeline without disrupting the existing logic[2].

[1] https://hexdocs.pm/elixir/1.12/IO.html#inspect/2

[2] https://elixir-lang.org/getting-started/debugging.html

comment 5y ago · link · parent

I host a pet project Slack bot on a Digital Ocean droplet. You can compile an Elixir app into an executable that treeshakes the BEAM. I can't speak to memory usage, but deployment for me is as easy as compiling an executable and putting it on the server.

comment 5y ago · link · parent

If you use fractional scaling on Wayland, Chromium-based applications will render blurry. Obviously it's a Chromium issue but it's been around for a while and is a bad experience.

comment 6y ago · link · parent

If there is only one process running this GenServer, there will only be one instance of the job in the system.

An BEAM process, and therefore a GenServer, has an atomic message queue built in. Only the process itself can pop messages out of its queue, so there is no need for locking. It is not possible to get messages out of the queue concurrently. Messages can be processed concurrently, but that's after they've already been removed from the queue.

comment 6y ago · link · parent

Is it essentially nand2tetris in game format? I tried making my way through that a couple times but maybe some gamification is just what I needed.

comment 6y ago · link · parent

It's not just JavaScript with that issue... https://0.30000000000000004.com/

comment 6y ago · link · parent

Also inspired by the same post, I set up a TIL repo. I went with a shell script where you pass the category and the filename and it creates the file and recreates the README: https://github.com/acdibble/til/blob/master/create_til.sh