[00:12:49] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has joined the channel. [00:38:55] * jamtho [jamtho!~jamtho@host217-42-112-25.range217-42.btcentralplus.com] has joined the channel. [01:18:15] * jamtho [jamtho!~jamtho@host217-42-112-25.range217-42.btcentralplus.com] has quit (Ping timeout: 240 seconds). [01:43:34] * allenj12 [allenj12!~user@98.221.156.238] has joined the channel. [01:46:34] any good articles on making a stack language? im trying to write one in c++ but not exactly sure on how to make the actual stack contain multiple types of values. [01:50:46] Short answer: use intptr_t [01:51:26] and cast to types of the same size. [01:52:31] Although maybe it's safer to use int64_t if you want to support 64-bit doubles. [01:54:05] allenj12: create a base class for all language types. Have the stack contain elements of that base class. [01:54:28] allenj12: eg. https://github.com/doublec/cf/blob/master/cf.h [01:55:27] thanks! ill look into both of those [02:39:34] * cflang [cflang!~cflang@monero.mmpool.org] has joined the channel. [02:40:08] cflang: 1 2 + [02:40:08] 3 [02:40:23] cflang: [ 1 2 3 ] [ 1 + ] map [02:40:23] 3 [ 1 2 3 ] [ 1 + ] map [02:40:28] cflang: . [02:40:28] 3 [ 2 3 4 ] [02:40:33] cflang: clear;. [02:40:33] Stack empty. [02:40:55] It's been so long since I did anything with cflang I can't remember how to use it. [02:43:33] :D [02:45:13] * cflang [cflang!~cflang@monero.mmpool.org] has quit (Ping timeout: 260 seconds). [02:48:51] doublec: i see a little bit what you mean. I tried something a similar however once you pull an element off the stack how do you get the actualy value. I.E stack when you pull it off here how do you get the 5 or "c" out? [02:49:09] im looking a little bit at your print function but still a little confused :D [02:51:34] allenj12: the base object has a 'eval' method [02:51:47] allenj12: when it's popped off the stack that is called [02:51:53] allenj12: and it does whatever is needed [02:52:07] allenj12: so '+' object's eval would pop two items off the stack and add them together [02:53:05] XYObject? [02:53:07] allenj12: for things like numbers, there's an 'as_float', etc method defined in the base object [02:53:17] allenj12: yes [02:54:33] allenj12: IIRC i had the base object have a lot of virtual methods for primitives [02:54:54] allenj12: and derived objects like XYInteger, XYFloat, etc would implement them to do what was needed. [02:55:18] so that makes sense, your going through your program's instructions, but what about things off the stack itself. so '+' would grab the numbers out of basetype. [02:55:19] ooo [02:55:22] I wrote it almost 10 years ago so forget a lot [02:55:27] :D [02:57:02] All the words/primitives/functions received an XY object as an argument. That's basically the stack. They can then pop/push things as needed. [03:01:56] im still a little confused :D how do you get the value out of the XYObect. so you pop off an XYObject how do you test if its a XYInteger and not a XYstring for example? [03:03:52] allenj12: I used RTTI [03:04:06] allenj12: so dynamic_cast(object_from_stack) [03:04:24] allenj12: eg https://github.com/doublec/cf/blob/master/cf.cpp#L1205 [03:06:18] ahhh ok. its more clear now to me. im a c++ scrub but i think i can figure out the rest now [03:06:20] thank you [03:08:09] allenj12: have fun :) [03:08:29] thanks! [03:44:03] * MDude [MDude!~MDude@c-73-187-225-46.hsd1.pa.comcast.net] has quit (Ping timeout: 240 seconds). [03:54:55] * allenj12 [allenj12!~user@98.221.156.238] has quit (Read error: Connection reset by peer). [04:42:11] * tgunr [tgunr!~davec@cpe-76-173-83-160.hawaii.res.rr.com] has quit (Ping timeout: 240 seconds). [04:47:34] * tgunr [tgunr!~davec@cpe-76-173-83-160.hawaii.res.rr.com] has joined the channel. [04:52:34] * tgunr [tgunr!~davec@cpe-76-173-83-160.hawaii.res.rr.com] has quit (Read error: Connection reset by peer). [04:55:39] * tgunr [tgunr!~davec@cpe-76-173-83-160.hawaii.res.rr.com] has joined the channel. [05:07:29] * evincar [evincar!~jon@173-228-12-107.dsl.dynamic.fusionbroadband.com] has quit (Quit: leaving). [06:03:49] * FreeFull [FreeFull!~freefull@defocus/sausage-lover] has quit. [07:42:11] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has quit (Ping timeout: 240 seconds). [10:07:09] * rudha [rudha!~rudha@202.35.17.95.dynamic.jazztel.es] has joined the channel. [10:09:12] * jamtho [jamtho!~jamtho@host217-42-112-25.range217-42.btcentralplus.com] has joined the channel. [13:05:22] * jamtho [jamtho!~jamtho@host217-42-112-25.range217-42.btcentralplus.com] has quit (Read error: Connection reset by peer). [13:17:19] * rudha [rudha!~rudha@202.35.17.95.dynamic.jazztel.es] has quit (Quit: Leaving). [16:41:40] * FreeFull [FreeFull!~freefull@defocus/sausage-lover] has joined the channel. [16:45:05] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has joined the channel. [16:55:21] * MDude [MDude!~MDude@c-73-187-225-46.hsd1.pa.comcast.net] has joined the channel. [18:40:04] I am struggling to understand how works, looking at the tests and examples I don't understand how I can implement a word `tr' that I could define which would send a long sting of file content to the shell tr with arguments. I was thinking I could use to just call tr instead of defining one in Factor but it might be just easier to do so. [18:42:13] Along this line, there is a LOT of code without docs explaining what the code does and examples. I am guilty of it on my own code, but any code I share I would hope to have documented. [22:16:46] * allenj12 [allenj12!~user@98.221.156.238] has joined the channel. [22:36:49] * flogbot [flogbot!~flogbot@2001:4800:7814:0:2804:b05a:ff04:4ba7] has quit (Ping timeout: 246 seconds). [22:37:01] * flogbot [flogbot!~flogbot@2001:4800:7814:0:2804:b05a:ff04:4ba7] has joined the channel. [22:37:01] :leguin.freenode.net 353 flogbot = #concatenative :flogbot allenj12 MDude jtimon FreeFull tgunr rotty ephe_meral dustinm` jeaye Sgeo_ lonjil groovy2shoes mollerse rgrinberg flout carvite earl_ shachaf erg koisoke merry rjungemann doublec diginet m_hackerfoo hackerfoo strmpnk kanzure jeremyheiler bmp PiDelport shmibs otoburb puckipedia [22:37:01] :leguin.freenode.net 366 flogbot #concatenative :End of /NAMES list. [22:40:13] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has quit (Remote host closed the connection). [23:34:59] * Sonderblade [Sonderblade!~fack@h-52-183.A157.priv.bahnhof.se] has joined the channel.