HNHacker News
TopNewBestAskShowJobs

MatmaRex

273 karma · joined September 15, 2013

https://www.mediawiki.org/wiki/User:Matma_Rex
submissionscomments
MatmaRex··on Google Authenticator now supports Google Account synchronization
The YouTube mobile website is intentionally crippled. For example, the video refuses to play in a video popout, even though the same browser feature works for me on other mobile websites and on desktop YouTube. Personally I just avoid browsing it on mobile as a result, but I could see someone being convinced to install the app.
MatmaRex··on Catch-23: The New C Standard Sets the World on Fire
> As C89 was taking shape, the neurodivergent notion of a "zero-length object" was making the rounds

I'm surprised that the authors decided to, and were able to, slip in this little euphemism.

MatmaRex··on Effortless Performance Improvements in C++: std:unordered_map
Python's defaultdict also behaves like this, inserting the nonexistent entry into the dict:

    from collections import defaultdict
    m = defaultdict(int)
    m["nonexistent"]
    len(m) # => 1
There are examples of the opposite too, though. Ruby's Hash does not insert the entry:

    m = Hash.new(0)
    m["nonexistent"]
    m.length # => 0
MatmaRex··on Ask HN: Can you recommend me a fast, light text editor for Windows?
I use Notepad2. It’s a reasonably powerful editor like Notepad++ (in fact it uses the same text editing library), but all the extra features can be hidden or disabled until it looks just like stock Notepad.
MatmaRex··on Fixed-Point HTML
It's because you have an ad-blocker of some sort enabled. They inject stuff into pages.
MatmaRex··on We switched to cursor-based pagination
You don't, but instead you can jump to an arbitrary place in the results. For example, you could show results starting from the letter P, or show results starting from 2022-04-02.
MatmaRex··on We switched to cursor-based pagination
Yeah, or Wikipedia.

https://en.wikipedia.org/w/index.php?title=Category:Living_p...

MatmaRex··on Gnome has no thumbnails in the file picker and my toilets are blocked (2021)
Consider reading the linked post, the author includes screenshots identical to yours and explains that that is not what they mean.
MatmaRex··on Why Compilers Don’t Autocorrect “Obvious” Parse Errors
That is a sensible way to think about it, and it would be great if the language worked that way, but unfortunately it does not. Statements in JavaScript are not separated by line breaks.

Here is an example to illustrate:

    console.log('a')
    (1 < 2) ? console.log('b') : console.log('c')
You might expect this to output 'a', then 'b'. However, it instead outputs 'a' and then throws an error like this:

    Uncaught TypeError: console.log(...) is not a function
...because a semicolon was not inserted at the end of the first line.
MatmaRex··on It's always been you, Canvas2D
Oh, it works, it's just cheekier than you think - it won't refresh the page if the URL includes a hash/fragment (such as after you clicked one of the "next" links while browsing comments here).
MatmaRex··on It's always been you, Canvas2D
There are some getters and setters in the web APIs with cheeky side effects. Presumably this one causes the canvas to be re-created, or something. Here's another good one, try it in your browser console:

    location.href = location.href;
MatmaRex··on Handling argc==0 in the Linux kernel
Your question is answered in the article:

> Given the code we've found that depends on NULL argv, I think we likely can't make the change outright, so we're down this weird rabbit hole of trying to reject what we can and create work-around behaviors for the cases that currently exist.

MatmaRex··on Browse the web like its 1999
It totally is. I used to write custom CSS for IE to make drop shadows work (it didn't support the standard syntax). Now I write custom CSS for Safari to make drop shadows work (there's a bug where if you remove the node, its shadow sometimes stays behind).
MatmaRex··on Fed to ban policymakers from owning individual stocks
You should assume that no one read the article. I certainly did not before coming to read the comments (although I have enough restraint to not comment myself on the substance of it when I do that).

For better or worse, the title and the link is just a discussion prompt. The guidelines all but state that you're not expected to read it before commenting:

> https://news.ycombinator.com/newsguidelines.html

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."

In this case, someone should probably edit the title.

MatmaRex··on Ask HN: What does one look for in a laptop these days?
Microsoft's Surface laptops have 3:2 screens, which is just as good or even better.
MatmaRex··on The Truth, by Stanisław Lem (1964)
It seems to me that the English poem is indeed Kandel's original. There are very few similarities to the Polish version, other than the general theme. I found Lem's poem here: http://www.matematyka.wroc.pl/book/stanislaw-lem-zakochany-c...
MatmaRex··on What they don’t tell you when you translate your app
Well, I don't know how to put it into strings.xml specifically, but there are localisation systems that handle it without much fuss. It requires a bit more effort from developers and translators, but it's not that hard in concept.

For example, Fluent (https://projectfluent.org/, used by Firefox), or MediaWiki's localisation system (https://www.mediawiki.org/wiki/Localisation#Message_paramete...).

MatmaRex··on The Rise of Mobile Wikipedia
Surprisingly, there is a toggle for this in [hamburger menu] → Settings, or directly here: https://en.m.wikipedia.org/wiki/Special:MobileOptions

(The toggle only appears on small devices, as on larger devices there is no section collapsing.)

MatmaRex··on Update: SaveVideo is Back
The document linked here is not a DMCA notice. It doesn't even mention DMCA.
MatmaRex··on World’s smallest, best acoustic amplifier emerges from 50-year-old hypothesis
Wikipedia's mobile site was originally running completely separate software (https://www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/...).

My guess is that it was easier to set up that way at the time, and then the configuration was kept when a mobile version was integrated into MediaWiki itself.

There are plans to merge the domains (https://phabricator.wikimedia.org/T214998), although they are vague and stalled.

MatmaRex··on Google’s new popup will further weaken Facebook’s advertisement business
Most of the non-sketchy reasons are related to iOS Safari being crippled.

For example, I worked on a rich text editor, and we wanted to put a bar with text formatting tools above the touch keyboard. This is not possible in the browser: your webapp cannot measure the keyboard or the remaining available viewport (and the keyboard's size depends on the input method and the iPhone model).

Another example I experienced is when we wanted to have full-screen dialogs with buttons at the bottom. If you do that, then the users have to tap your buttons twice, because the first tap only expands Safari's browser UI, and your buttons near the bottom of the screen only work while that UI is expanded.

MatmaRex··on Phacility is winding down, Phabricator no longer actively maintained
Wikimedia Foundation has sponsored Phabricator development, e.g. https://phabricator.wikimedia.org/phame/post/view/9/sponsore...

My impression is that the developers (or perhaps the remaining single developer, as mentioned elsewhere in this thread) has lost interest in maintaining it, rather than been unable to continue.

MatmaRex··on The Awful German Language (1880)
That's called plurale tantum, and it appears in many European languages, including German.
MatmaRex··on Disguised “AMD PCI Driver” enables executable-specific hacks
(2001)
MatmaRex··on Stop Using Icon Fonts
Please have a look at the browser lists linked in the parent post again. SVG enjoys better browser support than the web fonts being discussed here. I am also wondering which old browsers you're talking about.
MatmaRex··on The Ultimate MacBook+PC Monitor Showdown
> 4k at 21.5"

Does that exist? I have never seek a 4k (or better) display smaller than 24", and I'd love to buy one.

MatmaRex··on Teddit: a free and open-source Reddit front end focused on privacy
It was not possible 2 decades ago; :checked selector was implemented in IE 9.
MatmaRex··on There are only four billion floats, so test them all (2014)
There are different "epsilon" constants in different languages that mean different things. In C and C++, FLT_EPSILON is "Difference between 1 and the least value greater than 1 that is representable." (http://www.cplusplus.com/reference/cfloat/). You might be thinking of the C# constant.
MatmaRex··on DOMPurify bypass: XSS via HTML namespace confusion
Yeah, that's true. We also always use the RETURN_DOM_FRAGMENT / RETURN_DOM options, which avoids the issue according to the article (I don't think we serialize/reparse the output anywhere ourselves). And also, we forbid the 'style' tag, which seems to be required by the exploits (although that is just a lucky coincidence).

https://github.com/wikimedia/VisualEditor/blob/master/src/ve...

MatmaRex··on JavaScript: Search and Don’t Replace (2008)
In my opinion, having read parts of jQuery's source code on various occasions… You should only read it for entertainment value, it makes for fascinating brain teasers. Here's one snippet I had the opportunity to read recently:

  contains = hasCompare || rnative.test( docElem.contains ) ?
    function( a, b ) {
      var adown = a.nodeType === 9 ? a.documentElement : a,
        bup = b && b.parentNode;
      return a === bup || !!( bup && bup.nodeType === 1 && (
        adown.contains ?
          adown.contains( bup ) :
          a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
      ));
    } :
    function( a, b ) {
      if ( b ) {
        while ( (b = b.parentNode) ) {
          if ( b === a ) {
            return true;
          }
        }
      }
      return false;
    };
← PreviousPage 2 of 5Next →