[#370825] Syntax error — Anthony Ob <vidgametester@...>

ERROR

17 messages 2010/10/01
[#370828] Re: Syntax error — Alex Stahl <astahl@...5.com> 2010/10/01

What are you expecting the "x:y" statement to do? I ask because I'm not

[#370844] how can we make a ruby compiler — Robin <r@...1.net>

how can we make a thing that compiles ruby into c++ source code?

50 messages 2010/10/01
[#370896] Re: how can we make a ruby compiler — Ryan Davis <ryand-ruby@...> 2010/10/02

[#371096] Re: how can we make a ruby compiler — Tony Arcieri <tony.arcieri@...> 2010/10/05

On Fri, Oct 1, 2010 at 7:52 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:

[#371120] Re: how can we make a ruby compiler — Clifford Heath <no@...> 2010/10/05

Tony Arcieri wrote:

[#371127] Re: how can we make a ruby compiler — Michal Suchanek <hramrach@...> 2010/10/05

On 5 October 2010 07:10, Clifford Heath <no@spam.please.net> wrote:

[#371129] Re: how can we make a ruby compiler — Samuel Williams <space.ship.traveller@...> 2010/10/05

[#371130] Re: how can we make a ruby compiler — Ryan Davis <ryand-ruby@...> 2010/10/05

[#370878] New to Ruby, Looking for Help With Basic Program — Mica Koizumi <monkeymica@...>

I am teaching myself Ruby and am trying to figure out why this program

12 messages 2010/10/01

[#370897] Ruby String: How do I strip anything between two parenthesis — Frank Guerino <frank.guerino@...>

Hi,

9 messages 2010/10/02

[#370912] The Third Ruby - Ever Comes Out at Night? — Mike Stephens <rubfor@...>

Often you see that Ruby can be object-oriented, functional or

19 messages 2010/10/02
[#370915] Re: The Third Ruby - Ever Comes Out at Night? — elise huard <huard.elise@...> 2010/10/02

I guess you could work only with modules and class methods, and avoid

[#370916] Re: The Third Ruby - Ever Comes Out at Night? — Jes俍 Gabriel y Gal疣 <jgabrielygalan@...> 2010/10/02

On Sat, Oct 2, 2010 at 11:27 AM, elise huard <huard.elise@gmail.com> wrote:

[#370918] Re: The Third Ruby - Ever Comes Out at Night? — elise huard <huard.elise@...> 2010/10/02

2010/10/2 Jes俍 Gabriel y Gal疣 <jgabrielygalan@gmail.com>:

[#370919] Re: The Third Ruby - Ever Comes Out at Night? — Mike Stephens <rubfor@...> 2010/10/02

[#370952] Pass by reference and copy on write — Ralph Shnelvar <ralphs@...32.com>

I see

24 messages 2010/10/02
[#370955] Re: Pass by reference and copy on write — Josh Cheek <josh.cheek@...> 2010/10/03

On Sat, Oct 2, 2010 at 6:41 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:

[#370958] Re: Pass by reference and copy on write — Caleb Clausen <vikkous@...> 2010/10/03

On 10/2/10, Josh Cheek <josh.cheek@gmail.com> wrote:

[#370964] ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...>

I'm trying to figure out what's so cool about Ruby. I need to create a

49 messages 2010/10/03
[#370982] Re: ODBC app in Ruby - I don't believe it. — Luis Lavena <luislavena@...> 2010/10/03

On Oct 3, 4:26m, Ed Reed <joebanana...@gmail.com> wrote:

[#370996] Re: ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...> 2010/10/03

WOW! Thanks for all the responses and please accept my apologies for

[#371079] Re: ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...> 2010/10/04

Okay I've decided to start from scratch,... again. It's the start of a

[#371082] Re: ODBC app in Ruby - I don't believe it. — Jeremy Bopp <jeremy@...> 2010/10/04

On 10/4/2010 1:30 PM, Ed Reed wrote:

[#371087] Re: ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...> 2010/10/04

My mistake on the gem commands. I did use the correct ones with dbd

[#371102] Re: ODBC app in Ruby - I don't believe it. — Jeremy Bopp <jeremy@...> 2010/10/05

On 10/04/2010 04:29 PM, Ed Reed wrote:

[#371195] Re: ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...> 2010/10/05

The history.txt file for the mysql gem says

[#371209] Re: ODBC app in Ruby - I don't believe it. — Dave Howell <groups.2009a@...> 2010/10/06

[#371275] Re: ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...> 2010/10/06

Thanks for the extensive reply Dave. I certainly appreciate it.

[#371330] Re: ODBC app in Ruby - I don't believe it. — Brian Candler <b.candler@...> 2010/10/07

Ed Reed wrote:

[#371455] Re: ODBC app in Ruby - I don't believe it. — Ed Reed <joebananas10@...> 2010/10/08

Brian Candler wrote:

[#371413] Re: ODBC app in Ruby - I don't believe it. — David Masover <ninja@...> 2010/10/08

On Wednesday, October 06, 2010 02:40:38 am Dave Howell wrote:

[#371690] Re: ODBC app in Ruby - I don't believe it. — Dave Howell <groups.2009a@...> 2010/10/13

[#371765] Re: ODBC app in Ruby - I don't believe it. — David Masover <ninja@...> 2010/10/13

On Tuesday, October 12, 2010 08:51:21 pm Dave Howell wrote:

[#370991] install ruby on the mac — Basi Lambanog <basi.lambanog.tuba@...>

hello,

14 messages 2010/10/03

[#371020] save only first line from string? — Terry Michaels <spare@...>

Hi. What's the most simple and elegant way to remove all the contents of

21 messages 2010/10/04

[#371023] How to suppress display of specific code in irb?? — Don Norcott <dnorcott@...>

I am very new to ruby (but a retired experienced C programmer) and am

14 messages 2010/10/04

[#371049] how do i delete files in particular directoryin ruby ??? — Amit Tomar <amittomer25@...>

Hii all,

23 messages 2010/10/04
[#371052] Re: how do i delete files in particular directoryin ruby ??? — Stefano Crocco <stefano.crocco@...> 2010/10/04

On Monday 04 October 2010, Amit Tomar wrote:

[#371069] Re: how do i delete files in particular directoryin ruby ??? — Robert Klemme <shortcutter@...> 2010/10/04

On Mon, Oct 4, 2010 at 2:27 PM, Stefano Crocco <stefano.crocco@alice.it> wrote:

[#371181] How can I count number of elements in an HTML page — Paul <tester.paul@...>

Hi there, I'm using net/http to retrieve some html pages and now I

11 messages 2010/10/05

[#371221] setting local variables in a binding — Martin DeMello <martindemello@...>

Why does this not work?

15 messages 2010/10/06

[#371226] XML-RPC WEBrick problem (error during method invocation) — Nikita Kuznetsov <moog_master@...>

I have a university assignement, and i am stuck. I am supposed to create

10 messages 2010/10/06

[#371239] "map" a deeply nested structure: Object#deep_map — Guido De Rosa <guidoderosa@...>

Hi,

11 messages 2010/10/06
[#371241] Re: "map" a deeply nested structure: Object#deep_map — Robert Klemme <shortcutter@...> 2010/10/06

On Wed, Oct 6, 2010 at 4:43 PM, Guido De Rosa <guidoderosa@gmail.com> wrote:

[#371250] A Real World example for Ruby to "compiled" version discussion — Philip Rhoades <phil@...>

People,

10 messages 2010/10/06

[#371286] Why does Module#include exclude the module's metaclass? — John Mair <jrmair@...>

When classes are inherited in Ruby the singleton classes are also

11 messages 2010/10/06

[#371533] Why does a lot of code not include parenthesis? — egervari <ken.egervari@...>

I just started playing around with ruby and rails, and one thing I've

32 messages 2010/10/11
[#371534] Re: Why does a lot of code not include parenthesis? — egervari <ken.egervari@...> 2010/10/11

On Oct 10, 8:21m, egervari <ken.egerv...@gmail.com> wrote:

[#371610] Re: Why does a lot of code not include parenthesis? — "ara.t.howard" <ara.t.howard@...> 2010/10/12

vim completion works with, or without, the '(' and ')'. same with

[#371570] Can DRbUndumped be disabled for certain return types? — Josh Mcdade <josh.ncsu@...>

I have server model classes that definitely need DRbUndumped. Except

11 messages 2010/10/11

[#371580] more idiomatic way to avoid errors when calling method on variable that may be nil? — Charles Calvert <cbciv@...>

I'm using Ruby 1.8.7 patchlevel 249

34 messages 2010/10/11

[#371702] sort_by: multiple fields with reverse sort — Rahul Kumar <sentinel1879@...>

I need to use *sort_by* to sort a table, since the user could select

16 messages 2010/10/13

[#371704] Excel and Ruby — "Dan Sr." <djonavarro@...>

Hello all,

17 messages 2010/10/13

[#371878] Is it possible to find out if an identifier is a method alias? — Ammar Ali <ammarabuali@...>

>> def method; end

11 messages 2010/10/14
[#371880] Re: Is it possible to find out if an identifier is a method alias? — Daniel Berger <djberg96@...> 2010/10/14

On 10/14/10 4:48 PM, Ammar Ali wrote:

[#371896] Re: Is it possible to find out if an identifier is a method alias? — Ammar Ali <ammarabuali@...> 2010/10/15

On Fri, Oct 15, 2010 at 2:17 AM, Daniel Berger <djberg96@gmail.com> wrote:

[#371978] mechanize - extract href — Corey Watts <cwatts@...>

Hey there everyone. I'm having a slight problem using Mechanize. I'm

12 messages 2010/10/16

[#372016] unable to preload "rbconfig" in my irb session — "Sandeep K." <uniqueembassy@...>

I'm using Ruby 1.9.2 with Windows XP as host, I ran the command

11 messages 2010/10/17

[#372070] su {block of code.} — Guido De Rosa <guidoderosa@...>

Hi!

13 messages 2010/10/18

[#372181] Help missing something BASIC — Don Norcott <dnorcott@...>

This code is conceptually what I want to do with the nokogiri code below

11 messages 2010/10/20

[#372232] about handling args in block — salamond <jarodzz@...>

Hi, guys.

11 messages 2010/10/20

[#372234] Long conditional statements — Courtland Allen <courtlandallen@...>

Some parts of my code call for really long conditional statements of the

16 messages 2010/10/20

[#372289] generating random argument lists — Melody Class <rmiddlehouse@...>

Hi,

10 messages 2010/10/21

[#372361] Why is top-level an object rather than just Object? — John Mair <jrmair@...>

Why is it that top-level isn't just the Object class itself? what's the

14 messages 2010/10/22

[#372376] Ruby Compile. — Tridib Bandopadhyay <tridib04@...>

I am running Ruby 1.8.1 on CentOS release 4.8(Final)..

11 messages 2010/10/22

[#372493] Utilizing data from a csv file — Paul Roche <prpaulroche@...>

Hi I basically want to create a function that takes in data that has

20 messages 2010/10/24

[#372568] Can't get ruby serial port to work — Dd Dd <dd25@...>

I recently installed Ruby Version 1.9.2 on my PC. I am trying to get

14 messages 2010/10/25

[#372572] Extraction of single subarrays from multidimensional array — Maurizio Cirilli <mauricirl@...>

Hi there,

25 messages 2010/10/25

[#372652] Delete the files from mac system connected by windows. — Arihan Sinha <arihan_sinha@...>

Hi All,

10 messages 2010/10/27

[#372704] rsruby install trouble — Guybrush Threepwood <deadpool93@...>

Hello, trying for no particular reason to create a K constant calculator

15 messages 2010/10/27

[#372760] undefined method `find' for.:Module — John Hammink <john@...>

Hello,

10 messages 2010/10/28

[#372820] Is this an effective loop — Ted Flethuseo <flethuseo@...>

I was wondering if a loop of this sort would be

13 messages 2010/10/29

[#372835] Dynamically reference instance vars — Greg Willits <lists@...>

If I need to dynamically reference instance vars, is this the only way

11 messages 2010/10/30

[#372886] the dark side of inherited methods — timr <timrandg@...>

Let's say I want to make a new class, Vector (that will function,

38 messages 2010/10/31
[#372893] Re: the dark side of inherited methods — James Edward Gray II <james@...> 2010/10/31

On Oct 31, 2010, at 5:30 PM, timr wrote:

[#372951] Re: the dark side of inherited methods — Tony Arcieri <tony.arcieri@...> 2010/11/02

On Sun, Oct 31, 2010 at 5:49 PM, James Edward Gray II <james@graysoftinc.com

[#372964] Re: the dark side of inherited methods — Robert Klemme <shortcutter@...> 2010/11/02

On Tue, Nov 2, 2010 at 4:29 AM, Tony Arcieri <tony.arcieri@medioh.com> wrote:

Re: ODBC app in Ruby - I don't believe it.

From: David Masover <ninja@...>
Date: 2010-10-16 15:45:28 UTC
List: ruby-talk #371970
On Friday, October 15, 2010 06:57:42 pm Dave Howell wrote:
> On Oct 14, 2010, at 23:18 , David Masover wrote:
> > So, I hate to say it, but...
> > 
> > These things are open source. The source is open. More than that, Haml
> > has a decent test suite, which is always a good place to look when you
> > want to know how to use some code.
> 
> I don't know why you hate to say that.

Because in a way, it's admitting that the documentation isn't sufficient, and 
it's also implying that you _should_ dig into the source code, that this would 
be a perfectly normal thing to do.

That's workable, but certainly not ideal. I hate to say it because I don't 
think people should have to dig into source code to get stuff done -- but it 
is nice in that you _can_ do that.

> > But the point is, while good docs are a good thing, I think working and
> > readable code is at least as important.
> 
> I would agree with that.
> 
> But reading the code fundamentally tells you WHAT the code does. I look to
> the documentation to find out WHY?

I don't see how that's a problem in the Haml case.

Let me put it this way: I'm not a Haml developer, never have been, but that 
took me almost no time to find, and it does make sense to me why it'd be that 
way. Specifically, it makes sense that you'd have a template object that 
represents some sort of "compiled" form of a template (or at least parsed 
form) so that you can efficiently combine that with a given environment (the 
self and locals arguments), rather than re-parsing the template on every 
request.

This is far from just a Ruby thing -- in particular, I know that Java's JSP 
files actually get compiled to .class files, just like any other Java source.

> There was nothing in the Sequel documentation that told me how I could get
> it to start identifying UUID codes as "type uuid" instead of pretending
> they were strings. But the code was fairly readable, and after following a
> few class definitions back up into the code, I eventually found a section
> that had a case statement regarding db types and Ruby types. and I figured
> out what to add to get it to give me UUIDs. There were still a few parts
> where I was scratching my head and going "What does this part do?"

Right -- and that makes sense. Documentation generally covers the public API. 
If you're hacking on the source, you get to keep both pieces when it breaks. 
It would be nice if there was better documentation as to where to get started, 
for people who do want to play with the source, but ultimately, if you're 
playing with the source, the goal should either be a fork or a patch, probably 
a patch.

> It's quite possible that the answer on how to get Haml to interpret stuff
> was staring me in the face at some point, and I missed it. I'm afraid that
> doesn't change my point at all.

Actually, it does entirely. It changes your point from "I can't believe Ruby 
won't let me do this," or "I can't believe Ruby makes it so difficult to do 
this," to "I might have missed how to do this." One is a statement about the 
tool itself -- the language, the framework, or the community behind it -- and 
the other is a statement about your ability to interpret it.

It's still a good point, but it's a much more humble one.

> Whether I'm too ignorant to figure out from the source code how to
> fricassee, or the source code's so poorly written that most people can't
> figure it out, or the docs fail to explain it, or it just can't do that in
> the first place, the end result is the same: no fricassee-ing.

However, those are each very different problems with very different solutions.

If it's just you, then I should do what I can to give you the tools you need 
to be able to figure it out yourself, should you need to. I've been trying to 
do that here.

If it's really that poorly written, that absolutely is a good reason to use 
something else.

If the docs don't explain it, and it's something that's supposed to be a 
feature, the docs should be fixed. However, if the docs don't explain it 
because it was never designed as a feature in the first place, but is just a 
sort of accidental result of how it's designed, that suggests either it's fine 
the way it is, or it should be added as an official, public-API feature with 
quality documentation.

In particular, documenting something generally makes it part of the public 
API, which means people will be cross if you change it. (If it was documented 
but not public, it wouldn't be ideal for your purposes, anyway.)

In the last case, the feature should be added if it makes sense.

Now, the ideal steps for you in each of these cases is roughly the same: "Is 
there a way to fricassee? I don't see it in the documentation, and I can't 
figure it out..." or "It looks like I can fricassee this way. Is that likely 
to change in the future? If so, can I get an official public API for it?"

I don't know if you tried these. If you did and got no response, that's 
certainly a failing of the community, and I apologize.

> I kept finding
> tutorials that would say "or you can edit the blahblah file to work with
> an existing legacy database." However, I couldn't even *get* a blahblah
> file to edit from either Rails or Ramaze,

Well, but which file? If it was schema.rb, I don't know that it would've 
helped...

> Sinatra (or rather, the ORM that came bundled
> with Sinatra)

Which is that? I wasn't aware Sinatra came bundled with an ORM. I wasn't aware 
that it made sense for there to be -- seems like you'd just use an ORM 
directly, without Sinatra knowing or caring about it.

> Should there be even
> more docs for people trying to use Sequel who've never worked directly
> with a SQL database before? It *would* make Sequel even more accessible to
> more programmers, but it's probably not worth the effort it would take for
> somebody to create that much more documentation.

Well, in that case, the idea would be to go elsewhere to learn SQL.

> I certainly don't see a clear
> path between a code fragment in a test suite to, I guess, embedding
> "Haml::Engine.new(@varWithMyHamlCodeInIt)" inside a Haml template. If you
> do, please do NOT tell me. I'm not using Haml, and at this point can't
> imagine any benefit I could derive that would pay back the cost of
> switching my existing code base over to it.

Sorry, I have to, because it's still a one-liner -- the result of that 
'render' call seems like it'd be a string, like any other you might generate, 
and Haml doesn't escape strings unless you tell it to. The naive usage would 
look like this:

= Haml::Engine.new(@var).render(self)

If I had doubts it'd be a string, I'd test it in IRB.

> But this, in the end, is all nit-picky detail.

Maybe, and I apologize if that's all it is. My point for getting into this was 
to find out where the gap between my experience of things truly being easy 
(even when starting out), and your experience of things being difficult or 
impossible.

If it's something I can clear up here, that's helpful. If it's something 
that's missing from the community as a whole, that's also good to know, too.

> like myself, his background and knowledge base were not the
> assumed default, and I believe that this was one of the reasons why he
> found the whole process so unexpectedly unproductive.

If that's really all it is, then I hope, if nothing else, I've helped bring 
you closer to that.

From where I'm standing, it looks like the pain point was going against the 
grain while also being a newbie. That's part of why I've beaten this Haml 
horse to death -- the answer to the question of "How do I embed Haml code into 
my controller?" is generally "Don't do that. Use partials instead." A ton of 
newbie questions reduce to something similar.

Unfortunately, we can't do that with all of your problems. For example, my 
kneejerk reaction when I see people ask "How do I tie this to a legacy 
schema?" is "Don't do that, migrate to something sane." But that's obviously 
wrong.

For what it's worth, as badly as we might need better documentation and 
tutorials for working with legacy databases, I found it even more frustrating 
in the world of Oracle ADF, where an existing, legacy Oracle database 
(complete with DBA) was assumed, and there was no easy, step-by-step guide on 
getting from zero to a Hello World app.

In This Thread