[#395238] rubygem: ispunity (unite all your internet connections) — Arun Tomar <tomar.arun@...>
Dear friends,
Hi sir,
Hi!
[#395241] assert_equal ([:r, :u, :b, :e, :q, :u, :e] __), [:b, :q] — David Gustafson <daveg@...>
This is part of a online ruby quiz. Just doing it for my own
[#395250] Overwriting one Ruby array or arrays with another — Craig Law <lists@...>
Hi
[#395258] array of strings - finding letter combinations — "Sebastjan H." <lists@...>
Hi All,
Hi,
Hi Jan,
Sebastjan H. wrote in post #1059226:
Ok, thx. Just so I understand correctly, these two lines are just
for some reason the mailing list server rejected this post, so i'll
Thank you all for your kind help. I'll try to complete this task and
Sebastjan H. wrote in post #1059386:
[#395262] rb_errinfo() "captures" more than exceptions, but also Interrupt and SystemExit — Iñaki Baz Castillo <ibc@...>
Hi, my Ruby C extension use rb_protect() to rescue Ruby errors in the
[#395279] Psych dumping in binary — Jim Hranicky <jfh@...>
I've got an app that I use ascii-8bit encoding as the default to
[#395290] How can i load image and display it using ruby? — gmspro gmspro <lists@...>
Which library/api is used to load and display image using ruby?
[#395306] rspec-2.10 is released! — David Chelimsky <dchelimsky@...>
rspec-2.10 is released=21
[#395311] install ruby 1.9.3 on Mac — Amidou NDIAYE <lists@...>
I would like to upgrade my actual ruby version 1.8.7 installed on my Mac
[#395335] proper way to create truly new dup/cloned object? — ruby gem <lists@...>
a = "pass"
[#395336] break down of differences between interpreters? — ruby gem <lists@...>
All I can ever find is performance comparisons, but it must be more than
On Sun, May 06, 2012 at 08:13:26PM +0900, ruby gem wrote:
[#395344] Ruby scripting? — "cristian d." <lists@...>
Hi my name is Christian,
[#395352] mkmf: how to include .c and .h files within a subdirectory? — Iñaki Baz Castillo <ibc@...>
Hi, having the following file tree under my ext/ directory:
[#395357] Why Enumerator#next does not return more than one value? — Földes László <lists@...>
If I have an Enumerator which yields elements of a mathematical series
On Mon, May 7, 2012 at 3:10 PM, F=F6ldes L=E1szl=F3 <lists@ruby-forum.com> =
Robert Klemme wrote in post #1059863:
Florian Gilcher wrote in post #1059865:
[#395373] How to use Data_Wrap_Struct to assign the DATA VALUE to an exsiting Ruby object? — Iñaki Baz Castillo <ibc@...>
Hi, my code receives an arbitrary klass name (provided by the user)
I単aki Baz Castillo <ibc@aliax.net> wrote:
2012/5/9 Eric Wong <normalperson@yhbt.net>:
[#395402] How to make a given klass to include a module — Iñaki Baz Castillo <ibc@...>
Hi, simple code:
Am 09.05.2012 13:36, schrieb Iテアaki Baz Castillo:
2012/5/9 Quintus <quintus@quintilianus.eu>:
On Wed, May 9, 2012 at 1:52 PM, I=F1aki Baz Castillo <ibc@aliax.net> wrote:
[#395413] Hooking into the VM's shutdown process — "Darryl L. Pierce" <mcpierce@...>
I've got a native extension that needs to run in a thread separate
Am 09.05.2012 17:44, schrieb Darryl L. Pierce:
[#395423] get pixel color of a screen — Ivan Vilches Basaul <ivan_vilches@...>
[#395429] passing via instance variable or regular () — sam jam <lists@...>
def first
[#395435] How to create a sinatra app that can create ebooks on heroku? — Kenley Tan <kenleytan@...>
Hi guys,=0A=0AI'm not new to ruby or Sinatra=A0but I have no idea how to ge=
On Thu, May 10, 2012 at 12:54 AM, Kenley Tan <kenleytan@yahoo.com> wrote:
Hi Hassan,
[#395449] syntax error, unexpected ',' , expecting ')' — David Acosta <lists@...>
Hello people, i am new at ruby and ror developing and i need your help
[#395463] I'm looking for a Metaprogramming Project — Phil Stone <lists@...>
Hello,
Thanks for all the feedback!
[#395464] Why do you think of NilClass#to_proc? — Intransition <transfire@...>
I have two minds about using a NilClass#to_proc
[#395478] Beginner's questions — Manfredi Pivetta <lists@...>
Hello everyone.
[#395492] Is it safe to use rb_hash_delete() without having the GVL? — Iñaki Baz Castillo <ibc@...>
Hi, my code is a C event loop that runs without the GVL (so other Ruby
Hi,
2012/5/14 SASADA Koichi <ko1@atdot.net>:
[#395506] Accessing child variables — Sm sm <lists@...>
#!/usr/bin/env ruby-1.9.2
[#395528] net-ssh: Trouble forwarding local ports to a remote server — Maxwell Pray <lists@...>
Here's the plan: I need to forward a Samba connection on my machine to a
[#395536] Visibility of ruby applications — Kacper Borodziuk <lists@...>
I have a question. is there a ruby command or set of commands that can
[#395548] A million reasons why Encoding was a mistake — Marc Heiler <lists@...>
Newcomer wants to try Ruby.
I will add that the OP is not entirely alone in his opinion.
Hi,
On Wed, May 16, 2012 at 9:02 AM, Brian Candler <lists@ruby-forum.com> wrote=
[#395549] Option Parser with an optional flag/switch for last argument — Neubyr Neubyr <lists@...>
I am using OptionParser to parse command-line options. I would like to
[#395551] How to ensure that a block runs entirely after other threads? (Thread.exclusive does not "work") — Iñaki Baz Castillo <ibc@...>
Hi, I expected that in the following example code, thread t1 would not
On Tue, May 15, 2012 at 5:36 PM, I=F1aki Baz Castillo <ibc@aliax.net> wrote=
On 16 May 2012 17:27, Robert Klemme <shortcutter@googlemail.com> wrote:
[#395565] QtRuby: How to edit data in a TableModel/TableView? — Cristhian Boujon <lists@...>
Hello all,
[#395575] GUI with ruby on windows — David Acosta <lists@...>
hello friends, i am a begginer and i have a litlle question, how can i
hi,
hi David,
[#395588] problem installing TkRuby on ubuntu 12.04 — Bharadwaj Srigiriraju <lists@...>
Might seem a little long, but it's actually pretty small...
From: Bharadwaj Srigiriraju <lists@ruby-forum.com>
Hidetoshi NAGAI wrote in post #1061107:
[#395604] what is going wrong here? — roob noob <lists@...>
Notice the initialization of both classes in each of the examples, if
Hi,
How do I iterate through a Class so that I can perform some action on each object? For example...
First let me thank you for all of the help you have been :). It is much
On Thu, May 17, 2012 at 6:38 PM, roob noob <lists@ruby-forum.com> wrote:
[#395611] Which exception classes does "rescue" trap? — Iñaki Baz Castillo <ibc@...>
Hi, using Ruby 1.9 I've realized that "rescue" traps more than
[#395646] rb_gc_register_address() or rb_gc_mark()? — Iñaki Baz Castillo <ibc@...>
Hi, I've bad experiences with rb_gc_register_address(), it does never
2012/5/17 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
2012/5/17 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
2012/5/17 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
2012/5/17 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
On May 17, 2012, at 12:24, I=F1aki Baz Castillo wrote:
i create an hash from the C-side, mark them with rb_global_variable and
[#395664] why is else without rescue useless with statement modifiers? — roob noob <lists@...>
def sane?
[#395686] reading from and writing to a Unicode encoded file — "Sebastjan H." <lists@...>
Hi,
Hello,
Regis d'Aubarede wrote in post #1061272:
Sebastjan H. wrote in post #1061276:
Regis d'Aubarede wrote in post #1061277:
Hi,
Sebastjan H. wrote in post #1061483:
Hi Sebastjan,
ashbb shoeser wrote in post #1061501:
Hi Sebastjan,
ashbb shoeser wrote in post #1061510:
Hi Sebastjan,
ashbb shoeser wrote in post #1061553:
Hi Sebastjan,
[#395688] Methods as arguments? — Robinson Risquez <lists@...>
Hi, I was experimenting with the arguments of the methods and I have a
there are two ways:
Hans Mackowiak wrote in post #1061260:
You would have to implement def aaa a little differently.
[#395706] Ruby- puts with accents — "Mariano José G." <lists@...>
Hello Guys!,
[#395726] Rubygems problem on ubuntu 12 (server) — "cristian d." <lists@...>
Hi!
[#395733] Having trouble with instructions in The Pragmatic Programmers Learn to Program — "kerri l." <lists@...>
I have been reading the book (Pragmatic Programmers) and I'm having
[#395740] ? Ruby through CGI and Rails — Shaun Lloyd <list@...>
Hi everybody,
I would not consider CGI obsolete. Unless you are referring to ruby's
Shaun Lloyd wrote in post #1061455:
On 22/05/12 03:37, Brian Candler wrote:
Shaun Lloyd wrote in post #1061602:
On 23/05/12 19:36, Brian Candler wrote:
Shaun Lloyd wrote in post #1061834:
[#395744] ruby in a box — Martin DeMello <martindemello@...>
I've been thinking about the minimal feature set a beginner-friendly
[#395752] Why UBF() is called even if Ruby traps signals ?? — Iñaki Baz Castillo <ibc@...>
Hi, according to the doc of rb_thread_blocking_region() (or
2012/5/21 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
I単aki Baz Castillo <ibc@aliax.net> wrote:
2012/5/22 Eric Wong <normalperson@yhbt.net>:
[#395773] spawn a process and keep the output, but stdout -> $stdout — Roger Pack <lists@...>
Hello all.
[#395787] Changing self class from inside a method?? — David Madison <lists@...>
Let's start off with the assumption I want a method that allows an
[#395804] Disginguishing object types — Doug Jolley <lists@...>
Frequently hash values are a mixture of object types. In the case at
[#395806] Opinion on String#camelcase — Intransition <transfire@...>
Recently I adjusted Ruby Facets String#camelcase method to leave the first
[#395841] Memory-efficient set of Fixnums — George Dupre <lists@...>
Hi,
Thanks, but Hash has an even bigger memory imprint, so that won't do
Thank you for your help,
> I have to:
[#395842] How to replace a letter with a corresponding number — Rich McMullen <lists@...>
I am working through the Ruby Quiz website and I am already stuck on
[#395883] looking for a ruby idiom : r=foo; return r if r — botp <botpena@...>
Hi All,
botp wrote in post #1061908:
On Thu, May 24, 2012 at 7:30 AM, Llelan D. <lists@ruby-forum.com> wrote:
On 24 May 2012 19:30, Robert Klemme <shortcutter@googlemail.com> wrote:
thank you all, matt/llelan/robert.
On Thu, May 24, 2012 at 4:50 PM, botp <botpena@gmail.com> wrote:
[#395901] Don't override it - Use it — Doug Jolley <lists@...>
I am learning Ruby. It is my understanding that when we "override" a
Hi,
> And it *is* actually called overriding:
[#395902] rb_protect() with more than a single parameters — Iñaki Baz Castillo <ibc@...>
Hi, rb_protect() is declared as:
you could use something like this:
[#395904] Could Ruby GC my VALUE in while acquiring the GVL? — Iñaki Baz Castillo <ibc@...>
Hi, I'm in C land without GVL and give value to a static VALUE
[#395914] Modify an attribute in a method? — Robinson Risquez <lists@...>
Hi all, I write the following problem to see if you can clarify me:
Hello,
[#395929] accessing data in a ruby array — "Maksim D." <lists@...>
I have this array. I want to access the stuff in the hashes.
[#395960] SimpleCov error on Ruby 1.9.3 (but OK on 1.9.2) — Antoine Proulx <proulx.antoine@...>
Hi,
[#395961] looking for a ruby equivalent of python's ply — botp <botpena@...>
Hi all, subject says all. am looking a ruby equivalent of python's ply
[#395966] Am I justified to use a global variable if it must be used in all scopes? — Phil Stone <lists@...>
Hello,
On Sun, May 27, 2012 at 2:33 PM, Phil Stone <lists@ruby-forum.com> wrote:
[#395979] extconf.rg and #ifdef — Iñaki Baz Castillo <ibc@...>
Hi, depending whether my Ruby C extension is being compiled on *nix or
[#395991] Where is tcpserver.c Included By socket.c? — James Harrison <jam@...>
Hey folks,
[#396000] faster CSV writing — steven gre <lists@...>
trying to take scraped info business name address and phone# i can get
On Mon, May 28, 2012 at 9:21 PM, steven gre <lists@ruby-forum.com> wrote:
[#396010] does this leak more than the size of the string via timing side channels — rooby shoez <lists@...>
string1 = "string"
yuck the first example has issues I just realized, how about this way:
Yes but I imagine that Ruby returns false on the first mismatch. So
On May 29, 2012 7:28 AM, "rooby shoez" <lists@ruby-forum.com> wrote:
Ok, now I get it,
[#396038] Is it possible to avoid longjmp in exceptions, Thread#kill, exit(), signals? — Iñaki Baz Castillo <ibc@...>
Hi, my Ruby C extension runs a C loop (libuv) without GVL. At some
Please forget this for now. I've realized that my call to rb_protect()
Iñaki Baz Castillo писал 29.05.2012 22:37:
[#396051] Problem with duplicated values in writing to an array — Thiel Chang <schang@...>
Hi,
[#396061] Newbie question: command line to execute a method from .rb file — "n/a n/a" <lists@...>
Hi there -
[#396071] The last question about rb_gc_register_address(): a case in which in works with dynamic memory — Iñaki Baz Castillo <ibc@...>
Hi, what I understand (after some useful threads in this mailist)
2012/5/30 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
Re: Beginner's questions
> First question. How do I compile Ruby code on Linux? I've tried to > look for a compiler on Ubuntu softwere center and... failed. I'm used > to compiling C code with the gcc command from terminal, is there > a similar command for ruby code? Be warned that debian is a stupid distribution that believes that the user is an idiot. It shows so by splitting up packages into 10000 different subpackages, crippling them all by default. Yes - splitting away the header files BY DEFAULT, without giving the user a GLOBAL way to REVERT this idiotic decision, is crippling packages. Even worse, they dump every shit into /usr prefix rather than package things up neatly into AppDirs. Anyway. I write this because you must be warned. If you really want to compile Ruby code on "linux", but then write you are on ubuntu, you may already have a crippled ruby version in /usr prefix. If you want to use your own compiled ruby, remove all the ubuntu ruby shit. This is usually /usr/bin/ruby ruby1.8 ... then in /usr/lib some ruby. Also check for irb and ri (but I think by default they dont provide ri, as stupid as debian is.) Once you removed the crippled ruby, you must decide which ruby version you want to compile: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2 ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.bz2 I myself still use 1.8.7 because of the useless Encoding addition to 1.9.3, which I never need, and never will need. But be aware that ruby 1.8.7 is more or less dead, so you need to keep in mind the option to upgrade one day. If you pick 1.9.3, that of course does not apply to you. Download this. Then extract it and enter the directory. Now, you need to decide on a proper prefix to configure. I recommend /usr prefix. ./configure --prefix=/usr I personally however use: ./configure --prefix=/Programs/Ruby/1.8.7p358 After configure phase, do make and then make install in the traditional way. There is an optional step to install the documentation, but you can skip it for now. The first part is just to ensure that you can actually COMPILE ruby. On my system I can, but on a default crippled ubuntu system some header files may be missing. You have to uncripple this, i.e. by apt-get install build-essentials. Or some other command, I really dont know and dont want to know either (I compile all that ruby requires on my own anyway, from source). If everything worked well, ruby is now installed into /usr prefix. (I use symlinks for the /Programs/Ruby/1.8.7p358 approach, so this may be hard for you. RVM uses a similar approach by the way.) > If that's the case, what command is it and what's > the syntax? If you decide on /usr prefix, configure + prefix, make, make install are sufficient. You can also use prefix /usr/local (which is the default for configure, if --prefix=/usr was omitted) or /opt - personally I find these all ugly compared to app-dirs, but sadly the Linux world is too stupid to move away from /usr scheme, and they will use a lot of propaganda to justify the DEFAULT way - I always laugh when I hear that, because they justify being LAZY and UNABLE to use ANYTHING else. (Yup, sadly Gobolinux is dead ... NixOS has cool ideas, but the idea to store the hash as part of the DIRECTORY name is NOT user friendly at all.) > Does it have meaningful options? There are some options. For instance, I often tend to use: --enable-pthread --enable-install-doc --with-static-linked-ext The last may be a problem. Anyway, the options should not be important at all. Just try to make it WORK first. :) > (Well, there's --help for that, but I'd like to hear > it first person since sometimes I've troubles > understanding the output of the terminal) Understandable. I still have not managed to compile a static ruby, unfortunately. I'd really love a static ruby, because I tend to break things on my system a lot, and then I have to fix it up again. (I recently broke my bash shell, by removing ncurses. Sadly, /bin/sh depended on shared ncurses library, and thus my system was no longer working. Since then, I always compile bash statically - I dont understand why such BASIC things are compiled in a shared way. This just leads to a more fragile system IMO.) > Second question. How do I work with a graphic interface? > Is there a library? Ruby gtk works well on Linux and Windows. Unfortunatly GUI in Ruby are a WEAK point ... > If there is a library, is there a reference manual for > the library? Yes, for ruby-gtk. Download the official source. It has about 300 examples or some such. I never managed to read them all. :) > I don't require big things, but I've never been able > to actually produce a graphical output Ruby-Qt and Ruby-Tk also work. Ruby-Qt would be the best, but it has no real documentation and almost no users that I can see.... which is sad. Qt is better than GTK, but I prefer to use GTK for ruby simply because it works so much better and there are more people that use it than QT. > and tutorials do not help in any meaningful way. Then simply look at the examples and run them. Then tweak them. That is how I learned Ruby-Gtk (+ I kept my local docu) > I've learned to create even quite complex programs in C, > but they were always on the terminal and the most > interesting graphical output command I had was > printf. Same way with Ruby too. But 30% of the code only. Perhaps even less so, if you write your own libraries and classes that simplify this even further. ;) > Since I'm trying to write a program for some elementary > kids, I'd rather avoid the terminal altogether. The terminal OUTPUT, but you can build your PROGRAM in a MODULAR way. Then you can decide what you want to use at any time. I always start with terminal output design, and design it in a way that I can hook up a GUI to it at a later time (but as said, sadly, the GUIs in Ruby are not that great). > Third question. If I compile a ruby program, how can I make sure > that double clicking on it will make it run properly (and activate > the above mentioned user interface)? You do not COMPILE a ruby program. :( Did you even read up on Ruby on wikipedia at all? Anyway, if you want to provide your program to others, you should create a gem for your project. If the name is foobar of your project, then they can install it like so: gem install foobar > I understand these are some pretty stupid questions, but they > got me stuck for quite a while and I have noone to ask them to. :) They are not stupid, they only show that you do not have sufficient knowledge to answer them for your own at this point. I recommend you to start with a TERMINAL program in Ruby, because it is SIMPLER. Keep it small, simple, and have it solve one or a few tasks very well. THEN, declare it finished, and turn it into a gem. Then upload this. Once you did this, you can THEN try to use a GUI. -- Posted via http://www.ruby-forum.com/.