BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Another job for TypecastMan!! 😄

 


Message 801 of 2,635
(11,511 Views)

 


SteveChandler wrote:

Looks more like Bill Clinton code than Rube Goldberg code.

 

Message 802 of 2,635
(11,483 Views)

@altenbach wrote:

 


SteveChandler wrote:

Looks more like Bill Clinton code than Rube Goldberg code.

 


I DID NOT REG-EX WITH THAT RUBE CODE

 

Clinton.jpg

Message 803 of 2,635
(11,465 Views)

 


@altenbach wrote:

 

Looks more like Bill Clinton code than Rube Goldberg code.

 


 

 

I just noticed that my attempt to add a spoiler to my previous post failed (chronic issue for me with Firefox).  It contained self-deprecating humor and my boring non-regex-aholic version.

 

RayRStringSpoiler.png

 

Not to worry, Christian comes along with a better solution, and a MUCH better joke....

 

Message 804 of 2,635
(11,462 Views)

Ray.R wrote: 

 


Altenbach's(/Darin's) method is better, but there's at least one intermediate nugget for improving your code: autoindexing into a single Concatenate. I have not benchmarked this one, but would expect significantly better performance than a concat each iteration for large input strings.

 

AutoindexString.png

Message 805 of 2,635
(11,444 Views)

 


@Darin.K wrote:

Regex, regex, regex...

 

RayRString.png


 

Sorry Darin...  I didn't see your post due to Steve's reply..  😄

 

Strangely enough, I do not get the same result as you do.  I get:  3215AB2F00000053

 

But I agree that regex would be the best way to go..  🙂

 

0 Kudos
Message 806 of 2,635
(11,424 Views)

 


@altenbach wrote:

Another job for TypecastMan!! 😄

 



 

Thanks Christian,

 

I was close to your solution, but not close enough.  I made a mistake by using U8 D'Oh..  or D'Euh!!

 

Sweet!  Thanks!

Message 807 of 2,635
(11,423 Views)

 


@JackDunaway wrote:

Ray.R wrote: 

 


Altenbach's(/Darin's) method is better, but there's at least one intermediate nugget for improving your code: autoindexing into a single Concatenate. I have not benchmarked this one, but would expect significantly better performance than a concat each iteration for large input strings.

 

AutoindexString.png


 

Thanks guys!!  Man, I didn't expect my Rube Goldbert code to be so funny!!  I was laughing my head-off.. LOL!!

  😄

 

Thanks Jack for the tip, I'll have to remember that one in the future.  I prefer the non-For-loop solutions.  Why loop when not needed?  😉

 

0 Kudos
Message 808 of 2,635
(11,421 Views)

 


@Ray.R wrote:

 

 

Strangely enough, I do not get the same result as you do.  I get:  3215AB2F00000053

 

But I agree that regex would be the best way to go..  🙂

 


 

You haven't unleashed the power of the Regex yet, you need to Right-Click the Search and Replace function and choose 'Regular Expression'. 

 

Although I am an admitted Regex-a-holic, and look for any excuse to use one, the Type Cast method is probably a bit (ie. a lot) faster if you care.  (Even my mini-Rube Reverse+Swap version.)  Of course, some depraved individuals may think I am cursing or otherwise when I post Regexes.....

 

 

Message 809 of 2,635
(11,410 Views)

Regular expressions make much more sense after they have been compiled to machine code.

=====================
LabVIEW 2012


Message 810 of 2,635
(11,398 Views)