banisterfiend has quit [Remote host closed the connection]
TheNullByte has joined #ruby-lang
S2kx has quit [Quit: Leaving]
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
CarlB_the_great has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dous_ has quit [Remote host closed the connection]
chimkan_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
t6541 has quit [Remote host closed the connection]
t53455 has joined #ruby-lang
cantonic has quit [Quit: cantonic]
kingCrawlerx has quit [Quit: Computer has gone to sleep]
kingCrawlerx has joined #ruby-lang
wmoxam has joined #ruby-lang
agile has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
S1kx has quit [Quit: Leaving]
<MouseTheLuckyDog>
If I want to use instances of a class as a ,key in a hash, and I want to be able to sort the ketys, what methods do need to I supply to the class?
Quatrerwin has joined #ruby-lang
diegoviola has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
_malte has joined #ruby-lang
banisterfiend has joined #ruby-lang
_malte has quit [Ping timeout: 268 seconds]
fgomez has quit [Ping timeout: 240 seconds]
t53455 has quit [Remote host closed the connection]
t16215 has joined #ruby-lang
pygwing has joined #ruby-lang
fgomez has joined #ruby-lang
malev has quit [Remote host closed the connection]
jackhammer2022 has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
Dreamer3 has quit [Ping timeout: 240 seconds]
Dreamer3 has joined #ruby-lang
mztriz has left #ruby-lang [#ruby-lang]
kingCrawlerx has quit [Quit: Computer has gone to sleep]
kingCrawlerx has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
Cherrum has quit [Read error: Connection reset by peer]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
Cherrum has joined #ruby-lang
kingCrawlerx has quit [Quit: Computer has gone to sleep]
banisterfiend has joined #ruby-lang
m3nd3s_ has quit [Remote host closed the connection]
gsav has quit [Read error: Connection reset by peer]
TheNullByte has quit [Quit: TheNullByte]
TheNullByte has joined #ruby-lang
kingCrawlerx has joined #ruby-lang
woollyams has joined #ruby-lang
t16215 has quit [Remote host closed the connection]
t52162 has joined #ruby-lang
_malte has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
_malte has quit [Ping timeout: 246 seconds]
ramonmaruko has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
<steveklabnik>
i always try to do the maximum awesome
CarlB_the_great has quit [Remote host closed the connection]
t52162 has quit [Remote host closed the connection]
t91601 has joined #ruby-lang
<GeekOnCoffee>
steveklabnik: all ready for Chicago? I wish I could make it :(
<steveklabnik>
yep!
<steveklabnik>
i'm gonna be there for almost a week, it's good :)
<steveklabnik>
<3 chicago
<steveklabnik>
the talk got great reviews when i gave it at eurucamp
<GeekOnCoffee>
nice! I really need to spend some time there, my time has been almost entirely just driving through on the freeway
<steveklabnik>
heh
<steveklabnik>
i'm there every few months or so.
<steveklabnik>
enjoy it a lot. will probably live there at some point in my life
<GeekOnCoffee>
the timing of the confs around here didn't work out well for me this year :( would have liked to have done both MadisonRuby and Windy City, but Spreeconf and 2 weeks in Ireland got in the way
* steveklabnik
nods
<steveklabnik>
madison was so good this year
<steveklabnik>
it was so good last year too
banisterfiend has quit [Ping timeout: 244 seconds]
pwing has quit [Ping timeout: 240 seconds]
brunocoelho has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
ramonmaruko has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
Bosox20051 has quit [Quit: Leaving]
ttilley has quit [Quit: ttilley]
artOfWar has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
savage- has quit [Quit: .]
ramonmaruko has joined #ruby-lang
gsav has joined #ruby-lang
neocoin has quit []
andoyasushi has joined #ruby-lang
andoyasushi has quit [Excess Flood]
gsav has quit [Quit: Lost terminal]
banisterfiend has joined #ruby-lang
WillMarshall has joined #ruby-lang
burgestrand has joined #ruby-lang
gsav has joined #ruby-lang
wmoxam has quit [Ping timeout: 260 seconds]
gsav has quit [Read error: Connection reset by peer]
andoyasushi has joined #ruby-lang
_malte has joined #ruby-lang
_malte_ has joined #ruby-lang
_malte has quit [Read error: Connection reset by peer]
_malte_ has quit [Remote host closed the connection]
slyphon has quit [Ping timeout: 245 seconds]
hollymann has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
tonni_ has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
porkwing has quit [Ping timeout: 255 seconds]
areil has joined #ruby-lang
t22068 has quit [Remote host closed the connection]
porkwing has joined #ruby-lang
porkwing has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Remote host closed the connection]
<erikh>
fart
d3vic3 has quit [Ping timeout: 252 seconds]
d3vic3 has joined #ruby-lang
lcdhoffman has joined #ruby-lang
nXqd has quit [Ping timeout: 244 seconds]
tonni has joined #ruby-lang
abrausch has joined #ruby-lang
chimkan_ has joined #ruby-lang
porkwing has joined #ruby-lang
nXqd has joined #ruby-lang
gsav has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
eridani has quit [Ping timeout: 272 seconds]
burgestrand has quit [Quit: Leaving.]
s1n4 has joined #ruby-lang
rue|w has joined #ruby-lang
yats has joined #ruby-lang
banisterfiend has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<JohnBat26>
Hello
<JohnBat26>
What does it mean: ::AES ?
<JohnBat26>
I keep in view emptiness before ::
tonni has quit [Ping timeout: 246 seconds]
<erikh>
it means to references the 'AES' constant from the root namespace
kitallis has joined #ruby-lang
<JohnBat26>
erikh: Thanks
<erikh>
np. you'll see it a lot when you have something like 'Foo::File' and something that references 'File' by itself, which with normal constant lookup would reference 'Foo::File' before 'File'
diegoviola has quit [Ping timeout: 264 seconds]
<erikh>
the '::File' basically re-routes the lookup to say "consult the root namespace only"
<erikh>
of course, this applies to any namespace, e.g., ::FileUtils::Verbose would do what you think it would.
chimkan_ has quit [Quit: chimkan_]
ruurd has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
porkwing has quit [Quit: WeeChat 0.3.5]
JohnBat26 has quit [Remote host closed the connection]
Dreamer3 has quit [Quit: Leaving...]
qwerxy has joined #ruby-lang
stepnem has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
havenn has quit [Remote host closed the connection]
<bnagy>
why must people insist on using regular expressions like idiots?
<erikh>
be nice, he's green
<bnagy>
/at (.*)$/
<erikh>
masterkorp: start coarsely
<erikh>
like bnagy suggested; I'd personally split by space first, and work with the individual elements.
<bnagy>
then throw that into DateTime.parse ideally
<bnagy>
parsing dates with regexp is a short, straight road to failtown
<erikh>
DateTime.parse has some issues portability-wise, strptime is better
<bnagy>
it does?
<erikh>
bnagy: the short is that I don't have any answers for you. I can't see any leaks with just a read.
<bnagy>
I never use it portably (I barely parse dates irl)
<masterkorp>
erikh: excuse me, i am not a native english speaker, what coarsely means ?
<erikh>
bnagy: yeah, they switched from european to japanese (or the other direction) for m/d/y between 1.8 and 1.9
<bnagy>
erikh: yeah, thanks, least I'm not just insane
<masterkorp>
this is getting a monster, i need to start over
<bnagy>
to me, if it makes it past the initial expansion it should peak there
<erikh>
so 11/10/2010 could be november 10th or october 11th depending on which version of ruby you're using.
<bnagy>
can't you set a locale flag or something to control that?
<bnagy>
oh right I see, 1.8->9 compat
<bnagy>
pff who cares :D
<erikh>
not as far as I saw, I had pretty solid tests for a database date thing I was working on.
<erikh>
masterkorp: coarsely means to not be too specific..
<erikh>
masterkorp: I would strongly suggest using as little regex as possible to get the date, then look at at DateTime.strptime to actually manage the date itself.
<erikh>
I think strptime has a canned format for that one.
<erikh>
I think it's %F, but I'd have to read the docs.
<erikh>
DateTime.parse is also slooooooow
<erikh>
but enough hate on that.
<bnagy>
well it's a super liberal parser, give it a break
<erikh>
right, which is why if you know the format you should always use strptime
<erikh>
:)
vlad_starkov has quit [Remote host closed the connection]
<bnagy>
yeah but I was done coding in 4 seconds
<bnagy>
you're still looking up strptime formats ;)
<erikh>
oh, no i'm not. I wouldn't write a log parser in ruby i don't think.
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
QaDeS has joined #ruby-lang
<injekt>
eww a log parser in ruby
jxie_ has quit [Quit: leaving]
<injekt>
I guess you have a lot of time to waste waiting for that thing to work its way through logs
<erikh>
jruby might not be so bad.
<erikh>
but yeah, i'd probably use trusty old perl
<injekt>
i'd probably use perl or maybe go
<erikh>
yeah. I was thinking about that, but really can't speak to it's ability to handle strings.
<erikh>
gonna make a hard effort to get rust in my brain tomorrow.
<injekt>
it's not really comparable to perl, but it's good
<injekt>
cool
<injekt>
erikh: you touched/planned on touching rakudo?
<erikh>
well, my initial thought went to C, then I thought about C string handling and I :(
<injekt>
aye
<erikh>
injekt: eh, perl 6..
<injekt>
:D
<injekt>
I can't stomach it
rararadar has joined #ruby-lang
<erikh>
I gotta give it to them though, at least they're trying new things
<erikh>
everything I've heard about python 3 is that they took a decent language and just fucked it up hard, while not changing it substantially
<injekt>
aye
<injekt>
so basically, if you're going to fuck it up, do it properly?
yats has quit [Read error: Connection reset by peer]
<erikh>
more or less. I mean, perl 6 is larry's sandbox and it's his right to do so
<injekt>
heh yeah
<injekt>
I just can't handle the syntax
<erikh>
same with guido really, but I know that larry&co is actually trying something different, where guido's just opining in a way that makes everyone unhappy.
<erikh>
I really just wish larry didn't call it perl
<injekt>
seems that way yeah
<erikh>
it would have changed so much about the perception of both perl 6 and the evolution of perl 5.
<injekt>
agreed
<injekt>
multi sub strftime( Str $format is copy, DateTime $dt ) is export(:DEFAULT)
<injekt>
:/
<erikh>
oh, you should see all this shit in perl 5 now
banisterfiend has quit [Read error: Connection reset by peer]
<erikh>
between perl5i and all the modern perl stuff
<injekt>
oh god, bridging stuff?
<erikh>
I can't say I really like it much. it makes some things simpler but it also really seems to overcomplicate matters.
<erikh>
perl5i could be (poorly) summarized as "ruby for perl programmers"
<injekt>
lol
<injekt>
$format .= subst( /'%'(\dN|\w|'%')/, -> $/ { (%substitutions{~$0} // die "Unknown format letter '$0'").() }, :global );
<injekt>
wow
<masterkorp>
bnagy: gets me the weird results on rubular
<banisterfiend>
i dont really know anything about it
<banisterfiend>
but it looks ok
<erikh>
eh
<injekt>
stmt {.immediate.} this kind of syntax bothers me
<erikh>
I'm really looking for something with real pointers, good string handling, a type system that's strong enough to be helpful but not get in the way (i.e. inference), and ideally an algol-like syntax
<erikh>
oh and a GC.
<banisterfiend>
injekt: it's kind of interesting in that the language allows you to define new syntax and stuff, it's meant to be kind of lispy
<injekt>
interesting
zmack has quit [Read error: Connection reset by peer]
<injekt>
I hate 'let'
zmack has joined #ruby-lang
<erikh>
honestly, C# would be perfect if it ran on the right platforms.
yats has joined #ruby-lang
<injekt>
except needs less verbose
<erikh>
yeah I'm not too big on the conventions
<erikh>
I mean, there's no real requirement that C# be verbose; it's just the java mindset
<injekt>
aye
<injekt>
I dont like capitalized method names either, it still bothers me with go
<erikh>
right, but this is all cultural
<erikh>
when your IDE tab-completes everything it doesn't matter anyway
postmodern has quit [Quit: Leaving]
<injekt>
sure
<erikh>
I mean, C++ or ObjC wouldn't be far off, but they really have the same problems as C# and a whole host of other issues
<erikh>
anyway I'm ranting, and if I really want my magical faerie language I should put up or shut up
<erikh>
off to read more tolkein. ttfn
<injekt>
cya
kingCrawlerx has quit [Quit: [kingCrawlerx release]]
rue|w has joined #ruby-lang
banisterfiend` has joined #ruby-lang
Guedes0 has left #ruby-lang [#ruby-lang]
Guest59387 has joined #ruby-lang
Guest59387 has quit [Read error: Connection reset by peer]
banisterfiend has quit [Ping timeout: 244 seconds]
bougyman has quit [Remote host closed the connection]
deryl has quit [Quit: deryl]
bougyman has joined #ruby-lang
bougyman has quit [Changing host]
bougyman has joined #ruby-lang
m3nd3s has quit [Read error: Connection timed out]
jbsan_ has joined #ruby-lang
jbsan has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby-lang
m3nd3s has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jbsan_ has quit [Ping timeout: 244 seconds]
acyed has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
scampbell has joined #ruby-lang
jbsan has joined #ruby-lang
thorncp has quit [Ping timeout: 272 seconds]
relix has joined #ruby-lang
<relix>
hey guys, I have troubles using the rmagick gem (what else, amirite?)
CarlB_th_ has joined #ruby-lang
agile has joined #ruby-lang
<relix>
locally it works fine (mac os x), I've got a RoR project that runs locally, but when deployed it goes all wrong
thorncp has joined #ruby-lang
<relix>
on the server: imagemagick is installed as well as the libdev, I can run 'convert', I installed the gem rmagick succesfully, but hwen I try to 'require "rmagick"' it says path not found
qwerxy has quit [Quit: offski]
llaskin has joined #ruby-lang
qwerxy has joined #ruby-lang
<llaskin>
"http://www.url.com:/folder".gsub(/.*:.*(:)/, ':8080') #I want to replace the 2nd ":" with :8080 but I get compile errors...any suggestions?
vlad_starkov has joined #ruby-lang
chimkan_ has joined #ruby-lang
cantonic has joined #ruby-lang
<canton7>
(above answered in #ruby)
llaskin has left #ruby-lang [#ruby-lang]
<relix>
so the problem was that you need to do require "RMagick" and not require "rmagick"
<relix>
and it worked on mac os x because of the case insensitive filesyste, I suppose
Leeky_afk is now known as Leeky
<rue|w>
That’s odd, it should have been fixed
Defusal has quit [Read error: Connection reset by peer]
m3nd3s has quit [Read error: Connection timed out]
tbuehlmann has quit [Remote host closed the connection]
Madis has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
m3nd3s has joined #ruby-lang
kobac has quit [Remote host closed the connection]
m3nd3s has quit [Read error: Connection timed out]
rue|w has quit [Remote host closed the connection]
verbad has quit []
<andrewvos>
I have a list of postcodes in the UK. I want to make something with them. I have them in in a DB and can easily search using latitude/longitude... At first I wanted to do an autocomplete textbox for postcodes, or a "find my postcode" button. I realised that these are kind of useless because everyone in England knows their postcode.
<andrewvos>
Anyone got any interesting ideas?
s1n4 has quit [Quit: leaving]
<mfn>
I'd ask on openstreetmaps probably :)
lele|w has joined #ruby-lang
m3nd3s has joined #ruby-lang
<andrewvos>
I asked here because this place normally has weird ideas :)
<zzak>
andrewvos: werent you asking about that before?
<mfn>
hehe =)
<andrewvos>
zzak: I was.. but I got sidetracked for a week or so.
<canton7>
personally I use the post office postcode finder a lot, to find other people's postcodes
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<andrewvos>
canton7: So, you type in an address and get a postcode?
ylluminate has quit [Read error: Connection reset by peer]
<mfn>
I knew it sounded like doing someones homework
<eroc>
I was just on ruby-docs.org and saw this line of code: "if File.basename(path)[0] == ..". What does the double-period equal? The semantics of the line is that we are checking to see if the path starts with a single period.
<eroc>
Better put, syntactically, what is the double period?
Theueip has quit [Quit: Leaving...]
<yorickpeterse>
eroc: just an example
ylluminate has joined #ruby-lang
<snorkdude>
mfn, I'm trying to solve the self-avoiding walk problem. Not for homework.
<yorickpeterse>
Perl has this concept of the "yadya" operator (or w/e it was called) and it's commonly used, also outside of Perl, for examples
<yorickpeterse>
snorkdude: that JS is fairly trivial to translate, most of the syntax features exist in Ruby as well
<yorickpeterse>
but instead of `var grid = { ... }` it would be an actual class
<mfn>
snorkdude: still. instead you could ask about specific errors in the syntax you made instead starting off with asking others to do work for you
<yorickpeterse>
snorkdude: please don't define global methods
<eroc>
Sure is! Man, I've got to work on my scrolling skills. :)
<yorickpeterse>
wrap it in a class or module
<yorickpeterse>
Also, fix your indentation
<zzak>
eroc: you can file a bug at bugs.ruby-lang.org
<snorkdude>
yorickpeterse, I am a bit of a coding noob -> 17 years old. My indentation looks good in TM, but it got a bit jacked up in the Gist.
<yorickpeterse>
Also, you don't need to prefix everything with `self`
<yorickpeterse>
And don't use your age as an excuse
<snorkdude>
lol
<yorickpeterse>
(I'm an asshole, if I see bad code I'll blast people for it)
<eroc>
yorickpeterse: Will do
<snorkdude>
I'm trying to justify my inexperience
<yorickpeterse>
snorkdude: gimme a quick sec to clean it up a bit
<yorickpeterse>
eroc: that wasn't re: you
<eroc>
yorickpeterse: I was referring to filing a bug
<yorickpeterse>
Oh right
<yorickpeterse>
I missed that
<yorickpeterse>
Yeah, that sounds like a good idea
<eroc>
But feel free to blast my code any time. Love constructive criticism.
sandbags has joined #ruby-lang
<yorickpeterse>
haha
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
spinagon has quit [Ping timeout: 244 seconds]
<snorkdude>
yorickpeterse, Yeah my code is clean in TextMate but I think some formatting was changed when I put it into a Gist. I should have checked it real quick before submitting.
<andrewvos>
matti: Congratulations!
<yorickpeterse>
snorkdude: Turn off tabs for Ruby and use 2 spaces per indentation level, that should prevent it from going postal
s0ber has quit [Read error: Connection reset by peer]
<rue|w>
yorickpeterse: This is what I keep telling you
<mfn>
nice. I like the night-blue variant; all my terminals have a dark blue background
<andrewvos>
Yeah me too.
s0ber has joined #ruby-lang
<rue|w>
Meh, maybe the dark
<rue|w>
I quite like solarized
gsav_ has quit [Quit: Lost terminal]
<mfn>
Unfortunately terminals usually don't have 256 colors .. I really wish the terminal protocol would allow more colors and such stuff
<rue|w>
But options is good
<yorickpeterse>
rue|w: what?
<yorickpeterse>
The JS stuff?
<yorickpeterse>
mfn: they do on Linux :)
musl has quit [Quit: WeeChat 0.3.9-rc1]
<mfn>
yorickpeterse: yeah, no; I mean when handling remote stuff, no? When I login remote via SSH and start using terminal vim there, I won't enjoy 256 colors, would I?
<yorickpeterse>
mfn: yes you would
kvirani has joined #ruby-lang
<yorickpeterse>
It's just ANSI, doesn't matter how it's transported
<mfn>
yorickpeterse: doh ... ok; need to check on that :)
voker57 has joined #ruby-lang
<yorickpeterse>
But make sure that Vim itself is configured properly
<yorickpeterse>
if I recall you'd have to run `set t_Co=256` for it to even use 256 colors
<mfn>
O_O
havenn has quit [Remote host closed the connection]
towski has joined #ruby-lang
<zzak>
mfn: which terminal are you using?
* mfn
doesn't want to tell ..
snorkdude has quit [Remote host closed the connection]
<mfn>
putty. which implies windows. which makes me an outlaw now, doesn't it? :p
<mfn>
but hell no, I don't developer under windows; it's just the machine I'm sitting in front of
snorkdude has joined #ruby-lang
<zzak>
putty can do 256
<rue|w>
Hm. /ignore mfn
<rue|w>
Have to have SOME standards…
* rue|w
runs
<rue|w>
zzak: Little-known fact, it can actually do 258