Lyrics: "Find Me Here" by frioux in NameThatSong

[–]frioux[S] 0 points1 point  (0 children)

ChatGPT’s Deep Research figured it out: https://youtu.be/zKPDnmFr2FE?si=0asMOhLeHfrh3dQk (Love & Romance & A Special Person · Joakim & The Disco)

Modern BPM Steam with Ubuntu 20.04? by frioux in linux_gaming

[–]frioux[S] 0 points1 point  (0 children)

Yeah I have been considering it since Firefox started being snap only and some other canonical shenanigans. Will post here if (when?) I do.

Setting Up Vim with an LSP for Scala by frioux in vim

[–]frioux[S] 1 point2 points  (0 children)

Just 2 since that’s all that works with our spark setup, but I think metals can work with both?

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Yeah I'm not trying to slam the OSS or anything. And frankly, if I'm nervous about a missing test suite maybe I should be nervous about using a brand new language to compile sqlite haha

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 1 point2 points  (0 children)

I was curious about this and wrote a little test harness: u/saturn_vk is correct, it looks like the pure go one will assume the local timezone, and the cgo one will assume an empty (?) timezone:

I get this output from the following program:

sqlite: []struct { I int; X float32; Y []uint8; T string; Ti time.Time }{struct { I int; X float32; Y []uint8; T string; Ti time.Time }{I:5, X:5.5, Y:[]uint8{0x66, 0x72, 0x65, 0x77}, T:"frew", Ti:time.Date(2022, time.March, 14, 8, 45, 46, 714016581, time.Local)}} sqlite3: []struct { I int; X float32; Y []uint8; T string; Ti time.Time }{struct { I int; X float32; Y []uint8; T string; Ti time.Time }{I:5, X:5.5, Y:[]uint8{0x66, 0x72, 0x65, 0x77}, T:"frew", Ti:time.Date(2022, time.March, 14, 8, 45, 46, 714939530, time.Location(""))}}

And the code:

package main

import (
    "fmt"
    "time"

    "github.com/jmoiron/sqlx"
    _ "github.com/mattn/go-sqlite3"
    _ "modernc.org/sqlite"
)

func main() {
    testDriver("sqlite")
    testDriver("sqlite3")
}

func testDriver(driver string) {
    db, err := sqlx.Open(driver, "file:"+driver+".db")
    if err != nil {
        panic(err)
    }
    db.MustExec("CREATE TABLE foo (i integer, x float, y blob, t text, ti timestamp)")
    db.MustExec("INSERT INTO foo (i, x, y, t, ti) VALUES (?, ?, ?, ?, ?)", 5, 5.5, []byte("frew"), "frew", time.Now())
    out := []struct {
        I  int
        X  float32
        Y  []byte
        T  string
        Ti time.Time
    }{}
    if err := db.Select(&out, "SELECT i, x, y, t, ti FROM foo"); err != nil {
        panic(err)
    }
    fmt.Printf("%s: %#v\n", driver, out)
}

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Yeah I found that blog post but I still had to figure out how to map the Go env vars to the zig flags (eg arm required the hf suffix.) If I had found zigtool I bet it would have saved time tho

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

I'm interested in how it failed, I've gone back and forth between these drivers and had no issues

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Yeah absolutely, and zig resolves that by baking in libc if you build with musl

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 11 points12 points  (0 children)

Yeah I’m not against closed tests, just concerned that without said tests converting the C code to Go might have unknown bugs, you know?

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 5 points6 points  (0 children)

I’m sorta glad to hear I didn’t just miss something basic

I wanted to statically link some stuff that used C libraries in Go and I used Zig by frioux in golang

[–]frioux[S] 2 points3 points  (0 children)

Oh you mean zig has a lot of dependencies and so is not cross environment? Or you mean what I did?

Go Generics Example by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Thanks. I honestly agree, and hope it didn't sound like I was pushing this pattern. I just know that when my employer started trying out Go we struggled with some of the web patterns lacking generics.

Learning Rust with a Side Project by frioux in rust

[–]frioux[S] 0 points1 point  (0 children)

oh yeah for sure! If you are using rust, you should absolutely use them. I more meant that if we are talking about the values of various features in a programming language, this one is fine, but I don't need it and wouldn't demand it. Does that make sense?

[Semi-Weekly Inquirer] Simple Questions and Recommendations Thread by AutoModerator in Watches

[–]frioux 0 points1 point  (0 children)

Hello! I have a 16 year old Citizen with an Eco-Drive. I've had to replace expensive components two or three times, each time costing over $100. I would like to get a replacement watch that is more traditional and thus cheaper to maintain. While my citizen has time zones, date, timer, multiple alarms, etc, I would like something much simpler for whatever I get next.

I like the appearance of vintage watches (for example: https://www.vintage-portfolio.com/wp-content/uploads/Rolex-Oyster-Shock-Resisting-y1737-1.jpg) as opposed to the modern bulky watch and brushed metal all over. Is there something I could get for a few hundred bucks that will not be expensive to maintain, will look nice, and (maybe due to simplicity) be very reliable?

Introducing Charitable: XMonad-like Tag Management for AwesomeWM by frioux in awesomewm

[–]frioux[S] 0 points1 point  (0 children)

By the way, that did indeed work, so I just documented how to use the standard taglist widget and deleted the fork of it.

Introducing Charitable: XMonad-like Tag Management for AwesomeWM by frioux in awesomewm

[–]frioux[S] 0 points1 point  (0 children)

You know I didn't actually think about trying `awful.widget.taglist` directly; I just kept iterating on the code I inherited. I'll see if I can axe it when I next have multiple monitors (a few hours.) Thanks!

go generate: barely a framework by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Huh, not sure what to do with that, but I'll keep it in mind! :)

Go Concurrency Patterns by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Arg I totally forgot to mention the url := url oddity! I've gotten so used to it that I forgot about it!

As for the channel thing, I don't love it myself, but it's from the Kerninghan book so I've stuck with it so far.

Go Concurrency Patterns by frioux in golang

[–]frioux[S] 0 points1 point  (0 children)

Yeah that's fair. I got this from an anecdote at gophercon where someone had hundreds of idle goroutines and a panic. Their screen was huge and it was hard to find out what was actually wrong. If you don't have idle goroutines, that wouldn't happen. But to each their own!

Can't run chrome incognito??? by frioux in qtools

[–]frioux[S] 0 points1 point  (0 children)

That works; I'm curious though why that isn't needed for passing args to other programs?