apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
<[spoiler]>
2. Self inside a method references the receiver of the method call (an object instance)
<Technodrome>
yeah
<Technodrome>
you had a 3rd [spoiler] :)
<[spoiler]>
3. The "wild" self is a bit special. It's an instance of Object called "main"
<[spoiler]>
those were all
<Technodrome>
i was just curious what it was
<[spoiler]>
Iirc
<Technodrome>
ah
<Technodrome>
yes the self in the global space
<[spoiler]>
the global space self
<Technodrome>
yeah
<[spoiler]>
is strange. It's probably some C magic
<[spoiler]>
to make it behave the way it behaves
<[spoiler]>
but, yeah
<[spoiler]>
it's not *that* special that you'd ever need to use it
<Technodrome>
its safe to say i get it completely, the thing in ruby under a microscope explains it soo well
<[spoiler]>
Oh? I've never read any Ruby books
<[spoiler]>
I probably should
yfeldblum has quit [Ping timeout: 245 seconds]
<Technodrome>
to be honest, i don't think there is anything else in the ruby language itself that confuses me, that was the only misfit for me
yfeldblu_ has quit [Ping timeout: 245 seconds]
<[spoiler]>
"After all, MRI is written in C - a statically typed, compiled language which is pretty much the antithesis of Ruby. What dark voodoo is breathed into C to enable Ruby's features - closures, metaprogramming, and so much more?" - from the Author's website. This is mildly accurate
<[spoiler]>
I had to revisit a lot of the Ruby source to grasp some concepts of how Ruby works
mistym has quit [Remote host closed the connection]
<[spoiler]>
Like, I'd read it, but then I'd have to read it again, because I discovered something weird in another part of the source I was interested in
<[spoiler]>
Hnnng. It was both a pain and a joy
<Technodrome>
i'm just doing simple rails CRUD
<[spoiler]>
Technodrome: I'm usually not *that* interested in a language I use, but I really loved Ruby so I was curious
<[spoiler]>
and decided to take a peak
<[spoiler]>
and then it pulled me in
<Technodrome>
yeah i mean the goal is to become productive
<Technodrome>
not become obsessed :)
<[spoiler]>
hahah
<Technodrome>
people with no knowledge of what OO really is, what lambda or a proc or any of that is , get stuff done
<Technodrome>
and that's ok, shows you how user friendly the language can be
<Technodrome>
java isn't that forgiving
mdedetrich has joined #ruby-lang
<[spoiler]>
I do blieve it made me a better ruby programmer, though
<[spoiler]>
& I learned some C, because I didn't understand C as well back then, but wanting to understand Ruby made me force myself to understand C better
<[spoiler]>
davispuh: VB would arguably be a better choice
<davispuh>
I can't imagine anything worse than VB :D
sulo has joined #ruby-lang
<Technodrome>
vb.net is still alive
<Technodrome>
sadly enough
<Technodrome>
i had a c# spell myself : 9
vpretzel has quit [Read error: Connection reset by peer]
<[spoiler]>
NGL, that Wikipedia
vpretzel has joined #ruby-lang
<Technodrome>
why is Class.superclass
<Technodrome>
=> Module
<Technodrome>
why is that a module?
<Technodrome>
Module.class
<Technodrome>
=> Class
<Technodrome>
hmmmm?
<[spoiler]>
entry is a load of bullshit. I'm not sure about the origin & it being used at "Idaho", but the only place where the language was really used was this weird 2D chat software called Palace
<[spoiler]>
that's where I learned it anyway
<[spoiler]>
Technodrome: Module is an instance of Class (like all objects are)
<[spoiler]>
erm, like all classes are*
Senjai_ has quit [Ping timeout: 272 seconds]
<Technodrome>
but why is Class.superclass , module?
io_syl has quit []
mdedetrich has quit [Quit: Computer has gone to sleep.]
sulo has quit [Ping timeout: 240 seconds]
mrpot4to_ has joined #ruby-lang
vpretzel has quit [Ping timeout: 245 seconds]
<[spoiler]>
Okay, so
<[spoiler]>
Module is the superclass of Class, but Module is just an instance of Class
<Technodrome>
how does that make sense [spoiler] ?
<[spoiler]>
Because, Ruby is a bit weird
<[spoiler]>
Everythign is an object
<[spoiler]>
and everything has a superclass
<[spoiler]>
(except BasicObject)
<[spoiler]>
Object < Module < Class
<[spoiler]>
however, Object is an instance of Class and so is Module, but Class inherits from Module
banisterfiend has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
jerrytgarcia has joined #ruby-lang
enebo has joined #ruby-lang
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 248 seconds]
franckverrot has quit [Read error: Connection reset by peer]
franckverrot has joined #ruby-lang
crankharder has joined #ruby-lang
banisterfiend has joined #ruby-lang
snarfmason has quit [Quit: Computer has gone to sleep.]
hhatch has quit [Ping timeout: 246 seconds]
snarfmason has joined #ruby-lang
enebo has quit [Quit: enebo]
<[spoiler]>
Croesus: this is where the good ones are :-)
<Croesus>
ok
<[spoiler]>
well, better than in #ruby :P (note: I might be opinionated)
<Technodrome>
good day [spoiler]
<[spoiler]>
Technodrome: heya! :D
wallerdev has joined #ruby-lang
<Technodrome>
how are you
<[spoiler]>
I'm alright. I've been working all day with PHP, so it's made me a bit... Well, it's php.
<Technodrome>
what kind of stuff in PHP?
<[spoiler]>
Website for a hotel chain in Croatia
<[spoiler]>
I'm using cakePHP (which is the Rails equivalent for PHP)
<[spoiler]>
It's not even that bad, to be fair
<Technodrome>
cake :( :)
<Technodrome>
i'm just not really a fan of PHP
earthquake has quit [Quit: earthquake]
<[spoiler]>
Neither am I, haha
Cakey has joined #ruby-lang
Scader has joined #ruby-lang
sulo has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
Cakey has quit [Ping timeout: 245 seconds]
sulo has quit [Ping timeout: 240 seconds]
vimetus has quit [Quit: Konversation terminated!]
ecnalyr has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
metus_violarium has joined #ruby-lang
hahuang65 has joined #ruby-lang
earthquake has joined #ruby-lang
banisterfiend has joined #ruby-lang
TheMoonMaster has quit [Excess Flood]
ecnalyr has quit [Ping timeout: 245 seconds]
TheMoonMaster has joined #ruby-lang
achru has quit [Remote host closed the connection]
metus_violarium has quit [Client Quit]
achru has joined #ruby-lang
lsegal has joined #ruby-lang
elia has joined #ruby-lang
snarfmason has quit [Quit: Computer has gone to sleep.]
snarfmason has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
Andrevan has joined #ruby-lang
<imperator>
didn't go straight to drupal, eh?
achru has quit [Ping timeout: 245 seconds]
snarfmason has quit [Client Quit]
snarfmason has joined #ruby-lang
thepumpkin has joined #ruby-lang
jerrytgarcia has quit [Remote host closed the connection]
jerrytgarcia has joined #ruby-lang
achru has joined #ruby-lang
Andrevan is now known as afader
mistym has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
thepumpkin has quit [Ping timeout: 260 seconds]
mistym has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 240 seconds]
bantic has joined #ruby-lang
<[spoiler]>
imperator: drupal is a CMS; cake is a framework (which is odd, since php is almost a framework, too)
yfeldblum has quit [Read error: Connection reset by peer]
mrpot4to_ has joined #ruby-lang
ecnalyr has joined #ruby-lang
<Nilium>
PHP is like chinese scaffolding: precarious and likely to kill you.
<[spoiler]>
I'd attribute more value to my cat's feces than to PHP :D
gokuney has joined #ruby-lang
ruby-lang249 has joined #ruby-lang
iliketurtles has joined #ruby-lang
bzalasky has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
nofxx has joined #ruby-lang
gokuney has left #ruby-lang [#ruby-lang]
<imperator>
[spoiler], yes, i know
<[spoiler]>
Also, they claimed that cake's really close to Rails, so I wouldn't have to learn much to use it (which was true). So, yay!
ruby-lang249 has quit [Ping timeout: 250 seconds]
ljarvis has joined #ruby-lang
<ljarvis>
zzak: :)
<zzak>
ohi
<ljarvis>
hai
Scader has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby-lang
Cakey has joined #ruby-lang
charliesome has joined #ruby-lang
sulo has joined #ruby-lang
<yorickpeterse>
herro
iliketurtles has quit [Quit: zzzzz…..]
sulo has quit [Ping timeout: 260 seconds]
Cakey has quit [Ping timeout: 245 seconds]
CaptainJet has quit []
CaptainJet has joined #ruby-lang
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 272 seconds]
<[spoiler]>
yp
<[spoiler]>
s/p/o
<imperator>
eh?
<apeiros>
[spoiler]: `which is odd, since php is almost a framework` - that's because it is. check out its root. it was personal home page [tools]
<apeiros>
*its roots
havenwood has joined #ruby-lang
<[spoiler]>
apeiros: really? Is that what PHP stands for? I've never bothered to look into it, to be honest
jsullivandigs has joined #ruby-lang
<[spoiler]>
oh, indeed, from wikipedia: "While PHP originally stood for Personal Home Page,[4] it now stands for PHP: Hypertext Preprocessor, a recursive acronym.[5]"
<ljarvis>
it's a recursive acronym that stands for
<ljarvis>
^ that
<ljarvis>
but yeah, personal home page.. lul
Technodrome has quit [Quit: Technodrome]
<[spoiler]>
That's such a shitty recrusive acronym, though
<[spoiler]>
I like YAML, for example
<[spoiler]>
that's a cool one
<lianj>
yea, rails likes yaml too
<[spoiler]>
Rails has good taste, innit. :)
kurko_ has quit [Quit: Computer has gone to sleep.]
jsullivandigs has quit [Ping timeout: 245 seconds]
Coincidental has joined #ruby-lang
workmad3 has joined #ruby-lang
yfeldblum has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
datanoise has quit [Ping timeout: 272 seconds]
hahuang65 has joined #ruby-lang
ruby-lang373 has joined #ruby-lang
ecnalyr has joined #ruby-lang
<ljarvis>
apeiros: is erik still banned?
skamlic has joined #ruby-lang
<yorickpeterse>
lel PHP
<yorickpeterse>
+b
<yorickpeterse>
gah fuck
hahuang65 has quit [Ping timeout: 245 seconds]
* yorickpeterse
is bad at IRC
earthquake has quit [Quit: earthquake]
<imperator>
he got banned?
ruby-lang373 has quit [Ping timeout: 250 seconds]
mrpot4to_ has quit [Read error: Connection reset by peer]
<ljarvis>
yes
<imperator>
ljarvis, you mean erikh?
<imperator>
wat fer?
snk_ has quit [Quit: rebuut]
bastilian has joined #ruby-lang
<ljarvis>
ya
<ljarvis>
for being a dick
<ljarvis>
i guess
<ljarvis>
ryan banned him
ecnalyr has quit [Ping timeout: 245 seconds]
Bwild has joined #ruby-lang
Technodrome has joined #ruby-lang
<Technodrome>
what are the top 5 or 10 things newer ruby programmers have the biggest issues with?
micalexander has quit [Remote host closed the connection]
<canton7>
"what is a block?", the concepts behind doing list comprehensions, come to mind
snk has joined #ruby-lang
micalexander has joined #ruby-lang
<Technodrome>
does ruby even have list comprehensions?
<lianj>
"wtf rvm, why didn't anybody tell me about rbenv earlier"
robbyoconnor has joined #ruby-lang
<ljarvis>
"wtf rbenv, why didn't anybody tell me about chruby earlier"
<canton7>
Technodrome, 'list comprehension' in the general sense, rather than the python sense. Yes, ruby has the whole of Enumerable (notably #map, #select, #inject)
<Technodrome>
what is the best of the dvm / rbenv etc?
<canton7>
and imo #select/#map provides a cleaner and more concise way of doing list comprehensions, compared to python's approach
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
<zzak>
"wtf chruby, why didn't anybody tell me about make earlier"
<imperator>
threads maybe?
<imperator>
class << self
<imperator>
blocks
<yorickpeterse>
re 5/10 things
<yorickpeterse>
"the fuck is a class"
<yorickpeterse>
"what is object oriented?"
<yorickpeterse>
etc
<imperator>
windows ;)
<ljarvis>
that's any language
bzalasky_ has joined #ruby-lang
<yorickpeterse>
also depends on the definition of "newer"
* yorickpeterse
puts on the pedantics hat
bzalasky has quit [Read error: Connection reset by peer]
micalexander has quit [Ping timeout: 272 seconds]
<yxhuvud>
technodrome: being able to call functions without ()s. Easier for new programmers, but it can be hard for old hats switching over. Also, multiple assignment in block argument lists.
<yorickpeterse>
ljarvis: also lol you're doing Perl now?
skamlic has quit [Quit: Leaving]
<ljarvis>
yorickpeterse: not generally, I only write ruby and go in my day to day work nowadays, but i'm helping out a friend and got to relive some old perl
<zzak>
2014 the year of perl
<zzak>
prepare your semicolons
<ljarvis>
that was a terrible choice of words
<ljarvis>
im not preparing any kind of colon
<zzak>
i should tweet that with #possiblytmi
<charliesome>
perl is pretty ok
<ljarvis>
i enjoy it, but i dont think id wanna work with it every day for work
<Technodrome>
yxhuvud: multiple assignment in block argument list?
<Technodrome>
like |k ,v| ?
<yorickpeterse>
ljarvis: heh
<charliesome>
Technodrome: |(a,b), (c,d)|
<yorickpeterse>
at least Perl has a decent pakcage manager, except for the lack of versioning
<Technodrome>
i've actually never seen that myself
<yorickpeterse>
unpacks an array, pretty useful
<ljarvis>
cpan is the best thing ever like srsly
<yxhuvud>
yeah. The amount of times I've told former javaists to clean up their code a bit by using arguments x_x
<ljarvis>
|(a, b), *(c), d|
<charliesome>
cpan is a pain in the ass to actually setup
<ljarvis>
charliesome: psh
jithu has quit [Quit: Mother, did it need to be so high?]
<ljarvis>
it's quite a process sometimes
<charliesome>
hi, you want to install a package?
<charliesome>
sure!
<ljarvis>
but you can skip a lot of it
<charliesome>
just answer these a billion questions
Coincidental has quit [Remote host closed the connection]
<ryanf>
haha
<charliesome>
oh sheeeit you don't have LWP
<ljarvis>
heh yeah, better to set it up once properly though
<ryanf>
it's so *friendly* though
<charliesome>
tough shit
<ljarvis>
seeing as its so configurable
<ljarvis>
yeah lol @ the lwp stuff
<yxhuvud>
do cpan have some bundler variant or is it simply install and hope it won't break in the future?
<ljarvis>
and YAML at times
Coincidental has joined #ruby-lang
<ljarvis>
yxhuvud: you can specify versions to use
<ljarvis>
use Foo::Bar 1.2
datanoise has joined #ruby-lang
<ljarvis>
if you want version management pain just use go :troll:
<yxhuvud>
oh? why?
sulo has joined #ruby-lang
<ljarvis>
there is no version management
<yxhuvud>
sounds horrid.
<charliesome>
just use master its fine
<ljarvis>
^
<imperator>
they do have a nice testing backend - cpan testers
<imperator>
ruby could really use that
<ljarvis>
yeah that's where erik got the idea for ruby testers
<ljarvis>
which was around for a while
<charliesome>
lol nah its fine just push up to rubygems its cool
Coincidental has quit [Ping timeout: 246 seconds]
<imperator>
actually....i meant to look at the various github services, see if there's a testing hook of some kind
<imperator>
CI maybe?
<yxhuvud>
perl at least has a rumor of being somewhat stable in their apis. Less progress, but stuff doesn't break as often (if I've understood people I know that commit perl correctly)
Cakey has joined #ruby-lang
<ljarvis>
imperator: you may notice a .gemtest file in some gems
<ljarvis>
imperator: we use one for nokogiri
Coincidental has joined #ruby-lang
<imperator>
ljarvis, i remember trying to use it at one point, but had to jump through too many hoops and got annoyed
<ljarvis>
yeah it was very beta
Coincidental has quit [Remote host closed the connection]
<Technodrome>
ljarvis: so what is that good for? |(a,b), (b,c)| ?
<crankharder>
why doesn't this parse in 1.9.3 ? Date.strptime("1/29/95", "%-m/%-d/%y")
<crankharder>
getting 'invalid date' from that
<ljarvis>
%-m and %-d
<crankharder>
?
<ljarvis>
why not %m and %d ?
sulo has quit [Ping timeout: 272 seconds]
<crankharder>
because the 1 isn't padded?
<ljarvis>
because that would work
<ljarvis>
so?
<yxhuvud>
(a, b) (b, c) seems like a bad idea as it will assign b multiple times.
<crankharder>
strptime doesn't follow the same %things as strftime?
<ljarvis>
not in that way
<ljarvis>
that is, %-d is invalid
gix has quit [Quit: Client exiting]
Cakey has quit [Ping timeout: 272 seconds]
<ljarvis>
you're just telling strptime "this thing looks like a day"
Coincidental has joined #ruby-lang
<crankharder>
ok, ty
<ljarvis>
and if it's not in 1-31 or w/e it'll break
<crankharder>
I thought it followed the same rules as strftime :)
* imperator
sees a ton of service hooks on github, not a clue what any of them do
Coincidental has quit [Ping timeout: 245 seconds]
datanoise has quit [Ping timeout: 245 seconds]
thepumpkin has joined #ruby-lang
<ljarvis>
im out, later all
<imperator>
cya
ljarvis has quit [Quit: Lost terminal]
momomomomo has joined #ruby-lang
gix has joined #ruby-lang
lun__ has quit [Remote host closed the connection]
mistym has joined #ruby-lang
lun__ has joined #ruby-lang
kurko_ has joined #ruby-lang
thepumpkin has quit [Ping timeout: 260 seconds]
kurko_ has quit [Client Quit]
lianj has quit [Ping timeout: 246 seconds]
mistym has quit [Ping timeout: 272 seconds]
Coincidental has joined #ruby-lang
lun__ has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
lun__ has joined #ruby-lang
imperator has quit [Quit: Valete!]
nertzy2 has joined #ruby-lang
ecnalyr has joined #ruby-lang
hahuang65 has quit [Ping timeout: 248 seconds]
lun__ has quit [Ping timeout: 240 seconds]
ecnalyr has quit [Ping timeout: 245 seconds]
ezkl has joined #ruby-lang
RiaKoobCam has joined #ruby-lang
mistym has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Technodrome has quit [Quit: Technodrome]
adambeynon has joined #ruby-lang
Coincidental has joined #ruby-lang
bastilian has quit [Ping timeout: 272 seconds]
RiaKoobCam has quit [Quit: RiaKoobCam]
Technodrome has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
Coincidental has quit [Remote host closed the connection]
sulo has joined #ruby-lang
Coincidental has joined #ruby-lang
Cakey has joined #ruby-lang
Coincidental has quit [Ping timeout: 272 seconds]
sulo has quit [Ping timeout: 272 seconds]
Cakey has quit [Ping timeout: 248 seconds]
jsullivandigs has joined #ruby-lang
vbatts has quit [Ping timeout: 252 seconds]
nathanstitt has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 240 seconds]
nathanstitt has quit [Client Quit]
havenwood has quit []
jsullivandigs has quit [Ping timeout: 272 seconds]
nertzy2 has quit [Quit: This computer has gone to sleep]
jsullivandigs has joined #ruby-lang
datanoise has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afader has quit [Quit: WeeChat 0.4.2-rc1]
datanoise has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby-lang
RickHull has joined #ruby-lang
charliesome has joined #ruby-lang
omninonsense has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 260 seconds]
[spoiler] has quit [Ping timeout: 246 seconds]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Andrevan has joined #ruby-lang
Andrevan has quit [Client Quit]
Andrevan has joined #ruby-lang
smashwilson has joined #ruby-lang
smashwilson has left #ruby-lang [#ruby-lang]
hahuang65 has joined #ruby-lang
omninonsense is now known as [spoiler]
ecnalyr has joined #ruby-lang
hahuang65 has quit [Ping timeout: 248 seconds]
fuhgeddaboudit has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
bahar has joined #ruby-lang
adambeynon has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
bantic has quit [Quit: bantic]
momomomomo has quit [Quit: momomomomo]
jsullivandigs has joined #ruby-lang
sulo has joined #ruby-lang
Cakey has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
tbuehlmann has quit [Remote host closed the connection]
nvg has joined #ruby-lang
sulo has quit [Ping timeout: 245 seconds]
Cakey has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby-lang
bastilian has joined #ruby-lang
bastilian has quit [Client Quit]
michael_mbp is now known as zz_michael_mbp
datanoise has joined #ruby-lang
thepumpkin has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
dorei has joined #ruby-lang
thepumpkin has quit [Ping timeout: 245 seconds]
dingus_khan has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
sulo has joined #ruby-lang
ruby-lang897 has joined #ruby-lang
ruby-lang897 has quit [Client Quit]
sulo has quit [Read error: Connection reset by peer]
<DouweM>
From the docs: "For instance, /\d/ matches only the ASCII decimal digits (0-9); whereas /[[:digit:]]/ matches any character in the Unicode Nd category."
<DouweM>
So the [0-9] / \d distinction doesn't exist in Ruby, but it's good to keep in mind for regular expressions in general
<whitequark>
DouweM: right, seems ruby's version of oniguruma is patched.