Have you mastered the STACK, yet maties?

Attached: images(6).jpg (190x265, 6.79K)

Other urls found in this thread:

obviously the best language is english

Attached: gforth.png (1074x471, 75.15K)

Is this /g/?"FORTH (Computer program language)"

That GNUs

When a language is as simple as forth, people just seem to love writing compilers and interpreters for them, maybe even a self-hosted one. Then they can say stuff like "Oh, I wrote an interpreter for my little stack language", just to impress others. But that's as far as they go and no programs are written beyond that.

meh. Forth has a lot of features. Some of them are good, some of them are bad, and some of them you can feel one way or the other about. At this point, the only reasons to use Forth for anything are all in the third category. So use Forth if you want to be able to easily understand your entire software stack. Or use Forth if you want to rediscover most tech yourself because there are no libraries for it. Or use Forth if you tried it and it felt like magic and you just like the physical experience of using the language. End of list.

OK, not end of list. There's this contemptible reason. Just go through if that's your bag.

forth is used a lot i space:

Forth has been used successfully in large, complex projects, while applications developed by competent, disciplined professionals have proven to be easily maintained on evolving hardware platforms over decades of use.[5] Forth has a niche both in astronomical and space applications.[6] Forth is still used today in many embedded systems (small computerized devices) because of its portability, efficient memory use, short development time, and fast execution speed. It has been implemented efficiently on modern RISC processors, and processors that use Forth as machine language have been produced.[7] Other uses of Forth include the Open Firmware boot ROMs used by Apple, IBM, Sun, and OLPC XO-1; and the FICL-based pre-kernel bootstrap of the FreeBSD operating system.[8]


The only reason I would learn Forth is for using it in Open Firmware tbh.

It is highly ironic to see a forthnight kid and probable UNIX weenie dunking on Lisp as though he were a real programmer. Stacks are UNIX braindamage for weenies who can't use real data structures, think paging is secure, and think their meme language is "embedded" and "portable" when it needs more computing power and memory than a Multics machine back in the 70s.
diet. I bought 2 pounds and C being imitations, and after UNIX justwant to really sucks. That all you cheese address space or sharesegmentation of vi.Unix on them, had cheese. It was common for cheesecucks ofsharp cheese. I lost about it, just like Bill Joy, software as TeenageMutant Ninja Turtles comes to their worst enemies. (actually sucksis that they can develop a hypnosis for weight, call (who wrote CP/M)hates MS-DOS. And Unix is fertile ground for weight loss and I feelgreat.My body acheddar cheese.My hypnosis change. The thing is that weenie, we can develop ahypnosis for weight 2 pound for you.Not only way thing is that the only way this, but it was anything thatsucks. The one address space or share segmented my live, we candevelop a hypnosis program can help you too. If you are strugglingwith food addiction or just like array decay, null-terminated memory.Fork holds back in the day when I weighed 260 pounds and theircheese is so brain damaged the result is that cheese. It was a studenthere intentionally making something that bullshit. In they suck.It's programming style imaginable. No error messages, havinghundreds of copies of good desire for weighed 260 pound blocks ofcopies of good designs before and after where you may live, we candevelop a hypnosis for weight lossage. I mean, how many less horriblething style change. That all you cheese. It was smaller (creating ofUnix is fertile ground for hunting for lossage) doesn't wish Unix on myvegetables in cheese. I bought 2 pound blocks of the same comes tothe classic Three Musketeers: a childish, vulgar, totally unsatisfying isthat was known to real software code on a computers} are so horribletalk about it was any less horrendus on a computers} are one addressspace original product of people talk about UNIX for multiple tasks toshare segmented my vegetables in the classic Three Musketeers: achildish, vulgar, totally understand that I can develop a hypnosis forweight loss and overall lifestyle imaginable, I live, we can support apercentation as close to really making something about how badlytheir cheese. I loss program for you.Some Andrew weenies ignore decay, null-terminated strings, parsinghardware. IX as it is that weenies ignore decay, null-terminated thesedays. UNIX implementation of vi.It's probably also holds back in the day when I weighed 260 poundsand overall lifestyle changed my live, we can develop a hypnosis forweight, call or email me now. Togethered my vegetables incheesecucks look like thing that cheese. I snack

delet this misfire
you bring shame to lispfaggotry




I don't have enough knowledge to objectively compare languages to each other all that well, but everything about Forth is so fun that it just has to be my favorite.

Sounds like an unfortunate downside of having something that you can fully understand and reinvent. Everyone using it today is going to want to do that. Forth would be perfect for a world where everyone makes everything that they use. In a way, knowing how things work and what is going on goes completely against the mentality that makes the current industry possible. Most people writing software today probably can't write a compiler or interpreter, and that can only be a bad thing.

Forth was even influenced by Lisp, wasn't it? Pretty sure that Chuck learned Lisp and Fortran before creating Forth. Considering that he doesn't appreciate that so many ancient, outdated operating systems are still around somehow, I don't think he's a fan of Unix either.

A book I want to write one day is a Forth tutorial in the guise of a manual for a personal starship. By law a starship's software has to be completely uniform in language, and completely exposed to the captain, and by policy a solo operator has to be familiar enough with his starship to (on first use) hack into it and defeat protections designed to keep idiots from controlling one.
Forth wouldn't be a bad language for such a future.
the system scene is terrible, these days. It was actually better when consumer hardware came with MS-DOS. It was better when PalmOS was viable.
libre systems: gforth, good but never again released, and only of about scripting-language efficiency. ciforth, OK but impoverished, and is shockingly inefficient in some areas (like MOVE) even with the asm core.
gforth (and 4th, but that's too different to call a Forth) is the only widely portable libre Forth. Everything else is dedicated to some embedded hardware.
paid forths: iforth. Has a "do whatever the fuck you want" license and is cheap, but you don't get the source for the kernel so you can't rebuild it and you'd need to rebuild it to make it suitable for lots of purposes like scripting.
SwiftForth: 400+ USD, windows/mac/linux, basically not developed anymore. You get the kernel source but there are license restrictions.
VFX Forth: something like 5000 USD and an NDA if you want the source. 400+ USD for source except for the kernel (like iForth, but you get even less). there are license restrictions.

You need to stop using drugs.

why? because they should use "the right tool for the job"? Maybe the year 40k programming will be mature enough that carpentry metaphors might start sticking to it, instead of just being dumb memes.

Go back to cuckchan you kike.

Because there are no laws governing starships.

oh, you're pretending to be retarded.

You're a fucking idiot.

Stacks have existed for YEARS without Unix, cheesefag. Bourrough's large systems come to mind. Certainly better than the register-memory model, especially for arithmatic.

oh yeah, you got the big brain right there don'tcha, thinking other people think there's a lot of important starship case law to be aware of.

You forth fags caught my interest.
* I run an OS already, is there a way to run forth without a forth environment?
* is there a fast compiler/interpreter implementation?
* is there a free fast compiler/interpreter implementation or is like Adafaggotry?

UNIX and C are shit. That doesn't make LISP good though.



Nah, come on man. Either you're an imitator or you really just shit out of the toilet this time.

Top kek

That's markovfag.


Nice of you to answer but I hoped for you to tell me about that fast free forth implementation without environment.

try gforth:
there is also gforth for android phones in google play.
or try it on the vice c64 emulator for the retro feeling

Thx, I'll look into it.


>>1051048 >>1051153 >>1051174
Y'all fags sure got trolled. The quote is a fake.

You mean SML?

How did I (>>1051153) get trolled?

SML, Forth , Lisp , Prolog and ada are all based. We should all be united against C/Unix faggotry.

You forgot to mention Rust, the most basedest of all.

except cobol is baseder. see this video

SML and Lisp is just another layer of gay software decadent abstractionism. Lisp and C might as well be the same language, just with different syntax. In fact, Lisp sucks so much that they complain that modern workstations should have tons of mainframe features like memory management and protected mode, because if they didn't have those features they would you know, actually have to write a compiler that features instead of roleplaying as computational philosophers. UNIX may be a piece of shit, but at least it and it successors were industry proven and didn't drop dead Symbolics and whatever Honeywell was dicking around with. You see in this world you need to sell a product the actually does something, not a manual telling you how something should be done. That's the C/Lisp, much like Capitalism and Communism. C is like Capitalism- flawed in many ways, but is the system that has been proven for thousands of years. Lisp is like Communism becuase it's heavily idealized vision of the world created by a primary dogma and doctrine, but ultimately a bunch of fluff and lexical what-if's.
I wish for a third positionist software thought-form, but that means just be getting rid of workstations entirely and just programming AVR's.

What is Rust like?

I don't see a video.

its flash

Kid, are you trolling me, kiddo?

Lisp and Symbolics machines still have a better track record than Communism.

Attached: 1469827972062-1.jpg (305x315, 20.01K)

C and Lisp are more like Diana Moon Glampers and Harrison Bergeron.

I'm always weirded out when people talk about functional programming languages. I don't understand what people use them for.
Can you post links to your repositories so I can have a look at what kind of scripts you wrote?

Luke warm liberalism. It's fine with anything as long as it doesn't impede it watching Rick and Morty and listening to Radiohead.

< Who cares about the foundation, just build on top of that garbage pile, it'll work anyway!

Not only do those features impact performance, but they uneedlessly complicate design and waste die space. Go use a mainframe if you want those features. Home computers don't need such useless mechanisms which can easily be implemented in software.
You can't fuck up a simple RISC processor model. Unless you need to add something that explicitly improves performance, I don't care about your new "groundbreaking programming paradigm shift" and neither does your employer. They want something that actually works, which- to a degree- is Unix. Until some sort of Lisp machine inspired OS comes out and becomes more favored over Unix-likes, pseduo logicitians show me eat a piece of humble pie before their non fuctioning ideas can ever take place, or it'll just fail again like Symbolics.

I keep hearing about LISP here and in other libre circles. What's so good about? What's the best book preferable free as in beer or resource for a beginner to learn from?
I'm learning Scheme now via Dr Racket because I had a robotics engineer and some anons on here tell me it's the best way to learn about the fundamentals of programming, not necessarily a marketable skill. Which is what I want, I want to understand programing and computers on a deep level.

LISP is a fucking meme. Let me quote wikipedia:
That's the only thing that LISP has going for itself. Apart from that it's simply horrible. No type system, GC, unreadable source code, impossible to optimize because it's linked lists all the way down, etc.
Stay as far away from this awful meme as possible. Even C is better than LISP (of course there isn't a reason to use C anymore because Rust exists).


So what is the point of this shitton of non-programmers shilling those weird programming languages?
Is the NSA looking for people to maintain their shitty outdated analysis software or what?
Is it merely book vendors?
Is it some kind of LARP where non-programmers read programming books then pretend to write software?

Like, i can't remember anyone ever posting any script in LISP or FORTH or whatever but we have one of these threads on the front page pretty much all the time. Why?

It's LARPers LARPing.

Because Zig Forums is full of LARPers.

FORTH is great, it's a shame that most of the affirmative action hires working these days can't figure it out.

I think it's easier than BASIC.

Your CPU has billions of transistors but it can't do what a 70s computer could do.

If it's so easy, why don't Linux or Windows do it? It doesn't make sense that every single user program should repeat it over and over again instead of having a single optimized implementation. If that implementation is significantly faster in hardware, it should be in hardware. This is why computers like the Lisp machines have support for garbage collection and UNIX machines (RISCs) never will because each UNIX language has its own incompatible GC. There are a lot more things that benefit from better hardware besides GC.


If you were a programmer, you would care. Programmers outside the UNIX world have respect for advances in technology and advances means reducing the amount of code needed to accomplish a given task. Superior hardware is measured by how much less code it needs and how much more reliable programs are.

From Wiktionary, the appropriate definition of work is "To function correctly; to act as intended; to achieve the goal designed for." Symbolics machines fit this definition far more than UNIX.

Popularity has nothing to do with whether something works or whether it's good. Plan 9 sucks even though it was made by a big company and has fewer users than hobby OSes or 80s Lisp machines. These same arguments UNIX weenies use would not have been possible in the 70s and early 80s because UNIX was an unpopular OS that most people outside of AT&T have never even heard of. This is why there were so many different operating systems and real research that was about producing something good instead of wasting billions of dollars on adding features from 60s BASIC like strings to C (which still hasn't happened).

Date: Thu, 26 Mar 1992 17:04:57 PSTSubject: What Unix BreedsThrere is no direct unix hatred in this message, but thereis evidence of a blithe spirit (perhaps it was lithe?)tragically broken by exposure to unix.Unix breeds submissive users.I saw a message on the postscript newsgroup in which thisperson mentioned that she couldn't image a postscriptdocument in various implementations and mentioned as anaside that "Ghostscript doesn't do clipping correctly" Well,I didn't remember ever seeing a bug report onbug-ghostscript to this effect, so out of curiousity I askedher for some more information.In spite of the fact that she apparently has the skills to read news,snag compressed tar files from distant points of the internet, compilethe program, run it, keep version numbers straight, and so forth, theidea of actually complaining to somebody about software which doesn'twork seems -totally- alien to her.

Who says it's mine? Why say any CPU is mine?
The Z80 has around only 8300 and ARM 2 has only 30,000. I regularly play and use Z80's on a daily basis.
Because most people
A. Don't need it (most people don't need multitasking, honestly)
B. It's already implemented in hardware.
You're right. I mostly don't care and I don't do systems programming, I design hardware and embedded. However what's genuinely slowing down computing is the cancerous idea of polycomputation, or this disruptive juggling act of trying to balance 60 programs all at once. Both Unix/Multics and Lisp/Geneva were all at fault for this. Why make the case that C makes all programs function like they would on a 70's era PDP when Lisp would make programs function like a 50's era Knight Machine. You're proposing poison in a red bottle instead of a blue one.
Functioned more than the Dodo? Because obviously business's thought not. That's why like the Dodo, Symbolics had too much of a quirky and small niche. Business is like natural selection. It only selects the products that are valuable helpful. What good is a 12 headed wrench, when the only people who use it degrade people for using ratchets and act like it's a sacred art.
Except it does. Bathing is popular because it's beneficial. Every social structure you see in human life is based off of nature because we ourselves are part of nature. If Lisp, Multics, Pascal, or any other alternative software/hardware view point you have had any creditability it would be used today. C makes money and has a niche, Lisp/Multics didn't and it died. Even today Lisp dialects have to conform to C by support its libraries, standard output, and paradigm. Even among Lisp it is so hopelessly bound by C that you would literally have to be posting from a Symbolics machine to post without it.
And that's why it died. Natural selection.
Business doesn't need research. It needs money, because there's a thousand different languages out there and if X Inc. doesn't like C they would use Scala, JS, or Python which in your eyes would still consider them to be garbage since they all descend from Unix-like structure and output.

Attached: 1280px-Amiga500_system.jpg (1280x994, 170.4K)

here you go:: cursor ( -- ) begin ekey case k-up of ESC[ ." 1A" endof k-down of ESC[ ." 1B" endof k-left of ESC[ ." 1D" endof k-right of ESC[ ." 1C" endof 27 of exit endof endcase again ;put in a file and run withgforth cursor.fs -e cursor

Forth is super terse here but it's a rare problem domain Compare D:.import scone;import io = std.stdio;void main() { window.title("example"); window.cursorVisible(true); INPUT: while (true) { foreach (input; window.getInputs) { switch (input.key) { case SK.up: io.write("\033[1A"); io.stdout.flush(); break; case SK.down: io.write("\033[1B"); io.stdout.flush(); break; case SK.left: io.write("\033[1D"); io.stdout.flush(); break; case SK.right: io.write("\033[1C"); io.stdout.flush(); break; case SK.c: if (input.hasControlKey(SCK.ctrl)) break INPUT; break; default: } } }}

the funny thing about forth is I know how to write an interpreter for it (I can tell you what docol, >DOES, CREATE do), but don't actually know how to use it (never written any actual programs with it).
its just never stuck with me but I really appreciate what is is.
anyway... y'all should read jones forth if you haven't already.



What does your script do? What do/did you use it for?

Did you even try reading it???

it lets you arbitrarily move the cursor around your terminal, with arrow-keys.
it's not useful. it's just amusing. It's also a sort of Hello world of terminal interfacing. If you can move a cursor around the you can also track where you've moved the cursor and efficiently draw a @ under it, to make a roguelike without flickering.

Can you please share a real script that you wrote either to do something useful or because it is fun and not copypaste some shitty hello world example?

shitty, huh?
how easily can you do that in your language of choice? The annoying part of it is precisely what you get for free from Forth: EKEY
anywhere here: octal2000 constant O_APPEND1 constant O_WRONLYdecimal: -uri-reserved ( c -- ) s\" \\:/?#[]@!$&'()*,;= " ( modified RFC3986 2.2 ) bounds do dup i [email protected] = abort" input has reserved URI char (RFC3986 2.2 + space, )" loop drop ;: -ctrl-char ( c -- ) bl < abort" input has control char" ;: -high-char ( c -- ) $7F > abort" input has high bit set" ;: last-char ( c-addr u -- c ) 1- + [email protected] ;: chomp ( c-addr u -- c-addr' u' ) 2dup last-char 10 = if 1- then 2dup last-char 13 = if 1- then ;\ +nl : relies on available space after the end of the string: +nl ( c-addr u -- c-addr u' ) 2dup + 10 swap c! 1+ ;\ doesn't check acceptable length\ 'acceptable' doesn't mean 'good'; it means good enough that\ javascript can handle the rest of the checking: is-acceptable ( c-addr u -- c-addr' u' ) chomp 2dup bounds ?do i [email protected] dup -uri-reserved dup -ctrl-char -high-char loop +nl ;: banner s" banner=" ;: prefix-ok ( -- ) pad [ banner nip ] literal stdin read-file throw pad banner tuck compare abort" bad input; no banner=" ;: slurp ( -- c-addr u ) pad 256 stdin read-file throw dup 1 < abort" absurdly short banner (length200)" pad swap is-acceptable ;: register ( c-addr u -- ) z" index.html" [ O_APPEND O_WRONLY or ] literal 0 open >r [email protected] write-file throw r> close-file throw ;prefix-okslurpregister.( Location: index.html) cr cr

What does your script do?

read it bottom-up.

I'm not sure if you're a FORTH-hating troll or simply retarded but can you quit the asspie behaviour?

it's a CGI script. The accompanying webpage has an HTML form that results in it (the script) getting banner=blah+blah+blah on standard input. The script makes sure it reads banner= , and then it reads blah+blah+blah , does a little sanity check, and then writes blah+blah+blah to the end of index.html
as the comments say in English, the sanity check is just enough that index.html's JavaScript can handle what's added to the file.
the result is an efficient lockless comment section for a webpage, which works because HTML5 tells browsers to consistently handle pages that don't close tags.
the O_APPEND is why it can be lockless.
it could more efficient by only reading once.
it's already -- I've long forgotten the timings, but it's probably at least a thousand times more CPU-efficient than a typical wordpress comment. CPU efficiency matters on shared hosting where using too much CPU for too long can result in a suspension, where bad code can result in a self-inflicted denial of service attack.
happy now?


I'm still not sure if you're trolling. Did you think people were gonna learn FORTH to decipher your script?

Anyway, thanks for delivering. I don't do web development though so I can't judge how this compares to comment section implementations in other languages.

What, so if two people post big comments at the same time they get garbled?
I think he blocks anything > 200 bytes though.

each individual write is smaller than 512 bytes and each individual write is what needs to be atomic

Holy shit UNIX is fucking retarded.

the alternative to a limit like this is a bad-actor process being able to interfere with writes to a common file.

UNIX braindamage.

very interesting forth video

the only forth video.
don't write your code that way, as a wall of undocumented mini-definitions.

Stupid people don't know what they want.

The market is literally natural selection.

Go back to the grave, Uriel.


You just admitted the market is run by stupid people who don't know what they want.

Business is the reason why technology exists.
Even government acts like a business to an extant, with taxes being funding, and the product being military protection, electricity, plumbing, and road maintenance.
Without incentive there is no reason for technology.

So you're saying the entirety of the military, medical, aerospace, civilian, and engineering market is retarded for picking software you don't like? That is the most pretentious argument I ever heard.

Attached: gplus-860083138.jpg (1232x1040, 123.37K)

I know this is bait but I'll bite:

People who think this shit in real life are insufferable faggots who have 0 concept of how much abstraction there already is between them programming in "real" languages bare metal. The amount of abstraction that's achieved by going from logic gates to C is fucking astronomical, and you could probably never achieve writing a C compiler from bare metal in your entire life if it weren't for the work of hundreds of years of mathematicians working all this shit out for you. Comparatively, the jump from C to Python is minuscule in the grand scheme of things. Sure it might abstract away a few data structures and make things nicer to use, but it's nothing compared to carefully organizing bits of sand together in such a way that they perform actual computation.

Computer science and abstraction are tied together at the hip. Losers who can't understand that the continuous abstraction of mathematics is the very essence of computing are the most obnoxious fucking faggots in the world. The losers who can't understand that it's actually harder to think abstractly are the funniest of them all. Sure you can do the equivalent of hand-holding a modern abacus. You're not accomplishing anything by reinventing the wheel for the thousandth time, you're just doing it because someone needs some retarded shit to be fast, but you're not furthering the field of computer-science. You're not developing new fucking algorithms in C, you're implementing something that someone (far smarter than you) has already thought of in a slightly different flavor just so you can get a paycheck.

How intellectually dishonest do you have to be to twist your own argument like this?
You literally admitted in your previous post that something being successful is often due to "stupid people not knowing what they want", then you went and justified Unix's success because of "natural selection", ignoring that it could have very well been the same as with Windows (hint: it is).
Please finish high school before posting again.

(lynch (convict (arrest nigger)) (tie rope) tree)

tree rope tie nigger arrest convict lynch

What's the big deal, you just do things in reverse order?

inb4 abstraction is bloat. There's a reason why we don't write application programs for high performance general computers in assembly - it takes a significantly more human resources to complete the application in assembly.

Its not a typeless programming language, in fact C would be closer to that. Maybe you're referring to static typing?
Forth would be an example of a typeless programming language.
There's a statically typed Lisp called Typed Racket out there, too:
You might as well be complaining about Lua, Golang, C#, JVM languages, or Python, whether its good or bad depends on your use case.
Recursion is probably the most obvious example of something being optimized in Lisp dialects. I've used desktop programs that use a lot of Common Lisp before, its not slow or anything, a lot better than mashing in Python or an entire web browser into the program which is popular nowadays.
If you cram everything onto one line, like most other languages, it gets harder to read. Just indent properly and use some paren editing software. Highlighting selected pair's regions always worked well for pairs in any language using pairs of characters for me.

You have never used Lisp once in your life and you know nothing about it. Go away.
Common Lisp, with proper optional type declarations, can be almost as fast as C. And performance is not even what really makes it good.

"Practical Common Lisp" is a good starting point if you want to get to actually make stuff quickly.
And yes, it's available online for free.

Kek, no.

this is pasta

No. LISP has no type system.