News for hackers. Stuff that matters.

simonz05

Re:Duck Typing (Horror) in Go on Wednesday August 21, 2024 @04:26PM (#41313923)
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()
  }
Re:Ask HN: Should we bring software dev in-house? on Friday August 09, 2024 @12:48AM (#41198854)
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

Re:Russ Cox is stepping down as the Go tech lead on Thursday August 01, 2024 @05:18PM (#41133732)
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.
Re:Russ Cox is stepping down as the Go tech lead on Thursday August 01, 2024 @04:44PM (#41133416)
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.

Re:Russ Cox is stepping down as the Go tech lead on Thursday August 01, 2024 @04:34PM (#41133325)
> 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.

Re:The Linux Kernel Module Programming Guide on Saturday July 27, 2024 @08:17AM (#41086082)
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.
Re:The Linux Kernel Module Programming Guide on Saturday July 27, 2024 @02:33AM (#41084821)
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.

In this X thead Joran comments how it all started with a HN comment back in 2019. https://x.com/jorandirkgreef/status/1815702485190774957
Lsm trees also need a log, right?
The paper is inspired by a hacker news comment: https://x.com/andy_pavlo/status/1807799839616614856
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?
Re:Go 1.21 Released on Tuesday August 08, 2023 @01:16PM (#37052402)
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...

Re:InfluxDB 3.0 System Architecture on Tuesday June 27, 2023 @04:02PM (#36497933)
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.

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...

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...

Yep, this should be evaluated as `(- (+ 2 (* 2 2)) 6)`
Be aware URL field in browsers have a maximum number of characters they accept.
Re:How SQLite Helps You Do ACID on Wednesday August 10, 2022 @04:17PM (#32417826)
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

Older »