00:00:00 --- log: started forth/16.12.11 00:00:10 you cant code in a forth way in anything except forth 00:02:02 you can take things you have learned in forth to other languages but thats not programming in those languages ina forth way 00:03:49 I do often 00:03:56 I have a bash forth that works well 00:04:01 it is just not anything like moore's forth 00:04:16 or ans forth 00:04:19 It is my own forth 00:04:32 but if you would like we can think of it as an rpn/concatenative language 00:04:51 bashforth has been around for years 00:06:43 i even think the author of jonesforth used isforth as a reference for how to do some things 00:06:57 I am sure there have been other attempts 00:07:08 but is bash forth an interpreter? 00:12:39 i got a question. is it possible to write C code into some other section other than .text? 00:12:50 or does the c compiler just dump it all in .text anyway 00:16:05 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:5137:92f5:c47:487f) joined #forth 00:33:54 dunno man 00:47:48 you can 00:47:54 in gcc by setting the attribute 01:06:45 --- join: neceve (~ncv@79.114.83.228) joined #forth 01:06:45 --- quit: neceve (Changing host) 01:06:45 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 01:17:23 --- join: dys (~dys@x5f726f46.dyn.telefonica.de) joined #forth 01:19:01 mark4: When you redefine a word, words that used the old definition still use the old definition. The idea is to take the context of one word and bind that to another location. It should only BIND for new definitions after BIND is used, so my BIND is not exactly the same as dlyund's BIND because of the way those Forths are implemented. 01:25:43 --- quit: mnemnion (Remote host closed the connection) 01:28:04 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:5137:92f5:c47:487f) joined #forth 01:48:12 --- join: John[Lis` (~user@2601:601:8f01:a6a0:5c5:6f8b:9dc7:f2c6) joined #forth 01:51:19 --- quit: John[Lisbeth] (Ping timeout: 258 seconds) 01:59:28 i understand that 01:59:46 but ' >body @ fetches the contents of a variable a constant or a deferred word 01:59:51 what does it do to a colon definition 02:00:24 i would like to see a version of this for isforth 02:00:35 to understand what your doing 02:09:25 --- join: John[Lisbeth] (~user@2601:601:8f01:a6a0:5c5:6f8b:9dc7:f2c6) joined #forth 02:10:31 --- quit: John[Lis` (Quit: ERC Version 5.3 (IRC client for Emacs)) 02:10:32 --- quit: John[Lisbeth] (Client Quit) 02:11:21 --- join: John[Lisbeth] (~user@2601:601:8f01:a6a0:5c5:6f8b:9dc7:f2c6) joined #forth 02:39:15 --- join: kgforth (d4707732@gateway/web/cgi-irc/kiwiirc.com/ip.212.112.119.50) joined #forth 02:41:12 --- quit: kgforth (Client Quit) 02:59:06 --- join: true-grue (~true-grue@176.14.222.10) joined #forth 03:03:45 --- quit: true-grue (Read error: No route to host) 03:04:13 --- join: true-grue (~true-grue@176.14.222.10) joined #forth 03:47:41 --- quit: mnemnion (Remote host closed the connection) 03:53:17 --- join: workp (~workp@host-92-25-126-252.as13285.net) joined #forth 03:57:56 --- quit: John[Lisbeth] (Ping timeout: 245 seconds) 04:48:30 --- join: nal (~nal@adsl-64-237-238-225.prtc.net) joined #forth 05:05:17 --- join: mat4 (~Claude@ip5b409507.dynamic.kabel-deutschland.de) joined #forth 05:36:37 --- join: opollen (~opollen@96-83-49-155-static.hfc.comcastbusiness.net) joined #forth 05:45:23 --- join: ASau` (~user@x59cc821e.dyn.telefonica.de) joined #forth 05:46:53 --- quit: ASau (Ping timeout: 256 seconds) 06:03:49 --- nick: ASau` -> ASau 06:14:34 --- quit: nal (Ping timeout: 246 seconds) 06:27:44 --- join: nal (~nal@adsl-64-237-234-83.prtc.net) joined #forth 06:35:11 --- quit: mat4 (Quit: Verlassend) 07:01:08 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:9069:fe52:54ff:b846) joined #forth 07:34:43 --- quit: opollen (Quit: opollen) 07:37:22 --- quit: nal (Ping timeout: 268 seconds) 08:27:07 --- join: X-Scale (~ARM@48.53.158.5.rev.vodafone.pt) joined #forth 08:29:44 --- nick: karswell` -> karswell 08:32:41 --- join: nal (~nal@adsl-64-237-234-83.prtc.net) joined #forth 08:36:01 --- quit: karswell (Read error: Connection reset by peer) 08:36:35 --- join: karswell` (~user@127.209.208.46.dyn.plus.net) joined #forth 09:04:59 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 09:05:36 --- quit: Zarutian (Read error: Connection reset by peer) 09:05:53 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 09:22:24 --- join: newuser|26181 (d9d7981e@gateway/web/cgi-irc/kiwiirc.com/ip.217.215.152.30) joined #forth 09:23:14 --- quit: newuser|26181 (Client Quit) 10:31:21 --- join: rgrinberg (~rgrinberg@24-246-56-85.cable.teksavvy.com) joined #forth 10:35:37 --- join: saml_ (~saml@cpe-24-102-97-97.nyc.res.rr.com) joined #forth 10:40:24 --- join: newuser|73298 (5e25308b@gateway/web/cgi-irc/kiwiirc.com/ip.94.37.48.139) joined #forth 10:42:46 --- quit: newuser|73298 (Client Quit) 10:54:50 --- join: newuser|71270 (d9d7981e@gateway/web/cgi-irc/kiwiirc.com/ip.217.215.152.30) joined #forth 11:11:45 --- quit: neceve (Quit: Konversation terminated!) 11:23:50 --- join: mnemnion (~mnemnion@71.198.73.193) joined #forth 11:36:02 --- quit: newuser|71270 (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 11:41:56 --- quit: nal (Ping timeout: 252 seconds) 12:17:48 --- join: beretta (~beretta@cpe-184-58-116-76.columbus.res.rr.com) joined #forth 12:35:50 --- quit: karswell` (Ping timeout: 252 seconds) 12:42:37 --- join: John[Lisbeth] (~user@2601:601:8f01:a6a0:5c5:6f8b:9dc7:f2c6) joined #forth 12:51:23 What Forth implementation do you folks recommend for learning on? 12:55:43 well first 12:56:02 try this one https://www.repl.it/languages/Forth 12:56:10 cause it's the easiest to start using 12:56:25 then once you think you really understand the idea, then create your own and learn on that one 12:56:50 creating a forth is way easier than I thought it would be 12:59:28 koz_: depends what you're trying to do 13:00:13 gordonjcp: Learn how to Forth. 13:00:25 koz_: that's a pretty broad statement 13:00:46 koz_: it's worth looking at Jonesforth even if you don't end up using it 13:00:56 because it does explain how it all fits together 13:01:03 gordonjcp: Link? 13:01:37 koz_: it's the first hit on google for jonesforth; the very original site seems to be broken but a few folk have copies on github 13:01:52 gordonjcp: Will look into that - thank you! 13:01:59 koz_: no worries 13:02:09 I'd post a link but I don't have any web access right now 13:02:20 (my internet connection is complicated) 13:03:01 koz_: you could also do well to look at the Brad Rodriguez articles on Forth, that explain a lot about threading, which is central to the whole thing 13:03:17 koz_: in terms of getting started quickly you may as well just use gforth 13:03:46 --- quit: John[Lisbeth] (Ping timeout: 245 seconds) 13:03:48 gordonjcp: That's what I've been using so far. 13:11:56 --- quit: rgrinberg (Remote host closed the connection) 13:15:59 --- quit: ricky_ricardo (Ping timeout: 258 seconds) 13:34:32 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:9069:fe52:54ff:b846) joined #forth 14:03:51 --- join: nal (~nal@adsl-64-237-234-83.prtc.net) joined #forth 14:18:28 --- join: Kumool (~nal@adsl-64-237-236-44.prtc.net) joined #forth 14:21:43 --- quit: true-grue (Read error: Connection reset by peer) 14:22:18 --- quit: nal (Ping timeout: 258 seconds) 14:25:04 --- join: banonos (b04eabac@gateway/web/freenode/ip.176.78.171.172) joined #forth 14:32:59 I need to pseudorandomly-generate 8 bit sequences with at most k bits set for some k. What would be a good way to do this in Forth? 14:37:32 is your forth bare metal or is it hosted by some OS? 14:39:09 I guess the naive method would be to generate a suitably-sized LFSR and reject any results that don't have the correct number of bits 14:39:37 bear in mind that for an 8-bit number, your keyspace is then going to be be really small 14:44:12 --- join: karswell` (~user@133.226.90.146.dyn.plus.net) joined #forth 15:07:32 --- join: rgrinberg (~rgrinberg@24-246-56-85.cable.teksavvy.com) joined #forth 15:11:22 --- quit: ricky_ricardo (Ping timeout: 258 seconds) 15:17:16 --- quit: rgrinberg (Remote host closed the connection) 15:21:51 My first approach would be to figure out a way to map integers to bit sequences with at most k bits set, then just use an existing PRNG to get a random answer from 0 to 15:23:10 For example, 0 to 7 would have just one bit set in the 0-7th place, respectively. It would obviously get more complex when we add in more bits, and you'd have to wikipedia one of those combinatorial formulas for figuring out how many possible values there are for a certain k. 15:24:05 reepca: there must be a point where you have the greatest number of possible values 15:24:40 probably when you've got four 1s in the value, you've got the most possibilities 15:25:01 reepca: That's what I was thinking. 15:31:26 --- quit: karswell` (Read error: Connection reset by peer) 15:46:15 --- quit: nighty-- (Quit: Disappears in a puff of smoke) 15:46:25 --- quit: nighty (Quit: Disappears in a puff of smoke) 15:50:21 --- join: hellcode (~hellcode@189.180.114.42) joined #forth 15:52:01 --- quit: hellcode (Quit: leaving) 15:55:49 --- join: kumul (~nal@adsl-64-237-234-83.prtc.net) joined #forth 15:56:07 --- quit: Kumool (Ping timeout: 260 seconds) 16:03:54 --- join: b0b (180441f2@gateway/web/cgi-irc/kiwiirc.com/ip.24.4.65.242) joined #forth 16:04:35 --- quit: b0b (Client Quit) 16:41:42 --- join: nighty (~nighty@d246113.ppp.asahi-net.or.jp) joined #forth 16:53:18 --- quit: workp (Ping timeout: 258 seconds) 17:36:55 --- join: newuser|78502 (ac49fba7@gateway/web/cgi-irc/kiwiirc.com/ip.172.73.251.167) joined #forth 17:39:56 --- quit: newuser|78502 (Client Quit) 17:57:01 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 18:09:39 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 18:36:10 --- quit: MrBusiness2 (Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel) 18:40:33 I wonder if a word like @? which performed @ if the address wasn't 0 but exited the definition immediately if it was would be useful... 18:40:59 it seems like something that would come up a lot in recursive list/tree/graph stuff 18:49:37 --- quit: Zarutian (Quit: Zarutian) 18:51:05 i was wondering whether forths tend to give special meaning to address 0 18:53:25 I don't think they inherently do except perhaps internally, but it seems like such an obvious choice for anything that might have a valid or an invalid address because it's not likely to ever be used and is also the definition of false. 19:18:06 yeah, that makes sense. the alternative would have to be to allocate module-specific magic addresses and that just seems unnecessarily wasteful 20:03:17 --- quit: dys (Ping timeout: 250 seconds) 20:06:51 --- quit: DocPlatypus (Ping timeout: 248 seconds) 20:16:00 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 20:19:23 --- quit: kumul (Quit: WeeChat 1.4) 20:23:03 --- quit: DocPlatypus (Ping timeout: 250 seconds) 20:43:00 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 20:50:09 --- quit: gordonjcp (Ping timeout: 256 seconds) 21:02:17 --- join: gordonjcp (~gordonjcp@ilyushin.gjcp.net) joined #forth 21:14:58 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:9069:fe52:54ff:b846) joined #forth 21:15:17 --- quit: saml_ (Remote host closed the connection) 21:17:46 --- quit: banonos (Quit: Page closed) 21:32:02 --- quit: neceve (Quit: Konversation terminated!) 21:32:25 --- quit: DocPlatypus (Quit: Ex-Chat) 23:48:38 --- log: started forth/16.12.11 23:48:38 --- join: clog (~nef@bespin.org) joined #forth 23:48:38 --- topic: 'Forth Programming | logged by clog at http://bit.ly/91toWN | http://forthworks.com/forth/standards/DPANS/ | www.greenarraychips.com' 23:48:38 --- topic: set by crc!uid2647@gateway/web/irccloud.com/x-gafmfbjdyglmxbls on [Sun Nov 13 16:58:08 2016] 23:48:38 --- names: list (clog dys +proteusguy gordonjcp nighty beretta mnemnion X-Scale ASau impomatic_ M-jimt koz_ irsol DGASAU Keshl bluekelp_ reepca zy]x[yz dzho pointfree Uniju groovy2shoes mark4 nighty- dograt carc backer fiddlerwoaroof malyn crc ggherdov`___ APic pdewacht DKordic cantstanya Quozl` rpcope djinni nerfur jeremyheiler ovf phadthai Vendan newcup koisoke _longines segher ids1024 taij33n eldre yunfan rprimus diginet2 npr) 23:51:37 --- join: mark4_ (~mark4@99-164-75-34.lightspeed.rcsntx.sbcglobal.net) joined #forth 23:53:21 --- quit: mnemnion (Remote host closed the connection) 23:57:24 --- quit: proteusguy (Ping timeout: 264 seconds) 23:59:59 --- log: ended forth/16.12.11