Go programming language discussion

1578 readers
1 users here now

founded 6 years ago
MODERATORS
26
27
 
 

tabula is a backgammon engine I recently created.

The engine builds on principles described by the author of the Motif engine here: https://bkgm.com/motif/engine.html

You can play against the engine right now at https://bgammon.org/

28
 
 

After a while of absence, I'm getting back into Go programming and I was wondering: What's new in terms of quality control tooling? What are you running on your CI/CD ? Any suggestions?

29
30
 
 

bgammon.org is a free online multiplayer backgammon service without any ads.

Source code: https://code.rocket9labs.com/tslocum/bgammon

Screenshot

31
32
 
 

Go 1.21 adds a new port targeting the WASI preview 1 syscall API through the new GOOS value wasip1. This port builds on the existing WebAssembly port introduced in Go 1.11.

33
19
Writing an OS in Go: The Bootloader (totallygamerjet.hashnode.dev)
submitted 2 years ago by whou@lemmy.ml to c/golang@lemmy.ml
 
 

How you could write an operating system with pure Go code (including no CGO!)

34
 
 

Also available via SSH:

ssh playnetris.com

Source code:

https://code.rocket9labs.com/tslocum/netris

35
36
13
submitted 2 years ago* (last edited 2 years ago) by whou@lemmy.ml to c/golang@lemmy.ml
37
38
6
submitted 2 years ago* (last edited 2 years ago) by sbinet@lemmy.ml to c/golang@lemmy.ml
 
 

Your weekly appointment with the latest news about accepted/declined proposals.

39
 
 

A major Go language change proposal was published earlier this week: add range over int, range over func, and there's a good chance this change will make it into a future Go release. In this post I will discuss the motivation for this proposal, how it's going to work, and provide some examples of how Go code using it would look.

40
3
Go 1.22 inlining overhaul (docs.google.com)
submitted 2 years ago* (last edited 2 years ago) by sbinet@lemmy.ml to c/golang@lemmy.ml
 
 

The Go compiler’s inliner has never been particularly good. It wasn’t until Go 1.12, released in 2019, that the Go compiler supported inlining more than leaf functions, and we’ve slowly chipped away at more limitations of the inliner over the years (it started inlining functions with for loops in early 2021!). Go 1.20, released in February 2023, added support for basic profile-guided inlining, the most significant change to Go’s inlining policy since 1.12.

[...]

The rest of this document lays out a set of considerations for a redesign of Go’s inlining policy.

https://docs.google.com/document/d/1a6p7-nbk5PVyM1S2tmccFrrIuGzCyzclstBtaciHxVw/edit

41
 
 

Hey all, I just wrote this up after migrating a metric ton of Go projects hosted on a Forgejo (Gitea) instance to a new domain by adding just a couple of lines to my Caddyfile. I thought the process would be much more involved, but the snippet I found and modified managed to handle everything without any tedious path rewriting or other vanity URL setup.

I hope it's helpful for someone else who needs to migrate to a new domain. I got an email from my registrar recently warning about a 60% price increase for .space TLDs. Careful readers may make a connection between this event and this blog post.

42
 
 

Your weekly appointment with the latest news about accepted/declined proposals.

Noteworthy accepted proposal:

43
 
 

I really like seeing people's interesting projects. Even if they are generic or were started just to learn something.

And on top of that, I consider Go to be one of those languages that you can find projects on a pretty diverse range of topics.

So, is there any interesting (or not too) personal Go projects that is in the making, or is already finished?

44
3
Coroutines for Go (research.swtch.com)
submitted 2 years ago by sbinet@lemmy.ml to c/golang@lemmy.ml
 
 

Why we need coroutines for Go, and what they might look like.

Another great post from Russ Cox, in his series on iterators and coroutines.

https://research.swtch.com/coro

45
2
Storing Data in Control Flow (research.swtch.com)
submitted 2 years ago* (last edited 2 years ago) by sbinet@lemmy.ml to c/golang@lemmy.ml
 
 

Write programs, not simulations of programs.

A great post from Russ Cox, setting the scene for his work on iterators and coroutines.

https://research.swtch.com/pcdata

46
47
 
 
48
 
 

tl;dr: Looking forward future Pinner.Pin performance improvements.

The upcoming Go version 1.21, scheduled for release next month, is currently available for download as Go 1.21rc2 in the "Unstable version" section here. Go 1.21 introduces a new runtime type, Pinner.

ccgo/v4, the next, also not yet released version of the C to Go transpiler, uses pinning to "freeze" addresses of local Go variables, addresses of which are passed around in the original C code. ccgo produces Go code where any C pointer points to memory not managed by the Go runtime. So ccgo simply puts such "escaping" variables in the memory not visible to the garbage collector, with stable, immovable addresses. Those are provided by the modernc.org/memory package. Otherwise a goroutine stack resizing can change the address of a local variable.

49
 
 

Your weekly appointment with the latest news about accepted/declined proposals.

50
 
 

A very simple-minded CommonMark to SPIP converter.

SPIP is a rather popular french CMS, with its own wiki-like syntax to author documents.

view more: ‹ prev next ›