00:00:00 --- log: started forth/02.11.03 03:24:45 Morning all. 04:48:50 --- quit: TreyB (Read error: 110 (Connection timed out)) 06:31:52 --- quit: Robert ("brb") 06:32:22 --- join: Robert (~Robert@robost86.tsps1.freenet6.net) joined #forth 07:23:07 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 08:55:25 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 08:57:18 --- quit: skylan (Read error: 60 (Operation timed out)) 09:00:05 --- join: skylan (sjh@Riverview91.tbaytel.net) joined #forth 09:30:49 --- join: thin (~thin@h68-146-166-145.cg.shawcable.net) joined #forth 09:42:01 dr{who} what are you trying to do in gforth? 09:42:15 --- quit: thin ("laters") 11:05:02 --- join: Soap` (~flop@202-0-42-22.cable.paradise.net.nz) joined #forth 11:26:18 --- quit: cyberclad () 12:17:00 --- quit: Robert (benford.freenode.net irc.freenode.net) 12:18:06 --- join: Robert (~Robert@robost86.tsps1.freenet6.net) joined #forth 12:26:25 --- quit: XeF4 (benford.freenode.net irc.freenode.net) 12:26:25 --- quit: Fractal (benford.freenode.net irc.freenode.net) 12:26:50 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 12:26:50 --- join: Fractal (tvteac@h24-77-171-228.ok.shawcable.net) joined #forth 12:47:45 --- join: tathi (~josh@ip68-9-58-207.ri.ri.cox.net) joined #forth 12:49:29 bleh...no electricity here from 8 a.m. to almost 3 p.m. 12:49:54 --- quit: skylan (Read error: 104 (Connection reset by peer)) 12:50:47 --- join: skylan (sjh@Rockcliffe67.tbaytel.net) joined #forth 13:05:48 --- join: I440r (~mark4@sdn-ap-003tnnashP0185.dialsprint.net) joined #forth 13:55:36 --- quit: I440r ("Reality Strikes Again!") 14:03:14 --- join: thefox (fox@adsl-209-182-168-45.value.net) joined #forth 14:03:15 --- mode: ChanServ set +o thefox 14:07:15 Hi thefox. 14:08:00 Just read your essay on Forth at ultratechnology.com... Nice piece of work. 14:08:42 Do you mean the latest one on "C-Style Structures in ANS Forth?" 14:09:12 Nah, forth.htm 14:09:19 Or the long essay on Forth as Thoughtful Programming, ah, yes. 14:09:22 Yes. 14:10:07 I read it after a guy tried to convince me that nothing less than a 2 GHz PC can be useful. 14:10:51 Many people complain that it is too long. I try to check the sites that my site reports show have references to my site. One of them was a discussion group that was mostly ragging on it as excess verbage. 14:11:56 It seems that the idea that the industry markets fat is offensive to most people in the industry. 14:12:09 I think it is much worse than that. 14:12:49 How do you mean? 14:12:50 I don't think it's offensive to the industry at all, though shouting the same in a crowded place probably is 14:12:59 I saw an educational program the other day about the social effects of the consumer product revolution that characterized the last century. It made me think. 14:14:25 Like Television personal computers have a marvelous potential to teach, but the dark side is brainwashing, de-education, selling illusions. 14:14:46 They are a marvelous political tool for control. 14:16:00 If you make money on making people stupider, you want to make people stupider. 14:16:09 That's..er..the law of the jungle. 14:16:48 You get stupid people to watch stupid programs, and stupid advertisement, so they go buy products. 14:17:08 I saw historians calling the mass consumer items that revolutionized the twentieth century as 'liberty machines' because they fostered the development of an educated middle class. They made things that had been luxuries to the rich available to common people. Like the idea of how paperback books created a cultural revolution. We still have not seen paperback computers yet. 14:18:18 And you filter their news, and get them to agree with whatever they are told (sold). 14:19:01 Of course. 14:19:07 thefox: churches have been doing that since long before computers 14:19:27 I think of Forth chip technology as a form of 'liberty machines' but at the present time they are in the opposite direction of the 'trusted computing initiative' which will remove all control from the end user. 14:19:41 You can't have a priest 5 hours a day in every home. You do have a TV. 14:20:10 --- quit: mr_bubbs ("leaving") 14:20:47 We are moving into a time when all information will be controlled by a central authority, personal information will be made unlawful, at least that that is the plan that is in place. Yet many people are not troubled by this. 14:22:02 Heh. I don't really follow you. Who wants to ban people from spreading their opinions? 14:22:34 If you make the hardware incomprehensibly complicated, and the software even moreso, then put all editorial control at a central authority users will no longer even have the ability to quote email (or see it) unless someone else says that it is ok. 14:23:31 The term 'trusted computing' after call comes from the intelligence community and means that they can trust their control over your machine and that you have no control or trust. 14:25:29 We need virtually free computers, absurdly cheap and simple, where the user can easily understand anything, and do whatever they want. These could educate people to be able to think, but that seems to have become the opposite of what computers have become. 14:26:09 A computer where everyone understands exactly how it works? That would have to be VERY simple, and you'd have to reform the whole education system. 14:26:11 They are designed to create mindless consumers who want to be controlled. It works well. 14:29:00 User's loved our Internet appliances at iTV, Forth script was simple, and they were easier to understand than the early personal computers that educated enough people to create the industry that exists today. But the idea that children might actually understand more than the so called experts of today frightens a lot of people who are convinced that they can no longer learn much. 14:30:01 That's why if you make the hardware 1000 times less complex and do the same with the software that it is exactly the opposite of that has made certain people many billions of dollars. 14:31:10 Some people do like animated backgrounds, and can't live without a media player that talks to them. 14:32:02 sounds good, so when will there be a "103-in-one" kit based on forth chips? 14:32:10 Few people out there want simplicity. 14:32:29 FIG was the source of free information about Forth. 14:35:14 My friends in Europe don't understand why Americans want 400HP 6000lb SUV that are deathtraps for everyone and which keep the US dependent of foreign oil. I understand the psychology behind it. It is analogous to the computer industry, social status in our culture is determined by the degree of in-your-face conspicuous consumption. Marketing. 14:36:04 Heh. 14:36:28 One does need a 2G+ PC because of this. 14:36:48 Status. 14:37:01 one does need a car in most of America because of this 14:37:05 Yes.. That might be a part of it. 14:37:42 and I daresay being unable to care for yourself without heavy machinery (automobile) is the greater evil vs. ever-expanding system requirements 14:39:02 PCs consumed $50,000,000,000 worth of electricity per year, before the cost of electricity went up by a factor of ten last year! That reflects a lot of pollution if nothing else, conspicuous consumption. 14:39:42 consumed $50G where? 14:39:48 PCs consume a lot of oil, just like SUV. 14:40:26 50 billion world wide, but most of it is in the US after all. 14:40:31 How much less power could you run a home computer with, using today's technology? 14:41:13 It is roughtly proportional to the transitor count. Reduce it by 1000/1 and it drops from watts to mw. 14:41:50 Hm. 14:42:28 Doesn't the microprocessor use just a tiny part of that power, compared to e.g. fans, monitors and so on? 14:42:46 People pay lip service to the environment as they drive their SUV to the local store to buy mostly plastic packaging and a handful of real goods. Computers are the same. 14:44:15 Power consumption and heat in the CPU is the main technical problem today. That's why they need those fans and why the modern PC makes so much noise that it is reminiscent of the industrial revolution in the 19th century. 14:45:39 Hmm.. how about the monitor? 14:48:04 There are 'green' monitors today, but the push is for very very expensive ones. Boght an HDTV recently? 14:49:30 --- quit: Soap` (Read error: 104 (Connection reset by peer)) 14:49:34 Heh, no. 14:52:14 I did some work for Pioneer Reseach USA this year working on the design of new consumer devices with HDTV output. Technically very impressive standards that make TV look antique. 14:54:07 But when digital watches first came out they were sold for as much money as they could get and for years they cost hundreds of dollars instead of being given away as the virtually no-cost items that they are. Computers are the same. 14:54:44 yeah, x86 chips are absolutely ridiculous heat-wise 14:54:44 PT Barnum put it well. 14:55:22 backwards compatibility is, well backwards not forward looking. 14:56:21 :) 14:57:26 I think the overall problem was well described in 'The Twilight of American Culture.' Has anyone read it? 14:58:33 The inevitable collapse will result in the offical start of the next dark age. 15:00:43 haven't read it...but I don't see that we can continue as we have been for _too_ much longer... 15:01:38 In 91 my prediction was that we had not won the cold war, we just were not the first to lose. 15:02:55 Since then we have gone back into the deficit economy that took us from the richest nation in the world to the largest debtor nation in the world, we are borrowing against our children's future which looks very grim now. 15:04:15 Predictions I have seen are that Social Security tax will be 80% for people still working when everyone my age is suppose to retire in a few years. Good luck with that one. 15:05:21 so...what do you do about it? 15:06:03 Oh well, I live in the Soviet Socialist Republic of Berkeley. The city council changed the official name to that from the Glorius People's Republic of Berkeley when the Soviet Union collapsed in 91. 15:06:28 heh 15:07:33 You don't spend money that you don't have and you stop selling the idea that conspicuous consumption of limited resources is the solution. 15:08:38 Exploiting the third world is not the solution. We will be part of the third world before too long anyway. 15:10:12 I also think that Forth chips are good for something other than just a new generation of ultra-smart ultra-cheap weapons. 15:10:57 Isn't it.. I mean, if we don't exploit the third world, how will we ever get those <$1 Forth chips.. Surely not by paying locals decent wages to run a local fab plant? 15:11:16 :) 15:11:21 A few months ago, you seemed gung ho enough about fabbing components in the third world 15:12:10 But so far, other than iTV, that has been the only source of interest. And iTV lost control to big companies that gained control of the board for only a few million dollars. It was the cheapest and easiest way to not have to compete with products that were 100 times less expensive than what they were successfully selling. 15:14:16 It is true that I could get wafers with thousands of chips each in India today for about the same price that we paid for individual chips a few years ago. Even in relatively small quantities the price is under $1 and in large quantity.... 15:15:56 Yeah, well the opportunity is there, but it is frustrating when there is no funding available and people call you a cultist and you get death threats because you think Forth is a good way to approach computing. 15:16:36 thefox: fwiw, I would happily pay $20 for a "$1" chip if it was locally produced 15:18:20 The problem of course is that single chips cost a lot more than that to make. ;-) 15:21:06 I think iTV had about the only strategy that could work to create a market, but they should never have allowed their compeditors to gain controling interest. A few people sold out. That's all it took. 15:21:47 I do not think it is possible to penetrate the conventional market. 15:22:07 what strategy? (I'm not familiar with iTV) 15:22:55 There are many reasons why. I felt this way a dozen years ago and my experiences have reinforced those ideas. Oh, well, it will make an interesting book. 15:25:24 ah, nm...internet machine for under $50. 15:25:35 I can see companies not wanting to compete with that 15:25:43 iTV made virtually disposable internet computers and nearly closed several deals for things like 100M evaluation units followed up by several billion production units. If 98% of the computers on the internet were cheap Forth based devices it would completely change the dynamics. The world is larger than the computer elite in the US. 15:26:19 Our devices were to start at $50 in low quantity, soon becoming $5. 15:26:42 hooking up to a TV for display, I assume? 15:27:55 Our devices were B/W TV, dial up modem devices. There are several billion people who have that and despirately want access to internet information and commerce. 15:28:36 But, that was years ago. Cable modems are actually much cheaper! ;-) 15:28:54 they are? 15:29:16 oh, it's just getting the rest of the infrastructure in place? 15:29:27 (that's expensive) 15:29:28 But most people simply will not believe the technical details of what is possible because they are so conditioned by the current marketplace. 15:30:22 Many people actually think that PCs are 'modern' instead of incredibly backwards in many many ways. 15:32:02 can't imagine where they'd get that idea... 15:32:11 I have seen some amazing technology. Forth was used extensively in the Russian military devices and space program. There are people trying to commercialize such things and many of them understand the real value of Forth and Forth chips. But people who think 2G PC are impressive simply do not believe what is technically possible. 15:33:56 Oh well. There is not much one can do about rampent ignorance. 15:36:29 thefox: may I know, are you IRCing on a forth machine now? 15:39:04 No. I am using a PC that I got from working on a CIA project. I have Forth box in the other room that I could use, but I no longer have iTV's final software releases. I might make a version one of these days since I was programming manager there. 15:40:57 But I need to get going to do some UT work this afternoon. I need to go collect some lost files that I promised to send to some people. 15:41:00 Best wishes, 15:41:12 --- quit: thefox () 15:42:12 if that man would take half the time he spends writing propaganda to implement the stuff he propagandizes about 15:42:36 I know 15:44:04 I also find it amusing that he comes here and starts talking at us... 15:44:30 there was a time I found it amusing 15:46:28 well, I haven't heard most of it before 15:49:20 and hell, I'm only 22, I'm too young to be cynical -- what do I know, anyway? ;-) 15:49:44 I turned 22 last Tursday as well 15:51:39 oh, really? 15:51:49 thought you were part of the older crowd for some reason... 15:53:04 I assumed you were 15:53:42 heh 15:59:36 you're obviously too mature and reasonable -- you should develop some pet peeves and start going on rants about them 16:01:21 --- join: thin (guest@62.77.213.177) joined #forth 16:01:26 I do go on rants about them, just not in here 16:04:47 sup xef4 16:05:38 do you disagree with thefox? 16:07:52 you read the logs before you join? 16:12:11 nope 16:12:17 i join then start reading the logs 16:12:45 I disagree with his apparent hypocrisy and his endless ranting about forth chips' potential and failure to produce a meaningful demo 16:13:12 what is his apparent hypocrisy? 16:14:27 "Exploiting the third world is not the solution...", yet he seems eager enough to have his own products built in the third world for US consumption 16:14:48 for all his talk of PCs being something to move away from, he hasn't done that, despite having working forth machines at his disposal 16:14:52 it costs money to produce forth chips, and there is a shortgage of money according to him.. 16:15:12 he already has enough of them that he could make something for his own use 16:15:28 and how do you know he hasn't? 16:15:52 I don't, but if he has, why isn't he using them? 16:21:22 --- join: I440r (~mark4@sdn-ap-003tnnashP0185.dialsprint.net) joined #forth 16:25:24 how do you know he isn't using them? 16:28:28 .... I have Forth box in the other room that I could use, but I no longer have iTV's final software releases. I might make a version one of these days since I was programming manager there. 16:34:26 when was thefox here ? 16:35:44 a few min before you joineda 16:35:52 lol 16:35:55 typical :) 16:41:21 xef4: do you believe that india is a third world country?? 16:41:59 thin: awhile back he said "in the third world" without naming a company 16:42:02 er country 16:42:19 are you really concerned about the chips being produced "locally" ?? 16:42:28 keep the money within the us! 16:44:04 thin: if the chips are marked in the US, then "locally" means "in the US" 16:44:26 you seem to be really concerned about having the chips produced locally 16:44:56 thin: yes, and? 16:48:50 thin: forcing people to live by the processes they depend upon encourages responsible behaviour 16:49:27 i have no problem with the chips being produced in india, it's probably better for everyone economically 16:50:03 xef4: what process does thefox _depend_ on? 16:52:48 thin: not thefox in particular, people who want slick industrial products but don't want to live by/pay to properly handle the byproducts 16:53:16 ah i see what you mean 16:53:26 thin: for fab to be 0.02 the price in India, someone must be cutting corners somewhere 16:54:01 not necessarily.. a senior software developer gets paid about 9 thousand (canadian) 16:54:53 indian currency is lower, and their labour is cheaper, but it doesn't mean they have really crappy living standards 16:55:26 anyways 16:55:54 when i first started reading ultratechnology.com, it was quite weird because it triggered my propaganda alarms 16:56:04 and that was annoying 16:56:14 because i do think that forth has potential 16:56:20 .. 16:56:25 i think the marketing should be more serious 16:56:35 more factual, i guess 16:56:36 dunno 16:56:43 I didn't say everyone in India has awful living standards 16:57:12 I would be interested to know how Indian IC plants handle their waste, though 16:57:18 and who owns them 16:57:26 hm 16:57:40 well i have no knowledge about IC plants and whether or not they produce waste 17:05:05 http://www.svtc.org/hightech_prod/larachart.htm 17:05:32 ehm.. no, "under construction" 17:12:03 http://www.tsia.org.tw/tsia_En/Issues/IssuesESH.asp 17:13:48 hm.. 2g CaF2/wafer cm^2 doesn't seem too horrible by itself 17:15:11 http://216.239.37.100/search?q=cache:nYt2NjkUY3EC:www.losaltosonline.com/latc/arch/2002/05/Schools/1toxic/1toxic.html+semiconductor++waste&hl=fi&ie=UTF-8 17:15:14 &c.. 17:15:39 so yes, they do produce waste 17:33:32 --- quit: thin ("Leaving") 17:43:34 --- quit: Fractal (benford.freenode.net irc.freenode.net) 17:43:34 --- quit: XeF4 (benford.freenode.net irc.freenode.net) 17:43:34 --- quit: ChanServ (benford.freenode.net irc.freenode.net) 17:43:34 --- quit: onetom (benford.freenode.net irc.freenode.net) 17:43:34 --- quit: Dr{Who} (benford.freenode.net irc.freenode.net) 17:43:34 --- quit: jammi (benford.freenode.net irc.freenode.net) 17:45:27 --- join: ChanServ (ChanServ@services.) joined #forth 17:45:27 --- join: Fractal (tvteac@h24-77-171-228.ok.shawcable.net) joined #forth 17:45:27 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 17:45:27 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 17:45:27 --- mode: benford.freenode.net set +o ChanServ 17:46:22 --- join: Dr{Who} (~sam@dev.null.nutech.com) joined #forth 17:46:22 --- join: jammi (~otus@nzym.fi) joined #forth 17:51:43 --- quit: I440r ("Reality Strikes Again!") 17:58:08 --- quit: TreyB (Read error: 113 (No route to host)) 17:58:58 --- join: highlaender (~a@mnch-d9ba4185.pool.mediaWays.net) joined #forth 18:42:45 --- quit: tathi ("leaving") 18:42:54 --- quit: jammi (benford.freenode.net irc.freenode.net) 18:42:54 --- quit: Dr{Who} (benford.freenode.net irc.freenode.net) 18:42:54 --- quit: highlaender (benford.freenode.net irc.freenode.net) 18:42:54 --- quit: Fractal (benford.freenode.net irc.freenode.net) 18:42:54 --- quit: XeF4 (benford.freenode.net irc.freenode.net) 18:42:54 --- quit: ChanServ (benford.freenode.net irc.freenode.net) 18:42:54 --- quit: onetom (benford.freenode.net irc.freenode.net) 18:45:38 --- join: ChanServ (ChanServ@services.) joined #forth 18:45:38 --- join: Fractal (tvteac@h24-77-171-228.ok.shawcable.net) joined #forth 18:45:38 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 18:45:38 --- join: highlaender (~a@mnch-d9ba4185.pool.mediaWays.net) joined #forth 18:45:38 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 18:45:38 --- mode: benford.freenode.net set +o ChanServ 18:46:46 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 18:46:46 --- join: Dr{Who} (~sam@dev.null.nutech.com) joined #forth 18:46:46 --- join: jammi (~otus@nzym.fi) joined #forth 18:48:12 --- join: Soap` (~flop@202-0-42-22.cable.paradise.net.nz) joined #forth 18:49:58 --- quit: Soap` (Read error: 104 (Connection reset by peer)) 18:52:39 --- quit: jammi (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: Dr{Who} (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: TreyB (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: highlaender (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: XeF4 (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: Fractal (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: ChanServ (benford.freenode.net irc.freenode.net) 18:52:39 --- quit: onetom (benford.freenode.net irc.freenode.net) 18:53:56 --- join: ChanServ (ChanServ@services.) joined #forth 18:53:56 --- join: jammi (~otus@nzym.fi) joined #forth 18:53:56 --- join: Dr{Who} (~sam@dev.null.nutech.com) joined #forth 18:53:56 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 18:53:56 --- join: Fractal (tvteac@h24-77-171-228.ok.shawcable.net) joined #forth 18:53:56 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 18:53:56 --- join: highlaender (~a@mnch-d9ba4185.pool.mediaWays.net) joined #forth 18:53:56 --- join: Soap- (~flop@202-0-42-22.cable.paradise.net.nz) joined #forth 18:53:56 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 18:53:56 --- mode: benford.freenode.net set +o ChanServ 19:16:06 --- quit: Dr{Who} (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: jammi (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: TreyB (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: Soap- (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: highlaender (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: XeF4 (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: Fractal (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: ChanServ (benford.freenode.net irc.freenode.net) 19:16:06 --- quit: onetom (benford.freenode.net irc.freenode.net) 19:16:38 --- join: ChanServ (ChanServ@services.) joined #forth 19:16:38 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 19:16:38 --- join: Soap- (~flop@202-0-42-22.cable.paradise.net.nz) joined #forth 19:16:38 --- join: highlaender (~a@mnch-d9ba4185.pool.mediaWays.net) joined #forth 19:16:38 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 19:16:38 --- join: Fractal (tvteac@h24-77-171-228.ok.shawcable.net) joined #forth 19:16:38 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 19:16:38 --- join: Dr{Who} (~sam@dev.null.nutech.com) joined #forth 19:16:38 --- join: jammi (~otus@nzym.fi) joined #forth 19:16:38 --- mode: benford.freenode.net set +o ChanServ 19:37:16 --- join: bugslayer (guest@62.77.213.177) joined #forth 19:46:22 grr, why doesn't bash support drop and dup?! :P 19:46:29 and .s 19:46:41 alias '.s'='ls' 19:46:55 alias 'drop'='rm -rf *' 19:46:59 ;) 19:48:13 ahh, the fresh smell of idlers 19:48:47 to be kicking idlers or not to be kicking idlers? 19:48:51 ah, that is the question 19:49:06 to suffere the slings and arrows of idlers? 19:52:09 is an idler hurling stones and arrows in your general direction the true idler? 19:52:25 sounds active to me :) 19:52:42 me the true idler? 19:52:44 naw 19:53:00 i code some forth! a line a week1 19:53:01 ! 19:53:04 it's pretty good! 19:53:06 better than some! 19:54:10 xef4: i seem to vaguely recall some word that lets one count a string to find the lenght of it? 19:54:26 i tried COUNT but that didn't work, not as expected anyways 19:54:47 bugslayer: you want to count a null-terminated string or you want to return the counter of a counted string? 19:55:09 i'm using expect, i guess i want to return the counter 19:56:09 expect counts the string i expect? ;) 19:56:19 indeed 19:57:01 or span @ 19:57:12 ah 19:57:16 that's it 20:02:34 i have managed to get unix pipe's to work with much pain but i cant seem to get readline to work on the fd.. seems to work best if i use the key to fetch chars.. now i need to get chars till i get a chr(10) and store them into a single buffer to be splitup later 20:02:58 im using gforth . 20:03:39 the problem i have is im still not comfortable with basic forth manipulation like i would do in C 20:03:47 you might wanna try isforth, i find it a lot easier to use for sockets 20:03:55 for example just put mybuff[offset]=charigotfromport 20:04:08 url? 20:04:15 isforth.clss.net 20:04:19 http://isforth.clss.net 20:04:20 this is running on a single boot floppy system with linux 20:04:32 yeah 20:04:36 what are you trying to do? 20:05:04 its for my house. i have irdeo 2 way ir device and an x10 serial interface 20:05:10 some for example 20:05:14 house.a unit.1 on 20:05:24 for x10 20:06:29 hm 20:06:29 the irdeo and lirc turns the irdeo device into a unix socket /dev/lircd 20:06:32 sounds interesting :) 20:06:45 ya kinda a pet project on my off cycles. 20:07:19 i have a pentium III mounted into a wall chassis i gutted that was some old t1 csu/dsu combo 20:07:37 put in a flash boot 128meg and a laptop hd 20:08:10 and it runs a varient of leaf that i customized and built up this nice kernel and other tools 20:08:43 i had intended to use basic to make it easy to do stuff with because its hard to get a C compiler on such a thin box 20:08:51 but the basic's out there suck for io like sockets 20:08:57 so im trying forth 20:09:57 so what's your problem? 20:10:05 i'm not sure what you need help with? 20:10:34 --- join: joonas (jpihlaja@kruuna.helsinki.fi) joined #forth 20:12:11 mybuff[offset]=charigotfromport -> mybuff offset + charigotfromport ! 20:14:09 isforth is quite nice because it's got syscalls 20:14:51 hello joonas 20:15:02 and it's very close to the metal 20:15:26 oh hello (wasn't paying attention). and hello all. 20:15:57 What's the topic of conversation? 20:18:26 idling 20:18:37 yay to idlers! 20:18:43 lead em xef4! 20:18:45 you can do it! 20:19:12 i'm gonna set up an official #forth site! :P 20:19:27 joonas: btw, are there (m)any forthers in HKI? 20:19:27 and gonna list all the #forth regulars on it! fun fun ;)))) 20:20:23 interestingly, span @ returns 6 in all cases... 20:20:58 xef4: Not many. I've seen a few on newsgroups, but nobody I know personally is interested. 20:22:46 6.2.2240 SPAN 20:22:46 CORE EXT 20:22:46 a-addr is the address of a cell containing the count of characters stored by the last execution of EXPECT. 20:24:45 joonas: I've seen none on newsgroups even 20:25:05 certainly not from Turku at least 20:25:34 : input cr ." please input something: " inbuff 60 expect ; 20:25:34 : display cr inbuff span @ type ; 20:25:49 span @ returns 6 in every case 20:26:51 xef4: There was one guy recently on c.l.f. who had a problem with a Rockwell chip + Forth ROM. 20:27:16 xef4: Might not have been from helsinki, but at least from the same country. :) 20:27:20 try this: : hmm inbuff dup 60 expect span @ type ; 20:27:49 bugs: if you're running input and display in interpret, span might be clobbered by the text interpreter 20:28:08 hmm 20:28:18 that would certainly explain it ;) 20:35:12 * XeF4 must get around to writing that forth demopaja replacement sometime 20:35:55 --- quit: bugslayer ("gotta go") 20:35:58 xef4: demopaja? = demoworkshop? 20:36:37 *nod* http://moppi.inside.org/demopaja/ 20:37:12 sorry got a call :/ ugg 20:37:52 ok so ya im just learning i guess im trying to get more comfortable with basic string manipulation 20:38:22 mybuff[offset]=charigotfromport -> mybuff offset + 20:38:36 i get lost a bit here 20:39:01 how was mybuff declared as a variable mybuff? 20:39:10 dho he left :( 20:39:29 ok i see it now 20:39:39 mybuff offset + charigotfromport ! 20:41:01 addr goes at top of stack 20:41:13 charyougotfromport yourbuff offset + c! 20:41:23 ok let me try that 20:42:21 ok now what is the best way to just show a string like that so i can see whats in it.. i understand .s and such but it just shows pointers 20:42:37 type 20:43:02 doesn't your forth have a glossary? 20:43:32 xef4: glossaries can be pretty daunting 20:43:34 ya very long and im like only at about 4% of it and trying to just speed up the process 20:44:26 --- quit: highlaender (Read error: 60 (Operation timed out)) 20:44:34 ok so if i did 20:44:45 30 mybuff 1 + c! 20:44:53 to store the character at position 1 20:45:01 and did that for the next 10 20:45:12 i should have mybuff with like " " 20:45:15 oh 32 sorry 20:45:35 yes 20:45:47 c!+ will store and auto-increment the pointer btw 20:46:24 drwho: what forth are you using? 20:46:47 you know how many occurances of 'type' there are in the gforth docs ;c) 20:46:54 gforth 20:47:26 i had to custom do a libc call to open /dev/lircd unix socket so im fellin good about this :c) 20:47:39 :) 20:47:41 was a bugger doing a sockaddr_un 20:47:55 lol 20:48:33 type ( c-addr u -- ) 20:48:36 ok so mybuff type 20:48:45 mybuff len type 20:48:54 to print a single character you should use EMIT ( chararacter --) 20:48:59 e.g. 32 emit 20:49:10 tried to find type in the docs but its like finding a flippin needle in a hay stack 20:49:24 gforth has a glossary section in its docs 20:50:06 and a tutorial 20:50:08 If you're using the .info file, it's in "Word Index" 20:51:37 hmm didnt like the c!+ 20:52:14 gforth doesn't have c!+? 20:52:17 Or from the top of gforth's node: "Words" -> "Other I/O" -> "Displaying characters and strings" 20:53:08 i did this 20:53:14 variable mypointer 20:53:14 variable mybuff 20:53:14 0 mypointer ! 20:53:14 32 mybuff mypointer c!+ 20:53:33 seems reasonable c! to store the char 20:53:52 _variable_ mybuff?? 20:54:25 Create mybuff buflen allot 20:54:32 drwho: you need to allocate some space for your string. as in: CREATE mybuff 10 CHARS ALLOT 20:54:35 ugg ok ya 20:54:37 variable allocates 1 word btw 20:55:30 im very rusty havnt touched forth in like 17 years 20:55:36 32 mybuff mypointer c!+ will store mybuff to mypointer and return mypointer+1 20:56:38 c!+ is for doing sequential array stores 20:56:50 it seems ok but i had todo c! + 20:58:31 that seems to work.. 20:58:57 32 mybuff mypointer c! + will store the low byte of mybuff to mypointer and add 32 to the next item beneath it on the stack 20:59:11 (I doubt that is what you want?) 20:59:21 nope 20:59:29 i ended up with garbage in mybuff when i type it 20:59:44 remember that a variable returns the address of the variable data 21:00:02 try like: 21:00:08 yep to get the actual data you have to do @ right? 21:00:10 drwho: The c!+ that xef4 is talking about should look like c!+ ( char ptr -- ptr+1). In C it would be *ptr++ = char; 21:00:31 Create mybuf 10 allot 21:01:37 : spacefill 10 0 ?do 32 mybuf i + c! loop ; 21:01:41 mybuf 10 type 21:01:57 uggg ok he just did a sprint and im crawling :c) 21:02:00 ok digesting this 21:02:07 you defined a word? 21:02:12 spacefull 21:02:37 ?do and loop cannot be used while interpreting so I defined a word, yes 21:02:43 ahh ok 21:03:34 ya i have been beating myself with that one a few times already 21:04:14 : spacefill mybuf 10 0 ?do 32 swap c!+ loop drop ; \ Hope I don't just confuse you more with this, but this is how it would look using c!+ 21:04:20 ok where di i come from 21:04:28 is that filled from the stack with 10? 21:04:32 i is the loop counter 21:05:18 ?do consumes 2 items as loop parameters, so they are not on the stack inside the loop 21:05:29 k 21:18:59 im missing something here. just tyring to break it down to the simple stuff 21:19:07 Create mybuff 10 allot 21:19:07 32 mybuff 0 c! 21:19:36 seems i have a misunderstanding of this one i get invalid mem address 21:19:49 the "0 c!" is trying to store a byte into address 0. 21:20:14 address 0 offset of mybuff right? 21:20:21 You know C I suppose, so do you mind if we take a C example and convert it into forth? 21:20:32 ya sure 21:20:40 much better in c land 21:20:46 no, plain address 0. 21:20:52 ok. so, say you have this program: 21:20:53 ouch ok well thats no good 21:21:15 char mybuf[10]; 21:21:32 int i; for (i=0; i<10; i++) { mybuf[i] = 10; } 21:21:46 cake walk 21:22:05 write(0, mybuf, 10); 21:22:12 ok? 21:22:15 ok 21:22:49 The phrase "CREATE mybuf 10 ALLOT" is like "char mybuf[10];" 21:23:00 got that one ya 21:23:08 everything in forth seems to be char in size 21:23:30 yes, but forget about that and thing 1 char==1 byte. That's the way in almost all systems. 21:23:44 yep. 21:24:21 Then, the loop "for (i=0; i<10; i++) { /* whatever */ }" translates in forth into "10 0 ?do whatever loop" 21:24:33 yep got it 21:24:48 its down at the addressing of the buffer i get lost 21:25:06 c! is to stor a char at address 21:25:13 the whatever part may use the word "I" to get the current loop counter. 21:25:21 ok addressing. 21:26:00 In C you say "mybuf[i] = 32;" right? Well, in C you can also say "*(mybuf+i) = 32;" right? 21:26:15 yep 21:26:31 deref the array and add offset bytes to where you start 21:26:37 Now, consider what the latter expression really is... 21:26:40 yeah. 21:27:27 The assignment in the latter is done by the word C!, which takes a byte and a pointer, and puts the byte into the pointer. 21:27:57 got that ok. 21:28:02 So "*ptr = 32" can be written as "32 ptr c!" 21:28:06 in forth 21:28:13 yep 21:28:45 ok, so now if instead of just "ptr" you have "ptr+i", how would you write that in forth? 21:28:55 thats where i get confused 21:28:58 so 21:29:00 it would be 21:29:17 32 mybuf ???? c! 21:29:29 so on the stack i put 32 then the pointer to the buffer 21:29:36 but i need to modify that pointer right? 21:29:43 so i would add 1 to it? 21:29:53 go one 21:29:55 go on. 21:29:58 :c) 21:30:00 ok so 21:30:07 32 mybuff + c! 21:30:08 ? 21:30:49 no no that wont work 21:30:56 + takes 2 stack items 21:30:59 so 21:31:08 32 mybuf 1 + c! 21:31:12 bingo! 21:31:15 thats got to be it 21:31:18 YAY! 21:31:23 yay! 21:31:59 so, considering that, what does the word 21:32:14 well the word is better it used i so it does basicly 21:32:29 yes? 21:32:33 *(ptr +1)=xxx 21:32:36 *(ptr +I)=xxx 21:32:59 so they used i as the second stack item for the + operator 21:33:11 right 21:33:17 ok now i understand it 21:33:32 i was thinking the 32 mybuff ?? + c! 21:33:39 that ?? was the absolute position 21:33:54 and missed the pointer math 21:34:19 tis getting easier... every hour 21:34:40 yes, pointer math can be tricky to spot that way because it's all intermixed. 21:34:58 exactly what i fell into 21:35:00 good spacing and helper words can help with that. 21:35:29 ya seems like there are not very many good repositories of work from others 21:35:56 i found 3 examples of socket use no examples using it and none for unix sockets 21:36:18 one was crazy and was all asmembly kernel entry points by ordinel 21:36:19 ugggg! 21:36:34 heh.. 21:37:05 any good places out there i would love to publish my stuff when im done to save the next guy. 21:37:19 also still looking for examples of doing threading in forth 21:37:34 i want to have it spawn off a function and return so it can work in the background 21:37:43 sofar i see its in there but 0 examples 21:38:44 There are so few examples probably because it is very system dependent. It's not like there's a pthreads library ported to all forths. 21:39:15 If you're doing gforth, then I assume it would be possible to fork() in the normal way? 21:39:32 iirc, gforth has some sort of cooperative tasker 21:39:41 but it's been awhile since I've looked at it 21:40:17 There was some discussion about it on the gforth mailing list some time ago, and I think the verdict was that it's not quite done/tested yet. 21:43:21 ya its bits n peices but nothing solid i can put my finger on 21:43:59 seems odd too. because i have considered for many a year forth to be best suited for automation and robotics etc 21:44:11 and in that area a tasker would be critical? 21:44:20 or mybe i am just over complicated it. 21:44:31 but to have something running listening to say a device 21:44:41 and then doing stuff as it comes in is where im going.. 21:47:21 In such an environment I'd presume you'd need a multitasker, sure, and you'd need to be very familiar with your forth. 21:48:07 yep or i might by accident turn all the lights in the house on :c) 21:49:48 Or worse, flood the dishwasher and ruin your hard wood floor. :) 21:49:56 heheh 21:51:27 well thats why i am doing this in forth its a neet language and i use c and c++ and basic and tcl and perl and python uggg like 20 languages but never forth so should be something new 21:51:45 when i finaly got my 21:51:49 house.a unit.1 on 21:51:56 to work i was like COOL! when the light cam eon 21:52:26 automate your house with gforth and you could probably replace your central heating, too 21:52:33 hehehe 21:54:06 though I haven't looked to see how featureful eg.. PIC forths are 21:58:05 just a quick question all variables that are declared are considered to be varient? or what 21:58:09 variable blaablaa 21:58:34 varient? 21:58:49 well a varient is a variable with no defined type can be anything 21:59:02 Right. Forth has no typing system whatsoever. 21:59:07 ok.. 21:59:14 good to know. 21:59:33 : variable create 0 , ; 21:59:45 got it. 22:01:06 Well, not exactly... 22:01:44 Close, but you'd need to define the CFA with DOES> too... 22:02:35 Fractal: default create behaviour returns the address of the created word's data space 22:02:51 Fractal: which is the same as Variable's behaviour 22:02:53 Oh, I see. 22:03:14 I don't usually use CFA forths. 22:03:31 But if that's true, then ya, sounds good. 22:03:37 What's a CFA forth? 22:04:15 Fractal: what forths do you use? 22:04:47 XeF4 : http://www.hcsw.org/frugal/ 22:05:04 joonas : It's a forth that uses CFAs. (Code Field Addresses) 22:05:27 Basically, every word has an address that defines that words execution behaviour. 22:05:49 yes, I know what CFA's are... What do CFA's have to do with variables and created words? 22:06:20 I mean, how do variables and created words differ in non-CFA Forths... don't variables still return the address of a cell? 22:06:49 ... and created words still return an address in data space? 22:07:10 joonas : Yes, but they are handled the same way as a regular word. 22:07:20 For instance, in frugal, variable is defined like so: 22:08:53 : variable create here cell+ cell+ dup literal compile-exit 0 , ; 22:08:57 Or something. 22:09:53 good grief 22:09:56 fractal: ok, that seems quite... complicated. 22:10:24 fractal: so in frugal CREATE doesn't do what it does in other forths? 22:10:26 Actually, in true forth spirit, it simplifies implementation quite a bit. 22:10:58 variable isn't a good example though. 22:11:02 constant is better: 22:11:22 : constant create literal compile-exit ; 22:12:14 ok im sure there is a way around this but it seems if i wanted to create a variable inside of a word it is a no no.. 22:12:27 Fractal: is literal not immediate in frugal? 22:12:57 XeF4 : Actually, there is no literal in frugal. :) 22:13:11 I figured you wouldn't be familiar with #, 22:13:22 heh.. just found that out by grepping the source. :) 22:13:31 :) 22:13:45 Fractal: but literal doesn't work that way in normal forths 22:14:00 Well, if you're interested, read the file docs/IMPLEMENTATION 22:14:04 Or something. 22:14:10 docs/INTERNALS I mean. 22:14:17 XeF4 : Oh no? 22:14:39 Well, basically what I'm looking for is an immediate word that compiles a literal. 22:14:40 ok there has to be a clean way todo this anyone mind if i blop a few lines of code to discuss? 22:14:47 Er, a non-immediate 22:15:01 literal is an immediate word that compiles a literal, eg: 22:15:07 code works just want to make it more readable 22:15:12 3 : foo literal + ; 22:15:17 would come out as : foo 3 + ; 22:15:28 drwho: what's the problem? 22:15:37 not a problem just a style issue 22:15:49 the style of this code im sure could be improved 22:16:10 mind if i paste a few lines? 22:16:14 XeF4 : Ok, well I'm looking for something that works like postpone literal 22:16:22 drwho: go on. 22:16:22 good stuff anyway sure you will want it for later. 22:16:35 Or [ ' literal , ] 22:16:46 jsut for grins i have this for libc so you know what it is laster 22:16:47 : c-string ( addr u -- addr' ) 22:16:47 tuck pad swap move pad + 0 swap c! pad ; 22:16:56 struct 22:16:56 cell% d2/ field sun_family 22:16:56 char% 108 * field sun_path 22:16:56 end-struct sockaddr_unix 22:17:03 this is my sockaddr_unix structure 22:17:15 Create sockaddr-tmp 22:17:15 sockaddr-tmp sockaddr_unix %size dup allot erase 22:17:46 that is what im not happy with because i dont ever need it again but i am forced to use the create outside of my word to follow 22:17:48 . 22:17:48 . 22:17:53 : open-ir ( -- fid ) 22:17:53 \ build a unix socket addr structure to /dev/lircd 22:17:53 PF_UNIX sockaddr-tmp sun_family ! 22:17:53 s" /dev/lircd" c-string sockaddr-tmp sun_path 11 CMOVE 22:17:57 \ create a socket for Unix and stream 22:17:57 PF_UNIX socket:create dup 0<= abort" no free socket" >r 22:17:58 \ connect to the socket returning an fd 22:18:00 r@ sockaddr-tmp $6e connect dup 0< abort" socket:connect failed" 22:18:02 r> s" rwb" c-string fdopen ; 22:18:18 i want that extranious stuff inside of open-ir 22:18:28 once i have the fd i dont need the sockaddr anymore 22:19:03 I see. 22:19:07 * joonas digesting 22:22:06 Ok. there's no way really to stack allocate a local in forth that is portable. In gforth you could use locals to juggle a heap allocated sockaddr_un around. 22:23:04 ya i gleaned some of how the old open-socket function used >r and r> to use the return stack for some storage 22:23:18 yes, that's a special case. 22:23:23 but hats only good because we are returning the fid anyway 22:24:10 just that in c im so used to using local's and have trained myself over the years to avoid anyting global like the plague. 22:24:38 I feel your pain. :) 22:25:00 you can still split your code into vocabularies 22:25:10 :c) ok well as long as im not too far off base i know some of it is dirty like the 11 cmove could probably be able to figure the size of the "/dev/lircd" 22:25:23 abla engles? 22:25:28 :c) 22:26:07 ok so make a word that does the sockaddr-tmp 22:26:23 and just returns itself when referenced 22:28:50 hmm still confused how i can eliminate the create socketaddr-tmp 22:29:14 just seems like my style is bad on this design 22:30:36 If you absolutely must, I'd recommend factoring out a get-sockfd ( cstring -- fd) that encapsulates the sockaddr-tmp handling. Then deal with it there by, say, heap allocating it. 22:36:29 Something like this (untested): 22:36:37 \ Copy (c-from,len) to c-to and append a 0 byte. 22:36:41 : move>cstr ( c-from c-to len --) 2dup + >r move 0 r> c! ; 22:36:53 : get-sockfd ( str len -- fd) 22:37:17 sockaddr_unix %alloc >r 22:37:25 ( str len) r@ sun_path move>cstr 22:38:11 digesting 22:38:21 PF_UNIX r@ socket:create throw \ is r@ here right? 22:38:29 r> free throw ; 22:40:40 think the sun_family portion got list 22:40:42 lost 22:40:57 if i read that right but basicly your saying build the struct on the stack directly 22:41:19 dont even bother with the struct end-struct 22:42:03 no, the %alloc word malloc()s a struct and later you free it. and yes the sun_family was lost. and other bugs. 22:42:23 ahh 22:42:25 ok 22:43:09 so then its throws the address of it on the return stack right? 22:44:06 no, the "throw" is at its heart, a shorthand for "0<> abort" (you get no message tho). 22:44:20 in forth, FREE may return an error code. 22:44:34 sorry i ment throw bad workd move 22:44:53 ok 22:45:14 i think this style seems more forthy and less c like so its a good thing 22:45:28 going to try and work it out :c) 22:45:37 v1.2 on its way 22:46:04 ( str len) r@ sun_path move>cstr 22:46:08 that does not seem right? 22:46:10 note that the line with move>cstr is wrong above. it should read ( str len) r@ sub_path swap move>cstr 22:46:18 oh, yes, you got it. 22:46:18 ok :c) 22:46:34 was hoping i was not loosin it 22:47:12 also check the arguments of socket:create... I didn't. 22:47:39 just the socket type in this case PF_UNIX 22:47:43 or 2 22:48:05 the original version i found of that function was setup to hardcode that param 22:48:19 so i changed it to allow proper def of what type you wanted 22:48:26 oh, of course. man socket(2)... but then I'm missing something. hang on, I'm looking at your open-ir. 22:49:06 : socket:create ( type -- sock | -1 ) SOCK_STREAM 0 (socket:create) ; 22:49:50 the original i think had 22:49:57 Oops.. get-sockfd is the wrong factor. arggh.. I've messed up your code. 22:49:58 : socket:create ( -- sock | -1 ) PF_INET SOCK_STREAM 0 (socket:create) ; 22:50:36 its all good :c) 22:52:31 should also be called somethink like get-unixsocketfd as it would not work for a dotted address 22:53:42 The reason what I said was crap because it doesn't actually use the sockaddr_un structure! 22:53:50 I mean, it doesn't need it fr anything. 22:54:24 nope 22:55:57 technicly it could jsut put a 2 then a '\dev\blaa' on the stack and pad it out the the right size of 110 chars 22:58:02 yes, but that's not portable. 22:58:18 oh ya sorry ya i see what your saying ya the create does not need it its the connect that needs it 22:58:56 right. 22:59:31 I'm trying to think of good factors for open-ir. 23:03:49 this seems close 23:04:04 : get-unixsocketfd ( str len -- fid ) 23:04:05 \ create a socket for Unix and stream 23:04:05 PF_UNIX socket:create dup 0<= abort" no free socket" >r 23:04:05 \ connect to the socket returning an fd 23:04:05 r@ \ socket 23:04:05 PF_UNIX \ socket type 23:04:07 some-how-get-string-here-with-null-and-padded-to-full-108-chars 23:04:09 $6e connect dup 0< abort" socket:connect failed" 23:04:11 r> s" rwb" c-string fdopen ; 23:05:34 portibility is an issue i guess but most unix varients would work except for indian issues. 23:06:02 where the socket type umm may need to be byte order reversed.. shrug.. 23:14:17 It's that darned connect() that's taking things in the wrong order.. 23:15:21 yep thats exactly it 23:15:47 you see why i kinda cheated with with Create 23:16:37 a factor like: connect-unix ( str len fd --) would be good. 23:17:42 ok so we gen the socket first 23:17:48 that seems reasonable 23:18:03 errum? 23:18:15 Here's what I have so far: 23:18:19 \ Get a new unix socket. 23:18:19 : new-unixfd ( -- fd) PF_UNIX socket_create throw ; 23:18:38 \ Allocate and fill out a sockaddr_un. 23:18:38 : >sockaddr_unix ( str len -- sockaddr_un) 23:18:38 sockaddr_unix %alloc >r 23:18:38 PF_UNIX r@ sun_family ! 23:18:38 r@ sun_path swap move>cstr 23:18:39 r> ; 23:18:45 : connect-unix ( str len fd --) 23:18:45 >r >sockaddr_unix dup r> ( adr fd) 23:18:45 $6e connect throw 23:18:47 free throw 23:18:49 ; 23:18:51 \ Create a c-string "rwb". 23:18:53 create rwb 4 allot s" rwb" rwb move>cstr 23:18:55 : open-ir ( str len -- fid) 23:18:57 new-unixfd dup >r connect-unix 23:18:59 r> rwb fdopen 23:19:01 ; 23:19:39 ah.. stack comment on connect-unix first line should be ( adr adr fd) 23:19:58 so 23:20:08 oh, and add a swap before $6e, I think. 23:20:28 s" /dev/blaa" %size open-ir IRfd ! 23:20:46 just s" /dev/blaa/" open-ir irfd ! 23:21:02 ok teach me what happened to size? 23:21:09 err len 23:21:17 is that assumed to be passed with a s" 23:21:23 yes. 23:21:27 cool. 23:21:29 good to know. 23:21:30 try it in gforth s" foobar" 23:21:34 .s 23:22:09 roger that huston. 23:23:13 The $6e is still a bit ugly. 23:23:52 I'd still use the create version though. 23:25:47 Q. is that going to be safe.. the sockaddr_unix does not realy have the size of $6e 23:26:02 not sure if the call will give a rip 23:26:25 but it might. 23:27:49 So what's sizeof(struct sockaddr_un) ? 23:28:01 forget it i see we still use teh structure 23:28:08 i thought we droped it 23:28:55 ? 23:29:15 its right i see now 23:30:54 It's connect ( fd sockaddr size -- errorcode) 23:32:52 i removed the rwb part with this what u think 23:32:55 r> s" rwb" c-string fdopen compiled 23:32:59 r> s" rwb" c-string fdopen 23:41:12 hmm not sure if its just a syntax error or the call failed to libc seems like syntax 23:41:39 s" /dev/lircd" open-ir 23:41:39 *the terminal*:1: error 4 23:41:39 s" /dev/lircd" open-ir 23:41:39 ^^^^^^^ 23:41:39 Backtrace: 23:41:40 $40024F9C throw 23:41:42 $40025054 new-unixfd 23:42:18 ok diging 23:43:28 It's failing in new-unixfd? 23:43:29 i better go read up on throw :c) 23:43:38 no its doing it but still throwing the exception 23:44:45 So socket:create was ( protocol -- fd 0 | fd -1) right? 23:45:20 Try adding a .s before the throw in socket:create 23:45:43 no just fd | -1 23:45:55 returns a file descriptor or -1 23:46:02 oops.. That explains it. It's throwing the fd as an exception :) 23:46:05 so i get back say a 6 23:46:09 yep :c) 23:46:23 ok let me tought this one out 23:46:28 see if i blow it :c) 23:48:10 : new-unixfd ( -- fd) PF_UNIX socket:create 0< throw ; 23:48:16 do i need to dup? 23:48:20 umm 23:48:28 yes. 23:48:38 ok so dup 0< throw; 23:48:53 try it 23:50:03 uggg perror shows bad file descriptor it threw in connect-unix 23:51:02 is connect ( fd sockaddr size -- 0|-1) 23:51:46 : socket:connect ( fd sock size -- fd ) (socket:connect) ; 23:52:48 ok lets test >sockaddr_un first, just to be sure. 23:53:22 try this: s" foobarbaz" >sockaddr_unix constant fff 23:53:31 fff $6e dump 23:53:58 looks good 23:54:07 looks like what i would expect it to look like 23:54:15 great. 23:54:31 the error code indicates the connect didnt get the socket id passed in 23:54:34 or was off 23:54:47 perror Bad file descriptor 23:54:59 What's your code for connect-unix ? 23:55:10 : connect-unix ( adr adr fd --) 23:55:10 >r >sockaddr_unix dup r> ( adr fd) 23:55:10 $6e socket:connect throw 23:55:10 free throw 23:55:10 ; 23:55:21 try this: 23:55:21 seems odd to have the adr 2 times? 23:55:30 : connect-unix ( str len fd --) 23:55:30 >r >sockaddr_unix dup r> ( adr fd) 23:55:30 swap $6e connect throw 23:55:30 free throw 23:55:32 ; 23:55:45 The second one is for FREE. 23:55:59 ahh 23:56:05 oh and the return value from connect() can't be thrown either, so needs the dup 0< throw thing. 23:58:02 uh... sorry, no . 23:58:03 dup 23:58:07 ok 23:58:24 none, of the dup before 0< throw. that is :) 23:58:28 * joonas sleepy 23:59:59 If this doesn't work, I might as well call it a night: 23:59:59 --- log: ended forth/02.11.03 23:59:59 --- log: ended forth/02.11.03