Are there any styles of low-level programming that aren't based on pointers/references...

Are there any styles of low-level programming that aren't based on pointers/references, or is it simply a fundamental building block of computing? Are there any alternative approaches that don't involve values pointing to other values in memory and offsets?

Attached: 800px-Pointers.svg.png (800x888, 73K)

no
are you retarded

Brainfuck. Actual brainfuck machines can and have been built.

you’re retarded or a C”S” major

yeah punch cards

have a gigantic cache and do everything using pop/push

>

good luck writing any program that doesnt use memory

No.

Attached: brainlet.png (645x729, 77K)

the bigger the stack is the slower it gets though

Forth is a purely stack based language so, kinda.

>it simply a fundamental building block of computing?
yes

>Are there any alternative approaches that don't involve values pointing to other values in memory and offsets?

Yes, this.

Attached: 1455080221662.jpg (607x640, 45K)

That wasn’t the question retard

to access memory you need pointers

no
you literary can't do anything without it

brainfuck uses pointers. ">" and "

go ahead and explain to us how you access memory without pointers.

Attached: brainletcastle.jpg (645x1000, 107K)

Depends what you mean by low-level. I will assume you mean programming at a near-hardware level. Nearly all hardware in common use today is oriented towards the standard model of using memory and pointers, because C and assembly programs have traditionally required it. Yes, there are exceptions such as Lisp machines and even fake hardware like "virtual machines", but they're the exception to the rule.

But of course, there are other paradigms in programming. There is object-oriented programming, where your system consists of objects that communicate by sending messages and so on. This is usually implemented at the higher level, but it could probably be done at the low level if we constructed computers in an object oriented way.

There are also stack-based languages, which don't rely on pointers and references, but simply keeping track of memory values pushed into a stack. This could also in theory be done in hardware but we haven't bothered changing computers because the current model is good enough.

There's still room for improvement and we really don't have to stick to the modern von Neumann architecture anymore. It's just that people don't tend to question how things could be different, so we need creative people like OP to think outside the box and see if we perhaps could push computers in some new exciting direction. After all, today's computers are not without their faults (you might have heard of the fatal Spectre/Meltdown bugs that were revealed last year). For all we know, we could be missing out on something much better.

is this some elaborate troll

One of them is and maybe the other one, references in object oriented programming is just obscured pointers

Attached: 1517769653500.gif (320x320, 240K)

I was not trolling. Yes, when you compile a C++ program, you'll find that it uses obscure pointers because that's how it's implemented in Assembly. Assembly language works in a procedural way, so we have to emulate object-oriented features such as virtual method calls and object instances. If hardware and Assembly was object-oriented, we wouldn't need to emulate.

>low-level programming
It's very much about memory and pointers.
>a fundamental building block of computing
They are a fundamental part of modern computers, not computing overall as that is a very abstract thing. Theory of computation is a more mathematical thing with many different approaches. Functional languages build upon lambda calculus which is one of models of computability. There have been some projects to make hardware for reducing lambda calculus (I know one called Reduceron) but I have no idea how well that works or actually how it operates at all. Modern compilers actually handle strict lambda calculus quite well. Non-strict evaluation is much more tricky but we got to the point where it's actually acceptable (about as efficient as many other high-level languages).

What the fuck does object-oriented hardware even mean? Do you have any idea what you're talking about?

It means you buy a bunch or arduinos and make them call each other.

OOP is built on top of pointers
all things are, memory has physical existence and thus needs to be addressed

NO, build me a memory architecture that DOESN'T use addresses for memory!

But what if instead of addresses you had a hardware-implemented hashmap name -> value?

Yes. If you write your program as the lambda calculus and evaluate it by hand. No pointers required.

>a hardware-implemented hashmap name -> value?
in other words, an address?

you even drew a pointer ffs

You still need a stack pointer.

In fairness, stack pointers are easily implemented in hardware.

The anons in this thread are all wrong.
'Pointers' to 'memory' are fundamental to Turing machines, but not to other mathematical models of computation.
As it happens though, the Turing machines are the only model that has ever been implemented in pracise, so you most likely never program in any other model. So the anons are practically correct after all.

Object oriented hardware would simply have features like type tags for pointers, making it so that even at lower levels it's impossible to treat data in memory as 'just memory'. The processor would see the contents of memory as objects rather than a collection of bits with its meaning stored somewhere else.

>memory has physical existence and thus needs to be addressed
In other words, in order to have no need for pointers, your computer would need to not have state.
State is inherent to Turing machines, but not to lambda calculus.

KEK

Yes, that's how things are right now. Or did you mean we couldn't have OOP without pointers? I'm imagining something like what humorously said. Something like a hardware version of Erlang processes could be a way to implement OOP in hardware, since they can all have their own memories and communicate through for example interrupts as messages.

Again I haven't seen anything like this implemented in real hardware so it's just an example of how computers might work in the future. You might be familiar with the grid of computers from the game TIS-100 (worth checking out anyway), it's sort of related to this idea.

Wow, a not retarded, autitsic, "imm uh smart you bad haha" answer! Nice, user

>Jow Forums thread turns into a cesspool with morons calling other morons retarded instead of discussing the subject
It's all so tiresome

Anything that exists in physical space has a location in physical space and therefore needs to be addressed. You can make a different architecture and call it an OOP machine or whatever but those objects will still need to be stored in a finite location

The one counterexample I know of is stack machines. They don't need addressable memory, and work simply through push/pop operations. Shows that there are other ways of computing we could still explore.

>They don't need addressable memory
yes they do. they use one address, the stack pointer

No. You can't really perform arithmetics on names (you could define some operators but these would be a bit far-fetched) and can't refer to an arbitrary name to get garbage.

Isn't TIS-100 Turing complete? And it seems pretty low level, doesn't that count as a system without pointers?

An analog computer, they aren't practical outside of specialised tasks though.

That's still an address. And everything stored by a computer is a number, so you can perform arithmetic on it

If you interpret a pointer to be wherever the head is on the tape, then no.

i've been programming without electricity for years

>using an associative container for a sequential container
but why?

Well, computers nowadays implement stacks often by using one register as the stack pointer (esp in x86). A hardware stack machine wouldn't necessarily need that (AFAIK).

It seems to be Turing complete

Attached: Screenshot_20190115-013304.png (1440x869, 132K)

See kids? This a good example of trolling is a art

>That's still an address.
What's an address? It seems that you call any set of distinguishable things addresses. Would you say that any kind of label is an address as long as the labels are unique?
>And everything stored by a computer is a number
Everything stored by a modern computer.

Well you will not need to refer to a specific location if you're using something like a stack machine, right? See my answer to

If you could make a computer out of cellular automata or the lambda calculus maybe

Now that I think about it, you could make some sort of CPU with a single register that works like a shift-register, and use that as a stack.

>cellular automata
rows of memory cells being somehow fundamentally different

>Well you will not need to refer to a specific location if you're using something like a stack machine, right?
yes you will because the top of the stack has a physical location which needs to be kept track of

>Are there any styles of low-level programming that aren't based on pointers/references
Yes.
>or is it simply a fundamental building block of computing?
Yes.
>Are there any alternative approaches that don't involve values pointing to other values in memory and offsets?
Yes.

Depending on the configuration, you probably won't need to keep track of the top of the stack as you would if you were writing in traditional memory computers. The stack can be implemented as a shift register or a wheel with memory slots for example.

I guess you could rotate all the memory instead of changing the pointer, but you're achieving exactly the same thing as a pointer, only less efficiently

yes

in FPGAs and analog computing you can use delay lines and/or networks that don't rely on pointers, but timing instead.

All low-level programming is going to use pointers. This is just a property of the architecture of real computers.

t butthurt computer engineering major

Would be very hard. Not because I believe they are theoretically impossible but because of the limitations of the human mind. It's hard to explain without writing a long post, but pointers / arrows are ingrained in our brains. It's how we think about most things.
I do think that given a non-pointer based architecture we could reverse engineer it, but we would also never be able to develop an intuition for how it works. It's how you learn to work in R^n in algebra but you will never be able to envision a construction in spaces greater than 3.
The human mind is highly capable of working with abstractions but the beauty of pointers is that they are very concrete, almost tangible. A non-pointer architecture could never be so intuitive. So unless it happened to have such a great advantage that we had no choice but to use it, it would never catch on

what

Based

this is autism