Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I really appreciate you taking the time to look into this! I don't have much more to say right now than what I said to this person: https://news.ycombinator.com/item?id=30742704. I need to dig into it and see. What you've written will help. I might introduce unit tests (with visuals) for this so I can sure it works in a lot of different scenarios.


sort by: page size:

Not every code you deal with is your own.

Besides, terseness is one issue, but far from the only one: https://news.ycombinator.com/item?id=20978608


Believe me I have seen the writing on the wall

example 1: https://news.ycombinator.com/item?id=8314517

and 2: https://news.ycombinator.com/item?id=8478953

I think your piece is very much on point although I only read 50% so far I will finish it and go through the code as well. It is well written and your arguments are solid.

The only thing is I disagree on one thing for server side code I think .NET will evolve and adapt.

On the client the war is over JavaScript has won, and its given us what .NET and Java promised all those years ago; true cross platform UI/client apps.


Read more good code and emulate after you fully understand it.

There are lots of projects that are good examples.

https://news.ycombinator.com/item?id=4331688


This was discussed a bit in the original post [1] but I believe this comes down to the problem being sufficiently deep in the stack that there was an assumption that this wasn't something that could be improved on. I'm sure the loading code looked good.

It took someone who didn't know what that code looked like being curious about what was actually happening.

1: https://news.ycombinator.com/item?id=26296339


well if you're so sure, look at the code and the feature list[0] (to see what it actually does) then tell us what it is doing wrong.

[0]: https://wezfurlong.org/wezterm/features.html


I never said you wouldn't have to dereference and check the implementation. That's debugging. I said that it would make my intent clear. That I wrote the code below that line with the assumption that url is absolute and not specifically only the 'http://' case. The abstraction here is about encapsulating and communicating my intentions.

Here's yet another page with some code examples:

https://www.jeremyong.com/klein/geometry-potpourri/


Oh, I see. I just need to learn more. The problem is I just don't know JS (or other langs for that matter).

http://YouDontKnowJS.com


Thanks! While you're here, is oconnore (https://news.ycombinator.com/item?id=9800705 )'s solution legal according to your rules?

EDIT: Also, the wording

> There's no way to read the values from the array, only to set them and compare them for equality

seems unchanged.


Another not-so-obvious bug with your example buggy code: it's also vulnerable to timing attacks.

http://codahale.com/a-lesson-in-timing-attacks/


Here is the example code. Comments and Questions are welcome.

https://gist.github.com/AlgorithmsAreCool/b0960ce8a3400305e4...


http://shakespearelang.sourceforge.net/report/shakespeare/sh...

Arguably a bit more subtle than your sample code.


Thanks, I appreciate the context links

(friendly note: code blocks break clickable links)

1: https://news.ycombinator.com/item?id=13144713

2: https://github.com/naftaliharris/tauthon/issues/47#issuecomm...


Ok, let's try that and see what it breaks :)

Edit: done now. I can't shake the feeling that we've been through all this before, and that's why I ended up resorting to whitespace tricks in https://news.ycombinator.com/item?id=20352144. But let's wait and see what's broken now...


> which would be trivial to detect and block by the operator.

Problem solved! https://www.aliexpress.com/item/4000124061983.html


"Beware of bugs in the above code; I have only proved it correct, not tried it." https://www-cs-faculty.stanford.edu/~knuth/faq.html

It is worth studying common weaknesses in code:

https://cwe.mitre.org/


I think you have no idea what the Smalltalk refactoring browser is actually capable of doing (and not doing).

Please read this: https://news.ycombinator.com/item?id=15113804


On https://news.ycombinator.com/item?id=12483698 I wrote a better idea how this might be implemented without causing this problem. Nevertheless even if we use my first, worse interface this should not be a problem: Spawn a thread that does the lowlevel stuff, sync it and after that run the JITted code.
next

Legal | privacy