MIT News posted an article saying that researchers found a way to calculate FFT even faster. It’s like up to 10x.
You can download the paper here :
Nearly Optimal Sparse Fourier Transform
18 Jan
MIT News posted an article saying that researchers found a way to calculate FFT even faster. It’s like up to 10x.
You can download the paper here :
Nearly Optimal Sparse Fourier Transform
13 Jan
Is it now a time to learn Ruby, if you are more interested in SmallTalk derivatives but are frustrated with C# Mono .NET?
http://rhomobile.com/products/rhodes/
5 Jan
When introducing new technology, naming is very important.
I remember that it was when the second version of Java was announced.
In most books on Java, explanation on “interface” was very short. The name, “interface”, doesn’t speak for itself and many people didn’t seem to understand what it was for at that time exactly other than Java people at Sun.
I remember the most famous “interface” at that time was “Runnable”. To build a Java applet, it should “inherit” Runnable interface.
Nowadays, because many languages uses Class and Interface with different meaning, it is easy to differentiate. However at that time, interface was, in OOP concept, class. That is why Objective-C uses @interface to define a class.
However, Objective-C uses a name, Protocol to mean ‘interface’ in other languages like Java and C#. By saying protocol, we instantly imagine agreed-upon dialog to communicate. So, the name, protocol, itself says that it doesn’t contain any “properties”, i.e. member variables. ( property is also an unfortunate term. )
Also, when a class accept the ‘protocol’ to implement it, we call that the class “adopts”(Java) or “conforms”(Objective-C) the protocol. Because it “adopts” or “conforms”, we know that protocol is not related to inheritance path. Different classes with different parent or super class can adopt the same “protocol”.
So. the name speaks for itself.
Here is explanation on Interface in C# from MSDN.
“Interfaces describe a group of related functionalities that can belong to any class or struct. You define an interface by using the interface keyword, as shown in the following example.”
Any learner should try to memorize what the interface is, what it is for, how it is different from classes. etc. Then when his memory decays, he needs to open the document again to make sure what interface is.
This is importance of naming for technology.
This is not first time for me to point MS’ naming convention or explanation.
MS is not good at this and has never been as good as Apple.
Java people seem to have the same problem, but look better than MS people.
4 Jan
At MSDN site, they described about what can be set as delegate this way.
When a delegate is constructed to wrap an instance method, the delegate references both the instance and the method. A delegate has no knowledge of the instance type aside from the method it wraps, so a delegate can refer to any type of object as long as there is a method on that object that matches the delegate signature. When a delegate is constructed to wrap a static method, it only references the method. Consider the following declarations:
public class MethodClass
{
public void Method1(string message) { }
public void Method2(string message) { }
}Along with the static DelegateMethod shown previously, we now have three methods that can be wrapped by a Del instance.
MethodClass obj = new MethodClass();
Del d1 = obj.Method1;
Del d2 = obj.Method2;
Instead of assigned to obj in the last lines of the codes above, d1 and d2 are assigned to obj.Method1 and obj.Method2.
So, it is not that the delegate can refer to any type of objects as long as blah blah. It just refers to those specific methods.
Let’s be careful.
4 Jan
I currently update my knowledge on C# since the early days of C# .NET.
Although many things similar to Objective-C/Cocoa are added to C# .NET, some are somehow different. For example delegate is one of them.
In Objective-C, delegate is a delegate object which do something for other objects.
So, if the “other” object set the delegate object as a delegator, the delegator object handles messages to the “other” object for the “other” object.
However, in C#, it is more like function pointer.
Well, function pointer can be used in “delegate” pattern.
However, in .NET framework, delegates look to be used more as a way to register “callback” functions. So, rather than “delegate” itself, it is a building block for “delegate” pattern.
Just like C++, people can make their own delegate pattern by message forwarding ( in Obj-C term) or by defining methods in a “representative” object, setting that object as a delegate and calling those methods. This means that without using C#’s delegate type you can make delegate pattern.
So, I don’t think using the term “delegate” in C# for its “delegates” type sounds like misnomer. ( again, because it resembles more like function pointer rather than delegator object. )
I have used Win32, MFC since 1990. The consistent naming of classes, functions and methods in MS API & frameworks is that their names sometimes don’t match what they are for and what they do.
Collapse this post
29 Dec
C# looks like C++ or Objective-C.
However, it shares lots of its philosophy with BASIC. One of the most apparent example is “pointer”.
Although C# supports pointers, it is for “unmanaged” environment. For normal “managed” environment, C# doesn’t support pointers. However, it supports the concept of pointers.
It is called “reference type”. There are explicit and implicit reference type.
What is funny from C/C++/Objective-C programmer’s point of view is that all object, or instance of a class, is declared without any “pointer” mark.
Customer object2;
If it is C++, object2 is a statically declared object. ( I don’t mean “static” type. Here “statically” I mean the opposite of “dynamically”. )
In C#, class is reference type. So, object2 is a reference. In other words, it is a pointer in C/C++/Objective-C world.
(Again, here the reference means the concept which embraces pointers and references, &, not the “reference” in C++. )
However, because there is no concept of pointer, they explain it very lengthy way.
When an instance of a class is created, a reference to the object is passed back to the programmer. In the previous example, object1 is a reference to an object that is based on Customer. This reference refers to the new object but does not contain the object data itself. In fact, you can create an object reference without creating an object at all:
Customer object2;We do not recommend creating object references such as this one that does not refer to an object because trying to access an object through such a reference will fail at run time. However, such a reference can be made to refer to an object, either by creating a new object, or by assigning it to an existing object, such as this:
To C/C++/Objective-C programmers, it is very easy to explain that. “Because it is just a pointer type, it doesn’t point anything yet. So, don’t call any methods or access anything yet.”
Oh.. one thing.. in C++, it is completely normal to create an object statically. Although the C# code above looks like declaring and instantiating an object statically, but it is actually equivalent to :
Customer *object2;
in C++.
So, what C# teaches us, especially language creators, is that if they try hard to make easy language to beginners ( pointer is a difficult concept for beginners ), it can actually make things more complicated.
29 Dec
개념적 용어를 keyword로 정의하게 되면, 설명할때 참 힘들어진다. 특히 “역사”를 모르는 사람들에겐. C#에는 reference type이란게 있는데, C#이 기본적으로 pointer가 없는 언어인만큼( VB사용자들을 끌어들여야 하니까. 그나저나 VB는 살아있나?), explicity하게도 혹은 class처럼 implicit한 것도 있다. 근데 설명할때 reference type이라고 말하면서 C++사용자에게 포인터를 쓰는 것과 같다고 말해버리면, “아. 포인터가 아니라 reference잖아요”라고 따지고 들 수있다. 아.. 그 reference가 아닌데. pointer(*)이던 reference(&)이던 다 레퍼런스인데…
C# 에는 reference type이란게 있는데, C#이 기본적으로 pointer가 없는 언어인만큼( VB사용자들을 끌어들여야 하니까. 그나저나 VB는 살아있나?), 명시적(explicit)으로 혹은 class처럼 묵시적인(implicit) 것도 있다. 근데 설명할때 reference type이라고 말하면서 C++사용자에게 포인터를 쓰는 것과 같다고 말해버리면, “아. 포인터가 아니라 reference잖아요”라고 따지고 들 수있다. 아.. 그 reference가 아닌데. pointer(*)이던 reference(&)이던 다 레퍼런스인데…
static allocation도 그렇고…
아.. 힘들다.
시 각적으로도 그렇다. C#에서 클래스가 레퍼런스 타입이면 그냥 Objective-C처럼 모든 객체는 포인터로 선언하면될 것이지, 생긴 것은 꼭 C++처럼 생겨서, 그냥 정적(static)정의 하듯이 하고선 그것이 reference type이라고 하면, C++에서 넘어온 사람들은 그런 변수를 함수 인자(패러미터)로 넘길때 고민하게 된다. “이거 내가 하는게 맞는거야?”
C#은 참 잘 만든 언어면서도 문제가 있는 언어다.
VB 사용자들을 끌어들이려면 확실하게 VB .NET을 밀던가, C/C++은 Apple이 Objective-C로 그러했듯이, 기존 컴파일러 많이 안바꾸고, 새 키워드도 많이 안넣으면서 하던가..
C++ .NET는 ISO에선가 C++로 부르지 말라고 까지 했잖은가?
포 지셔닝은 딱 Java인데, (Java도 C++과 비슷한 점이 많아서 장점이기도 하고 단점이기도 하고), C++의 신택스를 가지고 오고 이름도 C sharp 이니 ( C pound라고 하는 사람들은 없겠지? ) 자꾸 C++처럼 생각하게 된다는…
가만히 보면 Brad Cox가 Unsung Hero가 아닐까 한다.
C 를 만든 Dennis Ritchie나 C++의 Stroustrup, SmallTalk의 Alan Kay같은 명성을 누리지 못하지만, C 컴파일러를 거의 바꾸지도 않았으면서, 할 짓 다하는, 그것도 훨씬 간결하게.. 그런 언어를 만들어 냈으니, 이게 천재가 아니면 뭔가?
(같은 포스트 :https://plus.google.com/108121537492277875096/posts/LUSeKRzjxdv )
28 Dec
This is very well written explanation how pentile and RGB stripe type LCDs are different.
The author explains pentile type needs more density than RGB stripe to achieve same/similar image quality to that of RGB stripe LCD.
So, even those two LCDs have same resolution, RGB stripe type shows better image quality.
I’m sorry that it is written in Korean.
8 Nov
There are a lot of new things introduced in OS X 10.7.
Here is a document which enlist most of them.
What’s new in Mac OS X 10.7 Lion
Because most interesting things were already mentioned a lot, I don’t want to talk about them. However, there are some which don’t seem to be talked much but significant.
Major Features
Frameworks
14 Oct
objcguy님의 블로그에 소개된 아주 좋은 비공개 API 3개..
그래.. Apple 사람들은 이런 것을 쓰고 있었단 말이지…
[NSAutoReleasePool showPools]
[(instance of UIView) recursiveDescription]
[(instance of NSObject) observationInfo]
Recent Comments