Lambda calculus succinctly in modern JavaScript
1 points • 0 comments
From 3/29/2019, 11:19:00 AM till now, @leontrolski has achieved 1625 Karma Points with the contribution count of 54.
Recent @leontrolski Activity
Lambda calculus succinctly in modern JavaScript
1 points • 0 comments
Bangle.js 2 – an open, hackable smartwatch
4 points • 0 comments
How about just nudge json a couple more notches towards js? https://github.com/leontrolski/dnjs
Strongly typed Web 1.0 with TypeScript
5 points • 0 comments
I've always used snakeviz with the stdlib profiler https://jiffyclub.github.io/snakeviz/
In prod, the pyinstrument profiler has worked well for me https://pyinstrument.readthedocs.io/en/latest/guide.html#pro...
SQLAlchemy relationship loading techniques TLDR
2 points • 0 comments
A great walkthrough mucking around with deep Python internals, love it!
A really nice collection of examples in their original and their refactored form - nice work. I'm similarly in two minds about the feature, it's cute, but is it worth it?
I think it's indicative that the nicest use is in AST processing. As someone that works on the occasional parser-y side project it looks pretty cool, but also, 97% of professional Python development is in data-science/application development. I suspect this is a case of the core language devs having a bias towards features that are useful to them as opposed to the community as a whole.
96 Line React with JSX
1 points • 0 comments
Don't get bitten by missing foreign key indexes
15 points • 1 comments
In python/javascript, I'm a big fan of using yield - https://leontrolski.github.io/recursing-with-yield.html
It just feels nice to me.
GitHub, fuck your name change
3353 points • 2010 comments
> What is asserted without evidence can be dismissed without evidence
I was hoping the code in the article would form (an admittedly small) piece of evidence. I'd just really like someone to show off a nice neat counter example, that demonstrates the true beauty of Python OO, and is "unrefactorable" to a data types + functions equivalent.
Pathlib is a great example, maybe a canonical one, of:
> Very occasionally, you come up with a core type that's used so often, it's nice to have the cutesy stuff.
Django's class based views I think could probably reasonably refactored into data types + functions. I'm not too au-fait with Django or its internals, but if someone could send me a "demonstration Django clone in 800 lines", I'd give it a go.
> What if client_a and client_b write to different APIs? ...
Then you use an if statement to split at that point. Again, given a specific toy example, I'm fairly certain a reasonable refactor is possible.
I think you could be on to something - that feels like an area with tightly coupled state and functionality. (Sorry for spamming this thread with comments like this), but would you mind emailing some example code, and we can test what happens?
I'm currently on a project with 100s of thousands of lines of code (admittedly not millions) - working in the bag-of-functions style - and I've yet to miss any OO features.
Surely it's possible to construct a smaller example? It's not like the millions of lines codebase isn't de-composable?
Hi, thanks for the comment. Given the number of _feelings_ in these threads, I'd really like to test my conjecture - if you'd be able to email me a (< 500 line, ideally not super-deep-library-code) bit of code (constructed or otherwise) that you think is "so innately OO friendly that the conjecture won't hold", I'll do a follow-up blog post. Thanks!
Hi, what I'd really like is to test my conjecture - would you (or anyone reading) be able to email me a (< 500 line, ideally not super-deep-library-code) bit of code (constructed or otherwise) that you think is "so innately OO friendly that the conjecture won't hold".
Given some examples, I'll do a follow-up blog post.
Hi, what I'd really like is to test my conjecture - would you (or anyone reading) be able to email me a (< 500 line, ideally not super-deep-library-code) bit of code (constructed or otherwise) that you think is "so innately OO friendly that the conjecture won't hold".
Given some examples, I'll do a follow-up blog post.
Hi, what I'd really like is to test my conjecture - would you (or anyone reading) be able to email me a (< 500 line, ideally not super-deep-library-code) bit of code (constructed or otherwise) that you think is "so innately OO friendly that the conjecture won't hold".
Given some examples, I'll do a follow-up blog post.
There's a lot of backwards and forwards in the comments. What I'd really like is to test my conjecture - could people post/email me a (< 500 line, ideally not deep library code) bit of code that they think is "so innately OO friendly that the conjecture won't hold".
Given some examples, I'll do a follow-up blog post.
site design / logo © 2022 Box Piper