@lilyf@fosstodon.org avatar

lilyf

@lilyf@fosstodon.org

Python / Django / Rust developer. Work on Kolo (https://kolo.app)

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bmispelon, to django
@bmispelon@mastodon.social avatar

New article on my blog: a ORM technique I found for combining JSONObject and Subquery to build model instances: https://blog.bmispelon.rocks/articles/2024/2024-05-09-django-getting-a-full-model-instance-from-a-subquery.html

lilyf,
@lilyf@fosstodon.org avatar

@CodenameTim @bmispelon That's really cool!

I don't have any particular insight into the performance implications I'm afraid - we'd need to do some profiling.

I'd love it if we could find a way to avoid needing the JSONObject intermediary though! I never worked on the SubQuery code, so I don't know what's possible there.

caleb, to random
@caleb@hachyderm.io avatar

A former colleague had a tech interview with very nitpicky interviewers. Devs who continually nitpick in code review always puzzle me. The same people will happily use a thousand third-party deps without a care in the world for the code style and idioms used in those packages, databases, etc.

lilyf,
@lilyf@fosstodon.org avatar

@caleb I think a big difference here is that they're not going to be reading or updating that upstream code anything like as often as the main codebase.

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

Python people, do you make short-lived intermediate variables to make your return statements readable?

For example, which of these would you tend to prefer?

def get_project_name(output_str): """Get project name from output of

lilyf,
@lilyf@fosstodon.org avatar

@ehmatthes with a function this small I definitely prefer the second. I don't need the extra context from the name of the return value because it's in the function name. And I appreciate saving the vertical space.

webology, to random
@webology@mastodon.social avatar

💬 I have said this before, and I'll say it again... If not for GitHub’s popularity, no one would use git outside of the Linux kernel development. 🍿 https://social.jacobian.org/@jacob/112179743875942474

lilyf,
@lilyf@fosstodon.org avatar

@xahteiwi @webology

I started with mercurial, but my first job used git and I very quickly got used to it. I absolutely fell in love with the staging area and lightweight branches and while I understand there were ways to get similar things in mercurial, they weren't on by default so I never learnt them. To this day I'm a very happy git user.

haubles, (edited ) to opensource
@haubles@fosstodon.org avatar

It was glorious spending IRL time with old & new friends from #OpenSource / #Kubernetes / #Rust #RustLang / #Mastodon communities. I’m back in #NYC now!

I’m still processing everything, but I noticed some commonalities in the kinds of challenges #contributors are facing during this 2024 lonely burnout epoch (I’m not the only one who feels it right?)And I wonder if more #maintainers are facing them too.

So what are the toughest #community/ communications/ outreach challenges you’re tackling?

lilyf,
@lilyf@fosstodon.org avatar

@haubles It was good to meet you, though I'm sad we didn't manage to meet up again so we could chat about the City of London!

mahryekuh, to django
@mahryekuh@fosstodon.org avatar

Interesting question that was just raised in a talk:

Do we know of open source, third-party libraries being maintained by women?

lilyf,
@lilyf@fosstodon.org avatar

@mahryekuh Thanks for the call out! Though we're not open source (yet?).

treyhunner, to python
@treyhunner@mastodon.social avatar

My students often ask me whether they can see a list of every dunder method that has. I've been meaning to compile a categorized list for years.

I finally did it.

Here's every dunder method in Python... all 115 of them! 🤯

https://pym.dev/every-dunder-method/

lilyf,
@lilyf@fosstodon.org avatar

@treyhunner

I found a mistake:

> where x < y would be the same as asking y >= x

These aren't the same when x == y.

lilyf,
@lilyf@fosstodon.org avatar

@treyhunner

> (x < y) == (not y >= x)

I think it should be:

(x < y) == (not x >= y)

It's really easy to get wrong, sadly!

lilyf, (edited ) to random
@lilyf@fosstodon.org avatar
lilyf, (edited ) to random
@lilyf@fosstodon.org avatar

There's a new Kolo blog post by @wilhelmklopp about how Kolo can automatically generate Django integration tests.

https://blog.kolo.app/tests-no-joy.html

mistersql, to python
@mistersql@mastodon.social avatar

I don't like setuptools, setup.py nor the directions it evolved to. I will continue to not use setuptools except when some tool only works when you add setup tools into the mix (cython, mypyc) and in that case, I will use something else for the things that don't have to be setuptools.

It is a solution for native code interop developers who have unlimited tolerance for great galloping complexity. That it makes c++ developers happy, I mean, good for them.

lilyf,
@lilyf@fosstodon.org avatar

@mistersql I don't think pipenv handles creating packages at all, so it's a bit strange to mention it here. If you meant on the installing side, both pipenv and poetry support interop via wheels.

I also wouldn't reach for setuptools unless I had some really weird requirements. For packaging Rust code I'd use maturin, for example, which is much simpler than setuptools. For a pure python package I might use flit.

lilyf,
@lilyf@fosstodon.org avatar

@mistersql Oh yeah, I'm glad running setup.py directly is dead. Personally I don't really care for most modern frontends (pipenv, poetry, etc). If I have a virtualenv I can install into with pip, I'm happy. For locking I like pip-tools. But any of this is better than setup.py.

carlton, to random
@carlton@fosstodon.org avatar

I’m just casually over here, still happily using virtualenvwrapper 🥳

lilyf,
@lilyf@fosstodon.org avatar

@carlton I was too until really recently when I wrote my own in Rust: https://github.com/LilyFoote/lilyenv

felixxm, to django
@felixxm@fosstodon.org avatar

I've decided to retire from being a Django Fellow at the end of March 2024. It's a great honor to be a Django Fellow. I've spent the last 5 years in my dream job 💚 🦄 but it's time to move forward 🔭 I'm not abandoning Django completely, nothing like that 🤗. I will continue to be an active member of our amazing Community and do my best to help it grow 💓

I'm open to new positions from April, 1st, so contact me if you need someone with my expertise 🤝

https://www.mariuszfelisiak.org/

lilyf,
@lilyf@fosstodon.org avatar

@felixxm Thanks for all the reviews! I hope the next thing is even more amazing!

webology, to random
@webology@mastodon.social avatar

☕ Days since I spilled an entire mug of coffee all over my desk: 0

Somehow, everything works between the magic keyboard, cheap mouse, and many, many cables.

🤦 What. A. Mess.

lilyf,
@lilyf@fosstodon.org avatar

@webology I spilled half a cocktail my partner made me over my keyboard just before Christmas and had to replace the whole thing 😭

sarahboyce, to random
@sarahboyce@mastodon.social avatar

I'm so excited for the next Django Cologne meetup 😁
It will be the 50th meetup (that's 1 a month for over 4 years!) 🎊 and to celebrate, we have special guests @sabderemane and @thibaudcolas (both DSF board and accessibility team members) to kick off a sprint and tell us all about future plans in Django 🔮 can't wait ❤️

It's Tuesday 23rd Jan, come if you're free!
https://meetu.ps/e/MPsK4/XN1m9/i

lilyf,
@lilyf@fosstodon.org avatar

@sarahboyce @sabderemane @thibaudcolas That sounds so fun, but it's a bit too far to come. 😞

lilyf, to random
@lilyf@fosstodon.org avatar

I just published a new tool for managing Python interpreters and virtualenvs called lilyenv. It is written in Rust and can be installed via cargo install lilyenv.

I wrote lilyenv as a replacement for my previous workflow using virtualenvwrapper and pyenv. The main goal is to make it easy to manage virtualenvs when working on a library that needs to support multiple python versions.

https://crates.io/crates/lilyenv
https://github.com/LilyFoote/lilyenv

lilyf,
@lilyf@fosstodon.org avatar

@webology I don't think I've ever used virtualenvwrapper's hooks, so I'm not really sure if that would be in scope. I'm open to understanding the use cases though.

lilyf,
@lilyf@fosstodon.org avatar

@webology Hmm, the example of setting environment variables is interesting, but I think out of scope for now. I'd probably use direnv for that.

https://direnv.net/

lilyf,
@lilyf@fosstodon.org avatar

@webology If there's anything else in your specific workflow you think I should consider, please share!

lilyf,
@lilyf@fosstodon.org avatar

@CodenameTim activate will automatically download the python interpreter and create the virtualenv for you. I'll update the readme to clarify that.

mattsheffield, to random
@mattsheffield@mastodon.social avatar

According to Politico, Claudine Gay faced "plagiarism accusations" while Neil Gorsuch merely "borrowed" from other authors.

Screenshot of a 12/21/2023 Politico article headlined "Harvard president Claudine Gay facing new plagiarism accusations"

lilyf,
@lilyf@fosstodon.org avatar

@mattsheffield I interpreted "borrowed" as "he definitely did it" and "faces accusations" as "she maybe did it". Interesting how different people read different implications here.

CodenameTim, to random
@CodenameTim@fosstodon.org avatar

I really enjoyed the latest episode of @djangochat with @lilyf. I appreciate her openness on how she approaches contributing. It's always great to get to know people better, see how they think and what challenges interest them.

I was laughing pretty good when Lily talked about her experience with typing in python while being as diplomatic as possible.

lilyf,
@lilyf@fosstodon.org avatar

@CodenameTim @djangochat I'm glad you enjoyed it!

lilyf,
@lilyf@fosstodon.org avatar

@webology @CodenameTim @djangochat I haven't actually done any significant work on a typed Django project. My experience with typing is mostly from Kolo itself and the pain points were mostly mypy.

lilyf,
@lilyf@fosstodon.org avatar

@webology @CodenameTim @djangochat I've just had a quick look at Typer and I have a few thoughts.

The first is that using python type hints as input to a library is pretty cool and not what I'm criticising about python's typing.

The second is that once you get beyond simple examples, I don't really see an improvement over using Click directly. For example, when adding a help message for a specific option, the type hinting approach gets about as noisy as Click's decorator approach.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • rosin
  • slotface
  • ngwrru68w68
  • InstantRegret
  • PowerRangers
  • kavyap
  • tsrsr
  • DreamBathrooms
  • tester
  • everett
  • hgfsjryuu7
  • khanakhh
  • GTA5RPClips
  • vwfavf
  • Durango
  • cubers
  • tacticalgear
  • ethstaker
  • cisconetworking
  • normalnudes
  • modclub
  • anitta
  • All magazines