« first day (4591 days earlier)      last day (361 days later) » 

6:11 AM
I don't understand why that would be a controversial question for SO. The response is disappointing
I also don't understand why my gravatar has entirely changed overnight. SO is a mysterious being
 
6:38 AM
@roganjosh It's weird how a little change can mess up my brain haha, was so used seeing certain patterns
 
Actually the gravatar thing is getting to me, I wonder whether this might be a litmus test for a compromised account
 
Nordine's avatar also turned orange yesterday and now it's back to normal
 
There's a Meta-SO thread on it. Seems to affect everyone.
 
Ah, the threads I found were historic but it seems this happens quite a bit anyway. Panic over
 
6:45 AM
Thank you kindly
 
Mine changed on SO but not on other sites it seems
 
What's extra wonky in my brain is that mine is in an uncanny valley with user2357112 and it's making me feel like a poor imposter :P
 
6:58 AM
I think I might take Paul's lead and upload a character. This is Professor Mori-artemisinin from my old not-to-be PhD days. A confused antagonist for Shirlock Holmes given the fact he's the root cure to hundreds of millions of malaria cases each year
 
7:18 AM
I say go for it!
 
The deed is done, though it doesn't seem to have propagated into chat for some reason. I even tried logging out and logging back in. If turning it off and on again doesn't fix it, I guess there's nothing else one can do
 
8:00 AM
@roganjosh now it has. that will take some getting used to ^^
you used to be a chemist?
 
Chemical engineer. 7 years of my life now mostly forgotten!
 
@Aran-Fey ah yeah, I complained about it before there was a meta post in the Meta room. Zoe helped by finding the original green gravatar image (since I didn't think of using archive.org...or saving it in full resolution)
I just put it back manually. I'm too used to it to change it for now
 
I was very close to doing that myself but I think I can live with this new identity (though, as I found when I changed my name from roganjosh to my actual name) it's not easy. It's really odd how attached one can get to an image generated from a hash
 
yeah, I know what you mean
 
The internet geek's version of "have you done something new to your hair?" but on steroids. Times 5000.
 
8:24 AM
@roganjosh I gotta say though, that image gives me nostalgia about something that never took place: en.wiktionary.org/wiki/….
it's weird how emotions works, but anyway, nice drawing still
 
I just wanted the name pun :P It was a toss up between Prof. Mori-artemisinin or Pipettito. So many bored hours in labs waiting on analysis. "What productive thing can I do? I know, dress up the electronic pipette for the next user!"
 
ah yes, the basic human need to personify things we spend extended amounts of time with
which reminds me, I have to sell my car, Luigi. sad day.
 
8:42 AM
Oh man, that is sad indeed :(
 
 
3 hours later…
11:35 AM
@Arne I wanted to make a joke about Mario, but it's too sad for that :/
 
12:15 PM
it's fine, I had enough time to let go. Also, he's called Luigi because he's green, so Mario jokes fit well. appreciate the sentiments though :)
 
 
2 hours later…
2:28 PM
Hello
I have little skill with Python.
I copied
```python
from typing import List


class Solution:
def mostPoints(self, questions: List[List[int]]) -> int:
n = len(questions)
dp = [0] * (n + 1)
for i in range(n - 1, -1, -1):
point = questions[i][0]
jump = questions[i][1]

nextQuestion = min(n, i + jump + 1)
dp[i] = max(dp[i + 1], point + dp[nextQuestion])
return dp[0]


questions = [[3, 2], [4, 3], [4, 4], [2, 5]]
```
how to see result?
 
@RaphaëlColantonio fyi, code formatting is done with ctrl+k, not fences
 
from typing import List


class Solution:
    def mostPoints(self, questions: List[List[int]]) -> int:
        n = len(questions)
        dp = [0] * (n + 1)
        for i in range(n - 1, -1, -1):
            point = questions[i][0]
            jump = questions[i][1]

            nextQuestion = min(n, i + jump + 1)
            dp[i] = max(dp[i + 1], point + dp[nextQuestion])
        return dp[0]


questions = [[3, 2], [4, 3], [4, 4], [2, 5]]

print(Solution.mostPoints(questions=questions))
 
to answer your question, don't put the function in a class
just declare def mostPoints(questions: List[List[int]]) -> int: [...] like that, and then call it like `print(mostPoints(questions=questions)))
 
It works! Thanks @Arne .
 
no problem, thinking in non-OO design takes a while
 
2:35 PM
It is a Leet code question (question 2140 - Solving question with brainpower).
from typing import List


def mostPoints(questions: List[List[int]]) -> int:
    n = len(questions)
    dp = [0] * (n + 1)
    for i in range(n - 1, -1, -1):
        point = questions[i][0]
        jump = questions[i][1]
        nextQuestion = min(n, i + jump + 1)
        dp[i] = max(dp[i + 1], point + dp[nextQuestion])
    return dp[0]


questions = [[3, 2], [4, 3], [4, 4], [2, 5]]

print(mostPoints(questions=questions))

# Result:
# 5
 
3:01 PM
I got a first today. Since introduction of match/case, I had not a single good use case for it ... until I had to interact with a particular flavor of badly defined data-shapes: gist.github.com/a-recknagel/d0c44f81fef220d5543bfb94c52e6c0a
granted, packaging.Marker._markers is "private", but still the only place from which you can get the actual content of a metadata marker
 
3:32 PM
leetcode has some "easy" questions that aren't as easy
and some harder ones that aren't as hard
 
3:46 PM
most of the time I'm getting time limit exceeded
 
4:45 PM
"time limit exceeded" usually means you have implemented a naive solution - it may work, but there is a more efficient implementation. Look at using dicts for cacheing, set operations for deduplicating or filtering, or a way to iterate over data once instead of mulitple times.
 
5:12 PM
Yeah ik
I've been doing them in order too
 
 
1 hour later…
6:13 PM
.. I did it. I actually broke git
I tried to remove some mega files I accidentally staged for upload, it apparently deleted them, and now the process is just hanging in the terminal
 
6:37 PM
@roganjosh it’s probably just busy sorting its endofunctors.
 
6:57 PM
The name endofunctor implies that it's at the end. Therefore the only correct way to sort endofunctors is to put them in a multi-dimensional list, where each endofunctor is at one end
 
I managed to land the hyperplane. All systems nominal
 
Excellent. High five*five*five!
 
having a fun time tracing processes from multiprocessing package with python3 - when passing a name the usage appears to only capture "python3" parent process name. since this is an always-on process I'd like to avoid triggering a process dump via external env-flags or something like that... any suggestions?
I've found that I can actually apply the multiprocessing "name" attribute to the OS process management utility-layer by having python directly modify at the C language level (see stackoverflow.com/questions/564695/…).
so my approach would be something like: multiprocess spawn with "name" -> where start_process(...){} would handle invoking C's clib to force a name change by PID.
any wisdom/gotcha's forseen by the thinktank here?
appears to be working relatively cleanly...
 
7:13 PM
Didn't know bananas could be defunct
 
I keep putting them in my PC but they go missing every time.
 
At my last company we had a PhD guy apply for a job and he was talking about studying conductivity across bananas. A genuine question from my colleague in the interview - "What unexpected things have you learned about bananas from all of this?". I very nearly had to turn my camera off. Expect banana questions is all I'm saying
@Elysiumplain correct me if I'm being dumb but I'm not seeing what you actually need to processes
 
lesson learned - never engage in conversations regarding bananas with PhD students, or Russian strippers.
 
It looks like a lot of infra thought but nothing about what it needs to actually do
 
just for process name tracing visibility.
I want to not have to track PID manually for software utility X every time, since I'll be having a few persistent processes...but scaled across 1000 devices
 
7:25 PM
Ok, my next dumb suggestion - why can't you number the processes? You could pass that as the first argument
 
because that's what naming schemes are for.
same argument for not programming using hashed variable names :)
why add extra layers of decoding if we can avoid.
 
logging?
 
logging works good when processes are behaving nicely, like a close() is called cleanly...
 
If the processes knew their own name, that would have helped me with this where I had a horrendous time. You asked for collective wisdom, I don't know whether you're actually going down that path
 
and logging doesn't let me hook into the nice existing utilities like ps, or top, or whatever else someone may want to use.
 
7:30 PM
top?
Really?
In my experience, logging is for post hoc analysis, and you'd use top (htop) for real time analysis, but you can get those kind of records from the cloud provider because you're in the cloud, right?
 
well - whatever terminal based process tracing you might pick. it's just an example
and the problem you linked, if I understand it, is more like a sliding window query problem.
we are not in cloud.
 
The problem I linked is just because the processes didn't name themselves :/
 
I've been pushing to not be a 1970 company... unfortunately it's hard
lol
so currently we are doing edge deployments on physical hardware
vs containerization
(sadge)
 
How are you doing this: "...but scaled across 1000 devices"?
 
that's my own magic.
basically I built my own deployment manager with realtime resource sync's
it's a sh**show, but it sells like hotcake
so yes - htop is what i'm currently using to trace thing - the problem being: ...
 
7:37 PM
@Elysiumplain I need to take a moment over that :D
 
processes via htop are unable to inherit Process(name="myproc123")
which is why my approach is to use clib instead as a manual override.
eg: spawn proc in python, with proc name (just a string tag for python at this point), force the real proc to rename itself using the python thread name provided by linkking PID and using libc
@roganjosh It's called living in Silicon Valley...lol
 
Honestly, I wanna steal that phrase as my tagline but I don't think it'll sell me
Thank you for the chuckle :) I don't think I can help with the technical aspects here
 
ty for being my sounding board. always helps to flush out proper communication in writing when someone else
 
@Elysiumplain - is that output from htop? I never saw that feature. Since you have long-running processes, you might want to look at pystack, which I just saw demoed at PyCon, allows you to view the current callstack and vars for a running Python script.
Also, there is a textual-enabled version of htop called tiptop. I'm not sure how it compares, but textual-based apps are pretty powerful for terminal utilities (many more capabilities over curses), so there is potential for future tiptop versions to get pretty interesting.
 
yes this is htop - a callstack would be a nightmare to wade through. If they have just process parent nodes, that is more what I would prefer.
Will look into pystack - thanks.
 
7:46 PM
Search the archive for pystack, I posted some simple code examples here.
 
apt installed tiptop - now it says "pay me crypto"? /s
jsut a reminder - always look at things before just installing ;)
PSA over
 
8:10 PM
I don't know about apt install, I was thinking more about pip install but your PSA is still valid.
 
8:32 PM
My google skills are failing me, does anyone know what C:\Users\me\.sw is? It contains a sw.yml and two folders storage and remotes
 
8:49 PM
just ScreamTest it
 
You mean rename it and wait for something to explode?
 
yeah. back-up, delete, see what screams at you
works for my corporate :D
 
1 hour ago, by Elysiumplain
it's a sh**show, but it sells like hotcake
I got to use it this early :P
 
now he gets it!
 
9:51 PM
@Aran-Fey Some configuration directory for something called sw (or related) which you didn't intentionally install in user-space. Things to try: a) what's inside sw.yml? b) check the creation date of that directory against install dates of other software/ dot-directories/ packages. c) Possibilities: some editor plugin under Visual Studio, e.g. KIE Serverless Workflow Editor or other
...when you say it has a directory 'remotes', sounds plausible it's some editor/ SCM plugin/ related
@roganjosh Which (UK?) body funds studies of conductivity in bananas, and what was their research intent? (RIP Harry Belafonte, btw.)
 
Apologies, I don't remember who funded it. What the were loosely talking about was a probe that could check ripeness of fruit in general
 
Non-invasive and doesn't pierce the banana's skin, I presume. Otherwise you could just use a multimeter.
 
The conductivity of a banana changes based on its ripeness, which doesn't surprise me. It also wouldn't surpise me if the whole thing was noise because bananas are, well, bananas
The one thing they controlled for was the distance between the sensors (not sure what they were ?). Even so, it wouldn't account for the diameter of the banana
To be fair to them, they did point out that they only got a few months in the lab before everything got shut down by covid and the whole thing became a theoretical exercise
They jerry-rigged it in their own flat. That was actually a positive note in my eyes, but the rest of the interview didn't really work
 
10:13 PM
@roganjosh Presumably two (aluminium?) electrode bands a set distance apart. But anyhoo 🍌📏. Decentralized Banana Ops.
 
We need to take down Big Banana
 
this doesn't actually work fully off of banana's radiation, since there also low frequency radiation around us, but funny usecase still
@Elysiumplain wait, so you made a sort of kubernetes from scratch? Is it using just Python or other language? (eg: C).
I would imagine it would be better to do it with C for best performance per core, but who knows
@PaulMcG that's just the tree view IIRC (think this is mapped to the F5 key by default). I use it all the time. I think I only use like three keys/feature in htop, but I admit there a lot of other ones that I don't know about...
didn't know about the textual version (tiptop) :o that's pretty cool
@Aran-Fey I never encountered it, but from quick google search (and if it is to be believed), it seems to be a raw audio file format
your best bet is to use the file command from a linux distribution, or maybe on msys64/mingw. if not that, you could go the weird way, and use less or an hex viewer...
I don't put much faith in file extension since I'm too used to Linux way of not depending on that to dictate a file format
 
Yeah, I'm getting itchy to try writing a textual TUI app. I love that it has things like animations, dark mode, and mouse support, and is really good about handling resizing the window.
 
yeah, it looks nice. I didn't try it yet since I stopped some of my curses project a while ago...might try it once I'm done with one or two tkinter project
here is a POC for a toolbar I made recently: imgur.com/a/aA5ITfC
the code is a mess so it's not finished/uploaded yet
 
10:28 PM
I'm a bit daunted by the need for some CSS, though textual supposedly uses a simplified dialect
 
that's exactly what I was about to say too :) the part about CSS was what made me not try it right away, but the look-and-feel definitely make it tempting
 
10:41 PM
@NordineLotfi good point - might wan tto just start with the file signature and see if it's just a placeholder extension because some company wants to feel special.
 
yeah, I do find it weird, but I have seen some shell script/project on Linux do that with dotfiles, so I can see why one would do that (eg: expect that no one would find it on Windows unless they enable that one feature to see "hidden folders and files")
 

« first day (4591 days earlier)      last day (361 days later) »