Re: Strip a ™ character

JB sundown at pacifier.com
Thu Oct 2 12:06:51 EDT 2014


Well then Dr. Hawkins won’t need to take things
too seriously if he is offended.  He is a big boy
just like me and you.

As for my business it is nice you are concerned
about the damage but there was a lot more than
that at a lot more levels.  I can assure you these
people are everywhere and they are organized.
It appears they have some form of tapping system
and they use gossip or other means to attack too.

But the subject is the code.

I do not know unix and you may be right.  The thing
with the extra chars is critical.  The code to convert
is simple.  As for the code being converted it was all
from a field.  Write something in the field on one line
then use the code to convert that line to binary and it
works.  You put that code into the field and all it knows
is you have put 6 characters for each letter you had in
the field and those characters are now a combination
of 0’s and 1’s.  So you now have the same type of text
in the field.  To convert that to Hex you take 8 chars out
of the field and then replace them with 2 chars that can
be a number and a letter from A to F.  The letters can be
either upper or lower case but it will be used the same
way in the conversion.  Most people are not actually doing
the conversion from the binary 8 char to Hex 2 char they
call a routine from a library similar to me call a function you
wrote.  So the conversion if successful at all should always
be successful and will not give you extra chars.  The text
returned is what will always be returned so if your function
takes text from a field and returns it then there is really no
big change unless you change its form.  What is being done
to the text is not changing its form unless the code used is
somehow changing it but if that is the case you would not be
able to have a single char or line work either.

There is no reason to add more chars just because you have
used the conversion on text from a different line.  If it was doing
it on text from the first line too then that might be possible but
just telling 8 chars they are now 2 chars does not add AA and
the form of text entered or returned does has no reason to be
changed just because you entered text from another line.  I did
it where I only used the eight chars on each line.  I can choose
any one line from the field and it works fine.

I have ways that I think I can solve the problems and if that does
not work I can use GCD.  The problem needs fixed or you will be
left with a problem and in that case why not just remove the code
that allows you to convert Binary to Hex?

Leaving bad code is like selling milk and then the user opens the
container and finds it does not have any milk.  If you know milk is
not being put into the containers then do not sell the milk or fix it.

John Balgenorth


On Oct 2, 2014, at 8:34 AM, Richard Gaskin <ambassador at fourthworld.com> wrote:

> JB wrote:
> 
> > The code I presented was because I thought it would
> > be similar to what you already have.  It shows there is
> > not much code for that routine.
> 
> Seems like we're on the same page then.
> 
> I've missed the first several posts in this thread, so I must admit that I don't have a good understanding of the full scope of the problem, but I do maintain the belief that because LC has pretty similar code to do that sort of replacement, I suspect what's needed here could be done with LC right now.
> 
> If the problem is that the source text is Unicode, a simple binary replace may not suffice, since it can be difficult to know the boundaries between glyphs.
> 
> For example, if you were replacing "AA" with "BB", if your source had:
> 
>    BB BA AB AA
> 
> ..then you'd wind up with:
> 
>    BB BB BB AA
> 
> If this is Unicode we're dealing with, you may find LiveCode 7 can handle this quite well using the built-in replace command, as it understands glyph boundaries well.
> 
> But even in LiveCode 6.x, I'll bet there's a way to solve with what we have right now, though it may be slower.
> 
> 
> > If I was going to suggest code to replace the code that is being
> > used I would strongly suggest Grand Central Dispatch (GCD).
> 
> LC now includes enhanced parallelism, though mostly for graphics at this time.  It may even be that the Mac build uses GCD to help with that (being Apache licensed it's compatible with the GPL that governs the Community Edition).
> 
> But how would parallelism benefit a binary replacement?  Is the data set unusually large?
> 
> I would expect/hope that the new multi-core optimizations in LC could one day be extended with an exposed API for scripting.  Perhaps this may be a good test case for exploring those ideas.
> 
> 
> > So I have been attacked at many levels for many years and when
> > I expose a serious problem with code in LiveCode and someone
> > taunts me or LiveCode I do not find it any more fun than someone
> > kicking me after others have attacked me from behind.  That is the
> > same attitude people gave me when they would steal my supplies
> > and tools from my electrical contracting business and intentionally
> > over charge me constantly.  I wrote a program to catch the over
> > charging but even that takes time out of your life and they know
> > what they are doing and they enjoyed it.  You learn to deal with it
> > or you break and they are not held accountable because they will
> > say it was a mistake.  Things are a lot worse than you are aware
> > of in the business world unless you are connected to this group.
> 
> I'm sorry to hear that you've had such experience with your business, but please let me assure you no one here means to do you any harm.
> 
> On the contrary, Dr. Hawkins was merely poking fun at C rather than you, and my only interest here is in helping you get what you want from LiveCode.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at FourthWorld.com                http://www.FourthWorld.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list