« first day (4424 days earlier)      last day (741 days later) » 

08:18
@Aran-Fey not sure what this should look like. There is a plugin that will let you preview markdown but it won't be entirely inside the active editor
If you right click on the .md you can select to "preview" it as the first option. I could have sworn I needed an extension for this but I can't see one that was relevant, just ones for being able to do something similar for CSVs
@Aran-Fey found one but never tried it: marketplace.visualstudio.com/… seems like it could work for Python
I reckon the whole "preview" thing is what Aran would like to avoid. It does mean jumping between windows while I'm guessing he wants it embedded in the actual editor
ah yeah, you're right. I thought from the first screenshot that it would display the markdown directly in the comment :/
I never really used pycharm but I don't know if it's a feature there. If it is - there's hope that there will be some VSCode extension to replicate it. VSCode gonna take over the world
the only working solution I found for doing that is a vim plugin, which I don't think would be relevant here anyway...:github.com/vimwiki/vimwiki
it's targeted for making "knowledge base", but, based on the code (I remember going through it on older version at least) it modify the markdown code to their representation without switching window/buffer
it only work for a portion of markdown syntax though, but there a trick to make it work with the full markdown syntax (have to use an older version of the markdown plugin for vim though)
Actually I don't think it directly support comments, so disregard what I said earlier
I think I talked about it with you once, but I guess it could be a viable solution to make an extension using that, although it's archived now..
08:36
I'm not sure what we're talking about now. I was searching the normal library of extensions
hmm, might have veered a bit out of the current context yeah. My bad
:P Just egging Aran on to work on his TODO and build the extension?
08:53
@NordineLotfi Me too. That was one of the 2 extensions that made me go "I finally found one!", only to let me down 10 seconds later :(
@roganjosh honestly, I don't use vscode much, but if I did, I would probably use this too
thanks to SO/SE, I'm now more used to markdown, so it's hard to let go of that habit
@Aran-Fey I'm sure there a way, but I don't know Typescript :/
there the python wrapper for vscode api I posted above if you want to try though, but I don't think it support everything
I use VSCode almost exclusively and, if I'm honest, I'm not sure I would use this. There's already enough stuff going on in Dark+ theme than have bolding thrown into the mix. I appreciate that this is totally subjective, though
I certainly wouldn't have thought to look for it, anyway
09:08
I actually don't care much about most of the formatting options, but the one I'd really like is `backticks`
But it would also be nice for docstrings, once sphinx dies and is replaced with something that uses markdown
does that mean you'd want code highlighting when there is code inside backticks? (inside multine comments)
That would be the cherry on top. But really I just want it to stand out. Sometimes it's hard to see where the code begins and ends
@Aran-Fey Start with the man in the mirror. You can ask him to change his ways.
moonwalks out of chat again
I've tried, but it's like talking to a wall... :P
He never listens, every time I speak he opens his mouth and talks over me
I think he's saying something about sphinx and markdown, but I didn't really pay attention
Maybe the man in the mirror is thinking the same thing.
09:23
I doubt it. We're nothing alike!
10:22
unclear; possibly typo/not reproducible; likely duplicate of something if there is an actual question stackoverflow.com/questions/74581264
 
3 hours later…
13:47
I think I solved (partially) the mystery of why what I wanted to do with multiprocessing + a different python executable didn't work. When using, and only when using multiprocessing.set_executable, if I use Queue to pass things around to a specific process/pool, everything hangs because of the fact that Queue use a threading.lock.
I obviously couldn't do it either with a global variable/list/dict since each process do not share that. So I tried Deque instead and it worked :)
Now it doesn't fully work either, since using Deque have the same problem as using list/dict/variable across different processes. So I used the pickle idea I tried last time with that, and it now work 100%
It's also decently fast, since I only use time.sleep(0.01) with a while loop to wait when the deque is empty. (speed wasn't the main goal anyway)
 
2 hours later…
15:48
Hello everyone! i became interested in python memory topic. I didn't really understand how private heap was implemented, I got it that way like, its like origin heap manage by python interpreter. So we have private heap -> python interpreter -> python memory manager (operating with pool, arenas and block).
Keep in mind that there are multiple different python interpreters, and how they deal with memory is 100% implementation details. Python itself doesn't specify how things are stored in memory
@Aran-Fey i mean cpython
Ok. Either way, I have no idea about these internals
16:14
I would be very surprised if CPython uses arenas
@roganjosh did I not describe something correctly?
To my understanding, an arena would be for something like high-performance games with blitting short-lived objects en masse. That does not fit very well with the generalisation of python
I mean you don't need to be sophisticated with it, you can just use a set of arenas for like objects under 512bytes, 4k, 16k, etc. Or even by type
I equally couldn't properly explain the memory model of python, but that's perhaps testament to the abstractions it supports, where you don't really have to care too much about these things
cpython at least has an implementation on board: github.com/python/cpython/blob/… but I just see a bunch of function pointer setting in that file
not sure what the default is from just skimming it
16:24
Well, mark me as very surprised :)
@PeterT mb u can explain, how private heap implemented and is there a difference with heap, I understand that the only difference is that it is controlled by the interpreter ?
I've never heard the distinction of "private heap"before. Sounds just like the normal heap every process gets in a moder OS with virtual memory
additionally they might set aside some virtual memory regions to keep separate from the interpreter internally used stuff
@PeterT ok, thx
Skimming the file you linked, it looks like the private heap might just be the pool of arenas that python is carving out as it goes. Presumably that's a block that the OS couldn't give to something else, rather than some kind of free-for-all for space. But I'd be lying if I said I understood that file properly. Still, interesting skimming
so all they mean is that they used MAP_PRIVATE when calling mmap?
16:33
I'll have to read up on how lower languages handle this; looks quite interesting. My understanding for heap memory was just that it was "haphazardly" allocated by the OS for each allocation but Python seems to be speculatively chunking out blocks for itself as it goes
More so than, for example, the extra allocation it makes for lists (progressively) so that they can expand
16:51
Hmm, TIL I know nothing about arenas from what I read in the past
17:13
@roganjosh PM 2 Ring up some good references a few weeks ago: chat.stackoverflow.com/transcript/message/55370317#55370317
For a good starting point for memory management see his link: github.com/python/cpython/blob/…
@roganjosh This seems to be something use-case specific and I suspect it's why Aran and me had so drastically different views in the discussion just linked.
Thanks for this! I'm gonna spend some time chewing over the info. I've read articles variously saying it's niche and, at the same time, I see it baked into CPython itself. But one thing now going off in my head - each iteration of my solvers could be a "frame" of a game, and maybe there's this one weird trick I could employ to really push performance
(solvers not in python. I'm just plotting for now, but it's something a bit 'ike Aran's TODO; I end up spending more time researching the optimal setup before I start writing the thing)
17:43
Having read through that, there was one difference that stood out - "spill" and "swap" between the two of you. Possibly there was a difference of stance on the micro/macro level
Reading more on the python memory mgmt was interesting. abarnert saying, effectively, there's no way to know does make me feel a bit better, but I also understand postgres pages a bit better from it (tangentially)
In fact, a lot better on the postgres side. It's never been tangible to me exactly what a page is
18:25
Not watched it yet, but Lex did his second interview with Guido

« first day (4424 days earlier)      last day (741 days later) »