Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python Virtual PC

Name: Anonymous 2008-04-23 9:35

I'm trying to make a virtual PC in python and need some help.  This virtual PC will be a console and you would be able to mess around a virtual file system.  I need some help on how to make this virtual file system.  So far I defined some files like this:

files = [
['page.txt','this is a test'],
['test.txt','another test'],
['lol.html','<html>\n</html>']
]

Where the first item would be the name of the file, and the second would be the contents.  I need some help on how to print it to the screen and how to make directory's.  Would this even be the right way of doing this or should I make files classes?

Name: Anonymous 2008-04-23 11:49

>>11
Since I'm seeing a lot of these meta-troll posts, I'll go ahead and reply in the hopes that maybe the other two people posting here will read this.

Yes, there aren't a lot of ``helpful'' replies on /prog/. While you might like to attribute this ``fault'' to those who post the replies, doing such makes an incorrect assumption as to the nature of this board. Unlike other boards on other sites, /prog/ isn't about "halp me do this" or "halp me do that". We don't exist to give advice to people who, honestly, don't know enough about programming to help themselves.

/prog/ is all about abstract bullshite. Some acceptable topics are

 • Discussing the finer points of various type systems.
 • Debate over various algorithms.
 • Interesting code challenges, implementation analysis, etc.
 • Cult of Personality threads.
 • Bashing Python THE FORCED INDENTATION OF THE CODE.

This topic in particular, as mentioned in >>3-4,14 is ``either an idiot or a troll''. The content of the post describes a fairly mundane approach to a specific part of a considerably larger problem. It overlooks many important considerations, and shows a complete lack of either forethought or design.

It isn't quite clear from a first reading what specifically >>1 wants. In the post, >>1 banters on about a Virtual PC. This leads the reader to assume that the question is going to be related somehow to some sort of hardware emulation. As it turns out, this isn't related in any way to the question, which is how to implement a virtual file system. The banter about VM implementations should be omitted entirely from the post.

Looking past that, it still isn't clear what the OP wants from us. He poses a variety of questions --

how to print it to the screen
how to make directory's
should I make files classes

Each of these questions is completely separate from the others; two of them have absolutely nothing to do with the actual high-level structure of the virtual filesystem. Given the context of "virtual filesystem questions", the only valid question is the second, which was answered fairly well by >>10.

The other two questions demonstrate a complete lack of knowledge. List serialization in Python is trivial and built-in.  Specific serializations can be done with an iteration over the list. Ultimately, the reader is unsure of what the OP wants -- there are a myriad of ways the tree can be output to the console, whether it's output as a fully-expanded tree, or if it's output from the perspective of a given node.

The last question, really, is the kicker. While standing on shaky ground, the OP rhetorically questions everything he's done so far. Such udder lack of self-confidence shows that he hasn't given enough care into this project to even try to answer his own questions.

Ultimately, it is not /prog/ which is unhelpful. We help those who help themselves. If you want to have a serious discussion, start a serious discussion. Don't come crawling to us about your stupid bullshit -- we have enough of that already.

Thanks for reading,
Christopher.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List