Timeline
Recent posts from feeds followed by sorenpeter@darch.dk
@david Of course 🤣 Incognito sessions store nothing once closed. 🤣
@movq @lyse Are you clients remaining compatible with Hash v1 in case older clients are still well not upgraded? 🤔
@dce which version of Twet are you using? I might see if I can get it updated for you.
We got some rain. Not a whole lot, but it's actually cooler now and the temperatures outside are below the ones inside.
Cool, @dce. You're the first one I come across who actually writes Korn shell scripts. :-)
As an alternative, I also gave a much simpler teal on gray with reversed colors on focus a shot. Hmm, not so sure either. :-?
Unread messages:
https://lyse.isobeef.org/tmp/tt-new-style2-code-unread.png
Read messages:
Unread messages are yellow, while read messages are white in tt. Focusing them just alternates the fore- and background colors. With the old color scheme, I disliked that inline code and code blocks were basically just the opposite of normal text. Hence, unread code was white and read code yellow. I found this often confusing, especially with larger code blocks. Sure, there are the timestamp and author columns that still show the usual white (read) and yellow (unread) background for selected messages, but still.
This is how it was before with unread messages:
https://lyse.isobeef.org/tmp/tt-old-style-code-unread.png
Before with read messages:
https://lyse.isobeef.org/tmp/tt-old-style-code-read.png
So, I just reworked the code styles. Not sure if I like that or if it is actually an improvement. Unread code is teal on gray when not in focus and becomes blue on orange when focused. I thought the dark gray code background on a black regular background is still nice and subtle. The same similarity in colors for focused messages meant to go with an orange code background on a yellow regular background. The teal was too light, so went with a blue foreground color:
https://lyse.isobeef.org/tmp/tt-new-style-code-unread.png
When read and unfocused, the new color scheme calls for the same code style teal on dark gray. However, with white as the main background for selected messages, I went with a light gray code background and a blue code foreground. Again, the contrast with white and teal wasn't good enough. Vice versa, blue on dark gray is also not all that readable:
https://lyse.isobeef.org/tmp/tt-new-style-code-read.png
It looks like a parrot. Let's see if I begin to like it.
I trip over this in our code at work all the time.
Python has this concept of “properties”:
class Oink:
def __init__(self):
self._foo = 3
@property
def my_property(self):
return self._foo
a = Oink()
print(a.my_property)
my_property() is a method but it can be used as if it were a field.
This can also be used to define a setter:
class Oink:
def __init__(self):
self._foo = 3
@property
def my_property(self):
return self._foo
@my_property.setter
def my_property(self, value):
self._foo = 123 * value
Because, for some reason, Python people don’t like getters and setters. Instead, they hide it behind a property.
The result is, when you read this:
a.my_property = 5
print(a.my_property)
You have no idea that this actually calls a method.
@movq My grief with Java is that it's sooo verbose. Sure, all the enterprise garbage makes it a hell lot more terrible, but even regular Java feels always so lengthy. And back in the days when I was using it daily, I missed so many convenient things in the stdlib after having experienced Python's "batteries included". Not sure if or how recent Java versions caught up.
søren peter mørch