• 2 posts
  • 47 comments
Joined 3 years ago
Cake day: June 8th, 2023
  • No?

    I mean, how else are you meant to play the game actually?

    I guess you could be like opening ports just to particular IPs. And you need a game that isn’t Swiss cheese that gets immediately hacked.

    But like hackers don’t sort of seep in through port forwards; they need to physically identify and exploit a particular vulnerability.

  • In terms of the transport, sure.

    But if you put the password in a URL, the user’s browser is going to turn around and store that plaintext password in its history, then sync it to the user’s other devices, and then pop it up on their screen in the address bar autocomplete, perhaps when the user is screen sharing or streaming to hundreds of people. The browser does not expect a password to be stored there and will mishandle it.

  • I think NeHe might still have tutorials on this, in C/C++. You probably want to be using OpenGL for acceleration and maybe the old fashioned immediate mode/fixed function stuff where you call functions like “We are drawing triangles now” and “here is a vertex” and “that vertex is blue”, and you can put off taking over the pipeline with your own shader code until later.

    You still might be letting the library/gpu do most of “the maths” because I think you mostly hand it transformation matrices and points and it sends them to screen space. If you take over the vertex shader then your shader code does that.

    You want to write a vector and matrix math library with 3-vectors and 4-vectors and 3x3 and 4x4 matrices, and add and multiply operations, and matrix inversion. The 4th dimension lets you make translation in 3D a linear multiply operation because you keep 1 in there and your matrix to represent a translation mixes that 1 into the other position coordinates to translate.

    You also probably want to learn linear algebra enough for that to make sense.

    And then on top of that you want to build a scene graph library where objects have parents they move with. And then your renderer loop will walk the scene graph node tree and push each object’s transformation matrix and draw it and do its children and then pop the transformation matrix off again.

  • If you need X months to build this product out so you can sell it, and after that Y months to become profitable so you can support yourself, you need to work out what your expenses are going to be for those months in total, and collect that much money. If nobody is going to invest it in your project (and if they did, I wouldn’t recommend taking it, because professional investors are the natural foe of the entrepreneur), you need to come up with that money yourself, which means you need to save it. Basically, you need to plan to retire for a few months.

    You need to look at the money you make and your expenses again, and you need the difference to be enough so that you can save up for the project in a reasonable amount of time.

    If that math doesn’t work, you need to change those numbers: the expenses need to be lower, or the amount you get paid needs to be higher. If you’re a programmer with a lot of experience, you should be being paid noticeably more than twice what a human needs to survive, so saving up for N months of eating pasta in a studio apartment in the middle of nowhere doing your project should only take 2*N. months of eating pasta in a studio apartment in the middle of nowhere doing your job. If you’re not making that much, your current job is underpaying you, so try unionizing, demanding a raise, or finding a new job to work at a bit before starting your project full-time.

    You can also look at options like grants (which are usually available for open-source work, but which might be able to help you end up with some sort of FOSS-based consulting outfit or open-core ecosystem), or going to grad school and turning your project into a research/thesis project done in collaboration with an advisor, or convincing your employer to let you work part-time so you can put in more hours on your project without needing to plan to have zero income.

    But, as other commenters have noted, building out the MVP is not really determinative of whether your business plan will actually work. So whatever you do, you will want to make sure you don’t have no plan for if the sales don’t start rolling in at month X+Y as you’d hoped, and you want to make sure you give enough attention to the business development and sales work that is probably actually most of the problem.

  • But you can, in fact, be too careful. Availability is one arm of the security triad.

    If whatever complex configuration you have set up to avoid exposing something to the Internet is incompatible with something and what you wanted to do can’t be done, or if you look and see that setting all that up would be too hard and don’t bother to expose the service at all, then your security posture is incorrect because your service is just as unavailable as if someone else broke it.

  • I mean if you put up an Internet-facing unauthenticated file acceptor it will quickly become stuffed with all sorts of garbage and aspiring malware. You definitely don’t want to hook that up to an untar and exec loop, even with some notion of sandboxing. It will just start mining Bitcoins or sending spam or something.

    But if it is built properly, with only authorized users being able to upload stuff, and a basic understanding of not dropping stuff where the web server will happily execute every PHP web shell someone sticks in the slot, and the leverage to threaten people into not uploading pictures of their own or others’ butts or Iron Man (2009), I don’t see why all but the file-uploading professionals should immediately give up.

  • You could definitely build something like this. You definitely want either human review before execution or a fair amount of sandboxing for whatever your students submit.

    Do you want students trying to brute force or exfiltrate whatever test data lives in the server? If not, either they should just have the test cases already, or they can get back how many/which of the secret test cases they passed along with their grade, so showing them the results live might not be so important. Unless you want something like “you have 3 tries to pass the secret tests so you can get a hint that your own tests missed a case and go back and try to guess what it was”.

    You also might want to invest time first in test harnesses for the students to run themselves, because you want them to learn good practices like coding against a test suite. If nothing else it makes it easier to make the auto-grader later if the students’ code is all already hooked up to the same test framework.

    Teaching students how to use fully use a multi-user Unix system can for some topics put unnecessary faffing about between the students and what they are trying to learn (are you teaching front-end web dev or something?), but in a lot of cases your students might actually be better served by something that makes them touch the deep magic than by a slick web UI that handles everything for them, as long as you turn it into a learning experience and not a protracted period of bafflement.

    Does your school not already have some kind of shared CD department server/Unix environment for the students that could get you out of account management?

    Also, the Right Way to get the code to the server is probably going to be Git and not a tarball. The students could/should be set up with a Git forge and indoctrinated in never leaving their code on their laptop to be sat upon and lost.

  • It sounds like nobody actually understood what you want.

    You have a non-ZFS boot drive, and a big ZFS pool, and you want to save an image of the boot drive to the pool, as a backup for the boot drive.

    I guess you don’t want to image the drive while booted off it, because that could produce an image that isn’t fully self-consistent. So then the problem is getting at the pool from something other than the system you have.

    I think what you need to do is find something else you can boot that supports ZFS. I think the Ubuntu live images will do it. If not, you can try something like re-installing the setup you have, but onto a USB drive.

    Then you have to boot to that and zfs import your pool. ZFS is pretty smart so it should just auto-detect the pool structure and where it wants to be mounted, and you can mount it. Don’t do a ZFS feature upgrade on the pool though, or the other system might not understand it. It’s also possible your live kernel might not have a new enough ZFS to understand the features your pool uses, and you might need to find a newer one.

    Then once the pool is mounted you should be able to dd your boot drive block device to a file on the pool.

    If you can’t get this to work, you can try using a non-ZFS-speaking live Linux and dding your image to somewhere on the network big enough to hold it, which you may or may not have, and then booting the system and copying back from there to the pool.

  • I think you can keep doing the SMB shares and use an overlay filesystem on top of those to basically stack them on top of each other, so that server1/dir1/file1.txt and server2/dir1/file2.txt and server3/dir1/file3.txt all show up in the same folder. I’m not sure how happy that is when one of the servers just isn’t there though.

    Other than that you probably need some kind of fancy FUSE application to fake a filesystem that works the way you want. Maybe some kind of FUES-over-Git-Annex system exists that could do it already?

    I wouldn’t really recommend IPFS for this. It’s tough to get it to actually fetch the blocks promptly for files unless you manually convince it to connect to the machine that has them. It doesn’t really solve the shared-drive problem as far as I know (you’d have like several IPNS paths to juggle for the different libraries, and you’d have to have a way to update them when new files were added). Also it won’t do any encryption or privacy: anyone who has seen the same file that you have, and has the IPFS hash of it, will be able to convince you to distribute the file to them (whether you have a license to do so or not).