I’m the administrator of kbin.life, a general purpose/tech orientated kbin instance.

  • 0 Posts
  • 158 Comments
Joined 2 years ago
cake
Cake day: June 29th, 2023

help-circle
  • With IPv6 for most use cases there’s actually more security. With privacy extensions (pretty sure it’s enabled on windows by default), when you make connections from your device, it uses a “private” IP. That is a randomly chosen address inside your network’s prefix, that changes regularly.

    These addresses don’t accept incoming connections. You have a main address that doesn’t really change that you accept connections on. Firewall that for ports you want to allow and then hackers need to port scan 2^64 or 2^80 address space to find your real IPs in your prefix. If they capture your IP from a connection to a web server etc, they won’t have luck scanning you.

    Again as per my post above, the biggest risk right now is bad default configurations on many home routers.











  • I do use postgres but only as an rdb provider. I thought while it supports json data as a type, does it provide for all of the other advantages of nosql databases for their use case?

    Ultimately I feel like the best solution is to have a single database provider that could do both fully. I’m not sure it’s really there yet. But halpt to be told I’m wrong. I’ve not really needed that myself for my projects.


  • I never understood why people compare nosql to rdbms. They are entirely different systems with different use cases.

    Where you neee data consistency and need to always get the same results to a query go with a structured rdbms. Where you need speed over all of that (and there are real use cases for this) then nosql is for you. Using both is of course a likely result too.

    There’s of course a lot of other considerations. But they’re different tools for different situations.




  • Here you go

    #include <iostream>
    #include <csignal>
    #include <unistd.h>
    
    void sigusr1_handler(int signal)
    {
    	std::cout << "Signal USR1" << std::endl;
    }
    
    int main()
    {
    	std::cout << "Installed handler for USR1" << std::endl;
    	std::signal(SIGUSR1, sigusr1_handler);
    	while (1 == 1)
    	{
    		usleep(5000000);	// 5 seconds
    		std::cout << "Waiting for signal" << std::endl;
    	}
    }
    

    That will help you read at least one of them.




  • It is a nicer way I think. But other languages do allow for good exception handling. It’s just there’s not a clear cut sign that no-one has handled the exception yet. So often it doesn’t get handled.

    What I mean by that is. If I have a function that returns say a string. As a caller, you don’t know whether that function is always going to return a string (it handled exceptions internally), or if it returns a string but might return an exception. So you need to try/catch (or whatever is the equivalent in that language). It’s not clear to the caller.

    Whereas with rust, if you’re holding a value wrapped in a result, it means that any exception hasn’t been handled yet. If you’re not passing the value (still inside the result) back to a caller, tag you’re it! :P


  • OK, the cynic in me thinks that isn’t a vibe coder typing that, but someone in middle/upper management. They’ve recently fired most of their engineering teams and replaced them with (probably externally contracted at a considerably lower rate) vibe coders.

    They’re recognizing some of the problems that were highlighted when this trend started to gain traction and are now thinking of a way where they don’t need to accept being wrong in their actions, but also somehow still profit from it by only using real engineers (probably also on external contracts with shitty conditions) when it’s absolutely required.

    Maybe I’m wrong.