Better HN
topnewbestaskshowjobs
Log inSign up

carlosneves

27 karma · joined Apr 24, 2020 (6y ago) · 28 submissions

Submissions

comment 1w ago · link · parent

> We shape our tools and thereafter our tools shape us.

https://quoteinvestigator.com/2016/06/26/shape/

This concern was even back then with Socrates and the invention of writing.

McLuhan offers the view that with each new tool/medium a transformation process kicks in that enhances some traits and obsolesces others.

https://en.wikipedia.org/wiki/Tetrad_of_media_effects

I feel like the engineers of the past century were much sharper overall compared to today. I don't have any evidences to back this up though.

comment 1w ago · link · parent

Was suspecting the same thing. But I think, because C strings are null-terminated, they allow reading up to 1 byte after its end.

In your example, "%" would cause switch ('\0') which would fall in the default case.

comment 3mo ago · link · parent

Props to D for having such a simple implementation of fexprs[1].

The downside compared to macros I think is that, as argument expressions become lambdas, it becomes harder to manipulate them. Check the cond example which needs two fexprs, whereas one macro could do it.

Not sure about D, but if it were lisp, even lambdas could be manipulated as lists. Macro args not having the lambda wrapping just seems simpler.

[1] https://en.wikipedia.org/wiki/Fexpr

comment 3mo ago · link · parent

That's exactly the situation I'm in... :crying-laughing:

The fix is merged, but won't deploy... it's been hours

Thankfully it's a batch job, and isn't interrupting production ATM

comment 4mo ago · link · parent

Thanks for linking to Fexpr's. I've thinking about "functions with lazily evaluated arguments" recently, and trying to understand how they are different from macros. So I was basically thinking about fexprs.

I have some reading to do, but overall it seems like macros are favored instead of fexprs. Macros completely avoid some environment handling issues.

comment 8mo ago · link · parent

An `--ignore-file=` flag would be nice I guess:

--ignore-file=.ignore

--ignore-file=.gitignore

--ignore-file=.dockerignore

--ignore-file=.npmignore

etc

but then, assuming all those share the same "ignore file syntax/grammar"...

comment 8mo ago · link · parent

This concept of "machine worship" reminds me of E. M. Forster's The Machine Stops.

Is it possible for a tech-oriented ideal to escape "machine worship"?

As we strive to refine our "machines" ever further, and our "machines" become ever more capable, where does that lead us?

comment 10mo ago · link · parent

https://carlosn.com.br/

comment 11mo ago · link · parent

You can always ask it to nudge you in the right direction instead of giving the solution right away. I suspect this way of using it is not very popular though.

This is not a new problem I think. How do you use Google, translator, (even dictionaries!), etc without "degenerating" your own abilities?

If you're not careful and always rely on them as a crutch, they'll remain just that; without actually "incrementing" you.

I think this is a very good question. How should we actually be using our tools such that we're not degenerating, but growing instead?

comment 1y ago · link · parent

And oftentimes some endpoints simply hit the max URL length limit and need a proper body. I thought we ought to already be using this method. Seems quite fitting for fulfilling GETs with bodies.

11.

A few patterns with Truchet tiles(carlosn.com.br ↗)

2 points · by carlosneves · 1y ago · discuss

comment 1y ago · link · parent

I was going to say that. Gratitude to the creators of fish shell. The history-based rank is immediate as you type. Lately I've simply done:

abbr --add c cd

And then the "most used paths" are just present in the history filtered by the prefix I already typed.

comment 1y ago · link · parent

For awareness, if you want to build a SSG/SSR frontend, there's also [Astro](https://astro.build/)

It lets you ship client islands to the client, which AFAIK is essentially partial hydration.

14.

Notes on Rewriting JSX as Astro(carlosn.com.br ↗)

2 points · by carlosneves · 1y ago · discuss

comment 1y ago · link · parent

> When using npm, all dependencies for a project are installed in a single node_modules directory. This means that if two packages depend on different versions of the same package, the one that is installed last will be used, which can lead to compatibility issues. This is known as "dependency hell" and can make it difficult to manage the dependencies of a project.

> pnpm's symlink feature addresses this problem by allowing different versions of the same package to be installed side-by-side, and linking them to their dependents through symlinks. This helps to ensure that the correct version of a package is used for each dependent, reducing the chances of compatibility issues and making it easier to manage dependencies.

From the last issue linked in the PR (https://github.com/oven-sh/bun/issues/1760)

comment 1y ago · link · parent

Empty is not the same as succinct & straight to the points. I'd say strong title, succint content. Each of the points invites as much thought as you can give it.

comment 1y ago · link · parent

I think he's proposing a fix for the regex in the title.

/(ab?)using/ matches:

- ausing

- abusing

while /(ab)?using/ matches:

- using

- abusing

comment 1y ago · link · parent

That was a nice read. Do you recommend any books for one who wants to get into queue theory?

19.

Writing static websites with Vite and React(blog.carlosn.com.br ↗)

3 points · by carlosneves · 1y ago · discuss

comment 1y ago · link · parent

Greatly appreciate these tips! I'll apply most of them, especially the diff ones.

comment 1y ago · link · parent

This is awesome! It's a great aid in understanding the protocol.

comment 2y ago · link · parent

There seems to be a trade-off between letting the program run and halting it with an error in these cases. Sometimes letting it keep going is useful, sometimes not.

But overall, having dedicated "error modes" seems to be the preferred route.

Thanks for the reply!

I wasn't aware of the VAX series of computers, successors of the PDPs. I knew Unix was first written on a PDP-11. Also wasn't aware of the hardware requirements for floating points.

23.

Ask HN: What should an undefined variable evaluate to?

1 points · by carlosneves · 2y ago · 2 comments

comment 2y ago · link · parent

One of the long-standing critiques I've heard from Alan Kay I think is that smartphone users can't use smartphones to create software for smartphones.

There's no officially supported way of doing that I mean. You're required to have a desktop or laptop computer (keyboard & mouse) that runs XCode/Android Studio...

comment 2y ago · link · parent

I actually prefer to think in terms of the broader sense of symbiosis (including all the types of symbiosis you mentioned).

Sure we want the way we relate to technology to be mutualistic, but in reality we observe many instances of the other kinds of relationships.

26.

Ask HN: Could an ML model do a good job rendering in a game loop?

1 points · by carlosneves · 5y ago · discuss

comment 5y ago · link · parent

Do you remember more specifically what made you give up on Linux?

individual control/power/freedom + simplicity/ease-of-use... is it possible?

I'd recommend Linux anytime, all the time; but I also have the time and patience to deal with its rough edges; of which there are many. Basically, you have to operate assuming nothing will work out of the box.

comment 5y ago · link · parent

cmd+esc -> execute this "escape" script

The options passed to dmenu/rofi: (lock exit-i3 poweroff reboot suspend)

Shoutout to Oliver Kraitschy (http://okraits.de) who originally wrote the script.

The script: https://github.com/carlosneves0/dotfiles/blob/main/.bin/esca...