• 0 Posts
  • 53 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle
  • abhibeckert@lemmy.worldtoMemes@lemmy.mlChat Apps
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    7 months ago

    what’s wrong with just texting

    If you have friends in another country, it might cost a quarter every time you send a message.

    In regions of the world (e.g. Europe, and a lot of Asia) where some countries are the size of a large city (or perhaps the entire country is one city), that’s a problem. You’d be sending international texts all day every day.


  • Also not a lawyer but maybe more familiar with IP law than you are?

    When an AI scrapes the post you just wrote… how exactly were you, the author of the post, harmed by that action? You weren’t harmed which is a powerful fair use defence. It’s not enough on it’s own, but it’s a huge step in that direction and other factors such as transforming the original add to that making a compelling case.

    Consider the most recent fair use case, which was Google had negotiations to pay license fees for Java, then refused to pay — instead Google created a copy of Java. It dragged on in court a long time and bounced back and forth on apeal, but in the end the ruling came down to “java is protected by copyright, but Sun was not sufficiently harmed, therefore it was fair use”. Or at least that’s where it was headed when Oracle (who bought Sun years after the infringement happened) decided to stop burning mountains of cash fighting a lawsuit that wasn’t likely to end well for them.

    I was somewhat surprised by that case - I felt the fact that Google had talks about paying, then decided not to pay, was pretty clear harm. But the judge didn’t see that as real harm - Java’s source code is not ‘free as in freedom’ but it is ‘free as in dollars’ to download and therefore not really properly protected by copyright. The fact the license added restrictions to what you can do with the copy you were given for free didn’t hold up in court (which has pretty widespread ramifications for GPL… I wonder who will be brave enough to test that in court… the FSF isn’t going to back down from a lawsuit like Oracle did).

    Anyway, if Java is borderline, I think the fediverse is clear cut. Almost any copy of the fediverse would be fair use. Yes, it’s technically copyrighted content, but there’s a loophole so big it surrounds the entire universe.


  • Calldav sucks and ActivityPub is really good. I would probably implement both - use caldav for compatibility with other software and ActivityPub for your own internal representation of the data.

    But there’s another option, also an industry standard, which is structurally very similar to ActivityPub only it provides more than just a network protocol to transmit data, it also provides a storage method and tools to work with it.

    I am of course talking about git.

    Put all your tasks/etc in a directory, use git to track and sync/backup/share changes. If you want a kan ban board, just have todo/in progress/code review/done directories and move your stuff between them.

    Personally I do my note taking in VSCode with an extension that automatically (and almost instantly) commits changes and pushes them to the cloud/my other devices. Plus a few other extension like Foam which which supports linking documents/etc.


  • The sentence “IN NO EVENT SHALL THE AUTHORS BE LIABLE” doesn’t fly where I live. You don’t get to choose wether or not you’re liable - the law decides who is liable. This thing is about as enforceable as those sovereign citizen license plates and would get the same reaction in a court room.

    Plenty of other commonly used licenses have the same issue unfortunately and and the biggest nightmare (at least in my country) is laws against “misleading” or “deceptive” conduct. Telling someone you’re not liable for anything is blatantly misleading/deceptive.

    Even if your software works perfectly, you are still breaking the law… a victimless crime that would normally fly under the radar or result in a “cut that shit out” order by the court… but it’ll really hurt your case if there is actually a victim (e.g. if your software has a bad security flaw that caused real damage).

    That’s why organisations with big legal teams tend to choose licenses like Apache 2.0. Ones with language like “unless required by applicable law (such as deliberate and grossly negligent acts)”.



  • Pulsar is a fork of Atom, which was discontinued because almost everyone jumped ship to VSCode.

    What does Pulsar do that is better than VSCode? All the features this article highlights are in VSCode too, and I can think of a bunch of features that Pulsar doesn’t have (dev containers are a big one for me - they allow you to have different versions of the same software installed, depending what project you’re working on right now… and you can work on/run both versions of the same software at the same time, on the same hardware… you can also emulate other CPU architectures in a dev container, some of the software I work with every day can’t actually run natively on my hardware).


  • For your use case I recommend working with the web - HTML/CSS for basic interface designs and where those fall short SVG or Canvas or WebGL.

    There are various frameworks but if you’re just starting out I wouldn’t touch those with a ten foot pole. You need to learn how these things work first, without adding complicated third party code to your environment.

    You can write code that runs on the server, or client side in the browser. Most web software is a mix of both. Literally any language works well server side, but client side most people use JavaScript (you don’t have to do that - you can write code in almost any language and compile it to WASM (Web Assembly)… but JavaScript has deep integration with HTML/CSS so it’s probably the best choice.

    I’d start with w3schools.com for the absolute basics.

    Web software doesn’t have to run in a browser. You probably use apps every day that use Electron - which is essentially a way to integrate web applications into your operating system (and also, a way to run web apps without an internet connection).

    It’s really quite simple to get your head around, a web browser sends a text message like this (I’ve simplified it) to a server::

    GET /example/page HTTP/1.1
    Host: example.com
    

    And the server responds with another text message, like this:

    HTTP/1.1 200 OK
    Date: Tue, 20 Feb 2024 12:00:00 GMT
    Server: Apache/2.4.1 (Unix)
    Last-Modified: Sat, 18 Feb 2024 12:00:00 GMT
    Content-Length: 438
    Content-Type: text/html; charset=UTF-8
    Connection: close
    
    <html>
    <head>
      <title>An Example Page</title>
    </head>
    <body>
      <p>Hello, World!</p>
    </body>
    </html>
    

    You can generate that response with software, or you can have it sitting as a file on the disk.

    As someone who’s written GUI software for a couple decades - trust me that simple “text in, text out” approach to writing software is really really good especially when you just want to get something to work and don’t want to spend years refining every little detail. I’m a thousand times more productive writing web software than anything else.


  • Well, no. That’s just plain wrong. There is only a certain amount of demand for software, like for every other product or service. That’s literally economy 101.

    But that demand isn’t going anywhere. A company with good profits is always going to be willing to re-invest a percentage of those profits in better software. A new company starting out is always going to invest whatever amount of risk they can tolerate on brand new software written from scratch.

    That money will not be spent on AI, because AI is practically free. It will always be spent on humans doing work to create software. Maybe the work looks a bit different as in “computer, make that button green” vs button.color = 'green' however it’s still work that needs to be done and honestly it’s not that big of an efficiency gain. It’s certainly not as big as the jump we did decades ago from hole punch programming to typing code on a keyboard. That jump did not result in lay offs, we have far more programmers now than we did then.

    If productivity improves, if anything that will mean more job opportunities. It lowers the barrier to entry allowing new projects that were not financially viable in the past.


  • AI is a tool for coders to use and it will never make coders obsolete. As someone trying to enter the industry, my advice is lean into it and use AI as a learning tool.

    Having said that - it is pretty hard to find a job in the industry right now, due to all the layoffs. Those layoffs are related to covid not AI, so it should be temporary… but in the mean time you’re likely to be competing for jobs with people who have decades of experience.

    I believe there is still a shortage of developers long term, but short term not so much.




  • I’ve been trying unsuccessfully for several days to fix to what must be a simple error.

    That really sucks. Others have already helped out so I won’t go there, but seriously do yourself a favour and start using large language models. I personally pay for ChatGPT Plus, but there are free ones (from other companies, not the free Open AI models) that could have helped you with this problem in minutes instead of days.






  • build a dynamic library with a new instantiation, then dynload it and off we go

    I haven’t played around with the internals of C++ myself, but isn’t that a one way thing? Wouldn’t you need to be able to “unload” a query after you’re done with it?

    Personally I think child processes are the right approach for this. Launch a new process* for each query and it can (if you choose to go that route) dynamically load in compiled code. Exit when you’re done, and the dynamically loaded code is gone. A side benefit of that is memory leaks are contained, since all memory you allocate is about to be removed anyway.

    (*) On most operating systems launching new process is a bit slow, so you likely wouldn’t want to do that when the query is requested. Instead you’d maintain a pool of processes that are running and ready to receive a query. That’s how HTTP servers are often configured to run. The number of processes “pool” is generally limited by how much memory they need. Is it 1MB per process? 2GB?

    Honestly, I wonder if you could just use an actual HTTP server for this? They can handle hundreds or even thousands of simultaneous requests. They can handle requests that complete in a fraction of a millisecond or ones that run for several hours. And they have good tools to catch/deal with code that segfaults, hits an endless loop, attempts to allocate terabytes of swap, etc. HTTP also has wonderful tools to load balance across multiple servers if you do need to scale to massive numbers of requests.

    I would also seriously consider using JavaScript instead of C++. I hate JavaScript… but modern JavaScript JIT compilers are really special… they apply compiler optimisations AT RUNTIME. So a loop will compile to different machine code if it iterates three times vs three million times. The code is literally recompiled on the fly when the JIT compiler detects a tight loop. Same thing with a function that’s called over and over again - it will be inlined if inlining is appropriate.

    As flexible as your system sounds, I suspect runtime optimisations like that would provide real performance advantages. Well optimised C++ code is faster than JavaScript, but you’re probably not always going to generate well optimised code.

    JavaScript would also eliminate entire categories of security vulnerabilities. And any time you’re generating code on the fly, you really need to be careful about those.

    The good news is if you use a HTTP server like I suggested… then you can literally use any language you want, C++, JavaScript, Python, Rust… you can decide on a case by case basis.



  • These days I use ChatGPT 4, with a long running conversation where I explain what I’m trying to do, what tools I’m using, paste in sections of code that I don’t understand, asking how to change the behaviour of that code, give it error messages I’m seeing, etc.

    It feels really close to pair programming with someone sitting next to me who knows the language/framework. The code it writes is often wrong but it’s close enough that I can work reasonably efficiently.

    A couple favourite from earlier todays

    1. I asked “where can I find the code that does X” and it told me to search the project for “Y” to find it.
    2. I asked it how to use a code generation shell script bundled with the framework to do a common task, and when I explained that the answer didn’t seem to line up it said “in that case you can’t use the script. You’ll need to write the code manually, here’s how to do that”

    Both pieces of advice were spot on and saved me hours of googling.