<al2o3-cr>
Because I'm uncertain what your true intention are
<toastytheog>
i'm trying to figure out how to find the best number of records per batch, currently set to 100, there are ~239k records
mmoo2 has quit [Ping timeout: 250 seconds]
toastytheog_ has joined #ruby
toastytheog has quit [Quit: Page closed]
workmad3 has joined #ruby
casadei_ has quit [Remote host closed the connection]
parkit has joined #ruby
<parkit>
hi everyone i read a lot of css books and watched a lot of videos
<parkit>
ruby*
<parkit>
however i don't know what to do when i'm trying to do something on my own
<parkit>
is this normal?
<al2o3-cr>
parkit: What this got to do with Ruby?
<parkit>
i said *ruby
<parkit>
freudan slip
<al2o3-cr>
my bad
<al2o3-cr>
:)
howdoicomputer has quit [Ping timeout: 256 seconds]
mesamoo has quit [Ping timeout: 255 seconds]
<toastytheog_>
parkit: until you start using it regularly, looking up methods is normal. if that's what you mean
JamesDH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr>
Anyway, way to late for me to answer any humble questions. C y'all around like a walnut.
workmad3 has quit [Ping timeout: 268 seconds]
mrodrigues has joined #ruby
grenierm has joined #ruby
opensource_ninja has joined #ruby
j416_ has joined #ruby
yashinbasement has quit [Ping timeout: 244 seconds]
<mrodrigues>
I'm looking for wider input on a claim Metz makes in POODR. She argues taht you should "always wrap ivars in methods instead of directly referring to the variables." This seems overkill to me.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chills42 has quit [Remote host closed the connection]
j416 has quit [Ping timeout: 244 seconds]
j416_ is now known as j416
meatherly has quit []
Ketchy has quit [Read error: Connection reset by peer]
<shmilan>
In general, she mentions in the introduction that her way is not always THE way that everyone chooses to go. With that said, if you disagree with something she says then you are free to use a solution you find more suitable.
meatherly has joined #ruby
pontiki has joined #ruby
chipotle has quit [Quit: cheerio]
<pontiki>
hi ruby
<mrodrigues>
shmilan: I was really just curious to see what other people thought. I guess I could just comb through github and see what projects tend to do.
<Coraline>
I use attr_reader and @ if I'm only setting it in one place, e.g. an initializer
meatherly has quit [Client Quit]
<shmilan>
I cannot comment on the wider implications, mrodrigues. Others may chime in with better comments.
<mrodrigues>
Thanks Coraline, shmilan.
mleung has quit [Quit: mleung]
<Coraline>
Feathers (I think) on the other hand says that every attr is an interface that you have to maintain. That's why I only use them for setting values. I don't care who reads them.
shazaum_ has quit [Quit: This computer has gone to sleep]
toretore has quit [Ping timeout: 268 seconds]
<Coraline>
Oh the other way I use them is for caching
<Coraline>
def foo; @foo ||= "Bar"; end
bigbadbear has quit [Ping timeout: 252 seconds]
<pontiki>
i do that to have nice barewords in a class; but i make the accessor private as well
shazaum_ has joined #ruby
havenwood has joined #ruby
shazaum_ has quit [Client Quit]
<Coraline>
I like to be able to look at a class and see its attrs, so I don't like @vars scattered throughout. Feels messy.
Motoservo has joined #ruby
rubie has joined #ruby
shazaum_ has joined #ruby
shazaum_ has quit [Remote host closed the connection]
<pontiki>
where do you put the memoizing methods?
mary5030 has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
<Coraline>
No particular place.
<Coraline>
Unless I have a good reason to group things, I tend to...
<Coraline>
...alphabetize my methods.
davedev2_ has quit []
meatherly has joined #ruby
<pontiki>
you make them all public?
<Coraline>
No, I alphabetize under public and under private
Igorshp has joined #ruby
<Coraline>
Memoizing methods are generally private.
<pontiki>
yus
<Coraline>
Most methods are private
<Coraline>
After I'm done with exploratory testing I'm good about making a discrete interface to the class.
meatherly has quit [Client Quit]
<pontiki>
yeah
zenguy_pc2 has joined #ruby
zenguy_pc2 has quit [Read error: Connection reset by peer]
zenguy_pc has quit [Ping timeout: 244 seconds]
meatherly has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
<mrodrigues>
Coraline: Thanks for all the input. I was worried about cluttering my objects with attrs but I guess they can be private. I sort of liked being able to pick out ivars in the code but I'll see if I find attrs more readable.
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toretore has joined #ruby
<Coraline>
Happy to share.
<mrodrigues>
Coraline: Are there any ruby projects that you think exemplify well written Ruby? ie. Prawn is commonly referenced as a well written project.
devoldmx has joined #ruby
<Coraline>
Hmm, I haven't done code reading in a while.
alem0lars has quit [Ping timeout: 244 seconds]
<mrodrigues>
Sorry to put you on the spot. I guess I could have just floated that question out in general.
meatherly has quit [Read error: Connection reset by peer]
Oka has quit [Quit: o/]
johnhamelink has quit [Ping timeout: 246 seconds]
rubie has quit [Remote host closed the connection]
Klumben has quit [Ping timeout: 244 seconds]
roxtrongo has joined #ruby
rubie has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
morenoh149 has joined #ruby
ivanskie has joined #ruby
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
robbyoconnor has quit [Quit: Konversation terminated!]
yuhmon has quit [Quit: Page closed]
ranchodev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
ivanskie has quit [Remote host closed the connection]
banjara has joined #ruby
RudestBuddhist has joined #ruby
j4cknewt has joined #ruby
casadei_ has joined #ruby
<RudestBuddhist>
Hey everyone, getting into JSON manipulation for the first time tonight and I’m a bit lost on how I can manipulate / compare different things in the array. Can anyone point me in the direction of a good tutorial for JSON manipulation?
<RudestBuddhist>
I’m working with a big file and bit confused on the best way to read it in as well
<RudestBuddhist>
OJ looks like it might be the way to go?
<baweaver>
Define large
<mrodrigues>
RudestBuddhist: is the 'json' gem not doing it for you?
<baweaver>
and comparing json is just like comparing anything else.
<baweaver>
require 'json'; JSON.parse(info)
<RudestBuddhist>
baweaver: yeah, actually now that I think about it I can just use a few different sorts to get what I want
<RudestBuddhist>
mrodrigues: it works, but it seems a bit slow, maybe 4 minutes to parse a 90 meg file
<baweaver>
OJ will be faster, but at that rate Ruby might not be the best idea
<RudestBuddhist>
I’m realizing I might have been overthinking this a bit now that I’ve asked my question :)
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<baweaver>
How large do you anticipate it getting?
pharaoh2 has joined #ruby
Swappticon has joined #ruby
<RudestBuddhist>
~250mb
<baweaver>
and how fast do you need results?
<RudestBuddhist>
well the faster the better
<baweaver>
realistically what's required
<RudestBuddhist>
~10 min?
karapetyan has joined #ruby
quazimodo has joined #ruby
<baweaver>
Ruby _could_ do it, but I would consider looking into Scala or Clojure instead.
<RudestBuddhist>
I’m not really sure what expectations I can set as I’m a Jr. Dev doing this for the first time
<RudestBuddhist>
ok, cool
<RudestBuddhist>
am I looking at ~15 - 20min?
<RudestBuddhist>
using ruby?
<mrodrigues>
RudestBuddhist: what kind of data is it? Is it a big db in json? Is it a captured stream of JSON objects?
<baweaver>
probably around 10, but who knows.
<RudestBuddhist>
mrodrigues: just a captured stream of json objects
<baweaver>
when you say stream, what do you mean
<baweaver>
and where from?
<RudestBuddhist>
local
<RudestBuddhist>
for now
<baweaver>
Do you anticipate using something like Logstash or Kafka for streaming data?
<baweaver>
(message systems basically)
<RudestBuddhist>
nah, I’d like to keep the gems as minimum as possible
<baweaver>
those aren't gems, so I'll assume no
<baweaver>
will, in the future, you have an actual stream of data?
<RudestBuddhist>
no it will always be local
<baweaver>
or sequential JSON dumps
Shidash has quit [Ping timeout: 246 seconds]
<baweaver>
what's generating that much data?
<RudestBuddhist>
it’s a log of another program
universa1 has quit [Ping timeout: 246 seconds]
<RudestBuddhist>
essentially a reference ID, an IP, and some timestamps
<baweaver>
which is built to handle that much data, often times well into the petabyte levels
freerobby has joined #ruby
<baweaver>
but over 100M will give Ruby some serious problems at scale
yfeldblu_ has quit [Remote host closed the connection]
Shidash has joined #ruby
kikelivestone has joined #ruby
<RudestBuddhist>
this is probably a dumb question, but compression, like gunzipping wouldn’t help at all correct? Ruby is going to need to uncompress the file and read the JSON anyway.
<kikelivestone>
what music do you listen to while programming?
<shevy>
hmm in early october... will ruby stand the tide of competition
s00pcan has joined #ruby
<shevy>
that perl6 logo looks as if it was drawn while under influences from fungi
sevenseacat has joined #ruby
<ebbflowgo>
I'm trying to install pg_jruby, it will stay installed but does not show up in my gem env installation directory or gem path
<ebbflowgo>
in heroku
<ebbflowgo>
if i install it locally, it will save down to my installation directory, however, i cannot simply require 'pg' i must require the file with the absolute path
oo__ has quit [Remote host closed the connection]
CHVNX has quit [Ping timeout: 240 seconds]
ricer2 has quit [Quit: Caught SystemExit exception.]
auzty has joined #ruby
mary5030 has quit [Remote host closed the connection]
HAL2328 has joined #ruby
leafybasil has joined #ruby
ricer2 has joined #ruby
kikelivestone has left #ruby [#ruby]
sharkman has joined #ruby
TomyLobo has quit [Ping timeout: 264 seconds]
<sharkman>
i program in ruby
michaeldeol has joined #ruby
<sharkman>
is this channel active
<havenwood>
sharkman: yup
moeabdol has quit [Quit: WeeChat 1.3]
<sharkman>
does anyone else here use ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
yep
bigredboots has joined #ruby
<nofxx>
sharkman, most ppl here use php, other python. Sometimes we talk about ruby.
<craysiii>
whats ruby
gix has quit [Ping timeout: 256 seconds]
<baweaver>
be nice.
<havenwood>
sharkman: Most folk here use Ruby. That's why they're here.
<sharkman>
craysi you are in a ruby channel shouldnt u know what it is
<sharkman>
yeah thats what i thought havenwood
oo_ has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
<craysiii>
i don't know how i got here but they wont let me leave.
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
<sharkman>
craysii is trapped
<sharkman>
def help; abort; end
<RudestBuddhist>
baweaver mrodrigues: Thanks for the help guys. I think I’ve got an idea how I can make this work.
<ebbflowgo>
what does this mean? # Please note that the 1.0 is necessary to let bundler do its dependency management, as there is no .gemspec in the source. From : https://github.com/headius/jruby-pg
<ebbflowgo>
where is the 1.0 being used?
workmad3 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
RudestBuddhist has quit [Quit: RudestBuddhist]
chouhoulis has joined #ruby
dgutierrez1287 has joined #ruby
gix has joined #ruby
oo_ has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
roxtrongo has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
bigredboots has quit [Read error: Connection reset by peer]
dgutierrez1287 has quit [Ping timeout: 246 seconds]
<atmosx>
actually, I don't think it will be that hard for you at this point
<pontiki>
it is the best. the only thing you'd ever need
codenapper has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<atmosx>
pontiki: it's not good for novice programmers, takes too many things for granted. Actually let's say that you need to 'study it' more than the average "learn to program book".
<pontiki>
it is not a "learn to program book"
<pontiki>
it is a "learn the C programming language" book
rippa has joined #ruby
claw has joined #ruby
shadoi has quit [Quit: Leaving.]
<shevy>
ruby spoiled me immensely
flughafen has quit [Ping timeout: 244 seconds]
flughafen has joined #ruby
luksaur has quit [Ping timeout: 244 seconds]
towski_ has joined #ruby
luksaur has joined #ruby
karapetyan has quit [Remote host closed the connection]
nhhagen has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
karapetyan has joined #ruby
j4cknewt has joined #ruby
khebbie has joined #ruby
rubie has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yardenbar has joined #ruby
kalz has quit [Ping timeout: 256 seconds]
kalzz has quit [Ping timeout: 256 seconds]
khebbie has quit [Ping timeout: 255 seconds]
<atmosx>
pontiki: actually, IMHO it's a better "learn to program book" exactly becuase it's a "learn the C programming way" (procedural that is).
<atmosx>
pontiki: makes you write your own loops, define types and so on.
karapetyan has joined #ruby
dhjondoh has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
<shevy>
like assembler!
kalzz has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
Macaveli has joined #ruby
wldcordeiro has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
kalz has joined #ruby
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
devoldmx has quit [Remote host closed the connection]
jenrzzz has joined #ruby
arup_r has joined #ruby
allomov has joined #ruby
emarlan has joined #ruby
<emarlan>
i've been trying to learn programming for years now what am i doing wrong?
<sevenseacat>
uh... what makes you think you're doing something wrong?
leafybasil has joined #ruby
xcesariox has quit [Ping timeout: 252 seconds]
<emarlan>
because i can't code a webpage properly
<emarlan>
i can't style a page that i made in html
jenrzzz has quit [Ping timeout: 244 seconds]
grenierm has quit [Quit: grenierm]
claw has quit [Ping timeout: 255 seconds]
<sevenseacat>
ok, so you need to practice your css
<emarlan>
where and how
weemsledeux has joined #ruby
<emarlan>
i really want to learn so badly
<emarlan>
i've spent thousands of dollars trying to learn
lele is now known as Guest24
weemsledeux has quit [Client Quit]
<sevenseacat>
by trying different things, asking for help if you get stuck, reading online resources
<emarlan>
that doesn't work for me
claw has joined #ruby
<emarlan>
:(
leat3 has quit [Remote host closed the connection]
<emarlan>
are there any lab type things where i can push myself
weemsledeux has joined #ruby
<sevenseacat>
well without knowing exactly what trouble you're having, can only offer very general advice
dhjondoh has quit [Ping timeout: 264 seconds]
leat3 has joined #ruby
<emarlan>
i watched and read a lot of material
pawnbox has joined #ruby
<emarlan>
i try to do something and it's like i can't do it
<emarlan>
it's like i'm on the spot and blank out
leafybasil has quit [Ping timeout: 268 seconds]
<janno>
when you watch tutorials, do you try doing it yourself or just watch?
<janno>
I have same problem, if I only watch and try doing things after that, it wont work. I have to follow along to learn.
<emarlan>
thanks
<emarlan>
i'm going to try that
<janno>
cool
j4cknewt has joined #ruby
<sevenseacat>
a little bemused that the thought of actually following a tutorial didn't occur to you, but good to know you now have something to go on :)
<emarlan>
sevenseacat: i've never done homework and excelled on tests
<emarlan>
i guess it might have something to do with it
<prosody>
emarlan: Maybe you need someone to talk to about your code.
oo_ has quit [Remote host closed the connection]
<emarlan>
prosody: i feel like i need some guidance
<emarlan>
like a mentor
rubie has joined #ruby
oo_ has joined #ruby
<prosody>
emarlan: Teachers need teachers.
<emarlan>
but now i'm broke :(
tvw has joined #ruby
<shevy>
M-mistake if only you could build computer hardware similar to the human brain
jenrzzz has joined #ruby
ngscheurich has quit [Ping timeout: 240 seconds]
oo__ has joined #ruby
jmarrec has joined #ruby
eGGsha has joined #ruby
psy_ has quit [Ping timeout: 260 seconds]
dhjondoh has joined #ruby
<emarlan>
shevy: it would be nice if i could understand how my brain works
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<emarlan>
M-mistake: is there a place where you can learn how your brain works and what study methods are good for you?
dionysus69 has joined #ruby
astrobunny has joined #ruby
leat3 has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 255 seconds]
dseitz has joined #ruby
acke has joined #ruby
cgfbee has quit [Excess Flood]
leat3 has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
juanpablo_ has joined #ruby
grenierm has joined #ruby
<prosody>
emarlan: id love to work with you, but I need a stabler social network like https://matrix.org/beta/#/room/#ruby:matrix.org (to audit log you need a persistent, decentralized, distributed, secure log = persistent, decentralized, distributed, secure education... and the action of audit is free banking.)
<prosody>
shevy: I'm @mistake. I feel 0 and 1 are very human terms. We just added artificial intelligence on top of that emotional intel core. :∫
cgfbee has joined #ruby
<sevenseacat>
prosody: are you a bot...?
mblagden_ has quit [Read error: Connection reset by peer]
<prosody>
sevenseacat: No, I just have an IRC account, and a matrix.org bridge account.
oo__ has quit [Remote host closed the connection]
<prosody>
sevenseacat: Read the logs from matrix.org, then just switched to IRCCloud cause it's used here.
jenrzzz has quit [Ping timeout: 252 seconds]
towski_ has quit [Remote host closed the connection]
* sevenseacat
has no idea whats going on
<prosody>
sevenseacat: Someone was talking about learning/using/trouble programming.
<sevenseacat>
I know that, but I have no idea what youre talking about
<prosody>
sevenseacat: Live chat programming help, but with freer-form mayhaps?
<emarlan>
matrix seems like an irc server where you have to register to sign up?
TomyLobo has quit [Ping timeout: 246 seconds]
<prosody>
They were talking about encountering blocks in writing their code, so I just had my two cents.
TvL2386 has joined #ruby
acke has quit [Ping timeout: 260 seconds]
<prosody>
emarlan: Sorta. I do not want to clog by explaining.
juanpablo_ has quit [Ping timeout: 250 seconds]
MVPhelp has quit [Remote host closed the connection]
<shevy>
what happened to the good old days of using classic IRC clients
acke has joined #ruby
MVPhelp has joined #ruby
<[k->
what happened to using Unicode, shevy?
jenrzzz has joined #ruby
<shevy>
why would I need that
<emarlan>
prosody: are you in the channel?
<prosody>
shevy: Theoretically Matrix procol's IRC refit wants to do away with the centralization and maybe let your IRC client be a part of the messaging network as a federated homeserver-client.
<prosody>
protocol*
<prosody>
emarlan: Yes.
<emarlan>
okay i'm going to quit this chat
<emarlan>
thank you :)
radgeRayden has quit [Ping timeout: 265 seconds]
emarlan has quit [Quit: Page closed]
<shevy>
yeah, there is quite a bit of movement of "IRC is old-school, let's change it"
<sevenseacat>
we'll still be here after those movements are finished.
<baweaver>
I do have a hard time believing that someone never encountered a tutorial before
<baweaver>
but to each their own.
<prosody>
We're talking about Ruby on Matrix.org. Just needed more room.
kyoshero has joined #ruby
leat3 has joined #ruby
pawnbox has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
<prosody>
First lettering and line of the topic here is "Rules" ;) so it makes sense if there are a lot of shrugs IO:)
pawnbox has joined #ruby
firstdayonthejob has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
JoL1hAHN has joined #ruby
leat3 has quit [Remote host closed the connection]
bigkevmcd has quit [Ping timeout: 256 seconds]
pontiki has quit [Ping timeout: 246 seconds]
leat3 has joined #ruby
j4cknewt has joined #ruby
bigkevmcd has joined #ruby
xcesariox has joined #ruby
last_staff has joined #ruby
Chau_ has quit [Quit: Leaving]
atzorvas has quit [Quit: leaving]
lucyinthesky has left #ruby ["Leaving"]
Xzanron has joined #ruby
c0ncealed has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
j4cknewt has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
zlogan85 has quit [Ping timeout: 265 seconds]
athinggoingon has quit [Ping timeout: 255 seconds]
ta has joined #ruby
niemcu has joined #ruby
ruurd has joined #ruby
zlogan85 has joined #ruby
UtkarshRay has quit [Ping timeout: 244 seconds]
c0ncealed has quit [Ping timeout: 256 seconds]
greenarrow has joined #ruby
lsmola has joined #ruby
opensource_ninja has quit [Ping timeout: 255 seconds]
opensource_ninja has joined #ruby
Rollabunna has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
baweaver has quit [Remote host closed the connection]
matp has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]
matp has joined #ruby
ohaibbq has quit [Quit: Leaving...]
firstdayonthejob has joined #ruby
fxn has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
patrick_star has joined #ruby
joonty has joined #ruby
leat3 has quit [Remote host closed the connection]
Juanchito has joined #ruby
leat3 has joined #ruby
DoubleMalt has joined #ruby
dopiee has quit [Quit: This computer has gone to sleep]
lolmaus has joined #ruby
devoldmx has joined #ruby
nhhagen has quit [Remote host closed the connection]
lolmaus has quit [Client Quit]
j4cknewt has joined #ruby
ordepdev has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
roxtrongo has quit [Remote host closed the connection]
patrick_star has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JohnBat26 has joined #ruby
firstdayonthejob has quit [Ping timeout: 256 seconds]
jgt1 has joined #ruby
<prosody>
I wish _why was an op.∫
aganov has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<shevy>
_why is gone
AlphaAtom has joined #ruby
<prosody>
I∫ _mis _why.
tkuchiki has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
sevenseacat has quit [Quit: .]
kyoshero has quit [Read error: Connection reset by peer]
<shevy>
he made great cartoons
workmad3 has quit [Ping timeout: 256 seconds]
AlexRussia has quit [Quit: WeeChat 1.3-dev]
iateadonut has quit [Quit: Leaving.]
<prosody>
he gave code emotion(s)
<shevy>
yeah
<shevy>
I have heard about emocode
ordepdev has quit [Remote host closed the connection]
<prosody>
Aha. Renice. Makes cense. i switched Info Sec to Emo Sec, but failed to find that det.
yfeldblum has joined #ruby
rdark has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<apeiros>
emocode… brilliant :D
Macaveli has joined #ruby
allomov has joined #ruby
stan_ has joined #ruby
allomov has quit [Read error: Connection reset by peer]
grenierm has quit [Quit: grenierm]
allomov has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
astrobunny has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 260 seconds]
Tempesta has joined #ruby
Spami has joined #ruby
Ropeney has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
michael_mbp has quit [Excess Flood]
voxxit has quit [Ping timeout: 244 seconds]
michael_mbp has joined #ruby
mblagden has quit [Ping timeout: 264 seconds]
mblagden has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
voxxit has joined #ruby
leat3 has quit [Ping timeout: 264 seconds]
c0ncealed has joined #ruby
nhhagen has joined #ruby
miah has quit [Ping timeout: 246 seconds]
cloudbud has joined #ruby
<cloudbud>
this ques is related to chef.I have a rcipe where in recipe node['oms-common'] is used in recipe. I need to figure out from where the attribute value node['oms-common'] is coming. its not even defined in the attributes file
j4cknewt_ has joined #ruby
casadei_ has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 255 seconds]
<Xzanron>
cloudbud, why aren't you asking this in #chef ?
<cloudbud>
i asked thr
senayar has joined #ruby
j4cknewt has quit [Ping timeout: 244 seconds]
<Radar>
cloudbud is charged per letter sent though their ISP
<prosody>
Radar: Throughwellput.
Soda has quit [Remote host closed the connection]
blowmage` has quit [Ping timeout: 264 seconds]
astrobunny has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
faces has joined #ruby
deg_ has quit [Ping timeout: 268 seconds]
face has quit [Ping timeout: 240 seconds]
JimmyNeutron has quit [Ping timeout: 244 seconds]
eam has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tesuji_ has quit [Read error: Connection reset by peer]
deg_ has joined #ruby
tesuji has joined #ruby
duncannz has quit [Ping timeout: 260 seconds]
Ropeney has joined #ruby
<astrobunny>
damnit
<astrobunny>
i installed rake-compile
<astrobunny>
but rake still insists it cannot find rake/extensiontask
<astrobunny>
what is wrong
jgt1 has quit [Ping timeout: 272 seconds]
<astrobunny>
even in irb rake/extensiontask can be loaded
Hounddog has joined #ruby
<astrobunny>
what the hell
blowmage has joined #ruby
dionysus69 has joined #ruby
yeticry has joined #ruby
<astrobunny>
wtf is this
SCHAAP137 has joined #ruby
JimmyNeutron has joined #ruby
niemcu has quit [Ping timeout: 260 seconds]
<apeiros>
astrobunny: are you in a project with a Gemfile?
<astrobunny>
i have a gemspec
<astrobunny>
yes
<apeiros>
gemspec != Gemfile
<astrobunny>
well the Gemfile says gemspec
krisquigley has joined #ruby
<astrobunny>
of course they are different, but i have a Gemfile that says gemspec
<apeiros>
then you're probably running via bundler. you have to add rake-compile to your dependencies.
<astrobunny>
ah
j4cknewt_ has quit [Read error: Connection reset by peer]
<apeiros>
note that a gem can have development dependencies - stuff needed for development, but not for using the gem.
<astrobunny>
i see
<astrobunny>
i need to test my gem extension
<astrobunny>
i have a project requiring the gem by path
MichaelSmith has quit [Quit: Connection closed for inactivity]
<astrobunny>
but when i bundle install i dont see it building
<astrobunny>
the extension
<astrobunny>
thanks, apeiros
anisha has joined #ruby
j4cknewt has joined #ruby
<certainty>
moin
<apeiros>
moin certainty
<certainty>
o/
mikecmpbll has joined #ruby
mistergibson has quit [Quit: Leaving]
Igorshp_ has quit [Remote host closed the connection]
eam has joined #ruby
charliesome has joined #ruby
solars has joined #ruby
bayed has joined #ruby
jgt1 has joined #ruby
charliesome has quit [Client Quit]
blaxter has joined #ruby
yeticry has quit [Ping timeout: 268 seconds]
terlar has quit [Ping timeout: 252 seconds]
skade has joined #ruby
yeticry has joined #ruby
autrilla has quit [Quit: Connection closed for inactivity]
Balzrael has joined #ruby
charliesome has joined #ruby
lokulin has quit [Quit: bye!]
leafybasil has joined #ruby
sagittarian has joined #ruby
roxtrongo has joined #ruby
Zai00 has joined #ruby
niemcu has joined #ruby
lokulin has joined #ruby
CustosL1men has joined #ruby
leafybasil has quit [Ping timeout: 272 seconds]
CustosLimen has quit [Max SendQ exceeded]
roxtrongo has quit [Ping timeout: 264 seconds]
lostinmalloc has joined #ruby
beast has joined #ruby
CustosLimen has joined #ruby
ckinniburgh has quit [Read error: Connection reset by peer]
leat3 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
tomaz_b has joined #ruby
<astrobunny>
is there a way to invalidate the ruby bundle
<astrobunny>
the native extension bundle
oo_ has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
astrobunny has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
timonv has joined #ruby
<apeiros>
also `git ls-files` does not work if you have the source from anywhere else than git-clone or a full copy of a repo
arup_r has joined #ruby
<apeiros>
s/also/additionally/
<yorickpeterse>
yup
<yorickpeterse>
e.g. a tarball
<apeiros>
or from a gem install :)
<marwinism>
I'm stuck trying to build xml with nokogiri Builder. I want <ns1:foo> <ns2:bar><foo><bar></ns2:bar></ns1:foo> - Any tips, ideas or suggestions? Google has similar hits, but no cigar.
<apeiros>
though, it's arguable that the source from a gem install does not need to contain all files to develop on the gem
sdothum has joined #ruby
[k-_ has joined #ruby
<apeiros>
marwinism: iirc there's two ways, one is public_send("ns1:foo")
<apeiros>
the other I think was using [], e.g. builder["ns1"].foo, not sure anymore about that way
sepp2k has joined #ruby
<apeiros>
actually, not even sure about the first way anymore. been a while :)
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sebyx07 has joined #ruby
wldcordeiro has joined #ruby
c0ncealed has quit [Ping timeout: 268 seconds]
sankaber has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
shock_on_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<marwinism>
apeiros: thanks! Already doing that, but in some namespaces (not all of them), I need clean tags without namespaces. This is a shitty format called CIN XML, and i'm starting to belive I need to hack it real bad.
<marwinism>
I just can't figure out how to stop namespace inheritance on some nodes.
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
ledestin has joined #ruby
<marwinism>
builder['foo'].root { builder.foo } works like charm
MasterPiece has joined #ruby
<marwinism>
i'll do some research on public_send tho! Thanks
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
astrobunny has quit [Ping timeout: 250 seconds]
dhjondoh has joined #ruby
astrobunny has joined #ruby
wildlander has joined #ruby
sdothum has joined #ruby
dhjondoh has quit [Client Quit]
joonty has quit [Quit: joonty]
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
<FernandoBasso>
I am trying to find more about class instance variables in the docs but I can't seem to find it. Any suggestions?
leat4 has joined #ruby
<apeiros>
FernandoBasso: they are exactly the same as instance variables
<FernandoBasso>
-exactly-?
<apeiros>
(because they *are* instance variables)
<apeiros>
exactly.
<FernandoBasso>
What about setting getters and setters for them?
<FernandoBasso>
What about inheritance?
<apeiros>
the instance to which a class ivar belongs is the class
<apeiros>
that means you define accessors on the class of that instance
<FernandoBasso>
How is that done?
jeffreylevesque has joined #ruby
pontiki has joined #ruby
leat3 has quit [Remote host closed the connection]
<apeiros>
>> class Foo; class << self; attr_reader :x; end; @x = 1; end; Foo.x
JamesDH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
you're not calling a method on A
<apeiros>
you're calling one on B
<apeiros>
the variable is not shared
yfeldblum has quit [Ping timeout: 244 seconds]
<yorickpeterse>
what?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
unless you meant they're not shared between class definitions, you're talking out of your arse
<apeiros>
you execute code in the context of b, with self being b, which sets an ivar
<apeiros>
yorickpeterse: mind your language
<yorickpeterse>
If you meant that they're not shared in the same fashion as class variables, then yes, you're right
<yorickpeterse>
But instance variables set in a parent class are very much available to sub classes when they're initialized
<apeiros>
class A; @x = 1; end; class B < A; end # class B does *not* have access to @x from A. it can define its own @x. it can do so through a method it inherited from A. but that does NOT mean it accesses A's @x
<apeiros>
that's the point. you do NOT set it in the parent class
<apeiros>
you use *a method inherited* from the parent class. you don't execute that method in the parent class. you execute it in the descendant.
<yorickpeterse>
next time you might want to clarify you specifically meant setting ivars on class level
<yorickpeterse>
and not on instance level
<apeiros>
same thing
<yorickpeterse>
_very_ different
<apeiros>
works exactly the same.
<yorickpeterse>
class Foo; @x = 10; end # you're setting an ivar on an instance of the singleton class
leat4 has quit [Remote host closed the connection]
<yorickpeterse>
which is _very_ different from setting an ivar on the instance of the class
allomov has quit [Remote host closed the connection]
leat4 has joined #ruby
<apeiros>
the mechanics of what has access to what is precisely the same.
<[k-_>
ivars and cvars, the worst things that ever happened to a beginner
<yorickpeterse>
ivars are fine, cvars are a farce
Rurik has quit [Ping timeout: 260 seconds]
<yorickpeterse>
They literally should've never existed
devoldmx has joined #ruby
<yorickpeterse>
but then again constants aren't constant either
<yorickpeterse>
¯\_(ツ)_/¯
<apeiros>
yorickpeterse: to understand, change your code slightly. class A; def foo; p self.class; @number = 10; end
<apeiros>
you'll see that b.foo will print B, not A
ebbflowgo has quit [Quit: ebbflowgo]
<astrobunny>
ho lee fugue
<astrobunny>
you are right.
Rurik has joined #ruby
<astrobunny>
spec.files = `git ls-files -z`
<astrobunny>
i do not know why i did not see that
<astrobunny>
but wow.
<yorickpeterse>
apeiros: oh wow, I totally hadn't noticed
ebbflowgo has joined #ruby
<yorickpeterse>
...
<apeiros>
or even: b = B.new; c = B.new; b.foo; c.instance_variables
<apeiros>
b has @number, c does not.
JamesDH has joined #ruby
<apeiros>
ivars are registered to a single object alone
karapetyan has joined #ruby
<yorickpeterse>
... you're missing what I said
<apeiros>
13:56 yorickpeterse: apeiros: instance variables are available to subclasses
<yorickpeterse>
instance variables are inherited from parent classes, but scoped to their instances
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
you say that. and that's not correct.
<yorickpeterse>
...it is
<apeiros>
no, they are not inherited. you inherit methods.
<apeiros>
not ivars.
bmurt has joined #ruby
<apeiros>
if you would inherit ivars, they'd show up on .instance_variables.
<yorickpeterse>
oh right, because you can access ivars from the ancestor chain
TheHodge has joined #ruby
<apeiros>
I think your mental model of objects is quite broken.
<yorickpeterse>
I'm pretty aware of how this works
<apeiros>
it works by you evaluating #initialize in the context of `b`
jgt1 has quit [Ping timeout: 240 seconds]
<apeiros>
and that method adds an ivar to `b` and `b` alone.
devoldmx has quit [Ping timeout: 244 seconds]
<apeiros>
no variable has been inherited in the process.
dasher00 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
<yorickpeterse>
The example you've showed, of `class Foo; @number = 10; end` is a very different thing from what I've showed
<apeiros>
it's the same as doing: b.instance_eval do @foo = 10 end # I didn't inherit @foo from anywhere either
monsieurp has quit [Quit: Lost terminal]
<apeiros>
so in short: what you inherit is #initialize
<apeiros>
you don't inherit @foo
jgt1 has joined #ruby
<apeiros>
the inherited code will define your @foo when it is run. how you get to "that means @foo is inherited" from that is beyond me.
TvL2386 has quit [Ping timeout: 252 seconds]
<[k-_>
apeiros is so clever!
<[k-_>
i thought ivars were inherited too
monsieurp has joined #ruby
karapetyan has quit [Ping timeout: 264 seconds]
<[k-_>
\¯\_(ツ)_/¯
<yorickpeterse>
apeiros: it's inherited in the sense that whatever is defined in the ancestor chain (and is called), is available to sub classes
monsieurp has quit [Client Quit]
<yorickpeterse>
it's not inherited that there's some field like "superclass" or w/e
<apeiros>
again, IMO you misunderstand the object model
<yorickpeterse>
That is, there's no hard coded chain so to speak (as is the case with classes)
<apeiros>
a newly created object has *zero* ivars. it has its own ivar table. which is empty. it has no reference in that table to any class/superclass/chain
monsieurp has joined #ruby
<apeiros>
ivars are NOT part of inheritance. at all.
danieli has joined #ruby
<apeiros>
cvars are. in a weird way.
<yorickpeterse>
" it's inherited in the sense that whatever is defined in the ancestor chain (and is called)"
<apeiros>
that doesn't even make sense.
<apeiros>
tell me, what's the super equivalent for ivars?
leat4 has quit [Remote host closed the connection]
leat4 has joined #ruby
<yorickpeterse>
Your initial note made it sound like ivars are not available to subclasses when they're defined in a method that is called from a child class
<yorickpeterse>
That in itself is false, which I probably didn't explain entirely clearly
<apeiros>
they are not. you get your very own ivar in that child class.
<yorickpeterse>
What I meant is that if an instance of a class has a parent class, where something defines an instance variable (e.g. via a method call), then those variables _are_ available to the instance
<apeiros>
which is entirely unrelated to the ivar in the superclass.
<apeiros>
again: all you share is the code.
<yorickpeterse>
And the difference with that vs `class Foo; @number = 10; end` is that this doesn't even set an ivar on the instance of the class, but instead on the singleton class
<FernandoBasso>
apeiros: I still don't see where in the docs I would read about this subject.
<apeiros>
and again: this code can very well set/assign/define an ivar. but that ivar has absolutely nothing to do with any ivar the same code sets in any other object.
<Mon_Ouie>
The docs seem very misleading actually. Module#attr_accessor states ' creating an instance variable (@name)' which I don't think it does at all.
<yorickpeterse>
hm, ruby-doc only seems to cover core/stdlib and some outdated shit
<FernandoBasso>
It is either incomplete or inaccurate.
al2o3-cr has quit [Ping timeout: 240 seconds]
<apeiros>
Mon_Ouie: uh, yes, this is indeed very misleading
<yorickpeterse>
apeiros: I don't see where this defines accessors in the attr_accessor sense
<yorickpeterse>
unless you're referring to something else when you talk about accessors
ebbflowgo has quit [Quit: ebbflowgo]
<apeiros>
yorickpeterse: lost where you are. what do you mean?
<yorickpeterse>
FernandoBasso: there's an ISO spec, which only covers 1.8, and costs about 200 Euros
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
apeiros: "you define the *accessor* in the singleton class"
<apeiros>
yorickpeterse: not shown in the code
<yorickpeterse>
then I'm confused
<apeiros>
yorickpeterse: you'd do class << Foo; attr_reader :x; end to access that @x
<yorickpeterse>
oh right, that pattern
mary5030 has joined #ruby
<apeiros>
>> class Foo; @x = 1; class << self; attr_reader :x; end; end; [Foo.instance_variables, Foo.x]
<FernandoBasso>
yorickpeterse: And which would probably look like gobbledygook to me.
<yorickpeterse>
FernandoBasso: either way, instance variables are variables available to an instance of something only
pontiki has quit [Ping timeout: 244 seconds]
<yorickpeterse>
since Ruby doesn't let you pre-define them (e.g. as you'd probably do in something like Java) they're usually set from within a method
ruby-lang923 has joined #ruby
<apeiros>
define the reader as an instance method in Foo's class (where you have 2 options: Class and ancestors, or .singleton_class), define the ivar in the instance (Foo)
<yorickpeterse>
e.g. the "initialize" method
<shevy>
FernandoBasso the best initial tutorial I always found to be were working examples
<ruby-lang923>
!help
<ruby-lang923>
me
<yorickpeterse>
ruby-lang923: just ask your question
<yorickpeterse>
FernandoBasso: and yes, the ISO spec is meh
ruby-lang923 has quit [Client Quit]
dasher00 has joined #ruby
leat4 has quit [Ping timeout: 268 seconds]
dasher00 has quit [Max SendQ exceeded]
mary5030 has quit [Remote host closed the connection]
<shevy>
200 euro for meh documentation hmm
rbennacer has joined #ruby
<FernandoBasso>
Well, thank you all for your invaluable insights.
<yorickpeterse>
shevy: doesn't even cover encodings
<yorickpeterse>
or the syntax introduced in 1.9
Outlastsheep has quit [Ping timeout: 268 seconds]
<Mon_Ouie>
Well it is meant to be a spec for Ruby 1.8
dasher00 has joined #ruby
mary5030 has joined #ruby
<certainty>
workmad3: ltns o/
<yorickpeterse>
Mon_Ouie: it was written when 1.9 was out
last_staff has quit [Quit: *voom]
<yorickpeterse>
makes little sense to write an ISO spec for an already deprecated version of your language
Quandl has joined #ruby
<yorickpeterse>
especially if that version is _very_ different from newer versions
<FernandoBasso>
And what is the difference between a variable I defined right inside the body of a class vs those I create inside an initialize method?
<maloik>
don't go stealing my docs now
<yorickpeterse>
also wtf Mail dumps downloads in ~/Library?
<yorickpeterse>
wtf Apple
<shevy>
FernandoBasso do you mean @ivar or var ?
<yorickpeterse>
FernandoBasso: they're available in different contexts
<FernandoBasso>
shevy: Just a moment.
<shevy>
FernandoBasso but a general answer is, the scope is different
<shevy>
class Foo; @foo = 'foo' will be different than class Foo; def initialize; @foo = 'foo'
<Mon_Ouie>
@foo always refers to the instance variable called '@foo' of the object referenced to by self
<Mon_Ouie>
And we just happen to call the instance variables of objects that are also classes "class instance variables", so your annotations are correct
<FernandoBasso>
I misunderstood what apeiros said then. "they are exactly the same".
<yorickpeterse>
FernandoBasso: euh, technically I believe "instance variable" and "class instance variable" are the same
khebbie has quit [Remote host closed the connection]
<FernandoBasso>
Or my question was ill-asked.
<shevy>
different scope FernandoBasso
<yorickpeterse>
at least in Smalltalk they are 2 terms for the same thing
<shevy>
FernandoBasso I would call both instance variables
roxtrongo has quit [Ping timeout: 264 seconds]
<yorickpeterse>
FernandoBasso: when you do `class Foo; @number = 10; end` then @number is available to Foo
joonty has joined #ruby
<Mon_Ouie>
They work the same way, just with a different object referenced to by 'self'
<sebyx07>
for class instance variable, you can define getter and setters through cattr_(reader/writer/accessor)
<yorickpeterse>
when you do `class Foo; def initialize; @number = 10; end; end` then @number is only available to _instances_ of Foo
<Mon_Ouie>
sebyx07: Those methods are not part of Ruby.
<shevy>
FernandoBasso you can give both the same name btw ... class Foo; @foo = 5; def initialize; @foo = 5 <-- two different @foo variables there
khebbie has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
<yorickpeterse>
also blegh, my whole brain is full of hay today
<Mon_Ouie>
And looking them up, they set class variables in Rails
TvL2386 has joined #ruby
<certainty>
i believe the implementation is roughly equivalent to what apeiros already show. Defining attr_reader on the singleton_class
<certainty>
showed
<sebyx07>
ah, for normal ruby, you can use class << self; attr_(reader/writer/accessor) :myaccessor; end. You can also checkout my DI library i made for ruby https://github.com/sebyx07/rubybeans
<apeiros>
14:25 yorickpeterse: FernandoBasso: euh, technically I believe "instance variable" and "class instance variable" are the same
<apeiros>
yes, that
chills42 has quit [Remote host closed the connection]
<FernandoBasso>
In some of my tests, I had to do def self.foo; @foo; end; and def self.foo=(val); @foo = val; end to create getters/setters for "class instance variables".
<yorickpeterse>
don't have the book with me, but I'm pretty sure the Smalltalk blue book uses both to refer to the same
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
FernandoBasso: yes, `class Foo; def self.foo; @foo; end; end` is equivalent to `class Foo; class << self; attr_reader :foo; end; end`
<FernandoBasso>
All right.
<shevy>
FernandoBasso I'd call them instance variables too, just that they reside on the class level
<certainty>
i mean the module system in languages in haskell or scheme
clocKwize has joined #ruby
<certainty>
but constrained to behavior/functions only
clocKwize has quit [Max SendQ exceeded]
bruno- has joined #ruby
Flipez- has quit [Ping timeout: 268 seconds]
<certainty>
now that I think of it typeclasses are also somewhat akin to it (minus the renaming, exclusion thing)
zlogan85 has joined #ruby
charliesome has joined #ruby
<yorickpeterse>
eh, not entirely
<yorickpeterse>
a trait can only specify methods
<yorickpeterse>
while a module is usually just a container for whatever is defined in a file
<yorickpeterse>
(module in the non Ruby sense)
<[k-_>
a module is not a trait
<[k-_>
although they are a collections of similar methods
<maloik>
feature that had been in our app for over a year appeared broken... figured out it was due to a comma in jquery's .on() function separating the multiple events it had to listen to
<[k-_>
they serve different purposes
<maloik>
(tableflip)
vondruch_ has quit [Quit: Ex-Chat]
<certainty>
the word module is overloaded here
<[k-_>
(╯°□°)╯︵ ┻━┻
c0ncealed has quit [Ping timeout: 244 seconds]
sgambino has joined #ruby
shaman42 has quit [Remote host closed the connection]
<[k-_>
i have a table flip macro :D
khebbie has quit [Remote host closed the connection]
Guest31288 has quit [Quit: WeeChat 1.3]
<certainty>
yorickpeterse: yes, that's what i meant when I said: "constrained to behavior/functions only". I wasn't clear here I think
bruno- has quit [Ping timeout: 260 seconds]
zlogan2003 has quit [Ping timeout: 272 seconds]
wldcordeiro has quit [Remote host closed the connection]
devoldmx has joined #ruby
Guest29473 has left #ruby [#ruby]
Rollabunna has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
leat4 has joined #ruby
Rurik has quit [Ping timeout: 264 seconds]
lkba_ has joined #ruby
<maloik>
your macro doesn't appear right here because I still havent fixed my encoding
Flipez- has joined #ruby
<maloik>
but oh well, priorities
<yorickpeterse>
scrub
<maloik>
**continues to try and make a triple oreo cookie**
lxsameer has quit [Quit: Leaving]
<maloik>
just kidding, I'm not doing that
<maloik>
I did that while waiting for my coffee
bigredboots has joined #ruby
Rurik has joined #ruby
bluetuna has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
TvL2386 has quit [Ping timeout: 252 seconds]
bkxd has quit [Quit: Lost terminal]
riotjones has quit [Remote host closed the connection]
pawnbox_ has quit [Ping timeout: 244 seconds]
atomical has joined #ruby
<shevy>
lol
bigredboots has quit [Remote host closed the connection]
<shevy>
?coffee
<ruboto>
here's a coffee, you seem to need it: ☕
pawnbox has joined #ruby
hinbody has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
<shevy>
ruboto really has all the useful stuff inbuilt
lkba_ has quit [Read error: Connection reset by peer]
<shevy>
apeiros was like dead silent at the beginning of 2015
bruno- has quit [Ping timeout: 244 seconds]
<certainty>
contrast that with the activity at #perl
* certainty
hides
<shevy>
hey... perl 6 will revive perl
<certainty>
yeah sure
<shevy>
it's already at 700 users!
pawnbox has quit [Ping timeout: 255 seconds]
markoa has joined #ruby
<[k-_>
look at #haskell
<certainty>
apeiros: is not active in #haskell i believe
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
victortyau has joined #ruby
sharkman has joined #ruby
<[k-_>
?crosspost certainty
<ruboto>
certainty, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<[k-_>
^ ^
<certainty>
how was that a crosspost? xD
<[k-_>
the world works in mysterious ways, my friend
<certainty>
i see i see
Zai00 has joined #ruby
dblessing has joined #ruby
momomomomo has joined #ruby
TvL2386 has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
platzhirsch has joined #ruby
leat4 has quit [Remote host closed the connection]
<shevy>
yeah lots of people in #haskell
leat4 has joined #ruby
momomomomo has quit [Client Quit]
<shevy>
probably there are free cookies
tkuchiki has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
nw has joined #ruby
bruno- has joined #ruby
sebyx07 has quit [Ping timeout: 260 seconds]
nw is now known as Guest13124
wldcordeiro has joined #ruby
Kallis has quit [Ping timeout: 272 seconds]
astrobunny has quit [Read error: Connection reset by peer]
dhjondoh has quit [Quit: dhjondoh]
Zai00 has quit [Quit: Zai00]
bruno- has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
Seich has quit [Ping timeout: 244 seconds]
<platzhirsch>
shevy: They are god-damn friendly folks
athinggoingon has joined #ruby
<platzhirsch>
Very enlightened spirits roaming in #haskell
Oka has joined #ruby
<ljarvis>
good ruby talk
<[k-_>
unlike me :(
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
Kallis has joined #ruby
oo_ has quit [Remote host closed the connection]
Kallis has quit [Max SendQ exceeded]
charliesome has joined #ruby
Seich has joined #ruby
but3k4 has joined #ruby
leat4 has quit [Ping timeout: 250 seconds]
quazimodo has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 264 seconds]
allomov has joined #ruby
<shevy>
[k-_ you just happen to like haskell the most here :>
bruno- has joined #ruby
<certainty>
that's not true
<certainty>
or probably it is true
Rurik has quit [Ping timeout: 268 seconds]
leat4 has joined #ruby
<yorickpeterse>
anybody here using Lotus for serious internet business?
<certainty>
nope not yet
<yorickpeterse>
trying to see how people's experiences are with it
* certainty
same
<yorickpeterse>
definitely looks interesting, but it's a risky choice
kobain has joined #ruby
<shevy>
Lotus? the office suite from the 1990s?
<certainty>
shevy: lotus.rb
<[k-_>
lotus.jrb
<beast_>
lotus looks sexy
<certainty>
yeah
malconis has joined #ruby
Rollabunna has joined #ruby
<maloik>
speaking of srs business, I'm looking into elixir right now... very pleasant experience so far
<maloik>
I can see it going places (along with phoenix)
rbennacer has joined #ruby
<certainty>
it rises like phoenix?
_blizzy_ has quit [Ping timeout: 244 seconds]
<maloik>
yes, except that would imply it having died before
<certainty>
phoenix is a library for elixir? pardon my ignorance
<[k-_>
havenwood will tell you more!
<certainty>
oh it's a framework
<[k-_>
oh, he isnt here
<maloik>
framework indeed
Zai00 has quit [Quit: Zai00]
bruno- has quit [Ping timeout: 240 seconds]
<maloik>
still working on elixir so I haven't looked into it yet, but from a distance it feels like it was inspired by rails, just more lightweight and with a little less magic
slack_ has quit [Quit: Page closed]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
sdwrage has joined #ruby
bruno- has joined #ruby
Rurik has joined #ruby
OrbitalKitten has joined #ruby
<certainty>
maloik: what's the nicest thing about elixir so far?
s00pcan has quit [Ping timeout: 265 seconds]
<platzhirsch>
shevy: people just really enjoy writing Haskell, if you ask a question, they solve it for you
zlogan85 has quit [Ping timeout: 246 seconds]
<maloik>
what's caught my attention so much more than say Go or whatever is its community and leadership
zlogan2003 has joined #ruby
<niemcu>
and speaking of frameworks, what do you guys think about Volt?
<maloik>
the fact that its syntax is a little like ruby, and some of the ideologies as well, really helps
<ljarvis>
yorickpeterse: lotus is great, but not for srs business yet
<maloik>
also, phoenix seems to be the "approved" framework by the elixir team so to speak... if you look at go, there's like over 9000 you need to evaluate
<yorickpeterse>
ljarvis: how so?
s00pcan has joined #ruby
<ljarvis>
yorickpeterse: it's just too young at the moment (for me to invest in, that is). But I really like the look of it
<yorickpeterse>
Oh yeah
<yorickpeterse>
the pros/consts we've gathered so far are...
<yorickpeterse>
err where did I put this
<yorickpeterse>
Ah
<ljarvis>
try /documents/rants
<certainty>
maloik: ok thanks
Dopagod has joined #ruby
juanpablo_ has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
TvL2386 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis>
the biggest issue for me is one you haven't listed; third-party tools. Our gemfile is packed full of stuff we pull in because there are companies/people decicated to maintaining hard to build software. I'm not prepared for us to start writing some of that stuff ourselves
<yorickpeterse>
and from what I gather it also has some issues on JRuby 9k
<yorickpeterse>
ljarvis: it's there IIRC
<ljarvis>
ah you mention ecosystem, so basically the same
<yorickpeterse>
yeah
<platzhirsch>
yorickpeterse: drop that goofy emoticon
<yorickpeterse>
platzhirsch: what?
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
haters gonna hate ᕕ(ᐛ)ᕗ
<platzhirsch>
Be a serious man
Rollabunna has quit [Remote host closed the connection]
<ljarvis>
wat
<yorickpeterse>
(it's actually set to : haters : minus the spaces)
iateadonut has joined #ruby
juanpablo_ has quit [Ping timeout: 240 seconds]
Igorshp has quit [Read error: No route to host]
MasterPiece has quit [Quit: Leaving]
Igorshp has joined #ruby
<[k-_>
* ****** *?
<[k-_>
is that your password?
jobewan has joined #ruby
<yorickpeterse>
No, it's *******
<ljarvis>
inb4 hunter2
<yorickpeterse>
hence 7 characters
<ljarvis>
nerd
dopamean_ has quit [Ping timeout: 260 seconds]
leat4 has joined #ruby
apt-get has quit [Read error: No route to host]
<yorickpeterse>
I just have an impeccable sense of humor
apt-get_ has joined #ruby
<yorickpeterse>
I just walk into a bar and be like, hey, wanna see my XML parser?
<yorickpeterse>
(the first joke is that I don't go into bars)
UtkarshRay has quit [Ping timeout: 246 seconds]
<maloik>
do you powerslide in?
<ljarvis>
"sure, is it as fast as Nokogiri?" *necks shot and walks out*
haxrbyte has joined #ruby
<yorickpeterse>
ljarvis: come say that to my face tough guy
<sharkman>
im coding ruby now
bruno- has joined #ruby
<yorickpeterse>
also actually xpath is now faster than nokogiri in certain cases
<ljarvis>
yorickpeterse: <3
Jammyhammy|Work has joined #ruby
<platzhirsch>
sharkman: that is so good
morenoh149 has joined #ruby
<sharkman>
thanks platzhirsch, you too
<platzhirsch>
I know ᕕ(ᐛ)ᕗ
<yorickpeterse>
stop stealing my emoji
Rurik has quit [Ping timeout: 268 seconds]
Jammyhammy|Work has quit [Client Quit]
Mives has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
<platzhirsch>
It's an emoticon sir
<yorickpeterse>
EMOJI, this is not MSN
<platzhirsch>
No Emojis are based on Unicode
<sharkman>
can i swear on this channel
<yorickpeterse>
platzhirsch: so is this
<beast_>
I'm in love with Ruby, she is so elegant and beautiful that I never want to leave her...
<sharkman>
would i get killed if i do
<platzhirsch>
(╯°□°)╯︵ ┻━┻ vs.
<platzhirsch>
yes, but it is one character unicode
<yorickpeterse>
it's still unicode
bronson has joined #ruby
<platzhirsch>
yes, that doesn't make it an emoji
<yorickpeterse>
sharkman: it's preferred not to swear like a sailor
<yorickpeterse>
* to not swear
<yorickpeterse>
jeez
<yorickpeterse>
my Engrish
tagrudev has quit [Remote host closed the connection]
casadei_ has joined #ruby
<sharkman>
but i could swear occasionally like esp. if its funny right
<mustmodify_>
using ruby 2.2.3 and bundler, I'm seeing an issue where bundler says a gem failed to install, but I'm able to install it using `gem install xxx`. Then another 10 or 20 gems later, another fails. just bundling again does not work. Any ideas?
karapetyan has quit [Remote host closed the connection]
<shevy>
freetimeruby you must invoke it on the correct object
karapetyan has joined #ruby
<freetimeruby>
well i did
<freetimeruby>
2.methods.sort
dionysus69 has joined #ruby
EXID123 has joined #ruby
<shevy>
4.between? 2,5
EXID123 has quit [Remote host closed the connection]
<freetimeruby>
shevy:
<wmoxam>
freetimeruby: what version of Ruby are you running?
ruurd has quit [Max SendQ exceeded]
wldcordeiro has quit [Remote host closed the connection]
<Mon_Ouie>
If you look at ri Numeric, it will say that the Numeric class (which is Integer's superclass) includes the module Comparable. This means that all of Comparable's instance methods are also available to integers.
Ox0dea has joined #ruby
shoutsid has quit [Remote host closed the connection]
thang has joined #ruby
<Mon_Ouie>
sharkman: Using if/elsif
<sharkman>
week is passed to the case statement, and in a couple situations i want to convert it to an integer to analyze
<sharkman>
oh okay
<Ox0dea>
Mon_Ouie: No.
<freetimeruby>
docs should say all
danieli has quit [Quit: *does an epic backflip into nowhere*]
<freetimeruby>
damn it
<shevy>
freetimeruby aha, found it... rb_include_module(rb_cNumeric, rb_mComparable); in the file numeric.c - this may be hard to read but this should be equivalent to "include Comparable" in pure ruby
beast_ has quit [Quit: Leaving]
shaman42 has joined #ruby
<Ox0dea>
sharkman: Ruby 2.3 defines #positive? and #negative? on Integers, but I imagine you're not using 2.3. :/
<sharkman>
lol no im not
<freetimeruby>
i'm afraid to do any actual work in ruby :! u dont have actual docs
<Ox0dea>
sharkman: You can use `when -> n { n < 0 }`.
<sharkman>
too bad it cant work on a case statement. it would look nicer that way
podman has joined #ruby
<Ox0dea>
sharkman: See above.
<shevy>
freetimeruby yeah, it's only for the brave :>
<Ox0dea>
You can get close enough.
<Mon_Ouie>
The docs do say it. You can use 'ri Integer#between?' and it will show the documentation from Enumerable
<Ox0dea>
freetimeruby: Bollocks.
<Mon_Ouie>
Comparable*
dopie has quit [Quit: This computer has gone to sleep]
ruurd has joined #ruby
<freetimeruby>
docs say anything and still you can use it
<freetimeruby>
dont*
gener1c has joined #ruby
<shevy>
you include a module freetimeruby so the methods are available
<Mon_Ouie>
I'd argue it's not composition at all. The same object gets all the methods and all the state. You're not composing multiple objects together.
<shevy>
freetimeruby your class can access it if you do a "include" statement inside, so for instance: class Car; include Doors; end <--- the car may have Doors. In this case, subclassing might not make equal sense... like class Car < Door
mprelude has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
<freetimeruby>
words = ["foo", "bar", "baz"] words.[](1)
<freetimeruby>
its gives error
<freetimeruby>
so i tried this
<freetimeruby>
1+(3)
<freetimeruby>
1.+(3)
wldcordeiro has joined #ruby
<freetimeruby>
worked fine
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iBrito has joined #ruby
<Ox0dea>
>> words = ["foo", "bar", "baz"]; words.[](1) # freetimeruby
mary5030 has quit [Remote host closed the connection]
stan_ has quit [Ping timeout: 246 seconds]
Oka has joined #ruby
mary5030 has joined #ruby
michaeldeol has joined #ruby
shoutsid has joined #ruby
shoutsid has quit [Remote host closed the connection]
finisherr has joined #ruby
Oka_ has quit [Ping timeout: 252 seconds]
dblessing has joined #ruby
sebyx07 has left #ruby [#ruby]
youknownothing has joined #ruby
shoutsid has joined #ruby
<youknownothing>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<eam>
Ox0dea: well, "guys" is gender neutral in some local dialects
<Ox0dea>
eam: There would be at most two girls if the piza place identified as female.
<eam>
(thus the whole kerfluffle)
<Ox0dea>
"Two Guys and Two Gals (One of Whom Is a Pizza Place)"
tkuchiki has quit [Remote host closed the connection]
leat4 has quit [Ping timeout: 255 seconds]
<camm2>
Thank you.
<imperator>
man, now i'm hungry for pizza
jas02 has quit [Ping timeout: 240 seconds]
leat4 has joined #ruby
<camm2>
The next time I'll say: Hi, everyone. xD
andikr has quit [Remote host closed the connection]
camm2 has left #ruby [#ruby]
tkuchiki has joined #ruby
<eam>
Ox0dea: just like how various nouns change between masculine and feminine between languages
<Ox0dea>
That's an implementation detail.
<eam>
it all is
<Ox0dea>
Prove it.
<Ox0dea>
At least, tell me where Peano went wrong.
<shevy>
imperator I think that is the secret plan
<shevy>
both eam and Ox0dea must work for some pizza brand
skullcrasher has quit [Remote host closed the connection]
paulcsmith has joined #ruby
Ox0dea has left #ruby ["He's onto us!"]
Jman__ has joined #ruby
<eam>
Ox0dea: he didn't eat enough pizza; no one does
chouhoul_ has quit [Read error: Connection reset by peer]
kyle__ has joined #ruby
chouhoulis has joined #ruby
<shevy>
pizza can be quite expensive
tomchapin has joined #ruby
bmurt has joined #ruby
RobertBirnie has joined #ruby
<imperator>
this whole thing reminds of that colin quinn bit
tkuchiki has quit [Remote host closed the connection]
<kyle__>
Is there a standard pretty-print for ruby source like there is for C? I've tried googling, but the results are all about the built-in PrettyPrint or awesome_print modules, which appear to be for the REPL loop, and not for formatting an existing source-code file.
<imperator>
kyle__, you can use rubocop
rcvalle has joined #ruby
<kyle__>
imperator: I thought that was a lint like thing, to identify possible issues?
arup_r has quit [Remote host closed the connection]
<eam>
shevy: it's expensive because it's worth it
<imperator>
kyle__, you can automatically apply your rules as well
SCHAAP137 has quit [Remote host closed the connection]
<imperator>
rubocop -a
RobertBirnie has quit [Read error: Connection reset by peer]
<kyle__>
imperator: Ahh. I never knew that.
<kyle__>
Thank you.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator>
and you can hook it into vim, too
RobertBirnie has joined #ruby
<imperator>
(maybe other editors, too, dunno)
Ox0dea has joined #ruby
Macaveli has joined #ruby
<kyle__>
Humm. I'm going to have to look this up.
<Ox0dea>
/join should take a greeting argument.
arup_r has joined #ruby
<Ox0dea>
kyle__: Are you looking for something that could conceivable take an entire program mushed into a single line and spit out pretty?
leslie has quit [Quit: Have you ever tried to eat a clock? It's very time consuming.]
timonv has quit [Ping timeout: 268 seconds]
amclain has joined #ruby
<Ox0dea>
fidalgo: The error message is quite clear about the problem.
<shevy>
ohhhh ruboto keeps track?
autrilla has joined #ruby
<Ox0dea>
fidalgo: You're trying to access Shape::SIDES, which doesn't exist since you're declaring it separately in the subclasses.
MichaelSmith has joined #ruby
pawnbox has joined #ruby
<shevy>
tsunamie you should add the specific error + line of error; also pastebin is inferior to gist and other pasties
<fidalgo>
Ox0dea: I understand in part, but I'm creating an Triangle instance...
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
<Ox0dea>
fidalgo: Yes, but Triangle gets its initializer from Shape.
<fidalgo>
Ox0dea: so I need to use an instance var to hold the number of sides, right?
<Mon_Ouie>
fidalgo : Doesn't matter, the list of classes where constants are looked up inside the method body is figured out at the moment when the method is defined, not called
<Ox0dea>
fidalgo: No, you could just use `self.class::SIDES`.
<darix>
tsunamie: that doesnt look like valid json indeed
dionysus69 has joined #ruby
lele is now known as Guest24
Igorshp has quit [Remote host closed the connection]
fostertheweb has quit [Ping timeout: 246 seconds]
markoa has quit []
<shevy>
tsunamie you call .split on a hash
dmolina has joined #ruby
<tsunamie>
shevy, I call split on a key in a hash
karapetyan has joined #ruby
dmolina has quit [Client Quit]
<tsunamie>
as you can see from the script. I take the key value which has a / in the middle of it to deperate the group id and the artifact id f the app and split it.
<Ox0dea>
tsunamie: `packages` is an array of Hashes.
<Ox0dea>
Right, so an Array of Hashes, but can those Hashes contain multiple key-value pairs, or is it always just the one?
<tsunamie>
Ox0dea, ^^ example, multiple key/value pairs of applications tha
<Ox0dea>
tsunamie: That's not multiple key-value pairs.
<Ox0dea>
That's an Array of Hashes, and each Hash contains a single pair.
<tsunamie>
Ox0dea, no, they will always be in the single formate as shown
Igorshp has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
<Ox0dea>
tsunamie: packages.each { |package| key, value = package.to_a }
shmilan has quit [Ping timeout: 246 seconds]
yeticry_ has joined #ruby
rbennacer has joined #ruby
<tsunamie>
the loop I created should loop throught each has and perform an action based on each hash
jmarrec has quit [Quit: Leaving]
maletor has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
<Ox0dea>
tsunamie: Better than an Array of single-pair Hashes would be to just have one big Hash.
<Ox0dea>
packages.reduce(:merge).each do { |key, value| ... }
bruno- has quit [Ping timeout: 256 seconds]
khebbie has joined #ruby
<tsunamie>
the array may change in size and I don't know what may come throught. All I know is what comes throught will bean array of hashs. With a possibilitiy of n hashs all in the same format. anything in another format is invalid
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
<Ox0dea>
tsunamie: You want packages.reduce(:merge).
bruno- has joined #ruby
senayar has quit []
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khebbie has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<izzol>
imperator: thanks :-) nice list.
saddad has joined #ruby
<tsunamie>
Ox0dea, thanks will be right back thanks for your patients with me. I just really want to understand this
bruno- has quit [Ping timeout: 244 seconds]
shmilan has joined #ruby
hinbody has joined #ruby
Pugsley has quit [Client Quit]
ndrei has quit [Ping timeout: 240 seconds]
finisherr has joined #ruby
bruno- has joined #ruby
Outlastsheep has joined #ruby
pawnbox has quit [Remote host closed the connection]
finisherr has quit [Client Quit]
hinbody_ has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
ekain has joined #ruby
<craysiii>
is there a way i can place many rescues into a block so i can do something after any one of them is triggered?
<shevy>
craysiii isn't that how it is always done? begin; rescue Foo; rescue Bar; rescue Bla ?
<craysiii>
i honestly don't know
<jhass>
you can list multiple exceptions inside a rescue as well as add multiple rescue's
<shevy>
and if they have to do the same, rescue Foo, Bar, Bla
<shevy>
hmm I should test it ...
<craysiii>
i haven't done much of any error handling
<Ox0dea>
shevy: Yes, that's correct.
bruno- has quit [Ping timeout: 240 seconds]
<shevy>
\o/
<Ox0dea>
But you can't, for instance, say `rescue Foo => a, Bar => b`.
wldcordeiro has quit [Ping timeout: 244 seconds]
rehat has joined #ruby
<Ox0dea>
Which is probably for the better, but still.
<shevy>
craysiii ok but you know the exceptions you want to rescue?
djbkd has joined #ruby
<craysiii>
yes i do, from the stripe api
<Mon_Ouie>
You can `rescue Foo, Bar => a'
cornerma1 has joined #ruby
bruno- has joined #ruby
<Ox0dea>
> mfw `'
<axisys>
how do I add a check for this e = entry.mail.first so if not present instead of saying `method_missing': undefined method `mail' I like to feed entry.cn.first
<shevy>
ok good then you are already done! begin; your_scary_code_here; rescue AllScaryExceptionsThere => error; p error; end
<craysiii>
well i do want different code in each error handler, i just want to redirect to something in my rails app after regardless of which error.
<Ox0dea>
Mon_Ouie: Is there still some rationale to it?
<Mon_Ouie>
begin/rescue works kind of like case/when
<shmilan>
i've been stuck for the past 2 hours and all I needed was '.include?'.. thanks, apeiros
<apeiros>
yw
but3k4_ has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
<Ox0dea>
sharkman: There are in fact methods called #any?, #all?, #one?, and #none?, mind.
freerobby has quit [Quit: Leaving.]
<Ox0dea>
So if your array doesn't contain `false`, you could just use #all?.
firstdayonthejob has joined #ruby
<Ox0dea>
(And negate it, of course.)
RegulationD has joined #ruby
<sharkman>
okay, include seems pretty intuitive here
<sharkman>
any sounds okay too...
<shevy>
hehe
<apeiros>
any?, all?, one? and none? are quite nice for custom predicates. but in the given case, .include? is the most efficient and least code to write too
<shevy>
it's like terse pseudo english
bruno- has quit [Ping timeout: 244 seconds]
<Ox0dea>
apeiros: They all stop as soon as they can.
<apeiros>
Ox0dea: sure
<apeiros>
but yielding is more expensive than calling #== from C
devoldmx has joined #ruby
<apeiros>
as is iterating using #each instead of a counter in C
siemprefresco has quit [Ping timeout: 246 seconds]
<shevy>
somewhat
spider-mario has joined #ruby
<shevy>
you do not use an initialize method
<shevy>
so your read() method has the file name hardcoded: File.open("./input",
<shevy>
so you have to manually invoke .read
The_Phoenix has quit [Read error: Connection reset by peer]
<shevy>
you can get rid of the manual check.read if you use an initialize method
<shevy>
alternatively you could also use a Equation.read variant
<karapetyan>
shevy: ok. You know this is my 3rd try to become a programmer and i feel really mess when i need to build a loop (for in this example)
<shevy>
yeah the loop is also strange
bruno- has joined #ruby
<shevy>
but you have to move in small steps anyway
<karapetyan>
shevy: thanks, understand about initialize method
<shevy>
but your code works right? so you are one step above the usual newbiew stage :)
<karapetyan>
i am not sure about it, i think i just in same place and i reached limits of my mind :(
<karapetyan>
yes, my code works.
<karapetyan>
but i spent about 1 hour to write this
<karapetyan>
may be 1,5 :)
pixelhan_ has joined #ruby
pixelhan_ has left #ruby [#ruby]
Rollabunna has joined #ruby
A124 has joined #ruby
pixelhan_ has joined #ruby
havenwood has joined #ruby
speakingcode has joined #ruby
<karapetyan>
and if i remove this code now i am not sure that i can write it again faster than first time
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pixelhan_>
Does anyone use a selenium webdriver for testing end-to-end? if so which one? how about Watir ?
casadei_ has joined #ruby
Dopagod has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
Rurik has quit [Ping timeout: 244 seconds]
Junaos has joined #ruby
<shevy>
karapetyan well just takes more practice, after you did the same ~100 times, it'll become a no-thinking procedure!
AlphaAtom has joined #ruby
<karapetyan>
shevy: sure? even if i dumb? :D
AlphaAtom has quit [Max SendQ exceeded]
choke has joined #ruby
<Ox0dea>
self.deprecate
AlphaAtom has joined #ruby
Alayde has joined #ruby
Rurik has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
jackjackdripper has quit [Quit: Leaving.]
Rurik has quit [Max SendQ exceeded]
<izzol>
I need to write something like command tool. Where I can log in and type some commands. How should I start? ;-) There is any gem which can help me to do this?
jackjackdripper has joined #ruby
<shevy>
karapetyan yeah. practice helps a lot
ScriptGeek has joined #ruby
Rurik has joined #ruby
<shevy>
izzol what do you mean with "log in"?
<izzol>
shevy: type login/pass and have a "Console" with my commands.
<karapetyan>
izzol: you can create your_app.rb file and put there some ruby-code. That code can accept input from command line
choke has quit [Client Quit]
Rurik has quit [Max SendQ exceeded]
<shevy>
oh, you mean like via a webinterface?
bruno- has joined #ruby
choke has joined #ruby
Rurik has joined #ruby
choke has quit [Client Quit]
<izzol>
karapetyan: I know but I was thinking about something more useful, with history of commands and so on.
<shevy>
karapetyan see, you can't be that dumb, you understood izzol better than I did
<shevy>
well, "history of commands" - that's an array :)
<dorei>
could someone help me with the output of 'local_variables' ? i guess that it includes not only already "declared" local variables but ones that will be declared in the current scope...
<Ox0dea>
dorei: It's to do with them all of those statements being on the same line, I believe.
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
-them
<Ox0dea>
Never mind.
Rutix has joined #ruby
Rutix has joined #ruby
<Ox0dea>
>> @f = 5 ; z = instance_variables; @e = 1 ; z
<Ox0dea>
> Returns the names of the *current* local variables.
<Ox0dea>
Emphasis mine.
nhhagen has quit [Remote host closed the connection]
ramfjord has joined #ruby
jas02 has joined #ruby
dgutierrez1287 has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
flak has joined #ruby
darkf has quit [Quit: Leaving]
TheHodge has quit [Quit: Connection closed for inactivity]
jas02 has quit [Ping timeout: 252 seconds]
rippa has quit [Ping timeout: 250 seconds]
Musashi007 has joined #ruby
ht__ has joined #ruby
j_suth has joined #ruby
blik71 has joined #ruby
<kyle__>
Is there a class/gem/module that will let you essentially File.read a remote file over ssh? Other than just use Net::SSH to the target host and catting the file?
baweaver has joined #ruby
havenwood has joined #ruby
pecpec has joined #ruby
<Ox0dea>
kyle__: What's wrong with the latter?
<blik71>
can someone tell me whats wrong with this method I wrote to open a file I'm quite new to ruby
<kyle__>
Ox0dea: Nothing, other than I have to write it, instead of just gem-installing and letting magic happen ;)
<kyle__>
Admittedly it is trivial, isn't it....
testingbot123 has joined #ruby
<Ox0dea>
Oui. :P
<ScriptGeek>
this syntax worked: puts "Some string here: #{if foo == bar then string else some_other_string end}"
<shevy>
you are sending me to the dark parts of the internet here
<Ox0dea>
More than you know.
ta has quit [Remote host closed the connection]
<ScriptGeek>
Ox0dea: I tried that, but when the compiler whined about a syntax error and gave a lame description I tried something else until it worked
<toretore>
File.open returns a File object, not the contents
choke has joined #ruby
ponga has quit []
jackjackdripper has quit [Ping timeout: 244 seconds]
senayar has joined #ruby
senayar has joined #ruby
wildlander has quit [Remote host closed the connection]
nhhagen has joined #ruby
voltalio has joined #ruby
<Ox0dea>
dorei: That #local_variables lies is to do with control frames, but that's about all I could surmise. :/
<Ox0dea>
Whether or not it should actually do what the documentation says it does is unclear.
wildlander has joined #ruby
<dorei>
kyle__: i'm pretty sure you can mount a remote filesystem over ssh
Fraeon has quit [Ping timeout: 256 seconds]
DoubleMalt has joined #ruby
braincra- has quit [Ping timeout: 246 seconds]
<kyle__>
dorei: Using fuse+sshfs yes.
pecpec has quit [Quit: Leaving...]
<dorei>
kyle__: i think that's the cleanest way :)
<kyle__>
dorei: I was selfishly hoping someone had written a glorious wrapper as a gem do do this already :)
<kyle__>
dorei: That's OK. I'm hacking up a tiny function.
<blik71>
i figured it out it was the way I named my method lol
Fraeon has joined #ruby
ndrei has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
Flipez- has quit [Ping timeout: 256 seconds]
ruurd has joined #ruby
cndiv has joined #ruby
braincrash has joined #ruby
leat4 has quit [Quit: leat4]
leat has joined #ruby
<cndiv>
Hey all, Ruby noobie here. I'm writing some command line applications for practice - is it possible to run those with a tiny framework (Camping, Cuba) in a browser? Or am I missing something obvious?
<cndiv>
I'd like to share them with people over the internet who have no idea what Terminal is and without learning / re-writing them.
leat has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
leat1 has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<centrx>
cndiv, There might be some special library that will do that for you, but in general there will need to be some additions/changes in order to use a web interface instead of command line
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
jhooker has joined #ruby
bluOxigen has joined #ruby
jhooker has quit [Max SendQ exceeded]
ngscheurich has quit [Ping timeout: 264 seconds]
<cndiv>
centrx: Big crazy additions, you think? Or more like, the right gem?
<havenwood>
cndiv: Converting a command line app to a Rack app is a worthwhile exercise. Sinatra is quite popular. I really like Roda, which is a descendant of Cuba with a great plugin system.
jhooker has joined #ruby
<shevy>
Cuba Roda this is like Samba here
ruurd has joined #ruby
<havenwood>
cndiv: You can do CGI with Ruby but it's not a popular route because it has to restart for each request.
<centrx>
Hey Macarena
howdoicomputer has quit [Ping timeout: 255 seconds]
<cndiv>
havenwood: I totally get that it's worthwhile, but is it a huge exercise? I'm eventually learning Rails, but want to get my Ruby solid first.
<cndiv>
havenwood: and sorry, CGI stands for?
<miah>
common gateway interface?
<havenwood>
cndiv: Forget I mentioned CGI. Start with a vanilla Rack app.
<havenwood>
cndiv: Make a simple Rack app that responds with HTML or JSON. Then add in a 404 error. Then I'd suggest turning that into a Roda app. Look through each Roda plugin for a very good idea of features you might want to add.
<cndiv>
havenwood: But see what I'm saying? I have to learn HTML and JSON?
ndrei has quit [Ping timeout: 240 seconds]
<havenwood>
cndiv: No, you can use JSON from Ruby's stdlib.
DLSteve has joined #ruby
<cndiv>
havenwood: Ah, ok. Seems like a good start, then. Thanks for your help.
<toretore>
cndiv: if you're going to have people interact with your app in a browser, you kind of have to know html
<toretore>
because that's the only thing browsers understand
<havenwood>
cndiv: Or for example, Roda has a JSON plugin that automatically returns a JSON representation of that route's return value.
<cndiv>
toretore: Literally I'm fine with scrolling text like a terminal window. I was hoping there was something that could handle that without learning another language.
<havenwood>
cndiv: You can serve up plain text with a Rack app if you prefer.
<cndiv>
Think like 2400 baud BBS style text scrolling, in a web window.
Igorshp has joined #ruby
<toretore>
cndiv: i assume you're talking about an in-browser ui
<toretore>
which is by definition going to have to be html
<ruboto>
jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
<shevy>
ok
<shevy>
someone has to add a factoid to Ox0dea ok?
bmurt has joined #ruby
<Ox0dea>
Would be inappropriate, I think.
<jhass>
?someone
<ruboto>
I don't know anything about someone
<jhass>
damn
<slash_nick>
?domoarigato
<ruboto>
I don't know anything about domoarigato
symm-_ is now known as symm-
<slash_nick>
#=> I'm Mr. ruboto!
<shevy>
haha
Flipez has joined #ruby
nhhagen has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
cschneid_ has joined #ruby
bmurt has quit [Ping timeout: 244 seconds]
<cschneid_>
I am working on a gem that has a C extension component that only works on newer rubies. But I'd like to fall back to a pure-ruby version for older rubies, or if no c compiler is present. Where can I find docs on the nitty-gritty of developing a gem like that?
speakingcode has joined #ruby
<shevy>
hmmm docs :D
<Ox0dea>
cschneid_: Just translate the C to Ruby?
DLSteve has quit [Quit: Leaving]
<cschneid_>
Ox0dea: yeah, more of the mechanics of the gemspec & such.
jenrzzz has joined #ruby
DLSteve has joined #ruby
<cschneid_>
Ox0dea: like, how do I say: "compile here if you can, then if you fail, that's cool, but I need to know when I do my requires in lib/mygem.rb"
<demiurgen>
so when you use a ruby library that is just a wrapper around a C library, and a library function you want to use is supposed to be sent a function pointer as a callback, can you actually send it a ruby method somehow? specifically, it's ruby-guestfs and Guestfs.set_event_callback() I'm trying here.
leat1 has quit [Ping timeout: 244 seconds]
solocshaw has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
ordepdev has quit [Remote host closed the connection]
leat1 has joined #ruby
ngscheurich has quit [Ping timeout: 246 seconds]
lkba_ has joined #ruby
<demiurgen>
ah, you just send a Proc. Cool! Ruby is pretty awesome! :)
<Ox0dea>
cschneid_: Ah, right. Well, a gemspec is just Ruby code, so `RUBY_VERSION` + `File.exist?('/bin/cc')` would get you most of the way there.
<cschneid_>
Ox0dea: I've never done anything fancy. The gemspec is resolved on the client during a `gem install`?
<cschneid_>
if so yeah, something like that would work out ok
Lucky__ has joined #ruby
<cschneid_>
then I `require mynativelib rescue require 'myrubylib'`
lkba has quit [Ping timeout: 250 seconds]
stobijah has joined #ruby
FernandoBasso has quit [Quit: Leaving]
j4cknewt has joined #ruby
JamesDH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jmroark has quit [Ping timeout: 255 seconds]
craysiii has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
dblessing has joined #ruby
acke has quit [Remote host closed the connection]
blik71 has joined #ruby
dblessing has quit [Read error: Connection reset by peer]
leat2 has joined #ruby
leat1 has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 240 seconds]
syath has quit [Quit: WeeChat 1.2]
roxtrongo has joined #ruby
dblessing has joined #ruby
<Ox0dea>
cschneid_: Apparently the best approach is to generate a dummy Makefile in extconf.rb.
<Ox0dea>
cschneid_: No, sorry, that's if the C extension bits are optional.
symm- has quit [Quit: Leaving...]
mauvehed has joined #ruby
<mauvehed>
if I'm using the default project and default gem profile for ruby, how do I properly cron that? all the examples I see assume a unique project name and gem set name. which I didn't do before hand.
havenwood has joined #ruby
dgs has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neanderslob has joined #ruby
platosha has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
niemcu has quit [Ping timeout: 240 seconds]
platosha has joined #ruby
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
DeweyD has joined #ruby
DeweyD has quit [Client Quit]
ta has quit [Remote host closed the connection]
<mauvehed>
apparently 'ruby cron setup' is the quick answer!
mauvehed has left #ruby [#ruby]
<cschneid_>
Ox0dea: the C bits are optional and easily jettisoned. As long as the gem can then later figure that out and fall back to pure-ruby impl.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
HoGiHung has joined #ruby
<Ox0dea>
See also the definition therein of `closure_data_type`, which is where the deallocator gets specified.
gregf has quit [Quit: WeeChat 1.3]
pegasuspect has joined #ruby
<pegasuspect>
Hi
<Ox0dea>
pegasuspect: Nice portmanteau.
<Ox0dea>
Perfect sharing and everything.
ReK2 has joined #ruby
ReK2 has joined #ruby
<pegasuspect>
Is anybody here?
<pegasuspect>
im new to irc
<imperator>
yes, we are here
<imperator>
we're ALL here
<pegasuspect>
lol
<pegasuspect>
1k?
<imperator>
yep
yardenbar has quit [Ping timeout: 272 seconds]
jgpawletko has quit [Quit: jgpawletko]
<imperator>
Ox0dea, thanks, will try to figure that out
<Ox0dea>
imperator: Godspeed.
<havenwood>
pegasuspect: Careful not to wake them!
<pegasuspect>
well i was wondering if there is a posible way to compile ruby for windows and unix
petricore has joined #ruby
<Ox0dea>
Unlikely.
bruno- has quit [Read error: Connection reset by peer]
gregf has joined #ruby
<imperator>
you mean a common binary? don't think so
bruno- has joined #ruby
<pegasuspect>
no not a common one, two seperate files are ok
<imperator>
oh, sure
<Ox0dea>
pegasuspect: You're basically asking if C compilers are still a thing.
<pegasuspect>
yea.. maybe :D sorry if i sound kinda stupid
ta has quit [Remote host closed the connection]
<Ox0dea>
Happens.
<imperator>
so, just stick your precompiled binaries where you want them - probably under 'lib/unix' and 'lib/windows' or something
grenierm has joined #ruby
<pegasuspect>
actually i am new to ruby as well
<imperator>
then create a stub file under lib that just does "if windows; require 'lib/windows/file'; else; require 'lib/unix/file'; end"
<pegasuspect>
so i never compiled ruby yet
<Ox0dea>
pegasuspect: Why do you want to compile it?
<pegasuspect>
to make an executable like from terminal u could just run it
<havenwood>
pegasuspect: You might take a look at Traveling Ruby if you're interested in how one might distribute Ruby: http://phusion.github.io/traveling-ruby/
<pegasuspect>
say ./myAwesomeCode
ta has joined #ruby
<Ox0dea>
pegasuspect: Open Notepad.
jackjackdripper1 has quit [Quit: Leaving.]
FernandoBasso has joined #ruby
jackjackdripper has joined #ruby
swgillespie has joined #ruby
Igorshp has quit [Remote host closed the connection]
mary5030 has joined #ruby
<pegasuspect>
havenwood: thanks
ngscheurich has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
cisco has quit [Quit: Leaving.]
ldnunes has quit [Quit: Leaving]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leat2 has quit [Ping timeout: 246 seconds]
ponga has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
prefixed has quit [Ping timeout: 240 seconds]
ht__ has quit [Quit: Konversation terminated!]
bigbadbear has quit [Ping timeout: 250 seconds]
yardenbar has joined #ruby
karapetyan has joined #ruby
whippythellama has quit [Quit: WeeChat 1.3]
shadoi1 is now known as shadoi
robbyoconnor has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
clarkenciel has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
jeffreylevesque has quit [Remote host closed the connection]
linuxboy_ has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 264 seconds]
hinbody has quit [Quit: leaving]
linuxboytoo has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
Rutix has quit []
robbyoconnor has joined #ruby
mroark has quit [Ping timeout: 268 seconds]
icosa1 has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
baweaver has quit [Remote host closed the connection]
radgeRayden has quit [Read error: Connection reset by peer]
linuxboytoo has quit [Read error: Connection reset by peer]
linuxboy_ has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
dfockler has quit [Remote host closed the connection]
ngscheurich has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
shock_on_ has quit [Remote host closed the connection]
<dfockler>
Procs and lambdas are something I don't know much about in ruby
<Ox0dea>
You should fix that with due haste.
<dfockler>
Can I pass around functions with Procs?
<Ox0dea>
Aye.
<Ox0dea>
More or less, anyhow.
<sharkman>
boy this is tough
<dorei>
i think procs are like anonymous functions in other languages
<sharkman>
boy this is tough
<dfockler>
Is it not quite 'first-order' behind the scenes?
<Ox0dea>
dfockler: No, they are in fact first-class.
naftilos76 has joined #ruby
<Ox0dea>
It's methods which aren't.
<dfockler>
hmmm
<workmad3>
dfockler: procs and lambdas are first-class anonymous methods that capture a lexical closure
<Ox0dea>
You can't "return a method", as it were.
<workmad3>
Ox0dea: well, there's some_obj.method(:foobar) which gives you a bound method object
<Ox0dea>
Not quite the same thing, though.
<dfockler>
Are blocks implemented using Procs
<workmad3>
but it's clunky, and it's not quite first-order in several ways :)
<workmad3>
dfockler: sort-of
<workmad3>
dfockler: if you make a 'block-param' explicit in a method e.g. def foobar(&blk) then the class of `blk` is Proc
<dfockler>
Oh ok
<workmad3>
dfockler: but pretty much every ruby interpreter will optimise away that object creation if the block param isn't explicit
Swappticon has joined #ruby
ranchodev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
workmad3: It's still there waiting to be turned into an explicit Proc, mind.
<workmad3>
so at the 'ruby level', you only really have procs conceptually, but if you delve into the low-level details, you'll see 'blocks' which are almost like an anonymous function without the Proc wrapper on it :)
djbkd has joined #ruby
nettoweb has joined #ruby
athinggoingon has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
<ScriptGeek>
what do y'all use for unit tests?
<arcanez>
when using Lumberjack::Device::DateRollingLogFile with :roll => :daily, the current day is always in file.log and the date is only appended to old logs?
sankaber has joined #ruby
<arcanez>
I'm trying to figure out why I'd have file.log.2015-07-31 and file.log.2015-08-02 but no file.log.2015-08-01
<FernandoBasso>
When I run ruby --debug myprogram.rb I get rubygems/defaults/operating_system
<FernandoBasso>
What is that operating_system thing?
bronson has quit [Remote host closed the connection]
tkuchiki has joined #ruby
centrx has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
So, a hack, straight from the horse's mouth.
<FernandoBasso>
Ox0dea: I saw that in my local files.
<FernandoBasso>
Should I just comment it?
<Ox0dea>
FernandoBasso: It's not actually stopping your program from being run.
<Ox0dea>
It's just being "reported" because --debug ups the verbosity.
<FernandoBasso>
Ox0dea: But it is a good idea that I learn ruby using -d, is it not?
<Ox0dea>
Eh, -w is fine.
<dfockler>
So proc affects the context that it's being executed in?
<Ox0dea>
dfockler: No, it introduces a new one.
<FernandoBasso>
Ox0dea: Thanks.
<ScriptGeek>
Ox0dea: are you a ruler of the ruby residers?
<Ox0dea>
dfockler: You can modify existing locals from within a Proc, if that's how you meant.
<dfockler>
well this article says the return causes the method it's being proc.call from, to return
<Ox0dea>
That's right, but "context" isn't quite the right word for that behavior.
<dfockler>
Ok
bubbys has joined #ruby
<arcanez>
looks like Lumberjack::Device::DateRollingLogFile will only roll if I log to it.. so not having a file.log.2015-08-01 means there was nothing logged to it during that timeframe, at least not until 2015-08-02
<sharkman>
okay i figured it out. DateTime.new(blah blah) - 4.hours
<dfockler>
So a proc acts like a closure, and can capture variables in the local scope?
<arcanez>
I'm in Arizona though, so I don't deal with DST.
paulcsmith has joined #ruby
Motoservo has joined #ruby
shock_one has quit [Ping timeout: 246 seconds]
<arcanez>
I'm always GMT-0700 or UTC-0700
* dfockler
is refraining from saying mean things about Arizona
<arcanez>
dfockler: :)
* sevenseacat
also doesn't do DST and sits firmly in UTC+8
mroark has quit [Quit: ChatZilla 0.9.91.1 [Firefox 39.0/20150630154324]]
<sevenseacat>
(though I build apps for places that do have DST. the joys)
rubie has quit [Remote host closed the connection]
<arcanez>
I work out of an office in Annapolis, MD. so I'm painfully aware of EST vs EDT..
mohikaner has joined #ruby
northfurr has quit [Quit: northfurr]
<sevenseacat>
yeah my company is in Sydney AU which does do DST. so much fun.
postmodern has joined #ruby
northfurr has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
theery has joined #ruby
baweaver has quit [Remote host closed the connection]
Rurik has joined #ruby
Rurik has quit [Changing host]
Rurik has joined #ruby
rakm has joined #ruby
shadoi has quit [Quit: Leaving.]
diegoviola has quit [Remote host closed the connection]
snockerton has left #ruby [#ruby]
senayar_ has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 264 seconds]
bender_unit has joined #ruby
rcvalle has quit [Quit: rcvalle]
<theRoUS>
cucumber question: i want to test something that deals with a specific sequence. telling it to 'grow' or 'shrink' the sequence should alter the current value. unfortunately, at the beginning of each scenario things get re-initialised.
<theRoUS>
how can i build a scenario outline that uses the same object, unmodified, for each scenario in the outline?
<Radar>
You can't.
<Radar>
Group them into the same scenaril
<Radar>
scenario*
mohikaner has left #ruby [#ruby]
<theRoUS>
Radar: ew. so much for short simple scenaria :-)
<theRoUS>
Radar: no best-practice magic using tags, Around() hooks, and instance/module variables?
<Radar>
no
sankaber has joined #ruby
blueOxigen has joined #ruby
scottschecter has quit [Quit: Leaving]
bluOxigen has quit [Ping timeout: 246 seconds]
HoGiHung has quit []
Rurik has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
Rurik has quit [Max SendQ exceeded]
Rurik has joined #ruby
Rurik has quit [Max SendQ exceeded]
Rurik has joined #ruby
DLSteve has quit [Quit: Leaving]
Mives has joined #ruby
rehat has quit [Remote host closed the connection]
roxtrongo has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shmilan has joined #ruby
roxtrongo has quit [Remote host closed the connection]
cantaberry has quit [Ping timeout: 246 seconds]
Mives has quit [Client Quit]
bootstrappm has joined #ruby
Mives has joined #ruby
Mives has quit [Client Quit]
Mives has joined #ruby
yfeldblum has quit [Remote host closed the connection]
khebbie has quit [Remote host closed the connection]
symm-_ has joined #ruby
JohnBat26 has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
swgillespie has joined #ruby
<Ox0dea>
postmodern: Yours is so far from the name I would've expected to find on Bug #11520.
sharkman has quit [Quit: Leaving]
symm- has quit [Ping timeout: 252 seconds]
chills42 has quit [Remote host closed the connection]
platzhirsch has joined #ruby
bffff_ has joined #ruby
chills42 has joined #ruby
<Ox0dea>
theRoUS: Wrap your sequence in a Proc and invoke it in each scenario?
<Ox0dea>
Kinda silly, though.
<postmodern>
Ox0dea, hmm? whenever i find something that sticks out, i tend to submit a bug.
mase-chatter has joined #ruby
symm-_ has quit [Ping timeout: 272 seconds]
chills42 has quit [Remote host closed the connection]
<siempref_>
hey I need to dynamically build a pdf using image from a remote url and a generated barcode and then upload it to s3
bronson has joined #ruby
<siempref_>
what would be the best way to do this using Grape?
<Ox0dea>
postmodern: It shouldn't've stuck out to somebody such as yourself was the sentiment I meant to convey there.
theery has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 265 seconds]
weemsledeux has joined #ruby
<dfockler>
siempref_: those are two separate things, Grape should basically take the arguments to build the PDF from an HTTP request
<Ox0dea>
Array#compact! is just another of many such methods which return `nil` if they didn't end up mutating the receiver.
<siempref_>
ok, what would be the simplest way to combine these elements?
<dfockler>
siempref_: well grape just routes to a method, so have your method build and upload the pdf
<postmodern>
Ox0dea, your assuming that i know everything ;)
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
postmodern: More than many is all.
<postmodern>
Ox0dea, i actually never heard of that rule until today, i always heard that in-place mutation methods returned nil, or that you should expect a nil
Rurik has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
duoi has quit [Max SendQ exceeded]
<Ox0dea>
postmodern: I guess the fact that you're the reason I get to switch between Rubies so conveniently has you on a sort of pedestal in my mind.
duoi has joined #ruby
<dfockler>
i just like chruby
* sevenseacat
bows down to postmodern
<Ox0dea>
In any case, I apologize for wording it such that my praise might've been misconstrued as insult.
* Ox0dea
joins sevenseacat and advises the channel to follow suit.
<dfockler>
i just like typing chruby really fast
<postmodern>
Ox0dea, smash that pedestal. we're all just humans, not heroes
<arcanez>
if I am reading it right, Lumberjack::Device::DateRollingLogFile rolls the files before_flush so a dated file won't be created if you do not log to it for that day?