HNHacker News
TopNewBestAskShowJobs

simonz05

490 karma · joined October 19, 2010

Website: simonklee.dk E-mail: hello@simonklee.dk
submissionscomments
simonz05··on Duck typing (horror) in Go
This type of runtime type checking is quite common in Go. An example from bufio.Reader's WriteTo method:

  // WriteTo implements io.WriterTo.
  // This may make multiple calls to the [Reader.Read] method of the underlying [Reader].
  // If the underlying reader supports the [Reader.WriteTo] method,
  // this calls the underlying [Reader.WriteTo] without buffering.
  func (b *Reader) WriteTo(w io.Writer) (n int64, err error) {
   b.lastByte = -1
   b.lastRuneSize = -1
  
   n, err = b.writeBuf(w)
   if err != nil {
    return
   }
  
   if r, ok := b.rd.(io.WriterTo); ok {
    m, err := r.WriteTo(w)
    n += m
    return n, err
   }
  
   if w, ok := w.(io.ReaderFrom); ok {
    m, err := w.ReadFrom(b.rd)
    n += m
    return n, err
   }
  
   if b.w-b.r < len(b.buf) {
    b.fill() // buffer not full
   }
  
   for b.r < b.w {
    // b.r < b.w => buffer is not empty
    m, err := b.writeBuf(w)
    n += m
    if err != nil {
     return n, err
    }
    b.fill() // buffer is empty
   }
  
   if b.err == io.EOF {
    b.err = nil
   }
  
   return n, b.readErr()
  }
simonz05··on Ask HN: Should we bring software dev in-house?
We recently went through a similar situation at a logistics company in Europe. We decided to bring software development in-house after facing similar frustrations with a third-party provider. It was a challenging process, especially in attracting talent, but ultimately, it allowed us to build a solution tailored to our needs.

I’ve been with the company for the past 4 years, working as a lead software engineer. If you’re interested, my contact details are in my profile, and I’m happy to setup a call

simonz05··on Russ Cox is stepping down as the Go tech lead
I understand and respect your perspective on Austin and Cherry’s involvement in the Go community. Their contributions may indeed be less visible but still impactful. However, the community’s perception of leadership is crucial, and visibility plays a big part in that. For instance your long form blog adds context to decisions you’ve taken in the past. I hope their active roles will become more apparent, fostering a stronger connection with the broader Go community.
simonz05··on Russ Cox is stepping down as the Go tech lead
https://www.youtube.com/watch?v=wwoWei-GAPo — Project has come a long way since this. Happy that it's still around and thriving. I don't think we expected that in 2009. I don't believe Go would have been where it is without Russ. His contribution to the project has been tremendous.

Thanks Russ.

simonz05··on Russ Cox is stepping down as the Go tech lead
> I'd also like to see less google control of the project.

That doesn't look like is going to happen — the leadership change announced here seems to me to continue on the Google path. Both Austin and Cherry are relatively unknown outside Google and are to my knowledge not active in the community outside Google.

simonz05··on The Linux Kernel Module Programming Guide
I cannot remember (or find) where I signed up for updates, but I get an email every 6 months (or so) from Lorenzo Stoakes personal email. Probably just send him an e-mail and he'll add you to his list.
simonz05··on The Linux Kernel Module Programming Guide
See also The Linux Memory Manager: https://linuxmemory.org/chapters Last update the author sent out was in early July noting that the book is now in editing:

> I am happy to report that I have completed the first draft of the book [...] > I am now in an editing phase, which may well take some time. Sadly I can't give a reasonable estimate as this will be done in concert with my publisher.

simonz05··on Rediscovering Transaction Processing from History and First Principles
In this X thead Joran comments how it all started with a HN comment back in 2019. https://x.com/jorandirkgreef/status/1815702485190774957
simonz05··on A write-ahead log is not a universal part of durability
Lsm trees also need a log, right?
simonz05··on What goes around comes around and around [pdf]
The paper is inspired by a hacker news comment: https://x.com/andy_pavlo/status/1807799839616614856
simonz05··on Serverless Runtime / Database Co-Design with Asynchronous I/O
In-process database like SQLite is the holy grail for low-latency database access on the edge. However, the synchronous I/O is holding it back, but how does in-process database look like with asynchronous I/O?
simonz05··on Go 1.21 Released
Felix Geisendörfer did a bunch of work to improve continuous profiling performance [1].

[1]: https://blog.felixge.de/waiting-for-go1-21-execution-tracing...

simonz05··on InfluxDB 3.0 System Architecture
Paul, impressive work on the rewrite.

Can you shed light on the biggest challenges and steps you (and the team) took to overcome them to succeed with the rewrite? We often hear about how major rewrites can fail or be massively delayed, but you seem to have succeeded.

simonz05··on Show HN: Tiny Metasearch Engine to Find Software Developers
The GitHub search query turned out wrong (for me). It added a space to the location param.

It should be.

https://github.com/search?q=location%3A%22Copenhagen%22+lang...

simonz05··on Ask HN: Someone is proxy-mirroring my website, can I do anything?
Another option would be to use a service like Cloudflare, which offers protections against scraping and other malicious behavior. This can help prevent the proxy-mirror site from being able to access your site's content.

https://blog.cloudflare.com/introducing-scrapeshield-discove...

simonz05··on Show HN: I made a web-based notepad with a built in unit calculator
Yep, this should be evaluated as `(- (+ 2 (* 2 2)) 6)`
simonz05··on Show HN: I made a web-based notepad with a built in unit calculator
Be aware URL field in browsers have a maximum number of characters they accept.
simonz05··on How SQLite Helps You Do ACID
That depends. Replicated state machines need to distinguish between a crash and corruption. Most systems don't do that. It can be disastrous to truncate the journal when encountering a checksum mismatch for instance.

See "Protocol-Aware Recovery for Consensus-Based Storage" for more research on that topic. [1][2]

- [1] https://www.usenix.org/system/files/conference/fast18/fast18... - [2] https://www.youtube.com/watch?v=fDY6Wi0GcPs

simonz05··on Can Applications Recover from Fsync Failures?
The paper analyzes how file systems and PostgreSQL, LMDB, LevelDB, SQLite, and Redis react to fsync failures. It shows that although applications use many failure-handling strategies, none are sufficient: fsync failures can cause catastrophic outcomes such as data loss and corruption.
simonz05··on How SQLite Helps You Do ACID
For people interested in this topic I can recommend "Can Applications Recover from fsync Failures?" by A. Rebello et al[1]. The paper analyzes how file systems and PostgreSQL, LMDB, LevelDB, SQLite, and Redis react to fsync failures. It shows that although applications use many failure-handling strategies, none are sufficient: fsync failures can cause catastrophic outcomes such as data loss and corruption.

- [1] https://www.usenix.org/conference/atc20/presentation/rebello

simonz05··on Golang: discussion: standard iterator interface
Ian Lance Tayler, Jonathan Amsterdam, and Russ Cox propose to add a standardized iterator interface and extend the `for range` syntax to support iterators.
simonz05··on Ask HN: Cheaper Algolia Alternative?
Look for a solution that doesn't solve everything Algolia does. Hard to say what that is exactly for your company as you don't explain what "basic search" is.
simonz05··on Verneuil: S3-backed asynchronous replication for SQLite
> At first sight, Verneuil has very similar goals to Litestream, a daemon that ships SQLite WAL segments to S3. A key difference is that Litestream currently does not support read replicas, while Verneuil was designed to trivially offer (slightly stale) read snapshots.

Nice to see more tooling built for SQLite, and seems like a well thought out alternative to Ben's popular Litestream project.

simonz05··on Ask HN: What are some great engineering blogs?
* [Daniel Lemire's Blog](https://lemire.me/blog/)
simonz05··on YouTube’s “Premium Lite” trial offers ad-free YouTube for €7 a month
Background "watching" and ad-free listening are the killer features in my book. I use YouTube for consuming learning material (talks, online-teaching etc.), and without the above features YouTube is mostly useless—especially on a mobile device.
simonz05··on The Inter typeface family
Last week The Changelog talked to Rasmus Andersson about his journey as a software creator, Playbit, and his work on the Inter typeface. Worth a listen.

https://changelog.com/podcast/449

simonz05··on Show HN: Csql – Python lib for composeable SQL queries
For those of us who didn't know what a CTE was standing for. Here is a link to the PostgreSQL documentation on Common Table Expressions (CTEs)[1], and an article on Wikipedia on Hierarchical and recursive queries, that explains the concept [2].

[1] https://www.postgresql.org/docs/12/queries-with.html

[2] https://en.wikipedia.org/wiki/Hierarchical_and_recursive_que...

edit: formatting

simonz05··on Gio: Portable, Immediate Mode GUI in Go
You can compile it on linux and run it through "weston"
simonz05··on Go's updated generic proposal (Contracts)
There is some more information in this liveblog from Ian's talk, Generics in Go [1], and the *.go2 files in Robert Griesemer's change list [2]

[1]: https://about.sourcegraph.com/go/gophercon-2019-generics-in-... [2]: https://go-review.googlesource.com/c/go/+/187317/

simonz05··on Elastic acquires Opbeat (application performance monitoring company)
Thanks for the thorough and open reply.

Do I understand you right in that the plan is to make Elastic APM open source?

Page 1 of 3Next →