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
my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

Corla Plankun posted:

can you post a snippet that triggers this? I've never seen this before

I hadn't either, and no doubt the original regex was absolutely bonkers, but I never would have thought it could lock up the entire process

replicating case (tested up to 3.9):
code:
import re
re.match(r'^((?:.*a){2,})$', 'aasdbasdbasdbasdbasdaasdbasdasdbasdasdbasdasdbaaabaaaabaaaasdasdbaaaabasdasd')
e: okay that one terminated eventually, but if you have sufficiently many 'asadasds', which we had, it will hang "forever"

my homie dhall fucked around with this message at 14:48 on Mar 25, 2021

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy
lol

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

my homie dhall posted:

pretty cool “serious” language
not to go all shaggar on you but why would you use a language that has a gil ityool 20XX

the only good gil is selling colecovisions in springfield

Bored Online
May 25, 2009

We don't need Rome telling us what to do.
its what i buy my potions with

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
this is in the nature of regexes that they can gently caress you up. the subset of regex that doesnt have possibly exponential runtime is basically globs

(this is why no cloud dealio allows you to grep their logs w real regexes)

if you want nonblockin python you need separate processes

the theory sez: regex poo poo is linear time. backrefs gently caress it up to npcomplete. the peeps who actually make regex systems say: lol shove those backrefs in there

bob dobbs is dead fucked around with this message at 18:18 on Mar 25, 2021

DELETE CASCADE
Oct 25, 2017

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

Menacer posted:

It has been proven by history that creativity lies in the individual mind and not in the team. The team is the nemesis of progress and change. The team is a convenient hideaway for the mediocre and the weak. ... "The team is stronger and more capable than the one" is the mission statement of collaboration. It is also the motto of communism.

a couple years ago i spent a week at stanford playing b-school games. one of them was this wilderness survival exercise, where you have to rank 10 items by their usefulness in the described survival situation. you do the ranking by yourself, then get together with your team and discuss, to come up with a final team ranking by consensus. at the end, your personal and team rankings are compared to "the right answer", as given by a navy seal. the point was to demonstrate that in virtually all cases, your team's consensus ranking was closer to correct than your personal ranking, so you benefitted by being in the team, and this is indeed what the data showed.

however, there was like one case where a guy beat his team. turns out he was an expert outdoorsman, so in his case the team would have done better if they all just shut up and listened to him. so i asked the prof, "well what happens if there is someone on the team who acts like a subject-matter expert, in which case we really should listen to him, but in fact he is not an expert, yet the rest of us are too inexperienced ourselves to realize that he is full of poo poo?" and she gave me this wide-eyed look like i had asked a research question. she started talking about the "confidence-competence paradox" which i guess is another name for dunning-kruger.

in any case, i wonder about the frequency of this. i bet for every 1 time there is a real expert who the team should defer to, there are 10 times that you actually have some rear end in a top hat like the quoted author, who is no genius, just a misanthrope

CPColin
Sep 9, 2003

Big ol' smile.
Speaking of regexes, I just had to fix a bug my predecessor left me where a bit of code was using a regex to look for things like "{foo}" in a template and replace them with the value of map["foo"]. This worked find for ages until one of the replacement values, which are user-supplied, contained a dollar sign and suddenly the calls to replace() were complaining about invalid group references.

This caused email reminders to fail silently for a month because my predecessor also didn't set up log monitoring on any of the servers. Fortunately, this particular web application was written with a new enough version of (ugh) Grails that it supports Java (ugh) 8, so I can move it to one of the servers I created, which does have log monitoring.

Shaggar
Apr 26, 2006

DELETE CASCADE posted:

a couple years ago i spent a week at stanford playing b-school games. one of them was this wilderness survival exercise, where you have to rank 10 items by their usefulness in the described survival situation. you do the ranking by yourself, then get together with your team and discuss, to come up with a final team ranking by consensus. at the end, your personal and team rankings are compared to "the right answer", as given by a navy seal. the point was to demonstrate that in virtually all cases, your team's consensus ranking was closer to correct than your personal ranking, so you benefitted by being in the team, and this is indeed what the data showed.

however, there was like one case where a guy beat his team. turns out he was an expert outdoorsman, so in his case the team would have done better if they all just shut up and listened to him. so i asked the prof, "well what happens if there is someone on the team who acts like a subject-matter expert, in which case we really should listen to him, but in fact he is not an expert, yet the rest of us are too inexperienced ourselves to realize that he is full of poo poo?" and she gave me this wide-eyed look like i had asked a research question. she started talking about the "confidence-competence paradox" which i guess is another name for dunning-kruger.

in any case, i wonder about the frequency of this. i bet for every 1 time there is a real expert who the team should defer to, there are 10 times that you actually have some rear end in a top hat like the quoted author, who is no genius, just a misanthrope
well as an expert let me tell you

Bloody
Mar 3, 2013

that's why you gotta interview well and hire well and avoid single points of failure (or incompetence) in your organization

mystes
May 31, 2006

DELETE CASCADE posted:

a couple years ago i spent a week at stanford playing b-school games. one of them was this wilderness survival exercise, where you have to rank 10 items by their usefulness in the described survival situation. you do the ranking by yourself, then get together with your team and discuss, to come up with a final team ranking by consensus. at the end, your personal and team rankings are compared to "the right answer", as given by a navy seal. the point was to demonstrate that in virtually all cases, your team's consensus ranking was closer to correct than your personal ranking, so you benefitted by being in the team, and this is indeed what the data showed.

however, there was like one case where a guy beat his team. turns out he was an expert outdoorsman, so in his case the team would have done better if they all just shut up and listened to him. so i asked the prof, "well what happens if there is someone on the team who acts like a subject-matter expert, in which case we really should listen to him, but in fact he is not an expert, yet the rest of us are too inexperienced ourselves to realize that he is full of poo poo?" and she gave me this wide-eyed look like i had asked a research question. she started talking about the "confidence-competence paradox" which i guess is another name for dunning-kruger.

in any case, i wonder about the frequency of this. i bet for every 1 time there is a real expert who the team should defer to, there are 10 times that you actually have some rear end in a top hat like the quoted author, who is no genius, just a misanthrope
I think the moral of the story is actually "just fire all the managers."

Carthag Tuek
Oct 15, 2005

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



lmao i jjust inserted a bunch of garbage rows in one of the production dbs and i dont have delete privs on it

MrMoo
Sep 14, 2000

that generally makes sense, delete flag only

Carthag Tuek
Oct 15, 2005

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



i dont disagree, but that would require major changes to the uniqueness constraints and backend & we dont havee a time budget for that

ill just have to whine at the dba

Carthag Tuek
Oct 15, 2005

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



hmm is there a way to recursively delete empty "folders" in S3?

DELETE CASCADE
Oct 25, 2017

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

folders in s3 aren't real

Carthag Tuek
Oct 15, 2005

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



i know, hence the quotes

but if you go "aws s3 ls" it will show like A/ B/ C/ as if they are folders. but only C/ contains something, A & B are just empty objects or whatever

i want to detect & delete A/ and B/ with as little manual work as possible because there are a whole lot of them

like find -empty -delete u know

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
you get to write a script. hope you don't need to invoke that slow rear end aws command line python nonsense too many times! (you will)

Carthag Tuek
Oct 15, 2005

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



uuuhgghghhhhhhhh

Carthag Tuek
Oct 15, 2005

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



but thx


im gonna do a recursive ls & build a list i guess

hbag
Feb 13, 2021

not gonna lie i realized embarassingly recently that i can avoid having "index.html" in the address bar of my site's pages if i just navigate to directory instead of directory/index.html

of course that knowledge is now of no use to me as my site redesign just uses page hashes and a script to change an iframe src depending on which one it is

Carthag Tuek
Oct 15, 2005

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



well that wasnt too bad

i went through a listing & added everything with size > 0 (files) to a trie and everything else ("folders"/prefixes) to a set. then i removed all the elements from the set that were present as prefixes in the trie. presto, the set now contains only empty prefixes!

Powerful Two-Hander
Mar 10, 2004

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


hbag posted:

not gonna lie i realized embarassingly recently that i can avoid having "index.html" in the address bar of my site's pages if i just navigate to directory instead of directory/index.html

of course that knowledge is now of no use to me as my site redesign just uses page hashes and a script to change an iframe src depending on which one it is

in before Shaggar says "use asp.net routing and cshtml"

it's actually good though

distortion park
Apr 25, 2011


effective engineering organisations do x at rate y -> if we improve our x we will become an effective engineering organisation

Powerful Two-Hander
Mar 10, 2004

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


oh no the sample output data from the ai is dogshit who could possibly have predicted this

Jerry Bindle
May 16, 2003

DELETE CASCADE posted:

a couple years ago i spent a week at stanford playing b-school games. one of them was this wilderness survival exercise, where you have to rank 10 items by their usefulness in the described survival situation. you do the ranking by yourself, then get together with your team and discuss, to come up with a final team ranking by consensus. at the end, your personal and team rankings are compared to "the right answer", as given by a navy seal. the point was to demonstrate that in virtually all cases, your team's consensus ranking was closer to correct than your personal ranking, so you benefitted by being in the team, and this is indeed what the data showed.

however, there was like one case where a guy beat his team. turns out he was an expert outdoorsman, so in his case the team would have done better if they all just shut up and listened to him. so i asked the prof, "well what happens if there is someone on the team who acts like a subject-matter expert, in which case we really should listen to him, but in fact he is not an expert, yet the rest of us are too inexperienced ourselves to realize that he is full of poo poo?" and she gave me this wide-eyed look like i had asked a research question. she started talking about the "confidence-competence paradox" which i guess is another name for dunning-kruger.

in any case, i wonder about the frequency of this. i bet for every 1 time there is a real expert who the team should defer to, there are 10 times that you actually have some rear end in a top hat like the quoted author, who is no genius, just a misanthrope

the team is less competent at assessing the problem so naturally a worse outcome is expected. when poo poo like this happens everyone suffers and the bamboozler person in particular, his reputation is damaged. others in the team may say "I told you so" or "if we had done it my way,", these people failed too but in a different worse way.

jre
Sep 2, 2011

To the cloud ?



Powerful Two-Hander posted:

oh no the sample output data from the ai is dogshit who could possibly have predicted this

An ai predictive model

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Powerful Two-Hander posted:

oh no the sample output data from the ai is dogshit who could possibly have predicted this

you're supposed to feed the output back in until you reach a fixed point

Share Bear
Apr 27, 2004

Carthag Tuek posted:

i know, hence the quotes

but if you go "aws s3 ls" it will show like A/ B/ C/ as if they are folders. but only C/ contains something, A & B are just empty objects or whatever

i want to detect & delete A/ and B/ with as little manual work as possible because there are a whole lot of them

like find -empty -delete u know

if you're planging, transforming the S3 key into a pathlike object and then checking for the basename is pretty quick way to do this, should be o(n)

edit: i assume you're already faking it with unix dir separators so you should be good there, remember to paginate over the s3 response since they block that off to 1000 objects at a time

Share Bear fucked around with this message at 16:11 on Mar 26, 2021

xtal
Jan 9, 2011

by Fluffdaddy

Carthag Tuek posted:

i know, hence the quotes

but if you go "aws s3 ls" it will show like A/ B/ C/ as if they are folders. but only C/ contains something, A & B are just empty objects or whatever

i want to detect & delete A/ and B/ with as little manual work as possible because there are a whole lot of them

like find -empty -delete u know

What if you just used s3fs and did that

Carthag Tuek
Oct 15, 2005

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



thx but i got it.. made the list of empty prefixes per my prev post and just iterated over those while deleting & everything is nice now :)

Plank Walker
Aug 11, 2005
Anyone here ever used Postman? I feel like it might the the singular worst program I've ever used. Takes 15 seconds to start up what is essentially just a wrapper around javascript fetch api, each panel in the app has tabs nested within tabs nested within tabs, and somehow they forgot to make it possible to right click -> copy location on urls

abraham linksys
Sep 6, 2010

:darksouls:
postman sucks rear end lol

i'm in the market for a reasonable graphical web rest client if anyone has one. zero fancy things. basically looking for httpie with a ui. support for pasting in an HAR file copied from browser dev tools a plus. just need mac support for work

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

abraham linksys posted:

postman sucks rear end lol

i'm in the market for a reasonable graphical web rest client if anyone has one. zero fancy things. basically looking for httpie with a ui. support for pasting in an HAR file copied from browser dev tools a plus. just need mac support for work

https://github.com/pashky/restclient.el

Blinkz0rz
May 27, 2001

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

abraham linksys posted:

postman sucks rear end lol

i'm in the market for a reasonable graphical web rest client if anyone has one. zero fancy things. basically looking for httpie with a ui. support for pasting in an HAR file copied from browser dev tools a plus. just need mac support for work

https://insomnia.rest

it's pretty good

Carthag Tuek
Oct 15, 2005

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



just man postman man

Chunks Hammerdong
Nov 1, 2009

yeah I've liked using this more than postman, though it's fundamentally the same thing, just a little bit less poo poo

xtal
Jan 9, 2011

by Fluffdaddy
Insomnia is like an even worse version of a Git GUI. Just grow up and use cURL like a professional.

Carthag Tuek
Oct 15, 2005

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



does insomnia mean youll be up all night trying to get it to work

Powerful Two-Hander
Mar 10, 2004

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


pokeyman posted:

you're supposed to feed the output back in until you reach a fixed point

So what you're saying is eventually all data will be dogshit?


:haibrower:

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

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



*looks at data* well that wont take so many passthrus

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