Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eevee
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
46 ms
·
211.
▲
by
eevee
14y ago
Awesome.
212.
▲
by
eevee
14y ago
Grandparent has a point, and it's not quite as outlandish as you make it out to be. Consider that a lot of Python developers write most of their code in Python, then rewrite critical parts in C to speed it up. Python is not a speed demon,
213.
▲
by
eevee
14y ago
Is this intentionally snide? You appear to be implying that nobody should try to solve problems, because we already know how to work around them.
214.
▲
by
eevee
14y ago
Apparently it won't work yet! Tragic. In the meantime, I can deliberate on whether or not to call it FOXDIE.
215.
▲
by
eevee
14y ago
Ha, I was just thinking about how Rust bindings to Python might look. I haven't actually tried this, but since Rust libraries just compile to .so's and it's possible to declare a Rust function with a C signature, I bet it'd be a simple exer
216.
▲
by
eevee
14y ago
For what it's worth, I like Rust because I like Python. Python does strive to have one "obvious way to do it", but that ends up meaning it has a very colorful toolbox full of different ways to solve different problems, much like Rust. G
217.
▲
by
eevee
14y ago
There are plenty of cases where a data type doesn't sufficiently capture semantics, and without static typing, Python isn't very well built for checking that values have the right semantic type. A float could mean money or time or a perc
218.
▲
by
eevee
14y ago
Cars and spaceships built on existing engineering and physics principles. We've never had anything like programming. We can't even decide if it's a math, a science, or some kind of engineering. We have languages with built-in async suppor
219.
▲
by
eevee
14y ago
Hey, thanks. :) The problem with evangelizing the Right Way is that the benefits tend to come later; if you haven't experienced the pain of dealing with the Wrong Way's fallout once it hits critical mass, it seems easy to brush off. "SQL
220.
▲
by
eevee
14y ago
You're quoting from a paragraph about tradeoffs in core language design. That's not the same as best practices, though the latter often exist to avoid pitfalls in the former.
221.
▲
by
eevee
14y ago
Have you tried automated testing on a large complex web application? It's an insanely monumental task. I actually mentioned Haskell in the post because coworkers have lamented not having its type system, which would immediately find proble
222.
▲
by
eevee
14y ago
That thesis reflects a common false dichotomy that many programmers (who often have only used PHP!) seem to actually believe: that anything written in a non-scruffy language won't ever ship because the authors will be too busy sipping lat
223.
▲
by
eevee
14y ago
> No, Java is not the same. Scalars not objects in Java and are passed by value. How are pass-by-value and pass-by-object distinguishable for immutable values? > That's not what we were talking about. Yes it is. You said (array) as
224.
▲
by
eevee
14y ago
I drooled far more PHP into my terminal that weekend than you would believe. There were a scant few legitimate errors, and I've removed all the ones brought to my attention. The rest of it should be factually correct, in which case, why do
225.
▲
by
eevee
14y ago
tl;dr: I value consistency in my tools because it's a great measure of how frequently they'll trip me up and get in my way while reading or writing code. My biggest problem with PHP above all else, which I tried to write my article around,
226.
▲
by
eevee
14y ago
> Strict-equals on objects compares the references; but regular equals compares the contents of the objects. Two objects compare equal if the contain exactly the same fields and values. Seems pretty reasonable to me. The line you quoted
227.
▲
by
eevee
14y ago
Or I think they're misfeatures everywhere.
228.
▲
by
eevee
14y ago
I guess I'll chip in here. The handful of advantages that make PHP popular are also some of its worst liabilities. Yes, you can deploy with just FTP... but then you have upload security to worry about, and have to protect all your library
229.
▲
by
eevee
14y ago
How can you argue that both "tied to the web" and "frameworks" are benefits, yet keep a straight face? Frameworks in any language plug the language into the web—that's what they exist to do. And if you're using the parts of PHP that are t
230.
▲
by
eevee
14y ago
I've heard this same quip a lot, and I don't understand it either. I pored through a lot of PHP documentation to write an angry blog post about it, and it was unbelievably painful; documentation for simple extensions was broken into a doze
231.
▲
by
eevee
14y ago
The language doesn't do something, so it's the developer's responsibility, and thus the developer's fault when it goes wrong. This is a strange way to judge your tools.
232.
▲
by
eevee
14y ago
A subtle problem with this "common knowledge": \z is different across languages. In PCRE (Perl and Ruby), \z matches the end of a string; \Z matches the end of a string but allows for a single trailing newline. In Python, \Z matches the end
233.
▲
by
eevee
14y ago
Strictly speaking, `main` isn't even a special function in C. It's only special to your C library and linker and something something I forget the details. Anyway it doesn't matter at all; you could leave off the `if` in Flask's example an
234.
▲
by
eevee
14y ago
But even something quick and dirty is longer than "hello world". I've written a couple pretty dinky things with Flask, and the minuscule overhead of typing `import Flask` was definitely worth having e.g. a solid template language and XSS p
235.
▲
by
eevee
14y ago
I assume he's talking about the `nonlocal` keyword introduced in py3, which allows overwriting names defined in outer-but-not-global scopes.
236.
▲
by
eevee
14y ago
Flask comes as a self-contained install where you can get started in 5 minutes.
237.
▲
by
eevee
14y ago
Who am I trying to convert? The article answers the question asked in the beginning—a question I've been asked several times since writing the PHP article.
238.
▲
by
eevee
14y ago
I don\'t see the problem with \"sanitizing\". It\'s easy: just add a \\ before every quote and the string is totally safe!
239.
▲
by
eevee
14y ago
I'm kinda the de facto owner of Cheetah for a fairly heavy user of it—quite possibly the heaviest. It may appear-to-work for a small project, but you would not believe the insanity that lurks beneath the surface. It's been effectively dead
240.
▲
by
eevee
14y ago
I get the feeling you aren't very familiar with Python. Actually I'm hard-pressed to name a popular language in which writing a string to a file is particularly difficult. You don't have to check for errors in Python; most functions rais
More ›