Mono appears to be dead. I enjoy making life hard so I dont use windows. I am trying to learn very simple c# but am having trouble gettung visual studio to run anything on linux (debian/mint). It wont even run with dotnet in the terminal either. I dont really like all the features in vs either, i just want simple.

For reference im learning with the yellow book by rob miles. I want to learn the old way, not using a bunch of shiny helping tools (i never feel i really learn with those and it stunts my growth).

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 hours ago

    FWIW Here’s similar go code (converted by a llm).

    func TestReplyAlreadyBookmarked(t *testing.T) {
        var reply PostReply
        err := db.Raw(`
            SELECT pr.* FROM post_replies pr 
            WHERE pr.id IN (
                SELECT post_reply_id FROM post_reply_bookmark WHERE user_id = ?
            ) AND pr.deleted = false 
            LIMIT 1
        `, userID).First(&reply).Error
        
        if err == nil {
            err := putReplySave(auth, map[string]interface{}{
                "comment_id": reply.ID,
                "save":       true,
            })
            
            assert.Error(t, err)
            assert.Equal(t, "This comment has already been bookmarked.", err.Error())
        }
    }
    

    You can create in-line data structures AND be a properly typed language.