News for hackers. Stuff that matters.

windowojji

For other small JS engines similar to QuickJS see Hermes: https://github.com/facebook/hermes
Re:Facebook's “see no evil” strategy on Friday July 16, 2021 @12:26AM (#27853048)
Not just that:

> 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."

Re:Facebook's “see no evil” strategy on Friday July 16, 2021 @12:25AM (#27853045)
What makes you think that everyone who wrote the Constitution and relevant documents 250 years ago was infallible?

The founding fathers got plenty of things wrong, knowing they were designing an imperfect system.

For example, first past the post voting. Washington cautioned against the rise of political parties knowing full well that they were an inevitable consequence of the system he was complicit in engendering.

Re:Brave Search beta on Wednesday June 23, 2021 @12:53AM (#27600927)
I'm amazed that DDG/Brave don't understand that typing something immediately after a "!" on a smartphone is annoying and difficult. DDG only supports "!" after the character for a small subset of bangs. Thankfully "g!" is one of them, but it's immensely easier to type on smartphone.
Re:Git undo: We can do better on Monday June 21, 2021 @12:43PM (#27580911)
`hg` literally already has `hg undo` as a command. It's good that `git` can have a similar tool
> promote you right out of software development and into management

At good companies, these two jobs run parallel, not one on top of the other. Management should be viewed as a sidegrade, not a promotion.

Re:YouTube-dl can no longer download age-restricted videos on Wednesday June 02, 2021 @02:08AM (#27365440)
Please say which country you're referring to when you say "in my country" on the internet. It allows others to contextualize and verify otherwise useless information.
Re:Show HN: Find Subreddits for Your Niche on Wednesday May 26, 2021 @11:21PM (#27299012)
See the grandparent, which rightly asserts that reddit search is bad.
Re:TI-84 Plus CE Python Graphing Calculator on Saturday May 08, 2021 @10:05PM (#27092524)
The problem with this is that schools tend to very specifically teach TI calculators while leaving other calculators to the children to self-teach.

This is fine if you're a kid who likes/understands/cares about calculators, but if you're not and you don't like math or find learning a specific UI with no guidance annoying it can be bad. I knew kids of both varieties in HS.

Re:Robinhood Files S-1 on Tuesday April 20, 2021 @11:59PM (#26885278)
I don't think parent was saying Robinhood was good at executing trades, just that its UI was more functional than other brokers'.
It should be 0.
I appreciate my custom CSS just fine, thanks.

    [bgcolor="#ff6600"] {
      background: #008 !important;    
    }

    body > center > table > tbody > tr:first-child > td {
      background: #008 !important;
    }

Here's some CSS rules if you want to change it yourself instead of relying on an obviously poor design choice.
Re:B. Traven on Sunday April 18, 2021 @10:36PM (#26858643)
Here's some more Baader Meinhof from me:

Omnibus did an episode on B Traven[0], but also did episodes on Baader Meinhof[1][2]!

[0] https://www.omnibusproject.com/317

[1] https://www.omnibusproject.com/310

[2] https://www.omnibusproject.com/311

Re:Esbuild 0.9 on Wednesday March 10, 2021 @01:07AM (#26408305)
Can you elaborate on this? const and let should be interchangeable from a performance perspective because it's not like the engine needs your input to know whether a binding is reassigned ever (that's a fundamentally easy thing for a compiler to check) so I must conclude that you're seeing performance benefits from using block scoped variables with TDZ that disappear when you use function scoped variables with var?
For some reason people who cook in the USA believe that food isn't worth eating unless it looks like meat. I'm astonished at the amount of time that I go to eat "vegetarian" food anywhere and it's just the meat dish with fake meat in it.

Meanwhile, I go to India and check for vegetarian food, and suddenly it's like care and thought was actually put into making food that works for vegetarian ingredients instead of just substituting what's in a meat dish.

Re:Write a Shell in C on Sunday February 14, 2021 @01:26AM (#26130166)
Does C have destructors?
Re:Firefox 85 cracks down on supercookies on Tuesday January 26, 2021 @09:51PM (#25923682)
I like that the website you linked still has Google Analytics JS embedded.
Read the user manual. I'm not trying to be snarky - the user manual is explicitly something that isn't the same as the reference and the user manual is called out as the next step after `vimtutor`.

Start with `:h user-manual` and go from there!

Re:Big O Notation – Explained as easily as possible on Saturday January 16, 2021 @02:36PM (#25804770)
> it's applied to a small enough input

The whole point of big-O notation is to analyze algorithms as they're applied to input of size `n` larger than some `n_0`. Of course it's not useful for small inputs - it's explicitly about large inputs.

> it's implemented very efficiently

On large inputs, it's very hard see how, say, a linear algorithm with a quadratic algorithm regardless of how "efficiently" it's implemented. Assuming you're talking about something like cache friendliness or good register allocation?

Re:Big O Notation – Explained as easily as possible on Saturday January 16, 2021 @02:33PM (#25804752)
> Lim [x -> inf] O(f(x))/O(g(x))

I understand both limits and I've taught asymptotic analysis in the past. O(f(x)) and O(g(x)) are sets. How does one divide two sets? This explanation is ill formed.

Re:Git Koans (2013) on Wednesday December 23, 2020 @02:48AM (#25515442)
Re:More challenging projects every programmer should try on Sunday December 20, 2020 @08:41PM (#25491308)
I worked on a game boy emulator a while ago to learn C. I did pretty well and was able to run most games I came across just fine, but never got audio working...I just couldn't understand any of the stuff online about how it worked, and was unable to find any good resources that walked through how audio emulation in general worked, much less game boy's version.
Re:More challenging projects every programmer should try on Sunday December 20, 2020 @08:39PM (#25491291)
Project Euler is very specifically a website that requires both math knowledge and programming ability. It's designed to expose people to difficult math concepts, while advent of code is mostly explicitly for programmers.
Re:More challenging projects every programmer should try on Sunday December 20, 2020 @08:34PM (#25491260)
I'd hardly say it relies _heavily_ on obscure math tricks. Typically there's one or two days which require, perhaps, an undergraduate level of math which people would likely get in an intro class during a CS degree.

Most of the problems are around searching a space for some solution or just simulating some state changes. Recent problems involved implementing a higher dimensional version of Conway's game of life[0], a simple arithmetic expression evaluator [1], or a simulator for a simple number game[2] e.g.

The most recent one[3] involves solving a jigsaw puzzle by using a simple backtracking search (or any number of other methods). It's a bit complex, but not reliant on a particular math trick.

The vast majority of the problems in advent of code shouldn't require any math tricks, though they're often complex and involved, particularly as the month goes on.

[0] https://adventofcode.com/2020/day/17

[1] https://adventofcode.com/2020/day/18

[2] https://adventofcode.com/2020/day/15

[3] https://adventofcode.com/2020/day/20