Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TylerGlaiel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
TylerGlaiel
1y ago
yeah that, include is a textual replacement, so anything placed before the include is seen by all the code in the include. Not just other preprocessor stuff and pragmas but all of the other function definitions as well. There are some cases
2.
▲
by
TylerGlaiel
1y ago
All that the C++ committee needed to do was just introduce "import" as "this is the same as include except no context can leak into it". Would have been dirt simple to migrate existing codebases over to using it (find
3.
▲
Programming languages should have a tree traversal primitive
(blog.tylerglaiel.com)
12 points
by
TylerGlaiel
1y ago
|
2 comments
4.
▲
by
TylerGlaiel
2y ago
This implementation grows indefinitely if you repeatedly push to the head and remove from the tail, even if the max number of elements in the array is small
5.
▲
by
TylerGlaiel
3y ago
this is my quote https://twitter.com/TylerGlaiel/status/1724907097031414240
6.
▲
by
TylerGlaiel
3y ago
Biggest place for improvement performance-wise I can see from this is that you aren't taking into account cache coherency here. Horizontal blurs with this method are going to be ripping fast, but vertical blurs are going to constantly
7.
▲
by
TylerGlaiel
3y ago
There's nothing wrong with spamming 1000s of raycasts per frame in a 2D game. They should be very cheap, so the performance impact of that should not be something you have to think about, and if some interaction or mechanic is easy to
8.
▲
by
TylerGlaiel
3y ago
I think openAI might be experimenting with smaller context lengths to save on costs or something since I've had a few other things break down like this for me today too (even in GPT-4)
9.
▲
Show HN: Python library to run a “function” over a set of data via ChatGPT
(github.com)
2 points
by
TylerGlaiel
3y ago
|
0 comments
10.
▲
by
TylerGlaiel
3y ago
note that when they went and analyzed that AI they found out it was using the smudges on the google car camera as a sort of fingerprint (as those are consistent for the many pictures taken by one camera) so that AI would almost certainly n
11.
▲
by
TylerGlaiel
3y ago
the last time I tried it (it was years ago) std::regex was taking a measurable number of milliseconds to evaluate which is kind of a very long time even outside of performance critical paths.
12.
▲
by
TylerGlaiel
3y ago
if you actually wanted to you could probably wrap thread to pass the stacktrace of the spawning thread into the worker thread whenever you spawn a thread and then output that upon a crash as well. the library seems pretty simple and flexibl
13.
▲
by
TylerGlaiel
3y ago
oh yeah C++ regex is stupidly inefficient, like "python is faster" inefficient. I tried to use it for text replacements and pretty much immediately abandoned it
14.
▲
Show HN: Using C++23 <stacktrace> to get proper crash logs in C++ programs
(github.com)
103 points
by
TylerGlaiel
3y ago
|
91 comments
15.
▲
by
TylerGlaiel
4y ago
please... just explicitly calculate index() first on its own line if the order matters like this...
16.
▲
by
TylerGlaiel
4y ago
thats also not a correct formulation of the problem, as it needs to minimize the number of fire tiles it passes through. which is where a lot of the complication comes from.
17.
▲
by
TylerGlaiel
4y ago
it had 4 movement as its base, the numbers over its head were a bonus movement status effect (used for testing this stuff)
18.
▲
by
TylerGlaiel
4y ago
I have not tried, but I suspect if I described the algorithm I have instead of the problem that it could translate the algorithm into code pretty well. But I'm also unsure of that, some experiments with GPT 3.5 I did would definite
19.
▲
by
TylerGlaiel
4y ago
chill, I'm the only programmer on the project, and I don't have any problems understanding what the code is doing (only lost track of some of the "why", the process that led me there. which was only relevant here becau
20.
▲
by
TylerGlaiel
4y ago
Interesting, not a single one of these things it asked for clarifications on are things it actually got wrong in its suggested solution
21.
▲
Testing GPT 4's code-writing capabilities with some real world problems
(tylerglaiel.substack.com)
567 points
by
TylerGlaiel
4y ago
|
654 comments
22.
▲
by
TylerGlaiel
4y ago
string view is theoretically going to be faster, but its the type of thing you'd really need to profile in actual context to see to what extent that is true or not. I was mainly just pointing out that (small) strings are actually way f
23.
▲
by
TylerGlaiel
4y ago
sure but this is how pretty much every implementation does it these days, so you should be able to safely rely on that (or just drop in your own version that provides that guarantee if you are really concerned about it)
24.
▲
by
TylerGlaiel
4y ago
> Tokenizing by storing strings in a vector is almost never what you want for high performance code, as it will result in an allocation for each token. not quite, std::string can store <=22 character strings without needing to allocat
25.
▲
by
TylerGlaiel
4y ago
> and to actually have your game designed first (not designing while you code.) tell me you've never made a game without telling me you've never made a game
26.
▲
by
TylerGlaiel
4y ago
flashpoint is not a flash emulator, its a preservation effort that has archived tons of flash content from the web Ruffle is the flash emulator https://ruffle.rs/
27.
▲
by
TylerGlaiel
4y ago
Flash is great and tons of devs still use flash. I also use flash in my custom game engine (the one powering The End is Nigh and the upcoming Mewgenics), a different approach to what the dev in this article did (seeing as these are new game
28.
▲
by
TylerGlaiel
4y ago
I've been making video games for a long time and while it's true they can feel unfinished for a long time, they shouldn't ever feel completely broken/disasterous/failed. One of the key things when making a video gam
29.
▲
by
TylerGlaiel
4y ago
No, the standard is to project against a flat plane, regular rasterization is not suited for rendering to anything else, however in theory you could fake it with a post processing distortion filter With full raytracing it might be possible
30.
▲
by
TylerGlaiel
4y ago
Not a single one of the things he has as a shared pointer needed to be a pointer at all.
More ›