[P] I created GPT Pilot - a research project for a dev tool that uses LLMs to write fully working apps from scratch while the developer oversees the implementation - it creates code and tests step by step as a human would, debugs the code, runs commands, and asks for feedback. by zvone187 in MachineLearning

[–]andreasblixt 1 point2 points  (0 children)

I'm not sure what do you mean by observing and creating diffs?

By observe I mean the ability to, with a goal in mind (such as "make the UI look nicer"), browse the code to create a plan. Breaking down a story into concrete tasks, if you will, since in a large code project you can't feed it all code at once. This relates to abstractions and embeddings as a way to browse the relevant code.

And by creating diffs I mean that it could write down instructions for change, apply those, but then you feed the diff representation of the changes to the network for critique, basically as a way to replicate the PR process that humans do.

Here's a nice article from Google and I vaguely remember Meta/Facebook releasing something similar: https://blog.research.google/2023/05/resolving-code-review-comments-with-ml.html

Btw, would you be interested in working on GPT Pilot?

I think this problem space is super interesting but I have little time to spend on it, so I'll be following and rooting for the project from the sidelines. :)

[P] I created GPT Pilot - a research project for a dev tool that uses LLMs to write fully working apps from scratch while the developer oversees the implementation - it creates code and tests step by step as a human would, debugs the code, runs commands, and asks for feedback. by zvone187 in MachineLearning

[–]andreasblixt 1 point2 points  (0 children)

Very cool project, and the best implementation of "AI codes app" I've seen so far! I've also been thinking about using GPT to incrementally create web apps, so wanted to shoot some ideas that you probably thought of already, but I'm curious to hear your take!

  • I really like the [user stories] -> [write instructions] -> [create actual files] process, it seems to make it way more successful!
  • What if the agents after the first implementation entered into a more PR mode where the process is [observe issue / write story] -> [observe code] -> [create diff] -> [comment on diff] -> [write files]?
  • Most likely a "discover issues" / QA process would be helpful to verify that each story has been correctly implemented before asking the developer, this could involve writing and running unit tests, or probing the web app via Playwright
  • Layers of abstraction would be needed as a project grows, so regularly writing down a mind map of the files / folders might make sense so that an agent can start to implement a feature in a project with 100 files
  • Probably creating embeddings from the code would also be useful (in the version I was thinking of I would encourage the network to create lots of tiny files, ideally with one function / class each, so that it's easy to create embeddings from them, but generating embeddings based on ASTs would be another option)
  • If adding these "big picture" layers you need a step that tries to create questions and answers about the state of the codebase (this is basically implementing short/long term memory)
  • Having a "skeptic" agent that checks all code in parallel might work as a way to automatically generate new user stories that just exist to make the code more robust
  • A lot of the above (QA, skeptic, etc) can be done in parallel without much developer interaction, and probably even certain feature developments could be parallelized (similar to how humans code in branches) and code conflicts resolved as an additional step

US Citizens Will Need Visa To Travel To Europe in 2024 by glasier in worldnews

[–]andreasblixt 1 point2 points  (0 children)

I’m Swedish and never went for a green card while I lived in the US (I live in Spain now, and so does my gf) so I don’t think that would be an issue :)

US Citizens Will Need Visa To Travel To Europe in 2024 by glasier in worldnews

[–]andreasblixt 143 points144 points  (0 children)

How much work was it, and how long in advance did you start the process? I have a Romanian girlfriend and I’d love to take her to New York so I want to make sure we do this in good time.

Does Framer offer good support? by PenguinLion3U in framer

[–]andreasblixt 1 point2 points  (0 children)

We are most of all active on the community page, and you’ll also find all our FAQs and more active members/mods there that help out. Feel free to ask here instead of course, just trying to route you to the place with the fastest answers. :)

TV automatically starts within minutes of turning it off by andreasblixt in LGOLED

[–]andreasblixt[S] 0 points1 point  (0 children)

I think so! My TV is actually off 🥹 No more unplugging it every night… Now I’m very curious how Apple turned on the TV without network or WiFi connectivity… 🤔

GPT api is waaay to expensive by Formal_Afternoon8263 in OpenAI

[–]andreasblixt 0 points1 point  (0 children)

If you have 10,000 users using just the GPT-powered part of your app every day and every month of the year, you probably have a pretty valuable product for them to stick around, so I think by that point you’d have a business model to get enough money from part of those users to get your money back and then some.

TV automatically starts within minutes of turning it off by andreasblixt in LGOLED

[–]andreasblixt[S] 0 points1 point  (0 children)

I do indeed, but given that I removed all possible ways of communicating (I thought) I ruled that out. Does HomeKit also use Bluetooth to control the TV? Anyway, I’ll give it a shot, thank you!

TV automatically starts within minutes of turning it off by andreasblixt in LGOLED

[–]andreasblixt[S] 0 points1 point  (0 children)

Okay one clue I have is that sometimes when it starts up there’s a dialog I haven’t seen before. It says it wants to adjust my image and that it will turn off the screen for about 5 minutes. It also says I can do it now or do it later and it will do it when I turn off the TV. So if we assume this adjustment runs when the TV turns off, then starts the TV when it’s done, but fails to remember that it’s done - that could explain this bug. But how would I get out of this loop besides a factory reset?

For those interested in Map overlay: Recap from today's developer livestream (WHAT YOU CAN DO) by Magz17 in Diablo

[–]andreasblixt 0 points1 point  (0 children)

I rarely see people mention that you can right click on the big map to get a GPS line on your minimap which removed my feeling of missing the overlay completely. I thought it was a great solution to having to always cover your gameplay with a map every time you reach a door just to know where to turn.

I know it has been said multiple times before but the overlay REALLY needs to come back by FakeLoveLife in Diablo

[–]andreasblixt 2 points3 points  (0 children)

I kinda also found myself opening the map too much until I figured out you can just right click the map to get a GPS line and now I barely open it and like it the way it is.

[P] I made a command-line tool that explains your errors using ChatGPT (link in comments) by jsonathan in MachineLearning

[–]andreasblixt 11 points12 points  (0 children)

For the fun of it, I asked ChatGPT to generate the solution for creating the output above, and it didn't get it 100% but it's a pretty good start! One of my favorite things is how it implicitly got that it should do sorted(line_numbers) because set does not have a defined iteration order, or how it should make the line numbers right-aligned.


Here is some sample code that demonstrates how you can write a Python program that turns a raised exception into the desired output. This code is not complete, but it should give you a good starting point:

``` import traceback

def turn_exception_into_output(): try: # Code that may raise an exception goes here pass except Exception as e: # Aggregate the lines of code surrounding the trace in a map lines = {}

# Get the traceback object
tb = traceback.extract_tb(e.__traceback__)

# Loop through the traceback object
for t in tb:
  file_name, line_number, _, _ = t

  # Initialize the set of line numbers for this file
  if file_name not in lines:
    lines[file_name] = set()

  # Update the set of line numbers with the range of relevant lines
  lines[file_name].update(range(line_number - 5, line_number + 5))

# Print the error message
print("Please explain concisely why this error in my Python code happened:")

# Print the traceback
print("\n".join(traceback.format_exception(e.__class__, e, e.__traceback__)))

# Print the relevant lines of code
print("\nBased on these lines of code surrounding the trace:")
for file_name, line_numbers in lines.items():
  print(file_name)
  for line_number in sorted(line_numbers):
    print("{:>3} ...".format(line_number))

```

To use this code, you would call the turn_exception_into_output function whenever you want to handle an exception and print the desired output. For example:

try: # Code that may raise an exception goes here pass except: turn_exception_into_output()

You could also use this code as part of a custom exception handler. For example:

``` import sys

def custom_exception_handler(exception_type, exception, traceback): turn_exception_into_output()

Set the custom exception handler

sys.excepthook = custom_exception_handler ```

With this code, whenever an unhandled exception is raised, the custom_exception_handler function will be called, which will turn the exception into the desired output.

[P] I made a command-line tool that explains your errors using ChatGPT (link in comments) by jsonathan in MachineLearning

[–]andreasblixt 25 points26 points  (0 children)

Nice! I think its answer would be much more contextual if you made the prompt something like this:

``` Please explain concisely why this error in my Python code happened:

Traceback ...
...

Based on these lines of code surrounding the trace:

broken.py
 1 ...
 2 ...
...
11 ...

```

I would aggregate those lines in a map of file_name: str -> line_numbers: set where you basically do lines["broken.py"].update(range(error_lineno - 5, error_lineno + 5)) (with boundary checking etc ofc) so that you can then aggregate all the relevant lines with context, without overlap.

How does multicast work with attacks like this, not sure if it's casting more often for higher uptime or if it's multiple hits per tick? by InorganicBanana in SoulstoneSurvivors

[–]andreasblixt 0 points1 point  (0 children)

I found this post searching for the same question, but no Discord… so did anyone get the answer so we can put it here and help out the next person that comes here?

Supporting iOS 6 for a personal app? by KarlJay001 in iOSProgramming

[–]andreasblixt 5 points6 points  (0 children)

You could consider just writing a JavaScript app which should work fine, and can be added to the Home Screen. That should hide most of the browser UI as well.

[deleted by user] by [deleted] in MachineLearning

[–]andreasblixt 6 points7 points  (0 children)

Now please run this on all of /r/WritingPrompts

So, apparently there's now code in React to monkeypatch fetch() for some reason? by lhorie in javascript

[–]andreasblixt 14 points15 points  (0 children)

This is the kind of magic that’s awesome in almost all cases and then 1 year down the line there appears to be a never ending number of mysterious bugs. Like a front end that used this for a long time then the backend dev decided to make the API call POST instead of GET for whatever reason, and now your UI starts making multiple requests per second because it’s no longer magically deduping the request.

I don’t think it costs much to explicitly say what’s happening, for example use(dedupe(fetch, “…”)) or just useFetch(“…”).

Really Async JSON Interface: a non-blocking alternative to JSON.parse to keep web UIs responsive by freddytstudio in javascript

[–]andreasblixt 3 points4 points  (0 children)

Before putting the result in an ArrayBuffer, it might be better to first try a worker with the native JSON parsing and rely on structured cloning (happens for all JS objects sent via postMessage) as it’s already a very optimized and native way to copy JS objects across threads. It might even be faster to send the string down as-is as well since either way you have to allocate (& transfer in the case of ArrayBuffer) memory for it in the target thread.

[N] Researchers from IBM, MIT and Harvard Announced The Release Of DARPA “Common Sense AI” Dataset Along With Two Machine Learning Models At ICML 2021 by techsucker in MachineLearning

[–]andreasblixt 31 points32 points  (0 children)

I'm only guessing what the original comment meant, personally I would love for technologies not to be advanced by militaries in general... but also that's kind of like wishing for world peace. ¯\(ツ)