« first day (3105 days earlier)      last day (2066 days later) » 
00:00 - 18:0018:00 - 00:00

18:00
Equally, the [3] index of the original list is 1, so the [1] index of the new list should be 1
In other words, the original list is a list of indices for a new list, self-referencing the values stored in the original list. I have no idea if I'm making any more sense than the question at this point
@idjaw aye aye cap'n - how you been?
Ok I got what you explained @roganjosh
@JonClements hey pup! 😀 Things are goin'. Life's really busy! Kids getting older seems directly proportional to loss of free time. :D
Yes... them getting older also seems they're eating all my cookies in your cupboards! :)
you have no idea. The bills have piled on
my eldest is a food machine
18:07
consuming it and not dispensing it I take it? :p
@RaphX I'm glad of that because it became a little difficult to convey with the self-referencing :)
The problem is very poorly worded though @roganjosh
It's awfully worded. I dropped the backstory and just looked at the numbers. And even then, going down from n=4 doesn't really affirm much because you start running out of options for the ordering anyway. It would be better with bigger examples
Thanks for the help!@roganjosh
umm... I'm still struggling with trying to grok it as well... :p
18:13
Hello all.
(in my defense - I have been staring at data for ~12 hours and feeling a little brain dead)
Is there a way to log errors more effectively other than putting try except blocks around everything?
One last doubt @roganjosh
ideally everything shouldn't raise errors
That doesn't naturally log errors
18:14
there is no index numbered 4
@AndrasDeak
sometimes it's not up to me
if the database or queue is down for example
@RaphX it's off-by-one
That's why I make the index adjustment of subtracting 1. The 1 in the list refers to index [0]
the fourth item in the list would be at index [3]
but for 4 its 0 in the output right?
@roganjosh on a side note: new_list = [0] * n # or len(p) would be reasonable there
I mean for 4 in the input, its taking index 0
18:17
I'll try explain again (and it's not you that's not getting it, both the problem and the way I'm trying to communicate it are ambiguous)
@roganjosh good - makes me feel less silly then... shouldn't take as long to grok what by the looks of it should be a simple problem...
[2, 3, 4, 1]. 2 here is saying take the value at index [2], which is 4, and put it at the index that 2 currently is at
Yeah I got that but what about 4?
I'd struggling with 4 as well... I'm struggling why it isn't 3, 4, 1, 2... instead of 4, 1, 2, 3
18:22
Yeah, I passed the tests that the problem demo'd. Don't ask difficult questions :P
But, on a serious note, totally legitimate. I'm struggling to remember how I reasoned out the pattern. It does seem to fall down on that
And that would also explain why I had to do subtraction on the index twice, which confused me. Maybe I only half grasped what they wanted and the question is actual garbage, not just resembling it
[2,3,4,1] is also a horrible test case: it's a trivial cyclic permutation of [1, 2, 3, 4]. Why not just forget about this horrible ill-posed challenge?
because it's personal now! :p
umm....
In [32]: d = [2, 3, 4, 1]

In [33]: print(*(a for a, b in sorted(enumerate(d, 1), key=lambda L: L[1])))
4 1 2 3
@LavanyaVelusamy sorry for the late response. The most likely reason for the error is that range is not a string (by the way this is not a very good choice for a variable name, because it shadows the built-in name range which comes up quite often). Just before it range = request.headers.get('Range'), which I imagine can easily give you None if the 'Range' key is not present in the header. So you might need an if range: or more specifically if range is not None: check.
18:32
@JonClements you're apparently allowed up to 256MB of memory to solve this. I think it's probably way more complicated than any of us imagine :P
Little Petya failed to take the grip of Tiny Tim on our hearts. I think I'm done with the problem cos I can't even remember the brief flash of thinking I understood it
Well... I think I've submitted something or not .... I'm not sure
also getting brain ache of where the heck to go and do things on the site anyway
they've accepted something...
Your code works @JonClements
Can you explain the logic?
it creates the inverse permutation of the input
you can get the same result by doing an argsort twice
actually no, this is a single argsort step
I thought that... but can you import numpy?
Cos that's effectively what I wrote in pure python
so does "accepted" mean it's correct or not? I'm confused...
all 101 tests it ran say OK
It's more interesting in Python and you get 2 seconds to solve the problem
18:40
@JonClements I just meant as an explanation assuming someone knows what argsort is
ahh okies
I'm guessing looking at that - it's correct and for Python - not a terrible ms time!? I'm not sure how to read this stuff
it probably adjusts behind the scenes
they do that in some sites
so we have to beat 62ms?
talk about O(0) memory
League tables are red flags to a bull :/
wim
wim
18:45
how is this different from an argsort
It isn't. The site just phrased the question hopelessly and we meandered towards what they actually expected
wim
wim
oh
wim
wim
so Jon just obfuscating the code for fun?
I'm not sure he did that, just that that was the code that came about from the discussion
wim
wim
18:47
>>> data = dict(enumerate(d, 1))
>>> sorted(data, key=data.get)
[4, 1, 2, 3]
(assumes no dupes in d)
You have the benefit of the hindsight from other attempts :)
user4371848
hi anyone can help me with database questions
wim
wim
for handling dupes you do the same but you put the index into the keys too
user4371848
Consider the following set F of functional dependencies on the relation schema R(A, B, C, D, E, F):
F = {A -> BCD, BC -> DE, B -> D, D -> A}
(a) Compute B+.
(b) Prove (using Armstrong’s axioms) that AF is a superkey.
(c) Give a BCNF decomposition of R using the original set of FDs.
user4371848
can someone help me answe these
18:52
Thanks for the help guys although I just understood how to get the answer and not the problem :P
the problem is that they worded it like crap
Move on :)
the i-th number is pi — the number of a friend who gave a gift to friend number i.
@ParitoshSingh do you not number your friends?!
Print n space-separated integers: the i-th number should equal the number of the friend who gave a gift to friend number i.
i mean, according to the wording, its already solved. :P
18:54
:P
At house parties, I have sticky labels already printed for when they walk through the door.
@roganjosh that got a good chuckle out of me :)
@wim looking at the test cases - it does look like it's just numbers between 1 and N shuffled
(eg: I can't see any duplicates)
What I find curious is that I didn't even do any checks... I just ignored the first line...
I was just curious so literally just threw:
n = int(input())
s = [int(el) for el in input().split()]
print(*(a for a, b in sorted(enumerate(s, 1), key=lambda L: L[1])))
at it... sure there's a couple of bits there that can trim some time...
0kb ram usage though... that's great... I want the version of Python they're using that doesn't consume memory :)
19:10
Why is there someone who's been a member for 7 years tagged as a "new user"?
first post is recent
ugh. They've answered 44 questions
I can't see it now, but here
Are you certain you saw it before?
19:12
The answer was deleted
oh, I thought you meant the answer you linked to
No sorry, I have a bad habit of that
Oldest answer posted 4 days ago stackoverflow.com/users/1073696/…
I corrected the link to point to the question, but the answerer deleted their answer
wim
wim
19:14
@JonClements Heh. It's heapless Python, a lesser known fork of stackless :)
I notice they also offer pypy options as well there... interesting
not that I'm likely to touch the site again... just wanted too see what people were talking about - throw something at something and it appeared to work - that's enough for me
@AndrasDeak I don't think it should be. Shouldn't this come under the integer cache?
wim
wim
If you blow up the sys recursionlimit, does that make you a full stack developer in Python?
The low-value ints should have different id values, no?
19:16
just another "confused by id and interpreter reusing memory"
@roganjosh strings...
oh, ****, you're right
@wim probably just makes you someone that realises you should try to write things iteratively instead?
VTC'd
wim
wim
that old joke, adapted for Python: "To truly understand recursion, you must Traceback (most recent call last) ... RecursionError: maximum recursion depth exceeded
Sam
Sam
19:53
@wim I was hoping to pick your microservice brain. I've been reading this guys blog relating to API composition: microservices.io/patterns/data/api-composition.html.
Is this API composition defined ^ asserting that there should be a whole service designated to building these compositions or is there some off the shelf tool I should use?
I've looked at Ambassador but can't seem to find anything
@wim The max stack frame depth is only limited by your imagination
wim
wim
@Sam What are you on about? I have a monolithic brain.
@cs95 new username?
Sam
Sam
@wim ohh.. this is awkward
new day, new me
:P
wim
wim
20:00
what the significance of 95? favorite windows version? birth year?
@cs95 or... same you - just a different display name? :p
the latter. My favourite windows version is also my first - 2000
what came before that, you ask? A macintosh :P
caution: childhood memories are insanely capable of warping reality in hindsight
10 bucks you wouldnt be able to bear that os if you went back to it :P
Oh, there is a big difference between functionality and likability
wim
wim
coldspeed came a long way in the short time
the stuff you posted originally was garbage, now it's (mostly) top notch
20:03
@wim I completely agree with that - but let's not make his head too big - he might not be able to get out the room :p
@wim how would you rate your early answers (-:
@wim that means a lot coming from someone as hard to please as you :P
hm interesting. do you then grade likability for what something stood for at the time, as opposed to its own attributes? or is it something else im not thinking of?
so thanks!
@ParitoshSingh liking something does not have to have any logical reasoning behind it, and that is the difference!
that i can understand (oh the irony), touche
wim
wim
20:04
@piRSquared the ones remaining - good. the garbage ones are long (deleted)
I've left all my chaf
maybe one day I'll censor myself
wim
wim
the way U9-Forward is now kind of reminds me of how coldspeed was as a new member
my very first question on this site and some answers were terrible
you gradually hone a few little bits here... I'm still disappointed in some answers - they should have padded out more and such... however, I can't go back through 2k+ answers and do that
hear, hear
ducks and hides
20:08
holy yam... coldspeed we're both above 5k answers
my apologies... the SO'r formally known as coldspeed
@piRSquared the purple rain fell that day
my answering rate fell off in mid '15 anyway due to other stuff...
@piRSquared coldspeed is fine! This morning, I installed an RSS feed monitoring posts for the word "coldspeed" now, in case someone tries to ping me and doesn't realise I won't see it
btw, I see you've started answering again
This past 6 weeks have been hell. My family went through a health scare and it is still ongoing to a lesser degree. I just was able to get back to work last week
20:14
sorry to hear that :/ hope things are better now.
@wim can't argue with that
Better. Not perfect but better. We were poisoned by mold in Seattle. We continue to suffer the consequences despite having moved away.
@wim I would've been fine with just "cs", but the min character limit for usernames is 3, unfortunately
can a user name include an emoji?
@AndrasDeak You, thankfully, have not changed at all. Ever still the old man waving the cane at young whippersnappers B)
20:17
I don't think I have it in me to make all the wrongs right anymore :P
Last year, on the persian new year eve, around 800 people fell ill of poisonous fungi
yeah, that's a job for Batman
This did not work "pi🥧"
That's weird. People can have Zalgo in their username but not emojis?
I feel as if I've always consistently followed my moral compass. However, I've changed compasses a few times in my life.
20:19
@cs95 yeah, zalgo is made of text bits
same as the face in ¯\_(ツ)_/¯
emojis in usernames would probably make for a successful Feature Request
successful maybe, almost certainly
enabling generic unicode also increases the options by which people can try impersonating moderators
Also allows us to properly state @Kevin's starboard status ⭐∞
wim
wim
hard to please me is catching up with 11 stars and counting
@AndrasDeak all the forms of what looks like the diamond (to represent) are prevented from being a user being able to change their name to these days
20:31
I know
still, it seems like a lot more loopholes if completely new pages of unicode are alllowed
in my first year of being a mod - we had fun with a guy that renamed himself "Moderator" and started demanding things of others
things like... "wash my car", "buy my groceries"? :p
I always wonder how 100-year suspensions happen
@Andras you piddle off enough sites so that it's not even worth bothering with a cool down period (suspension) - you're just never welcome again.
20:34
I meant that impersonating a mod is the kind of bad-faith thing that should start with long suspensions :)
wim
wim
I dunno, it's still unclear whether the community elections are producing better candidates than "people technically competent enough to figure out how to put a diamond in their username" would yield
@wim sounds an interesting debate point - what are you thinking?
I was told, in that aprilfool meta question, that shog9 will come to beat me, should i acquire more than 7 negative votes
And that was apart from suspension for lifetime.
wim
wim
@JonClements throwaway joke mostly
the mods are not doing a bad job, but the site seems to be straying away from "curated resource of useful content" and towards "welcoming place for beginners to learn programming and/or get help debugging their codes"
That wouldn't be the mods' fault
20:40
Indeed, but that's not the mods' fault. That comes directly from up above.
wim
wim
yes, I know
We used to have "people beat others IRL" jokes, but then twitter started becoming more important than meta and they tried to deprecate a meme. That's how desperate the situation is at SO HQ.
we_dont_do_that_here.gif
wim
wim
the concern is that strong technical people (who often don't have the best social skills) will get bored of this bs, and eventually SO will be just a load of blind-leading-the-blind
It's not like there's so much quality content to be created. Most new non-crap posts are corner cases and problems complex enough that you can't just dupe them.
Take it up on Meta, there's plenty of people who will feel very passionately about opinions that don't really make sense
20:42
meta will agree that the situation is crap but meta is helpless
Oh, I thought Our Planet was an extended allegory for the problems on Stack Overflow. The plastics that trap wildlife are like the low-quality questions that trap experts. The walruses falling off the cliff are like the legitimate questions that never get answered because they're crowded out by garbage. You mean there exist problems that are larger than this web site? — Cody Gray ♦ 16 hours ago
@rogan oh but it does... it will agree... but until the PTB's enable better moderation tools - then umm...
wim
wim
@ksalf hahahah. good one.
@JonClements it agrees to a point and then it just starts diverging with people turning on themselves in my experience
Which is probably symptomatic of "nowhere to go"
@roganjosh Not themselves, each other. There are always people who think "helping others" is why we're here (or they merely don't give a yam), otherwise the front page wouldn't be what it is.
@wim: I made wim laugh...hurrayyyy
20:45
you'll always see a strong current of "let's burn all the crap" and a few loud objections
and of course the outlook of members varies between "meh" and "the world is ending"
That is "themselves". I think that most on Meta are kinda united in many ways, and when you can't go forward, they just start arguments amongst the group they actually stand with
wim
wim
oh man that walrus video was really sad
I'm pretty much powerless here... I have a "backroom" where I can speak to my fellow mods, I can clean up all posts/spam/user accounts you should never have to see and do other stuff on the system that unless you're a mod you're never know about... but still... the main thing is still this
@wim was that Attenborough's one?
wim
wim
yeah our planet
I'm not sure what's sadder, that or the walrus operator in 3.8
:'=
it's in a way a twist of fate that poor walruses fell down from WALls in RUSsia
wim
wim
20:52
assignment expressions: putting the "y tho" back in "python".
:|
@Arne wim's on to something ^
@JonClements I apologise but I've missed what "this" is. The debates about being welcoming or the plastic in the sea? I'm curious what takes up your time
ugh - some stuff to do before bed... always a pleasure never a chore and all that... rbrb
@roganjosh are you serious?
Have I come too late into the convo?
20:56
@roganjosh ?
Well, Wim is talking about technically-adept people becoming mods. I'm genuinely not sure what you're referring to by "this" as taking up the most time
unpopular opinion penguin here, walruses are cute
nobody said they aren't :P
Not to start a debate, it has an actual answer, I just haven't followed the convo apparently
you can't hate things that are cute though!
20:58
we don't have walruses
i am the walrus
lol
goo goo go jooo
Errr, "I am the egg man" ?
"they are the egg men"?!
21:01
@roganjosh I read it as "I can talk to other mods and clean up the garbage but there's only so much mods can do to steer the site back on The Path of Light"
plastic and wim's quip about new mods are red herrings
Ok, makes sense, I was just trying to get the context of what "this" is. No biggie. Thanks
also, plastic is bad for doggy teeth
among other things its bad for
wim
wim
heh
that looks like the seaside, not the bay..
21:06
When I suggested Big Bird in an oil slick, there were objections. But Aquaman in plastic is a thing :/
Two seconds after that scene was taken there was a huge explosion. I meant Michael Bay.
From mods to planet to walrus to plastic to doggy teeth(lol) to Aquaman to Bay...best room ever
21:44
Does Aquaman look like Fred from Scooby Doo?
Totally! Just a bit muscular, here
Or perhaps Fred is a discount store Aquaman
:P
@ksalf All that muscle didn't save him from the horrendous fate. If only he knew how to drink, he'd know it was easily breakable.
21:48
lol @roganjosh
... survival of the fittest...
Doesn't drink => physically fit => led to his downfall
F
=>explosion
yellow hair...orange hair...it's all about hairs these days
Has coldspeed again made himself hard to search for?
Who's coldspeed?
21:55
👆🏻👆🏻👆🏻👆🏻
@cs95 I was thinking your identity had been stolen there
"I know that display picture". Right, time to re-align my brain :)
wim
wim
imagine being born in 1995, freaking weird. It's like, you were -4 years old when Blood Sugar Sex Magik was released how are you a walking talking human being
mac autocorrect fail: "With pandas, you can aggregate data group-wise using groupie and egg"
@wim quite a few people were born in 1995! Most of them seem to have turned out okay
I hope
wim
wim
and your "party like it's 1999" was sort of a, OK well I can kind of walk and kick a ball now and I'm figuring out this riding a bike thing
@wim imagine my surprise when I realize that there are young adults whose birth year starts with a 2
"this should not happen"
22:01
um, this isn't a problem? What should grind your gears is people being born in 1999 being like "oh these 90s kids memes are sooo relatable"
also '90 was 10 years ago, right? :'(
Yep. It's better not to think about it
I'm a 90s kid and I can't relate to most 90s kids memes because I was a drooling mess on the floor for most of the 90s
that's a reasonably accurate depiction of a 128kbps dialup modem, I'd say
22:05
oh gosh, i can hear it in my head
Who needs imagination when it's fully recorded on YouTube?
wim
wim
you maybe it was just open in another tab
"get off the internet I need to use the phone" ... what?
@AndrasDeak we had a separate line for our interwebs. Very posh. I may or may not have cost us £800 in a single month playing Everquest
we had a shared phone line with a stranger
Nice video link, comment section is hilarious
22:17
Hi, I'm new to this group and Python also. trying to print a pattern here is the code:
    sp,h = n-1,1
    for i in range(n):
        for j in range(sp):
            print(" ",end="")
        for k in range(h):
            print("#",end="")
        print("\n")
        sp-=1
        h+=1
Hello. And?
if you don't want the empty lines, call print with no args: print() rather than print('\n'). The latter will give you two newlines, one from the print call and one from the newline inside.
But it prints like this - imgur.com/a/BQE200r
@AshisGhosh don't post code or text as images
wim
wim
good psychic debugging deak
@AndrasDeak It's not code, it's the result and expected result
22:22
I just had my crystall ball cleaned the other day
@AndrasDeak Thanks :)
wim
wim
use str.rjust for great rjustice
require('left-pad');
wim
wim
uhh take that to 17 please
22:44
@AshisGhosh why is it an image instead of copy/pasted text?
22:55
Oh god I clicked that link and accidentally joined the javascript room
wim
wim
23:08
cool hack to make a lazy function?
def g():
    print("doing stuff")
    return
    yield
00:00 - 18:0018:00 - 00:00

« first day (3105 days earlier)      last day (2066 days later) »