Leukhardt: I wonder if there’s any cool hipster function-composition-is-everything language that compiles to JS, and isn’t Forth or Factor.
Memmo: Higuchi: Haskell doesn’t have “function-composition-is-everything” :
Drue: I mean, you can write it in pointless style, but it’s. uh. weird
Furguson: All anyone seems to do lol
Broad: Not like you can write 2 2 3 * –
Nicoson: Excellent, it worked! Thank-you, Dekok.
Clayburn: Or 2 2 3 2 * – *, to make it a complete emoticon
Boulos: Is linting much much slower than checking mime type?
Adrian: Jeffreylevesque: linting?
Dellosso: Jeffreylevesque: how do you check the mime type?
Madras: Anyone familiar enough with Angular 1.4+ ngAnimate that can guide a newb new to angular, AND ngAnimate, double points. looking for best practice on fading an element out/in. An example to rip on: http://plnkr.co/edit/sRhJFFMQCJZZwPd46X8s?p=preview
Hasselvander: What’s my best approach?
Pender: Should i just not check the file on the front end
Macnevin: And check on the backend, as part of the p****r?
Dellosso: Hard to say, I normally match by file extension and expect it to be correct
Dellosso: So if you upload a csv with a .json extension it would just fail to p**** and be rejected
Florey: Jeffreylevesque: you can either hope the mime type is correct, or try to infer the mime type from the contents. But the latter leads to ambiguity, which might be hard to resolve
Antunez: So I’d just rely on the mime type
Dellosso: Jeffreylevesque: though restricting the mime like that can be a problem on the client side, as not every client has a mapping for .json = application/json, etc
Schweinberg: Anyone know a good JS html p****r
Jackley: But csv mimetype should be text/csv. THis is usually the case, but on my current windows machine i get application/vnd.ms-excel
Czachorowski: Django_: in the browser? You already get one.
Dellosso: And as you’ve seen, on windows excel registers itself as the handler for csv files and reports a mime of application/vnd.ms-excel
Kossak: Dellosso: should i add application/vnd.ms-excel for csv? becuase technically that should be excel .xls
Piker: Django_: again, do you need this in the browser? Or in some environment like Node?
Fritze: What about json files though?
Dellosso: Jeffreylevesque: and i’ve had pngs on windows xp come through as application/octet-stream because it didn’t know how to handle them, so client mime tends not to work that well
Cargle: My client os is unknown for json
Mahrenholz: If it’s application/octet-stream, is it even worth validating mime
Tote: Bc application/octet-stream is catch all for everythng
Dellosso: Jeffreylevesque: exactly, hence why I tend to ignore mime types from the client and look at the file extension
Brintnall: Which makes me wonder why json didn’t catch as application/octet-stream
Martelles: But, file extension is easier to spoof than mimetypes
Dellosso: Mimetype is pretty easy to spoof, I just change it in the registry
Sachar: I guess i am using it with the intention of UX on the form
Tramonti: The mimetype validation
Dellosso: Yeah, UX on the file picker would be great, but it does rely on the client having their file extensions correctly configured for things like .csv and .json