Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ptx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
721.
▲
by
ptx
4y ago
If Visual Basic is supposed to be for beginners, it's surprisingly complicated. It has both value types and reference types and both can be passed either by reference or value, giving four ways of passing parameters compared to Python&
722.
▲
by
ptx
4y ago
I second this recommendation! I read Horstmann's books recently and they were excellent. He really puts things in context – any time I was thinking "WTF? Why would they do things this way?" he had an explanation coming up (or
723.
▲
by
ptx
4y ago
To be clear, by "current working directory", I mean the directory returned by os.getcwd(), not the directory where the script is located. This is what I think the problem is: 1. One might want to run utility programs from arbitrar
724.
▲
by
ptx
4y ago
Looks like they added support for unboxed floats yesterday (not sure about integers): https://github.com/python/mypy/commit/d05974b9b099ec755fd1c6...
725.
▲
by
ptx
4y ago
Does it? As far as I know, it loads modules from the script's directory (which is usually fine), not from the current working directory. $ mkdir bin_dir $ echo 'print("mymod loaded as expected.")' >bin_dir&
726.
▲
by
ptx
4y ago
I was responding to the parent comment which suggested that Python "should look for a .venv directory in the current working directory". Doing this "only when you actually run python" doesn't help. It would make it
727.
▲
by
ptx
4y ago
Loading code from the current working directory is not a good idea. It would make it unsafe to run a Python program from any directory that's not completely trusted, e.g. if we imagine "ls" having this feature: [root@loca
728.
▲
by
ptx
4y ago
"While Codon's syntax and semantics are virtually identical to Python's, [...] Codon currently uses ASCII strings unlike Python's unicode strings." So aside from that tiny issue at the center of the decade-long Py
729.
▲
by
ptx
4y ago
"So we thought, let’s take Python syntax, semantics, and libraries and [...] Codon currently covers a sizable subset of Python, it still needs to incorporate several dynamic features and expand its Python library coverage. The Codon te
730.
▲
by
ptx
4y ago
That's essentially what they're announcing, isn't it?
731.
▲
by
ptx
4y ago
What is (or was) the benefit of using ContentProviders compared to accessing the database directly? They seem useful for exchanging data between apps, but I can't figure out what their role is when they're internal to the app (not
732.
▲
by
ptx
4y ago
Templating is a core concern of a web framework, so a fundamental design flaw in the templating mechanism seems relevant.
733.
▲
by
ptx
4y ago
The second example from the documentation [1] disagrees. It displays HTTP header values, which are user supplied, without properly encoding them. Also, it's not just about JavaScript. If values aren't properly encoded as HTML, the
734.
▲
by
ptx
4y ago
This API looks like a recipe for XSS vulnerabilities: def render(data): return f"<h1>Last regenerated at: {data['time']}</h1>", {} What if data['time'] is '<script>alert
735.
▲
by
ptx
4y ago
The namespaces are URLs, so DNS ensures the domain names are unique globally, the owner of each domain name ensures the paths are unique for that domain, and the author of the XML document ensures the namespace aliases are unique for the sp
736.
▲
by
ptx
4y ago
Maybe XHTML (with XML namespaces) wasn't such a bad idea after all?
737.
▲
by
ptx
4y ago
> There is no reason a scheduler could not be totally lazy and only execute the coroutine once awaited. Isn't the point of create_task (which is what the article is about) to launch concurrent tasks without immediately awaiting th
738.
▲
by
ptx
4y ago
Not a refresh of the same page, but if you perform some action (e.g. adding an item to a shopping card), that would imply a POST request which then (according to the common pattern) redirects to the original page... so then you do lose the
739.
▲
by
ptx
4y ago
Refreshes can be very fast, and often essentially invisible in modern browsers, when you don't bloat the page unnecessarily, but I think AJAX still has a use for things like the voting button on HN or "add to cart" buttons in
740.
▲
by
ptx
4y ago
And Java before that.
741.
▲
by
ptx
4y ago
> VSCode, C# These are both Microsoft products. Microsoft's position is well known. > Java etc ... Really? Which Java distribution? It's definitely opt-in in Jetbrains IDEs.
742.
▲
by
ptx
4y ago
How would NFTs help?
743.
▲
by
ptx
4y ago
It does sound quite similar. But in addition to the crucial difference of opt-in vs. opt-out there's also an interesting contrast in how it's framed. Debian talks about what you, the user, can do: help out, participate and vote. I
744.
▲
by
ptx
4y ago
That's what I've heard as well. But a JIT compiler (like the JVM) might not have to be as clever as an AOT compiler, as it can change its optimization decisions later, so perhaps that might have been more feasible?
745.
▲
by
ptx
4y ago
> the fundamentally flawed assumption (that you don't need dynamic scheduling, AKA OoO processing) Could this have worked better with JIT-compiled applications, e.g. Java given a sufficiently clever JVM, where assumptions can be d
746.
▲
Zelda: A Link to the Past can now be compiled on Windows and Nintendo Switch
(neowin.net)
3 points
by
ptx
4y ago
|
0 comments
747.
▲
by
ptx
4y ago
Aren't scripting languages meant to reduce boilerplate code? Maybe you just need a better API and not an AI?
748.
▲
by
ptx
4y ago
How would you apply this approach to the article's example, the response to the question "Who is Daragh O Brien from Castlebridge", where I count at least 15 separate statements of fact? Should we research all of them and try
749.
▲
by
ptx
4y ago
Maybe humans can move to Gemini [1] while the AIs battle it out on the web. Just don't tell the marketing people. Or, if we're lucky, the AI content generation marketers will all move to "Web3" with the blockchain propon
750.
▲
by
ptx
4y ago
Hitting the wrong button on a phone is less of a problem that it might appear at first. An up-vote results in an "unvote" link being shown and a down-vote results in an "undown" link instead, so you can confirm that you
More ›