<zachrab>
or anyone what is the difference between setting the attribute with @ vs. self?
Aova has joined #ruby
nateberkopec has quit [Quit: Leaving...]
rbennacer has joined #ruby
iMe has quit [Ping timeout: 255 seconds]
<wallerdev>
self.attribute= calls the accessor method
<wallerdev>
@attribute = just sets the instance variable
zacstewart has joined #ruby
<wallerdev>
self.attribute= will fail unless you define accessors
swgilles_ has joined #ruby
<zachrab>
wallerdev: what happens when you set an instance variable but have no accessors?
<wallerdev>
it gets set
<wallerdev>
and you can only access it inside the class by referencing the instance variable with @
fabrice31 has joined #ruby
<wallerdev>
you might want to just get a basic ruby book like pickaxe
lioninawhat has quit [Remote host closed the connection]
<wallerdev>
itll go over all that stuff
sent1nel has joined #ruby
iMe has joined #ruby
<baweaver>
I've never seen a point with getting into pedantic language features.
Spami has quit [Quit: This computer has gone to sleep]
<baweaver>
really, most of the time if I have a job that insists on it I run.
<waxjar>
people set instance variables with an accessor method some times in case the logic for setting that attribute changes in the future. that way you only have to alter your accessor method and the rest of your code will still work.
fenzil has joined #ruby
bklane has quit [Remote host closed the connection]
<baweaver>
because it means they're trying to be clever
<wallerdev>
yeah its most important in rails
<wallerdev>
where they override what accessors do
<baweaver>
and clever is notoriously annoying to fix.
<baweaver>
that is, but I was referring to your earlier bit
<baweaver>
you probably don't need to know monkeypatching, flipflops, or define_method
phutchins has joined #ruby
swgillespie has quit [Ping timeout: 240 seconds]
<baweaver>
too many hyper-language specific questions should be a red flag.
rbennacer has quit [Ping timeout: 250 seconds]
<zenspider>
clever is the enemy of good
swgilles_ has quit [Client Quit]
<wallerdev>
clever is good for code golf :D
<zenspider>
code golf is the enemy of good
<waxjar>
clever is fun :D
bklane has joined #ruby
<zenspider>
fun is the enemy of good
mitchellhenke has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
<waxjar>
clever is zenspider
LouisRoR has quit [Ping timeout: 246 seconds]
<zenspider>
damnit
<baweaver>
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
lioninawhat has joined #ruby
jlast has joined #ruby
<baweaver>
I'd say more like 3x, but the point is still there.
<wallerdev>
no need to debug anyway if youre not writing broken code right?
<wallerdev>
:p
<sevenseacat>
a wise man said, forgiveness is divine, but never pay full price for late pizza.
adriancb has quit [Remote host closed the connection]
swgillespie has joined #ruby
adriancb has joined #ruby
mleung has quit [Quit: mleung]
mmoretti has quit [Quit: Leaving...]
bklane has quit [Ping timeout: 264 seconds]
YamakasY has quit [Ping timeout: 246 seconds]
bklane has joined #ruby
lys has quit [Ping timeout: 245 seconds]
lioninawhat has quit [Remote host closed the connection]
baweaver has quit [Read error: Connection reset by peer]
athan has joined #ruby
leslie has joined #ruby
leslie has joined #ruby
davejacobs has joined #ruby
zachrab has quit [Remote host closed the connection]
commmmodo has joined #ruby
havenwood has joined #ruby
jenrzzz has joined #ruby
Sirupsen has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
iMe has quit [Ping timeout: 245 seconds]
shum has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
ellisTAA has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
<ellisTAA>
ok i have reflected on the work i’ve been doing, and it seems that most problems fall into one of two categories. they either want me to locate some data or manipulate some data. what other major types of problems are there?
lys has joined #ruby
chf0 has joined #ruby
marr has quit [Ping timeout: 252 seconds]
adamjleonard has joined #ruby
iMe has joined #ruby
robbyoconnor has joined #ruby
gr33n7007h has quit [Ping timeout: 252 seconds]
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
davejacobs has quit [Remote host closed the connection]
ghr has joined #ruby
lioninawhat has joined #ruby
Takle has joined #ruby
lioninawhat has quit [Remote host closed the connection]
mrgrieves has quit [Ping timeout: 256 seconds]
ghr has quit [Ping timeout: 245 seconds]
djbkd has quit [Remote host closed the connection]
max96at is now known as max96at|off
balazs has quit [Ping timeout: 252 seconds]
chf0 has quit []
djbkd has joined #ruby
Takle has quit [Ping timeout: 264 seconds]
jottr_ has quit [Ping timeout: 245 seconds]
riotjones has joined #ruby
MrSamuel has joined #ruby
rsty has joined #ruby
mrgrieves has joined #ruby
Yzguy has joined #ruby
pika_pika has joined #ruby
rsty has joined #ruby
adriancb_ has joined #ruby
rsty has left #ruby [#ruby]
iMe has quit [Ping timeout: 265 seconds]
adriancb_ has quit [Remote host closed the connection]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<bricker>
agrinb: in that code example, you'd pass an array into the QuickSort.sort! method. QuickSort.sort!([1,2,3,4,5])
yfeldblum has quit [Remote host closed the connection]
<agrinb>
thanks
yfeldblum has joined #ruby
havenwood has quit [Remote host closed the connection]
ta has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<Radar>
Interesting that the page doesn't include a Clojure version.
thesoup has joined #ruby
FrankenDaemon has quit [Ping timeout: 252 seconds]
iMe has quit [Ping timeout: 265 seconds]
slawrence00 has joined #ruby
bklane has joined #ruby
bklane has quit [Remote host closed the connection]
iMe has joined #ruby
razorsharph has quit [Quit: Konversation terminated!]
FrankenDaemon has joined #ruby
adriancb_ has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<chipotle>
whats the best ruby on rails book that's current?
cibs has joined #ruby
freerobby has quit [Quit: Leaving.]
<sevenseacat>
!r4ia
<helpa>
Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Steve Klabnik, Ryan Bigg, Yehuda Katz
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Hijiri>
DDD
<Hijiri>
development driven development
<mozzarella>
Code Driven Development is the only way to go
braincrash has joined #ruby
Aova has quit [Read error: Connection reset by peer]
tunaCanBruh has joined #ruby
veinofstars has joined #ruby
<chipotle>
how's the rails 4 way?
<veinofstars>
anyone familiar with the twitter gem? i’m looking to hack its HTTP usage to always go through EM::HttpRequest
lioninawhat has quit [Remote host closed the connection]
<veinofstars>
i think i need to change the adapter for faraday, but i’m not sure how to do it with just the twitter gem
<chipotle>
sevenseacat: how would you say it compares?
<chipotle>
i do like manning :)
DonOtreply has quit [Quit: DonOtreply]
davedev24_ has joined #ruby
<chipotle>
but i had a HORRIBLE time trying to buy the MEAP of the well grounded rubyist
<sevenseacat>
the two books are not aimed at the same audience
<chipotle>
AMEX, chase sapphire preferred and harvard credit union cards all denied the charge
iMe has quit [Ping timeout: 246 seconds]
<chipotle>
it took two weeks of fighting with the banks and the customer service rep at manning to get it figured out
<chipotle>
sevenseacat: how so?
davedev2_ has quit [Ping timeout: 264 seconds]
<sevenseacat>
the rails 4 way is a reference book
OrbitalK_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat>
rails 4 in action is a tutorial
Aova has joined #ruby
<chipotle>
ok
<chipotle>
so which is the best way to learn rails?
<lampd1>
rails 4 zombies
<chipotle>
rails 4 in action?
<sevenseacat>
rails 4 in action
<lampd1>
:P
tunaCanBruh has quit [Ping timeout: 252 seconds]
avahey has quit [Quit: Connection closed for inactivity]
iMe has joined #ruby
ponga has joined #ruby
Ivision_ has joined #ruby
sent1nel has joined #ruby
Ivision_ has quit [Read error: No route to host]
dimaursu16 has quit [Ping timeout: 244 seconds]
Ivision_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Ivision has quit [Ping timeout: 246 seconds]
zacstewart has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
Aova has quit [Read error: Connection reset by peer]
karmatr0n has quit [Remote host closed the connection]
gsd has quit [Read error: Connection reset by peer]
mudtose has quit [Ping timeout: 256 seconds]
gsd has joined #ruby
agrinb has quit [Remote host closed the connection]
regnartim has quit [Quit: Leaving]
zachrab has quit [Remote host closed the connection]
posixpascal has joined #ruby
agrinb has joined #ruby
himsin has quit [Quit: himsin]
jefus_ has joined #ruby
Channel6 has joined #ruby
iMe has quit [Ping timeout: 240 seconds]
Aova has joined #ruby
mudtose has joined #ruby
crazydiamond has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ARCADIVS has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
jefus has quit [Ping timeout: 264 seconds]
agrinb has quit [Ping timeout: 265 seconds]
iMe has joined #ruby
paradisaeidae_ has joined #ruby
agent_white has joined #ruby
P1RATEZ has joined #ruby
lioninawhat has quit [Remote host closed the connection]
dimaursu16 has quit [Ping timeout: 246 seconds]
paradisaeidae has quit [Ping timeout: 264 seconds]
paradisaeidae_ is now known as paradisaeidae
zachrab has joined #ruby
zachrab has quit [Remote host closed the connection]
piotrj has joined #ruby
gizmore has joined #ruby
josephcs has joined #ruby
sent1nel has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
sud0x has joined #ruby
djbkd has joined #ruby
amacou has joined #ruby
<sud0x>
hey guys, I'm looking at the OpenSSL module on ruby docs, but don't see anything for connecting to a server with a specific cipher. Is this possible?
mjuszczak has quit []
sent1nel has joined #ruby
<agent_white>
OpenSSL::Cipher.ciphers
zachrab has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
maximski has quit []
danjordan has joined #ruby
fgo has joined #ruby
dimaursu16 has joined #ruby
zachrab has quit [Remote host closed the connection]
kyb3r_ has quit [Quit: Leaving]
iMe has joined #ruby
mudtose has quit [Ping timeout: 264 seconds]
<sud0x>
thanks agent_white
sud0x has left #ruby [#ruby]
MasterPiece has joined #ruby
az7ar_away is now known as az7ar
TheNet has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
TheNet has joined #ruby
neektza has quit [Ping timeout: 252 seconds]
peasoup has quit [Ping timeout: 244 seconds]
davedev2_ has joined #ruby
yvemath has quit [Ping timeout: 252 seconds]
dimaursu16 has quit [Ping timeout: 264 seconds]
nolic has quit [Ping timeout: 252 seconds]
rfv has quit [Ping timeout: 252 seconds]
nolic has joined #ruby
neektza has joined #ruby
kalz has quit [Ping timeout: 252 seconds]
piotrj has joined #ruby
davedev24_ has quit [Ping timeout: 245 seconds]
yvemath has joined #ruby
himsin has joined #ruby
wottam has joined #ruby
rfv has joined #ruby
dimaursu16 has joined #ruby
danjordan has quit [Quit: danjordan]
agrinb has joined #ruby
lxsameer has joined #ruby
agrinb_ has joined #ruby
mudtose has joined #ruby
<agent_white>
ritzratzrazmatatz
sent1nel has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
agrinb has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
iMe has quit [Ping timeout: 252 seconds]
lyuben__ has quit [Quit: This computer has gone to sleep]
agrinb_ has quit [Ping timeout: 245 seconds]
MasterPiece| has joined #ruby
fgo has joined #ruby
Channel6 has quit [Quit: Leaving]
armyriad has joined #ruby
MasterPiece has quit [Read error: Connection reset by peer]
iMe has joined #ruby
dc__ has joined #ruby
kalz has joined #ruby
dc_ has quit [Ping timeout: 246 seconds]
davedev24_ has joined #ruby
davedev2_ has quit [Ping timeout: 255 seconds]
tens0r has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
agent_white has joined #ruby
tens0r has quit [Changing host]
tens0r has joined #ruby
tens0r has quit [Remote host closed the connection]
tens0r has joined #ruby
Sawbones has quit []
himsin has quit [Read error: Connection reset by peer]
mudtose has quit [Ping timeout: 255 seconds]
hamakn has quit [Remote host closed the connection]
mudtose has joined #ruby
dimaursu16 has quit [Ping timeout: 250 seconds]
shadoi has quit [Quit: Leaving.]
himsin has joined #ruby
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iMe has quit [Ping timeout: 245 seconds]
peasoup has joined #ruby
iMe has joined #ruby
riotjones has joined #ruby
Aova has quit [Read error: Connection reset by peer]
hanmac1 has joined #ruby
nii236|i1ssi has joined #ruby
tagrudev has joined #ruby
RasKhadafi has quit [Ping timeout: 240 seconds]
riotjones has quit [Ping timeout: 245 seconds]
duncannz has joined #ruby
Aova has joined #ruby
CorySimmons has joined #ruby
pu22l3r has quit [Remote host closed the connection]
fabrice31 has joined #ruby
hvxgr has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Remote host closed the connection]
<diegoviola>
I'm parsing some CSV data and then importing the data to my db, I'd like to validate the data before importing, how do I go into doing that?
<diegoviola>
I'm using CSV#read()
posixpascal has joined #ruby
sjmikem has joined #ruby
az7ar is now known as az7ar_away
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
<chintanparikh>
Looks lie something's blocking my loop
iliketurtles has quit [Quit: zzzzz…..]
zacstewart has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
sandelius has joined #ruby
veinofstars has quit [Quit: veinofstars]
iMe has quit [Ping timeout: 246 seconds]
wottam has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apurcell has joined #ruby
zacstewart has quit [Ping timeout: 246 seconds]
iMe has joined #ruby
<quazimodo>
how do we do optional args?
apeiros_ has joined #ruby
bal has joined #ruby
Pupeno has joined #ruby
veinofstars has joined #ruby
veinofstars has quit [Client Quit]
wottam has quit [Ping timeout: 240 seconds]
fgo has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
posixpascal has quit [Read error: Connection reset by peer]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
posixpascal has joined #ruby
apurcell has quit [Ping timeout: 252 seconds]
<Igneous>
Hey this might be a weird question, but is there any kind of language-agnostic database modeling toolset? I'm doing some product work with a (mostly) php project, but I'd like to do some application configuration with chef, and do a couple tiny tweaks to the db.
diegovio1 has joined #ruby
joufflu has quit [Read error: Connection reset by peer]
<Igneous>
Is there such a thing? Or should I just bite the bullet and abstract away the db calls that I need to make in something like sequel
diegoviola is now known as Guest13655
himsin has quit [Read error: Connection reset by peer]
diegovio1 is now known as diegoviola
Guest13655 has quit [Ping timeout: 244 seconds]
hamakn has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
dopie has quit [Remote host closed the connection]
<quazimodo>
i always just did def whateven(optional = nil)
psy_ has quit [Ping timeout: 255 seconds]
rushed has joined #ruby
himsin has joined #ruby
<Igneous>
quazimodo: I want to say that ruby 2.1 has optional named parameters, so when defining a method, you can do something like (option: nil), and then define it when calling method(option: myvar)
<Igneous>
that's not very legacy-friendly code, though
<Igneous>
and it's still commonplace to see people using the options={} pattern
lkba has quit [Ping timeout: 245 seconds]
Aova has joined #ruby
<quazimodo>
hrm
<quazimodo>
i want to use a strategy pattern, but also be able to call lambdas
<quazimodo>
so my strategy objects have #call method
<quazimodo>
but they don't take args
<quazimodo>
.call on lambda can have args
agent_white has quit [Read error: Connection reset by peer]
<quazimodo>
so def call(lambda_args = nil) works in my strategy objects
<quazimodo>
but it's ugly
dumdedum has joined #ruby
<quazimodo>
...
<quazimodo>
maybe the context object needs to check if it's a lambda or not perhaps
agent_white has joined #ruby
hamakn_ has joined #ruby
amclain has quit [Quit: Leaving]
iMe has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
ghr has joined #ruby
<certainty>
moin ruby
iMe has joined #ruby
hamakn has quit [Ping timeout: 255 seconds]
fabrice31 has joined #ruby
rushed has quit [Quit: rushed]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Takle has quit [Ping timeout: 250 seconds]
User458764 has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
agent_white has quit [Read error: Connection reset by peer]
AlexRussia has quit [Ping timeout: 265 seconds]
agent_white has joined #ruby
harfangk has joined #ruby
timmmaaaayyy has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has quit [Ping timeout: 252 seconds]
timmmaaaayyy has joined #ruby
hamakn_ has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
greenarrow has joined #ruby
himsin has quit [Quit: himsin]
kalusn has joined #ruby
<chintanparikh>
Anyone online with socket programming experience?
<chintanparikh>
This is still giving me a huge headache
<agent_white>
chintanparikh: Just ask your question :)
<agent_white>
I only have minor experience, but maybe I could help.
duncannz has quit [Remote host closed the connection]
rushed has joined #ruby
himsin has joined #ruby
Takle has quit [Remote host closed the connection]
siso has joined #ruby
qba73 has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oleo has quit [Read error: Connection reset by peer]
harfangk has quit [Quit: This computer has gone to sleep]
oleo has joined #ruby
Pharaoh2 has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
Pharaoh2 has quit [Max SendQ exceeded]
Pharaoh2 has joined #ruby
Aova has quit [Read error: Connection reset by peer]
mbytes has joined #ruby
chintanparikh has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
livathinos has joined #ruby
antgel has joined #ruby
dagda1 has quit [Read error: Connection reset by peer]
mbytes has quit [Ping timeout: 245 seconds]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
Aova has joined #ruby
iMe has quit [Ping timeout: 255 seconds]
ghostpl has joined #ruby
iMe has joined #ruby
LouisRoR has quit [Ping timeout: 265 seconds]
mroach has quit [Quit: mroach]
chrishough has joined #ruby
oo_ has quit [Remote host closed the connection]
hs366 has joined #ruby
bweston92 has joined #ruby
Lemur has quit [Remote host closed the connection]
ghr has joined #ruby
Lemur has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
Xeago has joined #ruby
tunaCanBruh has joined #ruby
JohnBat26 has joined #ruby
harfangk has joined #ruby
CustosL1men has joined #ruby
Lemur has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 250 seconds]
Xeago___ has quit [Ping timeout: 246 seconds]
<quazimodo>
hrm
<quazimodo>
what's an elegant way to take a nested block of hashes and arrays, go through each element (the element in the array, or the value of the hash) and replace it
<quazimodo>
so [{foo: ["bar", "baz"]}, ["zed", {who: "where"}]]
chintanparikh has joined #ruby
tunaCanBruh has quit [Ping timeout: 252 seconds]
<quazimodo>
preserver that structure, but just append an a to each elem/value
<crome>
chintanparikh: you don't loop in the thread block. you wait for one readline and then decide what to respond based on request_hash["request"] and then the thread ends
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
ghr has joined #ruby
<chintanparikh>
crome: OH that makes a lot of sense
livathin_ has joined #ruby
<chintanparikh>
crome: You're a life saver, thanks so much!
<crome>
you're welcome
iMe has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
fgo has joined #ruby
<waxjar>
quazimodo: is that really how your structure looks? [hash, 2-element array] ?
arup_r_ has quit [Ping timeout: 252 seconds]
jgt has quit [Ping timeout: 264 seconds]
livathinos has quit [Ping timeout: 265 seconds]
kalusn has joined #ruby
<waxjar>
ohterwise i'd say ary.each { |h| h.each_value { |v| v << "a" } }
iMe has joined #ruby
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
Jetchisel has joined #ruby
livathin_ has quit [Remote host closed the connection]
razieliyo has quit [Read error: No route to host]
bronson has joined #ruby
livathinos has joined #ruby
jgt has joined #ruby
LouisRoR has joined #ruby
mikecmpbll has joined #ruby
tens0r has quit [Ping timeout: 245 seconds]
tensor-dev has joined #ruby
vozcelik has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
hamakn has joined #ruby
r0bby_ has joined #ruby
marr has joined #ruby
terlar has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
agent_white has joined #ruby
r0bby_ is now known as robbyoconnor
hamakn has quit [Ping timeout: 245 seconds]
sevenseacat has quit [Ping timeout: 245 seconds]
iMe has quit [Ping timeout: 264 seconds]
max96at|off is now known as max96at
lolmaus has quit [Quit: Konversation terminated!]
bunbury_ has joined #ruby
iMe has joined #ruby
lsmola has joined #ruby
az7ar_away is now known as az7ar
AFKGeek has joined #ruby
Zai00 has joined #ruby
jhebden has quit [Read error: No route to host]
<avril14th>
morning
msgodf has joined #ruby
amundj has quit [Ping timeout: 244 seconds]
amundj_ has joined #ruby
aswen has joined #ruby
<apeiros_>
moin
duncannz has joined #ruby
PierreRambaud has joined #ruby
timonv has joined #ruby
dmolina has joined #ruby
<mambo>
is there any way to find out where the variable was first set in a ruby debugger? im using 2.2.x
<mambo>
i mean, find out where in a code it was set on a debugger
wottam has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amacou has quit [Remote host closed the connection]
abuzze has joined #ruby
leafybasil has quit [Remote host closed the connection]
tmtwd has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
chintanparikh has quit [Ping timeout: 264 seconds]
Aova has quit [Read error: Connection reset by peer]
<olivier_bK>
the file FileDirectory.rb and Colorize.rb are in in lib/ In other words in the same directory
Xeago_ has joined #ruby
<mambo>
@diegoviola: maybe use CSV.foreach instead of CSV.read?
<apeiros_>
olivier_bK: you create a class FileAttr::String, which is not the same as String
<apeiros_>
and you include Color in that class, not in ::String
<olivier_bK>
what
diegoviola has quit [Ping timeout: 256 seconds]
Xeago has quit [Ping timeout: 256 seconds]
druznek has joined #ruby
m8 has joined #ruby
<apeiros_>
olivier_bK: do you intend on asking a sensible question or is "what" all?
<agent_white>
WAT
<apeiros_>
agent_white: WAT PHO. good school.
mambo has quit [Remote host closed the connection]
CpuID2 has joined #ruby
CpuID2 has joined #ruby
Guest123 has joined #ruby
<agent_white>
WAT DAT SKOO FOO?
<agent_white>
Butsrsly what's that?
dANO_ has joined #ruby
<agent_white>
":D
<apeiros_>
massage school in thailand
davidhq has joined #ruby
mdw has joined #ruby
TheNet has quit [Quit: Leaving...]
diegoviola has joined #ruby
<shevy>
lol
<monsieurp>
guys, I'm trying to figure out a way to get a list of all available modules, is there a way to accomplish such thing whilst in irb? or via a script?
<shevy>
yeah via ObjectSpace I guess
<apeiros_>
monsieurp: ObjectSpace.each_object
himsin has quit [Ping timeout: 252 seconds]
<apeiros_>
but should use this for debugging/introspection only, not for production code.
Grumelo has joined #ruby
<monsieurp>
apeiros_: which is my intention ;)
<apeiros_>
ah I remember why I had that feeling that I should ignore olivier_bK.
himsin has joined #ruby
iMe has quit [Ping timeout: 264 seconds]
<olivier_bK>
apeiros, sorry the "what" is not for you i talking with another people
CpuID2 has quit [Quit: This computer has gone to sleep]
CpuID2 has joined #ruby
<olivier_bK>
lol..
<monsieurp>
apeiros_: care to elaborate on ObjectSpace.each_object use? if I do this: ObjectSpace.each_object{|v| puts v}, it outputs the entire Universe to my terminal
<apeiros_>
don't forget that classes are modules too. so if you don't want them, you have to exclude them manually
<monsieurp>
apeiros_: ah ok, yes indeed
iMe has joined #ruby
<monsieurp>
whilst in irb: help
<monsieurp>
and then: ObjectSpace.each_object
<apeiros_>
or outside irb: ri
peasoup has quit [Ping timeout: 250 seconds]
davidhq has joined #ruby
<apeiros_>
or in the web: rdoc.info or ruby-doc.org
enterprisedc has quit [Quit: enterprisedc]
<apeiros_>
docsaplenty
<monsieurp>
thanks! :)
<apeiros_>
or in pry with pry-doc: ? ObjectSpace.each_object
Xeago_ has quit [Remote host closed the connection]
<apeiros_>
$ ObjectSpace.each_object to get its source code.
lkba has quit [Read error: Connection reset by peer]
fgo has joined #ruby
enterprisedc has joined #ruby
abuzze has quit []
psy_ has joined #ruby
rodfersou has joined #ruby
<monsieurp>
apeiros_: it's not as trivial as: import math; dir(math)
<monsieurp>
but hey :>
colli5ion has joined #ruby
<apeiros_>
ls ObjectSpace
<apeiros_>
pry, again.
colli5ion has quit [Max SendQ exceeded]
alex88 has joined #ruby
<apeiros_>
so gtfo with your pythonisms :-p
_mynameis has joined #ruby
colli5ion has joined #ruby
colli5ion has quit [Max SendQ exceeded]
<monsieurp>
:P
OrbitalKitten has joined #ruby
<alex88>
hi guys, someone uses jasmine to test a javascript library inside a ruby gem? I'm actually trying to do that but it seems it can't catch my tests with coffeescript
veinofstars has joined #ruby
<apeiros_>
in plain ruby there's plenty of introspection too. but nothing which mixes all like python's dir().
<monsieurp>
I had to stick a couple of lines in my .irbrc to get completion and colours and all those fancy stuff
colli5ion has joined #ruby
<quazimodo>
does CGI's html helpers escape html automatically?
colli5ion has quit [Max SendQ exceeded]
<apeiros_>
monsieurp: do yourself a favor, use pry.
<monsieurp>
what is pry?
<apeiros_>
an irb replacement
aagdbl has joined #ruby
<monsieurp>
a ruby REPL?
leafybasil has joined #ruby
Xeago has joined #ruby
colli5ion has joined #ruby
colli5ion has quit [Max SendQ exceeded]
tensor-dev has quit [Quit: tensor-dev]
leat has joined #ruby
abuzze has joined #ruby
colli5ion has joined #ruby
colli5ion has quit [Max SendQ exceeded]
agent_white has quit [Read error: Connection reset by peer]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
adriancb_ has joined #ruby
n1lo has joined #ruby
AFKGeek has left #ruby ["Leaving"]
tmtwd has quit [Remote host closed the connection]
roshanavand has joined #ruby
adriancb_ has quit [Remote host closed the connection]
amacou has joined #ruby
dimaursu16 has joined #ruby
rushed has quit [Quit: rushed]
reinaldob has joined #ruby
abuzze has joined #ruby
sweeper has quit [Ping timeout: 264 seconds]
tunaCanBruh has quit [Ping timeout: 256 seconds]
strixd has joined #ruby
az7ar is now known as az7ar_away
himsin has quit [Read error: Connection reset by peer]
_mynameis has quit [Ping timeout: 250 seconds]
sweeper has joined #ruby
shum1 has quit [Remote host closed the connection]
jottr_ has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
iMe has quit [Ping timeout: 264 seconds]
centrx has joined #ruby
einarj has quit [Remote host closed the connection]
shum has quit [Client Quit]
reinaldob has quit [Ping timeout: 244 seconds]
shum has joined #ruby
Aova has quit [Read error: Connection reset by peer]
vtunka has joined #ruby
iMe has joined #ruby
abuzze has quit [Ping timeout: 250 seconds]
Timgauthier has joined #ruby
jerematic has joined #ruby
lioninawhat has joined #ruby
Takle has quit [Remote host closed the connection]
shum1 has joined #ruby
Aova has joined #ruby
lioninawhat has quit [Remote host closed the connection]
Xeago has joined #ruby
Patrezze has joined #ruby
dblessing has joined #ruby
_mynameis has joined #ruby
lolmaus has quit [Remote host closed the connection]
himsin has joined #ruby
lolmaus has joined #ruby
puppetmonkey_ has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
nateberkopec has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
puppetmonkey has quit [Ping timeout: 246 seconds]
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iMe has joined #ruby
roshanavand has quit [Remote host closed the connection]
cpt_yossarian has quit [Ping timeout: 240 seconds]
mambo has joined #ruby
jimms has joined #ruby
rushed has joined #ruby
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
Pharaoh2 has joined #ruby
m8 has quit [Quit: Sto andando via]
mroach has quit [Quit: mroach]
Kruppe has quit [Ping timeout: 255 seconds]
PanzerModern has quit [Ping timeout: 245 seconds]
Troy^ has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
PanzerModern has joined #ruby
Megtastique has joined #ruby
mambo has quit [Ping timeout: 252 seconds]
danzilio has joined #ruby
pika_pika has joined #ruby
himsin has quit [Read error: Connection reset by peer]
Aova has quit [Remote host closed the connection]
lioninawhat has joined #ruby
lanemeyer has joined #ruby
siso has quit [Quit: siso]
psy_ has quit [Ping timeout: 245 seconds]
himsin has joined #ruby
sambao21 has joined #ruby
aep has quit [Ping timeout: 244 seconds]
claptor has quit [Quit: this channel is bakas]
einarj has joined #ruby
aep has joined #ruby
lioninawhat has quit [Remote host closed the connection]
Kruppe has joined #ruby
Ivision_ has joined #ruby
dumdedum has quit [Quit: foo]
einarj has quit [Remote host closed the connection]
withnale_ has joined #ruby
bronson has joined #ruby
veinofstars has joined #ruby
roshanavand has joined #ruby
Ivision has quit [Ping timeout: 250 seconds]
iMe has quit [Ping timeout: 250 seconds]
michael_mbp has quit [Excess Flood]
iMe has joined #ruby
Abhijit has joined #ruby
livcd has quit [Changing host]
livcd has joined #ruby
diegovio1 has joined #ruby
diegoviola has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 244 seconds]
michael_mbp has joined #ruby
wald0 has joined #ruby
jbw has quit [Ping timeout: 244 seconds]
dotix has joined #ruby
peasoup has joined #ruby
fgo has joined #ruby
shellfu has joined #ruby
d10n-work has joined #ruby
fgo has quit [Client Quit]
Kejento has quit [Read error: Connection reset by peer]
DouweM has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shellfu has quit [Remote host closed the connection]
joonty has joined #ruby
peasoup has quit [Ping timeout: 245 seconds]
fenak has joined #ruby
Vivex has joined #ruby
piotrj has quit [Remote host closed the connection]
apurcell has joined #ruby
brb3 has joined #ruby
Takle has joined #ruby
jimms has quit [Remote host closed the connection]
psy_ has joined #ruby
Abhijit has quit [Quit: Leaving]
psy_ has quit [Max SendQ exceeded]
Takle has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
jimms has joined #ruby
Takle has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
apurcell has quit [Ping timeout: 246 seconds]
Choclo is now known as Choclo[Away]
Vile` has quit [Quit: .]
apurcell has joined #ruby
iMe has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba_ has joined #ruby
aclearman037 has joined #ruby
_mynameis has quit [Ping timeout: 265 seconds]
Choclo[Away] is now known as Choclo
apurcell has quit [Ping timeout: 255 seconds]
piotrj has joined #ruby
shellfu has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
jbw has joined #ruby
n008f4g_ has joined #ruby
Dreamer3 has joined #ruby
raphaelss has quit [Quit: leaving]
yfeldblu_ has quit [Ping timeout: 255 seconds]
Choclo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agarie has joined #ruby
lkba_ has quit [Ping timeout: 264 seconds]
Timgauthier has quit [Read error: Connection reset by peer]
abuzze has joined #ruby
Timgauthier has joined #ruby
mostlybadfly has joined #ruby
psy_ has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
psy_ has quit [Remote host closed the connection]
mun has joined #ruby
<mun>
hi
<mun>
does anyone know of a good way to implement in-app scripting? that is, to allow users write scripts using my naive language for defining the behaviour of my app
paulfm has joined #ruby
apurcell has joined #ruby
davedev24_ has quit [Ping timeout: 246 seconds]
silkfox has joined #ruby
iMe has joined #ruby
<ddv>
mun: ruby dsl?
_mynameis has joined #ruby
ghostpl has quit [Remote host closed the connection]
davedev24_ has joined #ruby
<mun>
ddv: could ruby dsl be used as some kind of a meta-language (i'm guessing that's what i'm having here?)
<shevy>
mun yea
ghostpl has joined #ruby
einarj has joined #ruby
<shevy>
problem is a DSL must default to some behaviour
<shevy>
so for a real DSL you'd have to parse tokens
<centrx>
mun, If you don't make it a Ruby DSL, you basically have to write a little grammar parser for your language that reads in a string
apurcell has quit [Ping timeout: 244 seconds]
<mun>
centrx: yeah, and that's what i'm trying to avoid
EvanFreeman has joined #ruby
einarj has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
<shevy>
mun you can get away with a lot through the various *eval* methods and method_missing
piotrj has joined #ruby
diegovio1 is now known as diegoviola
maximski has quit [Ping timeout: 246 seconds]
mambo has joined #ruby
blizzy has quit [Ping timeout: 246 seconds]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timonv has joined #ruby
<wasamasa>
mun: it's how stuff like in-game editors work
rap has joined #ruby
amystephen has joined #ruby
triple_b has joined #ruby
davidhq has joined #ruby
maximski has joined #ruby
apurcell has quit [Ping timeout: 245 seconds]
maximski has quit [Remote host closed the connection]
devdazed has joined #ruby
mambo has quit [Ping timeout: 246 seconds]
wottam has joined #ruby
<mun>
interestig
triple_b has quit [Ping timeout: 245 seconds]
<wasamasa>
it's also part of how ruby itself works :D
tunaCanBruh has joined #ruby
hanmac2 has joined #ruby
<shevy>
wasamasa the wise man
<wasamasa>
nah, I just spend too much time reading over writing
iMe has quit [Ping timeout: 252 seconds]
devdazed has quit [Client Quit]
<wasamasa>
and complaining over programming
jefus_ is now known as jefus
<mun>
bah, to save on work for now.. would it be a good idea to just let users write ruby that is limited to the interface i provide?
<monsieurp>
apeiros_: pry = woah
<wasamasa>
mun: hmm, you'd need to limit it severely
davedev2_ has joined #ruby
hanmac has quit [Ping timeout: 245 seconds]
<mun>
wasamasa: for security reasons?
<wasamasa>
mun: mostly
<mun>
or, maybe just open a socket, and offer an API essentially
<wasamasa>
that could very well be the easiest
davedev24_ has quit [Ping timeout: 265 seconds]
<mun>
ask the user to make appropriate requests
<wasamasa>
in fact, it has been done with files ages before
iMe has joined #ruby
<mun>
files?
<wasamasa>
see /proc under linux and 9plan
Timgauthier has quit [Read error: Connection reset by peer]
<mun>
wasamasa: you mean, /proc communicates over sockets?
tunaCanBruh has quit [Ping timeout: 246 seconds]
<wasamasa>
no, I meant /proc is a pseudo-fs
<wasamasa>
it's just files you can read from and write to
Timgauthier has joined #ruby
twistedpixels is now known as zz_twistedpixels
Pupeno has joined #ruby
<wasamasa>
9plan took the idea a bit further
<workmad3>
ah, procfs, harking back to the original unix philosophy of 'everything is a file'
sevenseacat has quit [Remote host closed the connection]
<workmad3>
and unix sockets, which are also files...
<workmad3>
files are fun :)
<wasamasa>
mhh
gregf has quit [Quit: WeeChat 1.0.1]
<wasamasa>
they're at the very least practical to work with
sankaber has joined #ruby
<workmad3>
yeah, as long as you have decent file-system libraries in your language
<apeiros_>
they're limited
* wasamasa
finished writing a system monitor using these yesterday
piotrj has quit [Ping timeout: 245 seconds]
<workmad3>
apeiros_: pfft, only if you want to do fun stuff like real-time graphics or a lot of networking... :P
veinofstars has quit [Quit: veinofstars]
<apeiros_>
or basically anything where random access BLOB doesn't cut it :-)
* wasamasa
would like to do real-time sound
piotrj has joined #ruby
Takle has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 244 seconds]
banister has joined #ruby
<workmad3>
apeiros_: in their defence, the original unix beards didn't have fancy things like graphical displays or complicated networks... files were a very good fit for everything they tended to deal with... and they're surprisingly good for interacting with a lot of stuff even now, just there are some cases where they're not :)
<apeiros_>
oh, don't get me wrong
rubytor has quit [Ping timeout: 246 seconds]
lxsameer has quit [Quit: Leaving]
<apeiros_>
files are a useful abstraction for many things
* wasamasa
is sad about the lack of /dev/dsp on modern linux systems
<shevy>
everything is an object!
<workmad3>
wasamasa: I'm waiting to be able to connect my MBP up to my smoke alarm via bluetooth and get a /dev/geiger
<shevy>
everything is a file
<wasamasa>
piping into `play` is close enough for quick and dirty audio hacking
JDiPierro has joined #ruby
<shevy>
apeiros wrote alle meine entlein
<workmad3>
shevy: objects are files and files are objects!
<apeiros_>
and entlein are files
<shevy>
lol
einarj has joined #ruby
<centrx>
urbit
JDiPierro has quit [Remote host closed the connection]
* wasamasa
is not sure what to think of it
* workmad3
wonders if entlein is anything to do with ents
jzigmund has joined #ruby
enebo has joined #ruby
totimkopf has joined #ruby
<shevy>
workmad3 it's german for cute little duckies
JDiPierro has joined #ruby
<workmad3>
oh man, now my mind is wondering how many ents you'd need to turn into paper in order to be able to print off some textual representation of the CGI animations of ents from LOTR...
einarj has quit [Remote host closed the connection]
<totimkopf>
why do I need to use class_variable_set/class_variable_get with class method singletons? I thought def self.foo would be the same as def Klass.foo?
zenith_ has joined #ruby
apurcell has joined #ruby
guardian has joined #ruby
<guardian>
hello, I have a beginner question
allcentury has joined #ruby
<guardian>
echo "puts "hello" > b
<guardian>
echo "load 'b'" > a.rb
<guardian>
executing ruby a.rb outputs "hello"
piotrj has quit [Ping timeout: 256 seconds]
<guardian>
so far so good, but if I do echo "require_relative 'b'" > a.rb then I get an error
it0a has joined #ruby
<guardian>
./a.rb:1:in `require_relative': cannot load such file
<guardian>
is it because require_relative expects a file that ends with .rb ?
rodfersou has quit [Read error: Connection reset by peer]
<apeiros_>
guardian: actually load does
<apeiros_>
I'm surprised your first example works
<totimkopf>
require doesn't need the file extension
<workmad3>
guardian: require (and require_relative) add on .rb if no extension is present
<crome>
it requires a file that is there, though
rodfersou has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<guardian>
yeah my point, it seems to add the extension prior to testing whether the file exists
<apeiros_>
guardian: ah, but your file should be named .rb
Kricir has quit [Remote host closed the connection]
<apeiros_>
load needs the filename as it is. that's why your first example worked. because you called your file 'b'. but with require/require_relative, while you do require_relative 'b', the file's name must still be b.rb
tunaCanBruh has joined #ruby
lioninawhat has joined #ruby
<bhaak>
entlein good also be "little ent"
<apeiros_>
require/require_relative can load other file types than just .rb
<guardian>
yeah well so the exact need is: a Vagrantfile loads another Vagrantfile
<guardian>
in which case "load" is good enough and works
x77686d has joined #ruby
apurcell has quit [Ping timeout: 252 seconds]
iMe has quit [Ping timeout: 264 seconds]
<guardian>
thanks for caring
roshanavand has quit [Ping timeout: 264 seconds]
gregf has joined #ruby
davedev24_ has joined #ruby
iMe has joined #ruby
cphrmky has joined #ruby
narph has quit [Quit: Connection closed for inactivity]
davedev2_ has quit [Ping timeout: 265 seconds]
tvw has quit [Ping timeout: 264 seconds]
dimaursu16 has quit [Ping timeout: 250 seconds]
n008f4g_ has joined #ruby
balazs has joined #ruby
antgel has quit [Ping timeout: 256 seconds]
<mun>
wasamasa: hi again
dumdedum has joined #ruby
agrinb has joined #ruby
adriancb_ has joined #ruby
jerius has joined #ruby
<mun>
wasamasa: with my 'meta language' question earlier, rather than asking the user to load their own scripts in order to talk to my API, would it be a good idea to somehow sandbox some space in my app to load ruby code?
Xiti has joined #ruby
<mun>
then the question would be, what's a good way to make a sandbox within an app?
josephcs has quit [Quit: (null)]
Channel6 has joined #ruby
piotrj has joined #ruby
LouisRoR has quit [Ping timeout: 246 seconds]
balazs has quit [Ping timeout: 252 seconds]
himsin has quit [Quit: himsin]
julian-delphiki has quit [Read error: Connection reset by peer]
Ivision_ has quit [Read error: Connection reset by peer]
Ivision has joined #ruby
josephndenton has joined #ruby
devdazed has joined #ruby
Takle has joined #ruby
yfeldblum has joined #ruby
agarie has quit [Remote host closed the connection]
dimaursu16 has joined #ruby
harfangk has quit [Quit: This computer has gone to sleep]
<shevy>
so many questions
bronson has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<matti>
shevy: So little time.
<ponga>
hi shevy!
<shevy>
hey ponga
arup_r has quit []
<shevy>
you are still using ruby?
yfeldblum has quit [Ping timeout: 250 seconds]
<matti>
Ruby?!
<matti>
We all switched to Emerald.
<matti>
shevy: You missed the memo.
<ponga>
shevy: on C# at the moment
LouisRoR has joined #ruby
<ponga>
onto Unity game engine these days
dsahni has joined #ruby
werelivinginthef has joined #ruby
balazs has joined #ruby
iMe has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 246 seconds]
mrfoto has joined #ruby
* hanmac1
is writing C code because he C-an ;P
masterexploder has joined #ruby
<crome>
I'm into go these days
iMe has joined #ruby
krz has joined #ruby
<hanmac1>
the next language after go will be called "went" ;P
einarj has joined #ruby
JDiPierro has joined #ruby
athan has quit [Quit: No Ping reply in 180 seconds.]
<matti>
For me it would be anything I can put my hands on.
<matti>
Today, Python :)
druznek has quit [Quit: Leaving]
Channel6 has quit [Remote host closed the connection]
haylon has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacstewart has quit [Remote host closed the connection]
El3k0n has joined #ruby
athan has joined #ruby
krzkrz has joined #ruby
<ddv>
matti: no point in python when you know ruby
<shevy>
but it has better docs!
<hanmac1>
imo ruby is pythons evil twin sister ;P
zenith_ has quit [Ping timeout: 265 seconds]
<centrx>
Ruby docs are better
<centrx>
Python isn't even really object-oriented
<centrx>
But at least it's not...
narph has joined #ruby
<centrx>
PHP!
juanpablo_ has joined #ruby
<balazs>
Is there a safe way to use backticks where no shell interpolation happens ?
krz has quit [Ping timeout: 256 seconds]
<diegoviola>
what do you mean python isn't object-oriented/
<diegoviola>
?
maximski has joined #ruby
<shevy>
balazs you can redefine the method, just as any other method
rubytor has joined #ruby
mambo has joined #ruby
cphrmky has quit [Read error: Connection reset by peer]
karmatr0n has quit [Remote host closed the connection]
phutchins has joined #ruby
Blue_Ice_ has quit [Ping timeout: 276 seconds]
<matti>
ddv: I am using the snake for SaltStack
<matti>
ddv: Only.
Blue_Ice has joined #ruby
Blue_Ice has joined #ruby
<ddv>
matti: ah ok saltstack is nice
peasoup has joined #ruby
<matti>
Yeah, enjoying it so far.
chinmay_dd has joined #ruby
El3k0n has quit [Remote host closed the connection]
GPH|work has joined #ruby
<diegoviola>
centrx: why is that
<diegoviola>
centrx: and why do they say then that "everything is an object in python"
<diegoviola>
if that's not the case
psy_ has joined #ruby
agrinb has quit [Remote host closed the connection]
psy_ has quit [Max SendQ exceeded]
agrinb has joined #ruby
iMe has quit [Ping timeout: 252 seconds]
psy_ has joined #ruby
peasoup has quit [Ping timeout: 240 seconds]
mkaesz has quit [Remote host closed the connection]
<centrx>
diegoviola, That sounds like a very loose definition of "object"
<centrx>
diegoviola, C is not object-oriented, but you could call a C struct an "object"
iMe has joined #ruby
Number2 has quit [Quit: leaving]
<centrx>
diegoviola, "Everything in Python is an object, and almost everything has attributes and methods." - yet the standard definition of an object is it is has attributes and/or methods/behaviors
masterexploder has left #ruby ["Leaving"]
<centrx>
So this Dive into Python doc for example, is saying "Everything is an object" yet "Not everything has attributes and methods"
<centrx>
Typical Python propaganda
einarj has quit [Remote host closed the connection]
peasoup has joined #ruby
<ponga>
centrx: everything is/can be an object' sounds more like ruby to me
<centrx>
yeah Everything is an object is Ruby propaganda, but it's true!
agrinb_ has joined #ruby
<centrx>
Python: "In Python, the definition is looser; some objects have neither attributes nor methods, and not all objects are subclassable. But everything is an object in the sense that it can be assigned to a variable or passed as an argument to a function."
agrinb has quit [Ping timeout: 245 seconds]
<centrx>
So Python's Everything is an Object means "everything can be assigned to a variable or passed as an argument to a function
<ponga>
hi centrx do you have knowledge of C#
<workmad3>
centrx: apart from blocks... and local variables... and a few other bits :)
<workmad3>
centrx: so python took 'rvar == object'? :)
<ponga>
i tried to do something like 'array[3..6]' in C# but it looked like i can't do X..Y in C#
<ponga>
is it true?
<workmad3>
*rval
<centrx>
So Python value == object. Python: numbers in mathematics are objects because they can be assigned to a variable and passed as argument to functions
sjmikem has quit [Quit: Leaving.]
<centrx>
ponga, I haven't used C# in many years
<workmad3>
centrx: oh wow, C is an OO language, according to python!
<workmad3>
centrx: or at least according to whoever wrote that BS :)
athan has quit [Ping timeout: 246 seconds]
<centrx>
It's outrageous
<ponga>
can anyone answer my inquiry please
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
<guardian>
so far I've been coding ruby on mac, with homebrew's ruby. Now that I'm transitioning to Debian, should I install the bundler package with apt-get or should I do "sudo gem install bundler" ?
<workmad3>
ponga: any reason you're asking about C# syntax in #ruby?
<ddv>
guardian: install a version manager, like rbenv/rvm/chruby
<workmad3>
ponga: yeah... 3 ways I'd say were reasonable other than '..' to have syntax for range literals in a hypothetical language
Patrezze has quit [Quit: Saindo]
<centrx>
nuke_, that's the more explicit version, it's a method (function), first argument is a Symbol, second argument is a Hash
allenn has joined #ruby
<diegoviola>
centrx: they like to think ruby is dead because people switch to other languages and ruby doesn't perform as well as other langs
fabrice31 has quit [Ping timeout: 246 seconds]
<workmad3>
centrx: if it's 2.0, then 'path:' could be a real keyword argument, not an implicit hash ;)
<centrx>
oh boy
<workmad3>
but yeah... it's a method call
agrinb_ has quit [Remote host closed the connection]
<centrx>
diegoviola, Ruby is much faster now, performance is comparable to other dynamic languages e.g. Python
<ponga>
what's this again, ruby is not fast argument?
<ponga>
ruby is dang fast now
<shevy>
it'll take years until people realize this centrx
agrinb has joined #ruby
<ponga>
can't agree more shevy
<ponga>
ruby may not be 'fast' but niether is 'slow'
<diegoviola>
rubinius doesn't think that ruby is fast
<ponga>
well at least to me
<workmad3>
tbh, my answer to people who state that hasn't changed - "Ruby isn't fast" - "I don't give a fuck, it's nice to work with and I can produce results very quickly"
<diegoviola>
but rubinius is also not very fast
<Timgauthier>
workmad3 lol yup thats more important
agarie has joined #ruby
<Timgauthier>
node might be the shit, but its fucking javascript...
<ponga>
workmad3: sounds 'reasonable'
<ponga>
lol
LouisRoR has quit []
<ponga>
that my life's value is more important
<ponga>
wellbeing and all
<ineb>
i think its too vaque to say, that ruby 'is fast' now and wasnt fast back then.
<ineb>
i guess you mean the implementation of ruby
<ineb>
*default implementation
<workmad3>
ineb: ruby has implementations? I thought I still had to manually calculate the VM on paper!!!
LouisRoR has joined #ruby
<ponga>
MRI 2.2.0 was pretty fast to me?
<ponga>
isn't it everyone?
<ineb>
workmad3: you dont have to
<diegoviola>
rbx keeps saying that MRI has a GIL and that rbx doesn't have it
<diegoviola>
rbx == rubinius
<diegoviola>
that you can't do concurrency on MRI, etc
doodlehaus has joined #ruby
<centrx>
ponga, 1.8 was quite slow
<workmad3>
ineb: oh man... what do I do with my latest order of 5000 reams of A4...
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
rubytor has joined #ruby
<ddv>
people are acting like they are the next facebook or twitter and need the performance of C
<ineb>
workmad3: stack them to put your monitors on equal high
<ponga>
well im on C# at the moment
agrinb has quit [Ping timeout: 245 seconds]
<ponga>
and C# is pretty alrighty to me
karmatr0n has quit []
<ponga>
compared to Java or C++
rbennacer has joined #ruby
<ddv>
C# is good language
<ponga>
those horrible exprience...
<ddv>
+a
<ponga>
C# feels good to me too
<workmad3>
ddv: which is pretty amusing, seeing as FB is on a highly customised PHP implementation, and twitter is using a JVM stack :)
<gregf__>
ponga: c++ syntax is quite similar to C#. no?
<diegoviola>
C# is not an option if you use mac or linux, don't get me started on mono
OrbitalKitten has joined #ruby
<dorei>
didnt ms opensourced .net recently?
<ponga>
gregf__: but the books i read for C# and Java nearly killed my hair roots
<ponga>
i mean
<ponga>
C++ and java
<Timgauthier>
whats GIL, and MRI?
<Timgauthier>
python?
<workmad3>
ponga: did you make the mistake of reading 'Thinking in C++' and 'Thinking in Java'?
<diegoviola>
gil == global interpreter lock
<diegoviola>
mri == matz ruby interpreter
Yzguy has quit [Quit: I'm sleeping, go away.]
<Timgauthier>
ok
<ddv>
mri stands for magnetic resonance imaging
<Timgauthier>
thank you diegoviola
<Timgauthier>
ddv
dfinninger has joined #ruby
freerobby has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx>
Java causes brain damage
paulfm_ has joined #ruby
<Timgauthier>
haha
<Timgauthier>
yes
pu22l3r_ has joined #ruby
<ddv>
java has some great libs though, and the jvm is nice
freerobby has quit [Client Quit]
<Timgauthier>
YOU SPEAKETH OF THE EVILEST OF EVIL
hamakn has joined #ruby
ghostpl has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
freerobby has joined #ruby
ghostpl has joined #ruby
paulfm has quit [Ping timeout: 264 seconds]
_mynameis has quit [Ping timeout: 255 seconds]
pu22l3r has quit [Ping timeout: 250 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iMe has quit [Ping timeout: 250 seconds]
hanmac1 has quit [Quit: Leaving.]
olivier_bK has quit [Ping timeout: 240 seconds]
allcentury has quit [Ping timeout: 252 seconds]
<diegoviola>
jvm is nice? what?
axl_ has joined #ruby
Takle has quit [Remote host closed the connection]
iMe has joined #ruby
allcentury has joined #ruby
<ponga>
centrx: im not sure whether java causes brain damage but my pal who professes on java says it makes him love his hair :P
cpt_yossarian has joined #ruby
davidhq has quit [Ping timeout: 244 seconds]
<diegoviola>
how can you write java and still have hair?
<ponga>
i mean *lose
<ponga>
diegoviola: typo
<ponga>
lol
thiagovsk has joined #ruby
peasoup has quit [Ping timeout: 255 seconds]
seal has joined #ruby
<diegoviola>
that makes more sense
Xeago has joined #ruby
systemd0wn has quit [Remote host closed the connection]
<ponga>
ironically, yes
Yzguy has joined #ruby
* avril14th
looks at his hair...looks at his regexs parsing regexs that fail because "\w" is not the same as '\w'...
Xeago has quit [Remote host closed the connection]
<Timgauthier>
haha
<Timgauthier>
wow
cocotton_ has joined #ruby
lioninawhat has quit [Read error: Connection reset by peer]
li0ninawhat has joined #ruby
<ponga>
altho i comprehend the joke only partially i still feel empathy
<workmad3>
avril14th: just write a regexp to parse the difference
agarie has quit [Remote host closed the connection]
C1ph3r__ has quit [Client Quit]
joonty has joined #ruby
apurcell has joined #ruby
paradoja has joined #ruby
C1ph3r_ has joined #ruby
jnylen has quit [Quit: Studitiem]
apeiros_ has quit [Ping timeout: 265 seconds]
iMe has joined #ruby
jamiejackson has joined #ruby
<jamiejackson>
hi folks. how do i find out when a method was introduced to a core class? i got a Ruby app dumped on me, and it's complaining about File.path not existing (dumping the methods confirms it).
peasoup has joined #ruby
pdoherty has joined #ruby
apurcell has quit [Ping timeout: 252 seconds]
rubytor has quit [Ping timeout: 252 seconds]
Yzguy has quit [Quit: I'm sleeping, go away.]
livathinos has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
bronson has joined #ruby
kalusn has joined #ruby
C1ph3r_ is now known as C1ph3r
<diegoviola>
why would the rubinius people keep saying that ruby is dead, etc?
sambao21 has joined #ruby
MaciejCzyzewski has joined #ruby
<brixen>
diegoviola: no one said Ruby is dead
<brixen>
why do people keep saying that?
<ericwood>
diegoviola: if anyone says "XYZ is dead" they're usually wrong. Don't listen to them.
<diegoviola>
no idea
cocotton_ has quit [Remote host closed the connection]
<brixen>
people are leaving Ruby and many companies are migrating from Ruby to other languages or platforms
<brixen>
link to the companies that are writing about how using Ruby is so much better than X
cocotton has joined #ruby
<diegoviola>
JS seems to be the most hyped programming language at the moment, or is it Rust now?
mbeasley has quit [Quit: WeeChat 0.4.2]
_mynameis has joined #ruby
mbeasley has joined #ruby
<workmad3>
diegoviola: it's go!
<brixen>
Scala!
<brixen>
Java 8!
<workmad3>
diegoviola: or maybe swift
<brixen>
Clojure!
<ponga>
but scala is good
<diegoviola>
rofl
<brixen>
yes, Swift!
<ponga>
and swift has too small community
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ponga>
hey wait, people don't have much expectation on swift anyway don't they
<diegoviola>
brixen: I really like some of the ideas behind Rubinius, I'm all for competition and actually improving performance
<ponga>
its just apple scripting lang
<workmad3>
ponga: we're talking abut most hyped... small community doesn't stop hype, especially when that hype can be generated by apple on a massive scale :P
<ponga>
hm
<ponga>
then i'd say JS
<ericwood>
just ignore hype and do whatever you want
<ericwood>
seriously, just stop listening to people about this stuff
<ericwood>
the hypetrain is usually wrong, and you'll eventually burn out keeping track of trends
<ponga>
well im using whatever lang i want to use
Kricir has joined #ruby
<ponga>
it doesn't seem to be a big deal to me anyway
Kricir has quit [Remote host closed the connection]
<diegoviola>
brixen: but I'm not sure about Rubinius X and changing the core language, will RBX always stay comaptible with the Ruby language itself?
<ponga>
its less of a deal than considering what car brand to buy
<diegoviola>
or with MRI version of the language
<ponga>
:P
bronson has quit [Ping timeout: 245 seconds]
<brixen>
diegoviola: there is no specification of Ruby, so anything that Rubinius does is basically Ruby
<brixen>
if your Ruby code runs on Rubinius, it must be Ruby
<centrx>
What if it runs on Rubinius but on MRI
<centrx>
Or vice-versa
<centrx>
Which is it
<brixen>
who knows
<brixen>
could be a bug in MRI
<ponga>
but that sounds like an ideology
<Timgauthier>
hype would be a good language name ;)
<Timgauthier>
oh i'm just writing some hype
<brixen>
there's no specification, so how would you know?
<ponga>
MRI is a standard de facto innit?
<Timgauthier>
I built this app with hype
<ericwood>
better name than facebook's "hack"
<centrx>
You're saying Rubinius is the spec-by-implementation, but MRI is not
<brixen>
centrx: I don't know what you mean
<diegoviola>
isn't the standard MRI? or wasn't that what MRI developers said basically?
<brixen>
could someone point me to a specification for Ruby?
lyuben_ has quit [Quit: This computer has gone to sleep]
peasoup has quit [Ping timeout: 240 seconds]
<brixen>
something like ecmascript?
<ponga>
but wait
<centrx>
"if your Ruby code runs on Rubinius, it must be Ruby" -> "if your Ruby code runs on MRI, it must be Ruby"
<ericwood>
Matz is the standard
<diegoviola>
isn't MRI the "specification"?
<ponga>
i think any ruby user would look at swift and love it too
<brixen>
diegoviola: has MRI ever had a bug in it's lifetime?
agarie has joined #ruby
<ponga>
i liked swift's style and syntax
<brixen>
s/it's/its/
<ponga>
very much , actually
<centrx>
Has there never been a typo in a spec?
<brixen>
basically, what MRI does one day may change the next day
OrbitalKitten has joined #ruby
<ericwood>
tl;dr no formal ruby spec, everyone jsut tries to make it like MRI
nfk has joined #ruby
<brixen>
tl;dr, if you Ruby code runs, who cares?
<brixen>
s/you/your/
<ericwood>
those are my thoughts
<brixen>
loltypos
<diegoviola>
lols
_mynameis has quit [Ping timeout: 240 seconds]
<diegoviola>
like perl does have a specification...
kobain has joined #ruby
<Timgauthier>
i think it is most important that whatver executes the ruby does so with the same code in the same way, so that your code can remain completely agnostic
kobain has quit [Max SendQ exceeded]
<workmad3>
brixen: MRI can be taken as the 'reference implementation' that defines the ruby language, seeing as it doesn't have a formal spec outside of what the language creator puts out there in the form of MRI
iwishiwerearobot has quit [Quit: Be back later ...]
<centrx>
Specs aren't provable either, you can't compile your code with a spec
jobewan has quit [Quit: Leaving]
<workmad3>
brixen: and if you have a 'ruby interpreter' that does things differently to MRI (in ways that aren't acknowledged by the ruby core team as bugs) then arguably, you don't have a ruby interpreter ;)
jobewan has joined #ruby
<workmad3>
what 'does things differently' means is open to a fair bit of community interpretation though
danjordan has quit [Remote host closed the connection]
rubytor has joined #ruby
OrbitalKitten has quit [Read error: Connection reset by peer]
joonty has quit [Quit: joonty]
MasterPiece has joined #ruby
<ponga>
speaking of swift, i want swift to completely replace obj-c
<brixen>
workmad3: what you have done is highlighted that this question of "what is Ruby" is mostly meaningless
joonty has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
<brixen>
if your code runs, that's all you care about
<workmad3>
brixen: people who write gems that they want to make available to multiple different interpreters care about it
yfeldblum has joined #ruby
<brixen>
that doesn't change anything that I've said
sudog has quit [Ping timeout: 245 seconds]
<brixen>
unless, by gems, you mean something other than running code
sudog has joined #ruby
<brixen>
also, there are gems, like the syck gem, that expect 'struct RObject' to exist
<brixen>
that basically will no run on anything besides MRI, ever
<brixen>
so, is that Ruby?
<workmad3>
yes
peasoup has joined #ruby
<brixen>
work_op: please do write an implementation following MRI's ISO spec and run non-trivial Ruby code with it
<brixen>
I'll give you $100 if you do that
<diegoviola>
lols
<diegoviola>
is it any better for the pypy/python folks?
<brixen>
workmad3: if you expect struct RObject, you should stick to MRI, and the rest of this is a moot argument
<diegoviola>
better/easier
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<diegoviola>
I doubt it
<work_op>
lol i can see that you're only here to flame people, i'll stick to making $ instead
aganov has quit [Quit: Leaving]
<diegoviola>
brixen: so would you argue that there really is no ruby since there's no formal spec?
<centrx>
Ruby does not exist!
<centrx>
I like this one
grzywacz has joined #ruby
grzywacz has joined #ruby
<diegoviola>
so all there is is code that might or might not run in mri/rbx?
seal has quit [Quit: Ex-Chat]
<workmad3>
brixen: MRI == reference, if it works with that then it can be counted as 'works with ruby'... if it was something that only worked on jruby or rbx then it doesn't count as 'works with ruby' because jruby and rbx aren't the reference implementation from the language creator
<centrx>
Ruby + RBX extensions
chrishough has joined #ruby
<workmad3>
brixen: and if something doesn't work with a different implementation, then that implementation can be counted as not adhering to the ruby reference implementation in some way, and therefore deviates from ruby in that respect
<brixen>
workmad3: if that's the definition that works for you, cool
<brixen>
I have zero interest in convincing you otherwise
<ponga>
omg why is this argument continuing
<ponga>
im sure our life is worth more than this
<brixen>
my position is that what you're saying is a meaningless definition because it's not actionable
<work_op>
workmad3, i could agree with that
<ponga>
go and have bacon
<workmad3>
brixen: how is it not actionable?
yfeldblum has quit [Ping timeout: 246 seconds]
_mynameis has joined #ruby
<work_op>
ruby is ruby, altruby is maybe ruby
<shevy>
ruby is there: bugs.ruby-lang.org/projects/ruby-trunk and there: ftp://ftp.ruby-lang.org/pub/ruby/
<momomomomo>
most ruby’s are attempts at implementing ruby
<momomomomo>
er rubies
iMe has quit [Ping timeout: 252 seconds]
amacou has quit [Remote host closed the connection]
<centrx>
Maintaining a spec creates a lot of over-head, and it's really only useful for creating compilers for the language
krzkrz has quit [Quit: WeeChat 1.0.1]
enebo has quit [Quit: enebo]
<avril14th>
in regex, is [abc] the same as [[a][b][c]] ?
<centrx>
And what language are you creating the compiler for? Something like MRI
lmickh has joined #ruby
<centrx>
You didn't make a whole new language, you made a compiler for Ruby
<shevy>
avril14th hmm
<shevy>
avril14th my natural feeling would say yes! but I don't know... let's test
peasoup has quit [Ping timeout: 245 seconds]
mrfoto has quit []
<shevy>
avril14th ok rubular.com seems to think they are the same, so I guess they are indeed. so there would be no reason to use the longer [][][] variant
<avril14th>
shevy: true, but my regexs are generated, so extra [] could be inserted and I want to know if that's a problem :)
<j416>
avril14th: on the rack level, there's nothing that can be done to limit it in scope?
<j416>
avril14th: nice, checking, thanks
<j416>
centrx: just reacted on your comment, :P
<avril14th>
j416: I think you have access to the called url
tunaCanBruh has quit [Ping timeout: 265 seconds]
<centrx>
j416, oh I thought you were pissed because I "interrupted" you
<avril14th>
so you can filter the thing to trigger only on certain urls
<j416>
centrx: no no, not at all :)
<j416>
hm
davidhq_ has quit [Max SendQ exceeded]
ellisTAA has quit [Quit: ellisTAA]
<j416>
avril14th: rack-defense looks nice, though
<j416>
avril14th: have you used it?
terlar has quit [Quit: WeeChat 1.1.1]
<avril14th>
j416: I know the author
<j416>
cool
<j416>
I will check it out
terlar has joined #ruby
<avril14th>
j416: I wanted to hire him as a CTO but he couldn't wait
peasoup has quit [Ping timeout: 250 seconds]
li0ninawhat has quit [Read error: Connection reset by peer]
<j416>
heh
<j416>
nice
<avril14th>
very solid guy
davidhq has quit [Ping timeout: 245 seconds]
<j416>
I'll look into this, awesome!
lioninawhat has joined #ruby
<j416>
I gtg, some company event thing spoiling my work time aaaggh
<j416>
thanks.
<avril14th>
j416: I see in the example that you can filter dependong on the url
mudtose has joined #ruby
<avril14th>
so there you go
<j416>
avril14th: yeah found it :)
<j416>
awesome, thanks!
karmatr0n has joined #ruby
<j416>
avril14th++
<avril14th>
no pb
<j416>
g diff
ellisTAA has joined #ruby
davidhq has joined #ruby
<avril14th>
man, promoting gems IS a job
<avril14th>
:)
<j416>
bah wrong window
<j416>
:D
<j416>
alright, gtg laters o/
li0ninawhat has joined #ruby
qba73 has quit [Remote host closed the connection]
piotrj has quit [Ping timeout: 252 seconds]
snath has joined #ruby
rippa has joined #ruby
piotrj has joined #ruby
lxsameer has joined #ruby
MaciejCzyzewski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
qba73 has joined #ruby
lioninawhat has quit [Ping timeout: 265 seconds]
neoice has left #ruby [#ruby]
mudtose has quit [Ping timeout: 245 seconds]
n008f4g_ has quit [Ping timeout: 250 seconds]
banister has joined #ruby
nb_bez___ has joined #ruby
terlar has quit [Quit: WeeChat 1.1.1]
workmad3 has quit [Ping timeout: 256 seconds]
DouweM has joined #ruby
enebo has joined #ruby
blandflakes has joined #ruby
pu22l3r_ has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
mudtose has joined #ruby
timonv has quit [Ping timeout: 250 seconds]
peasoup has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
joonty has joined #ruby
Doow has quit [Quit: Leaving]
sambao21 has joined #ruby
terlar has joined #ruby
ptrrr has joined #ruby
MasterPiece has quit [Quit: Bye!]
baroquebobcat has joined #ruby
puppetmonkey_ has quit [Ping timeout: 264 seconds]
mambo has joined #ruby
mambo has quit [Remote host closed the connection]
mambo has joined #ruby
iMe has joined #ruby
mjuszczak has joined #ruby
allenn has quit [Remote host closed the connection]
sent1nel has quit [Remote host closed the connection]
tjohnson has joined #ruby
ellisTAA has quit [Quit: ellisTAA]
mambo has quit [Remote host closed the connection]
sent1nel has joined #ruby
Timgauthier is now known as timgauthier_away
reinaldob has quit [Remote host closed the connection]
RasKhadafi has quit [Ping timeout: 255 seconds]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mambo has joined #ruby
pu22l3r has joined #ruby
piotrj_ has joined #ruby
strixd has quit [Quit: 500]
danzilio has quit [Quit: Baiii!]
sent1nel has quit [Remote host closed the connection]
_mynameis has quit [Quit: Leaving]
mitchellhenke has joined #ruby
_mynameis has joined #ruby
maximski has quit []
riotjones has quit [Remote host closed the connection]
piotrj has quit [Read error: Connection reset by peer]
Timgauthier has joined #ruby
MasterPiece has joined #ruby
cphrmky has joined #ruby
sent1nel has joined #ruby
mambo has quit [Ping timeout: 264 seconds]
Hijiri has quit [Quit: WeeChat 1.0.1]
Rarikon has quit [Read error: Connection reset by peer]
piotrj has joined #ruby
deric_skibotn has joined #ruby
ghostpl has quit [Remote host closed the connection]
C1ph3r has quit [Remote host closed the connection]
mudtose has quit [Ping timeout: 264 seconds]
sent1nel has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
veinofstars has joined #ruby
dsahni has left #ruby ["Leaving"]
qba73 has quit [Remote host closed the connection]
MasterPiece has quit [Max SendQ exceeded]
kalusn has quit [Remote host closed the connection]
GaryOak_ has joined #ruby
MasterPiece has joined #ruby
byprdct has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
piotrj_ has quit [Ping timeout: 250 seconds]
ferr has quit [Remote host closed the connection]
zorak8 has joined #ruby
enebo has quit [Quit: enebo]
nux443 has joined #ruby
hamakn has joined #ruby
spider-mario has joined #ruby
zacstewart has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
bronson has joined #ruby
Lemur has joined #ruby
timonv has joined #ruby
mudtose has joined #ruby
qba73 has joined #ruby
veinofstars has quit [Client Quit]
zacstewart has joined #ruby
havenwood has joined #ruby
kalusn has joined #ruby
reinaldob has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
hamakn has quit [Ping timeout: 246 seconds]
puppetmonkey has joined #ruby
lkba has joined #ruby
rbennacer has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
gfawcettpq1 has joined #ruby
Jake232 has joined #ruby
Lemur has quit [Remote host closed the connection]
piotrj has quit []
rushed has quit [Quit: rushed]
iMe has quit [Ping timeout: 240 seconds]
Lemur has joined #ruby
gfawcettpq1 has quit [Client Quit]
bronson has joined #ruby
n1lo has quit [Quit: Leaving]
Jackneill has joined #ruby
reinaldob has quit [Remote host closed the connection]
hmsimha has quit [Ping timeout: 252 seconds]
gfawcettpq1 has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
rbennacer has joined #ruby
iMe has joined #ruby
li0ninawhat has quit [Ping timeout: 265 seconds]
mudtose has quit [Ping timeout: 250 seconds]
deol has joined #ruby
mudtose has joined #ruby
lioninawhat has joined #ruby
msgodf has quit [Ping timeout: 245 seconds]
Lemur has quit [Ping timeout: 245 seconds]
_maes_ has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
bricker has joined #ruby
Xoro has joined #ruby
RasKhadafi has joined #ruby
terlar has quit [Quit: WeeChat 1.1.1]
mkaesz has joined #ruby
tunaCanBruh has joined #ruby
zorak8 has quit [Ping timeout: 256 seconds]
Xoro has quit [Client Quit]
DouweM has quit [Quit: Leaving...]
Xoro has joined #ruby
ki0 has quit [Ping timeout: 245 seconds]
agarie has quit [Remote host closed the connection]
Xoro has quit [Client Quit]
jimms has quit [Remote host closed the connection]
alex88 has quit []
Xoro has joined #ruby
paradoja has quit [Ping timeout: 245 seconds]
<jamiejackson>
i'm a ruby noob, could you tell me how i'd make this function available within an existing module? http://stackoverflow.com/a/13579195
Takle has quit [Remote host closed the connection]
qba73 has quit []
<shevy>
jamiejackson do you know how to define a method in a module
<jamiejackson>
shevy, i think so
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
good. then you add that method to your module, and if you include NameOfModule in your class, that method is available in your class as well
mkaesz has quit [Ping timeout: 245 seconds]
zacstewart has quit [Remote host closed the connection]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has quit [Ping timeout: 245 seconds]
mudtose has quit [Ping timeout: 246 seconds]
gfawcettpq1 has quit [Remote host closed the connection]
agarie has joined #ruby
<jamiejackson>
brb. meeting
hmsimha has joined #ruby
zacstewart has joined #ruby
veinofstars has joined #ruby
iliketurtles has joined #ruby
shakar has joined #ruby
ismaelga has quit [Remote host closed the connection]
rushed has joined #ruby
kalusn has quit [Remote host closed the connection]
wottam has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
et09 has joined #ruby
<et09>
i have 0 and 20 as min and max
<et09>
how do i make -3 0, and 50 20
Xoro has quit [Quit: Leaving]
wottam has quit [Client Quit]
<apeiros_>
if val < min; min; elsif val > max; max; else val; end
<et09>
bleh ok
<et09>
gues that's fine
<shakar>
Hello! I'm having two confusions over regex in ruby (maybe all regex, but definitely ruby regex). First confusion: when trying to catch the beginning of email history, I wanted to use the expression "On .* at \d\d?:\d\d (AM|PM), .* <.*@.*> wrote:", but that only seems to match when I remove the closing angled bracket. Why's that? Second confusion: Once I have a working regex for that, how can I turn it into a match-everything-before-that regex? Thanks for any
<shakar>
help!
Kruppe has quit [Ping timeout: 255 seconds]
<et09>
...wrap it in parentheses?
<et09>
everything before it
Xoro has joined #ruby
Xoro has quit [Max SendQ exceeded]
<havenwood>
shakar: Show an example test string and the regular expression you have so far: http://rubular.com/
Kruppe has joined #ruby
<shakar>
et09: I have that string in parentheses along with a bunch of OR ("|") patterns
Xoro has joined #ruby
cphrmky has quit [Ping timeout: 252 seconds]
DouweM has joined #ruby
Takle has joined #ruby
jefus_ has joined #ruby
mleung has joined #ruby
<shakar>
havenwood: I've been using rubular to test. line one is the regex that only works when I remove the closing bracket: http://pastebin.com/vWwABus7
iMe has quit [Ping timeout: 264 seconds]
tunaCanBruh has quit [Ping timeout: 256 seconds]
tunaCanBruh has joined #ruby
<apeiros_>
shakar: you can share your rubular example directly
<kyle__>
I was playing with some unicode, and tried to print out the poop char by typing puts "\u1f4a9". IT appears to be truncating after the 4th hex char though, giving me Ὂ9
iwishiwerearobot has quit [Ping timeout: 244 seconds]
<kyle__>
Is there an alternate way of encoding unicode by hex?
iMe has joined #ruby
Zai00 has quit [Quit: Zai00]
zacstewart has quit [Remote host closed the connection]
zacstewart has joined #ruby
mleung has quit [Ping timeout: 245 seconds]
jottr_ has joined #ruby
yfeldblum has joined #ruby
puppetmonkey has quit [Quit: puppetmonkey]
livingstn has joined #ruby
jgrevich has joined #ruby
<apeiros_>
kyle__: \u with hex is defined as \uHHHH. you need \u{HHHHH}
<kyle__>
apeiros_: Ahhh! Thank you.
larissa has joined #ruby
agrinb has joined #ruby
mleung has joined #ruby
agarie has quit [Remote host closed the connection]
razieliyo has joined #ruby
<kyle__>
Works perfectly!
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
yekta has joined #ruby
dmolina has quit [Quit: Leaving.]
ismaelga has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
diegoviola has quit [Ping timeout: 256 seconds]
tmtwd has joined #ruby
mkaesz has quit [Ping timeout: 264 seconds]
ghostmoth has joined #ruby
ki0 has joined #ruby
<ellisTAA>
if one is a web developer, specifically, RoR, is one considered a programmer?
<ellisTAA>
can building a website be just as difficult as building software?
ki0 has quit [Read error: No route to host]
einarj has quit [Remote host closed the connection]
PanzerModern has quit [Ping timeout: 245 seconds]
JDiPierro has quit [Remote host closed the connection]
PanzerModern has joined #ruby
<shevy>
jamiejackson this is a class method
<shevy>
jamiejackson you can only use it through: CwoImport.pull()
<shevy>
puts 1.alph
<shevy>
here you call a method called .alph() on 1
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lyuben_ has joined #ruby
iliketurtles has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Quit: Connection closed for inactivity]
Asher has joined #ruby
amacou has quit [Ping timeout: 250 seconds]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
BLuEGoD has quit [Remote host closed the connection]
yvemath has quit [Remote host closed the connection]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
ptrrr has quit [Quit: ptrrr]
fabrice31 has joined #ruby
lidaaa has joined #ruby
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
crueber has quit [Read error: Connection reset by peer]
crueber has joined #ruby
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
chrishough has joined #ruby
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
joshbamboo1 has quit [Read error: Connection reset by peer]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
n008f4g_ has joined #ruby
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
momomomomo has quit [Quit: momomomomo]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
zachrab has quit [Remote host closed the connection]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
BLuEGoD has joined #ruby
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
fabrice31 has quit [Ping timeout: 252 seconds]
dfinninger has quit [Remote host closed the connection]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
WildBamboo-Josh has joined #ruby
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
LouisRoR has joined #ruby
iMe has quit [Ping timeout: 250 seconds]
LouisRoR has quit [Excess Flood]
Takle has joined #ruby
siso has joined #ruby
adamjleonard has quit [Quit: Leaving...]
jottr_ has quit [Ping timeout: 264 seconds]
LouisRoR has joined #ruby
LouisRoR has quit [Excess Flood]
deol has joined #ruby
LouisRoR has joined #ruby
kirun has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
pdoherty has joined #ruby
iMe has joined #ruby
iliketurtles has joined #ruby
garethrees has joined #ruby
mary5030 has joined #ruby
peasoup has quit [Quit: WeeChat 1.0.1]
Jake232 has joined #ruby
mjuszczak has joined #ruby
momomomomo has joined #ruby
cocotton has quit [Quit: Leaving...]
adamjleonard has joined #ruby
shadoi has joined #ruby
frem_ has joined #ruby
siso has quit [Quit: siso]
ghr has quit [Ping timeout: 265 seconds]
yvemath has joined #ruby
sent1nel has quit [Remote host closed the connection]
baweaver has joined #ruby
shadoi has quit [Client Quit]
kaspertidemann has joined #ruby
marr has joined #ruby
mjuszczak has quit [Client Quit]
sigurding has quit [Quit: sigurding]
Choclo has joined #ruby
iwishiwerearobot has joined #ruby
rodfersou has quit [Quit: leaving]
mjuszczak has joined #ruby
diegoviola has quit [Quit: WeeChat 1.1.1]
sambao21 has quit [Quit: Computer has gone to sleep.]
shadoi has joined #ruby
lioninawhat has joined #ruby
blueOxigen has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
jgt has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Quit: zzzzz…..]
JBreit has left #ruby ["Leaving"]
zacstewart has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
pkrzywicki__ has joined #ruby
mambo has joined #ruby
pkrzywicki_ has quit [Ping timeout: 250 seconds]
pu22l3r has quit [Read error: Connection reset by peer]
iwishiwerearobot has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
ghr has joined #ruby
pdoherty_ has joined #ruby
garethrees has quit [Read error: Connection reset by peer]
zyxelthrone has quit [Quit: WeeChat 1.1.1]
Soda has joined #ruby
mambo has quit [Ping timeout: 246 seconds]
totimkopf has quit [Ping timeout: 255 seconds]
zachrab has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
iMe has quit [Ping timeout: 252 seconds]
dfinninger has joined #ruby
lessless has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lkba_ has joined #ruby
himsin has quit [Quit: himsin]
sambao21 has joined #ruby
_mynameis has quit [Quit: Leaving]
chattsm has joined #ruby
zacstewart has joined #ruby
ellisTAA has left #ruby [#ruby]
avahey has joined #ruby
rushed has quit [Quit: rushed]
lkba has quit [Ping timeout: 252 seconds]
iMe has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pdoherty has quit [Quit: Leaving]
pdoherty_ has quit [Quit: Leaving]
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimaursu16 has joined #ruby
veinofstars is now known as veinoft0fu
patrick99e99 has joined #ruby
rushed has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
li0ninawhat has joined #ruby
ldnunes has quit [Quit: Leaving]
shum has joined #ruby
lioninawhat has quit [Read error: Connection reset by peer]
davedev24_ has quit [Ping timeout: 246 seconds]
zz_twistedpixels is now known as twistedpixels
<atmosx>
ηελλο
veinoft0fu has left #ruby [#ruby]
systemd0wn has joined #ruby
davedev24_ has joined #ruby
last_staff has joined #ruby
DouweM has joined #ruby
revoohc has joined #ruby
chattsm has quit [Quit: chattsm]
Choclo is now known as Choclo[Away]
kt2 has quit [Quit: ...]
oleo has joined #ruby
bMalum has quit [Quit: bMalum]
digital-ghost has joined #ruby
DouweM has quit [Read error: Connection reset by peer]
<shevy>
hey atmosx
<shevy>
still in greece?
<atmosx>
hey shevy, yes
<shevy>
:)
<atmosx>
How's Vienna?
<shevy>
quite cold
aclearman037 has joined #ruby
<atmosx>
yes, here it's cold too
<shevy>
right now it is 2.9°C in central vienna; usually -3 compared to central, in the outer areas, so about 0°C; 2 days ago, it was -3.0°C in central vienna + snow
<atmosx>
I can't go snowboarding because of an intervention I had... I need to rest.
<shevy>
the snow melted to a large degree today though
bronson has quit [Remote host closed the connection]
bMalum has quit [Client Quit]
bronson has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
ghr has quit []
wallerdev has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Guest49940 has quit [Ping timeout: 246 seconds]
fryguy9 has quit [Quit: Leaving.]
mary5030 has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
Rollabunna has quit [Remote host closed the connection]
x77686d has joined #ruby
sevvie has joined #ruby
dopie has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Jackneill has quit [Ping timeout: 252 seconds]
shum has quit [Client Quit]
sevvie has quit [Read error: Connection reset by peer]
shum has joined #ruby
ian_mac has joined #ruby
shum has quit [Client Quit]
iMe has quit [Ping timeout: 245 seconds]
shum has joined #ruby
mjuszczak has quit []
shum has quit [Client Quit]
adriancb_ is now known as adriancb
zachrab has joined #ruby
shum has joined #ruby
Kruppe has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
CpuID2 has quit [Quit: This computer has gone to sleep]
iMe has joined #ruby
zachrab has quit [Remote host closed the connection]
mambo has joined #ruby
zachrab has joined #ruby
shosti has joined #ruby
baweaver has joined #ruby
Kruppe has joined #ruby
wldcordeiro_ has quit [Quit: Leaving]
<marx>
Let's say I have multiple methods wrapped in a .each loop, does anyone know how I can make the first method break out of the loop early (if a condition is met)? I'm getting 'invalid break' when I try to issue break from inside the method
li0ninawhat has quit [Ping timeout: 255 seconds]
lioninawhat has joined #ruby
mambo has quit [Ping timeout: 240 seconds]
railer has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
sent1nel has joined #ruby
davejacobs has joined #ruby
<shadoi>
you can only break out of a loop in the loop itself.
baroquebobcat has joined #ruby
<shadoi>
inside another method you're not local
ghr has joined #ruby
afex has joined #ruby
<marx>
I suspected as much
<shadoi>
so break on the return of the method
<shadoi>
if you're method is doing too much to do that it may be time to refactor the method :)
thiagovsk has quit [Quit: Connection closed for inactivity]
jxpx777 has joined #ruby
<yxhuvud>
well, throw and catch would work I guess.
kyle__ has quit [Quit: leaving]
<shadoi>
can of worms ;)
dc__ has quit [Remote host closed the connection]
<shadoi>
In my experience throw/catch are the BEST things to use if you're trying to make a huge mess.
<yxhuvud>
tbh, I've never seen it used.
Grumelo has quit [Remote host closed the connection]
rushed has joined #ruby
kaspertidemann has quit []
<shadoi>
The only time I'd use it is for nested loops in the same location
ptrrr has joined #ruby
<ian_mac>
nah, throw/catch doesn't make a huge mess. It just conceals messes so you overlook the place that is actually causing the problem. Like you don't notice that your engine is slowly leaking oil because you're quickly cleaning it up and wiping away the evidence. So you never think to check the oil level.
<shadoi>
which I rarely do
EasyCo has joined #ruby
<shadoi>
ian_mac: well, of course, throw/catch is just an innocent part of the language, but using it blindly leads to big messes.
<guardian>
I mean, I wish having gem 'execjs' did that automagically
<shadoi>
but I don't know what priority it gave to node vs rubyracer
<shadoi>
guardian: check out middleman, it's what I was using
rushed has quit [Quit: rushed]
askatasuna has left #ruby ["WeeChat 1.1.1"]
<guardian>
will do
<shadoi>
oh I guess they dropped it and just use rubyracer or rubyrhino
<ian_mac>
btw does it make sense for `grep '^[ \t]*nameserver' /etc/resolv.conf | awk '{print $2}'`.each do |line| to work on 1.8.7 but not on 1.9.3?
<shevy>
do you guys have this problem - a long text, and you want to re-fit the whole text to, let's say, 30 characters per line. but only add newlines after a word or so
<ian_mac>
I should probably write a test or something so I can verify that both the new and old do what they are supposed to (if only I new exactly what they were supposed to do)
<ian_mac>
but thanks shadoi
afex has quit [Ping timeout: 244 seconds]
<shadoi>
1.8.7 took *args, but 1.9.1+ tanks a single arg I guess
bronson has quit [Remote host closed the connection]
<shevy>
I found another regex too
iMe has quit [Ping timeout: 240 seconds]
<shevy>
/(\s+|$)/
<shevy>
what does the | mean? it makes it optional?
<shadoi>
or
<shadoi>
so… whitespace OR end of line
<shevy>
ah ok
<shevy>
thanks
<shadoi>
rubular.com is awesome for that stuff
cajone has quit [Remote host closed the connection]
dopie has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
TheNet has joined #ruby
iMe has joined #ruby
<ian_mac>
I see. thanks shadoi for your help, and sorry for probably seemingly silly questions - I'm very unfamiliar with Ruby
<shadoi>
there are no silly questions
bogdanteleaga has joined #ruby
Soliah has quit [Quit: Soliah]
cajone has joined #ruby
<shevy>
:)
deric_skibotn has quit [Ping timeout: 244 seconds]
<shevy>
I got a silly question
digital-ghost has quit []
<shevy>
ian_mac are you on a mac?
pu22l3r_ has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
davedev24_ has joined #ruby
<ian_mac>
I am, but my nick was ian_mac long before I was.
<ian_mac>
if that's what you're getting at.
greenbagels has joined #ruby
SOLDIERz has quit [Quit: Be back later ...]
chrishough has joined #ruby
geekbri has quit []
<shevy>
hehe
last_staff has quit [Remote host closed the connection]
Troy^ has joined #ruby
Choclo is now known as Choclo[Away]
fenak has quit [Quit: leaving]
mago0 has quit [Quit: WeeChat 1.0.1]
Zai00 has joined #ruby
w1zeman1_ has joined #ruby
DEA7TH has quit [Ping timeout: 245 seconds]
EvanFreeman has quit [Remote host closed the connection]
speaking1ode has joined #ruby
TheNet has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<ian_mac>
well, TBH, weaksauce, I'm not sure how some of this code really worked properly, except that we only came across edge cases
<ian_mac>
[<% @zeromq_address.join('", "').each do |val| %>"<%= val %>"<% end -%>]
<ian_mac>
that, for example, I changed to ["<%= @zeromq_address.join('", "') %>"]
<ian_mac>
because I think that was closer to the actual intent
JDiPierro has quit [Remote host closed the connection]
cjim_ has joined #ruby
cjim has quit [Read error: Connection reset by peer]
<TheNet>
anyone have any experience with vedeu?
andikr has quit [Remote host closed the connection]
aclearman037 has quit [Quit: I'm out!]
pika_pika has quit [Ping timeout: 245 seconds]
<weaksauce>
ian_mac I can't imagine that each code ever working
<weaksauce>
unless join returns an array in some awful overloaded world
<weaksauce>
it's very nature join returns the elements in an array as a string joined together by the default value or what you specify
zenith_ has quit [Ping timeout: 246 seconds]
<ian_mac>
well, it did, because zeromq_address would typically be an array of one string. So the join would convert the array into the single string, and each used to iterate through the one value and take the whole thing once because there were no line breaks. Thus you end up with, for example, ["tcp://*:5555"]
lanemeyer has joined #ruby
Choclo is now known as Choclo[Away]
<ian_mac>
so the each was String.each which was essentially becoming a noop, so I guess it worked.
<weaksauce>
>> [1,2].join(", "). each do |x| puts x end