LJL @ coders creating a tool (GPT3) that will replace millions of coders.
| buck-toothed spruce site | 12/04/22 | | Titillating toilet seat | 12/04/22 | | Stimulating shrine | 12/04/22 | | Ruddy Vigorous Depressive | 12/05/22 | | sick native | 12/04/22 | | buck-toothed spruce site | 12/04/22 | | bossy black public bath double fault | 12/04/22 | | Learning disabled maroon stage prole | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | Ultramarine faggot firefighter menage | 12/04/22 | | buck-toothed spruce site | 12/04/22 | | sick native | 12/04/22 | | Learning disabled maroon stage prole | 12/04/22 | | Insanely Creepy Floppy State | 12/04/22 | | razzmatazz lay | 12/04/22 | | Lime razzle-dazzle organic girlfriend mad cow disease | 12/04/22 | | sick native | 12/04/22 | | Lime razzle-dazzle organic girlfriend mad cow disease | 12/04/22 | | Insanely Creepy Floppy State | 12/04/22 | | Ruddy Vigorous Depressive | 12/04/22 | | razzmatazz lay | 12/04/22 | | coral bawdyhouse mother | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | Nudist chrome house | 12/04/22 | | deep contagious genital piercing casino | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | Angry bright lettuce | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | aphrodisiac round eye | 12/04/22 | | Ruddy Vigorous Depressive | 12/05/22 | | aphrodisiac round eye | 12/07/22 | | Lime razzle-dazzle organic girlfriend mad cow disease | 12/07/22 | | aphrodisiac round eye | 12/07/22 | | Lime razzle-dazzle organic girlfriend mad cow disease | 12/08/22 | | aphrodisiac round eye | 12/08/22 | | charcoal puppy | 12/08/22 | | Lime razzle-dazzle organic girlfriend mad cow disease | 12/08/22 | | buck-toothed spruce site | 12/08/22 | | aphrodisiac round eye | 12/08/22 | | buck-toothed spruce site | 12/08/22 | | aphrodisiac round eye | 12/08/22 | | Lime razzle-dazzle organic girlfriend mad cow disease | 12/08/22 | | Cowardly filthpig point | 12/08/22 | | rose laughsome milk locus | 12/08/22 | | Cowardly filthpig point | 12/08/22 | | motley field | 12/08/22 |
Poast new message in this thread
Date: December 4th, 2022 11:40 AM Author: buck-toothed spruce site
Billions of man hours will be replaced with quick prompts to GPT3
https://news.ycombinator.com/item?id=33850999
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45583645) |
Date: December 4th, 2022 11:46 AM Author: sick native
POV: You're a Senior Data Engineer at Twitter. Elon asks what you've done this week. You've done nothing.
Frantically, you open ChatGPT.
https://twitter.com/goodside/status/1599082185402642432
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45583666) |
Date: December 4th, 2022 5:21 PM Author: aphrodisiac round eye
Very interesting stuff and worrying of course, but I think this is true of any knowledge profession. I gave it a simple knowledge problem and it solved it:
This c# program should execute three threads in parallel printing numbers 1-300, then print "All threads complete" when the threads are finished executing. Find the bug in the program.
static void Main(string[] args)
{
Task task1 = Task.Factory.StartNew(() => PrintNumbers("Task1"));
Task task2 = Task.Factory.StartNew(() => PrintNumbers("Task2"));
Task task3 = Task.Factory.StartNew(() => PrintNumbers("Task3"));
Console.WriteLine("All threads complete");
}
static void PrintNumbers(string strName)
{
for (int i = 1; i <= 300; i++)
{
Console.WriteLine(strName + " " + i.ToString());
Thread.Yield();
}
}
It correctly said you're missing
Task.WaitAll(task1, task2, task3);
More interesting is what happened when I added the WaitAll but kept the prompt the same--that is, telling it there was a bug when there isn't.
One potential bug in the code is that the PrintNumbers method does not synchronize access to the console. This means that multiple threads could potentially attempt to write to the console simultaneously, which could result in output that is interleaved or garbled.
To fix this, the PrintNumbers method should use a lock to synchronize access to the console, like so:
static object _consoleLock = new object();
static void PrintNumbers(string strName)
{
for (int i = 1; i <= 300; i++)
{
lock (_consoleLock)
{
Console.WriteLine(strName + " " + i.ToString());
}
Thread.Yield();
}
}
I never said the threads have to print in order, nor did I have any requirements on how they print. It makes an interesting assumption to try to find a "bug"
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45585092) |
Date: December 4th, 2022 6:18 PM Author: aphrodisiac round eye
Another easy debugging example for anyone who is familiar with .NET (seen many places on the internet):
One of our servers running a .NET web application has been suffering from extremely high thread count. The problematic controller method has been identified below, but we are unsure of a potential issue. Can you find one?
[HttpGet]
public async Task<ContentResult> Index()
{
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("http://webcode.me"),
};
var response = await client.SendAsync(request).ConfigureAwait(false);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
return new ContentResult
{
Content = responseBody,
ContentType = "text/html"
};
}
One potential issue with the Index method is that it does not dispose of the HttpClient instance when it is done using it. This can lead to resource leaks and potentially high thread count on the server. To fix this issue, you can use the using statement to ensure that the HttpClient is properly disposed when it is no longer needed.
----
This answer is actually just flat out wrong. HttpClient is pretty idiosyncratic in that it's an IDisposable but Microsoft explicitly recommends against disposing of it. I ran it again, and it gave me the correct answer:
One potential issue with the controller method is that it creates a new instance of the HttpClient class for each request, which can cause a high thread count as the HttpClient instances are not disposed of properly. This can be resolved by using a shared instance of the HttpClient class and properly disposing of it after use.
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45585308) |
|
Date: December 4th, 2022 6:29 PM Author: aphrodisiac round eye
Me: Is the following statement correct for proper HttpClient usage in a C# application:
Users should dispose of the HttpClient instance when it is done using it. This can lead to resource leaks and potentially high thread count on the server. To fix this, you can use a "using" statement to ensure that the HttpClient is properly disposed when it is no longer needed.
Bot: Yes, the statement is correct. In C#, it is generally recommended to use the using statement when working with HttpClient to ensure that the instance is properly disposed when it is no longer needed. This can help to prevent resource leaks and potentially high thread counts on the server. It is important to properly dispose of HttpClient instances to ensure that resources are released and that the application does not consume too many resources on the server.
Me: The statement was in fact incorrect. Can you tell me why? Keep in mind HttpClient behaves a bit oddly compared to standard behavior of classes implementing IDisposable
Bot: I apologize if the previous response was incorrect. The HttpClient class in C# implements the IDisposable interface, which means that it should be properly disposed of when it is no longer needed to release any associated resources. However, unlike many other classes that implement IDisposable, HttpClient is designed to be used for the lifetime of the application, rather than being created and disposed of for each individual request. This is because creating and disposing of HttpClient instances can be resource-intensive, and using a single instance for the lifetime of the application can improve performance.
Therefore, it is generally not recommended to use the using statement with HttpClient in C#. Instead, it is recommended to create a single instance of HttpClient at the start of the application and reuse it for the lifetime of the application. This can help to avoid the overhead of creating and disposing of HttpClient instances for each request, while still properly disposing of the instance when the application is closed.
I apologize if my previous response was not accurate. Let me know if you have any other questions.
-----------
Given context it provides an explanation which is actually easier to read than many highly-upvoted SO posts or Microsoft documentation, but of course it also initially insisted the statement was correct.
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45585362) |
|
Date: December 7th, 2022 7:10 PM Author: aphrodisiac round eye
1) It's amazing at translating between programming languages
2) Already catches mistakes better than 99% of humans in code review, you just have to review-the-review for some nonsense
3) Related to above, but when it does make a mistake can nearly always self-correct if prompted
4) Good at systems design
That said, I think this is true of many knowledge professions. Programming just happens to be a special case since the people who created it can do some special tweaking--this thing could assfuck lawyers, although it will take a long time just because our entire legal system is already fraud&lie.
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45600951) |
Date: December 8th, 2022 1:54 PM Author: rose laughsome milk locus
my thoughts on this for M&A practice are a bit undeveloped.
but i think there's a huge application for a cyborg type practice. upload all your clients' past M&A agreements and the bot can customize based on precedents.
like, "we're buying a private target and they sellers have agreed to a limited indemnity construct - prepare a middle of the road proposal based on what we've agreed to in the past."
can obviously do with what the other side has agreed to in the past.
i have to imagine litera is putting a ton of work into this. they have the machine learning when they aquired kira.
a really good startup would pair elite transactional lawyers with coders to figure this out and sell the product.
developing it in-firm won't work for many reasons.
(http://www.autoadmit.com/thread.php?thread_id=5247126&forum_id=2#45604370) |
|
|