00:00:00 --- log: started forth/19.01.13 00:19:10 --- quit: MrMobius (Ping timeout: 272 seconds) 00:34:05 --- quit: dys (Ping timeout: 258 seconds) 01:04:22 --- join: dys (~dys@tmo-112-149.customers.d1-online.com) joined #forth 02:03:28 --- quit: ashirase (Ping timeout: 250 seconds) 02:07:05 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:33:30 siraben: I wish I was programming in the 80s 02:33:51 instead of people telling me to use some stupid microsoft crapware 02:35:45 proteusguy: I was reading an old BYTE recently to see if I could find out why the CHIP-8 opcodes looked so arbitrary 02:47:27 Interview with Chuck in the Byte issue of Forth posted earlier https://archive.org/details/byte-magazine-1980-08/page/n77 03:10:59 does anyone know a mirror to this? http://www.forth.org.ru/~mlg/mirror/coldForth.teegra.net/tcpippaper/tcp_ip.html 03:12:29 https://web.archive.org/web/20110831130046/http://www.forth.org.ru/~mlg/mirror/coldForth.teegra.net/tcpippaper/tcp_ip.html 03:16:57 * smokeink thanks 03:34:57 Never heard of COLDFORTH. Did it ever get released? 03:42:24 WilhelmVonWeiner, did you find your answer about the CHIP-8 opcodes? 03:42:38 Nope 03:49:29 * smokeink I figured out how to make the console display sp-forths' help (under windows): use a TrueType font like Lucida Console instead of the CMD default Raster Font then use this command to change the codepage: chcp 866 04:35:00 --- quit: smokeink (Remote host closed the connection) 04:46:21 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 05:31:28 --- quit: Zarutian (Read error: Connection reset by peer) 05:31:33 --- join: Zarutian_2 (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 05:31:53 --- nick: Zarutian_2 -> Zarutian 05:44:06 WilhelmVonWeiner: You can use my sixels.fth for your CHIP-8 emulator. 05:49:11 WilhelmVonWeiner: what are you up to? 05:52:52 God, I adored sixels. 05:53:36 (We're talking the same thing, right? six bits of graphics encoded as an ASCII character?) 05:53:45 ttmrichter: the whole half-dozen of them? 05:53:55 and yes 05:53:57 Well, I meant more the technique. :) 05:54:31 ttmrichter: I wrote a Mandelbrot set viewer with sixel support and a small sixel lib for Forth. 05:54:46 https://thecutecuttlefish.org/mandelbrot.html 05:54:56 https://thecutecuttlefish.org/tmp/sixel.fth 05:56:46 Cool. I'm heading to bed now, but bookmarked and looking at it tomorrow. :) 06:07:59 hi ttmrichter 06:08:05 See you, ttmrichter 06:08:13 oh he's leaving 06:08:14 boo 06:14:57 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 06:23:02 john_cephalopoda: I'm just using ANSI escapes 06:23:22 I don't even think my terminal supports sixels. 06:24:00 corecode: with what? 06:24:13 WilhelmVonWeiner: How are you planning to do graphics? 06:24:20 with the simulator 06:24:47 was the hex dispatch for the opcode execution? 06:25:23 john_cephalopoda: VT100 escapes 06:25:27 corecode: yeah 06:27:42 so I can just `hex-pattern: decode` and then match against any 16 bit word `| 00E0 op_cls` `| 00EE op_ret` `| 0___ op_sys` etc 06:28:36 it's a lot of comparison stuff that I would replace with a jump table but my jump tables were getting confusing. I can optimise the word matching code anyway 06:31:04 i wonder how the instruction decode worked on that chip 06:31:14 it wasn't a real chip 06:33:00 aha 06:33:59 Wait, it has a 64x32 screen resolution? 06:34:30 That's super-small :D 06:43:38 WilhelmVonWeiner: things were less complex back in the 80s 06:55:35 StackOverflow blows. I can't leave comments until I have 50 "reputation". 06:56:05 yea 06:56:12 or you'd just post lots of porn links 06:57:33 most sites are good at filtering for spam, and they're not manned by a community of experienced software develpers 06:58:22 "Sorry, your e-peen isn't long enough to spunk on this user's post, you need another 54,000 brown-nose points" 06:58:50 maybe you need to create your own community website that doesn't have these limitiations 07:00:09 I think I have the right to be annoyed at something inane, without having to build my own alternative 07:00:18 sure 07:00:25 be annoyed all you want 07:02:04 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 07:02:52 * john_cephalopoda . o O ( What'd you expect from a proprietary platform? ) 07:03:17 what's a non-proprietary platform? government platform? 07:04:40 Open-source platform. 07:04:45 ah 07:04:51 isn't it open source? 07:07:02 Doesn't look like it. 07:10:38 ok 07:10:49 i don't see how it being open source would change anything 07:12:29 corecode: People could set up their own instances and/or modify the code to make the reputation system less shit. 07:13:20 ah 07:13:29 pretty sure there are very similar open source platforms 07:13:32 There are many open-source projects that just forked when something was deemed bad. 07:13:55 pretty sure you'll find that you need to have some sort of access control 07:14:20 and reputation seems to be low maintenance 07:15:32 I gotta post a ton of useless shit just to make a marginally useful comment? 07:15:38 no 07:15:41 it's why you get so many terrible answers 07:15:47 you don't get reputation for useless shit 07:15:54 terrible answer = no points 07:16:04 good point, even worse 07:16:13 but you don't need comments really 07:16:24 if you have an answer, you can post an answer 07:16:29 hmm.. what sites like StackOverflow or Quora does not seem to understand that adding hurdles to interact with the site just annoyes people that come in from web searches. 07:16:44 pretty sure that's deliberate 07:17:36 I don't even open Quora anymore. Too many indian users who copy and paste Google search results or just don't answer the question, forcing you to sign in after opening a linked similar question 07:17:41 i'm sure they tried all kinds of things, and having random (frustrated/ignorant) people spam your site's content is probably worse than preventing the occasional expert to contribute 07:17:56 WilhelmVonWeiner: that seems to be the problem with quora 07:17:58 it has the effect that shitty information lives longer instead of being relegated to the bin. 07:18:09 stackoverflow seems to have this more under control 07:18:49 --- quit: proteus-guy (Ping timeout: 252 seconds) 07:18:51 naah, not with the legions of barely code literate undergrads/highschoolers that are trying to offload their crappy homework 07:19:14 you don't get points for bad questions 07:19:52 so are you both arguing for and against more people being able to post? 07:19:59 Zarutian: Most stuff on SO can be solved with a simple google search 07:20:04 I am arguing that they fucked up 07:20:14 i think they are very successful 07:20:31 john_cephalopoda: yea, one that shows stackoverflow answers :) 07:20:37 I'd be okay with anyone being allowed to post, as long as their IP is in the US, western Europe, or east Asia 07:20:42 sorry russians 07:20:47 Look for "how to exit vim". First result is stackoverflow: https://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor 07:21:02 Totally unreadable. I have less clue after reading that than before. 07:21:03 lol what 07:21:04 john_cephalopoda: yes. Which irritates me when I have a question that ISNT solvable with google search and the responder think I am trying to do Y when I am asking about X because I want to do X. 07:21:12 caught up in the heavy-handed ip blocking scheme under the reign of Von Weiner 07:21:12 Now take the second result: https://www.cyberciti.biz/faq/linux-unix-exit-vim-editor/ 07:21:22 A really good article, which actually helps. 07:21:59 well good that you can choose 07:23:00 If stackoverflow wouldn't exist, I'd find the answer way faster. 07:23:26 it does help sometimes 07:23:29 if vim gets somehow started when I am doing something in a shell I usually ^Z out of it and just do killall vim 07:23:44 pkg_delete vim 07:23:48 john_cephalopoda: -site:stackoverflow.com in your search 07:23:52 very simple to do 07:23:54 WilhelmVonWeiner: that is usually the next step. 07:24:31 WilhelmVonWeiner: I velhemetically hate modal type interfaces when they do not show any indication in which mode you are in. 07:25:14 velhemetically? 07:25:19 sounds like ancient, esoteric mahic 07:25:28 x/mahic/ c/magic/ 07:25:43 with passion is what I meant 07:25:49 vehemently? 07:25:58 yeah sure 07:30:02 --- join: proteus-guy (~proteusgu@2403:6200:88a6:329f:a0f3:4c0d:f9ca:50cd) joined #forth 07:49:23 i'm happy - first phase of rpany done (provides core type handling, parsing, interpreting, progarmming, conditionals, loops and substacks) - probably should add variables but really can't be arsed at the moment :), and still havering over the need for a return stack (not needed by core, could be nice for authoring, but other alternatives may work) 07:50:29 i was muttering about 'list' stuff yesterday - eventually decided on https://gitlab.com/lilo_booter/rpany/tree/master#lists 07:50:42 looks weird, but works well :) 07:54:09 second phase will introduce stuff which actually does os related stuff (file access, process execution and other things which break me out of the sandbox) 07:57:24 the_cuckoo: regarding interfaces out of the sandbox. You might want to look into https://ocapjs.org/t/what-are-capabilities-by-chip-morningstar/22 for controling that access. 08:01:46 cheers - will take a look 08:03:40 for now, i'm looking at this stuff to incorporate basics - like file access, but also comms - the real goal is a locked down domain specific interface after all, so it should be possible to expose a stack at the end of a socket and do no more than the dictionary provided allows 08:07:01 hmm - i also need to add a mechanism for negative tests... all my tests so far are focusing on valid uses... need to ensure that errors are handled corectly too 10:33:08 --- join: learning (~learning@47.180.91.163) joined #forth 10:43:51 the_cuckoo, are you a threaded interpreted language with forth-like dictionaries? If so how do you deal without a return stack? 10:46:40 --- quit: dddddd (Ping timeout: 245 seconds) 10:47:46 --- quit: Keshl (Quit: Konversation terminated!) 10:51:55 well, based on what i've implemented, the only case were i would traditionally need one is in the do loop i think, but i decided that it would be simpler/safer if the do loop state were held independently of anything shared - hence, it introduces its own 'state' (which is, basically, a stack of numbers to hold the current index of the inner loop at the top of its stack) - a more general return stack would be 10:51:57 of interest to the defintion of the users words, but the core doesn't require it 10:58:47 makes it interesting as the i and j words can simply be implemented in terms of the do loop state (i being 0 index?, j being 1 index? and index? being something which retrieves to do/loop 'state' and just picks the index required) 11:03:49 curiously, this also means i can use the leave word in a begin/until construct (providing the implementation is aware of the possibility of it happening - in this case, catching a leave exception) 11:05:22 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 11:08:36 --- quit: gravicappa (Ping timeout: 250 seconds) 11:24:43 Zarutian, capabilities are great! And that's a remarkably good article on them. Thanks. 11:26:00 the_cuckoo, I agree with hiding the state of loops entirely. Safer code and better to support the programmer's mental model. 11:29:39 hey guys 11:30:49 --- quit: learning (Remote host closed the connection) 11:43:54 --- quit: Kumool (Read error: No route to host) 12:05:23 proteusguy: good - not just me then :) 12:18:10 --- join: learning (~learning@47.180.91.163) joined #forth 12:22:55 --- quit: X-Scale (Ping timeout: 245 seconds) 12:24:57 --- join: X-Scale` (~ARM@83.223.234.83) joined #forth 12:31:54 --- nick: X-Scale` -> X-Scale 12:52:46 --- quit: dys (Ping timeout: 258 seconds) 13:04:51 --- quit: learning (Remote host closed the connection) 13:05:20 --- quit: xek_ (Remote host closed the connection) 13:09:35 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 13:16:30 Hmm, parsing text with forth is a bit ugly. 13:23:42 Huh... 13:23:52 What if I write my files in plain Forth? 13:25:01 what if you write your files in swahili 13:27:21 I don't speak swahili. 13:27:39 oh then that's probably not a good idea. nvm 13:28:03 you could learn it 13:28:09 john_cephalopoda: why is it ugly? the parsing that is 13:28:32 My problem is: I want to generate static websites. Right now I write them in org-mode markup and convert them to html pages. 13:29:00 It takes emacs very long to convert all the pages though, even though they are tiny. 13:29:56 So I am thinking about writing some small forth tool, which takes some markup and turns it into a website. 13:32:14 I kinda want to automate things, otoh my site uses so little markup that coding html by hand is nearly the easiest option. 13:33:33 --- join: dys (~dys@tmo-096-180.customers.d1-online.com) joined #forth 14:06:17 : cubert 1 3 / ** ; 14:06:22 that amuses me 14:07:19 the question I have, from earlier, is how do you deal without a return stack? are all calls jumps without returning rather than subroutine calls? 14:08:04 all are subroutines 14:08:19 don't subroutines require some sort of return stack? 14:10:00 hmm - ok - subroutines is probably not right - they're functions :) - the functions take the stack as an input (by reference) - hence they can push/pop directly with the stack they are given 14:10:33 but how do they return control to the caller 14:10:34 but his question is when the function completes, how does it know where to return to? 14:13:40 hmm - sorry for the delay - thinking about the answer :) 14:14:04 --- quit: dddddd (Ping timeout: 250 seconds) 14:18:20 Linked-lists; link-registers; files... 14:19:00 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 14:19:04 linked lists are just another sort of stack; link registers only give you one level of nesting; files are too slow to be of any use 14:19:35 hey 14:19:43 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 14:20:35 Good morning Forthwrights, can't believe I'm up this early :) 14:20:55 bbl 14:24:57 tabemann: think this is one of those cases which is difficiult to bridge - my system works at a different level i guess - i'm happy to explain the high level approach i'm using, but i suspect it won't help at the level at which you guys are working 14:25:25 --- quit: tabemann (Ping timeout: 245 seconds) 14:25:30 what language are you coding your system in? 14:25:36 c++ 14:26:36 and it's basically all about c++ - they drop objects on the stack - words are introduced which act as methods on those objects 14:27:29 and the underlying system allows the introduction of literals and strings - plus of course, a forth like language for manipulating and creating those values 14:27:40 I suspect the reason you don't have a return stack is that your using C++'s function call/return mechanism as your implicit return stack. 14:28:11 You've baked it in 14:28:25 possibly i guess - i tend to have just a s << function( ); :) 14:30:07 Your language now has a baked in dependency on C++ being the underlying implementation layer. 14:30:35 oh yes - absolutely - it's right there in the first line of the description :D 14:30:46 https://gitlab.com/lilo_booter/rpany 14:30:51 it's a header file 14:31:03 * PoppaVic facepalms... 14:31:08 it just happens to implement a language :D 14:32:37 it's like lua or something similar 14:32:49 how is that like lua? 14:33:01 It's a C++ extension language 14:33:17 it's a language that can easily wrap a native api 14:33:19 I'm not familiar with Lua, never looked into it 14:33:26 that's not what lua is 14:33:41 it allows embedding 14:33:44 lua is a script language that's easy to embed in c apps 14:33:49 indeed 14:33:50 it doesn't aim to extend c syntax 14:33:59 fair enough :) 14:34:21 i'm not extending c++ - i'm providing a library 14:34:28 --- join: Zarutian_2 (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 14:34:39 --- quit: Zarutian (Read error: Connection reset by peer) 14:34:54 --- nick: Zarutian_2 -> Zarutian 14:35:07 There was a small book on writing a Forth inspired C++ extension language 14:36:01 oh yeah? 14:36:47 Just a sec, I'll find it. 14:37:00 well, this isn't extending the language - you can write code in normal c++, and, if you feel like it, wrap aspects of it to allow a simple interactive shell 14:37:26 "Write your own programming language using C++" by Norman E. Smith 14:37:31 --- join: grmr (~Zor@69.wifi.rezel.net) joined #forth 14:37:43 cool - will look it out 14:38:54 It's only about a 100 pages 14:39:51 hi, i'm kind of lost with forth's imput streams. i'm following this article https://idle.nprescott.com/2016/a-brainfuck-interpreter-in-forth.html but I don't understand why the colon in bf reads where it does 14:39:53 Very basic stuff 14:40:13 1996? :) - heh - c++ has come on a long way since then 14:40:43 shared_ptr, template 14:40:56 It's older than that, I have an Indian reprint from 1992 14:41:03 :D 14:41:46 i doubt it would help much :) - i'm heavily using current (c++14/17) features 14:42:41 i'm aiming at c++14 to keep compatability with that freaking windows thing (and ubuntu 16.04 to be fair) 14:42:42 I'm not at all familiar with current C++, the last time I wrote in C++ the implementation was still preprocessor based. 14:42:55 Dislike it intently 14:42:56 long way from there now :) 14:43:03 it's quite nice 14:43:10 * intensly 14:43:13 and yeah - back then - hated it 14:43:23 Hi grmr 14:43:27 just a vanity project 14:43:34 with any luck in the universe, c++ will catch fire, dying a horrible death - and then implode into a black-hole. 14:44:09 it'll come out the other side and stomp all over everything :) 14:44:21 seriously, it's not what it was 14:44:34 it's an abomination 14:44:35 But it is what it is 14:44:49 well, both comments are probably fair :) 14:45:09 i'd have been happier sticking with c, but hey, needs must and all that 14:45:18 and i've grown to like it :) 14:46:20 Reminds me of the movie quote from Treasure of the Sierra Madre: 14:46:43 We don't need no steenkin' objects! 14:46:58 :D 14:47:31 meh - it's a name and somewhere to stash state - shrug :) 14:48:40 * the_cuckoo mutters about it being easier than a return stack ... :p 14:49:02 A return stack is simplicity itself 14:49:06 :) 14:49:10 :) 14:50:03 I think the utter simplicity of coroutines in Forth amply demonstrates that 14:50:48 heh - i implemented co-processes in bash :D - they work like a charm :D 14:51:11 https://gitlab.com/lilo_booter/imp 14:51:24 Coroutine <> Co-Process 14:51:53 fair enough :) 14:52:29 also Coroutine <> Task 14:52:54 well that was a given :) 14:54:45 the point was that my plan is to reimplement the imp approach as an api which can either be a process (remote or local) or a thread - the access to it, would be the same regardless 14:55:31 (basically open, read, write, close) 14:59:51 --- join: tabemann (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) joined #forth 15:00:52 coroutine==task might fly if they all use the same YIELD and there is a way to message/send/recv info between them 15:02:44 The difference to me is that a coroutines share the same data and return stack, while each task has its own data and return stacks 15:04:41 * is that coroutines ... 15:05:44 Yield is basically the cheapest possible concurrency primitive 15:06:47 --- quit: nerfur (Ping timeout: 268 seconds) 15:07:13 i.e. exchange the IP and the top of the return stack 15:09:02 --- join: nerfur (~nerfur@broadband-95-84-184-13.ip.moscow.rt.ru) joined #forth 15:10:48 Simplicity itself compared to the gargage on the Wikipedia Coroutine page 15:11:22 * garbage 15:12:33 Sorry about the typos, I'm not used to being up at 7am 15:17:59 Splitting off the data stack and the return stack was Chuck's greatest stroke of genius 15:19:41 how do you implement three-way coroutines? 15:24:02 bbl 15:24:31 To what end? 15:28:59 --- quit: tabemann (Ping timeout: 268 seconds) 15:29:53 A scenario for low level coroutine use is interleaving a background word that polls devices, with a long running foreground mainline. Look Ma, no interrupts! 15:38:50 Need more coffe. bbl 15:45:59 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 15:54:58 --- quit: Keshl (Read error: Connection reset by peer) 15:55:46 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 16:03:58 --- quit: Keshl (Read error: Connection reset by peer) 16:18:01 Well, I could have three words ABC that just pass control to each other 16:18:26 Through : CO R> R> SWAP >R >R ; 16:18:42 Instead of swap it would be ROT 16:21:46 a circular linked list of addresses you just hop around, executing crap. 16:31:20 That would work too 16:34:32 Hmmm... 16:34:45 I want to write strings to a file. 16:35:17 Those strings can contain the " character. So S" Here is a string which contains " characters" \ won't work. 16:35:31 Can't you escape " ? 16:36:14 siraben: Doesn't seem to work in gforth. 16:36:22 Backslash doesn't escape. 16:36:46 --- quit: grmr (Quit: leaving) 16:36:48 S" Testing \"Forth\" things" 16:36:58 :8: Undefined word 16:37:01 S" Testing \">>>Forth\"<<< things" 16:39:36 "s" compilation 'ccc"' – ; run-time – c-addr u gforth “s-backslash-quote”" 16:39:41 http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Displaying-characters-and-strings.html 16:40:05 --- join: tabemann (~tabemann@h193.235.138.40.static.ip.windstream.net) joined #forth 16:42:31 john_cephalopoda: that should be it 16:43:29 john_cephalopoda: https://bernd-paysan.de/gforth-manual/Word-Index.html#Word-Index 16:45:34 s\" needs to be improved - go to it. 16:46:25 I remember implementing s\" for attoforth 16:48:10 I wonder if I should implement it for hashforth 16:48:23 Well, obviously it needs \n\r\t, %u %n %d, and then 16:48:50 The whole "writing to file" thing is really ugly. 16:49:00 what do you mean by %u %n %d? 16:49:00 I think I'll rather write to stdout and pipe that into a file. 16:49:36 stdout is a file ;-) 16:50:02 I think john_cephalopoda means to use terminal IO to write to a file via redirection 16:50:17 rather than having a dedicated file access API 16:51:52 see emit 16:51:52 : (emit) 16:51:52 outfile-id emit-file drop ; 16:51:52 latestxt 16:51:52 Defer emit 16:51:52 IS emit 16:51:54 ok 16:57:11 tabemann: he probably means C-like format strings 16:57:23 figured 16:57:30 But then again in Forth you could do S" number:" . 16:57:37 Wait no, hm. 16:57:41 That's for output 16:58:19 --- quit: john_cephalopoda (Ping timeout: 252 seconds) 16:58:31 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:58:53 Doesn't work out... 16:59:53 part of me wants hashforth to have IO beyond pure terminal IO... but it's supposed to be a proof of concept of a standard without baked in standard IO 17:00:33 because the standard has to be usable on, say, embedded systems without any baked on file IO 17:00:34 *in 17:01:17 so currently the only way of loading code rather than typing it/piping it in is th load it into the image used at build time 17:01:38 tabemann: I've thought about something like that before... If you have a multi-purpose Forth that is supposed to run anywhere, you'll need a way to ask: "Is this feature available?" 17:02:04 Something like S" filesystem" FEATURE_AVAILABLE? 17:02:15 even the terminal IO I have really is just for debugging purposes 17:03:09 but then we probably do have to have optional featuresets, of which file access would be one of them 17:04:03 just like people will want FP, even though the core standard won't have it 17:05:57 things do get kinda limiting if you always say "but will an embedded system support this necessarily?" whenever you consider a potential feature 17:06:01 nah, they'll want IEEE-whatever 17:06:37 I don't understand that comment 17:07:38 how is wanting FP different from wanting IEEE-whatever 17:07:52 tabemann: Having an environment query (like ENVIRONMENT? in ans) is pretty nice imo. You can just start your program and before doing anything ask "Is there a file system? Is there a screen? Does this system support FP?" 17:07:53 unless you thought I meant "fixed point" and not "floating point" by "FP" 17:08:17 john_cephalopoda: yeah, we might have to do thta 17:08:19 *that 17:08:43 --- join: dave0 (~dave0@193.060.dsl.syd.iprimus.net.au) joined #forth 17:08:56 ahoy 17:10:54 Hmmm, getting late. Cya 17:29:16 You can have an opcode for platform services, e.g. SYS ( svc -- ? ) 17:30:01 Each service have a standardized service number 17:30:41 If the is unsupported the VM triggers a trap 17:32:49 'trap' always made me peeved. Moving them to HW made folks excited. Others would call it an 'exception' - I just think of it as an error, and yeah: do something obscene to the user. 17:33:22 ..core-dump - perfect.. Nuthin as amusing as a filesystem littered with core-dumps ;-) 17:34:13 A trap is just an exception thrown by the VM instead of by your code 17:35:02 * actually I prefer "raised" to "thrown" 17:35:20 I prefer "call the damned 'oh-shit' routine" 17:35:28 :)) 17:36:33 So for example if the service number for reading a file descriptor is 6 17:36:35 : write ( a # fd -- +n ) 6 pause sys ;inline 17:37:06 * I meant writing a file descriptor 17:41:03 If service #6 is unsupported SYS will trigger the xsys "Unsupported Platform Service" trap 17:41:21 actually, I'd hide the pause in sys itself. You might also teach it (as a compiling word) when to puke on bad services. 17:41:45 back 17:42:20 Pause would not be appropriate for some services, like an exit, or a coredump, etc... 17:43:02 great idea 17:43:12 I'll go with SYS 17:43:12 rdrop-exit: perhaps true, but it's 'better'.. And, you could place it after Multiple choice here. 17:43:14 Although the services themselves could have a built-in PAUSE upon return 17:43:57 PAUSE to me is something that is part of a multitasker written in Forth or VM assembly, not something baked into the core 17:43:57 It's what I use on my POSIX umbilical Host 17:44:20 it's a bloody WORD - a vector. Deferred. 17:44:34 It depends on the core 17:45:33 iirc, it date back to FIG, too 17:45:51 What does? 17:46:12 PAUSE or SYS/ 17:46:27 ? 17:46:37 'pause' 17:47:09 Pause was in PolyForth and F83, can't recall if it was in FIG 17:48:06 may have been 83, that was a lotta' years & miles ago 17:48:29 Time flies, doesn't it :) 17:49:29 Any PAUSE is slightly besides the point in the SYS discussion 17:49:50 rdrop-exit: never fast enough - I'm still alive. 17:49:57 * s/Any/Anyway/ 17:50:16 Not really, it fits into the TASK discussion quite nicely. 17:51:07 I can't see it doing much harm, but yeah - switching at every EMIT in a .( or ." would get really goddamned tiresome - fast. 17:51:46 SVC/SYS does, as well, fit well. We just won't let anyone know it's Just Another Function ;-) 17:53:35 I have an idea 17:53:36 --- quit: proteusguy (Read error: Connection reset by peer) 17:53:37 It's basically a way to pile all those services into a single opcode 17:53:43 --- join: proteusguy (~yaaic@119.63.68.196) joined #forth 17:53:43 --- mode: ChanServ set +v proteusguy 17:53:57 rdrop-exit: yup, like ol' int10 or whatever 17:54:09 exactamundo 17:54:18 have a SYS-LOOKUP word 17:54:35 we don't wanna' know - it's underware 17:54:56 so that each service has a name, and SYS-LOOKUP is used to find it 17:55:32 so we don't have to have a rewritten service number assignment like we do for opcodes 17:55:38 I don't get it, each service has a standardized number 17:55:38 *prewritten 17:56:02 rdrop-exit: good luck - you'll need a hammer, this round. 17:57:39 that only works until implementations want to support differing system or library calls for which names have not previously been assigned 17:58:37 *numbers 17:58:40 Which is always the case for such things 17:59:55 Either something is standardized or it isn't 18:00:05 --- quit: Kumool (Quit: EXIT) 18:00:23 With any stardard there is a standard authority 18:01:11 but we should allow a way to have nonstandard things in a compatible manner, and this allows that in the cleanest way possible 18:01:57 we can't foresee every possible case in which the user would want to call something in the outside world 18:02:52 No but you can centralize the assignment of standard numbers 18:02:52 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 18:03:10 That's how it works with the internet for example 18:03:11 here's an idea 18:03:22 have positive and negative numbers 18:03:27 positive numbers are standardized 18:03:28 * PoppaVic sighs 18:03:39 negative numbers are open for implementations to do fuck all with 18:04:00 You don't need numbers for non-standard things 18:04:25 you need something to pass into SYS 18:04:40 You don't need SYS for non-standard things 18:04:54 SYS is a channel to standardized things 18:04:57 what, they define new opcodes instead? 18:05:16 worked for zilog 18:05:22 They do whatever they want, if they're being non-standard 18:05:58 I'd rather people define new SYS codes, and we provide a standardized means of distinguishing standardized SYS codes from nonstandard ones, than people fucking with the set of opcodes 18:06:20 especially since the set of opcodes should remain small 18:06:33 There's no point trying to regulate non-standard behavior 18:06:46 we should at least try 18:06:57 But there's no point 18:07:49 There is "a point", but he's gone off the other direction 18:08:10 We're saying follow this standard and you will have this benefit, don't follow it and you're on your own 18:09:07 neither cp/m, nor dos ever let you just dick in new 'ops'.. Nor do linux-syscalls. You want "variants", if you do. 18:10:17 but Java, Python, Haskell, and many other languages openly have FFIs for the user to define to define new "primitives" freely 18:10:39 some languages even emphasize this, like Lua 18:10:42 Then, perhaps they should use those. 18:10:53 and the Ficl implementation of Forth 18:11:09 If an implementer comes up with a service he would like to add to the standard, he asks the number assignment autority to reserve a number for it 18:11:42 --- quit: jedb (Ping timeout: 258 seconds) 18:11:57 That's how all such things work AFAIK 18:12:39 but look at, with port assignments, how people willy-nilly choose ports that are not assigned when they need a port for something 18:13:23 by at least recommending that the person use a negative service number rather than a positive one, they'd be advertising that the service number they're using is not part of any standard 18:14:25 --- join: proteusguy2 (~yaaic@2001:44c8:4517:b6bd:1:0:2d8f:33e1) joined #forth 18:14:33 hey 18:14:34 --- quit: proteusguy (Read error: Connection reset by peer) 18:14:36 --- quit: proteusguy2 (Read error: Connection reset by peer) 18:14:44 --- join: proteusguy (~yaaic@119.63.68.196) joined #forth 18:14:44 --- mode: ChanServ set +v proteusguy 18:14:52 wb again 18:17:11 * crc will just be defining a range of identifer codes for non-standard device types for his vm 18:17:31 There's no harm in it, I won't try to dissuade you if you have you're heart set on it 18:17:52 --- quit: PSnacks (Ping timeout: 268 seconds) 18:18:52 I know with ANS/2012 there's a defined set of standard exceptions, and then a open range of values for user-defined exceptions; this is similar in concept 18:19:29 --- quit: proteusdude (Ping timeout: 240 seconds) 18:20:59 Yes, although in the case of exceptions names would be enough, no need for numbers. 18:21:45 --- join: proteusguy2 (~yaaic@2001:44c8:4517:b6bd:1:0:2d8f:33e1) joined #forth 18:21:59 --- join: proteusguy3 (~yaaic@119.63.68.196) joined #forth 18:22:07 In the case of traps you do need to standardize vector addresses, most likely in low memory. 18:22:12 --- quit: proteusguy (Read error: Connection reset by peer) 18:23:04 yes, for standardized services there would be a set of standardized indices 18:23:41 --- join: proteusguy (~yaaic@2001:44c8:4550:9feb:1:0:372c:fcdf) joined #forth 18:23:41 --- mode: ChanServ set +v proteusguy 18:23:53 I use names beginning with "x" for exceptions, e.g. xundefined, xoverflow, etc... 18:25:00 The "number" of the exception is the address of the default exception handler for that exception. 18:26:07 --- quit: dddddd (Remote host closed the connection) 18:26:14 --- quit: proteusguy2 (Ping timeout: 264 seconds) 18:26:35 --- quit: proteusguy3 (Ping timeout: 268 seconds) 18:26:36 Have to walk the dogs before it gets too hot, chat again later. Keep on Forthin' 18:26:41 see ya 18:26:54 --- quit: rdrop-exit (Quit: Lost terminal) 18:45:21 --- quit: dave0 (Quit: dave's not here) 18:48:38 --- join: jedb (jedb@gateway/vpn/mullvad/x-jiadonhckortakyp) joined #forth 18:48:46 --- quit: jedb (Remote host closed the connection) 18:49:00 --- join: jedb (jedb@gateway/vpn/mullvad/x-gzjwfxkosiunsxcb) joined #forth 18:51:38 --- join: PSnacks (~PSnacks@p5B246616.dip0.t-ipconnect.de) joined #forth 19:23:12 --- join: proteusdude (~proteus-g@110.164.217.65) joined #forth 19:23:45 --- quit: proteusdude (Remote host closed the connection) 19:26:10 --- join: proteus-dude (~proteus-b@110.164.217.65) joined #forth 19:48:27 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 19:48:28 --- quit: pierpal (Client Quit) 19:49:22 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 19:52:08 --- quit: PSnacks (Read error: Connection reset by peer) 19:52:54 --- join: PSnacks (~PSnacks@p200300CB27033EFC395ECCA16D8063DE.dip0.t-ipconnect.de) joined #forth 20:01:49 --- quit: Kumool (Ping timeout: 240 seconds) 20:04:02 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 20:07:14 --- quit: tabemann (Ping timeout: 250 seconds) 20:19:22 --- quit: proteus-dude (Ping timeout: 250 seconds) 20:23:52 --- join: gravicappa (~gravicapp@h109-187-2-216.dyn.bashtel.ru) joined #forth 20:26:12 The file writing stuff in Forth is horrible. 20:27:00 I want to do S" Test" WP \ and it will write "

Test

" to a file without having to copy the string around. 20:27:07 I don't think it's possible. 20:29:29 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:ed08:95af:b87f:6b5c) joined #forth 20:32:59 type it in the file, now you don't need to move it. 20:35:17 --- quit: tabemann (Remote host closed the connection) 20:35:36 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:ed08:95af:b87f:6b5c) joined #forth 20:44:27 Horrible. 20:44:42 add some more exceptions. 20:45:20 Hmm, the string handling is not great and the file handling is extremely bad. 20:47:07 I found the strings to blow necrotic goats, but the files were just bs-noise with exceptions 20:48:33 --- join: proteus-dude (~proteus-b@110.164.217.65) joined #forth 20:48:54 That stuff is exhausting. I'll stick with emacs. It will take 40 seconds to generate 5 static pages, but it works. 21:10:00 --- quit: proteus-dude (Ping timeout: 268 seconds) 21:17:41 back 21:28:14 Hey tabemann 21:34:20 --- quit: APic (Ping timeout: 250 seconds) 21:39:42 --- join: APic (apic@apic.name) joined #forth 21:40:43 --- quit: proteusguy (Read error: Connection reset by peer) 21:41:00 --- join: proteusguy (~yaaic@mx-ll-180.183.125-167.dynamic.3bb.co.th) joined #forth 21:41:01 --- mode: ChanServ set +v proteusguy 21:59:32 --- join: proteus-dude (~proteus-b@mx-ll-180.183.125-167.dynamic.3bb.co.th) joined #forth 22:07:48 --- quit: Kumool (Quit: EXIT) 22:39:14 --- quit: the_cuckoo (Quit: WeeChat 1.4) 22:56:24 --- quit: proteus-dude (Ping timeout: 272 seconds) 23:07:30 --- join: proteus-dude (~proteus-b@mx-ll-180.183.125-167.dynamic.3bb.co.th) joined #forth 23:09:45 --- join: the_cuckoo (~charlie@d51A50AE9.access.telenet.be) joined #forth 23:50:24 --- quit: MrMobius (Ping timeout: 250 seconds) 23:59:59 --- log: ended forth/19.01.13