HNHacker News
TopNewBestAskShowJobs

thegeekpirate

531 karma · joined August 19, 2015

[ my public key: https://keybase.io/dozn; my proof: https://keybase.io/dozn/sigs/kE_dbCXKmBPxtzwkeOdyykw0ybItKVmN5gZXHJ-6Oiw ]
submissionscomments
thegeekpirate··on Go-legacy-winxp: Compile Golang 1.24 code for Windows XP
There's a fork which has been continually worked on https://repo.or.cz/w/tinycc.git

Unofficial mirror https://github.com/TinyCC/tinycc

thegeekpirate··on The Algebra of Loans in Rust
You can require allocations in Odin to be explicit using `#+vet explicit-allocators`
thegeekpirate··on Zig's new plan for asynchronous programs
There's a GC library around somewhere, but I doubt anyone uses it. Manual memory management is generally quite simple, as long as you aren't using archaic languages.

https://www.youtube.com/watch?v=xt1KNDmOYqA is worth a watch.

thegeekpirate··on GrapheneOS is the only Android OS providing full security patches
I replied to a poster who said the seven years of updates began with the Pixel 6 with "Pixel 8" and a link which showed when support expires on these devices, because... it began with the Pixel 8, not 6.
thegeekpirate··on GrapheneOS is the only Android OS providing full security patches
> Google for one updates their devices for 7 years since Pixel 6

Pixel 8 https://endoflife.date/pixel

thegeekpirate··on Bazzite: Operating System for Linux gaming
My pleasure!
thegeekpirate··on Zig's new plan for asynchronous programs
Completely replaced Go for me after using Go since inception.

Wonderful language!

thegeekpirate··on Bazzite: Operating System for Linux gaming
Press "y" before linking to a Github file/line to ensure it stays accurate https://github.com/ublue-os/bazzite/blob/5e8f61a56ca3da02778...
thegeekpirate··on We're learning more about what Vitamin D does
4,000 is perfect.
thegeekpirate··on Go's Sweet 16
> exhaustive checks for sum types

Linters such as https://golangci-lint.run will do this for you.

thegeekpirate··on Why is Zig so cool?
Odin's even better than that—you can only use `0..<5` and `0..=5`, so there's never any ambiguity whatsoever.
thegeekpirate··on Lisp interpreter with GC in <750 lines of Odin (and <500 lines of C)
Last question I'll answer, because you aren't doing any of this is good faith.

You mean `curl.GLOBAL_ALL`, and it's for https://curl.se/libcurl/c/curl_global_init.html

thegeekpirate··on Lisp interpreter with GC in <750 lines of Odin (and <500 lines of C)
> Back to the CURL prefix, what is wrong with it?

It prevents stuttering when using it `curl.CURL_*`.

> What would the "CURL" distinct type be without the CURL prefix?

`CURL` isn't a prefix there.

Take more time to think things through.

thegeekpirate··on My Foray into Vlang
It does seem like they somewhat do now, as of the last several years https://wiki.lazarus.freepascal.org/management_operators

From https://news.ycombinator.com/item?id=19100760 since I'm not a Pascal user:

> The change we're talking about automatically invokes Initialize and Finalize on all types for dynamic allocations / destruction, unless they intentionally circumvent it. Intentional circumvention might include allocating raw memory in a class and treating the class like an array with an index property. In other words, if you declare a raw pointer, allocate untyped memory (e.g. bytes), and handle something back from that memory using a typecast, then you are bypassing automatic allocation and destruction.

> All other ways to make space for complex types (records and classes) as well as types which may hold complex types (arrays and nested fields) will safely and reliably use Initialize and Finalize when needed if they are defined.

thegeekpirate··on My Foray into Vlang
Far too complex, Odin (my favorite language for writing apps in) would align more with minimalistic values.

Lazarus always looked good, so there's probably value there if having a GC isn't an issue.

thegeekpirate··on Janet: Lightweight, Expressive, Modern Lisp
Odin's language server calls it "fake methods".

https://odin-lang.org

https://github.com/DanielGavin/ols

thegeekpirate··on Beyond Meat fights for survival
USDA 80/20 ground beef has 7.7g per 113g [0], 90/10 has 5g [1], Beyond Meat has 2g [2], and Impossible has 6g [3].

Impossible also has a "Lite" version (which doesn't seem to exist near me) with 1g [4], although apparently it doesn't taste very good.

[0] https://fdc.nal.usda.gov/food-details/2514744/nutrients

[1] https://fdc.nal.usda.gov/food-details/2514743/nutrients

[2] https://www.beyondmeat.com/en-CA/products/the-beyond-burger/...

[3] https://faq.impossiblefoods.com/hc/en-us/articles/3600189392...

[4] https://impossiblefoods.com/beef/plant-based-impossible-beef...

thegeekpirate··on Show HN: I wrote a BitTorrent Client from scratch
There's a bunch https://github.com/go-graphics/go-gui-projects

My personal favourite is an ImGui wrapper https://github.com/AllenDang/giu

The most featureful is probably unison, although I'm uncertain if anyone uses it outside of their own project (https://gurpscharactersheet.com), meaning documentation will be sparse https://github.com/richardwilkes/unison

Gio uses a different way of thinking about GUIs, used by Tailscale and gotraceui https://gioui.org

Wails is great if you're familiar with development on the web https://wails.io

The GTK4 bindings also look nice https://github.com/diamondburned/gotk4

Cogent Core also looks neat, but I didn't have the time to play with it before I switched over to using the Odin programming language instead of Go https://www.cogentcore.org/core

I personally had nothing but issues with Fyne (especially in regard to performance, across multiple computers and operating systems), but it's probably the most popular option https://fyne.io

thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
I use Dear ImGui and love it https://gitlab.com/L-4/odin-imgui
thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
All good, I contribute for everyone reading ^_^
thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
Reread it =b
thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
You should be able to import everything, then use `when` to generate a unified constant name:

@(require) import "x_a"

@(require) import "x_b"

when ODIN_OS == .Windows { x :: x_a } else when ODIN_OS == .Linux { x :: x_b }

x.do_thing()

thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
I took a good hard look at everywhere I may have stored it, but I believe I lost the original list after formatting.

I remember believing these were important:

- methods (turned out I mainly wanted working intellisense, which Odin does even without methods)

- a package manager (still a gripe, but git submodules do the trick somewhat)

- expressions (so I could assign the result from a `switch` statement to a variable for instance, but I can use an #inline proc if I _really_ want to)

- private by default (I had forgotten how many times I wanted to use something private from a library, and had to fork it instead)

- - although possible to make something private in Odin, nowadays I'd rather things be prefixed with underscores instead

Also, here are my list of things I'd still prefer changed, but are less important: https://forum.odin-lang.org/t/what-features-of-odin-do-you-d...

thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
I'd recommend going through https://odin-lang.org/docs/overview, as most of my points will be directly from there. Keep in mind it doesn't show _every_ feature (for instance, there are more built-in comptime procedures than shown https://odin-lang.org/docs/overview/#built-in-procedures-1), but does do a good job at displaying most.

Odin has all the features Go has (even struct tags https://odin-lang.org/docs/overview/#struct-field-tags), but adds:

- proper enums

- unions https://odin-lang.org/docs/overview/#unions

- built-in optional https://odin-lang.org/docs/overview/#maybet

- or_else/or_return/or_continue/or_break https://odin-lang.org/docs/overview/#or_else-expression (scroll down for the others)

- distinct types https://odin-lang.org/docs/overview/#distinct-types

- named arguments https://odin-lang.org/docs/overview/#named-arguments

- built-in matrix type https://odin-lang.org/docs/overview/#matrix-type

- built-in quaternions

- ternary operator, but you can use `bar := 1 if condition else 42` instead of ? and : if you'd like https://odin-lang.org/docs/overview/#ternary-operator

- default parameter values https://odin-lang.org/docs/overview/#default-values

- fantastic C integration

- forced in/exclusive range operators ..< and ..= https://odin-lang.org/docs/overview/#range-based-for-loop

- can get the zero value of any type using `{}` https://odin-lang.org/docs/overview/#zero-values

- defer if <condition> https://odin-lang.org/docs/overview/#defer-if

- explicit procedure overloading https://odin-lang.org/docs/overview/#explicit-procedure-over...

- bunch of vendored libraries https://pkg.odin-lang.org/vendor

- bit_set/bit_field https://odin-lang.org/docs/overview/#bit-sets https://odin-lang.org/docs/overview/#bit-fields

- proper slices (not the Go monster which combines a dynamic array along with slices) https://odin-lang.org/docs/overview/#slices

- `for x in xs` instead of `for _, x := range xs`, and `for &x in xs` if you want `x` to be addressable

- implicit selector expressions `.Member_Name` https://odin-lang.org/docs/overview/#implicit-selector-expre...

- parametric polymorphism with a ton of intrinsics https://odin-lang.org/docs/overview/#parametric-polymorphism

- - along with `where` clauses (similar to Rust) https://odin-lang.org/docs/overview/#where-clauses

Language cohesion has been _incredibly_ well thought out.

thegeekpirate··on Odin, a pragmatic C alternative with a Go flavour
When I first saw Odin, I wrote down a list of everything I didn't think I'd like.

After several thousand lines, it proved all of my major worries incorrect, and has been an absolute pleasure.

It has since replaced my usage of Go, which I had been using since release.

I would highly recommend giving it a proper shot!

thegeekpirate··on Replacing Kubernetes with systemd (2024)
Nope, my payment method was already entered.
thegeekpirate··on Replacing Kubernetes with systemd (2024)
Can confirm (old comment of mine saying the same https://news.ycombinator.com/item?id=43215430)
thegeekpirate··on Gandi March 9, 2025 incident postmortem
https://tld-list.com is the the place to go when needing a domain (although it seems they're having some site issues at the moment).
thegeekpirate··on CSS Hell
Desktop mode using Firefox v137.0.2 as well as Chrome v135.0.7049.100 on a Pixel 7a worked for me, in both portrait and landscape.
thegeekpirate··on 400 reasons to not use Microsoft Azure
Oracle Cloud was (and possibly still is) deleting random accounts (it was all over their subreddit at the time).

I wouldn't have believed it, but while testing out a server for a business, they deleted my account, and didn't reply when I emailed support about it.

Page 1 of 9Next →