Hacker News new | past | comments | ask | show | jobs | submit | homemadejam's comments login

Wow, that was eye-opening. Maybe a suggestion would be to have certain filters. Anyone below the age of 18 wouldn't be able to view posts by groups/people that have been flagged as "NSFW" posters? I know Tumblr implemented a similar idea a while ago.


Opening this file in a hex editor shows that the file consists of almost all spaces, which I'm assuming are all on one line, making the text editors crash.


Yeah, hexdump shows:

    00000000  ef bb bf 2f 3e c2 a0 0a  20 20 20 20 20 20 20 20
    00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20
    *
    00900000  20 20 20 20 20 20 20 20  3c 61
    0090000a

Which means that except for those first 8 bytes and the last two, the whole file is just 0x20 (space in ASCII/UTF-8) repeated ad nauseam.


Why would long lines crash editors?


Well, VIM doesn't crash :) But edge cases in general are where the bugs lurk, and 9MBs of spaces is certainly an edge case. A possible cause might be that they try to render the whole line, try to allocate too much memory, and crash when the allocation fails. Whereas if the file had many lines, they'd probably be smart enough to only render part of it.


If the editor has some built in line length limit then exceeding that limit might lead to a crash (depending upon how the editor is coded).


Right but it looks like (i was able to load it for Atom and Notepad++ but very slow) they perform soft wrap on these long lines


Which would imply that their soft-wrap algorithm consumes an inordinate amount of time when confronted with a single, 9MB long, line of space characters.


It's looking pretty great! Although it does seem to load a little slow for me... But I think I'm gonna bookmark this site for future use.


Yet another reason why people should be leaving behind Microsoft's .doc(x) formats!


My score was 10,700. Not too bad considering I'm dyslexic right?.... Right? :|


I spotted a few typos, then came across the Spell Check API! Either way, I learnt a few new things, so I'm happy!


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: