Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jdiez17
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
43 ms
·
481.
▲
by
jdiez17
12y ago
Note that sum(d) will generate a huge number, possibly using lots of memory and processing power. A better option would be: def main(filename): d = open(filename, 'rb').read() result = reduce(lambda i, j: (i + j)
482.
▲
by
jdiez17
13y ago
Very nice. It reminds me of OpenSCAD.
483.
▲
by
jdiez17
13y ago
First of all: I agree. There are many things in Go that feel like a hack. For example, it is common (and idiomatic) to use a map with empty values when you want to use a set (unordered and unique values), because the map's keys are a s
484.
▲
by
jdiez17
13y ago
Those numbers probably have some significance. `1` seems to be "heartbeat type" and `2` seems to be "heartbeat length".
485.
▲
by
jdiez17
13y ago
When I said "user" I meant "developer". Most of my open source code is licensed under the MIT license because it grants developers more freedoms than a GPL-like license would. Also, I believe that by allowing distributor
486.
▲
by
jdiez17
13y ago
You do realise that GPLv3 grants the user less freedoms than a license like MIT, right?
487.
▲
by
jdiez17
13y ago
You really shouldn't use percentages to talk about trends if your sample size is less than 100 - it's misleading. But I wouldn't be surprised if a large amount of people who claim to be software developers can't refactor
488.
▲
by
jdiez17
13y ago
Non-root users can start their own Docker images, if you change the permissions on the UNIX socket.
489.
▲
by
jdiez17
13y ago
This is not at all surprising. A lot of the machines on the Bitcoin network are ASICs (Application Specific Integrated Chip), which are extremely good at doing one thing: calculating SHA256(SHA256(x)). You can't use them for anything e
490.
▲
by
jdiez17
13y ago
>Good developers have known how to work around register globals for years now, and it's not been a problem in any modern web app I've touched for the last 8 years (off the top of my head). A good programming language lets a goo
491.
▲
by
jdiez17
13y ago
> Using mysql_real_escape_string is almost a sign you're doing something wrong. You should be using prepared statements with PDO or mysqli. I agree, you should be using prepared statements, but using mysql_real_escape_string is not
492.
▲
by
jdiez17
13y ago
I agree; PHP's problem is more cultural than technical. But that doesn't mean there aren't boatloads of technical problems that can only be dealt with with unnecessary memorization (see PHP's `==`). Yes, people will tell
493.
▲
by
jdiez17
13y ago
I said that a bash script would be perfect for collecting data periodically and saving it to a file, I wasn't suggesting that you use it to write a web app. I thought that was clear; apologies if it wasn't. However, you say that t
494.
▲
by
jdiez17
13y ago
The libraries that are abstraction layers to imagemagick or ffmpeg are, in fact, that: libraries. There is a very critical distinction between a library/module and a command-line wrapper. Your programming language probably has a module
495.
▲
by
jdiez17
13y ago
>Register Global has been depreciated since two versions ago and even completely removed since the last version. Follow your own posted link [1] and it says it right on top with a big ass banner. Well, the vast majority of people would n
496.
▲
by
jdiez17
13y ago
Other dynamic languages have similar risks but at least they don't have a history[1,2] of making completely stupid decisions when it comes to security. However, I'd rather not have a program execute a shell command when it receive
497.
▲
by
jdiez17
13y ago
Thanks, that's how it should be done. I don't care if the collection script is written in Python, Ruby, Node JS or Brainfuck; it shouldn't execute shell commands when it receives a HTTP request.
498.
▲
by
jdiez17
13y ago
Like I said in a previous reply, see register_globals and company. Sure, that was some time ago. Sure, the defaults are better now. But at some point in time the people in charge of PHP thought "yes, this is a good idea, let's do
499.
▲
by
jdiez17
13y ago
In anything that is not PHP. Bash would have been perfect for this use case, for example. The correct way to do this is to obtain the data separately and merely show it on the interface. I haven't audited the code, so I don't know
500.
▲
by
jdiez17
13y ago
It's not how much PHP is running, it's that PHP is running _at all_. It makes me feel very, very uneasy that every time that web interface is hit PHP executes a shell command. There's something inherently wrong about that, to
501.
▲
by
jdiez17
13y ago
The interface looks very nice but no thanks, I'm not going to install PHP on my servers to have it. I'd totally set it up if it weren't for PHP. The risk is just too great to ignore.
502.
▲
by
jdiez17
13y ago
Please don't get PHP tattooed on your arm.
503.
▲
About Hiattus: a platform for writing and publishing, anonymously
(hiattus.com)
2 points
by
jdiez17
13y ago
|
1 comments
504.
▲
by
jdiez17
13y ago
I can revoke permissions on any Android app with App Settings[1]. [1] https://mediacru.sh/DRUrAHvxdlfS
505.
▲
by
jdiez17
13y ago
My point is that even if you isolate 3rd party APIs from your code there might be things that can't be "translated". Obviously both EC2 and DigitalOcean give you the same basic product, virtualisation (the greatest common div
506.
▲
by
jdiez17
13y ago
I'm not fundamentally against SaaS, but I think it's not necessarily a good thing for every use case possible. I mean, it's a good thing that anyone can provision infrastructure with an API call, but there are two things I&#x
507.
▲
by
jdiez17
13y ago
Speech is actually pretty fast, but not very accurate. Unless you know stenograpy, it's the fastest way for you to communicate.
508.
▲
by
jdiez17
13y ago
I'm in the same boat - I haven't seen Her yet, but the premise instantly reminded me of Jane. The "discrete plug" looks pretty similar to what I imagined Ender's device to be. Perhaps they drew inspiration from thos
509.
▲
by
jdiez17
13y ago
Just for the record, you can do cool stuff that you couldn't do (as easily) if you had implicit `self`. Here's an example[1] that I'm moderately proud of. [1] https://github.com/MediaCrush/PyCrush/bl
510.
▲
by
jdiez17
13y ago
You are right, this is exactly what's wrong with Python. I use Python as my "daily driver" in terms of programming but I have some pet peeves, which you enumerated for the most part. Special emphasis on the multicore stuff. I
More ›