Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bwhmather
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
bwhmather
2mo ago
This is the way, and why I wrote https://pypi.org/project/ssort/ . Unfortunately you need to follow it up with shameless self-promotion or it doesn't work.
2.
▲
by
bwhmather
3mo ago
To add to this, experienced users will often start typing without looking based on what they trust the eventual state of the UI will be. Moving the cursor immediately makes it explicit that this should work. This is following a more import
3.
▲
by
bwhmather
4mo ago
You are not wrong! That certainly looks like the intention.
4.
▲
by
bwhmather
4mo ago
I'm also the happy owner of a StarLite Mk IV. The perfect travel laptop. Thin, light, fanless, excellent keyboard and touchpad, matt screen, rock solid chassis, good battery life. I'm dreading the day when it finally breaks as
5.
▲
by
bwhmather
4y ago
I use this script, saved as `rerun`, to automatically re-execute a command whenever a file in the current directory changes: #!/usr/bin/sh while true; do reset; "$@"; inotifywait -
6.
▲
Show HN: BDC – Ergonomic, sub 1KiB virtual DOM library
(github.com)
23 points
by
bwhmather
4y ago
|
4 comments
7.
▲
Show HN: SSort – The Python source code sorter
(github.com)
2 points
by
bwhmather
4y ago
|
0 comments
8.
▲
by
bwhmather
5y ago
Have pushed fix as version 0.10.0. Thank you very much for reporting.
9.
▲
by
bwhmather
5y ago
By the way, I have raised a ticket to finalize method order before 1.0 release ( https://github.com/bwhmather/ssort/issues/11 ). Please follow and comment if you would like to see a change.
10.
▲
by
bwhmather
5y ago
I'll try to add some better ones over the weekend. This should be a start.
11.
▲
by
bwhmather
5y ago
It is a bit backwards, but in exchange you get predictability With backwards sorting you know that, unless there is a cycle, you can always scroll up from a call site to find the definition or down from a definition to see where it is used.
12.
▲
by
bwhmather
5y ago
Will do. Examples directory isn't terribly helpful as documentation as it mostly contains real code with problematic syntax (and compatible licensing) that tripped up ssort when I ran it on a copy of my pip cache. I will move it into
13.
▲
by
bwhmather
5y ago
Implementation details at the top. Python is a scripting language so modules are actually evaluated from top to bottom. Putting high level logic up top is nice when you just have functions, which defer lookup until they are called, but yo
14.
▲
by
bwhmather
5y ago
isort only sorts imports. ssort will sort all other statements within a module so that they go after any other statements they depend on. The two are complementary and I usually run both.
15.
▲
by
bwhmather
5y ago
One thing worth mentioning is that the `git blame` ignore file trick doesn't work as well with ssort as it does with black because the changes ssort makes tend to be much less local.
16.
▲
by
bwhmather
5y ago
Yup, that's a bug. All assignments are treated as properties and moved to the top. Fix to follow shortly.
17.
▲
by
bwhmather
5y ago
I've had the same problem with pydantic. Currently, properties are special cased and moved to the top. Everything else, including classes, is grouped with methods. Meta classes will end up somewhere in the middle, which is probably
18.
▲
by
bwhmather
5y ago
Shameless plug: For people who like black, I've been working on ssort[0], a python source code sorter that will organize python statements into topological order based on their dependencies. It aims to resolve a similar source of bik
19.
▲
by
bwhmather
6y ago
Commit history serves two largely separate purposes: 1) To provide a code-level record of what has changed in individual files and why. 2) To provide a high-level record of what features were introduced and what bugs were fixed over a perio
20.
▲
by
bwhmather
7y ago
To access an equivalent amount of mass from the moon you would need to strip mine it to a depth of about 23.5km. On earth it would be about 1km. Your point about losing a lot of it as reaction mass still stands, but 4% of the moon is actu
21.
▲
by
bwhmather
10y ago
The smoothsort variant of heap sort might be a better alternative. It can be implemented in-place like an ordinary heap sort, but unlike an ordinary heap sort the root will be at the end of the heap where you want the elements to end up wh
22.
▲
by
bwhmather
12y ago
Option 1 is already provided. The sd_notify function is simply a convenience wrapper for sending messages on a socket specified by the NOTIFY_SOCKET environment variable. See the notes in sd_notify(3) or https://lists.debian.org
23.
▲
by
bwhmather
13y ago
See also http://academictorrents.com/ posted here a few months ago
24.
▲
by
bwhmather
13y ago
For similar stuff, don't miss the link at the bottom to the blog of the designer behind the film: http://www.gavinrothery.com/moon-blog-index/
25.
▲
by
bwhmather
13y ago
Mandatory link to http://blog.okcupid.com/ Less story, more analysis.
26.
▲
by
bwhmather
14y ago
It seems odd that they chose to post the logo as a jpeg. The compression artifacts stop it from appearing as crisp as it should be.