2024-05-23 01:43:56 veltas: on the other hand, destination on the right puts it closer to the mnemonic, which to me seems more intuitive. and it's more like forth conventions, like ! 2024-05-23 10:19:38 zelgomer: Yes but even in forth we accept minus should be reading order, even if that means more stack manipulation 2024-05-23 10:20:06 Whereas gas' reason for changing order isn't that smart, it's just 'we don't want intel's mov order so we are willing for sub / cmp to make no sense' 2024-05-23 10:20:25 I think I'll go with S-expr rather than Forth-like for me DSL... The post-notation is just too confusing for non-tech people, I think. 2024-05-23 10:20:29 post-fix* 2024-05-23 10:20:56 S-expr is a bad compromise for most DSLs 2024-05-23 10:21:01 web assembly messed up doing that 2024-05-23 10:21:11 There's a reason no compiler outputs 'web assembly' 2024-05-23 10:21:43 They all output some simple mnemonic mapping of the binary format instead 2024-05-23 10:21:50 i.e. assembly 2024-05-23 10:23:33 veltas: What's the alternative, if your lexer/parser must be hand-written in under 50 lines? 2024-05-23 10:23:48 Possibly regexp-based lexer. 2024-05-23 10:25:40 I thought about a tiny BASIC, but BASIC doesn't do structs in a proper fashin 2024-05-23 10:25:43 fasion 2024-05-23 10:25:50 At least I didn't find any good info on that 2024-05-23 10:26:07 S-expr can do structured data as well as expressions 2024-05-23 10:49:37 olle: Does it need to be recursive? 2024-05-23 10:49:52 What sort of thing are you representing 2024-05-23 10:50:20 A good option is the forth parser for many problems 2024-05-23 10:50:42 veltas: I'm representing structured data, and some SQL snippets (or parts), and some PHP snippets (or parts) 2024-05-23 10:50:46 So far... 2024-05-23 10:51:00 CSS too, but that's considered structured data. 2024-05-23 10:52:18 Can you be more specific about the structured data? 2024-05-23 10:52:35 Does the SQL need to be turned into an AST-style thing in the same syntax or is that just a 'string'? 2024-05-23 10:52:40 veltas: just key-value pairs, where value can be another structure 2024-05-23 10:53:07 SQL is NOT just a string, because I want it to be fully safe for customers and sales/support to edit ;) 2024-05-23 10:53:13 It's just quite often people think they need this recursive structure when they don't 2024-05-23 10:53:19 So a disciplined subset. 2024-05-23 10:53:24 I can't rule it out but it would help to know what sort of data you want 2024-05-23 10:53:32 Or is this a totally general solution 2024-05-23 10:54:18 veltas: https://old.reddit.com/r/ProgrammingLanguages/comments/1cwd5vm/creating_a_report_generating_dsl_understandable/ 2024-05-23 10:54:21 DSL for report generation :) 2024-05-23 10:54:35 Is that what you're implementing? 2024-05-23 10:54:46 Yep yep 2024-05-23 12:11:05 Might be controversial but if it's for 'semi-technical sales people' I would stick with infix 2024-05-23 12:11:31 The suggested forth syntax isn't ideal and I wouldn't bother with forth parsing unless it's a forth 2024-05-23 12:11:53 The s-expressions aren't much better either, the JSON is totally obfuscated 2024-05-23 12:12:53 Maybe look at awk for inspiration 2024-05-23 12:13:16 Possibly Rebol 2024-05-23 12:13:57 Rebol looks too hard 2024-05-23 12:17:54 Maybe use Lua, Lua was designed as a DSL-generating language for non-technical people 2024-05-23 12:21:53 https://www.lua.org/history.html 2024-05-23 12:23:00 If you control the eval environment then you can keep their input query safe 2024-05-23 12:44:13 veltas: Ye, the infix version would be a BASIC, then. 2024-05-23 12:44:20 I can ask LLV to write a lexer/parser 2024-05-23 12:44:30 BUT - I'd have to translate a BASIC AST to SQL... 2024-05-23 12:44:37 That's a bit easier when it's already in S-expr format 2024-05-23 12:44:49 Can't run Lua from PHP 2024-05-23 12:44:53 And it's overkill 2024-05-23 12:46:16 Perhaps one of the super-early versions of Lua :D But that's just BASIC, then. 2024-05-23 12:49:56 Nice link tho, fun to read about the history 2024-05-23 13:06:47 That historical design info is incredibly helpful, even if you're going to write a BASIC 2024-05-23 13:06:56 That's pretty much what they did 2024-05-23 13:07:04 Yea! 2024-05-23 13:07:05 Maybe consider looking at lua 1.0 2024-05-23 13:07:18 Just understanding the design a little might help 2024-05-23 13:12:14 Sure 2024-05-23 13:13:42 But also lua 1.0 is probably a lot smaller than Lua 5.4 2024-05-23 13:16:19 Something like this is probably easiest https://evileval.sourceforge.net/?q=restrictions 2024-05-23 13:18:14 eval eh? Nah, too hard to filter string 2024-05-23 13:18:26 But PHP does have a native function to get tokens from a PHP src string 2024-05-23 13:18:31 I did consider that 2024-05-23 13:24:55 olle: That's a class for doing 'safer' eval 2024-05-23 13:25:14 If you restrict env to just a few vars containing current records etc can probably let them write the expression in PHP 2024-05-23 13:25:32 It looks like it can be configured for that maybe 2024-05-23 13:25:35 Just an option 2024-05-23 13:28:02 Mm 2024-05-23 13:30:40 Also writing your own expression evaluator with infix/precedence is probably easier than writing a BASIC 2024-05-23 13:30:55 Bear in mind 2024-05-23 13:31:38 See https://en.wikipedia.org/wiki/Shunting_yard_algorithm if you've not heard of it 2024-05-23 13:59:52 Cool cool, didn't know :) 2024-05-23 14:01:44 Trains are cool 2024-05-23 14:16:32 Also true :D 2024-05-23 14:24:33 veltas: thanks. i find your gas argument uncompelling (they didn't invent the syntax, btw), but your point about - gives me something to ponder 2024-05-23 14:50:24 Well whoever ported as and forced the backwards syntax on x86 made a bad decision IMO 2024-05-23 14:50:40 Should match the arch manual and e.g. SUB is wrong way round 2024-05-23 14:50:54 Just makes bare metal stuff harder, I'm sure compiler writers don't care 2024-05-23 14:51:24 But endless source of pointless arguments I'm sure, not much more to say about it 2024-05-23 14:55:55 i just don't find it that hard to switch between the two 2024-05-23 15:24:45 sub/cmp are the painful points 2024-05-23 15:24:49 Otherwise I don't find it hard 2024-05-23 15:25:27 I don't find it hard even it's just one of those issues that's avoidable and yet someone 'knew better' 2024-05-23 16:08:30 Hm... tabemann I just got an email back from Dennis (My4th guy) - they say actually I2C should be seen as simpler... Now I'm conflicted! lol 2024-05-23 16:49:21 Simpler than what? 2024-05-23 17:05:39 Simpler than some alternative serial protocol, maybe? 2024-05-23 17:07:40 Simpler than SPI, sorry! 2024-05-23 17:08:00 tabemann and I had talked about SPI vs I2C a couple weeks back, shouldve mentioned it for others in that sentence 2024-05-23 17:08:10 I was trying to communicate with an I2C dispaly 2024-05-23 17:08:48 I think I need to study I2C drivers in forth 2024-05-23 17:24:19 lf94: Nah it's not simpler than SPI 2024-05-23 17:25:05 SPI is dirt simple and reliable but I2C has less signals 2024-05-23 17:27:10 I dunno man I really trust Dennis's opinion on this, considering he built a CPU 2024-05-23 17:34:34 Well, SPI is a single master protocol, whereas I2C is multi-master (potentially). SPI uses more wires. So it really probably depends on how you compare them. 2024-05-23 17:34:41 I2C is more noise immune, which is nice. 2024-05-23 17:35:08 I2C is half duplex only, isn't it? 2024-05-23 17:35:51 Also slaves can clock-stretch in I2C, iirc. 2024-05-23 17:36:38 I2C is higher power, generally, but cheaper. 2024-05-23 17:44:16 I guess I regard I2C as "more primitive," from a hardware perspective. I don't know what that means for "what to adopt first" though. 2024-05-23 18:33:58 i2c is definitely more complex than spi, just by addressing alone 2024-05-23 18:34:57 it depends on what "complex" and "simple" mean, i guess. spi is simpler in concept and implementation, not so much for trace routing, i guess 2024-05-23 18:35:18 i2c obviously scales better for the same reason 2024-05-23 18:36:15 lf94: you have to be able to form your own opinions and not only defer to authority 2024-05-23 18:36:25 I'm looking to teachers first. 2024-05-23 18:36:29 You are all my teachers 2024-05-23 18:36:43 But Dennis seems to be a hella experienced teacher, so his opinion is weighing heavily on me 2024-05-23 18:39:41 ACTION will not accept Your Compliment ;=P 2024-05-23 18:40:26 The Forth Deck sure looks interesting ^^ 2024-05-23 18:44:55 APic: you Dennis? :p 2024-05-23 18:45:14 ACTION hopes not. 2024-05-23 18:49:32 Are you referring to Dennis Ritchie? 2024-05-23 18:51:50 I think the reference is to the guy behind the My4th machine. 2024-05-23 18:53:57 Yes exactly, the maker of My4th :) 2024-05-23 18:57:34 Ah, ok. 2024-05-23 18:58:20 I was just going to note that while Dennis Ritchie is obviously awesome, I don't knwo that I'd put him at the top of my "hardware" advisor list. I'm sure he knows plenty, but his real focus is in other areas. 2024-05-23 18:58:44 Also, he's dead :| 2024-05-23 18:59:01 Maybe I talk to him in my sleep, in the heavens 2024-05-23 18:59:08 Well, right, but he's left a legacy of materials. I didn't catch on a direct conversation was involved. 2024-05-23 18:59:16 But yeah - that would be... an accomplishment. 2024-05-23 18:59:52 There used to be a guy that hung out in a channel I frequented who actually believed he talked regularly with the spirit of Nikola Tesla. 2024-05-23 18:59:59 This fellow was regularly "off his meds." 2024-05-23 19:00:11 tesla was, also, off his meds later in life 2024-05-23 19:00:25 I really worried we'd stop hearing from him at some point, and then hear on the news there's been some kind of bombing or something in the Boston area. 2024-05-23 19:00:53 Yeah, he kind of was. 2024-05-23 19:01:21 It's really weird how he's been made a "poster boy" for conspiracy theories and stuff these days. 2024-05-23 19:02:13 what now? 2024-05-23 19:02:49 Oh, there's a crowd that believes "free energy" technology built on Tesla's ideas is being suppressed by "powers that be" (Big Oil and so on). 2024-05-23 19:03:14 free energy? 2024-05-23 19:03:24 ACTION looks in Suns direction 2024-05-23 19:03:25 Energy from the vacuum - zero point energy, etc. 2024-05-23 19:03:27 yes? 2024-05-23 19:03:51 Something along the lines of tapping energy from the earths crust the air (aether) and wireless transmission of lots of energy - that kinda stuff 2024-05-23 19:03:57 I try to point out to people that "zero point" energy is the lowest possible energy state of a system, therefore by definition you can't extract any of it. 2024-05-23 19:04:05 There's no lower energy state for the system to fall down to. 2024-05-23 19:04:15 oh, that. No you need [REDACTED] and possibly [EXPUNGED] for that 2024-05-23 19:04:24 :-) 2024-05-23 19:05:23 naah, what Nikolai Tesla was about was wireless energy transmission and such 2024-05-23 19:05:43 The same bunch thinks that Tesla actually did know how to send "significant power" through the atmosphere to remote parts of the world, and that that is also being suppressed. He did THINK ABOUT such a thing, but it was based on an erroneou belief commonly held in those days that the ionosphere was as conductive as copper or other such metals. 2024-05-23 19:06:08 you know radio. But it turned out he over estimated how much can be transfered and how distant 2024-05-23 19:06:14 Exactly. 2024-05-23 19:06:38 And how efficiently. 2024-05-23 19:08:12 but who is this 'poster boy for conspiracy theory' guy ya were meantioning? 2024-05-23 19:08:41 Oh, this crowd of people treat Tesla like a hero of some sort. 2024-05-23 19:09:03 They view all of this s stuff that Tesla figured out, but has gotten covered up by powerful economic interests. 2024-05-23 19:09:16 oh, right. The posthumus cult of person 2024-05-23 19:09:25 Yeah. 2024-05-23 19:10:03 seen that around Ayn Rand and Karl Marx. Annoying as hell. 2024-05-23 19:10:22 I mean, I don't want to CRITICIZE Tesla - he was obviously a brilliant guy. But he was just wrong about some things, and he was one of many distinguised people working in that area, which was brand new at the time. 2024-05-23 19:10:41 And since then I don't know how many millions of man hours of research has been sunk into electromagnetic theory - we have not overlooked some amazing "secret feature." 2024-05-23 19:11:05 It would be like having it turn out that there's a diamond mine in Central Park New York that "no one has noticed" until now. 2024-05-23 19:11:37 We've pretty much beaten EM theory to death at this point. 2024-05-23 19:12:28 talking about physics, one big pet peeve of mine is that some folks insists that gravity has a force carrier particle 2024-05-23 19:13:05 instead of folks actually think what bent space means 2024-05-23 19:17:03 heck I think I have a gist somewhere on what I suspect is actually going on 2024-05-23 19:28:02 Yeah - we really don't know yet if gravity can be quantized. No one's managed it so far. 2024-05-23 19:28:38 I think you misunderstand me here. 2024-05-23 19:28:52 Definitely possible. 2024-05-23 19:29:11 We know that time can be quantized down to the planck second 2024-05-23 19:29:13 I took you to mean that you do NOT think gravity is a quantum theory (that's what would require there to be a graviton). 2024-05-23 19:29:38 Not really - we don't know that that's actually a "quantum" of time. We just know that we'll never be able to observe smaller scales than that. 2024-05-23 19:29:39 same with space, down to planck length 2024-05-23 19:30:40 Same, yes - we just don't KNOW the nature of space and time at smaller scales than that, and since we can't study those scales we never will. 2024-05-23 19:30:41 We can't study them EVEN IN THEORY. 2024-05-23 19:31:03 So there's no way to talk about those smaller scales in a scientific way, since we can't bring experimental validation to bear. 2024-05-23 19:31:20 We'll forever be "speculating." 2024-05-23 19:32:04 so my hypothesis boils down to that gravity is an emergent property of how planck scale 'cells' of space are connected graph bias wise 2024-05-23 19:32:27 The problem is that to study something small you have to use "light" with a wavelength no bigger than that. And you must use at least one photon of light. A photon of light with wavelength equal to the Planck length would contain so much energy that when you shoved it into a Planck volume you'll create a black hole. 2024-05-23 19:32:35 And then no information can escape to reach you. 2024-05-23 19:33:10 you need a info carrying particle, does not need to be photon though 2024-05-23 19:33:21 So I have no opinion as to the nature of things at that scale. 2024-05-23 19:33:46 You may be totally right, but we'll never be able to prove it. 2024-05-23 19:34:00 There is also some interesting recent work connecting gravity to entropy. 2024-05-23 19:34:07 I don't know it well enough to describe it. 2024-05-23 19:34:28 Very new, and not "accepted" yet, but not rejected either. 2024-05-23 19:35:07 in my hypothesis an idea that the 'link ends' betwixt these 'cells' could move around 2024-05-23 19:36:43 and some of the 'spooky action at a distance' isnt because of a ?rarely? used 'link' carrying the causality carrying particle 2024-05-23 19:43:45 I think space itself (and probably also the "coordinate" aspect of time that goes with space to get spacetime) is itself an emergent thing. It's a reflection of relationships that "stuff" has with other "stuff." 2024-05-23 19:43:59 Details here: https://arxiv.org/abs/1810.06981 2024-05-23 19:44:19 But time also has a "proper time" aspect, and I think that's likely fundamental. 2024-05-23 19:44:44 You don't have to involve spacetime with defining and describing quantum fields. 2024-05-23 19:44:50 probably, I only used 'cells' and 'links' as aids to try to explain the hypothesis 2024-05-23 19:45:23 Right. That absolutely could still be a valid way to describe space. 2024-05-23 19:46:19 https://gist.github.com/zarutian/8fcdfcd16f460693d56bdcdb878ed784 is the gist btw 2024-05-23 19:46:55 plucked from a Signal chat were I was describing it 2024-05-23 19:48:33 I also have probably described this hypothesis here (this channel) in more detail so it might be in the logs of the channel 2024-05-23 19:49:35 I recall, I think. Not the details, but yeah, it would be in the log. 2024-05-23 19:50:21 I quite like that paper I linked - in my opinion he connects quantum and classical pictures quite well, which is normally said to be impossible. 2024-05-23 19:50:25 I been asked recently to actually start a weblog about the various stuff I ponder about 2024-05-23 19:50:33 I think he does it by NOT assuming the pre-existence of space as some sort of "container." 2024-05-23 19:50:51 Oh, you should. 2024-05-23 19:51:09 I have a "space" on Quora that I sometimes put musings in. 2024-05-23 19:51:17 Just sort of whatever crosses my mind. 2024-05-23 19:52:57 My wife tells me from time to time I should do a YouTube channel, but I really don't know about that - I've never really felt like a "speaker." I'm a lot more comfortable in a written medium. 2024-05-23 19:53:10 just the other day I was pondering on emergent behaviour, gene regulation and expression, protnomics and such. 2024-05-23 19:53:48 protonomics* 2024-05-23 19:55:38 in DNA there are promotor regions, tata boxes (where transcriptase attaches) and a place where exitory and inhibitory transcription factors attach 2024-05-23 19:57:16 a bit like an conditional conjunction (basically an AND) of an if statement or event reactor 2024-05-23 19:58:39 now if the particular condition is met then transcriptase is off and starts making a RNA copy of the stuff 'after' the 'conditional' 2024-05-23 20:00:20 some of that RNA is messaenger RNA and some of it is ?micro or mini? RNA that can have other function other than just carrying coding sequence of a protein 2024-05-23 20:01:57 heck one 'region' after a 'conditional' can code for more than one protein and functional/regulating RNA 2024-05-23 20:05:08 and here is a curious part I learned recently. mRNA not only has the protein coding but also sort of tail that gets shorter every time a ribosome uses it. Effectively giving the mRNA a time-to-live down counter 2024-05-23 20:05:52 this tail prevents an RNA digesting enzyme from breaking it down too early 2024-05-23 20:07:07 but there is even a recent discovery that mRNA can also be regulated via uRNA that snips that tail off of spefic mRNA. 2024-05-23 20:08:10 fascinating as hell and worth looking at just to find good ideas to 'steal' from nature. 2024-05-23 20:09:05 for instance one could use a tuple or linda space with certain tuples 'eating' other spefic matching tuples 2024-05-23 20:09:59 also the whole CRISPR and Cas9 system and its derevitives are nifty 2024-05-23 20:10:37 and I have mentioned dna origami and its lego or brick version too 2024-05-23 20:12:52 kudos to anyone who manages to implement an dual stack machine using dna brick origami. You are allowed to use base units whose sugar backbone molecule has an entire protein or RNAein as a chemical side group 2024-05-23 20:26:09 Ok, you've just stepped well outside my "dmain of familiarity." Sounds fascinating, though. 2024-05-23 20:26:37 I really ought to bone up some on genetics - I think it's going to be the "next big thing," maybe as big as the electonics revolution. 2024-05-23 20:30:41 https://michaelfranzl.github.io/webAGC/demo/?fbclid=IwZXh0bgNhZW0CMTAAAR3SBf9fzzPXP3uD9NcRRLod9hLH_DLx3GBgnBEPN89guVOE8kZcn03Fzh4_aem_AULAJEzPIa1u2nbrCaptkGTl9wpnCtcnXbebsQRUezH5Vn-2FQ2gRIWvQSCd2IiX9w32sWu6mdOmeB20u4nE9B37 2024-05-23 20:30:42 https://www.youtube.com/watch?v=2hf9yN-oBV4 2024-05-23 20:30:56 "I Grew Real Spider Silk Using Yeast" 2024-05-23 20:34:56 sounds like spiders are the yeast of your worries 2024-05-23 20:35:03 lf94: I am not a teacher, I work primarily on IPMI firmware at an OEM in the real world, for which the primary bus is built on multiple-master I2C, and for which it relies on I2C for most sensor chips, I wrote our multi-master I2C driver for this, debugged all kinds of I2C issues and race conditions, have seen how I2C's lack of robustness locks up the bus; 2024-05-23 20:35:08 I can imagine the point he's trying to make but I can throw my weight around a bit here 2024-05-23 20:35:18 :-) Yeast is awesome. I cultured my on yeast for a while back when I did a fair bit of beer brewing. 2024-05-23 20:35:48 lf94: Regardless even a novice can see I2C is more complicated than SPI 2024-05-23 20:37:42 like i said, depends on what "simple" means to the person and in the context. if you want a hundred peripherals and start introducting a bunch of chip select muxes or something, i could see how someone might look at that and say "you know i2c would have been a lot simpler here" 2024-05-23 20:38:18 Grass is always greener on the other side 2024-05-23 20:38:51 Rare to have 'hundred' peripherals and you're probably going to struggle to select 100 chips that can be configured to 100 different addresses with limited strapping options 2024-05-23 20:39:07 of course i was being hyperbolic :) 2024-05-23 20:39:13 Sorry 2024-05-23 20:39:28 All it takes is one or two bad chips to fuck it all up royally, unfortunately with 'many' chips I'd expect quite a lot to misbehave in different ways 2024-05-23 20:39:58 that's true, too. spi would certainly be more robust and simpler to troubleshoot. 2024-05-23 20:40:24 It doesn't help there's afaik no I2C certification, and even then the bus is inherently not robust, e.g. any detectable noise locks up the bus immediately. Lots of noobs don't know about how to flush the bus, most I2C controller IPs don't let you do this manually so hope you can reconfigure as GPIO to do that 2024-05-23 20:40:29 etc 2024-05-23 20:40:59 SPI is a simpler protocol digitally and in most senses, I2C is the superior solution 'when it works', but there are costs there 2024-05-23 20:43:11 and spi was/is implemented as a parallel in/out serial ou/in register(s) 2024-05-23 21:04:38 Great stuff guys. Thank you. 2024-05-23 23:44:20 One other nice thing about I2C is that it's naturally non-destructive, since it uses an open drain system. You can't damage anything while you're getting your protocol squared away. 2024-05-23 23:51:00 But you pay a price for that in performance - the low-to-high transition is just drive by a resistor, and it's usually slower. 2024-05-23 23:51:21 The data line will "snap" high to low, but then just kind of eases back up low-to-high. 2024-05-23 23:58:38 https://www.ti.com/lit/an/sbaa565/sbaa565.pdf