#dev | Logs for 2022-02-01
« return
[13:53:35] <janrinok> chromas - have you got your head around ranges in D yet? I can see why they would be useful, but how to create and use them is just clubbing my brain.
[17:36:31] -!- requerdanos has quit [Ping timeout: 264 seconds]
[18:17:53] <chromas> janrinok: you've just gotta make a few methods with standardized names and they'll automatically work
[18:25:10] <janrinok> I'm not sure that helps me very much :)
[18:26:12] <janrinok> I've got an array of structures to sort. The sort has only to take place on one element of the structure. How do I configure my array to get the built-in sort to know how to handle that?
[18:38:02] -!- requerdanos [requerdanos!~requerdan@Soylent/Staff/Editor/requerdanos] has joined #dev
[19:02:06] <chromas> Looks like you either implement opCmp or pass the element into sort's less parameter ( https://dlang.org )
[19:02:07] <systemd> ^ 03Function sort - D Programming Language
[19:02:10] * chromas cheated and looked it up
[19:02:52] <janrinok> as I will have to do too :)
[19:03:02] <chromas> https://forum.dlang.org
[19:03:04] <systemd> ^ 03Sorting structs? ( https://forum.dlang.org )
[19:03:37] <chromas> The second comment on the page should hopefully works