1 line
3.9 KiB
Plaintext
1 line
3.9 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>So I have the same problem with almost all languages.</p> <p>Including Schemes. What a shame!!!</p> <p>All I want to do is fetch a html file from an address(let's say from "<a href="http://shenlanguage.org/TBoS/tbos_29.html">http://shenlanguage.org/TBoS/tbos_29.html</a>").</p> <p>I can do it in every language, yes. It's not difficult. What is difficult to get it done with one function call.</p> <p>Even most schemes force me to do at least something like (with-standard-input-from-url....</p> <p>Sorry, but that sucks for writing quick (and sometimes dirty) scripts.</p> <p>I want one thing - It has to be done in one function call. Period. No compromises here. </p> <p>I found something like (url-retrieve-synchronously ...) and thought I was lucky.</p> <p>I was wrong. It gave me a fucking buffer object!!! #<buffer \*http [shenlanguage.org:80](https://shenlanguage.org:80)\*-834098></p> <p>Fantastic.</p> <p>So now in order to use this thing I have to read documentation about buffer objects. Probably written 50 years ago in a writing style that is understandable only by the author.</p> <p>Or written better then Shakespear. And maybe it will enlighten me more then a thousand hours of silent meditation with the Dalay Lama together with a pound of mushrooms with Terence Mckenna.</p> <p>But who cares? I want one simple task to be done with one function call. Firefox has a function like this, when I put an url it gets the contents into memory.</p> <p>What's the secret elisp function?</p> <p>Yes, I can write it myself in a few functions. But I don't want to repeat shit for the milionths time.</p> <p>Dear redditor, if you know the secret function then please tell me! I think I used one on my old OS(but lost the script).</p> <p>As a second request, how can I find a function like this myself without you guys?</p> <p>Duckduckgo couldn't do it(at least not with the spells I used). I lack proficiency in emacsology to find it in emacs.</p> <p>And a third request:</p> <p>Where should I agitate to get a function like this in a more findable place. And my philosophy. To have one task in one damn function call and not be forced to produce code bloat and waste my time with thousands of pages of super uncool and ugly docs.</p> <p>Come on, dowloading a html file and putting it in a string. This should be super mega basic stuff. It should be right next to variable assignment and print/display. It should have a central place. in a nice library like s.el or f.el imho. And people shouldn't be forced to study first all peculiarties of http2 or any other super cool and important technology or concepts or whatever, I think you get my point. In the words of Fry "Oh shut up and take my money". And give me the damn thing from the url. In clojure actually it is super basic stuff and not hidden. The function is "slurp". You give it a filename or an url and it returns it's contents. No rocket science.</p> <p>I wouldn't waste my time writing such a post on a java group. It's a cultural thing, for those people nothing can be done in less then a hundred lines of code. Well, I'm sure in this group there are many people who think like me.</p> <p>It must be possible to do one simple task with exactly one function call which returns the result and does not to much other damage to the system in this time. And it must be simple. And the user must not be forced to read a thousand pages of overintelectualized scientific bullcrap in order to get this done.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/klikklakvege"> /u/klikklakvege </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/qydxe8/how_to_fetch_file_through_https_into_string/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/qydxe8/how_to_fetch_file_through_https_into_string/">[comments]</a></span> |