글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
부모글 보이기/감추기
최근 들어서, 루비에 대한 관심이 고조되고 있지요. 저 역시, 그동안 나름대로 보조 언어로 사용하던 스크립트 언어의 한계를 체감하고 있다가 루비 소식을 듣고는 귀를 기울이고 있는 중입니다.
그렇다고 해서, 제가 무슨 대단한 루비 언어를 구사할 수 있는 정도는 아니고요. 이제부터 ^^; 시작해 보려 합니다. 물론, 나름대로의 인생 계획이 있고, 아직 루비가 초기라는 점을 감안해서 우선순위를 높게 잡고 있지는 않습니다.
그래서, 아주 가끔씩 ... 하지만 꾸준히 익혀보려고 합니다.
오늘은, 그 시작의 날일 수 있겠군요. ^^
우선, 루비에 대한 감을 익혀보기 위해 평소에 알아두었던 루비 특집 강좌를 보았습니다.
스크립트 언어의 새로운 보석 - 루비 (Ruby)
; http://www.imaso.co.kr/?doc=bbs/gnuboard.php&bo_table=article&wr_id=17628
위의 강좌 내용을 실습하기 위해서는 루비 개발 환경이 있어야 할 텐데요. 다음의 URL에서 일단 "인스턴트 레일즈"를 다운로드합니다. (물론, 윈도우즈용입니다.)
인스턴트 레일즈
; http://rubyforge.org/frs/?group_id=904
다운로드한 ZIP 파일에 대해서 압축만 해제시켜 주면 됩니다. (설치하실 필요는 없습니다.)
"인스턴트 레일즈" 안에 루비 개발 환경이 포함되어 있으므로, 실습을 위해서 그것만 이용해 주시면 됩니다. 예를 들어, 위의 "스크립트 언어의 새로운 보석 - 루비 (Ruby)"의 예제 중에서 간단한 것을 실행해 보기 위해 다음과 같이 따라해 볼 수 있습니다.
D:\Ruby\InstantRails\ruby\bin>irb
irb(main):001:0> -124.abs
=> 124
irb(main):002:0>
일단, 제 인생 스케쥴로 보면... 내년 후반기에나 본격적으로 루비를 파고들게 될 것 같습니다. 그때까지는 가끔씩... 부담 갖지 않고 조금씩 익혀보려고 합니다. ^^
[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]
아직 Windows 버전이 그다지 안정적이지는 않은 것 같군요. 아래와 같은 정도로 실습을 해보았는데, ... 중간에 "failed to allocate memory (NoMemoryError)" 예외가 발생하면서 프로세스가 종료해버렸습니다.
어쨌든, 아직 초기이니까. ^^
(참고로, Irb 해석기에서 나오는 방법은 ^^; "quit"입니다.)
D:\Settings\desktop\InstantRails-1.4-win\InstantRails\ruby\bin>irb
irb(main):001:0>
irb(main):002:0* ^C
irb(main):002:0> q^C
irb(main):002:0> uit
NameError: undefined local variable or method `uit' for main:Object
from (irb):2
from :0
irb(main):003:0> q
NameError: undefined local variable or method `q' for main:Object
from (irb):3
from :0
irb(main):004:0> close
NameError: undefined local variable or method `close' for main:Object
from (irb):4
from :0
irb(main):005:0> ^V'^C
irb(main):005:0>
^C
irb(main):005:0>
^C
irb(main):005:0>
^C
irb(main):005:0>
^C
irb(main):005:0> -124.abs
=> 124
irb(main):006:0> t = Time.new
=> Thu Dec 28 17:27:17 +0900 2006
irb(main):007:0> t
=> Thu Dec 28 17:27:17 +0900 2006
irb(main):008:0> 5 + 3
=> 8
irb(main):009:0> 5.+(3)
=> 8
irb(main):010:0> class Fixnum
irb(main):011:1> def +(other)
irb(main):012:2> (self.to_s.concat(other.to_s)).to_i
irb(main):013:2> end
irb(main):014:1> end
=> nil
irb(main):015:0> 5 + 3
=> 53
irb(main):1501:0> "gun".length
=> 3
irb(main):150101:0> "gun".fire
NoMethodError: undefined method `fire' for "gun":String
from (irb):2645
from :0
irb(main):15010101:0> ["apple", "banna", "orange"].map {|fruit| fruit.upcase}
=> ["APPLE", "BANNA", "ORANGE"]
irb(main):1501010101:0> class Person
irb(main):1501010102:1> def name
irb(main):1501010103:11> return @name
irb(main):1501010104:11>
D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby/1.8/irb/inpu
t-method.rb:99:in `[]=': failed to allocate memory (NoMemoryError)
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb/input-method.rb:99:in `gets'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb.rb:132:in `eval_input'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb.rb:259:in `signal_status'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb.rb:131:in `eval_input'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb/ruby-lex.rb:189:in `call'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb/ruby-lex.rb:189:in `buf_input'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb/ruby-lex.rb:104:in `getc'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb/slex.rb:206:in `match_io'
... 9 levels...
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb.rb:70:in `start'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb.rb:69:in `catch'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/lib/ruby
/1.8/irb.rb:69:in `start'
from D:/Settings/desktop/InstantRails-1.4-win/InstantRails/ruby/bin/irb.
bat:20
Terminate batch job (Y/N)? n
D:\Settings\desktop\InstantRails-1.4-win\InstantRails\ruby\bin>
[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]
... 106 107 108 109 110 111 112 113 [114] 115 116 117 118 119 120 ...
Title |
11166 | 정성태 | 3/28/2017 | 23053 | 오류 유형: 382. System.Data.SqlClient.SqlException - Arithmetic overflow error converting IDENTITY to data type int. | |
11165 | 정성태 | 3/27/2017 | 25735 | 오류 유형: 381. Visual C++에서 min, max 함수를 사용한 경우 C2589, C2059 컴파일 오류 발생 | |
11164 | 정성태 | 3/27/2017 | 34499 | VC++: 111. C++ 클래스의 상속에 따른 메모리 구조 [2] | 1 |
11163 | 정성태 | 3/25/2017 | 23999 | VC++: 110. CreateThread Win32 API에 C++ 클래스의 멤버 함수를 전달하는 방법 | 1 |
11162 | 정성태 | 3/24/2017 | 28815 | 오류 유형: 380. Visual Studio 빌드 실패 - The OutputPath property is not set for project | |
11161 | 정성태 | 3/24/2017 | 18973 | 오류 유형: 379. ICOMAdminCatalog.GetCollection 호출 시 0x80070422 예외 발생 | |
11160 | 정성태 | 3/23/2017 | 26075 | .NET Framework: 649. ASP.NET - Server cannot append header after HTTP headers have been sent. (HTTP 헤더를 보낸 후에는 서버에서 헤더를 추가할 수 없습니다.) | 1 |
11159 | 정성태 | 3/23/2017 | 23315 | Windows: 136. Memory-mapped File은 Private Bytes 크기에 포함될까요? | 1 |
11158 | 정성태 | 3/22/2017 | 21384 | 디버깅 기술: 85. Windbg - SOS 디버깅 사례 System.NullReferenceException 예외 추적 | |
11157 | 정성태 | 3/22/2017 | 24526 | .NET Framework: 648. Dictionary<TKey, TValue>를 deep copy하는 방법 | 1 |
11156 | 정성태 | 3/21/2017 | 26711 | .NET Framework: 647. 닷넷(C#) 코드로 인증서 요청 코드 만드는 방법 | 1 |
11155 | 정성태 | 3/21/2017 | 27149 | .NET Framework: 646. SslStream의 CipherAlgorithm 선택이 가능할까요? | 1 |
11154 | 정성태 | 3/5/2017 | 32355 | VC++: 109. DLL에서 STL 객체를 인자/반환값으로 갖는 함수를 제공할 때, 그 함수를 외부에서 사용하는 경우 비정상 종료한다면? [2] | 1 |
11153 | 정성태 | 3/5/2017 | 32670 | VC++: 108. DLL에 정의된 C++ template 클래스의 복사 생성자 문제 | 1 |
11152 | 정성태 | 3/4/2017 | 28052 | VC++: 107. VirtualAlloc, HeapAlloc, GlobalAlloc, LocalAlloc, malloc, new의 차이점 [1] | 1 |
11151 | 정성태 | 3/3/2017 | 27230 | VC++: 106. DLL 개발자가 주의해야 할 Secure CRT 함수 사용 [1] | 1 |
11150 | 정성태 | 2/21/2017 | 22949 | .NET Framework: 645. Visual Studio Fakes 기능에서 Shim... 클래스가 생성되지 않는 경우 [5] | |
11149 | 정성태 | 2/21/2017 | 26877 | 오류 유형: 378. A 64-bit test cannot run in a 32-bit process. Specify platform as X64 to force test run in X64 mode on X64 machine. | |
11148 | 정성태 | 2/20/2017 | 26144 | .NET Framework: 644. AppDomain에 대한 단위 테스트 시 알아야 할 사항 | |
11147 | 정성태 | 2/19/2017 | 23513 | 오류 유형: 377. Windows 10에서 Fake 어셈블리를 생성하는 경우 빌드 시 The type or namespace name '...' does not exist in the namespace 컴파일 오류 발생 | |
11146 | 정성태 | 2/19/2017 | 24007 | 오류 유형: 376. Error VSP1033: The file '...' does not contain a recognized executable image. [2] | |
11145 | 정성태 | 2/16/2017 | 25595 | .NET Framework: 643. 작업자 프로세스(w3wp.exe)가 재시작되는 시점을 알 수 있는 방법 - 두 번째 이야기 [4] | 1 |
11144 | 정성태 | 2/6/2017 | 28724 | .NET Framework: 642. C# 개발자를 위한 Win32 DLL export 함수의 호출 규약 (부록 1) - CallingConvention.StdCall, CallingConvention.Cdecl에 상관없이 왜 호출이 잘 될까요? | 1 |
11143 | 정성태 | 2/5/2017 | 26801 | .NET Framework: 641. [Out] 형식의 int * 인자를 가진 함수에 대한 P/Invoke 호출 방법 | 1 |
11142 | 정성태 | 2/5/2017 | 34005 | .NET Framework: 640. 닷넷 - 배열 크기의 한계 [2] | 1 |
11141 | 정성태 | 1/31/2017 | 28893 | .NET Framework: 639. C# 개발자를 위한 Win32 DLL export 함수의 호출 규약 (4) - CLR JIT 컴파일러의 P/Invoke 호출 규약 [1] | 1 |
... 106 107 108 109 110 111 112 113 [114] 115 116 117 118 119 120 ...