Dick Davies | 1 May 2004 01:15
Gravatar

Re: ruby CVS can't use shared libs on NetBSD

* Dick Davies <rasputnik <at> hellooperator.net> [0411 18:11]:
> * ts <decoux <at> moulon.inra.fr> [0419 16:19]:
> > >>>>> "D" == Dick Davies <rasputnik <at> hellooperator.net> writes:
> > 
> > D> Reading symbols from /usr/lib/libpthread.so.0...done.
> > D> Loaded symbols for /usr/lib/libpthread.so.0
> > 
> >  PostgreSQL was compiled with -lpthread ?
> > 
> >  In this case, you need to compile ruby with --enable-pthread
> 
> Ah, that falls over when miniruby dumps core trying to build digest-md5...
> 
> rasputin <at> lb:ruby$ make
> compiling digest/md5
> [1]   Illegal instruction (core dumped) ./miniruby ./ext...
> *** Error code 132

Ack. Scrub that, that box has a ropey pthread install.
Sorry for the noise, I'll try an --enable-pthread install of ruby again...

--

-- 
Life is like a buffet; it's not good but there's plenty of it.
Rasputin :: Jack of All Trades - Master of Nuns

Mark Hubbart | 1 May 2004 01:18
Picon

Re: def [](v) xx; return yy; end # returned value is ignored !?


On Apr 30, 2004, at 1:54 PM, Jean-Hugues ROBERT wrote:

> That makes sense. Yet, I am missing the xxx= where I do control the 
> value assigned to the lvalue.
> I am not alone. At this point there are multiple known cases where it 
> would be needed for transparency:
>   - Reference, a reference is an indirect mean of access to a lvalue's 
> value that is dereferenced when the value is needed and that also 
> makes it possible to assign a value to the lvalue at any time.
>   - Lazy, a Lazy is a value that is computed when it is needed, not 
> before.
>   - Future, a Future is the returned value of an asynchronous method 
> call that is waited for when it is needed, not before.
>   - LogicVariable, a LogicVariable is a variable that can be free in 
> addition to being bound to some value as regular variables are.

I'm not sure what the problem is... What sort of circumstance will this 
cause a problem? Perhaps you are thinking that assignment should do 
something more than it was intended to.

Using your Pointer example, you could do this:

   p = Pointer.new()
   x = p[] = "hello"
   (p[] = "hello").inspect

In line 2, would you expect something other than a simple "hello" 
string to be assigned to x?
In line 3, would you expect #inspect to be called on p, rather than on 
(Continue reading)

Joel VanderWerf | 1 May 2004 01:19
Picon

Re: Learning extending ruby

Nathan Weston wrote:
 > I don't mean to discourage you from learning, but you might want to
 > look into using SWIG (www.swig.org) instead of writing extensions by
 > hand. I can say from personal experience that it will save you lots of
 > headaches.
 >
 > Nathan
 >
 > dwerder <at> gmx.net (Dominik Werder) wrote in message 
news:<31033452.0404272302.53dfa004 <at> posting.google.com>...
 >
 >>Hello!
 >>
 >>Could somebody help me with this small piece of code?
 >>I'm learning how to extend ruby with C code.
 >>What I want to do here is creating a class in C and use it in ruby.
 >>The class should have a instance variable named myvar. This works so far.
 >>But now how do I create the accessor methods for this variable?
 >>
 >>Thank you!
 >>Dominik
 >>
 >>Here is the init method in C:
 >>
 >>static VALUE t_init(VALUE self)
 >>{
 >>  VALUE str = rb_str_new2("default string");
 >>  rb_iv_set(self, " <at> myvar", str);
 >>  rb_define_attr(str, "myvar", 1, 1);
 >>  return self;
(Continue reading)

Mark Hubbart | 1 May 2004 01:22
Picon

Re: Ruby Installer [was Opportunities and pitfalls; was "Introducing myself - Sascha Ebach"]


On Apr 30, 2004, at 1:15 PM, Curt Hibbs wrote:

> Mark Hubbart wrote:
>>
>>> The reason I point all of this out is because all of these projects
>>> rely on
>>> volunteers like you and me to make progress. And, obviously, we can 
>>> do
>>> a lot
>>> more if we work together rather than duplicate efforts.
>>
>> Of course! Thank you for pointing these out; I'll definitely be
>> checking out he Ruby Installer project, and seeing if it's extensible
>> enough for my ideas, or if it can be made extensible enough.
>
> I don't want to mislead you here -- the Ruby Installer project *is* the
> Windows Installer, and  what is currently there is completely windows
> specific. But I want to see it expand in scope to encompass other 
> platforms.
> This may (or may not) end up being separate code-bases maintained 
> under the
> umbrella of the "Ruby Installer" project.
>
> But in order for that to happen someone would have to step up and take 
> on
> the task of championing one or more additional platforms.

I understood that. previously I had thought that the focus of the 
project was narrower than it was; but if there is some existing code 
(Continue reading)

Mark Hubbart | 1 May 2004 01:28
Picon

Re: Opportunities and pitfalls; was "Introducing myself - Sascha Ebach"


On Apr 30, 2004, at 1:26 PM, Curt Hibbs wrote:

> Mark Sparshatt wrote:
>>
>> Mark Hubbart wrote:
>>>
>>> I realize that this is a large idea; but I wonder what other people
>>> would think about setting something like that up. Am I missing
>>> something? Are there existing methods that would be as good or 
>>> better?
>>> Do we just need to publicize certain ways of doing things?
>>>
>> What you're suggesting here sounds a lot like the ruby-garden Wiki -
>> http://www.rubygarden.org/ruby
>>
>> Is that the sort of thing you're after?
>
> This is somewhat true, but RubyGarden is much more general. I think for
> something like this to be really successful you need a wiki/site that 
> is
> much more focused -- with its own identity.

Right. the RubyGarden Wiki is a great information repository, but it's 
got it's own purpose, and I'm afraid it wouldn't be dynamic enough for 
what would be necessary to make things work. There would need to be at 
least some sort of message board system included, and a mailing list.

I really like the idea of starting it out as a sort of "meta-project" 
on RubyForge. I think that should be the way to go.
(Continue reading)

Mark Hubbart | 1 May 2004 01:35
Picon

Re: Opportunities and pitfalls; was "Introducing myself - Sascha Ebach"

[snip]
> You could actually use RubyGems to create a distro like this.   
> There's no reason you can't create a "super gem" that does nothing but 
> list dependencies.  So, for example, you could create a package for 
> your favorite XML tools and call it hubbart-xml.   All it would do is 
> depend on all of the gems (including versions, if you like) that you 
> want to include, and those would be auto-installed when you install 
> hubbart-xml.  Then, of course, you could package several such 
> meta-gems into a "super gem", say "hubbart-big-enchilada" that would 
> cause all of your favorite stuff to get installed with the simple 
> command:
>
> gem -Ri hubbart-big-enchilada
>
> or (if you distributed the gem file):
>
> ruby hubbart-big-enchilada-1.0.0.gem
>
> Chad

The installer that I'm thinking of would install Ruby itself, and extra 
libraries, not just extensions. I think that a sort of meta-gem that 
only has dependencies could easily be a part of it, though... after 
installing ruby, rubygems, some gui toolkits, etc, it could run a gem 
that installs some important development items like RedCloth, etc...

I didn't get the idea that rubygems would ever be something that you 
would use to install anything other than ruby libraries, but maybe I 
was mistaken?

(Continue reading)

Rick Caldwell | 1 May 2004 02:08
Picon

Re: [ANN] Tycho - A PIM under development

I like the user interface, looks like it would be really nice to use.

Features I would like to see:

I would like to add fuzzy searches tothe list as I and I'm sure others
can't spell.  Also search for words near each other and search by word
list - as you start typing a word the words in the index that have those
letters appear in a list -  for example if you type a, all the indexed
words starting with a are in the list.  As you add letters the list
becomes smaller leading to the word you are looking for similar to the
index search
option in Windows.

Search results ranked by different options - most hits, hits in certain
fields, most matching words, newest documents, oldest documents and
probably others I haven't thought of.

Import feature that knows different formats.  For example I would like
to index my email - it should know that there are To:, From:, Subject:
lines etc in the mail and store the messages so they can be searched
by the automatically created indexes from the email template.  Same
with pdf files, word docs etc.  Also for the import option a date
qualifier
so for example you can do a import since a date for example when adding
your email to the database - you would like to add only new messages.
The same for indexing a web page or a set of notes.  Or use the stored
time to see if the document has been updated since the last import.  
If you have edited the database version and it has changed from where
you are importing from you might need to resolve how you are going to
handle the dual update - replace, add 2nd copy, merge or something like
(Continue reading)

Neil Hodgson | 1 May 2004 02:14
Picon

Re: SciTE Ruby Lexer

Its Me:

> (2)--------- Multiple buffers/files
> Probably ignorance on my part. I have only been able to view one
file/butter
> at a time in a Scite window; so I have to open multiple Scite windows
> instead. I would really like to be able to split the window (horizontally
or
> vertically) and see more than one buffer.

   This is a fairly core restriction: while SciTE can have multiple files
loaded at once and can display tabs to switch between them, there is no way
to see the contents of more than one file at at time. I am unlikely to agree
to lifting this restriction as I want SciTE to remain simple. For more
complex tasks, a more featureful application would be a better fit. If
others wish to start a project that adds multiple views to an extended
version of SciTE then I'll try to help out so that they can continue to
benefit from enhancements to my version of SciTE.

   For Ruby development, I feel you are much better off with an application
designed around the needs of Ruby including integration of debugging, use of
Ruby-compatible regular expressions, and an understanding of the files that
make up a Ruby project and the links between them. It would be a good idea
to develop such an application in a sensible high level language like Python
;-) rather than C++. FreeRIDE seems to be on the right track.

   Neil

Gavin Sinclair | 1 May 2004 02:14
Picon

Re: How's ruby compare to it older brother python

On Saturday, May 1, 2004, 8:17:35 AM, trevor wrote:

> END OF CANNED RESPONSE

> Anybody who wants to change anything or add any additional resources to this
> reponse can add it or come up with something better.  Then we can save this
> canned response and use it whenever anybody asks this question.  I think
> this solution is better than any other for solving the repetitive question
> problem.  It is definitely better than flaming or criticizing.

Good effort, Trevor.  This definitely seems a step in the right
direction.

Gavin

Simon Strandgaard | 1 May 2004 02:50
Picon

Re: File.expand_path(__FILE__)

"Ara.T.Howard" <ahoward <at> fattire.ngdc.noaa.gov> wrote:
> On Sat, 1 May 2004, Simon Strandgaard wrote:
[snip] 
> > I don't know if all this rethinking __FILE__/$0 makes sense.. 
> 
> i think it makes perfect sense to have
> 
>   __FILE__    => absolute path of script file
>   __PROGRAM__ => absolute path of called program
>   __RUBY__    => absolute path of ruby interp running called program
>   __DIR__     => absolute directory of file (can use for relative requires)
> 
> it's always easy get a relative path from an absolute one, but not the other
> way!

This was what I wanted to express, though I could not write it in such a striking
sentence  :-)

I don't know what is right nor wrong...

Maybe make __FILE__ a class with a one useful method, #standalone?
So that instead of 'if $0 == __FILE__' you can type 'if __FILE__.standalone?'

Maybe make a System class, containing a $0 replacement?

What does other languages do ?

--
Simon Strandgaard

(Continue reading)


Gmane