posittion of an item in a list

@ DJ Bazzie Wazzie.

  • I am a lazy bugger, I figure I outsource my problem to the Objective-C runtime! :slight_smile:

When they designed the Unix Os, they went for case-sensitivity, as every command and everything would then perform faster. That was what I meant.

I never tried V8. IMHO There is no beauty in Javascript, but it is a good language. Ther are other things to AS, like Closures, that makes you able to “configure” script objects runtime.

I find Objective-C to save typing, it also uses the run time cache. Believe it or not, when working with data intensive stuff, or when the cache is loaded, even Java and C# performs better than C++.

And then there is the avoidance of writing all the boiler plate code. Include guards… And shooting of your foot occasionally. Well. What can I say. Objective-C is the closest I’ll ever get to finding a perfect languange. :slight_smile:

But my point was that with AS you don’t know if which code is actually called and how it’s done. There is tons of overhead that we know there is but know exactly know how/what it looks like.

In high level lanaguages of today, besides in IMHO not so practical C/C++, you really have no clue, as it is what other stuff that happens in the OS, and in the run time cache that determines that. You don’t even really know for sure, as you don’t really know what processes are competing for instruction cycles.

That was my personal views I do understand yours. This is really more about feelings, but I like that the TIDs works like they should. :smiley: It is at least much better to have them, and their benefits, than not. Given that AS performs like it does.

@adayzdone

Good to see that you are good in the shitty weather.

That link, would be with relation to my handler for finding items in sublists, not the binary handler. And that is very correct. That handler is the one I am most proud of, and it would never have seen daylight without Nigel’s foundation.

McUsr,

It’s certainly an personal choice. I come from an era of assembly and BASIC and later C but also learned creating machines using PLCs or micro controllers. So for many years i’ve worked closely with the instruction sets and how hardware actually works. Maybe that’s the reason why I mainly develop core features rather than complete applications.

How about prototyping? But that wasn’t what I meant, syntax doesn’t say anything about performance because OSA script with JavaScript syntax will perform different than JavaScript run by V8. Even JavaScript runs differently between browsers. Even Chome and Safari uses the same HTML renderer but the JS interpreters are different and till today Google provides the best JS Interpreter.

I think this is very funny. For the last year(s), since the byte code interpreter is significant improved, Java developers keeps saying it can be faster than C++. IMO only bad C++ developers would/can only say that. I have to say that some classes are poorly written in C++, for instance I use third party or own written classes because they are ten times faster than classes found in STD. Google published a paper that still Java 64-bit is 5.6 times slower than C++, there are many things that are better in Java but performance isn’t one of them. For me Google created good benchmark, they had no interest in giving C++ or Java any advantage and the code was very basic with very much handling which is very good.

Hello!

I come from about the same things, different assembly languages 68K, and 86, pascal as an addon, to your list microcontrollers later with far harder assemblers, there were times, I fired up Turbo-C IDE instead of writing a batch file. I like system stuff, and applications that integrates nicely, that makes Apple Mac Os X, the perfect platform.

On a general basis, about what you are saying about JavaScript, and the practical implementation, that is my point of the whole debacle. For communications betweeen Apple Applications, Applescript is not only simply the best, it is sexy too. :slight_smile: That is my view of it.

I like that there is no prototyping, or class definitions, it is a sexy dirty hot scripting language, that works reasonably fast. Python and Ruby would have otherwise been my choice of scripting language. (Not perl!!!)

I hate Java, and C++ really. I find Objective-C to be slick, and according to Apple, twice or thrice as slow as C++. I live very good with that, I can’t circument C++ as well, but every line without it, is a bliss!

Speaking of Google, you should have a look at Go, which closely resembles some of the features of Objective-C and C#. I have nothing against C# except for the fact that it may take a toll to get something working with it.

When the run time cache is loaded, things, at least somethings may run very fast with byte-code languages.

Each for his own. Objective-C is so me. And this is my last post, I understand your viewpoints well, as I think you understand mine. :slight_smile:

I’ve looked into it a few years back and it was pretty basic, as a new born language is. I’ve never looked back but maybe I will, because your enthusiasm makes me curious.

p.s. good discussion right after my vacation :smiley: (haven’t written any code for three weeks)

I am not that enthausiastic about Go, I just note me the direction that real languages are heading for solving big problems, they are following in the footsteps of Objective-C really, in some ways.

I am enthausiastic about Objective-C. I didn’t like the look of the code for a long time, the use of brackets, but now I am fine with it. :slight_smile:

Hello

As I am lazy, and as ASObjC Runner is always loaded on my achine, I would use :


set X to {"Albert", "John", "Mike", "Bill", "John", "Gaston"}

tell application "ASObjC Runner"
	set y to look in list X matching "John"
	--> {2, 5}
end tell

Yvan KOENIG (VALLAURIS, France) mardi 30 octobre 2012 18:53:12

More likely this one. A couple of the variable names have been changed, but Adam’s capital L has survived! :wink: Otherwise it’s here and here, but I haven’t been able to find the version Adam was quoting.

Hope you and yours are surviving the storm. :confused:

Hello.

This is even better, and at least hard to make fast with text item delimiters. You then have to do tricks, to get every occurence. AsobjC Runner is definitively a solution to look into.

Thanks for the thoughts guys. Being stuck inside for two days has given me a chance to catch up in the forums a bit!

Actually the TIOBE Index suggests it’s now fallen behind Objective-C in popularity :wink: