4 ms·
Ugh, for 1,5 months I've been trying to find a way to duplicate flow based programming in c# ( like node-red does). If anyone has some ideas on how to create th
by NicoJuicy 8y ago
Ugh, for 1,5 months I've been trying to find a way to duplicate flow based programming in c# ( like node-red does). If anyone has some ideas on how to create the "engine", please contact me..
Tried everything I can think of. Currently, not much luck.
- mamcx 8y agoYou mean, visually? or conceptually? Visually is more complex, you need to build a UI. But the concept, that can be done with a DSL, combining the concatenate/stack/tacit programming paradigms. How much nice, depend in what you want...
- 0815test 8y agoHaskell seems to support the flow-based-approach quite well, 'conceptually'. And I'm not sure that it can be done effectively and intuitively without the first-class-functions, lazy-evaluation, strong typing, etc. that Haskell provides.
- NicoJuicy 8y agoVisually is kinda easy. There are a lot of UI tools for that on Github. The concept, can't be done in a DSL. Because node-red makes exceptionally well use of the dynamic programming paradigm ( and with the optional payload property). Just converting it to a Dictionary<string,object> when it enters || exits a node doesn't seem enough. + A huge performance drain
- mamcx 8y agoHow you think > dynamic programming paradigm is implemented? With something like Dictionary<string,object>. Yep, exist some tricks you can apply, but to make things "dynamic" you will need to use something like that. C# have the buildings blocks for make something like that, like the Expando object and the whole meta programming. However, a custom interpreter could be best. P.D: I'm implementing a custom programming language, and research about it a lot. BTW, the use of hash maps with a decent hash function will not be necessarily the bottleneck...
- NicoJuicy 8y ago> Because node-red makes exceptionally well use of the dynamic programming paradigm Because of flexibility around the payload/context property. I can map anything generic through abstracts and T1,T2,... In c#, but it's not enough Not sure about anything use related. Or I need to reduce the flexibility that I wanted before and look to the mapped properties only and ignore the rest. Which would be a lot easier
- mpweiher 8y agoAround 20 years ago, I wanted to figure out what the simplest "Unix-pipes-and-filters" equivalent was that I could come up with using OO. What I came up with (in Objective-C) was a 'filter' that has two things: 1. A single -writeObject: message it responds to that takes a single object argument. 2. a 'target' property that also responds to -writeObject: That was it. Is it the same as "flow-based" programming? Certainly not at present, simply because I haven't needed various bits of "full flow". On the other hand, it's been up to every task in that general domain I've thrown at it. What's nice is that it is first order, has named/reusable components, is super-simple, debuggable and can even integrate actual Unix filters smoothly. ¯\_(ツ)_/¯ https://github.com/mpw/MPWFoundation/blob/master/Documentation/Streams.md https://github.com/mpw/MPWFoundation/blob/master/Documentati...
- NicoJuicy 8y agoWell, node-red has a flowcontext, nodecontext and a globalcontext. I can't integrate that with pure text... Thought about it though.
- zeckalpha 8y agoI think you're looking for https://docs.microsoft.com/en-us/previous-versions/dotnet/reactive-extensions/hh242985(v=vs.103) https://docs.microsoft.com/en-us/previous-versions/dotnet/re...
- NicoJuicy 8y agoI came across of it, but it didn't seemed usefull for it. I will check it out again, thx
- dukoid 8y agoI'd recommend to write up what you have tried and what your concrete problems are on stack overflow and to post the link here. There are some quite interesting problems with representation, when to trigger, how to queue up data, how to handle recursion etc.