00:00:00 --- log: started forth/18.07.10 00:36:02 --- join: Lord_Nightmare (Lord_Night@unaffiliated/lordnlptp) joined #forth 00:47:18 --- quit: dys (Ping timeout: 240 seconds) 00:48:18 --- quit: pierpal (Ping timeout: 240 seconds) 01:07:12 --- mode: crc set +o koisoke_ 01:22:44 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:24:10 --- join: smokeink (~smokeink@li1870-239.members.linode.com) joined #forth 01:39:21 --- quit: smokeink (Quit: Leaving) 02:03:12 --- quit: ashirase (Ping timeout: 240 seconds) 02:05:15 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:48:18 --- join: wa5qjh (~quassel@175.158.225.221) joined #forth 02:48:19 --- quit: wa5qjh (Changing host) 02:48:19 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 03:08:42 --- quit: nighty- (Quit: Disappears in a puff of smoke) 03:15:43 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 04:00:33 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 04:04:04 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 04:06:35 --- quit: MrMobius (Ping timeout: 260 seconds) 04:06:35 --- nick: [1]MrMobius -> MrMobius 04:07:56 --- quit: wa5qjh (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) 04:18:36 --- join: epony (~nym@77-85-141-166.ip.btc-net.bg) joined #forth 04:40:36 --- quit: pierpal (Quit: Poof) 04:40:55 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 05:36:54 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 06:02:30 --- nick: jn___ -> jn__ 06:27:19 --- quit: Keshl (Read error: Connection reset by peer) 06:27:53 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 06:56:42 okay laddies 06:56:48 how do we make Forth cool again 06:57:22 I still don't understand how you just make it functional 06:57:28 much less cool 06:57:33 --- nick: zy]x[yz_ -> zy]x[yz 06:57:58 The website can say things like: "Forth is speed." "Forth is reliability." "Forth is elegant." etc 06:58:09 but we'll say nothing about what Forth actually is, let alone does 06:59:21 "Here at PlaceboCorp, we've been using Forth for the last 4 years. Without it, "it" being Forth, we wouldn't be where we are today." 07:00:23 oh you're looking for buzzwords? it's webscale and synergistic and facilitates mission critical business applications using parallel big data correlation and logistics for IoT connected devices 07:01:00 "APL? React.js? Emacs? - We dumped it all for Forth." 07:09:57 --- quit: pierpal (Read error: Connection reset by peer) 07:15:01 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 07:19:20 --- quit: pierpal (Read error: Connection reset by peer) 07:22:55 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 07:26:57 --- quit: pierpal (Read error: Connection reset by peer) 07:28:23 --- quit: epony (Quit: QUIT) 07:31:56 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 07:33:01 WilhelmVorWeiner: I think the mainstream dislikes Forth precisely because it's not complicated enough. It doesn't support an "intellectual priesthood." And if we change that we take away the very thing that makes it great to start with. 07:33:12 So I don't know if there is anyway to "make it cool again." 07:33:23 It *is* cool - but people just look the other way and hum. 07:34:35 If you look at the history of Linux, you see an unending stream of "complexification" on all fronts. 07:34:53 When I first started out in the biz, "make" was the popular build tool. 07:35:06 And it made *total* sense - it was very clear what it was doing, and it was easy to learn how to write makefiles. 07:35:27 But they just keep adding on more and more layers of abstraction, to the point where I can hardly read modern makefiles. 07:36:06 --- quit: pierpal (Ping timeout: 244 seconds) 07:36:43 The mainstream seems to be 100% "the more abstract the better." 07:37:00 That's a learned behaviour 07:37:13 They don't want to even know that there's hardware at the bottom of the pile - that's DIRECTLY contrary to Forth's attitude of "know your system." 07:37:15 Yes, that's true. 07:37:18 If you can learn it, you can unlearn it 07:37:22 But it's a HUGE PILE of learned behavior. 07:37:46 I think a good start would be to start teaching computer science kiddies about processor architecture again. 07:37:46 Also I think most programmers are sick of the complexity 07:38:03 Don't teach them architecture, teach them BASIC 07:38:28 I think hardware architecture is important. 07:38:34 most people think programming is complicated because they get taught inane concepts when they don't know the BASICs 07:38:37 It's the ground floor of what you're doing when you program. 07:38:53 mainstream doesn't like forth for good reason imo 07:38:54 It's really not, because the compiler abstracts that away anyway 07:38:57 Yes, I agree with that. 07:39:06 And they should also be very good at assembly. 07:39:15 Whether they use it a lot or not, they should BE ABLE TO. 07:39:26 higher level languages enable lower-skilled programmers to be more productive in less time (i.e., less development cost) 07:39:28 That's sort of like the second floor, right above hardware architecture. 07:39:33 That's too much for a kid. They have to keep track of registers and addresses and shite 07:39:49 Um, YES. 07:39:58 I.e., "know what's going on." 07:40:11 And a kid won't care because they're not going to know what's going on because they're not going to write anything interesting 07:40:26 They want to make stupid atari-tier games 07:40:29 not write algorithms 07:41:21 They should understand, for example, exactly why this particular algorithm A that looks like it should be better than algorithm B in fact isn't, because it mishandles the memory cache. 07:41:35 If you don't know WHY B is better, then it's just black magic, and it's a priesthood. 07:41:37 zy]x[yz: You could be right, but I feel the only reason people don't think of Forth as a high level language is because Forthers are so averse to packages and libraries 07:42:00 KipIngram: No child cares or will really want to or be able to understand computational complexity 07:42:14 They want to be able to write fun things, simply 07:42:20 Well, then I would say they'll never appreciate Forth. Not *really*. 07:42:33 no, it's because there's no type checking and because if you screw up then your program segfaults rather than producing a nice error message with a stack trace and line numbers 07:42:51 among other reasons 07:43:03 I would say readability is another one 07:43:05 zy]x[yz: LOL I never even realised that happens 07:43:08 zy]x[yz: That's true. With great power comes great responsibility. 07:43:20 Forth doesn't try to protect you - it gives you free reign. 07:43:29 I always put prints everywhere to keep track of my code and count the number of times "twat" shows up to track program execution 07:44:31 yes, all of these things are fine for us because we use forth as a hobby or for our personal business. but from a business standpoint (that is, if you're not self-employed), forth is not economic 07:44:49 and as a forth user, I'm okay with that 07:44:50 I guess Forth systems need to be bloaty shite to pick up steam 07:45:04 Right - I think that's because you actually need to be a quite good programmer to use Forth effectively. 07:45:22 It's not a "code monkey" tool, and corporations are all about hordes of code monkeys. 07:45:41 I don't think Forth isn't economic. I think it's because people are expected to know *code monkey* (no offense) languages 07:45:54 A crap pile of code that marginally works TODAy is better, to them, than a supremely elegant implementation that's not ready until three quarters from now. 07:46:04 WilhelmVonWeiner, while do you think people are expected to know "code monkey" languages? 07:46:08 s/while/why/ 07:46:27 Define "why" 07:47:16 another point is that business languages need to be easily maintainable or transferrable (readable/understandable by others) just by natural use. forth takes effort and discipline to make readable code, and even then it's a stretch 07:47:18 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 07:47:21 zy]x[yz: I think it's the same mind set that sent us down the "faster sequential execution" path of processor design, rather than "simple parallel cores." 07:47:36 Simple parallel cores would have required new thinking, THEN, and would have slowed down development pathways. 07:47:36 I don't really think Forth is unreadable 07:47:39 Not acceptable. 07:47:42 unless you're writing bad Forth 07:47:51 I think forth is very readable, but I've been working with it since college. 07:47:54 WilhelmVonWeiner, I mean why do you think there is a business demand for "code monkeys?" 07:47:56 s/bad/unprofessional?/ 07:47:59 And I used an RPN calculator in college. 07:48:09 So "RPN think" is just burned into my brain. 07:48:12 and I've never seen forth code I would consider even close to as readable as c 07:48:23 especially chuck moore's 07:49:00 That's just the way Forthers write their code, and C can easily be as unreadable without comments 07:49:32 but it's generally /not/, even when a person is lazy. that's what I mean, C's natural state is more readable than forth's 07:50:10 CMs code can be like un-decodable stone tablets because his brain is on another plane of existence, he's not a very good comparison 07:50:26 I don't buy that 07:50:26 I think that's because C's flow is closer to the style of math we're taught in school (infix) and the imperative style of most spoken languages. 07:50:41 If , then do . Otherwise do . 07:50:56 any time I hear "_____'s code is hard to read because he's just soooo smart", I think it's full of shit 07:50:56 The Forth alternate style has to be internalized, deeply, to the point where it becomes natural. 07:51:05 if the guy is so smart, he could communicate his ideas more clearly 07:51:10 Otherwise it's like having "moderate" understanding of a foreign tongue. 07:51:22 You can translate, but you have to TRANSLATE, in your mind. 07:51:30 zy]x[yz: I mean, okay - but CM's code is hard to read, and he is mega smart, so you can see why I'd make the connection 07:51:33 Rather than simply "operating" in the foreign tongue. 07:52:06 Moore's singularly uninterested in "communicating" his ideas. 07:52:10 WilhelmVonWeiner, fine, I can accept that he's smart and also writes unintelligible code. show me some readable forth, though 07:52:14 He wants to communicate his ideas to the computer - not to other people. 07:52:20 He's said this outright at times. 07:52:35 well regardless of what he said, that's not true 07:52:42 the point of a programming language is to be read by humans 07:52:51 Not really 07:52:52 otherwise he'd be programming with a hex editor 07:53:07 The point of a programming language is so you don't have to write raw bytes 07:53:19 --- quit: dave9 (Quit: one love) 07:53:21 i.e., human-readable 07:53:38 zy]x[yz: human-writability is also important 07:53:43 It's to be read by "human(s)" not "humans", "human(s)" being your target audience, Chuck's target audience being himself 07:54:58 fair enough 07:55:12 I like crc's retro, and words in that are well-named and readable 07:55:24 converting a string to a number? s:to-number 07:55:26 and my point that started this discussion is that a business programming language needs to be readable by humans in its default, lazy state 07:55:43 want to put a char? putc 07:56:00 those are just function names. you can choose good names in any programming language 07:57:22 `#0 sys:argv s:to-number putn` I would say is a readable line, which could do whatever, and you can name that word "arg0-to-number" and that would be a readable code, obviously a simple example but you should get my point 07:58:15 in that, as long as your words are readable at each level, your final code should be readable 07:59:00 I was always under the impression good Forth was supposed to read like a sentence, was I mistaken, is "good Forth" a bunch of weird, uncommented, mystical operations 07:59:04 Right - naming the words well (and not just individually, but collectively so they form coherent "families" of words) is super important in Forth. 07:59:37 well anyway, in my opinion forth has 1.5 selling points: 1 is self-sufficiency (easily bootstrapped from scratch), which is the main reason I'm interested in it as a hobby language. I give 0.5 to compile-time execution, because that sounds great but it's raised a bunch of questions that I still don't have answers to, so at the moment I can't actually say I've seen it work right 07:59:40 I think that's effort well spent, because it means you have a crisp "vision" of how you're approaching the problem. 07:59:59 both of those things are appealing to me as a hobbyist. they're not appealing to business 08:00:34 Just because I'm so convinced of it, I'll reiterate that I think that's because businesses don't want to pay for truly talented programmers. 08:00:39 I think someone learning a more modern Forth like Retro or Factor would pick it up quicker than Python (if they had no c-like experience) 08:00:47 They want to pay less for "fast code spewers." 08:00:52 of course they do 08:00:56 and doesn't that make sense? 08:01:00 It's always the guy that spews out code fast and early that gets the kudos. 08:01:21 It does given the corporate emphasis on the short term. 08:01:29 It doesn't if you're interested in the full life cycle of the code. 08:01:36 It's harder to debug, harder to extend, etc. etc. etc. 08:02:02 products in our industry are so short-lived these days, it's not profitable to invest in a long life cycle 08:02:07 But the corporate obsession with "now - this quarter" is extremely REAL. 08:02:24 you should be blaming consumers for this, not companies 08:02:53 That's true at the top product level, but you could still write quality underware that got re-used in many many future products. 08:03:22 lol I thought forth mantra spoke against reuse 08:03:33 That's something I don't get 08:03:46 We re-use ! and @ and so forth all the time. CMOVE. 08:03:50 re-use is great 08:03:52 It's valid up to a point. 08:04:14 But making this solution inefficient in the name of re-use means it's been taken too far. 08:05:05 In the real world you have to balance efficiency, security, and deadlines, and if you have a solid piece of suitable code might as well reuse it 08:05:33 Even if you have to put a whole bunch of extra scaffolding around your new code to make it compatible with the old code? 08:05:39 Even if you could make it n% faster, if it works fast enough, it works 08:05:47 That's not really reusable code 08:06:19 anyway, I've seen people where I work whose heads spin when I start dumping and dissecting raw memory chunks with gdb to debug a problem. and these aren't people who I would consider useless - they are productive and provide value to the company. when you see that, it's no mystery that forth is not a good choice for a business 08:06:43 --- join: epony (~nym@77-85-141-166.ip.btc-net.bg) joined #forth 08:06:47 Thanks for reminding me, I need to learn to use gdb 08:06:57 I miss DEBUG. 08:07:04 Just DEBUG and start tracing. 08:07:15 gdb seems to require some elaborate "setup" to prepare to use it. 08:07:20 I've never mastered it either. 08:07:30 All kinds of symbol files and so on. 08:07:47 that's just the nature of c 08:08:10 That's my point - DEBUG cared not how the binary was built. 08:08:15 forth would have the same issue if you built it into shared objects 08:08:23 It just gave you access to it - using addresses and so on instead of symbols. 08:08:39 how do you know the address of a symbol? 08:08:57 I mean, technically you can use gdb without symbols too but it doesn't provide much value 08:09:00 I could look at the code I was tracing through and suss out what part of my program it corresponded to. 08:09:21 "Ah, so *that* address must be my alpha widget strucure. 08:09:25 structure." 08:09:51 "And this bit of code must be that second loop..." 08:10:40 And if it started to get too complex for that, I'd slap a line like "dummey = " in my code at the spot I was interested in - then I could search for magic number to find the neighborhood. 08:10:41 sounds a bit of a hassle 08:10:55 Anyway, I'm not criticizing the ability to work with symbols. 08:10:57 That's great. 08:11:06 I'm criticizing having that be REQUIRED. 08:11:11 The simple dumb mode should still be there. 08:11:21 Maybe it is, and I just haven't figured it out. 08:11:27 you can run gdb without symbols 08:11:39 it'll give you raw addresses and you can pretend to know wtf is going on 08:11:41 But DEBUG was simple, and easy to figure out. 08:12:03 I want to be able to say "gdb " and be in that simple mode. 08:12:09 it is 08:12:10 Be at the first instruction of my program, and able to start tracing. 08:12:12 have either of you tried out Retro Forth anyhow 08:12:17 no 08:12:23 no, me either. 08:12:24 I've seen some of it 08:12:28 looks neat 08:12:46 I just don't have much interest in playing with someone else's forth. I tolerate forth for the ability to roll me own 08:12:51 Retro 12, the mdoern incantation, steals some ideas from colorForth but isn't as esoteric 08:12:55 Me too, really. 08:13:03 I don't know why I became an irish leprechaun at the end of my last post 08:13:11 You might learn some neat tricks from it, I'd recommend giving it a go 08:13:13 I'm more of a Forth builder than a Forth programmer. Of course, that involves writing a good bit of Forth, but using my own tool. 08:13:37 uses a unique, incredibly VM 08:14:15 I have an aversion to learning other people's stuff - I absolutely hate debugging someone else's code. When I write the code, it does everything exactly the way my intuition says it should. 08:14:38 When I do have to learn a tool or system someoen else wrote, then "the simpler the better." 08:14:53 The easier it is just to pick up and start dickering with, successfully, the happier I am. 08:15:05 If that learning curve rises above a certain level, I just put it aside and look for something else. 08:15:25 This is pretty simple, I'm modifying it to play with systemC and I just write the raw bytes I need to a file to program it 08:15:27 On the other hand, I've spent huge amounts of energy learning basic foundational stuff (math, physics, etc.) 08:15:34 WilhelmVonWeiner, is it self-hosting? 08:15:43 Because those things are not "arbitrary." They aren't just decisions someone made. 08:15:48 define self-hosting 08:15:49 They have a grace and a beauty that's just stunning. 08:16:08 WilhelmVonWeiner, can it bootstrap a new version of itself? 08:16:38 No, the reference distribution is written in C 08:16:52 ok 08:17:01 I don't think it would be hard to re-implement in itself, I might try after this coursework submission 08:17:31 does it produce binaries or is it runtime interpretation only? 08:19:16 the latter, but there is a binary that executes a given source file and exits 08:19:30 got it 08:20:29 http://forthworks.com/retro/ 08:20:34 maybe I should actually try to build my forth out of retro instead of dicking around with my garbage implementation 08:21:07 There's a folder in the distribution called literate, which contains some of the core source files in Markdown format, completely explained and broken-down 08:21:53 A tool called Unu extracts the C source from the markdown 08:22:39 Unu is potentially useful on it's own. Provides advanced formatting capabilities to comments that won't interfere with the actual code 08:31:19 * crc uses unu for projects other than just retro 08:39:17 proof is in the pudding 09:20:45 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 10:11:49 --- join: dys (~dys@tmo-108-126.customers.d1-online.com) joined #forth 13:29:26 --- quit: ncv (Ping timeout: 255 seconds) 13:50:16 --- part: impomatic left #forth 13:52:14 --- join: impomatic (~digital_w@host86-137-197-211.range86-137.btcentralplus.com) joined #forth 15:19:42 --- quit: dys (Ping timeout: 240 seconds) 16:32:19 --- quit: nighty- (Quit: Disappears in a puff of smoke) 16:39:02 --- join: pierpa (57043661@gateway/web/freenode/ip.87.4.54.97) joined #forth 16:44:24 crc, "The IRC channel is looged at http://tunes.org/~nef/logs/retro and a 16:44:32 ..." 16:44:40 pls fix 16:48:54 --- quit: proteus-guy (Remote host closed the connection) 16:51:16 zy]x[yz: done 17:22:58 --- quit: dddddd (Remote host closed the connection) 17:24:18 --- quit: epony (Ping timeout: 240 seconds) 17:26:56 --- join: lchvdlch (~nestr0@191.98.151.137) joined #forth 17:40:41 --- join: wa5qjh (~quassel@175.158.225.193) joined #forth 17:40:42 --- quit: wa5qjh (Changing host) 17:40:42 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 17:42:31 ty that was really impeding my productivity 17:48:49 sorry :( 17:58:10 --- join: epony (~nym@77-85-141-166.ip.btc-net.bg) joined #forth 18:23:52 --- join: xek__ (~xek@192.55.54.38) joined #forth 18:26:39 --- quit: xek_ (Ping timeout: 268 seconds) 18:35:23 * Zarutian fixes a bug in his assembler for the Forth image generation 18:36:14 it was rather stupid and I only noticed when an lookup table was not aligned to the right place. 19:23:01 --- join: dave9 (~dave@90.20.215.218.dyn.iprimus.net.au) joined #forth 19:23:10 hi 19:23:26 h'lo dave 19:23:38 hi Zarutian 19:24:53 how are things? 19:25:15 got my coffee! how are you? 19:25:26 I do not remember but werent you one of the people who recently got into Forth? 19:25:45 yep i'm a newbie 19:26:15 right, read any of the starting... and thinking... books? 19:26:23 it's hard. it took me an hour to write C's strcmp in forth 19:26:39 (starting forth and thinking forth) 19:26:54 not thinking forth, but i started (no pun intended) starting forth 19:27:08 using counted or null terminated strings? 19:27:42 the one where it's ( c-addr n c-addr n -- flag) 19:28:20 i did read a fair bit of the ansforth standard 19:28:34 the core words and rationale 19:28:51 it said "c-addr n" is preferred for strings 19:30:31 yeah, it is much easier to work with those as you can slice a part out of an long lived string just by offsetting the c-addr and decreasing the n 19:31:17 plus one does not loose \x00 to being an termination symbol 19:32:17 I was a bit sad when I found out you couldn't pass anything but strings as arguments to other programs in linux because of the requirement for null-terminated strings 19:32:23 hmm... just thinking a bit about str_cmp example of yours, you did go the easy route of comparing the lengths first before starting to compare the contents, no? 19:32:51 dave9: ^ 19:33:49 Zarutian: eventually yes.. i spent most time on diddling the stack to fetch the characters from the pointers 19:36:10 after a long time i settled on ( c-addr n c-addr n on the stack) 2swap over c@ >r 2swap over c@ >r = IF 19:36:30 it took ages just to write that! 19:38:15 For the time being I've contented myself with a design that does a compare of two cells. 19:38:21 hmm... : mem_cmp ( aPtr bPtr len -- flag ) DO 2DUP @ SWAP @ = NOT IF 2DROP R> DROP FALSE EXIT THEN LOOP TRUE ; 19:38:22 So it's not *truly* strcmp. 19:38:40 It calculates a mask from the length byte of one of the strings, and then does the cell compare. 19:38:51 So it validates strings up to 7 chars long. 19:39:06 Which is more than enough for my dictionary search. Later I'll replace it with a proper compare. 19:39:14 But it was terse and it's fast. 19:40:20 I think at the moment I only have one word longer than seven. 19:40:23 INTERPRET. 19:41:03 Zarutian: testing for equality is much easier than comparison. 19:41:08 It just takes two addresses - it assumes the counts are in the first byte at those addresses. 19:41:36 also, I think you want a BOUNDS before that DO, if "len" means what it usually does. 19:42:14 hmm.. : str_cmp ( aStrPtr aLen bStrPtr bLen -- flag ) >R OVER R> SWAP OVER = NOT IF 4DROP FALSE EXIT THEN DROP SWAP mem_cmp ; 19:43:03 dave9: and that just from thinking about this for a minute or two ;-) do not worry it gets into practice 19:43:28 reepca-laptop: isnt that what str_cmp does? 19:44:21 I'm guessing dave9 didn't invoke anything like mem_cmp. 19:44:48 factor factor factor, is one of the things I learned from Forth 19:44:50 Zarutian: if we're talking about the c function or COMPARE, no, those will give a number indicating greater than, less than, or equal to, rather than just "equal or not equal to" 19:44:51 gonna have tea with my neighbors... afk 19:45:12 it's only more useful than STR= for stuff like sorting 19:47:21 right, dave9 did though have -- flag ) in the problem definition. 19:47:55 oh sorry for the confusion.. yeah it only checked for equality 19:48:21 That's all that's needed to support a Forth's system operation. 19:48:34 c doesn't really have that, so i said strcmp cos it'sthe closest to it 19:48:38 reepca-laptop's right - the full compare with signed result is good for sorting. 19:48:40 then it is more involved, but hey you got both MEM= and STR= out of it. 19:48:59 (it being the example I posted here) 19:50:06 reepca-laptop: but that is then also dependent on locale for instance á comes after a but befor b in the Icelandic latin alphabet 19:50:52 When I do a full str= to reduce my (already very low) collision possibility to zero, I'll probably write it in assembly. 19:51:09 In fact, I'll probably write the whole inner loop of my symbol table search in assembly. 19:51:20 It's an edit-time search, but still, the table could get large over time. 19:51:49 And it's not a fancy data structure that can be searched fast, like a Patricia tree or something - it's just a straight lineary search of a string array. 19:53:49 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 19:59:41 also, I only just recently realized I've been doing iterating over without a do loop wrong... the test for reaching the end should be u>, not >. 19:59:56 iterating over an array* 20:00:03 left that part out accidentally 20:03:54 Yeah, sometimes the comparison distinctions are subtle. 20:04:11 The unsigned ones come in really handy once in a while. 20:11:26 --- quit: pierpa (Quit: Page closed) 20:19:02 I don't use caddr/u strings, but here's a quick stab at doing this in retro: https://gist.github.com/crcx/f693f3d74a6a0d7733c61d7d792b784e 20:34:46 --- quit: epony (Quit: QUIT) 20:39:06 if one string is a prefix of another string, is it "less than" or "greater than" that string? Trying to figure out if I should be swapping these lengths... currently it ends up counted as less than the longer string. 20:44:30 I think I'd consider it less than. 20:44:40 A comes before AA. 20:46:15 And "1 'A'" sorts to less than "2 'A' 'A'" as well. 20:46:37 And "A\0" sorts to less than "AA\0" 20:48:02 I think generally speaking I'd regard shorter strings as "virtually padded" with nulls, so that all strings are the same length, and then do a straight-up sort. 20:54:39 Another way to think of it is as though the strings are numbers, just stored little endian. So A < AA just as 1 < 11. 20:54:54 The virtual padding makes that 01 < 11. 21:01:57 --- quit: pierpal (Quit: Poof) 21:02:17 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 21:14:24 --- quit: dave9 (Quit: one love) 21:17:19 --- join: epony (~nym@77-85-141-166.ip.btc-net.bg) joined #forth 21:34:28 not sure you you feel about multi-while begin-repeat loops, but here's my shot at strcmp: https://paste.debian.net/1033190/ 21:36:11 --- quit: pierpal (Quit: Poof) 21:36:29 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 21:52:08 --- quit: pierpal (Quit: Poof) 21:52:26 --- join: pierpal (~pierpal@host97-54-dynamic.4-87-r.retail.telecomitalia.it) joined #forth 22:23:37 --- join: dys (~dys@tmo-081-123.customers.d1-online.com) joined #forth 22:36:09 --- join: dave9 (~dave@90.20.215.218.dyn.iprimus.net.au) joined #forth 22:36:37 hi 23:40:30 --- quit: wa5qjh (Remote host closed the connection) 23:43:41 --- join: wa5qjh (~quassel@175.158.225.193) joined #forth 23:43:41 --- quit: wa5qjh (Changing host) 23:43:41 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 23:59:59 --- log: ended forth/18.07.10