<Majora_>
baweaver: thanks man I'm broke for days.
NoTroutAboutIt has quit [Ping timeout: 272 seconds]
drosenbloom has joined #ruby
avenj has quit [Ping timeout: 240 seconds]
Yzguy has quit [Quit: Cya]
arescorpio has quit [Quit: Leaving.]
<drosenbloom>
In enumerables... I know I can do this: ['123', '1', '32'].map(&:length) to get the length of all items. If the source of the enumerable is a struct, is there a shorthand to map to a property of the struct? So like, a shorthand for items.map{|a| a.property}
<drosenbloom>
I realize I'm trying to shave about 5 characters off, but still...
<seaworthy>
can someone help me associating records so i can use something like this buy_transactions = Transaction.includes(:virtual_item).where(["buyer_id = ?", user.id]).order(updated_at: :desc)
<seaworthy>
i am not sure what to use belongs_to or has one
kalopsian has quit [Ping timeout: 250 seconds]
chipotle has quit [Quit: cheerio]
<seaworthy>
i tried doing # has_one :virtual_item, class_name: "VirtualItem"
<seaworthy>
in Transaction model but that gives me sql error
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Coraline>
seaworthy: you might have better luck in #rails
mloy has joined #ruby
<seaworthy>
okay Coraline
mjuszczak has quit []
mloy has quit [Client Quit]
mloy has joined #ruby
blackmesa has joined #ruby
<Majora_>
Ox0dea: I always wonder about these people who randomly comment in... People who never say anything.
<Majora_>
I just wonder if they are silently watching everything I say lol
scripore has quit [Quit: This computer has gone to sleep]
* Coraline
is a silent watcher
<Ox0dea>
Majora_: Some of them might be dead.
<Ox0dea>
kspencer: LGTM.
* Coraline
is also dead
<Ox0dea>
#3spooky5me
<Majora_>
Coraline you scare me :3 lol
<Coraline>
Good!
<Majora_>
Lulz.
<Ox0dea>
kspencer: There are a few teensy nitpicks that I'll not bother to point out.
<kspencer>
pm them and I'll see what I can do to fix them, tell you why they are there
<kspencer>
@ Ox0dea
<Ox0dea>
kspencer: I'm talkin' duper-minor things like replacing `delete("\n")` with `chomp`.
kknight has joined #ruby
darkf has joined #ruby
avenj has joined #ruby
avenj has quit [Changing host]
avenj has joined #ruby
MrPasserby has joined #ruby
aadam21 has joined #ruby
mloy has quit [Client Quit]
arup_r has quit [Remote host closed the connection]
<kspencer>
if it helps with the style and the compatibility, etc. then I'm all for any suggestions
<Ox0dea>
While we're tangentially on the subject, here's a demonstration of a nifty technique called "autovivification": https://eval.in/498552
<Ox0dea>
Because non-existent keys "spring to life".
shakes has quit [Quit: Leaving]
<Ox0dea>
It's not very applicable to your uptime script since you haven't got very many levels of nesting, but you'll have a problem for which it's just the thing someday.
stannard has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
<Ox0dea>
Inshallah.
aadam21 has quit [Ping timeout: 256 seconds]
shadoi has quit [Quit: Leaving.]
astrobun_ has joined #ruby
juddey has quit [Ping timeout: 265 seconds]
stannard has quit [Ping timeout: 265 seconds]
kknight has quit [Ping timeout: 260 seconds]
rkazak has joined #ruby
drosenbloom has quit [Quit: leaving]
bricker has joined #ruby
sigurding has joined #ruby
kalopsian has joined #ruby
krz has quit [Read error: Connection reset by peer]
Dimik has quit [Ping timeout: 245 seconds]
kalopsia1 has quit [Ping timeout: 265 seconds]
jackjackdripper has quit [Quit: Leaving.]
kknight has joined #ruby
dlitvak has joined #ruby
krz has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
arup_r has joined #ruby
usershell has joined #ruby
arup_r has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
nixmaniack has quit [Remote host closed the connection]
choke_ has joined #ruby
ur5us has quit [Remote host closed the connection]
<kspencer>
gonna try some sass/scss sometime after the next 8 hours
ur5us has joined #ruby
<flughafen>
hello
yardenbar has joined #ruby
<havenwood>
hi
choke has quit [Ping timeout: 265 seconds]
toretore has joined #ruby
Porfa has quit [Quit: Porfa]
nofxx has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 264 seconds]
SCHAAP137 has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
zz_denym_ is now known as denym_
arup_r has quit []
aufi has joined #ruby
Xeago has joined #ruby
TomyWork has joined #ruby
jam___ has quit [Remote host closed the connection]
gagrio is now known as gagrio-brb
pawnbox has quit [Remote host closed the connection]
PedramT has joined #ruby
pawnbox has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
ur5us has joined #ruby
EbokianKnight has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
einarj has joined #ruby
a_ has joined #ruby
a_ has left #ruby [#ruby]
a_ has joined #ruby
wolffles has joined #ruby
a_ is now known as up0x1
mark1 has joined #ruby
<shevy>
yo flughafen - 2016 must be the year of the flughafen in berlin!
sandstrom has joined #ruby
blackmesa has joined #ruby
nixmaniack has joined #ruby
firstdayonthejob has quit [Ping timeout: 272 seconds]
TheNet has joined #ruby
TheNet has quit [Client Quit]
TheWhip has joined #ruby
Hounddog has joined #ruby
huyderman has joined #ruby
d0nn1e has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
karapety_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
elaptics`away is now known as elaptics
usershell has joined #ruby
d0nn1e has joined #ruby
lacuna has quit [Remote host closed the connection]
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
skcin7 has joined #ruby
kalopsian has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
mistermocha has joined #ruby
karapetyan has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
karapetyan has joined #ruby
dpg_ has quit [Ping timeout: 265 seconds]
roshanavand has joined #ruby
<flughafen>
shevy: is it going to open in 2016?
usershell has quit [Ping timeout: 245 seconds]
<shevy>
hehe yeah
<shevy>
together with the linux desktop of the year
juddey has quit [Ping timeout: 264 seconds]
smactive has joined #ruby
roshanav_ has joined #ruby
kalopsian has quit [Ping timeout: 265 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
anski has quit [Quit: Leaving]
<flughafen>
shevy: current schedule is in ayear an a half or so
<shevy>
hehe
smactive has quit [Ping timeout: 272 seconds]
<shevy>
hmm... time for a ruby question... is there a way to return a full Array of the ruby stdlib constants? e. g. an array such as: [String, Hash, Array ...] I need to iterate over every one of them via .instance_methods(false); right now I am hardcoding this, which sorta sucks
<ruboto>
toretore # => [Object, Module, Class, BasicObject, NilClass, Data, TrueClass, FalseClass, Encoding, String, Symbol ...check link for more (https://eval.in/498599)
<shevy>
toretore yeah
<shevy>
hmm gimme a moment to have a look
craigp has joined #ruby
djbkd has quit [Ping timeout: 276 seconds]
cornerma1 has joined #ruby
<shevy>
interesting
PedramT has quit [Remote host closed the connection]
<ruby-lang272>
online resource suggest to downgrade to ruby 2.1.X
karapetyan has quit [Remote host closed the connection]
<ruby-lang272>
is there any workaround for this error?
webus_ has joined #ruby
<toretore>
ruby-lang272, need more information. gist the entire output
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<atmosx>
adaedra: I see, then it's logstash that's running an older version
<adaedra>
atmosx: you have to use the 9000 series
<atmosx>
adaedra: okay ty
<ruby-lang272>
getting the error while starting the rails server in development env
<ruby-lang272>
bundle exec rails s => Booting Thin => Rails 4.0.13 application starting in development on http://0.0.0.0:8080 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server /opt/ruby-2.2/bin/ruby: symbol lookup error: /opt/ruby-2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/pg-0.18.4/pg_ext.so: undefined symbol: rb_thread_select
karapetyan has joined #ruby
<toretore>
ruby-lang272, gist.github.com
<toretore>
all of it
blackmesa has quit [Ping timeout: 265 seconds]
karapetyan has quit [Client Quit]
roshanav_ has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
roshanavand has quit [Read error: Connection reset by peer]
<apeiros>
ah good, already thought I had forgotten to remove ruby[bot] :)
chussenot has joined #ruby
sandstrom has joined #ruby
PedramT has quit []
hannelita has joined #ruby
<r_rios>
Hello. I have a script and it suits me well, but I always pipe its output through other executables (like ./script_blah | c++filt | less). Is there a way I can do this inside the script? That is, to get the output of the current ruby script and pipe it to one or more other executables
sandstrom has quit [Read error: Connection reset by peer]
dlitvak has quit [Read error: Connection reset by peer]
choke has quit [Ping timeout: 265 seconds]
dlitvak has joined #ruby
choke has joined #ruby
sandstrom has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
dlitvak has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Client Quit]
dlitvak has joined #ruby
djbkd has joined #ruby
arup_r has quit [Remote host closed the connection]
roshanav_ has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
xet7 has quit [Ping timeout: 276 seconds]
roshanavand has quit [Ping timeout: 260 seconds]
usershell has quit [Read error: Connection reset by peer]
sandstrom has quit [Read error: Connection reset by peer]
roger_rabbit has quit [Ping timeout: 272 seconds]
djbkd has quit [Ping timeout: 260 seconds]
dlitvak_ has joined #ruby
usershell has joined #ruby
steffkes has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
RegulationD has joined #ruby
choke has quit [Ping timeout: 265 seconds]
lipoqil has quit [Quit: Connection closed for inactivity]
axsuul has quit [Ping timeout: 272 seconds]
nixmaniack has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 265 seconds]
Xentil has quit [Ping timeout: 240 seconds]
choke has joined #ruby
arup_r has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
sandstrom has quit [Read error: Connection reset by peer]
dlitvak_ has quit [Remote host closed the connection]
kalopsian has joined #ruby
xet7 has joined #ruby
atomical has joined #ruby
dlitvak has joined #ruby
kalopsian has quit [Ping timeout: 260 seconds]
DEA7TH has joined #ruby
certainty has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
colegatron has quit [Ping timeout: 272 seconds]
diegoviola has joined #ruby
smactive has joined #ruby
TheWhip has quit [Remote host closed the connection]
blackmesa has joined #ruby
pawnbox has quit [Remote host closed the connection]
duderonomy has quit [Ping timeout: 264 seconds]
sigurding has joined #ruby
emilkarl has joined #ruby
m3troX has joined #ruby
smactive has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
m3troX has left #ruby [#ruby]
sandstrom has quit [Read error: Connection reset by peer]
certainty has quit [Ping timeout: 255 seconds]
sandstrom has joined #ruby
choke has quit [Ping timeout: 265 seconds]
dlitvak has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
pawnbox has joined #ruby
chussenot has quit [Quit: chussenot]
Lingo has quit [Quit: Be back later ...]
choke has joined #ruby
dkam has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lingo has joined #ruby
freerobby has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
CloCkWeRX has joined #ruby
colegatron has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
kalopsian has joined #ruby
avenj has joined #ruby
avenj has quit [Changing host]
avenj has joined #ruby
rayray_ has quit [Quit: Page closed]
blur3d has quit [Quit: blur3d]
mistermocha has joined #ruby
tvw has joined #ruby
Hounddog has quit [Ping timeout: 240 seconds]
Hounddog has joined #ruby
diegoviola has quit [Ping timeout: 246 seconds]
choke has quit [Ping timeout: 265 seconds]
diego2 has joined #ruby
m8 has joined #ruby
diego2 has quit [Changing host]
diego2 has joined #ruby
platzhirsch has left #ruby [#ruby]
mistermocha has quit [Ping timeout: 245 seconds]
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
HANJIN has joined #ruby
Xeago has quit [Remote host closed the connection]
choke has joined #ruby
bkxd has joined #ruby
certainty has joined #ruby
<cout>
what does the DLDLIBS variable in rbconfig.rb represent?
diego2 is now known as diegoviola
<cout>
on my platform it's set to -lc, so I think it's superfluous, but I'm wondering what it might be set to on other platforms that would cause things to break if I didn't include it on the link line for an extension or for an app that uses the ruby library
<diegoviola>
my client wants me to write a cron service that fetches their data, but they don't provide a API that I can fetch/parse, instead I need to download some excel file from their web site, but that's tricky since it requires filing out forms, etc. then I have to parse the excel file
kobain has quit [Ping timeout: 240 seconds]
SenpaiSilver has joined #ruby
<diegoviola>
phantomjs/capybara comes to mind, but I don't know
Coldblackice has quit [Ping timeout: 246 seconds]
<HANJIN>
gsub(/\b(I am|You are|I|You|Your|My)\b/i) <— This is a sample code what was provided my book, I don’t know why ‘/i’ is there, why??
<diegoviola>
they want this cron service every 15 mins, and phantomjs/capybara is going to be too expensive to run
Marsupermammal has joined #ruby
dkam has quit [Quit: Be back later ...]
<go|dfish>
HANJIN: it makes the match case-insensitive
choke has quit [Read error: Connection reset by peer]
duckpuppy has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
Snowy has joined #ruby
curses has quit [Read error: Connection reset by peer]
<HANJIN>
go|dfish: Thank you :)
<HANJIN>
adaedra: Thank you, it’s good to understand
Nahra``` has quit [Remote host closed the connection]
Nahra``` has joined #ruby
Rush has quit [Quit: No Ping reply in 180 seconds.]
Domaldel has joined #ruby
Freeaqingme has quit [Quit: No Ping reply in 180 seconds.]
bluOxigen has joined #ruby
sepp2k has joined #ruby
Freeaqingme has joined #ruby
Marsupermammal has quit [Ping timeout: 240 seconds]
TheWhip has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
ellistaa has joined #ruby
Rush has joined #ruby
kobain has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
bithon is now known as jiub
rns has joined #ruby
choke has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
jiub is now known as bithon
roshanav_ has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
<apeiros>
diegoviola: "filling out forms" is what humans do. machines send the post request directly.
<apeiros>
and the rest: how about you write it, then see where you have problems and ask when you can't solve those?
<diegoviola>
apeiros: I agree
<diegoviola>
apeiros: I tried looking at the console logs in my browser but I can't really see anything useful
<diegoviola>
apeiros: I wish they'd provide me a link I can send a post request and just get JSON back to parse
<diegoviola>
apeiros: but they're not being very helpful with that
<apeiros>
I guess that's why they pay you
<ljarvis>
:)
skade has joined #ruby
dkam has joined #ruby
<diegoviola>
I'll have to use capybara
dlitvak has quit [Remote host closed the connection]
<apeiros>
standard approach to such issues: inform them that more useful interfaces will make your work cheaper. if they don't want to/can't, well, then you're paid for the bigger effort it takes. simple as that.
<diegoviola>
thing is, collaborating is a 2 way street
sgambino has joined #ruby
<apeiros>
sometimes it might even be because your time is cheaper than whoever else's time it'd take to make it easier for you.
<apeiros>
you misunderstand employment.
<ljarvis>
diegoviola: this doesn't sound like collaborating to me
<ljarvis>
they're employing you to do a task
<apeiros>
you get paid to get stuff done.
<ljarvis>
^
<apeiros>
your job is it to get that stuff done.
* jhass
has a dejavu
<ljarvis>
aye
<apeiros>
if you're a good employee, you'll inform them about ways to make it cheaper/better.
<jhass>
?offtopic
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<apeiros>
indeed
dlitvak has joined #ruby
jzigmund has joined #ruby
dkam has quit [Ping timeout: 260 seconds]
dkam has joined #ruby
sandstrom has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
mfb2 has joined #ruby
peeja has joined #ruby
bkxd has joined #ruby
DEA7TH has joined #ruby
dkam has quit [Read error: Connection reset by peer]
dkam has joined #ruby
blackms has joined #ruby
chouhoulis has quit [Remote host closed the connection]
dkam_ has joined #ruby
dkam has quit [Read error: Connection reset by peer]
choke has quit [Ping timeout: 265 seconds]
bmurt has joined #ruby
bmurt has quit [Client Quit]
mfb2 has quit [Ping timeout: 255 seconds]
sandstrom has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
TheWhip has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
TheWhip has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
govg has joined #ruby
choke has joined #ruby
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #ruby
choke has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 250 seconds]
dstarh has joined #ruby
sandstrom has joined #ruby
choke has joined #ruby
gigetoo has joined #ruby
dkam__ has joined #ruby
dkam_ has quit [Read error: Connection reset by peer]
choke has quit [Ping timeout: 265 seconds]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkam___ has joined #ruby
dkam__ has quit [Read error: Connection reset by peer]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
choke has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
dlitvak_ has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
avenj has quit [Ping timeout: 240 seconds]
dkam___ has quit [Ping timeout: 240 seconds]
Anderson69s has joined #ruby
tobiasvl has quit [Quit: leaving]
crazydiamond has quit [Remote host closed the connection]
JDiPierro has joined #ruby
rdark has quit [Quit: WeeChat 1.0.1]
mfb2 has joined #ruby
mfb2_ has joined #ruby
ramortegui has joined #ruby
krz has joined #ruby
rdark has joined #ruby
skade has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
asmodlol has joined #ruby
mfb2 has quit [Ping timeout: 256 seconds]
aadam21 has joined #ruby
peeja has quit [Ping timeout: 260 seconds]
aganov has quit [Remote host closed the connection]
rrichardsr3 has joined #ruby
roshanav_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
dkam___ has joined #ruby
djbkd has joined #ruby
alakra has quit [Ping timeout: 240 seconds]
techietrash has quit [Max SendQ exceeded]
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
choke has quit [Ping timeout: 265 seconds]
centrx has joined #ruby
djbkd has quit [Ping timeout: 276 seconds]
dkam___ has quit [Read error: Connection reset by peer]
blackms has quit [Remote host closed the connection]
dkam___ has joined #ruby
sandstrom has quit [Ping timeout: 265 seconds]
dkam___ has quit [Read error: Connection reset by peer]
aadam21 has quit [Remote host closed the connection]
<r_rios>
To anyone wondering (nobody), here's how to pipe out to other processes in Ruby: ruby -e "IO.popen('less', 'w') { |io| io.puts 'some string' }"
dlitvak has quit [Read error: Connection reset by peer]
sankaber has quit [Remote host closed the connection]
<Scriptonaut>
Hey guys, I'm trying to use ruby oneliners in my linux setup. I have a script that automatically does something like: echo "43::23::32" | ruby -e "puts gets.split('::')[0]". This works great when I call it from the command line, however when it runs from my autostart script there is nothing in STDIN, it's like STDIN is being redirected or something. Anyone have a clue why gets returns nothing when I'm ru
<Scriptonaut>
nning it in that context?
<Scriptonaut>
also I just remember y'all don't like being called guys, so pretend I said, "Hey y'all"
sankaber has joined #ruby
TomPeed has joined #ruby
dlitvak has joined #ruby
zotherstupidguy has joined #ruby
aegis3121 has joined #ruby
sulky has quit [Ping timeout: 246 seconds]
<toretore>
Scriptonaut, what is an "autostart script"?
dkam___ has quit [Read error: Connection reset by peer]
dkam____ has joined #ruby
<Scriptonaut>
toretore: a script that runs when I launch my window manager
<Scriptonaut>
it does things like set the background image on my desktop
<Scriptonaut>
start my program launcher
<Scriptonaut>
etc
<Scriptonaut>
it's a bash script
kalopsian has quit [Ping timeout: 245 seconds]
pink_vampire has joined #ruby
<pink_vampire>
hi
nixmaniack has quit [Remote host closed the connection]
<toretore>
Scriptonaut, need more details
<Scriptonaut>
ok, I'll gist the code
<toretore>
if there's nothing in stdin, that's not ruby's problem
sulky has joined #ruby
<pink_vampire>
how it's ruby compared to python?
<toretore>
python is vastly superior
<adaedra>
pink_vampire: different
radgeRayden_ has joined #ruby
<pink_vampire>
I have some project to do and I need to choose my first programing language
<adaedra>
there's no "superior" programming language.
choke has quit [Ping timeout: 265 seconds]
radgeRayden_ has quit [Client Quit]
kalopsian has joined #ruby
<pink_vampire>
I want to read serial data and make a nice full screen gui
<Scriptonaut>
in the first file, dwmstart, it calls lemonbarstart.sh
<Scriptonaut>
in lemonbar.sh, near the bottom, there is some text I pipe to a ruby command
dkam____ has quit [Read error: Connection reset by peer]
<Scriptonaut>
STDIN.readline (also tried gets) returns nothing when it's launched this way
dkam____ has joined #ruby
<toretore>
does conky return multi line output?
tmtwd has joined #ruby
<toretore>
yes, it looks like it
<Scriptonaut>
no, it works perfectly when I run it manually
krobzaur has joined #ruby
<Scriptonaut>
toretore: no, I configred conky to only return a single line
<toretore>
oh right
choke has joined #ruby
alakra has joined #ruby
mustmodify has left #ruby [#ruby]
<adaedra>
What you're looking for is `tr`, Scriptonaut.
<adaedra>
err.
<adaedra>
`cut`.
<Scriptonaut>
I tried using sed and awk, and holy crap are they terrible tools compared to ruby :|
<toretore>
yes, it seems unnecessary to run ruby x 3 every 0.2s
<Scriptonaut>
like man, the most unreadable stuff
<toretore>
that is true
<Scriptonaut>
Alright, I figure I better learn cut/awk/sed
<toretore>
unix tools suck
<Scriptonaut>
or tr
<Scriptonaut>
ya they do
bkxd has quit [Ping timeout: 272 seconds]
<adaedra>
They're rather good, well known and well used.
<Scriptonaut>
ok, thanks for the pointers guys
whippythellama has joined #ruby
<adaedra>
using conky to get these info sounds also a bit overkill imo.
chipotle has quit [Quit: cheerio]
<toretore>
but if there's nothing in ruby's stdin, there's not going to be any for sed either
chouhoulis has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
isene has quit [Ping timeout: 276 seconds]
SebastianThorn has quit [Ping timeout: 276 seconds]
<Scriptonaut>
The syntax is just horrid though
dlitvak has quit [Read error: Connection reset by peer]
<Scriptonaut>
adaedra: how would you get them?
dkam____ has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
SebastianThorn has joined #ruby
sameerynho has joined #ruby
gregf has joined #ruby
isene has joined #ruby
<adaedra>
There are things in /proc (a bit raw tho)
<Scriptonaut>
if not conky?
<Scriptonaut>
much of what I've read online uses conky for this
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
yuck, running 3 times ruby each 0.2s for splitting
malconis has joined #ruby
<Scriptonaut>
yes, that's very slow
<Scriptonaut>
I originally tried sed/awk but it was too terse
<adaedra>
in your case, I'd look at getting everything done by conky
mfb2_ has quit [Remote host closed the connection]
<adaedra>
and just pipe conky into lemonbar
daivyk has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
<adaedra>
conky is made for what you're trying to do: outputting system information at intervals
<Scriptonaut>
oh, that's a good point
<Scriptonaut>
I forgot about that
<Scriptonaut>
thanks :)
choke has quit [Read error: Connection reset by peer]
<adaedra>
UNIX tools is also using the good tool for the job ;)
<Scriptonaut>
I also found this: conky -i 1 | awk -F "::" '{print $3}'
chouhoulis has quit [Ping timeout: 272 seconds]
gregf has quit [Client Quit]
<Scriptonaut>
pretty simple, I should put some time aside to learn these tools
<adaedra>
you'll still run conky and awk at each iteration
<Scriptonaut>
ya, I'm going to try your suggestion next
choke has joined #ruby
<toretore>
what i have against unix tools is that they mix human- and machine oriented output
<adaedra>
also, I don't know what is the interval set in conky; it needs time to calculate CPU usage
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
<Scriptonaut>
the interval is like 2 seconds
dlitvak has quit [Remote host closed the connection]
<Scriptonaut>
or maybe 1
<toretore>
so you end up with long, brittle chains of sed | awk | head | shit
<Scriptonaut>
I need to set it to 0.2
<adaedra>
So your iteration is 1.2s, not 0.2s
<Scriptonaut>
ya
<adaedra>
yeah, stuff things in conky as much as possible.
dkam____ has joined #ruby
<adaedra>
you could also try to make everything in Ruby :)
<Scriptonaut>
I would much rather do that hehe
loveablelobster has joined #ruby
<Scriptonaut>
I'm a programmer, I don't know a great deal about bash or shell scripting in general
<adaedra>
(That would make only one resident ruby script and give access to much more things)
<Papierkorb>
As a shell tool abuser, treat shell scripting as a programming language and not as something else.
baweaver has joined #ruby
<Scriptonaut>
ah, I guess it is a programming language
lxsameer__ has joined #ruby
<dotix>
Papierkorb: +1
<Scriptonaut>
turing complete and all that
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore>
a shitty one
<blub>
please don't write shell scripts
stannard has joined #ruby
<Papierkorb>
No, it's not shitty.
<toretore>
are you talking about bash?
stannard has quit [Remote host closed the connection]
loveablelobster has quit [Client Quit]
<Papierkorb>
It can do a lot of things really well, but if you're looking to write something you can better do in ruby or w/e, then use ruby (or w/e)
stannard has joined #ruby
<adaedra>
If you use it for everything, it is shitty. But it's really good for some tasks.
<Papierkorb>
toretore: I use ZSH, but the tools are the same for bash
<adaedra>
It's all about using the right tool, people.
<toretore>
seldom do i find bash to be an adequate language for the problems i'm trying to solve
<Papierkorb>
^
usershel_ has joined #ruby
krz has quit [Ping timeout: 272 seconds]
<Papierkorb>
toretore: for example?
<toretore>
anything
nixmaniack has joined #ruby
<Papierkorb>
aha
Guest55888 is now known as saneax_AFK
<toretore>
just now i was writing a script to query a tcp server for data, then parse that data and output it on a local port
sameerynho has quit [Ping timeout: 260 seconds]
sameerynho has joined #ruby
<Papierkorb>
Network interaction is not really bash territory
<adaedra>
yep, totally sounds like something not to do in shell.
<toretore>
Papierkorb, you mean i/o in general?
baweaver has quit [Ping timeout: 255 seconds]
<Papierkorb>
Anything above "curl, push this data to the server and pipe the output into grep" is better put into a Ruby or Python script or whatever you prefer
<adaedra>
Even if there's ways of doing it (nc, and a special thing in bash iirc)
usershell has quit [Ping timeout: 240 seconds]
dkam_____ has joined #ruby
<adaedra>
toretore: no
<toretore>
there's no difference between vating a file and netcating something
<toretore>
cating
FooMunki has quit [Quit: FooMunki]
<toretore>
to bash it's just data on stdin
<Papierkorb>
toretore: are you one of those who think that navigating the source file tree is faster done using a graphical tool?
nixmaniack has quit [Remote host closed the connection]
FooMunki has joined #ruby
<toretore>
no
choke has quit [Ping timeout: 265 seconds]
dkam____ has quit [Ping timeout: 276 seconds]
<toretore>
i have nothing against the command line and i'm quite comfortable with it, but the unix terminal environment is just super outdated and shitty
<toretore>
vt100 wtf
<adaedra>
Who still uses vt100
<Papierkorb>
shell scripting is for stuff like $ pacman -Qo /usr/bin/*(x) # Take all executable files and ask pacman which package owns it.
<Scriptonaut>
Hrm, I have a bit of a problem, the text I need to output is prepended with color variables: ${green}\uf108 ${cpu cpu1}% \uf108 ${cpu cpu2}% ${blue}\uf0a0 $memperc%
<toretore>
adaedra, everyone that uses unix
<Scriptonaut>
and these variables don't exist in the conky script
<blub>
what are some things that shell scripting is better at than perl or ruby with backticks
<toretore>
terminals are still based on it
sandstrom has joined #ruby
psy_ has joined #ruby
<Scriptonaut>
is there a way to delay the expansion of those variables until it gets to my bash script?
<Scriptonaut>
and just output it from conky as plain text?
<Papierkorb>
toretore: Great, I'm using a unixoid system
<adaedra>
based on, yes. That's something else.
lxsameer__ has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
<adaedra>
Scriptonaut: there is surely a way of doing escape in conky. Read the man.
<toretore>
based on = permeates its design and holds it back
<Papierkorb>
..?
_orangejuice has joined #ruby
<adaedra>
the fact that we're based on vt100 is irrelevant imo, but if you need that to be hating, go on.
<Papierkorb>
Know your tools. And use the right tool for the job. If you want to parse structured data like XML or JSON stuff with sed and friends, you'll have a bad time
<Scriptonaut>
ok thank adaedra
<Papierkorb>
That's not because the tools suck, but that you're trying to hammer in a picture on the wall with a screwdriver without a nail
<toretore>
Papierkorb, that's it though, *everything* should be structured data in the first place
<Papierkorb>
(for JSON scripting, one of the right tools would be 'jq')
polishdub has joined #ruby
Melpaws has quit [Quit: Leaving.]
nixmaniack has joined #ruby
sameerynho has quit [Ping timeout: 256 seconds]
dkam_____ has quit [Ping timeout: 250 seconds]
<ddv>
you should use regex to parse html
lxsameer__ has joined #ruby
<ddv>
:-)
* adaedra
throws ddv in an active volcano
choke has joined #ruby
gregf has joined #ruby
dkam_____ has joined #ruby
TomPeed has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
DonOtreply has quit [Quit: DonOtreply]
dlitvak has joined #ruby
zapata has quit [Quit: WeeChat 1.3]
YaknotiS has quit [Ping timeout: 260 seconds]
duckpuppy has quit [Ping timeout: 272 seconds]
sameerynho has joined #ruby
DonOtreply has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
sergey_makagon has joined #ruby
weemsledeux has joined #ruby
YaknotiS has joined #ruby
fmcgeough has quit [Ping timeout: 250 seconds]
bkxd has joined #ruby
maikowblue has joined #ruby
fmcgeough has joined #ruby
ta_ has joined #ruby
lxsameer__ has quit [Ping timeout: 260 seconds]
ta has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
treehug88 has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
aadam21 has joined #ruby
mfb2 has joined #ruby
dlitvak_ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
nixmaniack has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 256 seconds]
themsay2 has quit [Ping timeout: 246 seconds]
noname has joined #ruby
dkam_____ has quit [Ping timeout: 260 seconds]
ta_ has quit [Remote host closed the connection]
dkam_____ has joined #ruby
choke has quit [Ping timeout: 265 seconds]
djbkd has quit [Ping timeout: 265 seconds]
<toretore>
oh and i also like systemd so take that
dkam_____ has quit [Ping timeout: 240 seconds]
choke has joined #ruby
dkam_____ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
Jardayn has joined #ruby
ruby[bot] has joined #ruby
kies^ has joined #ruby
Xeago has quit [Remote host closed the connection]
lxsameer__ has joined #ruby
bricker has joined #ruby
tubulife- has joined #ruby
<adaedra>
and this is relevant because...?
sameerynho has quit [Ping timeout: 260 seconds]
dkam_____ has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
Obcilion has quit [Ping timeout: 272 seconds]
dkam_____ has joined #ruby
sandstrom has joined #ruby
tenderlove has joined #ruby
FernandoBasso has quit [Quit: Leaving]
lurch_ has quit [Quit: lurch_]
arup_r has quit [Remote host closed the connection]
duckpuppy has joined #ruby
hxegon has joined #ruby
krz has joined #ruby
dkam_____ has quit [Ping timeout: 246 seconds]
zotherstupidguy has quit [Quit: WeeChat 1.3]
choke has quit [Read error: Connection reset by peer]
peteyg has quit [Read error: Connection reset by peer]
modin has joined #ruby
Croves has joined #ruby
momomomomo has joined #ruby
shibly has joined #ruby
<shibly>
Has ruby taken anything from python?
choke has quit [Ping timeout: 265 seconds]
soahccc has joined #ruby
<Croves>
Hi guys! What's wrong with this? `if i % 3 == 0 OR i % 5 == 0`
<apeiros>
Croves: OR != or
<Croves>
It says syntax error, unexpected tCONSTANT, expecting keyword_then or ';' or '\n'
<apeiros>
also you probably should use ||
df has quit [Ping timeout: 250 seconds]
<Croves>
apeiros: ouch!!
<Croves>
apeiros: Thank you, sir!
<shibly>
Is there any similarity of ruby with python?
<apeiros>
I don't think `or` has the right precedence
<apeiros>
?guys Croves
<ruboto>
Croves, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<ruby[bot]>
apeiros: I don't see no Croves, whom should I tell about guys?
df has joined #ruby
* apeiros
kicks ruby[bot]
brunto has quit [Ping timeout: 240 seconds]
<apeiros>
should have remembered to disable factoids while running it here :-S
ruby[bot] has quit [Remote host closed the connection]
benlovell has joined #ruby
<apeiros>
but interesting that it failed to see Croves :-|
sandstrom has quit [Read error: Connection reset by peer]
dkam_____ has joined #ruby
<Croves>
apeiros: Sorry! What's wrong calling everyone "guys"? It's a legit question, English isn't my first language
choke has joined #ruby
<apeiros>
Croves: as the message says, there's plenty of people who don't feel included by "guys". and you don't know whether I'm a "sir" either. "thank you" is easily sufficient.
Ltnt_Hawkeye has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Croves>
apeiros: I tough that 'guys' and 'folks' where synonyms
brunto has joined #ruby
<apeiros>
Croves: in some regions, yes
<shibly>
Can anyone answer me?
<apeiros>
and some people do consider it to be inclusive. but the point is that it's by far not everybody. so best not to use it if you want to address everybody.
Xeago has quit [Remote host closed the connection]
Ltnt_Hawkeye has joined #ruby
<Croves>
All right. Thank you, apeiros.
<apeiros>
shibly: almost certainly some ideas from python ended up in ruby.
<apeiros>
Croves: you're welcome :)
<apeiros>
aaand figured why ruby[bot] failed to see Croves - users vs. user_map :-S
symbol has joined #ruby
<shibly>
apeiros: No idea from python is not with ruby?
<apeiros>
sooo after all it wasn't all bad it was accidentally activated in here :)
<apeiros>
shibly: what?
al2o3-cr is now known as gr33n7007h
gr33n7007h is now known as al2o3-cr
<shibly>
apeiros: Has any idea been implemented in ruby from python?
<shibly>
Any similarity in syntax?
<apeiros>
shibly: I already answered that.
<apeiros>
16:42 apeiros: shibly: almost certainly some ideas from python ended up in ruby.
<apeiros>
is there any point to your question?
<shibly>
What does that mean? I am not understanding
asmodlol has quit [Ping timeout: 255 seconds]
pdoherty has joined #ruby
mrfoto has left #ruby [#ruby]
momomomomo has quit [Quit: momomomomo]
mrfoto has joined #ruby
sameerynho has joined #ruby
<apeiros>
some ideas from python be in ruby
Ltnt_Hawkeye has quit [Client Quit]
<shibly>
Which idea?
<apeiros>
don't know
dlitvak_ has quit [Remote host closed the connection]
<soahccc>
I tested it generally but are there side effects when using throw inside a mutex synchronize? I assume it normally unlocks right?
scripore has joined #ruby
pawnbox has quit [Remote host closed the connection]
<apeiros>
soahccc: throwing to the outside of the mutex? it should always unlock.
asmodlol has joined #ruby
dlitvak has joined #ruby
pawnbox_ has joined #ruby
<soahccc>
apeiros: okay :) I rarely use throw and was not exactly sure it works there like exceptions
arup_r has joined #ruby
axsuul has joined #ruby
lxsameer__ has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
kies^ has joined #ruby
gheegh has joined #ruby
mary5030 has quit [Remote host closed the connection]
<apeiros>
soahccc: not even relevant. unlocking in mutex is ensured. no matter what you do, if you leave a mutex, it'll be unlocked.
rippa has joined #ruby
<apeiros>
soahccc: unless of course you use manual .lock/.unlock, then you're on your own.
Ltnt_Hawkeye has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
Croves has quit [Quit: Page closed]
pawnbox has joined #ruby
Asher has quit [Ping timeout: 250 seconds]
Asher1 has joined #ruby
<soahccc>
apeiros: thanks for the clarification. no way I gonna do it manually :) all nice and clean synchronizes blocks
dkam______ has joined #ruby
dkam_____ has quit [Read error: Connection reset by peer]
<catphish>
i'm looking for a way to play music in ruby, are there any obvious libraries to do this, or am i likely to need to manually decode and stream to the sound card?
CloCkWeRX has quit [Quit: Leaving.]
<diegoviola>
havenwood: makes sense
<diegoviola>
havenwood: I'll try to convert some of my existing scripts to mechanize :P
<havenwood>
catphish: Write your own music with SonicPi! (But what do you mean by play music?)
<catphish>
havenwood: i mean i want to send an mp3 to my sound card
pdoherty has quit [Ping timeout: 246 seconds]
dkam______ has joined #ruby
choke_ has quit [Ping timeout: 265 seconds]
Snowy has quit [Remote host closed the connection]
<toretore>
catphish, there are likely libraries for things like alsa and pulseaudio
<catphish>
havenwood: thanks, that looks like it might be what i need!
skade has joined #ruby
smbenfield has joined #ruby
dotix has quit [Remote host closed the connection]
tubulife- has joined #ruby
<smbenfield>
Hello! So I'm attempting to install django for python use, and Ruby isn't wanting to install rhc gem for OpenShift. Any ideas?
pipework has quit [Ping timeout: 250 seconds]
wolffles has joined #ruby
pipework has joined #ruby
<havenwood>
smbenfield: Error: I don't want to?
gregf has joined #ruby
wrilain has quit [Remote host closed the connection]
<havenwood>
smbenfield: Getting an error?
devbug has joined #ruby
choke has joined #ruby
<toretore>
EDONTWANT
dkam______ has quit [Ping timeout: 264 seconds]
ellistaa has joined #ruby
dkam______ has joined #ruby
dlitvak has joined #ruby
<smbenfield>
No, it's not an error.
MattV has joined #ruby
<smbenfield>
It's just not doing anything.
<smbenfield>
I let it sit for three hours and it wasn't doing anything after I attempted to intall it.
<havenwood>
smbenfield: What do you type before it does nothing?
DonOtreply has quit [Quit: DonOtreply]
dotix has joined #ruby
<smbenfield>
sudo gem install rdc
hobodave has joined #ruby
<smbenfield>
*rhc
tubulife- has quit [Ping timeout: 264 seconds]
<havenwood>
smbenfield: add: --verbose
agentmeerkat has quit [Ping timeout: 240 seconds]
mrfoto has quit []
wrilain has joined #ruby
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<smbenfield>
done.
sandstrom has quit [Read error: Connection reset by peer]
<smbenfield>
Okay, so... for a newbie, can you explain what that does?
DonOtreply has joined #ruby
<smbenfield>
Does it just show me what it's doing, instead of doing it all under the hood?
choke has quit [Read error: Connection reset by peer]
startupality has joined #ruby
choke has joined #ruby
jas02 has quit [Quit: jas02]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
dkam______ has quit [Ping timeout: 250 seconds]
dotix has quit [Ping timeout: 240 seconds]
<havenwood>
smbenfield: Yup, --verbose is a common flag to get a wordy output
Mirry has joined #ruby
spooq|2 has joined #ruby
mistermocha has quit [Remote host closed the connection]
skade has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
vondruch has quit [Quit: Ex-Chat]
spooq has quit [Ping timeout: 255 seconds]
certainty has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
davejlong has quit [Remote host closed the connection]
nerfando has joined #ruby
skade has joined #ruby
m3troX has joined #ruby
mary5030 has joined #ruby
choke has quit [Read error: Connection reset by peer]
terlar has quit [Ping timeout: 276 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
choke has joined #ruby
bricker has joined #ruby
djbkd has joined #ruby
dkam______ has joined #ruby
sandstrom has joined #ruby
craigp has joined #ruby
Vertroa has joined #ruby
certainty has quit [Ping timeout: 245 seconds]
DaniG2k has quit [Quit: leaving]
Mirry has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
sdothum has joined #ruby
mistermocha has joined #ruby
Bloomer has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
dkam______ has quit [Ping timeout: 265 seconds]
webus_ has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
dkam______ has joined #ruby
m3troX has left #ruby [#ruby]
atumzin has quit [Read error: Connection reset by peer]
dangeranger has joined #ruby
mezcan has joined #ruby
varesa has quit [Killed (Sigyn (Spam is off topic on freenode.))]
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
jbrhbr has quit [Quit: Leaving.]
dangeranger has quit [Client Quit]
amclain has joined #ruby
dwfait has quit [Remote host closed the connection]
shinnya has joined #ruby
babblebre has joined #ruby
dkam______ has quit [Ping timeout: 272 seconds]
duckpuppy has quit [Ping timeout: 272 seconds]
<catphish>
havenwood: audite works but seems to perform extremely poorly for me, just trying to find an audio decoding library, surprisingly struggling, even the libav bindings don't seem to work for audio files
dkam______ has joined #ruby
<catphish>
thanks anyway :)
dangeranger has joined #ruby
startupality has quit [Quit: startupality]
synthroid has joined #ruby
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
<toretore>
catphish, maybe try looking for audio decoding lib first, and then see if you can find ruby bindings for it
TomyLobo has joined #ruby
jmignault has joined #ruby
ellistaa has quit [Quit: ellistaa]
startupality has joined #ruby
<catphish>
i'll try that, my first thought was libav, that seems to have a good binding, but it doesn't seem to deal with audio files well for some reason, will look at others
sandstrom has quit [Read error: Connection reset by peer]
Hounddog has quit [Remote host closed the connection]
dkam______ has quit [Ping timeout: 256 seconds]
lacuna has quit [Remote host closed the connection]
dkam______ has joined #ruby
celly has joined #ruby
[Butch] has joined #ruby
idefine has joined #ruby
momomomomo has joined #ruby
benlieb has joined #ruby
noname has joined #ruby
choke has quit [Read error: Connection reset by peer]
craigp has quit [Remote host closed the connection]
craigp has joined #ruby
nertzy has joined #ruby
dkam______ has quit [Ping timeout: 246 seconds]
choke has joined #ruby
momomomomo has quit [Client Quit]
pdoherty has joined #ruby
baweaver has joined #ruby
dkam______ has joined #ruby
Snowy has joined #ruby
hobodave_ has joined #ruby
momomomomo has joined #ruby
agentmeerkat has joined #ruby
catphish has quit [Quit: Leaving]
Rodya_ has quit [Quit: Leaving...]
Snowy has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
hobodave has quit [Ping timeout: 264 seconds]
rrichardsr3 has joined #ruby
dwfait has joined #ruby
dkam______ has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 276 seconds]
dkam______ has joined #ruby
idefine has quit [Remote host closed the connection]
<diegoviola>
havenwood: I'm writing some rake tasks that should "simulate the user experience" in order to benchmark the time it takes to perform different actions, do you think for these cases mechanize is fine? or I should use capybara+poltergeist?
troulouliou_div2 has joined #ruby
dopie_ has joined #ruby
rrichard_ has joined #ruby
rrichardsr3 has quit [Ping timeout: 255 seconds]
dopie has quit [Ping timeout: 245 seconds]
<jhass>
!ban diggernick !T 1w bad nick
diggernick was kicked from #ruby by ChanServ [Banned: bad nick]
dotix has joined #ruby
choke has quit [Ping timeout: 265 seconds]
Wsewolod has joined #ruby
bluOxigen has joined #ruby
finisherr has joined #ruby
blackjid has quit [Max SendQ exceeded]
firstdayonthejob has joined #ruby
bluOxigen_ has quit [Ping timeout: 246 seconds]
snockerton1 has joined #ruby
<diegoviola>
it feels wrong to use capybara outside of testing
<diegoviola>
in rails
choke has joined #ruby
idefine has joined #ruby
radgeRayden has quit [Read error: Connection reset by peer]
Scriptonaut has left #ruby [#ruby]
blackjid has joined #ruby
radgeRayden has joined #ruby
nunchuck has joined #ruby
dkam______ has joined #ruby
snockerton has quit [Ping timeout: 265 seconds]
benlovell has quit [Ping timeout: 250 seconds]
idefine has quit [Remote host closed the connection]
baweaver has joined #ruby
guacamole has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
<jbrhbr>
anyone know offhand if there's a rubocop rule for detecting { 'foo': 3 } (as opposed to { foo: 3 })? i'm not seeing one
dotix has quit [Ping timeout: 272 seconds]
bkxd has joined #ruby
sigurding has joined #ruby
idefine has joined #ruby
startupality has quit [Quit: startupality]
twalla has joined #ruby
dkam______ has quit [Ping timeout: 246 seconds]
snockerton1 has quit [Quit: Leaving.]
startupality has joined #ruby
aegis3121 has joined #ruby
dkam______ has joined #ruby
rrichard_ has quit [Quit: Apparantly my attempt to stay awake has failed...]
mfb2 has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
guacamol_ has joined #ruby
chipotle has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
<twalla>
hey guys, i've got this script that manages some of our AWS RDS stuff and i need some input on the best way to write a function that waits for an operation to complete
einarj has quit [Remote host closed the connection]
djbkd has joined #ruby
<benlieb>
In irb I have this coming from my db: :text => "<h2><span class=\"head\">asd</span></h2>\n<p>Anna Szpanski<span class=\"note\" id=\"Note1\"> how can I print this to the console “expanded”, or unescaped, so that the new lines are actual new lines?
edwinvdgraaf has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
cpup has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Ping timeout: 250 seconds]
aegis3121 has quit [Ping timeout: 246 seconds]
FooMunki has quit [Quit: FooMunki]
dlitvak has joined #ruby
djbkd has joined #ruby
edwinvdgraaf has joined #ruby
dlitvak has quit [Remote host closed the connection]
ur5us has joined #ruby
certainty has quit [Ping timeout: 250 seconds]
dkam______ has quit [Ping timeout: 272 seconds]
dlitvak has joined #ruby
dkam______ has joined #ruby
nertzy has joined #ruby
ryez has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
choke has quit [Ping timeout: 265 seconds]
usershell has quit [Remote host closed the connection]
mjuszczak has joined #ruby
mauricio_ has joined #ruby
mjuszczak has quit [Client Quit]
<drbrain>
diegoviola: try result.response.keys
edwinvdgraaf has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 276 seconds]
<drbrain>
ah, Content-Disposition
edwinvdgraaf has joined #ruby
audiodude has joined #ruby
dkam______ has quit [Ping timeout: 265 seconds]
choke has joined #ruby
zeroDivisible has joined #ruby
dkam______ has joined #ruby
cpup has joined #ruby
<drbrain>
looking at mechanize, if you get a Content-Disposition header back .save should work, so maybe there's something missing in submitting the form?
<diegoviola>
Downloads/20160107204229.xls: HTML document, UTF-8 Unicode (with BOM) text, with very long lines, with no line terminators
nofxx has quit [Ping timeout: 240 seconds]
danzilio has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
kriskropd has joined #ruby
<diegoviola>
XLS == HTML... whaaat?
eggoez has joined #ruby
dkam______ has quit [Ping timeout: 255 seconds]
DonOtreply has joined #ruby
amitchellbullard has joined #ruby
asmodlol has quit [Ping timeout: 264 seconds]
SirCmpwn_ is now known as SirCmpwn
<drbrain>
diegoviola: if it is an unknown content-type you'll get a Mechanize::File (generic type) instead of Mechanize::Page
choke_ has joined #ruby
<adaedra>
diegoviola: magic is far away from perfect.
dkam______ has joined #ruby
<adaedra>
diegoviola: but look anyway, it can also be that you downloaded an error page.
ixti has joined #ruby
kalz has joined #ruby
choke_ has quit [Read error: Connection reset by peer]
dlitvak has quit [Remote host closed the connection]
choke has quit [Ping timeout: 265 seconds]
smactive has joined #ruby
nibbo has joined #ruby
benlovell has joined #ruby
asmodlol has joined #ruby
Wsewolod has quit [Read error: Network is unreachable]
Wsewolod has joined #ruby
arup_r has joined #ruby
Meow-J_ is now known as Meow-J
M-Kodo has joined #ruby
choke has joined #ruby
noname has quit [Ping timeout: 256 seconds]
dkam______ has quit [Ping timeout: 260 seconds]
smbenfield has quit [Ping timeout: 240 seconds]
dkam______ has joined #ruby
smactive has quit [Ping timeout: 245 seconds]
kirun has joined #ruby
sigurding has quit [Quit: sigurding]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Ping timeout: 265 seconds]
<diegoviola>
yeah I don't know what's going on
davejlong has quit [Remote host closed the connection]
duckpuppy has joined #ruby
<diegoviola>
form.submit.save returns the same html page
<diegoviola>
where I'm supposed to add the date range to get the file
NoTroutAboutIt has quit [Ping timeout: 250 seconds]
benlovell has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
dotix has joined #ruby
dkam______ has quit [Ping timeout: 245 seconds]
davejlong has joined #ruby
aef has joined #ruby
hxegon_ has joined #ruby
dkam______ has joined #ruby
Xeago has quit [Remote host closed the connection]
mauricio_ has quit [Ping timeout: 252 seconds]
al2o3-cr has joined #ruby
cschneid has joined #ruby
FernandoBasso has joined #ruby
[Butch]_ has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
mjuszczak has joined #ruby
dotix has quit [Ping timeout: 264 seconds]
choke has quit [Ping timeout: 265 seconds]
choke has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
dkam______ has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
[Butch] has quit [Ping timeout: 255 seconds]
[Butch]_ is now known as [Butch]
duckpuppy has quit [Ping timeout: 240 seconds]
dkam______ has joined #ruby
stannard has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
al2o3-cr has quit [Read error: Connection reset by peer]
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wrilain has quit [Remote host closed the connection]
Oog has joined #ruby
nixmaniack has joined #ruby
al2o3-cr has joined #ruby
minimalism has joined #ruby
dlitvak has joined #ruby
<Oog>
can someone explain to me why last = city_parts.pop; city_parts[-1] += " #{last}" gives different result in city_parts than city_parts[-2] += " #{city_parts.pop}" - it makes no sense...
futilegames has quit [Quit: futilegames]
eljimmy has joined #ruby
mrfoto has joined #ruby
dkam______ has quit [Ping timeout: 245 seconds]
synthroid has joined #ruby
dkam______ has joined #ruby
bkxd has joined #ruby
<apeiros>
Oog: in your latter example, the .pop must be executed before ruby can run +=
<apeiros>
so essentially the latter example is like the former, but with += on -2 instead of -1
choke has quit [Read error: Connection reset by peer]
choke_ has joined #ruby
<Oog>
so that is what i thought... so then i tried -1 and it did somethign real screwy
<Oog>
city_parts[-1] += " #{city_parts.pop}" is also different...
<apeiros>
yup
devbug has joined #ruby
<Oog>
head -> desk
<apeiros>
and that's because a += b is not a single operation. it expands to a = a + b
<apeiros>
expand your expression and think about it, especially about the required execution order.
M-Kodo has quit [Quit: node-irc says goodbye]
<Oog>
ha ok i see
<Oog>
thanks
<apeiros>
yw
mary5030 has quit [Remote host closed the connection]
meatchicken has joined #ruby
M-Kodo has joined #ruby
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
craigp has quit []
xxneolithicxx has joined #ruby
dkam______ has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dkam______ has joined #ruby
Oog has quit []
nerfando has joined #ruby
nerfando has quit [Max SendQ exceeded]
djbkd has joined #ruby
yqt has joined #ruby
nerfando has joined #ruby
pawnbox has quit [Remote host closed the connection]
sdothum has joined #ruby
pawnbox has joined #ruby
M-mistake has joined #ruby
choke_ has quit [Read error: Connection reset by peer]
dangeranger has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
<norc>
Okay, I really want a&.[0] to work... :S
foureight84 has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
<norc>
a&.[](0) just looks plain silly.
mostlybadfly has quit [Quit: Connection closed for inactivity]
choke has joined #ruby
edwinvdgraaf has joined #ruby
dkam______ has quit [Ping timeout: 276 seconds]
dlitvak has quit [Remote host closed the connection]
dkam______ has joined #ruby
guacamol_ has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
guacamole has quit [Ping timeout: 245 seconds]
duckpuppy has joined #ruby
<ljarvis_>
it's an antipattern anyway
meatchicken has quit [Quit: meatchicken]
futilegames has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
choke has quit [Ping timeout: 265 seconds]
hxegon has joined #ruby
xet7 has quit [Read error: Connection reset by peer]
DonOtreply has quit [Quit: DonOtreply]
dkam______ has quit [Ping timeout: 265 seconds]
snockerton has joined #ruby
amclain_ has joined #ruby
stannard has joined #ruby
hxegon_ has quit [Read error: Connection reset by peer]
dkam_______ has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
guacamole has joined #ruby
asherdowd has left #ruby [#ruby]
amclain has quit [Ping timeout: 240 seconds]
momomomomo_ has joined #ruby
choke has joined #ruby
mfb2_ has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 265 seconds]
momomomomo_ is now known as momomomomo
SenpaiSilver has quit [Quit: Leaving]
dlitvak has joined #ruby
baweaver has joined #ruby
RegulationD has joined #ruby
yfeldblum has joined #ruby
cyrus_mc has joined #ruby
M-mistake has quit [Quit: node-irc says goodbye]
guacamol_ has quit [Ping timeout: 256 seconds]
DonOtreply has joined #ruby
dkam_______ has quit [Ping timeout: 240 seconds]
<cyrus_mc>
Developing a simple ruby script, requires json. Script complains no such file to load -- json. But the json rubygem is installed. Another system I have runs this script no problem. Compared packages installed, versions, etc they all seem to match
mjuszczak has quit []
mfb2 has joined #ruby
futilegames has quit [Quit: futilegames]
dkam_______ has joined #ruby
harai54 has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
dlitvak has quit [Remote host closed the connection]
scottj has quit [Quit: leaving]
<havenwood>
cyrus_mc: What version of Ruby? JSON ships with the stdlib these days.
harai has quit [Ping timeout: 240 seconds]
<cyrus_mc>
this is on a centos 6 machine so 1.8.7
einarj has quit [Read error: Connection reset by peer]
<havenwood>
cyrus_mc: In 1.8 you used to have to: require 'rubygems'
einarj has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
HANJIN has quit [Quit: HANJIN]
mdw has joined #ruby
<cyrus_mc>
havenwood: k. wondeirng why it is working on another machine without that require (same OS, same ruby, etc)
<cyrus_mc>
but adding require 'rubygems' worked
dlitvak has joined #ruby
beanHolez has joined #ruby
haraigo has joined #ruby
<shevy>
centos - the snail among distributions!
dkam_______ has quit [Ping timeout: 260 seconds]
einarj_ has joined #ruby
lucasb has quit [Quit: leaving]
dkam_______ has joined #ruby
solocshaw has joined #ruby
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
harai54 has quit [Ping timeout: 256 seconds]
einarj has quit [Ping timeout: 250 seconds]
mistermo_ has joined #ruby
al2o3-cr has quit [Ping timeout: 255 seconds]
baweaver has quit [Remote host closed the connection]
dpg_ has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
dkam_______ has joined #ruby
al2o3-cr has joined #ruby
asmodlol has joined #ruby
aegis3121 has quit [Ping timeout: 265 seconds]
weemsledeux has joined #ruby
Xeago has quit [Remote host closed the connection]
foureight84_ has joined #ruby
certainty has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby
<shevy>
diegoviola hehe what is the require 'pry' doing there
dkam_______ has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby
<diegoviola>
shevy: that helps me to debug things
dkam_______ has joined #ruby
baweaver has quit [Remote host closed the connection]
dopie has quit [Quit: Lost terminal]
momomomomo has joined #ruby
dopie has joined #ruby
foureight84 has quit [Ping timeout: 272 seconds]
choke has quit [Ping timeout: 265 seconds]
CorySimmons has quit [Quit: Bye!]
djbkd has quit [Ping timeout: 260 seconds]
dkam_______ has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dkam_______ has joined #ruby
choke has joined #ruby
ta0_ has quit [Ping timeout: 245 seconds]
Coldblackice has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo_ has joined #ruby
hxegon is now known as hxegon_AFK
blackgoat has joined #ruby
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
mary5030 has quit [Ping timeout: 255 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
dkam_______ has quit [Ping timeout: 260 seconds]
dkam_______ has joined #ruby
roshanavand has joined #ruby
dlitvak has joined #ruby
mistermocha has joined #ruby
Xeago has joined #ruby
lmao_ayy has joined #ruby
roshanavand has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 276 seconds]
lmao_ayy has left #ruby [#ruby]
dkam_______ has quit [Ping timeout: 240 seconds]
mistermocha has quit [Remote host closed the connection]
Majora has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<Majora>
Hi everyone ^^
edwinvdgraaf has joined #ruby
baweaver has joined #ruby
j_mcnally has joined #ruby
roshanavand has joined #ruby
M-Kodo has quit [Quit: node-irc says goodbye]
dlitvak has quit [Remote host closed the connection]
choke has quit [Ping timeout: 265 seconds]
yeticry has joined #ruby
choke has joined #ruby
dlitvak has joined #ruby
* Majora
waves to choke
baweaver has quit [Remote host closed the connection]
duckpuppy has joined #ruby
malconis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teoric has joined #ruby
yeticry_ has quit [Ping timeout: 240 seconds]
jackjackdripper has quit [Quit: Leaving.]
malconis has joined #ruby
dmr8 has quit [Quit: Leaving]
synthroid has quit []
dlitvak has quit [Remote host closed the connection]
hxegon_AFK is now known as hxegon
dlitvak_ has joined #ruby
Xeago has quit [Remote host closed the connection]
baweaver has joined #ruby
northfurr has joined #ruby
codecop has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
norc has quit [Ping timeout: 252 seconds]
fmcgeough has quit [Quit: fmcgeough]
dlitvak has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
roshanavand has joined #ruby
dlitvak_ has quit [Ping timeout: 240 seconds]
beanHolez has quit [*.net *.split]
pdoherty has quit [*.net *.split]
amclain_ has quit [*.net *.split]
stannard has quit [*.net *.split]
cschneid has quit [*.net *.split]
Wsewolod has quit [*.net *.split]
ixti has quit [*.net *.split]
eggoez has quit [*.net *.split]
ddfreyne has quit [*.net *.split]
Nightmare has quit [*.net *.split]
flughafen has quit [*.net *.split]
martinbjeldbak has quit [*.net *.split]
constantinexvi_ has quit [*.net *.split]
avdi has quit [*.net *.split]
Zarthus has quit [*.net *.split]
borkdude has quit [*.net *.split]
rrichard_ has quit [*.net *.split]
colegatron has quit [*.net *.split]
babblebre has quit [*.net *.split]
avenj has quit [*.net *.split]
blackms has quit [*.net *.split]
Ishido has quit [*.net *.split]
blub has quit [*.net *.split]
llua has quit [*.net *.split]
craysiii has quit [*.net *.split]
mduca has quit [*.net *.split]
ytti has quit [*.net *.split]
Coraline has quit [*.net *.split]
amoeba_ has quit [*.net *.split]
dfoolz has quit [*.net *.split]
Kabaka has quit [*.net *.split]
AustinMatherne has quit [*.net *.split]
malconis has quit [Write error: Broken pipe]
AustinMatherne has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
Kabaka has joined #ruby
beanHolez has joined #ruby
pdoherty has joined #ruby
stannard has joined #ruby
amclain_ has joined #ruby
cschneid has joined #ruby
Wsewolod has joined #ruby
ixti has joined #ruby
eggoez has joined #ruby
ddfreyne has joined #ruby
Nightmare has joined #ruby
flughafen has joined #ruby
constantinexvi_ has joined #ruby
avdi has joined #ruby
Zarthus has joined #ruby
borkdude has joined #ruby
rrichard_ has joined #ruby
colegatron has joined #ruby
babblebre has joined #ruby
avenj has joined #ruby
blackms has joined #ruby
blub has joined #ruby
llua has joined #ruby
craysiii has joined #ruby
mduca has joined #ruby
ytti has joined #ruby
Coraline has joined #ruby
dfoolz has joined #ruby
amoeba_ has joined #ruby
edwinvdgraaf has joined #ruby
martinbjeldbak has joined #ruby
avdi has quit [Max SendQ exceeded]
rrichard_ has quit [Max SendQ exceeded]
constantinexvi_ has quit [Max SendQ exceeded]
eggoez has quit [Max SendQ exceeded]
cschneid has quit [Max SendQ exceeded]
teoric has quit [Quit: WeeChat 1.3]
constantinexvi has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
cschneid has joined #ruby
dotix has quit [Remote host closed the connection]
* Majora
waves to Coraline
avdi has joined #ruby
rrichardsr3 has joined #ruby
dlitvak has quit [Remote host closed the connection]
rrichardsr3 has quit [Max SendQ exceeded]
eggoez has joined #ruby
Vertroa_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has quit [Ping timeout: 264 seconds]
scripore has quit [Quit: This computer has gone to sleep]
rrichardsr3 has joined #ruby
underplank has joined #ruby
Motoki has joined #ruby
Guest85414______ has quit [Ping timeout: 260 seconds]
knowtheory has quit [Ping timeout: 260 seconds]
nomadicoder has quit [Ping timeout: 260 seconds]
<diegoviola>
is EOFError sort of like a timeout?
mahk has quit [Ping timeout: 260 seconds]
frode15243 has quit [Ping timeout: 260 seconds]
avahey has quit [Ping timeout: 260 seconds]
jmhmccr has quit [Ping timeout: 260 seconds]
futilegames has joined #ruby
despai has joined #ruby
<adaedra>
It's End Of File
<diegoviola>
ok
<diegoviola>
Net::HTTP::Persistent::Error: too many connection resets (due to end of file reached - EOFError) after 1 requests on 46982896731480, last used 2.556012308 seconds ago
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
mahk has joined #ruby
brunto has joined #ruby
Motoki has quit []
frode15243 has joined #ruby
err_ok has joined #ruby
avahey has joined #ruby
jmhmccr has joined #ruby
Vertroa has joined #ruby
underplank has quit [Ping timeout: 276 seconds]
<kspencer>
If I have a script that is supposed to return info via webpage, another that grabs from that webpage, (note that the webpage is via ruby script), how do I get it to actually try and return the info, as I'm getting a 404 otherwise, yet via browser it works
n_blownapart has joined #ruby
choke has quit [Ping timeout: 265 seconds]
futilegames_ has joined #ruby
pdoherty has quit [Quit: Leaving]
futilegames has quit [Ping timeout: 265 seconds]
futilegames_ is now known as futilegames
<shevy>
perhaps your browser request sends more information that your ruby-script based request
davejlong has quit []
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
*than
bkxd has joined #ruby
<kspencer>
you talking like request headers?
viperman has quit [Ping timeout: 272 seconds]
<shevy>
dunno if that is the only component that is sent
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has quit [Ping timeout: 250 seconds]
<shevy>
I remember that I once used mechanize for some website where my script did not work until I made some changes and added additional information
<drbrain>
diegoviola: the HTTP spec only allows you to retry idempotent requests (so not POST)
viperman has joined #ruby
Ox0dea has joined #ruby
choke has joined #ruby
<drbrain>
I think ruby 2.3 doesn't have the problem by performing a select() or something
KineticX has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
kalopsian has quit [Ping timeout: 260 seconds]
smactive has joined #ruby
kalopsian has joined #ruby
gatman has joined #ruby
davedev2_ has joined #ruby
CihanKaygusuz has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
northfurr has quit [Quit: northfurr]
yardenbar has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
DoubleMalt has quit [Remote host closed the connection]
Cihan has quit []
mistermocha has quit [Remote host closed the connection]
charliesome has joined #ruby
CloCkWeRX has joined #ruby
Cihan has joined #ruby
clamstar has quit [Ping timeout: 250 seconds]
CloCkWeRX has left #ruby [#ruby]
Snowy has quit [Remote host closed the connection]
choke has quit [Ping timeout: 265 seconds]
choke has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
mistermocha has joined #ruby
skcin7 has joined #ruby
pestle has quit [Quit: Ciao.]
djbkd has joined #ruby
pestle has joined #ruby
jackjackdripper has joined #ruby
devbug has joined #ruby
cyrus_mc has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
edj has joined #ruby
clamstar has joined #ruby
momomomomo has quit [Quit: momomomomo]
edj is now known as Guest24140
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has quit [Ping timeout: 265 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
casadei has joined #ruby
choke has joined #ruby
<Guest24140>
where do i go to talk to people who use ruby motion?
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
<Guest24140>
the irc is empty
kalopsian has quit [Ping timeout: 240 seconds]
djbkd has quit [Ping timeout: 276 seconds]
<havenwood>
Guest24140: Whatcha wondering?
<Guest24140>
i have like 10 questions
xxneolithicxx has quit [Quit: Leaving.]
yardenbar has quit [Ping timeout: 272 seconds]
einarj_ has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
JDiPierro has joined #ruby
dlitvak has quit [Remote host closed the connection]
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei has quit [Read error: Connection reset by peer]
<havenwood>
Guest24140: Seems there are 19 folk in #rubymotion but yeah it might take a while for a response with so few.
casadei has joined #ruby
<havenwood>
Guest24140: Ask any Ruby questions here! You might not get such great answers to RubyMotion-specific stuff here but maybe worth a shot?
Vertroa has joined #ruby
<Guest24140>
havenwood: i guess my first question is, is there a rails equivalent on rubymotion,like does it have a back end or is it only for front end and it needs and if it does need rails for a back end would there be a way to do location based services?
baweaver has quit [Remote host closed the connection]
centrx has joined #ruby
<Guest24140>
using phone location
choke has quit [Ping timeout: 265 seconds]
scripore has joined #ruby
underplank has joined #ruby
dlitvak has joined #ruby
<havenwood>
Guest24140: AFAIK it doesn't have an API component, that's up to you. You might like the new Rails 5 "--api" mode (or rails-api gem in the now) or there are plenty of other Ruby tools for making APIs.
dlitvak has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
choke has joined #ruby
ta0 has joined #ruby
antgel has joined #ruby
mezcan has quit [Remote host closed the connection]
<Guest24140>
havenwood: does that mean i can use rails to create the backend?
underplank has quit [Client Quit]
<Guest24140>
havenwood: will rails be able to interact with the phone functions like camera?
jbrhbr has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
dlitvak has joined #ruby
benlovell has joined #ruby
<Guest24140>
havenwood: im a bit of a novice
underplank has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
dlitvak has quit [Remote host closed the connection]
nerfando has joined #ruby
mdw has joined #ruby
momomomomo has joined #ruby
nerfando has quit [Max SendQ exceeded]
benlovell has quit [Client Quit]
nerfando has joined #ruby
baweaver has joined #ruby
<havenwood>
Guest24140: Like a REST API for a regular iOS app (or whatever you're making).
<havenwood>
Guest24140: You could make a JSON REST API with rails-api, grape, or even just sinatra or roda, etc. That's a challenge in itself but worth learning.
dkam_______ has joined #ruby
mary5030_ has joined #ruby
<Guest24140>
havenwood: would i be able to use the same database for andriod,ios,and desktop?
<havenwood>
Guest24140: depends
dlitvak has joined #ruby
brunto has quit [Ping timeout: 245 seconds]
<Guest24140>
havenwood: something like a location or a post
<havenwood>
Guest24140: typically same DB but sometimes different API endpoints
<havenwood>
depends on your app needs
<Guest24140>
havenwood: api = brain without memory right?
kalopsian has joined #ruby
<havenwood>
Guest24140: Have any prior Rails experience or coming at this fresh?
rodfersou has joined #ruby
mistermo_ has quit [Ping timeout: 256 seconds]
<Guest24140>
havenwood: im doing the rails tutorial right now lol. I just got this idea and i have to make it.
zenlot1 has joined #ruby
choke has joined #ruby
<Guest24140>
havenwood: im doing the rails tutorial right now lol. I just got this idea and
mary5030 has quit [Ping timeout: 250 seconds]
<Guest24140>
havenwood: I read a book on ruby and I get that mainly
zenlot has quit [Ping timeout: 260 seconds]
<Guest24140>
havenwood: I just had the clarify that the idea was even possible
dkam_______ has quit [Ping timeout: 246 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<havenwood>
Guest24140: I'm not sure if you'll have a better time with Rails API or Rails with Grape or something simpler like Sinatra. I'd suggest reading everything you can get ahold of about REST APIs and maybe some Sinatra and Grape tutorials to see if you grok it.
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beanHolez has quit [Remote host closed the connection]
<havenwood>
Guest24140: Maybe make a simple Sinatra app and play with modifying it. Then once you're comfortable with that look up some tutorials on making an API with Sinatra and test that out.
<Guest24140>
havenwood: they'll all work with motion? I heard sinatra was for smaller projects. This one is on the larger side.
<havenwood>
Guest24140: There is more than one way to do it, which is great but tough on beginners!
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
krobzaur has quit [Ping timeout: 276 seconds]
<havenwood>
Guest24140: Sinatra makes nice APIs. Up to you!
<Ox0dea>
As you can see, she benefited from using a flat array to represent the board.
dkam_______ has quit [Ping timeout: 276 seconds]
tubuliferous_ has quit [Read error: Connection reset by peer]
paradisaeidae has joined #ruby
<Majora>
Did she?
<Ox0dea>
Yes?
<Ox0dea>
That [0, 1, 2] would be [[0, 0], [0, 1], [0, 2]] if she hadn't.
<Ox0dea>
Or perhaps something even crazier.
rodfersou has quit [Ping timeout: 240 seconds]
DonOtreply has joined #ruby
<Majora>
Oh I get it.
<Majora>
that makes sense.
rodfersou has joined #ruby
<Majora>
The logic for her "check_win" method looks really complicated...
<Ox0dea>
It's... excessive.
<Majora>
Ox0dea: is it?
<Ox0dea>
Yeah.
kalopsian has joined #ruby
skcin7 has joined #ruby
n_blownapart has quit []
<Ox0dea>
She's also using 1 and 2 as "booleans" which is terrifying.
<Majora>
Alright... Well I'm going to try and recreate her code.
<Ox0dea>
Majora: No, don't do that.
<Majora>
Ox0dea: You just said I could model mine after hers -__-
KineticX has joined #ruby
akkad_ is now known as akkad
<Ox0dea>
Majora: "Recreate" is a scary word.
<Ox0dea>
It invokes images of copying and pasting.
<Ox0dea>
*evokes
<Ox0dea>
*imagery
akkad` is now known as akkad
<Ox0dea>
Can I even English?
xet7 has joined #ruby
<Majora>
Ox0dea: Considering it's my first time... I don't see why it's such a bad thing.
<Ox0dea>
Majora: Copying and pasting?!
Wsewolod has quit [Ping timeout: 240 seconds]
<Majora>
Well no but using the same techniques in my own code
<Ox0dea>
Which techniques?
<Majora>
Well the way she sets up her board... The way she marks a spot on the board...
Prominent has joined #ruby
rjs90 has left #ruby [#ruby]
DonOtreply has quit [Ping timeout: 265 seconds]
kalopsian has quit [Ping timeout: 240 seconds]
<Majora>
Ox0dea: What do you suggest I do then?
nofxx has quit [Ping timeout: 272 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
futilegames has quit [Ping timeout: 260 seconds]
<Ox0dea>
Majora: I suggest you ensure that this venture proves to have been a learning experience.
bkxd has joined #ruby
<Majora>
Ox0dea: What in gods name does that mean.
<Majora>
English man, English.
choke has quit [Ping timeout: 265 seconds]
KineticX has quit [Ping timeout: 256 seconds]
<Ox0dea>
Read and ensure you understand her implementation before embarking on your own. Having hers open in the background while you write yours is just a roundabout way to copy and paste.
spooq|2 has quit [Read error: Connection reset by peer]
x0f has joined #ruby
<Majora>
That is literally how I have grasped everything up until this point.
dn` has quit [Quit: dn`]
<Ox0dea>
For your suspect definition of "grasped".
Jardayn has quit [Read error: Connection reset by peer]
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haraigo has quit [Ping timeout: 256 seconds]
mfb2 has joined #ruby
neanderslob_ has quit [Ping timeout: 245 seconds]
idefine has quit []
hobodave_ has quit [Ping timeout: 260 seconds]
neanderslob has joined #ruby
<Ox0dea>
Majora: My explanation of Line 3 is going to involve some metaphysics; are you okay with that?
<Majora>
...
<Majora>
I guess? Lol
mary5030 has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
mfb2_ has joined #ruby
<jbrhbr>
lol
<Ox0dea>
Majora: What does it mean to say that something is empty?
<Ox0dea>
Is a container with no contents really a container?
<Ox0dea>
After all, what is being contained?
djbkd has quit [Ping timeout: 260 seconds]
mfb2 has quit [Ping timeout: 245 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
choke has quit [Ping timeout: 265 seconds]
<Majora>
...
mjuszczak has joined #ruby
<jbrhbr>
does defining `self.included` under the hood create a new class (not an instance of a class but a new class object definition) containing whatever the new stuff is? https://gist.github.com/jerryhebert/06b6fcdd3d59d3bdbca0
<Majora>
Ox0dea: A container with no contents is still a container -__-
dlitvak has joined #ruby
<Ox0dea>
Majora: Line 3 is empty, silly.
<jbrhbr>
i'm trying to understand what other reason would cause base.instance_eval to ever actually get evaluated, since the hidden new class object seems to be the only thing that could be getting created here (there is no instance of A)
<Majora>
The same way if a tree falls in the forest and no one is around to hear it it still makes a sound xP
Vertroa has joined #ruby
<Ox0dea>
jbrhbr: You're defining #included as a method on Foo's singleton class.
<Ox0dea>
Singleton classes do kind of "spring into existence", if that's how you mean.
<thoraxe>
it's like i'm doing the same sequence of actions, which to me smells a lot like a block, but I'm not sure what ruby-fu I would need to put that... uh... block of stuff into some kind of variable and then execute it within the block I'm already in
<thoraxe>
i'm really bad at asking these kinds of questions
<jbrhbr>
Ox0dea: also, if i define another class (B, for example) that also includes Foo, i see the instance_eval print once again
roshanavand has quit [Remote host closed the connection]
<Ox0dea>
thoraxe: You could Extract Method, which could really just be a Proc.
BSaboia has quit [Quit: Leaving]
<Ox0dea>
thoraxe: def ssh_stuff(v); v.vm.provision ...; end
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Encapsulation has quit [Remote host closed the connection]
<Ox0dea>
jbrhbr: Well, yeah, Foo.included will be invoked every time Foo is included.
<jbrhbr>
that part isn't surprising to me
<jbrhbr>
i think i'm not understanding what exactly the "instance" that instance_eval is referring to
Majora has quit [Disconnected by services]
<jbrhbr>
which is why i was thinking it's creating a new class object perhaps
smbenfield has joined #ruby
DonOtreply has joined #ruby
<jbrhbr>
perhaps i just need to read about ruby singletons if they somehow deviate from the normal nomenclature
<jbrhbr>
yea, i've seen that result before and was surprised the output wasn't 'Foo'
snockerton has quit [Quit: Leaving.]
<Mon_Ouie>
Foo is not an instance of itself
Coldblackice_ has joined #ruby
<jbrhbr>
but what if Foo had inherited from Bar?
babblebre has quit [Quit: Connection closed for inactivity]
cdg has joined #ruby
Coldblackice has quit [Ping timeout: 276 seconds]
<jbrhbr>
the implication of your statement is that the class of all classes is just Class
<jbrhbr>
(which is ostensibly correct here, but confusing to me)
<Mon_Ouie>
It would still be a class object, whose superclass happens to be Bar
<jbrhbr>
oh
<jbrhbr>
so .class is actually the instance of the class object
<jbrhbr>
Mon_Ouie: then are you saying my guess was correct about why instance_eval gets fired?
eljimmy has quit [Quit: Leaving]
<Mon_Ouie>
I'm not sure I know what you mean by "actually the instance of the class object"
rrichardsr3 has quit [Ping timeout: 276 seconds]
<jbrhbr>
yea i suppose fuzzy language isn't helping but i'm mapping from fuzzy brain into fuzzy english :)
cmolenda has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
<jbrhbr>
perhaps you could just answer this, since it's more concise: describe the instance that we're talking about that causes instance_eval to get called in my gist
<Mon_Ouie>
The reason instance_eval gets executed is because you called it inside the module's included method, which gets called whenever the module is included into a class/module
<Mon_Ouie>
Do you mean what base is?
jackjackdripper has joined #ruby
<jbrhbr>
i suppose that would be the same question, yeah
M-shine has joined #ruby
<jbrhbr>
ie something must have been instantiated for there to be an instance, so what is that instance
<Mon_Ouie>
base is the class/module in which you included Foo
<Mon_Ouie>
'class A; end' is similar to 'A = Class.new'
<jbrhbr>
therein lies my confusion
neanderslob has quit [Ping timeout: 264 seconds]
neanderslob_ has joined #ruby
<jbrhbr>
i can see 'class A; end' creating a new class object describing A, but not actually a new instance of A
<jbrhbr>
and if that "new class object" i just mentioned is the instance, then i suppose all of this makes sense
cdg_ has joined #ruby
spider-mario has quit [Ping timeout: 246 seconds]
<jbrhbr>
not sure how to speak more clearly about this
nixmaniack has joined #ruby
mistermo_ has joined #ruby
<Mon_Ouie>
There are no instances of A being created in any of the code above
<jbrhbr>
yes
<Majora_>
Ox0dea: Making the board and accounting for/representing the pieces is what's throwing me off. I can follow the logic for the most part but the rest of it sucks.
<jbrhbr>
so internally the parser reads 'class A; end', parses the include, which has an instance eval, and the instance that's passed into instance_eval in this context is the class itself that we just created, right?
baweaver has quit [Ping timeout: 240 seconds]
scripore has joined #ruby
<jbrhbr>
Mon_Ouie: at least superficially i hope you can see why i find this confusing. there is no obvious instantiation, yet instance_eval (which works on instances) is being invoked. i think i mostly get it now (unless you disagree with my previous summary)
<Mon_Ouie>
Yes (except it's not the parser's role to execute your code)
<jbrhbr>
fair
cdg has quit [Ping timeout: 272 seconds]
cdg_ has quit [Remote host closed the connection]
haraigo has joined #ruby
cdg has joined #ruby
<Mon_Ouie>
instance_eval works on all objects, and just executes the block you pass it with the object that #instance_eval was called on as self
mistermo_ has quit [Ping timeout: 240 seconds]
leksster has quit [Remote host closed the connection]
nixmaniack has quit [Ping timeout: 264 seconds]
M-Kodo has joined #ruby
<jbrhbr>
that part is mostly intuitive
troulouliou_div2 has quit [Remote host closed the connection]
<jbrhbr>
this came up for me because i'm reading some code that has a instance_eval block as well as a class_eval block, both within a self.included handler, and i was trying to understand the reasoning behind those choices
<jbrhbr>
but the reason may just be specific to whatever this code is doing
Kneecaps has joined #ruby
guacamol_ has joined #ruby
<Mon_Ouie>
The difference between class_eval and instance_eval can be seen when you define a method using 'def foo; end' inside the block (also the scoping rules of constants is different IIRC, but I forget the specifics because they have changed with Ruby versions)
weemsledeux has joined #ruby
wolffles has quit [Quit: wolffles]
<Mon_Ouie>
Inside the instance_eval block, 'def foo; end' behaves as though you had done 'def self.foo; end' inside the class definition
<gambl0re>
is elixr the successor of ruby
<gambl0re>
?
<Mon_Ouie>
Inside the class_eval block, which behaves more like opening the class with the regular 'class SomeClass; …; end' syntax, 'def foo; end' defines an instance method
<jbrhbr>
Mon_Ouie: did you not say those backwards?
hannelita has quit [Remote host closed the connection]
<Mon_Ouie>
No
cdg_ has joined #ruby
guacamo__ has joined #ruby
<Mon_Ouie>
>> class ThisClass; end; ThisClass.class_eval { def a_new_method; end }; ThisClass.instance_methods(false)
<Mon_Ouie>
(In that second example a_new_method was defined as a class method, which can be found by checking ThisClass.methods(false))
guacamol_ has quit [Ping timeout: 265 seconds]
<jbrhbr>
and i'm assuming this is consistent regardless of whether or not something is a class or an instance, since they are all basically instances of something
<Mon_Ouie>
You can't call class_eval on an object that is not a class (it wouldn't make sense, you can't define instance methods on something that isn't a class)
M-mistake has joined #ruby
<jbrhbr>
ah, right
FernandoBasso has quit [Quit: Leaving]
cdg_ has quit [Ping timeout: 240 seconds]
KineticX has quit [Ping timeout: 250 seconds]
blackgoat has quit [Quit: WeeChat 1.3]
<Mon_Ouie>
instance_eval does indeed work the same for regular objects and classes, and the behavior of 'def' reflects that (if you call instance_eval on something that isn't a class, you can only define singleton methods on that object, not instance methods)
kgirthofer has joined #ruby
<jbrhbr>
yea, that's what the article speaks to
<jbrhbr>
thanks for all the help, i feel pretty good about it now. i made some notes so i won't have to ask again
guacamole has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cassioscabral has joined #ruby
viperman has quit [Ping timeout: 264 seconds]
d5sx43 has joined #ruby
dlitvak has joined #ruby
guacamo__ has quit [Ping timeout: 265 seconds]
stannard has quit [Ping timeout: 240 seconds]
dlitvak has quit [Remote host closed the connection]