Jump to content

JackDunaway

Members
  • Posts

    364
  • Joined

  • Last visited

  • Days Won

    40

Posts posted by JackDunaway

  1. Which challenges and nuances have you encountered? We will be very seldom physically at the machine for instance, almost every will be done of remotely.

     

    The most real challenge has been simply interrupted cognition and lost time waiting for things to happen -- connections over RDP are oftentimes klunky -- it feels like I'm always switching between engineering and devops mindsets, and this thread swapping is inefficient -- these are purely anecdotal issues, YMMV. My best advice is to jump right in with what you're trying to do, and post specific issues as you run into them. (Also, it sounds like you're making the good choice to develop locally, then deploy the executable remotely. After walking down the path of attempting to develop remotely, this was far too burdensome due to the latency of RDP -- I could never get into 'the groove')

  2. Anyways, you're not going to be able to do it with the match primitive alone. It won't make a new string for you...

     

    Well, it's kinda not a new string... it's just a noncontiguous substring. (Can a substring be defined as 'noncontiguous'? Perhaps, no, and what i desire is impossible.)

     

     

     

    I hope I got your examples right, my LabVIEW stopped accepting snippets for some reason, so I rolled this one from scratch.

     

    attachicon.gifregex2.png

     

    Wow, thanks for going out of your way to recreate! Sorry snippets broke for you  :(

     

    That is basically the way I'm solving the problem right now; with extra syntax. The prime motivation for finding a *purely* regex solution is to generalize this problem -- consider wanting to remove adjectives from both nouns:

     

    The fox jumped over the dog

     

    This general solution more closely matches my problem domain. (This thread presents the simplest form of the problem, since I can't even figure that out; or if the desired solution is even possible!)

  3. OK; so, the consensus is that there does not exist a single regex to solve this?  :( (I was really hoping to learn of a solution that could be achieved purely by the regex engine.)

     

    The best name I can come up with for what I'm trying to do is submatch extraction, where the whole match depends on matching directives before and after the submatch, yet excludes the submatch like this:

     

    post-17237-0-63598200-1363293747.png

  4. How can I exclude a variable-width, inner part from a regex match?

     

    For instance, given the three following inputs:

    • The quick brown fox jumped over the lazy dog
    • The quick brown fox jumped over the sleepy dog
    • The quick brown fox jumped over the hotdog
    I want to match the following:
    • The quick brown fox jumped over the dog

    I have investigated negative lookarounds, but since these are zero-width assertions, I can't easily figure out how to include additional regex directives on *both sides* of the lookaround.

     

    Is this problem relegated to the use of Search and Replace String configured for regex matching, or can this be achieved with a simple regex match?

     

    Here's a screenshot of one of my naïve attempts using RegexPal; a successful attempt would also show "dog" highlighted as part of the match, but excluding the dog modifier. At least it doesn't match 'frog' :-)

     

    post-17237-0-39273600-1363286217.png

  5. LabVIEW's HTTPS support uses most likely OpenSSL for the SSL implementation. OpenSSL comes with it's own list of Root CA and does AFAIK not try to access any platform specific CA stores. As such the only options for self signed server CAs is to either skip the verification of the server certificate or to try to import the self signed certificate into the session. I think the SSL.vi or Config SSL.vi should allow to do that.

     

    Rolf; thank you for this reply. To follow up, I have received some ideas through another channel on how to solve this issue; I will report back after testing the suggestions. (Having just concluded the CLA Summit, I will be back on this project soon). Brief spoiler -- this channel's suggestions are not unlike yours.

  6. (Replace the lowercase actor below with process or subsystem or service... it's more general than an Actor Framework Actor.)
     
    I had a brief offline conversation about this topic the other day about the semantic difference between a command and a request sent to an actor.
     
    An actor receiving requests is generally in charge of its health and destiny; an actor sent commands is subject to DoS attacks or other hazards from external sources, whether incidental or malicious. As Dak mentions, separating incoming messages from the job queue is a great implementation for receiving requests (I owe a lot of my understanding and respect for this concept to the JKI State Machine).
     
    The visual below represents an actor (the traffic intersection) and its response to individual messages from four distinct non-owning-but-using actors (the incoming lanes) defining their own concepts of priority (drivers with their own agenda). Were this intersection handling incoming requests rather than commands, it performs its job more effectively (by coordinating order, rate, and even batch-ness by aggregating requests to provide efficiency) and reduces undesirable interaction between the four independent actors.
     
    (Finally, I don't assert requests sent to actors are universally better than commands, since they each have merits in different problem domains; just acknowledging the existence of this concept, especially when chain-of-command and ownership does not naturally exist.)
     
    post-17237-0-20210100-1362115184.jpg
    Originally from: http://chivethethrottle.files.wordpress.com/2013/01/random-t-01_18_13-920-55.jpg

    • Like 2
  7. .hgignore

     

    Can you explain this one? And for clarity; this is for the .hgignore checked into your repo root or the global? Ignoring the ignore file.... I can see where this is desirable, but not necessarily the norm.

     

     

     

    .lvbitx

     

    I'm not well-versed enough in the FPGA domain to make a decision -- but would you say for the same reason as DLLs etc, it may be desirable to check this into SCC if it's part of an RT distro, and therefore not a good candidate for the baseline .gitignore?

  8. I have the following global HG workbench file (Mercurial itself doesn't support a global hgignore):

     

    .ogp$
    /built*$
    /build*$
    .lvlps$
    .aliases$
    .viobj
    .vip$
    .zip$
     
    Based on this Which files to ignore using SCC, and the LabVIEW Wiki and my strong belief that build products do not belong in an SCC.
     
    Ton

     

    Thanks for linking conversations to substantiate! Here's commentary:

     

    For the same reason I would not include DLL and other library exclusions from gitignore, I would not add an exclusion for ZIP, VIP, and OGP (since they can be dependencies as part of a distributable application -- e.g., they can be but are not necessarily 'end products'). And as for /built*$ and /build*$, the same conversation applies from Shaun's suggestions -- these are better placed in individual developer's Global ignore.

     

    But you're onto something with the .viobj -- are there instances where this can end up in the source directory?? Or is this a throwback to the early days when there was discussion if viobj would be stored locally with the source or in a global cache (spoiler: the global cache idea won out -- *i think* -- yet if there remain some cases where viobj is stored in the source dir, that's a great reason to include viobj in the default gitignore)

  9. I don't use Git, but I assume .gitignore is similar to .hgignore.  How is the canonical .gitignore file used in practice?  Doesn't Git have a system-wide ignore file?

     

    Yes; and this question prompted further digging and inspection of other gitignores in the repo, and the README.md has this information: "Global gitignores (OS-specific, editor-specific) should go into the Global/ directory." OS-specific includes .DS_Store and Thumbs.db, and something like */build/* would be considered editor-specific.

     

    So; for now, we're back to the original with just .aliases and .lvlps.

     

    For those using Hg: what do your .hgignore's look like?

  10. I don't think this is a good idea....unit tests for the class certainly contain information related to the class, but they are not part of what a class is.

     

    Would you suggest for this reason removing Probes and Menu Palettes from the LVClass definition? These are precedences of conveniences/facilities to use the class effectively, yet do not define the operation of the class. Unit Test usage in this context could be considered an extension to documentation. (And: I'm not necessarily seriously supporting making Unit Tests a first class feature of the class definition; it was more, just throwing it out there to consider and iterate)

    More to your question, black box testing cannot provide the same level of guarantees as inspection.  If my Add function is required to return a value from 0-10, how many tests do I need to conduct to guarantee the function is working correctly?  Assuming I'm adding two 32-bit numbers, about 18,447,000,000,000,000,000.  That's a lot of goofing off waiting for the test to finish.  Conversely, if I can inspect the block diagram and I see the output is coerced just prior to being passed out, I've verified correctness in less than 10 seconds.

     

    If the Unit Test is a member of the class, what's to prevent white box testing with scripting? That's a form of inspection; sometimes better than the human eye (e.g., for catching an error wire that runs under a method rather than connected to its I/O). Unit test here could be used interchangeably with VI Analyzer test.

     

     

    It is possible to use unit testing to verify many aspects of an interface's implementation.  In my experience doing that usually leads to a lot of test code churn that isn't adding significant value to the project.  YMMV.

     

    I won't disagree. The value of unit test coverage roughly seems linked to economy of scale with larger projects/teams -- single devs on small projects likely don't offer their customers value with 100% coverage in lieu of more features; on the other hand, massive OSS projects with neutral Unit Test and Style arbiters allow hundreds of devs to contribute. Many LabVIEW projects tend toward the smaller spectrum. I've yet to work on a project, no matter how small, that wouldn't have benefited from at least a couple strategically-placed tests. YMMV.

    Previously I mentioned .lvcontract files to keep track of requirements and guarantees. I'll just generalize the idea and change the name from MyClass.lvcontract to MyClass.lvclass.manifest.  The purpose of the manifest is to store any important information about the class (or vi) that isn't defined by the class.

     

    What are reasons to store the Manifest as a separate file from the LVClass?

  11. With regards to to the straightjacket -- this finally triggered a synapse none of us have keyed onto yet: unit testing.

     

    It's a manner in which the parent class can supply a bread crumb trail as to what is expected of a child class.

     

    Yet the child class can choose to fail or ignore these tests.

     

    Can we think of ways to incorporate unit tests as more of a first class feature of class definitions? Perhaps even making ad hoc execution of the tests as simple as right-clicking a ProjectItem that's part of the class?

    • Like 1
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.