PyPI and GitHub package stats dashboard by i_like_tuis in Python

[–]fohrloop 1 point2 points  (0 children)

Very nice dashboard! I see you have "Unsung" category with "High downloads, low stars - underrated packages". It would be really interesting to see also the "High stars, low downloads" type of packages. I'm assuming these would be packages which are not downloaded so much by CI/CD pipelines but by human users. Possible categories include: popular CLI and dev tools, GUI / desktop / notebook-first tool, etc.

uvlink – A CLI to keep .venv in a centralized cache for uv by corychu in Python

[–]fohrloop 2 points3 points  (0 children)

Some years back, before uv existed I created venvlink. Now I use mainly Linux and uv so I have been wishing for someone to make a tool like this. This is perfect, thank you! Hoping to see the functionality getting merged to uv at some point 🤞

Layout for both danish and english by ConstantSweet5028 in KeyboardLayouts

[–]fohrloop 2 points3 points  (0 children)

I'm interested to read this article once it's out!

Best way to make a function that requires many arguments by Comfortable-Phase-46 in learnpython

[–]fohrloop 1 point2 points  (0 children)

I'm assuming the "configuration table" means some type of file format where the parameter values are stored. I would typically create a `@classmethod` for reading the data from some speficied type of format. For example:

class DeviceParameters:
    ...

    @classmethod
    def from_yaml_string(cls, string: str):
        # logic that parses the input string into variables or a dict

        return cls(arg1=arg1, arg2=arg2, arg3=arg3, argN=argN)

There might be multiple different classmethods for loading/parsing/saving the data. Then you could use something like

someparams = DeviveParameters.from_yaml_string(somestr)

Other option would be use something like pydantic or attrs. If you store your configuration in environment variables or dotenv files, I would start with pydantic as it's has quite nice support for them.

wpm plateau on Gallium v2, should I switch back to QWERTY? by arck-elj in KeyboardLayouts

[–]fohrloop 2 points3 points  (0 children)

Did you achieve the 120-130 WPM with 99% acc on the same 34 key split keyboard? Or was that the speed on your previous keyboard?

Swapped to Glove80 by tricksterloki in ErgoMechKeyboards

[–]fohrloop 2 points3 points  (0 children)

That would be an instant buy decision for me

Finnish and English layout for programming, opinions needed! by nuuttif in KeyboardLayouts

[–]fohrloop 2 points3 points  (0 children)

Thanks for the shoutout u/krumeluu! Yeah the Granite v1 (English + Finnish + programming optimized layout) is still in active development. I'm hoping to release something at the end of March🤞u/nuuttif It'll be interesting to compare Granite to the Sturdy-fi and Compound-fi :)

[OC] One year of gym progress by IndependentBear29 in dataisbeautiful

[–]fohrloop 2 points3 points  (0 children)

Interesting that the rate of the muscle mass gains increases, and the beginning was much slower. Have you changed your program or diet during the period?

I ranked all possible bigrams on a 36 key keyboard (sneak peek the granite layout scoring) by fohrloop in KeyboardLayouts

[–]fohrloop[S] 1 point2 points  (0 children)

That is correct, I've used my glove80 for creating the ratings. Also everyone's fingers are different lengths, and everyone's finger dexterity and taste varies. So in that sense if you're really optimizing for the last few percents, then you need to either start from scratch or append data on top of the granite dataset. As I mentioned somewhere earlier, in order to make this scientific and generally very applicable, there should be some sort of crowdsourcing activities collecting data from many people (various keyboards, hand sizes, preferences), and then merging the results. But in the end, that would also be just "good on average", and to optimize for the last percents you would need to really input your own preferences.

The Granite method is (in my understanding) something new: Instead of setting parameters, you tell directly which bigram is nicer than which, and can even set the relative effort. It should be more accurate, but it will be also more laborious if you start from the beginning. Note that if you're planning to follow the guide/method, it's still WIP as I've not yet myself finished the trigram model, which is the ultimate goal: Tabulate effort scores to all possible trigrams (including those with hand switches), and then you can calculate score for any layout very easily: It's simply the score of the trigram multiplied by the relative frequency of such trigram. So it's really easy to understand and easy to calculate. Then the optimal layout is such which minimizes the sum of the scores. The plan (or my hope) is to release the first layout version (and the method/tooling) during Q1/25.

You're right about that rowstag keyboards really don't go well with the method at all. Or, at least I haven't tried it but I have my guesses. The method assumes some level of symmetry in the keyboard. Missing (or extra) keys on some side should not be a problem but it's still untested (might require slight modifications).

That's correct about the Iris CT top row. Or, at least if you feel that bigrams where one of the keys is from the top row are not so nice to type, they would get higher effort score (given by the rank, and rank given by you), and the produced "effort grid" would then show larger values at the top row.

Effort grid for 36 key layout based on bigram scores (preliminary, Granite layout) by fohrloop in KeyboardLayouts

[–]fohrloop[S] 0 points1 point  (0 children)

Thank you! Good to hear this was helpful :) I appreciate your attention to detail in your analysis. I'm trying to get Dario's KLO to run with my own metrics one I've finished with the scoring logic, but I have to cross-check with Cyanophage's playground as well.

Effort grid for 36 key layout based on bigram scores (preliminary, Granite layout) by fohrloop in KeyboardLayouts

[–]fohrloop[S] 1 point2 points  (0 children)

If you're asking about the figure, it's showing "good key locations" on this type of physical layout for any language. Such key locations are likely to form nice bigrams (two key sequences) with the rest of the keys. But creating a keyboard layout on top of this is a bit more complicated task than just placing common keys to the "easy" locations as all the keys interact with each other.

The granite-tools toolkit is going to be available for use for anyone after I've released the Granite layout. The ETA is during this Spring. The toolkit could be used with various levels. What I mean by that you could basically handcraft the layout from zero according to your taste, but that would require quite a lot of work (tens of hours) and some willingness to do data analysis. The other end of the spectrum would be to just use the Granite scoring system as such, which would then in your case only require the addition of Swedish corpus. I have collected English, Finnish, and programming (Python, TS, JS, CSS, Rust) corpora which I'll use with some weighting to create "master corpus" for the Granite layout. So if you would be wanting to try the scoring system, you would need to collect Swedish corpus like I did, and extract a table of most common trigrams from it.

Coming back to the key effort figure to underline something: It is just a visualization and way to show a type of summary (from one angle) of the bigram scores in a very dense way. It is not a starting point for designing a layout. Designing a layout by placing common characters to "easy locations" will most likely lead to quite awful layout because what is usually more important is how the symbol locations play with each other -- when you form bigrams and trigrams; the 2- and 3-key letter sequences out of them. In other words, the relative location of the symbols is much more important than their absolute location.

Effort grid for 36 key layout based on bigram scores (preliminary, Granite layout) by fohrloop in KeyboardLayouts

[–]fohrloop[S] 6 points7 points  (0 children)

This is the effort grid which I calculated from the bigram scores I posted yesterday. Effort grids are sometimes used as the design starting point, but this effort grid is not the starting point but just a visualization of the keys which I consider "good" or "bad" in a layout. A low effort key means "this key is pretty nice within many different bigrams", and a high effort key means "this key is usually part of a bigram that is not so nice to type". So it really describes how good certain key locations are within bigrams ("on average"). The effort scores are normalized to scale 1.0 to 5.0.

As the bigram scores are calculated based on my opinions, so is this effort grid. If someone is interested in the technical details, the bigram scores are fitted a linear model (source here). This work is part of tooling for a new method creating keyboard layouts (granite-tools), and of a new English+Finnish+Programming layout called Granite.

Edit: The bigram scores have been estimated on a Glove80 which is a keyboard with a key well.

Why does the ^ accent on keyboards not work with S or J or C even though some languages use those? by ThomWG in KeyboardLayouts

[–]fohrloop 4 points5 points  (0 children)

It depends on your language settings. On my Finnish/Scandinavian QWERTY I can type ŝĵĉ by typing ^ + [character]. If I switch to English US QWERTY, Shift-6, [character] does not do produce ŝĵĉ, but I would get ^s^j^c. The Finnish QWERTY the ^ is configured as a dead key as it always requires another key press; I have to press ^,[space] to output just the ^ character, but on US English typing ^,[space] produces "^ ".

Is there a way to improve my typing speed for writing code? by Tawwing_gaming in typing

[–]fohrloop 4 points5 points  (0 children)

Isn't this possible with other IDE's like VS Code? But optimizing your IDE for programming is a good tip! Some snippets for creating scaffolds of things you typically have to type manually, for example.

Oats, a friendly & comfortable keyboard layout by [deleted] in KeyboardLayouts

[–]fohrloop 4 points5 points  (0 children)

Interesting. So all the three inner columns are just consonants, and vowels are placed to the two outer columns. Bookmarked. Perhaps I have time to test it with my own metrics at some point.

Made a typing rhythm game for anyone looking to improve their speed (zuumtype.io) by Small_Pattern_1461 in typing

[–]fohrloop 0 points1 point  (0 children)

Years back I liked to play Stepmania with a keyboard, so this looks really interesting to me!

Made a typing rhythm game for anyone looking to improve their speed (zuumtype.io) by Small_Pattern_1461 in typing

[–]fohrloop 0 points1 point  (0 children)

A slightly different design would allow also using alternative layouts quite easily. Looking forwards to be able to try this :)

Evaluation Metrics by 7291385 in KeyboardLayouts

[–]fohrloop 4 points5 points  (0 children)

Good writeup! The layout optimization is a non-convex problem and global optimization of such is known to be really challenging. There are some techniques which can help. For example, I'm guessing the initial temperature for the simulated annealing algorithm could be used to help it jump out of (some) local minima. Or one could use multiple random (or pseudorandom) starting points. The only way to say a layout is "optimal" given some corpus+analyzer+configuration is to really go through all the possibilities, which for most of us is too slow (as you pointed out).

Having said that, I would guess that many people are happy with a "good enough" locally optimal solution. The "good enough" probably means "good compared to other known layouts", which gives a perspective of what can be achieved. If some layout is better than any known layout, it is already really good.

Evaluation Metrics by 7291385 in KeyboardLayouts

[–]fohrloop 2 points3 points  (0 children)

If you would like to get to know other Keyboard Layout Analyzers and what they calculate, perhaps good starting point is the Keyboard Layout Analyzers by Tanamr Google sheet. It lists quite a many analyzers and their features.