49649-51956
49314-50611 subjects 49852-50907
I thought this was funny...
49649 [jayaywhy.fab] Looking for a Canadian hosting co. that would support Ruby.
+ 49651 [hal9000@hy e] Weird!
+ 49652 [robert.calco] Okay I just said the same thing twice. Sorry...
Problem with the downto method...
49669 [keuler@po ta] Experts-
+ 49671 [vjoel@PA H. ] sp_num.to_i.downto(1) {|sp_num_step|
+ 49672 [gsinclair@so] Yes, you need string-to-number translation.
Rockit problem
49673 [ADATE@kc rr ] Ruby + Rockit gurus,
49674 [ADATE@kc rr ] class BoundedLruCache # in rockit/bounded_lru_cache.rb
multipart form data & other form values
49676 [rayz@gl ri .] Can anyone explain me how can i retrive other field values using
+ 49681 [jfontan@ce g] some field: <input type=text name="somefield" value="sometext">
+ 49771 [michaelvera@] sometext = cgi['sometext'].to_s
+ 49775 [patrick-may@] require 'narf'
FXRuby: Problem with Text Drawing
49684 [Laurent.Jull] ...
Re: [Foxgui-users]FXRuby: Problem with Text Drawing
49689 [lyle@kn lo y] You need to call FXDC#end on the image device context to "flush" out the
Refactoring Ruby
49700 [STUCKNER@MU ] ...
+ 49722 [alan@di ik t] How about adding some logging code to def [] and running your unit tests again.
+ 49730 [rich@in oe h] ...
| + 49744 [dmartenson@m] ...
| + 49776 [joe@vp p. et] Cool idea. You could probably take it a step further and have it
+ 49780 [patrick-may@] hmm. I tend to write extra unit tests in ruby, so that I can have
Promotion Seminar for Healthy Tech in Japan & Korea
49704 [health808@21] ...
Reading a specific offset into a file.
49706 [khabibiuf@ho] What is an easy way to read a specific byte offset of a file? Right
+ 49708 [decoux@mo lo] See the method IO#seek
+ 49727 [twp20@sp m. ] a = File.open("example.dat")
Bug in Ruby Ext to C or it is me ?
49715 [weilljc@cl b] Compile this, link it with ruby lib, execute with a small
+ 49719 [pbrannan@at ] static VALUE request_thread(void * data, void * th);
+ 49728 [matz@ru y- a] It works for me. Could you tell me about your platform and the
| 49989 [weilljc@cl b] Platform Solaris Compiler cc (natif Sun Compiler)
+ 49729 [nobu.nokada@] Worked cleanly.
+ 49937 [loriend@bi p] I bet you have compiled with stack-frame-pointer ommision turned on. This is done with -fomit-frame-pointer in gcc, and is the default with MSVC when you choose the "Maximise Speed" optimisation. Frame-pointer ommision does not work with ruby exceptions or threads.
49956 [nobu.nokada@] I usually use gcc with that option, rather it may be concerned
Quick questions on using regular expressino with gsub...
49723 [keuler@po ta] Experts-
+ 49736 [billk@ct .c ] Naw, prolly not. But I'll respond anyway ;)
| 49737 [keuler@po ta] Please never mind the question recently sent (below). Figured it out.
+ 49740 [mike@st k. o] What error message are you getting? It may be that you're expecting
+ 49741 [cbbrowne@ac ] Is it an "expressino" when you are writing your code at Starbucks?
Addition on appropriate fields...
49731 [cbbrowne@ac ] Anyone that has studied abstract algebra _won't_ be overly confused by
+ 49733 [szegedy@no p] I never heard about "noncommutative sum" in algebra. I think in
+ 49802 [romstad@ma h] Really? I have been doing abstract algebra and algebraic geometry for
Parsing a line into a hash table...
49743 [keuler@po ta] All-
49749 [mike@st k. o] One way to do it might be a struct e.g.
Multi-level sort idiom?
49758 [brett_willia] Let's say I have an array, each element of which is a 2-dimensional array
+ 49759 [mike@st k. o] You can use Numeric's nonzero? e.g.
| + 49774 [brett_willia] Thanks, that's what I was looking for. Now I understand the behavior of
| + 50011 [flori@ni e. ] In this case
| + 50083 [cjh_nospam@m] This won't work, as it doesn't return 1, 0 or -1 for a[0]<=>b[0]
| + 50086 [cjh_nospam@m] I was wrong. Interesting behaviour - nice but confusing - I would have
| 50092 [mike@st k. o] The result of nonzero? does get returned, effectively nonzero?
| 50094 [gotoken@no w] is the correct name?). But Array#<=> was introduced in no time after
+ 50088 [alwagner@tc ] y = x.sort{|a,b|
Is there a "get" function for words and dwords?
49762 [khabibiuf@ho] .getc can be used to read characters (1 byte) at a time. Is there
+ 49763 [mike@st k. o] What about sysread with the appropriate byte count as an argument?
| 49850 [khabibiuf@ho] The sysread returns a string... I want the actual binary value.
| + 49856 [mike@st k. o] [Sorry if this is a duplicate, I fat fingered something...]
| + 49861 [nobu.nokada@] If you mean 2 byte data by "word" and 4 byte data by "dword",
+ 49770 [kero@ch ll .] String/Array pack() and unpack()
RubyInline 1.0.4 Released! (fwd)
49766 [pate@ey er a] Woohoo! another cool new toy to play with!
+ 49790 [james@ja es ] Um, what does Perl's Inline::C do?
| 49794 [pate@re -b a] the Inline:: modules for Perl, Python, and Ruby allow you to include
| + 49811 [ptkwt@sh ll ] I was shown this example last night at our PDX.rb meeting... I found it
| | + 49812 [ryand@Ze Sp ] You are absolutely terribly right! This was a known problem, but I
| | | 49857 [comp.lang.ru] - - Putting things in /tmp is just asking for race condition bugs.
| | | 49884 [ryand@ze sp ] I was planning on doing this for 1.0.5 today.
| | | 49935 [comp.lang.ru] - - Well, sendmail has fits about it, but that's a setuid program.
| | | 49938 [michael.d.he] Assume that the executable is in /home/foo/bar/boof and I have write
| | | 50036 [comp.lang.ru] - - That part I get.
| | | 50166 [tom@li ux ri] * bbense+comp.lang.ruby.Sep.12.02@telemark.stanford.edu (bbense+comp.lang.r=
| | + 49843 [mike@st k. o] .... especially if "legacy Perl code" includes CPAN ;-)
| | + 49889 [ryand@ze sp ] Well, the current RubyInline is ~50x smaller than the code involved for
| | + 50154 [avdi@av i. r] Heretic! Don't you know that every wheel must be completely
| | 50171 [billtj@z. lu] Hmmmm, I think you basically have the right idea.
| + 49813 [james@ja es ] Very neat.
+ 49800 [tom@li ux ri] So looking at this example, I guess on the second "nonslow" run it found
| 49801 [pate@re -b a] iirc, the code looks at the mod time of the .so compiled from the inlined
| 49834 [tom@li ux ri] So it's totally insecure then =P
+ 49805 [tsondergaard] I love it! So far, I only tried the example, but I can't wait to try it
| 49806 [ryand@Ze Sp ] Um. Yes. Absolutely. I'll get that in ASAP.
| 49809 [ryand@Ze Sp ] def fastfact(*args)
| 49842 [ADATE@kc rr ] Ryan I downloaded RubyInline and tried it on my Windows XP (Home Edition).
| 49887 [ryand@ze sp ] Well... I don't have a windoze box to test out on at all, so you'll
| + 49908 [n1k0@ro er .] According to my autoexec.bat file (this is available under win9x/me.. not sure
| | 49949 [ADATE@kc rr ] I could not see any "HOME" system variable. But it can be defined if
| | 49974 [bilotta78@ho] Are you using WinXP Home? WinXP Pro has %TEMP% pointing to a user-
| + 49944 [nobu.nokada@] Win2k(=NT5.0) defines HOMEDRIVE and HOMEPATH but not HOME, and
+ 49844 [jim@fr ez .o] ./example.rb
| + 49845 [decoux@mo lo] Can you try with 1.6.7
| | 49847 [jim@fr ez .o] Oops, I did not notice that we were using 1.6.6.
| + 49885 [ryand@ze sp ] ts totally nailed this one. Please get back to me/us if 1.6.7 doesn't
+ 49912 [jim@fr ez .o] I understand that RubyInline can be a security risk,
UDPSocket bug?
49768 [danny@fr uk ] This code fails on WindowsInstallerRuby
+ 49781 [transami@tr ] ah ha! that's may be the root of tcp's and http's bugs as well!
+ 49785 [pbrannan@at ] Hmm, I wonder if Winsock isn't setting errno properly. If that's the
+ 49898 [danny@fr uk ] -:11:in `recvfrom': Unknown Error - "recvfrom(2)" (Errno::E10040)
+ 49905 [pbrannan@at ] According to http://www.sockets.com/a_c2.htm (and a few other sources),
+ 49909 [danny@fr uk ] The other message I sent had a reasonable winsock error for some
+ 49971 [nobu.nokada@] errno should be set in win32/win32.c:rb_w32_recvfrom().
50009 [pbrannan@at ] If it should be set, then why was an "errno == 0" error generated?
50014 [nobu.nokada@] It's the question.
50017 [pbrannan@at ] Both the error in [ruby-talk:49768] and the error in [ruby-talk:49898]
use of finalizers
49773 [brett_willia] After months of little activity here, I have a second question for today :)
49777 [pbrannan@at ] ...
special rubyinline meeting (fwd)
49782 [pate@ey er a] Not everyone who's close enough to Seattle to make it for a meeting is on
call for commentary: review of Ruby for a magazine (long, sorry!)
49787 [fewayne@fa s] i have a proposition for you: i'm looking for fodder on ruby's
+ 49789 [michael.d.he] 1) Biggest program here is 2k lines, used to accurately push script changes
+ 49807 [vjoel@PA H. ] 8K and growing, not counting comments, blanks.
+ 49820 [jim@fr ez .o] Hmm, if I have 10 2-3K projects that interact, is that 20-30K of code?
+ 51221 [whitton@at a] My project is currently 3k, but it's growing rapidly and will eventually
+ 51225 [billtj@y. lu] but
| 51390 [batsman.geo@] What do you mean by "[your] own syntax"?
| + 51393 [bulatz@in eg] well, you can try to write programs in C using ruby's readme.ext
| + 51394 [dblack@ca dl] Possibly, but even better is to create new Rubyists :-)
| | 51841 [list@NO PA c] A question to the ELISP hackers aboard: Emacs already allows several
| | 51956 [billtj@z. lu] To hide the 'end' keywords in writing is definitely possible, as in my
| + 51397 [billtj@z. lu] Aha, someone caught my post. Yes, I love Ruby very much, but I should
| 51398 [Dave@Pr gm t] Except the conventional Ruby syntax
| + 51403 [rich@in oe h] puts "warning" unless obj
| | + 51406 [bulatz@in eg] it's nothing compared to perlish "open or die" idiom :)
| | + 51414 [ jimm@io co ] It's ever so slightly faster, too.
| + 51408 [billtj@z. lu] Actually, the above code is valid in SRuby :)
+ 51262 [web2ed@ya oo] Anything that doesn't need C/C++ speed or linkage, or where the
| + 51268 [gsinclair@so] Ruby will compile to bytecode in, oh ... 3 years? ;) By that stage, hopefully,
| + 51273 [bulatz@in eg] purpose? speed/ciphering sources/giving-one-executable/reliability of strict language?
| + 51294 [billtj@y. lu] Really? That did happen in a technical discussion group such as
| + 51330 [paul@pr sc d] I gritted my teeth and was going to let Mr. Wilson's slander go by but
| + 51405 [rich@in oe h] It compiles EVERYTHING (interpreter, extensions, source) into a single
+ 51317 [sera@fh an .] I've just delivered a fully OO ecommerce system that's about 15KLOC,
Test::Unit: how to test tcp or SOAP
49793 [mcix@gm .n t] I am writing a peer to peer communication
49975 [dsafari@pa a] I'd suggest looking at "mocking" those things. Get Test::Mock which works with
[FXRuby] windows walking down the screen
49816 [vjoel@PA H. ] I though it was just my app, but the examples/imageviewer.rb reappears
49826 [hal9000@hy e] I've seen that happen, but I'm not sure how
Ruby for the Jornada 720
49819 [cheselka@li ] What is the status of this port? Is anyone owrking on it anymore?
(no subject)
49821 [Diamand39@ao] ...
Tips for lightweight db app?
49822 [coma_killen@] I need to build a small "db" app where registered users can submit and
49828 [hal9000@hy e] Karsten,
DOS 16bit Ruby
49824 [rack1@my ea ] This is an 8086.
49829 [hal9000@hy e] That's a fascinating idea... at first I thought
[FXRuby] marshalling objects to the fox registry
49830 [vjoel@PA H. ] The Fox registry lets you save strings between app invocations. I tried
+ 49839 [pit@ca it in] I don't know about Fox and its registry but you could try to avoid
| 49894 [vjoel@PA H. ] Thanks, Pit. What I did was to simply use '\1' and '\2' as entry and row
+ 49876 [lyle@us rs s] Correct, FOX strings can't have embedded nulls. See Pit Capitain's
Missing library cygwin-ruby16
49831 [gsinclair@so] To build a Ruby package involving C code under Cygwin, you need to link
Re: DOS 16bit Ruby (OT - HP 200lx)
49832 [rack1@my ea ] Btw, if this mailing list is hostile to OT chatter, I'm fine with taking
how to make proxy objects
49837 [transami@tr ] looking for some tips on the best way to create a transparent proxy
+ 49838 [transami@tr ] oops...ignore the '(peer, oid)' that's what i'm using to know what
+ 49869 [pbrannan@at ] I think this belongs in the body of the class definition, and not
Full Screen Editor
49848 [mark.firesto] Has anyone written a ansi full screen console text editor in Ruby? Please
+ 49872 [alan@di ik t] No but both emacs and vi support ruby.
| 49874 [mark.firesto] users on the other end of a telnet connection can use it to edit their
| + 49883 [mgushee@ha e] If the main requirement is exchanging text over telnet, then shouldn't
| | + 49891 [mgushee@ha e] Uh, scratch that. I wasn't thinking clearly. But I think I see what you
| | | 49924 [dossy@pa op ] The issue is security. To shackle down something as powerful as emacs
| | | 49925 [mark.firesto] This is true. I have written a line editor (it didn't take all that long)
| | | + 49926 [mark.firesto] Absolutely! It has to be simple and easy to use and server side. Custom
| | | | 49927 [mark.firesto] The main reason to have it written in Ruby was for ease of integration into
| | | | 49933 [mgushee@ha e] I see ... well, Emacs lisp has library functions for sockets, I'm pretty
| | | | 50001 [mark.firesto] Bongs?
| | | | 50019 [messju@la mf] not actually :) more the ones found at
| | | + 49929 [dossy@pa op ] Pipes.
| | + 49901 [michael_s_ca] I'm guessing here, but I think he wants/needs some sort of editor-ish
| + 49923 [dossy@pa op ] I'd be happy to write one for you in my spare time, if you're not in a
+ 49879 [transami@tr ] if there was a suitable gui i would. maybe after gutopia is farily
private variables
49849 [decoux@mo lo] Why I always write stupid things ? See the effect of attr_accessor with
+ 49863 [pbrannan@at ] This is exactly what I would expect to happen. I'm not sure why I'd
| 49867 [decoux@mo lo] perhaps hard to understand what do the code in this case.
+ 49880 [matz@ru y- a] Do you mean you've implemented private instance variable, even if it's
| 49882 [decoux@mo lo] Well, here a quick diff (*WARNING* old 1.6.7 : you can see it with
| 49902 [chr_news@gm ] Wouldn't the
| + 49906 [pbrannan@at ] I doubt there are many people who begin their instance variable names
| | 49916 [chr_news@gm ] Are you sure? I like @_vars and never associated the use of
| | 49917 [pbrannan@at ] I'm not sure there's much value in secret attributes/accessors. I can
| | 49940 [chr_news@gm ] Actually I am fairly neutral about ``private_variables'' ...
| | 49962 [decoux@mo lo] attr_reader (or attr_accessor) is not a problem : you can always check if
| + 49958 [decoux@mo lo] Yes, because you've introduced a new type of variable but this is not a
| 50005 [chr_news@gm ] which means one more set of scoping rules to keep mind? (Probably
| + 50010 [decoux@mo lo] If I've well understood, the variable is accessible only in the class
| + 50012 [Dave@Pr gm t] Actually, that raises an interesting point.
| + 50020 [jfh@ci e. fl] How about an attr_private directive?
| + 50021 [decoux@mo lo] This is easy
| | 50097 [chr_news@gm ] Neato! -- Actually I sort of like Dave's idea - it is probably
| | 50150 [transami@tr ] is that colon there on purpose?
| | 50157 [dblack@ca dl] I think Christoph's point (with the colon and the rest of the
| | 50170 [decoux@mo lo] No, no see [ruby-talk:12555]
| + 50160 [pbrannan@at ] Interesting idea.
| | 50176 [alan@di ik t] Wasn't there some talk about using symbols? It's not symmetric, but for
| | + 50181 [michael_s_ca] I might note that any variable name which isn't palindromic is
| | + 50186 [billtj@z. lu] Well, I am proposing 2 alternatives that I think is more consistent with
| | + 50197 [transami@tr ] private variables being differnt from local ones how? further can a
| | | 50201 [billtj@z. lu] I haven't really read the parser yet, but I imagine that after the
| | | 50207 [transami@tr ] i see. thanks.
| | | 50209 [kentda@st d.] They are object private, but not class private. (Puritans and C++
| | | 50212 [billtj@z. lu] Wait, wait, wait... I think someone should really have defined what
| | | 50214 [gotoken@no w] Maybe the subject "private variable" is confusing. In Ruby, the
| | | + 50215 [gotoken@no w] oops, typo
| | | + 50216 [transami@tr ] what do you mean by nested local variable? is that suppose to be the
| | | | 50217 [gotoken@no w] I meant change name. Not introducing other kind of variable.
| | | | 50242 [chr_news@gm ] I tend to agree with Guy - ``block local variable'' is a more
| | | | 50252 [gotoken@no w] I would prefer Guy's ``block local variable'' too.
| | | + 50238 [decoux@mo lo] Well, personnaly I'll call it "block local variable". For this reason
| | + 50200 [kentda@st d.] private_variables :some, :privvy, :vars, :listed, :here
| | + 50203 [dblack@ca dl] %q__ = "some private thing"
| | | 50210 [billtj@z. lu] I think you are right that "%X" sometimes is already special in Ruby (such
| | | 50222 [dblack@ca dl] Oh, I know -- I wouldn't really advocate it. Actually I'm keeping my
| | + 50205 [billtj@z. lu] I am not an expert in Ruby parser/interpreter at all (let alone computer
| | | 50333 [szegedy@no p] I think this is a matter of taste, but for me a naming convention
| | + 50475 [qrczak@kn .o] Well, the meaning of 'foo % bar' depends on whether foo has been
| | + 50478 [billtj@z. lu] Oh, yes, yes, but the distinction between 'foo % bar' and 'foo %bar' is
| | + 50649 [qrczak@kn .o] No, both can mean either foo(%bar) or foo() % bar(), depending on
| + 50334 [szegedy@no p] it is convenient and easy to remeber.
| 50348 [billtj@y. lu] Well, will these localized/private variables make it into the next Ruby
| + 50350 [dblack@ca dl] Ultimately Matz will decide on it, whether there's a vote or not :-)
| | + 50351 [decoux@mo lo] In this case where do you store class local variables (i.e. what you call
| | | 50353 [dblack@ca dl] Whoops, I have reintroduced deprecated terminology into the discussion
| | | + 50359 [decoux@mo lo] and if someone define an instance variable @_var, this instance variable
| | | + 50361 [billtj@y. lu] Can't we just add something like "local_iv_table" in addition to
| | | + 50362 [chr_news@gm ] Regard yourself as a first time offender - third strike and you will be
| | + 50358 [szegedy@no p] Private methods and class-local instance variables are quite different.
| | + 50360 [szegedy@no p] If you don't like underscores (because it could break
| | + 50372 [pbrannan@at ] If you try to use a class-local instance variable and it has not yet
| | 50391 [szegedy@no p] I often initialize instance variables conditionally. (That is, on first use).
| + 50354 [matz@ru y- a] I will. Somewhere around "@_x" and "@__x". I don't care about the
| | + 50363 [rich@in oe h] Well, the double-underscore (@__x) variables would be less likely in
| | + 50367 [chr_news@gm ] or being my repetitive self
| | + 50376 [dblack@ca dl] This also makes sense to me because it reads from left to
| | + 50378 [matz@ru y- a] This will not break anything, but too ugly.
| | | 50380 [jfh@ci e. fl] Are we dead set against "attr_private" ?
| | | 50384 [matz@ru y- a] I'm not going to choose attr_private (unless someone put some idea in
| | | + 50395 [transami@tr ] a private instance variable is one that is not inheritable. is that the
| | | + 51222 [sean@ch tt n] Hrm, this thread has been so huge that I've been in skim mode. I
| | | 51227 [billtj@y. lu] I think Matz is already deciding between "@_xxx" and "@__xxx".
| | + 50383 [kentda@st d.] <ironic>
| + 50364 [transami@tr ] uh-oh, looks like Ruby is headed the way of perl. can anyone say,
+ 49890 [matz@ru y- a] Oh, I forget to mention that private instance variables should not be
| 49985 [szegedy@no p] I wonder why. Could you give some concrete reason for it?
| 50106 [matz@ru y- a] Yes. Hence it should not be exported as an attribute method, which
| 50130 [kentda@st d.] There is a (narrow) use here, where one might like to have a private
| 50136 [matz@ru y- a] def foo
+ 49896 [duemoko@bi f] <code snipped>
threads.html
top