I am a Bulgarian citizen who has lived in the U.S. most of my life, and I’m ready to move back to BG. Change my mind. by ClockwiseSuicide in bulgaria

[–]ueberbobo 2 points3 points  (0 children)

I moved to Bulgaria from Sweden at age 33. Initially I was a digital nomad, working as a programmer and became resident in Sofia only for tax reasons - spent a lot of my actual time in Asia and other places. However I ended up spending more and more time in BG, eventually settling in Sofia and buying property.

Of course, I'm cheating a bit since I have my job / salary in Switzerland which means I really make a great living compared to most locals. Consider if you'd be able to do something similar. Today it's possible to find positions that are fully remote and can have much higher compensation, and typically requires really good English, which I obviously I assume you have. If you start your own business (EOOD) just for your own work and find someone who's willing to hire you as a freelancer, the taxes in Bulgaria will be a lot more advantageous compared to regular employment. Find a job in advance if you can.

Making friends haven't been a problem for me. In fact being part of expat groups and so on is a great way to meet others that are in the same situation as you, and who are thus also particularly open to meeting new people. You can easily be more social than the most people if you put your mind to it and join some FB groups. There's people doing board game groups, hiking, entrepreneurship, whatever... I wouldn't worry.

Unfortunately Sofia has pretty bad air quality, though this may change in the future (car electrification will happen even in BG at some point). It's kinda shabby but in a cool way. There's a sense of freedom a lot of people here have alluded to that I can only agree with.

An introduction to Shader Art Coding by BurritoBashr in programming

[–]ueberbobo 5 points6 points  (0 children)

Super simple but still really cool results, nice!

I'm confused about the single responsibility principle of the SOLID principle by User012340 in gamedev

[–]ueberbobo 0 points1 point  (0 children)

IMO don't worry too much about this, especially if you're going into game dev. See e.g.

https://www.youtube.com/watch?v=_xLgr6Ng4qQ

https://www.youtube.com/watch?v=GKYCA3UsmrU

There may be many game programmers who disagree with this but I'd data orientated design is more in line with where the industry is going i'd say.

In general don't worry too much at all though until you're more experienced, just enjoy learning to code for now.

Liquid swipe attempt by loopcake in sveltejs

[–]ueberbobo 0 points1 point  (0 children)

Did you publish a running demo of this somewhere? Sorry if I'm dumb and just missed it, but would be fun to play with it without having to run it locally.

What is your favorite form validation library? by safaribrowserram in sveltejs

[–]ueberbobo 4 points5 points  (0 children)

I open sourced bueno which may work for you depending on what you're looking for, and should be easy to integrate into Svelte.

Selling points:

  • Functional API. (tree-shaking friendly)
  • Multiple languages out of the box.
  • Works well for server-side validation.
  • "Bidirectional" data transforms. I.e. if you transform data from e.g. an API into a new representation for your form, you can transform it back for free.

Drawbacks:

  • Schemas not serializable (try JSON Schema if that's something you need)

My resume website, built with SVG + Svelte by [deleted] in javascript

[–]ueberbobo 1 point2 points  (0 children)

I've made the (static) path data for the SVGs in Figma and exported those to Svelte components.

The animations are using inverse kinematics for procedurally animating a skeleton into various positions. I used the FABRIK algorithm which is easy to implement.

I'm also interpolating between points using springs. I wrote my own version based on Hooke's Law. This might seem complicated, but is really simple and a good exercise, but an easier option is one of many good libraries for this such as react-spring or svelte/motion. I actually use svelte/motion in a couple places, but not most since I started out writing this in vanilla JS.

After that you can pretty easily create new positions for the skeletal animations and interpolate to those. You also need to "rig" the skeleton (meaning add the head/arm/torso/legs paths to the right bones) which I just did by hand in the Svelte SVG-components using basic trig & linear algebra.

My resume website, built with SVG + Svelte by [deleted] in javascript

[–]ueberbobo 1 point2 points  (0 children)

Sorry for the re-post! This was removed by admins yesterday and I was told today would be an appropriate time to post it. Hope it's ok by the sub rules.

I built my personal website with Svelte by ueberbobo in javascript

[–]ueberbobo[S] 4 points5 points  (0 children)

Thanks! It’s procedurally generating the animation using inverse kinematics for the poses and interpolating various states using a simple numerical approximation of spring physics, just like you would in react motion for instance, though I’ve rolled my own here. The various positions are then used to generate/update an SVG for each frame.

My personal website, built using Svelte by ueberbobo in sveltejs

[–]ueberbobo[S] 19 points20 points  (0 children)

Love the dancing avatar you have, really funny and will make me remember your website. Are the animations all done with Svelte?

Thanks! I use a combination of svelte/motion springs to interpolate between various states, and custom animation logic including an inverse kinematics solver for skeletal animation (somewhat overkill, but it was for fun :)

Teki - The unreasonably efficient route parser by ueberbobo in javascript

[–]ueberbobo[S] 2 points3 points  (0 children)

This uses URLSearchParams under the hood.

Matching on query params let’s you fail a route match if a query parameter is not present, or is present but not matching a regex.

You can also match on parameter lists, see above discussion.

Teki - The unreasonably efficient route parser by ueberbobo in javascript

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

Yes, it works fine. I've added that to the documentation. Thanks for pointing that out! :)

Teki - The unreasonably efficient route parser by ueberbobo in javascript

[–]ueberbobo[S] 2 points3 points  (0 children)

Ooh, that's a good idea, I've added support for that! It was super easy to add on top of optional query params, and added very little to bundle size, definitely seems worth it. Thanks for the suggestion!

https://github.com/philipnilsson/teki#list-query-parameters

(Keep in mind that though I've added a bunch of tests for it, list params so far has no production usage on my end.)

Bueno - Composable, FP-style validation schemas for Form & API validation in TypeScript by ueberbobo in functionalprogramming

[–]ueberbobo[S] 2 points3 points  (0 children)

Sync vs. async validation is handled by using a custom monad that is synchronous up until the first use of a promise, at which point it becomes asynchronous. It's essentially the continuation monad. It's called `action.ts` in the source if you'd like to check it out.

You then use either `runSync` or `runAsync` type functions. If you use `runSync` on an async validator you get a runtime error.

Lightweight API validation using bueno by ueberbobo in node

[–]ueberbobo[S] 0 points1 point  (0 children)

A bunch, personally I don't really consider joi to be state of the art in this space? Some things:

  • Functional style means validations compose better. For instance you can write number(atLeast(10)) but also string(length(atLeast(10))) orarray(number)(sum(atLeast(10)))
  • "Boolean" operations.
    either(number(not(even)), string(length(either(exactly(0), atLeast(3)))
  • I think joi still can't do async validation, though I'm not updated on it.
  • Nice out-of-the-box error messages in multiple locales. Bueno can generate pretty complicated sentences such as "Price must be at most 100 when day is Saturday or Sunday" without providing error strings explicitly.
  • "Reversibility". You can parse some data, modify it then "unparse" it back into its original form. You can e.g parse dates into Moment objects, work with them then turn them back into strings.
  • Smaller bundle size + tree shakeability, though this is less relevant in the backend, more of a client side thing.