4 ms·
I'm inclined to agree but if an nginx filter is like (HttpRequest, HttpResponse) => (HttpRequest, HttpResponse) then aren't we basically saying we like purely p
by hderms 7y ago
I'm inclined to agree but if an nginx filter is like (HttpRequest, HttpResponse) => (HttpRequest, HttpResponse) then aren't we basically saying we like purely problems that can be expressed as compositions of pure functions? Signal programming I have less feelings on
- oscargrouch 7y agoin Nginx HttpRequest/HttpResponse are larger abstractions but the "real fun" will happen at the buffers, where you will end up mostly manipulating bytes on the buffers. The fact that we are creating arbitrary abstractions to represent data and imposing to others is actually the core issue here. Supose we could set up the representation for the most things as a matrix. colors, words, sound, etc.. Than you can filter and process applying linear algebra, ML, etc.. I fell that the way we pack bytes, in arbitrary fashion, by mixing types is a core impediment for us to have a better experience with the program/data duality. But i guess that all of this data centered, AI focused world will make us understand a better way to deal with both programs and data. The need to make our ML agents understand our world will probably change the way we deal with code and data.
- viraptor 7y agoIs the jump to pure functions needed? I mean, nginx will happily include a cache lookup, or a random content in that transformation - that's very much not pure, but often desired.
- oscargrouch 7y agoJust to add to this, more to the spot of your question, i think a no side-effect is often desirable, but i dont think it should be an impediment. As you might need to call another function inside of our procedure that mutates some data. But i think there are some sort of problems we are imposing to ourselves just because we need to deal with the millions possible ways a data could be laid out or modeled based in our type-system centric world. In my perfect world, we should model functions in a DNA fashion, so function is also data, and if is mutable, could even be changed by the data depending of the what is in it. First, we would never have to re-create a function again, and if we do, the data signature would be exactly the same as the other one created before, so we can match in a index for instance. Im more inspired by the way things are done in the natural world, than the way we ended up shaping math (where the concepts of FP are more based on).