Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

distortion park posted:

what's the godoc reason for comments having to end in periods? feels like a solution in search of a problem

forces you to write in complete sentences, such as this one: "."

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

pokeyman posted:

forces you to write in complete sentences, such as this one: "."

i don't understand why would that require someone to use sentences it doesn't make much sense at all if you think about it it's not even clear the complete sentences are necessary for producing good documentation in all cases but what do i know ._.

sb hermit
Dec 13, 2016





anime.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

leper khan posted:

i don't understand why would that require someone to use sentences it doesn't make much sense at all if you think about it it's not even clear the complete sentences are necessary for producing good documentation in all cases but what do i know ._.

ok my real answer in short is "makes u think" and in long is it prods people to expand empty/terse comments into full sentences, under the assumption that the former tends not to bother with trailing punctuation. the other day a coworker ran into an aws config linter that demanded a description string start with an uppercase letter and end with a period

if I added a new method to a public api and my local build failed with a "please document this with more than zero effort", I'd appreciate it

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
it's also the kind of lint rule that might lead people to contortions, I agree

like forums with minimum character limits on posts so people reply with "Yes! (added padding to get around the limit)"

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
The more rules we put on source code documentation at an old gig of mine the more obvious it became that English was the second or third language of at least half the dev team

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
Edit: Quote is not edit!

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



mystes posted:

You're going to love the next 100 incompatible npm replacements that are about to come out then!

its all trash. node is trash, javascript is trash, angular is trash, bootstrap is trash, html is trash, the web is trash.

mystes
May 31, 2006

Carthag Tuek posted:

its all trash. node is trash, javascript is trash, angular is trash, bootstrap is trash, html is trash, the web is trash.
Also computers and life but yes

Bloody
Mar 3, 2013

encourages you to delete your comments

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
i'm normally all in favor of having computers check things as much as possible instead of humans, but documentation seems like the sort of thing that unavoidably needs a human reviewing it.

ArcticZombie
Sep 15, 2010
anything that means I don’t have to make the same comments I’m sick of making on the PR gets a pass with me

Asleep Style
Oct 20, 2010

ArcticZombie posted:

anything that means I don’t have to make the same comments I’m sick of making on the PR gets a pass with me

this is 100% the point of linting and auto-formatting. no time wasted on the color of this particular bike shed, the pipeline passes or it doesn't

it was a huge pain to argue through all of this at work but now that it's in place reviewing PRs is much nicer

vanity slug
Jul 20, 2010


hey buddy

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

leper khan posted:

i don't understand why would that require someone to use sentences it doesn't make much sense at all if you think about it it's not even clear the complete sentences are necessary for producing good documentation in all cases but what do i know ._.

go’s linting rules for comments are:

code:
// ReaderToThing handles parsing a reader into a Thing
func ReaderToThing(r io.Reader) (Thing, error) {
where the comment has to start with the name of the function and describe what it does

in reality i see this a whole lot:

code:
// ReaderToThing…
func ReaderToThing(r io.Reader) (Thing, error) {
i like the idea of forcing full sentences because it makes the author think about a function’s intent in human ideas rather than computer instructions

Blinkz0rz fucked around with this message at 01:05 on Jul 28, 2022

sb hermit
Dec 13, 2016





it I had comment rules that demanded full sentences then the end result would be no comments

and people would say that the code is self-documenting

sb hermit
Dec 13, 2016





also, at this point, forget about commenting out test code for quick fixes, or putting in an example of how to call an API. Even pseudocode would get dinged.

For pseudocode or example api calls, I would scrap the "complete sentence" requirements.

barkbell
Apr 14, 2006

woof
new guy on the team opened his first pr to change all the linting rules because he didnt like them. what a power move

sb hermit
Dec 13, 2016





:golfclap:

outhole surfer
Mar 18, 2003

plot twist: no linter was currently being used and the new guy was proposing they try one out

outhole surfer
Mar 18, 2003

i actually had an old hand make an argument like that when i joined a past gig. sysadmin type work, everything was managed directly from his workstation and only occasionally in any form of source control. i started an ansible repo that described a single file i was deploying to hosts (to act as a starting point for collab and test the waters) and he raised hell up the flag pole that i was trying to change all his workflows on day one.

barkbell
Apr 14, 2006

woof
the best change was screen print width from 80 to 100. huge value

outhole surfer
Mar 18, 2003

barkbell posted:

the best change was screen print width from 80 to 100. huge value

as someone who has been too lazy to reconfigure default terminal width for a couple decades now, i'd have to agree with you. that's a wtf pr right there.

Xarn
Jun 26, 2015

Blinkz0rz posted:

go’s linting rules for comments are:

code:
// ReaderToThing handles parsing a reader into a Thing
func ReaderToThing(r io.Reader) (Thing, error) {
where the comment has to start with the name of the function and describe what it does

in reality i see this a whole lot:

code:
// ReaderToThing…
func ReaderToThing(r io.Reader) (Thing, error) {
i like the idea of forcing full sentences because it makes the author think about a function’s intent in human ideas rather than computer instructions

Repeating the function name as the first thing is stupid. The name is already right there.

Soricidus
Oct 21, 2010
freedom-hating statist shill
the only linter you need for golang is rm -rf

tazjin
Jul 24, 2015


cargo is a piece of poo poo

it's crazy how bad it is in contrast to how good rust is, overall. but cargo loving sucks

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

tazjin posted:

cargo is a piece of poo poo

it's crazy how bad it is in contrast to how good rust is, overall. but cargo loving sucks

i've only used it twice for small-ish programs. When does it go into terribad territory?

tazjin
Jul 24, 2015


champagne posting posted:

i've only used it twice for small-ish programs. When does it go into terribad territory?

cargo has a happy flow:

write a simple program downloading a bunch of dependencies on a single machine (probably ideally a mac, as that is what every developer uses!), never do builds anywhere else, hope that nothing in your environment is "weird"

it gets into bad territory if you have literally any other situation, and it usually breaks in astounding ways.

right now i'm having some problem with its libgit implementation being unable to update the package index (which is a multi-gigabyte github repo it clones to your machine!!!) and throwing absurd error messages ('target OID for the reference doesn't exist on the repository; class=Reference (4)'), there being no manual override for when to do this updating (i already have this crap locally!! just use the files on my disk!!!), and all previous workarounds that people have posted in obscure stackoverflow posts being "deprecated" in cargo itself.

there's a reason that in many "serious" uses of rust people have replaced the build system with something else, but i just want to build a stupid tiny program i already have, not write yet another rust build system.

tazjin
Jul 24, 2015


it also has utterly terrible artifact caching logic, literally babby's first artifact cache, and it's impossible to disable any of its crazy behaviours that are tailored to whatever workflow its original developers (who i think all came from js/ruby) were thinking about

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

well, :cripes:

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

speaking of rust, how many projects are there that actually have rust as a compilation target?

because i was following this f#-to-js project, and they recently made it possible to write alternative backends for it, and well... i think people are going a little bit too crazy with it :catstare:

https://fable.io/blog/2022/2022-06-06-Snake_Island_alpha.html

demo here

ok sure, it's just an extra module and won't impact the main JS project, and python kinda makes sense, but still... php?

NihilCredo fucked around with this message at 12:01 on Jul 28, 2022

Zlodo
Nov 25, 2006
is there any language package manager which isn't a huge pile of crap

tazjin
Jul 24, 2015


Zlodo posted:

is there any language package manager which isn't a huge pile of crap

lol

MononcQc
May 29, 2007

Zlodo posted:

is there any language package manager which isn't a huge pile of crap

I've found this to be an impossible task because you invariably have users who want a zero-setup "just works by picking the name of the package" approach who will be sitting in the same room as "wants web-of-trust with supply chain audit reports" and they'll work on the same project, with all their packages versioned 0.0.1 and asking for semver to resolve all issues.

You can get decent results for specific use cases, but there's no good universal management because some things are in tension forever: eg. providing namespaces for packages tends to create more forking, whereas having a single global namespace leads to consolidation of drivers and libraries. People will want to work on their own publishable fork, but doing so will create an ecosystemic effect where packages get diluted, which makes other users complain.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
yeah I've been happily running cargo for years and never ran into any of the weird libgit issues tazjin is reporting. it seems like you can have really terrible luck with this kind of tooling and then everything seems to suck (or, in fact, DOES suck) but I haven't had that experience.

tazjin
Jul 24, 2015


Sagacity posted:

yeah I've been happily running cargo for years and never ran into any of the weird libgit issues tazjin is reporting. it seems like you can have really terrible luck with this kind of tooling and then everything seems to suck (or, in fact, DOES suck) but I haven't had that experience.

the libgit crap is just today's cargo issue, in a month i can probably collect 5 of these. my curse is that all software i use breaks in crazy ways all of the time, but it is a lucrative curse if you know how to utilise it (and can replenish the nerves it costs regularly)

Shaggar
Apr 26, 2006

Zlodo posted:

is there any language package manager which isn't a huge pile of crap

maven's package management stuff works. nuget would be ok if it didnt have support for scripting lol

Gaukler
Oct 9, 2012


tazjin posted:

the libgit crap is just today's cargo issue, in a month i can probably collect 5 of these. my curse is that all software i use breaks in crazy ways all of the time, but it is a lucrative curse if you know how to utilise it (and can replenish the nerves it costs regularly)

Are you programming on top of a civil war battle site? Do you naturally produce unsafe levels of RF radiation? I’ve been using cargo for years at this point and haven’t managed to surface something like this, despite doing lots of poo poo where I cross-compile multiple c libs down to arm6hf, while also not developing on MacOS.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
wait, cargo looked at cocoapods's decision to make the package index a git repo that caused github to say "pls no we can't handle the traffic" and said "let's copy that"?

Adbot
ADBOT LOVES YOU

crazypenguin
Mar 9, 2005
nothing witty here, move along
They’re publicly testing the new http index now at least

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply