New around here? Register your SA Forums Account here!

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
gonadic io
Feb 16, 2011

>>=

Pie Colony posted:

are programmers thinking they can definitely optimize the elevator algorithm a thing at every big company?

Every programmer ever sees some dumb thing which isn't behaving the ways they want (usually for reasons they don't understand) and smugly says to themselves that they could do better. For fun reading check out the history of noisebridge's elevator

E: https://www.noisebridge.net/wiki/Elevator

Adbot
ADBOT LOVES YOU

akadajet
Sep 14, 2003

lol if you get onto this thing

VikingofRock
Aug 24, 2008




Pie Colony posted:

are programmers thinking they can definitely optimize the elevator algorithm a thing at every big company?

Definitely, and I'm guilty of this too. The elevators in one of our (very tall) buildings will refuse to schedule you at all if they get too busy, instead giving you the message "elevators too busy please try again later". This prompted a huge discussion of elevator scheduling algorithms in my team one day when we were stuck for 5+ minutes (before eventually giving up and taking the stairs for 15 floors). I still don't really understand why the elevator can't just fall back to the naïve algorithm when the queues get too full.

pseudorandom
Jun 16, 2010



Yam Slacker

gonadic io posted:

Every programmer ever sees some dumb thing which isn't behaving the ways they want (usually for reasons they don't understand) and smugly says to themselves that they could do better. For fun reading check out the history of noisebridge's elevator

E: https://www.noisebridge.net/wiki/Elevator

akadajet posted:

lol if you get onto this thing


gently caress no :stonk:

I was in the audience for this talk, and it literally gave me nightmares that night. gently caress elevators.

Powerful Two-Hander
Mar 9, 2004

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



redleader posted:

root cause: "it was Powerful Two-Hander"

tbf im pretty sure i specced at least one of these processes like 8 years ago. every system feed/process involved is async so if one bit dies and another doesn't everything gets hosed up

Pie Colony posted:

are programmers thinking they can definitely optimize the elevator algorithm a thing at every big company?

100% yes

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


Pie Colony posted:

are programmers thinking they can definitely optimize the elevator algorithm a thing at every big company?

seems so. not always hubris though. for me it's usually just not understanding until a couple days in that I'm treading on old well-covered ground without realizing it

cinci zoo sniper
Mar 14, 2013




ill start the wiki

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

akadajet posted:

lol if you get onto this thing


wheelchair signs usually represent accessibility, not foreshadowing

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

akadajet posted:

lol if you get onto this thing


idk it looks like fun

DaTroof posted:

wheelchair signs usually represent accessibility, not foreshadowing

lol

animist
Aug 28, 2018

Ciaphas posted:

seems so. not always hubris though. for me it's usually just not understanding until a couple days in that I'm treading on old well-covered ground without realizing it

that's just programming as a discipline

Nomnom Cookie
Aug 30, 2009



i'm pretty sure the secret to programming success is hubris and ignorance. always believing that you know what you're doing and it won't be very hard to reach your goal, until finally you get there after 20x the originally estimated effort

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
i don't know where else to throw this so
http://esr.ibiblio.org/?p=8415

esr is defending epstein, and uses the "actually he's an ephebophile" line lol

akadajet
Sep 14, 2003

CRIP EATIN BREAD posted:

i don't know where else to throw this so
http://esr.ibiblio.org/?p=8415

esr is defending epstein, and uses the "actually he's an ephebophile" line lol

can't say that I'm shocked that esr is a pedophile. we already know rms is.

Powerful Two-Hander
Mar 9, 2004

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



Ciaphas posted:

seems so. not always hubris though. for me it's usually just not understanding until a couple days in that I'm treading on old well-covered ground without realizing it

ours are supposedly optimised to minimise yoyoing up and down, and maximise efficiency but they're also glass so it means everyone can see an empty car blasting past them and get pissed off

anyway it's an information problem imho, if the car doesn't know how many people are in it it's not possible to be truly optimal

you could maybe proxy it with weight but all it's gonna take is one goon and you're hosed

Powerful Two-Hander fucked around with this message at 18:52 on Jul 12, 2019

Progressive JPEG
Feb 19, 2003

DaTroof posted:

wheelchair signs usually represent accessibility, not foreshadowing

redleader
Aug 18, 2005

Engage according to operational parameters

Powerful Two-Hander posted:

ours are supposedly optimised to minimise yoyoing up and down, and maximise efficiency but they're also glass so it means everyone can see an empty car blasting past them and get pissed off

anyway it's an information problem imho, if the car doesn't know how many people are in it it's not possible to be truly optimal

you could maybe proxy it with weight but all it's gonna take is one goon and you're hosed

machine learning, duh

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Powerful Two-Hander posted:

ours are supposedly optimised to minimise yoyoing up and down, and maximise efficiency but they're also glass so it means everyone can see an empty car blasting past them and get pissed off

anyway it's an information problem imho, if the car doesn't know how many people are in it it's not possible to be truly optimal

you could maybe proxy it with weight but all it's gonna take is one goon and you're hosed

man its crazy how often git blame comes back to powerful two-hander

Asleep Style
Oct 20, 2010

Nomnom Cookie posted:

i'm pretty sure the secret to programming success is hubris and ignorance. always believing that you know what you're doing and it won't be very hard to reach your goal, until finally you get there after 20x the originally estimated effort

I should be making a lot more money

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

no don't

Powerful Two-Hander
Mar 9, 2004

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



DaTroof posted:

man its crazy how often git blame comes back to powerful two-hander

if you haven't git blamed yourself you're not doing it right

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

Powerful Two-Hander posted:

if you haven't git blamed yourself you're not doing it right

:hai:

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

uhhhh

code:
Package pgfkeys Error: Boolean parameter of key 'yospos' must be 'true' or 'false', not 'false'. I am going to ignore it.

cinci zoo sniper
Mar 14, 2013




Krankenstyle posted:

uhhhh

code:
Package pgfkeys Error: Boolean parameter of key 'yospos' must be 'true' or 'false', not 'false'. I am going to ignore it.

:how:

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

turns out it's a bad error message caused by a different problem :bravo:

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


Krankenstyle posted:

turns out it's a bad error message caused by a different problem :bravo:

Nice!

tef
May 30, 2004

-> some l-system crap ->

akadajet posted:

lol if you get onto this thing


https://lists.noisebridge.net/pipermail/noisebridge-discuss/2013-July/135593.html

Now, moving on to the elevator debacle. First of all, I never at any time
LIVED, nor intended to live, in the 1st floor elevator compartment of 2169
Mission. I pity the poor urchin who would consider that stuffy,
junk-filled cubicle a desirable, or even possible, living

Sapozhnik
Jan 2, 2005

Nap Ghost
is rust language server still hot steaming garbage

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

tef posted:

https://lists.noisebridge.net/pipermail/noisebridge-discuss/2013-July/135593.html

Now, moving on to the elevator debacle. First of all, I never at any time
LIVED, nor intended to live, in the 1st floor elevator compartment of 2169
Mission. I pity the poor urchin who would consider that stuffy,
junk-filled cubicle a desirable, or even possible, living

hmm, i'm trapped in a rickety elevator. might as well get some shut-eye

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


c tp s ancient version of http request handler on old product mishandles url fragments (# sign and everything after). can't update it for reasons that are good but stupid, so i had to write some really shameful code to work around it temporarily
code:
// m_barcode = websGetVar(wp, L"barcode", L"");
   m_barcode = L"";
   std::wstring url = wp->url;
   size_t pos = url.find(L"barcode=");

   if (pos != string::npos)
   {
      size_t bcStartIdx = pos + 8; // size of "barcode="
      size_t bcEndIdx = url.find(L"&", bcStartIdx);
      std::wstring bc = url.substr(bcStartIdx, 
         (bcEndIdx == string::npos ? string::npos : bcEndIdx - bcStartIdx)
      );
      wchar_t buf[256];
      websDecodeUrl(buf, ((char_t *)bc.c_str()), bc.length());
      m_barcode = buf;
   }

Ciaphas fucked around with this message at 16:38 on Jul 15, 2019

gonadic io
Feb 16, 2011

>>=

Sapozhnik posted:

is rust language server still hot steaming garbage

Yes. For as long as this issue: https://github.com/rust-lang/rls/issues/352 is WONTFIX it will not be usable compared to jetbrains'. Rust analyser aka RLS 2.0 does fix it, but doesn't have IDE integration yet (and they might not build it, and instead use its lessons for a real RLS 2.0? https://ferrous-systems.com/blog/rust-analyzer-status-opencollective/)

pseudorandom
Jun 16, 2010



Yam Slacker

Sapozhnik posted:

is rust language server still hot steaming garbage


gonadic io posted:

Yes. For as long as this issue: https://github.com/rust-lang/rls/issues/352 is WONTFIX it will not be usable compared to jetbrains'. Rust analyser aka RLS 2.0 does fix it, but doesn't have IDE integration yet (and they might not build it, and instead use its lessons for a real RLS 2.0? https://ferrous-systems.com/blog/rust-analyzer-status-opencollective/)

Counter-point: No. It's been working very well for me.

Gonadic, are you using the VS Code extension mentioned in that issue? The kalitaalexey extension is 2 years out of date and unmaintained; the official "Rust (rls)" extension works much better. I just tried the minimal example from that issue, and auto-complete seems to work fine for the vec example.

animist
Aug 28, 2018

gonadic io posted:

Yes. For as long as this issue: https://github.com/rust-lang/rls/issues/352 is WONTFIX it will not be usable compared to jetbrains'. Rust analyser aka RLS 2.0 does fix it, but doesn't have IDE integration yet (and they might not build it, and instead use its lessons for a real RLS 2.0? https://ferrous-systems.com/blog/rust-analyzer-status-opencollective/)

it comes with VScode integration which works decent generally

necrotic
Aug 1, 2005
I owe my brother big time for this!

Ciaphas posted:

c tp s ancient version of http request handler on old product mishandles url fragments (# sign and everything after). can't update it for reasons that are good but stupid, so i had to write some really shameful code to work around it temporarily
code:
// m_barcode = websGetVar(wp, L"barcode", L"");
   m_barcode = L"";
   std::wstring url = wp->url;
   size_t pos = url.find(L"barcode=");

   if (pos != string::npos)
   {
      size_t bcStartIdx = pos + 8; // size of "barcode="
      size_t bcEndIdx = url.find(L"&", bcStartIdx);
      std::wstring bc = url.substr(bcStartIdx, 
         (bcEndIdx == string::npos ? string::npos : bcEndIdx - bcStartIdx)
      );
      wchar_t buf[256];
      websDecodeUrl(buf, ((char_t *)bc.c_str()), bc.length());
      m_barcode = buf;
   }

why is your http server getting fragments :confused:

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


necrotic posted:

why is your http server getting fragments :confused:

it's not

it's getting request urls like "/gf/authCheck.xml?user=jn&bc=12%23A&isLTO=1". You'd expect the fields from processing this (assuming no POST data or whatever) would be user=jn, bc=12#A, and isLTO=1, or at least that's what our code expects

instead we get user=jn,bc=12,and isLTO unset because the handler is decoding URLs (%23->#) then checking the URL for validity, finding the #, thinking 'we don't process fragments/anchors' and changing that character to '\0' before breaking out vars

gonadic io
Feb 16, 2011

>>=

pseudorandom posted:

Counter-point: No. It's been working very well for me.

Gonadic, are you using the VS Code extension mentioned in that issue? The kalitaalexey extension is 2 years out of date and unmaintained; the official "Rust (rls)" extension works much better. I just tried the minimal example from that issue, and auto-complete seems to work fine for the vec example.

I'll try it again, but I did try it a few weeks ago with the vs insider docker stuff and remember getting annoyed by it

Phone
Jul 30, 2005

親子丼をほしい。
i just did a nested case statement in a sql where clause

what must i do to atone for my programming sins

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


Ciaphas posted:

it's not

it's getting request urls like "/gf/authCheck.xml?user=jn&bc=12%23A&isLTO=1". You'd expect the fields from processing this (assuming no POST data or whatever) would be user=jn, bc=12#A, and isLTO=1, or at least that's what our code expects

instead we get user=jn,bc=12,and isLTO unset because the handler is decoding URLs (%23->#) then checking the URL for validity, finding the #, thinking 'we don't process fragments/anchors' and changing that character to '\0' before breaking out vars

sadly my attempt to get this fixed the 'right' way (by taking a look at the http handler code directly) was shot down 'cos we only have a month to next release and that's not enough time to implement and retest everything

normally here releases can be pushed around but quote "not this one" so now i have a poo poo bandaid (that'll probably stay in the codebase forever from neglect)


programming: remains terrible

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Phone posted:

i just did a nested case statement in a sql where clause

what must i do to atone for my programming sins

nothing, that is fine to do, surely you have written nested if statements in other programming languages before and not felt too dirty about it

necrotic
Aug 1, 2005
I owe my brother big time for this!

Ciaphas posted:

it's not

it's getting request urls like "/gf/authCheck.xml?user=jn&bc=12%23A&isLTO=1". You'd expect the fields from processing this (assuming no POST data or whatever) would be user=jn, bc=12#A, and isLTO=1, or at least that's what our code expects

instead we get user=jn,bc=12,and isLTO unset because the handler is decoding URLs (%23->#) then checking the URL for validity, finding the #, thinking 'we don't process fragments/anchors' and changing that character to '\0' before breaking out vars

oh, that makes more sense.

Adbot
ADBOT LOVES YOU

necrotic
Aug 1, 2005
I owe my brother big time for this!
azure makes it really easy to delete a whole slew of resources. a bug in our terraform nearly destroyed a customer's entire dev infrastructure. oops

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