nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has quit [Remote host closed the connection]
<ruby-lang358>
ok ok thanks for the article, it clarifies a little bit the syntax; so how do you add an instance method to an already existing class, such as Object?
<ruby-lang358>
i know you can reopen the class def with class Object; def foo(); ... end; end; but this syntax does not seem allowed inside a method
eminencehc has joined #ruby
dhollinger has quit [Quit: Leaving]
<ruby-lang358>
my aim is to add an instance method to all objects :)
momomomomo has joined #ruby
devoldmx has joined #ruby
symm- has joined #ruby
mattwildig has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<ruby-lang358>
while with the syntax class << Object then it would add a static method
<platzhirsch>
well, using Time instead of Date works
<lagweezle>
platzhirsch: IIRC you can set up the variables in local scope, then ERB.new(<template>).result(binding()) but again, my memory is VERY foggy on this.
tkuchiki has quit [Remote host closed the connection]
<platzhirsch>
lagweezle: I am not using a Ruby script to do the ERB rendering, but the erb command line tool
Xiti has joined #ruby
rehat_ has quit [Remote host closed the connection]
<lagweezle>
platzhirsch: OH! I have no idea, then, as I was unaware there was such a thing...
Musashi007 has quit [Quit: Musashi007]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<platzhirsch>
no worries :)
<riceandbeans>
I have a loop on a variable.each_value that is getting skipped on a certain run, would that mean it's an empty array? if so, is there a good way to check if it's an empty array beforehand?
tvw has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
momomomomo_ has joined #ruby
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
FernandoBasso has quit [Quit: WeeChat 1.3]
diegoaguilar has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
wnd has quit [Excess Flood]
mary5030 has quit [Ping timeout: 260 seconds]
wnd has joined #ruby
<EllisTAA>
i might have a contract position, and the guy wants me to create an api for his app. the app is an ios app, so am i correct to assume that if i build a rails api all incoming requests will be taken and forwarded to the ios’ server?
TheNet has joined #ruby
Rollabunna has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<riceandbeans>
if you're writing an api why do you care if it's ios or droid or anything
<riceandbeans>
do the api in whatever you want, rails, sinatra, whatever, long as you can handle rest I'm sure you'll be fine
<TheNet>
Is there a way to have an array of objects without preventing those objects from being garbage collected?
baweaver has joined #ruby
axsuul has joined #ruby
mozzarella has joined #ruby
axsuul has quit [Max SendQ exceeded]
bruno- has joined #ruby
bruno- is now known as Guest75057
<shevy>
what th
<shevy>
e
axsuul has joined #ruby
axsuul has quit [Max SendQ exceeded]
DEA7TH has quit [Quit: DEA7TH]
<shevy>
you don't get a lot of control through the GC
axsuul has joined #ruby
<shevy>
you have GC.enable, GC.disable and GC.start
mary5030 has quit [Remote host closed the connection]
rgtk has joined #ruby
mary5030 has joined #ruby
kstuart has quit [Ping timeout: 244 seconds]
davedev2_ has joined #ruby
rgtk has quit [Read error: No route to host]
davedev24 has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
ixti has quit [Client Quit]
tigarcia has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
mattwildig has joined #ruby
Limix has quit [Quit: Limix]
mary5030 has quit [Ping timeout: 246 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
<EllisTAA>
riceandbeans: thanks for the response. i am right though when i assume the user will hit the rails api i build and when that api gets hit it will then hit the app’s (ios or droid) backend right?
saloaty has joined #ruby
saloaty has left #ruby [#ruby]
rgtk has joined #ruby
saloaty has joined #ruby
<saloaty>
can someone please tell me why when in the rails console or irb, i add 3.48 + 0.01 and get 3.4899999999999998
rgtk has quit [Read error: No route to host]
mdih has quit [Ping timeout: 260 seconds]
rgtk has joined #ruby
stannard has joined #ruby
vigintas has joined #ruby
rgtk has quit [Read error: No route to host]
d34th4ck3r has joined #ruby
rgtk has joined #ruby
roxtrongo has joined #ruby
rgtk has quit [Read error: No route to host]
matp has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
rgtk has joined #ruby
mdst has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
TheNet has quit [Remote host closed the connection]
JammyHammy has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
symbol_ has joined #ruby
alex88 has quit [Quit: Leaving...]
beast has joined #ruby
axsuul has quit [Max SendQ exceeded]
ebbflowgo has joined #ruby
rgtk_ has joined #ruby
mattwildig has quit []
marr has quit [Ping timeout: 268 seconds]
joufflu has joined #ruby
stannard has joined #ruby
rgtk_ has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
stannard has quit [Client Quit]
chibs has quit [Quit: leaving]
chibs has joined #ruby
axsuul has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
htmldrum has quit [Ping timeout: 252 seconds]
chibs has quit [Client Quit]
chibs has joined #ruby
rgtk has quit [Read error: No route to host]
InternetFriend has joined #ruby
rgtk has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
BraddPit1 has joined #ruby
BraddPit1 has left #ruby [#ruby]
rgtk has quit [Read error: No route to host]
bb010g has joined #ruby
rgtk has joined #ruby
TheNet has joined #ruby
vigintas has quit [Ping timeout: 260 seconds]
skcin7 has joined #ruby
rgtk has quit [Read error: No route to host]
mdst has joined #ruby
craysiii has quit [Remote host closed the connection]
SuMo_D has quit [Quit: Off into this... Real world place...]
rgtk has joined #ruby
<weaksauce>
saloaty look up floating point precision
EllisTAA has quit [Quit: EllisTAA]
shinnya has quit [Ping timeout: 260 seconds]
EllisTAA has joined #ruby
rgtk has quit [Read error: No route to host]
BTRE has quit [Quit: Leaving]
rgtk has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
TheNet has quit [Ping timeout: 264 seconds]
blackmes1 has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
trosborn has joined #ruby
rgtk has joined #ruby
matp has joined #ruby
EllisTAA has quit [Client Quit]
juanpablo__ has joined #ruby
tkuchiki has joined #ruby
rgtk has quit [Read error: No route to host]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jud^ has joined #ruby
BTRE has joined #ruby
rgtk has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
blackmes1 has quit [Ping timeout: 264 seconds]
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
rgtk has quit [Read error: No route to host]
mistermo_ has joined #ruby
willardg has joined #ruby
KensoDev has joined #ruby
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
juanpablo__ has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
zenguy_pc has quit [Ping timeout: 240 seconds]
jud has quit [Ping timeout: 260 seconds]
rgtk has quit [Read error: No route to host]
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 265 seconds]
rgtk has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
borodin has joined #ruby
rgtk has quit [Read error: No route to host]
trosborn has quit [Quit: trosborn]
RobertBirnie has joined #ruby
mistermo_ has quit [Ping timeout: 255 seconds]
rgtk has joined #ruby
Musashi007 has joined #ruby
pedahzur has quit []
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
hxegon has quit [Ping timeout: 260 seconds]
Bloomer has joined #ruby
houhoulis has joined #ruby
dfockler has joined #ruby
stannard has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
rgtk__ has joined #ruby
d34th4ck3r has quit [Quit: zzz]
Bloomer has quit [Remote host closed the connection]
rgtk has quit [Ping timeout: 260 seconds]
rgtk__ has quit [Read error: No route to host]
kies^ has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
safe has joined #ruby
idefine has joined #ruby
<saloaty>
exit
<saloaty>
exit
saloaty has left #ruby [#ruby]
<BraddPitt>
nailed it
rgtk has quit [Read error: No route to host]
ponga has joined #ruby
balazs has joined #ruby
rgtk has joined #ruby
zenguy_pc has joined #ruby
chibs has quit [Ping timeout: 265 seconds]
tjbiddle has joined #ruby
rgtk has quit [Read error: No route to host]
d34th4ck3r has joined #ruby
rgtk has joined #ruby
mozzarella has quit [Quit: WeeChat 1.2]
acke has joined #ruby
bruno- has joined #ruby
leafybas_ has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
bruno- is now known as Guest39509
leafybas_ has joined #ruby
idefine has quit [Remote host closed the connection]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
mozzarella has joined #ruby
rgtk has quit [Read error: No route to host]
mistermocha has joined #ruby
rgtk has joined #ruby
idefine has joined #ruby
Guest39509 has quit [Ping timeout: 265 seconds]
acke has quit [Ping timeout: 268 seconds]
leafybas_ has quit [Ping timeout: 265 seconds]
to_json has quit [Quit: Leaving.]
CVTJNII has quit [Ping timeout: 260 seconds]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
Fire-Dragon-DoL has quit []
gregf has quit [Quit: WeeChat 1.3]
dorei has quit []
rgtk has quit [Read error: No route to host]
cjbischof_ has joined #ruby
rgtk has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
babblebre has quit [Quit: Connection closed for inactivity]
gregf has joined #ruby
tigarcia has joined #ruby
rgtk has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
roxtrongo has quit [Remote host closed the connection]
hackeron has joined #ruby
DLSteve has joined #ruby
jordanloky has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
jgt1 has quit [Ping timeout: 272 seconds]
swgillespie has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cjbischof_ has quit [Ping timeout: 250 seconds]
HoloIRCUser has joined #ruby
hackeron_ has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
HoloIRCUser is now known as bit_owl
tigarcia has quit [Ping timeout: 250 seconds]
simplyianm has quit [Remote host closed the connection]
BigDiesel007 has joined #ruby
rgtk has quit [Read error: No route to host]
jaequery has joined #ruby
rgtk has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
d34th4ck3r has quit [Quit: zzz]
veduardo has quit [Quit: WeeChat 0.4.2]
rgtk has joined #ruby
<bit_owl>
Is it considered bad to write ruby in functional approach?
CVTJNII has joined #ruby
symbol_ has quit [Ping timeout: 264 seconds]
rgtk has quit [Read error: Connection reset by peer]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Renich has quit [Ping timeout: 268 seconds]
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
cjbischof_ has joined #ruby
mdih has joined #ruby
Musashi007 has quit [Quit: Musashi007]
rgtk_ has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
mdih has quit [Max SendQ exceeded]
Renich has joined #ruby
riotjones has joined #ruby
mdih has joined #ruby
riotjones has quit [Read error: Connection reset by peer]
mdih has quit [Max SendQ exceeded]
riotjones has joined #ruby
ledestin has joined #ruby
stannard has quit []
htmldrum has joined #ruby
Trynemjoel has joined #ruby
rgtk has joined #ruby
<Radar>
bit_owl: example?
cjbischof_ has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
d34th4ck3r has joined #ruby
RobertBirnie has joined #ruby
stannard has joined #ruby
rgtk_ has quit [Ping timeout: 260 seconds]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
<weaksauce>
bit_owl why would you say it would be bad?
riotjones has quit [Ping timeout: 240 seconds]
stannard has quit [Client Quit]
jackjackdripper1 has quit [Quit: Leaving.]
<weaksauce>
select map and inject are all functional programming concepts really
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<weaksauce>
and those are so common that it's hard to say that it's bad
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PaulCape_ has joined #ruby
<bit_owl>
I read from some blog about writing ruby in functional approach. They advice the reader not to use the approach in production code
rgtk has joined #ruby
<blubjr>
why not
<weaksauce>
were they doing monads or something?
jaequery has joined #ruby
<bit_owl>
Like using curry, immutable, and so
<weaksauce>
link?
benlieb has quit [Client Quit]
bruce_lee2 has joined #ruby
<blubjr>
those are good things
mistermocha has joined #ruby
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
bruce_lee is now known as Guest14183
Guest14183 has quit [Killed (leguin.freenode.net (Nickname regained by services))]
bruce_lee2 is now known as bruce_lee
<EasyCo>
Functional <3
rgtk has quit [Read error: No route to host]
PaulCapestany has quit [Ping timeout: 246 seconds]
<bit_owl>
I'm still learning about functional, and I think i fall in love with the concepts
rgtk has quit [Read error: No route to host]
skweek has joined #ruby
rgtk has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
<weaksauce>
unless you are on the bleeding edge of performance and the GC pauses are relevant... functional programming is a good thing. but prematurely optimizing things because they might be a problem is not a good way to code
TheHodge has quit [Quit: Connection closed for inactivity]
rgtk has quit [Read error: No route to host]
idefine has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
shevy has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
Feyn has joined #ruby
diegoaguilar has joined #ruby
solenoids has joined #ruby
juanpablo__ has joined #ruby
subscope has joined #ruby
d34th4ck3r has quit [Quit: d34th4ck3r]
safe has quit [Read error: Connection reset by peer]
safe has joined #ruby
subscope has quit [Client Quit]
phillips1012 has quit [Ping timeout: 272 seconds]
subscope has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
juanpablo__ has quit [Ping timeout: 265 seconds]
shinenelson has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby
krz has joined #ruby
skcin7 has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
idefine has quit [Remote host closed the connection]
mrd_ has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 255 seconds]
devbug has joined #ruby
charliesome has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
kaneis has joined #ruby
aredridel has joined #ruby
rakm has joined #ruby
aps has joined #ruby
hotpancakes has joined #ruby
<aps>
Hi all. Where can I see the changelog from 2.2.2 -> 2.2.3?
s00pcan has joined #ruby
<aps>
never mind, got it
chibs has quit [Ping timeout: 264 seconds]
infamos has joined #ruby
exadeci has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
kfpratt has quit [Remote host closed the connection]
jgt1 has joined #ruby
kfpratt has joined #ruby
astrobun_ has quit [Remote host closed the connection]
bricker has quit [Quit: leaving]
zylogz80 has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
rabbithole has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
dh64 has joined #ruby
jgt1 has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
arooni has quit [Ping timeout: 246 seconds]
idefine has joined #ruby
Derailed has joined #ruby
darkf_ is now known as darkf
baweaver has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
agent_white has quit [Quit: bbl]
idefine has quit [Remote host closed the connection]
blt has quit [Ping timeout: 265 seconds]
Klumben has joined #ruby
astrobun_ has joined #ruby
d34th4ck3r has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
Limix has quit [Quit: Limix]
elton has joined #ruby
to_json has quit [Quit: Leaving.]
Limix has joined #ruby
favadi has joined #ruby
kies^ has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
tigarcia has quit [Remote host closed the connection]
elton has quit [Client Quit]
Emmanuel_Chanel has joined #ruby
elton has joined #ruby
speaking1ode has joined #ruby
charliesome has joined #ruby
CanTonic has joined #ruby
webdeveloper has joined #ruby
<webdeveloper>
may i ask a question?
<Radar>
webdeveloper: yes
<webdeveloper>
really?
<Radar>
You could even ask more than one question.
<webdeveloper>
you're so nice :)
speaking1ode is now known as speakingchode
<webdeveloper>
why are names like speakingchode allowed on here?
chibs has joined #ruby
<webdeveloper>
don't you have children and morals in this channel?
<Radar>
Do you have a question about Ruby?
hotpancakes has quit [Ping timeout: 244 seconds]
sross_work|2 has joined #ruby
speakingchode has quit [Ping timeout: 244 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
sross07 has quit [Read error: Connection reset by peer]
<Ropeney>
webdeveloper: whats wrong with that name?
<webdeveloper>
chode is a short and fat penis
<webdeveloper>
it's very offensive
<webdeveloper>
it's also slang for impotence and incompetence
<Ropeney>
or code was taken
<Radar>
webdeveloper: Why did you go through the nick list just to find an abusive nice?
<Radar>
nick*
<Radar>
Did you really seriously read through all 972 nicks?
speakingchode has joined #ruby
<Radar>
Or are you logging on two accounts and then trying to cause a scene?
<webdeveloper>
ⓘ speaking1ode is now known as speakingchode
dikaio has quit [Quit: ........]
<webdeveloper>
i was just about to ask my question until i saw that
mndoci has joined #ruby
<Radar>
Nothing will be done about that user. Please ask your question.
<Radar>
The user is not be abusive (other than the nick, which tbh I had to look up) and so let's leave it at that.
dionysus69 has joined #ruby
blackmes1 has joined #ruby
<webdeveloper>
so if a user had a nick ihatefags he wouldn't be kicked if he isn't abusive?
<Radar>
!kick webdeveloper I asked you to drop it.
webdeveloper was kicked from #ruby by ruboto [I asked you to drop it.]
webdeveloper has joined #ruby
<webdeveloper>
you kicked the wrong person
<Radar>
Sure I did.
<webdeveloper>
you're really stupid
<Radar>
is that you, govt?
<baweaver>
!mute webdeveloper
<Radar>
Thanks for the confirmation. I always suspected.
* baweaver
is impatient
webdeveloper has left #ruby [#ruby]
* Radar
awaits the PM spam
<Radar>
Obvious troll is obvious, yet again.
<baweaver>
!mute speakingchode
<baweaver>
anyways
<baweaver>
ruby
<TheNet_>
you just wasted all my popcorn :(
<eam>
baweaver: impatiens are lovely
<Radar>
What a waste of everyone's time. Gives me a nice little chuckle though every time they attempt to do... whatever it is they're doing.
<baweaver>
!.mute TheNet_
<baweaver>
oh
<baweaver>
wait
<baweaver>
too ban happy
<baweaver>
ignore me
<Radar>
baweaver: drop the weapon, sir.
* baweaver
sprints off
<eam>
I came up with a ruby joke
<baweaver>
is it Net::LDAP?
<eam>
what's Steve Irwin's least favorite Ruby class?
<eam>
baweaver: there's nothing funny about Net::LDAP
<Radar>
eam: StringRay?
<eam>
Array, yeah
<eam>
A-ray
<Radar>
crikey that was bad
<eam>
yeah it is
dionysus69 has quit [Remote host closed the connection]
d34th4ck3r has quit [Ping timeout: 255 seconds]
blackmes1 has quit [Ping timeout: 264 seconds]
kp666 has joined #ruby
<baweaver>
YOU'LL NEVER TAKE ME ALIVE CONNER
baweaver has left #ruby [#ruby]
baweaver has joined #ruby
axsuul has joined #ruby
d34th4ck3r has joined #ruby
OS-18454 has joined #ruby
chrissonar has joined #ruby
riotjones has joined #ruby
kp666 has quit [Ping timeout: 252 seconds]
kp666 has joined #ruby
Musashi007 has joined #ruby
hotpancakes has joined #ruby
riotjones has quit [Ping timeout: 250 seconds]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
Musashi007 has quit [Client Quit]
elton has quit [Remote host closed the connection]
CloCkWeRX has left #ruby [#ruby]
hotpancakes has quit [Ping timeout: 244 seconds]
OS-18454 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blt has joined #ruby
kp666 has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
bapa has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
hakunin_ has joined #ruby
kfpratt has quit [Remote host closed the connection]
davedev24 has quit []
kp666 has joined #ruby
neanderslob_ has joined #ruby
jessemcgilallen has joined #ruby
tmtwd has quit [Quit: Leaving]
dikaio has joined #ruby
jgt1 has joined #ruby
minimalism has quit [Quit: leaving]
hakunin_ has quit [Ping timeout: 244 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
claw has quit [Ping timeout: 255 seconds]
aganov has joined #ruby
blt has quit [Quit: WeeChat 1.3]
speakingchode has quit [Ping timeout: 250 seconds]
diegoviola has joined #ruby
startupality has joined #ruby
timonv has joined #ruby
elton has joined #ruby
kp666 has quit [Ping timeout: 255 seconds]
jeremy has joined #ruby
aufi has joined #ruby
jeremy is now known as Guest24850
diegoaguilar has quit [Quit: Leaving]
jgt1 has quit [Ping timeout: 268 seconds]
TheNet_ has quit [Remote host closed the connection]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has quit [Remote host closed the connection]
claw has joined #ruby
hxegon has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
tagrudev has joined #ruby
kp666 has joined #ruby
<Guest24850>
I have done a service which need to read some properties from a class. Whats the ruby way to force the class to have these properties (kind of interface)?
hxegon has joined #ruby
diegoaguilar has joined #ruby
arup_r has joined #ruby
kies has quit [Ping timeout: 244 seconds]
devbug_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 246 seconds]
kp666 has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
bruno- is now known as Guest48904
<atmosx_>
Guest24850: by 'force' you mean create them on the fly?
<atmosx_>
Guest24850: or you might be referring to duck-typing, which is usually done in ruby, check if the class supports the message type before using it?!
atmosx_ is now known as atmosx
Rollabunna has joined #ruby
<TTilus>
Guest24850: you are being way too vague to get any meaningfull answers
<Guest24850>
ok
<TTilus>
Guest24850: try showing some code and describing your usecase (in non-techical terms)
<Guest24850>
im wondering whats the best way to handle this kind of situation
<TTilus>
useless? how?
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has quit [Ping timeout: 255 seconds]
astrobun_ has joined #ruby
<Guest24850>
I mean the concerns is expecting the object to have the attributes... if you want to use others attributes you will have to override the methods
rabbithole has quit [Ping timeout: 250 seconds]
<Guest24850>
any suggestions to make that better?
<TTilus>
so you have class MyPayableThingy; extends ActivePayment::Models::Payable; ...; end
<TTilus>
there's no magic in include ActivePayment::Models::Payable
<Guest24850>
yes no magic :/
_aeris_ has quit [Ping timeout: 265 seconds]
idefine has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
<Guest24850>
its more like a default behavior
mloy_ is now known as mloy
foooobear has joined #ruby
tvw has joined #ruby
scottstamp has quit [Ping timeout: 265 seconds]
juanpablo__ has quit [Ping timeout: 246 seconds]
<TTilus>
if you need custom implementations of most of the stuff in there, you may very well skip include ActivePayment::Models::Payable and just use it as an example and implement the payable interface yourself
hotpancakes has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
<Guest24850>
so just adding what is required in the readme?
tkuchiki has joined #ruby
dikaio has quit [Ping timeout: 265 seconds]
idefine has quit [Remote host closed the connection]
scottstamp has joined #ruby
<TTilus>
although having the include has the documentational side of it, it is an explicit statement that you inted this class to be "a payable"
<Guest24850>
(in this lib you add acts_as_commentable in your models)
tris has quit [Excess Flood]
<Guest24850>
but the things is for me, I need to read attributes from the model so adding a magic class method will not help i think
blackmes1 has quit [Ping timeout: 260 seconds]
tris has joined #ruby
Lorn has quit [Ping timeout: 265 seconds]
<TTilus>
one way is to require your lib user to implement as_payable accessor to return poro-style payable object that ActivePayment::Models::Sale can consume
<Guest24850>
something like def as_payable; {amount: price....} end;
Marsjan has joined #ruby
<TTilus>
then of course you could have a sample/default implementation that could just be included in user's model if he makes assumptions match
<TTilus>
Guest24850: pretty much, yes, or def as_payable; ::ActivePayment::Models::Payable.new(attr); end
devoldmx has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
CanTonic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has joined #ruby
AlexRussia has quit [Ping timeout: 272 seconds]
<Guest24850>
what's attr?
bulletproof_ has joined #ruby
<Guest24850>
ok I see
arup_r has quit [Quit: Leaving]
<Guest24850>
do you think that would be better than the current impl?
<TTilus>
Guest24850: that's what your lib user is supposed to whip up based on what you document ::ActivePayment::Models::Payable.new nees and what his FinePayableItem class has available
<Guest24850>
at least, I will not have any name collisions
bulletproof_ has left #ruby [#ruby]
<TTilus>
...unless somebody has as_payable :D
<Guest24850>
lol
krzkrz has joined #ruby
krz has quit [Ping timeout: 240 seconds]
<TTilus>
in that case your default implementation concern could have name collision check, just to be sure
alec_ has joined #ruby
alec_ has quit [Client Quit]
<Guest24850>
what it should do if there is a collision?
lubarch has joined #ruby
<TTilus>
crash, burn and make a really loud noise
erichmenge has quit [Ping timeout: 246 seconds]
<Guest24850>
lol
<TTilus>
no, really
bodie__ has joined #ruby
<Guest24850>
oki :)
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TTilus>
you want that kind of stuff to really be all over the face of your library user with explanation of whats wrong and how to work around it
devoldmx has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
erichmenge has joined #ruby
SleepySensei has joined #ruby
Kruppe has quit [*.net *.split]
CloCkWeRX has joined #ruby
bodie_ has quit [*.net *.split]
marsjaninzmarsa has quit [*.net *.split]
zz_barkerd427 has quit [*.net *.split]
bodie__ is now known as bodie_
Marsjan is now known as marsjaninzmarsa
<Guest24850>
ok thanks!
relix has joined #ruby
<TTilus>
if you really expect as_payable (or actually to_payable might be more like it) to collide, you need to make that method name configurable
<Guest24850>
whats the advantage of returning ::ActivePayment::Models::Payable.new instead of an hash?
<Guest24850>
yes that would be the next step
jas02 has joined #ruby
<Guest24850>
for now, I would pretend I havent read that
<TTilus>
but i wouldn't bother before there's at least three separate cases of actual collisions happened
idefine has joined #ruby
firstdayonthejob has joined #ruby
Kruppe has joined #ruby
<Guest24850>
yep
<TTilus>
Guest24850: andvantage is to have encapsulation and separation of concerns, you don't end up implementing stuff that belongs to payable's responsibility in any place else, say Sale, where payable is used
hotpancakes has quit [Ping timeout: 244 seconds]
acke has joined #ruby
moeabdol has joined #ruby
tmtwd has joined #ruby
Moblin has joined #ruby
ohaibbq has joined #ruby
idefine has quit [Ping timeout: 255 seconds]
<Guest24850>
so I need to create a new class called Salable
safe has quit [Quit: Leaving]
radgeRayden_ has quit [Ping timeout: 272 seconds]
Ebok has quit [Ping timeout: 240 seconds]
chibs has quit [Ping timeout: 264 seconds]
tlarevo has quit [Read error: Connection reset by peer]
kstuart has quit [Ping timeout: 260 seconds]
lukaszes has joined #ruby
tlarevo has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
<Guest24850>
thank you for your recommendations
<TTilus>
aww, i was just refering to the possibility that if to_payable returns a hash (with no methods) and you end up actually needing processing that would be payable's responsibility, then you are tempted to implement that processing someplace where payable is used, like ActivePayment::Models::Sale
jgt1 has joined #ruby
<TTilus>
i wasn't suggesting any new classes
bMalum has joined #ruby
<atmosx>
>> require 'tzinfo'; a = TZInfo::Timezone.get('Europe/Athens'); a.now
<ruboto>
atmosx # => cannot load such file -- tzinfo (LoadError) ...check link for more (https://eval.in/462737)
tmtwd has quit [Ping timeout: 250 seconds]
<TTilus>
Guest24850: and if you some day judge, you'll need the kinda klass Salable would be, you might want to reconsider the name ;)
<TTilus>
Guest24850: np
terminalrecluse has joined #ruby
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
rgtk has joined #ruby
Zai00 has joined #ruby
seitensei has joined #ruby
<Guest24850>
what do you mean?
emilkarl has joined #ruby
haxrbyte has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
<Guest24850>
salable instead of payable?
<TTilus>
Guest24850: no = no problem (in response to your thanks)
<Guest24850>
I got that part lol
htmldrum has quit [Ping timeout: 240 seconds]
<TTilus>
Guest24850: and i did NOT recommend any new classes
baweaver has quit []
<Guest24850>
u said ::ActivePayment::Models::Payable.new
<Guest24850>
so it was a suggestion
jgt1 has quit [Ping timeout: 240 seconds]
<TTilus>
Guest24850: technically you already have ::ActivePayment::Models::Payable :)
gambl0re has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
<TTilus>
just need to make it instantiable
<Guest24850>
ah my concern
<Guest24850>
yes good idea ;-)
atmosx has quit [Quit: WeeChat 0.4.4-dev]
<TTilus>
...which of course makes it a class, so in that sense, a new class, u got me, i _did_ suggest a new class :D
stan has joined #ruby
kstuart has joined #ruby
gambl0re has joined #ruby
rgtk has quit [Remote host closed the connection]
TheNet has joined #ruby
Spami_ has joined #ruby
sdwrage has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
rgtk has joined #ruby
htmldrum has joined #ruby
kaneis has quit [Ping timeout: 240 seconds]
blackmes1 has joined #ruby
hotpancakes has joined #ruby
riffraff has quit [Quit: Leaving]
bruno- has joined #ruby
bruno- is now known as Guest38065
moeabdol has quit [Quit: WeeChat 1.3]
karapetyan has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
kies has joined #ruby
htmldrum has quit [Ping timeout: 265 seconds]
hotpancakes has quit [Ping timeout: 260 seconds]
Guest38065 has quit [Ping timeout: 240 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
AlexRussia has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d34th4ck3r has quit [Quit: zzz]
moeabdol has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
Zai00 has quit [Quit: Zai00]
tkuchiki has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
terlar has joined #ruby
DoubleMalt has joined #ruby
<aps>
How do I install a particular version (2.2.2) for system ruby?
Voker57 has joined #ruby
<aps>
it's an amazon linux machine. And yum install ruby22 installs 2.2.3
Coldblackice has joined #ruby
mndoci has quit [Remote host closed the connection]
hxegon_ has joined #ruby
haxrbyte_ has quit [Ping timeout: 250 seconds]
<ddv>
aps: by using a version manager
<ddv>
aps: rvm/rbenv/chruby etc
<ddv>
aps: also there is no reason not to use 2.2.3
<solars>
found it, debugger doesn't work in ruby 2
<Ox0dea>
solars: Consider pry + byebug.
fedexo has quit [Ping timeout: 246 seconds]
<solars>
Ox0dea, yep that's what I did, thanks
blueOxigen has quit []
bluOxigen has joined #ruby
yardenbar has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<Bish>
is there a cool way to do data[x...y].unpack("V").first without using first?
dionysus69 has joined #ruby
riotjones has joined #ruby
devoldmx has joined #ruby
neanderslob_ has quit [Read error: Connection reset by peer]
<Ox0dea>
Bish: No, that's just how #unpack works, and it makes sense.
<_lazarevsky_>
Ox0dea: it's invalid in that it first shows a textual representation of the html, and only then shows the HTML itself
sameerynho has joined #ruby
<Ox0dea>
Unpacking a single value is a pretty common case, granted, but you really want a generalized interface for things like that.
mugurel_ has quit [Remote host closed the connection]
<Ox0dea>
_lazarevsky_: That's... not invalid.
<Ox0dea>
At least, it's not likely to trip up any decent parser.
xwalk has joined #ruby
<norc>
A method that return either an array or elements or an element depending on the length of a parameter would feel quite eradic imo.
axsuul has quit [Ping timeout: 250 seconds]
<Ox0dea>
Well, for #unpack, it'd be to do with the template string, not its length, but yeah.
riotjones has quit [Ping timeout: 250 seconds]
<_lazarevsky_>
Ox0dea: ok lemme gist what the Nokogiri::HTML object looks like after I've loaded the email body
devoldmx has quit [Ping timeout: 246 seconds]
<xwalk>
I'm working on an application that's going to be used to manage training for new hires. It'll need user authentication, training document management, and the ability to track stats like courses currently being taken/completed, login times, etc. I'm considering Rails with Refinery to do this. Does this seem feasible with those two?
<Ox0dea>
_lazarevsky_: It looks like it skipped right over the non-HTML, no?
idefine has joined #ruby
<_lazarevsky_>
ya but how do I get access to the html bit?
lubarch has joined #ruby
<_lazarevsky_>
I've tried doc.xpath
<_lazarevsky_>
doc.css
ESpiney has quit [Read error: Connection reset by peer]
<_lazarevsky_>
it returns empty arrays
<_lazarevsky_>
doc is obciously the Nokogiri object with the body loaded
but3k4 has joined #ruby
CloCkWeRX has joined #ruby
<Ox0dea>
Nokogiri is extensively documented.
chibs has joined #ruby
<_lazarevsky_>
Ox0dea: ...
<_lazarevsky_>
Ox0dea: dude I've been reading the docs.. something else is the problem
<_lazarevsky_>
obviously nokogiri did not load the document properly
<_lazarevsky_>
but, how did you infer that nokogiri skipped the non-html part of the message.body ?
<_lazarevsky_>
did you get that by looking at the gist I posted?
idefine has quit [Ping timeout: 244 seconds]
shredding has joined #ruby
rdark has joined #ruby
<Ox0dea>
_lazarevsky_: Well, yes; the outermost element is "document", whereas it would be "text" if the textual fragment had been included in the parse.
sgambino has joined #ruby
d34th4ck3r has quit [Quit: zzz]
<_lazarevsky_>
ya but then the ONLY element within the document > html > body is <p>
CloCkWeRX has quit [Ping timeout: 260 seconds]
elton has joined #ruby
<Ox0dea>
Oh, I see.
chibs has quit [Ping timeout: 252 seconds]
FernandoBasso has joined #ruby
<Ox0dea>
_lazarevsky_: That <span> you were looking for earlier is the start of the body's HTML content, then?
houhoulis has quit [Remote host closed the connection]
<_lazarevsky_>
pardon?
<_lazarevsky_>
Ox0dea: no it's not the start of it
erbesharat has quit [Ping timeout: 268 seconds]
<_lazarevsky_>
on the contrary, it's at the very end of it
lubarch has quit [Quit: leaving]
<Ox0dea>
_lazarevsky_: With what level of certainty can you say that the textual part will not contain '<'?
juanpablo__ has joined #ruby
<_lazarevsky_>
I can say with 100% certainty that it will contain <
darkf_ is now known as darkf
<Ox0dea>
_lazarevsky_: I see. Is it also likely that it will contain "<html>", then?
elton has quit [Ping timeout: 260 seconds]
<_lazarevsky_>
not really, no
mistermocha has joined #ruby
<_lazarevsky_>
Ox0dea: nope
<_lazarevsky_>
Ox0dea: only the second part contains <htmL>
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
>> s = 'foo bar baz <html> ... </html>'; s.slice!(0, s.index('<html')); s # _lazarevsky_
<_lazarevsky_>
Ox0dea: and btw this is why I wanted to use xpath to get the value I wanted.. I kenw it would be such a mission to parse this thing
<Ox0dea>
_lazarevsky_: What're you using that lets you use XPath to search a raw string?
<_lazarevsky_>
pardon
<_lazarevsky_>
I meant Regex
<_lazarevsky_>
I meant good ol' regex
<Ulfalizer>
is there some way to run some code (or just set a variable in this case) before running a script? more specifically, i want to run ext/nokogiri/extconf.rb but set DESTDIR before it is run. (DESTDIR in turn is used in rbconfig.rb, which is included by mkmf.rb to get build information.)
<Ox0dea>
_lazarevsky_: I don't sell that particular brand of footgun.
nfk|laptop has joined #ruby
<_lazarevsky_>
hahaha
<_lazarevsky_>
haaaaahahahha
<_lazarevsky_>
good one
ldnunes has joined #ruby
<Ox0dea>
_lazarevsky_: Got all kinds, mind, just not that'n.
juanpablo__ has quit [Ping timeout: 264 seconds]
<Ulfalizer>
it's for messy cross-compilation reasons
mistermocha has quit [Ping timeout: 240 seconds]
TheNet has joined #ruby
hotpancakes has joined #ruby
sepp2k has joined #ruby
<_lazarevsky_>
Ox0dea: aghh.. it's not the only span I got in my strig
<_lazarevsky_>
\string*
<_lazarevsky_>
but it's a good start
<_lazarevsky_>
thanks a milliion mate!
<_lazarevsky_>
you totally solved my problem
gagrio_ has joined #ruby
tulak_ has joined #ruby
tulak has quit [Read error: Connection reset by peer]
gagrio has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
mikecmpbll has joined #ruby
CloCkWeRX has joined #ruby
tulak has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lipoqil has quit [Quit: Connection closed for inactivity]
Xeago has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
<Ox0dea>
♫ We do what we can because we must. ♫
<Ox0dea>
_lazarevsky_: Happy to have helped.
gagrio_ has quit [Ping timeout: 246 seconds]
tulak_ has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 240 seconds]
merlinp has quit [Remote host closed the connection]
<_lazarevsky_>
Ox0dea: I was thinking I could set the text of the span to
xwalk has left #ruby [#ruby]
<_lazarevsky_>
##|token-val
<_lazarevsky_>
so I'll search for ##
<_lazarevsky_>
return that and then delimit on |
<_lazarevsky_>
and get the second element of the resulting array
Xeago has quit [Remote host closed the connection]
<_lazarevsky_>
that should do the trick
<Ox0dea>
It's bodgy, but it should work.
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #ruby
lukaszes has joined #ruby
dEPy has joined #ruby
tlarevo_ has quit []
JammyHammy has quit [Read error: Connection reset by peer]
<dEPy>
How do I select only IDs in a table when I have array of array of other fields (like name, surname, ...)
<dEPy>
But the whole set of fields must match, for example has to have name 'John', surname 'Doe', age: 10, ...
<Ox0dea>
dEPy: Are you writing raw SQL?
<dEPy>
Ox0dea: well, no. I can programatically replace field values
suchness has joined #ruby
<suchness>
I have been using datamapper for the last... 6 years. I am used to being able to do something like User.all.comments to get all the comments of all the users. I am moving to ActiveRecord now, and don't see how to accomplish the same thing. It seems like I can only chain comments after one instance of User, like User.first.comments. Anyone know how I should be doing the ActiveRecord equivilent to User.all.comments?
<Ox0dea>
dEPy: Well, if you've got an array of arrays, I assume you don't have keys, in which case you'll have to map by index.
chthon has quit [Quit: Ex-Chat]
cwong_on_irc has quit [Quit: Leaving.]
<dEPy>
Ox0dea: I have the data in this format: [ [name: 'John', surname: 'Doe', age: 15]. [...], [...], ... ]
<dEPy>
so for each array ofr fields in my main array I need to get id back for that record
gagrio_ has joined #ruby
krz has quit [Ping timeout: 265 seconds]
<dEPy>
I just realized it's an array of hashes actually :D
djellemah has quit [Read error: Connection reset by peer]
Bloomer has quit [Remote host closed the connection]
<dEPy>
Yes, but I don't know how to do that except doing a SELECT for each set of fields. Is there no better way?
bruno- has joined #ruby
bruno- is now known as Guest4166
Regulati_ has joined #ruby
xwalk has joined #ruby
<Ox0dea>
dEPy: There's likely some way to ask an auto-incrementing column which value it would use next, and then you'd just do some addition, but that's brittle.
RegulationD has quit [Ping timeout: 252 seconds]
DEA7TH has quit [Client Quit]
timonv has quit [Quit: WeeChat 1.3]
Zai00 has quit [Quit: Zai00]
timonv has joined #ruby
Guest4166 has quit [Ping timeout: 255 seconds]
nabinno has quit [Ping timeout: 264 seconds]
DaniG2k has quit [Quit: leaving]
nitrix has quit [Ping timeout: 250 seconds]
stamina has joined #ruby
<dEPy>
ugh
<dEPy>
Ox0dea: I would preferrably like something like SELECT id FROM table WHERE [name,surname,age] IN [ {...}, {...}, {...} ]
TheNet has quit [Ping timeout: 246 seconds]
<Ox0dea>
dEPy: There's no guarantee that would map 1-to-1 with the data you've got on hand, though?
<dEPy>
It is in my case
<Ox0dea>
Famous last words.
<dEPy>
:D
htmldrum has joined #ruby
Luna_Moonfang has quit [Quit: WeeChat 1.3]
hotpancakes has joined #ruby
symbol_ has joined #ruby
Luna_Moonfang has joined #ruby
Luna_Moonfang has quit [Changing host]
Luna_Moonfang has joined #ruby
idefine has joined #ruby
<dEPy>
I have this activities table where each row is unique.
<dEPy>
It's basically like a log of events for each user. And each event can only happen once.
Porfa has joined #ruby
<Porfa>
hello dear friends
<Ox0dea>
dEPy: Right, but what guarantees you don't have two James Smiths aged 23?
<Ox0dea>
Porfa!
matp has joined #ruby
<dEPy>
Ox0dea: just belive me it's unique.
Guest95113 has joined #ruby
<xwalk>
#join refinery
<Porfa>
life taught me nothing is unique. but i guess digital isn't life, so you are right. i just wanted to say something.
shredding has quit [Ping timeout: 240 seconds]
<dEPy>
one row is mostly made out IDs so no clashing there
<Ox0dea>
Porfa: Isn't the Antikythera Mechanism unique?
blueOxigen has joined #ruby
karapetyan has quit [Remote host closed the connection]
<purplexed->
What is a normal way of installing a ruby application on windows ? ... I'm trying to avoid using an installer like MSInstall.. so I'm wondering if Chocolatey is a good choice, since it can also install Ruby, if a machine doesn't have it
<dEPy>
So is there anything or will I really have to do a select for each field set?
hotpancakes has quit [Ping timeout: 260 seconds]
idefine has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 272 seconds]
krz has joined #ruby
zylogz80 has joined #ruby
Spami_ has quit [Quit: Leaving]
beauby_ has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
lxsameer_ has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
skade has quit [Quit: Computer has gone to sleep.]
sameerynho has quit [Ping timeout: 268 seconds]
prestorium has joined #ruby
zenguy_pc has joined #ruby
sameerynho has joined #ruby
blueOxigen has left #ruby [#ruby]
lxsameer_ has quit [Ping timeout: 260 seconds]
abucha has joined #ruby
sonOfRa has quit [Quit: Bye!]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elton has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
sonOfRa has joined #ruby
sonOfRa has quit [Client Quit]
juanpablo__ has joined #ruby
kimegede has quit [Quit: Leaving...]
sonOfRa has joined #ruby
elton has quit [Ping timeout: 252 seconds]
dnomyar has joined #ruby
idefine has joined #ruby
kimegede has joined #ruby
juanpablo__ has quit [Ping timeout: 255 seconds]
idefine has quit [Ping timeout: 240 seconds]
mndoci has joined #ruby
pandaant has joined #ruby
zotherstupidguy has joined #ruby
Jardayn has joined #ruby
blackmes1 has joined #ruby
skade has joined #ruby
krz has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
subscope has joined #ruby
baweaver has joined #ruby
Ropeney has joined #ruby
Xeago has joined #ruby
kimegede has quit [Quit: Leaving...]
mndoci has quit [Ping timeout: 260 seconds]
asmodlol has joined #ruby
hxegon has quit [Ping timeout: 252 seconds]
mdih has quit [Ping timeout: 252 seconds]
Xeago has quit [Read error: Connection reset by peer]
krz has joined #ruby
diesel has quit [Ping timeout: 272 seconds]
Rollabunna has quit [Quit: Leaving...]
baweaver has quit [Ping timeout: 246 seconds]
Balllkenende is now known as Ballkenende
Ballkenende is now known as Balllkenende
djellemah has joined #ruby
Gooddaytoyousir has joined #ruby
xwalk has quit [Quit: leaving]
<Porfa>
hey folks, anyone uses OCI8 with ruby? …. why the hell does it spits everything in scientific notation by default?… for instead of "89" i get "0.89E2"
<Porfa>
instead of "29" i get "0.29E2" ...
adac has quit [Quit: Leaving]
dnomyar has quit [Ping timeout: 252 seconds]
adac has joined #ruby
<Ox0dea>
Porfa: That's probably configurable?
syath has joined #ruby
xet7 has quit [Quit: Leaving]
<Porfa>
yeah, but it's just weird because i just followed a tutorial, and by default it's giving me this data, no mention on how to change it.
<adac>
Installing ruby via source. I'm wondering which paths I do have to set so that the gems and the bundles do go into an users home directory? BUNDLE_PATH, GEM_PATH, anything else?
<Porfa>
Ox0dea: yeah, i'll use that as a wrokaround
<Porfa>
<Porfa>
thank you =)
<Ox0dea>
Sure thing.
Zai00 has joined #ruby
chrislotix has quit [Ping timeout: 260 seconds]
chrislotix has joined #ruby
Mon_Ouie has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
dEPy has quit [Quit: (null)]
gregf has quit [Quit: WeeChat 1.3]
sepp2k has joined #ruby
solocshaw has joined #ruby
gregf has joined #ruby
Guest73688 has quit [Quit: oh cruel destiny]
ebbflowgo has joined #ruby
ebbflowgo has quit [Client Quit]
ebbflowgo has joined #ruby
xfbs has joined #ruby
zylogz80 has quit [Ping timeout: 265 seconds]
xfbs has quit [Max SendQ exceeded]
idefine has joined #ruby
xfbs has joined #ruby
Ropeney has quit [Read error: Connection reset by peer]
BLuEGoD has joined #ruby
tkuchiki has joined #ruby
sepp2k has quit [Ping timeout: 260 seconds]
tkuchiki has quit [Remote host closed the connection]
ebbflowgo has quit [Read error: Connection reset by peer]
ebbflowgo has joined #ruby
pontiki has joined #ruby
pontiki has quit [Remote host closed the connection]
hotpancakes has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idefine has quit [Ping timeout: 268 seconds]
pontiki has joined #ruby
pontiki has quit [Client Quit]
pontiki has joined #ruby
charliesome has joined #ruby
blackmes1 has quit [Ping timeout: 250 seconds]
riotjones has joined #ruby
devoldmx has joined #ruby
roshanavand has joined #ruby
karapetyan has joined #ruby
bonemind has quit [Ping timeout: 240 seconds]
sami has quit [Quit: leaving]
bonemind has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
sami has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
devoldmx has quit [Ping timeout: 255 seconds]
houhoulis has joined #ruby
charliesome_ has joined #ruby
charliesome_ has quit [Client Quit]
roshanavand has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
merlinp has joined #ruby
sameerynho has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
merlinp is now known as pimpin
chibs has joined #ruby
infamos has quit [Ping timeout: 244 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
chriscoffee has joined #ruby
nhhagen has joined #ruby
bruno- has joined #ruby
DEA7TH has joined #ruby
bruno- is now known as Guest82609
elton has joined #ruby
arup_r has joined #ruby
chibs has quit [Ping timeout: 240 seconds]
sdothum has joined #ruby
Spami has joined #ruby
symbol_ has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
Guest82609 has quit [Ping timeout: 252 seconds]
hotpancakes has joined #ruby
mistermocha has joined #ruby
elton has quit [Ping timeout: 265 seconds]
<norc>
Ox0dea: You mentioned that post on SO yesterday about some seemingly bizarre String#[] behaviour right?
<soahccc>
How do you test for readline support? :) iirc configure did it for me on ubuntu automatically
atomical_ has joined #ruby
<adac>
soahccc, maybe if the lib is installed then it does it automagically?
<Ox0dea>
Aye, it should've found it there.
colegatron has joined #ruby
<adac>
not tested this yet
<adac>
:D
<adac>
this were the paths on my local machine you know
<adac>
the other stuff happend on docker
JDiPierro has quit []
<adac>
where this readline lib has not been installed
<Ox0dea>
adac: So you've not actually tried to compile it yet?
bruno-_ has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
<adac>
Ox0dea, sure, but without this lib installed with apt-get
Porfa has joined #ruby
_stu_ has joined #ruby
<adac>
now installing th lib and try to recompile ruby
<Ox0dea>
Should go swimmingly.
<Ox0dea>
Ruby's build system goes well out of its way to locate libraries automatically.
<adac>
:-) Looking forward to it!
nhhagen has quit [Remote host closed the connection]
<Ox0dea>
It checks, like, twenty different places for Tk.
bruno-_ has joined #ruby
Wsewolod has quit [Ping timeout: 240 seconds]
<adac>
takes some time docker must rebuild a lot
atomical has quit [Ping timeout: 255 seconds]
nhhagen has joined #ruby
<Ox0dea>
Consider looking into ccache.
zotherstupidguy has quit [Ping timeout: 260 seconds]
<Ox0dea>
Although that's not terribly relevant if you won't be compiling many things.
mistermocha has quit [Ping timeout: 246 seconds]
NeverTired has joined #ruby
<adac>
Ox0dea, kk thanks!
mdih has joined #ruby
<Ox0dea>
adac: Sure thing.
tmtwd has quit [Ping timeout: 252 seconds]
arthurix has joined #ruby
xet7 has quit [Quit: Leaving]
bruno-_ has quit [Ping timeout: 260 seconds]
seitensei has joined #ruby
seitensei has joined #ruby
tulak has joined #ruby
ahegyi has joined #ruby
roshanavand has joined #ruby
tulak has quit [Remote host closed the connection]
dtordable has joined #ruby
inteq has joined #ruby
<dtordable>
hello, anyone
Icey has joined #ruby
<havenwood>
dtordable: hi
platzhirsch has quit [Quit: Leaving.]
sandals is now known as prodigal_pdev
Icey has quit [Changing host]
Icey has joined #ruby
platzhirsch has joined #ruby
<Bish>
since im always asking stupid questions here: i want to throw an exception if only one of 2 variables is >0, so basicially an xor, they can be both zero or both nonzero, how can i do that in a cool way
tkuchiki has quit [Remote host closed the connection]
mordocai has joined #ruby
dhollinger has joined #ruby
trabulmonkee has joined #ruby
<hashpuppy>
that's actually really ncie
tkuchiki has joined #ruby
dopamean_ has joined #ruby
diegoaguilar has joined #ruby
dhollinger has quit [Client Quit]
dhollinger has joined #ruby
Balllkenende has quit [Ping timeout: 240 seconds]
Limix has joined #ruby
tigarcia has quit [Remote host closed the connection]
bruno- has joined #ruby
platzhirsch has quit [Read error: Connection reset by peer]
NeverTired has quit []
mary5030 has joined #ruby
bruno- is now known as Guest59270
mary5030 has quit [Remote host closed the connection]
NeverTired has joined #ruby
tigarcia has joined #ruby
mary5030 has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
zz_barkerd427 has joined #ruby
axl_ has joined #ruby
govg has joined #ruby
kp666_ has joined #ruby
wldcordeiro has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DiCablo has quit [Read error: Connection reset by peer]
tobiasvl has quit [Ping timeout: 252 seconds]
djcp has quit [Ping timeout: 255 seconds]
antgel has joined #ruby
zenguy_pc has quit [Ping timeout: 246 seconds]
treehug88 has joined #ruby
<Ox0dea>
hashpuppy: Aye, it's pretty nifty, particularly for things like rotating a grid: https://eval.in/463095
p0wn3d__ has joined #ruby
iceden has joined #ruby
mary5030 has quit [Ping timeout: 265 seconds]
pwnd_nsfw has joined #ruby
monthy has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<havenwood>
hashpuppy: Just an aside, but if you have the Hashes narrowed down to just those whose values you want added you can: inject { |memo, h| memo.merge(h) { |_, v_old, v_new| v_old + v_new } }
adac has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Remote host closed the connection]
kies^ has joined #ruby
djcp has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
<JoshL>
are Ruby case statements constant-time dispatch?
<Ox0dea>
hashpuppy: To add to havenwood's (really good) suggestion, Hash#reject won't convert the Hash to key-value pairs like most of the other Enumerable methods.
zotherstupidguy has quit [Ping timeout: 250 seconds]
gilesw has joined #ruby
skade has joined #ruby
tvl has joined #ruby
brt has joined #ruby
tvl is now known as tobiasvl
<hashpuppy>
havenwood: thanks for the tip
elperdut_ has joined #ruby
<Ox0dea>
JoshL: I may've jumped the gun in answering your question, but it is the case that Ruby's `checkmatch` bytecode instruction doesn't go out of its way to optimize anything.
devoldmx has joined #ruby
User458764 has quit [Ping timeout: 240 seconds]
zotherstupidguy has joined #ruby
<Ox0dea>
The VM emits a `setinlinecache` instruction just before entering a case statement, for what that's worth.
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<JoshL>
Ox0dea: Hm. All the documentation equates case statements to a more idiomatic form of multiple if/elsif with ===. Is it actually more performant than a big elsif block or is this just sugar?
<shevy>
I actually don't even understand lacrymology's question
<Ox0dea>
I feel like maybe nobu just doesn't want to bother fixing something so complicated for so little gain. :<
build22 has quit [Ping timeout: 250 seconds]
<shevy>
what does he mean "without having to add syntax" ... does he mean without having to add code?
<Ox0dea>
No idea, but I know what they wanna do.
<shevy>
Ox0dea nobu is busy adding foo.?bla thingies
<Ox0dea>
Dat .?[] doe.
<shevy>
and frozen strings
<shevy>
we don't have time for other stuff!
idefine has quit [Ping timeout: 264 seconds]
totimkopf is now known as encapuzado
<shevy>
also, refinements are way too limited
<shevy>
there should be a tabula rasa state of default ruby
dtordable has joined #ruby
dtordable has joined #ruby
<Ox0dea>
lacrymology: Still about?
<shevy>
so that projects can refer to this initial state, rather than any randomly derived modification; the whole refinement implementation so far does not include that at all
<lacrymology>
Ox0dea, shevy: sorry, both about the vague question and leaving
<Ox0dea>
lacrymology: You monster.
Aswebb_ has joined #ruby
Xeago has quit [Remote host closed the connection]
trabulmonkee has quit [Quit: Connection closed for inactivity]
<lacrymology>
the question was: is it possible to have `if foo 'true' else 'false' end` resolve to 'false' for a non-nil/non-false object foo, by defining some method on foo. In python I'd override foo.__bool__ (py3) or foo.__nonzero__ (py2)
Pupeno has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 240 seconds]
<shevy>
aha
<lacrymology>
Right now I've defined foo.to_bool and I'm doing `if foo.to_bool`, I was wondering if it was possible to avoid that
<lacrymology>
just as a bit of sugar
<shevy>
I think objects in ruby do not have a boolean method/value per se
govg has quit [Ping timeout: 260 seconds]
<Ox0dea>
lacrymology: Whale, you could define a custom #! method, or you could define #coerce, but then you'd have to explicitly compare to `true` or `false`, and that's lame. :<
<shevy>
at the last I never saw something like __bool__ in ruby... perhaps this is where python outperforms ruby :)
Ilyes512_ has joined #ruby
nertzy has joined #ruby
kalusn has quit [Remote host closed the connection]
<Ox0dea>
For a very loose definition of "outperforms", mind.
govg has joined #ruby
freerobby has quit [Quit: Leaving.]
<lacrymology>
I'm not going to enter this argument
<lacrymology>
=P
Balllkenende has joined #ruby
SeeThruHead has joined #ruby
freerobby has joined #ruby
<lacrymology>
I'm just going to say "namespaces"
<SeeThruHead>
anyone using fish shell with rvm? having trouble getting the default to actually be in use on a new shell
<shevy>
well he could get behaviour in python that he could not get at ruby, at the same level (if/else checks)
<Ox0dea>
lacrymology: Those're one honking great idea.
Icey has quit [Ping timeout: 265 seconds]
<izzol>
I guess Rails is the best Ruby framework for the web apps? I will need to create one project ;-)
<Ox0dea>
shevy: Well, sure, but pursuant to circumventing a perfectly logical notion of truthiness.
Musashi007 has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<shevy>
hey wait a moment
Ilyes512 has quit [Ping timeout: 265 seconds]
<shevy>
"perfectly logical" ... what's with your _____ code!!!
<Ox0dea>
Sometimes I'm serious.
<shevy>
:D
<Ox0dea>
lacrymology: Really, you should just be a little more explicit in your comparison. :P
<shevy>
the fish shell is cool
<shevy>
unfortunately I am still with bash
<Ox0dea>
Xiki is cooler.
hotpancakes has quit [Remote host closed the connection]
<lacrymology>
Ox0dea: to_bool is good for me. Honestly, it's for something I wish rails would handle (converting 't', 'true', '1', 'on' to true, etc)
<Ox0dea>
Yuck.
Ilyes512 has joined #ruby
<shevy>
lacrymology hahaha I use that too
elton has quit [Remote host closed the connection]
<shevy>
for yaml files where I am too lazy to write true or false; i just write t and f
chibs has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
DEA7TH has quit [Quit: DEA7TH]
<lacrymology>
maybe it's possible to write some kind of middleware on rails that handles the parameters, I've been using it for exactly 15 hours so far
<Ox0dea>
Croves: Do you understand what is happening?
<Croves>
Thank you, shevy
troulouliou_div2 has quit [Quit: Leaving]
<Croves>
Kind of...
<Croves>
The `nill` it's just the return of that method... maybe?!
Pupeno has quit [Remote host closed the connection]
hmsimha_ has joined #ruby
<Ox0dea>
Croves: Why are you saying "nill"?
zenguy_pc has joined #ruby
<Croves>
Ox0dea Oh, it's NIL
<Croves>
With only one L
rbennacer has quit [Remote host closed the connection]
<Croves>
Didn't realized that...
<Ox0dea>
> For all its power, the computer is a harsh taskmaster. Its programs must be correct, and what we wish to say must be said accurately in every detail.
symm-_ is now known as symm-
<Ox0dea>
Attention to detail is of paramount importance.
<Ox0dea>
The capitalization was for emphasis, shevy.
Limix has joined #ruby
tubuliferous_ has joined #ruby
<shevy>
DO NOT CODE IN CAPS, WE KNOW WHICH PROGRAMMING LANGUAGE REQUIRED THAT
<Ox0dea>
LOLCODE!
<Ox0dea>
(Not really; only the keywords.)
<bougyman>
LISP ALLOWS IT, TOO
Ilyes512 has joined #ruby
<bougyman>
it actually upcases every function name
<bougyman>
and symbol, iirc
<Ox0dea>
Only certain dialects.
<shevy>
well, as you get older and your eyes become worse, upcasing really helps!
<bougyman>
Ox0dea: when I say LISP i mean COMMON-LISP
Ilyes512 has quit [Max SendQ exceeded]
mrtomme has quit [Ping timeout: 260 seconds]
<Ox0dea>
bougyman: Yes, that's certainly one that does.
blackmes1 has quit [Ping timeout: 250 seconds]
<Ox0dea>
(It's slightly infuriating.)
Ilyes512 has joined #ruby
mrtomme has joined #ruby
momomomomo_ has joined #ruby
<Ox0dea>
Croves: `4 + 2` *returns* 6, but it doesn't *do* anything else; the `print` method, on the other hand, *does* something, in that it outputs what you told it to, but it *returns* `nil`.
momomomomo has quit [Read error: Connection reset by peer]
momomomomo_ is now known as momomomomo
zylogz80 has quit [Ping timeout: 246 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Croves>
Ox0dea Well, I imagine that in the Ruby core there's something like function print(args) output args return nil
<Ox0dea>
Croves: That's right.
rob_ has joined #ruby
<Croves>
LOL please don't spank me
vdamewood has joined #ruby
<Croves>
Oh, really...
<Croves>
Nice to know... I tough that you guys would make fun of me because of my example
lemur has joined #ruby
<rob_>
hi, has anyone run webrick in docker and noticed that it doesnt bind to it's usual default port, but instead a random one? is this configurable by an environment variable?
freerobby has quit [Quit: Leaving.]
<Croves>
For a beginner, should I use print or puts?
Guest53 has joined #ruby
ibouvousaime has quit [Ping timeout: 246 seconds]
Ilyes512 has quit [Client Quit]
houhouli_ has quit [Remote host closed the connection]
<rob_>
Croves: puts is most common
<Croves>
That `nil` in the end is start to bother me.. at least with puts it goes to the other line
<pontiki>
Croves: it depends on whether you want a line-feed added to the end of the output
<rob_>
print doesn't append a new line to the string it prints
<Ox0dea>
Croves: You should use whichever is more appropriate; sometimes you don't want the newline.
<Ox0dea>
Croves: For displaying things intended for *you* and not your user (debugging), you should use `p`.
swgillespie has joined #ruby
freerobby has joined #ruby
<Croves>
Thanks guys
<Croves>
:)
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubuliferous_ has quit [Ping timeout: 240 seconds]
Icey has joined #ruby
Icey has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
<rob_>
'p' is equivalent to puts object.inspect. if you install the 'awesome_print' gem and 'require' it then you'll get even nicer output when inspecting data
Guest97 has joined #ruby
DrCode has quit [Read error: Connection reset by peer]
lemur has quit [Ping timeout: 265 seconds]
mozzarella has quit [Quit: WeeChat 1.2]
Xeago has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
mozzarella has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
kashyap has joined #ruby
mikecmpbll has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PlasmaStar has quit [Ping timeout: 240 seconds]
Balllkenende has joined #ruby
dionysus69 has joined #ruby
rakm has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
codecop has joined #ruby
tomphp has joined #ruby
Guest53 has joined #ruby
rakm has quit [Client Quit]
tubuliferous_ has quit [Ping timeout: 260 seconds]
Balllkenende has quit [Ping timeout: 244 seconds]
stan has quit [Ping timeout: 268 seconds]
hotpancakes has quit [Remote host closed the connection]
jeradW has left #ruby [#ruby]
DrCode has joined #ruby
asianMike has quit [Remote host closed the connection]
PlasmaStar has joined #ruby
imperator has left #ruby ["Leaving"]
<Croves>
Nice thing the use of `..` and `...` to indicate closed and open intervals
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Balllkenende has joined #ruby
<Ox0dea>
Croves: Ruby wants you to be happy.
baweaver has joined #ruby
<Croves>
I'm already in love with it, Ox0dea
<Ox0dea>
Excellent! <3
<Croves>
God, why did I waste so many time of my life with PHP?
<Ox0dea>
Ouch.
<shadeslayer>
Hah
<Croves>
So much time*
<shadeslayer>
Should introduce to some of the PHP people I know then xD
<Ox0dea>
Croves: It might help to look at that mistake as a sort of reverse-learning: you know so many things not to do. :P
<kashyap>
Hi, any hints as to how I can resolve this? Mostly dep issue I guess:
<kashyap>
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- v8 (LoadError)
<Croves>
For sure, Ox0dea :)
dravine has quit [Ping timeout: 250 seconds]
skcin7 has joined #ruby
<kashyap>
I did a `gem install require`, but I doubt that's what it is complaining aobut.
<kashyap>
s/aobut/about/
The_Phoenix has quit [Read error: Connection reset by peer]
<Ox0dea>
kashyap: You want `gem i therubyracer`.
DrCode has quit [Read error: Connection reset by peer]
<kashyap>
Ox0dea: Ah-ha, thank you, let me try.
<Ox0dea>
kashyap: Sure thing.
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
sebstrax has quit [Quit: Connection closed for inactivity]
melter has joined #ruby
s2013 has joined #ruby
Uranio has joined #ruby
JDiPierro has joined #ruby
<kashyap>
Oh, that fails spectacularly
dragonkh has joined #ruby
BigDiesel007 has joined #ruby
<Ox0dea>
kashyap: You're likely missing some dependencies.
<kashyap>
Yeah, getting them. . .
hectorsq has joined #ruby
hypnosb has joined #ruby
dravine has joined #ruby
lubarch has joined #ruby
<dragonkh>
hi - I'm trying to follow a simple C extension tutorial - I made the C extension and the extconf.rb and ran it and it produced a Makefile - which I ran successfully which it produced an .o file and a myext.bundle - the instructions say I can now fire up irb and require 'myext' however it does not find it
JayNeely has quit [Ping timeout: 246 seconds]
<Ox0dea>
dragonkh: How about `irb -r ./myext`?
<kashyap>
Ox0dea: How on earth did you figure that dep. (Asking this as someone who only occasionally use Jekyll, maybe you memorized most stuff).
hotpancakes has quit [Ping timeout: 268 seconds]
mag42c has joined #ruby
Ra_ has joined #ruby
<Ox0dea>
kashyap: therubyracer is the most popular gem for providing a JS runtime.
mistermocha has quit [Remote host closed the connection]
<dragonkh>
Ox0dea, what should it be loading? the myext.bundle or the .o file ?
yqt has quit [Ping timeout: 244 seconds]
<Ox0dea>
And V8 is the most popular of those.
<Ox0dea>
dragonkh: I'm not sure why you're getting a .bundle and not a .dylib, to be honest.
mistermocha has joined #ruby
<dragonkh>
ok well your suggestion worked
<dragonkh>
I'm on OSX
<dragonkh>
if that helps
<Ox0dea>
I know.
skade has quit [Quit: Computer has gone to sleep.]
<dragonkh>
its pretty old - but it does seem to work
skade has joined #ruby
<Ox0dea>
dragonkh: Yeah, your error was only because `require` couldn't find your thing in $LOAD_PATH.
<kashyap>
Ox0dea: Ah, I see.
riotjones has joined #ruby
Balllkenende has quit [Remote host closed the connection]
Ra_ has left #ruby ["Leaving"]
<Ox0dea>
dragonkh: When your extension is installed normally (as part of a gem), it'll be discoverable by the RubyGems system (and thus `require`).
haxrbyte has joined #ruby
roshanavand has quit [Remote host closed the connection]
<Ox0dea>
You circumvented that by telling `irb` to look in the current directory, which you could also have done with `irb -I . -r myext`.
hmsimha_ has quit [Ping timeout: 265 seconds]
dnomyar has quit [Ping timeout: 268 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
symm- has joined #ruby
<dragonkh>
Ox0dea, I found the issue: ruby -e "require 'rbconfig'; puts RbConfig::CONFIG['DLEXT'];" produces bundle not so
mistermocha has joined #ruby
Bloomer has quit [Remote host closed the connection]
<Ox0dea>
dragonkh: Nah, that's not an "issue", per se; dynamic libraries usually have a .dylib extension on OS X, but .bundle is apparently kosher too.
<dtordable>
where a guide to learn Ruby as a PDF format is?
BigDiesel007 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has quit [Ping timeout: 244 seconds]
<Ox0dea>
dtordable: Should I phone the authorities?
<dragonkh>
Ox0dea, well apparently you can set the value of DLEXT to .dylib or .so instead and its something to do with the LLVM gcc or rvm
<dtordable>
Ox0dea: why?
<Ox0dea>
dtordable: Well, did or did you not just ask >1k people to aid and abet you in the infringement of copyright?
aef has joined #ruby
<eam>
Ox0dea: he may not live somewhere that criminalizes the sharing of information
<Croves>
What's the convetion behind using { } or `do...end` ?
karapetyan has joined #ruby
<dtordable>
Ox0dea: but for learn I need to read!
<Ox0dea>
dragonkh: It's to do with the C compiler, yeah. That'd be Clang, in your case, but it still seems a little weird that it spit out a .bundle.
<Ox0dea>
Croves: Use Weirich's rule.
DrCode has joined #ruby
mag42c has left #ruby [#ruby]
<Croves>
Ox0dea Thanks!
<Ox0dea>
Croves: Sure thing. Ya gonna adopt it?
purplexed- has quit [Ping timeout: 260 seconds]
Balllkenende has joined #ruby
<Croves>
Ox0dea You mean this? The style guide suggests using {...} for single line and do/end for multiple line blocks.
TheNet has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 250 seconds]
hmsimha_ has joined #ruby
Trynemjoel has joined #ruby
<hxegon>
dtordable: pdf of what? that rubyinside page?
Eiam_ has joined #ruby
kalusn has joined #ruby
Regulati_ has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
<dtordable>
hxegon: learn Ruby...
<Ox0dea>
Croves: I guess I should clarify that I'm proselytizing a bit; it's not what the community uses most, but I think it should. :P
<kashyap>
Ox0dea: Sorry to bother again, so I installed that and several other deps, now I'm stuck at "/home/kashyapc/.gem/ruby/gems/jekyll-lunr-js-search-0.3.0/lib/jekyll_lunr_js_search/search_entry.rb:8:in `create': cannot load such file -- jekyll/post (LoadError)"
<Croves>
hehe
blackmes1 has joined #ruby
<Croves>
Ox0dea But anyway, it makes sense what he's said
<Ox0dea>
If Weirich's rule doesn't "fit" a particular chunk of code, there's probably some room for refactoring.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kashyap>
No dice, still complains: `create': cannot load such file -- jekyll/post
<Ox0dea>
kashyap: Hm, this is kinda weird.
<C0r3>
centrx: But is there any suggestions... Like, if you were to host it then where would you host it?
mistermocha has quit [Remote host closed the connection]
<kashyap>
Just wanted to submit a drive-by patch to another website, and here I'm shaving yak after yak
mistermocha has joined #ruby
lemur has joined #ruby
<centrx>
C0r3, Digital Ocean or AWS - that's if I wanted an instance with a real machine (IaaS)
deg_ has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
<Ox0dea>
kashyap: Jekyll's main file contains `autoload :Page, 'jekyll/page'`, but there is indeed no such file.
<centrx>
C0r3, You can also use a service like Heroku or Engine Yard, which offer a Rails platform (PaaS)
<C0r3>
centrx: Thank you!! I was looking at Heroku.
<mary5030_>
hope someone can help me out here, how do i turn this object to hash? #<struct IpAllocation ip_address="1", dedicated_service_net_vlan_number="2", interface_updates=[], new_vlan=false>
idefine has quit [Remote host closed the connection]
siemprefresco has joined #ruby
diegoaguilar has joined #ruby
hmsimha_ has joined #ruby
ibouvousaime has joined #ruby
<C0r3>
centrx: I'm really new to Ruby... I used to work on Laravel built in PHP. Now I want to build web apps in Ruby. I've heard of Rails but never used it. Did you ever use Laravel or any similar Framework??
idefine has joined #ruby
<centrx>
C0r3, I've used CakePHP. Rails is much nicer
<centrx>
C0r3, also FYI #RubyOnRails is the Rails channel
Guest59270 has quit [Ping timeout: 260 seconds]
<mary5030_>
centrx: i get undefined method to_h' for #<IpAllocation:0x101012d48>
<mary5030_>
it is for a newer ruby version?
Rollabunna has joined #ruby
<C0r3>
centrx: Thank you...
beauby has joined #ruby
TheNet has joined #ruby
<centrx>
mary5030_, Looks like it was introduced in Ruby 2.0
lemur has quit [Ping timeout: 240 seconds]
<mary5030_>
i am using 1.8.7
<centrx>
mary5030_, Also it's for the class Struct, is this "struct IpAllocation" a custom class?
baweaver has quit [Remote host closed the connection]
<mary5030_>
:(
<centrx>
mary5030_, Yeah highly recommended you upgrade to 2.0 or higher. 1.8 is EOL
idefine has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
<mary5030_>
any other solution to this anyone?
yfeldblum has quit [Remote host closed the connection]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mary5030_>
how do i turn this object to hash? #<struct IpAllocation ip_address="1", dedicated_service_net_vlan_number="2", interface_updates=[], new_vlan=false>
<mary5030_>
^
<centrx>
mary5030_, You can do: my_struct.each_pair.map.to_h
Xeago has quit [Remote host closed the connection]
purplexed- has quit [Read error: Connection reset by peer]
dragonkh has quit [Remote host closed the connection]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lukaszes has joined #ruby
nhhagen has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
nhhagen has quit [Remote host closed the connection]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
edmundspenser has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
skade has joined #ruby
m3_del has joined #ruby
eminencehc has quit [Remote host closed the connection]
purplexed- has joined #ruby
TheNet has quit [Remote host closed the connection]
Guest11942 has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
tubuliferous has joined #ruby
pwnd_nsfw has quit [Quit: Leaving]
stamina has joined #ruby
baweaver has joined #ruby
akem has joined #ruby
yfeldblum has joined #ruby
JammyHammy has joined #ruby
akem has quit [Client Quit]
imperator has joined #ruby
willardg has joined #ruby
colegatron has joined #ruby
karapetyan has quit [Remote host closed the connection]
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
rgtk has quit [Remote host closed the connection]
mattwashere has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
freerobby1 has quit [Quit: Leaving.]
freerobby has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
pwnd_nsfw has joined #ruby
karapetyan has joined #ruby
neanderslob has joined #ruby
jessemcgilallen has joined #ruby
infamos has quit [Ping timeout: 244 seconds]
mistermo_ has joined #ruby
newdan has joined #ruby
kobain has joined #ruby
benlieb has joined #ruby
vdamewood has joined #ruby
vdamewood has quit [Client Quit]
J4D has joined #ruby
_djbkd has quit [Remote host closed the connection]
<purplexed->
I'm having trouble creating a new rails application with "rails new <name>". I've found several places that says delete the Gem lock file - but I can't find out where that file is. Where do I look (linux)
wldcordeiro has quit [Ping timeout: 240 seconds]
<al2o3-cr>
?rails purplexed-
<ruboto>
purplexed-, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<centrx>
purplexed-, Gemfile.lock
lemur has joined #ruby
tubuliferous_ has joined #ruby
leafybas_ has joined #ruby
jpfuentes2 has joined #ruby
_tpavel has joined #ruby
mistermo_ has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
hashpuppy has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
_tpavel has quit [Client Quit]
Guest53 has joined #ruby
m3_del has quit [Read error: No route to host]
TheNet has joined #ruby
m3_del has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt1 has joined #ruby
acke has joined #ruby
govg has joined #ruby
User458764 has quit [Remote host closed the connection]
User458764 has joined #ruby
radgeRayden__ has joined #ruby
DiCablo has joined #ruby
TheNet has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
willardg has joined #ruby
Rollabunna has quit [Ping timeout: 252 seconds]
banister has joined #ruby
TheNet has joined #ruby
acke has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
stamina has quit [Quit: WeeChat 1.3]
TheNet has quit [Remote host closed the connection]
radgeRayden_ has quit [Ping timeout: 255 seconds]
TheNet has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
willardg has quit [Client Quit]
ht__ has quit [Quit: Konversation terminated!]
arup_r has quit [Quit: Leaving]
lkba has joined #ruby
Aswebb_ has quit []
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
purplexed- has quit [Ping timeout: 272 seconds]
acke has joined #ruby
nettoweb has joined #ruby
griffindy has joined #ruby
kies^ has joined #ruby
Calyd0n has joined #ruby
<Calyd0n>
hello
<havenwood>
Calyd0n: hi
skade has quit [Quit: Computer has gone to sleep.]
TheNet has quit [Remote host closed the connection]
lukaszes has joined #ruby
adac has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
BigDiesel007 has joined #ruby
arthurix_ has joined #ruby
tubuliferous_ has quit [Ping timeout: 272 seconds]
hmsimha_ has quit [Ping timeout: 265 seconds]
ekinmur has joined #ruby
arthurix has quit [Ping timeout: 244 seconds]
mary5030 has quit [Remote host closed the connection]
<Calyd0n>
Any body know if their is a way to convert ruby to exe on linux ? I already tried RubyScript2EXE and Ocra but it failed.
<havenwood>
Calyd0n: You can chmod +x and use a shebang on your first line to just run a Ruby script as an executable. Or do you want it to run when Ruby isn't installed?
<Calyd0n>
I want to run it on windows machin without ruby installed
firstdayonthejob has quit [Ping timeout: 250 seconds]
edmundspenser has quit [Ping timeout: 240 seconds]
kaneis has quit [Quit: WeeChat 1.3]
Guest14152 is now known as |KKK|
Musashi007 has joined #ruby
<|KKK|>
what is the most important Ruby concept to know?
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Porfa has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
be nice to cats
axsuul has joined #ruby
riotjones has joined #ruby
dikaio has quit [Read error: Connection reset by peer]
<havenwood>
!mute |KKK|
_djbkd has joined #ruby
juanpablo__ has quit [Quit: (null)]
hmsimha_ has joined #ruby
juanpablo__ has joined #ruby
Porfa has quit [Client Quit]
djcp has quit [Quit: WeeChat 1.0.1]
djcp has joined #ruby
elton_ has quit [Remote host closed the connection]
elperdut_ has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 244 seconds]
elperdut has joined #ruby
Guest53 has joined #ruby
BigDiesel007 has quit [Read error: Connection reset by peer]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arooni has quit [Quit: Leaving]
idefine has joined #ruby
ruurd_ has joined #ruby
rgtk has joined #ruby
Calyd0n has quit [Quit: Leaving]
eminencehc has joined #ruby
uber has quit [Ping timeout: 250 seconds]
Icey has quit [Quit: Leaving]
Icey has joined #ruby
Icey has joined #ruby
Icey has quit [Changing host]
Calyd0n has joined #ruby
BigDiesel007 has joined #ruby
<ericwood>
|KKK|: blocks
dtordable has joined #ruby
dtordable has joined #ruby
ruurd has quit [Ping timeout: 250 seconds]
<drbrain>
ericwood: nice pun?
<ericwood>
oh my gosh
<ericwood>
yes I did that intentionally
<dtordable>
hello, anyone!
zenguy_pc has quit [Ping timeout: 260 seconds]
eminence_ has joined #ruby
tomphp has joined #ruby
radgeRayden has joined #ruby
Calyd0n has quit [Client Quit]
<ericwood>
hi
finisherr has left #ruby [#ruby]
idefine has quit [Ping timeout: 268 seconds]
Musashi007 has quit [Quit: Musashi007]
|KKK| has quit [Remote host closed the connection]
sandals has joined #ruby
hmsimha_ has quit [Ping timeout: 265 seconds]
eminencehc has quit [Ping timeout: 268 seconds]
idefine has joined #ruby
Psyq has joined #ruby
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yalue has quit [Read error: Connection reset by peer]
<newdan>
dtordable: Did you have a question? Or just saying hi?
radgeRayden__ has quit [Ping timeout: 265 seconds]
arthurix has joined #ruby
elton has joined #ruby
timonv has joined #ruby
prodigal_pdev has quit [Ping timeout: 246 seconds]
Jackneill has quit [Remote host closed the connection]
sandals is now known as prodigal_pdev
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uber has joined #ruby
acke has quit [Remote host closed the connection]
fedexo has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arthurix_ has quit [Ping timeout: 255 seconds]
willardg has joined #ruby
baweaver has quit [Remote host closed the connection]
ss_much has joined #ruby
elton has quit [Ping timeout: 268 seconds]
ESpiney has quit [Quit: Leaving]
prodigal_pdev has quit [Ping timeout: 255 seconds]
tomphp has joined #ruby
_stu_ has quit [Quit: _stu_]
dionysus69 has quit [Ping timeout: 268 seconds]
coderabbit has quit [Quit: Going offline, see ya! (www.adiirc.com)]
zenguy_pc has joined #ruby
elton has joined #ruby
_stu_ has joined #ruby
xfbs has quit []
Musashi007 has joined #ruby
J4D has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ixti has joined #ruby
eminence_ has quit [Remote host closed the connection]
<Radar>
looks like just saying hi :P
hmsimha_ has joined #ruby
synthroid has quit []
wldcordeiro has joined #ruby
<havenwood>
Everyone in my office is discussing star wars "Recommended minimum episode viewing order" now after I chuckled out loud from the nice Figure 1.1. on page 33.
banister has joined #ruby
elton has quit [Ping timeout: 264 seconds]
uber has quit [Ping timeout: 264 seconds]
eminencehc has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
EllisTAA has joined #ruby
haxrbyte has joined #ruby
baweaver has joined #ruby
Ropeney has joined #ruby
<imperator>
viewing order? ep 4 followed by ep 5. the end.
<shevy>
if I would have any artistic skills myself, I'd draw a real starwars reference
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has quit [Remote host closed the connection]
willardg has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
solocshaw has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
willardg has quit [Client Quit]
elton has joined #ruby
stannard_ has joined #ruby
idefine has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 240 seconds]
uber has joined #ruby
atomical_ has quit [Ping timeout: 255 seconds]
<havenwood>
imperator: :D
shinnya has joined #ruby
J4D has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 260 seconds]
Musashi007 has quit [Quit: Musashi007]
SCHAAP137 has quit [Ping timeout: 260 seconds]
AnoHito_ has quit [Read error: Connection reset by peer]
Seich_ has quit [Ping timeout: 246 seconds]
elton has quit [Ping timeout: 264 seconds]
AnoHito_ has joined #ruby
m3_del has quit [Quit: Leaving...]
Seich has joined #ruby
sepp2k has quit [Quit: Leaving.]
eminencehc has quit [Remote host closed the connection]
mistermo_ has joined #ruby
BigDiesel007 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
neanderslob has quit [Remote host closed the connection]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest42010 has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
bruno- is now known as Guest23934
mistermo_ has quit [Read error: Connection reset by peer]
haxrbyte has quit [Read error: Connection reset by peer]
OS-18454 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elton has joined #ruby
haxrbyte has joined #ruby
mistermo_ has joined #ruby
bMalum has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
OS-18454 has joined #ruby
neanderslob has joined #ruby
hectorsq has joined #ruby
Limix has quit [Quit: Limix]
OS-18454 is now known as OS-18454-1
OmegaA has joined #ruby
rbennacer has quit [Remote host closed the connection]
<OmegaA>
Hello :) Not sure if this is a Rails issue or Ruby, but I have a class in a module and when I try to reference it I get a NameError exception. Not really sure what's causing this, but it's ptting a thorn in my side!
Guest23934 has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mattwildig has joined #ruby
bruno-_ has joined #ruby
patrick has joined #ruby
elton has quit [Ping timeout: 264 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
patrick is now known as Guest3880
haxrbyte has joined #ruby
<svkurowski>
How can I change which language Ruby uses for Month and Weekday names in DateTime::strftime
hmsimha_ has quit [Ping timeout: 265 seconds]
<OmegaA>
...to add insult to injury, ApplicationCable::Channel TOTALLY EXISTS
<OmegaA>
Ruby is starting to stretch my willpower :D
<havenwood>
OmegaA: s/Ruby/Rails
* OmegaA
assumed they were syntactically and behaviourly identical. >.>
<havenwood>
OmegaA: Whatcha using channels for? Or just exploring?
<OmegaA>
Mostly exploring atm.
<OmegaA>
Potentially using AC for a pet project, but just trying to work out how they work right now.
Guest53 has joined #ruby
Sembei has joined #ruby
riotjones has joined #ruby
Eiam_ has joined #ruby
<havenwood>
OmegaA: What's the error?
<al2o3-cr>
svkurowski: %^B %^b %^A %^a ?
<havenwood>
OmegaA: I'd suspect a fix along the lines of: class Connection < ::ActionCable::Connection::Base
<al2o3-cr>
svkurowski: ignore that
meatchicken has joined #ruby
<OmegaA>
Would the fact that ApplicationCable::Connection isn't referenced by any other part of my app make a difference? I notice I have a class (in app/channels/message_channel.rb) that inherits from AC::Channel
<meatchicken>
if I have an array of hashes - [{name:"apple"},{name:"orange"}]
<meatchicken>
how do I collect all the unique names?
<OmegaA>
<insert angry, yet thankful curse words here>
SCHAAP137 has quit [Ping timeout: 260 seconds]
haxrbyte has quit [Ping timeout: 240 seconds]
<OmegaA>
And then I realise I forgot to configure redis! :D
<OmegaA>
At least AC is working now :)
hmsimha_ has joined #ruby
<OmegaA>
Thanks, anyway
bb010g has quit [Quit: Connection closed for inactivity]
idefine has joined #ruby
roshanavand has quit [Remote host closed the connection]
bruno-_ has quit [Read error: Connection reset by peer]
last_staff has quit [Remote host closed the connection]
bruno-_ has joined #ruby
Guest53 has quit [Client Quit]
Guest3880 has quit [Ping timeout: 260 seconds]
elton has joined #ruby
infamos has joined #ruby
bMalum has quit [Quit: bMalum]
Spami has quit [Quit: This computer has gone to sleep]
solars has joined #ruby
acke has joined #ruby
idefine has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 264 seconds]
momomomomo has quit [Quit: momomomomo]
Guest53 has joined #ruby
bMalum has joined #ruby
govg has quit [Ping timeout: 240 seconds]
elton has quit [Ping timeout: 255 seconds]
cirenyc has joined #ruby
devoldmx has joined #ruby
harly has joined #ruby
baweaver has joined #ruby
willardg has joined #ruby
<harly>
question: i'm using validates_numericality_of on a field called age. which works if age is set to say 5, or string "5". but when accessing in both those cases it returns what is passed, being the Integer or String. Is there a convenient wayt o make it return always an int, without overriding the accessor to do age.to_i ?
Rickmasta has joined #ruby
Guest53 has quit [Client Quit]
idefine has joined #ruby
<darix>
harly: it is a validator
<darix>
not a cast
shmilan has quit [Ping timeout: 240 seconds]
<harly>
sure. i don't expect the vaidator to do what i'm asking. but is there something else?
<eam>
to_i is how you do to_i
banister has quit [Ping timeout: 255 seconds]
<eam>
can you not just call that?
arthurix_ has joined #ruby
haxrbyte_ has quit [Ping timeout: 255 seconds]
<harly>
well i'm using attr_accessor's atm. so there's no method for each of the attributes. so i want to avoid creating them.
<harly>
or should I just let it be whatever it is, and only cast when I care?
devoldmx has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 268 seconds]
SCHAAP137 has joined #ruby
<harly>
if someone else were to do person.age they might get a string. that seems poor. is my only choice to implement def age do age.to_i end ?
baweaver has quit [Ping timeout: 255 seconds]
elton has joined #ruby
sidearmsplit has joined #ruby
Guest53 has joined #ruby
newdan has quit [Remote host closed the connection]
arthurix has quit [Ping timeout: 264 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine_ has quit [Remote host closed the connection]
bruno-_ has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
elton has quit [Remote host closed the connection]
jessemcgilallen has joined #ruby
bruno- is now known as Guest8968
mistermocha has joined #ruby
elton has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skweek has joined #ruby
baweaver has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx>
harly, Is this a database field or something?
tomphp has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<harly>
no. I'm experimenting with using ActiveModel::Validations in ruby, iwthout rails.
mistermocha has quit [Ping timeout: 240 seconds]
<harly>
really just trying to find a laconic way to define a simple model using attr_accessors and validators (and maybe cast...ors?) and have it be a little flexible on what those fields are set as. without having to implement each one.
Rollabunna has joined #ruby
dnomyar has quit [Ping timeout: 255 seconds]
tvw has quit [Ping timeout: 252 seconds]
hashpuppy has joined #ruby
<bnagy>
harly: did you look at Struct?
<shevy>
attr* only do the simple things
baweaver has quit [Ping timeout: 240 seconds]
<shevy>
attr_reader :foo is: def foo; @foo; end, no other modifications
momomomomo has joined #ruby
Guest53 has joined #ruby
<shevy>
you could go the activerecord/rails route and also extend with custom methods, like attr_integer :foo or something
netule has joined #ruby
Guest53 has quit [Client Quit]
<al2o3-cr>
is it true rails is slowing dying?
crdpink2 has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
crdpink has quit [Ping timeout: 246 seconds]
<shevy>
it slowed down its dying?
<centrx>
al2o3-cr, Rails is just not in super-fad mode
<shevy>
javascript kills everything
<centrx>
al2o3-cr, It's still the best non-bleeding-edge framework available
<harly>
:w
<harly>
:st
<shevy>
vim!
<al2o3-cr>
centrx: without a doubt
<harly>
oh hey, irc isn't vim :)
momomomomo has quit [Client Quit]
<shevy>
vim fiddles with the brain :>
<al2o3-cr>
can't wait for ruby 3 (seriously gonna piss myself)
<harly>
pointer-focus strikes again
<al2o3-cr>
i got a feeling it's going to be awesome
umgrosscol has quit [Remote host closed the connection]
<shevy>
what awesomeness will ruby 3 include?
<al2o3-cr>
well looking at streem the concurrent model
<al2o3-cr>
*concurreny
_stu_ has quit [Quit: _stu_]
<shevy>
well streem is not ruby
<al2o3-cr>
he ain't prototyping streem for no reason shevy :p
<shevy>
he very well could :)
Guest8968 has quit [Read error: Connection reset by peer]
<shevy>
I think mruby has a much higher priority
bruno-_ has joined #ruby
<al2o3-cr>
when i see mruby i think lua
gigetoo has quit [Ping timeout: 246 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
<shevy>
lua is so small
BigDiesel007 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
let me see at mruby size...
treaki has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<al2o3-cr>
shevy: about ~100kb
<shevy>
wha
<shevy>
how do you get this
<shevy>
mruby-05.11.2015.tar.xz 297K
<shevy>
lua-5.3.1.tar.xz 221K
<al2o3-cr>
shevy: Lua is smalllll :P
<harly>
bnagy: i hadn't. but it doesn't look like it does anything about forcing types. i guess i'm just thinking about it the wrong way. spoilt by perl's context flexibility.
<shevy>
bit smaller yeah
<al2o3-cr>
shevy: i might be going of 5.2
<shevy>
ruby has really gotten quite big
<shevy>
ruby-2.2.3.tar.xz 10M
<harly>
:st
exadeci has joined #ruby
* harly
sighs.
<shevy>
lol harly
<al2o3-cr>
:P
juanpablo__ has quit [Quit: (null)]
skade has joined #ruby
<shevy>
don't let the emacs users see this, they may be tempted to make a joke
idefine has joined #ruby
juanpablo__ has joined #ruby
<harly>
never tried that operating system. :)
p0wn3d__ has quit [Ping timeout: 268 seconds]
centrx has quit [Quit: If you meet the Buddha on the way, kill him.]
<shevy>
emacs is really huge ... emacs-24.5.tar.xz 38M
blackmes1 has quit [Ping timeout: 264 seconds]
<havenwood>
shevy: The "can an editor open its own source code" challenge.
<sidearmsplit>
I’m trying to generate several gigabytes of data (preferably in JSON), anyone have any ruby libraries to recommend?
ibouvousaime_ has quit [Quit: Leaving]
ibouvousaime has joined #ruby
hmsimha_ has quit [Ping timeout: 265 seconds]
axl_ has quit [Quit: axl_]
skade has quit [Ping timeout: 250 seconds]
<sidearmsplit>
I like faker for generating the data in the documents, but simply calling it and pushing it to my DB with a times interation is very slow
juanpablo__ has quit [Ping timeout: 255 seconds]
pwnd_nsfw has quit [Ping timeout: 246 seconds]
stannard_ has quit [Remote host closed the connection]
finisherr has joined #ruby
<al2o3-cr>
shevy: what OS you on?
luriv has quit [Quit: Leaving]
idefine has quit [Remote host closed the connection]
asianMike has joined #ruby
<shevy>
al2o3-cr linux
<al2o3-cr>
shevy: flavor?
<shevy>
al2o3-cr it was slackware but all but glibc was compiled anew from source
<al2o3-cr>
shevy: so what you using now?
<al2o3-cr>
shevy: you're a secret MS user ain't you...
<al2o3-cr>
shevy: jk
bluOxigen has joined #ruby
baweaver has joined #ruby
<shevy>
al2o3-cr as said, it was slackware some months ago; it's some custom LFS right now mostly. for the most part I just try to have everything available even if I don't use it (e. g. the whole stack of gnome and kde)
blackmes1 has joined #ruby
<shevy>
slackware mostly because it gives very little headache to start with
sandals has joined #ruby
bruno-_ has quit [Read error: Connection reset by peer]
jabreity_ is now known as jabreity
<shevy>
if gobolinux would not have died then I'd use it, there never was a better thing of beauty :(
bruno-_ has joined #ruby
<al2o3-cr>
shevy: i should read the full sentence
kies^ has quit [Ping timeout: 260 seconds]
<shevy>
al2o3-cr are you writing for any ruby projects as of late?
elton has quit [Remote host closed the connection]
jabreity has quit [Changing host]
jabreity has joined #ruby
jabreity has quit [Changing host]
jabreity has joined #ruby
stannard has joined #ruby
<al2o3-cr>
shevy: No, i only code for fun :p
RegulationD has quit [Remote host closed the connection]
Xeago has joined #ruby
<shevy>
hmm
rodfersou has quit [Quit: leaving]
<al2o3-cr>
I'm a kitchen fitter by trade lol
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
Porfa has joined #ruby
AccordLTN has quit []
<shevy>
ruby is programming for the masses
riotjones has joined #ruby
swgillespie has joined #ruby
hmsimha_ has joined #ruby
<al2o3-cr>
shevy: so is python, perl (used to be), php (your friend) and assembly (jk) :P
<snockerton>
ruby is programming for non-ass-holes
elton has joined #ruby
<harly>
i dunno. i've seen some judging stares behind hipster beards. j/k :)
<snockerton>
this is one of the friendliest channels on freenode
<shevy>
al2o3-cr python yeah, not sure about perl in 2015 really
pwnd_nsfw has joined #ruby
<snockerton>
#perl is full of pricks anyways
whippythellama has quit [Quit: WeeChat 1.3]
<harly>
perl died in 2005. 10y on there's the occasional "perl 6 will fix everything" crazy person, and then a lot of ops scripts lying aorund.
daivyk has quit [Ping timeout: 244 seconds]
<shevy>
al2o3-cr although the graph is not quite accurate, I think the overall trend is ok: http://goo.gl/6SnpLK
<al2o3-cr>
shevy: perl6, though never really tried it
Spami has joined #ruby
<shevy>
python gaining quite a bit, php losing a tiny bit, ruby gaining a tiny bit, perl dropping a tiny bit
<shevy>
harly yeah sorta
<blubjr>
perl 6 has a lot of nice metaprogramming stuff i head
purplexed- has quit [Ping timeout: 244 seconds]
<shevy>
al2o3-cr yeah I think perl 6 will stop the decline but I am not sure if a huge surge of interest will happen again, the landscape is different, a lot more competition