{"title":"studio opaque","subtitle":"personal webzone of sandro stiki\u0107","link":[{"@attributes":{"rel":"self","type":"application\/atom+xml","href":"https:\/\/stiki\u0107.com\/atom.xml"}},{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/stiki\u0107.com"}}],"generator":"Zola","updated":"2024-07-14T00:00:00+00:00","id":"https:\/\/stiki\u0107.com\/atom.xml","entry":[{"title":"Shell is not my favourite language","published":"2024-07-14T00:00:00+00:00","updated":"2024-07-14T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/stiki\u0107.com\/blog\/shell-is-not-my-favourite-language\/"}},"id":"https:\/\/stiki\u0107.com\/blog\/shell-is-not-my-favourite-language\/","summary":"<p>Powershell wasted 10 hours of my life, so I was compelled to write this self-therapy session\nmasquerading as a blog post.<\/p>\n<p>Before you discount my experience as the inane ravings of a UNIX fanboy, please understand that you couldn't be further from the truth. I sincerely tried to be fair and gave Powershell as much benefit of the doubt as I could muster.<\/p>\n<p>Disclaimer aside, let's begin the descent into madness.<\/p>\n"},{"title":"macOS HomeKit automation","published":"2022-08-20T00:00:00+00:00","updated":"2022-08-20T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/stiki\u0107.com\/blog\/macos-homekit-automation\/"}},"id":"https:\/\/stiki\u0107.com\/blog\/macos-homekit-automation\/","summary":"<h2 id=\"the-problem\">The problem<\/h2>\n<p>My Mac mini is hooked up to a pair of Yamaha HS8s via a TASCAM 208i. The manual instructs you to\nturn the speakers off when not in use to prevent wear. Fishing for the power switch behind each\nspeaker got annoying quickly, so I decided to automate the process.<\/p>\n"},{"title":"space.rs","published":"2022-01-27T00:00:00+00:00","updated":"2022-01-27T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/stiki\u0107.com\/blog\/space-rs\/"}},"id":"https:\/\/stiki\u0107.com\/blog\/space-rs\/","content":"<p>Memory safety: the final frontier<\/p>\n<div id=\"banner\">\n  <img id=\"ferris\" src=\"\/blog\/space-rs\/ferris.svg\">\n  <div id=\"stars\"><\/div>\n<\/div>\n<style type=\"text\/css\" rel=\"stylesheet\">\n:root {\n  --banner-height: calc(50px + 10vh);\n}\n\n#banner {\n  position: relative;\n  width: 100%;\n  height: var(--banner-height);\n  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);\n  overflow: hidden;\n}\n\n#stars {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n}\n\n#ferris {\n  position: absolute;\n  height: calc(30px + 2.5vh);\n  left: -50%;\n  top: -50%;\n  z-index: 1;\n}\n\n.star {\n  position: absolute;\n  animation: linear infinite star-parallax;\n  background: white;\n  border-radius: 50px;\n}\n\n.star-size-1 {\n  width: 1px;\n  height: 1px;\n}\n\n.star-size-2 {\n  width: 2px;\n  height: 2px;\n}\n\n.star-size-3 {\n  width: 3px;\n  height: 3px;\n}\n\n@keyframes star-parallax {\n  from { transform: translateY(0px); }\n  to { transform: translateY(calc(var(--banner-height) * -1)); }\n}\n<\/style>\n<script>\nlet lastKeyframe\nconst stars = document.querySelector(\"#stars\")\n\nconst star = {\n  min: {\n    left: 1,\n    top: 1,\n    duration: 10,\n  },\n  max: {\n    left: 99,\n    top: 99,\n    duration: 50,\n  }\n}\n\nconst ferris = {\n  element: document.querySelector(\"#ferris\"),\n  min: {\n    left: 1,\n    top: 1,\n    duration: 10000,\n  },\n  max: {\n    left: 99,\n    top: 99,\n    duration: 20000,\n  }\n}\n\nconst keyframes = [\n  {\n    from: { top: \"-50%\", left: \"-50%\", rotation: \"-60deg\" },\n    to: { top: \"150%\", left: \"150%\", rotation: \"40deg\" }\n  },\n  {\n    from: { top: \"100%\", left: \"150%\", rotation: \"20deg\" },\n    to: { top: \"25%\", left: \"-50%\", rotation: \"-80deg\" }\n  },\n  {\n    from: { top: \"-100%\", left: \"100%\", rotation: \"-35deg\" },\n    to: { top: \"200%\", left: \"0%\", rotation: \"-135deg\" }\n  },\n  {\n    from: { top: \"200%\", left: \"15%\", rotation: \"90deg\" },\n    to: { top: \"-100%\", left: \"85%\", rotation: \"270deg\" }\n  },\n  {\n    from: { top: \"75%\", left: \"-50%\", rotation: \"90deg\" },\n    to: { top: \"25%\", left: \"150%\", rotation: \"190deg\" }\n  },\n  {\n    from: { top: \"25%\", left: \"150%\", rotation: \"70deg\" },\n    to: { top: \"75%\", left: \"-50%\", rotation: \"170deg\" }\n  }\n]\n\nfunction random(min, max) {\n  return Math.floor(Math.random() * (max - min) + min)\n}\n\nfunction makeStars(type, quantity) {\n  for (let i = 0; i < quantity; ++i) {\n    const left = random(star.min.left, star.max.left)\n    const top = random(star.min.top, star.max.top)\n    const duration = random(star.min.duration, star.max.duration)\n\n    \/\/ Make a duplicate star offset by the banner height for seamless vertical scrolling.\n    for (let j = 0; j < 2; ++j) {\n      let star = document.createElement(\"div\")\n      star.classList.add(\"star\", `star-size-${type}`)\n      star.style.left = `${left}%`\n      star.style.top = `${top + (j * 100)}%`\n      star.style.animationDuration = `${duration}s`\n      stars.appendChild(star)\n    }\n  }\n}\n\nfunction randomizeFerrisTrajectory() {\n  let keyframe\n  do {\n    keyframe = keyframes[random(1, keyframes.length)]\n  } while (keyframe === lastKeyframe)\n  lastKeyframe = keyframe\n\n  let animation = ferris.element.animate([\n    {\n        top: `${keyframe.from.top}`, left: `${keyframe.from.left}`,\n        transform: `translate(-50%, -50%) rotate(${keyframe.from.rotation})`,\n    },\n    {\n        top: `${keyframe.to.top}`, left: `${keyframe.to.left}`,\n        transform: `translate(-50%, -50%) rotate(${keyframe.to.rotation}`,\n    }\n  ],\n  { duration: random(ferris.min.duration, ferris.max.duration), })\n  .onfinish = () => randomizeFerrisTrajectory()\n}\n\nmakeStars(1, 70) \/\/ Small stars\nmakeStars(2, 10) \/\/ Normal stars\nmakeStars(3, 5)  \/\/ Large stars\nrandomizeFerrisTrajectory()\n<\/script>\n<p>At approximately <code>2021-12-22T23:46:00Z<\/code>, a Rust app I developed was successfully uploaded and executed on a satellite.\nTo the best of my knowledge, this is one of the first instances of Rust in space.\nWhile I never expected to be working in the aerospace industry, I'm excited to be bringing Rust to the cutting edge.<\/p>\n"}]}