30 karma · joined July 12, 2020
^[a-zA-Z_]+[a-zA-Z0-9_]*(-?[a-zA-Z0-9_]+)*$
some-name
some2-name
some-2-name
some-2name
some-name2
some-name-2
some2other-name
some-other2name
some-othername2
some-2othername
some-0-other-name
a-0-name
a0-0a-0a-a0
kebab-case-pls
tbh-didnt-write-any-underscore-tests
-negated
-negated-variable
-(negated)
-(also-negated)
-(-double-negated)
binary - operation
binary + operation
double - binary - operation
2-syntax-error-4-me
2syntaxerrorforme
1-2-3-4-syn-tax-err-or
80086-syntax-error
syntax+error
syntaxerror+
syntax-error+
syntax-error-
syntax-(error)
(syntax)-error
syntax--error
syntax++errorYou're spot on about the quirky syntax, but I don't think it's as serious a trade-off or addition in complexity (or even a change), given that:
- (IIRC) many style-guides/formatters already enforce spaces between binary operators and their operands (but especially identifiers) and in my super-subjectively-opinionated opinion you should already be doing that even without a formatter
- I don't feel particularly strongly one way or another about any other special characters like "+", so really in this case I'm only considering the dash
- Requiring the dash be between alpha/alphanumerics makes it play nice with unary operators
- The language would be terrible for code-golfing, but that's a relatively niche application I'd definitely consider worth spurning
Spicy semi-snarky aside: if your counterpoint is that kebab-case prevents crushing your arithmetic operators together, I strongly suggest you either reconsider or never write any code you think may be read by another human being (and possibly yourself).
Anybody know of any projects in the same vein?
Again, not what you actually want (I share your pain/longing), but damn if it isn't starting to get close.
-----
I love using my iPad to consume content, but damn do I sometimes wish I could just use a real desktop on it. With some caveats, of course:
- Without needing an internet connection/AP - At least some kind touch support* (clicking, scrolling, gestures, etc.) - Consistent, dependable graphical fidelity/performance - Easily portable - Quick to instantiate - Clean-yet-functional UI*
I've tried some wireless AP/bridge setups on a Pi4 and VNCing into it via my iPad, but they've been not-so-satisfactory for a few of the reasons listed above. Haven't given up on it -still researching/fiddling around - but definitely the biggest hurdle is going to be the UI. Gotta find that balance between functionality, simplicity, and aesthetic - preferably out of the box. Not something Linux is particularly known for.
*i.e. simplified desktop/application UI so that I can do most everything using the touchscreen (in addition to the keyboard/mouse), but can still access the advanced functions, even if those specifically are only optimized for mouse/keyboard. Ideally I'd be able to show/hide functions arbitrarily in the simple mode based on if I do/don't use them. Tiled WM or similar for single-app or split-pane view mode.