00:00:00 --- log: started forth/17.11.21 01:33:11 --- join: mtsd (~mtsd@194.218.150.197) joined #forth 02:32:21 --- quit: proteusguy (Remote host closed the connection) 03:17:36 --- quit: mtsd (Ping timeout: 258 seconds) 03:20:48 --- quit: nighty- (Quit: Disappears in a puff of smoke) 03:26:45 --- join: mtsd (~mtsd@194.218.150.197) joined #forth 03:55:36 --- join: proteusguy (~proteus-g@184.22.241.32) joined #forth 03:55:36 --- mode: ChanServ set +v proteusguy 04:33:52 --- quit: mnemnion (Remote host closed the connection) 05:18:41 --- quit: xek (Remote host closed the connection) 05:19:00 --- join: xek (xek@nat/intel/x-ojtvvbmmztmiiyhj) joined #forth 05:27:46 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 05:41:58 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 05:56:38 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 06:12:56 --- quit: ncv (Remote host closed the connection) 06:14:08 --- join: ncv (~neceve@2a02:c7d:c5c9:a900:c792:a3e8:397d:b37) joined #forth 06:14:08 --- quit: ncv (Changing host) 06:14:08 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 06:38:45 --- quit: mtsd (Quit: Leaving) 07:01:44 --- quit: ncv (Remote host closed the connection) 07:03:10 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 07:57:08 --- join: Gromboli (~Gromboli@static-72-88-80-103.bflony.fios.verizon.net) joined #forth 08:04:18 yunfan: ForthCAD is/was at least partially implemented in Forth 08:11:53 --- join: [1]MrMobius (~MrMobius@c-68-45-74-146.hsd1.pa.comcast.net) joined #forth 08:14:16 --- quit: MrMobius (Ping timeout: 268 seconds) 08:30:04 --- quit: DGASAU (Ping timeout: 240 seconds) 08:35:26 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 08:41:32 --- quit: DGASAU (Ping timeout: 246 seconds) 08:48:38 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 09:22:59 hi 09:23:33 is there a version of forth that is specifically made to be subturing and have guaranteed termination of functions? 09:23:35 hello cheater 09:24:18 I have not heard of one 09:25:55 i am interested in forth because i think it would make a good kind of language for what i want to do, but i would need a language which has ensured termination, or even totality. 09:30:22 --- quit: ncv (Remote host closed the connection) 09:34:07 --- join: dys (~dys@2a01:598:918e:62db:226:5eff:fee9:68d2) joined #forth 09:38:48 bavier: do you know who might know if something like this exists? :) are there any people who are very well regarded in the forth community? i really don't know who to follow (read their papers or blog posts) with regards to forth. i'm completely new to this community :) 09:39:54 cheater: hang out here for a while and you might hear back from others 10:15:08 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:7563:b93a:1747:8b4d) joined #forth 10:30:21 --- quit: DGASAU (Read error: Connection reset by peer) 10:31:13 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 11:05:34 --- quit: MrBusiness (Ping timeout: 240 seconds) 11:07:47 <[1]MrMobius> cheater, I dont know either. Out of curioity, what are you trying to do? 11:15:34 --- quit: yunfan (Ping timeout: 248 seconds) 11:15:53 --- join: yunfan (~roooot@unaffiliated/yunfan) joined #forth 11:16:20 --- quit: Gromboli (Quit: Leaving) 11:23:36 --- nick: [1]MrMobius -> MrMobius 11:37:26 --- join: gravicappa (~gravicapp@ppp83-237-171-145.pppoe.mtu-net.ru) joined #forth 13:03:05 cheater: Forth is sub-Turing already, it has always been. 13:03:34 cheater: in general, Forth is bad idea for anything that isn't a joke. 13:20:51 cheater: you are thinking of Primitive Recursive Algorithms? 13:27:19 --- quit: gravicappa (Ping timeout: 240 seconds) 14:53:23 --- join: MrBusiness (~ArcMrBism@2602:306:8325:a300:9c21:c44b:240c:ed3) joined #forth 14:56:47 --- quit: mnemnion (Remote host closed the connection) 15:13:23 --- quit: nighty- (Quit: Disappears in a puff of smoke) 15:32:22 --- join: mnemnion (~mnemnion@c-73-223-86-196.hsd1.ca.comcast.net) joined #forth 15:42:52 --- quit: mnemnion (Read error: Connection reset by peer) 15:43:18 --- join: mnemnion (~mnemnion@c-73-223-86-196.hsd1.ca.comcast.net) joined #forth 15:53:04 --- quit: mnemnion (Remote host closed the connection) 15:56:28 --- join: mnemnion (~mnemnion@c-73-223-86-196.hsd1.ca.comcast.net) joined #forth 16:39:15 --- quit: mnemnion (Remote host closed the connection) 16:58:39 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 18:17:10 Zarutian_PI: no. what are primitive recursive algorithms? 18:17:28 DGASAU: i was under the impression forth was TC? 18:17:42 guys why is forth not tc? i would love to understand this 18:17:52 bavier: thanks 18:18:31 btw, another question: if forth is not tc, then do all programs in forth also terminate? 18:19:35 MrMobius: i'm thinking of what would be a good language for use inside a cryptocurrency. i'm just interested in this, and wonder what would be necessary to avoid issues like have been seen with ethereum and other smart contract blockchains. 18:21:26 MrMobius: the biggest issue seems to be that the languages in those cryptocurrencies are made too complex, so people end up with bugs they don't need to have. 18:24:24 also, a third question i had for you guys.. in addition to why forth isn't TC, and whether it ensures termination of programs... is forth a good compilation target for a higher level language? here i am thinking of a higher level language with things like tuples, finite lists, integers, loops to iterate over finite lists, list operations, arthmetics, IO, pure functions with bindings like haskell's let ... 18:24:30 ... or where, sum types, case switches (constructor matching), and similar stuff. 18:24:54 obviously the higher level language would also be non-tc (that would be a requirement at this point) 18:25:00 forth doesn't ensure termination 18:25:25 and forth doesn't do much about types 18:26:12 so it's probably not what you're looking for, for this project 18:26:14 no, of course. the compiler that targets forth would have to do type erasure 18:27:58 jn__: in any case i would have to re-implement forth anyways (for a new platform, seL4) so it would make sense to add any features i would need anyways, such as structure the language's semantics in such a way that termination is assured. at that point it's not forth anymore, but still something that's similar 18:28:23 jn__: would you be kind enough to show me a program that doesn't terminate, while doing some sort of io? 18:33:22 yes, but it'll take a few minutes 18:33:52 no problem, there's no rush. thanks for being helpful :) 18:34:30 : loopy begin ." Hello World" cr again ; 18:34:32 loopy 18:34:53 what does "again" mean? 18:35:06 jump to begin 18:35:17 of the program? or line? 18:35:59 to the point in the code of "loopy" where i did "begin" 18:36:27 : loopy ... ; declares a procedure, or a "word" 18:37:02 begin marks a point in the code, that can be referenced by a later word 18:37:11 ." Hello world" prints Hello world 18:37:20 cr prints a newline 18:37:38 again jumps to the position that was previously marked 18:37:40 gotcha! 18:38:02 so if forth has infinite loops, i thought that immediately meant the language was TC? 18:38:18 i think so, too 18:38:40 not sure what DGASAU meant 18:39:48 --- join: mnemnion (~mnemnion@c-73-223-86-196.hsd1.ca.comcast.net) joined #forth 18:40:17 i guess if you cut down the word set considerably, you could end up with something that can't do endless loops so easily 18:41:23 (also, i should note that i'm not an experienced forth programmer — i've only spent some time reading half of the ANS Forth standard) 18:41:42 i would be funny with something like "repeat n func" rather than full on looping 18:41:56 er 18:41:59 *i would be happy 18:42:03 lol, what a typo. 18:43:53 lol 18:44:06 --- quit: mnemnion (Ping timeout: 248 seconds) 18:46:09 cheater: Forth has finite memory, and there's no way around it. 18:46:44 ok, nothing that runs on computers is turing-complete 18:47:17 jn__: there's fundamental difference between language being TC and its supporting environment. 18:47:36 jn__: e.g. Lisp _is_ TC. 18:47:59 jn__: it doesn't embed any bounds on memory. 18:48:13 in practical terms, because lisp doesn't deal with fixed-length pointers? 18:48:29 Lisp doesn't deal with pointers at all. 18:48:41 ok, i think i see what you mean 18:48:50 It has references, but it makes absolutely no assumptions on how they are implemented. 18:48:57 Not so in case of Forth. 18:50:01 Virtual machine of Lisp-as-language has infinite memory. 18:51:36 That you implement it on a physical machine with finite memory only makes some algorithms misbehave, when they attempt to scale beyond. 18:52:04 for me personally, this is so far on the theoretical side of computer science, that i didn't think about it 18:52:18 Well... 18:52:52 which means that i shouldn't use the word Turing-Complete, i know 18:52:56 This has some practical consequences. 18:53:31 what are those practical consequences? 18:54:06 DGASAU: saying forth isn't tc because of finite ram is pretty trolly 18:54:12 y u troll 18:54:37 cheater: saying Forth isn't TC because of finite RAM is truth. 18:54:45 Pretty trivial one. 18:55:25 i am not interested in this truth 18:56:51 :) 18:57:56 Whether you're interested in it or not, it is still truth. 18:58:46 it's kind of a trolly truth 18:58:47 Calling inconvenient truth "pretty trolly" only points to your personal problems. :) 18:58:57 you got me there 18:59:49 is there a subset of forth which guarantees termination? perhaps which has total functions? 19:01:25 cheater: read about words and word sets in the standard. where you're asking for probably isn't too hard to do 19:01:48 cheater: but make sure to ban words that can be used for memory corruption 19:02:22 jn__: you introduce non-termination pretty trivially without memory corruption. 19:02:58 how do you figure that lisp as a language imposes no memory bounds, but forth does? 19:03:19 DGASAU: yes; but memory corruption is something to look out for 19:03:37 there's no spec I'm aware of that says forth has to represent memory finitely 19:03:55 is this what you are talking about? https://www.forth.com/starting-forth/11-forth-compiler-defining-words/ 19:04:37 cheater: i didn't have any particular text in mind 19:04:37 zy]x[yz: FYI, Forth-79 is 16-bit explicitely. ;) 19:04:51 cheater: (except maybe ANS Forth 1994, the standard) 19:05:14 if you rearrange the letters DGASAU you get "troll"! shocking but true 19:05:27 zy]x[yz: FIG-Forth has all its memory reachable with @ and ! 19:05:42 DGASAU, does it specify how addresses are represented? 19:05:49 Yes, it does. :) 19:05:57 zy]x[yz: I'm not sure, but IIRC Forth-83 didn't fix this either. 19:06:01 ok 19:06:07 DGASAU: do cells need to contain bounded numbers? 19:06:14 jn__: yes. 19:07:59 crc: where is it? forthcad.com ? 19:08:01 You can try to lift this restriction yourself, but then you need to modify some core assumptions. 19:08:21 how do you ban words? is it on the page i linked to? i skimmed it but haven't found anything 19:08:46 cheater: bt not having them in your implmementation's dictionary 19:09:11 cheater: or if you're working with an existing implementation, you can redefine them with : 19:09:14 By creating separate wordlist and carefully picking what you export via it. 19:09:36 Just like you do with canonical target compilers. 19:09:56 And no, I wasn't talking about defining words. 19:10:00 jn__: oh interesting 19:10:20 separate wordlists sounds like an interesting point 19:10:27 DGASAU: how do you create a separate wordlist? 19:10:52 By using standard word that is intended for it. 19:11:46 --- quit: bedah (Ping timeout: 255 seconds) 19:12:40 sorry, i don't understand.. 19:12:55 This word is named "wordlist". 19:13:23 Confusing, eh? 19:14:33 --- join: bedah (~bedah@2a02:810d:243f:f584:2d1c:5153:5c5e:6af8) joined #forth 19:15:19 to quote a great politician of our time: "I know words, I have the best words" :P 19:15:51 DGASAU: i think you're making fun of me.. 19:17:30 Anyway, starting from Forth to get to something like TFP is very bad idea. 19:18:06 You need to carefully eliminate all those features that provide tricky ways to escape. 19:18:42 Like ', ['], TO/IS and EXECUTE. 19:21:31 You even have to do something about :NONAME. 19:29:10 sorry, what is TFP? 19:30:05 Total functional programming. 19:31:09 There're even worse things that a lot of people who don't have enough experience with Forth will never think about. 19:31:26 such as? 19:31:31 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:ed20:261b:4daf:b0f0) joined #forth 19:31:40 or is this what you're saying about total fp 19:31:59 Such as you cannot easily have both IF .. ELSE ... ENDIF and DO ... LOOP constructs at the same time. 19:32:17 in forth? 19:32:20 Yes. 19:32:28 that's interesting 19:32:30 how come? 19:33:03 the control flow stack does nasty things, i guess 19:33:13 yunfan: yes 19:34:10 interesting 19:34:56 btw, when i say i would like to implement a forth-like language, it would be much smaller, and wouldn't necessarily adhere to what forth does 100% 19:34:59 Because it may be possible to implement unbounded search from IF/ELSE/THEN. 19:35:23 cheater: why do you want it? 19:35:39 cheater: couldn't manage implementing LL(1)? 19:36:54 why would i want to implement LL? 19:37:33 can you give me some examples why you think it's a good idea? 19:37:34 Just to have sane syntax that you don't trip over. 19:37:38 i am not familiar with LL 19:38:10 * DGASAU sighs. 19:39:12 cheater: Forth has this horrible syntax because it was designed at the time when there was no efficient parsing algorithm known that would handle useful class of grammars. 19:40:02 cheater: discovery of LL essentially obsoleted all these tricks that are used to implement control structures in Forth. 19:40:26 oh, that's what you mean 19:42:07 DGASAU: in what world does "I want to implement a forth-like sub-turing language" lead to "then you'll want to change the syntax"? 19:42:15 If you don't have constrained choice, you can implement Pascal-like or C-like syntax and work a lot more efficiently. 19:42:35 well, the idea here is to find a fairly small language that i can easily write an implementation of, with the addition or modification of features that i'd like, in some high level language, and later emit it to C so it compiles on seL4, such that there's at least a small community around the language, and it has existed for a long time, so it's easy to find people who know it to ask them if i run into ... 19:42:41 ... issues 19:42:48 reepca: in the real world, where people are aware of LL(1). 19:42:52 the language should be something like a slightly smarter assembler 19:43:05 or maybe a much smarter assembler 19:43:07 that's all really 19:43:35 cheater: Oberon. 19:44:03 why? 19:44:30 DGASAU: I could also go to #python and say that they should change their syntax to C's because it's possible and I think it's better, using the exact same reasoning you provided here: none. 19:45:01 cheater: Because it is small and simple enough to write your own implementation, if you're going to piggiback on C. 19:45:23 explain the term piggiback here? 19:45:32 i would probably write the first impl of whatever in haskell 19:45:48 Emm... 19:45:54 is that what you mean by piggiback? 19:46:18 I mean that you're not going to implement your own code-generator. 19:46:48 If you have Haskell at hand, why do you want another language?? 19:47:43 i think you missed the point here that i'm specifically creating a language meant for a specific domain 19:47:54 or possibly two: a high level one, and a low level one 19:48:17 a forth-like language could be a pretty good low level one 19:48:18 Why do you want to take the harder and the less efficient way to do that? 19:48:20 it's an abstraction 19:48:43 what do you think would be an easier and more efficient way? 19:49:02 If you have Haskell already, then just use it. 19:50:24 It's stupid not to use scalpel and to cut small details using an axe instead. 19:50:33 no i think you've misunderstood me :) 19:50:38 "... subturing ... guaranteed termination of functions ..." 19:50:56 DGASAU it's ok 19:51:00 you're a bit confused 19:51:26 reepca: so? 19:51:58 reepca: well let's just let him ponder this a bit and get back to it later 19:52:02 DGASAU: so haskell is neither of those. 19:52:24 reepca: if you have Haskell, implementing TFP in it is almost trivial. 19:52:48 oberon has object orientation, and a lot of other stuff i don't want 19:52:53 it's nowhere near minimal 19:53:02 i don't think you understood what i wanted, really 19:53:16 I don't think you understand it yourself. 19:53:26 i do actually 19:53:30 but thanks 19:53:48 i'm looking for a very minimal language that's still fairly popular in some way 19:53:51 i think forth is it 19:53:58 i can't come up with another 19:54:02 Pascal. 19:54:11 pascal more minimal than forth? 19:54:26 that's good 19:54:27 It is as minimal and a lot saner at the same time. 19:54:34 PL/M. 19:55:03 And a number of similar languages from PL/M era. 19:55:24 i think maybe i should stop talking to you about this :) 19:57:10 i wonder how difficult it would be to implement a forth that is lazy. 19:57:11 I think that only recent version of Oberon is object-oriented. 19:57:38 Good luck designing sane semantics for this "lazy Forth." 19:58:00 yeah, it could be tricky 19:58:20 If you want it that way, why don't you just implement some more or less minimal Krivine machine and have your laziness? 19:58:29 You can even program it in this horrible postfix notation. 19:59:24 horrible postfix notation sounds rad 19:59:53 can you link me to any papers on implementing a krivine machine? 20:01:06 I think that you can type it into web search form, and have a number of explanations what it is. 20:03:06 How exactly you're going to implement it, is your personal choice. 20:03:06 Perhaps, you'll decide in the end to drop laziness and just use O'Caml. 20:03:22 is that like OCaml but texan 20:03:36 what does DGASAU mean 20:03:38 btw 20:03:43 it's bugging me 20:07:40 BTW, Oberon is not object-oriented anymore. 20:07:45 For a decade approximately. 20:08:30 It is essentially simplified Pascal. 20:08:59 Simplified and improved. 20:19:58 crc: the offcial webpage looks like not in english, so can i have a download link for try? 20:23:44 crc: ah, its not using forth as the scripting language http://forthcad.com/image/luaobjets.jpg check the picture 20:25:21 it was at least partiallywrittenin forth; iirc, they started using lua for scripting around 2005 20:32:44 ok 20:35:21 actually recently i was playing openscad, its tiny and powerful, except that embeding language was too ugly to me 20:35:22 so i wask if there were a forth CAD tool 21:31:51 --- join: Keshl_ (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 21:32:22 --- quit: Keshl (Read error: Connection reset by peer) 22:08:32 --- quit: dys (Ping timeout: 264 seconds) 22:53:36 --- quit: proteusguy (Remote host closed the connection) 23:44:16 --- quit: ovf (Ping timeout: 258 seconds) 23:46:45 --- join: ovf (sid19068@gateway/web/irccloud.com/x-mavsbuiiijntdjzj) joined #forth 23:59:59 --- log: ended forth/17.11.21