Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ptx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
44 ms
·
781.
▲
by
ptx
4y ago
And yet I notice that you separated the paragraphs in your post using semantic whitespace rather than "BEGIN PARAGRAPH" / "END PARAGRAPH" or something similar, and it seems perfectly readable to me.
782.
▲
by
ptx
4y ago
Do you have any book recommendations for someone who knows web development but is new to (modern) PHP?
783.
▲
by
ptx
4y ago
If "text" means binary data where the numbers represent characters according to some mapping (code page), then there can be binary files containing no text, binary files containing among other things some text or binary files cons
784.
▲
by
ptx
4y ago
The problem is that what we're attempting to explain is what kind of information is represented by the cookie. Saying that it's "text" only helps if the listener understands that this means "plain text" and wha
785.
▲
by
ptx
4y ago
The point the article is making is that the entire concept of "plain text" is unfamiliar to non-technical people, so explaining that cookies are "text files" doesn't help them understand cookies.
786.
▲
by
ptx
4y ago
Gunicorn has an option for this[1] so you could enable it on your production server, although I don't think that's recommended. One problem with this approach is what happens when you're updating multiple files. If the server
787.
▲
by
ptx
4y ago
Python and Ruby have more startup overhead than Perl and PHP, so usually you don't want to pay that cost for every request. Edit: Not sure why this is controversial. Here is a "hello world" benchmark I just ran on my machine,
788.
▲
by
ptx
4y ago
Ah, I see. I don't see why you need tons of libraries, or any libraries at all, for that though. (And you don't even need to render any intermediary HTML if you use the DOM API.)
789.
▲
by
ptx
4y ago
> If you bring HTML rendering to the client The client being the browser? Isn't HTML rendering what it does? What kind of HTML rendering are you talking about?
790.
▲
by
ptx
4y ago
Are there any languages that are bad at error handling then, according to that definition? That don't let you return values, set global flags, mutate arguments or in any other way communicate back from a procedure?
791.
▲
by
ptx
4y ago
Isn't that what the browser does by default if you don't involve any websockets or JS? When you load a page it streams (and incrementally parses and loads) the content for that page. When you follow a link to a different page on t
792.
▲
The end-tag open (ETAGO) delimiter (2011)
(mathiasbynens.be)
2 points
by
ptx
4y ago
|
0 comments
793.
▲
by
ptx
4y ago
It looks like Mozilla fixed it for bookmarklets[1] three years ago in Firefox 69. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1478037
794.
▲
by
ptx
4y ago
> The initial outbreak. I don't know if this was ever, in any practical sense, possible. (Honestly, I don't know, maybe it was). Yes, Taiwan did it, as described in a JAMA article [1] published at the start of March 2020. In
795.
▲
by
ptx
4y ago
> Your commit message essays will probably be lost or munged anyway – squashed, merge committed, or rebased. Yes, because commit messages do matter and rebasing/squashing is how you clean up your initial draft commits. (Merging do
796.
▲
by
ptx
4y ago
Git-style branches are called bookmarks[1] in Mercurial and "rebase -i" is called histedit[2]. It works pretty much the same. [1] https://www.mercurial-scm.org/wiki/Bookmarks [2] https://www.mercur
797.
▲
by
ptx
4y ago
It seems to be mainly intended for use internally in the JDK, though. From the JEP[1]: "It is not a goal to define a general-purpose interface for logging. The service interface contains only the minimal set of methods that the JDK nee
798.
▲
by
ptx
4y ago
> Bluetooth is said to borrow its name from [...] Early programmers adopted "Bluetooth" as a code name for their wireless tech [...] Maybe the author should have at least glanced at Wikipedia to find out by whom this "is
799.
▲
by
ptx
4y ago
I believe Crockford said in a talk [1] that he was going to stop writing loops when tail-call elimination is supported everywhere. Also, avoiding the for loop in JS might be a good idea because of how easy it is to shoot yourself in the foo
800.
▲
by
ptx
4y ago
> Git commit messages and changelogs do not have the same target audience. [...] Some people dislike merge commits. [...] If that bothers you, you can always ask contributors to rebase before merging. I think that squashing and merging
801.
▲
by
ptx
4y ago
What do you mean? If you do "pip freeze >constraints.txt", that locks the versions of all installed packages, no matter where they came from. As an example, let's create a venv and install some older versions of Django and
802.
▲
by
ptx
4y ago
> Also the requirements.txt file tends to get cluttered with non top level dependencies that make upgrading your dependencies an herculean task. Instead on poetry you define your top level dependencies in your pyproject.toml and all the
803.
▲
by
ptx
4y ago
This is solved in pip nowadays with constraint files [1], so you can put your top-level dependencies in requirements.txt and all the transient ones in constraints.txt: pip install -r requirements.txt -c constraints.txt [1] https:&#x
804.
▲
by
ptx
4y ago
Your use case might be different from mine, but I find that usually there is some parameter needed for the command, usually a filename or sometimes the output from another command. Even if you're not accepting hostile data over the net
805.
▲
Roy Fielding’s REST dissertation (2018)
(oleb.net)
2 points
by
ptx
4y ago
|
1 comments
806.
▲
by
ptx
4y ago
> For smallish scripts, I really like Ruby's backticks for easily executing shell commands. Executing external commands is pretty convenient in Python these days, now that we have subprocess.run [1], and passing the command as a l
807.
▲
by
ptx
4y ago
> You can read docs on the command line (with the ri command instead of pydoc). I've been using Python for a long time, but somehow I never learned about pydoc. It looks like a pretty handy tool!
808.
▲
by
ptx
4y ago
By running them out-of-process, presumably?
809.
▲
by
ptx
4y ago
Couldn't this be solved by acknowledging that there is application-domain state (such as the value of the text field) and UI state (such as the cursor position and selection), which can be represented by an application-domain model and
810.
▲
by
ptx
4y ago
A recent talk with some good demos: https://www.youtube.com/watch?v=y4DRAcdH9tg
More ›