Sign in to follow this  
evanofsky

Inventing on Principle - amazing video!

Recommended Posts

kordova    140
[quote name='swiftcoder' timestamp='1329775693' post='4914975']
[quote name='ddn3' timestamp='1329775272' post='4914971']
No I never got into functional programming, my brain doesn't work that way and it's actually harder to understand, for me anyways. I'm sure if your mathematically inclined, functional programming would come naturally but I'm not.. Closest I get to FP is some stuff i do in Lua.[/quote]
Functional programming doesn't have to mean LISP. If you've ever used the STL algorithms, a foreach loop, or a lambda function, you are using functional programming techniques.

And the STL algorithms are a great example of just how much trouble can be saved by applying functional techniques to a problem, even in a language that is generally not all that functionally-inclined.
[/quote]No one has used LISP since the 1980's. Lisp, or Common Lisp, [url="http://letoverlambda.com/index.cl/guest/chap5.html"]is not functional[/url].

Share this post


Link to post
Share on other sites
swiftcoder    18429
[quote name='kordova' timestamp='1330880071' post='4919205']
No one has used LISP since the 1980's.[/quote]
We still teach Scheme, and there is still a large body of projects using various dialects of Lisp - close enough. The capitalisation (or lack thereof) is irrelevant.

[quote]Lisp, or Common Lisp, [url="http://letoverlambda.com/index.cl/guest/chap5.html"]is not functional[/url].[/quote]
That was kind of my point. You can write in a 'functional style' in any language with rudimentary support for first-class functions. Pure functional languages themselves are a tad unpleasant to work with - nobody likes pedantry, after all.

Share this post


Link to post
Share on other sites
kordova    140
[quote name='swiftcoder' timestamp='1329891462' post='4915422']
[quote]
A system like that exists. (insert obligatory comment about Lisp doing it before everyone).[/quote]
It's a Turing machine, we get it. But quite frankly, whether in software or hardware, a Turing machine is still a Turing machine.
[/quote]
What does Turing-completeness have to do with anything? That we can accomplish this with any language/machine? Are we going to skip over the barrier to implementing something like this in most languages/OSs?

If that's all you have to say, I'd argue that you don't get it. LISP machines were (are) far from perfect, but there's something magical about being able to redefine/add/extend functionality to the editor you're using _in_ the editor you're using. Or your documentation browser, web browser or just about any other application, not to mention significant portions of the OS. Outside of tinkering with an ancient LISP OS, you can still get a feel for it from modern products like LispWorks and Allegro. I use MatLab and Visual Studio regularly, but some of the things I am able to do with LispWorks, despite a lot of clunkiness, can save a lot of time and allow me to bend the tool to me/the project as opposed to the opposite (or dealing with very chunky SDKs/APIs that still require re-compilation, etc). I once used a SmallTalk system, whose name escapes me, that encompassed similar ideas.

It's not necessarily dependent on Lisp, Common Lisp is far from my ideal Lisp, but there are not too many alternatives, yet. More languages are becoming "alive", in the sense that the compiler exists at runtime and you can poke around just about anything while it is executing, but we're not quite there. Certainly, most languages still do not encourage "dangerous," otherwise "unnecessary" functionality that compiler macros and vanilla macros provide for. I'm amazed that we don't see more of these living systems in Ruby, Python and Javascript. Demos like in the OP come up pretty frequently in smaller circles, but I'm still surprised we don't see more concerted efforts at "living" IDEs and the like.

Yeah, you _can_ do that in a lot of isolated contexts on Linux, OS X and Windows, but it is no where near as easy or as significant as it was when it was a genuine focus. Turing-completeness is entirely irrelevant to that line of discussion.

[quote name='swiftcoder' timestamp='1330887228' post='4919234']
[quote name='kordova' timestamp='1330880071' post='4919205']
No one has used LISP since the 1980's.[/quote]
We still teach Scheme, and there is still a large body of projects using various dialects of Lisp - close enough. The capitalisation (or lack thereof) is irrelevant.[/quote]I know, I use Common Lisp professionally. Even in the CL, Scheme and Clojure communities, LISP is understood to be the historical thing the past and Lisp is generally accepted to mean CL, unless otherwise stated.

Share this post


Link to post
Share on other sites
swiftcoder    18429
[quote name='kordova' timestamp='1331083947' post='4919947']
there's something magical about being able to redefine/add/extend functionality to the editor you're using _in_ the editor you're using.[/quote]
And in the few areas that turned out to be a reasonable end-user feature, I can still do that (i.e. emacs).

I really don't get your and Antheus' fascination with being able to do this at every level of the OS - it just strikes me as a maintenance/stability nightmare. What exactly is wrong with having this sort of functionality implemented in user space (and entirely ignoring the underlying kernel/hardware layers)?

Share this post


Link to post
Share on other sites
Antheus    2409
[quote name='swiftcoder' timestamp='1331132194' post='4920073']
I really don't get your and Antheus' fascination with being able to do this at every level of the OS - it just strikes me as a maintenance/stability nightmare. What exactly is wrong with having this sort of functionality implemented in user space (and entirely ignoring the underlying kernel/hardware layers)?[/quote]

Same reason why I want ability to put together my own PC from scratch. Or car. Or house. Or being able to take one of those apart.

Doesn't mean I'll do it, but I like to know ability like that exists.

In software, that's almost completely gone, even for developers.

Share this post


Link to post
Share on other sites
kordova    140
[quote name='swiftcoder' timestamp='1331132194' post='4920073']
And in the few areas that turned out to be a reasonable end-user feature, I can still do that (i.e. emacs).
[/quote]
I don't think this was some logical progression where the other ones were weeded out. It's more that for various reasons (not all technical, though those were there as well) that avenue of exploration just ceased almost altogether. Emacs isn't really a great example, because without integration, you end up with what it is now. An independent mini-OS sitting in your terminal. It does not play nicely nor is it consistent with the window manager,


[quote name='swiftcoder' timestamp='1331132194' post='4920073']
I really don't get your and Antheus' fascination with being able to do this at every level of the OS - it just strikes me as a maintenance/stability nightmare. What exactly is wrong with having this sort of functionality implemented in user space (and entirely ignoring the underlying kernel/hardware layers)?
[/quote]Well, I'd also point it out as security nightmare, though I'd estimate most machines are effectively single-user anyway. To answer your question, there's nothing necessarily wrong with what you are proposing, though when we mention the entire OS, we are probably including the UI which may run but is not actually modifiable in user space. Depending on your profession, access to exactly how interrupts are handled, redefining/hooking into any/all system calls and the underlying hardware might have non-academic benefits.

Share this post


Link to post
Share on other sites
Antheus    2409
[quote]though when we mention the entire OS, we are probably including the UI which may run but is not actually modifiable in user space[/quote]

That is just an arbitrary division. Hiding the code that performs file write through to disk doesn't affect security.

[quote]I'd also point it out as security nightmare[/quote]

Security is a process. No tech makes anything secure by itself. For consumer, access to that might not matter. But most of this tech isn't available to developers. Even Google couldn't gain access to Flash, for example, and it would be hard to argue that they lack motivation, money or leverage.

With that said - kernels today are opaque and buffer overflows are still an important vector of attack, they are discovered even in JS engines.

Only thing that holds is that security through obscurity (aka let's hide this under layers of abstraction) doesn't solve the problem no more than exposing these parts weakens it (aka open source).

If security matters, all of these parts are opened anyway, even proprietary software needs to often be disclosed for review.

Share this post


Link to post
Share on other sites
ddn3    1610
[quote name='Antheus' timestamp='1331149475' post='4920166']
[quote name='swiftcoder' timestamp='1331132194' post='4920073']
I really don't get your and Antheus' fascination with being able to do this at every level of the OS - it just strikes me as a maintenance/stability nightmare. What exactly is wrong with having this sort of functionality implemented in user space (and entirely ignoring the underlying kernel/hardware layers)?[/quote]

Same reason why I want ability to put together my own PC from scratch. Or car. Or house. Or being able to take one of those apart.

Doesn't mean I'll do it, but I like to know ability like that exists.

In software, that's almost completely gone, even for developers.
[/quote]

I don't think it's gone, you could get a commodity level blank PC like the Raspberry or build one and flash it's bios with your own custom bios to boot up your own custom OS which allows you to run code in ring 0, but that's alot of work, for very dubious gain. Having the ability to "hack" the execution flow, permutate data and code on fly and have execution safety all on one, that's a major technological challenge, if your not willing to run VM sandboxes everywhere. And even then it's all based on a premise that this is a "better" way to develop programs, which I don't even think it is.. Truthfully there is nothing stopping anyone from doing this, if they wanted too..

Good Luck!

-ddn

Share this post


Link to post
Share on other sites
Antheus    2409
[quote name='ddn3' timestamp='1331157989' post='4920217']
I don't think it's gone, you could get a commodity level blank PC like the Raspberry or build one and flash it's bios with your own custom bios to boot up your own custom OS which allows you to run code in ring 0, but that's alot of work, for very dubious gain. [/quote]

Yes, for the fifth time in this thread, one needs to go to extreme measures to gain sufficient insight, because most widely available platforms (aka cheapest and ubiquitous) no longer provide it.

It's also the same thing if you build your own engine that supports discussed functionality - it will be built from scratch for that particular purpose. Instead of messing with BIOS, one will be messing with integrating an interpreter or resource manager, but there are plenty of those available today - completely open, not as binary dll.

[quote]And even then it's all based on a premise that this is a "better" way to develop programs, which I don't even think it is.. [/quote]

Web is built on open stacks. I find it would be hard to advocate that choosing a closed stack there would offer more benefits and numbers support that. The reason is simple - when your service goes down, waiting for vendor to integrate their next fix into service pack 3 months from now won't help.

It also raises an interesting proposition. While those companies clearly benefit from open nature, the services they provide are not necessarily open.


Ironically, many VS developers swear by Resharper and Eclipse community is all about plugins. Microsoft is going to great lengths to open their development stack while struggling to retain complete control. So apparently there is commercial interest, even though these tools are used predominantly in IT which isn't known for technical prowess.

Share this post


Link to post
Share on other sites
kordova    140
[quote name='Antheus' timestamp='1331153641' post='4920190']
Security is a process. No tech makes anything secure by itself. For consumer, access to that might not matter. But most of this tech isn't available to developers.
[/quote]I agree with this and your other statements. I meant this more in the context of swiftcoder's more conventional concerns about maintenance and stability. The notion of complete look through and ability to recompile on-the-fly any component from hardware drivers up on a multi-user system lends itself to security concerns. LISP OSs avoided this discussion by being single-user systems.

I wouldn't personally actually be concerned about security in the domains where I'd find this useful.

Share this post


Link to post
Share on other sites
swiftcoder    18429
[quote name='kordova' timestamp='1331185859' post='4920327']
I wouldn't personally actually be concerned about security in the domains where I'd find this useful.[/quote]
I think this in itself is an the heart of the issue.

Consider a LISP machine (designed from the ground up to give maximum flexibility to the developer), versus iOS (designed from ground up for end user experience). Each serves it's own purpose well, but the purposes are entirely distinct.

In the context of a modern consumer device, we have to surrender flexibility in certain areas in order to ensure end-user experience. Third party apps must be sandboxed, so they cannot disrupt battery life, network stack, or monopolise user interface, etc.

That doesn't imply that certain LISP machine concepts aren't useful in user-space. Increased introspection and debugging support all to the good.

Share this post


Link to post
Share on other sites
ddn3    1610
[quote name='Antheus' timestamp='1331166859' post='4920255']

Yes, for the fifth time in this thread, one needs to go to extreme measures to gain sufficient insight, because most widely available platforms (aka cheapest and ubiquitous) no longer provide it.

[/quote]

When did they ever provide this level of development? LISP machines? I don't think LISP machines provided anywhere near the level of interactive execution and procedural programming we're discussing ( nothing I've found on the Internet or from reading Wikipedia anyways). Nothing like this have been developed yet, only glimpses here and there. If this is to be a reality the hard work has to be done and it's fully possible as I laid out, there are no hardware or software barriers. It would be nice to leverage existing technology but nothing has been developed like this, well maybe Haskel and their advance functional programming models comes close..

-ddn

Share this post


Link to post
Share on other sites
kordova    140
[quote name='ddn3' timestamp='1331246740' post='4920525']
[quote name='Antheus' timestamp='1331166859' post='4920255']
Yes, for the fifth time in this thread, one needs to go to extreme measures to gain sufficient insight, because most widely available platforms (aka cheapest and ubiquitous) no longer provide it.

[/quote]

When did they ever provide this level of development? LISP machines? I don't think LISP machines provided anywhere near the level of interactive execution and procedural programming we're discussing ( nothing I've found on the Internet or from reading Wikipedia anyways). Nothing like this have been developed yet, only glimpses here and there. If this is to be a reality the hard work has to be done and it's fully possible as I laid out, there are no hardware or software barriers. It would be nice to leverage existing technology but nothing has been developed like this, well maybe Haskel and their advance functional programming models comes close..

-ddn
[/quote]
Take a running process that you didn't write, say your filesystem browser. You can point to that, stop its execution, be directed to its source code, modify bits of it and interact with it without ever relaunching anything. To a deep extent, you can dive into system calls as well. That was implemented. It is implemented in a smaller way (for obvious reasons) in Allegro CL and LispWorks. Probably also the Mac Clozure IDE, though I have minimal experience with that.

Share this post


Link to post
Share on other sites
ddn3    1610
[quote name='kordova' timestamp='1331317169' post='4920729']
Take a running process that you didn't write, say your filesystem browser. You can point to that, stop its execution, be directed to its source code, modify bits of it and interact with it without ever relaunching anything. To a deep extent, you can dive into system calls as well. That was implemented. It is implemented in a smaller way (for obvious reasons) in Allegro CL and LispWorks. Probably also the Mac Clozure IDE, though I have minimal experience with that.
[/quote]

[left]Sure glimpses and pieces have been done, VM sandboxing, in memory modification, runtime configuration, state dumping, etc.. all the pieces are in themselves not super difficulty, its combining all the pieces into a cohesive system built around a unified theory of programming ( in this case procedural programming centered around reversible execution and state splitting ). More to Antheus point, that's at the software level, to get the nitty gritty u would have to support this at the OS level and my point is there is no OS nor there ever was one which allowed this, you'd have to write a whole new one.. imo.[/left]

[left]-ddn[/left]

Share this post


Link to post
Share on other sites
Antheus    2409
[quote name='swiftcoder' timestamp='1331190987' post='4920340']
Third party apps must be sandboxed, so they cannot disrupt battery life, network stack, or monopolise user interface, etc.[/quote]

Solving the wrong problem. Battery life? Just peg the CPU. Network stack? Max the traffic. Sandboxes don't help.

If anything, both of these raise questions which are currently not being addressed by sandboxes, nor are they all that relevant.

Aside from a little fun for script kiddies, there is no money in draining the battery. Important questions deal with data, not hardware. Is there a way for some piece of my personal knowledge (bank account, email password, ...) to be shared with people I didn't intend to. That's a very hard question to define since it's hard to define exact relations between those pieces.

Why is iOS perceived as safe? Sandbox? The approval process, semi-automated "many eyes".

We have static analyzers, but hardware is a bit too complex and software not even remotely structured enough to allow automated proof preventing above issues. Instead of trusting some external gatekeeper, just prove that downloaded code doesn't violate any of given constraints (obvious complexity problems arise).

Web shows both sides of sandboxing. On one hand, if you take enough things away, sandbox becomes fairly secure. At same time, HTML5 has the ability to crash the OS (driver and JS VM related bugs through JS or canvas or WebGL).

Or, look at recent DNS block incident in a fully web-based form software. Some people decided to use the service for phishing by faking forms from banks.

Hardware/kernel exploits may sound attractive, but really aren't all that interesting. They definitely limit certain attack vectors, but still rely on user to make a judgement call - someone who roots their phone or perhaps installs untested software is just at same risk.

Sanboxes and other technologies are abstractions. Abstraction is a means, it doesn't need to hide or obscure underlying layers. That may mean different things in different context, sometimes allowing access to lower levels, or perhaps just having full access to source is enough. In some cases, hiding underlying layers may be beneficial, but just about all of the barriers today are for commercial reasons, not for sake of security or improvement of user's experience.

Process is all that matters. Phones are safe because of process, not because of tech. Similar to web, where security/safety depends on credibility of company. Despite one of most robust sandboxes, web remains one of least secure platforms for stuff that matters.

Another interesting aspect is game theory and determining how trust works and how risks are mitigated, which does answer why magic sandboxing is very viable solution - but unfortunately one that many take for granted: "How could this happen, I did ....".

Share this post


Link to post
Share on other sites
kordova    140
[quote name='ddn3' timestamp='1331328526' post='4920764']
u would have to support this at the OS level and my point is there is no OS nor there ever was one which allowed this, you'd have to write a whole new one.. imo.[/quote]
There was/is something that did exactly what I was describing, though to say "is" I have to concede that while you can buy it and get it to run, it is extremely dated, if not "dead". It is Genera OS.

Share this post


Link to post
Share on other sites
ddn3    1610
We'll i stand corrected, Genera OS does seem like it might fit the bill, being a Lisp machine driven by low level Lisp code, OS coded in Lisp itself and drivers, if it allows you to hack its execution and roll back and permutate the state, then it would be perfect for exploring this programming paradigm (other than being written in Lisp :) )..

-ddn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this