MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1y64m6q/one_pipe_through_string_array_and_map/
r/programminghorror • u/Elfet • 1d ago
10 comments sorted by
3
Looks like Elixir. Pipes are very cool.
2 u/Elfet 1d ago https://ant-lang.org
2
https://ant-lang.org
15
How is this horror? Looks like pretty standard query stuff.
0
I dislike that map({x.value.length()}) still contains the original value. A map should just return the computed value
1 u/Elfet 1d ago x is `Entry[string, Array[string]]` with { key, value }How else do you map a Map{}? 0 u/Agitated-Display6382 1d ago After map, I would expect to have only the computed value. Sort of: given fforeach x in myArray yield return f(x)Not: yield return (x, f(x)) 2 u/Elfet 1d ago This Map.map vs Array.maphttps://ant-lang.org/docs/lib/Map/map 1 u/Agitated-Display6382 1d ago I expected this:https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:mapI'm just ignorant about Ant 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 1d ago Why are all your comments at 0 instead of the default 1? Did you piss someone off enough that they are using a bot to instantly downvote every comment you make? -1 u/Agitated-Display6382 1d ago Nice explanation! I always remove my own upvote.
1
x is `Entry[string, Array[string]]` with { key, value }
How else do you map a Map{}?
0 u/Agitated-Display6382 1d ago After map, I would expect to have only the computed value. Sort of: given fforeach x in myArray yield return f(x)Not: yield return (x, f(x)) 2 u/Elfet 1d ago This Map.map vs Array.maphttps://ant-lang.org/docs/lib/Map/map 1 u/Agitated-Display6382 1d ago I expected this:https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:mapI'm just ignorant about Ant 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 1d ago Why are all your comments at 0 instead of the default 1? Did you piss someone off enough that they are using a bot to instantly downvote every comment you make? -1 u/Agitated-Display6382 1d ago Nice explanation! I always remove my own upvote.
After map, I would expect to have only the computed value. Sort of: given f
foreach x in myArray yield return f(x)
Not: yield return (x, f(x))
2 u/Elfet 1d ago This Map.map vs Array.maphttps://ant-lang.org/docs/lib/Map/map 1 u/Agitated-Display6382 1d ago I expected this:https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:mapI'm just ignorant about Ant 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 1d ago Why are all your comments at 0 instead of the default 1? Did you piss someone off enough that they are using a bot to instantly downvote every comment you make? -1 u/Agitated-Display6382 1d ago Nice explanation! I always remove my own upvote.
This Map.map vs Array.map
https://ant-lang.org/docs/lib/Map/map
1 u/Agitated-Display6382 1d ago I expected this:https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:mapI'm just ignorant about Ant 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 1d ago Why are all your comments at 0 instead of the default 1? Did you piss someone off enough that they are using a bot to instantly downvote every comment you make? -1 u/Agitated-Display6382 1d ago Nice explanation! I always remove my own upvote.
I expected this:
https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:map
I'm just ignorant about Ant
2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 1d ago Why are all your comments at 0 instead of the default 1? Did you piss someone off enough that they are using a bot to instantly downvote every comment you make? -1 u/Agitated-Display6382 1d ago Nice explanation! I always remove my own upvote.
Why are all your comments at 0 instead of the default 1? Did you piss someone off enough that they are using a bot to instantly downvote every comment you make?
-1 u/Agitated-Display6382 1d ago Nice explanation! I always remove my own upvote.
-1
Nice explanation! I always remove my own upvote.
3
u/NatoBoram 1d ago
Looks like Elixir. Pipes are very cool.
15
u/monotone2k 1d ago
How is this horror? Looks like pretty standard query stuff.
0
u/Agitated-Display6382 1d ago
I dislike that map({x.value.length()}) still contains the original value. A map should just return the computed value