[SOLUTION] [QUIZ] Probable Iterations (#141)025 (10/1/2007 5:14:05 PM) comp.lang.ruby My solution follows. Nothing fancy this time; just enough to do the job. One feature of interest: it calculates the exact room needed for the left-hand column in advance. -mental mode = nil if ARGV[0] =~... MenTaLguY
[ANN] scheduler 0.3119 (9/29/2007 9:39:54 PM) comp.lang.ruby --=-ZYRBCxj/G494v47O0V9z Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Just a quick note that I've released scheduler 0.3, a very small library which lets you schedule a block for execut... MenTaLguY
[SOLUTION][QUIZ] FizzBuzz (#126) [solution #1]929 (6/5/2007 6:17:55 PM) comp.lang.ruby I've got two solutions this go-round. First, the solution I would present were I asked to do this in an actual job interview: for n in 1..100 mult_3 = ( n % 3 ).zero? mult_5 = ( n % 5 ).zero? if... MenTaLguY
[ANN] concurrent-0.2.2 released (bugfixes)037 (6/1/2007 2:57:23 AM) comp.lang.ruby --=-RvGn7+bVrRbf5qvkQdX6 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Just a quick note that version 0.2.2 of the Omnibus Concurrency Library has been released; it removes some leftover... MenTaLguY
[ANN] Futures and JRuby: The Omnibus Concurrency Library 0.2.1321 (5/29/2007 12:53:20 AM) comp.lang.ruby --=-xL677J1Fq2Gb8CLTUc90 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Just a quick note that I've released version 0.2.1 of the 'concurrent' gem, which provides Actors, data-parallel pr... MenTaLguY
[ANN] Actors for Ruby: The Omnibus Concurrency Library 0.1025 (5/25/2007 4:10:40 AM) comp.lang.ruby --=-5yjgu/Y04i7mOe3teZpf Content-Type: text/plain Content-Transfer-Encoding: quoted-printable With all the recent interest in Erlang, I've decided to bump up the release schedule of my Omnibus Concurrency Libr... MenTaLguY
closing file descriptors138 (4/24/2007 9:45:46 PM) comp.lang.ruby Here's a question I never thought I'd have to ask -- how do I close a file descriptor opened via IO.sysopen ? -mental ... MenTaLguY
[SOLUTION] [QUIZ] Morse Code (#121)124 (4/23/2007 10:15:27 PM) comp.lang.ruby I've made no particular effort to make this solution efficient, but I had fun writing it. MORSE = Hash[*%w( A .- N -. B -... O --- C -.-. P .--. D -.. Q --.- E . R .-. F ..-. S ... G --. T... MenTaLguY
[ANN] minicomic-0.2022 (4/21/2007 6:39:54 PM) comp.lang.ruby --=-V1k0Lty3RNPYeo2Mtmpo Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Just a quick note that minicomic 0.2, rake rules for building folio minicomics, has been released. Major changes i... MenTaLguY
[ANN] minicomic 0.0.1028 (3/29/2007 8:59:20 AM) comp.lang.ruby --=-rUriajr+QpHpNJ6qZMAc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =3D minicomic 0.0.1 +minicomic+ is a library providing a set of rake rules for building print and web-ready files ... MenTaLguY
Runnin code at a certain time?1927 (5/25/2009 4:42:08 PM) comp.lang.ruby Hello all, I am new to ruby and I am attempting to run some code at a certain time. The Ruby Time class is very interesting, you can add time, and do all of these amazing things but i cannot find a way to ru... carrottop123(4)
A Question Of Coupling125 (4/2/2008 6:46:49 PM) comp.lang.ruby I have a choice to make about a class interface. This is a very very simplified "foo" demo of that choice. #1 class Foo def initialize(bar) @bar = bar end def okay? bar.okay? en... transfire(2969)
Encode as alphanumeric637 (3/26/2008 8:13:23 PM) comp.lang.ruby Hi, I need to take an arbitrary byte string and encode it as alphanumeric (and decode it back again). Any pointers on a easy way to do this? Thanks, T. ... transfire(2969)
thread.rb520 (3/25/2008 3:32:38 AM) comp.lang.ruby I want to modify the Queue class in thread.rb, so I first searched for the file. I found it in /usr/lib/ruby/1.8/thread.rb, both on a Mac and a Linux machine. On the Mac, the file was as expected, but on the ... abender(15)
multithreading sysread error326 (3/5/2008 9:10:20 AM) comp.lang.ruby Hi All, I am a newbie at scraping and multi-threading too. Recently, I have to implement these two in one of my application. Please find my code in the attachment. I was facing some peculiar issues a... bagam_venkat(19)
trouble with threads531 (2/21/2008 1:06:14 AM) comp.lang.ruby I am trying to expand my web crawler to use multiple threads (with mechanize), and I ma having some trouble. It seems that each thread is not creating a local variable, but rather they are sharing the "index" v... dtown22(34)
Ruby 1.9, threads and FreeBSD 5332 (2/20/2008 1:09:20 PM) comp.lang.ruby Hi, Considering the following theory code: require "thread" ping = ConditionVariable.new pong = ConditionVariable.new mutex = Mutex.new 1.upto(10) do # 10 threads pong Thread.new do mutex.sync... jaco1(104)
||= [] idiom1221 (2/19/2008 10:11:31 PM) comp.lang.ruby I often make use of this idiom to add something to an array in a hash of arrays: @categories = {} pagelist.each do |resource| @categories[resource.tag] ||= [] @categories[resource.tag] << resource end... leslieviljoen(259)
Thread safety #2629 (2/15/2008 6:54:29 PM) comp.lang.ruby With the discussion surrounding merb/rails and thread safety, I've been somewhat concerned with making my own tiny home-rolled web apps that I write thread safe, if only to become more knowledgeable on the subj... jeff.turcotte(5)