Conversation

Lucy [hiatus era] 𒌋𒁯

arrays are prohibited by the geneva convention
2
0
3
@lucy arrays are the greatest data type actually
1
0
3
@snacks @lucy stop doing objects, you want properties, we have a tool for that, its called associative arrays. You want abstraction we got multi-dimensional arrays. You need data structure we have for loops, arrays are all you need.
1
1
5
@sun @lucy @snacks @prettygood what kind of lists? linked lists are really inefficient whereas arrays are basically the fastest data structure blobcatderpy c.f. https://rust-unofficial.github.io/too-many-lists/
1
0
2
@sun @lucy @prettygood the only time i've ever used a list was when uni wanted to teach memory management in c and i had to implement a destructor for them. Annoying, slow data type most of the time
0
0
1
@sun @prettygood @lucy @snacks arrays? lists? objects? dont care just tell me where the memory address is
0
0
2
@sun @lucy @snacks @prettygood ok but the implementation matters, you need to know how fast collection types are, it affects what algorithms you write. there's a reason the big-O cost is part of the documentation for java collections for instance ( https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html)
1
0
2
@sun @lucy @snacks @prettygood in julia you just use arrays or tuples and it works great
0
0
2
@sun @nemesis @lucy @prettygood and in lua you just use tables, your point?
1
0
1
@sun @lucy @snacks @prettygood whats a good functional abstraction you can use with linked lists but not arrays? you can use map-reduce-filter with arrays, you can even do recursive algorithms by implementing them using array-views, which under the hood are just pointer arithmetic, without the huge cache non-locality cost that linked list traversal has

in lazy FP languages (i.e. Haskell), linked lists are great because you can use them to structure control flow and deforestation means the linked lists will rarely actually be produced in practice. but that doesn't make them a good way to store and query lots of data
2
0
2
@sun @nemesis @lucy @prettygood you also don't need lists and "better" is very situational. Dictionaries are often even more ergonomic than lists for example
1
0
1
@sun @lucy @prettygood @snacks linked lists are easier to use nondestructively, but if you want that just using some consistent structural sharing implementation (like clojure's bagwell tries) is better than doing it ad hoc with linked lists.
0
0
1
@sun @lucy @snacks @prettygood they are common in functional languages but I think that's more a historical coincidence than anything else. linked lists (especially if you represent them with lisp-style cons cells) arent really any more abstract than arrays, and low level linked list details have been a persistent factor in making FP more annoying than it could be. c.f. http://xahlee.info/comp/lisp_cons_problem.html
1
0
1
@lucy @sun @prettygood sorry for turning your thread into a stupid war
3
0
1
@snacks @prettygood @sun dw I was too busy to give a shit about the internet today
1
0
1
@Paulajak @snacks @sun @prettygood too busy kissing a girl to engage in flamewars
2
0
3
@lucy @Paulajak @prettygood @sun leave some for us unlovable chuds
0
0
1
@lucy @snacks @sun @prettygood very good
im going out to eat dinner tonight
not the best decision bu oh well
0
0
2
@sun @lucy @snacks @prettygood eh, you don't need lists if you've figured out exactly what you need for your program and you don't need the performance of arrays if you haven't
0
0
0
@lucy After the Giza Autism Array this is a good idea, but too late
0
0
1