kaiZen has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
jottr has quit [Ping timeout: 256 seconds]
Guest82344 has joined #ruby
Guest82344 has quit [Client Quit]
oleo has quit [Quit: Verlassend]
skj3gg has joined #ruby
gsvolt has joined #ruby
Sawbones has joined #ruby
w0rldmaker has quit [Ping timeout: 245 seconds]
skj3gg has quit [Client Quit]
zacstewart has joined #ruby
oleo has joined #ruby
duncannz has quit [Ping timeout: 245 seconds]
davejacobs has joined #ruby
Limix has joined #ruby
justin_pdx has joined #ruby
ghr has joined #ruby
<shevy>
dumdedum
aamador has joined #ruby
Dolphi has quit [Quit: Leaving]
sevvie has joined #ruby
davejacobs has quit [Ping timeout: 252 seconds]
byprdct has quit [Ping timeout: 256 seconds]
jack_rabbit has quit [Ping timeout: 252 seconds]
lys has joined #ruby
mambo_ has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 255 seconds]
Jesterman81 has joined #ruby
Limix has quit [Quit: Limix]
tunaCanBruh has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodlehaus has joined #ruby
Synthbread has joined #ruby
charliesome has quit [Quit: zzz]
Dopagod has quit [Quit: WeeChat 1.0]
tunaCanBruh has quit [Ping timeout: 240 seconds]
doodlehaus has quit [Ping timeout: 245 seconds]
sargas has joined #ruby
phutchins has joined #ruby
bloudermilk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sakens has joined #ruby
rikai has quit [Ping timeout: 252 seconds]
bufferloss has quit [Quit: Leaving]
thumpba has joined #ruby
phutchins has quit [Ping timeout: 245 seconds]
mkaesz has joined #ruby
mistermocha has joined #ruby
digitalcake has joined #ruby
thumpba has quit [Ping timeout: 250 seconds]
digitalcake has left #ruby [#ruby]
Sawbones has quit []
riotjones has joined #ruby
dc has joined #ruby
dc has quit [Remote host closed the connection]
jonr22 has joined #ruby
rikai has joined #ruby
braincra- has quit [Quit: bye bye]
mkaesz has quit [Ping timeout: 264 seconds]
yfeldblu_ has quit [Read error: Connection reset by peer]
Guest123 has joined #ruby
yfeldblum has joined #ruby
zacstewart has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 246 seconds]
lemur has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
sevvie has quit [Ping timeout: 250 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo_ has joined #ruby
braincrash has joined #ruby
Jesterman81 has quit [Quit: Jesterman81]
w0rldmaker has joined #ruby
asteros has joined #ruby
Takle has joined #ruby
qiffp has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
zacstewart has joined #ruby
juanpablo_ has quit [Ping timeout: 255 seconds]
Takle has quit [Ping timeout: 252 seconds]
arescorpio has quit [Excess Flood]
tzupermang has joined #ruby
<tzupermang>
When I do def self.magic_number, I'm defining a function in the class, right?
<tzupermang>
but if later in one of the methods I do self.someVar, will it use the attr_accessor of the instance variable?
bigmac has quit [Ping timeout: 256 seconds]
teddyp1cker has joined #ruby
<shevy>
look
<shevy>
self.someVar is always self.someVar()
<jhass>
tzupermang: the self. when calling methods (attr_accessor is just defining methods), is only needed when the call would be ambiguous otherwise, that is 1) if a local variable with the same name exists 2) the methods name is a keyword, like self.class 3) the methods name ends with =, self.foo = bar
<jhass>
the self. in method definitions defines on which object the method should be defined
<jhass>
in a class definition self is the Class object that's currently constructed, so class Foo; def self.foo; end; end; is equivalent to class Foo; def Foo.foo; end; end; and class Foo; end; def Foo.foo; end;
teddyp1cker has quit [Ping timeout: 265 seconds]
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevvie has joined #ruby
sevvie has quit [Client Quit]
zacstewart has quit [Remote host closed the connection]
bigmac has joined #ruby
chipotle has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
zorak8 has quit [Ping timeout: 250 seconds]
zorak8 has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
plutonic has quit [Quit: plutonic]
Guest123 has joined #ruby
bigmac has quit [Ping timeout: 245 seconds]
Guest65 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
pwh has quit []
pwh has joined #ruby
DissonantGuile has joined #ruby
gr33n7007h has quit [Read error: Connection reset by peer]
FooMunki_ has quit [Read error: No route to host]
Guest65 has joined #ruby
FooMunki_ has joined #ruby
claptor has quit [Quit: this channel is bakas]
fgo has joined #ruby
oo_ has joined #ruby
asteros has quit [Quit: asteros]
asteros has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
duncannz has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
LoBoGoL has left #ruby [#ruby]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
mostlybadfly has joined #ruby
jenrzzz has joined #ruby
oki has joined #ruby
Asher has joined #ruby
roadt has joined #ruby
bruno- has joined #ruby
GnuYawk has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 245 seconds]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Synthbread has quit [Remote host closed the connection]
oki has quit [Ping timeout: 245 seconds]
RegulationD has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
ferr has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
jottr has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
swgillespie has quit [Client Quit]
RegulationD has joined #ruby
Crazy_Atheist has quit [Ping timeout: 252 seconds]
swgillespie has joined #ruby
lemur has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 256 seconds]
sevvie has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
lemur has joined #ruby
lemur has quit [Remote host closed the connection]
roadt has quit [Read error: Connection timed out]
w0rldmaker has quit [Read error: Connection reset by peer]
w0rldmaker has joined #ruby
roadt has joined #ruby
JoshGlzBrk has joined #ruby
zacstewart has joined #ruby
zacstewart has joined #ruby
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest123 has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asteros has quit [Quit: asteros]
Musashi007 has quit [Quit: Musashi007]
asteros has joined #ruby
Edes has quit [Remote host closed the connection]
asteros has quit [Client Quit]
godemper2r has quit [Ping timeout: 250 seconds]
waxjar has quit [Ping timeout: 240 seconds]
sivoais has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
godemper1r has quit [Ping timeout: 272 seconds]
DrShoggoth has joined #ruby
godemper1r has joined #ruby
xploshioon has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
DrShoggoth has joined #ruby
waxjar has joined #ruby
PaulCapestany has quit [Quit: .]
lxsameer has joined #ruby
lxsameer has joined #ruby
swgillespie has joined #ruby
Edes has joined #ruby
godemper2r has joined #ruby
<axisys>
how do I change the value of name: data[Call Forwarding Always][phoneNumber] of this form http://dpaste.com/0MCHZ7C ?
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Caius has joined #ruby
lys has quit [Quit: lys]
The_Phoenix has joined #ruby
doodlehaus has quit [Ping timeout: 250 seconds]
riotjones has joined #ruby
hiyosi has joined #ruby
jonr22 has joined #ruby
TheNet has joined #ruby
<TheNet>
Why am I getting this error when I run my ruby script in a screen session? /Users/Net/Ruby/galaxy_app/lib/config.rb:5:in `<top (required)>': Use RbConfig instead of obsolete and deprecated Config.
<TheNet>
line 5 is module Config
swgillespie has joined #ruby
<TheNet>
the error ONLY occurs when I run the script inside a screen session
<lampd1>
set a pry binding and then write json or yaml out to reference
piotrj has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
roshanavand has quit [Quit: Gone planting...]
_pakchoi_ops has quit [Read error: Connection reset by peer]
plashchynski has joined #ruby
_pakchoi_ops has joined #ruby
Feyn has quit [Quit: Leaving]
sevenseacat has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
sushant94 has quit [Ping timeout: 244 seconds]
sandelius has joined #ruby
Hrendalf has quit [Ping timeout: 246 seconds]
piotrj has quit [Remote host closed the connection]
jonr22 has joined #ruby
bMalum has joined #ruby
sandelius has quit [Client Quit]
sandelius has joined #ruby
roshanavand has joined #ruby
robindunbarr has quit [Quit: robindunbarr]
jonr22 has quit [Ping timeout: 245 seconds]
sinkensabe has quit [Remote host closed the connection]
ghr has joined #ruby
j_mcnally has joined #ruby
juanpablo_ has joined #ruby
zacts has quit [Quit: leaving]
zorak8 has quit [Ping timeout: 252 seconds]
nfk has joined #ruby
mkaesz has quit [Quit: Leaving...]
ghr has quit [Ping timeout: 252 seconds]
User458764 has joined #ruby
wldcordeiro has quit [Ping timeout: 265 seconds]
viki_ has quit [Quit: Connection closed for inactivity]
juanpablo_ has quit [Ping timeout: 264 seconds]
davejacobs has joined #ruby
bMalum has quit [Read error: Connection reset by peer]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
godd2 has quit [Ping timeout: 245 seconds]
davejacobs has quit [Ping timeout: 246 seconds]
robindunbarr has joined #ruby
doodlehaus has joined #ruby
Soda has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
Hrendalf has joined #ruby
doodlehaus has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
jimms_ has joined #ruby
segmond has quit [Ping timeout: 252 seconds]
jimms has quit [Ping timeout: 272 seconds]
fgo has quit [Ping timeout: 245 seconds]
<aewffwea>
to_json doesn't work for custom objects
Hrendalf has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has joined #ruby
RDash has quit [Quit: This device has been compromised!]
RDash has joined #ruby
segmond has joined #ruby
ptrrr has quit [Quit: ptrrr]
goshdarnyou has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hanmac>
aewffwea: for custom objects you might need to define the to_json method yourself because it doesnt know what attributes you want and what not
hollywood has joined #ruby
jimms_ has quit [Ping timeout: 252 seconds]
Sakens has quit [Ping timeout: 252 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimms has joined #ruby
User458764 has quit [Ping timeout: 255 seconds]
User458764 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
naftilos76 has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
robindunbarr has quit [Quit: robindunbarr]
vmatiyko has quit [Quit: WeeChat 1.0.1]
kalusn has quit [Remote host closed the connection]
thumpba has joined #ruby
Spami has joined #ruby
rupertbg has left #ruby [#ruby]
thumpba has quit [Ping timeout: 250 seconds]
jack_rabbit has quit [Ping timeout: 264 seconds]
chinmay_dd has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest95262 has joined #ruby
chinmay_dd has joined #ruby
riotjones has joined #ruby
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FooMunki_ is now known as FooMunki
Guest123 has joined #ruby
olivier_bK has joined #ruby
roadt has quit [Ping timeout: 264 seconds]
riotjones has quit [Ping timeout: 256 seconds]
hiyosi has joined #ruby
zacts has joined #ruby
roshanavand has quit [Remote host closed the connection]
nahtnam has joined #ruby
SOLDIERz has joined #ruby
SOLDIERz has quit [Remote host closed the connection]
SOLDIERz has joined #ruby
art-solopov has joined #ruby
jimms has quit [Remote host closed the connection]
kalusn has joined #ruby
Guest65_ has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
RegulationD has joined #ruby
tunaCanBruh has joined #ruby
adriancb has quit [Ping timeout: 265 seconds]
zacts has quit [Quit: leaving]
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
tunaCanBruh has quit [Ping timeout: 252 seconds]
Waheedi_ has joined #ruby
Hrendalf has joined #ruby
Waheedi has quit [Ping timeout: 256 seconds]
Waheedi_ is now known as Waheedi
jimms has joined #ruby
MissionCritical has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
Takle has joined #ruby
n008f4g_ has joined #ruby
phutchins has joined #ruby
RegulationD has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
RegulationD has quit [Ping timeout: 255 seconds]
phutchins has quit [Ping timeout: 264 seconds]
Crisix has joined #ruby
MissionCritical has joined #ruby
Hobogrammer has quit [Ping timeout: 272 seconds]
ptrrr has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Mia has quit [Read error: Connection reset by peer]
banister has joined #ruby
doodlehaus has joined #ruby
parduse has quit [Ping timeout: 264 seconds]
jonr22 has joined #ruby
spider-mario has joined #ruby
chishiki has quit [Quit: WeeChat 1.1.1]
chishiki has joined #ruby
chinmay_dd has quit [Ping timeout: 256 seconds]
Jetchisel has joined #ruby
slawrence00 has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 250 seconds]
Joufflu has quit [Ping timeout: 265 seconds]
oki has joined #ruby
juanpablo_ has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
robindunbarr has joined #ruby
parduse has joined #ruby
oki has quit [Ping timeout: 265 seconds]
ghr has joined #ruby
makeittotop has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
makeittotop has quit [Remote host closed the connection]
jottr has joined #ruby
bluOxigen has joined #ruby
monod has joined #ruby
lordkryss has joined #ruby
claptor has joined #ruby
User458764 has joined #ruby
zotherstupidguy has joined #ruby
<zotherstupidguy>
is there a way to publish to personal gem server without using the geminabox gem?
Zai00 has joined #ruby
razieliyo has joined #ruby
Mia has joined #ruby
<multi_io>
in rake, how do you properly add dependencies to the rdoc task?
bruno- has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
robindunbarr has quit [Quit: robindunbarr]
roadt has joined #ruby
Hirzu has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
roadt has quit [Max SendQ exceeded]
<multi_io>
e.g. if you need to generate some :include: files that the rdoc run needs
bruno- has quit [Ping timeout: 264 seconds]
roadt has joined #ruby
contradictioned has quit [Remote host closed the connection]
<multi_io>
only way I found is to declare them as file dependencies of the index.html file that rdoc generates.
fgo has joined #ruby
Hirzu has joined #ruby
<multi_io>
e.g. file "#{rdoc.rdoc_dir}/index.html" => <include files>
bluOxigen has quit [Ping timeout: 246 seconds]
<multi_io>
but that's not really documented
postmodern has joined #ruby
bruno- has joined #ruby
bluOxigen has joined #ruby
sigurding has joined #ruby
sigurding has quit [Client Quit]
codecop has joined #ruby
blueOxigen has joined #ruby
Mia has quit [Read error: Connection reset by peer]
pico-pete has quit []
bluOxigen has quit [Ping timeout: 250 seconds]
robindunbarr has joined #ruby
rikai has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
shum has joined #ruby
MissionCritical has quit [Ping timeout: 240 seconds]
Hirzu has quit [Remote host closed the connection]
lkba has joined #ruby
charliesome has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zacts has joined #ruby
thumpba has joined #ruby
kaiZen has joined #ruby
olivier_bK has quit [Ping timeout: 272 seconds]
zotherstupidguy has quit [Quit: leaving]
<arup_r>
Am I in or out ?
MissionCritical has joined #ruby
<shmoon_>
can i directly call module methods in ruby ?
thumpba has quit [Ping timeout: 250 seconds]
monod has quit [Quit: Sto andando via]
MissionCritical has quit [Max SendQ exceeded]
<shmoon_>
Like Foo::Bar::meth() ?
<shmoon_>
or it HAS to be included in classes
Mia has joined #ruby
contradictioned has joined #ruby
puzanov has joined #ruby
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 265 seconds]
MissionCritical has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
ValicekB has quit []
<Fluent>
If the method is a self method, you could use Foo.method()
Crisix has quit [Read error: Connection reset by peer]
piotrj has joined #ruby
pandaant has joined #ruby
robindunbarr has quit [Quit: robindunbarr]
<Fluent>
So for example if you have class Foo with a Method stated as self.bar, you could call Foo.bar()
fgo has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 252 seconds]
rikai has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
roshanavand has joined #ruby
ghr has joined #ruby
roshanavand has quit [Remote host closed the connection]
ValicekB has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
sinkensabe has joined #ruby
<jhass>
shmoon_: first of all, please don't use :: to call methods, use . Then, you can call them directly if they're defined on the module instance (too), that is as def self.foo or with module_function atop of them
ghr has quit [Ping timeout: 245 seconds]
<jhass>
things like Kernel in Ruby core use module_function
<jhass>
also def self.foo and module_function are not quite equivalent, def self. defines the method only on the module instance, module_function copies the instance method to the module instance
Arnie25 has quit [Remote host closed the connection]
tomeara has joined #ruby
<nerder>
anyway i'm following a codeacademy course of ruby, but it looks pretty simple
Arnie25 has joined #ruby
<nerder>
i'm about to finish it soon, you guys have something a bit more "advanced" that i can follow? No books pls, just learning by doing
ixti has joined #ruby
<wasamasa>
automate something worth automating on your system
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_ixti_ has quit [Ping timeout: 256 seconds]
codeurge has joined #ruby
Azure has joined #ruby
<Grantlyk>
If you've got a lot of experience in software already outside of ruby you could jump straight towards the open source process, find something and work on it or start your own thing.
rhllor has joined #ruby
Aztec_ has joined #ruby
<Aztec_>
hi
<Aztec_>
I have a problem somewhat related to rails, but it applies mostly to ruby constant magic in general
<Aztec_>
i have an abstract base class that multiple classes inherit from
<Aztec_>
i'm writing a gem that provides multi-table inheritance support in rails
havenwood has joined #ruby
<Aztec_>
now i have a module in that gem, which i want to use in the base class. in this module i want to define a class method that can be called in the base class
<Aztec_>
it defines an activerecord association on all child classes
<Aztec_>
but when i call it in the class, the method is undefined..
plashchynski has quit [Quit: plashchynski]
piotrj has joined #ruby
<jhass>
Ruby has no abstract classes ;P
<jhass>
but anyway, that's still kinda vague, any code you can show that demonstrates your problem?
<Aztec_>
by "astract" i mean, it doesn't have a table by itself...
<Aztec_>
If you check out MultiTabular::Super, that's the module I'm talking about
<Aztec_>
I want to provide a method like "children_have_many", which i can call in the definition of a class that includes MultiTabular::Super
RegulationD has joined #ruby
thumpba has joined #ruby
<Aztec_>
this method shall then create a regular has_many association for each descendant of the superclass, as in has_many :somethings, foreign_key: to_foreign_key
jottr has joined #ruby
Takle_ has joined #ruby
Takle has quit [Read error: Connection reset by peer]
<jhass>
afaik included does not change self, it provides the module that's being included into as an argument to the block
terlar has joined #ruby
<jhass>
since this is a rails project, you may want to use ActiveSupport::Concern
<Aztec_>
I already do...
<Aztec_>
some you're saying I need to use extends?
<Aztec_>
extend*
jimms has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rhllor has quit [Quit: rhllor]
<jhass>
oh, you already are indeed
MissionCritical has quit [Ping timeout: 240 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
check its docs then, it has examples on how to define class methods ;)
<Aztec_>
yea i know how ActiveSupport::Concern is supposed to work...if you have a look at this file for example:
doodlehaus has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 244 seconds]
Czupa has quit [Quit: Wychodzi]
RegulationD has quit [Ping timeout: 245 seconds]
<Aztec_>
i define "belongs_to_mti"...and in a project i have a class that includes MultiTabular::References, and i can call belongs_to_mti in that class
<jhass>
I don't follow why you try an def self. in an included block then all of the sudden
RegulationD has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
Hirzu has quit [Remote host closed the connection]
<Aztec_>
oh...well this is the reason for my question:
<jhass>
maybe we should attempt this from the ground up
<jhass>
do you know how "class methods" work in ruby?
Guest95262 has quit [Remote host closed the connection]
sargas has joined #ruby
<jhass>
do you know what an objects singleton class is?
<Aztec_>
an instance of Class
<jhass>
do you know what self inside a class or module definition is?
yxejamir has quit [Ping timeout: 250 seconds]
<jhass>
well it is, but that's not what I meant, I meant what its purpose is
oki has joined #ruby
<Aztec_>
not to deter from your question, but
<Aztec_>
atm. i have to define the association in each child class.... ( has_one :project, foreign_key: to_foreign_key )
<jhass>
I think understand where methods are defined and how method lookup works will clear your question up
<jhass>
*understanding
<Aztec_>
well i know that a class method is an instance method on the class singleton
<Aztec_>
if that's what you meant
MissionCritical has joined #ruby
<jhass>
yes
aamador has joined #ruby
<jhass>
well, but a bit more precise maybe
<jhass>
"the class singleton", what do you mean by that?
plashchynski has quit [Quit: plashchynski]
MissionCritical has quit [Max SendQ exceeded]
<Aztec_>
an instance of Class
terlar has quit [Quit: WeeChat 1.1.1]
<Aztec_>
not sure which direction you wanna get me to ;)
<jhass>
a = Class.new, so you're saying a holds a singleton now?
<jhass>
okay, maybe I just explain
<jhass>
first thing to understand is that classes and modules are regular objects, class Foo; end; is syntax sugar for Foo = Class.new, module Foo; end; is syntax sugar for Foo = Module.new
<jhass>
inside a class or module definition, self refers to this object
<Aztec_>
ok..so far i'm aware of what you're saying
<jhass>
the next point is that every object does not only have a class, it also has a singleton class
<jhass>
no two objects share the same singleton class
<jhass>
the singleton class is where methods live that are defined only for this object
<jhass>
16:25 <jhass> method lookup starts at the singleton class, so inside a class definition, it starts at the singleton class of the class you're defining I guess
<jhass>
Aztec__: did that clear something up for you yet?
iamninja has joined #ruby
nerder has quit [Quit: Page closed]
<Aztec__>
okay didn't miss anything..
Aztec_ has quit [Ping timeout: 246 seconds]
<Aztec__>
jhass i'm not yet sure how this applies to my problem..gotta think about it a little
<axisys>
do I assign a value to this form fields name data[Call Forwarding Always][phoneNumber] and data[Call Forwarding Always][settings_changed] here? http://dpaste.com/1VC8M46
<axisys>
how do I*
xpoqp has joined #ruby
<axisys>
form.data[Call Forwarding Always][phoneNumber] = '123456789' will not work
<jhass>
axisys: you probably have to pass strings
iamninja has quit [Client Quit]
<jhass>
form.data["Call.."]["phoneNumber"]
<axisys>
jhass: uh.. let me try
iamninja has joined #ruby
<Aztec__>
so jhass gotta ask this again: if i define a class in two different locations (that is, two class ClassName; end; blocks), do they share the same class singleton object?
_pakchoi_ops has quit [Ping timeout: 256 seconds]
<Aztec__>
because what you wrote above makes me think they don't
<axisys>
jhass: is it possible to find the field name matching string phoneNumber ?
<jhass>
Aztec__: yes, the second definition is merely entering the scope of the existing object, it doesn't create a new class
<Aztec__>
oh i see
<axisys>
jhass: and then assing the value to it?
<jhass>
axisys: I guess?
<axisys>
I am new to ruby.. how do I say find the field name with string matching phoneNumber?
<jhass>
not sure I can follow that question
doodlehaus has joined #ruby
<jhass>
"find"?
<axisys>
with ipython I can get the hints easily of all possible methods.. irb does not have that luxury
<jhass>
axisys: check pry, pryrepl.org
<axisys>
form.fields.name_with('phoneNumber') = 'foo' something like that possible?
MissionCritical has joined #ruby
<jhass>
axisys: you would need to check the docs of whatever class form.fields returns
<Fluent>
Do you just want to check if it contains the number?
piotrj has quit [Remote host closed the connection]
<axisys>
installed pry (apt-get install pry)
<Aztec__>
:'( i hate intertwined IRC communications
MissionCritical has quit [Max SendQ exceeded]
<Aztec__>
axisys you should probably use pry as a gem, not as an aptitude package
<Fluent>
It's part of the game.
aryaching has joined #ruby
<Fluent>
Also true
konflikt has quit [Quit: Page closed]
<jhass>
axisys: +1, remove that package and gem install pry pry-doc
piotrj has joined #ruby
<axisys>
jhass: ok
<Aztec__>
so starting from this mysterious to_foreign_key method: it shall return the concrete/subclasses name in a formatted string version
<Aztec__>
but i want to define the association in the base class
psy has joined #ruby
User458764 has joined #ruby
<Aztec__>
if i call to_foreign_key from the base class, it will obviously return the name of the base class,
<jhass>
Aztec__: do you want to support multiple levels of inheritance or just one?
<Aztec__>
just one
<Aztec__>
that's why i had it be a method of the the base class but call it from the subclasses
<jhass>
then just call superclass to the parent class
<jhass>
superclass.has_one or whatever
ptrrr has quit [Quit: ptrrr]
<jhass>
*to get the
<Aztec__>
not sure how this applies here?
<Aztec__>
maybe i should provide an example to better illustrate what i wanna achieve?!
chipotle has joined #ruby
<jhass>
well, that's what I asked for initially ;)
freerobby has quit [Quit: Leaving.]
vozcelik has joined #ruby
piotrj has quit [Remote host closed the connection]
<axisys>
I need to change there values and do a .submit()
<axisys>
jhass: thanks for the link
aerth_afaik is now known as aerth
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tunaCanBruh has joined #ruby
<axisys>
field.value = "foo" is what I was trying.. but I am look for a way to find the field where string matched phoneNumber instead of calling it directly
<axisys>
Fluent: yep.. something like that.. except the field name is data[Call Forwarding Always][phoneNumber]
<Fluent>
Oh, eeew
dblessing has joined #ruby
<axisys>
:name => "that has the string phoneNumber" .. somethign like that
<jhass>
Aztec__: well, with that API it won't happen, I think that's clear :)
aphprentice has joined #ruby
<Aztec__>
which API do you mean?
<Aztec__>
my nifty little gem? :)
<jhass>
Aztec__: turning a method call into multiple of itself from a method which is used as an argument to it
GGMethos has quit [Ping timeout: 250 seconds]
<Aztec__>
okay..yea i realize this is approach conceptually flawed
<jhass>
Aztec__: the other problem with it is that you don't know the child classes at that point
Takle has joined #ruby
<Aztec__>
yea, i just realized that when i saw that decendants of the baseclass is []
<jhass>
so, there are two entry points: define an inherited hook in the parent or include a module into the child which defines the association on the parent
juanpablo_ has joined #ruby
adriancb has joined #ruby
<Aztec__>
include a module into the child which defines the association on the parent
<Aztec__>
that's confusing me
<Aztec__>
the actual association has to happen "somehow" in the child class
ptrrr has joined #ruby
<jhass>
oh, gotcha
<Aztec__>
since the other side of the assocition (where the DB foreign keys are), knows which of the concrete child classes it is
<jhass>
well, the entry points stay the same though
aryaching has quit [Ping timeout: 246 seconds]
<jhass>
just the place where the association is defined changes
<Aztec__>
i just wanted to extract it into the base class as to not repeat the "same" association for every child class
User458764 has joined #ruby
vt102 has joined #ruby
<Aztec__>
but i guess you can't really "inherit" an association as it's more a "pull" thing rather than a "push" thing, if you know what i mean
<jhass>
I think the inherited hook leads to the nicer API, as you only have to include a module into the parent
GGMethos has joined #ruby
robustus is now known as robustus|Off
w0rldmaker has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<axisys>
got it!
<Aztec__>
jhass, by hook you mean some message that is sent to the base class on definition of the child class?
<jhass>
I like faraday as it abstracts most of the other libraries and thus lets me switch between them
<jhass>
but unless you have special constraints, pick whatever API you like most
prasselpikachu has quit [Ping timeout: 252 seconds]
<Aztec__>
so jhass i see what you did there...if i had an association "has_one :project, foreign_key: something" i could substitute that for your puts statement
sinkensabe has quit [Remote host closed the connection]
codeurge has joined #ruby
<Aztec__>
however since the module would be part of my gem, i'm not sure what the concrete association is, when i define the module
<jhass>
Aztec__: well almost, child.has_one if I understood you correctly
MissionCritical has joined #ruby
mjuszczak has quit [Client Quit]
<Aztec__>
does that make sense?
<jhass>
yes, but you should be able to completely infer it from the childs and the parents name, no?
<Aztec__>
right, child.has_one
MissionCritical has quit [Max SendQ exceeded]
<Aztec__>
no, it can be completely arbitrary
<Aztec__>
basically dependent on the scope of the rails app
Crisix has joined #ruby
<jhass>
then don't make it an included hook, make it a DSL method that defines the inherited hook
<a5i>
jhass, have I seen you somehwere?
<jhass>
or require DSL in the child that defines the names or whatever suites you
prasselpikachu has joined #ruby
<Aztec__>
so what i do in the inherited-hook, i would have to do in the class-definition
<jhass>
a5i: maybe, I don't memorize IRC encounters tbh
<a5i>
jhass, have you ever been in Rust?
<jhass>
nope
<Aztec__>
can i just call some class-level method from within the module's inherited block?
<axisys>
jhass: pry makes it sooo much easier to write codes.. thanks a lot!!
<jhass>
Aztec__: yes, it's defined in the parents class singleton class
<a5i>
nvm then
<jhass>
axisys: okay, here comes the bonus: write require "pry"; binding.pry anywhere into your program to get a debugging shell
<axisys>
jhass: wow!!!!
nahtnam has quit [Quit: Connection closed for inactivity]
<axisys>
jhass: much easier than copy all code into pry shell.. thanks!
<wasamasa>
binding.pry is the best
art-solopov_ has joined #ruby
* axisys
wonders if ipython have something similar.. need to ask in #python channel
MissionCritical has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
<wasamasa>
yes it has
<wasamasa>
from IPython import embed; embed()
<axisys>
wasamasa: how .. dare I ask here in #ruby channel :-)
CustosLimen has joined #ruby
Dolphi has joined #ruby
<axisys>
wasamasa: thanks a lot!
doodlehaus has joined #ruby
<Dolphi>
How would I go about merging a string and variable together into the same sentence? What I want is "How may I be of assistance today, " + name variable.
<a5i>
I just want my code to work, not use any external libs for now
iamninja has joined #ruby
<wasamasa>
...
iamninja has quit [Client Quit]
<jhass>
a5i: then you gotta remove rest-client ;)
Hrendalf has quit [Quit: Leaving]
<Dolphi>
jhass: If you wouldn't mind, could you make the code work so that I can study the proper way?
<Dolphi>
I'm still having a bit of trouble.
<jhass>
Dolphi: just adding an end to the last line doesn't help?
iamninja has joined #ruby
slawrence00 has joined #ruby
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Dolphi>
I added an "end" to the last line of my "if" and the last line of my "else"
ptrrr has quit [Quit: ptrrr]
<a5i>
I only used res client so I can work with the parser part of my code, which was my priority
<Dolphi>
I only need one "end"?
iamninja has quit [Client Quit]
jimms has quit [Ping timeout: 264 seconds]
<jhass>
yes
<wasamasa>
lol
aryaching has joined #ruby
zacstewart has quit [Remote host closed the connection]
<Dolphi>
Thank you.
<wasamasa>
so, because you cannot do a rest-query by using regex you find it ok to use an external library?
<jhass>
Dolphi: there's a gotcha in your code, gets returns the trailing newline, so it returns you "admin\n" if you enter admin on the console. String#chomp is a good method to get rid of it
<wasamasa>
this is kind of funny
<jhass>
a5i: well, I already told you why your parser doesn't work
<a5i>
and I was asking what I should use other than index
<a5i>
if thats the problem
<jhass>
a5i: note that String#index takes a second argument
willharrison has quit [Ping timeout: 246 seconds]
piotrj has joined #ruby
jimms has joined #ruby
<jhass>
just promise us to never apply this technique in a real world app and use a real HTML parser there ;)
SouL_ has quit [Read error: Connection reset by peer]
<Dolphi>
jhass: I was just about to mention that whether I enter admin or not, it goes straight to the "else". Chomp will get rid of that, correct?
SouL has joined #ruby
<jhass>
Dolphi: yes
<Dolphi>
jhass: Thanks buddy.
<a5i>
its all for learning :)
Spami has quit [Quit: This computer has gone to sleep]
_1_jeus2 has joined #ruby
<Aztec__>
jhass i have the dynamic association thing pretty much figured out
<wasamasa>
a5i: you'll learn more by using a proper parser
<jhass>
Aztec__: cool!
<Aztec__>
but now i have another problem when i set the childs table name from within the module..but i'm sure that's more related to rails than ruby in general
<jhass>
well, if you call "returning the index of where the token start" inclusive
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ptrrr has joined #ruby
thumpba has joined #ruby
<jhass>
_1_jeus2: how's your ruby going?
<Dolphi>
How would one go about making text wrap if the count reaches a certain number? I want my program's formatting to appear clean and crisp in PowerShell, but the only way that I know how is manually instering new lines.
sevvie has quit [Ping timeout: 246 seconds]
<Dolphi>
Would I have to write a few lines of code at the beginning of my program to count character counts for each line and if it reaches a certain number, insert a new line?
<jhass>
Dolphi: mmh, I'll just give away the standard trick: text.scan(/.{80}/).join("\n")
<Aztec__>
jhass is this remotely close to how you would have done it?
<Aztec__>
class Vehicle def self.inherited_associations(child) child.has_one :engine, foreign_key: child.to_foreign_key end end
<Aztec__>
oops
_1_jeus2 has quit [Quit: WhatsChat IRC Android APP]
_1_jeus has quit [Quit: WhatsChat IRC Android APP]
piotrj has quit [Remote host closed the connection]
nicolastarzia has joined #ruby
RegulationD has joined #ruby
shum has joined #ruby
Hirzu has joined #ruby
<Aztec__>
so i guess this is the final test.
<jhass>
pushing them to an instance var (that would live in the parents singleton class) and iterating it in the inherited hook should work
shum has quit [Client Quit]
<Aztec__>
i'll have to use all my knowledge acquired in the last hour to achieve this final obstacle in my way to becoming an apprentice in the art of ruby classes ^^
shum has joined #ruby
<Aztec__>
okay that sounds reasonable
ndrei has joined #ruby
wicope has quit [Remote host closed the connection]
davejacobs has joined #ruby
sevvie has joined #ruby
coinrookie has quit [Ping timeout: 246 seconds]
<Dolphi>
jhass: I added that scan idea to the end of my string and it works, but the text behind the part that would get wrapped disappeared :O
<Dolphi>
In other words, my string got cut in half and I lost the second half.
RegulationD has quit [Ping timeout: 246 seconds]
<Dolphi>
Then it skips to the next "puts"
<jhass>
Dolphi: time for another gist? :)
ptrrr has quit [Quit: ptrrr]
kobain has joined #ruby
prasselpikachu has quit [Ping timeout: 246 seconds]
spyderma_ has quit [Read error: Connection reset by peer]
prasselpikachu has joined #ruby
Hirzu has quit [Ping timeout: 252 seconds]
shum has quit [Client Quit]
claptor has joined #ruby
shum has joined #ruby
<jhass>
>> "A new user, I see? In that case, let me introduce myself. My name is Jeves, and I am happy to act as your personal assistant.".scan(/.{80}/).join("\n")
<eval-in>
jhass => "A new user, I see? In that case, let me introduce myself. My name is Jeves, and " (https://eval.in/294680)
davejacobs has quit [Ping timeout: 245 seconds]
<jhass>
huh
iamninja has joined #ruby
iamninja has quit [Client Quit]
shum has quit [Client Quit]
<jhass>
oh, my bad
<shevy>
too much crystal
<jhass>
Dolphi: the correct regex is /.{,80}/
m8 has joined #ruby
banister has joined #ruby
shum has joined #ruby
iamninja has joined #ruby
<jhass>
note the added ,
mikmik77 has quit [Quit: Konversation terminated!]
jimms has quit [Ping timeout: 252 seconds]
iamninja has quit [Client Quit]
MissionCritical has quit [Ping timeout: 252 seconds]
iamninja has joined #ruby
j416 has quit [Quit: o/]
RegulationD has quit [Ping timeout: 244 seconds]
iamninja has quit [Client Quit]
iamninja has joined #ruby
nicolastarzia has quit [Remote host closed the connection]
pretodor has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
RegulationD has joined #ruby
zacstewart has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Dolphi>
Thank you :)
<Dolphi>
By the time that I build this personal assistant program, I will be fluid in Ruby! I have so many ideas to implement!
codeurge has joined #ruby
red_horned_rihno has quit [Ping timeout: 255 seconds]
arup_r has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 250 seconds]
j416 has joined #ruby
kirun has joined #ruby
<Aztec__>
jhass it looks like the hook-way of doing this messes with some rails setters
JDiPierro has joined #ruby
<jhass>
Aztec__: quite possible that rails is using it itself, so maybe try calling super or something like that
nickjj has quit [Quit: Leaving]
prasselpikachu has quit [Ping timeout: 244 seconds]
nickjj has joined #ruby
<jhass>
Dolphi: btw you probably want to wrap that code into a helper method, like def wrapped_puts text; puts text.scan(/.{,80}/).join("\n"); end and then call that instead of puts
plashchynski has quit [Quit: plashchynski]
MissionCritical has joined #ruby
Channel6 has joined #ruby
topolinux has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
gr33n7007h has joined #ruby
<Aztec__>
jhass cool beans, looks like that was the problem
<Aztec__>
lol or not
zacstewart has quit [Remote host closed the connection]
<Dolphi>
jhass: I think I understand what you mean, but I am extremely new to programming altogether, not just Ruby, so pardon my ignorance.
aryaching has joined #ruby
zacstewart has joined #ruby
<shevy>
Dolphi do you know rubular yet?
prasselpikachu has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
havenn has joined #ruby
<Dolphi>
shevy: What is rubular?
<shevy>
Dolphi it is super easy to build a regex with it http://rubular.com/
<jhass>
Dolphi: don't worry, it'll annoy you soon enough to copy that code everywhere and so you'll figure out what I mean :P
zacstewart has quit [Remote host closed the connection]
<Aztec__>
because in my childclasses, i have accepts_nested_attributes for and it throws an exception that the association it relies on is not definied
Spami has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
hmnhf has quit [Ping timeout: 264 seconds]
<momomomomo>
Aztec__: if this is a rails question, please ask in #rubyonrails
<jhass>
momomomomo: it's more metaprogramming really
<momomomomo>
jhass: right on; I just saw accepts_nested_attributes ; didn't see the original question
dblessing has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
JDiPierro has quit [Remote host closed the connection]
tunaCanBruh has joined #ruby
Pumukel has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
sivsushruth has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
arup_r has joined #ruby
Guest____ has joined #ruby
<Dolphi>
I want my program to recommend meals based on the time of day. How would I go about that? For example, if time < 11am, recommend a breakfast dish
<jhass>
Aztec__: actually I'm a bit confused that you can can call child_has_one at all
<shevy>
Dolphi ^^^ see the difference? we added 500 seconds
<Aztec__>
why is that?
<shevy>
Aztec__ extend should work on the class level
<shevy>
in other words, if you have def self.foo methods
Asher has quit [Quit: Leaving.]
<Aztec__>
yep and i'm calling the method @ the class level, right?
<shevy>
no idea sorry, did not look at your code yet :D
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<Aztec__>
class Foo; call_something; end;
antgel has quit [Ping timeout: 264 seconds]
<shevy>
well that will be a method on your very object
<Aztec__>
call_something is a method on the class-level
<jhass>
Aztec__: oh, you extend your module?
<shevy>
you always need to keep track where self is
<Aztec__>
yea, got lost in translation i guess
<Aztec__>
i'm using extend
<jhass>
don't, used include still
<shevy>
\o/
<Aztec__>
and i assume that's why the hook doesn't work anymore
<jhass>
and define the DSL methods with AS::Concerns ClassMethods/class_methods do
<Aztec__>
okay, so when i iuse include, i have to define child_has_one in the included hook right?
<Aztec__>
oh ok
iamjarvo has joined #ruby
Takle has quit [Remote host closed the connection]
iamjarvo has quit [Max SendQ exceeded]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
User458764 has joined #ruby
fantazo has joined #ruby
juanpablo_ has joined #ruby
<Aztec__>
so jhass, now i have the dilemma of where to define to_foreign_key again
oleo has quit [Quit: Verlassend]
prasselpikachu has quit [Ping timeout: 272 seconds]
robustus|Off is now known as robustus
pretodor has quit [Quit: Ex-Chat]
<Aztec__>
it has to be a class-method of the child classes, so i would put it in the ClassMethods module
<Aztec__>
but then child.to_foreign_key is undefined
rorra has joined #ruby
<jhass>
Aztec__: do your users actually need that method?
<Dolphi>
shevy: You mean we can add time to the current time?
<jhass>
isn't it just a helper for your gem?
<Dolphi>
Programming is so complicated from a beginner's standpoint lol. I hope to get as good as you guys some day. :)
<Aztec__>
it's more a helper for my gem
<Aztec__>
i just thought about calling child.name.whatever right away
<jhass>
Aztec__: I'd go for module MultiTabular; def self.to_foreign_key(child) then
<Aztec__>
but just for better understanding i'd try to figure out where to put it
Morkel has quit [Quit: Morkel]
<Aztec__>
ok like that..dang :D
prasselpikachu has joined #ruby
Grantlyk has quit []
<jhass>
and own module inside the gem if you accumulate a few of those
User458764 has quit [Client Quit]
juanpablo_ has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
Zesty has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
<Zesty>
I'm including a module with extend. How can I mix in an @@all_devices into each class? I'm basically trying to mixin a very simple .create(xxx) and .all() which returns all the objects (like rails)
<Zesty>
it keeps making the @@var apply to all classes though
Mia has quit [Read error: Connection timed out]
ndrei has joined #ruby
<Aztec__>
zesty i would not use class-level variables
enebo has quit [Quit: enebo]
GGMethos has joined #ruby
<Aztec__>
someone is gonna jump me probably, but i would do it this way:
<Zesty>
how do I keep track of new items I .create(0 ?
RegulationD has quit [Remote host closed the connection]
Limix has joined #ruby
jlast has joined #ruby
<shevy>
Dolphi yeah, you can add and deduct time from time objects in ruby. (almost) everything is an object in ruby
pappilino1 has quit [Quit: pappilino1]
wallerdev has joined #ruby
DrShoggoth has quit [Client Quit]
<shevy>
Dolphi it's not really that complicated; the core part is simple math (add, subtract, multiply etc..), simple logic (if this, else that), arranging stuff in data structures (like hash vs. array), and last but not least arranging your code in logical chunks (methods, modules, classes, files). if you were to use C you'd also have pointers and boring memory thingies
DrShoggoth has joined #ruby
<shevy>
Dolphi I think the time implementation in ruby follows some standard
<Nilium>
If you can make the compiler take more than a few seconds, you are using Cgo.
<Nilium>
It's extremely fast, to the point that I just recompile everything the moment I change anyhting.
<Nilium>
*anything
<Aztec__>
but...but....
wallerdev has quit [Quit: wallerdev]
Mia has quit [Read error: Connection timed out]
<Nilium>
Anyway, what "faster" means to people who are using languages that have to get shoved through a VM and can't be sufficiently optimized even by a JIT compiler is mostly irrelevant to me.
PhaseCode has joined #ruby
Mia has joined #ruby
AlexRussia has joined #ruby
<Nilium>
Had a whole hell of a long discussion about node.js likely misleading lots of people with the whole non-blocking IO thing last night in #go-nuts, so I don't really want to rehash it.
<Nilium>
The flexibility of that scene is astounding.
<Aztec__>
why not use javascript for systems programming? :)
<Nilium>
Because it's unsanitary.
<Aztec__>
i was at a meetup where somebody programmed a robot with javascript...it was....nice...
<dorei>
ppl are still using C for systems programming, so why not javascript? :D
<Nilium>
Especially on low-memory systems.
<Aztec__>
yea i wouldn't use it either
rbennacer has quit [Remote host closed the connection]
<Aztec__>
not that i would do systems programming anyway
einarj has quit [Ping timeout: 256 seconds]
<Nilium>
Well, that's basically my job.
skullcrasher has joined #ruby
<IceDragon>
dorei: Because C is supreme king of systems programming
<skullcrasher>
i try to install a gem (json 1.7.7) and everytime I get the following error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. Any ideas?
Joufflu has joined #ruby
<IceDragon>
skullcrasher: gem install --verbose and pastie result
_Andres has joined #ruby
sevvie has quit [Ping timeout: 246 seconds]
<IceDragon>
skullcrasher: if you're running windows, then make sure you're build environment is setup correctly
<PhaseCode>
Nilium: http://rubyfiddle.com/riddles/bff8f It returns two objects that are semi- correct, would I just reduce the array and strip the first part?
<axisys>
shevy: right.. thanks
<Nilium>
Could just do a uniq and map.
<Nilium>
Or a map and uniq.
<axisys>
is there a shorter way to get nonzero integers than this
<IceDragon>
anyway, I'll clone the repo down and read the source, you might figure it out before I finish though
last_staff has joined #ruby
<arup_r>
I am trying since last 1 hour .. didn't get it :(
Takle has joined #ruby
momomomomo has quit [Quit: momomomomo]
sinkensabe has joined #ruby
<shevy>
sometimes you should give up!
<IceDragon>
ah, wait a second..
<IceDragon>
the abbr, it shouldn't be on the Fabricator
<IceDragon>
it should be an attribute/method on the Model itself
* IceDragon
facepalms
<arup_r>
it is a model field..
<arup_r>
but its value should be the first 3 chars for the name
Bounga has quit [Quit: Bounga]
<IceDragon>
Then the Model needs to handle cases where its only given a name and extracts the abbr from it
_honning_ has joined #ruby
<IceDragon>
oh well
<IceDragon>
lemme continue looking before I jump
mikecmpbll has joined #ruby
PhaseCode has quit [Ping timeout: 255 seconds]
<Aztec__>
alright, so before I leave, thanks so much for helping, jhass
<IceDragon>
o_o; the trip Fabricator block goes on is amazing...
<Aztec__>
i promise i'll tease my fellow programmers with the class singleton object ;)
it0a has joined #ruby
piotrj has quit [Remote host closed the connection]
MissionCritical has joined #ruby
piotrj has joined #ruby
nb_bez___ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
<jhass>
Aztec__: you're welcome, have fun ;)
<IceDragon>
arup_r: Well I didn't find anything useful, the block is passed an index, that's it, nothing more, it doesn't receive an instance, and the scope of that block is also useless to you, not sure how you're going to get around this one
<IceDragon>
shevy: I just went on the most amazing round trip for a ruby block
sinkensabe has quit [Read error: Connection reset by peer]
sinkensa_ has joined #ruby
<shevy>
LSD?
<IceDragon>
shevy: yeah maaaan
shum has quit [Quit: WeeChat 1.1.1]
einarj has joined #ruby
shum has joined #ruby
Aztec__ has quit [Ping timeout: 246 seconds]
aswen has joined #ruby
_honning_ has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
<arup_r>
:(
einarj_ has quit [Ping timeout: 265 seconds]
Mia has quit [Read error: Connection timed out]
MissionCritical has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<IceDragon>
arup_r: As I mentioned earlier, your best bet is to have the Model initialize the abbr field using the name itself if not given
rhg135|zzz is now known as rhg136
<IceDragon>
like a default value :P
<arup_r>
I read the lots of files.. but I gave up with those DSL's
wallerdev has joined #ruby
<arup_r>
humm
<arup_r>
with hook ?
<IceDragon>
Are you using ActiveModel for the models?
Hirzu has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
randiman has joined #ruby
cpt_yossarian has quit [Ping timeout: 264 seconds]
thumpba has joined #ruby
QualityAddict has joined #ruby
oki has joined #ruby
marr has joined #ruby
lkba has joined #ruby
ponga has joined #ruby
viki_ has joined #ruby
w0rldmaker has joined #ruby
riotjones has joined #ruby
odigity has joined #ruby
thumpba has quit [Ping timeout: 252 seconds]
RhettT has quit [Quit: Leaving]
einarj_ has joined #ruby
relix has joined #ruby
MissionCritical has joined #ruby
<apeiros>
IceDragon, jhass: because such methods are pseudo functions. they make no use of self. and as such, they should be private. module_function does that for you - private instance method + public class method. with extend self, that's more difficult.
einarj has quit [Ping timeout: 255 seconds]
MissionCritical has quit [Max SendQ exceeded]
<apeiros>
(re module_function vs. extend self)
arup_r has quit [Remote host closed the connection]
<apeiros>
and there are precedence cases - see Kernel and Math. All methods there are module functions.
<jhass>
apeiros: thanks
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
phutchins has joined #ruby
riotjones has quit [Ping timeout: 272 seconds]
chinmay_dd has quit [Quit: Connection closed for inactivity]
doodlehaus has joined #ruby
w0rldmaker has quit [Ping timeout: 272 seconds]
allcentury has quit [Ping timeout: 272 seconds]
Beoran__ has joined #ruby
vozcelik has quit [Ping timeout: 255 seconds]
allcentury has joined #ruby
einarj_ has joined #ruby
nemaona has quit [Quit: leaving]
swgillespie has joined #ruby
TheNet has quit [Remote host closed the connection]
TheNet has joined #ruby
ptrrr has quit [Quit: ptrrr]
einarj has quit [Ping timeout: 240 seconds]
MissionCritical has joined #ruby
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
bigmac_ has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
piotrj has quit [Remote host closed the connection]
shum has quit [Quit: WeeChat 1.1.1]
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shum has joined #ruby
Limix has joined #ruby
<shevy>
jhass is doing too much crystal
tjbiddle has joined #ruby
<shevy>
he forgets ruby stuff!
<ponga>
oops
<ponga>
im 100% full whack onto crystal at the moment
dh64 has quit [Quit: Konversation terminated!]
yfeldblum has joined #ruby
shum has quit [Client Quit]
mikeric has joined #ruby
piotrj has joined #ruby
shum has joined #ruby
lys has joined #ruby
max96at is now known as max96at|off
piotrj has quit [Read error: Connection reset by peer]
Guest____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_2_Sunny932>
what
rbennacer has joined #ruby
_2_Sunny932 has left #ruby [#ruby]
mikeric has quit []
bigmac_ has quit [Ping timeout: 252 seconds]
shum has joined #ruby
skullcrasher has joined #ruby
zorak8 has joined #ruby
shum has quit [Client Quit]
pwh has quit [Ping timeout: 245 seconds]
MissionCritical has joined #ruby
einarj_ has joined #ruby
shum has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
shum has quit [Client Quit]
einarj has quit [Ping timeout: 256 seconds]
shum has joined #ruby
juanpablo_ has joined #ruby
momomomomo has joined #ruby
MatthewsFace has joined #ruby
oleo has joined #ruby
einarj has joined #ruby
<shadeslayer>
oh wow, crystal looks quite cool
nb_bez___ has quit [Quit: Connection closed for inactivity]
allcentury has quit [Ping timeout: 250 seconds]
deric_skibotn has joined #ruby
elaptics_away is now known as elaptics
x1337807x has quit [Ping timeout: 252 seconds]
jefus has quit [Ping timeout: 265 seconds]
einarj_ has quit [Ping timeout: 245 seconds]
last_staff has quit [Quit: last_staff]
shum has quit [Client Quit]
shum has joined #ruby
shum has quit [Client Quit]
einarj_ has joined #ruby
shum has joined #ruby
juanpablo_ has quit [Ping timeout: 256 seconds]
rorra has quit [Quit: rorra]
MissionCritical has joined #ruby
einarj has quit [Ping timeout: 250 seconds]
febuiles has joined #ruby
ninedragon is now known as fourdragon
bigmac_ has joined #ruby
Matthews_ has joined #ruby
fourdragon is now known as ninedragon
einarj has joined #ruby
<Igneous>
Does anyone know of a large open source grape app that I could take a look at? Just looking for insparation on how to scale this api out, when it starts growing.
shum has quit [Client Quit]
pwh has joined #ruby
shum has joined #ruby
pwh has quit [Client Quit]
Hirzu has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
einarj_ has quit [Ping timeout: 245 seconds]
OrbitalKitten has joined #ruby
einarj_ has joined #ruby
maletor has joined #ruby
MatthewsFace has quit [Ping timeout: 265 seconds]
allcentury has joined #ruby
freerobby has quit [Quit: Leaving.]
doodlehaus has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 245 seconds]
Waheedi has quit [Quit: Waheedi]
rbennacer has quit [Remote host closed the connection]