[ / / / / / / / / / / / / / ] [ dir / agatha2 / arepa / bestemma / had / lain / mde / vg / vichan ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.968730>>968762 >>968778 >>968819 >>968852 >>969417 >>969636 [Watch Thread][Show All Posts]

Why aren't you using Factor /tech/?

https://www.factorcode.org/

Sure it's a concatenative language and that's obscure as hell but it turns out using functional composition can lead to a lot of elegance.


USING: kernel sequences unicode ;
IN: palindrome

: normalize ( string -- string' ) [ Letter? ] filter >lower ;

: palindrome? ( string -- ? ) normalize dup reverse = ;

Consider the simple example they use for palindromes.

Without using any variables, and with only function composition it can express a very robust word for finding palindromes. This function will even go as far as finding if

"A man, a plan, a canal: Panama" is a palindrome.

Some of factors main merits:

Fast (SBCL level, which puts it far above many other languages)

Multi-paradigm with an Object System approaching CLOS capabilities.

Introspective and Exception system close to or exceeding Common Lisp

Meta Programming capabilities possibly exceeding Common Lisp

-- Because there are hardly any variables you get to use defmacro as if it were a hygenic macro because there's no variables that can be accidentally captured.

No Cruft and possibly the most beautiful layout of any src directory I've ever seen.

Massive standard library with plenty of stuff to make good applications now.

Hands down one of the greatest C FFI's I've ever seen. (And I've looked at/used many)

Image based development with a fully featured REPL that possibly even rival's slime.

For deployment you can specify exactly what you want to be included leading to the ability to produce extremely small executables. (Unlike most Lisp's where you keep the image and have to lug around a many MB image)

The ability to actually view a closure's contents on the stack. Since you can use quotations like [ 3 + ] to produce a curried lambda function which you can place directly on the stack you get to view [ 3 + ] instead of something like lisp's (Compiled-Closure x03408342) or Haskell's "Sorry can't show that".

And for the final benefit the possibility to implement a linear type algorithm (or uniqueness types) goes pretty hand in hand with concatenative programming which is pretty freaking awesome if you look into it.

Common Lisp is dead. Factor is the new Lisp. So why not give it a shot?

 No.968752>>968760

As a FORTHer, it's nice, but it's so inane to use. The cool features like UI development are awkward to use and impossible to learn (the documentation is too technical), the syntax can be weird, and the fact you have to make sure to be USING: every single minor feature of the language is a huge pain in the ass. And what's the point in being concatenative if your entire language would work better with regular braced syntax? Don't get me started on the ways the compiler can get annoying.

The directory shit is incredibly annoying, the scaffolding tool is shit, "no cruft" is accurate, but it's all replaced with weird inclusions of bloat. Have you actually written anything, as opposed to using examples included in the "My First Program" cookbook? I would recommend Factor over Scheme or Common Lisp. I would recommend Factor over Python to anyone who wasn't already writing Python. But Factor is so awkward to use it's barely worth it. Get Reva Forth or something that compiles executables (Jewish Ron's 8th has a closed source compiler).

I mean, fuck: Retro Forth can do palindromes in four words,

:s:palindrome? (s-f)
[ s:hash ]
[ s:reverse s:hash ] bi eq? ;

'ingirumimusnocteetconsumimurigni s:palindrome?

and if you want i'll give you an equally simple defintion as yours to do sentences.

But to be honest:

IF YOU'RE NOT ALREADY A FORTHer, USE FACTOR!

It's actually alright


 No.968760>>968763

>>968752

*sorry, five words.

To do it, ignoring punctuation:


:palindromic-sentence? (s--f)
[ c:letter? ] s:filter s:to-lower
[ s:hash ] [ s:reverse s:hash ] bi eq? ;

'A_man,_a_plan,_a_canal:_Panama palindromic-sentence?

I don't know why I'm being so hard on Factor. Sorry to shit on your parade, OP, but your post didn't really demonstrate the power of factor, you could've used gadgets to build a palindrome-solving widget in only a few more lines, which is real powerful. Also Factor has native GUIs for each system you run it on. Sequences are really powerful, and the language has massive support for functional programming, including Tail Call Optimisation and Tail Call Elimination on every compiled word.

You can even tell the concatenative paradigm to get fucked when writing Factor, it has the power of optional locals (an example from Rosetta Code):

USING: kernel math locals combinators ;
IN: mathfunctions

:: ackermann ( m n -- u )
{
{ [ m 0 = ] [ n 1 + ] }
{ [ n 0 = ] [ m 1 - 1 ackermann ] }
[ m 1 - m n 1 - ackermann ackermann ]
} cond ;

The compiler for Factor is actually brilliantly genius. And the guys behind it are, too. There's an emacs mode for Factor which is great, called FUEL-mode.

TRY FACTOR, TODAY!


 No.968762>>968765 >>968766 >>969417

>>968730 (OP)

WHY AREN'T YOU USING C

niggercattle everywhere


 No.968763>>968766

>>968760

It’s all good bro. I appreciate the input as I just started looking into factor last night.

I’ve thought for awhile that the intersection of lisp and forth would be my perfect language and it seems like factor comes pretty damn close to that.

Would it be a good idea to learn Forth more before going to Factor? They don’t have a lot of tutorials so I need to get my concatenative chops down somehow.


 No.968765>>968766

Why all the unnecessary symbols? Fuck, why digraphs of all things?

>>968762

t. nogrammer memester


 No.968766>>968782

>>968762

>endless undefined behaciour

>designed by committee

>wierd fucking semantics

C is great, and it's great for writing hardware and system-level programs because of the time compilers have dedicated to working on improving C compilation. But C isn't at all perfect. C has really annoying shit you can't work around without cutting features or making a horrible mess. But you don't care, you're not a programmer, just a LARPer.

>>968763

My only advice is a cardinal rule I had to apply when interacting with Factor: Factor IS NOT Forth. It is a concatenative language, and concatenative is not synonymous with Forth. All concatenative really means is that a program is defined by the sequential application of functions to functions (that's my opinion/definion, I don't think concatenative is really well-defined).

>>968765

None of the symbols are unnecessary. If you want any explained I can probably tell you without launching an editor or opining the docs


 No.968777>>968780

>concatenative language

Does this just mean there is partial function application?


 No.968778>>968780

>>968730 (OP)

>Factor is the new Lisp

So, mostly useless but you're going to shill for it every day?


 No.968780

>>968777

http://concatenative.org/wiki/view/Concatenative%20language

>>968778

Lisp isn't useless. Writing a text editor for the umpteenth time is useless.


 No.968782>>968785

>>968766

>scary undefined behavior

>not designed by random sjw's

>explicit and clear semantics

>C has really annoying shit you can't work around

>making a horrible mess


 No.968785>>968806 >>968839

>>968782

>scary undefined behavior

Misreprenting what undefined behaviour means and can do, noice

>not designed by random sjw's

"random SJWs" form committies, retard. BDFL has always been the best solution. ANS(I) kills languages.

>explicit and clear semantics

What does `a[i] = i++` do?


 No.968806

>>968785

Most C UBs are easy to remember though. Stuff like "don't modify a variable more than one time in a statement", "don't rely on signed integer overflow" or "don't assume function argument evaluation order" aren't that hard to understand nor is the reason for their existence.

As a C programmer, I now understand that 95% of its problems are due to its age (and wanting backward compatibility with the K&R era stdlib and syntax) and the remaining 5% to its design of being as low level as possible (C++ and Rust wants zero-cost abstraction, C wants zero abstraction). I'd be quite happy with builtin array support (fortunately, I cobbled something together akin to https://github.com/eteran/c-vector).

A C2 simply modernizing all this shit with length based strings (finally being uint8_t arrays), using stdint.h types everywhere, cleaning up the stdlib (using arrays instead of strings allows to remove all the strn* function and add those lacking, like regexec not havin a n version), maybe finding a way to make something like templates (some help from the language to implement genericity, basically), maybe removing the concept of header with the use of stuff like static and extern to quality function visibility directly, add more of GCC's attributes to the standard, better wchar functions and a set of mb_ functions to work on multibyte representations instead of 4 byte codepoints.

This isn't exhaustive, but you get the idea: it's not very hard.


 No.968816>>968818 >>968833

1. slava is a bitch and should get fucked

2. 'concatenative' is just stupid as a category of language.

3. just use Forth. Forth has actual advantages vs. other languages due to it being very low level while being very capable of stacking up on abstraction, *capability* of writing very very clear code due to the free syntax (not 'functional composition), and high quality native code implementations. Forth's only problem is that its proprietary implementations are way better than its free implementations, but gforth and ciforth still ain't bad. You can extend Forth to have Factor-like features but with Factor you're using what slava deigns to give you

4. if you just can't into Forth, then stop bothering with fake 'concatenative' genres try http://www.oforth.com/


 No.968818>>968822 >>968833 >>969417

>>968816

Why are proprietary implementations of forth 'better' than open source ones? How do you go about implementing forth? Anyone still using forth?


 No.968819

>>968730 (OP)

> Hands down one of the greatest C FFI's I've ever seen. (And I've looked at/used many)

what.

http://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blob_plain;f=basis/glib/ffi/ffi.factor;hb=c6f2cbdeaf8cc4a858dc93f0e4858a1f91bf8d58

>repeating constant definitions in Factor instead of using header

>including version numbers and extensions in Factor source

apart from that it's similar to an FFI that iforth and mpeforth both have (sf's FFI is simpler) - all proprietary Forths though

gforth's FFI is nuts, requiring gcc at runtime, but it's much more capable


 No.968822>>968827 >>968830

>>968818

*shrug*. just the way of things somehow.

iforth is not very proprietary - you pay $100 and then you get a "do literally whatever you want, including giving this to other people without paying me" license. but, you're never given the kernel source, so you can only dive so deep into iforth itself. it's still about the best forth for a lot of purposes.

implementing forth is not very hard and lots of people have done it, but there's a lot of lore about implementation techniques in the community that you can learn to do it better than you probably would with a cold design. if you're interested in implementing forth then you're not very interested in the language really, are you? why waste your time? go implement Lisp in some language that does interest you, check out jonesforth or yourforth (basically jonesforth but by the ciforth guy)


 No.968827>>968833

>>968822

Thanks for an actual reply. I'm interested in it as a bystander mostly. I have done the implement a lisp in c book, it was fun. Any other recommendations for work along those lines? A bit offtopic ik


 No.968830

>>968822

not that interested myself, but people usually recommend the dragon book. I picked up a 'write an interpreter in Go' book (not going write in Go though) but haven't gone through it yet so can't recommend.

https://compilers.iecc.com/crenshaw/ is very good but it might not interest you after that lisp book.


 No.968833>>968846

>>968816

>1. slava is a bitch and should get fucked

Not an argument

>2. 'concatenative' is just stupid as a category of language.

Concatenative is a special case of functional. Get fucked brainlet.

>3. just use Forth.

Mostly agree, but Factor isn't Forth. It just inherits the syntax and some semantics.

>4. if you just can't into Forth

Anyone can "into" forth.

>>968818

Because gforth devs keep changing the FFI for no reason

>>968827

Starting Forth, and Thinking Forth, both by Leo Brodie.

Liz's book isn't really great


 No.968839>>968849

>>968785

>What does `a[i] = i++` do?

What does


: normalize ( string -- string' ) [ Letter? ] filter >lower ;
: palindrome? ( string -- ? ) normalize dup reverse = ;

do?


 No.968846>>968849

>>968833

>Not an argument

weird, it's super persuasive for me

>blorbl is a special case of booboobooboo

Not a definition.

Also I totally think of FP when I think of Forth. Yep. The language just *radiates* FP-ness.


 No.968849>>968850 >>968851 >>972890 >>973034

>>968839

Those are perfectly reasonable semantics in line with the syntax of the language. You're exposing yourself for being a nogrammer LARPer by failing to understand that.

a[i] = i++
is undefined behaviour. It could mean literally anything because the syntax is quite poorly defined.

: normalize ( string -- string' ) [ Letter? ] filter >lower ;
: palindrome? ( string -- ? ) normalize dup reverse = ;
Does exactly what any Factor programmer would think, and you could even reason about it without ever having seen the language before.

>: <word> ( string -- string')

`:` starts a definition, `<word>` is the name of the subroutine (word), `( x -- y )` is a stack comment showing how the word works (string is transformed, producing string'). ` [ ] `are braces for a quotation, which puts the contents (`Letter?`) as executable tokens on the stack rather than executing them immediately. `filter` applies the quotation to the characters in the string. ` >lower ` turns something "to lower(case)".

Everything in Factor's syntax is well defined, it's an inherent advantage of the concatenative paradigm. This isn't hard. You're just a brainlet who can't even click the link in the OP to begin to learn more.

>>968846

Your want to be a smart-ass about something does not invalidate its legitimacy


 No.968850

>>968849

s/executing/compiling


 No.968851>>968862

>>968849

>not an invalidation

No, it really is. If 'concatenative' means anything, Forth is an example of it. If 'concatenative' means FP, then 'concatenative excludes not only Forth but even more concatenative languages like UserRPL or PostScript. There is nothing FP about these languages. It's even worse than calling Lisp FP.


 No.968852>>968853 >>968854

>>968730 (OP)

There's no binary for Linux. Why should I care?


 No.968853

>>968852

Yes, there is

You are just stupid


 No.968854


 No.968862>>968865

>>968851

FP doesn't mean "purely functional" as in haskell, dumbass. Forth is a functional concatenative language.


 No.968865

>>968862

then 'functional' means nothing.

I'll just talk about ML-like languages in the future.

We could've had FPSes, but instead we have to have Doom-likes, because some jerk decided that Dark Souls was an FPS.


 No.969417>>969628

>>968730 (OP)

Love Factor, it's really the best stack based language for a modern environment.

>>968762

>using a 1970's era PDP-architecture assembler disguised as a general purpose programming language

>>968818

You make a FORTH by writing a few small functions in assembly language on the bare metal. Once you're done with that you can make your standard dictionary with FORTH itself. Or you can write it in C or another programming language, but that's not really what FORTH is for.


 No.969628

>>969417

>Or you can write it in C or another programming language, but that's not really what FORTH is for.

Forth is for whatever you want to do with it. The only difference language implementation makes is execution speed, if implemented correctly.


 No.969636

>>968730 (OP)

>Why aren't you using F# and Forths retarded child

Good question OP


 No.972132>>972301

How you enjoying it, OP


 No.972143>>972164 >>972167

Forth is a meme. It used to be occasionally useful when size was extremely limited and was more important than speed. Today it has no purpose other than if you're stuck maintaining ancient embedded hardware that used it.

/tech/ treats it as some sort of magical language that can do anything when in actuality it's a primitive stack machine and slow. It shares more in common with flash than C.


 No.972164

>>972143

>primitive stack machine

Forth has two stacks.

>slow

No.

Chuck is past regular Forth VMs anyway. His current chips use circular stacks and 5-bit opcodes for maximum efficiency.


 No.972167

>>972143

Also, Factor isn't Forth


 No.972301>>972613

>>972132

>>972132

C-c C-d d to pull up documentation for any word is a godsend.

I love this language. Reading some of the simpler libraries now to get my head wrapped around it.


 No.972613>>972875

>>972301

HELP                                                                 IFORTH
( "name" -- )
Parse name delimited by a space ignoring leading delimiters. Find an
entry in the glossary help file forth.hlp and list that entry to the
screen. HELP is not part of the kernel system but can be loaded by
including the file help.frt. By default the file forth.hlp contains a
copy of the glossary of Forth words from your manual. Thus HELP provides
an online manual for Forth words. Note that any typesetting that is in
the manual is removed so only ASCII text is left. The text in the help
file is automatically generated from the original glossary documents, so
there are no textual differences between the printed and the online
version of the manual.
ok
wow what an uncommon feature


 No.972875>>972876

>>972613

iforth isn't an Emacs mode


 No.972876

>>972875

iforth isn't even Free Software


 No.972890>>972964

>>968849

>a[i] = i++

> is undefined behaviour. It could mean literally anything because the syntax is quite poorly defined.

I assume this is C code.

>i++ is post increment because it increments it's value by 1 after the operation is over.

What happens according to "standardese":

>a[i] = i;

>i++;

I fail to see the undefined behavior. It's all perfectly clear.


 No.972964>>972976

>>972890

Maybe read the standard mate


 No.972976

>>972964

Ups. Looked elsewhere. You're right.

At least you can still just write: a[i] = i; i++; instead.


 No.973034>>973085

>>968849

>and you could even reason about it without ever having seen the language before.

It's a random mess of different symbols. I doubt anyone who isn't familiar with this class of languages could tell you what it does.


 No.973085

>>973034

Most of it is plain english


 No.973517

KipIngram in the #Forth IRC spams it to shit talking about his fucking shitty Forth project with no source and endless ideas-guy tier ideas and I hope he blows his fucking brains out


 No.976498

bomp


 No.976509>>976621

lol another gay joke of a language < --- UseLeSS < ---

C and its derivatives give applications

python gives scripts for L33T H4ck3rZ

javascript needs to die and LISP is for jews like (((you))) OP


 No.976621

Another cool thing about factor is it's linter. It will read your source code and then search any libraries you've imported to see if you accidentally reimplemented something already written.

for instance you might put

 [ length swapd ] 

and it will realize you actually could have used

 [ (split) ] 

The effect is that all your code becomes simpler and more terse while retaining the same use without having to rewrite helper functions. It looks like it can apparently do this because it can reason about the stack effects.

It's a very cool system.

Autodocumentation is literally two lines of code you run in the repl and then you can fill in details in the generated markup document.

>>976509

Lisp =/= Factor/Forth

>lol another gay joke of a language < --- UseLeSS < ---

A "gay joke" of a language is all the bastardized attempts at emulated C-syntax and stuffing it into a higher level language. Which is most languages in existence.

>C and its derivatives give applications

Buggy, drone-written crap. We can express things much more elegantly if we accept a different logical base as opposed to "muh description of how a computer is modeled"

>python gives scripts for L33T H4ck3rZ

Python is the worst example of trying to solve too many syntactical rules by adhering to no-syntax.

It's a complete joke and should be considered the new Dijkstra's "programming in BASIC will cause brain damage"

>javascript needs to die

Agree

> LISP is for jews like (((you))) OP

Jews always win though, is this a complement?


 No.976762>>976802 >>981972

>using backwards-ass postfix notation just so that you can use your concatenative paradigm

Nobody thinks in postfix. This is the most unnatural, brain-contorting way to syntact your language. Please stop doing it. Just look at this mess:


: sign-test ( n -- )
dup 0 < [
drop "negative"
] [
zero? [ "zero" ] [ "positive" ] if
] if print ;

Like what the fuck? Who thinks programming like that is a good idea? Am I supposed to read this while staring at the computer screen through a mirror like it's some manuscript of Leonardo Da Vinci?

Secondly, you can get the concatenative paradigm in applicative languages. Even in the shitlang called Javascript, you can make a prototype object o with a bunch of "chainable" functions f,g,h and then sequentially transform an instance of it by going something like o.f().g().h(). In a less-retarded language that has macros (like Clojure) you can write a thread-forward macro (>>) and then write your functions f, g, h to accept object o as their first argument like:


(>> o
(f ...)
(g ...)
(h ...))

The advantage of this is that you get a language that allows you to break into the concatenative paradigm when it's more natural to do so and then return to the applicative paradigm when it isn't (which is most of the time).


 No.976802

>>976762

It's really fucking easy if you learned FORTH as a kid or learned how to program an HP RPN calculator. It's too much for brainlets though.

For those of us with brain cells, it's super easy to understand. You're either pushing stuff onto the stack or popping it off with operations.


 No.976807>>976900

>clojure vs. forth

two journeyman bickering like girls

while a crowd of apprentices looks on in confusion

and the masters in disappointment


 No.976837>>977253

Everyone should be using assembly. With enough macros you could literally have multiplatform environments that enable you to get your goals to the metal as swiftly as shells/scripts with the power and speed your ISA permits.

Prove me wrong faggots


 No.976900>>977253 >>981977

k well you asked why I'm not using factor and it's because i want to write "if condition then x else y" and not "condition [x] [y] if" on account of me being a human and not a 40 year old calculator

>>976807

I'm not saying use clojure. My point is that you don't need this wrong backwards way of doing things. Most languages look like algol (including "pseudocode") because most brains think like algol, which is to say, from start to finish. RPN is just a worse way of writing stuff.


 No.977253>>981152

>>976837

Intel's architecture now supports what, over two thousand instructions? It'd be macro hell.

>>976900

> i want to write "if condition then x else y" and not "condition [x] [y] if" on account of me being a human and not a 40 year old calculator

Brainlet then.


 No.979343

File (hide): 9987d448e874b7e⋯.png (50.28 KB, 1166x214, 583:107, Screenshot 2018-09-29 at 1….png) (h) (u)

how is this even employed


 No.981152

>>977253

>Brainlet then.

It's really not brainlet. Brainlets wrap their mind around a language; normal mold the language to their needs. You would know if you were an EXPERT PROGRAMMER like me.


 No.981962

bamp


 No.981972

>>976762

who the fuck writes the syntax like that? There are many ways of doing a sign-test and I wouldn't indent the syntax like that with any of them.


USING: combinators ;
: sign-test ( n -- )
{
{ [ dup 0 < ] [ "Negative" ] }
{ [ dup 0 > ] [ "Positive" ] }
[ "Neither" ]
} cond nip print ;
Would be my suggestion, I think it's in the documentation somewhere.

You're just too stupid to think about what you're typing, rather than slamming the keyboard as fast as possible


 No.981977>>981986

>>976900

Also, you're still a brainlet, besides being able to use Factor's parsing words to form an `if` that has your preferred syntax - regular Forth has almost exactly the syntax you think of for an if statement

 if x else y then 
as opposed to clojure's
(((((if) then (then else ) when? 
(if then else
then)(((
)()())(((clojure cucks)))())


 No.981986>>983574

>>981977

hmmm which is less retarded (sorry about my LISP syntax, I did SICP in Forth, don't really know much about LISP, but it gets the point accross)


\ Just random shit
: x 33 10 */ ;
: y abs 20 mod ;
: word 0< if x else y then ;

(define x (n)
(/
(* n 33) 10))
(define y (n)
(mod
(abs n) 20))
(define word (n)
(if (< n 0)
(x n)
(y n)))

🤔


 No.982512>>982699

stupid lisp clojure faggot can't even read postfix, babby duck syndrome supreme, and thinks his shitty meme popular lang is any good. Clojure is for faggots and Elixir will kick Clojure's ass in the long run


 No.982699>>982730

>>982512

BEAM is less suited for generalized computation than the JVM. Kotlin will beat both.


 No.982730

>>982699

Generalised computation isn't restricted by BEAM. What the fuck are you talking about?


 No.982815>>983021

>Clojure


(defn palindrom [string]
(->> string
clojure.string/lower-case
((juxt identity clojure.string/reverse))
(apply =)))

(defn palindrom-sentence [string]
(palindrom (clojure.string/join (re-seq #"[A-Za-z]" string))))


 No.983021

>>982815

What the fuck is that monstrosity


 No.983574>>984758 >>984759 >>984761

>>981986

The least retarded is prefix notation because the operation is stated first and then the operands come after. For example, "x" in your example is read "divide (the product of n and 33) by 10". Assembly operations are written like this too. eg intel syntax: "mov ax, 1" is read "move into ax, 1" and it would be "move 1 into ax" if using at&t syntax. Any C-style language uses a function calling syntax like fn(a, b, c, ...) because you want to know what you're doing first, then the details second.

Now lets look at how to read backwards-ass postfix. "33 and 10, multiply them and then divide the top of the stack by that". At the expense of parens you have something that must be read in its entirety before it can be understood. On the other hand, prefix can be gradually understood as it is read, left-to-right.


 No.984758>>984784

>>983574

"Here's the data you want, now do this to it" <-- Simple elegance

vs

"Here's an operation, apply it to this, and this, and this, and ...." <-- BLOATED GARBAGE


 No.984759


 No.984761

>>983574

"Intel use this established syntax" is not an argument fucking moron. Various architectures have various syntaxes for assembler. GA144 assembler is basically colorForth, it's a one-pass compiler. You're still writing a HLL for the Intel piece of shit CPU, because your """nice""" Intel/AT&T syntax is still being converted to uops on the CPU which then converted to hex machine code, so fuck off retard


 No.984784>>984832

>>984758

wrong, because data could be of varying size and usually can be far larger than any operation identifier, and because knowing the operation beforehand lets you do validity checks on the data/better optimization with out of order magic.

there's a reason function calls are usually in the form function(data,moredata,evenmoredata) instead of data,moredata,evenmoredata(function).

there are a few good cases for the latter too, of course.


 No.984832

>>984784

Forth compilers can optimise and do """validity checks""" if you need it. But Forth is usually interpreted. You know what you could do if you want to add 20 items instead of two?

You could `: add 0 + do loop ;` or clean your stack like a good boy and add to depth. You could also modify INTERPRET to count some variable up until the lastest operation. There are loads of solutions to your non-problem. Only in Lisps are you doing `(+ 1 2 3)` and if you can't type `6` or if you struggle to understand `3 2 1 + +` maybe you should blow your brains out. Come up with a real problem.


 No.984884>>985030

https://www.factorcode.org/

>Stable release: 0.98

>zero point ninety-eight.

>zero

OS?

>WINDOWS MAC OS X LINUX

Arch?

>x86 and x86_64

So not really that portable.

<git clone --depth 1 git://factorcode.org/git/factor.git; cd factor

<less README.md

>Unix: `./build.sh update`

Unix eh? OK then I'll try it out. dot slash build dot sh....

>env: bash: No such file or directory

What? A stupid bash script? Fine.

*installs bash*

<./build.sh update

>Finding OS...

>Finding ARCH...

>Finding num cores...

>Checking for all(clang clang++)...all not found.

>Checking for all(gcc g++)...found!

>Finding WORD...

>OS:

>ARCH: x86

>WORD: 64

>OS, ARCH, or WORD is empty. Please report this.

>unknown

No thanks. I'll check it out again when it's more stable and/or portable by default.


 No.985030>>985050

>>984884

If you use some retarded distribution with no features, but can't figure out how to compile a simple program, you should kill yourself


 No.985050>>985063

>>985030

>distribution

You don't seem very knowledgeable. Think for a second to figure out how the script is "Finding OS..."

It uses `uname -s` to find the OS just like every other build script unless it uses that lsb_release stupidity.

In this case though... if it doesn't like what it finds then it simply throws it away and coyly prints that it can't find the OS.


find_os() {
if [[ -n $OS ]] ; then return; fi
$ECHO "Finding OS..."
local uname_s=$(uname -s)
check_ret uname
case $uname_s in
CYGWIN_NT-5.2-WOW64) OS=windows;;
*CYGWIN_NT*) OS=windows;;
*CYGWIN*) OS=windows;;
MINGW32*) OS=windows;;
*darwin*) OS=macosx;;
*Darwin*) OS=macosx;;
*linux*) OS=linux;;
*Linux*) OS=linux;;
esac
}

So when the authors say Unix they really just mean OSX and Linux. Only one of those is Unix. See if you can figure out which one. This naievity is reflected in the GNUmakefile targets.

So no. I'm not going to spend my time personally porting some esoteric game scripting language who's only killer feature is that it'll give you 1337 h4xx0r st4tuz.

OP asked why I don't use it and that's why. Like I said, maybe I'll check it out again when It's more portable https://github.com/factor/factor/issues/2039 . Looking at their (((GitHub))) stuff it seems unlikely.


 No.985063>>987892

>>985050

>use non-OSX Unix

>too stupid to modify a build script


 No.987854

CLOJURE IS FOR RETARDS


 No.987892

>>985063

It's not just the build script idiot.

https://github.com/factor/factor/issues/2039

https://github.com/factor/factor/issues/1262

So no. I'm not going to port this garbage just because I want to look kewl on a /tech/ thread.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
78 replies | 1 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / agatha2 / arepa / bestemma / had / lain / mde / vg / vichan ][ watchlist ]