|
I would argue that Forth doesn't have any grammar to speak of. It's just a string of words strewn together.
Would stream-of-consciousness language* be an appropriate name?
*) Name calling made with love: in another life I wrote a Forth interpreter for a PDP-11
Mircea
|
|
|
|
|
|
honey the codewitch wrote: What I'd really like is a language that allows one to augment the grammar, Extensible languages, bell-bottoms and polka dots were a thing in the 60-es. They didn't age too well
For your reading pleasure check this SPG language.
Mircea
|
|
|
|
|
There are all kinds of ways to skin that cat though, and the 1960s you had some severe limitations in terms of compilers due to the limited RAM and speed of computers in that era.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
And yet even though there are probably 100 new languages a year that actually make it into some sort of larger visibility there are none like that.
Which suggests to me at least that they just do not work.
In the same way that I have seen, several different times, people attempt to 'improve' C/C++ by adding clever macros that serve as nothing but attempts to do custom enhancements to the language. For example adding 'begin' and 'end' as substitutions for open/closing brackets.
|
|
|
|
|
I say, stop bloating the languages. Do the basics well, and use libraries for everything else. If you keep doing the same thing repeatedly, libraries are well suited for that purpose - do it once, wrap it up, and re-use it.
Otherwise you're just extending the language to suit your own needs, and everybody's needs are different - and that's what leads to bloat. Not only that, but you end up spending more time tinkering with the language extensions than the actual code and business logic. And not everybody can work at that level.
|
|
|
|
|
Seems like C# got bloated without really doing any of this.
is it really such a bad idea for example to do
public component Foo { // implements IComponent, IPropertyNotify, IDisposable etc
public Bar { get; set; } // generates OnBarChanged/BarChanged, etc
};
and save all of that code? You can't really make that into a library. At best you're using a C# Source Generator and some sort of input document.
or even
public entity Contact { // implements all of the data bound stuff
};
And if that's too much, what about simply the ability to extend the grammar via Source Generators so you could create or install these (as nuget packages) to extend the language as the project requires?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
What you describe is exactly why I think MSFT is on point with the "targetted models" approach to AI-assist in code.
|
|
|
|
|
Now that's interesting. It occurred to me that AI might be able to insert itself here with some benefit to the developer but I wouldn't know enough about it - having not even used CoPilot for example - to really say so this is news to me.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
That is what IDEs should help with.
They will write all of that boiler plate for you.
The new AI generators might help, too. I have not used them directly, but I have watched team mates flounder trying to have AI generate simple commands that I was able to find in the man page.
|
|
|
|
|
I mean, I think it would be better if the boilerplate didn't have to exist, if possible, simply because even if generated, it still creates a maintenance point.
If some of the boilerplate were baked in as language constructs, or if the language was extensible, you could eliminate that boilerplate at the last mile .i commented to some others here giving an example that a library couldn't solve in C#, but the IDE approach, while it would solve it and does, even with like Winforms tech and InitializeComponent(), now you have InitializeComponent() to maintain. Not the greatest example because it round trips from the designer but most of the time with most tools that's not the case.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
The product is expensive, but I haven't seen anything to compete with it, and I need the ability to sniff MODBUS commands and responses on a RS-485 bus, interpret them correctly, and save them to a log. This item looks like it will do the job, but it needs to be connected to a PC to perform. I'm thinking I can build or buy a single board computer small enough to be deployed in the field inside a weather-proof box for a week or two to search for missing commands or spurious ones. It would be very helpful to hear from previous users, though, before I embark on this course.
IO Ninja Hardware Manual (NHM)[^]
Will Rogers never met me.
|
|
|
|
|
I haven't, but they do have a forum which might be a good place to duplicate this request?
Home | IO Ninja Forum[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thanks! I'll spend some time surfing the forum!
Will Rogers never met me.
|
|
|
|
|
|
Interesting, but as with most MODBUS products, it wants to be either a Master or a Slave. I just need to log everything on the bus.
Will Rogers never met me.
|
|
|
|
|
|
Nice system! If I was working on developing devices it would be very helpful. But I need something I can hang in a cabinet in the field and let it run. I have a solar array (840 kW) connected to a battery (1 MW / 2 MWh), both controlled by a Site Controller. There have been some anomalous events over the past few months, and I suspect communications issues. With 14 inverters, three diesel generators and one big battery, it's hard to isolate which unit is having problems, especially when I can't get confirmation that the controller even sent the proper commands! Seriously, who would build a system controller that has no logging capability? I expected better of Tesla!
Will Rogers never met me.
|
|
|
|
|
You *could* in theory make one of these. I'm not sure what it costs, but if it's expensive and you're not sure you could produce one yourself with some work.
I made something similar, but it was simply for a basic serial UART, not RS-485.
i2cu Take Two: Serial and I2C Probe in a Handy Package[^]
You could adapt code like that using code like this:
GitHub - zivillian/esp32-modbus-gateway: ESP32 Modbus RTU/TCP Gateway[^]
Just a thought, even though it may not be realistic for you. I'd do it, but then I'm a bit crazy.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I was thinking something like passing it through a pi kind of akin to a proxy. Just echo the traffic out the other side.
A simple device to do only that might have market because splitting it means you could have the traffic sent to logging and the device, or maybe to a 'real device' and also a device under development/testing.
They build something like this in a pizza box rack mount style, though I don't recall what it was called. PC feeds all serial to it and it then feeds the serial wherever you configure/connect it.
|
|
|
|
|
I would use a realtime MCU rather than a Pi for that. I just don't trust what is essentially a tiny PC to have the regular latency to keep a clean, uninterrupted signal. It probably will, I'm just paranoid. Part of it too is I think an RPI would be overkill when a cheapo ESP32 could easily handle it.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Yeah, it'd definitely fail from what I get about all this. But temp diagnostic tool vs production component maybe?
Sounds like it'd be just plug it in and capture the broadcast packets and throw them on disk. At least that way failure just means losing the logging you had it doing.
|
|
|
|
|
There is no need to pass data through it at all. All that does is unnecessarily add another potential point of failure. This is RS-485 which is inherently multi-drop so it would be much better to have a listen-only device.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Ahh... broadcast to all on subnet... I hear.
|
|
|
|
|
If I had the time, I'd do it, too! There's never enough hours in the day...
Will Rogers never met me.
|
|
|
|