HNHacker News
TopNewBestAskShowJobs

davidkunz

1,364 karma · joined January 10, 2021

DevOnDuty: https://www.youtube.com/@devonduty

GitHub: https://github.com/David-Kunz

submissionscomments
davidkunz··on RustDesk – Remote desktop software, written in Rust
One cannot enforce optimal solutions but one can prevent sub-optimal ones through proper checks.
davidkunz··on RustDesk – Remote desktop software, written in Rust
A few examples:

- Rust forces you to deal with errors and "null" values (Option). If you just unwrap them, it's visible.

- Rust requires systems with clear ownership. You can opt out with various smart pointers, it's visible.

- Rust requires you to use Box for heap allocations, it's visible.

Note: I'm not talking about optimal solutions in the sense of "best algorithm", more in the sense of "well thought out and without lazy shortcuts".

davidkunz··on RustDesk – Remote desktop software, written in Rust
It depends.

- Rust is a complicated language, so novice developers probably use something else.

- Its ownership/borrowing system makes sure that architecture is not an afterthought (unless you pollute your code with countless smart pointers).

- You get memory safety in safe Rust code and don't need a garbage collector.

- Non-optimal solutions usually are visible/more cumbersome to write.

In the end it's up to the individual developer, but Rust really helps to produce high-quality code.

davidkunz··on Microsoft announces new Bing and Edge browser powered by upgraded ChatGPT AI
I dislike the 1000 character limit. In ChatGPT, it's quite useful to insert larger chunks, e.g. for "improve this text" or "given that code, how can I implement ..." questions.
davidkunz··on Natural language is the lazy user interface
Chat interfaces are great if

1) you know what you want 2) the alternative would require manual navigation to multiple UIs and/or many interactions

davidkunz··on Rust's Ugly Syntax
Yes, but syntax decisions of programming languages shouldn't rely on such things. I would've preferred square brackets for generics (and something else for indexing).
davidkunz··on Rust's Ugly Syntax
I don't know if it's just me, but find angle brackets really hard to read. Many times I just miss the ending one, because they have the same height as normal characters, so they don't stand out.
davidkunz··on Certified 100% AI-free organic content
I assume at some point, ChatGPT needs some kind of text ranking. Popular texts are usually correct (content and presentation) and useful, so they should rank higher. At some point, low-quality texts are filtered out. Personally, I don't care if a text is written by a human or a machine as long as it's good.
davidkunz··on The Git source code audit, viewed as a Rust programmer
Gitoxide is useful in other Rust programs that need to interact with git such as Cargo[1] or Helix[2].

[1]: https://github.com/Byron/gitoxide/issues/106

[2]: https://github.com/helix-editor/helix/pull/3890

davidkunz··on SantaCoder: A new 1.1B code model for generation and infilling
Also at summarizing, so I'm gonna review ChatGPT's summary of ChatGPT's review.
davidkunz··on Ask HN: Should HN ban ChatGPT/generated responses?
ChatGPT can also change its style, e.g. "Make the following text more interesting".
davidkunz··on Neovim Conf 2022
Neovim is a continuation of Vim, you can find more info here: https://neovim.io/charter/

Edit: This doesn't mean Vim is discontinued.

davidkunz··on Ask HN: Can ChatGPT generate fully functional code?
You can ask for a simple example of a CRUD app, here's my code output:

const express = require('express')

const app = express()

// define the model for a user

const User = {

  name: '',

  email: ''
}

// create a new user

app.post('/users', (req, res) => {

  const user = Object.assign({}, User, req.body)


  // save the user to a database, etc.


  res.send(user)

})

// read a list of users

app.get('/users', (req, res) => {

  // retrieve a list of users from the database, etc.

  res.send([

    { name: 'Alice', email: 'alice@example.com' },

    { name: 'Bob', email: 'bob@example.com' }

  ])
})

// read a single user

app.get('/users/:id', (req, res) => {

  // retrieve a user with the specified id from the database, etc.

  res.send({ name: 'Alice', email: 'alice@example.com' })
})

// update a user

app.put('/users/:id', (req, res) => {

  // retrieve the user with the specified id from the 
database, etc. const user = Object.assign({}, User, req.body)

  // save the updated user to the database, etc.

  res.send(user)
})

// delete a user

app.delete('/users/:id', (req, res) => {

  // delete the user with the specified id from the 
database, etc.

  res.send({ message: 'User deleted' })
})

app.listen(3000, () => {

  console.log('Listening on port 3000')
})
davidkunz··on EmacsConf 2022
Right before NeovimConf: https://www.neovimconf.live/
davidkunz··on Extism: Make all software programmable with WebAssembly
Awesome, thanks for the answer!
davidkunz··on Extism: Make all software programmable with WebAssembly
Is the interface defined through wit?

https://github.com/bytecodealliance/wit-bindgen

davidkunz··on Best Markdown Presentation Tools [video]
Let's explore the best open source tools to transform markdown files to fully fledged presentations.

- Reveal.js: https://revealjs.com/

- Lookatme: https://github.com/d0c-s4vage/lookatme

- Marp: https://marp.app/

- Slidev: https://sli.dev/

davidkunz··on Sabine Hossenfelder: There are areas where physics blurs into religion
> This is cheerfully ignoring the minor detail that the equivalent calculation for the muon has a 3.5 standard deviation error when compared to reality. Oops. Just ignore that.

The opposite of what you write is true. Physicists are eager to see where theory doesn't fit reality, that might even lead to a nobel price. Even statistical fluctuations are sometimes hyped as breakthrough experiments.

davidkunz··on Show HN: Stable Diffusion v2 web interface
This site doesn't require a login: https://tinybots.net/artbot?model=stable_diffusion_2.0

Posted by @davely today.

davidkunz··on Stable Diffusion 2.0 on Mac and Linux via imaginAIry Python library
Wow, this a great site, thanks for the links!
davidkunz··on Emacs: Feature/tree-sitter merged into master
Congratulations, Emacs! I hope it will be a similar success story as in Neovim. If more systems use it, the question "should my programming language provide a Tree-Sitter parser" becomes a no brainer.
davidkunz··on D2, a diagram scripting language that turns text to diagrams, is now open source
Great! I was looking forward to this as a nice-looking alternative to Mermaid etc. Thanks for open-sourcing your core! I really like the cheat sheet: https://github.com/terrastruct/d2/blob/master/docs/assets/ch...
davidkunz··on Easy Interfaces with Zig 0.10
The problem here is that all variants (Cat, Dog, Snake) have to be known when defining the interface (Animal). That makes it not extensible. I prefer Rust's traits.
davidkunz··on Nord – An Arctic, north-bluish color palette
First I thought they'd sell "Nord VPN".
davidkunz··on Chaos Computer Club saves the German healthcare system 400M Euros
Here's a podcast where they talk about it:

https://logbuch-netzpolitik.de/lnp433-auf-yolo-konfigurieren

(In German)

davidkunz··on Chaos Computer Club saves the German healthcare system 400M Euros
Wait, does that mean they've upgraded from fax already?
davidkunz··on Replace the “very” in your sentence
In programming, mathematics and physics, our goal is to express our thoughts in a concise way without introducing too many different concepts.

Applied to language, the word 'very' is great. It can be used in many occasions and is generally understood. What's wrong with that?

davidkunz··on Helix: A Neovim inspired editor, written in Rust
Yes it does:

- Rust is a systems-level language and requires developers to be experienced in order to create big software components. This usually leads to better quality.

- Rust rewards putting effort upfront (e.g. error handling, Option<T>, ...) leading to less bugs than more forgiving languages.

- Rust uses zero-cost abstractions which enables efficient code. In other languages it's a lot easier to degrade your performance by accident.

- Rust can easily create binaries for the most relevant architectures, so your programs tend to be portable.

- The contribution story is great, your code tends to be correct and you don't need to watch out for many foot guns. I've done it myself for Helix and the experience was awesome [1].

But take everything with a grain of salt, you can create bad software in every programming language.

[1]: https://github.com/helix-editor/helix/pull/1967

davidkunz··on Neovim 0.8: What's new? [video]
Hi,

Here's a small video showing the new features of Neovim 0.8.

davidkunz··on Nightdrive
As a German, it would have been more relaxing if cars on the left were faster.
← PreviousPage 4 of 11Next →