HackerTrans
TopNewTrendsCommentsPastAskShowJobs

0xjnml

no profile record

Submissions

[untitled]

1 points·by 0xjnml·vor 4 Monaten·0 comments

[untitled]

1 points·by 0xjnml·vor 4 Monaten·0 comments

[untitled]

1 points·by 0xjnml·vor 5 Monaten·0 comments

[untitled]

1 points·by 0xjnml·vor 5 Monaten·0 comments

[untitled]

1 points·by 0xjnml·vor 5 Monaten·0 comments

[untitled]

1 points·by 0xjnml·vor 5 Monaten·0 comments

[untitled]

1 points·by 0xjnml·vor 7 Monaten·0 comments

Show HN: Qbecc is a C compiler producing Go(Golang) ABI0 assembler

pkg.go.dev
1 points·by 0xjnml·vor 9 Monaten·0 comments

[untitled]

1 points·by 0xjnml·letztes Jahr·0 comments

[untitled]

1 points·by 0xjnml·letztes Jahr·0 comments

Show HN: Pure Go QuickJS JavaScript engine (Golang)

pkg.go.dev
5 points·by 0xjnml·letztes Jahr·3 comments

[untitled]

1 points·by 0xjnml·letztes Jahr·0 comments

Show HN: The SQLite Drivers 25.04 Benchmarks Game (Golang)

pkg.go.dev
3 points·by 0xjnml·letztes Jahr·0 comments

The SQLite Drivers 25.03 Benchmarks Game (Golang)

pkg.go.dev
2 points·by 0xjnml·letztes Jahr·0 comments

Go Is DOOMed

pkg.go.dev
2 points·by 0xjnml·letztes Jahr·0 comments

Tcl/Tk application binaries through Go

wiki.tcl-lang.org
7 points·by 0xjnml·letztes Jahr·1 comments

comments

0xjnml
·vor 2 Monaten·discuss
> Yeah, it breaks when the author decides to move from Github into Gitlab to protest against Microsoft.

The import path is disconnected from where the build system looks for the files. Of course, the default is to use the import path as an URL, right, but nothing forces you to do that. And if you do, *you* lock yourself to the hosting you use. But that can be hardly blamed on Go.

Documentation here: https://pkg.go.dev/cmd/go#hdr-Remote_import_paths

Full example: https://github.com/rsc/swtch/blob/master/app/rsc-io/main.go

tl;dr: Serve this at your domain, update the repo-root when changing host platform for your code: <meta name="go-import" content="import-prefix vcs repo-root">. No one else has to do anything.
0xjnml
·vor 3 Monaten·discuss
Shameless plug: https://pkg.go.dev/modernc.org/tk9.0
0xjnml
·vor 4 Monaten·discuss
The results for the 26.03 benchmark run are in. (golang)

With the recent release of ncruces' drive switching from wazero to wasm2go, there have been expectations of possibly substantial improvements. Our numbers confirm this: the wasm2go-based driver (ncruces) has recovered significant ground compared to the February results, narrowing the gap with its competitors. The driver erased its worse performance on targets not natively supported by wazero. Well done, u/ncruces!
0xjnml
·vor 4 Monaten·discuss
CGo-free as always. See CHANGELOG.md for details.

https://gitlab.com/cznic/sqlite/-/blob/master/CHANGELOG.md
0xjnml
·vor 5 Monaten·discuss
> I wonder what the thought process of the Go designers was when coming up with that approach.

Sometimes we need block scoped cleanup, other times we need the function one.

You can turn the function scoped defer into a block scoped defer in a function literal.

AFAICT, you cannot turn a block scoped defer into the function one.

So I think the choice was obvious - go with the more general(izable) variant. Picking the alternative, which can do only half of the job, would be IMO a mistake.
0xjnml
·vor 5 Monaten·discuss
I wrote a post exploring egg, a new tool that generates recursive descent parsers from Go-style EBNF. The most interesting feature is that it doesn't generate struct nodes; it encodes the AST into a flat []int32 slice for cache locality and reduced GC pressure. I included a walkthrough of generating a JSON parser with it.
0xjnml
·vor 6 Monaten·discuss
See https://pkg.go.dev/modernc.org/quickjs
0xjnml
·vor 7 Monaten·discuss
> If you really want an arena like behavior you could allocate a byte slice and use unsafe to cast it to literally any type.

Only if the type is not a pointer per se or does not contain any inner pointers.

Otherwise the garbage collector will bite you hard.
0xjnml
·vor 9 Monaten·discuss
YouTube is one such.
0xjnml
·vor 9 Monaten·discuss
Documentation for the QBE IL is here: https://c9x.me/compile/doc/il.html

I find it quite usable.
0xjnml
·vor 9 Monaten·discuss
Maintainer here, AMA.
0xjnml
·vor 11 Monaten·discuss
You took the wrong exit, sir. This is the right way: https://en.wikipedia.org/wiki/Request_for_Comments
0xjnml
·letztes Jahr·discuss
> The page you linked compares golang bindings against each other, not C against golang like my test did

No one disputed that. But it follows that your benchmarks are comparing C to [some very] outdated versions of Go packages. Which is what I tried to point out.
0xjnml
·letztes Jahr·discuss
It seems you're using some old Go package versions for your benchmarks.

See https://pkg.go.dev/modernc.org/sqlite-bench#readme-tl-dr-sco... for the numbers using the more recent versions.
0xjnml
·letztes Jahr·discuss
It is transpiled from C to Go, meaning 90+% of the effort is mechanized.

Ad performance. In some micro benchmarks the Go version is ~4x slower: https://gitlab.com/cznic/libquickjs/-/blob/675ee343753c42341...

However, it's already ~25% faster, in a different benchmark, than another Go JS VM written from scratch: https://pkg.go.dev/modernc.org/[email protected]#hdr-Performan...

I am currently looking around if it can be improved more and there are some ideas to try out.
0xjnml
·letztes Jahr·discuss
go.mod files have no dependencies, so neither they can have circular dependencies.

go.mod files just list the dependencies of their respective package.
0xjnml
·letztes Jahr·discuss
[flagged]
0xjnml
·letztes Jahr·discuss
- Turn Tcl code into standalone executables

- Easily cross-compile these executables for other systems