Spyke

Posts

programming·ProgrammingbyZero1534

does anyone have exercises to learn how to program?

hi, I'm trying to learn to program on C and C++. My goal is to get to do applications for a phone with symbian that I have to make it more useful. I already have an idea what I want to do. Mainly make a browser for smolnet protocols (nex, gopher, Spartan, finger, etc.) and more in the future make some social network customers open code. The easiest I think it would be to make a mastodon client, especially because mastodon already works on my nokia with symbian, thanks to brutaldon (although I feel that it lacks functionalities that I would like to have, like to see what is inside the instance and see at the level of fedverse). and perhaps others like "lemmy," "social gnu," "friendica," and already finally and my "Magnus opus" would definitely be, a client of "invidious".

of course all this is far beyond my current possibilities. But that's why I want to step up. For the moment I base it on the syntax on c and c++ and I already understand the operators, and also the comparisons and the Boolean operations. I also partially understand the pointers... but I really don't know what kind of use they have. so that the applications you create, you can test them in my system with linux, I need to program everything in c, and use c++ but only in a basic way the latter, as symbian only supports old versions of c++ posix, (it's true that if I install qt supports more modern versions and it would be much easier to do anything. But I have been recommended not to use it) I have also been a little interested in zig and nim, as they compile C and theoretically should be languages that could work perfectly, but on the other hand, also increase the number of languages to learn may not be the best idea at the moment.

for the subject of graphics, I think the best option is to use sdl, there is a port of sdl 1.2, the problem is that in my language there are practically no sdl 1.2 tutorials, and in English I have found little. This is the best thing I could find "https://lazyfoo.net/SDL_tutorials/" is not that this evil (in fact I have not yet tried it) but well, I would also like to know, that so much changes the syntax against sdl 2, I just want to do simple things, buttons, menus, text boxes and already, I ask this to see if I can make the work easier and just see tutorials in my language and not eat so much my head asking anyone to translate me all by one.

i initially thought about using sdl interface library to make life easier. But I quickly realized the problem that most of these library are designed for the use of mice, something that in my nokia n95 because of course there is no... microui was the library that had convinced me most, plus that it not only depends on sdl, it can also use opengl, and a friend explained to me that maybe and even could serve with the native interface library of symbian. I'm sure he'll save it for future projects. But for things like his little documentation and it's not even spoken in my language, and I thought of everything, less intuitive. Because it makes me leave it at least for the moment, I also saw others like raygui, but that would be my turn to make a bridge, and while I can do this with vibeconding and so... well, the truth is I'd like to be able to understand my own code... I don't rule it out completely... But having to adapt so many things, the truth is I think it's more cost-effective just to use pure sdl and stop making life difficult.

There is also the option to use an old version of opengl en. But I think that's a little bit of killing fly-to-gun, total, I just need a 2d, minimalist interface and little more... I don't know if there are any other library that allow me to do graphic interfaces, and that being written in pure C can be carried automatically, without modifications, I understand that there may be a remote possibility that lvgl will work, but... I don't think it's worth it.

So, well... this is all to ask for recommendations and programming exercises on c, c++ and sdl.

View original on lemmy.world
decentralization·DecentralizationbyZero1534

Is a modular, decentralized and usable "smallnet" possible in old hardware?

Hi. I've been researching alternative Internet protocols and decentralized systems for a while, and I'd like to ask for guidance because I feel like I'm mixing a number of ideas and I still don't see a really viable architecture.

I'm interested in simple protocols like Gemini, Spartan, Gopher and especially Nex for their simplicity. I have also looked at other things like IPFS, Freenet, torrent, Reticulum and Yggdrasil. Nostr leaves me rather sceptical: I have read things about him, but his ecosystem seems to me to be very linked to the critical world and, in general, I do not see him as minimalist as I expected. Secure Scuttlebutt and Earthstar also draw my attention, but I honestly don't understand how they work or whether they could serve what I'm looking for.

What I'm trying to imagine is a modular, decentralized and censorship-resistant network, but it can also work on limited and old hardware, such as:

Nokia with Symbian,

devices with KaiOS,

Old PCs with Windows XP or light Linux,

and even, in some cases, consoles that can run Linux, such as Wii or PS2.

The idea is not to make a "perfect" system, but something realistic, useful and quite autonomous for people who do not have access to a modern or powerful machine.

What I'm trying to figure out

Transport layer

What interests me most is that the data can move over the Internet, but I would also like the system to be compatible with something like Reticulum, because the more options you have the better. I've also heard a lot about Yggdrasil, but I don't just see clearly what role I could play in this case.

  1. Content distribution layer

The most meaningful option here is torrent, but I have several problems with it.

When there are few seeders, the content becomes fragile and can easily disappear. In addition, publishing in a really anonymous way is complicated, because you usually end up exposing your IP if you want to share something directly.

Hypercore also interests me, especially for the idea of being able to add new content without deleting the above, something like a feed or a history only of additions. The problem is that he's very close to Node.js and Rust, and for what I have in mind that doesn't help me too much. IPFS seems slow and heavy to me, and Freenet doesn't even talk. My idea is about situations where there is no access to another more powerful machine, so depending on a proxy or an intermediate node is not what I'm looking for. I would like these limited devices to be as autonomous and independent as possible.

  1. Cryptography and anonymity layer

If you can, I'd like to include anonymity in some safe way. Not necessarily for everyone or for all uses, but it is a real option for those who publish content.

  1. Interface layer

The part visible to the end user I would like it to be very simple: a light browser type Nex, Gopher or Gemini that only download, decipher if necessary, cache and render text.

If there is multimedia, I would like it to be optional and separate, so that the system remains usable on very limited machines.

What worries me

Here are my main doubts:

How can a decentralized network be combined with extremely limited customers without forcing them to use proxies or intermediate machines?

What real options are there for the author to publish content anonymously without losing compatibility with old customers?

Can you design a system where the same content is accessible in various ways: anonymous, pseudonym and public?

What alternative to torrent would make sense if I wanted updates and not just fully static content?

Can Reticulum and Yggdrasil serve as transport, discovery or bridge between nodes, or do they not fit this goal?

Would Hypercore be better than torrent for updated content, or is it too heavy for this case?

What part of the problem is solved with hashes, signatures, DHT, webseeds, myrors or mutable pointers, and what part is not?

My background idea

The philosophy I have in mind is something like: if a team still works, it should still be able to access information and leisure without being forced to buy new hardware. I'm interested in a kind of modular and minimalist internet, designed to ensure that an old device is not excluded because of the ecosystem.

I'm not looking for something ideal in abstract, but an architecture that can really exist. If there are similar, experimental or partially useful projects, I would also like to know them.

Thank you in advance to anyone who can guide you on this.

View original on lemmy.world

You reached the end