What are you doing this week?
11 points by caius
11 points by caius
What are you doing this week? Feel free to share!
Keep in mind it’s OK to do nothing at all, too.
Job hunting. We're open to leaving tech, perhaps for a trade or therapy or the like, but that's still where we're most employable. Referrals welcome. Suggestions on which certifications or training to get or tech to learn (that isn't AI) is greatly appreciated.
I went down a rabbit hole trying to see if I can make an app that paints in human style using Gaussian splats. I wanted to make an app to test drive my Jolt Clojure dialect, and this allowed me to to test drive the language by making a non-trivial GTK app and OpenGL.
I was playing around with edge detection and wavelets in two completely separate projects earlier, and had the idea to combine these techniques.
Edge detection allows identifying contour of the objects in the scene and gives you the direction for the brush, but wavelets identify what parts of the scene have the most detail, and where fine brushwork needs to happen. So together they let you figure out what the subject is and how to paint it.
And one other trick I used was to seed Perlin noise along the edges to vary the brush a bit, so each stroke ends up being unique.
Overall, was a pretty fun project to do, and quite happy with the end result. Some example images on the project page. https://github.com/yogthos/splat-painter
This week I'm thinking hard about an example that I could use to explain mutually recursive macro expansion within macro bodies. I don't think there's a use for them (aside from topics for lunch breaks), but I implemented them, and it'd be nice to have an example that helps to illustrate.
In any particular language, or just for macros in general?
It can be in any language, but it must be procedural macros, and the procedural macro must not be calling the other macro. The other (also procedural) macro must be expanded in the very body of the first macro (and vice-versa). The description is becoming kind of cryptic by now so I'll just throw a few code examples below using a syntax similar (but not the same) for the implementation of macros that I've done.
Let's start with a simple function that returns 1 + 2 (an expression):
fn foo() -> i32 {
return 1 + 2;
}
Now we can have a function that instead of evaluating 1 + 2, returns the expression that represents this piece of code (known as code quoting in Lisp):
fn bar() -> @syntax {
return ${1 + 2};
}
So a macro returns code instead of evaluating it. We could rewrite the first function using a macro:
fn foo() -> i32 {
macro m(_) { return ${1 + 2}; }
return m!;
}
In this syntax, any name followed by an exclamation mark denotes a macro expansion (same as Rust). Rust has some more rules, but they're not necessary/helpful for our example so we'll stick with this syntax. Next we can define another macro that actually does the expansion and call it from the first macro (macros are just functions that return code so they can be called too):
fn foo() -> i32 {
macro impl(_) { return ${1 + 2}; }
macro m(ctx) { return impl(ctx); }
return m!;
}
That's not the kind of example that I need. That's not the kind of example that I'm trying to come up with for mutual recursion this week. It's here just as a step to illustrate the concepts. Next we can have a macro expansion in the body of another macro:
fn foo() -> i32 {
macro impl(_) { return ${ return ${1 + 2}; }; }
macro m(_) { impl! }
return m!;
}
That's it. That's the kind of example I'm looking for. Macros A and B both are expanded in each other bodies. For my implementation, I have a parser that only parses code that is going to be evaluated so if your recursion has proper stop conditions, it should stop, but I'm struggling to come up with an example. Again: I don't think this type of thing is "useful". It's just nerd stuff to discuss in lunch breaks.
Working on refining my case management system that I developed for a case I'm part of, and adding features as needed. Really taking shape so far.
Also adding some command features to my diary app allowing me to make therapy notes -- things that came up during the day that I'd like to be reminded of just before my appointment so I can go through them.
I'm always lost for words during these sessions and any notes will surely be lost, so I'm focusing on information cycles; 1) information comes into view 2) allocated to a time in the future and grouped 3) information is worked through all at once 4) addressed information sent to retrospective queue and similarly allocated a time to review 5) once information is addressed and reviewed during the retrospective, it is considered dealt with
I'm really enjoying this "close the loop" method of thinking and I'm looking for more ways to apply it. I've implemented an idea->plan->act->review[...->review]->retrospective where reviews and retrospectives are batched. It really helps me find what slipped through the cracks. Now, I hope to make better use of appointments this way too.
You might find the FLAP system useful: https://www.youtube.com/watch?v=i8h4eTcxF9E. Tris builds all of his second brain stack off of Obsidian, much like us, but that's an implementation detail.
We also struggle with personal retrospectives, especially as a plural system, so we'd love to hear more about the system you're describing.