|
Absurd Alhazred posted:Your future coding horror: making sure your Python code is Unicode 9.0-compatible. U+1F926... U+1F923. U+1F937 e: ffs microsoft (google?) a kayak is not a canoe hackbunny fucked around with this message at 09:12 on Jun 22, 2016 |
# ? Jun 22, 2016 09:07 |
|
|
# ? May 17, 2024 02:38 |
|
dont mutate variables dont share memory strength in purity
|
# ? Jun 22, 2016 10:45 |
|
Malcolm XML posted:dont mutate variables this is a weird way to endorse Rust
|
# ? Jun 22, 2016 14:25 |
|
hackbunny posted:U+1F926... U+1F923. U+1F937 Google, I think
|
# ? Jun 22, 2016 15:06 |
|
1337JiveTurkey posted:If I had a time machine, the second thing after killing Hitler would be telling the Postscript development team that the only people who want a Turing complete print format are hackers and the people who think it's cute to poo poo up the office printer for an hour while it dynamically computes an arbitrarily zoomed portion of the Mandelbrot set. This is probably my favorite PDF related thing I've seen since realizing that no PDF libraries in C# had a way to calculate pixel density, leaving you to guesstimate using point -> pixel*inches converters.
|
# ? Jun 22, 2016 19:01 |
|
1337JiveTurkey posted:If I had a time machine, the second thing after killing Hitler would be telling the Postscript development team that the only people who want a Turing complete print format are hackers and the people who think it's cute to poo poo up the office printer for an hour while it dynamically computes an arbitrarily zoomed portion of the Mandelbrot set. I took Topics in Geometry (late 90s) and no kidding we did all of our assignments and projects in raw PostScript. Tad Naff fucked around with this message at 19:07 on Jun 22, 2016 |
# ? Jun 22, 2016 19:03 |
|
PostScript made a lot of sense back when the office printer was the more powerful (faster and had more RAM) than desktop computers. The practical problem with PostScript is that its Turing-completeness and global state meant that documents had to be interpreted sequentially, which is fine if you're going to print the entire document, but less fine if you're only going to print a few pages or need to view it on your computer. PDF was created to addresses these challenges and make page description languges viable for screen viewing on early 90s PCs. Thus the format allows for random access of pages without having to load the entire document into memory, append-to-end modification of document contents, and other slow-PC-accommodating features. Then they added JavaScript and XML. ExcessBLarg! fucked around with this message at 15:23 on Jun 23, 2016 |
# ? Jun 22, 2016 20:11 |
|
Why do people keep looking at things and thinking "you know what this needs? Javascript"
|
# ? Jun 22, 2016 21:16 |
Probably because every browser and their mum supports JavaScript, so it's the easiest way (at least shot-term) to reach the most consumers possible with your product.
|
|
# ? Jun 22, 2016 21:21 |
|
Cause its widely used
|
# ? Jun 22, 2016 21:21 |
|
Cause it was the 90s and it was all about interactivity and multimedia and "the web" and embedding midi files in documents. A time before infosec was invented and people had any concept of permissions and arbitrary code execution. A more naive time. A better time.
|
# ? Jun 22, 2016 21:26 |
|
YeOldeButchere posted:Cause it was the 90s and it was all about interactivity and multimedia and "the web" and embedding midi files in documents. A time before infosec was invented and people had any concept of permissions and arbitrary code execution. A more naive time. A better time. I'd rather use midi to manage my infrastructure than JavaScript.
|
# ? Jun 22, 2016 21:31 |
|
Joda posted:Probably because every browser and their mum supports JavaScript, so it's the easiest way (at least shot-term) to reach the most consumers possible with your product. That still doesn't explain node.
|
# ? Jun 22, 2016 21:39 |
|
boo_radley posted:I'd rather use midi to manage my infrastructure than JavaScript. I legitimately don't know the use case for node or understand why anyone would want it or decide it was a good idea to create.
|
# ? Jun 22, 2016 21:40 |
|
leper khan posted:I legitimately don't know the use case for node or understand why anyone would want it or decide it was a good idea to create. https://twitter.com/shit_hn_says/status/234856345579446272
|
# ? Jun 22, 2016 21:47 |
|
I've never used node but my impression is it was the result of someone figuring that since javascript is so drat awesome on the client side, surely it would be even more awesome to run it on a server. In general I support the idea of not using php, but javascript is an even worse choice.
|
# ? Jun 22, 2016 21:49 |
|
Oh my god, how have I never known about this twitter account? This is amazing. edit: "Paul Graham has never once mentioned monads. If they're useful, you'd think one of the best hackers would have said something about it." "Am I the only person that gets annoyed when I read "an order of magnitude" and the article doesn't mention whether it’s binary or decimal" "Syntax highlighting is less common in the Go community since Rob Pike called syntax highlighting juvenile" "Most of the time my phone is more important than the discardable conversation happening over a meal." i'm dying Bognar fucked around with this message at 22:20 on Jun 22, 2016 |
# ? Jun 22, 2016 22:17 |
|
Skyl3lazer posted:This is probably my favorite PDF related thing I've seen since realizing that no PDF libraries in C# had a way to calculate pixel density, leaving you to guesstimate using point -> pixel*inches converters. My favorite PDF thing is that PDF also includes PostScript. Oh and it auto-executes JavaScript and has AJAX support. And until recently you could communicate arbitrarily with JS in the browser or across PDF documents. You can also define arbitrarily different representations for the screen and printer. Let's see... What else? Acrobat will parse a PDF as long as it finds the header in the first 1k of the file. It gives no shits about making sure the object ToC actually matches up with the object delimiters in the file so you can slap all kinds of mangled poo poo into a PDF and it will parse. This is how you create ZIP files that are also valid PDFs. Stuff the PDF headers and JavaScript exploits in ZIP metadata and laugh as it all disappears on unzipping. Exploit file extension vs MIME types to confuse filters and scanners. PDF is a dumpster fire.
|
# ? Jun 22, 2016 22:22 |
Who/What is HN?
|
|
# ? Jun 22, 2016 22:23 |
|
Joda posted:Who/What is HN? https://news.ycombinator.com/
|
# ? Jun 22, 2016 22:26 |
|
Joda posted:Who/What is HN? Human Nutella
|
# ? Jun 22, 2016 22:29 |
|
Bognar posted:Oh my god, how have I never known about this twitter account? This is amazing. quote:Ironically, I most likely wouldn't hire Kernighan or Ritchie because of their poor programming style. gently caress yea
|
# ? Jun 22, 2016 22:40 |
|
NihilCredo posted:You're right. I fixed it. It's beautiful.
|
# ? Jun 23, 2016 04:40 |
|
Node was invented by someone who was looking for ideas for things to do with Javascript, and he misunderstood them when they told him to cram it in his backend.
|
# ? Jun 23, 2016 04:55 |
|
The payment gateway I'm implementing right now uses JS to generate payment tokens - as, user puts in their credit card on my site, payment JS library (that I include on my site) communicates with the payment gateway and gives me a token. Their example doesn't work as well, so I guess it's going to be a day
|
# ? Jun 23, 2016 10:11 |
|
Bognar posted:Oh my god, how have I never known about this twitter account? This is amazing. I'm partial to "Correct code in C is actually easy since the language is very simple" and "I can't help but think that reference counting has pretty much killed garbage collection" e: "If you are hiring for a job that requires the top 1% of intelligence, it is no surprise that you are going to have more men than women." Hammerite fucked around with this message at 12:37 on Jun 23, 2016 |
# ? Jun 23, 2016 12:33 |
|
Ender.uNF posted:Acrobat will parse a PDF as long as it finds the header in the first 1k of the file. It gives no shits about making sure the object ToC actually matches up with the object delimiters in the file so you can slap all kinds of mangled poo poo into a PDF and it will parse. This is how you create ZIP files that are also valid PDFs. Stuff the PDF headers and JavaScript exploits in ZIP metadata and laugh as it all disappears on unzipping. Exploit file extension vs MIME types to confuse filters and scanners. Speaking of dumpster fires, IE did the same thing with text files and <html>. Or maybe just <? It's been a few years.
|
# ? Jun 23, 2016 14:52 |
|
A big IE security horror of the past has been autodetecting the character encoding. So what you thought was perfectly safe escaped ascii text rendered back into your HTML actually gets interpreted as UTF-7 and turns into an easy XSS.
|
# ? Jun 23, 2016 15:13 |
|
A certain rather good PDF generator has a trial version which puts a logo in the corner of the page. But it writes proper, vector, unencoded PDFs. Pop them open in a text editor, remove a block and bye bye logo.
|
# ? Jun 23, 2016 16:05 |
|
Is this approach to dependency injection considered a horror?code:
|
# ? Jun 23, 2016 16:10 |
|
Munkeymon posted:Speaking of dumpster fires, IE did the same thing with text files and <html>. Or maybe just <? It's been a few years. All browsers are pretty drat lenient with incorrect HTML syntax. They'll try their best to piece it together, even though it won't come out as it was probably intended to.
|
# ? Jun 23, 2016 16:11 |
|
Which is caused by the specification specifically allowing some block elements to not have a closing tag. From a human perspective it makes sense that a second <p> tag implicitly closes the previous paragraph, but it's still stupid to permit it. What's the point of rules if you don't have to follow them.
|
# ? Jun 23, 2016 16:17 |
|
rt4 posted:Is this approach to dependency injection considered a horror? I wouldn't call "just pass the object it needs as a constructor argument" a horror. I would definitely call that constructor a horror.
|
# ? Jun 23, 2016 16:43 |
|
fishmech posted:All browsers are pretty drat lenient with incorrect HTML syntax. They'll try their best to piece it together, even though it won't come out as it was probably intended to. I mean it decided to change the MIME type based on finding something that looked like HTML in a text/text file with a .txt extension.
|
# ? Jun 23, 2016 16:48 |
|
Ender.uNF posted:My favorite PDF thing is that PDF also includes PostScript. Oh and it auto-executes JavaScript and has AJAX support. And until recently you could communicate arbitrarily with JS in the browser or across PDF documents. You can also define arbitrarily different representations for the screen and printer. Let's see... What else? Rosetta Flash is one of the best hacks I have ever seen. https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
|
# ? Jun 23, 2016 17:45 |
|
Klades posted:
Same here. If that section of code was more readable, I'd say it's a good approach. Instantiating each object with a variable name instead of trying to be clever would do better to convince others to adopt the approach.
|
# ? Jun 23, 2016 18:00 |
|
after my current piece of work i need to look at an aspx page that has a problem. It populates 2 tree lists, using Javascript and if you have more than 10 items in the main list - it can take up to 10 minutes per click on the page. vb.net for one mark against it, Logic in View layer (JS) and apparently all the internal web services are full soap services rather than partial commits....
|
# ? Jun 23, 2016 18:23 |
|
Klades posted:
A lot of that hot trash fuckfest looks like it could be mitigated by composing parameters rather than new-ing up a huge array in the middle of your constructor.
|
# ? Jun 23, 2016 18:38 |
|
hyphz posted:A certain rather good PDF generator has a trial version which puts a logo in the corner of the page. I've had to do that recently (but in my case it was removing text from existing PDF files) - qpdf is a lifesaver when your PDF is compressed / malformed. Suspicious Dish posted:Rosetta Flash is one of the best hacks I have ever seen. This one is just... wow, quite imaginative. canis minor fucked around with this message at 19:27 on Jun 23, 2016 |
# ? Jun 23, 2016 19:20 |
|
|
# ? May 17, 2024 02:38 |
|
rt4 posted:Is this approach to dependency injection considered a horror? The difference between "unintelligible Java" and "an undocumented DSL" is just a matter of perspective
|
# ? Jun 23, 2016 19:41 |