[Jprogramming] J in 5 minutes
Martin Saurer
martin.saurer at bluewin.ch
Tue Apr 1 06:55:33 UTC 2014
Raul,
Vijay,
Many thanks for your feedback on the 4th J video about steganography.
Please note, that at the very end of the video, a download link
for the full source code of the example is provided.
It's not necessary to read the JoJ article or copy source code
from there.
Just download it from:
http://www.datavision-gmbh.ch/downloads/StegDemo.zip
The reference to the JoJ article was just a comment.
@Raul
I always love to play with different solutions for a problem.
Thanks for your implementations of rgb2int and int2rgb.
Your implementation of int2rgb is about 6 times faster than mine :-(
But my implementation of rgb2int is about 6 times faster than yours ;-)
Tested using the verb timex and a 2048x1539 bitmap image file.
That's why I love J.
Cheers
Martin
> This is nice!
>
> If I may, though, I was looking through your journal of J code, and I just
> itch to make "improvements" to it. It's not that it's nonfunctional or
> anything, and I'm not even sure if my changes make it faster. And I
> certainly have not presented anything with any near your polish - and we
> need polish, while my work has tended to look crude and minimalistic -
> but...
>
> int2rgb=: [: <. 256 256 256&#:
> rgb2int=: [: <. <mailto:256&#.@(3&{.> 256&#.@(3&{."1)
>
> You could even make them inverses of one another:
>
> int2rgb=: ([: <. 256 256 256&#:) :.rgb2int
> rgb2int=: ([: <. <mailto:256&#.@(3&{.> 256&#.@(3&{."1)) :.int2rgb
>
> I'm not sure that this is any more readable. Someone new to J but with a
> background in some other computer programming language might be more
> comfortable with your expressions than with mine.
>
> Anyways, it's probably worth noting - as you have already done, but I
> wanted to emphasize it - that the support code for that video is in the
> Journal of J article you linked.
>
More information about the Programming
mailing list