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
SpaceAceJase
Nov 8, 2008

and you
have proved
to be...

a real shitty poster,
and a real james
https://twitter.com/i/status/1614676869780996098

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal
I'm the CAUTION label on the floppy disc inserter

echinopsis
Apr 13, 2004

by Fluffdaddy

I am glad this dudes immersion was ruined

lord funk
Feb 16, 2004

what's that one tweet where the entire internet counts on some dude maintaining a unix utility called 'NUNC' or something?

EricBauman
Nov 30, 2005

DOLF IS RECHTVAARDIG
https://twitter.com/6thgrade4ever/status/1433519577892327424?t=LZ6pN1bcv_PheTN8_T7R2Q&s=19

lord funk
Feb 16, 2004

yep that's it :cheersdoge:

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


https://twitter.com/JeroenFrijters/status/1615204074588180481

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
still better than the cheeseburger ratings

The Fool
Oct 16, 2003


I'd approve that pr

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

terrible

_codes replacement that uses a loop instead and introduces an edge-case bug_

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
for real the bad part is the default return at the end, i assume there should be some boundary to ensure the value is between 0 and 1

that would perform well too

i'd use pattern matching to shorten it up a bit

verdict: whatever, it's fine

e: actually, why is that a double instead of a decimal or int? that part is questionable as heck. PR rejected

Cold on a Cob fucked around with this message at 19:54 on Jan 17, 2023

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
fwiw in c# you can do this instead:

new String(char x, int count)

so you could do a readable version that's more succinct but it wouldn't perform as well. you can also do some poo poo with string.Empty and padding methods

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

honestly my only beef is the braceless conditionals

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

rotor posted:

honestly my only beef is the braceless conditionals

oh yeah true, didn't even think of that

so yeah basically it has problems but not the lack of cleverness that a lot of people would cite

outhole surfer
Mar 18, 2003

rotor posted:

honestly my only beef is the braceless conditionals

no need for multiple conditionals either, since a return is going to break out anyway. they could get away with a single conditional per line with some slight changes

Shaggar
Apr 26, 2006

rotor posted:

honestly my only beef is the braceless conditionals

same

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Switching over (int) percentage * 10 is going to be more efficient if you’re really concerned about the micro costs of string manipulation right before you hand a string of emoji to the text renderer.

Best Bi Geek Squid
Mar 25, 2016
there are only two things I hate in this world: graceless conditionals, and the Dutch

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
interesting twist - the filled in circle requires two utf-16 characters which means afaik you can't get away with using String class initializer that takes a char and int, so here's what i ended up with (lol):



i'd just stick w/ the way they did it with minor improvements

e: more succinct than the OG but i assume would perform well?

Cold on a Cob fucked around with this message at 20:39 on Jan 17, 2023

Agile Vector
May 21, 2007

scrum bored



wanna run that through a screen reader lmao

post hole digger
Mar 21, 2011


i find this pleasant to look at.

Sapozhnik
Jan 2, 2005

Nap Ghost
question mark exclamation point question mark exclamation point question mark exclamation point john madden john madden john madden

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

nudgenudgetilt posted:

no need for multiple conditionals either, since a return is going to break out anyway. they could get away with a single conditional per line with some slight changes

i dont know much c#

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Sapozhnik posted:

question mark exclamation point question mark exclamation point question mark exclamation point john madden john madden john madden

aeiou aeiou

outhole surfer
Mar 18, 2003

i mean it isn't a c# thing. if the statement above returns when =< foo, you don't need to immediately test if > foo on the next statement, you can infer it to be true.

Truman Peyote
Oct 11, 2006



rotor posted:

honestly my only beef is the braceless conditionals

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Cold on a Cob posted:

for real the bad part is the default return at the end, i assume there should be some boundary to ensure the value is between 0 and 1

that would perform well too

i'd use pattern matching to shorten it up a bit

verdict: whatever, it's fine

e: actually, why is that a double instead of a decimal or int? that part is questionable as heck. PR rejected

idk if it's doing a "how strong is your password" or whatever then you'd expect the value to be >0 and past 1 you don't care because you're at ~~maximum strength~~

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Sapozhnik posted:

question mark exclamation point question mark exclamation point question mark exclamation point john madden john madden john madden

lmao

I changed my wife's phone lock screen message to read "John madden!" in reference to this and she couldn't figure out how to change it so it's just there now forever

she doesn't even know who John madden is either

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

Powerful Two-Hander posted:

idk if it's doing a "how strong is your password" or whatever then you'd expect the value to be >0 and past 1 you don't care because you're at ~~maximum strength~~

yeah maybe but then i'd want that to be documented, but i ain't going to the original code to check if it was

post hole digger posted:

i find this pleasant to look at.

i hosed up and should have shifted the top line over to the right so the bubbles would all stack nicely :shobon:

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


absolute +1 for putting unicode in though that's top tier "this is gonna gently caress people up and I don't care".

I used the correct Unicode symbol for >= and =< in web and SQL code exactly for that reason because then I could tell a specific consumer to gently caress off and use utf-8

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


https://twitter.com/numetal_moment/status/1615237930926342144

GATOS Y VATOS
Aug 22, 2002


https://twitter.com/tony_magoni/status/1615533848401530887?s=20&t=taS4gXf31XnKOgT5V-OCbQ

echinopsis
Apr 13, 2004

by Fluffdaddy

post hole digger posted:

i find this pleasant to look at.

same I need deets on the program and fonts

Kenny Logins
Jan 11, 2011

EVERY MORNING I WAKE UP AND OPEN PALM SLAM A WHITE WHALE INTO THE PEQUOD. IT'S HELL'S HEART AND RIGHT THEN AND THERE I STRIKE AT THEE ALONGSIDE WITH THE MAIN CHARACTER, ISHMAEL.
https://twitter.com/cam_oflage/status/1615526833839304704?s=61&t=fXclgbwvRV-nPifsDM9kjQ

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

Cold on a Cob posted:

interesting twist - the filled in circle requires two utf-16 characters which means afaik you can't get away with using String class initializer that takes a char and int, so here's what i ended up with (lol):



i'd just stick w/ the way they did it with minor improvements

e: more succinct than the OG but i assume would perform well?



update - this came up elsewhere so i benchmarked and the switch statement with static strings was obviously the fastest solution:



but that said - obviously if this isn't invoked often (and i doubt it is, it's a ui rendering thing) then who cares. also obviously if the number of bubbles needs to be dynamic then you're gonna be looping anyway, though you could speed it up with spans + unsafe (look at the dotnet source for string handling methods if you ever need to do this)

Corla Plankun
May 8, 2007

improve the lives of everyone

echinopsis posted:

same I need deets on the program and fonts

me too. looks real good.

laserghost
Feb 12, 2014

trust me, I'm a cat.


All Day I Dream About Shell

PokeJoe
Aug 24, 2004

hail cgatan


https://twitter.com/pikacap/status/1615740990400208905

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Adbot
ADBOT LOVES YOU

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


https://twitter.com/Kotaku/status/1615826727107796996

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