« first day (4366 days earlier)      last day (568 days later) » 

3:16 AM
@Aran-Fey ah good, you understand my objection to the question, then. I have found that user has a history of asking bad (underspecified) questions and can't seem to get the hint.
 
 
3 hours later…
6:27 AM
anyone how to extend pycharm licese in mac ?
got it
 
 
1 hour later…
8:00 AM
@Kevin the classic
 
8:23 AM
If a class requires a file to be open to work properly, would you make it so the file is created and opened at the same time the object is created, or would you have a open() and close() method?
 
No open(), but close() is fine
 
But the close() method should finalize the object then? It should not be able to be reopened, right?
 
Yeah, once you close it it's unusable
 
9:04 AM
How would you structure this?

I have a ClassA that uses a class called ClassAWriter that writes specific things to a file.

class ClassA:
    writer: ClassAWriter

However, the ClassAWriter writer needs to know the attributes from ClassA

class ClassAWriter:
    obj: ClassA

This circular thingy feels risky. How would you conquer this problem? :D
 
9:16 AM
I could perhaps make a ClassAAttributes class that contains the things necessary between these classes and just use that.
 
9:38 AM
I guess circular dependency here is alright, as they are tightly connected to each other
 
I'd just make the ClassAWriter hold a weakref.ref to the ClassA object
 
Ooh, nice!
 
@Warcaith Is a context manager an option?
 
10:03 AM
@MisterMiyagi Yeah, I do think we'll use a context manager for this :)
 
10:15 AM
@MisterMiyagi A context manager does not work between different methods, or am I wrong?
 
@JRichardSnape Did you file a bug on numpy, pandas or numexpr? (link?)
 
10:34 AM
A reminder that "TypeError: list indices must be integers or slices, not str" usually boils down to "Expected dict, got list instead". This sounds self-evident, but when working with deeply-nested json, pagesful of brackets and parentheses start to dance in front of your eyes. Someone recommended the superb free jsoncrack.com/editor to make sense of deeply-nested json schemas.
 
i want db dump , from certain tables, from aws where i dont have access, i can access aws docker instance and run the django shell, so my question is how can import the data to my local
 
11:09 AM
^^ before anyone points it out, pd.json_normalize is supposed to convert deeply-nested json into flat, while selecting subsets and blasting hierarchical keys into flattened ones. But it's very brittle, a single mistake breaks everything and the error messages are almost indecipherable. So I end up writing an generator to index into and yield individual records, at least until I've gotten the schema working.
 
11:48 AM
Can I use @contextmanager on a class?
 
If calling the class returns a generator, then yes. So no.
 
12:31 PM
This is one of the densest collections of concepts around the origin and meaning of life I've heard, from the Principal AI Engineer for Intel
 
morning cabbages, folks!
 
1:25 PM
@roganjosh really enjoyed this
 
2:10 PM
To paraphrase the interviewee, "after becoming proficient in meditation, you can control your neurotransmitters at will, and maintain a state of constant happiness. But you'll get bored of it after a few months". This is an enormous claim, and I suspect it's simply false.
en.wikipedia.org/wiki/Effects_of_meditation lists many well-studied benefits of meditation, but "neurotransmitter" appears nowhere on the page
 
I mean, I don't necessarily believe that either, but I'm guessing it's on the same level as when some people say "you can control your own brain in 3 simple steps!" it sounds bogus yes, but depending on what they mean by that, at best, it's just exaggerated/misleading or don't describe it in a meaningful way.
the field of meditation have a lot of fuzzy stuff, and because it's inherently based on certain belief systems, or other times on simply "imagination", some people just get away with a lot of those kind of explanation
 
"You can control your neurotransmitters" does not strike me as fuzzy at all. The claim is either true or false, it doesn't matter what you imagine or believe.
 
@Kevin That seems obviously true. I can cut myself and release pain neurotransmitter...
 
@Kevin it's fuzzy if you take into account how others would think of that sentence :) take for example the sentence I mentioned above. Some people could think "so this is about my own consciousness" while another would think "so this is about how I think?"
 
Also doesn't seem far fetched to say if you can feel happy at will to say you can control your neurotransmitters. The statement is fuzzy enough to be trivially true, like most such interviews
Also he has a weird tendency to widen his eyes where you see a lot of white, creeps me out a bit :D
 
2:25 PM
yeah, it's like saying you can fly, but then just take into account that flying == stay in mid air for a certain amount time, while most people would think that flying == controlling your trajectory in mid-air, etc
it's all about interpretation when it comes to these cases
@Hakaishin that's something I noticed too but didn't know how to phrase it.
 
@NordineLotfi But consciousness and thinking are emergent phenomena, and neurotransmitters are a real objective thing that you can see with a microscope.
 
@Kevin exactly, and I agree with you here, but others wouldn't necessarily either: 1. know that, 2. want to know that, so they'll stick to what they want to know/think, 3. will still interpret it another way than it is supposed to be based on the current context
I mean, here I'm strictly saying this for the context of "meditation".
 
If you take the sentence "I went to the grocery store today" and some people think "so this is about the concept of hunger" or "so this is about how I diet?", then those people are wrong.
 
@Kevin somebody seems to be very convinced of reductionism. You might want to read some criticism of it
 
I wouldn't call that reductionism, since reducing meanings can be context based. More like "taking an unexpected angles to certain things"?
 
2:31 PM
@Kevin apropo emergent phenomena: readthesequences.com/Say-Not-Complexity
 
I'm mad at The Sequences right now, and the larger rationality community right now. Thirty minutes ago I searched for clinical studies on wireheading and related forms of self-administered brain stimulation, but I couldn't find anything. Given how much the community philosophizes about it, I expected a mountain of citations.
Ah, just found a good one. "In a case published in 1986, a subject who was given the ability to self-stimulate at home ended up ignoring her family and personal hygiene, and spent entire days on electrical self-stimulation. By the time her family intervened, the subject had developed an open sore on her finger from repeatedly adjusting the current." From en.wikipedia.org/wiki/Brain_stimulation_reward
Here we have a subject who has a very real and objective ability to control her own brain activity. She chooses happiness over literally any other action. This does not sound like someone who will get bored of happiness soon.
 
The experience machine or pleasure machine is a thought experiment put forward by philosopher Robert Nozick in his 1974 book Anarchy, State, and Utopia. It is an attempt to refute ethical hedonism by imagining a choice between everyday reality and an apparently preferable simulated reality. If the primary thesis of hedonism is that "pleasure is the good", then any component of life that is not pleasurable does nothing directly to increase one's well-being. This is a view held by many value theorists, but most famously by some classical utilitarians. Nozick attacks the thesis by means of a thought...
 
The interviewee is trying to depict humans as noble elevated thinkers that will eventually choose vegetables over cookies once they've become mature, but I don't consider that inevitable or even typical
(Never mind that I was eating candy while I watched the video, and felt personally affronted at the implication that eating sweets is immature)
 
@Kevin woah crazy
@Kevin different definition of happiness, easy :D
He doesn't mean a dopamine high kinda happiness, but a kind of contentedness with oneself and the world.
 
If we want to go down the "different definition" route, I'm fine with that. That simply means that everything the interviewee says is a vacuous truth that only applies within his personal system of definitions, and so there is no point listening to what he says
 
2:45 PM
@Kevin this, this is exactly what I wanted to convey earlier
but the way you said it feel much more "high end" :D
 
@Kevin a little harsh for using the word happiness in another way than you do. It's not as if that term is as clearly defined as some technical term or a physical term like gravitional force etc.
 
@NordineLotfi At the time I thought we were on the same page, but I had to type another ten paragraphs to figure out what page I was on.
 
@Kevin that reminds me of another readthesequence, but no way I can find it. I should finish it at some point
 
@Hakaishin I'm being a little harsh, I agree. I could approach the topic with a more neutral tone, but then it would take a hundred paragraphs to establish my point :-P
 
Also he got you while eating a cookie, totally understandable :D
Ugh another refactor incoming. Man I wish I could go back in time and block the copy paste command for this guy. Sooooooo much repeating yourself
 
2:58 PM
I do like the guy's idea about separating the "creator god" from the "god of meaning". Especially because it applies in both a literal sense and a figurative sense. In the literal sense, there are religions that say one particular god created the universe, but that god is not necessarily an authority on what we should do with our lives. Gnosticism, for example, credits the Demiurge with the creation of the physical world, and depicts him as either misguided or outright evil.
 
@Kevin smbc-comics.com/comic/irony-2 It's concerning I can only respond with webcomics :D I feel like the tv trope guy who only can respond with friends quotes, just more intellectual
 
In a figurative sense, you could interpret the "creator god" as the instinctual base drives that each human has, owing to millions of years of natural selection. The creator god wants you to eat cookies and reproduce and maybe be nice to your kin, in roughly that order. This creator god is kind of dumb, and you are allowed to listen to other drives that weren't programmed into your dna. Those drives might be the god of meaning.
@Hakaishin Nah, that's fine. I got half of my philosophy knowledge from smbc anyway.
I'm trying to remember if "a dung beetle created the universe" is a real-world creation myth, or if it's from Discworld
 
@Kevin I wanted to say more widely shared believe, not real. Funnily enough that is the definition of real, what a world we live in :D Were usage numbers is an indication for reality, until the extinction and then it's not anymore :D
 
I think that's somewhere in Egyptian mythology.
 
3:18 PM
@NordineLotfi meditation is just simple thing, activity done to reach state where you dont think, t0 achive this let all activity/though which come to your mind freely, dont think too much about them, let them come and let them go automatically and not letting them to affect your mind state/behavipur.
 
Is it just me or do most tools in python's packaging ecosystem have awfully useless homepages? Take PDM or pants for example. After 15 minutes of reading the website I still haven't the faintest clue why I'd want to use either of these
("most" may be an exaggeration. "too many" may be more accurate.)
There are always installation instructions, and after that... nothing. You're on your own. They don't even tell you what the tool does, outside of some vague marketing phrases like "Pants has out-of-the-box support for multiple dependency resolves and their corresponding lockfiles"
 
@Aran-Fey you can literally extend that to many other type of project on different subject...I looked around github a lot these days, and even the most used or popular project always give off a feeling of under/nondocumented or even sometimes "the code is the documentation" kind of vibe.
 
When I ask for details I inevitably get responses like "Just read the 'Usage' section in the left sidebar bro", which I find entirely unhelpful. So I'm honestly not sure if the website really sucks or if I'm just stupid
 
3:34 PM
@sahasrara62 yeah, I know :) in a way, especially a very general one, you could say it's for reaching "something", or attaining "something", whether that's something intangible, fuzzy, or just hard to explain with words, it is up to whoever is doing it.
@Aran-Fey I can relate, so trust me if I say it's because of the docs themselves, or to be more detailed, whoever participated to making it, which may or may not be caused by just laziness/other reasons
 
Cool, evidence that I'm not dumb. I like it
 
On the opposite end we have gitlab, they have enormous amounts of docs about how it works and their reasoning for things, quite nice
ofc there are dozen well documented packages, that's just one that came to my mind, also because they have a nice color theme for their docs
Have a nice weekend guys
 
Found the Egyptian beetle thing I was thinking of:
Khepri (Egyptian: ḫprj, also transliterated Khepera, Kheper, Khepra, Chepri) is a scarab-faced god in ancient Egyptian religion who represents the rising or morning sun. By extension, he can also represent creation and the renewal of life. == Symbolism == Khepri (ḫprj) is derived from the Egyptian language verb ḫpr, meaning to "develop", "come into being", or "create". The god was connected to and often depicted as a scarab beetle (ḫprr in Egyptian). Young dung beetles, having been laid as eggs within the dung ball, emerge from it fully formed and thus were considered to have been created from...
 
4:08 PM
"There was no cult devoted to Khepri" -- nice example of a creator deity that nobody bothered to worship
And Khepri's Discworld equivalent Scrab doesn't get much screen time compared to e.g. Blind Io, Om, or The Lady
 
4:24 PM
@Aran-Fey It helps to only go looking for tools when you need them. Still pretty happy with just pip and venv.
 
Well, I do need... something. Something that helps automate the packaging process (increment the version number, run tests, publish to pypi, etc). So it's annoying when I find a new tool but can't figure out what it does
 
There's a very small window between "enough hubris to put your project on pypi" and "so much hubris that you assume everyone already knows what your stuff does"
I avoid the latter in my own projects by making things that nobody knows what it does, especially me
 
Smart
 
@Aran-Fey Do you actually need all of them at once as a single tool?
 
Not necessarily all of it, but at least a sizeable chunk. It wouldn't really be worth learning a new tool if it only does 2 of my... 5(?) steps, for instance
 
4:34 PM
I will invent for you a tool that combines multiple tools into a single tool
But you must never run the tool on itself. Never!
 
Plus, a tool that takes care of everything would be much more powerful than a bunch of individual tools. It could, for example, automatically insert the new version number into the docs when I make a new release
 
That's what automation does for me. 🤷‍♂️
 
The tool will be called "Khepri". It will take all of your sh stuff and roll it up into one big ball.
 
loop:
There is a tool people don't understand.
Let's make a tool to help people use it!
jmp loop
 
Last time we concluded that I'm essentially asking for Github/GitLab workflows, but the problem with that is that it makes the changes on the remote and not locally
Which is essentially bad for testing. Making and pushing a commit just to get it tested is a bit... y'know...
 
4:41 PM
I've come to accept that seeing how I don't want to install every single crufty environment on my own machine.
Just running pytest locally gets me 99% of test benefits with 0% hassle.
 
I do have some projects that I need to regularly test with older python versions, where creating a commit and waiting for the server to test it just wouldn't be efficient
 
5:49 PM
Half serious solution: create a "remote" repository on the same computer as your local repository. Then you can use those "commit and wait for remote to test" tools, without the headache of network bandwidth or grumpy repository admins
(You yourself may be a grumpy repository admin that gives you a headache, but resolving this is beyond the scope of this paragraph)
 
6:11 PM
Well, the only tools I know are github and gitlab workflows. Don't think I can make those run on my own PC
I'm quite certain I'll end up writing my own thing, as usual. Should get around to it sometime near 2025 I think
 
Oh good, that's when I plan to get around to all my stuff too. I'll be able to use AranLib to increment/test/publish/fold/spindle my projects, just in the nick of time.
 
6:36 PM
Probably shouldn't plan that far ahead, since in 4 days everything will turn into flappy bird anyway
 
7:04 PM
I had another thought about that, by the way. You know how games expend less CPU power into things that are far away, because the player won't be able to tell the difference anyway? Maybe one day the main character will fast travel to earth, and we'll realize that we've been running on the lowest possible settings all this time
 
AAB
cbg
I see many ppl develop python web apps like for eg using django framework using a docker container so whats the advantage here during development or deployment?
I udnerstand a database running as a docker container is easy to delete or use
and does not clutter the desktop/development machine
but what does something like django docker container do here?
 
Alternatively the main character will leave the earth and eventually we'll all fade into the skybox.
 
AAB
I mean python already venv module which makes things clean
even if multiple ppl are working on the same stuff a venv and pip install the reqruirements.txt should be enough
why docker?
How does it help with development or say deployment of a django web app?
 
Not a clue
 
7:32 PM
@0x263A If they move too far away, time will simply stop moving for us. We probably wouldn't even notice
 
Currently looking at a stack trace with the exception message "it is impossible to get here". Do I get a prize?
 
A letter of recommendation if you ever want to join the QA department maybe
 
Possibly the player character is just far away enough from Earth that my hard drive has the occasional 1/2 amongst its usual 0s and 1s
I wrote that exception message last week. Visual Studio was very clear that the method had zero references, and it was even happy to compile after I removed the method entirely. I allowed the method to keep existing, though, due to my baseline paranoia.
 
Let's send out a radio signal into space that says "Please increase your render distance"
 
Now Visual Studio is helpfully putting its "code is paused here" arrow in the middle of my unreachable method, which is still marked as "0 references". The call stack window shows the unreachable method, followed by "[External Code]".
I should have known the culprit was code I didn't write. Code I didn't write is responsible for 99.999999999% of the world's programming problems.
 
7:44 PM
Could it be called from a dll? Are dlls a thing in C#?
 
They are, but I think it's ISS that's calling it. The web server is capable of calling methods that are marked as "0 references", but it's never done it this way before. Same song, different instrument.
 
@AAB Because you can use container orchestration through Kubernetes and use Elastic Something Something to load balance over it
 
The international space station is calling your function? Cool
 
Correction: IIS, not ISS. If the International Space Station can reach my local testing environment, that's a serious security issue.
 
Basically, you get perfectly-defined clones of the backend service and can be spun up/down as required by the incoming load
 
7:48 PM
The only permissible scenario is if I was on the ISS, running IIS in the ISS
 
Additionally @AAB, a virtualenv does not control the system/OS that your process runs on. When you use FROM in Docker, you get a fixed image to build on, so it's guaranteed to be stable not just from the Python side, but any OS stuff you rely on
@Kevin That's patently untrue because KevinScript underpins so much
Although, actually, I guess it's unfair to blame the underlying language
 
8:04 PM
KevinScript does only what you ask of it, unless you trigger its undocumented Sicko Mode
 
 
1 hour later…
9:15 PM
There was an error processing your request!
HTTP Code: 200
API error code 0 (OK)
 
Jenkins is fun for that. It ends with SUCCESS even when the script threw an error. "I did my job executing it, the rest of the yam is your problem"
Actually, that's not fair because I didn't factor in boto3 in the process. I'm hard pushed to determine whether that library or your 200 code is the most egregious wronging
 
 
1 hour later…
10:26 PM
@Kevin Show us... and no, not if you wrote that message yourself :)
 

« first day (4366 days earlier)      last day (568 days later) »