• (disco) in reply to RaceProUK
    RaceProUK:
    Yen:
    Now do that in C.
    Which is likely what LV is implemented in.

    You can make a paintbrush using a chisel, but good luck using that chisel to paint the Mona Lisa. The point isn't that C is a bad language. It's not. dse was complaining specifically about math in LV, so I just brought up a counter example showing how math can be made more readable in LV. I would still be interested to know how @accalia would embed something like that into the C# code.

    LV as a compiler/IDE is probably written in a combination of mostly C and C++, with a bunch of DLLs, LV code and a bit of assembler, but I am not privy to the internal details. I can only directly see the parts which are DLLs (probably made in C) and the parts which are written in LV itself.

  • (disco) in reply to Yen
    Yen:
    I would still be interested to know how @accalia would embed something like that into the C# code.

    WCF Workflow.

    easy.

    it would take me longer than half an hour to do, but i could totes do it.

  • (disco) in reply to accalia
    accalia:
    okay, now open up that control's vi. I want to see how it's built. because i expect i have some image memes that would apply

    I have no idea what the code to generate this looks like. As he said, it was written as an experiment during his free time, so I wouldn't expect it to be the cleanest, but I haven't looked at the actual code in years.

    If you're talking about the actual LV code for the calculations, there are several examples in his document and videos, like this one:

    https://decibel.ni.com/content/servlet/JiveServlet/downloadImage/102-13859-9-15366/620-259/MICtoVI.png

    accalia:
    Yen:
    I would still be interested to know how @accalia would embed something like that into the C# code.

    WCF Workflow.

    easy.

    it would take me longer than half an hour to do, but i could totes do it.

    I'm not a .NET programmer, so I'm not familiar with those. I'm curious, what would something like that actually look like in your code? How would you integrate graphical representations of equations into your code? I didn't manage to understand that from the three minutes I took for reading about them.

  • (disco) in reply to Yen
    Yen:
    I'm curious, what would something like that actually look like in your code?

    more or less like LV actually, that's rather what WCF workflow is.

    here's a basic tutorial. http://www.codeproject.com/Articles/95418/Building-and-Testing-a-WCF-Web-Service-Using-Workf

    the difference between LV and WCF Workflow is that the code behind is in C# and not another layer of labview.

    I'm not arguing that you cannot do impressive things in LabView, you can. I'm arguing that it's a terrible programming language, and here are just a few of the reasons why:

    • It is, as far as i can tell, impossible to open the labview IDE on a machine with less than 4GB of RAM, and it is painfully slow to use on any machine i've tried that had less than 8GB.
    • It is incredibly easy to make literal spaghetii code.
    • the The IDE includes no less than FIVE DIFFERENT CONTROLLS FOR ENTERING A NUMBER IN A RANGE!.
    • i'm serious here. there's the text box, and the slidey bar that you click and drag, then there's the slidy bar with the text display so you can see what number you entered. then there's the continuous knob that you click on then move the cursor in a circle to set it as if you were actually twisting the knob! then there's the clicky knob that's like the continuous knob but clicks through set points rather than bing a continuous selector.
    • Sub vi's.... you have to open another window (that takes a good minute to open, even on the good i5 machine we have at robotics) to access the sub VI
    • embedded vi's, certain controlls act like a flip book sort of thing so you have multiple little embedded vi's in the same spot on your diagram and you have to tunnel wites into them through to the correct "page" and you can't have more than one open page at a time so you can't refer between them.

    and perhaps to me the worst (not counting the fact that AFAIK there is no debugger)

    • the language was started as a tool for wiring virtual test benches, that's why there are five controls for selecting numbers! because they were duplicating physical test benches and the wiring of them to virtualize the EE test benches.
    • Lab View was not a programming language, it was a virtual wiring tool that evolved into a programming environment.
  • (disco) in reply to accalia
    accalia:
    It is, as far as i can tell, impossible to open the labview IDE on a machine with less than 4GB of RAM, and it is painfully slow to use on any machine i've tried that had less than 8GB.

    It's written in Eclipse?

  • (disco) in reply to dkf
    dkf:
    accalia:
    It is, as far as i can tell, impossible to open the labview IDE on a machine with less than 4GB of RAM, and it is painfully slow to use on any machine i've tried that had less than 8GB.

    It's written in Eclipse?

    OI! eclipse at least can open and run on machines with as little as 1GB or RAM.

    true it isn['t remotely happy with it and really wants the full 8GB, btu at least it CAN run on the 1GB machine

  • (disco) in reply to accalia
    accalia:
    OI! eclipse at least can open and run on machines with as little as 1GB or RAM.

    You obviously don't use as many plugins as I do.

  • (disco) in reply to dkf
    dkf:
    You obviously don't use as many plugins as I do.

    oh. well.... plugins. :doing_it_wrong: that's different

  • (disco) in reply to accalia

    Well, there's the plugins used to support editing Java, the plugins used to support compiling Java, …

  • (disco) in reply to dkf

    Are there plugins to support the death of Java?

  • (disco) in reply to Onyx

    I don't think they're part of the default set, but you could check out the Eclipse Marketplace…

  • (disco) in reply to Yen
    Yen:
    I can place a fully functional for loop in my code in about a second or two. I can easily set it to iterate over multiple arrays or run in parallel. Doesn't seem hard to me. In fact, I would say it's mostly easier than C. I can replace it with a while loop in somewhere between 2 and 5 seconds.

    How many clicks do you have to make to create a simple for-loop, what is the distance between each click:

    // inputs
    a = array(size = 100)
    lower = 2 
    higher = 99
    a[1] = 1
    // logic
    for i in lower to higher
        a[i] = (i - 1) * lower
    

    If you can do it in 10 seconds then sure you absolutely should stick to it. If you are paid to do what is fun then you are lucky, I guess I am.

    Yen:
    I'll grant that modifying code can **sometimes** be harder in LV, particularly if you want to cut and paste whole blocks in or if your code is bad, but I find it very easy to develop cod

    How many seconds (and clicks) does it take to copy-paste a[i] = (i - 1) * lower outside the for-loop:

    i = higher
    a[i] = (i - 1) * lower
    
  • (disco) in reply to accalia
    accalia:
    Yen:
    I'm curious, what would something like that actually look like in your code?

    more or less like LV actually, that's rather what WCF workflow is.

    here's a basic tutorial. http://www.codeproject.com/Articles/95418/Building-and-Testing-a-WCF-Web-Service-Using-Workf

    Nope, still don't see it. I'm assuming you can create some code which will take LaTeX, get an image of it, show that image in a workflow and generate code to do the calculation and then call that workflow in your code. I'm just not clear about how you will actually see the image in your code. I guess you'll need to go to the workflow to see the image? Reasonable, but not as convenient as my example. Again, I'm not saying a language needs to have this to be a good language. It was just an example of a specific complaint which had a good counter example. This happens to mesh well with how LV works, that's all.

    accalia:
    I'm arguing that it's a terrible programming language, and here are just a few of the reasons why:

    sigh...

    * It is, as far as i can tell, impossible to open the labview IDE on a machine with less than 4GB of RAM

    I've used it for years on a laptop with 512 MB, then years on one with 1G. My current laptop has had 4GB for the past 5 years. I recently upgraded to 8, but my OS is still 32 bit, so still just 4. Works fine for me. Firefox tends to hog more RAM, not to mention Chrome. I also run VMs on it which eat parts of the RAM. I certainly don't mind more RAM (that's why I got it, but that's not a real impediment).

    * It is incredibly easy to make literal spaghetii code.

    In C, it's incredibly easy to write code which won't work. Does that make it a bad langauge? If you know what you're doing, you'll write working code in C and clean code in LV.

    * the The IDE includes no less than FIVE DIFFERENT CONTROLLS FOR ENTERING A NUMBER IN A RANGE!.
    srsly? Does that even need a reply? The language is terrible because the IDE ships with multiple UI elements?
    * Sub vi's.... you have to open another window (that takes a good minute to open, even on the good i5 machine we have at robotics) to access the sub VI

    Some people find the multiple windows annoying. Some find them preferable to a unified IDE. I think my own preference is for the multiple windows, although its management could certainly be better. Personally, I find the multiple sidebars and panes of other IDEs to be sometimes claustrophobic.

    * embedded vi's, certain controlls act like a flip book sort of thing so you have multiple little embedded vi's in the same spot on your diagram and you have to tunnel wites into them through to the correct "page" and you can't have more than one open page at a time so you can't refer between them.

    No idea what you mean by that, but if you're going to criticize something, knowing what things are is a good step to indicating you actually know what you're talking about. I assume you're talking about the various multi-frame structures that LV has that contain code in different frames. It's true that they don't let you see the code in two different frames at the same time, but you can flip between them if you want. It also has at least one advantage - if you have multiple nested case statements, it allows you to very clearly see which code path is taken for a specific combination.

    and perhaps to me the worst (not counting the fact that AFAIK there is no debugger)

    • the language was started as a tool for wiring virtual test benches, that's why there are five controls for selecting numbers! because they were duplicating physical test benches and the wiring of them to virtualize the EE test benches.
    • Lab View was not a programming language, it was a virtual wiring tool that evolved into a programming environment.

    First, there are a bunch of debugging tools in LV. Anything from single stepping to probes to remotely debugging source code saved in an executable on another machine. Some make debugging easier than what you get in other languages. Some are not as good as what you get with other languages.

    Second, you're conflating history with state. It's like saying "Coca Cola was developed as medicine, so it can't be tasty".

    Third, even your history is wrong. It was definitely developed as a programming tool. Its specific domain was allowing scientists and engineers to write custom logic for their instruments, which is indeed why it has knobs and other similar UI elements shipping with it. My guess would be that NI originally put the effort into it because they figured it would help increase their hardware sales (and they were probably right).

  • (disco) in reply to dse
    dse:
    If you can do it in 10 seconds then sure you absolutely should stick to it. If you are paid to do what is fun then you are lucky, I guess I am.

    No, I can't write the equivalent of your arbitrary code in 10 seconds. LV does not have syntax like the "lower to higher" in your code, so the loop iterator is always zero based. I would have to calculate the number of iterations and add your lower value to i. That's certainly syntax I would like to have, but in practice, almost all of my for loops iterate over arrays, sometimes multiple arrays, and LV does have good syntax for that, so it's rare that I really miss it. I mainly miss it because I'm used to it from other languages.

    It shouldn't take more than 20 seconds or so to move the code in your example outside the loop and connect everything up correctly if you have the values. That's more than it would take in text, but if your idea of development consists of regularly copying and pasting, then our styles are very different.

    Onyx:
    Are there plugins to support the death of Java?

    Guys, please. We're bashing LabVIEW now, not Java. There are plenty of other threads here for that.

  • (disco) in reply to Yen
    Yen:
    No, I can't write the equivalent of your arbitrary code in 10 seconds. LV does not have syntax like the "lower to higher" in your code, so the loop iterator is always zero based. I would have to calculate the number of iterations and add your lower value to i.

    Fair enough, but can you estimate how much time and how many clicks it would take you? In your estimation consider that I intentionally defined lower outside of the for-loop and used it inside. Without proper scope rules you will have to open a port on your for-loop block (more clicks).

    Yen:
    Guys, please. We're bashing LabVIEW now, not Java.
    Ok, LabView is a graphical Assembly language to take sadistic pleasure from a pretty graph.
  • (disco) in reply to dse
    dse:
    Yen:
    No, I can't write the equivalent of your arbitrary code in 10 seconds. LV does not have syntax like the "lower to higher" in your code, so the loop iterator is always zero based. I would have to calculate the number of iterations and add your lower value to i.

    Fair enough, but can you estimate how much time and how many clicks it would take you? In your estimation consider that I intentionally defined lower outside of the for-loop and used it inside. Without proper scope rules you will have to open a port on your for-loop block (more clicks).

    I would say probably 40-90 seconds, and I don't know how many clicks, because I don't track number of clicks any more than I track keystrokes. A super rough guesstimate would be ~20 nodes in the code * 2.5 clicks per node so something on the order of 50?

    The real issue here isn't with the number of clicks or with bringing a value into the loop. That's actually very easy. The time sink in this case comes from the lack of the "a to b" syntax, which would require me to either do that calculation so I can get the correct number of iterations and the values or (more likely) call a shipping function which will generate the array of 2,3,4,5..99, and then iterate over that. Like I said, it's definitely a soft spot, but I don't actually feel the need for this type of for loop very often.

    I won't dispute the fact that there are cases where it's faster to write code in other languages. I keep saying that different tools have different strengths and weaknesses. I just don't think picking arbitrary measures is a good way of evaluating something or of comparing it to other things.

    dse:
    Ok, LabView is a graphical Assembly language...

    A somewhat ironic statement considering just how far removed LV is from assembly in most respects (it had things like fully automatic memory management and edit time syntax checking and compilation back in the days where Java was an island, a Python was a snake, Dot and Net were two words that didn't go together and there was no platform Visual Studio could run on).

  • (disco)

    But does LabView run Linux?


    Filed Under: Someone alert blakey, /. is leaking again!

  • (disco) in reply to boomzilla
    boomzilla:
    But does LabView run Linux?
    [image]
  • (disco) in reply to boomzilla
    boomzilla:
    But does LabView run Linux?

    It runs on Linux (don't know which distros) and Mac and can cross compile to some realtime targets and FPGAs.

  • (disco) in reply to boomzilla
    boomzilla:
    But does LabView run Linux?

    Has anyone ever designed a full, working x86 architecture in LabView?

    @Yen, could you perhaps get on that? I want to live to see the year of the LabView Linux desktop.

  • (disco) in reply to anotherusername
    anotherusername:
    boomzilla:
    But does LabView run Linux?

    Has anyone ever designed a full, working x86 architecture in LabView?

    @Yen, could you perhaps get on that? I want to live to see the year of the LabView Linux desktop.

    x86 probably not, but I do know of C64 and Apple ][ emulators written in LV, so if you're feeling nostalgic for some games you have that. I can't say I find the emulation of computer architectures to be an interesting endeavor, though.

  • (disco) in reply to Yen
    Yen:
    I recently upgraded to 8, but my OS is still 32 bit, so still just 4

    Why did you upgrade to more RAM than your OS can address?

    Oh, you probably meant Windows 8. Put some qualifiers in your sentence, man. And get a 64 bit system.

  • (disco) in reply to Yen
    Yen:
    back in the days where Java was an island, a Python was a snake, Dot and Net were two words that didn't go together and there was no platform Visual Studio could run on

    Appreciate the good trolling :) Pure BlockDiagram programming of LabView is an interesting idea that has gone too far, like Lisp religion and Communism. We certainly need the extremes in order to put things in perspective (and appreciate Rust and democracy). And it would not hurt to have more nuts here to troll in TDWTF.

  • (disco) in reply to dse
    abarker:
    Yen:
    I recently upgraded to 8, but my OS is still 32 bit, so still just 4
    Why did you upgrade to more RAM than your OS can address?

    That's because Microsoft, in it's infinite wisdom, decided not offer a direct upgrade path from Win7 32 to Win10 64 and not even allow people where I live to buy Windows 10 separately. For the upgrade, I had to upgrade to Win10 32, activate it and then I can format my HD and install Win10 64 and it will activate.

    I haven't had the energy to do that last part, because Win10 is a terrible OS. It doesn't keep opened taskbar items in the locations they were pinned to. It doesn't have the nice list of pinned items in the start menu that I put there in Win7. Getting it not to update and restart when it wants it is difficult. I guess it's an interesting idea which has gone too far. We should all just use DOS, because in DOS I can navigate to a folder much faster.

    Do I need a sarcasm tag?

    dse:
    Yen:
    back in the days where Java was an island, a Python was a snake, Dot and Net were two words that didn't go together and there was no platform Visual Studio could run on

    Appreciate the good trolling :)

    Hey, you started it. Besides, isn't it obvious that LabVIEW programmers don't have a sense of humor?

    dse:
    Pure BlockDiagram programming of LabView is an interesting idea that has gone too far, like [Lisp religion ](http://c2.com/cgi/wiki?LispIsTheOneTrueReligion) and Communism.

    Nope, still don't see any content there. Why has it "gone too far"? It's a practical functional tool which is used by many people to do what they want and do a lot. Some do it well. Some do it badly.

    It certainly isn't the perfect product and it does show its age (29), but it's still under active development and up for many things. It could certainly use a facelift and some overhaul. It could use added capablities. It could benefit from a larger development team.

    All of those and more are true, but what I don't see is how it has "gone too far" and if it has, why is there a bunch of different tools which are also trying to do things in a similar way coming out in recent years? Off the top of my head, examples could include NoFlo for JS, VPL for robotics, the node editor in Blender for image manipulation and I guess also the WCF workflow shown above. If you'll say that the difference is that at some arbitrary line it shifts from a diagram to "real code", then try again.

    Maybe the fact that you think Lisp is in a similar situation is a good indicator. I don't really know Lisp, but I do know a tiny bit of Scheme. I have no idea how commonly they're used today, but I certainly agree that there are similarities. LV shares some of the functional characteristics of those languages and things like automatic memory management and fewer syntax elements. It, however, does not require you to drop a bag of parentheses onto your code on a regular basis and I think it's more readable both because its syntax tends to be infix instead of prefix and because the logic is not as recursive and it usually goes forward in code, not backwards.

    Personally, I found Scheme too difficult to use, but I don't go out and conclude that it's therefore terrible. I recognize that a) I really didn't put any effort into it and b) it's possible that it's not suitable for me, but it is perfect for some other people.

    dse:
    And it would not hurt to have more nuts here to troll in TDWTF.

    You know, I am trying to have an actual conversation here. I really am trying to understand and while you bunch are not as bad as most of the LV haters I've seen, I still haven't heard any actual, practical arguments which I'll buy (ironic, considering the fact that LV does have some actual issues, but I guess you have to actually use it properly to be aware of those).

  • (disco) in reply to Yen
    Yen:
    Why has it "gone too far"?

    It has gone too far because everything-is-block-diagram is extreme to the point of becoming funny. While it is possible (it is Turing complete and has a compiler), and even though for some domains (e.g. FPGA) it might even make sense, it is not practical for most. Same is everythng-is-function in pure functional languages. It is possible, and I also happen to like Haskel (it is fun like puzzle solving) but it is extreme.

    Now, practical applications do come from these extremes:

    Yen:
    Off the top of my head, examples could include NoFlo for JS, VPL for robotics, the node editor in Blender for image manipulation and I guess also the WCF workflow shown above.
    Exactly. One can get a pure idea (blockdiagram, or functional) and incorporate part of it in something else that adds value. As another example; I have also seen DEVSJava auto-generating Java from a graphical model, and can generate a model from DEVSJava. It is helpful to have a graphical model for a program; that could help e.g. proving something about it or act as some sort of documentation.
    Yen:
    I am trying to have an actual conversation here.
    It happens sometimes but is mostly trolling. I have seen people here are highly technical in some field, polarized, and have strong opinions about certain subjects, which makes them perfect trolls. :trollface:ing is an art to be appreciated by those versed enough in the subject.
    Yen:
    LV haters
    As I explained LV is tedious and thus painful to use, that is my only reason I hate it. The purism by itself is just funny, not something to hate.
  • (disco) in reply to dse
    dse:
    Yen:
    Why has it "gone too far"?

    It has gone too far because everything-is-block-diagram is extreme to the point of becoming funny. While it is possible (it is Turing complete and has a compiler), and even though for some domains (e.g. FPGA) it might even make sense, it is not practical for most.

    First, you should probably differentiate paradigm from representation. C is procedural. LV is data flow. Haskell is functional. Java is OO. You can find different representations for different models, such as text based data flow languages or procedural/OO graphical languages (like Scratch or ladder diagrams). I can take a LabVIEW diagram and construct the same data structure as XML. That won't make it more readable.

    Second, I find that the claim "everything is X is extreme" to be absurd. If X works, then X is fine, just like it's OK that C is fully text even if there are other ways of representing parts of C which would make it more usable. You don't call C extreme because it's all text, right? The LV IDE represents things graphically. That's not extreme. It just is. It also has some options for placing text into the code, because NI decided that there are cases where that's useful so they added it in.

    And I certainly don't say it has to be practical for "most". The world is big. There's enough space in it for different things in parallel. The fact that you can't ride a skateboard doesn't mean there aren't people who can and find it useful.

    dse:
    Yen:
    I am trying to have an actual conversation here.
    It happens sometimes but is mostly trolling. I have seen people here are highly technical in some field, polarized, and have strong opinions about certain subjects, which makes them perfect trolls. :trollface:ing is an art to be appreciated by those versed enough in the subject.

    I mainly frequent LV communities, where the amount of trolling is extremely low, possibly because of homogeneity and possibly because most regulars there are professionals and act like it. That, unfortunately or fortunately, puts me on the "not so versed" part of the spectrum.

    The interesting thing to me is that the strong opinions tend to came from the LabVIEW haters, not from the LV users. LV users tend to be quite open to recognizing the value in other environments and problems in LV itself, whereas the haters are not. Maybe it's the same with other flame wars. I tend not to follow those as they're usually a big waste of time.

    dse:
    Yen:
    LV haters
    As I explained LV is tedious and thus painful to use, that is my only reason I hate it. The purism by itself is just funny, not something to hate.
    I understand how some people can consider it tedious. I don't understand how that leads to hate and "this is terrible because X". And I assume you mean the purism of the "everything is a diagram" (which I dealt with above) and not me, as I am definitely not a purist.
  • (disco) in reply to Yen
    Yen:
    Second, I find that the claim "everything is X is extreme" to be absurd. If X works, then X is fine

    Many great pyramids were made using human labor and sheer determination of wills (maybe with slavery), it is not fine

    Yen:
    if there are other ways of representing parts of C which would make it more usable.
    C has a standard comittee, it is not rigid. There is C89, C99 and [C11](https://en.wikipedia.org/wiki/C11_(C_standard_revision) if something makes it more usable they might add it there of course. I used to dislike C++ a few years ago when I used it, but recently did a little project in C++11 and was surprised by the progress and how much a better language it is now. It is because languages change, if they do insist on sticking to the design made 30 years ago, they will become stale.
    Yen:
    It just is. It also has some options for placing text into the code, because NI decided that there are cases where that's useful so they added it in.

    It was a reactionary move to stop loosing market share to MATLAB, and that is why it looked more like a hack requiring MATLAB engine and whatnot (this could be changed now). It was one step in the right direction though. I have no idea if LabView also has a standard committee and how they decide what should be added to the next version of their language. Maybe the problem is that the language is closed source and closed environment, and it is their marketing that drives innovation instead of language designers. If they could interface with Python instead of MATLAB, open the specs a little bit and let in some more procedural blocks then it would be a new version they could call LV+11. I have no problem with closed source (I make money from closed source) but looking at successful languages, openness (standard, source, community, specs, ...) helps a lot. Unless NI still thinks LV is their precious BASIC.

  • (disco)

    So many @dse and @Yen avatars lately. Where have all the food profile pics gone?


    Filed under: Today's episode was sponsored by the letter E...

  • (disco) in reply to Yen
    Yen:
    C is procedural. LV is data flow. Haskell is functional. Java is OO.

    Strictly, C is imperative as you write out what you want to do in the order you want it to happen. So is Java (though it's also OO). I've seen languages that were both OO and functional, simultaneously. Their implementation sucked for unrelated reasons, but the concept mixture is valid. :smile:

  • (disco) in reply to dkf

    Also strictly speaking OO is a paradigm, you can use the C subset of C++ as an imperative non-OO language, or you can use C to write OO.

  • (disco) in reply to dse
    dse:
    you can use C to write OO

    You can. Don't.

  • (disco) in reply to dkf

    No it's awesome because you can put functions inside structs and then they're exactly like classes!!!!!!@!#!#42142353b 5txydf5 7u jcj

  • (disco) in reply to blakeyrat

    Structs can play at objects. Function pointers can play at interfaces. But you want static dispatch when possible. And you do not want to try your hand at inheritance.

  • (disco) in reply to dkf
    dse:
    Yen:
    Second, I find that the claim "everything is X is extreme" to be absurd. If X works, then X is fine

    Many great pyramids were made using human labor and sheer determination of wills (maybe with slavery), it is not fine

    Nope, still absurd. You didn't say "diagrams are bad". You said "everything is a diagram is extreme". Even ignoring the fact that not everything is a diagram (you have tons of abstraction of low level stuff that's dealt with automatically) and ignoring the fact that "extreme" means there's some kind of cozy text central consensus which these diagrams deviate from, I still find that this claim not only arbitrary, but absurd.

    dse:

    It is because languages change, if they do insist on sticking to the design made 30 years ago, they will become stale.

    C++ is stuck to a design made >30 years ago - it is a text based OO language. That doesn't mean the language can't be updated. It doesn't mean features can't be added on top of it. But at its base it is what it is. That doesn't mean its design is bad.

    LV isn't static either. Its basic design is the same as it was in the mid 80s - it's a graphical data flow language, but both the language and the IDE have had many additions over the years, like OO features and the ability to embed MATLAB code.

    It is not administered by a standards body, but by a single private company and they do what they want. That could certainly be a valid criticism. It could be argued (although not proven) that it would have developed more quickly or be better if it was managed by a standards body or if it was open source. It could also be argued that having a single vendor meant you could have a single canonical version which could change more quickly. I see no point in discussing this, primarily because this is theoretical. LV is what it is. It would be interesting to see if you choose to pivot and claim it's bad because it's made by a single vendor.

    Unlike you, I can't claim that I know why NI decided to add the ability to embed MATLAB code inside LV diagrams, and the reasons don't actually matter. You can say it's a response to losing market share, you can say it's a recognition that such functionality as useful. The fact is that it's there, along with the ability to embed C-like code (although not actual C).

    dse:
    If they could interface with Python instead of MATLAB, open the specs a little bit and let in some more procedural blocks

    3, 2, 1:

    http://labpython.sourceforge.net/images/scriptnode-example.png

    This image goes back at least 13 years. Both this and the previous example I gave of embedding functional typeset equations as function calls were developed by users of LV, not by NI, so it is open enough for determined users to do this, even if not documented. I don't think either tool is very popular, primarily because I think relatively few people feel the need. If you want to access code written in another language, you usually do it by calling a compiled binary, which Python may not allow, but C and .NET languages certainly do.

    dkf:
    Yen:
    C is procedural. LV is data flow. Haskell is functional. Java is OO.

    Strictly, C is imperative as you write out what you want to do in the order you want it to happen.

    It's the same with LV and it also has OO and functional aspects. My point wasn't to classify languages using a single word, but to point out that representation is different from paradigm using some examples people are familiar with.

  • (disco) in reply to blakeyrat

    I know you are of course always right. But just to add insult to injury and to see if I can fan the flames, C++ was originally compiled to C so in theory you can do full OO in C but with less overhead. And therefore, C is superior to C# because Linux is written in C and not C#.

  • (disco) in reply to dse

    That you can doesn't mean you should. Simple classes with explicit static dispatch works fine (int foo_frobnicate( struct foo * foo )). Manually defining a vtable so you can have a couple of implementations of an interface works. But that's about where you should stop: I don't know any easy ways to do (even single) inheritance, for example. Then again I haven't tried for that.

  • (disco) in reply to PleegWat
    PleegWat:
    I don't know any easy ways to do (even single) inheritance, for example.

    Put the superclass's vtable structure as the first element of the subclass's vtable structure. Like that, the address of the function that implements a method can be found at a constant offset into the structure. (Calling the superclass implementation of a method from the subclass's method implementation requires static dispatch with this technique, but it's a known constant at the points where you need it so it is doable.)

  • (disco) in reply to dkf

    If one continues this rabbit hole, soon can also implement MRO (method resolution order) for multiple inheritance, and then can do a PR for CPython.

    no I am not doing this, it is just interesting

  • (disco) in reply to dse

    I know how to do multiple inheritance; it's not for the faint-hearted.

Leave a comment on “Dual Helix”

Log In or post as a guest

Replying to comment #:

« Return to Article