During the last couple of years working on Rust programs I collected a number of GDB scripts. Eventually, they evolved into the project. Also, I wrote an article about how I came up with each of the scripts https://alexmarkov.xyz/blog/rustToolsGdb.html
That's a good introduction. There is a video which I'd say complements the article. It's called "Getting pixels on screen on Linux: introduction to Kernel Mode Setting" [1]
Recently Khal [1] released JSON interface. In short, Khal is a Linux CLI calendar application. I'm working on a proof-of-concept GUI[2] for the interface. I expect to implement typical views for a calendar application: daily, weekly, monthly.
The conclusion of the article says that it's not the language problem either. Under the title "So, is Go the problem?" Or do you mean something else here?
Given that the title implies the opposite, I think it's a fair criticism. Pointing out clickbait might be tedious, but not more so than clickbait itself.
Yeah, that's a pity that D didn't gain the popularity. It brought some features which were borrowed to mainstream languages. However, the features didn't help D to become popular. I have a hunch that templates from D were the inspiration for the comptime in Zig. Also, Reading D is almost easy as reading Zig. I remember I couldn't get my head around async/await from Python 3.5. I knew it was based on generators. However, the stack switch was absolutely mysterious to me. I understood it only from the implementation of fibers from the D's standard library.
Hello everyone, I started programming because I wanted to make games. However, I got a chance to bring the food to the table making on web sites. A few months ago I came across a list of challenges for a programmer. One of challenges was creating a clone of Space Invaders. I created a clone of the game and wrote the article. In the article I wrote about the challenges related to gamedev which I faced. With gamedev background I wouldn't have them, I guess. However, for me as for a backend programmer, they were something. I hope the article is good enough to inspire other programmers like me to complete their first games.
Hello, I've been playing with Zig the last couple of months. The navigation between document symbols in Neovim is a bit complicated the document has symbols with the same name. I improved it adding the path to every symbol. For example you have two structures:
You get the following items in the navigation list:
App::init
Connection::init
Essentially, it's a configuration of Telescope and Nvim-Treesitter. You can take the file from here https://laladrik.xyz/zig_document_symbols.lua. However, if you curious about the process of creating a custom Telescope menu and inspection of the source code with Tree-sitter, checkout the entire article.
Also, while I working on it, I found that LuaJIT 2.1 compares strings as fast as integers. Eventually, I did a little research about it and published the results here https://laladrik.xyz/blog/luaStringComparison/
> The author isn’t talking about implementing an ECS or b-tree here.
Do you mean that b-tree might work here better?
> They’re just populating an array from a file when the program launches, then freeing the whole thing when the program terminates. It’s really not rocket science.
That's exactly why I consider indices.
> since they assumed memory allocated by vec would be pinned (it isn’t)
Could you tell me, please, where you read in the article that I assume it? I wrote in the article "I realized that the problem is related to the fact that vectors of children move in the memory if they don't have enough space to extend." and even made an animation for clarity https://laladrik.xyz/VectorMove.webm. However, if you see the assumption in the article, please, let me know. I correct it or elaborate.
Yes, in your article you consider indexes then ultimately decide not to use them in favor of Vec<Box<T>> & pointers. I recommend that you use indexes instead. I think they’re the better choice.
> Could you tell me, please, where you read in the article that I assume it?
You assume it in your first attempt at solving this problem. You describe that attempt in detail. That’s what I’m referring to.
The code you ended up with is still dangerous code, because your boxes are still not guaranteed to remain pinned in memory.
A clear. I hid it in my mind. I haven't tried the approach with indices, because... well, I was lazy to do it. However, I agree that this approach would be better, then the current one.
> You describe that attempt in detail.
I appreciate if you put a quote, because I fail to find the description of the attempt in detail. In fact, instead of assuming that a vector is pinned I wrote this "I realized that the problem is related to the fact that vectors of children move in the memory if they don't have enough space to extend."
> The code you ended up with is still dangerous code, because your boxes are still not guaranteed to remain pinned in memory.
You are right, boxes are not pinned, but the data, which the point to, is pinned, isn't it? My pointers point to that part of memory.
I love pprof. I used it so many times to profile my Go applications. However, as you wrote, the visualization is in a browser, which I found incapable to render the flamegraphs I had to work with.
I said "fast and native" because none of browsers made it impossible to inspect the flamegraph.
> In this case it is though, so I don't see why it would be a problem for it to be web based.
Would you like to say that your browser is able to render the flamegraph https://laladrik.xyz/img/pic.svg and inspect it? As I wrote in the article (the first paragraph), it takes a couple of seconds to render the graph, and nothing happens when I press on a frame. Could you check it, please? If your browser renders it as fast enough and allows to open a frame, please, let me know how could I improve any of browsers. I would really appreciate it.
reply