MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 432 forks source link

Should previously magically present programs (such as pastebin/wget) be bundled with OpenOS after all #1856

Closed IgorTimofeev closed 8 years ago

IgorTimofeev commented 8 years ago

Today I've updated the beta2, and was surprised that such a must-have things as pastebin and wget programs was removed from quck access. Of course, I can write my own script for component.internet, but why do I need such artificial complexity? Could you please add them in the OpenOS bin/ folder so that people did not experience difficulties with access to the most basic and most necessary programs?

P.S. Adding devfs and other geek things is good, but removing most needed programs is not.

Vexatos commented 8 years ago

@Inari-Whitebear It would be adding a tape floppy, yes. And with the rewritten install, you'd install those floppies running it and selecting tape or running install tape, however @payonel would implement it (maybe allow for both options?)

Vexatos commented 8 years ago

@fnuecke I am not sure how well that would fit into the challenge of saving RAM... Furthermore, it should merely point the user to the existence of the loot disk instead of connecting to the internet like @Inari-Whitebear suggested. Such a file would have to be hardcoded into OpenOS again though as a computer can't know about nonexistance otherwise, really, no? This would be making it difficult to do the same for tape drives, which means we are back to the original issue once more. Putting it into the component would make it be a magical table pointing at filesystems instead of magical filesystems, which isn't much better.

fnuecke commented 8 years ago

Hmm, where was there mention of downloading it from the internet? I can't seem to find that part. Only the one about telling the user which loot disk to insert.

As for RAM, I'd doubt this would consume much at all. It'd be a relatively small table of string->string mappings that'd be queried from wherever.

Inari-Whitebear commented 8 years ago

@Vexatos I wasn't saying it should connect to the internet. I was saying if someone e.g. inserts an internet card, it could read which drivers that usually uses from the device info and then tell the user to insert the internet lootdisk.

The suggestion about giving it a URL was much earlier about making the internet lootdisk itself bootable. Wasn't meaning to make it that anymore now.

IgorTimofeev commented 8 years ago

@Vexatos So I propose to add pastebin to the standard programs of OpenOS, not OpenComputers. Just for time saving and creating more noob-friendly software environment.

Vexatos commented 8 years ago

@IgorTimofeev Again, if pastebin and wget would be put into OpenOS, why wouldn't refuel, for instance? Or, once more to mention the necessary consistency with possible addons, tape?

payonel commented 8 years ago

@IgorTimofeev all we're trying to say is that "x driver file" doesn't make sense without "x device". If you buy some new wizbang device off the shelf, and you want full wizbang support on your computer, you'll get the disk that came in the box, put it in your computer, and install the wizbang drivers.

In this same analogy we could make the argument to require a similar process for even the internet card.

But one last thing to add to this discussion. The updated install that is very soon to come out is not the final version, just an important step in the right direction. We're still discussing the right experience we want for the users.

adding -- yes wget is very important. I agree. But, an argument in favor of NOT including it in vanilla OpenOS is only that it is a useless file without having the device that supports it. If we build the expectation that a device is not necessarily complete without its drivers...then perhaps it is reasonable to put wget in a lootdisk. This is not me declaring a final verdict on this (i don't even hold that authority). I'm just asking us to consider this perspective.

IgorTimofeev commented 8 years ago

@Vexatos By the way, about refuel - the idea is good. You can simple add one line to install.lua, why not?

if component.isAvailable("robot") then copy(".../refuel.lua", "bin/refuel.lua") end

This is a one of reasons why many of people still using ComputerCraft - it is just more friendly to new users and it's simplier and pleasanter to work with it. Of course, I do not agree with them, but I understand perfectly their point of view. Of course, you, as a programmers, maybe are much more interested to create such "geeky" things, but it is necessary to not forget about regular users.

@payonel I understand this. And If you decide to make an analogy with reality, the majority of modern devices works out of the box immediately when connected to USB - either by pre-installed drivers, or by searching for these drivers on the Internet, either through the built-in firmware. Thus, when you connect a mouse in most cases you do not need to install any additional software, because it is already pre-installed in the OS.

I also want to note that bin/pastebin.lua - this is not the driver, it's a software package, that working via lib/internet.lua library, that works directly with component.internet. This is a very big difference - in fact, internet-card works perfeclty by itself, it has it's own java-driver, it does not require the installation of third-party drivers - but for user-friendly using (wget http://blah-blah) it needs a software package, which will cause its methods to download files from the Internet, etc. And the software package can be pre-installed directly to your OS. This is exactly what I'm trying to convey to you.

Vexatos commented 8 years ago

if component.isAvailable("robot") then copy(".../refuel.lua", "bin/refuel.lua") end

But what about custom Machines addons could create that accept generator upgrades? Imagine someone creating another type of computer that accepts generator upgrades and can run full operating systems. Don't say it's unlikely, it's possible and that's enough of a reason not to do this. It would be hardcoded to OC robots.

the majority of modern devices works out of the box immediately when connected to USB

Indeed. Just like any OC component works as soon as you plug it in... but if you plugged in your printer for the first time and it would automatically install a printer preview or (yet another) scanning tool... Not sure it's something I'd not consider redundant. Same problem existing if it only installed this piece of software if your PC is running Windows, for instance. Same hardcodedness.

but for user-friendly using it needs a software package

There have been talks about putting software recognition hooks for OpenOS into OPPM once, akin to apt-get: The program 'pastebin' is currently not installed. You can install it by typing: oppm install pastebin Putting this software onto OPPM as an alternative (would probably require registering this very repo on OPPM so we don't have to worry about file duplicates). Problem here being that it will always be the very latest version of pastebin for the very latest version of OpenComputers, not sure how much of an issue that would be.

Doing this would be doable as OPPM is built on OpenOS itself anyway, but it would require caching, and OPPM is designed to be as light on space as possible, mpt has already shown how big a package cache can become (could easily fill a tier 1 hard drive). This is the main problem. Furthermore, it would obviously once more require an internet connection to work at all, at least to acquire the cache.

IgorTimofeev commented 8 years ago

But what about custom Machines addons could create that accept generator upgrades?

Well, if I was a developer of the mod, I would add a autorun system, which copies all of the necessary libraries for component when it's connected, if copying is possible. This is a simple and elegant solution. For example, a component may have an EEPROM analogue that containing a small amount of code for maintaining component functionality. That's how I would do it. But since you have decided to get rid of the "magic file systems", then this option does not suit you.

Same problem existing if it only installed this piece of software if your PC is running Windows, for instance. Same hardcodedness

It's not about hardcodeness, it's about usability of results of your coding process. I would note that 4 of my Windows laptops have easily installed drivers for network and wi-fi cards without Internet connection. This is exactly that small amount of pre-installed code that must be present on every computer, because it provides the most common needs of the user.

Of course, user can manually install drivers, customize interface for himself, but wtf, manual internet software installing? As I said, it's just a software, not a drivers. Driver is a component.internet. Also I want to remind about the main age of Minecraft audience. So the creating flexibility of OS by removing few extra kilobytes for libraries and most common utilites is very strange.

There have been talks about putting software recognition hooks for OpenOS into OPPM once, akin to

Good decision, why not. It will be very easy and convenient to use this by mortals. However, in this case you will contradict yourself, creating software that can not work without an Internet card, so it is also a double edged sword. But it's a really literate and logical solution, and it would be very nice to see something like this in OpenOS. Of course, this requires intelligent help-message system that prints not "file not found", but "please install pastebin via typing 'apt-get pastebin'".

Anyway, discussions like this is very useful for creating the perfect software package, as the union of diverse people always leads to the creation of ideal solutions to meet the demand of a maximum percentage of the audience members.

skyem123 commented 8 years ago

It's worth noting that automatically installed drivers in the real world tend to be low quality if it's anything more complex than a USB storage device.

In Linux, there is no support for Windows drivers, and it's worth noting that people here tend to use Linux more often than your average person.

IgorTimofeev commented 8 years ago

@skyem123 Well, people can use anything: Linux, OpenOS, MS-DOS - it is their personal decisions. However, there is a fine line between usability and flexibility of OS, and it is better to observe it using brain and logic, not by personal preferences. And to adjust it to the wishes and requests of other users, especially if they ask for it politely and offers their own solutions.

skyem123 commented 8 years ago

Also, by your logic, OpenOS would require an Internet connection to download drivers automatically. That's how Windows does it. :P

skyem123 commented 8 years ago

Instead of automagic stuff, there should be a documented way to install drivers, with a guide in the install.lua program (maybe a second stage install that happens on the first boot that walks the user through it?)

Also, this should be documented in the manual, as some form of OpenOS user guide. (and people who aren't willing to read manuals probably won't be suited to this mod, as this mod is about programming, which requires reading manuals. :p)

Forecaster commented 8 years ago

I'm for less magic and more installing things and actual computer usage.

IgorTimofeev commented 8 years ago

@skyem123 I'm tired of explaining basic things. Or my English is really such bad or you're just a troll, distorting main part of what I'm saying.

By my logic, it should present basic and most frequently used software in OpenOS, including pastebin, github and, of course, wget programs, and more, more. Or, if you really do not want to allocate a measly kilobytes of disk space, Vexatos offered an very good solution with apt-get analog.

OpenComputers is already not too friendly to beginners, and changing its essence even more in the direction of deep technical knowledge - this is an extremely unwise move for developers. By the way, this is a one of reasons why people gains aversion to programming - just because someone likes to complicate things.

Forecaster commented 8 years ago

I don't understand what's difficult about installing programs from disks?

You plug the disk into the drive, run the install program that's been discussed, and then you have the program you want. Isn't that enough?

I don't think requiring an internet card & connection is a good idea at all.

IgorTimofeev commented 8 years ago

@Forecaster Smart code and friendly software - it's not magic, it's a merit of the developers. Simply, there are two ways: first one, easy, where the program simply exists, and second one, difficult, where programs are adapted to the understanding by of the majority of users. Not everyone sees the second way, alas.

And there is no problem to install software from disks - It is simply not very convenient as compared to what it was before. As I see on YouTube guides, for example, by installing a program for the WarpDrive ship control, there is many people that already shout in the comments like "Whaat file not found!" All this fuss with a floppies - is just another step back from the friendliness and simplicity.

Forecaster commented 8 years ago

and second one, difficult, where programs are adapted to the understanding by of the majority of users

This makes no sense. If this is the "understanding of the majority" how is that not a good thing?

Also citing YouTube comments is not a good way to prove your point. I would not rely on those as a metric of skill level of any user base.

I might even be prepared to argue that this would provide a greater understanding of how programs work in OpenComptuers, instead of the software just magically existing somewhere users can become aware that a component actually operates using Lua programs that can be dissected and learned from, or you just install and use them.

IgorTimofeev commented 8 years ago

@Forecaster YouTube is exactly right place to see what knowledge level majority have. You have very strange point of view: to complicate everything utterly, to reduce everything to a low level, creating more difficulties for letting users have learned to overcome them? Overcoming - that's good, but why skilled people have to suffer by inserting a floppy disk, copying files from mnt/ over and over again, why should they rerecord instructions for installing their programs on YouTube, to rewrite the guides on the forums just because the OC authors suddenly decided to complicate things?

gjgfuj commented 8 years ago

Make your own openos, dude. Put the internet apps on it. And just pop that on a loot disk on your server if thats what you want. (Oc still supports custom loot disks right?)

On Thu, 9 Jun 2016, 6:55 PM Igor Timofeev notifications@github.com wrote:

@Forecaster https://github.com/Forecaster YouTube is exactly right place to see what knowledge level majority have. You have very strange point of view: to complicate everything utterly, to reduce everything to a low level, creating more difficulties for letting users have learned to overcome them? Overcoming - that's good, but why skilled people have to suffer by inserting a floppy disk, copying files from mnt/ over and over again, why should they rerecord instructions for installing their programs on YouTube, to rewrite the guides on the forums just because the OpenOS authors suddenly decided to complicate things?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MightyPirates/OpenComputers/issues/1856#issuecomment-224837460, or mute the thread https://github.com/notifications/unsubscribe/AC1W3A4ChVUbgYya75loD9GGPb0dk9Efks5qJ9UJgaJpZM4IwoQF .

Forecaster commented 8 years ago

@gjgfuj It does

gjgfuj commented 8 years ago

I mean though.... there actually could be a reason to pop at least wget on the openos loot disk. (It's a actually pretty useful program.) I mean, as Igor said, wget and pastebin are very useful programs, they crash gracefully if the internet card isn't installed, and it would help users. Of course, that's absolutely up to whoever is in charge of openos as to whether they want to include it, as openos is a program like that.

On Thu, 9 Jun 2016, 7:00 PM Martin notifications@github.com wrote:

@gjgfuj https://github.com/gjgfuj It does

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MightyPirates/OpenComputers/issues/1856#issuecomment-224838538, or mute the thread https://github.com/notifications/unsubscribe/AC1W3Am2LWwXv-lbUkunA-qQYEWlUa-iks5qJ9YogaJpZM4IwoQF .

IgorTimofeev commented 8 years ago

@gjgfuj It seems like at any problem alomost everybody has one answer: "make a custom loot disk, modify mod's configration file, if you need it, etc", almost nobody wants to make software better and simplier, there's only excuses and artifical difficulties. Apparently, something like that I should say to all the newbies, that complaining of "file not found". For a 1.5 years everything was fine, and then suddenly "not found" without explanation. By the way, OC devs can create something like universal help script, which shows user a reason why "file not found".

Note that it's not a criticism, it's just an some offers to make software better and more user-friendly, because since the 1.6 update OC goes deeper and deeper into the jungles of hardcode and special knowledges.

Inari-Whitebear commented 8 years ago

Your metric of "better" might just differ from ours. :)

Anyone who wants to use the mod shouldn't have much of an issue to stick in a disk and install something. For anyone else, custom lootdisks can be provided as has been said. Or heck, you can even just make floppies and hand them out if you're just a player on the server...

But hey, personally I dislike the trend towards making mod-usage super simple and super braindead, so my opinion might be biased there.

Actually in 1.6 OC goes less into hardcode, that doesn't mean it becomes "simpler" though.

Forecaster commented 8 years ago

at any problem alomost everybody has one answer

Are you serious? That's some amazing exaggeration there. This issue is not "any problem", it's one specific topic.

IgorTimofeev commented 8 years ago

@Inari-Whitebear Oh, it is. I'm trying to think as regular user thinks, as if he didn't work with this mod already. And from this point of view, everything has become much more complicated since 1.6.

Actually in 1.6 OC goes less into hardcode

Really? Delayloaded methods, defvs, home dir, "/" for absoulute paths, user profiles, missing unicode chars in new font... It's hardly understandable things for users who came from 1.5 or even earlier versions.

@Forecaster Yes, alas, I'm serious. Not the first time I suggest a few ideas that not only I wish, and for all the offers I get about the same answer: "if you need it, then rewrite config files, create custom loot drives, create own OpenOS", etc. Of course, I can do it - but it does not solve the problem, it is a departure from it. Perhaps offers are shitty, but the same type of response to each of them guards me. It's just strange.

Inari-Whitebear commented 8 years ago

"/" for absolute paths is kind of a general unix concept as far as I'm aware?

And well, OC is built to be open, exactly to allow you to customize it to your own wishes to a degree. Why is it bad to suggest to do that?

skyem123 commented 8 years ago

The home dir is meant for convinence, a place to store your files. Windows 95 was considered friendly for adding My Documents.

Also, the best solution for this is to have a fancy installer that guides the user, and something like Windows' "found new hardware".

The '/' for absolute paths existed since the first version of OC, most likely, if not it was a bug, by the way.

IgorTimofeev commented 8 years ago
shellPath = "home/files/blah/"
io.open("test.lua") - opens "home/files/blah/test.lua"
io.open("/test.lua") - opens "test.lua"

@skyem123 It is strange and not very obvious concept, but I'll just accept it because of absence of analogues. But where is information about this changes? It's beta, I understand, but really, most of my programs were written without "/", so shell.setWorkingDirectory() is the only solution to get them work. Or complete rewriting of tons of files, of course.

Idea about intellectual installer is good - and it will be even better if it will have simple GUI, with different color palette for each tier of monitors. Something like this, but with more options, I guess, will be good:

iv6vl1tgu3i

skyem123 commented 8 years ago

The / for absolute paths is literally how Lua works. The only thing that changed is that the default directory was changed from / to /home/ (and maybe bug fixes, but OpenOS is not going to be "bugwards compatible" like Windows is).

IgorTimofeev commented 8 years ago

@skyem123 So you're saying that for 1.5 years OC used buggy absolute paths, but now it has been fixed and we have lots of non-working programs? Great. What literate and clever code!

Inari-Whitebear commented 8 years ago

Yeah, that's kind of the point of it being a breaking change still... it means, stuff will likely break. And this is just one of many changes in that regard I think. Hence why its 1.6, not 1.5.XX. If you upgrade, expect stuff to change.

gjgfuj commented 8 years ago

No, you always used relative paths. You just always were in /, which is a bad place to be because you have no place for it. So please prefix with a / if you want absolute paths. That's how it works, that's how it always worked, and if a user put your code in another place, or changed directory to another folder, your code would stop working, for the same reason it does now. So.... relax.

On Thu, 9 Jun 2016, 9:56 PM Igor Timofeev notifications@github.com wrote:

@skyem123 https://github.com/skyem123 So you're saying that for 1.5 years OC used buggy absolute paths, but now it has been fixed and we have lots of non-working programs? Great)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MightyPirates/OpenComputers/issues/1856#issuecomment-224873731, or mute the thread https://github.com/notifications/unsubscribe/AC1W3HvMiKiabB2kT504DGzo5hZX1xZyks5qJ_9ogaJpZM4IwoQF .

IgorTimofeev commented 8 years ago

@Inari-Whitebear Sadly. But some small things clearly explains why most programmers trying to reinvent the wheel)

@gjgfuj No, it's not. I'm not always used relative paths, for example, sometimes shell working directory was "Applications/Shop.app/Resources/", but io.open("Config.cfg") opens exactly "/Config.cfg", not "Applications/Shop.app/Resources/Config.cfg". Since 1.6 upgrade everything's become like what you're saying.

gjgfuj commented 8 years ago

Are.... you sure about that? Clearly that's a bug, and you should have never used that behaviour in the first place.

On Thu, 9 Jun 2016, 10:05 PM Igor Timofeev notifications@github.com wrote:

@Inari-Whitebear https://github.com/Inari-Whitebear Sadly. But some small things clearly explains why most programmers trying to reinvent the wheel)

@gjgfuj https://github.com/gjgfuj No, it's not. I'm not always used relative paths, for example, sometimes shell working directory was "Applications/Shop.app/Resources/", but io.open("Config.cfg") opens exactly "/Config.cfg", not "Applications/Shop.app/Resources/Config.cfg". Since 1.6 upgrade everything's become like you're saying.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MightyPirates/OpenComputers/issues/1856#issuecomment-224875419, or mute the thread https://github.com/notifications/unsubscribe/AC1W3LgIEAuTg4gqZ60VxWIhNySqRstXks5qKAF9gaJpZM4IwoQF .

Inari-Whitebear commented 8 years ago

How does reinventing the wheel relate, like remotely, at all. o.o There are going to be some changes to make things better/nicer/different in certain ways. Hence those are done at major versions so users will be aware of that things can break... If you are proposing that things should never break with updates, then yeah... good luck with that I guess

skyem123 commented 8 years ago

Look, it was a bug. Try using io.iopen() in a real Lua program running on your computer (install Lua for windows, try it!). It might have surprised you, but a bugfix is not something to complain about.

IgorTimofeev commented 8 years ago

@gjgfuj Sure, but just in case I'll check this in a free moment.

IgorTimofeev commented 8 years ago

@Inari-Whitebear Well, my scripts have been developed by 2 years, and they have great backward compatibility even on newest versions. Even if some methods realization completely changes, they can be used by old scripts without any errors. There is no need in "luck" - only a straight arms.

skyem123 commented 8 years ago

You can start absolute paths with a / on old versions of OpenOS. Also, you relied on a bug. That bug got fixed. You had to fix a bug / oversight in your software.

Related is how the programs you expect to exist are removed, you seem to be complaining just because you have to change the install instructions.

I can understand why you are annoyed, but that's the point of this update, to break things to not get stuck in the tar pit of backwards compatibility.

Why not help @payonel with the OpenOS installer to make it user friendly?

IgorTimofeev commented 8 years ago

@skyem123 Apparently, it is necessary. Maybe I should write some script that replaces all non-absolute to absolute, it will be easy enough.

Well, if he will do me that honor, then it will be pleasant.

payonel commented 8 years ago

If you would like our install to be more user friendly? see #1861 Could the new install use more work to make it even more user friendly? Absolutely! I would be sincerely honored to review some PR's to improve it.

Vexatos commented 8 years ago

However, in this case you will contradict yourself, creating software that can not work without an Internet card

Or, if you really do not want to allocate a measly kilobytes of disk space, Vexatos offered an very good solution with apt-get analog.

I think you missed half of my comment:

Doing this would be doable as OPPM is built on OpenOS itself anyway, but it would require caching, and OPPM is designed to be as light on space as possible, mpt has already shown how big a package cache can become (could easily fill a tier 1 hard drive). This is the main problem. Furthermore, it would obviously once more require an internet connection to work at all, at least to acquire the cache.

IgorTimofeev commented 8 years ago

@Vexatos Why not to make OPPM requests to get application list through an external website database? It's not necessary to cache a bunch of data on such tiny computers.

gjgfuj commented 8 years ago

Seriously? Get the computer to hit the internet every single time a command is typed in that's unknown? What if the connection is slow, then it lags out a while.

On Fri, 10 Jun 2016, 5:02 PM Igor Timofeev notifications@github.com wrote:

@Vexatos https://github.com/Vexatos Why not to make OPPM requests to get application list through an external website database? It's not necessary to cache a bunch of data on such tiny computers.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MightyPirates/OpenComputers/issues/1856#issuecomment-225108438, or mute the thread https://github.com/notifications/unsubscribe/AC1W3LjubW_IfFgwA5A7o9oNqd-Ss2AYks5qKQwQgaJpZM4IwoQF .

skyem123 commented 8 years ago

I suggest this: OpenOS will install as normal, as it guides you through how to install it well enough. However, on the first boot, there should be a utility that prompts users to insert driver disks and, if they want, other loot disks, to install onto the system.

This firstboot / out of the box experience should also show the devices (excluding components that OpenOS already knows how to use such as Screens, GPUs, Keyboards, Drives, FSes, etc... BUT it should still list stuff like internet cards, tape drives, whatever robots have, etc.

HammerDave commented 8 years ago

I'm new to OC, but not new to computers. It took me a whole RL day (!!!) to find out how to get the internet api and pastebin. I wrote my first program in 1974 (!!). That's before the internet existed, for those keeping score. I wrote that program on paper and then punched cards to run it, and had to use a core dump to verify the program actually worked. It almost took less learning curve to do that, once I understood the assembler.

It should not be this hard. If it's essential to the user experience, it should be readily available.

skyem123 commented 8 years ago

This is why I think it should be in a single disk, and the installer should prompt the user to install it.

Inari-Whitebear commented 8 years ago

The installer should just mention the other disks and ask if you want to install them :P