176255-177968
176142-178572 subjects 176457-178181
^ [QUIZ] Grid Folding (#63)
176255 [james graypr] 1. Please do not post any solutions or spoiler discussion for this quiz until
+ 176267 [ruby anthrop] } The input to the function is a string containing the characters "T" (the
| 176271 [matthew.moss] Yes... too few folds. The 16x16 (or MxN) paper should be reduced via
+ 176273 [matthew.moss] The first extra credit (handling dimensions other than 16x16) is
| 176411 [j.chris.turn] Is this right? I was under the impression that the above fold string
| 176413 [gavin refine] You can fold a 4x8 sheet of paper in half four ways. Two of them
| 176416 [j.chris.turn] That's how I read it. Looking back at the requirements, however, I now
+ 176467 [sander.land ] here is my solution, it uses a 3d array to keep track of the stack of
176470 [j.chris.turn] Here's my (first ever) solution. For the extra-extra credit, my
176494 [matthew.moss] Here is my own solution, using 3-deep nested arrays. I could clean
+ 176506 [bdolinar xmi] charset=UTF-8;
+ 176541 [matthew.moss] Well, I ended up cleaning up my submission a bit anyway. I still have
176542 [matthew.moss] Just realized I now use my Array.reflect in only one place, and it
176544 [matthew.moss] Actually .... (and I feel like I'm saying this just for my own
176546 [matthew.moss] On that note (i.e., that I'm talking to myself), here is the final
176547 [levin grunde] require 'enumerator'paper = (1..w*h).to_enum(:each_slice, w).to_a
176599 [novakps gmai] This was a lot of fun, but I never got to the extra-extra credit.
176602 [daniels pron] My solution, performs all the extra credits.
^ Array#each - getting each element and the index
176257 [pergesu gmai] Is there a way to get each element of an array, as well the index of
176259 [james graypr] You bet.
176262 [pergesu gmai] Perfect, thanks
176263 [dharple gene] If you do a ``ri Array'' you will see that #each_with_index is mixed
^ Gtk::Notebook#page
176264 [gargamello g] Why is it that Gtk::Notebook#page doesn't always return the same index
176349 [gargamello g] Ok sorry, my mistake. *ashamed*
^ basic WEBrick question
176268 [r.mark.volkm] I have the following basic code. When I run this it says "TCPServer
176279 [caleb aei-te] It works here on Linux. What's your platform, and are you sure you don't have
176286 [r.mark.volkm] Thanks for checking it!
176287 [caleb aei-te] There's usually a setting you can use to tell the OS to allow you to reuse the
^ Class variables in an inheritance hierarchy
176270 [talanb gmail] class Base
+ 176290 [dblack wobbl] Account.fields and Opportunity fields are methods, not variables. You
+ 176293 [ruby-forum-r] You can use class instance variables (Classes Are Objects Too(tm) :)
^ Newbie ahead!: Ruby-Demo
176272 [Meino.Cramer] can someone point me to a ruby demo-script?
+ 176276 [amrmalik gma] HTH,
+ 176277 [julesjacobs ] Show them: blocks, OOP, "the Ruby way".
| 176281 [matthew.moss] people = %w{David Amy Paul}.map { |name| Person.new(name) }
| 176379 [botp delmont] # can someone point me to a ruby demo-script?
+ 176620 [cadience gma] Here is a class that I just whipped up while I am also learning (just
^ error:- "regex literal in condition"
176282 [info jayeola] Simple script that spits out "Ruby" if it was typed at stdin. What's the error, see below.
176285 [florgro gmai] re = /Ruby/
^ Hungarian Case variable names.
176288 [zacharooni c] This is an ignorant question to pose, but here I go anyway.
+ 176289 [dblack wobbl] Tagging variables based on the class of the objects to which they
| 176292 [james_b neur] Class and object names should be clear enough to reflect what that are
| 176556 [probertm gma] Personally, I think that there is a place for short names as I find them
| 176559 [james_b neur] Well, readability and communication are key.
| 176563 [kevin.olbric] An interesting concept for functional apps (or system) Hungarian in
| + 176580 [dblack wobbl] (A class with an attribute called "text"?)
| | 176583 [james_b neur] Aesthetics? Encapsulation? Hiding implementation details? Amusement?
| + 176581 [kevin.olbric] David A. Black said..
| + 176582 [james graypr] How are you going to assign a variable (iText = ...), and then
| 176584 [kevin.olbric] I just tested this with a quick one and found that if you do something
| 176585 [james graypr] Gotcha. I thought you were talking about using local variables. I
+ 176291 [daniel.cedil] IMHO, I've never seen the use for it. As far as I know, variable names
+ 176294 [rforum gmail] See this article on what Hungarian notation really was meant to help
| 176296 [zacharooni c] Actually I hadn't read this article, but I've heard of Joel. Thanks to
+ 176295 [james graypr] I assume you know this, but just to be sure, Joel on Software has a
| 176320 [logancapaldo] As I was reading this, all I kept thinking of was ML/Haskell. In
+ 176324 [halostatue g] The term is actually Apps Hungarian and System Hungarian naming. What
^ Basic Inheritance questions {noob alert:- pickaxe ed. 2, page 27}
176297 [info jayeola] Chaps,
176298 [wilsonb gmai] In IRB, require the Song file, and then the KaraokeSong file, in that order.
176329 [info jayeola] Thanks for that speedy reply. I've decided to require the within the
176390 [shortcutter ] This test is completely superfluous. First, you don't do anything with
^ How do we start with ruby and rails?
176299 [sales banner] I am intrested on learing ruby and rails applications. How could I start
+ 176306 [Gennady.Byst] Book "Agile Web Development with Rails" is what you would find very
+ 176328 [james_b neur] First, go learn basic ruby. There are resources available at
^ camelCase vs ruby_case
176300 [zacharooni c] Alrighty,
+ 176305 [zacharooni c] Aha,
+ 176307 [cribbsj oakw] I used to do camelCase, mainly when I programmed mostly in Python. A
+ 176309 [chneukirchen] Under_scoring is the best thing after using-hyphens, which is not
| 176310 [Gennady.Byst] There were a LOT of discussions on the subject over time on this list.
| 176312 [zacharooni c] Great!
| + 176327 [ezmobius gma] Zach-
| + 176623 [chaotrope jp] to
+ 176318 [jim.mcfarlan] Well, I started out as a C programmer many years ago, and after
+ 176319 [daniel.cedil] I use a somewhat modified version of the camelCase to fit my needs. It's
+ 176322 [ruby-forum-r] The big thing is that Ruby attaches semantic meaning to the naming
| 176331 [zacharooni c] I know the current naming standards of the language. My curiosity is
| + 176346 [gboyer gmail] I tend to prefer to adopt the stylistic conventions of the language I am
| + 176348 [billk cts.co] Personally, I like Ruby's naming standards. I prefer snake_case to
| 176513 [gregory.t.br] Nicely put! I too prefer to use the conventions of the language I am
+ 176326 [halostatue g] Japanese readers find the underscore more readable. I prefer
^ Protected methods and class methods
176304 [ml gioelebar] is there a way to call a protected method of a class from a static method of
176350 [rossrt rosco] I believe so. Because the class Info is itself an instance of Class,
176473 [ml gioelebar] Instead it makes sense to me to be able to use Info protected methods from
176485 [rossrt rosco] Yes, I can see the logic in that, and I don't disagree that it'd
^ JRuby at JavaOne 2006
176308 [headius gmai] Just a quick heads up for all you poor Java-devs-that-dig-Ruby: Tom Enebo
176646 [Bil.Kleb NAS] Most awesome news!
^ PostgreSQL in Ruby with SSL connections
176330 [blargity gma] Is SSL supported with the ruby postgres adapter? I'd like to SSL the
176383 [rasputnik gm] It's handled transparently by libpq. If you're using the C library,
176879 [blargity gma] I'd like to use SSL certificate authentication, and that happens
+ 176949 [rasputnik gm] Sorry, you didn't mention client auth. Haven't tried that
+ 176993 [davelee.com ] If you are using postgres-pr, than I can't comment. If you are using
177071 [blargity gma] I'm using the compiled C extension on Linux. I'll do some more
177078 [blargity gma] Alright, here it is. I'm not even client authing yet. Psql connects
+ 177081 [blargity gma] Ok, I've nailed it down further.
+ 177119 [davelee.com ] I googled "sslv3 alert handshake failure" which resulted in almost 12k
177278 [blargity gma] Yes. And the postgres server reports in the logs that the ruby code
177294 [davelee.com ] are you running on windows?
177325 [blargity gma] No. Server is Debian Sarge with 8.1.2 installed from source. Client
177401 [blargity gma] So, any idea what's going on here? I don't know the internals, and
^ Re: Basic Inheritance questions {noob alert:- pickaxe ed. 2,
176332 [ruby-forum-r] Getting a 'false' in irb means the file is already
176334 [info jayeola] Thanks for another fast response. Inheritance - I'm going to get this
176335 [ruby-forum-r] If the child needs additional parameters (or otherwise overrides
176343 [info jayeola] I'm sorry I still don't get it. (To be honest I think that I can narrow
+ 176344 [mike stok.co] ... shouldn't you have a call like
+ 176345 [mike stok.co] ... shouldn't you have a call like
+ 176352 [ruby-forum-r] There is no #initialize method that takes four parameters
176366 [info jayeola] Thanks. The child is behaving at last ;)
^ Call for Participants: Koeln (Cologne)/Bonn area Ruby User Group - (Was: Rails and Ruby in Germany ...)
176333 [ jupp gmx.de] *Deutsch siehe unten*
+ 177963 [matthias.lue] I might be intrested. But right now I have big time constraints. I work
+ 177968 [iIdont wantn] I am interested. I live and work in Bonn.
^ Method arg names - maybe?
176339 [rossrt rosco] I noticed a couple of questions about getting names of method arguments,
^ Method definitions and Line numbers
176347 [brian.takita] How does Ruby store where methods are defined?
176369 [logancapaldo] Check out the __FILE__ and __LINE__ constants.
176380 [brian.takita] I apologize for not being clear.
+ 176382 [brian.takita] class Test
+ 176389 [shortcutter ] You mean without it raising an excepption? AFAIK there is no other
^ Extending ruby with c
176351 [rubytalk gma] I am looking for an example/tutorial on extending ruby with C using windows=
176363 [ruby-forum-r] Is return self; in the C code? (The C level does not have an
176370 [rubytalk gma] I am using the pickaxe example to help learn how it is writen.
176374 [ruby-forum-r] This here is the problem; the below code must be
176375 [rubytalk gma] i created the .rb
176376 [ruby-forum-r] Windows can use a program called 'nmake' that you can use.
176377 [rubytalk gma] Thank you i found nmake at
176381 [rubytalk gma] For the other program i get this error. I will never win at this. I am
176397 [rubytalk gma] I got CL to work! i donlowaded Visual C++ Toolkit 2003 for free and now cl
176401 [joevandyk gm] You need to tell the compiler about the directory that includes the
+ 176406 [anatol.pomoz] See file
| 176414 [rubytalk gma] Did that, I got an error for the dir having a space in the ie : f:\document=
+ 176409 [rubytalk gma] I changed the cl.exe option to -I c:\Dev-cpp\include /I also works, but th=
^ [OT] Re: Ruby as a MUD language
176371 [ruby-forum-r] Here is where I have been :)
176385 [jlsysinc all] You shouldn't be here.
^ Gateway - once again
176391 [shortcutter ] Folks,
^ Problem with Rake's PackageTask
176392 [leopardus.vu] I'm trying to add packaging to my rakefile. I copied the example code
+ 176453 [leopardus.vu] The correct link is
+ 176534 [jim weirichh] $ rake --tasks
176786 [leopardus.vu] Thanks for the inspiration! I double checked my code and found my silly
^ Debugging Ruby extensions on Win32
176394 [lyle.johnson] So, has anyone come up with a technique for debugging Ruby extensions
176419 [vanek acd.ne] i use a logger.
^ method proposition
176399 [hawkman.gelo] class TrueClass
176400 [dblack wobbl] You don't like "not"? :-)
+ 176402 [hawkman.gelo] hmm.. guess i missed that ;-)
| + 176405 [dblack wobbl] true.switch!
| + 176407 [joevandyk gm] er, the global value 'true' is the only instance of TrueClass. so,
| 176408 [hawkman.gelo] that, on second thought, probably wouldn't work, and the following would
| 176410 [ruby-ml magi] I think here is where a Symbol would be most fitting ;)
| + 176412 [paul iconopl] I'd just like to point out that this now makes it 4 Ruby programmers
| + 176417 [SimonKroeger] I don't get it...
+ 176403 [hawkman.gelo] foobar=3Dtrue
| 176423 [dblack wobbl] x = (not x)
| 176441 [chneukirchen] Is it just me, or does the precedence of "not" horribly suck? ;-)
+ 176404 [joevandyk gm] True would become False. False would become True... Human sacrifice,
^ c-extension problem
176418 [jes luretank] Dear list.
+ 176421 [rubytalk gma] How did you compile the example in 2003? I am tring to do it with the
| 176424 [jes luretank] Becker
| 176427 [rubytalk gma] Sorry to bug you for more details. How do you run nmake.exe from 2003?
| 176431 [jes luretank] Becker
| 176436 [rubytalk gma] A few more questions, Where was your source file? I used the one click
+ 176442 [halostatue g] Avoid compiling with Visual C++ 2005 for now. There are some ...
176498 [rubytalk gma] I get this error when tring nmake.
176502 [halostatue g] Again, if you're trying this with Visual Studio 2005, please hold off.
^ talking to other applications on windows
176420 [jes luretank] Dear list
+ 176422 [pgquiles elp] But I think it would be better if you had a DLL instead of a .EXE and you
| 176429 [jes luretank] Pau
+ 176487 [james_b neur] Add an XML-RPC (or SOAP, though probably overkill) API to the C# app and
+ 176488 [SimonKroeger] The windows are your complete problem?
^ [ANN] TeensyWeb 0.1.0
176425 [jlsysinc all] TeensyWeb 0.1.0 has been released.
^ [ANN] TeensyMUD 2.7 released - Baby Got Back!
176426 [jlsysinc all] TeensyMUD 2.7 released - Baby Got Back!
^ Best way to get started?
176428 [pixelmech ya] I posted about my game idea which has Flash as the front end and Ruby
+ 176432 [jes luretank] It made sense to me.
| 176433 [pixelmech ya] I should have mentioned I have the pickaxe book, and have been reading
| 176437 [weeksie twel] charset=BIG5;
| 176440 [pixelmech ya] Wow, I've been looking for folks who have done Flash/Ruby integration
| + 176444 [weeksie twel] Flash can communicate over http and connect to tcp sockets, it's rather
| | 176446 [pixelmech ya] Thanks for the advice Scott, I will check out that web site!
| + 176447 [agorilla gma] This was posted on the Rails-spinoffs list earlier today, you might
| + 176629 [l.d.u.n.c.a.] hey tom,
+ 176693 [todd.makinst] We do some flash ruby integration. I currently use XML fed from
^ Re: Grid Folding (#63)
176435 [agafonkin gm] submission, by the way) and can assure everyone that the tests provided
176460 [agafonkin gm] class SquareSheet
^ class methods like attr:
176439 [ml gioelebar] How can I create methods like "attr:" that can create methods and instance
+ 176536 [wilsonb gmai] By the end, you will definitely know how to create methods that behave
+ 176630 [interfecus g] Here's a quick hack. There are probably better ways.
+ 176677 [bob.news gmx] One way is to define them as instance methods of class Module.
^ Line Breaks in RDoc?
176448 [ng johnwlong] In RDoc format, how do I get it to insert an HTML line break (<br />)?
176454 [ruby-forum-r] I cannot test it right now, but try \<br />
176548 [ng johnwlong] Nope. Doesn't work. Any other ideas?
^ double metaphone
176449 [skwaer gmail] does anyone know if there is an implementation of the double metaphone
^ [ANN] Radius 0.0.1 -- Powerful Tag-Based Templates
176450 [ng johnwlong] I am pleased to announce the immediate release of Radius 0.0.1. This is
176451 [nshb inimit.] This looks a lot like PHPTAL.
176458 [ng johnwlong] I'm a little partial to the radius syntax. :)
^ [/QUIZ] #63: Grid Folding
176456 [luke blansha] Greetings all,
+ 176459 [mjb asplake.] charset="us-ascii"
+ 176464 [ruby anthrop] } I can't help feeling there should be a direct numerical way to
| + 176472 [adudzik gmai] Attached is my solution--I wish very much that I knew about Array#transpose
| + 176478 [james graypr] But it has the downside of making Enumerable depend on a []() method,
| + 176959 [luke blansha] I see your insights, and raise you a couple.
+ 176481 [SimonKroeger] i hope there is something new in my solution. Rather than folding my
| 176484 [adudzik gmai] check_fold--exploring backwards from the final stack, and throwing out path=
+ 176482 [heron jpl.na] My solution.
+ 176652 [Bill.Dolinar] to do the folding. I see now I could have done it much more
+ 176829 [dbatml gmx.d] Here is mine.
threads.html
top