Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by DevBlox

  1. DevBlox

    Something cool to make

    @fpo intel_gpu_tools is using libdrm + ioctl calls to interface with the card and get those numbers. The headers and lib are available on every Linux system, all the drivers are underneath it. It supports whatever drivers Linux supports (not only the trifecta of AMD, Intel, Nvidia, but mobile chips, like VC4 on RPi etc). Wikipedia info about DRM here (a quite good overview). Needless to say, it looks a like a perfect point to hook in to, I was a bit concerned about handling all the different stuff out there, look like DRM already handles it, it's just a matter of getting things out of it
  2. DevBlox

    Something cool to make

    Getting those numbers shouldn't be as hard as actually making a renderer at all IMO. Tomorrow I'll poke around the open source intel_gpu_tools that I'm using right now (I have a peasantly laptop with just that iGPU for now), it's hard to judge how at first glance on the difficulty, since there are a lot of different tools there that seem to use common code. But it might be a good place to start, with just that, then work up after. It would take some elbow grease for sure. I'd be pretty keen to contribute at least a bit to this myself, as I'm working on a Vulkan renderer now for basic game engine (learning purposes mostly, maybe light gamedev whenever/if the features are there). I'm a few features away from being able to give it "the business" (load a bunch of models and make it burn as much as possible). That point on I'll try to work on optimization (Vulkan is very flexible in that regard) and I'm pretty keen on having a tool to look at it all. Also, next year I'll build an AMD rig (also will be a Linux system), for gaming/development at home, and I'm completely unsure about the state of tools etc on AMD's side (I know they exist, but not how good they are).
  3. DevBlox

    Something cool to make

    It doesn't work in Linux. Should have clarified that, pardon.
  4. DevBlox

    Something cool to make

    Cross-manufacturer GPU monitoring tool. That's what I''m missing now. Tired of using different tools for different GPU's . Something like a resource monitor on Linux, somewhat user friendly. You already have a user over here. Edit to clarify: For Linux, or cross-plaftorm entirely (though it could be a challenge here).
  5. DevBlox

    Programming desktop tools and stuff

    Not hard at all. You open files, read them, decrypt/unmarshal/deserielize as needed, and you can use the data in your program. You do whatever operations you need, and serialize/encrypt/marshal it and write back to a file. Games use archives usually, that you can read and extract data from, just like game engines do. Rarely anyone bothers coming up with their formats anyway, sometimes you can just open them with an archive program outright and take what you want. Front end is just another API, like Windows Forms for example. You put it all together and you have a tool. If you have some sort of specific archive, that developers rolled on their own, you figure out how it's put together, write a decoder, and just use it in your tool. You move and copy files around the same way as you do in the terminal, except that you use API/syscall counterparts.
  6. DevBlox

    is it worse to make your own encryption system

    If you're planning to use whatever you write on something other people will use, you're shooting yourself in the foot outright. Learn to write those things all you want, may be good practice. Invest time only where you actually want to learn something. I have an impression you just one to make this work properly and get on with it. If you want your thing to be secure: learn about it, and just make it (TLS) work.
  7. DevBlox

    mac or windows for coding

    You're going to make the game from scratch?
  8. DevBlox

    Server Programming?

    What do you want to accomplish? If it's just to get an application to send/retrieve structured data to/from a server, probably the easiest thing would be just to make an HTTP server and use the JSON protocol to pass data around, that's how a good chunk (dare-say majority) of API servers in the world operate. You can accomplish and learn a lot with just that. If you want to just "start somewhere", that is a good place to start.
  9. DevBlox

    Finding the compiler for an .exe

    If you're looking at a .NET executable, you might be able to decompile into C# or VB, from what I remember those often are readable when decompiled, since they decompile from CLR's intermediate language, not pure machine code. Otherwise if it was MinGW, or similar, unless the developers accidentally left debugging symbols in there, you're out of luck... You're going to be stuck reading assembly, you won't reproduce C or C++ (again, unless it's compiled to CLR IR). You can use Dependency Walker to verify what library dependencies are there (I'm guessing you will see clear .NET Framework dependencies if it's a .NET executable). Then the only tool I know of for .NET is Jetbrains DotPeek, not sure if there's a free version, but I used it a lot in my C# coding days. If you're out of luck you can try AIDA64, but that still won't reproduce code.
  10. DevBlox

    Programming Language(s)

    Having mastery in a language != knowing (being able to code) a language. I know a lot of languages, but now there are maybe 3 or 4 that I use regularly, and there's just 1 I could claim to have mastery in, and even that's debatable, since I'm no longer a developer by title or occupation, I don't code as much as I used to. Some habits are just lost to time.
  11. DevBlox

    Code readability vs length

    I definitely prefer readable over short. You end up reading it faster than trying to decipher something. Also, nasty stuff can hide in the complexity, which you will not notice one day or another and bork something (legacy code like that with no unit tests is a "blessing"). Short and readable is ideal (and often possible), but otherwise, definitely readable. I second @trag1c, if you do something disposable/one-off it does not matter one bit if it's beautifully crafted.
  12. Set up a secure VPN that allows you to see the internal network. Then mount drive as usual. Do not expose such a system directly over the internet.
  13. DevBlox

    Professional Advice for Mid Level Developer

    Your manager isn't completely off with his answer, but I think he did evade the question a bit. These things are often just titles, I know some companies where Senior Developers completely lack the skill to be called Seniors, and some Mids that are very skilled, and deserve the title. I think that nobody really knows for sure, everyone has their own definition and you just go by feel. Then again, I'm nor a Recruiter nor a Manager. My own personal categorization/feel of this is: Juniors need guidance to carry out their tasks and learn Mids are perfectly capable to deliver on their own, able to grow on their own Seniors are what they should be - "wise men", knowing pros and cons of different approaches, should guide the team on a path of technical excellence, in both paths of process and implementation. It's all experience and knowledge. What I'm basically trying to say, there is no event or thing, after which *kablamo!* you're a Senior Developer. You just gradually get there.
  14. DevBlox

    Python or NodeJS: Which is more scalable?

    Yes, in fact, that is one of them. If it's the same everywhere, you don't have to adapt for every project, you can use the power of habit freely, and without annoyances. It's an awesome achievement even that every Go project under the sun is in the same style. And no need for a separate lint if it's already built in, no searching for configurations, or configuring. That's one of the reasons why C# people use ReSharper, if enforces a standard, that everyone follows, all people involved have an easier time, every team I worked in benefited from that greatly. You just get in the project and Go (heh).
  15. DevBlox

    Python or NodeJS: Which is more scalable?

    Yeah, it's tricky business. If I try to use intuition and just write code I always end up with callback hell. I take that much more time to sort that out. I'm a bit conflicted if that's good or bad, promises force you to have a certain structure (which is generally good, you get a predictable structure), but what I end up with is way over-engineered for a given task IMO. Maybe I just need more practice, dunno. I think of Go as the holy grail of what a modern language for scalable systems should be, a little bit returning to the roots of C, which I enjoy a lot, and a lot of modern features that make Go projects really maintainable.
  16. DevBlox

    In Dire need of some Input.

    As per maths, IMO discrete mathematics (logic), is the most important in general, as it is the basis of all programming. Linear algebra is fairly common, as mentioned, others not so much, but are present. It all depends what you work on - one day it might be complex algorithms, other days can be just plugging data to go from point A to point B (and it's the more common of the two). Editory addition: Uni taught me technological fundamentals (assembly, how processors work etc, I struggled with it on my own in my teens), loved that subject, it was super hard to pass (I even failed once), but it's the most awesome thing ever to understand it, I feel it's useful when programming. Then there was some important to understand (at least) maths. I made awesome friends at uni. I've not finished it (maybe someday), but working on the thesis would have been very fun to me. Thinking up an interesting subject and running wild with it - sign me up. Too bad a lot of stuff in uni is just crap you have to endure, your mileage may vary though. Oh, most important - made some great friends. Uni also tried to teach me a lot of things which are just disappointing. Some examples include: UML (I really see no reason to learn spec-accurate UML), bad project management, applying solutions to non-existing problems (example: you have N amount of OOP principles/features to shove into a basic pogram), half-assing those solutions (my problem mostly, I worked as a developer full time all the time, they took back seat, since maths is harder), and a bunch of other unrelated crap that I had to learn (mandatory random subjects). The etc crap is mostly what made me not finish. I was supposed to attend shitty subjects, while I'm happily at work, nah not happening.
  17. DevBlox

    Python or NodeJS: Which is more scalable?

    NodeJS is better by a wide margin, it's not the holy grail of scalability (far from it), but is by itself a lot more pleasant to work with.
  18. DevBlox

    Packing an Electron app for Linux, Mac, and Windows

    Ah. Too bad I can't show you examples (company code). You basically install all the dependencies with npm install and run electron-builder to also install dependencies. Then you can use it to cross-compile binaries to other platforms even. Works like a charm. You get a single executable and that's it! electron-builder: https://github.com/electron-userland/electron-builder EDIT: There's a config you need to cretate for your application, read the docs basically.
  19. DevBlox

    Best Language to make Android apps

    I'm not familiar with React-Native, but React is great on it's own, might be worth a try, but if I were to choose between Java and Kotlin, I'd go Kotlin. It's not that different from Java (it runs on the JVM, so it has familiar inner workings), but it is way nicer and cleaner from what I've tried.
  20. You can also find the systemd service definition of plex and set to run after a certain system target state, if it's incorrect. Just pick a state that comes after all the drives are mounted (and everything's in fstab, so you should not need to do it automatically). You can find the file with systemd status plexmediaserver it will just be there with .service extension. And of course you need to enable the service as mentioned, then it will run itself after booting. Only reason I can think of drives not mounting on the Raspberry Pi, is because it might be a bit finicky with device detection. If it detects the drive after the OS is trying to mount it, that could be an issue. I'm sure you could find that info in logs though.
  21. DevBlox

    Laptop for coding

    As much RAM as you can reasonably get + SSD. That's it, that's all you need, everything else (good keyboard, screen) is just comfort. It's up to you to see if it's worth upgrading vs buying a new PC. You could still code on a CPU from 5-8 years ago and be fine with it. You're not breaking technological grounds by coding in general, you don't need a beastly computer. I personally code on a ThinkPad T460, i5-6300U, 8 GB RAM, SSD, iGPU only. If it does not break, I will still use it in 5 years. The only desire for me is to get more RAM, so I wouldn't need to close my browser to start a couple of bigger VMs, drooling over the 2x16GB, will get to buying it soon.
  22. You'd best get away with retro-fitting an archive format to do this. I'm not sure about speciality file types for games, I'd avoid making one unless I really need to, and the only reason I'd want to is making the files memory map friendly, in a form that could help to load parts of it directly into memory, so that I could load resources into the game on-demand almost instantaneously (John Carmack would approve).
  23. You don't allocate combined_parts, you only declare a pointer which points to whatever. Dangerous code, you should be getting an access violation error (not sure how's it running even). You should decide whether you want concatinate to allocate memory or not (does not really matter if you're just trying things out). Then allocate a chunk of memory (malloc) long enough to fit both strings, other than that, at a glance, you should be fine. In C you don't really "return a string", you return a pointer to the start of the string, which is what char * essentially is, same when passing a string to function. When you allocate with malloc, you allocate on the heap, the memory will be immune to scope change. Just don't forget to free it afterwards
  24. DevBlox

    Special letters in c

    As others have said, it's a character encoding thing. It's not an out of the box thing with C, and you have to be mindful about it and learn how to deal with encodings. This is just how it is really, C is quite a low level programming language in today's standards, a lot of things are done manually. Read about encodings, starting with ASCII, and understand how they're represented. You'll have a better idea of what's going on and why you get question marks. That string of characters contains UTF characters, but in C it's still represented as a bunch of bytes that the terminal cannot understand because it's not set to do that. That is what setlocale does.
  25. DevBlox

    best way to get os keys

    OEM in most laptops at least put security chips that contain the key. Windows should pick that up automatically. like it happened to @Slayer3032 . This practice was picked up after the windows stickers were phased out.