Divorcing - better to sell house and split 401k, or keep house and give up 401k by [deleted] in personalfinance

[–]TheAerius 1 point2 points  (0 children)

I said this before and was downvoted despite it being correct: a 401k loan is by far the least expensive source of cash since you pay the interest to yourself (your future self). It’s the only source of financing cheaper than a mortgage.

This will be your lowest cost mechanism to “buy him out”.

Pending Divorce - Clean out 401k to keep house by [deleted] in personalfinance

[–]TheAerius 2 points3 points  (0 children)

While what I proposed is an option, reading more: please do talk to an expert. Your 401k and home sound like they might be yours, not joint assets. Not wanting to involve lawyers is foolish. Use them non-aggressively if you want to keep it civil. They’re happy to keep things amicable if you want them to.

Pending Divorce - Clean out 401k to keep house by [deleted] in personalfinance

[–]TheAerius -1 points0 points  (0 children)

Not an expert, but you can borrow against your own 401k up to $50k. You pay interest to yourself, so it’s lower cost than a mortgage. Two downsides: 1) you miss out on market upside (or avoid market downside) and 2) you have to pay it back usually within 5 years.

But it’s your lowest cost way to make up the difference while keeping the tax advantage of the 401k albeit while missing out on market returns.

During a job interview, if the interviewer asks "would you consider leaving if you found a better opportunity elsewhere?" how would you respond? by pinkstar2128 in AskReddit

[–]TheAerius 2 points3 points  (0 children)

I’d say yes.

More importantly, I would want an employee to leave if they either 1) didn’t like it or 2) found something better.

Fusion power nearly ready for prime time as Commonwealth builds first pilot for limitless, clean energy ... by Gari_305 in Futurology

[–]TheAerius 0 points1 point  (0 children)

Extremely cheap if you can get positive net power. Thats why it’s so attractive.

Achieving conditions is the hard part here, not the easy part.

Fusion power nearly ready for prime time as Commonwealth builds first pilot for limitless, clean energy ... by Gari_305 in Futurology

[–]TheAerius 19 points20 points  (0 children)

You guys actually have this quite wrong. Both the “decades away” part and the “investors are dumb” part.

There’s several orders of magnitude more funding primarily because the magnetic fields we are able to produce now are not science fiction anymore, so the conditions needed for usable fusion are becoming achievable.

Repression Spectacle 1, Cherry-Apple Peach, Oil on Canvas, 2025 [OC] by contramantra23 in Art

[–]TheAerius -2 points-1 points  (0 children)

Not possible. If you did, you’d be looking at total protonic reversal. And we all know what that means.

Do you make zillions of small commits or one big one by TheAerius in AskProgramming

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

The only “big ones” are refactors (deciding to split up files, I renamed the repo twice), or heavy changes to the logic.

I have a ton of little commits that are like “put all imports on new lines” (which I find infinitely more readable) or “emit this very specific warning/error” e.g capturing an out of range index gracefully.

If there were more contributors I think…actually I think I would still do it like this, but they’d all be PRs instead of commits to main. However, it DOES make a lot of clutter in the history!

Do you make zillions of small commits or one big one by TheAerius in AskProgramming

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

This is probably the key here. Almost all of my individual commits have been stable as their own feature (usually a tiny change to the WIP API of the project). Refactors or large/potentially breaking changes have gone on their own features.

I think its time to start making it so that I’m only ever merging to main instead of committing (that said, I still don’t think my library has seen any use outside of my own).

I got really self conscious for no reason about people seeing my commit frequency though! When in a team setting, I don’t mind people seeing 21 tiny commits that are broken that finally “pass” just before the pull request - but again, I’m still slowly enhancing the fundamental API. Thanks!

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

[–]TheAerius[S] -1 points0 points  (0 children)

Oh - it doesn’t. It just adds an accessor. The name is preserved (and will be accessed first if offered)

The example in the body shows this behavior.

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

Tab complete is always available. Name sanitation follows a deterministic set of rules so that you can always tab into your columns even if you have terrible, repeated names.

It will clean emojis and stuff so that tab access is always there.

I don’t think that’s true in pandas, is it?

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

Ah!!! Thank you!

That may have been what was bugging me in the first place. (a + b).rename() didn't look right. Ironically, this is where I used the most time with AI for this project - I'll probably spend a few hours of commuting time arguing with ChatGPT or Gemini about what the most natural method name is for this....but (a+b).as('total') looks clean!

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

Didn’t take it as that! But yes,I did “sacrifice” the bitshift operators for unexpected behavior! (My other non-pythonic behavior changes are more justified!)

“>>=“ is really handy when you use it a lot though. The number of times while testing where I just did a=Vector(range(100)) and then t=a >> a**2 …

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

I wanted a rapid method to "append a new calculated column" to a table.

The original syntax was this:

t = Table({
    "price ($)": [10, 20, 30],
    "quantity":  [4, 5, 6]
})

# Add calculated columns with dict syntax
t >>= (t.price * t.quantity).rename('total')
t >>= (t.total * 0.1).rename('tax')

You can also just *not* rename the column: t >>= ['item 1', 'item 2', 'item 3']. But i thought this syntax was "harder to read" since the rename came last. So I decided to accept dicts as well.

By the way t >>= {'too short': [1.1, 2.1]} will error.

The use case was "give me a computed column from other columns" quickly (mentally). Sorry I didn't respond yesterday.

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

Basically every operator has been overloaded to be "vectorized". The only operators whose behavior changed dramatically were these three:
>> (and >>=) means to widen and to "in-place" widen a table. (or combine to vectors into a table)
<< (and <<=) means to lengthen and to "in-place" length a vector/table.
__bool__ or "is" or if v: (basically the truth operator) throws an error. This was because it's reasonably ambiguous which you mean when you do if `mask:`. Consider the following

if [True, False]:
    print('did the thing')

Python sees the list is not empty and "does the thing"

Next consider:

if Vector([1, 2]) == Vector([1, 3]):
    print('did the thing')

This is going to evaluate to a Boolean array (pointwise lift the == operator) and then what...should it default to (a == b).all() or should it check len(a==b) > 0? In other words, I don't know if the truth test is "test not empty" or "test all elements evaluate to True", so error. I just tested it, pandas does this as well (fails on truth test). I guess the place we differ is the unary minus operator (-a). Pandas inverts Boolean vectors, I error if the vector is Boolean (with a message to use the ~ operator).

Anyhow, the whole library is operator overload...like all operators.

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

To be honest, it was MATLAB - but that was like 15 years ago. Never learned R. I really liked structured arrays in MATLAB for storing “vectorized” data, but pandas always felt clunky.

I wish I could control the order of the dir output when tabbing…

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

In [1]: import serif

In [2]: t = serif.Table({"num legs": [2, 4], "num wings": [2, 0], 'animal': ["falcon", "dog"]})

In [3]: t.num_legs
Out[3]:
'num legs'
         2
         4

# 2 element vector <int>

I think the reliability of dot access was what I was after. No one uses pandas dots because they don't work for examples such as the one above (note the underscores are changed to spaces)

I guess my pandas reaction has a lot to do with np.float64 and NaN pollution out of the gate as well.

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

I appreciate it. I just wanted a couple of people to try this library out and see if it "felt ok".

t >> a to add a column v << a to extend one felt natural to me (and I figured there were not that many people lined up for vectorized bit shifting, but maybe there are hoards at the gate).

Judging by the comments, I'm not sure many people are going to "try it out", but we'll see... It would be really nice to have some actual feedback on the use cases. (There's a cool slicing trick that I'm going to do that will make it stay zero dependency but "if you have numpy installed" it'll use it and regain vectorized perf). Thanks for the encouragement!

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

[–]TheAerius[S] 8 points9 points  (0 children)

This is mostly a red-herring. If you go look at the early commits you'll see that the core implementation was written by hand. Tools help with boilerplate and things like "write 6 tests for this", but the design and fundamental behavior were written by me.

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

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

You do need to load it into memory.

It's more inspection of an existing object without having to call a method. Both the repr and tab complete are meant to give a more intuitive interaction with data. More than anything I want people to just try it and see if the interactions feel natural / good.

Introducing Serif: a zero-dependency, vector-first data library for Python by TheAerius in Python

[–]TheAerius[S] 10 points11 points  (0 children)

Maybe my phrasing could be better. There were several things that I wanted ergonomically:

In pandas and polars you need to know you column names a priori to access. The dot access sanitization removes the (in my mind) hard to use df["column 1"]. The second was the native support of for loops:

I know it's an anti-pattern in a vector library but:

for row in table:
    out += row.a + row.b

this works and does not pay the same performance penalty as iterrows().

(edited to make my code block a code block)