HN user

egnehots

841 karma
Posts26
Comments74
View on HN
www.the-sourdough-framework.com 1y ago

The Sourdough Framework

egnehots
2pts1
github.com 1y ago

Intuitive desktop API client, alternative to Postman and Insomnia

egnehots
3pts0
ai.meta.com 1y ago

Quantized Llama models with increased speed and a reduced memory footprint

egnehots
508pts122
github.com 1y ago

Ichigo: Local real-time voice AI

egnehots
217pts40
arstechnica.com 2y ago

Turn almost any bike into an e-bike with the Clip

egnehots
7pts1
www.pinecone.io 2y ago

Hnsw Is Not Enough

egnehots
2pts0
blog.sdf.com 2y ago

Fast Development in Rust, Part One

egnehots
3pts0
ella-diffusion.github.io 2y ago

Ella: Equip Diffusion Models with LLM for Enhanced Semantic Alignment

egnehots
5pts0
github.com 2y ago

Luminal: Fast ML in Rust through graph compilation

egnehots
2pts0
kraft.cloud 2y ago

Why the Future of Cloud Deployments Is Unikernels (2023)

egnehots
12pts5
blog.yoshuawuyts.com 2y ago

Extending Rust's Effect System

egnehots
151pts24
pytorch.org 2y ago

PyTorch 2.2: FlashAttention-v2 integration, AOTInductor

egnehots
15pts1
www.crunchydata.com 2y ago

One PID to Lock Them All: Finding the Source of the Lock in Postgres

egnehots
2pts0
dkopi.github.io 2y ago

Vera: Vector-Based Random Matrix Adaptation

egnehots
1pts3
stability.ai 2y ago

Stable Code 3B: Coding on the Edge

egnehots
315pts140
sillycross.github.io 2y ago

Debugging a Bit-Flip Error

egnehots
1pts0
arstechnica.com 2y ago

Amazon lays off 500 Twitch employees, hundreds more at MGM and Prime Video

egnehots
46pts57
getcode.substack.com 2y ago

Beyond Backpropagation, Automatic Differentiation in Rust

egnehots
4pts0
acko.net 3y ago

Making code reusable is not an art, it's a job

egnehots
1pts0
arstechnica.com 5y ago

Nvidia RTX 3080 Ti is a powerhouse but good luck finding it at $1,199 MSRP

egnehots
2pts1
arstechnica.com 6y ago

How fighting games use delay-based and rollback netcode

egnehots
3pts0
hackernoon.com 7y ago

Synchrony Is a Myth

egnehots
1pts0
arstechnica.com 7y ago

AT&T decides 4G is now “5G”

egnehots
4pts0
www.anandtech.com 7y ago

Year in Review 2018: CPUs

egnehots
5pts0
www.anandtech.com 7y ago

Year in Review 2018: GPUs

egnehots
23pts7
www.anandtech.com 7y ago

Analyzing Core I9-9900K Performance with Spectre/Meltdown Hardware Mitigations

egnehots
2pts0

From a customer perspective, I think there should be an option:

- prioritize security: get patchs ASAP

- prioritize availability: get patchs after a cooldown period

Because ultimately, it's a tradeoff that cannot be handled by Cloudflare. It depends on your business, your threat model.

I don't think so, pdf.js is able to render a pdf content.

Which is different from extracting "text". Text in PDF can be encoded in many ways, in an actual image, in shapes (think, segments, quadratic bezier curves...), or in an XML format (really easy to process).

PDF viewers are able to render text, like a printer would work, processing command to show pixels on the screen at the end.

But often, paragraph, text layout, columns, tables are lost in the process. Even though, you see them, so close yet so far. That is why AI is quite strong at this task.

this could be used as an incredible low bitrate codec for some streaming use cases. (video conferencing/podcasts on <3G for ex, just use some keyframes + the audio).

If you understand how LLMs work, you should disregard tests such as:

- How many 'r's are in Strawberry?

- Finding the fourth word of the response

These tests are at odds with the tokenizer and next-word prediction model. They do not accurately represent an LLM's capabilities. It's akin to asking a blind person to identify colors.

here is their Elevator Pitch:

Minor rant incoming: Something's not working? Maybe a service is down. docker-compose ps. Yep, it's that microservice that's still buggy. No issue, I'll just restart it: docker-compose restart. Okay now let's try again. Oh wait the issue is still there. Hmm. docker-compose ps. Right so the service must have just stopped immediately after starting. I probably would have known that if I was reading the log stream, but there is a lot of clutter in there from other services. I could get the logs for just that one service with docker compose logs --follow myservice but that dies everytime the service dies so I'd need to run that command every time I restart the service. I could alternatively run docker-compose up myservice and in that terminal window if the service is down I could just up it again, but now I've got one service hogging a terminal window even after I no longer care about its logs. I guess when I want to reclaim the terminal realestate I can do ctrl+P,Q, but... wait, that's not working for some reason. Should I use ctrl+C instead? I can't remember if that closes the foreground process or kills the actual service.

What a headache!

Memorising docker commands is hard. Memorising aliases is slightly less hard. Keeping track of your containers across multiple terminal windows is near impossible. What if you had all the information you needed in one terminal window with every common command living one keypress away (and the ability to add custom commands as well). Lazydocker's goal is to make that dream a reality.

yeah, I wonder if there's room for a different networking abstraction that could address most of complex orgs networking issues, I, for sure, don't think that we should still think about cidr range limitations when making networks, for ex.

that said, I'm not sure the tailscale approach scales well in typical modern corporate environments, where you've got a small army of junior devops often overlooking security or cost implications (don't forget about egress costs!).

the traditional, meticulous approach of segmenting networks into VPCs, subnets, etc., with careful planning of auth, firewall rules and routes, helps limit the blast radius of mistakes.

tailscale's networking & security model feels simple and flat, which is great for usability, but it lacks the comforting "defense in depth" that will be asked in most big corps.

How do I check how many seconds the replica is lagging behind the master?

Use PostgreSQL administrative functions, specifically: pg_last_xact_replay_timestamp. (https://www.postgresql.org/docs/current/functions-admin.html...)

How would I monitor the replica? A simple cron task that pings a health check if everything is OK (lag is < x) would be a good start.

There are many solutions, highly dependent on your context and the scale of your business. Options range from simple cron jobs with email alerts to more sophisticated setups like ELK/EFK, or managed services such as Datadog.

How do I failover to the replica if the primary goes down?

Should I handle failover automatically or manually?

Do I need two replicas to avoid a split-brain scenario? My head hurts already.

While it may be tempting to automate failover with a tool, I strongly recommend manual failover if your business can tolerate some downtime.

This approach allows you to understand why the primary went down, preventing the same issue from affecting the replica. It's often not trivial to restore the primary or convert it to a replica. YOU become the concensus algorithm, the observer, deciding which instance become the primary.

Two scenarios to avoid:

* Falling back to a replica only for it to fail (e.g., due to a full disk).

* Successfully switching over so transparently that you will not notice that you're now running without a replica.

After a failover (whether automatic or manual), how do I reconfigure the primary to be the primary again, and the replica to be the replica?

It's easier to switch roles and configure the former primary as the new replica. It will then automatically synchronize with the current primary.

You might also want to use the replica for:

* Some read-only queries. However, for long-running queries, you will need to configure the replication delay to avoid timeouts.

* Backups or point-in-time recovery.

If you manage yourself a database, I strongly recommand to gain confidence first in your backups and your ability to restore them quickly. Then you can play with replication, they are tons of little settings to configure (async for perf, large enough wall size to restore quickly, ...).

It's not that hard, but you want to have the confidence and the procedure written down before you have to do it in a production incident.

Some points resonate with me:

People don't want "to have to play Chess against the compiler"

Things that are easy to express in other languages become very hard in Rust due to the languages constraints on ownership, async...

Rust has arrived at the complexity of Haskell and C++, each year requiring more knowledge to keep up with the latest and greatest.

It's indeed hard to keep up.

Async is highly problematic.

Yes, more complexity, more fragmentation and feel like another language.

But one point feels unfair:

the excellent tooling and dev team for Rust [..] pulls the wool over people’s eyes and convinces them that this is a good language that is simple and worth investing in.

What? No. The main appeal was the safety. It's still a distinctive feature of Rust. To almost eliminate a whole class of safety issues. It has been proven by several lengthy reports such as https://security.googleblog.com/2024/09/eliminating-memory-s....

They are many projects for which the reliability and efficiency are worth the trouble.

As mentioned in the article, it's a good idea to consider this when creating a new table, since it's essentially a free optimization. However, it's probably not worth the hassle of reordering a production table for that.

Disk is cheap, memory is plentiful, but your time is expensive, etc.

One thing to keep in mind, though, is that while you often have plenty of disk space, RAM is still relatively expensive. It's also divided into many smaller buffers, such as working memory and shared buffers, which are not that large. These optimizations help to fit more data into cache.

However, what the article said about alignment being important for indexes is somewhat misleading. Reordering an index field is not the same as reordering columns in a table. Beside having to rewrite queries, it also changes the access pattern and the time required to access the data, which is often much more significant than the space saved. Indexes are, by nature, a tradeoff where you give up space to gain time, so this mindset doesn't really apply there.

well it's human nature to struggle with collective action when the risks are unclear, vague and not shared. stakeholders are juggling immediate, tangible concerns, like climate change, economic stability, and political issues, making it tough to justify moving AI up the priority list.

I think that you have made the right decision.

One of the most common and high-impact failure mode is crashing when parsing a leap second that is represented as "23:59:60".

Jiff is able to parse leap seconds, and beyond that, I doubt that there are many scenarios where you care about leap seconds but not enough to use a library that supports them.

I think that an easy-to-implement and reasonably performant garbage collector (GC) would combine two approaches:

- Let the compiler automatically free variables that go out of scope (using static analysis to insert free calls).

- Use reference counting when the scope is too hard to determine (fall back on a dynamic check).

The V8 Sandbox 2 years ago

They say that Rust is not enough and dismiss it quickly:

V8 vulnerabilities are rarely "classic" memory corruption bugs (use-after-frees, out-of-bounds accesses, etc.) but instead subtle logic issues which can in turn be exploited to corrupt memory. As such, existing memory safety solutions are, for the most part, not applicable to V8. In particular, neither switching to a memory safe language, such as Rust, nor using current or future hardware memory safety features, such as memory tagging, can help with the security challenges faced by V8 today.

But looking at the awesome list they provided:

https://docs.google.com/spreadsheets/d/1lkNJ0uQwbeC1ZTRrxdtu...

There are a lot of use-after-frees and out-of-bounds accesses, buffer overflow in there...

Postgres is far from perfect:

- The codebase is old and huge, accruing some heavy technical debt, making it a less than ideal foundation for iterating quickly on a new paradigm like AI and vector databases.

- Some ancient design decisions have aged poorly, such as its one connection per process model, which is not as efficient as distributing async tasks over thread pools. If not mitigated through an external connection pooler you can easily have real production issues.

- Certain common use cases suffer from poor performance; for example, write amplification is a known issue. Many junior developers mistakenly believe they can simply update a timestamp or increment a field on a main table with numerous columns.

So, yes, PG is one of the best compromises available on the database market today. It's robust, offers good enough performance, and is feature-rich. However, I don't believe it can become the ONE database for all purposes.

Using a dedicated tool best suited for a specific use case still has its place; SQLite and DuckDB, for instance, are very different solutions with interesting trade-offs.

Yes, that's a hard issue for arbitrary/user-provided HTML pages. But with templates under your control, the context is different. Your designers do not have to trust Chrome; they can preview, tweak using print media queries, and provide robust templates that print to acceptable PDF.

The speed issue is also real, but you can scale horizontally by spawning other chromium instances (with gotenberg containers for ex). Not really efficient but it can certainly help alleviate most of the load...

The main issue is conflating templating and pdf generation.

Using html to pdf solutions allow to do the templating in html, where it is pretty much a solved issue.

And as many said, headless chrome is a robust html to pdf solution, even though it feel like a hack.

But, yeah, there seems to be a lack of awareness about these options within corporations. So, kudos to you for addressing a genuine problem!

What about clojure? IntelliJ & VS Code are also popular IDEs for it. It also support datastructure literals vec [1 2 3], map {:a 1 :b 2} which are mostly considered as helpful for beginners since it's closer to what they are used to in other languages.

from their doc, Reasons to use Pingora:

- Security is your top priority: Pingora is a more memory safe alternative for services that are written in C/C++.

- Your service is performance-sensitive: Pingora is fast and efficient.

- Your service requires extensive customization: The APIs Pingora proxy framework provides are highly programmable.