[#408616] How to get the User_logged in windows with Sinatra — Mario Ruiz <lists@...>
I need to know the user that is accessing the intranet i created with
[#408620] including FileUtils::Verbose crashes Marshal.dump — Bryan Lockwood <lockwood.bryan@...>
This is a bug I ran into today. I'm not sure who's responsible for =
[#408622] Error with JSON#parse — Love U Ruby <lists@...>
require 'json'
The same with `YAML#load`
[#408624] Why the use of a pound (#) sign with Enumerable — Ruby Student <ruby.student@...>
Team,
[#408634] How do I make lots of classes aware of each other? — "Andrew S." <lists@...>
I'm apparently missing something fundamental in my knowledge of classes
You can use send which as you would expect sends messages to an object. You
Thanks.
[#408654] Backtick probleme — xcoder Blue_fox <lists@...>
Hey guys i got a probleme with this code :
[#408662] How can I add minutes,seconds and hours to a DateTime object? — Love U Ruby <lists@...>
require 'date'
[#408668] Implementing sort/sort! — Kyle Hunter <lists@...>
Hello,
On Wed, Jul 3, 2013 at 4:39 AM, Kyle Hunter <lists@ruby-forum.com> wrote:
[#408680] Difference between Kernel#__callee__ and Kernel#__method__ — Love U Ruby <lists@...>
Is there any Difference between Kernel#__callee__
[#408684] rake drake or ? — Marc Weber <marco-oweber@...>
Is there yet another alternative to drake vs rake?
[#408701] Loading csv giving error — Nithi anand <lists@...>
hi guys I am trying to compare some data so I create one file name
[#408712] Ruby web service with REST support — "Shubhada S." <lists@...>
Hi All,
I would suggest you install the Sinatra gem, and read the
On Fri, Jul 5, 2013 at 12:03 PM, Matthew Kerwin <matthew@kerwin.net.au>wrote:
Robert Klemme wrote in post #1114499:
On Mon, Jul 8, 2013 at 7:42 AM, Shubhada S. <lists@ruby-forum.com> wrote:
I am still confused when to use phusion passenger and when to use rails?
[#408713] Ruby link grabber — xcoder Blue_fox <lists@...>
Hey guys i wanted to write a ruby code to grab all links from html code
[#408724] How do I rescue a program exception in an at_exit block? — Josh Cheek <josh.cheek@...>
I was thinking about how bad I am at reading error messages, and realized
On Fri, Jul 5, 2013 at 4:08 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
[#408734] what is Vector#map2 ? — Love U Ruby <lists@...>
Hi,
[#408745] How can I make ruby read a string of characters per three characters? — Sam Thorpe <lists@...>
I want to input a string of characters, and have it be read by every
[#408757] Parslet: subtrees merged without warning? — Axel Friedrich <lists@...>
Hi,
> Or, in which cases results are lost/merged silently?
Hallo Kaspar,
> Could I easily add some extension code to get a message in this case,
> Probably
> I think, I haven't understood the "philosophy" of Parslet yet. There are
[#408778] Price lookup from sketchup to csv — Nithi anand <lists@...>
I need to perform a lookup on a CSV file.
[#408787] execute_script - selenium-webdriver — Love U Ruby <lists@...>
HTML:
[#408788] A very half-baked idea: setting local variables — Hal Fulton <rubyhacker@...>
I'm sure this nonexistent feature is not in great demand, but there have
[#408795] Well-Grounded Rubyist -- Person class implementation in chapter 4 question — Arslan Farooq <lists@...>
Hi,
[#408801] Help me to understand a Ruby file — Salvo Foru <lists@...>
Hello everyone, I'm a new to the site and I'm just starting to learn
[#408808] how to compile .so on windows — Dimmak SDI <lists@...>
Plese help me!
[#408812] create variables depending on counter — stefan heinrich <lists@...>
Hi community,
Hi Robert and Marcus,
Ok i got it. Thank you so much.
[#408819] search a string with ruby then read what comes after the string in the same line — dJD col <lists@...>
I am trying to look for a a given string in a text and once i find the
[#408842] Why can't I just subtract in a loop without restating the variable? — Wayne Brisette <wbrisett@...>
I have some code that uses a counter. In certain circumstances, I have to s=
[#408854] execute commands within SMTP email code: send content in variables and not actual variables — dJD col <lists@...>
I am trying to send an email using the code below. I am able to send the
I was able to print the values of the variables t and s
[#408894] phusion passenger + uninitialised constant+ NameError — "Shubhada S." <lists@...>
Hi,
[#408906] how to upgrade to the latest version of ruby ? — Love U Ruby <lists@...>
I am using RVM with Ubuntu13.04. Installed version of Ruby is :
[#408911] Module Confusion — "Michael W." <lists@...>
The below code works. Question though. How does add_to_stack acess the
[#408925] closing a socket while another thread is in an IO.select() call on it — Graham Menhennitt <graham@...>
Hello Rubyists,
[#408927] Ticket for eurucamp 2013 — Jens Hausherr <jabbrwcky@...>
Hi Rubyists,
[#408937] Get part of matrix — "Diego N." <lists@...>
Hi!
[#408944] Kernel.caller Performance Across Different Ruby Versions — Peter Giacomo Lombardo <lists@...>
I wrote a quick Ruby script to benchmark Kernel.caller using ruby-prof.
[#408955] Iteration anomalu — "Andrew D." <lists@...>
Surely this is a FAQ but I can't figure out how I would search for an
[#408963] Allowing a character through Addressable::URI unescaped — Joel Pearson <lists@...>
I have some code which used to work a few months ago but appears to have
[#408970] Install RVM on Solaris — "Chamila W." <lists@...>
I tried installing RVM on Solaris using command
[#408976] TryRuby Popup Problems — "Jayant S." <lists@...>
Hello there, my name is Jay. I wanted to introduce myself because I
[#408990] Hash#update - need tweaks — Love U Ruby <lists@...>
I am in a situation,where I have to the below kind of operations.
[#408994] Ruby Debugger — Alphonse 23 <lists@...>
Could anybody recommend me a good Ruby Debugger. Preferably one that
[#408995] ActiveSupport undercore behaviour — Serguei Cambour <lists@...>
I tried to use ActiveSupport 'underscore' method to convert some
tamouse m. wrote in post #1116149:
I am on the phone, but my guess is that the quotes and backslashes are
I changed as follows and it works for the first nest level for the
On Sun, Jul 21, 2013 at 7:03 AM, Serguei Cambour <lists@ruby-forum.com>wrote:
[#409008] Unsubscribe? — James Murphy <jamurphy84@...>
Hi all,
[#409031] tap { break } idiom deserves its own Kernel method? — Andy Lowry <lists@...>
I use this idiom from time to time:
On Mon, Jul 22, 2013 at 7:37 PM, Andy Lowry <lists@ruby-forum.com> wrote:
On Mon, Jul 22, 2013 at 10:37 AM, Andy Lowry <lists@ruby-forum.com> wrote:
I just used the pattern again, and this time it's a much simpler example
[#409046] Question on while loop to script — "Talal B." <lists@...>
Hi guys,
[#409047] using qsub from Ruby script produces "command not found" — Thomas Luedeke <lists@...>
I am running a script that runs multiple cases on an engineering code.
[#409052] How can we create instance method and class methods at runtime in ruby? — Love U Ruby <lists@...>
How can we create instance method and class methods at runtime in ruby?
Sorry for creating the confusions:-
[#409064] how to create structure like bellow — Expert Alart <lists@...>
Hi...
[#409072] Link To Masses Of External Data In Openoffice? — "Austin J." <lists@...>
This is what I want to do.
tamouse m. wrote in post #1116598:
tamouse m. wrote in post #1116750:
tamouse m. wrote in post #1116838:
On Sat, Jul 27, 2013 at 5:55 AM, Austin J. <lists@ruby-forum.com> wrote:
"Jes=C3=BAs Gabriel y Gal=C3=A1n" <jgabrielygalan@gmail.com> wrote in pos=
Am 27.07.2013 21:04, schrieb Austin J.:
unknown wrote in post #1116906:
Am 27.07.2013 22:12, schrieb Austin J.:
unknown wrote in post #1116910:
[#409073] class <=> module — Bráulio Bhavamitra <lists@...>
Hello all,
Am 24.07.2013 01:04, schrieb Br叩ulio Bhavamitra:
On Wed, Jul 24, 2013 at 1:10 AM, <sto.mar@web.de> wrote:
Am 24.07.2013 14:35, schrieb Josh Cheek:
[#409104] Ruby newbie question on Methods (NoMethoderror) — "Crispian A." <lists@...>
I have recently started learning ruby and so I am writing a small little
Am 25.07.2013 12:22, schrieb Crispian A.:
unknown wrote in post #1116651:
[#409119] replace words using gsub — noterrain mee <lists@...>
New to ruby! Body is a string, i am using the code directly below. I am
The k is an iterator. Let's use another example here to demonstrate:
[#409134] Learning how to create and save .rbs — Joseph Bershas <lists@...>
So I am trying to create and run an .rb, a basic stepping stone.
[#409139] How to install Ruby 2.0.0 locally - stuck — Thomas Luedeke <lists@...>
I previously installed Ruby 1.8.7 locally on my HP-UX Unix system,
[#409152] Calculate input - numbers — Marc Heiler <lists@...>
Hi
[#409161] Difference between Kernel#caller and Kernel#caller_locations — Love U Ruby <lists@...>
Hi,
[#409169] Love U Ruby — Dave Aronson <rubytalk2dave@...>
On Sat, Jul 27, 2013 at 5:13 PM, Ryan Davis <ryand-ruby@zenspider.com>
On Sun, Jul 28, 2013 at 2:26 AM, Dave Aronson <rubytalk2dave@davearonson.com
[#409170] Working through Ch.10 for learning to program 2.0 (Chris Pine) — JD JD <lists@...>
So, I have been working through this book, and have been doing ok up
I tried this and came up with a one-liner that seems to do it. It sorts the
Am 29.07.2013 16:43, schrieb Harry Kakueki:
On Tue, Jul 30, 2013 at 2:34 AM, <sto.mar@web.de> wrote:
[#409207] Losing values upon converting object to Array — Rochit Sen <lists@...>
Hi All,
[#409221] How to check an input IS an integer ? — Captain Ishido <ishido7@...>
Hi everyone !
[#409225] Question about arrays/hash — Jenn Fo <lists@...>
Hi All:
[#409234] Parsing Data from Row using Regexp — Joel Dezenzio <lists@...>
Hi All,
[#409266] Is there a good port of Ruby for Solaris 10? — Rick Carrick <lists@...>
Does anyone know of a place to DL Ruby for Solaris 10?
[#409267] Method tracker - Need assistance — Kenny Meyer <kenny@...>
I would like to write an includable method tracker, which logs about added
Re: Faster primality testing and factorization methods in Ruby
ah yeah, on 32-bit it's really-really slow.. (trying on my more powerful PC instead of my old laptop for now) soo.. the conclusion would be: Miller-Rabin is the fastest http://pastie.org/8189939 ruby: 343s jruby: 284s On Tue, Jul 30, 2013 at 12:05 PM, Matthew Kerwin <lists@ruby-forum.com>wrote: > I get the following, on an Ubuntu 64-bit VM (edited to fit the page > width): > > prime.rb:44: warning: assigned but unused variable - rescnt > prime.rb:85: warning: assigned but unused variable - rescnt > prime.rb:119: warning: assigned but unused variable - rescnt > prime.rb:159: warning: assigned but unused variable - rescnt > prime.rb:165: warning: assigned but unused variable - modk > prime.rb:212: warning: shadowing outer local variable - p > Rehearsal ------------------------------------------------- > prime tests for P = 20000000000000003 > Miller-Rabin 0.000000 0.000000 0.000000 ( 0.000761) > primzp7? 2.290000 0.000000 2.290000 ( 2.294709) > primzp7a? 0.970000 0.000000 0.970000 ( 0.971033) > primzp7b? 0.980000 0.000000 0.980000 ( 0.978331) > primzp? 13 1.900000 0.010000 1.910000 ( 1.905374) > primzp? 17 1.870000 0.000000 1.870000 ( 1.877343) > primzpa? 13 3.200000 0.050000 3.250000 ( 3.255519) > primzpa? 17 3.100000 0.040000 3.140000 ( 3.127512) > factorzp 13 1.940000 0.000000 1.940000 ( 1.949376) > factorzp 17 1.870000 0.000000 1.870000 ( 1.870068) > prime? [ruby lib] > 26.550000 0.010000 26.560000 ( 26.569130) > prime_division [ruby lib] > 29.570000 0.000000 29.570000 ( 29.585618) > ---------------------------------------- total: 74.350000sec > > user system total real > prime tests for P = 20000000000000003 > Miller-Rabin 0.000000 0.000000 0.000000 ( 0.000562) > primzp7? 2.320000 0.000000 2.320000 ( 2.319329) > primzp7a? 0.980000 0.000000 0.980000 ( 0.974572) > primzp7b? 0.980000 0.000000 0.980000 ( 0.984110) > primzp? 13 1.920000 0.000000 1.920000 ( 1.923894) > primzp? 17 1.880000 0.010000 1.890000 ( 1.884494) > primzpa? 13 3.080000 0.030000 3.110000 ( 3.109670) > primzpa? 17 3.010000 0.020000 3.030000 ( 3.028406) > factorzp 13 1.910000 0.000000 1.910000 ( 1.917429) > factorzp 17 1.880000 0.000000 1.880000 ( 1.875251) > prime? [ruby lib] > 25.170000 0.000000 25.170000 ( 25.177364) > prime_division [ruby lib] > 28.270000 0.020000 28.290000 ( 28.298034) > > [Kiswono Prayogo, note the durations, especially in the core methods; > 10s is too short for calculating primality of large numbers. Have > patience.] > > Note that all the warnings can be resolved by removing the unused > definitions, and renaming that 'p' variable in the block. They're > messy, but unimportant. > > -- > Posted via http://www.ruby-forum.com/. > > -- Regards, Kiswono P GB