How to develop augmented reality apps with Vuforia for Windows 10

Serious in GUI design? Interface Builder is not good for designers?

Well, if you are a hardcore programmer, probably Interface Builder on Mac or the integrated resource editor for Visual Studio can be good enough. But there are certain times to define how things work in advance, or those tools are not easy for GUI designers to use.
Then… it’s time you need a GUI prototyping tool.

There have been many, but nowadays, these two commercial S/W programs appear on Google.

We can use trial versions to see how they work.

Dripcap – Caffeinated Packet Analyser and…

Probably Wireshark is too much, it can be good to try this elegant packet analyser, Dripcap. It’s made of a web app framework called Electron. It can be good to know that. Nowadays I don’t hear much about Ember and so on. Lots of Web frameworks are on people’s mouth and gone so quickly so…


libiconv from OS X and Mac Port, and change of Xcode behavior

I have an old project for converting wrongly encoded Korean to properly encode to properly encoded one in mp3 files.

However due to file system corruption while in upgrading to OS X 10.11.6, ย I had to rebuild the project again. I found out that I had another project for the same purpose to use different ID3 library. I didn’t remember which project was correct one.

I finally identified the correct one, but had some issues. It was built previously without a problem, but it failed this time. It could be due to changes in Xcode. Yes. there is such change. I will talk about that after taking about difference of libiconv from OS X and Mac Port.

When tried to build, it complaint _iconv, _iconv_open, _iconv_close were missing.
I recalled that there was difference between libiconv from OS X and Mac Port, and there was a comment I wrote for that, but didn’t remember its detailed reasoning for that.

So, I googled and found the stack overflow question above, and it made me recall what problem it had completely.

So, ย this time I would like to record it here.

This is the result with libiconv from Mac Port.

JongAms-Mac-mini:lib jongampark$ nm -mย  libiconv.2.dylib | grep iconv

0000000000002db1 (__TEXT,__text) external _libiconv
0000000000002dd3 (__TEXT,__text) external _libiconv_close
000000000000158c (__TEXT,__text) external _libiconv_open

This is the result with libiconv from OS X.

JongAms-Mac-mini:lib jongampark$ nm -m /usr/lib/libiconv.dylib | grep iconv

000000000000301c (__TEXT,__text) external _iconv
000000000000336d (__TEXT,__text) external _iconv_canonicalize
000000000000303e (__TEXT,__text) external _iconv_close
0000000000001c41 (__TEXT,__text) external _iconv_open

So, the difference is that the ones from Mac Port have _lib is prefixed while the ones from OS X don’t.

Also, the included iconv.h file should match with the library file.

Finally I would like to talk about the changes of Xcode behavior.

With a version of 7.x.x, Apple changed that default libraries and header files could be searched without specifying them. Especially, if a library, for example, /usr/lib/libiconv.dylib is linked using the build phase, Xcode didn’t require the /usr/lib is added to the library search path. It was new behavior at that time.

However, they changed it again from some version of Xcode later than the version mentioned above. So, the library path should be set to include /usr/lib.
Without that, even though the /usr/lib/libiconv.dylib is linked by build phase setting (Link Binary with libraries ), Xcode couldn’t find that it’s in /usr/lib.

Apple doesn’t document this kind of changes, and it gives headache.
I wonder why Apple keeps changing from one behavior to the other behavior from time to time. If they keep changing to a newer behavior, it could be understandable, although I don’t like it. However, they are kind of going forwardย and backward.

This is small difference, but can affect big way.
Apple should document this kind thing and handle this seriously.

How to use Apple’s Unicode Hex Input IME

It’s explained here, but ‘how to use’ is buried in the long text without indentation etc.

So, here.

  1. To type U+03B1, press the “Option” key.
  2. press 0, 3, B, 1 while still pressing the “Option” key.


When both ‘true’ and ‘false’ are right

I ran into very interesting logic issue. Probably if someone asks me what case it was, then I would not be able to recall this, because it’s subtle ( but simple ).

bool vaFacebookAPI::HandleResponse(zuint32 what, zRecord *record, zRecord *current, zRecord *previous)
    bool isHandled = true;

    if (record == nullptr || current == nullptr) {

        // You can think of this as 'handled' or 'not handled' depending on
        // how you think. But architecturally it should be treated as 'not handled'
        return false; // ๐Ÿ‘ˆ๐Ÿผ This case 


1. You can think that it can return ‘true’, because such case is considered and you decided not to do anything. So, It’s handled as such. So, it’s right to be ‘true’.

2. You can think it it can return ‘false’, because for that case nothing is processed and just returns. So, you can regard it as ‘not handled’. So, ‘false’ is correct.

Interesting, isn’t it?
One logic, depending on how you think it can be thought as ‘true’ and ‘false’

So, true is true, and false is also true. ๐Ÿ˜‰

deprecation of C++ style for loop and its replacements are…

New Features in Swift 2.2

Swift… ์ด๊ฑฐ ์ฐธ..
Telestream์—์„œ ์ผ์„ ํ•œ ์ด๋ž˜, ์ œ๋Œ€๋กœ Objective-C/Cocoa์—์„œ ์ƒˆ๋กœ ๋‚˜์˜ค๋Š” ๊ฒƒ์„ ์‹œ๋„ํ•˜๊ฑฐ๋‚˜, ์‹ฌ์ง€์–ด Swift๋ฅผ ๊ณต๋ถ€ํ•  ์งฌ์ด ์—†์—ˆ๋‹ค. C#/.NET์ด๋‚˜ C++๋„ ๋งˆ์ฐฌ๊ฐ€์ง€…
์ด์ „ ํšŒ์‚ฌ๋“ค์—์„  ํ‡ด๊ทผํ•˜๊ณ ์„œ๋„ ๋‹น์—ฐํžˆ ํ–ˆ๊ณ , ํšŒ์‚ฌ ๋‚ด์—์„œ๋„ ํ•  ์ผ ๋‹คํ•˜๊ณ , ์ถ”๊ฐ€๋กœ ๋” ์•Œ์•„๋ณด๊ณค ํ–ˆ๋Š”๋ฐ, ๋„๋Œ€์ฒด ์ด ํšŒ์‚ฌ์—์„ …
Cocoa์— ๋Œ€ํ•ด์„œ ์•Œ๊ณ  ์žˆ๋˜ ๊ฒƒ๋„ ๊นŒ๋จน๊ณ . ๊ทธ๋ž˜์„œ๋“ค ๋ฏธ๊ตญ ์• ๋“ค์ด ์ด๋Ÿฐ ํšŒ์‚ฌ์— ์ง€์›์„ ์•ˆํ•˜๋‚˜๋ณด๋‹ค.

์•„๋ฌดํŠผ ํˆฌ๋œ๋Œ€๋Š” ๊ฒƒ์€ ์ด๋งŒํ•˜๊ณ ..
๋‚œ ย Swift๊ฐ€ ๋„๋Œ€์ฒด ๋งˆ์Œ์— ๋“ค์ง€ ์•Š๋Š”๋‹ค.
Swift๊ฐ€ ํ›„์ ธ์„œ๊ฐ€ ์•„๋‹ˆ๋ผ, ์ด๊ฑด ์ˆœ์ „ํžˆ ๋งˆ์ผ€ํŒ…์— ์˜ํ•œ ๊ฒƒ์ด๋ž€ ์ƒ๊ฐ์ด ๋“ค๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
GNU์˜ Objective-C ์ปดํŒŒ์ผ๋Ÿฌ๋ฅผ ๋“ค์ถฐ๋ณธ ์‚ฌ๋žŒ๋“ค์€ ์–ผ๋งˆ๋‚˜ ๊ฐ„๋žตํ•˜๊ฒŒ Objective-C๊ฐ€ ๋งŒ๋“ค์–ด์ ธ ์žˆ๋Š”์ง€ ์•ˆ๋‹ค. C++์ชฝ์€ ๋ณ„ ์ด์ƒํ•œ ์ง“์„ ํ•ด์„œ๋ผ๋„ ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๋Š”๋ฐ, ๊ตณ์ด ๋ช‡๊ฐ€์ง€ Objective-C์˜ ๋‹จ์ ์„ ๋“ค์ถฐ์„œ ๊ทธ๊ฑธ Swift๋ฅผ ํ•ฉ๋ฆฌํ™”ํ•˜๋Š” ๊ฑด ๋ญํ•˜์ง€ ์•Š๋‚˜? ๋ฌธ์ œ๊ฐ€ ์žˆ์œผ๋ฉด ๊ณ ์น˜๋ฉด ๋˜์ง€ ์•Š๋‚˜?

๋”๊ตฐ๋‹ค๋‚˜ Swift๋Š” ํ—ท๊ฐˆ๋ฆฌ๋Š” ๋ฉด์ด ๋งŽ๋‹ค. ์ƒˆ๋กœ ์–ธ์–ด๋ฅผ ๋ฐฐ์šฐ๋Š” ์–ด๋ฆฐ ํ•™์ƒ๋“ค์ด์•ผ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ, ๋‚ด๊ฒ ์ด Swift๋Š” ์–ด๋–ค ๋ฉด์—์„  Pascal, ์–ด๋””์„  C, ์–ด๋””์„  Perl ๊ฐ™์€ ๋Š๋‚Œ์ด ๋“ ๋‹ค. Python์„ ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์€ Python ๊ฐ™์€ ๋ถ€๋ถ„๋„ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.
์ผ๋‹จ ๋ชจ๋“œ๊ฐ€ Pascal ๋ชจ๋“œ๋กœ ๋ฐ”๋€Œ๋ฉด Pascal ๋‹ค์›Œ์•ผ ํ•˜๊ณ , C๋กœ ๋ฐ”๋€Œ๋ฉด C ๋‹ค์›Œ์•ผ ํ•œ๋‹ค. ๊ทธ๋ž˜์•ผ ๊ธฐ์–ตํ•˜๊ธฐ๋„ ์ข‹๊ณ  ๊ทธ๋ ‡์ง€. ์ด๊ฑด ์ˆœ์ „ํžˆ ์žกํƒ•๊ฐ™์€ ๋Š๋‚Œ์ด์–ด์„œ, ๊ฐ„๋งŒ์— Swift ๋ฌธ์„œ๋ฅผ ์ฝ์–ด์„œ ์ตํ˜€ ๋‘์–ด๋„ ๋‚˜์ค‘์— ๊ธฐ์–ต์ด ์ž˜ ์•ˆ๋‚œ๋‹ค. ์™œ? ํŒŒ์Šค์นผ ๊ฐ™์œผ๋ฉด ์ญ‰ ํŒŒ์Šค์นผ ๊ฐ™์•„์•ผ ํ•˜๋Š”๋ฐ, ์–ด๋Š ์ˆœ๊ฐ„ Perl ๊ฐ™๋‹ค๊ฑฐ๋‚˜ ๊ทธ๋Ÿฐ์‹์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

๊ทธ๋ฆฌ๊ณ  2.2์—์„œ ์ƒˆ๋กœ ๋‚˜์˜จ ๋ฌธ๋ฒ•์„ ๋ณด์ž.
๋‹ค์Œ์˜ ์ฝ”๋“œ๋ฅผ ๋ณด์ž

for var i = 0; i < 10; i++ {

์ด๊ฑธ ์ด์ œ ์—†์• ๊ณ  ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฐ”๊พผ๋‹ค ํ•œ๋‹ค.

for i in 0 .. < 10 {

์ด๊นŒ์ง„ ์ข‹๋‹ค. Fast Enumeration ์Šคํƒ€์ผ์ด๋‹ˆ๊นŒ.

๊ทผ๋ฐ, ๋‹ค์Œ์„ ๋ณด์ž.

for i in (1...10).reverse() {

for i in 0.stride(to: 10, by: 2) {

์ €๊ฑฐ ๊ทธ๋ƒฅ (10…1)๋กœ ๋ชป ๋งŒ๋“œ๋‚˜? ๋ฌผ๋ก  reverse()๋„ ์ง€์›ํ•˜๋ฉด์„œ?
๋ญ ์ฒซ๋ฒˆ์žฌ ์˜ˆ๋Š” ๊ทธ๋ ‡๋‹ค์น˜์ž.
๋‘๋ฒˆ์žฌ ์˜ˆ..

์ €๊ฑฐ.. ์˜์–ด๊ฐ€ ๋ชจ๊ตญ์–ด์ธ ์‚ฌ๋žŒ์€ 0.stride(to..)๊ฐ€ ์™€ ๋‹ฟ์„์ง€ ๋ชฐ๋ผ๋„, ์™ธ๊ตญ์ธ๋“ค์—๊ฒ ๊ทธ๋ ‡์ง€ ์•Š๋‹ค. stride์˜ ๋œป์ด ๊ทธ๋‹ค์ง€ ๊ฐ•ํ•˜๊ฒŒ ๋‹ค๊ฐ€์˜ค์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
๋‹จ์–ด์˜ ๋œป์„ ์•„๋Š” ๊ฒƒ๊ณผ, ๊ทธ๊ฒƒ์ด ์–ผ๋งˆ๋‚˜ ๊ฐ•ํ•˜๊ฒŒ ๋‹ค๊ฐ€์˜ค๋Š๋ƒ๋Š” ๋‹ค๋ฅธ ๋ฌธ์ œ์ด๋‹ค.
Apple์˜ ์‚ฌ์ „ ์•ฑ์—์„œ ๋œป์„ ๋ณด์ž.
1. ์„ฑํผ ์„ฑํผ ๊ฑท๊ธฐ. ํ™œ๋ณด
2. ํ•œ๊ฑธ์Œ, ํ•œ๋‹ฌ์Œ.

์•„.. ์•ˆ๋‹ค๊ฐ€์˜จ๋‹ค.
์ด๋Ÿฐ๊ฒŒ ๋‚ซ์ง€ ์•Š๋‚˜?

for i in 0.increment(to: 10, by: 2) {

for i in 0.increment(to: 10, by: -2) {

๋‘๋ฒˆ์งธ ๊ฒƒ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋™์ผ ํ‘œํ˜„์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๊ฒ ๋‹ค.

for i in 10.decrement(to: 0, by: 2) {

Swift๋Š” ์ปดํ“จํ„ฐ ์–ธ์–ด์—์„œ์˜ cultural difference์™€ ์‚ฌ๋žŒ์ด ์“ฐ๋Š” ์–ธ์–ด์—์„œ์˜ cultural difference๋ฅผ ๊ณ ๋ คํ•˜์ง€ ์•Š๊ณ  ๋””์ž์ธ๋˜๋Š” ๋Š๋‚Œ์ด๋‹ค.
์ด๊ฑด ๋ฌธ์ œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚ด๊ฐ€ Swift๋ฅผ ์ข‹์•„ํ•˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ค‘์˜ ํ•˜๋‚˜์ด๋‹ค.

%d bloggers like this: