livingcoder

joined 1 year ago
 

I noticed a couple days ago that this project didn't exist yet in the Rust ecosystem, so I created it. If you need to programmatically interact with a mainframe system, you can now do it conveniently with this library.

I've currently provided two levels of abstraction, but a third is on the way (once I've decided on an implementation).

If you have any thoughts or suggestions, I'm open to them.

[–] livingcoder@lemmy.austinwadeheller.com 1 points 1 year ago* (last edited 1 year ago)

You may need to fork the repo and mirror my pull requests into your fork. The maintainer of the repo hasn't responded to my pull requests yet and one of them fixes a common bug.

In your Cargo.toml file, you can reference your own fork as a dependency. https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories

[–] livingcoder@lemmy.austinwadeheller.com 1 points 1 year ago (1 children)

That's strange. Please let me know what you find out.

This is a great idea, thank you!

[–] livingcoder@lemmy.austinwadeheller.com 2 points 1 year ago* (last edited 1 year ago) (2 children)

I've been using tide-jsx, but I'm also using tide (not actix). Everything renders to a String, so it would technically be compatible with any web framework.

I would love to see what other people suggest for Actix since I wanted to use that instead of Tide, but I also didn't know where to find a crate like tide-jsx. https://crates.io/crates/tide-jsx

I never would have guessed when I first installed RIF that some years later I would end up feeling sad as I uninstalled it.

[–] livingcoder@lemmy.austinwadeheller.com 1 points 1 year ago* (last edited 1 year ago)

Ah, okay, this makes sense. I was confusing the product for the source code. If they provide the product, they must provide the source code but they (obviously) aren't required to provide a product to everyone, so everyone is not entitled to the source code.

I appreciate all of the information and discussion. Thanks all.

To respond to my own initial post: the harm comes from the fact that Redhat is entitled to be the sole distributors of their source code by way of requiring that all those who desire access to the product affirm that they will not distribute the source code the GPL affords them, thereby stopping raw rebuilds of the product (but also potential extensions of Redhat).

[–] livingcoder@lemmy.austinwadeheller.com 1 points 1 year ago* (last edited 1 year ago) (2 children)

And the GPL is okay with that? Can every repo under GPL put up a paywall?

Google: "The GNU General Public License (GNU, GPL, or GPL) is a free software license originally written by Richard Stallman of the Free Software Foundation, which guarantees that users are free to use, share, and modify the software without paying anyone for it."

[–] livingcoder@lemmy.austinwadeheller.com 1 points 1 year ago* (last edited 1 year ago) (4 children)

Within the analogy (as it compares to Redhat and the Rebuilders), how is Foo helping Bar? Isn't Foo simply leaving the TVs outside the factory for people to come and pickup? A bunch of trucks branded "Bar" come by, pick some of them up, rebrand them, and take jobs to install them, jobs that Foo thought they were going to get? Isn't Foo now requiring individual people to walk through a lockable door, sign their name, verify that they don't work for Bar, and grab a TV instead of just leaving them outside in a pile?

[–] livingcoder@lemmy.austinwadeheller.com 2 points 1 year ago (6 children)

I don't see how Company Foo can dictate that all other entities (customers, for example) can receive a free TV on their doorstep (since the code is open source) except for Company Bar. To make it map better to the situation, Company Bar would receive a shipment of free TVs, rebrand them, ship them out to customers, and install them.

"They don't have to give Company Bar TVs to install." So the GPL doesn't require that Company Foo permit free access to the TVs? They could decide to not give out their TVs to anyone?

Also, what if I wanted to get my cousin a free TV but charge him a few bucks to install it? Is this only a problem at scale?

[–] livingcoder@lemmy.austinwadeheller.com 5 points 1 year ago* (last edited 1 year ago) (8 children)

Oh, I see. But what do you think of this translation:

"Company Foo makes TVs and is always working to make them better. They give them out for free with the hopes of making money installing them and providing guidance on how to use them, but someone starts Company Bar and installs them for cheaper and starts taking on installation jobs."

Is this wrong? Isn't this just the definition of an open market? Please let me know if I'm missing some kind of context. I hope that we can continue to discuss this respectfully.

I should say that I want any open source project with the motivation to write good software to have all of the funding they need to make that happen. I just don't see how it can be justified in this instance when compared to any other market.

[–] livingcoder@lemmy.austinwadeheller.com 5 points 1 year ago* (last edited 1 year ago) (15 children)

What's the harm in doing a rebuild? Serious question. I simply don't understand where the harm comes from. I would appreciate any insight. Thanks.

Edit: I find the answer to my question at the end of this productive conversation.

Yeah, looking at these notes, they don't appear particularly useful for my purposes either. It's a challenge to find good, ready-to-use material. Thanks for sharing them, though.

 

I made a 2D platformer randomization crate called Shiftnanigans (https://github.com/AustinHellerRepo/Shiftnanigans) as part of my work on the open source game Jumpy (https://github.com/fishfolk/jumpy). Within the map editor of Jumpy, the Randomize button will randomize the placement of tiles and elements, maintaining the general structures of the map. I've described the two abstract concepts and sets of structs used to accomplish this functionality below. This is just a general overview, but I am happy to elaborate further if anyone has questions about the algorithms and data structures used.

Web demo (click Map Editor -> Open Map -> Level #12 -> Randomize (in the top right)): https://fishfolk.github.io/jumpy/player/latest/

The PixelBoard and PixelBoardRandomizer

In order to randomize a 2D platformer or tile-based map, the PixelBoardRandomizer takes in a grid of "pixels" as a PixelBoard, detects wall and non-wall pixels, groups them together, and finds locations for those groups such that no two groups overlap while also maintaining contact with adjacent walls (or not, as applicable). Wall chunks that do not make contact with the corners are considered "wall segments" and can shift around along the edge of the map. Each randomized PixelBoard can be repeatedly randomized itself without affecting the size or adjacency of pixel groups, allowing repeated execution of the randomization function on a previously randomized PixelBoard. To optimize this process, shifters (described below) are ultimately used to compare pixel group locations to each other, incrementing to the next randomized location for the specific pixel group. All pixel groups are ultimately compared to each other to ensure that they are all valid together in some combination of locations. Instead of placing all of the pixel groups down randomly one at a time just to find out that the last pixel group won't fit (ultimately because the very first pixel group is in a bad spot), each pixel group is paired up with each other pixel group as a cartesian product and is compared together.

The PixelBoard and PixelBoardRandomizer Continued

This is where it gets a little complex. Each pair of pixel groups iterates over all possible locations for those pixel groups in a round robin cycle, allowing each pair of pixel groups an opportunity to check if their current random locations are valid together. As valid pairs of pixel groups are discovered, a hypergraph is filled with connecting edges between hypergraph node's subnodes where each hypergraph node is conceptually a pixel group, a subnode is a location for that pixel group, and the edge indicates that the two locations of each pixel group are valid together. Once a cliché is discovered between all hypergraph nodes, that indicates that each pixel group location connected together within the cliché are all valid together and would form a valid, randomized PixelBoard.

Shifters and Incrementers

Shifters are just 2-dimensional skewed arrays with a pointer to a current cell where navigation through the array is defined by a few basic operations: forward, backward, and increment. The shifter starts with a column pointer in the 0th row's 0th column. You can imagine that an increment moves the current column pointer down the array, a forward action creates a new active column pointer in the next column at the top row of the array, and a backward action removes the current column pointer and makes the previous column pointer active where it left off. If any action is not possible a None is returned, indicating that a backward action must occur so that the previous column can increment once, and then return forward at the top of the column again with a new column pointer, ultimately iterating over all possible combinations of column cells. An incrementer returns a collection of cells. One of the most useful applications is being basically a wrapper on a shifter that returns, with each iteration of the incrementer, a collection of cells (one per column) as a permutation of the underlying shifter as it moves forward and increments, only moving backward with subsequent iterations of the incrementer that would cause the underlying shifter to increment or move backward and then move forward again with each iteration. With these two data structures understood, it is possible to create many interesting variations of shifters and incrementers that "fail fast" while performing some interesting traversal of a state space. For example, the pair of pixel groups iterate over their possible locations in an expanding square sequence/permutation using the ShiftingSquareBreadthFirstSearchShifter. This could be improved upon by implementing a decrement movement on shifters and utilizing that functionality to search in a triangular shape outward instead of a square.

Efficiencies:

  • Shifters make it very easy to find invalid pairs of column cells and fail fast as opposed to generating a long list of column cells just to discover that the first pair are invalid together.
  • Only pairs of pixel groups that could ever conflict or overlap are compared (so one wall isn't paired with another wall, for example).
  • When a new edge is added to the hypergraph, that edge is the starting point for searching for a cliché within the hypergraph.
  • A cliché search is only performed if each hypergraph node's subnode for the new edge is connected to all other hypergraph nodes at least once.

Next steps:

  • Allow for specifying that "wall segments" should not shift around, greatly improving performance but reducing degree of randomness.
  • Create a few examples in the Github repository based on common uses of this functionality
  • Implement a decrement action for shifters, permitting more efficient state space search algorithms.
  • Create trait implementations that more easily convert existing iterators into variations of shifters or incrementers.
 

I want to find or contribute to an open source Android app that behaves as a browser so that I can incorporate saving web pages to a specified (self-hosted) wallabag docker instance. Any suggestions?

 

I once bought a router to use for my internet when I moved into my new house just to find out that it "wasn't compatible" with Verizon's service. I still have it (because I'm terrible about returning things). Is there any point in keeping it? Is there anything fun or interesting that I could do with it?

view more: next ›