HNHacker News
TopNewBestAskShowJobs

emi2k01

138 karma · joined February 5, 2021

github.com/emi2k01
submissionscomments
emi2k01··on Show HN: Roadmap – A Personal Growth Game for Social Anxiety
On Firefox with uBlock Origin it doesn't work.

I gave it a quick look and it seems like Google Analytics is hijacking the `click` event in the `<a>` tag and it stops working because uBO blocked GA.

emi2k01··on Making Hard Things Easy
> Next match is just `/<enter>`.

You can also press `n`

emi2k01··on Running Stable Diffusion XL 1.0 in 298MB of RAM
Twice as long. As fast as the original would be "0x slower" or "1x as fast".

People should just use duration instead of speed as you did at the end: "takes twice as long", "takes 1/3 of the time..."

emi2k01··on Show HN: Tome, aka Tom's Editor – a new command-line text editor
Relevant: https://www.leonerd.org.uk/hacks/fixterms/
emi2k01··on Should I Rust or Should I Go?
Rust's compile times are worse than Go but are still way better than people make it to be.

Here are some examples:

---

Rust Analyzer:

Clean build: 31.02s

Incremental build: 3.07s (Added a `println!` in a level-2 dependency in the dependency graph)

SLOC: 306,467

SLOC of dependencies: ~879,304 (After removing `win*` packages which make up for another 1.3M)

---

Zola:

Clean build: 24.58s

Incremental build: 1.34s (Added a `println!` in a level-2 dependency in the dependency graph)

SLOC: 17,233

SLOC of dependencies: ~2,087,781 (After removing `win*` packages which make up for another 1.3M)

Obviously, not all source code gets compiled due to conditional compilation but it makes for a good approximate if you only take into account 2/3 of it.

---

For comparison with Zig by building ZLS:

Clean build: 20.13s

Incremental build: 10.27s (I believe this builds the ZLS package again from scratch so not really incremental)

SLOC: 45,806

SLOC of dependencies: I don't know how to get this.

---

This was on a Ryzen 5600x

emi2k01··on [dead]
This just seems to be a problem with firefox or ipv6 (having problems lately), I'm not sure, sigh. Everything's fine on chromium land
emi2k01··on [dead]
Very interesting to see how many websites weren't loading due to jsDelivr.
emi2k01··on Learn AutoHotKey by stealing my scripts
I find it hard too and I've plenty of experience programming.

The alien syntax, the incompatibilities between versions, the outdated information on the internet made it difficult to learn.

I'd recommend to just use python with a library like pyautogui and similar.

emi2k01··on Tabs are objectively better than spaces
I was writing a comment about why I think spaces are better, specially with auto-formatting but now...

I feel like tabs could be better if you let the auto-formatter do its job by setting the tab width to 4 spaces. That should be good enough so that people with a tab width of 2 or 8 don't see the code lines neither very short nor very long. I also feel like most people who use spaces are good with a tab width of 4?

I also would not take into account tab widths not in [2, 8].

emi2k01··on Unchecked Java: Say goodbye to checked exceptions
I'm not sure what they mean by adding exceptions.

AFAIK, the only proposal related to exceptions is adding a `try` block that would scope the `?` operator to that block instead of the current function.

emi2k01··on A single line of code made a 24-core server slower than a laptop (2021)
`cargo-flamegraph` uses a port of FlameGraph written in Rust and handles the "capture" and "fold" steps so I'd say it's at least a bit easier
emi2k01··on UseHooks – A Collection of Server Component Safe React Hooks
If you have state that changes too quickly (like the value of an input field), then you can use `useDebounce` to derive a state that only changes every `n` milliseconds.
emi2k01··on Clock
I just happened to use it at 7:41 and there's no quotes for that time according to the JSON files in the other comment. It instead gave me a quote that indicated it was 2:34
emi2k01··on Codeberg – Fast open source alternative to GitHub
You can put your search on "quotes" and it will look for an exact match. Github's search has improved a lot recently
emi2k01··on Codeberg – Fast open source alternative to GitHub
Are you being sarcastic?

If not, GitHub recently updated their search feature and it's pretty good.

https://github.com/search/advanced

https://docs.github.com/en/search-github/github-code-search/...

emi2k01··on How to speed up the Rust compiler in October 2022
Yes, I guess?: Cranelift, which is a LLVM-like library written in Rust. This could be used for faster debug builds in the future. There's a Rust backend using Cranelift [2].

If you mean addressing the poor quality of LLVM IR directly, then I don't know.

[1]: https://github.com/bytecodealliance/wasmtime/blob/main/crane... [2]: https://github.com/bjorn3/rustc_codegen_cranelift

emi2k01··on Show HN: Colorvote.io – ranking all sRGB web colors by popularity
> dark mode extensions These change the css colors. It's not referring to the OS color scheme preference
emi2k01··on I draw figures for my mathematical lecture notes using Inkscape (2019)
You can select the label and the arrow and press control+G to create a group.

You can also do the opposite, pin the arrow to the label so that if the label moves the arrow follows: double click the arrow to see the path points, select an end point and move it on top of the label until you see the bounding box of the label.

emi2k01··on Ask HN: Online comunities to discuss WIP programming projects (mine and others)?
Thanks! It looks interesting. Seems to lean more to the entrepreneurship side but I didn't explore the site in depth.

My project leans more to the `hacker` side (ironic, huh). It's closer to a programming tool than a product I'd sell. I wonder if it'd fit there.

emi2k01··on Question Does Not Exist
Machine-translated spanish version of StackOverflow by the same company who did this website. Some kind of easter-egg marketing
emi2k01··on Show HN: HN Avatars in 357 bytes
It almost looks like a minimalist wolverine! [1]

[1]: https://i.pinimg.com/736x/2b/e7/cb/2be7cb420de47ac68e1345f4a...

emi2k01··on WebGPU – All of the cores, none of the canvas
I'm on Windows 11 with a Radeon RX570 8gb and it runs fine under Edge.

On Firefox it's way laggier but still usable.

emi2k01··on Sleep technique used by Salvador Dalí works
Dreaming of code is something that happens to me very frequently when I'm working on difficult problems and only the first few times was cool.

Now, when I dream of code, I can hear my inner self saying "no, please! I actually want to rest" because most of the times I feel like I'm in a loop exploring the same solutions over and over.

I've had to get out of bed and do something else so I can go back to sleep without having one of those weird dreams.

emi2k01··on The brusque Mr. Fix-It for Mexico City’s accordions
It's sound very... irish. I'm surprised how different it sounds to what I've listened all my life in mexican music. Definitely an underrated instrument.

There was a man from my city who made me (and millions of people more) like the accordion. He was called "El Rebelde del Acordeón" ("The Rebel of Accordion"). There are no people who won't think of him when the accordion is mentioned in Mexico. Here are some videos

https://www.youtube.com/watch?v=z2c5xCmLiAE

https://youtu.be/AItd3iLBvaA

https://youtu.be/9jy0DCE0BfM?t=115

emi2k01··on Project Euler
Project Euler explicitly says this [1]:

> I learned so much solving problem XXX, so is it okay to publish my solution elsewhere?

> It appears that you have answered your own question. There is nothing quite like that "Aha!" moment when you finally beat a problem which you have been working on for some time. It is often through the best of intentions in wishing to share our insights so that others can enjoy that moment too. Sadly, that will rarely be the case for your readers. Real learning is an active process and seeing how it is done is a long way from experiencing that epiphany of discovery. Please do not deny others what you have so richly valued yourself.

> However, the rule about sharing solutions outside of Project Euler does not apply to the first one-hundred problems, as long as any discussion clearly aims to instruct methods, not just provide answers, and does not directly threaten to undermine the enjoyment of solving later problems. Problems 1 to 100 provide a wealth of helpful introductory teaching material and if you are able to respect our requirements, then we give permission for those problems and their solutions to be discussed elsewhere.

I'd advise anyone who wants to solve the first 100 problems against looking their solutions online. They are simple enough to not require you to research complex topics to solve them as later problems do.

I'd recommend Rosetta Code [2] if someone wants to have a look at a programming language in action.

[1] https://projecteuler.net/about

[2] http://www.rosettacode.org/wiki/Category:Programming_Languag...

emi2k01··on Ruby vs. Python comes down to the for loop
May I know what GP means? It's the first time I see it.
emi2k01··on Ask HN: How do I get fit and healthy as a software engineer?
> Coach to 5k

It's Couch to 5k. AKA C25k.

I only point it out because the name is what made me try it out!

emi2k01··on Functional programming is not popular because it is weird (2016)
Rust just standardized `ControlFlow` which would let you pass equivalents of `break` and `continue` as values.

    x.try_for_each(|y| {...; ControlFlow::Break} )
emi2k01··on MangaDex infrastructure overview
> 12 web servers with separate MySQL instances local to each sharded on primary key IDs.

I don't understand this part. Hopefully you can clarify this to me.

If you're sharding by primary key, doesn't that mean that there's a high chance that the shard in your local DB instance won't have the data the web server is requesting?

I'm not familiar with DB management.

emi2k01··on You want enabling CSS selectors, not disabling ones
May I know what are the other two? I read Every Layout for the past hour and it's good so I'd like to read something else of similar quality in the future.

Also, how did you come across those books? I just found out about Every Layout in this thread. I'm not a web developer so I don't know if it was advertised in a web dev forum or what.

← PreviousPage 2 of 3Next →