Lurker News

Comments (374) 58 threads

Earlier comments
ivanjermakov2 replies#
Yesterday I was able to compile and run a game I'm making bit-perfect (physics world snapshot is the same) on linux and windows (via wine) cross compiled from the same machine.

I'm happy that it's possible and working, but so confused why this is not something that comes out of the box. A long chain of technical decisions led to the world where a simple game written in C needs to be aware of multiple CPU architectures, OSes, graphics APIs, display servers, sound subsystems to have a chance to work properly on platforms it knows about.
Cross platform support is difficult because platforms made it difficult and have no incentive to befriend.
I hope one day we get posix v2 with performant standard APIs to not worry about platforms in application's code. Perhaps 2035?

FartyMcFarter1 reply#
> A long chain of technical decisions led to the world where a simple game written in C needs to be aware of multiple CPU architectures, OSes, graphics APIs, display servers, sound subsystems to have a chance to work properly on platforms it knows about.

Doesn't SDL solve most of those problems?

ivanjermakov1 reply#
GLFW and wgpu do a lot of heavy lifting for me, but complexity abstracted into a library is not the same as no complexity.
FartyMcFarter#
If an API that works on all of them and makes your code portable (or almost portable) isn't acceptable, I'm not sure what you expected a solution to be in that case.

> "so confused why this is not something that comes out of the box
If you want your code to work on multiple CPUs and OSs, there is no single "box" you can blame. There are multiple "boxes" which naturally don't have completely unified native APIs. Libraries like SDL make the complexity of writing portable projects easier to deal with if you don't want to deal with the native APIs.

skydhash#
> A long chain of technical decisions led to the world where a simple game written in C needs to be aware of multiple CPU architectures, OSes, graphics APIs, display servers, sound subsystems to have a chance to work properly on platforms it knows about.

It’s all about workloads and needs. You can’t put a sedan’s engine into a semitruck even if the basic components are the same. Windows were all about the microcomputer while Unix was designed to run in servers. The abstraction differences can be smoothed over, but it’s hard work and not everyone is keen to do so. And because they’re abstraction and not physical constraint, some would rather invent a new one (OpenGL).
> I hope one day we get posix v2 with performant standard APIs to not worry about platforms in application's code. Perhaps 2035?
A more pragmatic option is to design you app and push platform concerns to the edge. Then you just reimplement the exterior shell while keeping the core logic unchanged.

MatMercer1 reply#
This is a very cool insight, but the "2035 came early" is a stretch, since all web browser engines and web assembly down to your device drivers aren't made in Javascript. If you take the % of what is exactly JS, maybe we arrive at 20%, 30%?
trollbridge#
I'm having a difficult time understanding how this is categorically different han JSLinux (released in 2011, 15 years ago).
forcedtolinux1 reply#
Is there any way you can download files from the filesystem?
logicallee1 reply#
No, there isn't any good way. So I just made a file relay for you, you can use that.

file relay:
https://ezmon-e.com/utilities/file-relay
video of how it works:
https://youtu.be/rQQOzNHQL9A
you should check the hashes of any files you get from a relay like this, I don't think my server is running any malware but it could always get infected in the future, the vulnerability surface these days is enormous.

goodmythical1 reply#
No need for a new relay, really. If you add croc in the VM, it will generate either a link you can download from in any other browser or via croc installed on the machine you wish to download to.

croc will establish a direct udp between two terminal clients or use their relay only if you want to use the web version for either upload/download. And it's e2e encrypted when using the croc servers.
Just tried it with a couple random wikipedia images downloaded via curl to the VM and via croc to my machine. No problems.

logicallee3 replies#
Thank you! I tried it and it works well. Very useful and easy to use, since it's just one line

    croc send [file(s)-or-folder]
screenshot:

https://imgur.com/a/tqibr0D
also works on folders (directories). It's a good project, I donated to its author.

Continue this thread — 3 replies

sva_1 reply#
Got Firefox inside Firefox working... obvious thing to try is run Firefox inside Firefox inside Firefox, but tab crashes.

edit: busted, didn't finish reading.

ligarota#
Yes, this is the last paragraph of the article

Load more comments