firelizzard

joined 1 year ago
[–] firelizzard@programming.dev 11 points 1 week ago (1 children)

The way you wrote it, it sounds like you’re saying, “The FSF is worthless because they didn’t respond to me.” Which may not be what you meant but it still comes across as rather conceited. I don’t see how them not responding to you about your random project is at all relevant to whether the FSF is useful to the FLOSS community.

[–] firelizzard@programming.dev 1 points 2 weeks ago

It’s not clear to me that AMD is in breach of contract, though I admit I haven’t looked into it in detail. But regardless, the contract is irrelevant to the open source thing unless that was in the terms of the contract.

[–] firelizzard@programming.dev 5 points 2 weeks ago (2 children)

If I steal code and release it with an open source license, that license is not valid. The author released his work open source based on an email from AMD. AMD is now saying that email was not legally binding thus the author did not have the right to release it under and open source license thus that license was not legally valid. If you had forked it and continued to use it, AMD could take you to court and say that the license you are operating under is legally invalid.

[–] firelizzard@programming.dev 1 points 1 month ago (1 children)

Obscurity is not real security

[–] firelizzard@programming.dev 2 points 1 month ago* (last edited 1 month ago)

if you work in a shared codebase then PLEASE just follow whatever convention they have decided on, for the sake of everyone’s sanity.

That goes without saying; I'm not a barbarian.

“readability” is subjective. much like how there is no objective definition of “clean code”.

Did you not see the part where I said it's less readable "in my opinion"?

i am insisting that people use a common standard regardless of your opinion on it.

I can read this one of two ways: either you're making an assertion about what people are currently doing, or you're telling me/others what to do. In the first case, you're wrong. I've seen many examples of self-closed tags in the open source projects I've contributed to and/or read through. In the second case, IDGAF about your opinion. When I contribute to an existing project I'll do what they do, but if I'm the lead engineer starting a new project I'll do what I think is the most readable unless the team overwhelmingly opposes me, 'standards' be damned, your opinion be damned.

The spec says self-closing is "unnecessary and has no effect of any kind" and "should be used only with caution". That does not constitute a specification nor a standard - it's a recommendation. And I don't find that compelling. I'm not going to be a prima donna. I'm not going to force my opinions on a project I'm contributing to or a team I'm working with, but if I'm the one setting the standards for a project, I'm going to choose the ones that make the most sense to me.

[–] firelizzard@programming.dev 1 points 1 month ago

Sorry, I forgot about this. I've attached my full configuration at the end. The steps are:

  1. If the container is on a server, SSH to it or whatever.
  2. Execute docker exec --privileged -it container_name bash.
    • --privileged is required to make delve work. I don't entirely remember why.
    • -it is something like --interactive and --terminal, it's what you need to get a proper interactive shell.
    • container_name is the name of your container.
    • bash can also be sh or pwsh or whatever shell your container has (hopefully it has one).
  3. Launch delve dlv attach PID --headless --listen=:2345 --accept-multiclient --api-version=2.
    • PID is the ID of the process you want to debug. This should be 1 if you're debugging the main process of the container.
    • --listen=:2345 says to listen on (TCP) port 2345 on all interfaces (0.0.0.0)
    • The other flags are the one that vscode-go expects.
  4. If the container is on a server, forward ports ssh ${USER}@${SERVER} -NL LOCAL:2345:REMOTE:2345.
    • LOCAL is the local IP to listen on, usually localhost. When a process connects to your local IP, it will be forwarded to the remote.
    • REMOTE is the remote IP to connect to, this should be the IP of your container. When a connection is forwarded from your local machine, this is where it is forwarded to. My containers are set up with --net host so I can use localhost as REMOTE but that's not the default so you may have to use docker inspect to figure out your container's IP.

I also included the path substitution configs I use. I generally debug these by pausing the target, clicking on something in the stack trace, seeing what path it tries to load, then adjusting the substitute path so that it loads the correct file.

{
  "name": "Attach to a docker container",
  // Get a shell in the container: `docker exec --privileged -it ${NAME} bash`
  // Launch delve:                 `dlv attach 1 --headless --listen=:2345 --accept-multiclient --api-version=2`
  // Forward the port (if remote): `ssh ${USER}@${SERVER} -NL localhost:2345:localhost:2345`
  // Then run this debug config
  "presentation": {
    "group": "99-Miscellaneous",
  },
  "type": "go",
  "request": "attach",
  "mode": "remote",
  "remotePath": "${workspaceFolder}",
  "port": 2345,
  "host": "127.0.0.1",
  "substitutePath": [
    // // Full paths (GitLab Docker build)
    // {
    //   "to": "/go/",
    //   "from": "${env:HOME}/go/", // <-- MODIFY THIS if you're not using the default GOPATH
    // },
    // {
    //   "to": "/root/",
    //   "from": "${workspaceFolder}",
    // },
    // Trimmed paths
    {
      "to": "gitlab.com/accumulatenetwork/accumulate/",
      "from": "${workspaceFolder}/",
    },
    {
      "to": "github.com/AccumulateNetwork/",
      "from": "${env:HOME}/go/pkg/mod/github.com/!accumulate!network/", // <-- MODIFY THIS if you're not using the default GOPATH
    },
    // {
    //   "to": "",
    //   "from": "${env:HOME}/go/pkg/mod/", // <-- MODIFY THIS if you're not using the default GOPATH
    // },
  ],
}
[–] firelizzard@programming.dev 2 points 1 month ago (2 children)

The TL;DR is that you have to exec —privileged and execute dlv attach within the container then tell VSCode to connect. I’ll look up my notes tomorrow and post more details.

[–] firelizzard@programming.dev 2 points 1 month ago (4 children)

Attaching to and debugging a process most certainly does work. I did it yesterday. Your issue is that Go doesn’t have any way of telling the process to pause until a debugger attaches. Which is frustrating but not the same issue.

Specifically for debugging stdin, by far the easiest way to do that (in VSCode) is "console": "integratedTerminal". Another comment links a stack overflow answer that includes other options.

[–] firelizzard@programming.dev 2 points 1 month ago (4 children)

If a spec tells me I should do something that makes my code less readable in my opinion I am going to ignore the spec every time.

[–] firelizzard@programming.dev 4 points 1 month ago

AppArmor is part of the kernel. Why does it require patches?

[–] firelizzard@programming.dev 1 points 1 month ago

GitLab, Inc is a business and it’s not run by idiots. If federation was going to make them a bunch of money, they’d put a team on it. Relying on an outside group to execute your business goals is terrible management. It’s clear federation is not one of their business goals.

[–] firelizzard@programming.dev 1 points 1 month ago (2 children)

They may advertise it, but they’d be working on it themselves if they thought it would bring in serious revenue.

 

I exclusively use Visual Studio Code for editing code. I primarily work with Go, and a little bit with JavaScript/TypeScript, but I need to do some C# work.

I have no interest in using Microsoft's proprietary C# Dev Kit or dealing with their licensing terms. What capabilities am I losing? The marketing materials for the dev kit talk about a lot of stuff that appear to be features of the open source C# extension, so it's unclear which features are actually exclusive to the dev kit.

 

Why is crypto.subtle.digest designed to return a promise?

Every other system I've ever worked with has the signature hash(bytes) => bytes, yet whatever committee designed the Subtle Crypto API decided that the browser version should return a promise. Why? I've looked around but I've never found any discussion on the motivation behind that.

 

Not sure if this is the right community, but I didn't see a general one. What search engine do you use? Besides Google increasingly spying on its users, the quality of its search results seems to have gotten significantly worse over the last decade. What search engine(s) do you use?

 

I am a self-taught programmer and I do not have imposter syndrome. I have a degree in electrical engineering and when I thought that was going to be my career I did have imposter syndrome, so I'm not immune. I wonder if there's a correlation. It seems that many if not most professionals suffer from imposter syndrome; I wonder if that's related to the way they learned.

When I say self-taught, I don't mean I never took a class, I mean the majority of my programming skill was learned by doing/outside of classes. I took a Java class in high school that helped me graduate from procedural languages to OOP, and I took classes in college but with few exceptions the ones that were practical (vs theoretical) covered material I already knew.

 

My last job was at a company that designed and built satellites to order. There was a well defined process for this, and systems engineers were a big part of it. Maybe my experience there is distorting my perspective, but it seems to me that any sufficiently complex project needs to include systems engineering, even if the person doing that is not called a systems engineer. Yet as far as I can tell, it isn't really a thing in the software industry. When I look at job postings and "about us" blog posts about how a company operates, I don't see systems engineering mentioned. Am I just not seeing it, is it called something else, or is the majority of the industry somehow operating without it?

 

I am not hating on Rust. I am honestly looking for reasons why I should learn and use Rust. Currently, I am a Go developer. I haven’t touched any other language for years, except JavaScript for occasional front end work and other languages for OSS contributions.

After working with almost every mainstream language over the years and flitting between them on a whim, I have fallen in love with Go. It feels like ‘home’ to me - it’s comfortable and I enjoy working with it and I have little motivation to use anything else. I rage every time I get stuck working with JavaScript because dependency management is pure hell when dealing with the intersection of packages and browsers - by contrast, dependency management is a breeze with Go modules. I’ll grant that it can suck when using private packages, but I everything I work on is open.

Rust is intriguing. Controlling the lifecycle of variables in detail appeals to me. I don’t mind garbage collectors but Rust’s approach seems far more elegant. The main issue for me is the syntax, specifically generic types, traits, and lifetimes. It looks just about as bad as C++'s template system, minus the latter’s awful compiler errors. After working almost exclusively with Go for years, reading it seems unnecessarily demanding. And IMO the only thing more important than readability is whether it works.

Why should I learn and use rust?

P.S.: I don’t care about political stuff like “Because Google sucks”. I see no evidence that Google is controlling the project. And I’m not interested in “Because Go sucks” opinions - it should be obvious that I disagree.

 

I've started noticing articles and YouTube videos touting the benefits of branchless programming, making it sound like this is a hot new technique (or maybe a hot old technique) that everyone should be using. But it seems like it's only really applicable to data processing applications (as opposed to general programming) and there are very few times in my career where I've needed to use, much less optimize, data processing code. And when I do, I use someone else's library.

How often does branchless programming actually matter in the day to day life of an average developer?

 

I am an experienced developer, but not an experienced manager. I'd prefer if organizing tasks was not my responsibility, but I work at a small company and no one else is inclined to do it. How do you organize miscellaneous tasks when using a task management system such as Jira? We're using GitLab, but it has the same basic features, such as epics, milestones, tasks, and subtasks.

I don't want to have miscellaneous tasks floating around in the ether, because things like that tend to get lost. But an epic is supposed to have a well-defined end goal, right? A good epic is something like "Implement this complex feature" or "Reach this level of maturity" - not "Miscellaneous stuff".

The majority of the work we do fits fairly clearly into specific goals, such as "Release the next version of feature." But what about bug fixes and other random improvements and miscellaneous tasks? How do you keep those organized?

view more: next ›