Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
linkdd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
211.
▲
Ask HN: What SaaS would you recommend to monitor business data of a Django app?
3 points
by
linkdd
3y ago
|
0 comments
212.
▲
by
linkdd
3y ago
> I'm not into types [in Python] In Python type hints are just that: hints. mypy is a very poor static analyzer, and a lot of Python code (especially in frameworks like Django) is inherently dynamic and cannot be type-checked. And t
213.
▲
by
linkdd
3y ago
For tail recursion, you can use this snippet of code: class Recurse(Exception): def __init__(self, *args, **kwargs): self.args = args self.kwargs = kwargs class Terminate(Exception): def __init__(sel
214.
▲
by
linkdd
3y ago
"new" when talking about a repository with 15 commits, the last one being 3 years ago. It is obviously a toy experiment and it took my 5s to realize that. While it does not say "this is a lisp", it also does not say &quo
215.
▲
Letlang Programming Language Devlog – Roadblocks and how to overcome them
(david-delassus.medium.com)
2 points
by
linkdd
3y ago
|
0 comments
216.
▲
by
linkdd
3y ago
A chainsaw is not safe. But you can learn to use it safely. Replace chainsaw with: - knife - guns - C programming language There are tools and methods (and a lot of discipline) to ensure safety in C: - compiler's sanitiz
217.
▲
by
linkdd
3y ago
You know sanitizers and static analysis tools exist, and have existed for decades, and have been the basis for the work done in Rust and other "safe" languages? Also, a disciplined C programmer will always keep the size of the buf
218.
▲
by
linkdd
3y ago
And there are more than 2 models of cars. The metaphor is still valid.
219.
▲
by
linkdd
3y ago
Take a car, the engine is the OCI runtime, crun, containerd, etc.. The whole car is Docker, or Podman. Kubernetes is the city where the cars run. --- EDIT: For more details, OCI (Open Container Initiative) defines a few things: - an ima
220.
▲
by
linkdd
3y ago
ORMs (especially the Django ORM) fulfill 95% of my needs. For the 5%, I use raw SQL via the ORM's escape hatch (which Django and SQLAlchemy provides). To be fair, my needs aren't that complex, I do mostly CRUD on database tables,
221.
▲
by
linkdd
3y ago
Higher level than assembly? Yes. High-level? No. Not with manual memory management, not without strings/encodings native support (char* is a bytestring, not a text string), not with so many platform-dependent features that are not abst
222.
▲
by
linkdd
3y ago
> A program that doesn't emit at least VM bytecode should not be called a compiler, but rather a transpiler. https://en.wikipedia.org/wiki/Compiler > In computing, a compiler is a computer program that trans
223.
▲
by
linkdd
3y ago
https://www.youtube.com/watch?v=WLwTlC1R2sY -- How slow is Javascript really? Javascript vs C++ (Data Structures & Optimization)
224.
▲
Lambda Calculus in 383 Bytes
(justine.lol)
4 points
by
linkdd
3y ago
|
0 comments
225.
▲
by
linkdd
3y ago
An interpreter with a JIT compiler is able to do more optimizations because it has the runtime context to make decisions, while a AOT (ahead of time) compiler will not know anything about what happens at runtime. This is why some JIT'd
226.
▲
by
linkdd
3y ago
> you end up with very long, repetitive scenarios or vague scenarios. Or even both. Almost correct :D The BDD scenarii also act as "user stories" in a Scrum/Agile workflow. It was a nice way to re-use what the product owne
227.
▲
by
linkdd
3y ago
> I created StrictYAML, which this tool uses, because of it I'll look more closely into it then :) > Gherkin is awful at that. When I use BDD, it's because I'm handed down scenarii written by non-tech people. And it
228.
▲
by
linkdd
3y ago
Thank you. Your library seems nice. Unfortunately, I have to say it... I hate YAML with a passion, k8s, github actions/gitlab ci, ansible, etc... When I'm doing ops jobs, I feel like I'm coding in YAML. Btw, this hate for YAM
229.
▲
by
linkdd
3y ago
I love pytest, and use it with Hypothesis[0] for property based testing. I also enjoy using pytest-bdd[1] [0] - https://hypothesis.readthedocs.io/en/latest/ [1] - https://github.com/pytest-dev/
230.
▲
by
linkdd
3y ago
So you deny that the industry used Python to build serious production softwares? Understood, no need to argue then, I don't think any amount of proof would change your mind...
231.
▲
by
linkdd
3y ago
Type hints communicate intents. They can be used for many things. Django-Ninja use them to do dependency injection and generate schemas for your API (using pydantic). autodoc use them to generate the documentation of your function. etc... I
232.
▲
by
linkdd
3y ago
You can express the same idea in english and german and french and ... But if you try to invent your own language (like Tolkien did), you are not "expressing an idea" (aka: speaking), you are creating a framework to express ideas.
233.
▲
by
linkdd
3y ago
Speaking of Cessna, `{ Foo * c = a + b; }` could be a valid implementation of flight simulator.
234.
▲
by
linkdd
3y ago
As a non-paying member (or anonymous visitor) you get to read 2 "member-only" articles per month. For "member-only" articles, you get a remuneration proportional to the "member reading time". For members who su
235.
▲
by
linkdd
3y ago
> Though personally I think writing LISP interpreters with parser libraries should be considered sacrilege Agreed, though the point of the article was to explore the Rust ecosystem. When learning, a little bit of blasphemy isn't a b
236.
▲
by
linkdd
3y ago
> Rust seems to be good for language designers thanks to a combination of features Not only the type system is quite nice, the ecosystem is full of nice crates: - lexing: logos - parsers: rust-peg / lalrpop / nom - util
237.
▲
by
linkdd
3y ago
Just for the record, this will also bypass the monetization I get from my articles. But I don't mind, thank you for sharing this so more people can read my work. I'll keep publishing on Medium though :)
238.
▲
by
linkdd
3y ago
Then don't, I'm not forcing you. I use Medium because I can monetize easily the articles I write, though it's not much (currently around 10-15$/month). I'm not doing it for the money, but it's still nice.
239.
▲
by
linkdd
3y ago
The rust-analyzer extension for VSCode is quite good for this. Though, I should try to use `quote_spanned!` instead of `quote!`, but I'm kind of a newbie with proc-macros. As for your take on the visitor pattern. In my previous code, I
240.
▲
by
linkdd
3y ago
HN removes the friend tag in the URL so I can't share the "no-paywall" link unfortunately. Though, this is fine by me. I don't mind people bypassing the paywall, but it's a source of (rather small) income for me :)
More ›