글쓴 사람
정성태 (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>
[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]
... 76 77 78 79 80 81 82 [83] 84 85 86 87 88 89 90 ...
No | Writer | Date | Cnt. | Title | File(s) |
11895 | 정성태 | 5/12/2019 | 22562 | .NET Framework: 832. ML.NET Model Builder - 회귀(Regression), 다중 분류(Multi-class classification) 예제 | 1 |
11894 | 정성태 | 5/10/2019 | 24519 | VS.NET IDE: 135. Visual Studio - ML.NET Model Builder 소개 [5] | |
11893 | 정성태 | 5/10/2019 | 20585 | 오류 유형: 535. C# 6.0 이상의 문법을 컴파일 시 오류가 발생한다면? | |
11892 | 정성태 | 5/10/2019 | 20495 | 웹: 38. HTTP Cookie의 expires 시간 형식(RFC7231) | |
11891 | 정성태 | 5/9/2019 | 23623 | .NET Framework: 831. (번역글) .NET Internals Cookbook Part 12 - Memory structure, attributes, handles | |
11890 | 정성태 | 5/8/2019 | 19282 | 개발 환경 구성: 439. "Visual Studio Enterprise is required to execute the test." 메시지와 관련된 코드 기록 | |
11889 | 정성태 | 5/8/2019 | 19326 | 개발 환경 구성: 438. mstest, QTAgent의 로그 파일 설정 방법 | |
11888 | 정성태 | 5/8/2019 | 37233 | .NET Framework: 830. C# - 비동기 호출을 취소하는 CancellationToken의 간단한 예제 코드 [1] | 1 |
11887 | 정성태 | 5/8/2019 | 23073 | .NET Framework: 829. C# - yield 문을 사용할 수 있는 메서드의 조건 | |
11886 | 정성태 | 5/7/2019 | 20125 | 오류 유형: 534. mstest.exe 실행 시 "Visual Studio Enterprise is required to execute the test." 오류 [2] | |
11885 | 정성태 | 5/7/2019 | 17601 | 오류 유형: 533. mstest.exe 실행 시 "File extension specified '.loadtest' is not a valid test extension." 오류 발생 | |
11884 | 정성태 | 5/5/2019 | 22513 | .NET Framework: 828. C# DLL에서 Win32 C/C++처럼 dllexport 함수를 제공하는 방법 - 두 번째 이야기 | |
11883 | 정성태 | 5/3/2019 | 27518 | .NET Framework: 827. C# - 인터넷 시간 서버로부터 받은 시간을 윈도우에 적용하는 방법 | 1 |
11882 | 정성태 | 5/2/2019 | 23985 | .NET Framework: 826. (번역글) .NET Internals Cookbook Part 11 - Various C# riddles | 1 |
11881 | 정성태 | 4/28/2019 | 24085 | 오류 유형: 532. .NET Core 프로젝트로 마이그레이션 시 "CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute" 오류 발생 | |
11880 | 정성태 | 4/25/2019 | 19839 | 오류 유형: 531. 이벤트 로그 오류 - Task Scheduling Error: m->NextScheduledSPRetry 1547, m->NextScheduledEvent 1547 | |
11879 | 정성태 | 4/24/2019 | 28752 | .NET Framework: 825. (번역글) .NET Internals Cookbook Part 10 - Threads, Tasks, asynchronous code and others | 2 |
11878 | 정성태 | 4/22/2019 | 24012 | .NET Framework: 824. (번역글) .NET Internals Cookbook Part 9 - Finalizers, queues, card tables and other GC stuff | 1 |
11877 | 정성태 | 4/22/2019 | 24224 | .NET Framework: 823. (번역글) .NET Internals Cookbook Part 8 - C# gotchas | 1 |
11876 | 정성태 | 4/21/2019 | 22501 | .NET Framework: 822. (번역글) .NET Internals Cookbook Part 7 - Word tearing, locking and others | 1 |
11875 | 정성태 | 4/21/2019 | 24318 | 오류 유형: 530. Visual Studo에서 .NET Core 프로젝트를 열 때 "One or more errors occurred." 오류 발생 | |
11874 | 정성태 | 4/20/2019 | 24342 | .NET Framework: 821. (번역글) .NET Internals Cookbook Part 6 - Object internals | 1 |
11873 | 정성태 | 4/19/2019 | 23021 | .NET Framework: 820. (번역글) .NET Internals Cookbook Part 5 - Methods, parameters, modifiers | 1 |
11872 | 정성태 | 4/17/2019 | 23905 | .NET Framework: 819. (번역글) .NET Internals Cookbook Part 4 - Type members | 1 |
11871 | 정성태 | 4/16/2019 | 21794 | .NET Framework: 818. (번역글) .NET Internals Cookbook Part 3 - Initialization tricks [3] | 1 |
11870 | 정성태 | 4/16/2019 | 20682 | .NET Framework: 817. Process.Start로 실행한 콘솔 프로그램의 출력 결과를 얻는 방법 | 1 |
... 76 77 78 79 80 81 82 [83] 84 85 86 87 88 89 90 ...