Komunitas
lemmy.world
I was a huge C++ fan back when I was doing a bunch of competitive programming. If I need a performant project nowadays, I look to golang first. It gives me the speed of a compiled language with the usability of high-level language. I still solve the occasional Advent of Code in C++, though :)
Komunitas
reddthat.com
I had some free time this weekend and I’ve spent some of it trying to learn Go since mlmym seems to be unmaintained and I’d like to try to fix some issues in it. I ran into a stumbling block that took a while to solve and which I had trouble finding relevant search results for. I’ve got it solved now, but felt like writing this up in case it helps anyone else out. When running most go commands I tried (e.g. go mod init example/hello or go run hello.go or even something as seemingly innocuous as go doc cmd/compile when a go.mod file exists) the command would hang for a rather long time. In most cases, that was about 20~30 seconds, but in one case – trying to get it to output the docs about the compile tool – it took 1 minute and 15 seconds! This was on a relatively fresh Linux Mint install on old, but fairly decent hardware using golang-1.23 (installed from apt). After the long wait, it would print out go: RLock go.mod: no locks available – and might or might not do anything else depending on the command. (I did get documentation out after the 1min+ wait, for example.) Now, there’s no good reason I could think of why printing out some documentation or running Hello World should take that long, so I tried looking at what was going on with strace --relative-timestamps go run hello.go > trace.txt 2>&1 and found this in the output file: 0.000045 flock(3, LOCK_SH) = -1 ENOLCK (No locks available) 25.059805 clock_gettime(CLOCK_MONOTONIC, {tv_sec=3691, tv_nsec=443533733}) = 0 It was hanging on flock for 25 seconds (before calling clock_gettime). The directory I was running in was from an NFS mount which was using NFSv3 unintentionally. File locking does not work on NFSv3 out of the box. In my case, changing the configuration to allow it to use NFSv4 was the fix I needed. After making the change a clean Hello World build takes ~5 seconds – and a fraction of a second with cache. After solving it, I’ve found out that there are some issues related to this open already (with a different error message – cmd/go: "RLock …: Function not implemented") and a reply on an old StackOverflow about a similiar issue from one of the developers encouraging people to file a new issue if they can’t find a workaround (like I did). For future reference, those links are: https://github.com/golang/go/issues/37461 https://github.com/golang/go/issues/48572 https://stackoverflow.com/questions/68725100/rlock-storage-8d8b-150e-github-com-my-username-app-go-mod-function-not-impleme/68728663#68728663
Komunitas
lemmy.world
Oh, it’s all still Kubernetes YAML. The difference is in how it’s represented. Helm Charts are packaged Golang templates of Kubernetes YAML, and as such have a whole lot of limitation since the only logic you can put into them is Golang template logic. This is still Kubernetes YAML, but instead you write any program you want to return the YAML, as long as it fits in the sandbox, so it’s pretty open-ended. For example, as a stretch goal, I might add an engine to it that could recompile Helm Charts into Mistletoe Modules.
Komunitas
sh.itjust.works
Ok, figured it out. For those in similar cases, you MUST first search the community in the search bar here. Searching [email protected] only returned this thread initially, but after a few seconds the community appears in the search results. From there, the community will sync here and will be visible here, with new posts appearing over time (afaik it doesn’t sync existing posts, only new ones). Hope this clears up the process for the next persons in my position :)
Komunitas
sh.itjust.works
For systems programming it makes the most sense out of the languages you mentioned. Languages requiring a runtime (Java/Python) do not fill the bill for system tools IMO. Golang is more arguable, but its memory safety comes through GC which many systems programmers aren’t fans of for a variety of technical and personal reasons. Rust is meant to be what C++ would be if it were designed today by opiniated system developers and didn’t have to be backwards-compatible. Those are the technical arguments I would use in a corporate setting. All that aside, there’s personal preference, and my point is that for FOSS projects that matters too. Rust is fun in a brain-teasy kind of way in the same way that writing C is fun, but without nearly as many footguns. Golang is practical but arguably not as fun. That’s the same logic that draws many programmers to write Haskell projects. The story of the Fish shell illustrates it quite well; the project gained a lot of development attention and contributions when they decided to rewrite from C++ to Rust, where they achieved a stable release with feature-parity a few months ago. It would have been a remarkably dumb decision for a private company to make, but makes perfect sense when you are trying to attract free talent.
Komunitas
bolha.us
Putz travei nos estudos de @golang simplesmente não está funcionando, mas tb não dá erro ahahah responde qq endpoint da minha API com o mesmo, mesmo que seja um endpoint que não existe ele retorna sempre o mesmo valor, no qual deveria, já que não existe, ser um 404. Não sei o que estou fazendo de errado, mas tá foda hahahah Quebrando a cabeça aqui.
Komunitas
lemmy.ml
I think, and this is by no means intended to be disrespectful, golang attracts a lot of programmers that do not want to learn a lot of things. They just want to write something down and it be fast, they don’t mind edgecases, security bugs, performance bottlenecks and all that stuff. A JS dev that was called “scriptkiddie” some years ago might now be a go developer. And there’s nothing wrong with that, IMO… What bugs me all the time though is that they claim that golang is the superior language and should be used for allthethings^tm. It should definitively not. On the other hand, I don’t claim that Rust should be used for all the things (I sometimes claim for the memes, to be honest, but that’s not too serious). It definitively has a learning curve and sometimes writing down your 50 LOC of Ruby/Python/Bash might be a better choice. But (as the tagline once was), Rust is good when it matters. And it matters often (IMO).
Komunitas
lemmy.ca
System: Linux Mint 22.1 Xfce, with the following golang files installed. ::: spoiler Screenshot ::: I’d like to install meme https://www.linuxlinks.com/linux-candy-meme-fun-tool-create-memes/ https://github.com/nomad-software/meme But when I try the installation instruction from the GitHub page, I get $ go get -u -v github.com/nomad-software/meme go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. When I replace get with install, I get: $ go install -u -v github.com/nomad-software/meme flag provided but not defined: -u usage: go install [build flags] [packages] Run 'go help install' for details. go help install returns an overwhelming amount of info I don’t understand. There is no package in the repo, and no .deb or .appimage on the GitHub Releases page. (I don’t do Flatpaks on this machine.) Any tips on how I can get this program to install? Thanks EDIT I’ve got a little further now. $ go install github.com/nomad-software/meme@latest go: downloading github.com/nomad-software/meme v1.0.2 go: downloading github.com/fatih/color v1.15.0 go: downloading github.com/mitchellh/go-homedir v1.1.0 go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 go: downloading github.com/mattn/go-colorable v0.1.13 go: downloading github.com/mattn/go-isatty v0.0.19 go: downloading github.com/fogleman/gg v1.3.0 go: downloading golang.org/x/sys v0.12.0 go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 go: downloading golang.org/x/image v0.12.0 But: $ meme -h Command 'meme' not found, did you mean: command 'mme' from deb plc-utils-extra (0.0.6+git20230504.1ba7d5a0-1) command 'mame' from deb mame (0.261+dfsg.1-1) command 'memo' from deb memo (1.7.1-5) Try: sudo apt install EDIT 2: To get it working: Go to my home directory Show hidden files Open .bashrc in a text editor Add the following at the end of the file # meme path export PATH="$HOME/go/bin:$PATH" Save the .bashrc file Now I can open a terminal and use the program. :) Thanks to [email protected]
Komunitas
ohai.social
@datarama @corbin The Go compiler requires reproducible builds based on a small set of well-defined inputs, if the LLM cannot give the same answer for the same question each time it is asked, then it is not compatible with use in the Go compiler. This includes optimizations – the bits should be identical. #golang
Komunitas
sopuli.xyz
https://www.linkedin.com/posts/anmol-agarwal-674a21166_language-activity-7319042198430195712-vVJy
Komunitas
sopuli.xyz
URL: https://www.linkedin.com/posts/absami_golang-nodejs-devhumor-activity-7316531911126933505-kH
Komunitas
lemmy.bestiver.se
Comments
Komunitas
lemm.ee
Lista: | Nome | Autor | Instalações | |-----------------------------------------|--------------------|------------| | Prettier — Code for VSCode | by prettier | 955K | | Discord Rich Presence for VS Code | by Mark H | 189K | | Rojo — Roblox Studio Sync | by evaera | 117K | | Solidity Compiler | by VSCode Developer| 1.3K | | Claude AI | by Mark H | - | | Golang Compiler | by Mark H | - | | ChatGPT Agent for VSCode | by Mark H | - | | HTML Obfuscator | by Mark H | - | | Python Obfuscator for VSCode | by Mark H | - | | Rust Compiler for VSCode | by Mark H | - |
Komunitas
lemm.ee
TLDR Create an email mapped to your webhook, the webhook will be called when an email will be received. It reacts instantly to emails. Check out the 1min demo in odysee https://odysee.com/@jostiniane:a/gossip_dispatch:3 Long Story I tried to share this previously in Reddit & HN but got 0 attention. I was hoping I could get some feedback here. When I created this, I envisaged at least two use cases: (main one for my workplace) Plug the generated email(s) into the monitoring system to create tickets in the project management software you are using when an alert is triggered (for open source projects) Embed/Share the generated email with your users and have the email bug reports transformed into gitlab/gitea/github issues (it could serve as a starting point for an open source business automation software) This is in a very early stage, I am more than open to feature requests. I have have a bunch of improvements planned but would like to see if there’s some interest first. The project source is in gitea.v3m.net which is not public, I am open to creating a public mirror in your favorite public place (gitlab.com, github.com, …). I am also open to having the current instance serving right from your open source subdomain for those interested. registration link: https://g.v3m.net/user/register (zero tracking just plain golang + htmx)
Komunitas
programming.dev
In applications where I’ve needed this, I’ve taken a manual approach. Structure the function to return a single Result struct (including an error field), develop a convention for mapping function inputs to a string, then add reads & writes to a map[string]*Result which allows me to return cached values as a shortcut. No idea if it’s the most efficient way, I’ve not actually considered finding a package to handle the process. Edit: For more advanced behavior, what are your thoughts on the official memoize package?
Komunitas
lemmy.ml
Omg. It’s even written in golang It’s so spanky new. Look at the recent commits. Thank you!!
Komunitas
lemmy.ml
Edit 2025-04-09 16:42Z - article was updated with a tenth package (Prettier - Code) A set of ten VSCode extensions on Microsoft’s Visual Studio Code Marketplace pose as legitimate development tools while infecting users with the XMRig cryptominer for Monero. ExtensionTotal researcher Yuval Ronen has uncovered ten VSCode extensions published on Microsoft’s portal on April 4, 2025. The package names are: Prettier - Code for VSCode (by prettier) - 486K installs Discord Rich Presence for VS Code (by Mark H) - 189K installs Rojo – Roblox Studio Sync (by evaera) - 117K installs Solidity Compiler (by VSCode Developer) - 1.3K installs Claude AI (by Mark H) Golang Compiler (by Mark H) ChatGPT Agent for VSCode (by Mark H) HTML Obfuscator (by Mark H) Python Obfuscator for VSCode (by Mark H) Rust Compiler for VSCode (by Mark H)
Komunitas
lemmygrad.ml
Why for open source? A lot of important libraries are open source and this for a very long time. Here we have compromised libraries in the npm repository. NodeJS is also used in closed source applications. A supply chain attack could also happen in python. Golang simply uses github, which offers a lot of possibilities for a compromise - also used in this supply chain attack. Difference is, that in NodeJS people use a lot of packages as dependencies. Even for stupid tasks like the legendary isEven. Its dependancy hell.
Komunitas
lemmy.ml
Edit 2025-04-09 16:42Z - article was updated with a tenth package (Prettier - Code) A set of ten VSCode extensions on Microsoft’s Visual Studio Code Marketplace pose as legitimate development tools while infecting users with the XMRig cryptominer for Monero. ExtensionTotal researcher Yuval Ronen has uncovered ten VSCode extensions published on Microsoft’s portal on April 4, 2025. The package names are: Prettier - Code for VSCode (by prettier) - 486K installs Discord Rich Presence for VS Code (by Mark H) - 189K installs Rojo – Roblox Studio Sync (by evaera) - 117K installs Solidity Compiler (by VSCode Developer) - 1.3K installs Claude AI (by Mark H) Golang Compiler (by Mark H) ChatGPT Agent for VSCode (by Mark H) HTML Obfuscator (by Mark H) Python Obfuscator for VSCode (by Mark H) Rust Compiler for VSCode (by Mark H)
Komunitas
awful.systems
There is enough of this shit that appeasement has no reason except making well meaning moderate centrists more comfortable, and they were never the audience. (despite their unshakable conviction they are the only audience.) dr. fatima’s video is good advice on comforting the comforted and nothing else. i commend to you my masto post with the more detailed version, and the responses thereto, e.g. the world we live in where the golang stdlib cryptography maintainer doesn’t know how to use ffmpeg and can’t be fucked to learn and so instead relies on slop