i've been using ClipX on windows for quite some time, but it seems the latest version (which haven't been updated for quite some time) has some bugs, or perhaps it's windows 7 with something installed or used at the moment.
from time to time it did not catch all the "ctrl + c" events from text editors, so a couple of months ago i've moved to Ditto, which has much more features, yet at the same time can remain quite simple when in action. it can store a very large number of entries in a database that can be cleared any time and is still quite responsive when retrieving something (perhaps slightly slower that ClipX).
on the linux side of things, the only one i've tried is parcellite, which apparently to a majority of users is the best one out there.
perhaps future OS's will have native implementations of clipboard (history) managers pre-bundled.
--
Showing posts with label article. Show all posts
Showing posts with label article. Show all posts
Thursday, December 13, 2012
Thursday, June 28, 2012
#as3: callbacks for inter-object communication
[post is pending for a syntax/typo check]
in an almost non-coercive attempt, here goes a short explanation of something that has already been covered by people, perhaps much more competent than me on the specific subject. if you, at one point decided to tackle performance in as3 programming, you may have eventually bumped into the subject of memory management and whether to use the event system proposed by language specification.
the as3 event system is flawed, but certainly not that bad
going to low level programming as a distant reference, an event system does not exist until you create one as model or until the operation system's client library, somehow imposes one to you. there are various topics on this subject if the as3 event system is good or not, but it is certainly widely used, yet language experts seem to criticize it a lot, thus there are alternatives like: as3-signals, fingers, cjsignals.
when are callbacks a better alternative
in short, a callback is a function called by another function, when desired to pass an end result of some sort. when there are multiple instances of objects with hierarchy and inheritance, the as3 language specification suggest usage of the event system for communication between such. each time an event is dispatched memory is allocated for it to occupy and also there are possibly other function calls, assignments and overhead. even if garbage collection is as3 does a good job (to the extend you may not notice memory increase), why use the event system for really simple tasks in the first place?
consider a couple of display objects A, B, where A is parent to B (B instantiated in A).
the obvious way to communicate B -> A, would be to dispatch some sort of an event, signal or message (depending on the library you are using), but how about not creating any overhead and simply passing a data object, local to method in B as a parameter to method in A. if the object is small enough (and if AVM2 does a good job when doing stack handling) the lifetime of the object will span only trough the two methods and nothing will be ever allocated in memory (heap allocation). so basically what we are telling the VM (and before that the MIR optimizer and such) by doing this is in the rough lines of:
...
call method in B (call =
do calculation in method (probably using the so called "local registers")
pack result into an object
push object on the stack
grab offset of method in A via a reference
call method in A (call =
do calculation with the object (callproperty)
so no allocation and no overhead by multiple calls...but also, now consider having thousands of B instances.
here is an example using a "Delegate" object:
as3Delegate.zip
note that i advise against using "singleton" classes for inter-object communication with callbacks, unless such objects are "singletons" them self or there are no multiple instance considerations.
dynamic allocation of "enterFrame" callbacks
events such as ENTER_FRAME, that are called many times need allocation of many objects. i've read a couple of post related to the possibility of writing a different "enterFrame" and the authors have considered the method of creating a two frame MovieClip, which is basically stack-only dispatch of the event with callbacks, yet they don't find any memory or speed benefits. this is mostly, as mentioned due to the fact the GC in AVM2 is quite efficient and also due to the fact that modern machines are ridiculously fast:
http://alecmce.com/as3/replacing-enter_frame
http://blog.int3ractive.com/2010/07/myth-buster-enterframe-event.html
here is a small alternative (EnterFrame.as), which creates the two frame MovieClip dynamically instead of using library or meta data and has a much cleaner interface:
EnterFrameTest.zip
the code is based on ClipFactory by Denis Kolyako. ClipFactory is a nifty trick that creates a SWF in memory, appends a class which extends a MovieClip with a number of frames, loads the SWF, which then allows the class to be instantiated and addFrameScript() used on the frames.
EnterFrame has stop(), start(), setCallback(somemethod)
there are some drawbacks-to-callbacks
- not possible to make this work for native events such as mouse and keyboard actions, since as3 uses the event model strictly and does not provide alternatives. the criticism which was present in as2 due to a sparse implementation has turned into a restriction in as3.
- having only one centralised model for inter object communication is never a bad thing.
- closely related to the previous note, code obfuscation can become an issue when using callbacks, due to every programmer having a different naming conversation (this is a problem which an event / signal / message system certainly can solve quite well).
any event model does not cause stalls until proven guilty
and that pretty much sums it up, considering the cpu power available on the market currently. if you do not wish to optimize your message / event / signal passing method you can pretty much stay with the defaults, by proposal and if you find the interface comfortable enough, of course. in fact modern cpu are so fast that you may be hardly able to profile any code execution in research, thus leaving you with the question - "is it really worth it to even bother?".
--
Sunday, June 17, 2012
#first impressions on the GO programming language
http://golang.org/
disclaimer: this article will not show much, other than submitting a surface look over the language. positive:
after doing the tour at golang i can say that i like the language a lot. i've also enjoyed watching some lengthy lectures. the syntax is mostly c based, while it grabs a little bit from other languages, yet also introduces some new concepts with an old-school twist.
- easy to get into for everyone with a little bit of background in languages like c, c++, java, python etc. it took me a couple of days to memorize a decent portion of the syntax and library calls.
- the compilers are bit wip at this point, but already very potent at the same time
- easy string and array manipulation
- functions are objects
- adding methods is possible to every type (e.g. primitives - int, float)
- concurrent programming with the goroutines and channels is pretty cool
- package download and install is very easy with the 'go' tool (go get / go install)
- its possible to easily wrap c libraries and program in go (see the winapi example bellow).
negative:
there are some huge articles on the web that explain some of the negative sides of go. for me personally i would point out:
- garbage collected - the argument here is that modern runtime execution, can handle heap allocation quite easily. i would say that this is pretty much true for modern machines, but not the case if the same program is brought to older computers. while an optional garbage collector might be a cool feature, to my knowledge this might be a complication. on the other hand, modern java and actionscript 3.0 are proofs that garbage collectors are pretty efficient. i think thought, that this feature alone might be a deal breaker for some purists.
- large executable sizes - not a big issues, but since the go runtime runs on top of an os, which is probably build in c, it statically links all its libraries into one big executable. not that big, but >= 1.x MB, which makes it not suitable for size-programming - e.g. demoscene material. but certainly not a deal breaker for a large group of developers and considering the disk sizes available.
- at this point, remains slower than well optimized c (e.g. gcc -O3) - comparisons
a WINAPI test:
--
disclaimer: this article will not show much, other than submitting a surface look over the language. positive:
after doing the tour at golang i can say that i like the language a lot. i've also enjoyed watching some lengthy lectures. the syntax is mostly c based, while it grabs a little bit from other languages, yet also introduces some new concepts with an old-school twist.
- easy to get into for everyone with a little bit of background in languages like c, c++, java, python etc. it took me a couple of days to memorize a decent portion of the syntax and library calls.
- the compilers are bit wip at this point, but already very potent at the same time
- easy string and array manipulation
- functions are objects
- adding methods is possible to every type (e.g. primitives - int, float)
- concurrent programming with the goroutines and channels is pretty cool
- package download and install is very easy with the 'go' tool (go get / go install)
- its possible to easily wrap c libraries and program in go (see the winapi example bellow).
there are some huge articles on the web that explain some of the negative sides of go. for me personally i would point out:
- garbage collected - the argument here is that modern runtime execution, can handle heap allocation quite easily. i would say that this is pretty much true for modern machines, but not the case if the same program is brought to older computers. while an optional garbage collector might be a cool feature, to my knowledge this might be a complication. on the other hand, modern java and actionscript 3.0 are proofs that garbage collectors are pretty efficient. i think thought, that this feature alone might be a deal breaker for some purists.
- large executable sizes - not a big issues, but since the go runtime runs on top of an os, which is probably build in c, it statically links all its libraries into one big executable. not that big, but >= 1.x MB, which makes it not suitable for size-programming - e.g. demoscene material. but certainly not a deal breaker for a large group of developers and considering the disk sizes available.
- at this point, remains slower than well optimized c (e.g. gcc -O3) - comparisons
a WINAPI test:
/*
file: testwinapi.go
go! winapi test using "go-winapi":
http://github.com/lxn/go-winapi
*/
// this package
package main
// package imports
import (
"os"
"fmt"
"syscall"
"unsafe"
"github.com/lxn/go-winapi"
)
// variables
var (
oldWndProc winapi.HWND
)
// constants
const (
winWidth int32 = 300
winHeight int32 = 200
)
// string to int16(utf) helper function
func _S(_srt string) *uint16 {
return syscall.StringToUTF16Ptr(_srt)
}
// window procedure
func WndProc(hwnd winapi.HWND, msg uint32, wparam uintptr, lparam uintptr) uintptr {
switch msg {
case winapi.WM_CLOSE:
winapi.DestroyWindow(hwnd)
case winapi.WM_DESTROY:
winapi.PostQuitMessage(0)
}
// call original procedure
return winapi.CallWindowProc(uintptr(oldWndProc), hwnd, msg, wparam, lparam );
}
// main
func main() {
var message winapi.MSG
var hwnd winapi.HWND
var wproc uintptr
// create a message box
winapi.MessageBox(0, _S("some text"), _S("tittle"), 0)
// create an edit window
hwnd = winapi.CreateWindowEx(
winapi.WS_EX_CLIENTEDGE,
_S("EDIT"),
_S("test window"),
winapi.WS_OVERLAPPEDWINDOW,
(winapi.GetSystemMetrics(winapi.SM_CXSCREEN) - winWidth) >> 1,
(winapi.GetSystemMetrics(winapi.SM_CYSCREEN) - winHeight) >> 1,
winWidth,
winHeight,
0,
0,
winapi.GetModuleHandle(nil),
unsafe.Pointer(nil))
// create callback, set procedure, show window
wproc = syscall.NewCallback(WndProc)
oldWndProc = winapi.HWND(winapi.SetWindowLong(hwnd, winapi.GWL_WNDPROC, int32(wproc)))
winapi.ShowWindow(hwnd, winapi.SW_SHOWDEFAULT)
// dispatch message
for {
if winapi.GetMessage(&message, 0, 0, 0) == 0 {
break
}
winapi.TranslateMessage(&message)
winapi.DispatchMessage(&message)
}
// print handle and exit
fmt.Println("hwnd =", hwnd);
os.Exit(int(message.WParam))
}
--
Thursday, March 1, 2012
#first impressions on an android phone
i've recently purchased an android enabled phone as a gift for a relative of mine and was able to play with the device for a while.
it has a MediaTek cpu from 2009 (ARM), which is a bit slow, but has a pretty nice set of features. here is a complete design/data sheet:
http://sites.google.com/site/neolit123/Home/MT6516_Design_Notice_V1.0.pdf
the market is currently flooded with phones using this cpu, which is actually a good thing for people in general, since they have the option to buy something "simpler" and not spend a lot of money on products from the leader manufacturers.
the android os itself (2.x at least), is quite well put for the end user, i must say - with a lot of options and good looking interface. as a more "low-level" os user, i might actually need something a tad-more in the lines of root access for the os, yet in the same time i'm quite tired of editing linux configuration files...editing configuration files on a modern os i think is usually a bad (or flawed / incomplete) design and unfortunately this is the case every time i install a modern linux distribution. actually this has been the major reason i slightly prefer windows, even for programming, while it's lacking a library / package manager or the idea of a such. obviously a very subjective matter, of course.
on the topic of stability, i've found one bug so far, where in a certain scenario you need to restart the device before using the android market, since it says "no space available", even if there is space. that's not a big issue though and hopefully nothing else comes up.
as far as my current cell phone goes, i'm still rocking an old nokia from 2003. i guess i mostly use phones for...well - answering calls and calling people.
it has a MediaTek cpu from 2009 (ARM), which is a bit slow, but has a pretty nice set of features. here is a complete design/data sheet:
http://sites.google.com/site/neolit123/Home/MT6516_Design_Notice_V1.0.pdf
the market is currently flooded with phones using this cpu, which is actually a good thing for people in general, since they have the option to buy something "simpler" and not spend a lot of money on products from the leader manufacturers.
the android os itself (2.x at least), is quite well put for the end user, i must say - with a lot of options and good looking interface. as a more "low-level" os user, i might actually need something a tad-more in the lines of root access for the os, yet in the same time i'm quite tired of editing linux configuration files...editing configuration files on a modern os i think is usually a bad (or flawed / incomplete) design and unfortunately this is the case every time i install a modern linux distribution. actually this has been the major reason i slightly prefer windows, even for programming, while it's lacking a library / package manager or the idea of a such. obviously a very subjective matter, of course.
on the topic of stability, i've found one bug so far, where in a certain scenario you need to restart the device before using the android market, since it says "no space available", even if there is space. that's not a big issue though and hopefully nothing else comes up.
as far as my current cell phone goes, i'm still rocking an old nokia from 2003. i guess i mostly use phones for...well - answering calls and calling people.
--
Friday, February 10, 2012
#mini rant about ACTA (part 01)
people have been protesting a lot recently about ACTA, as its getting real close for it to be being voted now (from wikipedia: "The treaty is according to Article 39 open for signature until 31 March 2012 for the participants involved in the negotiations as well as all members of the World Trade Organization (WTO) of which the participants agree"). basically, the also so discussed, SOPA and PIPA were in fact less evil than this, due to the essence of ACTA itself and also to its magnitude - the number of the countries involved. in the wikipedia article about it, a world map is shown and the list of participants is slightly scary...but lets think about it for a while...
i'm not much into politics and economics, but i can definitely make some speculations. for example:
- japan being the so called "initiator" of the agreement may in fact be a muppet of the united states and its parties with massive interests like the MPAA.
- perhaps SOPA and PIPA were designed only to draw some initial public fire and were never intended to pass at all.
- and also another crazy one might be that ACTA is only interested in the internet part and the whole "trade agreement" while the restrictions on medicine (etc..) are just for masking the "real deal"
...but these are just my speculations and can easily go into a "conspiracy theories" column.
its pretty safe to say that most european countries are interested into ways of limiting piracy of software, media and having a better control of what people do that may impair industries economically. the now heavily generalized term "open source" (not only for software, but for any public research for good or bad), they do not enjoy at all, but also they do realize that enforcing great restrictions on small parties on what they do with their time spent on medicine research, crops research or torrent downloading, will not be democratic at all.
for example, a certain political group that has the current power, knows that voting for/accepting this agreement will pretty much "put their heads in the bag" - in a way they will be screwed on the next elections, as most young people or pretty much all people with possession of basic intellectual properties will never vote for them ever again. this is one of the main reasons i think ACTA will not pass in sane european governments. i really cannot say the same for other countries...but, if great deal of corruption is involved (where for example members of a political group will be well "compensated' for their efforts) i can see this passing - after all, everyone is mostly interested in power, more power and making more money while in power to ensure safety for their families for generations ahead.
i remember reading about ACTA a while back and in general word about it was around for quite some time.
in regard of free software and its distribution, this so called "trade agreement" will make a big impact. here is what FSF has to say on the subject (article from 2008):
http://www.fsf.org/campaigns/acta/
--
i'm not much into politics and economics, but i can definitely make some speculations. for example:
- japan being the so called "initiator" of the agreement may in fact be a muppet of the united states and its parties with massive interests like the MPAA.
- perhaps SOPA and PIPA were designed only to draw some initial public fire and were never intended to pass at all.
- and also another crazy one might be that ACTA is only interested in the internet part and the whole "trade agreement" while the restrictions on medicine (etc..) are just for masking the "real deal"
...but these are just my speculations and can easily go into a "conspiracy theories" column.
its pretty safe to say that most european countries are interested into ways of limiting piracy of software, media and having a better control of what people do that may impair industries economically. the now heavily generalized term "open source" (not only for software, but for any public research for good or bad), they do not enjoy at all, but also they do realize that enforcing great restrictions on small parties on what they do with their time spent on medicine research, crops research or torrent downloading, will not be democratic at all.
for example, a certain political group that has the current power, knows that voting for/accepting this agreement will pretty much "put their heads in the bag" - in a way they will be screwed on the next elections, as most young people or pretty much all people with possession of basic intellectual properties will never vote for them ever again. this is one of the main reasons i think ACTA will not pass in sane european governments. i really cannot say the same for other countries...but, if great deal of corruption is involved (where for example members of a political group will be well "compensated' for their efforts) i can see this passing - after all, everyone is mostly interested in power, more power and making more money while in power to ensure safety for their families for generations ahead.
i remember reading about ACTA a while back and in general word about it was around for quite some time.
in regard of free software and its distribution, this so called "trade agreement" will make a big impact. here is what FSF has to say on the subject (article from 2008):
http://www.fsf.org/campaigns/acta/
--
Labels:
article
Friday, January 20, 2012
#careerist folk
from time to time, i see people with impressive linkedin profiles - with at lot of past experience from major companies, a biography written in third person, graduated from multiple good universities with a masters degree, asking rather simple (and/or odd, fundamental) questions on mailing lists and forums.
while such questions might be in reality not so simple (being related to complicated fields like dsp, electronics, programming), what puzzles me the most is that according to their linkedln profiles, they should already know the answers and shouldn't be asking such questions at all in the first place.
i can only draw the following conclusions:
- they were just lucky not to be given work that required them to understand such matter.
(or the more drastic ones)
- they were very robust into their pursue of career, in such a way the they were able to march between the water drops, even if incompetence was at hand at a given moment in time.
- such people had good connections and were able to work without strict demands from their employers.
- they have mojo? most good looking women tend to have a lot of that.
in the non-materialistic sense, while knowledge might be more important than making money or being famous and respected, of course there is nothing wrong in pursuing a career in the field you enjoy. i often times wonder to what extent people (especially from academia), tend to push them self just to get that position at company x.
in any way, i think one shouldn't judge a person just from a well written biography.
--
Labels:
article
Sunday, October 23, 2011
#articles on object-oriented design in c
here are, a couple of articles by Neil Brown (from june this year @ lwn.net), that explain some of the methods used in the linux kernel to provide virtual function tables and data inheritance in c.
Object-oriented design patterns in the kernel, part 1
Object-oriented design patterns in the kernel, part 2
--
Object-oriented design patterns in the kernel, part 1
Object-oriented design patterns in the kernel, part 2
--
Sunday, February 27, 2011
#"optimal-l" filters
after having discussions with some very kind people on the topic of "legendre / optimal-l" filters, we have ended up expanding its knowledge base a bit more. i have written a short article providing maxima files for calculating n-th order of the filter, also there are links to the original papers and list of the people involved.
https://sites.google.com/site/neolit123/home/legendre_filters
lubomir
https://sites.google.com/site/neolit123/home/legendre_filters
lubomir
Monday, January 31, 2011
#web programming hustle
the following image tells a lot about web design, web programming, web development etc :-):

true for those who have done much of that already or simply a warning for those who plan to start in the near future.
the image comes from this (rather old but still sort of topical) blog post:
http://www.werkkrew.com/2008/08/05/web-development-sucks/
true for those who have done much of that already or simply a warning for those who plan to start in the near future.
the image comes from this (rather old but still sort of topical) blog post:
http://www.werkkrew.com/2008/08/05/web-development-sucks/
Monday, May 24, 2010
#iso c/c++: runtime and static assertion for gcc 4.4.0+
re: axonlib
we've made some very good progress on the library. v.0.1.0 is about to be released soon. we now have image transparency, scalable images, a lot of widgets, a custom set of stdlib routines for string and memory, a rather fragmenting but fast custom memory allocator and other. also we are now not using heavy c++ types such as 'vector' any more, while 'iostream' is only used for debug builds.
i have made a little page to write some articles on programming methods, optimization techniques, assembler trick and other things i've learned over the years or just recently.
http://sites.google.com/site/neolit123/
as far as programming goes i may be focusing more on assembler and c over c++ and higher level languages.
the first article that is done now is about assertion:
http://sites.google.com/site/neolit123/home/lassert
the original methods are part of axonlib but i release these to the public (under a fairly permissive license) as _none_ of the examples in the internet that i've tried out of interest worked properly and gave errors / warnings for either c or c++ code with the gcc compiler.
[edit] actually the following seems to work as well with not much overhead:
..and is a portable solution, but not very useful because the macro will expand to a switch call but in the same time (e) has to be a constant.
we've made some very good progress on the library. v.0.1.0 is about to be released soon. we now have image transparency, scalable images, a lot of widgets, a custom set of stdlib routines for string and memory, a rather fragmenting but fast custom memory allocator and other. also we are now not using heavy c++ types such as 'vector' any more, while 'iostream' is only used for debug builds.
i have made a little page to write some articles on programming methods, optimization techniques, assembler trick and other things i've learned over the years or just recently.
http://sites.google.com/site/neolit123/
as far as programming goes i may be focusing more on assembler and c over c++ and higher level languages.
the first article that is done now is about assertion:
http://sites.google.com/site/neolit123/home/lassert
the original methods are part of axonlib but i release these to the public (under a fairly permissive license) as _none_ of the examples in the internet that i've tried out of interest worked properly and gave errors / warnings for either c or c++ code with the gcc compiler.
[edit] actually the following seems to work as well with not much overhead:
#define STATIC_ASSERT(e) switch(0) { case 0: case (e): ; }
/*
resulting in two errors:
file:line: error: duplicate case value
file:line: error: previously used here
*/
..and is a portable solution, but not very useful because the macro will expand to a switch call but in the same time (e) has to be a constant.
Tuesday, March 9, 2010
#gcc: speed-tests, inline assembly & volatile declarations
here are some quick tests with gcc (3.x / 4.x) and axonlib.
note: "axAbs" (alt: fabs) and "axExp" (alt: expf) are part of "axMath.h"
[*] gcc speed comparison (win32)
gcc-3.4.2 is the official mingw build, while gcc-4.4.1 is an unofficial build.
test::
n of iterations:
10e+6
calculation:
expf(axAbs(-3.141592))
flag: -O2
gcc-3.4.2: 143 ms
gcc-4.4.1: 6 ms
flag: -O3
gcc-3.4.2: 130ms
gcc-4.4.1: 5ms
conclusion:
gcc-4.4.1 generates faster code.
[*] gcc: macros vs inline functions.
an article with some more in depth information.
test::
n of iterations:
10e+6
calculation:
axAbs(x) in the forms of macro vs inline and expf(x) for weight.
flag:
-O2
gcc-3.4.2:
macro: 143ms
inline: 145ms
gcc-4.4.1:
macro: 5ms
inline: 6ms
conclusion:
inline functions are safer. not much difference in performance.
[*] gcc: to "volatile" or not and its impact on performance.
a volatile declared function or variable will not be optimized.
quote:
(on writing code for hardware control) Any self-respecting optimizing compiler would notice that the loop tests the same memory address over and over again. It would almost certainly arrange to reference memory once only, and copy the value into a hardware register, thus speeding up the loop. This is, of course, exactly what we don't want; this is one of the few places where we must look at the place where the pointer points, every time around the loop.
test:::
asm volatile (..) vs asm (..)
calculation:
axExp(x)
n of iterations:
10e+7
flag::
-O2
gcc-4.4.1:
asm volatile: 298ms
asm: 2ms
gcc-3.4.2:
asm volatile: 291ms
asm: 13ms
flag::
-O3
gcc-4.4.1:
asm volatile: 297ms
asm: 2ms
gcc-3.4.2:
asm volatile: 290ms
asm: 12ms
conclusion:
functions declared as "volatile" perform much slower from both compilers.
----------
tested with athlon xp 1800+
lubomir
note: "axAbs" (alt: fabs) and "axExp" (alt: expf) are part of "axMath.h"
[*] gcc speed comparison (win32)
gcc-3.4.2 is the official mingw build, while gcc-4.4.1 is an unofficial build.
test::
n of iterations:
10e+6
calculation:
expf(axAbs(-3.141592))
flag: -O2
gcc-3.4.2: 143 ms
gcc-4.4.1: 6 ms
flag: -O3
gcc-3.4.2: 130ms
gcc-4.4.1: 5ms
conclusion:
gcc-4.4.1 generates faster code.
[*] gcc: macros vs inline functions.
an article with some more in depth information.
test::
n of iterations:
10e+6
calculation:
axAbs(x) in the forms of macro vs inline and expf(x) for weight.
#define t0(x) \
({ \
register float _x; \
__asm__ ( "andl $0x7fffffff, %0;" : "=r" (_x) : "0" ((float)x) ); \
expf(_x); \
})
// -- vs --
inline float t1(float x)
{
__asm__ ( "andl $0x7fffffff, %0;" : "=r" (x) : "0" (x) );
return expf(x);
}
flag:
-O2
gcc-3.4.2:
macro: 143ms
inline: 145ms
gcc-4.4.1:
macro: 5ms
inline: 6ms
conclusion:
inline functions are safer. not much difference in performance.
[*] gcc: to "volatile" or not and its impact on performance.
a volatile declared function or variable will not be optimized.
quote:
test:::
asm volatile (..) vs asm (..)
calculation:
axExp(x)
n of iterations:
10e+7
flag::
-O2
gcc-4.4.1:
asm volatile: 298ms
asm: 2ms
gcc-3.4.2:
asm volatile: 291ms
asm: 13ms
flag::
-O3
gcc-4.4.1:
asm volatile: 297ms
asm: 2ms
gcc-3.4.2:
asm volatile: 290ms
asm: 12ms
conclusion:
functions declared as "volatile" perform much slower from both compilers.
----------
tested with athlon xp 1800+
lubomir
Wednesday, May 13, 2009
#dBFS calculator
Here is a simple dBFS calculator:
You can download it in Flash SWF format or as a C source / Win32 binary (binary compiled with the DJGPP online-compiler).
The summing of decibel values is a bit of a confusing subject, i believe because decibels are units with no dimension (ratio like %) and also that they are logarithmic.
You can read this whole article for more information:
http://www.homeandprojectstudio.com/features/feature001.html
...Using dB FS (full-scale) in digital audio means that a change of +6 dB FS is the same as +10 dB spl (sound pressure level); in other words, twice as loud. How can this be? We know that each bit in a digital audio system increases the sampling resolution by approximately 6 dB. In essence, each bit represents an exponential increase in the sampling resolution, doubling the value with each bit. That’s why in a digital audio system, +6 dB FS, and not +10 dB spl, represents a doubling in sound levels. Not coincidentally, this corroborates the earlier statement that an increase of 6 dB is really a doubling of sound pressure, although not the perceived doubling of sound pressure. This is true for both analog and digital measurements.
The important bit here is to learn to distinguish different types of measurement (decibels). What you are seeing on the meters in your audio program is dbFS originally designed for ADCs (analog-to-digital converters) and assimilated by modern audio tools. dbFS is the reverse of dbSPL.
The above article explains an easy way to sum dbSPL values and also provides a table to convert dbSPL to dbFS (16bit only):
If you have 80dbSPL + 80dbSPL the result would be approx 83dbSPL (80+3), because the difference between the two is 0 units - from the "rule of thumb".
--------
a dbSPL calculator works with the following equation:
where "input1" and "input2" are the dbSPL (!!) values you want to sum. 80db+80db=83db
--------
to sum two sinewaves in your audio program (with dbFS measures):
But why 20*? Here is a explanation quote from wikipedia:
20 log rule, and similarly the formula for ratios of powers is the 10 log rule, and similarly for other factors. The factor of 20 is explained as: 10 is because it is in decibels (10ths of bels), and 2 is because it is a ratio of powers (squares of amplitudes): the product is 20.
So result for the sum of -9dbFS and -9dbFS, would be -2.97940008672037 for equal input/output impedance.
Lubomir
You can download it in Flash SWF format or as a C source / Win32 binary (binary compiled with the DJGPP online-compiler).
The summing of decibel values is a bit of a confusing subject, i believe because decibels are units with no dimension (ratio like %) and also that they are logarithmic.
You can read this whole article for more information:
http://www.homeandprojectstudio.com/features/feature001.html
The important bit here is to learn to distinguish different types of measurement (decibels). What you are seeing on the meters in your audio program is dbFS originally designed for ADCs (analog-to-digital converters) and assimilated by modern audio tools. dbFS is the reverse of dbSPL.
The above article explains an easy way to sum dbSPL values and also provides a table to convert dbSPL to dbFS (16bit only):
If you have 80dbSPL + 80dbSPL the result would be approx 83dbSPL (80+3), because the difference between the two is 0 units - from the "rule of thumb".
--------
a dbSPL calculator works with the following equation:
result = 10*(log(10^(input1/10)+10^(input2/10))/log(10)where "input1" and "input2" are the dbSPL (!!) values you want to sum. 80db+80db=83db
--------
to sum two sinewaves in your audio program (with dbFS measures):
result = 20*(log(10^(input1/20)+10^(input2/20))/log(10)But why 20*? Here is a explanation quote from wikipedia:
So result for the sum of -9dbFS and -9dbFS, would be -2.97940008672037 for equal input/output impedance.
Lubomir
Monday, May 11, 2009
#BBE Sonic Maximizer 482i circuit explained
update dec. 2011
we had a small debate with mr. domino49 at the cockos forums:
here
we were mainly discussing what is the correct way to write an open source, DSP version of the unit using the JesuSonic platform, since his initial proposal was using only RC filters (first order passive cross-over).
i think the version in the first post (#1) is still a bit incorrect (phase of HF), but you can see a couple of realizations from me in the thread:
- post #20 - this is a version using a second order crossover using digital biquads and has a program controllable gain for the HF.
- post #66 - this is a version that uses a digital state variable implementation, but does not have the program controllable HF.
bellow is my old review / article:
"Is the bbe sonic maximizer just a 2-band eq?"
A similar question has been asked on some forums, so i've decided to find out by searching for a schematic of a BBE SM unit and found this link via google:
http://www.radio-flier.com/PDF%20Files/BBE%20482i.pdf
Without checking the website from which the pdf file originated i wrote a quick review of the schematic.
And it seems i've doubled some things already written in there...apparently this pdf schematic extends the bbe schematic with the contents of the NJM2153 chip - the original schematic has only one big chip from a japanese manufacturer, which in a way hides all the processing in the unit.
So more useful info on BBE SM here:
http://www.radio-flier.com/bbe_data.htm
Thanks to Tom Farrand for reconstructing the 482i sheet with the NJM2153!
Here is my review:
Quote from the bbe website on the 482i:
"The 482i Sonic Maximizer restores an audio signals natural brilliance and clarity by the use of two primary functions. First it adjusts a signal’s phase relationships between it’s low, mid and high frequencies while progressively adding longer delay times to lower frequencies, this creates a kind of “mirror curve created by the speaker neutralizing its phase distortion. Secondly the Sonic Maximizer augments higher and lower frequencies; loudspeakers tend to be less efficient in their extreme treble and bass ranges. The end result is a dynamic program-driven restoration without the ear fatigue that is normally experienced with the use of equalizers or exciters."
+ A look at this sheet of a 482i channel.
http://www.radio-flier.com/PDF%20Files/BBE%20482i.pdf
At first sight, it looks like a 3 band second-order splitter (multiband). this is achieved with what they call "pseudo state variable filter". Phase shifting (band split) is present for each band !even! if "process" is set to 0 - i.e. fx is part of the signal chain (not bypassed). The band-splitting is not controlled by the process knob.
The delay for the bands which BBE state is present, can be accomplished with a capacitor discharge, however I can't seem to find this in the sheet. Another way to do the delay, would be with separate buffer for this band, which stores the signal and plays it back with a delay. This type of design goal isn't something new and if you do it right, it can improve the sound trough certain speakers (a tweak for better acoustics). But how would you compensate for IIR phase shifts with a constant delay value? Phase correction with All-pass? This won't make the filter linear-phase.
There is a low-band amplification with a potentiometer which is not a low-shelf filter - this is just a band boost. Same goes for the 'process' knob, it boosts the top-band. for the top-band signal path we see voltage-controled-amp (VCA), which has its control voltage trough a peak-detector. The peak-detector works with the non-filtered signal and increases/decreases the control voltage of the VCA. The summed voltage from the peak detector trough the VCA, should add more to the high frequency content and act like an exciter. Btw i've never seen a VCA the way its drawn in this sheet, so i can't say for certain if it does what I've described above.
Another thing to take note here are the input/output buffers.
- By looking at the input buffer, I believe this is just for impedance accomodation between the input (jack) and the next stages filter/pd, this is required in most cases. I have some doubts that the input buffer acts like an allpass filter and that the necessary impedance accomodation is made with just R30.
- The output buffer looks more complicated: there is a what its called a frequency dependent inverting operational amplifier. What it does is - it doesn't amplifies frequencies above certain range (10khz for example), also it sums the three bands. This can be used to compensate for the harmonic boost of the high end. After that i see a one pole high-pass filter (RC), which i think they use only to band-limit lower frequencies (for example below 10hz) - the capacitor C20 takes care of that.
There is no potentiometer on the output stage, because i see there is no "output gain" control for separate channels on the 482i.
Summary:
There are a couple of mysteries (things i'm not certain of) in here, but the design does not look that complex. Also the price for a 482i is around 200$ (zsound) and it is a two channel unit - not very expensive, but still I believe you can custom build and improve the unit with a !lot! less than that.
I've heard a lot of positive and negative comments on the BBE SM units. The negative were about its sharpness on the top end (mainly in the plugin version). This may be, because of the use of cheap IIR filters and bad control for the VCA input voltage values...
From a recent discussion at music-dsp mailing list, we've agreed that by band-splitting and boosting a band (apply gain) instead of using a peak / shelf filter in the same range, you are essentially dealing with an inferior equalizer! this is due to the phase shifting at band crossovers. BBE states that they deal with this problem with one "progressive" delay shift?
But to conclude, if something is designed well and has quality elements, low noise floor, low harmonic distortion - it may sound great and even improve the sound. This type of circuit does not have much "magic" to add, but as I've said it can improve the sound if designed well. Also I don't believe that the software version will sounds better than the hardware, if modeled accurately...
Hope that helps for better understanding of this particular unit. :)
---UPDATE---
I believe I made some mistakes:
I've managed to run the old "cakewalk sonic maximizer" plugin demo (dx) with a wrapper & vst pa (from c.budde). The new bbe version from nomad factory has no demo?
So if this is accurately modeled - indeed, there is a all-pass filter with F0 at 700hz (crossover freq)
So the "progressively adding longer delay times to lower frequencies, this creates a kind of “mirror curve created by the speaker neutralizing its phase distortion." statement is accurate in this case. All-passes can be used for this application, but this just a non-adjustable all-pass design, which cannot deal with phase distortion issues in !any! speaker.
I must admit though, that changing the top-band and low-band voltage also affects the group-delay of the sum. signal chain is: [in] -> [acmd] -> [band-split] -> [sum] -> [hp] -> [out]
Things are much more complicated than that :)
Here is an article on the subject of all-pass crossovers and phase distortion issues:
http://www.linkwitzlab.com/phs-dist.htm
Lubomir
we had a small debate with mr. domino49 at the cockos forums:
here
we were mainly discussing what is the correct way to write an open source, DSP version of the unit using the JesuSonic platform, since his initial proposal was using only RC filters (first order passive cross-over).
i think the version in the first post (#1) is still a bit incorrect (phase of HF), but you can see a couple of realizations from me in the thread:
- post #20 - this is a version using a second order crossover using digital biquads and has a program controllable gain for the HF.
- post #66 - this is a version that uses a digital state variable implementation, but does not have the program controllable HF.
bellow is my old review / article:
"Is the bbe sonic maximizer just a 2-band eq?"
A similar question has been asked on some forums, so i've decided to find out by searching for a schematic of a BBE SM unit and found this link via google:
Without checking the website from which the pdf file originated i wrote a quick review of the schematic.
And it seems i've doubled some things already written in there...apparently this pdf schematic extends the bbe schematic with the contents of the NJM2153 chip - the original schematic has only one big chip from a japanese manufacturer, which in a way hides all the processing in the unit.
So more useful info on BBE SM here:
http://www.radio-flier.com/bbe_data.htm
Thanks to Tom Farrand for reconstructing the 482i sheet with the NJM2153!
Here is my review:
Quote from the bbe website on the 482i:
"The 482i Sonic Maximizer restores an audio signals natural brilliance and clarity by the use of two primary functions. First it adjusts a signal’s phase relationships between it’s low, mid and high frequencies while progressively adding longer delay times to lower frequencies, this creates a kind of “mirror curve created by the speaker neutralizing its phase distortion. Secondly the Sonic Maximizer augments higher and lower frequencies; loudspeakers tend to be less efficient in their extreme treble and bass ranges. The end result is a dynamic program-driven restoration without the ear fatigue that is normally experienced with the use of equalizers or exciters."
+ A look at this sheet of a 482i channel.
http://www.radio-flier.com/PDF%20Files/BBE%20482i.pdf
At first sight, it looks like a 3 band second-order splitter (multiband). this is achieved with what they call "pseudo state variable filter". Phase shifting (band split) is present for each band !even! if "process" is set to 0 - i.e. fx is part of the signal chain (not bypassed). The band-splitting is not controlled by the process knob.
The delay for the bands which BBE state is present, can be accomplished with a capacitor discharge, however I can't seem to find this in the sheet. Another way to do the delay, would be with separate buffer for this band, which stores the signal and plays it back with a delay. This type of design goal isn't something new and if you do it right, it can improve the sound trough certain speakers (a tweak for better acoustics). But how would you compensate for IIR phase shifts with a constant delay value? Phase correction with All-pass? This won't make the filter linear-phase.
There is a low-band amplification with a potentiometer which is not a low-shelf filter - this is just a band boost. Same goes for the 'process' knob, it boosts the top-band. for the top-band signal path we see voltage-controled-amp (VCA), which has its control voltage trough a peak-detector. The peak-detector works with the non-filtered signal and increases/decreases the control voltage of the VCA. The summed voltage from the peak detector trough the VCA, should add more to the high frequency content and act like an exciter. Btw i've never seen a VCA the way its drawn in this sheet, so i can't say for certain if it does what I've described above.
Another thing to take note here are the input/output buffers.
- By looking at the input buffer, I believe this is just for impedance accomodation between the input (jack) and the next stages filter/pd, this is required in most cases. I have some doubts that the input buffer acts like an allpass filter and that the necessary impedance accomodation is made with just R30.
- The output buffer looks more complicated: there is a what its called a frequency dependent inverting operational amplifier. What it does is - it doesn't amplifies frequencies above certain range (10khz for example), also it sums the three bands. This can be used to compensate for the harmonic boost of the high end. After that i see a one pole high-pass filter (RC), which i think they use only to band-limit lower frequencies (for example below 10hz) - the capacitor C20 takes care of that.
There is no potentiometer on the output stage, because i see there is no "output gain" control for separate channels on the 482i.
Summary:
There are a couple of mysteries (things i'm not certain of) in here, but the design does not look that complex. Also the price for a 482i is around 200$ (zsound) and it is a two channel unit - not very expensive, but still I believe you can custom build and improve the unit with a !lot! less than that.
I've heard a lot of positive and negative comments on the BBE SM units. The negative were about its sharpness on the top end (mainly in the plugin version). This may be, because of the use of cheap IIR filters and bad control for the VCA input voltage values...
From a recent discussion at music-dsp mailing list, we've agreed that by band-splitting and boosting a band (apply gain) instead of using a peak / shelf filter in the same range, you are essentially dealing with an inferior equalizer! this is due to the phase shifting at band crossovers. BBE states that they deal with this problem with one "progressive" delay shift?
But to conclude, if something is designed well and has quality elements, low noise floor, low harmonic distortion - it may sound great and even improve the sound. This type of circuit does not have much "magic" to add, but as I've said it can improve the sound if designed well. Also I don't believe that the software version will sounds better than the hardware, if modeled accurately...
Hope that helps for better understanding of this particular unit. :)
---UPDATE---
I believe I made some mistakes:
I've managed to run the old "cakewalk sonic maximizer" plugin demo (dx) with a wrapper & vst pa (from c.budde). The new bbe version from nomad factory has no demo?
So if this is accurately modeled - indeed, there is a all-pass filter with F0 at 700hz (crossover freq)
So the "progressively adding longer delay times to lower frequencies, this creates a kind of “mirror curve created by the speaker neutralizing its phase distortion." statement is accurate in this case. All-passes can be used for this application, but this just a non-adjustable all-pass design, which cannot deal with phase distortion issues in !any! speaker.
I must admit though, that changing the top-band and low-band voltage also affects the group-delay of the sum. signal chain is: [in] -> [acmd] -> [band-split] -> [sum] -> [hp] -> [out]
Things are much more complicated than that :)
Here is an article on the subject of all-pass crossovers and phase distortion issues:
http://www.linkwitzlab.com/phs-dist.htm
Lubomir
Labels:
article,
audio,
electronics
Saturday, January 17, 2009
#"Turn me up" vs the "LW"
The loudness war takes its victims every year. Lots of CDs are released with tracks limited to the extremes and with very high RMS levels. I've recently bought a couple of electronic music CD's. The music on both CD's is great, however the levels of one of them are pushed to the limits. I end up listening more to the less maximized CD - And I honestly enjoy it much more. The same artist from the maximized CD, was a favorite of mine in the days around 1998. His style hasn't changed much but the levels of his new music are just way too much.
Some thoughts on the 'War'
The 'loudness war' hasn't stopped for many years simply because, it always comes down to the end consumer. And the average consumer's needs for quality are not well defined. If you grab a 'squashed' CD and play to a group of ten people, there is a chance, that none of them will notice the levels and sound quality of the CD. The end consumer's needs are always a priority, but they want it really loud in most cases. Some people are more interested how the record sales will go, that the quality of their music.
Artist with no technical background will always try to compete for the volume of their CD. But what about the engineer's involvement into the process? I think engineers are the ones, who are supposed to explain to the artist, that they are losing quality when the mix is pushed hard. The engineer should always give options to the artist: "Would you like it loud, with tonal balance or would you like it well balanced, not that loud, but without losing quality"? If the engineer, always gives these options to the client maybe the client will start to understand and care more about his own record.
I'm more on the hunt to buy old records which aren't remastered, than taking my chances with modern music that is squashed ('in the face'/'wall of sound') nowadays.
After all, sound quality is not a function of loudness!
'But I like to do everything myself. What levels should I aim for?'
In practice there isn't a single answer to that technical question, simply because the levels you end up with are dependent from the material you are mixing. You shouldn't compare a techno track with a chilled ambient track. The most important bit - learn to distinguish, an unnecessarily loud mix from a well balanced mix. Then try to match the levels of the well balanced mix.
'My track sounds quiet and with less energy compared to other tracks'
Do not fall into the trap. First of all, mix the levels of your track to sound normal! Have you noticed that we use the volume knob of amplifiers less these days. Technically this is not a good thing and speaks bad for the quality of the music we are listening to.
'How do we stop the war?'
As most wars, were started by 'leaders' in the history of human kind. The 'loudness war' should be stopped by the people who originally started it - those who are famous in the music industry. The 'leaders' aka the famous people/groups/bands of POP, METAL, ROCK, HOUSE, R&B music and all other modern styles. Famous mastering engineers should officially declare 'I will not master this record' if the client wants it way too lound. If you get Madonna, Metallica, Benny Benassi, Beyonce and other to release their music with the levels taken into consideration maybe the whole industry will change.
Soon...maybe next year? Not likely, If you ask me. It would be a very slow process to bring back the dynamics. Stop the war now or it will stop the record sales.
'Turn me up'
If you are an artist, a producer, engineer or just a person who appreciates quality music you can support 'Turn me up'.
http://www.turnmeup.org

Famous engineer/producer Charles Dye is behind 'Turn me up' and the idea of the project is simple. First of all its a non commercial project. If you are an artist, who is soon about to release a CD to the market, you can register for a 'Turn me up' certificate and put their logo on your CD. By doing so you can go easy on the levels and not compete with other loud mixes. If you are a mixing/mastering engineer you can offer the ideas of 'Turn me up' to your customers and not use much limiting when working on the tracks.
You can visit their website and read some of the articles on the 'Loudness war' if you are interested.
Lubomir
Some thoughts on the 'War'
The 'loudness war' hasn't stopped for many years simply because, it always comes down to the end consumer. And the average consumer's needs for quality are not well defined. If you grab a 'squashed' CD and play to a group of ten people, there is a chance, that none of them will notice the levels and sound quality of the CD. The end consumer's needs are always a priority, but they want it really loud in most cases. Some people are more interested how the record sales will go, that the quality of their music.
Artist with no technical background will always try to compete for the volume of their CD. But what about the engineer's involvement into the process? I think engineers are the ones, who are supposed to explain to the artist, that they are losing quality when the mix is pushed hard. The engineer should always give options to the artist: "Would you like it loud, with tonal balance or would you like it well balanced, not that loud, but without losing quality"? If the engineer, always gives these options to the client maybe the client will start to understand and care more about his own record.
I'm more on the hunt to buy old records which aren't remastered, than taking my chances with modern music that is squashed ('in the face'/'wall of sound') nowadays.
After all, sound quality is not a function of loudness!
'But I like to do everything myself. What levels should I aim for?'
In practice there isn't a single answer to that technical question, simply because the levels you end up with are dependent from the material you are mixing. You shouldn't compare a techno track with a chilled ambient track. The most important bit - learn to distinguish, an unnecessarily loud mix from a well balanced mix. Then try to match the levels of the well balanced mix.
'My track sounds quiet and with less energy compared to other tracks'
Do not fall into the trap. First of all, mix the levels of your track to sound normal! Have you noticed that we use the volume knob of amplifiers less these days. Technically this is not a good thing and speaks bad for the quality of the music we are listening to.
'How do we stop the war?'
As most wars, were started by 'leaders' in the history of human kind. The 'loudness war' should be stopped by the people who originally started it - those who are famous in the music industry. The 'leaders' aka the famous people/groups/bands of POP, METAL, ROCK, HOUSE, R&B music and all other modern styles. Famous mastering engineers should officially declare 'I will not master this record' if the client wants it way too lound. If you get Madonna, Metallica, Benny Benassi, Beyonce and other to release their music with the levels taken into consideration maybe the whole industry will change.
Soon...maybe next year? Not likely, If you ask me. It would be a very slow process to bring back the dynamics. Stop the war now or it will stop the record sales.
'Turn me up'
If you are an artist, a producer, engineer or just a person who appreciates quality music you can support 'Turn me up'.
http://www.turnmeup.org
Famous engineer/producer Charles Dye is behind 'Turn me up' and the idea of the project is simple. First of all its a non commercial project. If you are an artist, who is soon about to release a CD to the market, you can register for a 'Turn me up' certificate and put their logo on your CD. By doing so you can go easy on the levels and not compete with other loud mixes. If you are a mixing/mastering engineer you can offer the ideas of 'Turn me up' to your customers and not use much limiting when working on the tracks.
You can visit their website and read some of the articles on the 'Loudness war' if you are interested.
Lubomir
Sunday, January 11, 2009
#Web browsers in the beginning of 2009
The truth about Internet Explorer 7
As a regular Windows XP user, I've been testing many web projects that I'm working on with IE6 (SP2). Since IE is a browser that many people are supposed to use, I regulary check if the project has compatibility with it.
However recently I noticed that more and more new stuff isn't working quite well (or slightly out of order) with IE6. For example a button on a major site misplaced, flash player loading issues etc. So I've decided that I should upgrade to IE7. The download was 15MB. Installs ok. I did a test run. First impressions: very nice look on the buttons, text was blured by default with 'ClearType'. Some new cool settings...
But as soon as I started testing to see if those issues mentioned above are fixed not much happened. Everything was exactly the same. Lots of JavaScript in the console and blog pages which look exactly the same in Opera, Chrome & FF in IE7 had strange misplacement effects appearing all over the place . So what exactly is the IE6 to IE7 update? I have to say its similar to the update XP > Vista which I never intend to make for various reasons (But I've managed to configure Vista to run like XP on a laptop once). IE7 appears to be a fancy looking IE6. More and more developers are starting to completely ignore IE as a target browser. Well thats no good for the IE team because they would have to change a lot.
The 'innerHTML' issue in IE
The innerHTML property originated from the developers of IE at Microsoft. Its an excellent solution and it can be used instead of writing complex DOM code. 'innerHTML' treats all the nodes inside an object as a whole. If you say for example that you have a nested html tag structure... With DOM you can return the parent tag as an object by id or tagname and then via the innerHTML property you can assign the contents of this tag to a string variable. This makes things extremely easy now since you can modify this string (ex: add more tags) and then assign the modified string back to the html tag via the innerHTML property which basically will result a new structure. Sounds great! I often compare innerHTML to the PHP simpleXML extention which is also a great solution for parsing data without large sections of DOM code.
So...MS invented this awesome property but does it work under Internet Explorer? The answer is no ). IE6 returns the infamous "Unknown runtime error", IE7 does the same. Are there any workaround? Yes they are some, but this is an actual bug (described here) and some of the workarounds aren't exactly working. 'innerHTML' isn't an 'official' property but its quite fast and awesome. To sum things up MS invented something very good then their own browser has problems with it, while all other browsers get along perfectly with it.
The chrome fox in the opera
To test websites, I often run them on different browsers (Windows), so I have some ideas about how these browsers perform and what are their pluses and minuses. These are the browsers I'm testing with: Opera, IE, Firefox, Chrome. My desktop PC isn't the top of the benchmark table, but in a way that's a good thing (you can get better idea of the performance of certain software on lowend machines). It seems strange to me that some people at forums say: I run Vista on my super new computer and the OS only takes 1GB of my RAM. Well...1GB for what exactly? Your OS should take around 200MB of RAM or so. Now the same applies to how browsers should work. A browser should not be a 'CPU hog' and should not take all your RAM away. There should be absolutely no reason for doing so unless its rendering some heavy graphics in realtime or if its compiling something. Also there should be options to disable the functionality which is creating this need for extra resources.
I have to say that I'm a recent Opera to Firefox convert. I'm still a big Opera fan and I follow its development closely. Opera is the fastest and the most light browser out there but I had a lot of problems loading websites with some footprint AJAX. So I've switched to FF as my default (Most dev writes for FF as their default target btw). But then...I had the issue of huge memory leak with FF. So I had to fix this with a 'hidden' setting (in a way its not that easy for some users to find this setting without googling on the subject). I think the same solution to the problem is explained here. This issue almost send me back to Opera.
I also monitor the development Google's new Chrome browser. They have a great technology concept and a lot of unique features. So far, I'm seeing it as a faster and lighter alternative to FF. The 'import' settings from different browsers is cool too. And everything seems to open properly. But its quite stripped down and there is something very strange! If I open Youtube for example and then my mail account on another window the cpu usage goes up to 40%!?. There must be something really expensive and hidden going on (probably some sort of caching which is absolutely unnecessary). The options menu of Chrome are very simple so there is no function to disable this behavior. I have great respect for Google and I believe they will eventually add a function to disable extras.
So to sum this up: IE needs lots of work (DOM2 compitabuility, lots of bugs), Opera definitely still needs some work to support the new technologies, FF uses way too much RAM by default, Chrome needs more settings so that the user can turn of the so called 'inovative' stuff.
We end up with a slightly broken set of tools...I'm currently using a tweaked Firefox. But don't get me wrong all of the listed browsers can do their job but IMHO its just silly when you visit a site with IE and the site dev hasn't added support for it. Or when you use fresh installed FF and your RAM usage meter shows 400MB ram if you open a couple of video sites.
The future is bright
I think that all browser author companies's goal should be: To show contents of the Web in exactly the same way, while sticking to the same standards and not to force website developers to write extra code for browser compatibility. And I'm seeing more and more of that which is a very good thing. The frustration of website developers (including myself) may be eventually reduced to minimum. We shall see.
Lubomir
As a regular Windows XP user, I've been testing many web projects that I'm working on with IE6 (SP2). Since IE is a browser that many people are supposed to use, I regulary check if the project has compatibility with it.
But as soon as I started testing to see if those issues mentioned above are fixed not much happened. Everything was exactly the same. Lots of JavaScript in the console and blog pages which look exactly the same in Opera, Chrome & FF in IE7 had strange misplacement effects appearing all over the place . So what exactly is the IE6 to IE7 update? I have to say its similar to the update XP > Vista which I never intend to make for various reasons (But I've managed to configure Vista to run like XP on a laptop once). IE7 appears to be a fancy looking IE6. More and more developers are starting to completely ignore IE as a target browser. Well thats no good for the IE team because they would have to change a lot.
The 'innerHTML' issue in IE
The innerHTML property originated from the developers of IE at Microsoft. Its an excellent solution and it can be used instead of writing complex DOM code. 'innerHTML' treats all the nodes inside an object as a whole. If you say for example that you have a nested html tag structure... With DOM you can return the parent tag as an object by id or tagname and then via the innerHTML property you can assign the contents of this tag to a string variable. This makes things extremely easy now since you can modify this string (ex: add more tags) and then assign the modified string back to the html tag via the innerHTML property which basically will result a new structure. Sounds great! I often compare innerHTML to the PHP simpleXML extention which is also a great solution for parsing data without large sections of DOM code.
So...MS invented this awesome property but does it work under Internet Explorer? The answer is no ). IE6 returns the infamous "Unknown runtime error", IE7 does the same. Are there any workaround? Yes they are some, but this is an actual bug (described here) and some of the workarounds aren't exactly working. 'innerHTML' isn't an 'official' property but its quite fast and awesome. To sum things up MS invented something very good then their own browser has problems with it, while all other browsers get along perfectly with it.
The chrome fox in the opera
To test websites, I often run them on different browsers (Windows), so I have some ideas about how these browsers perform and what are their pluses and minuses. These are the browsers I'm testing with: Opera, IE, Firefox, Chrome. My desktop PC isn't the top of the benchmark table, but in a way that's a good thing (you can get better idea of the performance of certain software on lowend machines). It seems strange to me that some people at forums say: I run Vista on my super new computer and the OS only takes 1GB of my RAM. Well...1GB for what exactly? Your OS should take around 200MB of RAM or so. Now the same applies to how browsers should work. A browser should not be a 'CPU hog' and should not take all your RAM away. There should be absolutely no reason for doing so unless its rendering some heavy graphics in realtime or if its compiling something. Also there should be options to disable the functionality which is creating this need for extra resources.
I have to say that I'm a recent Opera to Firefox convert. I'm still a big Opera fan and I follow its development closely. Opera is the fastest and the most light browser out there but I had a lot of problems loading websites with some footprint AJAX. So I've switched to FF as my default (Most dev writes for FF as their default target btw). But then...I had the issue of huge memory leak with FF. So I had to fix this with a 'hidden' setting (in a way its not that easy for some users to find this setting without googling on the subject). I think the same solution to the problem is explained here. This issue almost send me back to Opera.
I also monitor the development Google's new Chrome browser. They have a great technology concept and a lot of unique features. So far, I'm seeing it as a faster and lighter alternative to FF. The 'import' settings from different browsers is cool too. And everything seems to open properly. But its quite stripped down and there is something very strange! If I open Youtube for example and then my mail account on another window the cpu usage goes up to 40%!?. There must be something really expensive and hidden going on (probably some sort of caching which is absolutely unnecessary). The options menu of Chrome are very simple so there is no function to disable this behavior. I have great respect for Google and I believe they will eventually add a function to disable extras.
So to sum this up: IE needs lots of work (DOM2 compitabuility, lots of bugs), Opera definitely still needs some work to support the new technologies, FF uses way too much RAM by default, Chrome needs more settings so that the user can turn of the so called 'inovative' stuff.
We end up with a slightly broken set of tools...I'm currently using a tweaked Firefox. But don't get me wrong all of the listed browsers can do their job but IMHO its just silly when you visit a site with IE and the site dev hasn't added support for it. Or when you use fresh installed FF and your RAM usage meter shows 400MB ram if you open a couple of video sites.
The future is bright
I think that all browser author companies's goal should be: To show contents of the Web in exactly the same way, while sticking to the same standards and not to force website developers to write extra code for browser compatibility. And I'm seeing more and more of that which is a very good thing. The frustration of website developers (including myself) may be eventually reduced to minimum. We shall see.
Lubomir
Subscribe to:
Posts (Atom)
