In jest, yes. I came up with the idea as a mechanism through which to make fun of various fields in computer science. Then I found myself having too much fun with the project and started to take it seriously.
If anything, it’s a troll against trolling. The trolling game is all about producing maximal offense with minimal effort. SetBang produces no offense (it’s gently making fun of a few programming languages) but required a fair amount of effort. So it’s an anti-troll.
Check out the % and * operators. They handle ordered pairs (encoded as (x, y) = {{x}, {x, y}}.
When I use SetBang, I encode ordered collections as linked lists.
There is a small problem with the example you gave. It doesn’t hold up on triplets. For example, both (3, 1, 1) and (3, 1, 3) would map to {{3}, {3, 1}, {3, 1}}. There’s no way to tell whether the collided element in the 3rd place is a 1 or a 3– only that it’s something that collided with the first two. This problem doesn’t exist with ordered pairs because the collision case for (x, y) occurs if and only if x = y (in which case the ordered pair is uniquely identifiable as (x, x)).
it wouldn’t map to {3} {3,1} {3,1} it would actually map to {3} {3,1} {3,1,1} and {3} {3,1} {3,1,3} ,which actually still valid, just uncommon. Which is also true for the unordered set {3,1,3} so that’s fine. If you define sets to not have dups then the set 3,1,1 won’t happen anyway.
[Comment removed by author]
In jest, yes. I came up with the idea as a mechanism through which to make fun of various fields in computer science. Then I found myself having too much fun with the project and started to take it seriously.
If anything, it’s a troll against trolling. The trolling game is all about producing maximal offense with minimal effort. SetBang produces no offense (it’s gently making fun of a few programming languages) but required a fair amount of effort. So it’s an anti-troll.
You’re a monster.
No generics. Worthless.
Actually all types are generics because there is only one type, a set.
Very cool but your sets are all unordered, ordered sets on the other hand go…
{{1} ,{1,2},{1,2,3}, {1,2,3,4}} or… {{{{}}},{{{}},{{{}}}},{{{}},{{{}}},{{{{}}}}} ,{{{}},{{{}}},{{{{}}}},{{{{{}}}}}}
Check out the
%and*operators. They handle ordered pairs (encoded as (x, y) = {{x}, {x, y}}.When I use SetBang, I encode ordered collections as linked lists.
There is a small problem with the example you gave. It doesn’t hold up on triplets. For example, both (3, 1, 1) and (3, 1, 3) would map to {{3}, {3, 1}, {3, 1}}. There’s no way to tell whether the collided element in the 3rd place is a 1 or a 3– only that it’s something that collided with the first two. This problem doesn’t exist with ordered pairs because the collision case for (x, y) occurs if and only if x = y (in which case the ordered pair is uniquely identifiable as (x, x)).
it wouldn’t map to {3} {3,1} {3,1} it would actually map to {3} {3,1} {3,1,1} and {3} {3,1} {3,1,3} ,which actually still valid, just uncommon. Which is also true for the unordered set {3,1,3} so that’s fine. If you define sets to not have dups then the set 3,1,1 won’t happen anyway.
You could potentially give it an entry in an esoteric languages wiki if you wanted.