반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형

안녕하세요.


제가 가입해서 활동하고 있는 단체에서 이번에 강연회를 개최합니다.





'사람사는 세상 샌디에고'가 주최하는 첫번째 강연회

 

 

1. '세계경제는 저성장 시대로 진입하는가?' by 박영철 교수

(World Bank 근무경력의 국제경제학 교수) 

8/16 금요일 7:00~8:15pm 

 

2. '이민생활과 민족주의' by 장호준 목사

(민족지도자 장준하 선생의 3) 

8/16 금요일 8:15~9:30pm  

 

장소예수 마을 교회

10635-B Scripps Ranch Blvd.

San Diego, CA 92131 (전화858-586-9191) 

                                                                                                  

 

한국분이시면 누구나 환영하오며,

원하시는 분에 한하여 자유로이 기부해주시면 감사히 받겠습니다.

기타 문의danchung811@gmail.com


 


< 박영철 교수님 약력 >

 


2010-1990: 원광 대학교 경제학과 국제 경제학 교수

1989-1974: World Bank 근무, French-speaking West African Countries
 

( Cote d'Ivoire, Senegal, Gabon, Mali 등) 담당, Country Economist and Project Analyst

1980-1983: 한국 국제 경제 연구소(KIEI) 와 산업 연구원( KIET), 수석 연구 위원

1974-1964: Belgium , 루뱅대학, 경제학과( 학사+석사+ 박사 학위 수여)

1962-1964: 한국 일보 기자

1957- 1962: 외국어 대학 불문과 + 군 복무



강사분들도 훌륭하시고 주제도 아주 좋습니다.

샌디에고 근처에 사시는 분들 많은 참여 바랍니다.


혹시 주위분들 중에 샌디에고나 LA 에 아시는 분 계시면 홍보해 주세요.


반응형


반응형

남북정상회담 대화록이 국가 기록원에 없다고 판명 남으로서 대선때 김무성, 권영세가 정치 공작에 이용한 그 대화록은 국정원에서 나온 것이 분명해 졌습니다.

이제 국정원 댓글 공작 사건이 아닙니다.

새누리당의 관권동원 부정선거로 그 범위가 넓혀 졌습니다.


미국에서는 박근혜 탄핵이나 해임감이라는 분석까지 나오는데..

한국은 어떤가요?

==============================

If you think the NSA is bad …



Protesters shout slogans condemning South Korean National Intelligence Service involvement in the country's last presidential elections, during a demonstration outside the Seoul city hall.



Americans are apparently blasé about government eavesdropping.

In the days after former National Security Agency contractor Edward Snowden revealed that Washington spies extensively on its own citizens, polls found that about half of Americans have no problem with such snooping, as long as it protects them from terrorism.

But a scandal unfolding here in South Korea illustrates how such domestic snooping can easily harm a democracy.


미국인들은 정부가 도청하는 것에 대해 관심이 없는듯하다.

국가 안보국의 전직 요원인 에드워드 스노우든이 정부가 시민에 대한 정보를 대대적으로 염탐하고 있음을 폭로한 후 절반의 미국 국민은 테러리즘으로부터 자기네들을 보호해주기만 한다면 그러한 염탐이 별 문제가 되지 않는다고 생각한다고 여론조사가 밝혔다.

하지만 현재 대한민국에서 벌어지는 사건은 그런 염탐 행위가 얼마나 쉽게 민주주의를 해칠 수 있는지를 잘 보여준다.


(Read More: Microsoft Helped NSA Access Encrypted Messages: Report)


The imbroglio — which has sparked student protests and candlelight vigils around Seoul — actually consists of two episodes rolled into one.


서울에서 벌어지고 있는 학생들의 시위와 촛불 집회를 촉발시킨 이 난국은 실제로는 두 가지의 개별 사건이 함께 연계되어 있다.


The most recent scandal heated up when left-wing lawmakers accused the intelligence agency, the National Intelligence Service (NIS), of trying to protect its turf by leaking a sensitive and secret transcript in late June.


가장 최근에 있었던 사건은 진보측의 국회의원들이 국정원이 자기네의 세력권을 지키기 위한 노력으로 지난 6월 말, 민감한 기밀 문서를 누출시킨 것을 비방하면서 일어났다.


The document revealed details of a 2007 summit between North and South Korean leaders. In it, a now-deceased South Korean president, Roh Moo-hyun, discussed the possibility of redrawing the rival Koreas' sea border to help build peace.

At the other end of the table was enemy No. 1: former North Korean despot, Kim Jong Il.

The revelation had the potential to skewer Roh's party, now the opposition. For many South Koreans, the episode amounts to treason.


그 문서는 2007년 남북 간의 정상회담의 상세한 내용을 담고 있었다. 지금은 고인이 된, 당시의 대통령, 노무현 대한민국 대통령은 남북 간의 평화를 위해 남북 간의 해양 분기선을 조정할 가능성을 논의하였다.

정상회담의 상대방은 대한민국의 제일의 적인 북한의 전 독재자 김정일이었다.



(Read More: America's NSA 'In Bed With" Germany and Most Others: Snowden)


But the motive for the disclosure may have gone deeper.

Lawmakers claim that the spy agency was attempting to distract the public from yet another explosive affair: a clandestine NIS propaganda operation to influence the December 2012 presidential election.


그러나 그 폭로의 의도는 다른 곳에 있을 수도 있다.

국회의원들은 국정원이 지난 2012년 12월 대통령 선거에 영향을 주기 위해 비밀리에 선거 개입 작전을 벌였던 또 하나의 커다란 사건으로부터 대중의 관심을 돌리기 위해 이 문서를 폭로한 것이라고 주장한다.



In late 2012, two NIS agents published thousands of online comments in support of Park Geun-hye, the conservative politician who was elected president in December. The young spooks tried to smear the political left, claiming some were North Korean sympathizers and communist instigators.


2012년 말, 두명의 국정원 요원이 12월에 대통령으로 당선된 보수파 정치인, 박근혜를 지지하는 수천개에 달하는 인터넷 댓글들을 달았었다. 이들은 야당쪽 진보 정치인들이 종북주의자이고 공산주의 신봉가라고 몰아부쳤다.


In the raucous political system of South Korea, it's common for the mainstream press and pundits to paint their opponents in extreme ways.

The propaganda campaign didn't stay secret for long. Last month, the former spy chief, Won Sei-hoon, was indicted on allegations that he personally orchestrated the operation; the former Seoul police chief is also being prosecuted for supposedly whitewashing the first investigation into the case.


이렇게 극단적인 방법으로 상대방을 비방하는 것은 시끄러운 한국의 정치체제 아래에서 주요 언론과 전문가들마저도 종종 취하는 방법이다.

이 선거 선전 작전은 오랫동안 비밀로 유지되지는 못했다. 원세훈 전 국가정보원장은 지난 달 직접 이 작전을 지휘한 혐의로 결국 기소되었고, 이에 대한 초기 조사를 축소, 은폐하려 했던 혐의로 전 서울 경찰청장 또한 기소되었다.


(Read More: This Is Like the 'Cold War': Europe Fumes Over US Spying)


The NIS insists that it acted within legal bounds when declassifying the summit transcript. Under South Korean law, the head of the agency can request the release of state secrets if it does not pose a threat to national security.


국정원은 남북정상회담록을 공개한 것이 합법적인 범위 내에서 취한 행위라고 주장한다. 대한민국 법에 따르면, 국가정보원장은 국가의 안보가 위협되지 않는 한 국가 기밀 열람 공개를 요청할 수 있다.


It released the document out of concern for the "deepening schisms in the public" and its "negative effect national security," according to a statement issued on July 10.

An NIS spokesman could not be reached for comment.

Under South Korean law, documents of this sensitivity held by the National Intelligence Service would typically stay classified for up to 15 years. Two-thirds of lawmakers would have to agree, or a court order issued, before release into the presidential archive.


7월 10일에 국정원이 발표한 성명서에 의하면, "점점 악화되는 국론의 분열"과 "국가 안보에 대한 위협"을 우려하며 이 기밀 문서를 공개했다고 주장했다.

이에 대해 국정원 대변인으로부터 아무런 언급도 들을 수 없었다.

대한민국 법에 따르면, 국가정보원에 의해 보존되는 이런 예민한 문서는 통상적으로 최대 15년까지 기밀 문서로 분류된다. 대통령의 문서로 공개되기 위해서는 적어도 전체 국회의원의 3분의 2가 동의하거나, 법원의 명령이 있어야 한다.


Read more from the GlobalPost


FEMA hacked: Anonymous hacks US server in defense of Snowden and government transparency
Whistleblower Edward Snowden won't publish NSA 'instruction manual'
The NSA : America's ever-expanding digital spy agency


President Park, who prevailed with a 3 percent margin over her liberal opponent, insists that she didn't know of the plot and didn't reap any advantage.

Her administration points out that the NIS was meddling under the previous right-wing presidency of Lee Myung-bak, a factional rival and hardly a friend of Park's.

But given her family baggage, she's having a hard time maintaining distance.

In the 1960s and 1970s, her father, the dictator Park Chung-hee, used the precursor to the NIS for election rigging and other dark arts.


상대 후보보다 겨우 3% 차이로 당선된 박대통령은, 이와 관련하여 자기는 아는 바가 없으며 이로 인해 어떤 이득도 얻지 않았다고 주장한다.

박근혜 정부는 국정원의 대선개입은 당 내의 라이벌이자 결코 박근혜의 친구라고 할 수 없는, 우파 이명박 정권하에서 일어난 것임을 지적했다.

그러나 그녀의 가족사를 살펴본다면 박근혜는 이런 일에서 아주 거리가 멀다고 보기는 어렵다.

1960년, 70년대에 박근혜의 아버지인 독재자 박정희는 선거부정과 다른 불법적인 일들을 위해서 국정원의 전신인 중앙정보부를 이용했다.


The opposition is using the scandal to pin her to that legacy, say analysts. In Seoul, university students and activists have been protesting the revelations in recent weeks, calling for her removal.

According to polls, Park's popularity has slumped from more than half to about 40 percent in recent weeks. The Asan Institute, a Seoul-based think tank, says the decline is not necessarily a result of the spy scandal, but rather a return to "normal" levels after the election.


전문가들은 야당이 이런 선거 스켄들을 가지고 박근혜를 그 과거사에 연결시키려 하고 있다고 말한다. 서울의 대학생들과 운동가들은 최근 몇주 동안 국정원 선거개입에 대해서 시위를 하며 박근혜의 하야를 요구하고 있다.

여론조사에 의하면, 박근혜의 지지율은 최근 몇 주 동안 50% 이상에서 약 40% 정도로 급감하였다. 서울에 기반을 둔 씽크 탱크인 아산 연구소는 이런 감소가 꼭 국정원 스캔들의 결과가 아니고, 선거 이후 "정상치"로 돌아온 것이라고 설명한다.


(Read More: Hackers Shut Down Korean Sites on War Anniversary)



"She might be completely unscathed or, in the worst case, impeached and removed from office," said Daniel Pinkston, the Seoul-based senior analyst at the International Crisis Group, a nonprofit.


"박근혜는 피해를 전혀 입지 않을 수도 있지만 최악의 경우 탄핵 당하거나 대통령직에서 해임될 수 있다"라고 서울에 거주하고 있는 비영리 기구인 국제 위기 감시기구(ICG)의 선임 분석가 대니얼 핑크스톤은 말했다.


The NIS has long been prone to scandal. Out of the 11 heads who have served over the past decade, Won is the eighth to be investigated. 


국정원은 오랜 기간동안 스캔들에 연루되곤 했다. 지난 십여년 동안 국정원의 원장으로 일했던 11명의 국정원장 중 원세훈은 8번째로 수사의 대상이 된 사람이다.


Part of the problem, critics say, is that every president since 1988, the start of the democratic era, has sidelined the most talented officers in favor of political cronies. Under South Korean law, the NIS is required to stay neutral in domestic politics.

The result, they say, is a highly politicized (and some say bumbling) agency that gets into trouble every few years, and has failed to report key events such as Kim Jong Il's death in 2011.


비평가들에 의하면, 문제는 민주화 시대의 시작인 1988년 이후 모든 대통령이 가장 능력있는 인사를 그 자리에 앉히는 대신 자신의 측근을 선호한 데에 있었다고 한다. 한국의 법에 따르면, 국정원은 국내 정치에서 엄정 중립을 지키도록 요구된다.

그 결과 국정원은 대단히 정치색을 띄게 되고 (쓸모 없는 기관이라 표현되기도 하지만) 몇 년에 한 번씩은 문제에 휩싸이기도 했으며, 2011년 김정일의 사망같은 중요한 사건도 놓치는 등 본연의 임무를 다 하지 못하게 되었다.


Pinkston says the latest affair gives South Koreans an opportunity to fix the institutional flaws of the NIS, improving its intelligence-gathering abilities.

Call it a lesson for the US, where the National Security Agency, we now know, has nearly unchecked spying capacity. And while Americans apparently don't mind such a dragnet approach, South Korea shows how an unfettered spy network can go awry.


핑크스톤은 최근의 국정원 스캔들은 국정원의 제도적인 결함을 고치고 정보수집 능력을 향상 시킬 수 있는 기회를 한국 국민에게 가져다 준 것이라고 말한다.

이것은 국가 안보국의 첩보력을 거의 무사통과로 용인해준 미국을 위한 교훈이라 할 수 있겠다. 그리고 미국인들이 그런 첩보 방식에 관용적인 태도를 보이는 반면, 한국에서의 규제받지 않는 첩보망이 어떻게 잘못된 결과를 가져올 수 있는지를 보여준다고 할 수 있겠다


반응형


반응형

지난번에 이어 animation chain 소스를 분석해 보겠습니다.

지난번 글을 올린지 1주일이 지났나보네요.


지난번 main.lua 에서는 화면에 나오는 빨간 공 4개와 흰공 한개를 배치하는 로직이었습니다.

animationchain.lua 에서는 이 흰공을 4개의 빨간공을 따라서 움직이게 하는 코드가 있을 겁니다.


main.lua 의 마지막 줄에 이 작업을 하기 위해 animationchain.lua 에 있는 함수를 이렇게 call 했습니다.


animationchain.anim(c,stops[1]).whenDone(c,stops[2]).whenDone(c,stops[3]).whenStart(c,stops[4]).onComplete(c,stops[5]).onStart(function() print("done") end).start()


c 가 바로 흰공이었고 stops 에는 빨간공들의 위치값들이 있습니다.


animationchain.lua 의 소스는 아래와 같습니다.


local M={}
animationchain=M

local transition=transition
local setmetatable=setmetatable
local type=type
local error=error

setfenv(1,M)

local function start(anim,options,onStart,onComplete)
    return function()
        if options.delete then
            options.onComplete=function(obj)
                obj:removeSelf()
                if onComplete then
                    onComplete()
                end
            end
        else
            options.onComplete=onComplete
        end
        anim()
        if onStart then
            onStart()
        end
    end
end

-- args
-- exec - is the current function to execute. It is assumed to be a function that runs a Corona SDK transition
-- options - options for the animation (see Corona SDK). These are assumed to be the same closed over by the exec call - chainFunctions relies on being able to manipulate them for "onComplete" and "whenDone" to work
--         # Additional feature: if options.delete==true the subject of the animation will be deleted (obj:removeSelf() called) when the animation completes
-- runParent (optional) - run the previous function in the chain. It takes a single function as an argument. chainFunction creates this function itself
-- noanim (optional) - true if exec does not represent a function executing a Corona SDK transition. If true, the only valid call to the chain is "start"
function chainFunctions(exec,options,runParent,noanim)
    local t={}

    local mt={
        __index=function(t,k)
            local run=function(execChildAnim)
                local doIt
                -- wrap child animation in relation to previous call
                local onStart,onComplete
                if k=="onStart" or k=="whenStart" then
                    onStart=execChildAnim
                elseif k=="onComplete" or k=="whenDone" then
                    onComplete=execChildAnim
                end
               
                doIt=start(exec,options,onStart,onComplete)
               
                if runParent then
                    runParent(doIt)
                else
                    doIt()
                end
            end

            return function(...)
                if k=="start" then
                    return run()
                end
                if noanim then
                    error("animationchain: passing in pure functions must terminate the chain. Only call start after passing a single function into the chain")
                end
                if #arg==1 and type(arg[1])=="function" then
                    -- just a function has been passed in.
                    return chainFunctions(arg[1],{},run,true)
                end
                   
                return anim(arg[1],arg[2],run)
            end
        end
    }

    setmetatable(t,mt)
    return t

end

function anim(obj,options,runParent)
    return chainFunctions(function () return transition.to(obj,options) end, options,runParent)
end

return M


여기서 어느 부분이 제일 먼저 실행 될까요?


이 파일에는 크게 세개의 함수가 있습니다. 맨 처음에 start() 함수가 있구요. 두번째에 chainFunctions() 그리고 세번째로 anim() 함수가 있습니다.


start 함수가 맨 처음에 있고 이름도 start 이니까 이게 제일 먼저 실행 될까요?

아닙니다. 사실은 start() 함수는 이 세개중에 제일 나중에 실행 됩니다.


함수는 running time 중에 누군가가 call 해 주지 않으면 실행되지 않습니다.

마치 옛날 왕의 여자들처럼 나라를 run 하시는 왕이 call 하지 않으면 평생 독수공방해야 되듯이요.


제일 처음 실행되는 함수는 anim() 입니다. 왜냐하면 main.lua 의 맨 마지막 단계에서 이 함수를 call 했기 때문이죠.


이 anim() 함수는 무슨 행동을 할까요?


chainFunctions() 함수를 return 합니다. 즉 chainFunctions() 함수가 실행 되는 거죠.

여기서 파라미터로 function () return transition.to(obj,options) end 와 options, 그리고 runParent가 pass 됩니다.


이 파라미터들이 어디서 온건지 알아볼까요?




그냥 설명하면 길어질 것 같아서 위와 같이 정리해 봤습니다.

c 는 흰공이고 stops[1] 은 빨간공의 좌표 입니다.

빨간공은 따로 파라미터로 넘겨 주지 않습니다. 왜냐하면 흰공만 움직일 거니까요. chainFunctions() 에서 필요한건 빨간공의 좌표값뿐입니다.


우선 main.lua 에서 이 c(흰공) 과 stop[1] 첫번째 빨간공의 좌표를 넘겨 줍니다.

이걸 animationchain.lua 의 anim(obj,options,runParent) 함수가 받죠. 

여기서 obj 는 첫번째 파라미터로서 흰공 c를 말하고 options는 빨간공의 좌표 입니다. 그리고 세번째 좌표 runParent는 main.lua 에서 전달하지는 않았습니다.

이건 나중에 살펴 보겠습니다.


anim() 함수 안에서는 chainFunctions()를 콜하면서 3개의 파라미터를 전달하죠?

그런데 첫번째 파라미터는 함수를 전달해 줍니다.

transition.to(obj,options) 라는 함수 입니다.

transition.to()함수는 corona sdk 에서 제공되는 함수인데 애니메이션 표현할 때 아주 많이 사용합니다.

transition() 함수 API 를 보시려면 여기로 가셔서 참고하세요.


이 transition.to(obj.options)를 해석하자면 obj를 options 까지 움직인다는 의미 입니다. 즉 흰공을 stops[1] 까지 움직이는 거죠.


한번 소스 코드를 바꿔볼까요?


main.lua 에서

animationchain.anim(c,stops[1]).whenDone(c,stops[2]).whenDone(c,stops[3]).whenStart(c,stops[4]).onComplete(c,stops[5]).onStart(function() print("done") end).start()를 없애시고 animationchain.anim(c.stops[1])을 넣어 보세요.


그리고 animationchain.lau 의 anim() 함수 안에 

return chainFunctions(function () return transition.to(obj,options) end, options,runParent) 를 없애시고

transition.to(obj.options)를 넣어 보세요.


그러면 흰공이 가운데에서 왼쪽 빨간 점으로 움직일 겁니다.


main.lua 에서 animationchain.anim(c.stops[2]) 를 넣어 보세요. 

그러면 흰공이 곧바로 왼쪽 위에 있는 빨간공으로 움직이죠?


이렇게 해 보시면 transition.to() 함수의 기능을 확실히 아실 수 있을 겁니다.


일단 오늘은 animationchain.lua 파일에 있는 3가지 함수 중에 main.lua 에서 call 되서 가장 먼저 실행되는 anim(obj.options,runParent) 함수에 대해서 분석해 봤습니다.


이제 이 anim() 함수 안에서 chainFunctions()를 호출 하는 것을 확인 했습니다.

이때 3개의 파라미터가 전달 되는데 첫번째 파라미터는 흰공이 2번 빨간 공까지 transition 한다는 함수이고 두번째 파라미터는 options로서 이건 main.lua에서 부터 전달 된 빨간 공의 좌표 입니다.


runParent는 아직 정체를 알 수는 없습니다.


아마 이 소스의 핵심 부분인 chainFunctions()를 분석하면 알 수 있을 겁니다.


오늘은 여기까지만 하고요.


다음에 chainFunctions()를 분석해 보겠습니다.

반응형