2024-08-20 15:20:29 i have an important choice to make 2024-08-20 15:20:33 upper or lowercase forth 2024-08-20 15:40:45 amby: either way, you could always $20 XOR each letter that offends your style preference? 2024-08-20 15:53:20 Personally I'd use lowercase, but while talking about forth I prefer using uppercase to emphasize that I'm speaking about a word. 2024-08-20 15:54:26 Maybe it's a good time to use some APL symbols :) 2024-08-20 15:58:09 maybe base the entire character set on a collection of your favourite road signs 2024-08-20 15:59:00 https://archive.org/details/symbolsourcebook00drey/ 2024-08-20 16:00:55 uppercase but the reader automatically upcases by default 2024-08-20 17:00:35 ACTION team lowercase 2024-08-20 17:01:17 iirc the first forth i ever wrote was case insensitive. i think that's a mistake, though, because if forces you to remember to use case-insensitive grep. 2024-08-20 18:00:27 Case sensitive, lower case. Anything else is objectively terrible, and I won't hear anything different, including libel that I do not understand what objectivity means. 2024-08-20 19:24:01 I use case sensitive, lower case for most words, though I typically use uppercase for constants and title case for variable names 2024-08-20 19:26:16 another is to use These_Words for global variables, which may not make sense in forth 2024-08-20 19:33:54 I prefer to use - over _ in names, but that's largely due to my use of _ in strings 2024-08-20 19:35:25 - is more lispy, and _ more C-y 2024-08-20 19:36:33 case-insensitive programming in an artefact of pre-ASCII typewriters that were everywhere when Forth started 2024-08-20 19:36:47 teletypes* I mena 2024-08-20 19:36:53 is* an 2024-08-20 19:37:39 veltas: in my case, it was an artifact of "i read that ada is case-insensitive and it sounds like a good idea, i'm going to do that, too" 2024-08-20 19:38:02 It's fundamentally unsafe if you use it with camelcase 2024-08-20 19:38:15 CamelCase I should say 2024-08-20 19:38:49 true but anyone using CamelCase voluntarily should feel ashamed, anyway 2024-08-20 19:38:58 ACTION walks away disheveled 2024-08-20 19:40:32 - versus _: i use - in forth, but i encountered a situation where i've considered using _. i was doing some vocabulary shenanigans to create a context where you couldn't use "forth definitions" to get back to the forth context, so i create a private ": forth-definitions forth definitions ;" to give myself a way out. i've thought about going back and changing that to "forth_definitions" because it should 2024-08-20 19:40:38 actually read as two words. 2024-08-20 19:44:36 In filenames I use - as a hyphen, and _ as the word separator 2024-08-20 19:45:09 In Forth - is obviously preferred convention, but you could argue it's not a very good one because - actually has a mathematical/logical use 2024-08-20 19:47:16 With Unicode, there are many dash characters although they're not as easy to type on a standard keyboard 2024-08-20 19:50:36 And again, _ isn't used in Forth much because it wasn't on an ASR-33 2024-08-20 19:51:55 ACTION does use CamelCase in compound variable names 2024-08-20 19:52:02 Oh wait maybe I'm wrong about underscore 2024-08-20 19:52:12 Might have been present in TTY 33 anyway 2024-08-20 19:56:33 I use CamelCase because it looks less weird if you already want capitals to start type names, and it saves horizontal room 2024-08-20 19:56:43 And I am very used to it, as a style 2024-08-20 19:57:12 crc how dare you 2024-08-20 19:57:31 And also because I use underscore to separate 'namespaces' if I'm doing pretend namespaces in C 2024-08-20 19:57:33 https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys 2024-08-20 19:57:39 :0 you too veltas :/ 2024-08-20 19:57:50 My kid's got to eat :P 2024-08-20 19:58:10 In Forth I use GLORIOUS-TTY-33-NAMES 2024-08-20 19:59:58 I like how it tries to sell you a shirt 2024-08-20 20:12:34 CamelCase is an artifact of Smalltalk using ASCII-1963, which didn't have `_`; instead it had `←`, which Smalltalk used for the assignment operator 2024-08-20 20:14:23 https://kbd.news/pic/article/1274/teletype-model-33-top.jpg seems to show ↑ and ← rather than | and _ but they're on the ctrl-N and ctrl-O keys 2024-08-20 20:15:53 uh, rather than ^ and _ 2024-08-20 20:16:16 however, N is 0x4E, ^ is 0x5E, O is 0x4F, and _ is 0x5F 2024-08-20 20:16:36 so I think that's pretty clearly an ASCII-1963 mapping of the ^ and _ code points 2024-08-20 20:17:53 probaBlyNeedAnIDEtoGuessWhereTheBumpsgo 2024-08-20 20:18:45 I just hate camel case 2024-08-20 20:18:53 it makes me cry 2024-08-20 20:19:11 I like the.vms.case 2024-08-20 20:19:21 and the kebab case 2024-08-20 20:19:30 thrig actually points out one of my gripes with it. nobody knows how to do it right. that should be NeedAnIde. 2024-08-20 20:20:33 well, Smalltalk is also noted for its IDE 2024-08-20 20:20:35 http://forth.works/share/P7xRGR7VI6.txt are the general naming guidelines I use in my systems 2024-08-20 20:21:08 also the ASR-33 teletype was introduced in 01963, so it would be surprising if it implemented ASCII-1967 rather than ASCII-1963 2024-08-20 20:22:37 GeDaMo: the terminak emulator I wrote emulates an ADM-3A: https://gitlab.com/kragen/bubbleos/blob/master/yeso/admu.c 2024-08-20 20:23:15 crc: I noticed that in your translation of my miniroguelike you had !varname and @varname 2024-08-20 20:23:36 what happens in RetroForth if varname occurs without a leading sigil? 2024-08-20 20:24:41 the nuclear missiles launch 2024-08-20 20:24:44 vms14: are you sure you don't mean the$vms$case? 2024-08-20 20:25:05 in RetroForth, the address is left on the stack 2024-08-20 20:25:45 xentrac: i like that because it implies prosperity 2024-08-20 20:25:48 aha, so varname @ is the same as @varname? 2024-08-20 20:26:00 in Konilo, the system would probably crash (or restart, depending on the vm used) 2024-08-20 20:26:07 zelgomer: you're going to enjoy playing http://canonical.org/~kragen/sw/dev3/wmaze.fs then 2024-08-20 20:26:08 xentrac: yes 2024-08-20 20:26:42 lol 2024-08-20 20:27:01 zelgomer: I've definitely seen the upwards arrow instead of caret about 2024-08-20 20:27:21 xentrac no idea where it comes from, the.vms.case was invented by me, because no one is as stupid as me to use dots to combine words 2024-08-20 20:27:34 oh, people do that routinely in R 2024-08-20 20:27:40 Sorry that was meant for xentrac 2024-08-20 20:27:44 (in my konilo system, to get the address, the & sigil must be used; there's not actually a code body associated with the variable in this case) 2024-08-20 20:27:55 but I prefer them because they visually add very little annoyance compared to others 2024-08-20 20:28:13 and it's the closest thing I see to a space 2024-08-20 20:28:20 vms14: like, if you want to find out if x is null, you say is.null(x) 2024-08-20 20:28:30 in R 2024-08-20 20:28:33 you.can.read.lots.of.text.this.way.without.much.effort 2024-08-20 20:28:37 crc: aha, I see 2024-08-20 20:28:59 I pretty commonly use . to separate words in web search engine query strings I type on the Unix command line 2024-08-20 20:29:27 it's easier to type ytsearch:rain.of.blood than ytsearch:'rain of blood' or ytsearch:rain\ of\ blood 2024-08-20 20:30:46 crc: it's interesting that you chose to have some words with no cfa 2024-08-20 20:30:46 does it make konilo simpler? 2024-08-20 20:31:05 veltas: long names are reasonably common in Emacs 2024-08-20 20:31:21 Emacs is not a good programming language 2024-08-20 22:26:26 https://algorithmica.org/en/eytzinger 2024-08-20 22:27:50 Ah yes when they said cache locality I immediately thought of the in-array heap layout 2024-08-20 22:28:29 Always full of interesting papers GeDaMo 2024-08-20 22:28:44 :) 2024-08-20 22:39:05 You'd think a B-tree with nodes occupying a cache line would work well 2024-08-20 22:47:24 yeah, and maybe with compressed pointers? 2024-08-20 22:50:51 like, if you have an array of 64-byte cache lines (the size on my CPU) indexed with 16-bit indices, you can have up to 65536 of them on a given B-tree tier, which works out to 4 mebibytes on the bottom tier 2024-08-20 22:51:32 and the B-tree nodes on higher tiers can hold up to 32 such indices 2024-08-20 22:53:28 probably the 33 B-tree nodes of the top two tiers (2112 bytes) will be in your L1 cache almost all the time, so it's only the 1024-node third tier that starts requiring cache misses 2024-08-20 22:56:21 Another good point 2024-08-20 22:58:13 Run an 8 or 16 bit VM and we're talking 2024-08-20 22:58:32 Implement pipelining/prediction etc with AVX 2024-08-20 22:58:40 Trivial really (no I am kidding lol) 2024-08-20 23:07:56 haha 2024-08-20 23:09:45 I guess your branching factor suffers if you want to make a B+-tree or a B*-tree with keys stored in those nodes 2024-08-20 23:10:34 Swings and roundabouts 2024-08-20 23:26:42 I think a hash table still inevitably ends up being requiring less cache misses than the B-tree after we get beyond a few thousand entries