Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

To you lisp lovers

Name: Cudder !!RD3keS5C4KiAlK2 2013-06-29 0:06

What has lisp ever done for reducing the memory footprint of a computer program? The answer is nothing, nothing at all. This is all the work of C.

Name: Anonymous 2013-06-30 22:13

>>40
|||||||| ||||||||||

Name: Anonymous 2013-07-01 2:12

Terrific ‚

Name: Anonymous 2013-07-01 2:13

Terrific

Name: Anonymous 2013-07-01 2:13

>>40
please post more

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-01 6:13

>>20
Another poor bastard with its head in the clouds... the reason PHP is so popular is because it's easy to lock down for a webhost that wants to isolate its users from each other. You can't do that easily with a general purpose language that can easily do a lot more; and for 99.999% of the time you use a webhost, you shouldn't be, and they don't want you to, do anything other than generate webpages.

higher order functions as if they were something fancy which must be used with responsibility
They are equivalent to a struct/class and a function pointer, and if you were using something like C/C++ you would not (or should not) indiscriminately create dozens of those.

Map is the most natural thing to use in the world, but enjoy your for (_;_;_) {} loops forever.
Loops are more explicit, easier to understand, and are always inline (like they should be; they have practically 0 overhead and calling a function that just loops, which is what a map is doing, is needless overcomplication.)

>>31
All he did was write an assembler for one of the simplest CPUs ever in Lisp, with syntax that's more verbose than standard Asm. Sorry, that's just FAIL.

Name: Anonymous 2013-07-01 6:56

>>45
PHP is so popular is because it's easy to lock down for a webhost that wants to isolate its users from each other.
But this is flat out false, safe_mode is deprecated for a reason: because they, as usual, had no clue what they were doing. What you are thinking of most likely is chroot, all languages can "do this correctly" because everything can be chrooted. Even the cheapest shared hosting plans of the cheapest hosts still support CGI like they did 15 years ago.
For the most flexible yet proper methods of isolation on the runtime level you can only consider languages with environment specified evals, like Lua and Schemes that implement it. A JavaScript process is a sandbox on its own, but it can't make sandboxes with eval that I'm aware of.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-01 7:05

>>46
chroot
Not going to work on a server process that's serving multiple hosts.

Name: Anonymous 2013-07-01 7:10

>>45
How are loops more explicit and easier to understand than map? With map you see just what is done to each element, while with a loop you see needless machinery and boilerplate.

Name: Anonymous 2013-07-01 7:22

>>47
Fine then setuid

Name: Anonymous 2013-07-01 7:41

Je suis le perv

Name: Anonymous 2013-07-01 7:52

Why the fight between map and loops? Map is very specific while loops are general-purpose. Consider this: would you convolve with a map?

Name: Anonymous 2013-07-01 9:32

>>51
Yes.

Name: Anonymous 2013-07-01 11:09

Consider this: would you convolve with a wild pack of MY ANUS?

Name: Anonymous 2013-07-01 11:42

>>45
More explicit? Hilarious! You can contort the flow of control arbitrarily within any loop, whereas map, filter and fold will always do the same thing by themselves, and that's the point.

The rest of your comment gave me visions of epic works of copy+paste in the name of stack-frame preservation.

Name: Anonymous 2013-07-01 18:39

>>54
Preserve these dubs

Name: Anonymous 2013-07-01 19:20

>>45,47
There something called Jails, and SE Linux groups, that isolates user processes regardless programming language of choice. Even then Perl was there with almost all things needed to create pages and daemons for most of the work, that can be automated. If you need to embed script you can, in any language. PHP just solved the problem with the massive competition, utterly fuck anything that has been made with it.

Heck, you can even make simple limited VMs to provide all the necessary components you need for a client. That is why projects like OpenStack are getting so much poularity.

Name: Anonymous 2013-07-01 19:24

>>45
with syntax that's more verbose than standard Asm. Sorry, that's just FAIL.
YOU HAVE FUQIN ANGERED AN EXPERT PROGRAMMER

Name: Anonymous 2013-07-01 19:35

Cudder is an anus.

Name: Anonymous 2013-07-01 20:07

the reason PHP is so popular is because it's easy to lock down for a webhost that wants to isolate its users from each other
What the hell are you talking about? How does PHP help to isolate users from each other? You seem to have PHP confused with a security-minded programming language. You must not have gotten the memo.

Also, PHP is popular because it was the first HTML template language with a programming language built in, at a time when Perl, the then de-facto language for web programming, didn't have any decent template libraries.

You obviously weren't programming in the 90s, so please stop trying to rewrite history like you were there or have any idea what was going on.

Name: Anonymous 2013-07-01 20:25

>>45
Loops are more explicit, easier to understand, and are always inline (like they should be; they have practically 0 overhead and calling a function that just loops, which is what a map is doing, is needless overcomplication.)
You must have never written, studied or even read about Lisp compilers. Have you heard of tail-call optimization? Do you know what that is? Do you know what it means? Do you know how it's implemented? Go ahead and write an infinite recursive loop in Scheme. Run it. Wait for it to run out of stack. I'll wait...

What's that? Still running? No overflow? Now if you're such an expert on machine architecture, please explain to me how TCO is possible if the interpreter keeps making function calls. The mapper function can be inlined too, especially if it's a lambda or compound procedure.

Why don't you try using a Lisp compiler and studying it's output before demonstrating to everybody here that you don't know what the fuck you're talking about.

Name: Anonymous 2013-07-01 20:44

Name: Anonymous 2013-07-01 20:44

but I like Lisp and C

Name: Anonymous 2013-07-01 20:49

Name: Anonymous 2013-07-01 20:54

Name: Anonymous 2013-07-02 0:19

Name: Anonymous 2013-07-02 0:24

Name: Anonymous 2013-07-02 0:29

Name: Anonymous 2013-07-02 0:34

Name: Anonymous 2013-07-02 3:32

fuckin kike stop spamming

Name: Anonymous 2013-07-02 3:34

Not every compiler is smart enough to make the right decision when inlining map calls. And you may need to make the loop explicit if you want to use it well with inline assembly.

Name: Anonymous 2013-07-02 3:42

spambegone

Name: Anonymous 2013-07-02 3:42

spambegone

Name: Anonymous 2013-07-02 3:42

spambegone

Name: Anonymous 2013-07-02 4:24

>>70
If the mapper function is a lambda or primitive, inlining is basically guaranteed. You'd have to make great effort to ensure that they're not compiled inline. Only inlining compound procedures takes any real effort and there are plenty of Lisp compilers mature enough to make that effort.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-02 4:25

>>49
setuid to who? Certainly not root.

You can contort the flow of control arbitrarily within any loop, whereas map, filter and fold will always do the same thing by themselves, and that's the point.
So the point is to do more work than necessary, out of some pointless desire for "elegance" or something? With a loop, you can start and end at any point in the array, the points which actually need processing.

>>56 see >>47

>>59
You can configure PHP with very fine control over what functions are allowed, the maximum amount of time and memory, etc. This has nothing to do with "web application security", as a host you usually don't care if your users' sites get hacked since that's their fault, but you don't want that to down the server for everyone else. How are you going to do things like disable backticks (makes it too easy to spawn additional processes) without recompiling Perl, not to mention parsing itself is Touring-complete so even an analyser that tries to parse the scripts and strip out disallowed features would not be guaranteed to terminate! Perl was designed as a "glue language" which is why these things are easy to do, and hard to manage when you don't want your users using them. The same issue applies to all the other general-purpose scripting languages that got used for generating web pages.

>>60
Some C and C++ compilers do TCO as well. You seem to be assuming that ALL calls are going to be tail ones, when the exact opposite is usually the case. You smug lisp weenies always bring up TCO like it's the ultimate solution to everything --- and in some ways it is, since the language requires it for any nontrivial code to work! But if you ask me, needing an optimisation for it to be possible to do anything useful with the language at all is a big FAIL.

"Lisp is like a loli imouto. Cute and fun to play with, but you wouldn't want to ask her to do any heavy lifting."

Name: Anonymous 2013-07-02 4:47

>>75
TCO in C/C++ has some challenges, while they aren't show stoppers. One complication is stack allocated memory. If you pass a pointer or reference to stack allocated memory when calling a function in a tail position, performing tail call optimization could crash the program, since using the pointer would then refer to stack used by the tail-called function.


int f()
{
  int x;
  return g(&x); // Not safe to tail call.
}


A C/C++ compiler needs to prove that TCO is safe first, which can become non-trivial or impossible, but is usually straight forward.

Most tail calls get compiled to simple jumps within a local body. The real deal tail calls that make debugging difficult and program control flow so difficult to follow are usually not much worse than a normal function call. There might be some shuffling on the stack. I guess my point is not to confuse functional style with the other features of lisp that make it more difficult to get high performance code, with that being garbage collection, dynamic typing, or the theme of interpretation.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-02 6:40

>>76
That's easy. Just move x into g and take its address there. If its only having its address taken only to be dereferenced again (and no pointer arithmetic), then the compiler can even eliminate the indirection completely.

Name: Anonymous 2013-07-02 6:41

>>75
setuid to who? Certainly not root.
If you want to pass off as an expert, at least read up on what shared hosts actually do? I'll throw a bone: many hosts don't actually run PHP in-process for what is a server full of babby's first sites with no traffic. As far as CPU allotment goes from this setup, they just cut off and request the customer to upgrade on the few sites that actually get any traffic, as it is usually stated in their ToS.

You can configure PHP with very fine control over what functions are allowed, the maximum amount of time and memory, etc.
PHP is a thin wrapper over a bunch of cobbled together shit, it doesn't guarantee anything no matter what php.ini tells you. As far as I'm concerned the only real use of the time limit thing along with ignore_user_abort settings is to prevent the error log from filling the hard drive because of the combination of loops and PHP's shitty semantics that ends up creating unintended infinite loops.

usually don't care if your users' sites get hacked
Actually they do, depending on what they have for a setup, if it is an in-process setup compromised sites end up downloading payloads, which PHP happily obliges with its fopen wrappers, uses a vulnerability to hijack the server process and end up snickering at these silly time limits and memory limit stuff because now its just machine code with the web server's user id.

How are you going to do things like disable backticks (makes it too easy to spawn additional processes) without recompiling Perl
How is Cuddersoft Hosting solutions going to compete with 5$ hosts that provide CGI in their plan? As an example I just googled "hostgator perl" and theres a page on how to set it up on their shared plan. There's nothing here.

The same issue applies to all the other general-purpose scripting languages that got used for generating web pages.
Are you lumping Lua and Lisp's parseability with Perl as a reason to choose PHP?

Some C and C++ compilers do TCO as well.
That's nice, but how does that change anything? Writing C code that can only run because of the TCO in some random compiler would be sort of foolish. Whereas writing the same style in other languages where the language specification requires it basically makes the code properly conformant to the standard, runtime-wise.

But if you ask me, needing an optimisation for it to be possible to do anything useful with the language at all is a big FAIL.
How is it a fail that a language expresses a philosophy, actually follows it, and actually succeeds in its objective? You seem fixated on the word "optimization" and using it as a connotation, it is sometimes also called Tail Call Elimination, if that's more your fancy. This is very much like arguing that C is a big fail because it derives utility out of evaluation short circuiting on its boolean operators.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-02 7:19

many hosts don't actually run PHP in-process
mod_php is far more common in my experience than anything else.

which PHP happily obliges with its fopen wrappers
allow_url_fopen = 0

As an example I just googled "hostgator perl" and theres a page on how to set it up on their shared plan. There's nothing here.
I'm not saying there's no hosts out there that let you run CGI, but you're far more likely to get PHP support than anything else. Rather, try to find a host that has CGI but not PHP...

Are you lumping Lua and Lisp's parseability with Perl as a reason to choose PHP?
Are you illiterate? Did you just skip over this point, which is what the issue I'm referring to is about? "Perl was designed as a "glue language" which is why these things are easy to do, and hard to manage when you don't want your users using them."

How is it a fail that a language expresses a philosophy, actually follows it, and actually succeeds in its objective?
It has succeeded if its objective is to be as perverse as possible. Recursion via a function call is NOT the same as a loop, because that's not how real machines work. Just because some theorist with his head in the clouds (and possibly high on something) showed how they are in theory doesn't mean it's true in practice.

Name: Anonymous 2013-07-02 7:33

>>79
ew! disgusting.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List