HNHacker News
TopNewBestAskShowJobs

DCoder

1,260 karma · joined November 2, 2009

not here anymore
submissionscomments
DCoder··on Steam Windows Client Local Privilege Escalation 0day
It doesn't. The controller simply acts as a mouse/minimal keyboard outside Steam.
DCoder··on Steam Windows Client Local Privilege Escalation 0day
I just checked, and yes, you can use Steam Controller to get through UAC prompts. The joystick mimics the arrow keys, the right trackpad moves the mouse cursor, the trigger buttons represent mouse clicks, and A is Enter.
DCoder··on The Raspberry Pi 4 needs a fan
I thought that username seemed familiar… [0]

[0]: https://en.wikipedia.org/wiki/Clifford_Stoll

DCoder··on Why did moving the mouse cursor cause Windows 95 to run more quickly?
Raymond Chen's blog is always a great source of interesting information.

But I remember the times when that blog didn't look like a webdesign internship project in progress. And there were interesting comments…

DCoder··on How Diablo Was Reverse-Engineered Without Source Code [video]
I also remember Diablo II throwing up assertions when I was playing with the parameters in the txt files. Fun times.
DCoder··on Why is Stack Overflow trying to start audio?
In the post I linked to, the TV in a similar situation was happily connecting to someone else's (open) WiFi network nearby. You can't really block those…
DCoder··on Why is Stack Overflow trying to start audio?
Solving this problem requires the JS on the parent and child frames to cooperate and talk to each other about their sizes, so the parent can resize the iframe to match the size of its content. This is not something ad providers would bother to implement on their own, let alone in a consistent way.
DCoder··on Why is Stack Overflow trying to start audio?
> So, even someone who disables JavaScript normally, would presumably enable it in order to use this popular and useful site.

I agree that StackOverflow is at fault here, but enabling JS is not a binary choice — "allow all JS on this site" vs "block all JS on this site" are not your only options.

Tools like uMatrix allow me to control JS coming from different domains on different domains independently. For example, on SO I have enabled JS from Stack Exchange and related domains, but not from Google or other snoopers.

DCoder··on Why is Stack Overflow trying to start audio?
When you say "it's not allowed", do you trust its own settings? Are you sure it's not doing something like [0]? How do you even protect against that?

[0]: https://www.reddit.com/r/privacy/comments/bpr6xs/if_you_choo...

DCoder··on By the Numbers: Vaccines Are Safe
If you look at other areas of the world, Philippines is interesting [0]:

> [I]n 2018, 32 percent of the surveyed 1,500 Filipinos trusted vaccines. In the 2015 iteration of the poll, 93 percent of the respondents said they trusted vaccines.

> Health Secretary Francisco Duque III attributes the lowered trust on the government's immunization drive due to the Dengvaxia controversy.

---

I also saw someone on Twitter questioning if that decline in trust was related to the Philippines' continued obsession with social media [1].

[0]: https://en.wikipedia.org/wiki/2019_Philippines_measles_outbr...

[1]: https://news.abs-cbn.com/focus/01/31/19/filipinos-still-worl...

DCoder··on Introducing a new HTML element – welcome <clippy>
> What would it take?

All the developers in the world combined can not solve a legal problem. You can't implement technologies like Widevine without a license, and if they simply won't give you one [0], you're dead in the water.

[0]: https://blog.samuelmaddock.com/posts/google-widevine-blocked...

DCoder··on Introducing a new HTML element – welcome <clippy>
For another and possibly more egregious example, look at Chrome's <input autocomplete=""> handling [0].

[0]: https://www.reddit.com/r/programming/comments/ar1qj1/x/egl52...

DCoder··on You probably don’t need ReCAPTCHA
> Randomizing form field names […] will prevent auto filling fields by browsers and password managers.

I wholly agree that this would not help, but for the sake of completeness, I want to point out that <input autocomplete=""> [0] is designed to solve this, by decoupling input field names from their intent.

But Chrome is playing dumb about it [1]. And of course, the spambots will just adapt to parse the autocomplete info…

[0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes...

[1]: https://www.reddit.com/r/programming/comments/ar1qj1/chromiu...

DCoder··on Chinese developers fear the tech war will cost them access to GitHub
Someone who needs to cooperate with you on your project cares.

Someone who needs to clone your repository (e.g. you're a dependency for their project) cares.

Someone tired of using an inactive repo and trying to get an overview of healthy forks cares.

Someone whose project uses GitHub for more than just a raw git repo (e.g. issues, wiki, releases with precompiled/crossplatform binaries) cares.

Someone searching for answers who encounters a link to some GitHub gist cares.

DCoder··on Firefox 67.0 Released
If you flip the setting, that doesn't solve a problem of a user installing the browser for the first time, installing an extension like Stylish †, going to a porn site in private mode and getting their private browsing history leaked to the extension operator together with their regular history. Who thought that is a good idea? :)

† Stylish is a … special case [0]. But see also hypothes.is or any other extension that relies on a "user-created content store".

[0] https://robertheaton.com/2018/07/02/stylish-browser-extensio...

DCoder··on Firefox 67.0 Released
The fact that they can still hoover up your browsing data the same way as in normal mode.

Google Chrome has defaulted to disabling extensions in incognito mode as long as I can remember:

> Allow in incognito [ ]

> Warning: Google Chrome cannot prevent extensions from recording your browsing history. To disable this extension in incognito mode, unselect this option.

DCoder··on PHP in 2019
I'm aware of Hack and it's quite nice, but I can't use it because a) my coworkers are … less open to new ideas … and will rightfully resist a "whole new language", whereas mgmt will see it as an attempt at "job security", and b) the biggest use-case for generics is third-party libraries (e.g. [0], [1], [2], [3]) which will never add support if this is not a core language feature.

[0]: https://github.com/doctrine/collections

[1]: https://github.com/schmittjoh/php-option

[2]: https://github.com/schmittjoh/php-collection

[3]: https://github.com/widmogrod/php-functional

DCoder··on PHP in 2019
IntelliJ will detect cases like that, yes. But it is difficult and slow to get IntelliJ to inspect your whole project like `tsc` does. With PHPStan or such tools you can do that more easily, but they still have interop problems due to non-standard annotation syntax. Having native support for such type expressions would be much better.

ES6 has Map and Array, which are perfectly sufficient and distinguishable from each other. PHP core only has array() which tries to do everything. You can use array() to build a collection or an associative array and you cannot force it to only behave as one of those. Even Zend's PHP certification contains questions about what happens if you try to push a value into an array that uses associative keys. This is a joke.

I prefer React over Angular as well, but interactivity was not on my list of goals. I want a template syntax that combines valid markup, escaping by default, and TSX-style typechecking. Basically, I want XHP [0]. There is no other template engine for PHP that validates "values passed into this template" against "values used in this template" like TSX can, and no engine that ensures you're generating valid XML/HTML markup. I certainly agree that this is far less important than powerful types, but hey, one can dream :)

[0]: https://github.com/hhvm/xhp-lib

DCoder··on PHP in 2019
This may be a regional thing. I've seen Drupal 6/7 on a lot of sites where the original dev threw together five content types in the admin GUI and told the admin how to post new content. It worked well and was certainly less worrisome than seeing (outdated) WordPress.
DCoder··on PHP in 2019
It definitely feels that way, yes. I've mostly dealt with small businesses looking for the lowest bidder and medium businesses unable to spend a fortune on software licenses and highly-experienced devs, and PHP fits that segment well.
DCoder··on PHP in 2019
Features that I miss in PHP:

- expressive type system with generics, union types, literal types, basically TypeScript. I can say "this function returns a string" or "this function returns an array", but not "this function returns an array of strings".

- specialized collection/hashmap data structures with good support across third-party libraries. Having one array() structure acting as both a sequence and an associative array at the same time is awful.

- a templating solution similar to JSX. I am spoiled by TypeScript's ability to typecheck my HTML views along with other code.

DCoder··on PHP in 2019
Right here! PHP and JS/TS is what I do every day.

PHP has its tentacles all over the web: WordPress and Drupal are immensely popular for simplistic sites and short-lived promotionals, Magento and WooCommerce attract many e-commerce users, and Symfony/Laravel handle the custom stuff. I've worked with all of these and have the scars to show for it.

All popular projects have swarms of consultants offering advice, prebuilt additions, and custom development. (E.g. WordPress plugins and themes are everywhere.) This is also a significant factor for the penny-pinching customer — from their point of view, they avoid vendor lock-in and expensive development this way. (Spoiler: it rarely works out, in the end. "Tower of Babylon" and "shallow learning curve" mix in very exciting ways.) So there are masses of people who know the basics of PHP and call themselves "PHP developers". In my opinion, just a fraction of them actually deserves that title.

DCoder··on PHP in 2019
I've had fun issues recently where Composer crashed after hoovering up 1.5 GB of memory. (Composer sets that limit by itself on startup, I didn't arbitrarily choose that number.) XDebug was off. I fixed it by telling Composer to use unlimited memory.
DCoder··on PHP in 2019
This execution model is just good old CGI scripts [0].

[0]: https://en.wikipedia.org/wiki/Common_Gateway_Interface

DCoder··on Release Notes for Safari Technology Preview 81
There are good arguments for styling native elements and against them. I don't think this is specific to the web, cross-platform GUI toolkits have had this challenge forever.

The current datepickers on the desktop are "consistent in the same browser across many sites". There is no native solution for "consistent in the same site across browsers", which makes a lot of designers and PHBs upset, doesn't always fit the overall look of the site, and makes it harder for developers because each browser brings its own quirks with formatting, localization, validation, etc.

DCoder··on Release Notes for Safari Technology Preview 81
Those JS pickers are going to be needed for a long time still, because native widgets are a nightmare to style consistently. Apparently nothing has been learned from the <select> styling minefield of the past.
DCoder··on Mozilla is giving up on their IRC server
Looking through Mozilla's IRC quote collection [0] also shows very little recent activity. Not sure if that's because their channels are less active nowadays, or just because fewer people are submitting new material.

[0]: http://quotes.burntelectrons.org/top

DCoder··on Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
Because "Security is a journey, not a destination".

There's always a way to enhance your processes, monitor more indicators, etc. or otherwise improve your security.

DCoder··on A PHP Compiler, a.k.a. the FFI Rabbit Hole
Replacing a language does not make all the code written in it go away, though. PHP has its tentacles all over the web with WordPress, Drupal, Magento, etc. and those will not be replaced any time soon.
DCoder··on Rust – Compile Time Memory Safety
This is one of the big reasons I use TypeScript over plain JS as well, especially when combined with TSX for typesafe views.
← PreviousPage 2 of 16Next →