Komunitas
lemmygrad.ml
I know people that worked on golang and chromium outside of google and then tell me how difficult it is working on it because Google has final decision making power on those projects even though they’re open source.
Komunitas
feddit.de
Yep that would be me :) There is also an independent implementation for golang, which even does compression iirc (there is also a golang implementation by me but don’t use that. It’s way way slower than the other one and unmaintained since I switched to rust development)
Komunitas
startrek.website
I had to install Golang and build it myself to make it work with my version of glibc. But in the end the themes aren’t rendered properly. In other words, proper Linux experience.
Komunitas
programming.dev
I feel like you may have missed the point, then? Or at least interpreted the article very differently? Rust isn’t “strictly” a systems language, but neither is C or C++; people use them for application development all the time. But all three languages have very specific limitations (most obviously, that adding a garbage collector would be an unwelcome change) imposed by the need to fulfill the “systems” niche. Compare Golang: it can’t replace C++ for every use-case, because it has a garbage collector, and because you need cgo to use FFI. But it’s otherwise a very flexible language that can be used for most types of software. What I would like to see is something that shares these advantages with Go: quick to build easier to teach & learn than Rust easier to quickly prototype with than Rust (though of course it’s debatable how well Go does at this one) …but I don’t like the actual language design of Go, and I think it’s possible to design a language that’s more Rusty but still simpler than actual Rust. For instance, error handling in Rust is both more ergonomic and more rigorous than in Go. That’s huge! A language like Go but with sum types, Result, and the question-mark operator would be leaps and bounds nicer than Go itself. To be clear, I don’t imagine that a “smaller Rust” would replace Rust. But I also don’t think we’ve reached optimal language design when the language I’d pick to write an OS is also the language I’d pick to write a small CLI app.
Komunitas
programming.dev
My least favorite part of Go, by far, is the capitalization as struct member visibility thing. That and the not super great json encoding annotations. Here’s a sample: type Change struct { Path string `json:"path"` Category string `json:"category"` // change, append, create, delete Position int64 `json:"position"` Size int64 `json:"size"` OriginalChecksum string `json:"original_checksum"` UpdatedChecksum string `json:"updated_checksum"` UnixTimestamp int64 `json:"unix_timestamp"` Data []byte `json:"data"` MatchedRules []Rule `json:"matched_rules"` } I would take explicit public declarators any day
Komunitas
lemmygrad.ml
I tried Homebrew once in a VM and didn’t like it, I felt it was too invasive. https://github.com/Homebrew/install/blob/85c5f4b57452dbd1c7ebc01a021548d2ceaf2b64/install.sh#L173 Why does it create another user and put files under /home/linuxbrew/? Answer: The script installs Homebrew to its default, supported, best prefix (/opt/homebrew for Apple Silicon, /usr/local for macOS Intel and /home/linuxbrew/.linuxbrew for Linux) so that you don’t need sudo after Homebrew’s initial installation when you brew install. Where’s the logic in that? Why not just install to the user’s home directory so that you don’t even need root access in the first place? https://github.com/Homebrew/install/blob/85c5f4b57452dbd1c7ebc01a021548d2ceaf2b64/install.sh#L222 Why is sudo hard-coded? Answer: it’s to prevent people from using doas and other sudo alternatives. https://docs.brew.sh/Installation#untar-anywhere-unsupported Why is installing from the tarball unsupported and so frowned upon? FFS isn’t this just supposed to be a package manager? Why is everything so complicated and opinionated when compared to pip, cargo, Flatpak, etc? Compare this mess to Golang’s install and uninstall process where you literally just need to tar -xzf a file or rm -rf a directory.
Komunitas
beehaw.org
EDITL Lemmy-UI deleted my !@#$#% links because I used the standard Markdown of less than and greater than symbols for a link. 1.) https://overengineer.dev/blog/2019/01/13/activitypub-final-thoughts-one-year-later.html https://gist.github.com/jdarcy/60107fe4e653819138396257df302eef 2.) https://beehaw.org/comment/1178543 https://beehaw.org/post/7278522 https://beehaw.org/post/980868 https://beehaw.org/post/7776438 ::: spoiler My comment on a deleted post These are my opinions, probably not shared with others and surely not the end all be all to ‘why not Rust?’ Rust is hard. Rust is slow to iterate with and compile. Here’s a highlevel overview of the things you’d need to learn to effectively understand Rust code; not even speaking to learning enough of that to write it. Rust gets touted as secure, and it is more secure than other low level languages like C/C++. That does not make it invulnerable to exploits. It gives a false sense of security to developers who think My app can’t be hacked, it’s written in Rust!!. While Rust is better at memory management and protecting against run time errors related to memory issues, that doesn’t make it 100% safe. That removes almost one class of potential exploits, not all of them, and can’t protect the developer against other developer created issues. Rust code is still written by people. People still write insecure code even in Rust. Computers are dumb as hell; but fast. People are smart as hell, but SLOW. Combine the two and you get stupid things faster; not smarter things better. Rust development is hard, hard to learn, very hard to do right Rust is not suited for a web application. Would you tell someone to go write the web application and web page in C/C++? Nope. There’s a reason for that. Not suited to it. Square peg, round hole There’s always exploits being discovered. Rust handles some things better, but uhhh… Go look at some Lemmy Rust code. Definitely still has vulnerabilities; Rust won’t save you from yourself. Something like Golang is much better choice for development of a web service that has sane API handling. By the time to add in more error handling, more type checking, more passing around of this function or that data, and more checking it on the sender and receiver side…etc. By the time you’re writing Rust safely and correctly; it is much slower than what you may be lead to believe. Go is primarily designed for speed of development (including compilation times), rather than speed of execution. Go programmers tend to value clear code over fast code. Why does a microsecond longer matter for a website? Maybe in some backend PLC land there’s a damn good use for that performance. For a networked web application; it’s a pointless metric. That is not going to be your bottleneck. Rust is hard to understand just reading it let alone determine why it’s doing something. Rust fn does_what(n: u64) -> bool { match n { 0...1 => false, _ => !(2..n).any(|d| n % d == 0), } } Golang func doesWhat(value int) bool { for i := 2; i <= int(math.Floor(float64(value)/2)); i++ { if value %i == 0 { return false } } return value > 1 } Not talking about the functionality merits of the two, but in comparing the _code itself. One of those is much easier to determine what’s going on and what it should be doing versus the other. I don’t feel like fighting my code. Programming is a tool to help. If it takes more work to use the tool to achieve your goal, it’s the wrong tool. Rust is the wrong tool for web development. :::
Komunitas
programming.dev
Today I learned GoLang has no class. Neat! Thanks. Sincerely. I’ve been coding casually in GoLang for years without noticing. (I don’t use classes, because classes suck.) Apparently GoLang does at least have interfaces, which are like classes that don’t suck. That’s probably why I didn’t notice. https://www.geeksforgeeks.org/class-and-object-in-golang/#
Komunitas
lemmy.today
Or at the very fucking least require specific versions with checksums, like golang.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.
Komunitas
feddit.de
And Pike wrote this passage in the very article you mentioned: (For those who object that dot files serve a purpose, I don’t dispute that but counter that it’s the files that serve the purpose, not the convention for their names. They could just as easily be in $HOME/cfg or $HOME/lib, which is what we did in Plan 9, which had no dot files. Lessons can be learned.) And guess what, there is actually such a directory on most Unix-derived OS nowadays - $XDG_DATA_HOME/$XDG_CACHE_HOME, which Go could just honour if the environment variable was set and fallback to cluttering $HOME. But no, they insist on their insular solution…
Komunitas
lemmy.ml
Lihat kiriman asli pada platform media sosial terkait.