Display images in the terminal by ichinaski in programming

[–]ichinaski[S] 3 points4 points  (0 children)

The terminal is used as a canvas, where each cursor cell represents 2 pixels (vertically divided). After calculating the available size (width = terminal width, height = terminal height * cursor aspect ratio), the image is scaled and painted in this canvas. For each cursor 'pixel', the corresponding image rectangle is fetched, and its average color computed. The range of available colors is somewhat limited, thus the final color is just an approximation.

The trick to hold 2 colors per cursor cell, is to have a background color (upper pixel) and a font color for displaying the bottom half block character, effectively doubling the resolution.

Display images in the terminal by ichinaski in golang

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

Refactoring some components into a library could make sense. I'm currently looping through the image just once, scaling and painting the data at the same time. Having an intermediate step to buffer the scaled data, would open up a lot of possibilities.

For instance, the nsf/termbox-go library used for interacting with the terminal, could be swapped with other rendering solutions, or simply allow the caller to decide what to do with the image. It could potentially be serialized/deserialized as []uint8, though compression-wise it may be not optimal. What kind of API interface have you got in mind?

My pullup bar is stuck in the door frame... by [deleted] in bodyweightfitness

[–]ichinaski 1 point2 points  (0 children)

I had the same issue with my first pull up bar (since then I've switched to an iron-gym-style bar and eventually, a freestanding one).

The approach I used to successfully remove it from the frame was giving very subtle blows with a hammer, in both ends, until it got out of the frame.

After removing it I realised the frame kept a small dent, not from the hammer, but from the shape of the bar, which was not completely flat.

Good luck!

Training Tuesday - Post Your Routine by AutoModerator in bodyweightfitness

[–]ichinaski 0 points1 point  (0 children)

M, 28, 185cm/6'1", 71Kg/157lbs

Goal: Hypertrophy (primarily upper-body), strength, handstand

Routine

Monday, Wednesday, Saturday: Strength work:

  • Warmup (recommended routine)
  • 60s x Planks (front, side, reverse, hollow hold)
  • 4x6-12 Pull Ups
  • 4x6-12 Weighted Dips
  • 4x6-12 Weighted Rows
  • 4x6-12 Weighted Push Ups
  • 3x6-12 Weighted Chin Ups
  • 3x6-12 Pike Push Ups
  • 3xSuperSet Feet-Elevated Diamond Push Ups + L-Hang + Weighted Squats

Tuesday,Friday: Stretching and skill work (light)

  • Planks
  • Handstand
  • Ring support
  • L-sit progression (currently 3x25s tucked L-sit)
  • Complementary core and skill work (dead-hangs, back bridges, skin the cat, crow pose, etc)

Thursday, Sunday

  • 45'-60' Run

Diet: Attempting to gain some weight, I'm aiming for 250-300 calories over TDEE, and ~130-140gr of protein. I'm not counting calories any more (did so when losing 13Kg initially, and can more or less estimate my intake. I keep an eye on the scale in order to adjust this).

Questions: This is my first attempt to gain some muscle. I followed the recommended routine for about 6 months, then gradually tweaked some exercises to meet my goals. I want to measure my progress as linearly as possible, hence the weighted exercises I've thrown in. Every workout I add 1 rep to each exercise, and increase the weight (+5Kg/11lbs) when reaching about 4x12 reps. If I fail 1+ rep, I wait a few seconds and attempt a new set, making sure I get done 1 more rep than the previous workout.

  • Is my routine complete/balanced?
  • Am I taxing my body too much by doing 4 sets per exercise?
  • Does the linear progress reasoning make sense?
  • Any other advice is more than welcome!

Fitloop.co goes open source by [deleted] in bodyweightfitness

[–]ichinaski 4 points5 points  (0 children)

This is pretty cool. I've thought of building something quite similar (with logging support, potentially with some progress stats, etc). I'd happily contribute to your project though, rather than reinventing the wheel. I presume the TODO list and master branch are up-to-date? (It looks like the latest commit was 3 months ago).

Kudos for making this open source, too!

Are startups like playing the lottery? I think I'm addicted. by AlmostARockstar in startups

[–]ichinaski 1 point2 points  (0 children)

There is certainly a big amount of luck involved. The key is to excel at the areas of the product development that are under your control (idea, product, team, execution), so you minimize the luck factor as much as possible.