Fork me on GitHub
#off-topic
<
2017-03-16
>
not-raspberry01:03:57

(Thread/sleep (* 1000 60 60 7))

qqq14:03:58

what, if any, are the areas where forth + forth's postfix provides an advantage over lisp ?

qqq16:03:00

can anyone recommend a good forth to play with to get a hang of how forth works?

mobileink20:03:21

qqq: you know about factor? https://factorcode.org if you're not doing firmware, forthish languages are fun but not rilly practical except postscript, it you like typesetting.

tbaldridge17:03:30

@qqq I built a concatenative in about 3 episodes of my video tutorials

tbaldridge17:03:05

In general though Forths are very low level. I've seen some forths written almost entirely in x86 assembly

qqq17:03:44

@tbaldridge : I agree that Forth can get very low level. However, on the other hand, Forth also seems to hit this APL level conciseness of info / line (even higher than any Scheme I'd say). If that claim is true, there is certainly something very "high level" about the power of forth too.

qqq17:03:24

In terms of "info per line", it'd probably have to be Perl / Haskell > APL > Forth > Scheme > C > ASM

tbaldridge17:03:03

I'd have to disagree that APL is less concise than Haskell

tbaldridge17:03:24

and to some-extent APL level of conciseness could be seen as a detriment

qqq17:03:28

Yeah, you're right, it's probably Perl / APL > Haskell > Forth > Scheme > C > ASM

qqq17:03:23

I'm not arguing "concise = best", I am asserting "a really concise language must have some high level feature ot it; otherwise it can't be taht concise"

qqq17:03:46

and though I've used Perl / APL / Haskell / Scheme, I have yet to understand the magic of Forth / Concat languages

tbaldridge17:03:18

or it's just really good at composition

tbaldridge17:03:00

that's what Forth gets you, IMO, it allows for composition on a level few other languages do, but you pay for it in the fact that you have to do mental memory management

qqq17:03:31

here, 'memory management' = keep track of variables on the stack ?

tbaldridge17:03:45

yeah, I meant mental stack management

tbaldridge17:03:58

I thought I had uploaded that code, I can't find it at the moment

placeboza18:03:32

Well that sucks, your tutorials are unavailable in my country (South Africa) cos it's a paid channel

placeboza18:03:11

paid channel is a nice idea, but sucks that I can't get in on it 😕

qqq18:03:12

@placeboza : are they blocking you on IP addr or credit card nationality ?

placeboza18:03:01

I can only guess, but looks like it's IP addr at the moment, but probably due to limitations on payment to this country

placeboza18:03:13

just says "This paid chanel is unavailable in your country"

placeboza18:03:17

must by by IP

qqq18:03:24

does digital ocean allow foreign countries?

qqq18:03:37

their $5.00 / month 1 TB traffic is probaly enough to setup a vpn

placeboza18:03:34

hmm interesting idea

placeboza18:03:47

I'll look into it. broke right now, but when I get my salary again

placeboza18:03:31

the other catch is that the value of our currency sucks atm, so $5 is more than it sounds, to us

placeboza18:03:35

but still affordable

qqq18:03:51

@tbaldridge : regarding stack management : have you ever programmed in a forth with a "instal repl" that showed you the data stack after every word?

tbaldridge18:03:59

Iv'e seen some demoes of them, and yeah, they help, but if I wanted super high level features in a language, I'm going to go the otherway, see Eff (the programming language) and Fexprs.

tbaldridge18:03:46

So for me Forth is interesting because it's so simple, and if I'm going to program that simple of a VM then I can deal with the stack management, otherwise it's too much of a burden to take on

tbaldridge18:03:57

I wouldn't want to write a business app in a language like Forth

qqq18:03:36

Eff was built to test the mathematical ideas of algebraic effects in practice. Thus, every new feature of Eff is backed by peer-reviewed research. <-- this is hte "GHC type extensions are too easy' crowd ?

qqq18:03:14

In his KernelLanguage (of which there is currently no complete implementation) the distinct namespaces of the calling environment and the lexical environment of the FEXPR are clearly separated and explicitly addressable at runtime, which more or less eliminates the need for complicated HygienicMacro mechanisms. Tom Lord (unsuccessfully) pushed for FEXPRs in R6RS Scheme. <-- looks like FExprs have their own interesting istory (from C2 wiki)

tbaldridge18:03:40

@qqq, no, in one of their papers on Eff they said something to the effect "we don't like monads, they're too complicated and they polute the type system...let's find a better way"

tbaldridge18:03:02

But the gist is this: core.async, exceptions, state monads, test.check, iterators (generators), and dynamic vars all try to implement ad-hoc effect handlers. What if we build this construct cleanly into a language, and without monads

qqq18:03:21

getting rid of stacks of monad transformers certainly is nice

qqq18:03:16

@tbaldridge : I see how EFF can be nice; but can you point me to a single concrete example where fexprs would be useful? I see all this abstraction of fexprs, how it's more powerful than macros (and then killed because it eliminated certain forms of static anlaysi); but I still ahve no idea what fexprs buys me

tbaldridge18:03:09

well firstly they get rid of the Clojure error of "can't take the value of a macro"

tbaldridge18:03:28

basically macros become first-class runtime objects instead of something that only exists at compiletime

tbaldridge18:03:32

So there's a theme there: I like Eff because it reifies the stack into a runtime construct that I can programmatically manipulate. I like Fexprs because they reify macros into a runtime construct as well.

qqq18:03:37

yeah, but I really don't need to run (reduce and ...)

tbaldridge18:03:52

fair enough. But funny enough Fexprs are pretty much what [ and ] are in Forth/like languages

tbaldridge18:03:25

they wrap up a bit of code and say " don't execute this yet, i may execute it later, by pasting it into the evaluation"

qqq19:03:30

maybe I am blind, what's drawing me towards forth is a notinon of "functional level programming", where instead of having variable names holding data, we just find new ways of combining functions together; I guess perhaps fexprs may be related to this

fellshard20:03:40

Combinators?

7h3kk1d21:03:25

Taking my personal site of wordpress and going to use cljs. What do people use as a wysiwyg for blog posts and storage?

qqq23:03:39

@tbaldridge : I thing I do find lacking about macros and where fexprs can be better: error msgs -- when an exception happens iinside a

(match [ ... ]
.... 20-30 lines here
)
then it gets pointed at the match , rather than the actual line where the exception happens

tbaldridge23:03:08

right, and it works really well with a pure lisp interpreter, in that case everything is always "runtime"

qqq23:03:47

@tbaldridge: scheme is famous for it's 'half page eval/apply"; does fexpr/kernel have a canonical impl? (c2 wiki says there's no complete impl; and I'm not even sure what the semantics are)