Hacker Newsnew | past | comments | ask | show | jobs | submit | mattsan's commentslogin

Haven't tested but I'm almost certain the Electron app they're talking about is VS Code. Wouldn't make sense for a code editor to sandbox extensions


I don't believe they are talking about a VS Code extension embedding PDF.js but rather an Electron app that has PDF.js embedded by default. My guess is Slack.


Funny thought - want to solve global warming? Disassemble Mercury! Earth's orbit in theory would space a bit further out


Okay but if you kept all that mass inside of Earth's orbit then you would not change the center of gravity, and Earth's orbit wouldn't change.


You can keep it in the same orbit but spread the mass out along the orbit to the other side and that changes the combined CoG to be closer to Sun's CoG in turn changing Earth's orbit, albeit probably slightly


Ever heard of the 3 body problem? No way we can reliably model that.


So that isn't true. The 3 body problem is a problem in theory and extreme situations, not practice.

We discovered half the planets by doing the math to predict the orbits based on the known distribution of math in the solar system.

General Relativity was initially validated by predicting mercury's orbit accurately.


> known distribution of math in the solar system.

And mass as well :)


3 body problem: orbital decay when there are three orbiting bodies of SIMILAR MASS.

Mercury is not similar mass to the sun, so this is not the three body problem


GPT4 seems to think it is a 3 body problem. Mercury and Earth are of similar size and exert gravitational effects on each other. Take away mercury and maybe the earth slowly drifts a little.

The point is that a very small difference in starting conditions yield wildly different results.


GPT4 is an idiot. It actually cancels out over the orbit for small objects

https://www.google.com/url?sa=t&source=web&rct=j&opi=8997844...


Was a joke :)


To be fair all critical systems can be controlled by hardware buttons below the displays so they don't need a 100% guarantee, worst case rebooting would be fine


Yes, this .. and anyway, isn't the astronauts interaction during critical flight phases completely superfluous to the mission? The screens are there to tell the occupants how close they are to death, it seems, and little else.

Heck, for a long time - decades, even - the principle 'interface' to the rocket systems being used to regularly launch humans to space was, literally, a stick.

Javascript seems like a huge upgrade from a stick. ;)


They're definitely marketing this as if they were Apple. If this takes off I'm betting on Apple buying them out.


Every rumor points at Apple announcing OS integration of local LLM assistant stuff at WWDC in June, with specialized chips to go with it. I suspect they're going to Sherlock a lot of small "AI" companies simultaneously.


It should just be banning the use of AI in code reviews


I don't see what you would even do with an LLM in a code review.


The positive view: generate scenarios in which the code will fail.

The negative view: write plausible-seeming explanations justifying the code as correct.


yep this is what I meant. hallucinating, justifying or missing bad stuff.

additionally, similar to how large PRs are more likely to just be skimmed and replied with a "LGTM!", an LLM missing some bad stuff but still producing a seemingly thorough review would increase the chance of the bad stuff making its way in.

allowing LLMs to write code would be fine if its truly verified by a human, but let another LLM hallucinate and cloud a persons judgement and you've got a problem


i thought i'd find out, so i picked a quasirandom piece of my own code (http://canonical.org/~kragen/sw/dev3/nonarytbl.py) and gave it to gpt-4 to review, with the prompt:

"Please review the above code. How does it work? Is it well designed? Is it efficient? What are its good points and its bad points? How should it be improved? Is it readable and maintainable?"

i feel like gpt-4's code review (included below) was mostly correct and useful. however, the efficiency concerns in particular are unfounded, and the python approach to handling errors like those cited is to just let the exception propagate, suboptimal though that is for usability. also, i'm not sure i agree with its high opinion of the modularity, usability, and readability

simply pasting gpt-4's partly incorrect analysis into a textarea when someone asks you for a code review would be malpractice, but it could be a useful source of ideas for possible improvements to suggest and possible problems to investigate. also, i've found it to be especially good at coming up with plausible ways that someone could misunderstand my code, which is to say, ways that my code is unclear and therefore could have its clarity improved

overall i'd say that gpt-4 is a lot better at reviewing code than at writing code. i've gotten significant improvements out of its code by asking it to review its own code looking for improvements, then asking it what the code would look like with those improvements. also, having it write test suites, then showing it the results of running the test suites

— ⁂ —

The provided Python script is designed to generate and print arithmetic tables for balanced nonary (base 9) numbers using a unique set of Unicode glyphs. The script covers operations such as multiplication, maximum, addition, and subtraction. Here's a breakdown of how the code works and an evaluation of its design:

### How It Works:

1. `gen_table` Function:

- This function generates a table for a given binary operation (`op`) like multiplication or addition.

- It takes an optional `name` parameter for labeling the operation in the table header.

- The `values` parameter specifies the range of values to be used in generating the table (default is from -4 to 4).

- It constructs each row by applying the operation between all pairs of values.

2. `nonary` Function:

- Converts an integer into its balanced nonary representation using specified glyphs.

- Handles negative numbers and numbers greater than 8 by recursive calls.

3. `layout` Function:

- Formats the table into aligned columns for better readability.

4. `paste` Function:

- Combines multiple tables horizontally with spaces between them.

5. Main Execution Block (`if __name__ == '__main__'`):

- Generates specific tables for different operations and prints them formatted properly.

### Evaluation:

Good Points:

- Modularity: Functions like `gen_table`, `nonary`, and `layout` are modular, making specific tasks well encapsulated.

- Reusability: The functions can be reused or extended easily; e.g., adding new operations or changing glyph sets.

- Readability: Despite some complexity in logic, especially in recursion and formatting, variable names and function names are descriptive which aids understanding.

Areas for Improvement:

1. Efficiency Concerns:

- Recursion in `nonary`: For large numbers, this could lead to deep recursion levels.

- Repeated calculation of widths in `layout`: This could be optimized if performance becomes an issue with larger data sets.

2. Error Handling:

- There’s no error handling if invalid inputs are passed to functions like non-existent glyphs or unsupported operations.

3. Documentation & Comments:

- While there's a detailed module-level docstring explaining high-level concepts, inline comments explaining complex parts (like recursion in `nonary`) would improve maintainability.

- More detailed docstrings on what each function expects as input and what it outputs would help other developers understand their interfaces quickly without diving into code details.

4. Testing & Validation:

- Adding unit tests would ensure that changes do not break existing functionality and help validate edge cases like very large/small numbers or unusual sequences of operations.

5. Scalability & Generalization:

– Currently tailored specifically to balanced nonary system; generalizing this to handle any base might make it more useful as a tool for exploring other numeral systems.

6. User Interface Improvements:

– Providing command-line arguments or interactive prompts could allow users to specify ranges or select specific tables without modifying source code directly.

### Conclusion:

The script is well-designed concerning modularity and separation of concerns but lacks robustness due to missing error handling and testing components. Enhancements towards documentation, user interaction, scalability/generalization could significantly increase its utility while maintaining ease-of-use for educational purposes or numerical system explorations.


Cloudflare is profitable. Whales subsidise retail.


You clearly haven't read the earnings report. In December 2023, their net income was -27.86M. The've been loosing 100M a year for a few years now. To be clear, I think this is the right move from a business perspective, I'm just saying it's a little unfair to knock backblaze without mentioning this nuance.


To be clear, that's a problem with your attention span, and not with the creator.


My attention is great. Adverts on the other hand I don't have time in the day to waste watch adverts. It's why I don't watch TV, nor YouTube apart from the odd occasional video.

Driving home I am nuked with adverts in my face. Listening to music on the radio with adverts thrown in to my ears.


> Driving home I am nuked with adverts in my face. Listening to music on the radio with adverts thrown in to my ears.

Ironically, despite giving up more than most of us to spite these ads, you appear to listen to them more often than the rest of us.

There's a reason a decent number of us have adblockers installed and download local copies of everything we consume, its really not that hard to get around the advert hell that is modern edu-tainment while sacrificing (almost) nothing


I don't drive, live in the city centre. So I see billboards everywhere.

What's not to say I don't listen to adverts and that was the figure of speech of if your phone is dead, or you don't have some player that allows you to play your own music?

I have adblocks all over the place. That itself still doesn't stop sponsored content and all the other crap thrown in your face. Don't act stupid, you know it's real.


can't wait for LLMs to dispatch field agent robots who search for answers in the real world thats not online /s


skynet would like a word


This is addressed in the README and a comparison is given


> This is addressed in the README and a comparison is given

The only mention of wget in the README reads thusly:

  If compared to saving websites with wget -mpk, this tool
  embeds all assets as data URLs and therefore lets browsers
  render the saved page exactly the way it was on the
  Internet, even when no network connection is available.
This is not the only way to invoke wget in order to download a web page along with its assets. Should the introduction article I referenced above be deemed insufficient, consider this[0] as well.

0 - https://simpleit.rocks/linux/how-to-download-a-website-with-...


x coord, y coord, command that consumes the arguments from what we can infer is pushed onto a stack beforehand


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

Search: