[00:34:02] why do i always get in trouble with SYNTAX: [00:57:22] I'm trying to make a word that creates a constant with the value precomputed on the stack [00:57:28] SYNTAX: !CONSTANT: scan-new 2dup swap first define-constant drop ; [00:57:49] best I can come up with but have to use a drop [00:58:07] 32 !CONSTANT: TEST drop [02:41:29] * tgunr [tgunr!~davec@cpe-66-91-34-168.hawaii.res.rr.com] has quit (Quit: Textual IRC Client: www.textualapp.com). [03:28:31] * tgunr [tgunr!~davec@cpe-66-91-34-168.hawaii.res.rr.com] has joined the channel. [04:35:33] * kssreeram [kssreeram!~kssreeram@223.190.160.6] has joined the channel. [05:13:30] * jtimon [jtimon!~quassel@55.31.134.37.dynamic.jazztel.es] has joined the channel. [05:28:41] * kssreeram [kssreeram!~kssreeram@223.190.160.6] has quit (Ping timeout: 258 seconds). [05:37:42] * kssreeram [kssreeram!~kssreeram@27.59.81.135] has joined the channel. [05:40:57] * kssreeram [kssreeram!~kssreeram@27.59.81.135] has quit (Read error: Connection reset by peer). [06:00:28] * kssreeram [kssreeram!~kssreeram@27.59.81.135] has joined the channel. [06:28:22] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has quit (Ping timeout: 252 seconds). [07:15:03] * kssreeram [kssreeram!~kssreeram@27.59.81.135] has quit (Read error: Connection reset by peer). [07:28:46] * kssreeram [kssreeram!~kssreeram@27.59.81.135] has joined the channel. [07:58:38] * kssreeram [kssreeram!~kssreeram@27.59.81.135] has quit (Ping timeout: 240 seconds). [08:18:06] * kssreeram [kssreeram!~kssreeram@223.231.160.45] has joined the channel. [08:47:15] * kssreeram [kssreeram!~kssreeram@223.231.160.45] has quit (Ping timeout: 276 seconds). [09:29:45] * kssreeram [kssreeram!~kssreeram@223.231.160.45] has joined the channel. [10:13:50] * kssreeram [kssreeram!~kssreeram@223.231.160.45] has quit (Read error: Connection reset by peer). [10:46:07] * kssreeram [kssreeram!~kssreeram@117.97.220.9] has joined the channel. [11:16:31] * kssreeram [kssreeram!~kssreeram@117.97.220.9] has quit (Read error: Connection reset by peer). [13:08:18] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has joined the channel. [15:32:45] Could someone help me explain http://polymicro.clarify-it.com/d/hffttz [15:33:22] I can paste in the code fine, but USE: logging.syslog gives this crazy error [15:37:15] Just occurred to me the ! is giving the problem, renamed !CONSTANT: to SETCONSTANT: made the problem go away [15:37:39] Still open to a better way of doing this, this looks clunky but works [15:41:58] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has quit (Ping timeout: 276 seconds). [15:59:26] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has joined the channel. [16:14:04] tgunr: i can't tell from the code you have posted what you are trying to do [16:14:35] Basically a bunch of predefined values for constants [16:15:15] I wanted value !CONSTANT: name such that invoking name returns value [16:16:42] constants already have defined values when you declare them with the CONSTANT: syntax [16:16:45] SO I gave up and tried a creating word that takes a given stack effect [16:16:47] else they wouldn't be constants [16:17:30] you cant say CONSTANT: TEST 1 3 shift [16:18:17] which is equivalent to : TEST ( -- n ) 1 3 shift ; I know [16:19:49] using literal syntax you can CONSTANT: test $[ 1 3 shift ] [16:20:07] actually in this case i wanted { n1 n2 n3 n4 } all defined as words which returned the value n 3 shift [16:20:17] Ah , the missing piece! [16:20:34] thank you! [16:21:04] np. it is a little clunky and the syntax is not so obvious [16:21:08] maybe it will be fixed with the new parser [16:21:17] obvioulsy :) [16:23:25] ok, code fixed, looks much nicer [16:37:35] * delvinj [delvinj!~Miranda@2601:449:4001:5400:c5f0:333d:2793:3554] has quit (Quit: it's the end). [16:38:40] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has quit (Read error: Connection reset by peer). [16:58:10] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has joined the channel. [17:49:54] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has joined the channel. [17:55:57] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has quit (Quit: My Mac has gone to sleep. ZZZzzz…). [17:56:09] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has joined the channel. [18:04:01] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has quit (Quit: My Mac has gone to sleep. ZZZzzz…). [18:04:13] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has joined the channel. [18:08:03] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has quit (Client Quit). [18:08:13] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has joined the channel. [18:17:18] * kssreeram [kssreeram!~kssreeram@106.207.105.50] has quit (Quit: My Mac has gone to sleep. ZZZzzz…). [18:38:28] * kssreeram [kssreeram!~kssreeram@49.207.188.166] has joined the channel. [18:50:32] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has quit (Read error: Connection reset by peer). [19:08:32] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has joined the channel. [19:24:35] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has quit (Read error: Connection reset by peer). [19:31:14] * kssreeram [kssreeram!~kssreeram@49.207.188.166] has quit (Quit: My Mac has gone to sleep. ZZZzzz…). [19:45:03] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has joined the channel. [19:55:37] * rgrinberg [rgrinberg!~rgrinberg@cp209-202-78-3.cp.telus.net] has quit (Read error: Connection reset by peer). [20:32:01] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has joined the channel. [20:32:23] * jtimon [jtimon!~quassel@55.31.134.37.dynamic.jazztel.es] has quit (Remote host closed the connection). [20:45:32] * delvinj [delvinj!~Miranda@173-160-116-46-Minnesota.hfc.comcastbusiness.net] has joined the channel. [21:07:04] * Sonderblade [Sonderblade!~Sonderbla@h-52-183.a157.priv.bahnhof.se] has quit (Quit: L�ar). [22:10:49] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has quit (Ping timeout: 272 seconds). [23:02:08] * tgunr [tgunr!~davec@cpe-66-91-34-168.hawaii.res.rr.com] has quit (Quit: Textual IRC Client: www.textualapp.com).