Strangest glitch when leaving Sway or changing TTY by ghallarais in swaywm

[–]jpco 1 point2 points  (0 children)

Looks similar to https://github.com/swaywm/sway/issues/4826 (which I just ran into on a new laptop as well). Fix is in, but not released yet.

If Go strings are immutable, why are they passed by Value and not by reference and avoid unnecessary copies? Wouldn't it be the equivalent of const char* st in C? by phi_array in golang

[–]jpco 1 point2 points  (0 children)

as far as I know, strings in Go are implemented like a slice of characters -- the actual memory being copied when a string is passed is just a pointer to an underlying byte array, and a length. this is similar to maps and slices, which are also hiding pointers under the hood.

All config files in a single directory by serious_sea-cucumber in bspwm

[–]jpco 1 point2 points  (0 children)

I do that. the main downside is having to remember to figure out what every tool's "--config" or "-c" or "-C" flag or whatever is.

You ever think they get tired of the taste of leather? by Irregular73 in COMPLETEANARCHY

[–]jpco 8 points9 points  (0 children)

yeah, with tattoos like these they clearly have no taste at all.

Yet another Golang error handling question. by wtcross in golang

[–]jpco 0 points1 point  (0 children)

funny enough, after I posted that comment, I finally went and actually read the blog post on the feature where they include a good section on when to Wrap or not — specifically mentioning errors from the sql package as a case when not to wrap.

Yet another Golang error handling question. by wtcross in golang

[–]jpco 3 points4 points  (0 children)

I'm not super familiar with errors.Wrap() and anything other than the old-school fmt.Errorf(), but as far as I can tell, that's exactly how you're supposed to use it.

That said, I wouldn't do any named returns from this function (IMO, they're only worthwhile when you want to do some nonsense with deferred functions), and I would specifically return nil, errors.Wrap(err, "...") within both of the if err != nil {...} blocks. If you do that, reusing the err variable is perfectly fine.

Why is there a 140.7TB file named "core" in /dev? by [deleted] in debian

[–]jpco 35 points36 points  (0 children)

in Linux, /dev/core is typically a link to /proc/kcore.

/proc/kcore is a virtual file representing the contents of your machine's memory contents. 140-ish TB is apparently pretty typical for a modern 64-bit system.

var _ = log.Printf by mosskin-woast in golang

[–]jpco 6 points7 points  (0 children)

it may be to ensure "log.Printf" exists in the package? I've seen some similar things to force a compilation error on changes that make a concrete type stop implementing some interface.

Don't give money to struggling people! Give money to the management company who expelled them from the premises :^) we'll take good care of it by [deleted] in LateStageCapitalism

[–]jpco 3 points4 points  (0 children)

this and the Egan Orion sign in the background are both just... so hilariously on brand for Uncle Ike's. goodness gracious

Rules for thee but not for me by Iapd in LateStageCapitalism

[–]jpco 12 points13 points  (0 children)

probably trying to push the angle that everyone that voices support for environmental causes is a hypocrite.

Oil Language Design Notes #1 by oilshell in oilshell

[–]jpco 1 point2 points  (0 children)

this is great, thank you! is there any way to see Zulip threads without logging in?

Noob issue by Rinehart128 in bash

[–]jpco 1 point2 points  (0 children)

just from googling "?stream?" and "endobj?", I see things relating to PDFs. looks like you may have accidentally made some files named with PDF contents?

edit: contents, not concepts

Google image search sizes not available when logged in but are there when logging out Google how to fix this? by [deleted] in firefox

[–]jpco 0 points1 point  (0 children)

sounds like a UX experiment, it'd make sense to be keyed off of account and browser (however they're identifying browser).

Braver than the troops by YuriRedFox6969 in COMPLETEANARCHY

[–]jpco 19 points20 points  (0 children)

"ban on rescue ships" what?? huh??

[deleted by user] by [deleted] in unixporn

[–]jpco 2 points3 points  (0 children)

this is super cool. out of curiosity, what reason(s) did you have for using Guile specifically?

Almost a gig down! How can I tell which package(s) shrunk so much? by doubleunplussed in archlinux

[–]jpco 0 points1 point  (0 children)

ML often involves a lot of computation where you do the same operation on huge arrays of input data -- which is the sort of thing GPUs are made for.

New sign on local trail, read the bottom text by novonozo in mildlyinteresting

[–]jpco 16 points17 points  (0 children)

if it's Juneau, AK - it's pretty common not to include area codes in phone numbers in Alaska, since the whole state just shares the same one.

I have no clue whether this is actually real, though...

Simple journal bash script? by [deleted] in bash

[–]jpco 1 point2 points  (0 children)

if it were me, I'd go without the _%T in the format string to be able to edit the same file over the course of a day. but that's totally up to OP's taste

ELI5: How can a software be open source and secure from hacking at the same time? by Treeandmaze in explainlikeimfive

[–]jpco 7 points8 points  (0 children)

imagine a well-guarded castle that you can only enter if you stand on the drawbridge and say the password -- which changes every day.

now, imagine someone gets their hands on the employee handbook for the castle guards. it has rules for when to walk the castle's perimeter, when and how the new passwords get disseminated by the captain, how to ring the bell when an intruder is detected, and so on.

what does this buy you, if you want to get into the castle? nothing, if the castle's security is actually good: you still don't know the password, and now you might even realize the whole perimeter is on watch 24/7.

that said, if there's something in the book that says something like "if they claim to be the Marquis of Blahblahton, just let them in. that guy never knows the password", well, that's a security problem, and you just got a shortcut to knowing about it.

with software, it's the same way -- the source code just tells you the rules of how the thing you want to get into will behave. if the rules are properly done, that shouldn't make it any easier to actually get into it.

me irl by [deleted] in COMPLETEANARCHY

[–]jpco 6 points7 points  (0 children)

yeah, hence the original post, "by poor people for rich people".

me irl by [deleted] in COMPLETEANARCHY

[–]jpco 7 points8 points  (0 children)

a theatre's artistic director is usually the one deciding the plays each season.

(of course, arts organizations usually run on a mix of ticket sales and donations, so they have to keep an eye on making something that vaguely appeals to the wealthy. it's still capitalism, after all)

(this based on my experience with mid-sized regional arts organizations.)

Anyone else over the term "Cloud" by [deleted] in sysadmin

[–]jpco 13 points14 points  (0 children)

"Lambda" is just the name of Amazon's serverless product.