You should really investigate forth, Sup Forums. It's a superior languages for hackers who know what they're doing

You should really investigate forth, Sup Forums. It's a superior languages for hackers who know what they're doing.

Other urls found in this thread:

en.wikipedia.org/wiki/RTX2010
forth.com/starting-forth/
mpeforth.com/arena.htm
repl.it/languages/forth
sifflez.org/lectures/ASE/C3.pdf
twitter.com/SFWRedditImages

MOMMY

forth is great, u guys think temple OS is nuts... try colorforth on the GA144 puts terry davis to shame. Chuck moore built his own 144 core processor to run his own gay little language, its a lot of fun and you can understand it right down to the logic gates its so simple. C just turns you into a schitzo and makes you think cia niggers are following you

Isn't that like the only 144 core processor in existence?

I have. It's pretty neat, I just haven't bothered learning it. I do use it here and there when I'm configuring shit in Open Firmware.

I don't know how people delude themself into believing that forth is actually a good language.
It's complete and utter trash.

yeah probably, the only one i know of thats truly 144 independent cores with their own memory and asynchronous communication between adjacent cores. Its pretty obvious this is the future, the ability to have an unlimited amount of computers available to pipeline algorithms in parallel across a 2 dimensional grid, later even 3 dimensions, you could do matrix multiplications in parallel faster than an other computer on the market the fft algorithm will become obsolete on a computer like that. The forth language is the only one simple enough to do something like this on a large scale, too bad chuck more is a retard and doesn't know how to market a product he could have sold a lot of them. His chips are slow anyways, i think the concept will be grabbed and implemented on much faster fpga chips that could simulate thousands of cores.

I wouldn't use forth in any serious capacity. I however do not regret learning forth, since knowing it came in handy in other projects. It's strongly recommend that serious programmers learn it (or any other similar stack-based programming language).

kek, thats like saying PIC assembly is complete trash its just low level. Forth is the most purely structured low level language, so pure it gets confused for being on par with languages like C because its so powerful but its really just a step away from assembly

also if forth is utter trash, what language is the best? inb4 c++

>PIC RELATED

fucking retard, R is great, so is matlab, but when you want to actually work at the hardware level you have to start with assembly, and try writing R in assembly. The point of knowing forth is to future proof your programming skills, it anchors you to the hardware and in fact is so simple that it dictates how to build the hardware as chuck moore did on his own processors. You can get up and running from assembly to a high level in just a few weeks with forth starting from complete scratch. Its not so much a language as a new way of organizing a computer from the logic gates up, you can write any language you like in forth, you can make any datatype you want, you can change its syntax to just about anything you like there are no restrictions, fucking plebs...

This is exactly my point. If programming in c is like wearing a condom forth is like a thin sheet of silk.

> : dope ." dope, plebs will never understand its beauty" ;
>: exactly ." forth is fucking" dope ;

What is it useful for in the modern day? Serious question

its used all the time in industrial control, its the easiest language to write new drivers in for motors and sensors. Incredibly easy to debug because you don't have to compile it ever you just slowly grow your dictionary and test it out in real time. Also nasa uses it.
see en.wikipedia.org/wiki/RTX2010

For anyone interested in giving it a try. Start by reading this
forth.com/starting-forth/

a really nice version to start learning on
mpeforth.com/arena.htm
it says free trial but there is only a 5 second splash screen for a great well maintained forth implementation for windows and linux

there's also repl.it/languages/forth

wow thats pretty fucking cool, even has floating point support. Would be a good place to start too although really the best place to start is on a microcontroller, because until you see the ability to read input pins in real time its hard to grasp why its so useful. Just imagine all the time spent compiling and making small changes in a C program while your motor went crazy and jumped all over the place, then imagine doing all that in real time without having to compile and make changes all the time you can see the value of forth

nvm no floatting point yet on repl.it, don't need it to learn forth though, and easy to implement if you do need it

M A N L E T
A
N
L
E
T

Yeah I don't think ans forth has floating point but you can implement that datastructure pretty easily. Just when it is sitting on the stack it won't look like a float it will just look like a series of ints.

But with your own datastructures you can implement as much precision as you'd like

I would make a new stack in a different place and define new words like fsin to use a different stack pointer

: kek ." That's rust, not R... " ;
kek

Yeah all you need to make a new stack is to implement linked lists and make a variable that points to the head of that linked list.

You can have as many stacks as you want in forth in this way and have multiple languages running at once in a round robin

hmmmmmmmm

>"Rust is syntactically similar to C++, but is designed for better memory safety while maintaining performance."

aight rust is still for pebs but ill have to check it out sometime

Thats interesting way of doing it, so you could make stacks that never bottom out too might be useful for something. I've also been thinking about messing around with matrices as stack elements, the reverse polish notation seems very natural for non commutative operations where you can really only write things one way

If you want memory safety get the hell out of this thread

Yeah for example lets say you wanted to program in the "functional programming" sense in forth. In functional programming the output of one function becomes the input of another. But if you want to store like 10,000 things on the stack you will run out of room in ans forth and thus you can use a linked list for that.

That being said ans forth has a very very large stack so you are in a sense doing something wrong if you receive a stack overflow.

One of the goals I had when I started programming was to "hop" between languages. So I could be in perl and type a function and hop into javascript and type another function and hop into c and then hop back into perl. Not in terms of the efficiency but in terms of using syntax from different languages. Forth in a sense offers a way to do that because you can have many stacks of many languages all in one.

You can have multiple forths going at once and switch between stacks as well.

This is good for example if you want concurrency because rather than making separate forth processes you can simply do a round robin (providing you have a fast enough processor).

>this

or if you use the GA144, no need for round robin. I think this is the most natural way to use forth. infinite forth cores running many different languages at different levels of abstraction. Different parts of the program could be in C other parts in forth, you could have a layered array of processors all in whatever language programmers felt comfortable in

>you are in a sense doing something wrong if you receive a stack overflow

also an understatement. If the output of one function becomes the input in another why would you ever need more than a variable and a pointer to pass between functions.

but still I sometimes abuse the stack for storing data when I can get away with it just cuz its so convenient

Yeah you could do this with pointers and this is probably better than storing ten thousand things on the stack yet just for a thought experiment you could have an infinite stack if you had a linked list and infinite ram

Same goes for

This is exactly what a CIA nigger would say
FUCK OFF

right, especially if you want to shit out some massive recursive tree it could be convenient

How hard is it to implement forth in C?

i practically end up with a forth like language everytime I work with serial data in C, its just natural for input and output. So very easy and practically the only thing C is good for imo

sifflez.org/lectures/ASE/C3.pdf

All you basically need is a linked list and functions that operate on that linked list, and then a function to define new functions.

Than you make an interpreter so you can type it in forth instead of c. It's maybe 2000 lines.

Corollary: very few hackers in fact know what they're doing, especially the ones who think they do.

FORTH is... think I used it back in the '80s. Calling it a language is a stretch: it's a stack with keywords glued on.

It is worth learning for the same reason an assembly language is worth learning, and LISP is worth learning. And it's wonderful how small you can write an interpreter for it because of how absurdly simple it is. OpenFirmware should have won over UEFI.

If you're not in embedded, you probably shouldn't be actually using it in 2017.

also I once wrote a few math functions in brainfuck with a forth like stack machine, its amazing how quickly you get up and running

>Than you make an interpreter so you can type it in forth instead of c.
Wait so what happens before making the interpreter?

>OpenFirmware should have won over UEFI
All of my this. Open Firmware even enables platform-independent drivers to be stored on expansion cards. Shit's awesome.

>If you're not in embedded, you probably shouldn't be actually using it in 2017

if you're not in embedded you're not a programmer you're a secretary

C or assembly usually

There are a few components here.
>a linked list
>a function that pushes from the linked list
>a function that pops from the linked list
>functions that add math like + - / and * based on the linked list in the forth style (see starting forth if you don't know what I mean)
>a dictionary
>the ability to save and store from memory.
>the ability to define new words
>if statements
>loops

Once you've got that built you build a finite state machine out of a switch that takes strings and uses it to call those functions. If the string is not in the cases of the switch then you look it up in the dictionary, and if it's not in the dictionary you try to parse it is as an int. If it can't be parsed as an int you throw an error.

nice description, i've got to write my own forth sometime. I'll call it /forth/chan official language of the worlds largest underwater japanise basket weaving website

forth is superior c is inferior

Imagine having to reflash your microcontroller over and over and over again rather than editing it's code live like it was a shell in an operating system.

Cause that's what forth is, a shell and an operating system in as little space as possible

sounds cool

i like this thread

4ch is trying to make forth a meme

>Imagine having to reflash your microcontroller over and over and over again rather than editing it's code live like it was a shell in an operating system.
Where exactly are you putting the code once you're done editing it?

Look up amforth and how they do forth microcontrollers

Yes I have watched Chuck's FORTH talks too.

Forth is really cool, but if you like forth try Factor which is basically Forth for modern systems.

The best Forths run on bare metal of course.

chuck made a spectrum analyzer with it in a few weeks just as an experiment to see what his processor could do

chuck is based as fuck

God I wish that were me

What is this fetish and why do I want it

Go to /d/
Find Giantess/Size
Tell them I sent you, they'll understand

>not lisp
>not smalltalk
>not pony
>not hoon
:|

I just can't get rig of the feeling that Forth could be implemented as lisp.