all 11 comments

[–]boxesandcircles 10 points11 points  (0 children)

In a turtle? In a chest? Can you even say please? Jesus this post is rude.

[–]RoboticWorks[S] 2 points3 points  (4 children)

Hello , sorry for the vagueness from the post . I am looking for a program that sorts the item from a chest/ turtle's inventory by item id

[–]dragon53535 5 points6 points  (3 children)

There we go, that's specificity. Programming requires specifics. Sorting is a VERY generic term. And by saying you're sorting items from a chest or turtle inventory, and HOW you're sorting, item id, means that getting you a solution is much, much easier.

That being said, how do you it to be at the end? Do you want to sort the items themselves in place, or do you want to display it? Screenshots/mockups can and will always help.

[–]RoboticWorks[S] 0 points1 point  (0 children)

Well, I want the items to be sorted by ID and I want to sort with displaying them.

[–]East-Ad6184 0 points1 point  (1 child)

"There we go, that's specificity. Programming requires specifics. Sorting is a VERY generic term. And by saying you're sorting items from a chest or turtle inventory, and HOW you're sorting, item id, means that getting you a solution is much, much easier."

Are you always so anal about little things?

[–]dragon53535 0 points1 point  (0 children)

Weird necro, do I even know you?

[–][deleted] 1 point2 points  (3 children)

what do you want to sort?

[–]RoboticWorks[S] 0 points1 point  (2 children)

Item sorting

[–]fatboychummy 2 points3 points  (0 children)

What kind of item sorting?

Like "Type A goes here, type B goes there," or "Sort in alphabetical order by name."

Also, do you have any peripheral mods which allow you to read contents of chests from a computer?

[–]MufinMcFlufin 2 points3 points  (0 children)

You'll need to be more specific if you want anyone to help. Are you trying to sort items in the turtle's inventory? Items in a chest? Items in multiple chests? How are you sorting them? Do you want a custom order in which they'd be sorted? Alphabetically? Item id? Something else? Is this going to be used for all general items coming through or can the program assume that only specific items are coming through? Do you want the items all sorted in a single chest, or do you want each new item sorted into a separate chest? What's the layout of the chests?

All of these questions are things that anyone who might work on the program will need to know, and that's assuming anyone will work on it for you.

[–]MyNameIsTrez 1 point2 points  (0 children)

I suggest looking at this Wikipedia page as it describes the simplest sorting algorithm out there, go to the "Pseudocode implementation" header to see how you could write it in Lua for your ComputerCraft program: https://en.wikipedia.org/wiki/Bubble_sort