« first day (4355 days earlier)      last day (818 days later) » 

07:56
Quiet weekend it seems. No computers exploding for 21 ours is a good streak, perhaps I should start programming
08:13
Maybe everyone watched Cyberpunk Edgerunners and decided to stay away from technology for a while
Ah, I hadn't considered that angle!
08:52
This answer on Academia is worrying. That advice seems completely outlandish for the issue and yet it got all those upvotes?
09:03
stackoverflow.com/questions/73761241 I mis-voted, of course we have a canonical for this at stackoverflow.com/questions/45621722
@KarlKnechtel hammered
@roganjosh idk, it seems to me like an correspondingly serious issue. There will potentially be a lot of published material out there, and/or social relationships that would poison the existing identity
I would be surprised if any academic type worth their salt wouldn't actually just be intrigued by what a tumour can do to the human mind; recovering from that, to me, would be a badge of honour
I suppose people take things in different ways, but I think I would be able to wipe the slate clean if I knew the story. I guess I wouldn't begrudge someone for changing their name if I later discovered they were the person hurling abusive emails at me a few years ago, but it does seem disingenuous
09:45
I can easily imagine a disgruntled academic, who had a history with the crank, not accepting the tumour claim at face value.
10:14
Fair
 
2 hours later…
12:43
"During sickness, we lose our appetite because digesting food requires a lot of energy. Stick to easily digestible foods like soup."
Me, eating lentils with dumplings and bacon: "Interesting"
They're not mutually exclusive? Lentil and bacon soup is a thing
And dumplings are, well, dumplings. They can float anywhere
Huh, interesting idea for a soup. Never heard of that before
There's a lot of variety in the image search results for this... on one extreme there's water with a handful of lentils in it, and on the other, things don't look much different from what I'm eating right now
13:11
Good lord, the link is too long to post. But search "Baxters Favourites, Lentil & Bacon Soup 400g". It's pretty tasty, actually
It's a thick soup. Baxters >> Heinz. Heinz was done for ripping off German customers a few years ago anyway because they were diluting your "juice" (?) on baked beans etc.
Hello Guys can anyone describe this syntax to me?

XX = [1, 2, 3, 4, 5]
print ([['idle','no','yes'][2*(n==1)+(n==2)] for n in XX])

I don't understand what's going on in this part:
['idle','no','yes'][2*(n==1)+(n==2)]
That is awful
I know ternary conditions in JavaScript
[2*(n==1)+(n==2)] evaluates to an integer
Is it somthing similar?
13:17
It's a code golfed ternary condition, yeah
Well, two
[2*(n==1)+(n==2)] exploits the fact that booleans are subclassed from integers, so each expression (n==x) evaluates to a 1 or a 0
The first part is a list then another list comes after?
The first part is a list, the second becomes an integer index of the first list
AHA, OK nice
the_list = ['idle','no','yes']
the_index = 2*(n==1)+(n==2)
result = the_list[the_index]
13:22
Wish you bests
13:33
Hmm, I should apologise as you're Austrian but you were hit with it too (unfortunately a pay-walled article)[telegraph.co.uk/news/newstopics/howaboutthat/6198533/…
I've never even heard of these companies tbh
Hmm. What's wrong with that link? I know I borked the formatting, but I'm curious about how it's throwing a 404
And you haven't heard of Kraft Heinz?
Aren't the parentheses the wrong way around? Should be [text](link), I think
@roganjosh Nope
They are (because I wanted something inside () and then realised it would bork the markup) but not sure how I get a 404 from it
The closing ] got included in the url
Because... reasons
13:40
Pesky reasons. Foiling my plans once again :/
 
2 hours later…
15:53
Working with other languages always reminds me of how convenient it is to work with data structures in python. JS be like... List comprehensions? Nah, Array.from(someCollection).map(item => ...). dict.pop? Nah. Iterable WeakDict? Nah. Tuples (i.e. a hashable container)? Nah. dict.get(key, default)? Nah. Soooo much boilerplate required to do everyday things
But god forbid python doesn't implement i++!
I hear you...I had the same realization when doing my own project with python and js too
 
2 hours later…
17:46
opinion on this package manager github.com/pdm-project/pdm ?
Can't be worse than poetry
Oho? A negative opinion about poetry? That's a first for me
How does it fit with Python Packaging's vision of One Tool to Rule Them All?
 
1 hour later…
18:58
peps.python.org/pep-0582 this seems cool way , didn't know nested env issues and handliing
I think that just makes me want to double-down on getting everyone at work using virtualenv
"This won't work. This is why." is much easier to explain than "Python did something here to look for things and it seems to have found something but I don't know where or what it did"
19:15
i guess this What is PEP 582? in github.com/pdm-project/pdm readme , made me think about the environment and how we handle it
How do you guys use virtualenvs? I have my IDE (i.e. debugger + everyday tests) use the global python, and before a release I let tox run the tests with all supported python versions (3.7-3.10, currently)
I never directly interact with a virtualenv
I don't do anything fancy, but I have 12 customer repos to jump between and I know I can navigate there in a terminal, source env/bin/activate and it will just work. It's a contract to myself, basically
Are those libraries or apps?
for me, i use pyenv to downlod the different python version without adding then in /usr/bin, and with those python version create virtual environment for each project ( wrong way as per this pdm) with specific python version requirement
@Aran-Fey all customer projects are just that - repos. They could be webapps than you could launch without installation, they could be libraries that I install into the virtualenv
Regardless, I give them a virtualenv
19:29
@roganjosh how you lock the package versioning ? pip freeze ?
No, absolutely not. pip freeze > requirements.txt will lead to pain. You can use pipreqs if you're trying to backdate, or just stay on top of it when you're building a package
pip freeze will pin everything in the dependency tree and get broken very quickly
@roganjosh Ok, I see. I thought if they're apps it makes sense for them to have pinned specific versions of their dependencies, which would then conflict with other apps. In which case the venvs would be unavoidable. That would pretty much be only reason why I'd bother creating per-project venvs
@roganjosh so how it determine the versioning ? like lets say i clone a project and didn't install any package in environment only pipreqs and then run the command to store , but with that way will it be able to handle the lagacy project ?
also how is pipfile.lock , by reading through it it seems it is better solution to lock all requirement precisely
I'm unclear what angle you're asking from. You're asking how to make a requirements.txt for your own legacy projects?
You say that is if requirements.txt had a well-defined purpose
What's the end goal here? You want to pin each (even transitive) dependency to a particular version?
19:38
basically all i want is whenever someone in future run my project, they shall able to install the exact package and not wait for dependcy resolution of pip to try all packge to be compaitable with each other
@sahasrara62 I think we need to make a distinction here. pip freeze will list all packages installed, even those that are a dependency of something else you installed. The point is not to do that - you list the packages you actually use and let pip resolve all the supporting packages
@Aran-Fey this deployment approach holds for me, but you make a fair point
@roganjosh ok i guess i am doing it wrong, will try with the pipreqs to get all running/used packages and let there be no pain for other person in future
It's not the first time we've discussed requirements.txt :P
@sahasrara62 Huh. I never had a problem with dependency resolution taking a long time. Your only goal is to speed this up? You don't care about having "reproducible installs", where every install uses the exact same versions for all dependencies?
yes, 1 week all went into it and understand how mac work
19:42
Oh wow. Well, I was gonna suggest you figure out why it's taking so long and then only pin the package(s) that cause(s) the problem, but if you spent a whole week on it... probably not worth the trouble. Best just pin everything then
In which case pip freeze does the job just fine
Actually, I had Hell trying to get HDBSCAN installed on a Mac and the solution was to unpin things
@Aran-Fey well project is legacy and soon going to be refactor in different framework so idc about anything now,, just use the same version and let it reproduce in local so one can start working on it be for maintaince
whole issue was using 3.6 in mac m1 chips, and i didn;t know about rosetta2 and one can use x86_64 in that, also there are some custom packages of 4-5 year old so lt of compaitibilty issye, plus no one maintain the project so well
not complaining anything, just joined the startup a week back, and all handled by 1 person so far, so noblame to him
Most M1 compatibility issues are now fixed. I think pip freeze is brittle. I don't think I have much more to add here
yeah , thanks for info
I guess pinning too much could cause problems for other people. Just because it works on your PC doesn't mean it works on everyone's PC. If a module needs to compile some code, or it depends on an external program, things can easily go wrong
 
4 hours later…
23:35
I have yet to encounter (or at least notice) an issue where a project of mine actually cared about the version of whatever. but I haven't exactly been trying to set up tests to see what will happen if someone else already has a really old version of whatever dependency

« first day (4355 days earlier)      last day (818 days later) »