Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kolme
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
kolme
2y ago
There was a great refactoring chance in the example where the cache was removed. That is, extracting the caching logic from the API call logic. Caching could have been a more generic function that wraps the API call function. That way each
32.
▲
by
kolme
2y ago
A refactor does not change behavior, period . By definition. If something changed, it's not a refactor. It's a change. Like in the example where the caching was removed: NOT a refactor. Ore where the timeouts for the requests wer
33.
▲
by
kolme
2y ago
> every cycle creates an anonymous function No, that's not how it works. The function is evaluated once before the call and passed as an argument, then internally reused. Also, you're microptimizing. Prioritizing supposed p
34.
▲
by
kolme
2y ago
That's great advice, thanks! What are you using to scan the packages/images if I may ask?
35.
▲
by
kolme
2y ago
Nice, I love lit-html(1)! I wanted to add my two pennies to the discussion. You are of correct that with that approach you lose the declarativeness but sometimes you don't need that, if the thing is mostly static. I went this road many
36.
▲
by
kolme
2y ago
Well, I don't know. If we look at the body counts, I think being in the receiving end of getting democratized by the USA is actually worse. But this is "whataboutism" and not addressing the point of my comment. The actual poi
37.
▲
by
kolme
2y ago
Floats are not weird. They were just utterly misused, using them for layout is an ugly hack. They were conceived to float text (or other elements) around static elements. Think text floating around a picture, like this: https://t
38.
▲
by
kolme
2y ago
I wish you were right about this. But then again, why does the US risk going to war with China over Taiwan? You think it's because democracy, liberty and or human rights? It is very obviously strong geopolitical interest.
39.
▲
by
kolme
2y ago
Pax Americana is a farce. There was always war going on and America was always involved, and for their own imperial interests. This narrative that the US are the good guys and they are the police of the world is the propaganda of the empire
40.
▲
by
kolme
2y ago
> Don't you think that people in China just want to live just like people in the US? Honestly, I don't think so. And even if they did, they can't do anything about it. Complaining will only give them a bad social score whi
41.
▲
by
kolme
2y ago
> And one of the things to know about war is that the offense always has the advantage I'm no military expert, but wasn't it exactly the opposite? The attacking army needs to be bigger than the defending army and will suffer wa
42.
▲
by
kolme
2y ago
> So what is the real solution? Engineers need meaningful ownership. If engineers could acquire enough ownership to represent a significant percentage of the company, they could demand to be part of decision making. That rings a bell, wh
43.
▲
by
kolme
2y ago
This looks great! I've been wanting to drop the Swipe keyboard ever since I saw sneaky ads on it (like me typing "Google Maps" and getting "Bing Maps" as a "suggestion").
44.
▲
by
kolme
2y ago
Oh, you know them as well.
45.
▲
by
kolme
2y ago
Fun fact: nextjs was inspired by PHP and can generate static pages that you can throw into a web server. Another technology that kind of covers the use cases of the article (the mildly dynamic pages) would be htmx and friends.
46.
▲
by
kolme
2y ago
Hey. Webdev here ;-) It's the other way around: after every optimization we have more "budget" to spend. More code, more bloat that we can get away with.
47.
▲
by
kolme
2y ago
That's rad! What libraries are you using?
48.
▲
by
kolme
2y ago
Source code: +: https://github.com/clojure/clojure/blob/clojure-1.11.1/src/c... *: https://github.com/clojure/clojure/blob/clojure-1.11.1/src/c... Docs: +:
49.
▲
by
kolme
2y ago
Babashka scripts are interpreted, the babashka binary itself is compiled with GraalVM. But: you can also build regular Clojure programs using GraalVM and create a fast-starting binary.
50.
▲
by
kolme
2y ago
+ is a function, there are no operators in Clojure. That allows for some nifty tricks like: (reduce + [1 2 3]) ; returns 6
51.
▲
by
kolme
2y ago
I'm quite proficient in German and English, but still translating is astonishing hard, even into my mother tongue Spanish. The translation always sounds weird. I'm always in awe at great translations. When I read translated texts
52.
▲
by
kolme
2y ago
Not really, all the rendering is done in the server. All HTMX is doing is fetching HTML snippets from the backend and patching them onto the DOM.
53.
▲
by
kolme
3y ago
And might be wrong.
54.
▲
by
kolme
3y ago
Localisation means in this context the translations, date and number formatting, currency, etc. So no, that doesn't change depending on where you are.
55.
▲
by
kolme
3y ago
> It seems like a privacy/tracking issue, or am I offbase? It absolutely is, and if you do include them you have to show a consent popup in the EU.
56.
▲
by
kolme
3y ago
I guess they mean UIs built using XUL, which is a XML-based declarative user interface markup language. Kind of an HTML variant for desktop UIs. https://en.m.wikipedia.org/wiki/XUL
57.
▲
by
kolme
3y ago
There's also star wars over telnet: https://itsfoss.com/star-wars-linux/
58.
▲
by
kolme
3y ago
Tmux is more keyboard oriented, I guess. For example: I can copy and paste from one pane to another without touching the mouse, which is something I think is not possible with Konsole. (I haven't used Konsole or KDE for many years, so
59.
▲
by
kolme
3y ago
Other commenter mentioned Hy, but what about Clojure? It is a lisp on top of Java, and all of its variants (Clojurescript -> Javascript, etc). Then there's Fennel (Lua) and others I can't remember right now.
60.
▲
by
kolme
3y ago
The Hollywood writers had some very good suggestions!
More ›