00:00:00 --- log: started forth/13.08.01 00:04:26 --- join: epicmonkey (~epicmonke@188.134.41.113) joined #forth 00:15:49 --- quit: Bahman (Quit: Leaving.) 00:18:24 --- join: Bahman (~Bahman@86.98.22.86) joined #forth 00:25:39 --- join: arquebus (~frath@c-107-3-164-239.hsd1.ca.comcast.net) joined #forth 00:47:30 --- part: arquebus left #forth 01:07:07 --- quit: epicmonkey (Ping timeout: 264 seconds) 01:24:11 --- join: josvuk (~josef@p54ABE87E.dip0.t-ipconnect.de) joined #forth 01:29:59 Hi 01:30:11 How to fix this 01:31:24 : init boot hd:\forth\screendim.of ; unknown word hd..... :-( 01:35:56 josvuk: does "boot hd:\forth\screendim.of" work when you type it by hand? 01:36:54 if so, 'boot' is probably calling 'word' or 'gettoken' or whatever the word that reads a string is called in this version of forth. 01:37:28 yes it works with no error and it changes the screen resolution from 1024x768 to 640x480 01:37:41 in other words, boot is probably just a frontend to some other word, so use 'see boot' to find out what it does and do the same thing yourself 01:38:15 (but instead of reading a string from input, put the string on the stack manually) 01:46:59 --- join: true-grue (~quassel@95-25-69-164.broadband.corbina.ru) joined #forth 01:48:49 --- quit: mark4 (Remote host closed the connection) 02:09:19 --- quit: Bahman (Quit: Leaving.) 02:16:16 --- join: epicmonkey (~epicmonke@host-224-58.dataart.net) joined #forth 02:26:27 --- join: Bahman (~Bahman@86.98.22.86) joined #forth 02:48:03 --- quit: Bahman (Quit: Leaving.) 02:48:14 --- quit: kludge` (Ping timeout: 264 seconds) 02:53:54 --- join: kludge` (~comet@unaffiliated/espiral) joined #forth 02:55:58 tangentstorm: i think the problem might caused by the hidden quote 03:07:21 I'm off to the Centre for Computing History in Cambridge tomorrow http://ComputingHistory.org.uk :-) 03:08:11 oop, are you the author of itsyforth? 03:08:30 Hi yunfan. Yes, that's me :-) 03:09:20 itsy: i found that your kernel is very mini 03:09:35 the philosophy of it looks like jeforth 03:09:59 Oh. I haven't seen jeforth. I'll take a look after work. 03:10:34 www.jeforth.com 03:10:41 Thanks :-) 03:10:44 its a javascript project 03:11:02 but i follow that made my own python version :] 03:24:38 --- join: Bahman (~Bahman@86.98.22.86) joined #forth 04:19:39 --- quit: itsy (Quit: itsy) 04:20:06 --- join: nighty^ (~nighty@lns-bzn-49f-62-147-170-46.adsl.proxad.net) joined #forth 04:22:10 --- quit: impomatic (Read error: Connection reset by peer) 04:22:36 --- join: impomatic (~chatzilla@46.208.89.101) joined #forth 04:24:05 --- quit: dys (Read error: Connection reset by peer) 04:26:34 --- join: dys (~user@2a01:1e8:e100:8296:21a:4dff:fe4e:273a) joined #forth 05:19:28 --- part: bogen left #forth 05:37:44 --- quit: josvuk (Quit: Konversation terminated!) 06:53:08 --- quit: Bahman (Quit: Leaving.) 07:32:14 --- join: fantazo (~fantazo@213.129.230.10) joined #forth 07:36:14 --- join: cristoper (~cynic@174-16-64-106.hlrn.qwest.net) joined #forth 07:36:20 --- part: cristoper left #forth 08:32:39 --- join: Kumul (~nmz@adsl-64-237-234-8.prtc.net) joined #forth 08:46:12 --- quit: Eth|cal (Ping timeout: 245 seconds) 08:48:03 --- join: itsy (~digital_w@46.208.89.101) joined #forth 08:48:41 --- join: Eth|cal (~sam@ppp59-167-172-238.static.internode.on.net) joined #forth 08:57:00 --- join: ncv (~quassel@79.114.15.47) joined #forth 08:57:00 --- quit: ncv (Changing host) 08:57:00 --- join: ncv (~quassel@unaffiliated/neceve) joined #forth 09:15:05 --- quit: ncv (Remote host closed the connection) 09:17:23 --- join: ncv (~quassel@79.114.15.47) joined #forth 09:17:23 --- quit: ncv (Changing host) 09:17:23 --- join: ncv (~quassel@unaffiliated/neceve) joined #forth 09:29:02 --- quit: karswell` (Remote host closed the connection) 10:30:52 --- join: josvuk (~josef@p54ABC215.dip0.t-ipconnect.de) joined #forth 10:32:22 --- quit: Kumul (Quit: Divided by 0) 10:34:44 --- join: Kumul (~nmz@adsl-64-237-234-8.prtc.net) joined #forth 10:36:24 Hi, what's that false invert . gives me ffffffff is it two's complement? 10:38:00 why not false invert . gives simply -1 ? 10:43:35 : ?DAY 32 < IF ." looks good " ELSE ." no way " THEN ; 10:44:04 -1 as an unsigned 32-bit hex number is ffffffff 10:44:13 --- join: _spt_ (~steven@unaffiliated/-spt-/x-5624824) joined #forth 10:44:47 probably if you say decimal it'll print -1 instead. no idea. 10:44:58 should test a number from the stack if it is a valid day but if I put -1, 0 on the stack it says looks good but no day has the number -1 or 0 10:45:07 how to fix the code? 10:46:01 both of those numbers are less than 32 right? :) 10:46:20 so you need to also check that the number is greater than 0 10:48:26 make sense? or do you need more help? 10:50:44 ffffffff ?DAY is -1 why but it is also the largest number for 32 bit so why don't it get no way ? 10:52:23 : ?day 1- 31 u< if ." looks good" else ." no way" then ; 10:53:14 ah... u< must be the unsigned version. interesting. 11:06:22 --- quit: Kumul (Quit: Divided by 0) 11:08:10 --- join: Kumul (~nmz@adsl-64-237-234-8.prtc.net) joined #forth 11:09:45 --- quit: fantazo (Ping timeout: 240 seconds) 11:28:41 i am doing something javascripty today. 11:30:06 in javascript, there is a thing called 'this' that is sort of like the current context that's passed along through various function calls. 11:30:24 it behaves oddly. i'm not fully sure i understand it. 11:30:45 but... 11:30:57 it can be any object you want. 11:31:11 like.. it can be an array. 11:31:42 only an array in javascript is really more like a double ended queue.. it has push and pop and shift/unshift. 11:32:46 so.. you could make 'this' be a js array and then call functions, and now you have a data stack and a return stack that are cleanly separated. 11:33:40 so now you can pretty much get rid of your variables in javascript and just call this[0] for tos and this[1] for nos, etc. 11:34:47 except.. you still do have variables and arguments and you can use them for some third channel if you want 11:36:09 a third stack even, because 'arguments' is an array and you can change it around and even pass your arguments to child functions unchanged. 11:36:37 long story short: js could sort of be treated like a really ugly forth with 3 stacks. the end. 11:41:37 hm, don't do anything with java use squeak instead :-) 11:43:23 i like squeak, but i'm talking about javaSCRIPT 11:43:58 (i'm wrong about being able to push and pop to the arguments. you can pass the arguments object around but it's a fixed size construct. 11:45:45 --- quit: sirdancealot (Ping timeout: 240 seconds) 11:47:01 --- quit: epicmonkey (Read error: Operation timed out) 11:47:48 --- join: sirdancealot (~sirdancea@98.82.broadband5.iol.cz) joined #forth 12:18:00 Um, I thought "this" represented the object used to invoke the currently executing method. 12:18:48 nope 12:19:21 Are you sure? 12:19:35 Then how do you assign some object to "this"? 12:19:35 you can create bound functions that have a fixed 'this' 12:20:04 Well, that sounds to me like you then invoke those directly, like a traditional function, rather than invoking them as an object's method. 12:20:15 whatever.call(thingThatWillBeThis, 'things','that','will','be','arguments') 12:20:45 So you're saying I can define class A, create method B that is *not* fixed and method C that *is* fixed as member functions of that class. 12:20:50 no 12:20:56 Ok. 12:20:57 you can't do that 12:21:04 you can't define classes :) 12:21:05 How do you call a bound function? 12:21:30 there's a spec for adding classes to javascript in the future though. 12:21:30 Ok. Then what is an object an instance of? 12:22:03 you could say that there is one class in javascript: Object 12:22:11 but every individual object has a prototype 12:22:49 but a prototype is more like an instance itself than a class. 12:23:44 How do you make different objects behave differently? 12:24:09 i'm almost positive you can say x = new Foo(); and then x.name='fred'; y = new x; and y.name == 'fred' 12:24:20 * tangentstorm tests 12:24:57 you can assign different functions to the same properties ... so x.dosomething and y.dosomething can be different 12:25:10 I don't understand - the whole point of an object oriented language is that you can defines objects of different "sorts" that have different functions that make sense to call on them, etc. 12:25:31 You're implying Javascript isn't really object oriented - not "really" - and if that's the case then my notion of "this" makes no sense. 12:26:01 And in my mine a "class" is simply the collection of functions that are associated with a particular object type. 12:26:20 my mind 12:27:24 I don't knowJavascript so I shouldn't judge, but it sounds almost like they said "we're not going to build a true object oriented language, but we want to call it object oriented because that's cool these days, so let's just put some of the object oriented terminology into play *somehow*". 12:30:16 function az(n){this.n = n; var self=this; return function(){return self}}; var a = new az(1), z=new az(2); b = new a(); 12:30:48 b is now an object and b.n == 1 12:31:15 if you say c = new z(); then c will have n ==2 12:32:53 i don't understand why it works that way or think it's good that it works that way, but since that's how it works i'm curious what i can do with it :) 12:33:48 Ugh. 12:34:05 So now what do you do with c? 12:34:07 javascript isn't an especially object oriented language. but there are various ways to make things that look like traditional oo on top of it. 12:34:20 i mostly ignore it... 12:34:36 but i do have one small c program i may work on again... 12:34:52 https://github.com/tangentstorm/gotopaint 12:34:54 :) 12:35:44 What purpose does c serve after all of the above? 12:35:50 for anything where most people use c, i currently use pascal, but an occasionally forthy style of pascal. 12:35:58 oh c 12:36:00 Other than the same purpose you could have gotten by saying int c =2; 12:36:01 the variable :D 12:36:29 i thought you meant if i was this bad at javascript...what would i do with c :) 12:36:44 well basically it's a clone of the object but you can change it independently. 12:37:15 No, I mean if you can't create a variety of functions that operate on an object (i.e., the member functions of its class) then what's all of that for? 12:37:31 So it's like a pointer to the object? 12:37:43 A different way of getting at the same memory? 12:37:57 Or you mean it's a different object that behaves the same way? 12:38:08 ok so in forth you know how you can chain vocabularies together? 12:38:16 Yes. 12:38:19 a prototype is like a vocabulary. 12:39:10 you can make chains of them... so it's a bit like inheritance because anything you don't override in the current vocabulary/prototype gets looked up in the previous one in the chain. 12:39:14 hrm. 12:39:27 So you can associate a variety of functions with the prototype then? 12:39:39 actually that's probably a really good way to implement forth dictionaries in js... 12:39:42 yes 12:40:10 did you see in the code where i said self=this ? 12:40:28 and then i created a function to return self 12:40:41 if i just said return this the behavior would be different. 12:40:58 self=this takes a snapshot of the 'this' value. 12:41:27 So I'm trying to confirm that you can create as many functions as you want that you can then call against an object? 12:41:45 I would call that collection of functions the "class" associated with that object. Or at least a facsimile of a class. 12:42:12 you can say: 12:45:36 function Class(arg) { return { val:arg, 'getValue':function(){ return this.val; }}} 12:46:57 var val = 5, obj = new Class(123); obj.getValue() 12:47:06 the result of obj.getValue() is 123. 12:47:26 er.. disregard the val=5 12:49:15 Now. 12:49:20 What *else* can I do with obj? 12:49:26 hold up 12:49:28 var somethingElse = { val:99 }; function WhatDoesThisDo(o) { return o.getValue(); } 12:49:31 obj. And how do I define those things? 12:49:54 y'all have seen this, right? https://www.destroyallsoftware.com/talks/wat 12:50:40 hmmm... WhatDoesThisDo.call(somethingElse, obj) 12:50:40 Sorry - at work. Can't watch a video right now. 12:50:51 i really really really expected that to print 99 12:50:55 but it prints 123 12:51:03 so i still don't understand 'this' 12:51:37 Here's my quandary over this. To me the core essence of object oriented programming is to say "Hey, I've conceived this 'entity,' and for that entity I need data fields a, b, and c and on entities of that sort I want to do operations A, B, C, and D." 12:52:01 So then I somehow write functions to define A, B C, and D, as well as functions to declare the needed data space, and somehow wrap it up so that when I say 12:52:09 x = new Entity 12:52:25 I can then say x.A(...), x.B(...), etc. 12:52:37 yeah 12:52:38 I'm just not seeing a clean path to that in anything you've descirbed so far. 12:52:40 you can do that 12:52:49 Ok. 12:53:14 Then B uses "this" in its definition, and I say x.B(...), then inside that execution stream "this" will refer to X. 12:53:15 x 12:53:27 i'm just saying that there are situations where when you say x.foo() and foo uses "this" ... this != x 12:53:36 most of the time it will. 12:53:38 But if I say y.B(...) then "this" will refer to y. 12:53:45 most of the time it will. 12:54:53 --- join: epicmonkey (~epicmonke@188.134.41.113) joined #forth 12:56:23 If it does something different some of the time then that's very confusing. 12:56:32 hmm. 12:56:34 okay. 12:56:46 no turns out you're right. 12:59:47 function hi() { return this.msg; } var msg = 'ok', y = {msg:'hello'}; y.hi=hi; [ hi(), y.hi() ] 12:59:57 result is ['ok','hello'] 13:01:20 the docs say that the act of calling x.y() sets this to x for the duration of the call 13:02:53 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this 13:02:58 Yes - that last thing you typed is exactly what I was trying to say. 13:03:12 Just much more cleanly stated than I managed... 13:03:41 hmm 13:03:59 oh i know where the trouble comes in. it's with callbacks. 13:05:39 x = 99; function MyClass(){ this.x = 5; getX() { return this.x; } }; callback = new MyClass().getX ; callback() 13:05:45 How does a callback invoke a function without doing so through an object? 13:06:07 the rules we just established say callback should return 99 13:06:30 which is fine, but it's hard to remember sometimes. 13:06:44 Wait. 13:06:49 especially when half of javascript is about callbacks. 13:07:01 In that line of code x and this.x look to have nothing to do with one another. 13:07:30 there are two objects. 13:07:32 "this.x" implies that we are executing a method associated with some object, and that object also has a method called x. 13:07:34 one is the global object. 13:07:47 Ok. 13:07:50 Fair enough. 13:07:56 the global object can be anything. 13:08:00 it's just whatever 'this' is. 13:08:11 So global.x and "this.x" don't necessarily refer to the same thing, or even the same sort of thing. 13:08:17 open the js console in a browser and type 'this' and it'll say window or somehing 13:09:20 Or are you saying that every object effectively inherits the global object's characteristics? 13:09:31 So when you say x=99, you're basically defining global.x as 99. 13:09:37 yes 13:09:54 So then every object later on, unless you override, will also have a member x that has value 99? 13:09:55 well it means this.x = 99 13:10:01 no 13:10:05 Ok, what if I do this: 13:10:13 Pardon my hand waving. 13:10:19 x=99 (set global x) 13:10:29 i shouldn't have said global. 13:10:33 it's not global. 13:10:36 create a new object called y. 13:10:39 y.x=50. 13:10:47 now what does plain old x equal? 13:10:57 99 13:11:08 but it's not global. 13:11:25 So y gets its own copy of the entire outer environment? 13:11:35 Like, in this example, x? 13:13:36 x = 99; function MyClass(){ return { x:5, getX: function() { return this.x } }}; callback = new MyClass().getX ; callback() 13:13:46 ^ corrected code after actually trying it 13:13:54 no 13:14:16 y is like its own vocabulary chained to whatever it's prototype is. 13:17:11 function chain(obj) { return obj }; x={val:0}; y = new chain(x); console.log(x,y); y.val=1; console.log(x,y); 13:17:21 Object {val: 0} Object {val: 0} 13:17:23 Object {val: 1} Object {val: 1} 13:17:36 ugh. i screwed that up. 13:18:13 sorry. i don't understand 'this' well enough to explain its weird behavior, and we're off topic anyway. 13:30:01 --- join: Mat2 (~claude@91-65-144-133-dynip.superkabel.de) joined #forth 13:32:44 --- nick: bluekelp_ -> bluekelp 13:35:58 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 13:50:11 --- quit: Mat2 (Quit: Verlassend) 13:58:03 --- quit: nighty^ (Remote host closed the connection) 14:04:59 ok 14:05:02 function DROP(){return this.data.pop()} function ADD(){this.data.push(DROP.call(this)+DROP.call(this))} function RUN(code){this.ip |= 0; while(this.ip ugly but simple. 14:05:25 RUN.call({data:[]}, [1,2,DROP,3,ADD]) 14:05:33 result is [4] 14:07:18 I think maybe I can clean up most of the "this" keywords if i wrap the whole thing in a function. 14:10:11 ... 14:11:16 well if we do that, we don't even need 'this'.. we can just close over a local var data =[]; 14:15:58 --- quit: Nisstyre (Quit: Leaving) 14:16:23 That's the right way to do it. In most situation you can easily avoid "this" or "new" keywords. Use lexical closures. 14:18:31 well that gets you a virtual machine but i'm shooting for somethingy dynamically extensible like forth 14:19:32 * tangentstorm is still experimenting... 14:23:28 JavaScript is taking the place of C as the portable assembler. Why not just use proven techniques of C-Forths then? 14:24:00 well because it's not c 14:24:34 or.. like.. 14:25:09 javascript itself already has all this stuff written in c that can be used for a forthlike system 14:25:12 Anyway you don't need to use in Forth the JavaScript parts which are non-C :) 14:26:00 Ah, Forth_like_ system! 14:26:25 yeah.. i'm building something :) 14:26:31 Ok :) 14:27:50 hrm 14:29:31 --- quit: true-grue (Read error: Connection reset by peer) 14:29:48 i work on ngaro.js for retroforth 14:30:14 ngaro being the virtual machine. 14:30:29 and it uses basically an array of instructions and an instruction pointer. 14:30:58 but the js vm itself already has that 14:37:48 i'm kind of thinking i can use function composition to let the javascript vm do most of the work 14:39:18 --- join: ZarutianWEB (c290546e@gateway/web/freenode/ip.194.144.84.110) joined #forth 15:03:55 --- quit: ncv (Remote host closed the connection) 15:22:34 --- quit: epicmonkey (Ping timeout: 260 seconds) 15:45:03 --- quit: josvuk (Quit: Konversation terminated!) 15:53:16 --- quit: _spt_ (Quit: bye) 17:01:50 --- part: itsy left #forth 17:01:52 --- quit: impomatic (Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]) 17:03:45 --- join: dessos_ (~dessos@c-174-60-176-249.hsd1.pa.comcast.net) joined #forth 17:05:05 --- nick: dessos_ -> dessos 17:30:32 --- quit: ttmrichter (Ping timeout: 260 seconds) 17:30:45 --- quit: sirdancealot (Ping timeout: 240 seconds) 17:32:34 --- join: ttmrichter (~ttmrichte@gertm.eu) joined #forth 17:52:20 --- join: sirdancealot (~sirdancea@98.82.broadband5.iol.cz) joined #forth 18:21:46 --- join: josvuk (~josef@p54ABEC39.dip0.t-ipconnect.de) joined #forth 18:22:46 hi, seeing words behaves strange. it shows me " Hello " type 18:23:29 where I wrote in a colon definition ." Hello " not " Hello " type 18:23:33 why? 18:26:46 --- join: Kumool (~nmz@67.224.210.214) joined #forth 18:29:32 --- quit: Kumul (Ping timeout: 245 seconds) 18:30:31 --- part: dessos left #forth 18:36:37 josvuk: is ." a IMMEDIATE word? 18:37:49 and what forth is it you are using gForth, eForth, Forth-83 or some other sort of ANS Forth? 18:41:03 my forth is the forth from of 3 think it is a sort of ans forth 18:42:30 I can type ." Hello " and it prints Hello 18:43:09 try SEE ." 18:43:46 but if I wrote " Hello " type inside a colondef there comes a stack error 18:45:40 now that is strange 18:46:40 but looking at the implementation of ." should be informing 18:46:45 --- quit: sirdancealot (Ping timeout: 240 seconds) 18:46:47 see ." : ." ^8693.1733 state? if ['] type ^8688.7934 else type then ; 18:48:57 That said that regardless of whether you are complying our not ." Parses the text up to the closing quote from the input stream. 18:49:49 Then, if you are compiling it compiles that into the definition followed by a call to type. 18:50:09 If you're interpreting it just calls type immediately. 18:50:44 complying? you meant compiling, KipIngram, yes? 18:51:01 Yes. 18:51:13 Sorry. Auto correct in Swype. 18:51:52 But it looks like it's compiling type first and then the string. 18:53:33 josvuk: does this answer your question somewhat? 18:53:53 --- join: sirdancealot (~sirdancea@98.82.broadband5.iol.cz) joined #forth 18:54:03 hm, yes somewhat thx :-) 18:55:40 josvuk: Do you get a stack error at compile time or when you run the word? 19:00:33 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 19:03:59 hm, I don't know what I did ..... but now there is no error compiling with " Hello " type :-( 19:04:24 " or ." ? 19:04:38 is there a way for tracing backwards ? to see what I did ... 19:04:50 Up arrow? 19:06:47 " and ." Are totally different things. 19:07:11 both works " Hello " type and ." Hello " in a colon definition anyway the compiler makes a ." to be " type when seeing 19:07:42 Yes. 19:08:00 But exactly how did you get the stack error? 19:08:41 ." Often can't be run interactively. 19:09:02 hm, I m working on it ..... but cant produce the stack error twice ..... 19:09:05 Not a whole lot of point in typing a string right back at yourself. 19:09:59 " just puts a strong on the stack. What happens if you do this: 19:10:18 : test " hello" ; 19:10:26 And then 19:10:35 test 19:11:05 In gforth that's an error. 19:12:08 " puts two items on the stack 0 and 4286896824 wich is porbably the biggest number available 19:12:28 Which Forth are you doing this in? 19:12:55 of-3 forth 19:13:04 of-3? 19:13:57 now I have typed type and the whole screen is scrolling characters. how to interrupt it ctrl-c? 19:14:05 :-) 19:14:07 yes openfirmware 3 19:14:19 Ah, that can be actually searched. 19:14:52 josvuk: aah, okay. On a Sun or Macintosh? 19:15:27 (machine that is) 19:16:15 Im on ibook 500 apple ... 19:18:48 just poking around the firmware for fun? Then this http://docs.oracle.com/cd/E19957-01/801-5123-10/fcode.Preface.html might help you to understand openfirmware 19:19:58 and might stop the scrolling (Havent tried on my old iMac CRT A so I do not know) 19:20:34 Cmd+. was it supposed to be 19:22:42 hm I found ctrl+y on a qwertz keyboard stopped the scrolling and wrote user-abort ... :-) thx for the of doc's apple deleted his for technotes about of ... :-( 19:23:38 Tried to dig through the Internet Archives? 19:29:05 ah, yes used it but not for searching for the technote do you mean the wayback machine or is there something better? 19:29:40 I have only used the wayback machine. 19:30:52 ok. will see ..... 19:44:39 --- quit: josvuk (Quit: Konversation terminated!) 20:22:13 --- quit: Nisstyre (Quit: Leaving) 21:38:00 --- quit: tangentstorm (Quit: WeeChat 0.3.2) 22:36:49 --- quit: ZarutianWEB (Ping timeout: 250 seconds) 23:27:34 --- join: true-grue (~quassel@95-26-208-120.broadband.corbina.ru) joined #forth 23:28:13 --- quit: true-grue (Read error: Connection reset by peer) 23:29:23 --- join: true-grue (~quassel@95-26-208-120.broadband.corbina.ru) joined #forth 23:59:59 --- log: ended forth/13.08.01