37,790 karma · joined Sep 7, 2019 (7y ago) · 9,208 submissions
comment 3y ago · link · parent
Distributed systems aren't simple, but compared to Paxos, Raft is definitely on the simpler side. I think they're also having a specific audience in mind (distributed systems engineers) rather than the public, when they write "it's easy to understand", which makes sense.
comment 3y ago · link · parent
Another example:
- HTML served by static file servers
- HTML generated by backend
- HTML enhanced with small JS snippets
- HTML generated by frontend, but served by backend
- Go to step one, not learning why anyone moved on from the previous method
comment 3y ago · link · parent
No, it makes sense for any person with any skill set. Just because you are a developer doesn't mean you want to setup everything yourself. We use plenty of tools to make our own experience better and more focused, based on what we want to do.
If I'm a programmer, and I want to publish blog posts, sometimes I don't want to care about the setup that makes me able to publish blog posts, I just want to post something.
> why Substack doesn’t get with the program and just support MathJax and colored syntax highlighting already
This, I don't know. Should have been done ages ago.
comment 3y ago · link · parent
comment 3y ago · link · parent
AI is such a broad term though. Either ban GPT/LLM architecture if that's the goal, or image synthesis, but be specific!
Probably more than 50% of all games out there contain something one could call "AI".
comment 3y ago · link · parent
The detail is what happens after this happens. In a closed source world, most of the cases, that's it. No more builds for any reason, it's dead. You want to change it? Then first reverse engineer it.
But if it's open source, I can if I must, pull down the source code myself and build it. It can continue to live, if someone wants.
609.
Hierarchical Identify Verify Exploit (HIVE)(darpa.mil ↗)
2 points · by capableweb · 3y ago · discuss
comment 3y ago · link · parent
Wouldn't you say there is a different between "Games made by AI" and "Games that included AI in one build for a specific feature as a test, and removed it"? The shovelware you talked about is the first, not the second.
comment 3y ago · link · parent
Regarding other cases, there are already ways of handling those. I don't think just because many ask about something, doesn't mean it's not currently working.
comment 3y ago · link · parent
AWS originated in providing servers for a book business that grew from there, Microsoft originated from writing a interpreter, but both of them excel in other areas today as well. It's not impossible to start with something (chat for gaming), gain expertise (chat for large groups) and then apply it elsewhere (chat in the workplace).
comment 3y ago · link · parent
For reference, this is/was the question: "Write a html page with javascript/canvas to draw the US flag that changes color when I click on it. Make the flag perfectly accurate."
The last part, "make the flag perfectly accurate", made me think that it has to be 100% accurate.
comment 3y ago · link · parent
Why not? Someone could definitely build up database on why GPT is bad at some things and good at others. There is already good explanations for why it's terrible at math, why it doesn't handle single characters/numbers well and so on.
comment 3y ago · link · parent
It's supposed to be deterministic if you set temperature to 0.0, but seems that doesn't work well in GPT4 compared to earlier versions...
comment 3y ago · link · parent
I've managed to work around this in GPT (4 at least) by having a system prompt that forces GPT to challenge me and not blindly accept what I say without verifying it first.
comment 3y ago · link · parent
If you don't want to continue with something inside a Promise, just pass in something that could be changed from `true` to `false` and it cancels itself based on that.
comment 3y ago · link · parent
Here is the implementation I typically use for doing just that:
async function executeQueue(promises, concurrentLimit) {
let index = 0;
let activePromises = [];
async function manageQueue() {
if (index >= promises.length && activePromises.length === 0) return;
while (activePromises.length < concurrentLimit && index < promises.length) {
const promise = promises[index]();
activePromises.push(promise);
index++;
promise.then(() => {
activePromises = activePromises.filter(p => p !== promise);
manageQueue();
});
}
}
await manageQueue();
await Promise.all(activePromises);
}
Used like this: function r(i, resolve) {
console.log(`Task ${i}`)
resolve(`Task ${resolve}`)
}
// Example usage
const promises = [
() => new Promise(resolve => setTimeout(() => r("Task 1", resolve), 2000)),
() => new Promise(resolve => setTimeout(() => r("Task 2", resolve), 1000)),
() => new Promise(resolve => setTimeout(() => r("Task 3", resolve), 3000)),
() => new Promise(resolve => setTimeout(() => r("Task 4", resolve), 500)),
() => new Promise(resolve => setTimeout(() => r("Task 5", resolve), 1500))
];
executeQueue(promises, 4).then(() => {
console.log("All tasks completed!");
});
Would print: "Task Task 4"
"Task Task 2"
"Task Task 1"
"Task Task 5"
"Task Task 3"
"All tasks completed!"comment 3y ago · link · parent
Similarly, stopped playing when the question was "Write a html page with javascript/canvas to draw the US flag that changes color when I click on it. Make the flag perfectly accurate." and it generated a flag that wasn't "perfectly accurate" (https://i.imgur.com/WhyRsYa.png, notice the position of the top/left stars) but then told me "Wrong! You guessed that GPT-4 could not solve the question, but it can! 71% of people got this question correct."
I'm not sure how the validation is done, seems to be manually hardcoded or something, but it seems it's not very reliable.
comment 3y ago · link · parent
I think what another comment mentioned is more accurate:
> Asnyc/await is just syntactic sugar for promises.
> Promises are just wrappers around callbacks.
> Callbacks are used to hook functions into an event loop. The dispatching/scheduling is handled there.
> So really when you use async/await, you’re just writing pseudo-sequential code that gets turned into callback code.
comment 3y ago · link · parent
Probably for daily usage this might be true, but there are definitely cases when you're using JavaScript and not understanding the event loop makes it hard to understand why things are happening. Example:
setTimeout(() => console.log('hello'), 0)
console.log('world')
You'd normally expect this to print "hello" and then "world" since the "sleep time" for the setTimeout is set to 0, but thanks to the event loop, the result will be "world" and "hello". Very simple example, but in real life code bases and beginner JavaScript developers, in can be confusing at times.626.
Starfield from Bethesda Game Studios(bethesda.net ↗)
2 points · by capableweb · 3y ago · 2 comments
comment 3y ago · link · parent
> GPT-4: You can find the VLC page on the Arch Wiki at the following URL: VLC - ArchWiki (https://wiki.archlinux.org/title/VLC_media_player)
It cannot "search", but it can provide direct links. I don't think the context just the previous message makes it clear what you actually want. Are you troubleshooting a error?
comment 3y ago · link · parent
I'm 99% sure the number 6000 is an estimation, and in that case, how would you start to estimate such number? Divide the area into a grid of N cells, count all of them in one cell and then apply to the entire area? Seems they would be many clusters so the number would be very unreliable.