For this week's #Caturday, we're celebrating 7 years since Bowie and Shadow came into our lives.
Oh, how tiny they used to be!
Recent posts from feeds followed by sorenpeter@darch.dk
For this week's #Caturday, we're celebrating 7 years since Bowie and Shadow came into our lives.
Oh, how tiny they used to be!
For #AlternateFridayMusic the theme this week is #Covers, and I'm so sleepy my choice needs to be #kokori covering #Raindogs' #Coffee song:
@prologic Amazing! Do you ever sleep? 😄
@movq @itsericwoodward Hahaha, a festival, indeed! :-D There was also "Raupenkrieg" (caterpillar war): jumping against each other in sleeping bags. I reckon that counts as pogo or mosh pit.
And back in the days, we had wonderful deep mud all around us, too! In extreme years we even needed to leave the camp ground for a day and walk to a gym with all the kids. There was just too much rain and the creek dangerously high.
We once had an actual creek running through the dining tent before the kids arrived. Luckily, it didn't originate from the official creek, but the water came down the hillside. Unimaginable today with all these droughts in summer. Many creeks around here are dried up for several weeks, if not months now.
There you go, enjoy my favorite selection of yummy chocolate on the ground!
It was a question of the mindset. Once we supervisors just made the best out of it and tried to had fun, the kids typically didn't mind the mess either. Besides building huts, one of the most favorite things ever was actually "Matschschöpfen" (scooping mud). The kids scooped puddles into wheel barrows using giant soup ladles from the kitchen. "Sorry kids, time is up for today. Whoever sits in the closing circle first gets to go first tomorrow." Unfortunatly, I don't find any photos from that.
@movq I usually don't listen to metal where the singers scream. There are only very, very few bands where I find that actually pleasing.
Two decades ago or so, we young supervisors compiled ourselves a cassette for our forest recreation week. One of us had an old ruggedly built radio with a cassette deck powered by a bunch of large Baby (?) batteries. One side had "working music" which we played back while working in the evenings and night, e.g. gathering firewood in a handtruck for the campfire and things like that.
I used something by either Finntroll or Turmion Kätilöt for the "wakeup music" side in the morning. The kids slept at home, but there were always some supervisors sleeping at the camp. The SÜT, the Standard-Übernachtungsteam, consisted of mostly young folks, about sixteen to early twenties. It was completed by wiser people in their fourties. Each morning, metal blasted through the dining tent that we converted into a sleeping tent. :-) Good times!
At 8 o'clock, we had chilly 10°C. My mate and I dashed up our backyard mountain in just a tad under an hour. And that wasn't the direct way. Our jumpers came off quick. It was really nice, because the sun was already warming and lighting up the landscape and everbody else still asleep. We had everything to our own.
Shortly after we were atop, the first two yoga women showed up with their mats. When we decended, a bunch more were on the way up. And then came the families with dogs and kids. Very glad to have missed all this hustle and bustle.
Now, I'm really tired. But it's a great feeling of exhaustion. Two and a half hours later, we're at 17°C. It's supposed to hit an acceptable 23°C later on.
Unfortunately, no pics. I learned that charging via the docking station when the computer is turned off doesn't do shit at all. Oh well.
Hurray, I can now press gg instead of g to go to the top in tt. Much better! :-) Other multi-key combinations are also easily possible now.
I should probably write a real article about this at some point, but here we go. The only downside with my new key binding system is that it breaks tview's established pattern. You've got an InputHandler(), that is implemented using WrapInputHandler(…). It typically then directly implements the switching logic depending on the key press. Something like this:
func (w *Widget) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
// WrapInputHandler allows for intercepting key events with SetInputCapture(…)
// from the outside for customization. This handles the default key bindings.
return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
switch event.Key() {
case tcell.KeyRune:
if event.Modifiers() == tcell.ModNone {
switch event.Rune() {
case 'k':
w.scrollUp()
return // we already handled the event, stop processing
case 'j':
w.scrollDown()
return
}
}
}
// We didn't handle the key event. Maybe the parent
// widget knows what to do with it.
if handler := w.parent.InputHandler(); handler != nil {
handler(event, setFocus)
}
})
}
From the outside, you can intercept and either stop or continue the widget's original key handling with a potentially rewritten key event using SetInputCapture(…):
w := NewWidget()
// customized or additional key bindings
w.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
switch event.Key() {
case tcell.KeyUp:
// Rewrite the event, so the "cursor up" key is an alias
// for the vim key binding "k", that is handled by the
// wrapped input handler above. (I know, I know, this is a
// completely unrealistic example, why would anyone use
// cursor keys when there are vim key bindings available?!)
return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
case tcell.KeyRune:
if event.Modifiers() == tcell.ModNone {
switch event.Rune() {
case 'q':
app.Stop()
// we already handled the event, do not pass it
// to the wrapped input handler above
return nil
case 'r':
toggleMessageReadStatus()
return nil
}
}
}
// we didn't handle the event, pass it to the wrapped
// input handler above
return event
}
Since they all expect a single key, I've noticed that using multiple dedicated KeyBindings of mine on these different levels kinda breaks multi-key handling with common prefixes. The outer-most KeyBinding captures the prefix, but it can't transfer it to the inner one if not handled by the outer one. At least not without some more (potentially ugly) changes. So, I now have to work with just a single KeyBindings object for the entire widget chain (if it consists of multiple other widgets or the regular input handler and input capture are in the game). The outside needs to register all its key bind customizations or extensions at the same level that the original widget handles its default ones. Doable by exposing the widget's KeyBindings instance, but not pretty. You always have to keep this in mind.
With the KeyBindings, it will look like that:
type Widget struct {
parent tview.Primitive
// make it available to children or the outside either by
// direct field access or by providing a getter method
KeyBindings *bind.KeyBindings
}
func NewWidget() *Widget {
w := &Widget{KeyBindings: &bind.KeyBindings{}}
w.KeyBindings. // default key bindings
Bind0(bind.KeySequence('k', w.scrollUp).
Bind0(bind.KeySequence('j', w.scrollDown)
return w
}
func (w *Widget) InputHandler() InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
// also note the missing support for focus transfer at the moment
event = w.KeyBindings.Capture(event)
if event == nil {
return
}
if handler := w.parent.InputHandler(); handler != nil {
handler(event, setFocus)
}
}
}
And then from the outside, or in a child widget:
w := NewWidget()
w.KeyBindings. // additional or customized key bindings
Bind1(bind.KeySequence(tcell.KeyUp), func(*tcell.EventKey) *tcell.EventKey {
return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
}).
Bind0(bind.KeySequence('q'), app.Stop).
Bind0(bind.KeySequence('r'), toggleMessageReadStatus)
When directly working with tview primitives that are not part of custom widget implementations, the following works well so far:
textView := tview.NewTextView().
SetWordWrap(true).
SetText("…")
SetScrollable(true)
textView.SetInputCapture((&bind.KeyBindings{}).
Bind0(bind.KeySequence('q'), app.Stop).
Bind1(bind.KeySequence('g', 'g'), func(*tcell.EventKey) *tcell.EventKey {
return tcell.NewEventKey(tcell.KeyHome, 0, tcell.ModNone)
}).
Capture)
I need to sleep on this some more.
Also, writing very long messages like this one is really not all that fun in tt's editor. I should absolutely provide a way to shell out to vim.
(Took me about one and a half hours to compose, holy crap. But not only because of not using vim. Although, that might have saved me a quarter hour or so for sure. Proof-reading this message also uncovered quite a few bugs in my real documentation. So, that's a big win!) Good night!
@prologic Well, 15 shows the site. On the left, I had a roll mat on a tarp. I borrowed some "NVA tarps" from the scouts for this trip. The scouts got them from the National People's Army, the German Democratic Republic's armed forces after Germany was reunited. They're 1.75m x 1.75m in size and weigh 1.3kg, quite heavy, but super awesome. One tarp on the bottom, another one to cover up the clothes, shoes and sleeping bag in order to protect against the thaw. Finally, a mosquito net over all that, hung from a rope between two trees.
My mate just used a hammock with a mozzie net on the right hand side. The third tarp served as the luxurious bedside carpet. :-)
We sat on my second tarp to chill and enjoy the sunset and surroundings. It was nice to notice birds etc. die down. It took a really long time for the last light to fade away. Since we have a very high risk of forest fires, we of course couldn't have a camp fire. But after all the exhaustion, I didn't even miss it for one second.
Since we had dinner at home before leaving, all we brought were two lye rolls, two grain rolls, two brezels, some sausage and chocolate biscuits for breakfast. From the 2.5l of water, I ended up using 2l. It's always good to have a little extra, despite the unnecessary weight. We had brekkie a few kilometers further on a bench in the shade. The first bench was already in direct sun.
Our camp site was maybe 30m to the side and a few meters down of a summit path hidden behind some trees and bushes. We were quite lucky, the other side of the hill got quite a bit of a breeze at night. We could hear the leaved treetops making much more noise behind us.
@movq Yes, these kind of dogs should really be strictly forbidden!
It's not illegal if you own the forest or ask the owner. :-)
@david Yeah, no clue. But my mate said the dog is disqualified from such adventures in the future. :-)
The temps were supposed to hit 14°C just before sunrise. Since we didn't bring a thermometer, I can't tell for sure. I was rather hot in my sleeping bag, so I had to pull out my arms every now and then. My mate's sleeping bag was a little lighter and, unfortunately, the zipper jammed up. Since it didn't close all the way, it felt quite a bit cold I was told in the morning. When we got up at 6ish (we said, we don't care about time at all), it was probably already 16°C if not more. I brought a jumper, but a t-shirt was already nice enough to wear. The jumper just served as my pillow. The mercury raised by the minute then.
Yeah, I circled the spot with a biro to keep an eye on it. Until now, there's absolutely nothing to see. Looks like I got lucky.
We slept in the forest. It was really great except of my mate's fucking terror dog who was barking and snarling the entire night to each and every sound. I had maybe half an hour of sleep in total. Despite that, it was pleasantly warm. Well, the night, that is. The heat was brutal during the days. Literally streams of sweat were running down on us on the way there in the evening and back in the morning.
Surprisingly, there weren't any mozzies around at night, I would have lost all safe bets. On the way there, my mate convinced me to take a shortcut through the taller and taller growing grass. It's been some time that somebody traveled on this track, so we had to search around a bit for the overgrown path where we could cross the mostly dried up creek. In the beginning I said that this will be a bad idea. Lo and behold, I discovered a tick on my inner upper leg the next morning. Luckily, I got it out with my tick hook on the first attempt.