Charles Oliver Nutter | 1 Jun 2009 01:51
Picon
Gravatar

Help JRuby "win" at JavaOne Script Bowl

Hey there folks! There will be a "Script Bowl" again this year at 
JavaOne, and we'd like your help in the "Community" round. We'd like to 
show slides listing projects, conferences, books, etc to show how 
healthy and busy the Ruby community is. I think just showing the sheet 
numbers of projects, etc will really drive the point home.

So I started a quick list of categories (probably one slide per 
category) and items to list here:

http://gist.github.com/121082

If you have suggestions, reply to this email, email me directly, or 
whatever.

Thanks very much everybody :)

- Charlie

J. D. | 1 Jun 2009 03:31
Picon
Gravatar

Sqlite3-ruby ON Windows Vista with 1.9.1p129 mingw32

I'm using the ming compiled 1.9.1 p 129 successfully on Vista and I even
managed to get mysql to work (lots of headaches but I did it).  However,
I can't get sqlite3-ruby to work.

I've tried the following:

gem install sqlite3-ruby -v=1.2.3 --platform=mswin32
-- it installs the gem correctly but I get "unable to find sqlite3.dll

Downloaded the latest sqlite3.exe,.dll
I've added the ALL to ruby\bin
I've added the .exe to C:\Windows
I've added the .dll to C:\Windows\System32

.. same issues ..

I've tried the following:

gem install sqlite3-ruby -v=1.2.3 --platform=mingw32
-- ERROR: failed to build gem native extension

If I try any rake commands I get cannot find the sqlite3.dll..

Anyone get this to work successfully?
--

-- 
Posted via http://www.ruby-forum.com/.

J. D. | 1 Jun 2009 03:33
Picon
Gravatar

Re: Sqlite3-ruby ON Windows Vista with 1.9.1p129 mingw32

As a further note, if I didn't need to use sqlite3, I wouldn't. 
However, I'm reading "Foundation Rails 2" (great book) which happens to 
have database examples starting in chapter 4 that use sqlite3.  So, if I 
want to work through anything in this book, I have to have this loaded.

*sigh*
--

-- 
Posted via http://www.ruby-forum.com/.

J. D. | 1 Jun 2009 04:40
Picon
Gravatar

Re: Sqlite3-ruby ON Windows Vista with 1.9.1p129 mingw32

Correction on the error message (it should read instead)

no driver for sqlite3 found

run IRB:

require 'sqlite3'
=> true

SQLite3::Database.new( 'mytest_db.sqlite3' )
RuntimeError: no driver for sqlite3 found

--

-- 
Posted via http://www.ruby-forum.com/.

Heesob Park | 1 Jun 2009 04:59
Picon

Re: [QUIZ] Quine (#207)

2009/6/1 Pascal J. Bourguignon <pjb <at> informatimago.com>:
> Robert Dober <robert.dober <at> gmail.com> writes:
>
>> Ok, the shortest solution did not have much success, what about a long
>> one then ;)
>>
>> http://pastie.org/495692
>
>
> $ echo ----- ; cat quine.rb ; echo ----- ; ruby quine.rb ; echo -----
> -----
> q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts
> -----
> q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts
> -----
>
Here is a variant version of the above:

puts (_="puts (_=%c%s%c)%%[34,_,34]")%[34,_,34]

Regards,
Park Heesob

Aureliano Calvo | 1 Jun 2009 05:16
Picon

Re: [QUIZ] Quine (#207)

I did something like that, but with parenthesis.

s="s=%c%s%c;printf(s,34,s,34)";printf(s,34,s,34)

It is based on the C quine that uses printf on the wikipedia page.

On Sun, May 31, 2009 at 2:10 PM, Pascal J. Bourguignon <
pjb <at> informatimago.com> wrote:

> Robert Dober <robert.dober <at> gmail.com> writes:
>
> > Ok, the shortest solution did not have much success, what about a long
> > one then ;)
> >
> > http://pastie.org/495692
>
>
> $ echo ----- ; cat quine.rb ; echo ----- ; ruby quine.rb ; echo -----
> -----
> q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts
> -----
> q=34;printf a="q=34;printf a=%c%s%c,q,a,q;puts",q,a,q;puts
> -----
>
>
>
>
>
> --
> __Pascal Bourguignon__
(Continue reading)

Aureliano Calvo | 1 Jun 2009 05:17
Picon

Re: [QUIZ] Quine (#207)

And I did one with a carriage return:

s="s=%c%s%c;printf(s,34,s,34,13,10)%c%c";printf(s,34,s,34,13,10)

A little longer but looks nicer

On Mon, Jun 1, 2009 at 12:16 AM, Aureliano Calvo
<aurelianocalvo <at> gmail.com>wrote:

> I did something like that, but with parenthesis.
>
> s="s=%c%s%c;printf(s,34,s,34)";printf(s,34,s,34)
>
> It is based on the C quine that uses printf on the wikipedia page.
>
>
>
> On Sun, May 31, 2009 at 2:10 PM, Pascal J. Bourguignon <
> pjb <at> informatimago.com> wrote:
>
>> Robert Dober <robert.dober <at> gmail.com> writes:
>>
>> > Ok, the shortest solution did not have much success, what about a long
>> > one then ;)
>> >
>> > http://pastie.org/495692
>>
>>
>> $ echo ----- ; cat quine.rb ; echo ----- ; ruby quine.rb ; echo -----
>> -----
(Continue reading)

Jorrel | 1 Jun 2009 05:59
Picon
Gravatar

Re: [QUIZ] Quine (#207)

Is using File considered cheating?

    puts File.readlines __FILE__

On Mon, Jun 1, 2009 at 11:17 AM, Aureliano Calvo
<aurelianocalvo <at> gmail.com>wrote:

> And I did one with a carriage return:
>
> s="s=%c%s%c;printf(s,34,s,34,13,10)%c%c";printf(s,34,s,34,13,10)
>
>
> A little longer but looks nicer
>
>
> On Mon, Jun 1, 2009 at 12:16 AM, Aureliano Calvo
> <aurelianocalvo <at> gmail.com>wrote:
>
> > I did something like that, but with parenthesis.
> >
> > s="s=%c%s%c;printf(s,34,s,34)";printf(s,34,s,34)
> >
> > It is based on the C quine that uses printf on the wikipedia page.
> >
> >
> >
> > On Sun, May 31, 2009 at 2:10 PM, Pascal J. Bourguignon <
> > pjb <at> informatimago.com> wrote:
> >
> >> Robert Dober <robert.dober <at> gmail.com> writes:
(Continue reading)

Xeno Campanoli | 1 Jun 2009 06:23
Picon

Re: Ruby LDAP SSL thingy won't go.

Brian Candler wrote:
> You asked the same question once before at
> http://www.ruby-forum.com/topic/187912
> 
> I gave you some suggestions to try to narrow down the problem. You 
> either ignored them, or didn't bother to post the results which would 
> have helped identify the problem.
> 
> However you didn't say before that you were running Ubuntu. If you are 
> using the stock Ubuntu ruby package, did you remember to install the 
> libopenssl-ruby package? (Ubuntu breaks out this part of Ruby into a 
> separate package)

Thank you Brian.  I am at home now.  I will try this first thing tomorrow 
morning.  I'm sorry I didn't see it before.  Perhaps that's all it is.

Matthew Williams | 1 Jun 2009 06:30

Re: [QUIZ] Quine (#207)

Version 1:  The "pretty" one with 'end's

require 'rubygems'
require 'ruby2ruby'

class Quine < Object
  def initialize
    puts "require 'rubygems'\nrequire 'ruby2ruby'\n#{Ruby2Ruby.translate
self.class}\nQuine.new\n"
  end
end
Quine.new

Version two, much less maintainable:

a="a=%p;puts a%%a";puts a%a

Version 3, cheating (unix only):

puts `cat #{$0}`


Gmane