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
Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


Bobby Deluxe posted:

Bolded to see if I understand the important part right, but it just feels to me like if you have a program that guesses between 1 and 1000, and you set the maximum to 1000, that should include it guessing 1000.

Probably it's the courses fault for having a first lesson that includes a conceptual crisis over whether a number represents a unit or a boundary.

Yeah fair enough "between" might not be the best word here, though if you'd look at the documentation it would be more like "from 0 to n-1 inclusive".

Adbot
ADBOT LOVES YOU

Microplastics
Jul 6, 2007

:discourse:
It's what's for dinner.
arrays starting with 0 in VBA bothers me and i always redim them to start with 1 :colbert:

that's how lists work!! the first item is labelled 1, that's the number of items there are up to and including that point in the list! I will die on this hill.

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!

Bobby Deluxe posted:

Bolded to see if I understand the important part right, but it just feels to me like if you have a program that guesses between 1 and 1000, and you set the maximum to 1000, that should include it guessing 1000.

Probably it's the courses fault for having a first lesson that includes a conceptual crisis over whether a number represents a unit or a boundary.

Its due to how Random.Next(min,max) works in C#. The min value is inclusive, the max value is exclusive.

Guavanaut
Nov 27, 2009

Looking At Them Tittys
1969 - 1998



Toilet Rascal
But do negative numbers exist? :hist101:

Overminty
Mar 16, 2010

You may wonder what I am doing while reading your posts..

Mega Comrade posted:

Its due to how Random.Next(min,max) works in C#. The min value is inclusive, the max value is exclusive.

Yeah it's this https://docs.unity3d.com/ScriptReference/Random.Range.html

"Description
Return a random int within [minInclusive..maxExclusive) (Read Only)."

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


Guavanaut posted:

But do negative numbers exist? :hist101:

Sometimes :v:

Depends on your data type.

keep punching joe
Jan 22, 2006

Die Satan!

Bobby Deluxe posted:

Yes this is an edge case lunatic, but people like the LGB alliance cutting specific letters out of LGBTQ seems to have awoken a chunk of nutcases who think they have the right to do the same with other letters.

Almost as if that was the plan all along.

Dabir
Nov 10, 2012

rand(6) gives you one of six numbers, where the first is 0.

Thinking about it another way, if you want to cover every integer percentage including 100, there's actually 101 possibilities, 1-100 and 0. A 1 in 100 chance would cover either 1-100 or 0-99.

Here's how I'd do it (pseudocode as I don't know C#)

code:

int min = 1
int max = 1000
int guess = 0
int input = 1

do
{
    guess = rand(min, max+1)
    input = getInput() // Negative means number is lower, Positive means number is higher, zero means you got it
    if input >= 0
        min = guess
    if input <= 0
        max = guess
}
while (min != max)

print ("Your number is " + guess + "!")

Noxville
Dec 7, 2003

JeremoudCorbynejad posted:

arrays starting with 0 in VBA bothers me and i always redim them to start with 1 :colbert:

that's how lists work!! the first item is labelled 1, that's the number of items there are up to and including that point in the list! I will die on this hill.

0-indexing is way better than 1-indexing, sorry

josh04
Oct 19, 2008


"THE FLASH IS THE REASON
TO RACE TO THE THEATRES"

This title contains sponsored content.

JeremoudCorbynejad posted:

arrays starting with 0 in VBA bothers me and i always redim them to start with 1 :colbert:

that's how lists work!! the first item is labelled 1, that's the number of items there are up to and including that point in the list! I will die on this hill.

Ahem. Array indexes are sized offsets from the start of the array memory, hence the first item is zero item-size-distances from the start. Beep boop.

Noxville
Dec 7, 2003

If you want to talk about bad decisions, JavaScript trumps C# a hundred times over. JavaScript dates have 1-indexed day of month and year, but 0-indexed months, so if you created a date with 1/1/2021 it would give you the first of February 2021. Comically annoying until you get used to it

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
Zero-indexing vs one-indexing arguments are boring cos very very few people will ever take the side of arrays starting at 1 these days if they know much about programming.

Tabs vs spaces, now that's where it's at.

Noxville posted:

If you want to talk about bad decisions, JavaScript trumps C# a hundred times over. JavaScript dates have 1-indexed day of month and year, but 0-indexed months, so if you created a date with 1/1/2021 it would give you the first of February 2021. Comically annoying until you get used to it

Bringing up bad design decisions in languages and using JS is just cheating.

Debuffed
Dec 19, 2003
I never post
Thanks all for the answers re: physio stuff, based on the responses I'll look into a sports physio short term as they aren't too pricy, and book something with the NHS as well to see if I can get imaging at some point if needed :)

Failed Imagineer
Sep 22, 2018
Looks like Biden admin will lift the UK/EU travel ban from November, so look forward to reading reports of how Big Boy Boris manfully wrestled Joe into a headlock until he caved in.

Nice for me though, means I'll probably get to spend Thanksgiving - the best eating holiday - with herself in NY

Bobby Deluxe
May 9, 2004

It's really interesting reading the clarifications, thanks all. I quite often find things like this where I feel like I've been dumb and wrong, and then when I talk to people who are good at it, I find out I'm just thinking about it in a really complicated way that most people don't need to but would make sense at a graduate level.

Like most people don't really need to think about what a number actually is at a conceptual level.

Oh dear me
Aug 14, 2012

I have burned numerous saucepans, sometimes right through the metal

josh04 posted:

Ahem. Array indexes are sized offsets from the start of the array memory, hence the first item is zero item-size-distances from the start.

Which would be relevant if we were writing a compiler :colbert:

Brendan Rodgers
Jun 11, 2014




Bobby Deluxe posted:

It's really interesting reading the clarifications, thanks all. I quite often find things like this where I feel like I've been dumb and wrong, and then when I talk to people who are good at it, I find out I'm just thinking about it in a really complicated way that most people don't need to but would make sense at a graduate level.

Like most people don't really need to think about what a number actually is at a conceptual level.

Thinking of how the CPU is actually addressing memory and how the code is actually generating and iterating through those 1000 numbers is probably more complicated than "1-1000 should be 1-1000".

Kerbtree
Sep 8, 2008

BAD FALCON!
LAZY!

Private Speech posted:

This will be because the function to generate a random number returns a number between 0 and the number you gave it - so random(6) will give you 0...5. If you want to make it 1...6 you have to add one to whatever you generate. The reason it's this way is that it's often more useful to start with 0 than 1 for various maths reasons, hence it being that way actually saves work most of the time.

In that case, you should just add 1 to the rng result, tho.

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!

Bobby Deluxe posted:

It's really interesting reading the clarifications, thanks all. I quite often find things like this where I feel like I've been dumb and wrong, and then when I talk to people who are good at it, I find out I'm just thinking about it in a really complicated way that most people don't need to but would make sense at a graduate level.

Like most people don't really need to think about what a number actually is at a conceptual level.

Indexes starting at 0 is a hurdle every programmer hits when they first start learning programming. Once you learn the nitty gritty of why though it makes sense and thinking in those terms when you're programming becomes second nature after a while.

keep punching joe
Jan 22, 2006

Die Satan!
https://twitter.com/thecourieruk/status/1439918521861935110

josh04
Oct 19, 2008


"THE FLASH IS THE REASON
TO RACE TO THE THEATRES"

This title contains sponsored content.

Kerbtree posted:

In that case, you should just add 1 to the rng result, tho.

Believe having to do this was the original complaint. Would definitely agree though that if you want to make a [1, 1000] random generator then expressing exactly what you want in code is better + less likely to introduce subtle bugs, than making a [0, 1000) generator and shifting every value up by one.

Oh dear me
Aug 14, 2012

I have burned numerous saucepans, sometimes right through the metal

Mega Comrade posted:

Once you learn the nitty gritty of why though it makes sense and thinking in those terms when you're programming becomes second nature after a while.

If this were true, there would be vastly fewer off-by-one errors.

OwlFancier
Aug 22, 2013

peanut- posted:

A huge part of the problem right now is that there isn't any wind

Get the guardian to churn out more articles then.

Brendan Rodgers
Jun 11, 2014




Guavanaut
Nov 27, 2009

Looking At Them Tittys
1969 - 1998



Toilet Rascal
9/10 on the colour match, 8/10 on the hakenkreuz not looking like a squashed spider, 6/10 layout, 2/10 spelling punctuation and grammar

forkboy84
Jun 13, 2012

Corgis love bread. And Puro



Genuine laugh out loud from me. loving nora. What an absolutely perfect LibDem policy.

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!

Oh dear me posted:

If this were true, there would be vastly fewer off-by-one errors.

The issue usually comes up when you have to switch back to the inferior one-based system for the benefit of the uncultured plebs using your system.

Miftan
Mar 31, 2012

Terry knows what he can do with his bloody chocolate orange...


loving nazis man. Just the absolutely dumbest loving people on the planet. When has adding a swastika to anything ever granted it more credibility after 1945, and this is if (and that's a big loving if) you can look past the antivax idiocy.

This is not an open call to explain to me how the swastika was coopted by the nazis tia

forkboy84
Jun 13, 2012

Corgis love bread. And Puro


Miftan posted:

loving nazis man. Just the absolutely dumbest loving people on the planet. When has adding a swastika to anything ever granted it more credibility after 1945, and this is if (and that's a big loving if) you can look past the antivax idiocy.

This is not an open call to explain to me how the swastika was coopted by the nazis tia

I'm pretty sure they are trying to claim the NHS are the Nazis, for making us get the evil fake COVID vaccine

Jedit
Dec 10, 2011

Proudly supporting vanilla legends 1994-2014

Miftan posted:

loving nazis man. Just the absolutely dumbest loving people on the planet. When has adding a swastika to anything ever granted it more credibility after 1945, and this is if (and that's a big loving if) you can look past the antivax idiocy.

I suspect that this is the antivaxxer implying that the NHS are Nazis.

Comrade Fakename
Feb 13, 2012


Strom Cuzewon posted:

I'd call it powerfully centrist rather than right-wing. Yeah, the baddies are socialist revolutionaries and anarchists, but also a theocratic monarchy and fascists (with mechs). Politically I'd say its no better or worse than a dozen other YA properties, but it definitely sticks out because it spends so much effort trying to be deep and serious about it.

The second season guy is framed as an environmentalist (he wants to bring "balance with the spirit world") and the final season woman is a communist in a Maoist or Stalinist style (as opposed to the revolutionary socialists - "equalists" lol - of the first season).

Guavanaut
Nov 27, 2009

Looking At Them Tittys
1969 - 1998



Toilet Rascal

Miftan posted:

This is not an open call to explain to me how the swastika was coopted by the nazis tia
You can tell that this isn't by nazis because it's drawn reasonably properly.

The sworstica was coopted by neo nazis


:krakken:

OwlFancier
Aug 22, 2013

forkboy84 posted:

I'm pretty sure they are trying to claim the NHS are the Nazis, for making us get the evil fake COVID vaccine

As a rule of thumb, because they can draw a swastika, they are probably not a fan of the nazis :v:

E: ^^ great minds

Bobby Deluxe
May 9, 2004

josh04 posted:

Believe having to do this was the original complaint. Would definitely agree though that if you want to make a [1, 1000] random generator then expressing exactly what you want in code is better + less likely to introduce subtle bugs, than making a [0, 1000) generator and shifting every value up by one.
Yeah, while I was learning it, i was thinking there should be some kind of modifier* that you can add to a command or function that ensures it treats arrays as starting specifically with 0/1. But then you're getting into the XKCD 14 competing standards** meme.

I get that thinking of arrays as starting with 0 by default is more useful in more cases, it'd just be nice if you could set it to start at 1 in certain cases. I'm probably going to find out you can, but it's either too long / complicated to go into on a udemy video or they didn't know how. Or that the unexpected interactions would cause nightmarish levels of bugs and errors.

It just seems like such a huge issue to bring up in literally the first lesson, but I doubt most other people really thought about it too much.

* apologies if this word has a specific meaning within coding, I mean like a suffix or symbol that you add to a number-based command or function

** We must secure the existence of our syntax and a future for logical parsing.

NotJustANumber99
Feb 15, 2012

somehow that last av was even worse than your posting
i actually wanted to be number 100 but here we are.

Failed Imagineer
Sep 22, 2018

gently caress lol. The only sensible response to this is to go to your local polling station and immolate yourself in protest like Thích Quảng Đức

goddamnedtwisto
Dec 31, 2004

If you ask me about the mole people in the London Underground, I WILL be forced to kill you
Fun Shoe

Miftan posted:

loving nazis man. Just the absolutely dumbest loving people on the planet. When has adding a swastika to anything ever granted it more credibility after 1945, and this is if (and that's a big loving if) you can look past the antivax idiocy.

This is not an open call to explain to me how the swastika was coopted by the nazis tia

They're claiming that the NHS are the Nazis - just search Twitter for "nuremburg" (sic) for loads of examples of it.

goddamnedtwisto
Dec 31, 2004

If you ask me about the mole people in the London Underground, I WILL be forced to kill you
Fun Shoe

Failed Imagineer posted:

gently caress lol. The only sensible response to this is to go to your local polling station and immolate yourself in protest like Thích Quảng Đức a Tesla seeing an emergency vehicle

Angepain
Jul 13, 2012

what keeps happening to my clothes
starting all my arrays from now on at -1 just to annoy all of you

Adbot
ADBOT LOVES YOU

Spuckuk
Aug 11, 2009

Being a bastard works



buffeh posted:

Hi all,

Anyone got any advice / experience dealing with joint / sports injuries on the NHS or privately?

Unfortunately I think I have knackered my shoulder doing weightlifting about a month ago. I went too low on a weighted dip and something went twang. For a few days after that I had a nasty burning sensation in the front of my shoulder, painful enough to take my breath away at times, which came and went depending on what I was doing (just moving my arm walking or washing up was enough to make it burn)

I rested it for 10 days and the burning pain had basically gone in under a week, once it was feeling better I tried a few sets of bench press and that caused it to flare up again, although nowhere near as painfully as after the initial injury. Unfortunately I think I may have done some real damage, as since the injury the joint pops and clicks and grinds when I move around, in ways it never used to. It also feels somewhat weakened. I do seem to have full motion in the joint though, and it doesn't really hurt if I don't do things that irritate it.

I've read about rotator cuff tears and labrum tears and am now quite worried. I have been doing recommended shoulder rehab exercises such as band pull aparts, dislocates, rotations and dead hangs but I have no form of medical diagnosis so am flying completely blind!

US centric advice on the internet seems to be "Go to a doctor ASAP, the shoulder is complicated so you will need an imaging scan such as Ultrasound or MRI to see what's wrong, followed by an appropriate treatment plan such as sports physio or as a last resort surgery. Treatment such as physio should be started sooner rather than later or scar tissue build up can be a problem"

That's great but I don't think I'm going to get that on the NHS ASAP or possibly I won't get it on the NHS at all! If I go to my GP and tell them "it hurts when I do this" they might just tell me "don't do that", if I insist that I want it examined as not being able to lift weights is affecting my mental health (true, I've found it very good for my mental health), then I suspect they will give me an orthopaedic referral but surely it's going to be a wait of many, many months which is no good if early treatment can avoid problems later on. I've also read that NHS physiotherapists aren't really the best choice for sports injuries - sports physio would be better

I could maybe go private but I'd probably have to take out a loan / crack into a credit card to afford it, also I have no idea how to go about it or even if that's the best choice, having never pursued private healthcare before. Would I just contact a Nuffield orthopaedic consultant or something and pay to see them? Then I'd also have to pay for imaging, follow up appointments, etc etc. Or could I just pay for a private MRI or something then take the MRI results to a sports physio, thus skipping a bunch of the costs for consultant appointments and follow ups?

Or maybe I should just try the NHS and they'll be better than I think! Or maybe it'll just get better on its own! I really don't know the best way to proceed, so I'd really appreciate any advice or personal experiences with this sort of thing, thank you everyone :)

As someone that had sports related physio on the NHS just before the pandemic hapenned, I might be able to help.

First of all go to your GP ASAP, no ifs ands or buts. Unless it's been a while since the injury (as in, several weeks/months) and isnt displaying signs of being something really serious, you'll likely be told to rest up a bit after an examination.

In my case it was serious last time, enough to be prescribed the Good Drugs for back spasms. A short course of that then after that had helped, a referral to a specialist unit, likely but not always in a hostital.

It did take a few weeks to get the physio started, but they were excellent. The most important thing is to go to the GP as soon as, and take it from there.

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