|
gariig posted:If you got with option 1 every time someone calls IsShiny a *rand.Rand() has to be passed in even if shiny has been set. Agree. For bonus points, don't take rand.Rand but rather func() int. This will make the unit tests you are writing a lot more bearable.
|
# ¿ Sep 5, 2021 05:59 |
|
|
# ¿ May 5, 2024 21:13 |
|
30.5 Days posted:go is fuckin good
|
# ¿ Apr 6, 2022 00:52 |
|
The built in fully capable performant multi-threaded HTTP/2 server is a real selling point for me and the work I do. I guess everybody already knows Go is good at this, but I feel like I need to jump on the bandwagon here.
|
# ¿ Apr 15, 2022 04:07 |
|
Wow, I figured there were like zero people outside of Canonical who have ever read the MAAS code, but here we are. Sorry for your suffering, friend. We can all relate.
|
# ¿ Jun 21, 2022 04:35 |
|
How come nobody told me Go has generics now?
|
# ¿ Apr 10, 2023 23:22 |
|
Can anybody help me understand what I need to do in order to make "go get github.com/dirtbags/moth/pkg/jsend" work outside of that source tree? Like, I thought I was setting things up so other software could use that library, but apparently I'm missing something, because it tells me: code:
|
# ¿ Apr 11, 2023 23:58 |
|
Pham Nuwen posted:So you're trying to write software to use that jsend library? If you've done a `go mod init` in your code, you should be able to do `go get github.com/dirtbags/moth/pkg/jsend@v4.4.9` from within your code dir and it'll Just Work? Dirtbags is me. I'm trying to fix this Your link has me down some sort of path, maybe there's a working import at the end of it. Regarding copyright headers, what's the preferred way to denote that? I thought you just dropped LICENSE.md in the top level?
|
# ¿ Apr 12, 2023 01:05 |
|
Pham Nuwen posted:lol sorry for ripping on your code Ha. No worries, everything you said is true: I'm too battle-scarred to think my code is some paragon of design or anything. I appreciate the pointers! This will save me hours of head scratching and reading unrelated documents.
|
# ¿ Apr 12, 2023 03:01 |
|
DARPA posted:When I first started Whispers of the dead it popped up some help text I accidentally closed. Anything to know besides run the dungeons highlighted with red stars? Super curious about the answer now, op. Please keep us updated!
|
# ¿ Jun 21, 2023 14:27 |
|
fletcher posted:I have no idea what this go.senan.xyz host is, and wasn't sure about the security aspect of installing something from it. It seems somewhat like a "curl ... | bash" type of install that I'm not a fan of. Is that sort of recommendation typical for a go app? You'd rather compile and install source code you can't/won't review from GitHub than from the author's server? That is an interesting threat model.
|
# ¿ Aug 31, 2023 13:33 |
|
fletcher posted:more eyeballs on it in general. I just want to highlight that this has turned out to be one of the greatest fallacies about free software. Nothing against you in particular, OP: it's a commonly-held belief. In fact, if any college goons want a good master's project, try bringing some code up on GitHub, have some cohorts download it, then insert some super-blatant remote shell capabilities into it and see if any automated systems flag that. Maybe they do! I sort of suspect they won't, though. cruft fucked around with this message at 23:30 on Aug 31, 2023 |
# ¿ Aug 31, 2023 23:28 |
|
Can some kind soul help me out herecode:
I'm pretty sure the actual answer is "LOL it's not 1987 you have enough RAM to not care", but it's the principle of the thing, you see.
|
# ¿ Nov 7, 2023 16:42 |
|
|
# ¿ May 5, 2024 21:13 |
|
Pham Nuwen posted:Speaking of that, I'd ask if you really expect to have so many attendees and do so many lookups by both email and by username that it makes sense to duplicate them 3 different ways. My first instinct would be to just hold the slice of Attendees, then iterate for lookups. Iteration is cheaper than you think (especially in this case which won't even have nested loops), and a lot easier than mucking around with 3 different stored representations of the same data. Haha, great minds think alike, and so do ours! My Scheme training kicked in and I wound up doing exactly this: there's now a type AttendeeList []Attendee that provides some indexing functions by iterating over the slice. Thanks, everyone. Your replies did steer me toward a nice solution.
|
# ¿ Nov 9, 2023 16:59 |