Marco Weber

221 posts

Marco Weber banner
Marco Weber

Marco Weber

@comabrewer

Communications engineer in Munich.

Munich Se unió Ocak 2019
74 Siguiendo17 Seguidores
Marco Weber
Marco Weber@comabrewer·
@willmcgugan Fully agreed, and Mexican-friends approved. My team liked it so much when I invited them that I got everyone one
Marco Weber tweet media
English
0
0
1
61
Will McGugan
Will McGugan@willmcgugan·
This stuff. ⭐️⭐️⭐️⭐️⭐️
Will McGugan tweet media
English
8
0
15
3.1K
Marco Weber
Marco Weber@comabrewer·
@haxor Some syntax highlighters (is that a word?) use capital R vs lowercase r to distinguish regexes from raw strings
English
0
0
0
98
Brett Slatkin
Brett Slatkin@haxor·
Today I learned that Python supports 100 ways to write a string literal. How do you decide which to use? 4 quote types: ' " ''' """ 25 prefixes: (None) r R b B u U f F br BR bR BR rb RB Rb RB fr Fr fR FR rf rF Rf RF These are the 20 variations I'd say are worth knowing:
Brett Slatkin tweet media
English
3
7
31
7K
Marco Weber
Marco Weber@comabrewer·
@willmcgugan The fix should only work for Python 3.11 and above, right? Because only since then time.sleep uses the high resolution timer
English
1
0
0
88
Marco Weber
Marco Weber@comabrewer·
@willmcgugan @MarximusMaximus How did you solve this? I had the same issue with a network packet generator that deviated too much from the desired data rate. In the end I added kind of a control control that measured the actual sleep interval with the high resolution timer
English
1
0
2
68
Will McGugan
Will McGugan@willmcgugan·
@MarximusMaximus It was the granularity of Textual's Timer class. Which depends on asycio.sleep It looks like asyncio.sleep has a granularity of 15ms on Windows. i.e. you sleep 16ms and it actually wakes up after 30ms
English
1
0
1
114
Will McGugan
Will McGugan@willmcgugan·
Oh good $DEITY finally! I've struggled to get decent performance with Textual on Windows. Nothing seemed to make any difference. I assumed Windows Terminal was just slow to render update. Which seemed implausible given the amount of effort that Microsoft was putting in to it.
English
1
0
20
24.8K
Marco Weber
Marco Weber@comabrewer·
@ID_AA_Carmack If IQ tests and tech Twitter had a child: "TensorFlow behaves to PyTorch like gcc to llvm"
English
0
0
0
0
John Carmack
John Carmack@ID_AA_Carmack·
Some will probably hate the characterization, but TensorFlow feels like gcc to PyTorch and llvm — still critical infrastructure that will be around for decades, but no longer ascendant.
English
25
16
362
0
Marco Weber
Marco Weber@comabrewer·
@willmcgugan A shame "poor" seems to have been namespace squatted on pypi, otherwise you could have used it for your parameterless version of rich
English
0
0
0
0
Marco Weber
Marco Weber@comabrewer·
@pyblogsal Also love those quality of life improvements in datetime.fromisoformat and enums (especially str/format behavior)
English
0
0
0
0
Marco Weber
Marco Weber@comabrewer·
@pyblogsal I thought asyncio.TaskGroups were the "killer feature" of this release, although admittedly they are not relevant to most users.
English
1
0
0
0
Pablo Galindo Salgado
Pablo Galindo Salgado@pyblogsal·
Which of these is your favourite feature of 3.11? 🤔
English
8
7
16
0
Marco Weber
Marco Weber@comabrewer·
@ChadAChavez @hammer_mt @AlSweigart Probably both. As others have pointed out, Arondir (the black elf) plays a major role and is neither a coward nor a jerk - doesn't he count?
English
1
0
1
0
Marco Weber
Marco Weber@comabrewer·
@webology @samwillis @pyscript_dev @nedbat The expecthook and restart as a subprocess was more for dramatic effect though. I want to try out something based on module __getattr__, but I still haven't figured how to map install name to import name (in case they differ)
English
0
0
2
0
✨ Jeff Triplett ✨
✨ Jeff Triplett ✨@webology·
@comabrewer @samwillis @pyscript_dev @nedbat `abomination.magic()` looks like it might solve the itch I was looking for. If the "quoted:version" format doesn't work, I have wondered how hard it'd be to create something in the vein of f-strings or raw-strings format-wise.
English
1
0
0
0
Marco Weber
Marco Weber@comabrewer·
@webology @samwillis @pyscript_dev @nedbat It should definitely be possible to create something like "from pypi import typer.v0_6_0", which is valid syntax. Pip normalizes separators in the package name to dashes anyway. The leading v and the underscores should be enough to make the version number acceptable
English
1
0
0
0
Marco Weber
Marco Weber@comabrewer·
@webology @samwillis @pyscript_dev @nedbat A while ago I hacked together something related, minus the version specification (also inspired by twitter): #L9" target="_blank" rel="nofollow noopener">github.com/comabrewer/abo…
English
1
0
0
0
Marco Weber
Marco Weber@comabrewer·
@haxor That's why I like pytest's tmp_path fixture. Given that you can use pytest and don't have issues with the fixture mechanism or pathlib's path objects, you often don't need any of those imports
English
0
0
0
0
Brett Slatkin
Brett Slatkin@haxor·
import os import shutil import tempfile import unittest ... guess who's writing tests that must interact with the filesystem?
English
2
0
3
0
Marco Weber
Marco Weber@comabrewer·
@willmcgugan TFW you think the world agrees with you just to realize that you were the first to answer because you are such a snek Twitter addict
English
0
0
0
0
Marco Weber
Marco Weber@comabrewer·
@HeyChelseaTroy The "what makes this song great" episode by Rick Beato on YouTube has really helped me learn appreciate this song, its incredible production and the perfect guitar solo
English
0
0
0
0
Marco Weber
Marco Weber@comabrewer·
@HenrySchreiner3 @cs01_software I didn't want to actually suggest a name change, but just make a cheap (half)joke. As a C++ developer where I must, Python developer where I can I'm really excited about your past, present and future work, under whatever name it may be
English
0
0
0
0
Henry Schreiner III
Henry Schreiner III@HenrySchreiner3·
@comabrewer @cs01_software Probably; also scikit-build is nearly 10 years old, so not sure renaming it was really on the table. :) The name scikit-build-core for the backend might be something that is not yet set in stone.
English
1
0
1
0
Henry Schreiner III
Henry Schreiner III@HenrySchreiner3·
FYI, I’ve let the cat out of the bag today at SciPy, so will share here too: iscinumpy.dev/post/scikit-bu… has been accepted - I’ve been funded to work on Scikit-build for the next three years. Expect great things for binary package building! :D
English
4
7
52
0
Chad Smith
Chad Smith@cs01_software·
@HenrySchreiner3 Congrats, very exciting! I read the link, and I’m curious why it is called scikit-build rather than cmake-build or something along those lines. The scope seems broader than scientific only.
English
1
0
1
0
Marco Weber
Marco Weber@comabrewer·
@brianokken Sometimes I write that tiny program directly as a test (with pytest of course) - I write a test that makes assertions not about my own code, but about the library's code
English
0
0
0
0
Marco Weber
Marco Weber@comabrewer·
@brettsky Wait, you can just add a .gitignore *inside* the folder to be ignored so you don't have to commit anything? Why have I never thought of this
English
0
0
0
0