Jonathan Slenders

358 posts

Jonathan Slenders

Jonathan Slenders

@jonathan_s

Katılım Şubat 2007
381 Takip Edilen372 Takipçiler
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@gvanrossum Overall, this would help me a lot. I would need a bit of time to play with the proof of concept Mypy implementation.
English
0
0
0
130
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@1st1 Not sure if it's serious. I did actually miss this a couple of times so far, but the workaround is easy enough. But like Armin, I'd really love more focus on cheap userspace threads (with cancellation).
English
0
0
0
146
Yury Selivanov
Yury Selivanov@1st1·
too good to be true, right? :P
Yury Selivanov tweet media
English
5
1
37
8.7K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@rockorager @mitsuhiko Any ANSI escape would indicate a tty. Many processes however perform tty-related syscalls before producing any output, or conditionally enable vt100 based rendering if either stdin or stdout is a tty. What exactly would you like to achieve?
English
0
0
0
26
Tim Culverhouse
Tim Culverhouse@rockorager·
@mitsuhiko If you own the stream, you can see if it requests alternate screen and if it does always assume it wants a tty. Non-alternate screen would be tough. I have been churning on a decent protocol for something like this, haven’t come up with a good answer yet. Any ideas?
English
2
0
2
343
Armin Ronacher ⇌
Armin Ronacher ⇌@mitsuhiko·
I wish there was some "content negotiation" protocol that when you exec() something, you can determine if it wants a tty or not.
English
3
1
32
6.9K
Jonathan Slenders retweetledi
Yury Selivanov
Yury Selivanov@1st1·
⏰ New PEP alarm! ⏰ Limitations in software engineering are meant to be broken. For years I was bothered with the gap between Python and TypeScript: one has incredibly dynamic and powerful runtime, the other has incredibly dynamic and powerful type system. So why not both? 🔥
Yury Selivanov tweet media
English
14
31
219
59.2K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@raymondh @property Actually, I even stopped using `property` at all, unless there is no other way and can't be happier. Access to unbound methods; ability to add parameters if I have to and clear separation between data and OO-interface.
English
0
0
0
49
Raymond Hettinger
Raymond Hettinger@raymondh·
#Python design tip: Only use @property for O(1) operations. People rightly expect that anything that looks like attribute access is fast. Don't want to Cntl-C out of an attribute lookup that Deep Thought takes 7.5 million years to compute: >>> life.meaning 42
English
9
9
116
12.8K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@unclebobmartin So, do you mean that types are redundant for the AI, because given a good test suite, that information is already encoded in the tests? (trying to understand, not sure I agree)
English
1
0
0
72
Uncle Bob Martin
Uncle Bob Martin@unclebobmartin·
@jonathan_s Not necessarily verbose, but definitely overloaded. (In the mathematical sense).
English
1
0
1
254
Uncle Bob Martin
Uncle Bob Martin@unclebobmartin·
The argument can be made that statically type languages are better for AI agents than dynamically typed languages. The argument is that statically type languages are so overloaded that the AI agents can make better sense of them. By overloaded, I simply mean that you have to say everything more than once. For example: Dog dog = new Dog (); I think this argument has some merit, however, developing a system using AI agents without a good solid suite of unit tests, and a good solid suite of acceptance scenarios is suicide. So I think there’s enough overloading to negate the minor benefit of a statically type language.
English
52
10
154
20.7K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@willmcgugan Yes, polymorphic functions, but in that case, the caller is not supposed to know which precise implementation it's calling, so there is no way to statically assume it's one specific implementation where the result is always `None`. So there is little to statically verify.
English
0
0
1
72
Will McGugan
Will McGugan@willmcgugan·
@jonathan_s If it is a method on a subclass, then it could still be meaningful. You might be overriding a method which returns "int | None" with one that just returns "None". So there are meaningful Nones and meaningless Nones.
English
1
0
0
85
Will McGugan
Will McGugan@willmcgugan·
I kind of wish Python had a way to distinguish between a function return None and a function which doesn't explicitly return anything. At runtime there is no differences. But maybe typing could have a "-> void" return type. That way the caller could get an early warning if they do anything with the return value. Or does that exist already in some form?
English
12
0
17
4.7K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@willmcgugan If a function has `-> None`, does it not always have no meaning? This could be enforced by a type checker without introducing a different annotation.
English
1
0
0
78
Will McGugan
Will McGugan@willmcgugan·
@jonathan_s But what I'm looking for a return type that disallows everything. if a return of None has no meaning, then any operation on it should be flagged as an error. Including assigning it to a variable, or appending it to a list, etc...
English
1
0
1
306
Jonathan Slenders retweetledi
Mitchell Hashimoto
Mitchell Hashimoto@mitchellh·
I answer about a dozen or so emails every week from students and early stage founders. One of the most common red flags I see are people who want to be a founder for the sake of it and are chasing ideas or guessing. It's so common I have a canned response. Here it is: (Starting the canned response here) I’m sorry to say it sounds like you’re searching for an idea. Or, you have a solution in need of a problem. Or, you just like the idea of being a founder (for whatever reason). This isn’t what you want to hear, but go get a job and work for awhile. If you have a solution that needs market validation, then work in the industry that you think that market exists. Immerse yourself in some industry, it really doesn’t matter what one, because they’re all so filled with problems that need to be solved that you can choose anything. It only takes one or two years. Then your problem isn’t going to be wondering “is this a good idea?” “What is a good idea?” Etc. The problem is going to be: which of these 10 obviously good ideas won’t be solved unless I do it, and which do I want to spend the next 10 years of my life working on? That’s the real hard question. Remember, the key questions a VC is going to ask you and you should ask yourself is: “Why this? Why now? Why you?” You should have full confidence in all of them. The easy part is confidence in all of them. Then the hard part is executing fast enough and hoping the market moves with you with external factors that are mostly out of your control. :) Don’t search for an idea. Let one come to you. Go get a job. I’m sorry to tell you that, but it’s the advice I think you need to hear. Like I said, it won’t take long, one or two years or so. But that one or two years of working is going to save you more years of your life most likely wasting your time on the easy part (finding the idea). Plus, you’ll get paid for it.
Mitchell Hashimoto tweet media
English
53
111
1.5K
125.1K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@willmcgugan If the amount of data is small, then a Pydantic based table structure serialized to JSON works great. Very fast, easy to add constraints, typed out of the box. Make all data frozen if you want (immutable copy on write). Only disadvantage is that it doesn't scale beyond megabytes.
English
0
0
0
318
Will McGugan
Will McGugan@willmcgugan·
Is there such a thing as a pure-Python document database, like MongoDB but as individual files on the filesystem? Asking for a friend.
English
20
3
47
18.3K
Yury Selivanov
Yury Selivanov@1st1·
I'm joining Vercel to lead the newly formed Ministry of Silly Walks (cough, build the best Python cloud in the world!) and I'm bringing my team with me. Gel has been acquired by ▲Vercel. 🧵
English
21
7
104
8.9K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@willmcgugan I'd really want libghostty Python bindings for this. The Pyte library is the best we currently have. Trying to reimplement a terminal emulator is IMHO a wast of time unless you're really okay with a subset, too many details that are hard to get right.
English
1
0
0
77
Will McGugan
Will McGugan@willmcgugan·
I built a passable ANSI renderer for Toad, so that it can embed the output of shell commands and tools. I had thought this would be limited to a modest subset of terminal features and output only. But I'm now of the opinion that I won't be able to avoid a more complete emulator. Enough to build a terminal multiplexer. So that's what I'm working on. Once I can run toad inside toad, I will consider it good enough. Wish me luck.
English
4
1
52
4K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@mitchellh I'd love to see Python bindings for libghostty as a substitute for the Pyte library. Maybe then I will revive the pymux project so that we have a libghostty powered terminal multiplexer (tmux clone).
English
0
0
0
57
Jonathan Slenders retweetledi
Mitchell Hashimoto
Mitchell Hashimoto@mitchellh·
An excellent comprehensive review of the state of unicode handling in terminals in 2025. I'm happy to see Ghostty scored an overall 100/100! We work really hard on Unicode support and this report gives us a good roadmap for what we need to work on next. jeffquast.com/post/state-of-…
Mitchell Hashimoto tweet media
English
24
15
549
86.1K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@willmcgugan If print were to return its first argument, the REPL would print everything twice, because the repl prints the outcome of every expression that doesn't evaluate to None.
English
1
0
7
231
Will McGugan
Will McGugan@willmcgugan·
I'm not sure if this is a serious thought or not... But it would be nice if Python's "print" returned the first argument. Consider this line... match match.groups(): I want to print the result. So I would do this: groups = match.groups() print(groups) match groups: I can see the value of groups, but I've added 2 additional lines. Lines which I'll likely end up putting back when I'm done debugging. But if print returned the first arg, I could do this: match print(match.groups()): A much smaller change, that I can easily restore. It would also allow me to selectively see parts of an expression. I could easily create such a function for debugging, but it would be nice if that were builtin. Crazy idea? Since nothing depends on the result of print I can't imagine it breaking anything. But then the fact that Python doesn't do this suggests that it was a bad idea. Doubt I'm the first to think of that.
English
11
0
17
5.6K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@kellabyte We sync all user data in real time over a web socket into the browser. However, for modifications, we still POST/PUT in order to avoid the complexity of 2-way sync and have atomic transactions. On the front-end it's not an SQL DB, but a reactive Vue.js model that holds all state.
English
0
0
0
28
Kelly Sommers
Kelly Sommers@kellabyte·
I sometimes wonder how many web apps could simply sync data between DB and client DB like in browser TursoDB or chDB (clickhouse). No need for complicated backend APis. Just crud data sync APIs. No complex queries running on the server. Mostly serving or updating deltas only.
English
20
2
89
10.2K
Jonathan Slenders
Jonathan Slenders@jonathan_s·
@mitchellh That's ~6.30h of work per day. Did you manage with a similar schedule while founding HashiCorp?
English
1
0
1
2.1K
Mitchell Hashimoto
Mitchell Hashimoto@mitchellh·
Here's my general daily schedule, for people who asked: - 530 awake - 600 coffee outside w/ wife (or walk), talk - 630 laptop opening, emails - 645 OSS triage, try to get a merge in - 730 wake up daughter, eat breakfast - 800 work begins - 1330 break time (gym, games, resting, whatever) - 1530 wake up daughter (nap) - 1530 - 1930 family time - 1930 daughter goes to bed - 1930 - 2130 family time w/ wife - 2130 sleep Obviously things shift all the time, but this is the rough outline of what my everyday looks like.
English
31
20
1.1K
90.5K
Mitchell Hashimoto
Mitchell Hashimoto@mitchellh·
Up by 530 AM. Mostly empty streets and coffee at 6 AM. Short walk on the beach until 630. Laptop open and committing by 645 AM. I love my mornings.
Mitchell Hashimoto tweet media
English
64
19
2.1K
157.6K