apeiros_ changed the topic of #ruby to: Ruby 2.2.0; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
jottr_ has quit [Ping timeout: 264 seconds]
paolooo has joined #ruby
phoo1234567 has quit [Quit: Leaving]
Qladstone has quit [Ping timeout: 252 seconds]
baroquebobcat_ has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
GaryOak_ has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 252 seconds]
baroquebobcat_ is now known as baroquebobcat
<godd2> a5i dhh created rails
<a5i> I know that
<a5i> I wonder if he's using nodejs :/
danjordan has quit [Ping timeout: 250 seconds]
<godd2> He is most likely not
bruno- has joined #ruby
happyp has joined #ruby
<godd2> (paraphrased) "I am not a programmer, I am a Ruby programmer" - DHH
<happyp> Is it acceptable to select Ruby as your first development language?
Tinfoilhat_ has quit [Read error: Connection reset by peer]
<havenwood> happyp: yes
<godd2> happyp yep!
<Synthead> I want to install gems into ~/.gem, so I set an env variable GEM_HOME="$HOME/.gem". In my rails project, I did a gem install bundle and bundle install, but if I do rails console, I get this: http://pastie.org/9997274 What am I missing?
<godd2> happyp most popular languages are acceptable as first languages
<Synthead> I don't want bundle to install gems to /usr/lib/ruby/gems
<happyp> I know a little about PHP... enough to understand the purpose of code, but not to write it. Is Ruby written the same way that PHP is? Not in terms of syntax, but where you write your script or function in a single file?
<pipework> I personally credit DHH with making ruby a hireable language to know, but not for making ruby great or fun. It was both of those things before, during, and will be after, rails.
<jhass> Synthead: did you export GEM_HOME ?
<happyp> I've watched tutorials for Python and they wrote code lines almost like a command line instead of markup like you'd see in HTML or PHP files
<havenwood> a5i: Why not ask if DHH is using VB 1.0?
<jhass> Synthead: also I would consider a version directory, check the --user-install option to gem and chruby
<godd2> happyp you can. for bigger projects, you'd want to organize your code across several files though
<pipework> happyp: Most languages started out as languages for programming, not for generating markup.
<Synthead> jhass: yes
<pipework> But both can be used in either way.
<havenwood> a5i: That would be more likely.
<jhass> Synthead: gem env output might be helpful
jerematic has quit [Remote host closed the connection]
<a5i> DHH
<happyp> Are there any useful sites aside from Codecademy for learning Ruby on Rails? And is RoR OK to start out on or should it just be Ruby only?
<a5i> Leanr Ruby, than RoR
<havenwood> happyp: Start with pure Ruby. There're a variety of nice Rack adapters other than Rails.
<a5i> and Treehouse is c00l
<Synthead> jhass: http://pastie.org/9997278
segmond has joined #ruby
<pipework> a5i: Are you 12?
<jhass> happyp: if money is an option codeschool seems quite sane
<a5i> Why would you say that?
<pipework> happyp: There's a #rubyonrails channel, and there's a getting started guide.
<pipework> a5i: 'c00l'
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<a5i> What is that not c00l anymoar
<a5i> 0kay
<Synthead> relevant: http://bash.org/?14207
gluten_hell has quit [Quit: Computer has gone to sleep.]
Spooner has quit [Remote host closed the connection]
Rodya_ has joined #ruby
<jhass> Synthead: maybe just run gem install bundler again *shrug*
<Synthead> same issur
<jhass> Synthead: or prefxing with bundle exec might help
crueber has quit [Quit: Leaving.]
doodleha_ has quit []
DerisiveLogic has joined #ruby
ptrrr has quit [Quit: ptrrr]
foureight84 has quit [Quit: Be back later ...]
doodlehaus has joined #ruby
foureight84 has joined #ruby
thumpba has quit [Ping timeout: 252 seconds]
n80 has quit [Quit: n80]
baweaver has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 250 seconds]
beneggett has joined #ruby
shevy has joined #ruby
maknz has joined #ruby
DerisiveLogic has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 255 seconds]
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
oddmunds has quit [Ping timeout: 264 seconds]
Azure has joined #ruby
foureight84 has quit [Ping timeout: 264 seconds]
commmmodo has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
Qladstone has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
shevy has quit [Ping timeout: 240 seconds]
jobewan has quit [Quit: Leaving]
ghr has joined #ruby
baweaver has joined #ruby
funburn_ has joined #ruby
funburn has quit [Ping timeout: 272 seconds]
funburn_ is now known as funburn
StoneCypherAW has joined #ruby
ismaelga has joined #ruby
<Synthead> jhass: heeey, bundle exec rails console works
<Synthead> jhass: that's great :) why is that?
<jhass> not sure, bundle exec rebuilds load path to include only sane (=in the Gemfile) stuff
segmond has quit [Ping timeout: 252 seconds]
<Synthead> jhass: ahhh, ok. it might be better to just use bundle exec then, just to ensure that my app is running with the gems in Gemfile
<jhass> it's why I use chruby instead of managing GEM_HOME directly
<Synthead> yeah, there's all these environment dealies, but I don't care much for them
<jhass> yeah, well, interestingly enough the failed require "bundler/setup" would have done that too
ghr has quit [Ping timeout: 264 seconds]
adriancb has joined #ruby
<Synthead> jhass: thanks a lot for your help :)
RegulationD has joined #ruby
beneggett has quit [Ping timeout: 256 seconds]
beneggett has joined #ruby
Azure has quit [Read error: Connection timed out]
Azure has joined #ruby
graydot has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
xiq has quit [Remote host closed the connection]
swgillespie has joined #ruby
shevy has joined #ruby
oo_ has joined #ruby
Channel6 has joined #ruby
digdeep has joined #ruby
oo_ has quit [Remote host closed the connection]
segmond has joined #ruby
Qladstone has quit [Remote host closed the connection]
oo_ has joined #ruby
adriancb_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
x77686d has quit [Quit: x77686d]
jlast has joined #ruby
digdeep has quit [Remote host closed the connection]
adriancb_ has quit [Ping timeout: 272 seconds]
segmond has quit [Ping timeout: 245 seconds]
rekky has quit [Remote host closed the connection]
Yzguy has joined #ruby
adriancb has joined #ruby
justin_pdx has joined #ruby
Sawbones has joined #ruby
jerematic has joined #ruby
baweaver has quit [Remote host closed the connection]
Hijiri has quit [Quit: WeeChat 1.0.1]
GambitK has joined #ruby
snockerton has quit [Quit: auf wiedersehen]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doodlehaus has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 244 seconds]
jlast has quit [Remote host closed the connection]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
razieliyo has quit [Remote host closed the connection]
rekky has joined #ruby
sevenseacat has joined #ruby
triple_b has joined #ruby
otisZart has quit [Quit: Textual IRC Client: www.textualapp.com]
funburn has quit [Ping timeout: 240 seconds]
kayloos has quit [Remote host closed the connection]
zorak8 has quit [Ping timeout: 265 seconds]
Sawbones has joined #ruby
segmond has joined #ruby
funburn has joined #ruby
zacstewart has quit [Remote host closed the connection]
<GambitK> I'm relative new to ruby and I want to understand something in a ruby code
thumpba has joined #ruby
<GambitK> I understand most of it but there are a couple of lines that I don't know
patrick99e99 has quit [Read error: Connection reset by peer]
marr has quit []
<GambitK> address = @address.collect do |a|
<pipework> Can you imagine how annoying it'd be to manually handle all those code comments?
patrick99e99 has joined #ruby
<GambitK> is this the correct place to ask?
<leafybasil> GambitK: sure
nfk has quit [Quit: yawn]
<pipework> GambitK: collect is a fold over an array. For each item in the collection, run the block with that item. The return value of the block, presuming it's not a raised exception, is returned as an item in the array.
<pipework> Look up the docs.
doodlehaus has joined #ruby
graydot has quit [Quit: graydot]
<jhass> pipework: gosh that comment noise is really annoying
Qladstone has joined #ruby
<pipework> jhass: innit tho? I'd hate to see it, let alone maintain it.
<pipework> I'd be more likely to make it wrong just to troll people though....
<GambitK> but what does the " do |a|" mean?
mjuszczak has quit []
shevy has quit [Ping timeout: 272 seconds]
<pipework> GambitK: It's a block that has one argument
spyderma_ has quit [Ping timeout: 264 seconds]
<pipework> Look up ruby blocks.
freerobby has joined #ruby
<GambitK> Ok, so a is every item of array passed to the block
<GambitK> in this case
sdrew has joined #ruby
<godd2> yes
<pipework> GambitK: Whale, a is a single item in the collection.
<godd2> and the block runs once for each item (usually)
<pipework> ^
zachrab has quit [Remote host closed the connection]
<GambitK> thanks, i got all the code now
spicerack has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
<godd2> >> [1,2,3].map {|a| a * a} # should be [1, 4, 9]
<eval-in> godd2 => [1, 4, 9] (https://eval.in/295716)
sevvie has joined #ruby
<pipework> godd2: He's got all the code.
<GambitK> the code takes two arrays of ip addresses and checks if one is contained in the other
<GambitK> :)
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GambitK> what I wan to do is change and read one of the arrays from a file
<GambitK> want
<pipework> Someone should teach them #select
<GambitK> that code is a plugin from the logstash.net project
Sawbones has quit [Remote host closed the connection]
neanderslob has quit [Remote host closed the connection]
neanderslob__ has quit [Remote host closed the connection]
<pipework> Yeah, I know.
neanderslob has joined #ruby
<GambitK> i think they use ipaddr so you could compare networks to ip addresses
graydot has joined #ruby
<a5i> does Ruby support string formatting?
tejasmanohar has joined #ruby
<tejasmanohar> ugh
<a5i> or is it just string interpolation?
<godd2> [1,2,3,4,5].select {|num| num.even? }
<godd2> >> [1,2,3,4,5].select {|num| num.even? }
<tejasmanohar> does anyone here use ruby on arch linux
<eval-in> godd2 => [2, 4] (https://eval.in/295717)
<tejasmanohar> ive been trying to get this working for 3.5 freaking hours now
<pipework> a5i: There's string formatting and interpolation.
<a5i> O
<a5i> k
<godd2> tejasmanohar are you trying to install on windows?
<a5i> thx
<tejasmanohar> godd2: no, rmagick on arch linux
<pipework> isn't image_science and whatnot better? You know, not leaky as all get out?
<tejasmanohar> godd2: no windows no windows, if i was still on windows id just wipe my hard drive and cry
<tejasmanohar> pipework: yeah not my project
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tejasmanohar> pipework: this is a team's project that im working on
<godd2> tejasmanohar haha well for imagemagick i wouldnt blame you
zorak8 has joined #ruby
Takle has quit [Remote host closed the connection]
Sawbones has joined #ruby
<tejasmanohar> im dying internally
<tejasmanohar> lol
<pipework> tejasmanohar: I'd suggest they not use a bad library for image processing then, but maybe you don't like the team.
<tejasmanohar> pipework: I'd suggest the same, but I'll leave it at that :P
pietr0 has quit [Quit: pietr0]
reinaldob has joined #ruby
<GambitK> if I load the file to an array would it read the file on every run?
<pipework> GambitK: It depends on how you write the code, miaow doesn't it?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
plashchynski has quit [Quit: plashchynski]
funburn has quit [Quit: funburn]
rekky has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
tunaCanBruh has joined #ruby
delianides has joined #ruby
jason^ has joined #ruby
Sawbones has quit [Ping timeout: 252 seconds]
rekky has joined #ruby
x1337807x has joined #ruby
xcesariox has joined #ruby
shevy has joined #ruby
graydot has joined #ruby
tunaCanBruh has quit [Ping timeout: 245 seconds]
<tejasmanohar> fml
rbennacer has joined #ruby
<tejasmanohar> installing things on windows is better than using rmagick
martinbmadsen has joined #ruby
delianides has quit [Ping timeout: 264 seconds]
rekky has quit [Ping timeout: 255 seconds]
AkashicLegend has joined #ruby
fabrice31 has joined #ruby
<jhass> tejasmanohar: rmagick is meh, try to use mini_magick
<havenwood> meh, dated package i gues
<tejasmanohar> jhass: yeah im gonna talk to other folks on team, tired of this :P
<havenwood> err, 2015, vm
graydot has quit [Client Quit]
sarkis has quit [Ping timeout: 255 seconds]
gluten_hell has joined #ruby
rbennacer has quit [Ping timeout: 246 seconds]
GambitK has quit [Quit: Leaving]
shadoi has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
pragmatism has quit [Ping timeout: 265 seconds]
shevy has quit [Ping timeout: 240 seconds]
mleung has quit [Quit: mleung]
alkoma has quit [Ping timeout: 246 seconds]
<havenwood> but looks like your package anyways
ismaelga has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 252 seconds]
Troy^ has joined #ruby
deric_skibotn has quit [Ping timeout: 250 seconds]
<tejasmanohar> havenwood: yeah vm then
<havenwood> i guess some different configure options, dunno
<tejasmanohar> prolly gonna setup an ubuntu vm and get on w/ this
gluten_hell has quit [Ping timeout: 272 seconds]
jonr22 has quit [Remote host closed the connection]
<tejasmanohar> havenwood: yeah i mean i took off --enable-hdri and rebuilt
<havenwood> tejasmanohar: i was linking ya to the imagemagick-no-hdri package
<havenwood> seeing what they did compared to what you did
<havenwood> tejasmanohar: if i make no sense, i have a fever >.>
ismaelga has joined #ruby
arescorpio has joined #ruby
shevy has joined #ruby
Matthews_ has quit [Remote host closed the connection]
oki has joined #ruby
DadoCe has joined #ruby
<tejasmanohar> havenwood: that package doesnt work lol
<havenwood> tejasmanohar: well, that's that then - ha
iamjarvo has joined #ruby
<havenwood> i haven't done muck imagemagick stuffs
<havenwood> much*
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
oki has quit [Ping timeout: 256 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<a5i> O my god
<havenwood> a5i: yes?
<a5i> EcmaScript 6
<a5i> is so
<a5i> weird D:
Sawbones has joined #ruby
<sevenseacat> seems unrelated to ruby
panga has quit [Remote host closed the connection]
adriancb has quit [Remote host closed the connection]
neanderslob has quit [Remote host closed the connection]
Juanchito has quit [Quit: Connection closed for inactivity]
neanderslob has joined #ruby
wallerdev has joined #ruby
segmond has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
thumpba has quit [Ping timeout: 246 seconds]
x77686d has joined #ruby
Qladstone has quit [Remote host closed the connection]
keen__________77 has joined #ruby
<a5i> kinda is
<a5i> EcamScript 6 stole lots of stuff from Rub
<a5i> y
<a5i> Ecma*
keen__________76 has quit [Ping timeout: 256 seconds]
<pipework> a5i: !enternotspace
<helpa> a5i: The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long.
Sawbones has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<a5i> I had a few errors :/
sevvie has quit [Ping timeout: 264 seconds]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 256 seconds]
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sawbones has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
sevvie has joined #ruby
pheona has joined #ruby
robustus|Off has quit [Ping timeout: 264 seconds]
delianides has joined #ruby
danjordan has joined #ruby
Hobogrammer has joined #ruby
_blizzy_ is now known as blizzard
robustus|Off has joined #ruby
blizzard is now known as _blizzard_
robustus|Off is now known as robustus
_blizzard_ is now known as _blizzy_
FooMunki_ has quit [Quit: FooMunki_]
n80 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
jack_rabbit has joined #ruby
apeiros_ has quit [Remote host closed the connection]
dandaman has quit [Quit: Leaving.]
Spami has quit [Remote host closed the connection]
apeiros_ has joined #ruby
danjordan has quit [Ping timeout: 245 seconds]
delianides has quit [Remote host closed the connection]
delianides has joined #ruby
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
jen_ has left #ruby [#ruby]
segmond has joined #ruby
Qladstone has joined #ruby
reinaldob has quit [Remote host closed the connection]
Hijiri has joined #ruby
dandaman has joined #ruby
doodlehaus has quit [Remote host closed the connection]
delianid_ has joined #ruby
jxport has quit [Quit: leaving]
acl_ has joined #ruby
sevvie has quit [Ping timeout: 256 seconds]
klap has quit [Quit: leaving]
_maes_ has quit [Ping timeout: 255 seconds]
delianides has quit [Ping timeout: 256 seconds]
fryguy9 has joined #ruby
adriancb has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
Hirzu has joined #ruby
bigkevmcd has joined #ruby
Soda has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
jerematic has quit [Remote host closed the connection]
jenrzzz has joined #ruby
mistermo_ has joined #ruby
quazimodo has joined #ruby
<quazimodo> i have a rake task that takes something.xml and splits it into something-0.csv, something-1.csv ... something-n.csv
<quazimodo> how do I create another task that relies on these something-n.csv files ?
claptor has joined #ruby
doodlehaus has joined #ruby
krisleech has quit [Quit: ZNC - http://znc.in]
wallerdev has joined #ruby
<quazimodo> I'm not sure if i shuold be relying on files or on tasks
dandaman has quit [Quit: Leaving.]
<quazimodo> i can depend on my :make_csvs task, but i dont know?
<jhass> yeah, probably just do that
Hirzu has quit [Ping timeout: 272 seconds]
mistermocha has quit [Ping timeout: 256 seconds]
<quazimodo> jhass: hrm
<quazimodo> butts
<quazimodo> i'd much rather do something like a rule for .xml to .csv
mistermo_ has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
Takle has joined #ruby
<jhass> but you don't know how many .csv's the .xml will yield, right?
Sawbones has quit [Remote host closed the connection]
<quazimodo> no
kblake has quit [Remote host closed the connection]
<Nilium> Turns out converting all our hg repos at work to git is simple. Converting the one and only SVN repo that matters, on the other hand, is downright painful.
<jhass> that makes it hard to do it with a rule afaik
<quazimodo> ok
<quazimodo> i'll do it the other way and use a filename convention and the glob/splat thingo
<jhass> since a rule basically defines the file to generate, not the source
<Nilium> Takes forever due to git having to detect branch points
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
<quazimodo> yep
<quazimodo> gotcha jhass
blackmesa has quit [Quit: WeeChat 1.1.1]
Megtastique has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Sawbones has joined #ruby
amclain has joined #ruby
wallerdev has quit [Quit: wallerdev]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
Sawbones has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 252 seconds]
rekky has joined #ruby
GnuYawk has joined #ruby
sevvie has joined #ruby
oo_ has quit [Remote host closed the connection]
justin_pdx has quit [Quit: justin_pdx]
adriancb has quit [Ping timeout: 245 seconds]
justin_pdx has joined #ruby
beneggett has joined #ruby
Rodya_ has joined #ruby
DerisiveLogic has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
segmond has quit [Ping timeout: 255 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
bricker has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
adriancb has joined #ruby
tus has quit []
it0a has joined #ruby
doodlehaus has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
agarie has joined #ruby
oo_ has joined #ruby
sevvie has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
rekky has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ruby
jamgood9_ has joined #ruby
pullphinger has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
sarkis has joined #ruby
Dolphi has quit [Quit: Leaving]
jamgood9_ has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
segmond has joined #ruby
pwnz0r has joined #ruby
doodlehaus has joined #ruby
AlexRussia has joined #ruby
triple_b has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
dopie has joined #ruby
agarie has quit [Remote host closed the connection]
bim has quit [Remote host closed the connection]
wookiehangover has quit [Ping timeout: 256 seconds]
philwantsfish has quit [Ping timeout: 264 seconds]
adriancb has quit [Remote host closed the connection]
n80 has quit [Quit: n80]
adriancb has joined #ruby
doodlehaus has quit [Remote host closed the connection]
wookiehangover has joined #ruby
davejacobs has quit [Remote host closed the connection]
Megtastique has quit []
Rodya_ has joined #ruby
adriancb_ has joined #ruby
jerematic has joined #ruby
sankaber has joined #ruby
<Qladstone> is converting a hash into an array an expensive operation?
<jhass> compared to?
<Qladstone> hmm let me describe
beneggett has joined #ruby
tcrypt has joined #ruby
adriancb has quit [Ping timeout: 244 seconds]
<Qladstone> let's say I have a large array (list) of projects that employees have worked on
<Qladstone> each item in that list is an array with index0 being the project_name, and the index1 being an array of many person_name # people who have worked in that project
jerematic has quit [Ping timeout: 256 seconds]
zacstewart has joined #ruby
Adran has quit [Read error: Connection reset by peer]
<Qladstone> so I want to create the opposite. a list of people, with the projects they have worked on in the same format
krz has joined #ruby
dandaman has joined #ruby
tunaCanBruh has joined #ruby
<Qladstone> but the final format is an array, not a hash
sankaber has quit [Ping timeout: 252 seconds]
beneggett has quit [Client Quit]
sarkis has quit [Ping timeout: 272 seconds]
<Qladstone> one way is to create a hash; then for each person_name under a project_name, check if the hash contains that person's name, if so then append the project_name to the list of projects
<Qladstone> if not create a key for person_name and create an empty array as the value for that key, and append the project_name
<Qladstone> but in the end the hash will need to be converted back into an array -.-
lkba has quit [Ping timeout: 252 seconds]
<jhass> my point is that every operation is expensive compared to not doing it, so while "is X more expensive than Y", or "is X more efficient than Y" is a valid consideration, "is X expensive" on its own in most cases is not
<Qladstone> the other method I thought of, is conducting a binary search and insert operation
<Qladstone> so instead of using a hash to start with, I first create an empty array
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Qladstone> I do a binary search of the person_name, if exist I add the project_name to it, else I create the person_name at the spot and add the project_name to it
<havenwood> Qladstone: Could you show an small example of the input you're starting with and the output you desire?
<jhass> Qladstone: do whatever, if it's slow look to optimize
<jhass> don't assume it's slow beforehand
<havenwood> Qladstone: Like: {aim: true} #=> [[true, :aim]]
zacstewart has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 246 seconds]
Rodya_ has quit [Remote host closed the connection]
<Qladstone> input is: [ [project1, [person1, person2, person3...]], [project2, [person1, person2, person3...]] ...]
<Qladstone> output is the opposite:
thumpba has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
<Qladstone> [ [person1, [project1, project2, project3...]], [person2, [project1, project2, project3...]] ...]
davedev24_ has joined #ruby
<Qladstone> oh you mean the conversion from hash to array
<jhass> also there's more efficient in memory usage and more efficient in CPU time, which often are negatively correlating
fabrice31 has joined #ruby
<havenwood> Qladstone: well, whatever you're starting with, if it's a Hash then yeah
<Qladstone> so that hash will be { person1 => [project1, project2, project3], person2 => [project1, project2, project3] }
shevy has quit [Ping timeout: 245 seconds]
amystephen has quit [Quit: amystephen]
badfish129 has joined #ruby
bhegel has quit [Quit: bhegel]
<jhass> Qladstone: but again, start with the solution you can write fast and that's the most understandable, not what you think runs the fastest, if it actually turns out too slow, then optimize
<Qladstone> alright good advice (; haha thanks so much
<nug> http://c2.com/cgi/wiki?PrematureOptimization follows what jhass said
justin_pdx has quit [Quit: justin_pdx]
fabrice31 has quit [Ping timeout: 256 seconds]
shevy has joined #ruby
jaequery has joined #ruby
AkashicLegend has quit [Read error: Connection reset by peer]
Asher has quit [Quit: Leaving.]
<havenwood> {:person1=>[:project1, :project2, :project3], :person2=>[:project1, :project2, :project3]}.each_with_object(Hash.new { |h, k| h[k] = []}) { |(k, v), h| v.each { |project| h[project] << k } }
jonr22 has joined #ruby
<havenwood> #=> {:project1=>[:person1, :person2], :project2=>[:person1, :person2], :project3=>[:person1, :person2]}
<havenwood> Qladstone: ^ one to bench to start with
jenrzzz has quit [Ping timeout: 252 seconds]
AkashicLegend has joined #ruby
AkashicLegend has quit [Client Quit]
thumpba has quit [Remote host closed the connection]
xploshioon has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
bigkevmcd has quit [Ping timeout: 255 seconds]
<havenwood> ew my var names, not the desired output, please never mind me.
* havenwood slinks away.
havenwood has quit []
meschi has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
ghr has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtdowney has joined #ruby
<pheona> Hi All can you suggest some proxy to access the Vevo to my region?
<sevenseacat> seems unrelated to ruby
jaequery has joined #ruby
segmond has quit [Ping timeout: 252 seconds]
<pheona> yea but I'm currently using Ruby in my project
ghr has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
fryguy9 has quit [Quit: Leaving.]
RegulationD has joined #ruby
jaequery has quit [Client Quit]
<shevy> :D
jaequery has joined #ruby
replay has quit []
<shevy> ruby-2.1.1 is there!
<shevy> ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.xz
RegulationD has quit [Ping timeout: 272 seconds]
elfuego has quit [Quit: elfuego]
danman has quit [Quit: danman]
<pheona> well thanks anyways
jaequery has quit [Client Quit]
Qladstone has quit [Read error: Connection reset by peer]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
happyface has joined #ruby
sarkis has joined #ruby
DadoCe has quit [Remote host closed the connection]
ponga has joined #ruby
xcesariox has joined #ruby
Klumben has quit [Quit: Bye for now]
johnhamelink has quit [Quit: PanicBNC - https://PanicBNC.net]
fryguy9 has joined #ruby
segmond has joined #ruby
pwnz0r has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 252 seconds]
twistedpixels is now known as zz_twistedpixels
Troy^ has quit [Quit: Textual IRC Client: www.textualapp.com]
zz_twistedpixels is now known as twistedpixels
ponga has quit [Ping timeout: 244 seconds]
cnj has quit [Ping timeout: 250 seconds]
thumpba has joined #ruby
justin_pdx has joined #ruby
nux443 has joined #ruby
x1337807x has joined #ruby
twistedpixels is now known as zz_twistedpixels
x1337807x has quit [Max SendQ exceeded]
bim has joined #ruby
AlexRussia has joined #ruby
x1337807x has joined #ruby
fryguy9 has quit [Quit: Leaving.]
cnj has joined #ruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
bim has quit [Ping timeout: 264 seconds]
armyriad has quit [Ping timeout: 264 seconds]
sivsushruth has quit [Ping timeout: 255 seconds]
armyriad has joined #ruby
sivsushruth has joined #ruby
diegoviola has quit [Remote host closed the connection]
theta88 has joined #ruby
theta88 has left #ruby [#ruby]
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has joined #ruby
x77686d has quit [Quit: x77686d]
davejacobs has joined #ruby
beneggett has joined #ruby
jlast has quit [Remote host closed the connection]
apeiros_ has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
apeiros_ has joined #ruby
jaequery has joined #ruby
shevy has quit [Ping timeout: 255 seconds]
shevy has joined #ruby
Qladstone has joined #ruby
flip_digits has joined #ruby
pwh has quit []
davejacobs has quit [Ping timeout: 246 seconds]
ebbflowgo has joined #ruby
fryguy9 has joined #ruby
gmcintire has quit [Quit: Connection closed for inactivity]
jaequery has quit [Ping timeout: 264 seconds]
crdpink has quit [Excess Flood]
apeiros_ has quit [Remote host closed the connection]
crdpink has joined #ruby
apeiros_ has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
segmond has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
IrishGringo has joined #ruby
qiffp has quit [Ping timeout: 265 seconds]
dandaman has quit [Quit: Leaving.]
nii236 has joined #ruby
braincrash has quit [Quit: bye bye]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DadoCe has joined #ruby
oo_ has joined #ruby
dandaman has joined #ruby
iamjarvo has joined #ruby
oo_ has quit [Remote host closed the connection]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CorySimmons has joined #ruby
braincrash has joined #ruby
DadoCe has quit [Ping timeout: 244 seconds]
rekky has joined #ruby
beneggett has joined #ruby
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shevy has quit [Ping timeout: 256 seconds]
shevy has joined #ruby
thumpba_ has joined #ruby
lkba has joined #ruby
rekky has quit [Ping timeout: 272 seconds]
segmond has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zyxelthrone has quit [Ping timeout: 256 seconds]
thumpba has quit [Ping timeout: 265 seconds]
wldcordeiro has joined #ruby
Zesty has joined #ruby
sarkis has quit [Ping timeout: 252 seconds]
qiffp has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
Yzguy has quit [Quit: I'm bouncing outta here!]
anaeem1 has joined #ruby
<tejasmanohar> hey guys
<tejasmanohar> gem troubke
kyb3r_ has joined #ruby
ghr has joined #ruby
<tejasmanohar> is there any way to fix this? can i tell what version of gem my bundle is trying to install
xploshioon has quit [Quit: Leaving]
IrishGringo has joined #ruby
Cache_Money has joined #ruby
qiffp has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
jerematic has joined #ruby
threh has joined #ruby
Cache_Money has quit [Client Quit]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
x1337807x has joined #ruby
jerematic has quit [Ping timeout: 240 seconds]
Spami has quit [Client Quit]
duncannz has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
duncannz has quit [Max SendQ exceeded]
Qladstone has quit []
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zzing has joined #ruby
jack_rabbit has quit [Ping timeout: 256 seconds]
dandaman has quit [Quit: Leaving.]
threh has quit [Ping timeout: 246 seconds]
threh has joined #ruby
dandaman has joined #ruby
baroquebobcat has joined #ruby
shum has quit [Remote host closed the connection]
baroquebobcat has quit [Client Quit]
duncannz has joined #ruby
coco has quit [Ping timeout: 250 seconds]
baroquebobcat has joined #ruby
coco has joined #ruby
sivsushruth has quit [Ping timeout: 272 seconds]
<shevy> uninitialized constant Syck::ENGINE (NameError)
StoneCypherAW has quit [Ping timeout: 265 seconds]
Zesty has quit [Quit: Linkinus - http://linkinus.com]
arescorpio has quit [Excess Flood]
<shevy> :(
<shevy> oh interesting
blahwoop has joined #ruby
<shevy> require 'syck' works though
<blahwoop> good evening
fryguy9 has quit [Quit: Leaving.]
bim has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
threh has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
sevvie has joined #ruby
pwnz0r has joined #ruby
OrbitalKitten has joined #ruby
ebbflowgo has left #ruby [#ruby]
<weaksauce> tejasmanohar it's listed in the output
<shevy> oh I see
<shevy> YAML::ENGINE.yamler = 'syck'
<weaksauce> /home/tejas/.rvm/gems/ruby-2.1.1@onvard/extensions/x86_64-linux/2.1.0/rmagick-2.13.2/gem_make.ou
tunaCanBruh has joined #ruby
<shevy> uninitialized constant Syck::ENGINE (NameError)
<shevy> how to safeguard against this properly?
bluOxigen has joined #ruby
<shevy> on ruby 2.1.x it worked
<tejasmanohar> weaksauce: i just dont get why ths is happenign O.o
bim has quit [Ping timeout: 256 seconds]
<weaksauce> read that file to see
<weaksauce> it's gem_make.out though not ou
sivsushruth has joined #ruby
delianid_ has quit [Remote host closed the connection]
<shevy> oui
<shevy> so french
<shevy> Mon_Ouie will be happy
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
OrbitalKitten has quit [Ping timeout: 256 seconds]
tunaCanBruh has quit [Ping timeout: 244 seconds]
Rodya_ has joined #ruby
dandaman has quit [Quit: Leaving.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ebbflowgo has joined #ruby
jack_rabbit has joined #ruby
dandaman has joined #ruby
fabrice31 has joined #ruby
reinaldob has joined #ruby
amystephen has joined #ruby
x1337807x has joined #ruby
sean_s has joined #ruby
dandaman has quit [Client Quit]
tejasmanohar has quit [Quit: Page closed]
Rodya_ has quit [Ping timeout: 240 seconds]
ismaelga has quit [Remote host closed the connection]
f03lipe has quit [Ping timeout: 244 seconds]
jimeh has quit [Remote host closed the connection]
adriancb_ has quit [Remote host closed the connection]
reinaldob has quit [Ping timeout: 244 seconds]
fabrice31 has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jonr22 has joined #ruby
RegulationD has joined #ruby
flip_digits has quit []
LetErikTry has joined #ruby
LetErikTry has joined #ruby
roshanavand has joined #ruby
IrishGringo has quit [Ping timeout: 252 seconds]
thumpba_ has quit [Ping timeout: 264 seconds]
sivsushruth has quit [Ping timeout: 256 seconds]
DadoCe has joined #ruby
jonr22 has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
jimeh has joined #ruby
blahwoop has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Rodya_ has quit [Client Quit]
oo_ has joined #ruby
ebbflowgo has left #ruby [#ruby]
DadoCe has quit [Ping timeout: 245 seconds]
RegulationD has joined #ruby
oo_ has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
segmond has quit [Ping timeout: 250 seconds]
bruno- has joined #ruby
oo_ has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
skj3gg has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CorySimmons has quit [Quit: Bye!]
dopie has quit [Remote host closed the connection]
nahtnam has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
f03lipe has joined #ruby
danjordan has joined #ruby
boshhead has quit [Ping timeout: 264 seconds]
rhg135 is now known as rhg135|zzz
skj3gg has quit [Quit: ZZZzzz…]
segmond has joined #ruby
dopie has joined #ruby
a5i has quit [Quit: Connection closed for inactivity]
skj3gg has joined #ruby
<shevy> ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
<shevy> yay!
danjordan has quit [Ping timeout: 252 seconds]
dopie has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby
skj3gg has quit [Client Quit]
EasyCo has quit [Quit: Connection closed for inactivity]
dopie has joined #ruby
denwo has joined #ruby
skj3gg has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
jack_rabbit has quit [Remote host closed the connection]
dandaman has joined #ruby
StoneCypherAW has joined #ruby
bigmac has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
duncannz has joined #ruby
roshanavand has joined #ruby
krz has joined #ruby
jamgood96 has joined #ruby
<RedCrustacean> yayyy!
tobago has joined #ruby
dandaman has quit [Client Quit]
segmond has quit [Ping timeout: 246 seconds]
davejacobs has joined #ruby
StoneCypherAW has quit [Ping timeout: 264 seconds]
justin_pdx has quit [Quit: justin_pdx]
Soda has joined #ruby
Klumben has joined #ruby
dopie has quit [Remote host closed the connection]
graydot has joined #ruby
davejacobs has quit [Ping timeout: 250 seconds]
GnuYawk has quit [Ping timeout: 246 seconds]
Klumben has quit [Client Quit]
lemur has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Channel6 has quit [Quit: Leaving]
Hirzu has joined #ruby
delianides has joined #ruby
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
Klumben has joined #ruby
agent_white has joined #ruby
lxsameer has joined #ruby
pork_clips has joined #ruby
<agent_white> Good evening!
pork_clips is now known as _cake
segmond has joined #ruby
<_cake> hi
Hirzu has quit [Ping timeout: 265 seconds]
jamgood96 has quit [Quit: Leaving...]
tkuchiki_ has quit [Ping timeout: 256 seconds]
delianides has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
commmmodo has quit [Quit: commmmodo]
ismaelga has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
pontiki has joined #ruby
adriancb has joined #ruby
rce has left #ruby [#ruby]
<pontiki> i made a thing: https://rubygems.org/gems/make_gallery
Morkel has joined #ruby
adriancb has quit [Ping timeout: 256 seconds]
zacstewart has joined #ruby
mleung has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
commmmodo has joined #ruby
djbkd has quit [Quit: My people need me...]
<agent_white> Ooo...
systemd0wn_ has joined #ruby
johnhamelink has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
skinny_much has quit [Quit: Ruh Roh...]
piotrj has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
systemd0wn has quit [Ping timeout: 256 seconds]
mleung has quit [Client Quit]
roshanavand1 has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
last_staff has joined #ruby
bricker has quit [Ping timeout: 265 seconds]
jerematic has joined #ruby
tcrypt has quit [Remote host closed the connection]
mistermocha has joined #ruby
lxsameer has joined #ruby
joset has joined #ruby
jerematic has quit [Ping timeout: 265 seconds]
kalz has quit [Ping timeout: 265 seconds]
Adran has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
jozw has joined #ruby
nii236 has quit [Quit: leaving]
thumpba has joined #ruby
OrbitalKitten has joined #ruby
ghr has joined #ruby
happyp has quit [Ping timeout: 246 seconds]
thumpba_ has joined #ruby
philwantsfish has joined #ruby
kalz has joined #ruby
happyface has quit [Quit: Connection closed for inactivity]
Adran has quit [Quit: Este é o fim.]
thumpba has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 256 seconds]
jozw has quit [Remote host closed the connection]
rkhunter has joined #ruby
rkhunter has left #ruby ["Leaving"]
pontiki has quit [Quit: gnite]
Adran has joined #ruby
roshanavand has quit [Ping timeout: 252 seconds]
ismaelga has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
roshanavand has joined #ruby
DerisiveLogic has quit [Ping timeout: 264 seconds]
Jetchisel has joined #ruby
jshultz has quit [Quit: Connection closed for inactivity]
momomomomo has quit [Quit: momomomomo]
<zenspider> shevy: look at the year...
ponga has joined #ruby
charliesome has quit [Quit: zzz]
tunaCanBruh has joined #ruby
ascarter has joined #ruby
Musashi007 has quit [Quit: Musashi007]
ponga has quit [Ping timeout: 265 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
tagrudev has joined #ruby
tunaCanBruh has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has joined #ruby
davejacobs has joined #ruby
dj_zubehoer has joined #ruby
hvxgr has quit [Ping timeout: 255 seconds]
<certainty> moin rockers
lolmaus has quit [Quit: Konversation terminated!]
nux443 has quit [Quit: leaving]
davejacobs has quit [Ping timeout: 245 seconds]
omosoj has quit [Quit: leaving]
last_staff has quit [Remote host closed the connection]
jonr22 has joined #ruby
polysics has quit [Remote host closed the connection]
polysics has joined #ruby
kalz has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
codecop has joined #ruby
dandaman has joined #ruby
paolooo has quit [Ping timeout: 246 seconds]
^Denis has quit [Remote host closed the connection]
sivsushruth has joined #ruby
wicope has joined #ruby
mjmac has quit [Ping timeout: 250 seconds]
bluOxigen has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 264 seconds]
jonr22 has quit [Ping timeout: 252 seconds]
polysics has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
livingstn has quit []
mjmac has joined #ruby
rockdon has quit [Quit: Poppin' smoke, yall]
mikecmpbll has quit [Quit: ciao.]
Axy has joined #ruby
Axy has joined #ruby
rekky has joined #ruby
RegulationD has joined #ruby
Mia has quit [Ping timeout: 246 seconds]
dandaman has quit [Quit: Leaving.]
mistermocha has quit [Remote host closed the connection]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwardly has quit [Ping timeout: 265 seconds]
LetErikTry has quit [Quit: sleep]
rekky has quit [Ping timeout: 264 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
piotrj has quit [Remote host closed the connection]
dandaman has joined #ruby
hollywood has joined #ruby
kalz has joined #ruby
RegulationD has joined #ruby
edwardly has joined #ruby
dandaman has quit [Client Quit]
lolmaus has joined #ruby
sandelius has joined #ruby
<flughafen> moin certainty
dandaman has joined #ruby
arup_r has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
andikr has joined #ruby
sivsushruth has quit [Ping timeout: 265 seconds]
anarang has joined #ruby
sivsushruth has joined #ruby
acl_ has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
danjordan has joined #ruby
hvxgr has joined #ruby
piotrj has joined #ruby
foureight84 has joined #ruby
pwnz0r has quit [Remote host closed the connection]
pwnz0r has joined #ruby
Hirzu has joined #ruby
danjordan has quit [Ping timeout: 256 seconds]
bal has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
amclain has quit [Quit: Leaving]
edwardly has quit [Read error: Connection reset by peer]
pwnz0r has quit [Ping timeout: 246 seconds]
Musashi007 has quit [Quit: Musashi007]
SixiS has joined #ruby
tcrypt has joined #ruby
ghr has joined #ruby
dj_zubehoer has quit []
Tinfoilhat_ has joined #ruby
edwardly has joined #ruby
<certainty> o/ flughafen
pwnz0r has joined #ruby
<flughafen> whats going on
iamdoo2 has joined #ruby
Spami has joined #ruby
ghostpl_ has joined #ruby
<certainty> not much yet. just fired up emacs. checking my org file currently
maoko has joined #ruby
<flughafen> emacs, ummm, cool
Tinfoilhat_ has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 240 seconds]
<certainty> what's up at he flughafen?
<certainty> the
<flughafen> just taking off and landing mostly, and waiting
pwnz0r has quit [Remote host closed the connection]
<flughafen> and vim
maoko has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 250 seconds]
tcrypt has quit [Ping timeout: 264 seconds]
ismaelga has joined #ruby
<certainty> vim, ummm, cool ;)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
maoko has joined #ruby
piotrj has quit [Remote host closed the connection]
lolmaus has quit [Quit: Konversation terminated!]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OrbitalKitten has joined #ruby
<flughafen> certainly coolar than emacs!
bigmac has quit [Read error: Connection reset by peer]
<flughafen> cooler* holy cow
<certainty> hehe
ismaelga has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
<certainty> i like vim for some aspects, but emacs is deep down in my muscle memory
OrbitalKitten has quit [Client Quit]
selu has joined #ruby
<arup_r> I tried emac.. but failed so.. too the Vim path.. I like that you can run console in the emacs.. but Vim don't :(
<arup_r> certainty:
<arup_r> *took the
<shevy> arup_r how do you want to make this shorter
Hirzu has quit [Read error: Connection reset by peer]
<shevy> btw how does line 10 work
Hirzu has joined #ruby
<certainty> arup_r: IMHO it depends on how your brain works. just like with programming languages. some suite your way of thinking better and feel more comfortable
<certainty> also of course i like emacs because it's exensible with elisp
<arup_r> humm
<flughafen> certainty: i'll be switching to neovim with the first release
<arup_r> flughafen: what's that ?
<shevy> arup_r I don't see how you can shorten this
<arup_r> Not me too.. I tried to DRY it, shevy. but I made it so ugly than it was
Hirzu has quit [Client Quit]
<certainty> arup_r: i don't see much repition in that code. I'm a bit surprised by the instance variable. Id'd not expect a getter to update my instance variable (unless it does some lazy assignment)
<flughafen> arup_r: a bunch of guys got crowd sourcing to refactor and improve vim,
sevvie has quit [Ping timeout: 265 seconds]
amundj has joined #ruby
<arup_r> certainty: ok
OrbitalKitten has joined #ruby
<certainty> arup_r: also the dryer version is alot less clear. The question is whether the conditionals are likely to get more
<certainty> then i'd think about solving it in another way
foureight84 has quit [Quit: Be back later ...]
<arup_r> certainty: please suggest your way.
<flughafen> arup_r: the guy tried to get these changes into upstream vim, but they didn't want them, so they forked and now have neovim. i'm actually surprised and impressed by how much they've done and how fast they've gone
_Andres has joined #ruby
<flughafen> arup_r: http://neovim.org/
aganov has joined #ruby
<arup_r> flughafen: ok.. Does neovim support console running within vim .. like emacs ?
Aswebb_ has joined #ruby
mistermocha has joined #ruby
<flughafen> arup_r: not really sure, but I think the work they'll do will pave the way for allowing it. one of their key goals is to improve/add async handling so it'll work a lot faster with plugins.
<certainty> arup_r: well the only thing that is repeated is update_value(something) if receive.some_pred? .. so you could think about extracting that. a method probably not the best choice since your get string pretty much looks like a reduce. You probably want something callable. So a small class (a formatter) would probably do. That's just quick things i'd ponder. i'm not sure it's the right way.
<certainty> but with the current amount of conditionals i'd just leave it the way it is
sevvie has joined #ruby
yfeldblum has joined #ruby
<arup_r> certainty: thanks.. Yes.. current amount is very little.. I was looking at its broader way ..
<certainty> for me one of the strenghts of emacs is its dynamic environment. you can update the UX while it runs and tweak it to your likings. Also elpa and all the many packages are great
<certainty> arup_r: also the exam.is_something? is slightly suspicious. I'd check if that's a case to apply the tell-don't-ask principle
<wasamasa> there is a neovim branch that supports terminal emulation
hs366 has joined #ruby
<certainty> brb
mistermocha has quit [Ping timeout: 265 seconds]
<wasamasa> someone already ran emacs in it
<wasamasa> so, I guess it's on!
<arup_r> wasamasa: wow.. that's cool
<arup_r> That's lacking in traditional vim
<wasamasa> yup
Xiti has quit [Quit: Xiti]
<arup_r> But it is really needed
<arup_r> some plugins are there.... But those are not as useful as it seems
<arup_r> Well.. I'm not considering Tmux... :)
<arup_r> Talking about Vim's own features
<arup_r> certainty: waiting ... :)
fabrice31 has quit [Remote host closed the connection]
<shevy> I prefer to use linux rather than emacs as my OS
mkaesz has joined #ruby
fabrice31 has joined #ruby
<arup_r> wut? :p
jenrzzz has joined #ruby
ptrrr has joined #ruby
<shevy> if only we could use macros to modify ruby
<shevy> hey certainty
<shevy> ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
<shevy> \o/
Xiti has joined #ruby
<arup_r> I know.. jhass said yesterday
<shevy> I had to use begin; YAML::ENGINE.yamler = 'syck'; rescue NameError; end to retain compatibility with the syck gem which worked fine on 2.1.x
<arup_r> web API still not come ... Because there so many docos updated
<agent_white> BOOPBOOP
Aswebb_ has quit []
davejacobs has joined #ruby
lolmaus has joined #ruby
emocakes has joined #ruby
wallerdev has joined #ruby
User458764 has joined #ruby
nopc0de has joined #ruby
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jerematic has joined #ruby
nopc0de has left #ruby [#ruby]
maoko has quit [Ping timeout: 265 seconds]
polysics has joined #ruby
norc has joined #ruby
<norc> Hi. What exactly does /\z/ match?
pwnz0r has joined #ruby
fabrice31_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
oki has joined #ruby
iamdoo2 has quit [Remote host closed the connection]
<shevy> \z End of string
<shevy> norc -> http://rubular.com/
last_staff has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
jerematic has quit [Ping timeout: 264 seconds]
iamdoo2 has joined #ruby
hmnhf has joined #ruby
<shevy> that seems to be equivalent to $ sort of
<norc> shevy: Ah thank you.
kupusc has joined #ruby
pwnz0r has quit [Ping timeout: 265 seconds]
kupusc_ has joined #ruby
Bounga has joined #ruby
kupusc_ has quit [Client Quit]
iamdoo2 has quit [Ping timeout: 240 seconds]
sinkensabe has joined #ruby
frobs has joined #ruby
krz has quit [Ping timeout: 255 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
strixd has joined #ruby
mber has quit [Ping timeout: 246 seconds]
OrbitalKitten has joined #ruby
Waheedi has joined #ruby
msgodf has joined #ruby
ptrrr has quit [Quit: ptrrr]
badfish129 has quit [Quit: badfish129]
piotrj has joined #ruby
Takle has joined #ruby
vt102 has quit [Ping timeout: 245 seconds]
ta has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
dandaman has quit [Quit: Leaving.]
bim has joined #ruby
ponga has joined #ruby
ta has quit [Remote host closed the connection]
rdark has joined #ruby
tris has joined #ruby
terlar has joined #ruby
ki0 has joined #ruby
aswen has joined #ruby
ghr has joined #ruby
tunaCanBruh has joined #ruby
bim has quit [Ping timeout: 245 seconds]
<avril14th> morning
<strixd> o/
ponga has quit [Ping timeout: 252 seconds]
robustus is now known as robustus|Off
ta has joined #ruby
plasku has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
gluten_hell has joined #ruby
tunaCanBruh has quit [Ping timeout: 246 seconds]
danjordan has joined #ruby
jimms has joined #ruby
ismaelga has joined #ruby
kalusn has joined #ruby
Juanchito has joined #ruby
duncannz has quit [Ping timeout: 252 seconds]
<plasku> Hi. I'm looking for a general guide on how to structure your applications in Ruby. Any help appreciated.
dopie has joined #ruby
ismaelga has quit [Ping timeout: 240 seconds]
nuy_19031046 has joined #ruby
<sandelius> plasku any framework or pura Rack apps?
jonr22 has joined #ruby
nuy_19031046 has quit [Remote host closed the connection]
nuy_19031046 has joined #ruby
arup_r has quit []
thumpba has joined #ruby
ta has quit [Remote host closed the connection]
CustosLimen has joined #ruby
Takle has quit [Remote host closed the connection]
nuy_19031046 has quit [Client Quit]
<plasku> sandelius: command line utilities
jonr22 has quit [Ping timeout: 265 seconds]
dumdedum has joined #ruby
einarj has joined #ruby
<sandelius> plasku ahh. run $ bundle gem <my_name>
thumpba_ has quit [Ping timeout: 246 seconds]
<sandelius> then you'll get a basic structure
funburn has joined #ruby
<sandelius> remove the gemspec and use the Gemfile is your not creating a gem
nuy_19031046 has joined #ruby
sarkis has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
piotrj has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 256 seconds]
<shevy> plasku default to the gem-layout structure
<shevy> plasku when you do, things will be as simple as: require 'name_of_your_project_here'
sivsushruth has quit [Ping timeout: 245 seconds]
piotrj has joined #ruby
wallerdev has quit [Quit: wallerdev]
sevvie has quit [Ping timeout: 245 seconds]
lemur has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 264 seconds]
fabrice31_ has joined #ruby
abuzze has joined #ruby
reinaldob has joined #ruby
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby
ta has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
fabrice31 has quit [Ping timeout: 246 seconds]
krz has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
<aob> i have a little script which runs a job which takes about 10 secs and produces some data which i write out; what's the best way to run this all the time? atm i am doing it in a bash while true loop, which is rubbish!
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
reinaldob has quit [Ping timeout: 250 seconds]
abuzze has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
RegulationD has joined #ruby
frobs has quit [Quit: Konversation terminated!]
wallerdev has joined #ruby
lordkryss has joined #ruby
lkba has quit [Read error: Connection reset by peer]
davejacobs has quit [Remote host closed the connection]
lkba has joined #ruby
funburn has quit [Quit: funburn]
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
<Schmidt> aob: what platform?
joonty has joined #ruby
amundj has quit [Ping timeout: 256 seconds]
<shevy> aob ruby also has loop {} - you can also daemonize it
amundj has joined #ruby
mikecmpbll has joined #ruby
<gr33n7007h> aob, make it a cron job if on linux
sevenseacat has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 255 seconds]
ghr has joined #ruby
<gr33n7007h> aob, have you lost your fingers ;p
<aob> sorry!
<aob> i was making coffee!
alex88 has joined #ruby
<gr33n7007h> lol
<aob> Schmidt: mostly linux
<aob> Schmidt: i want finer granularity than 1 min
Guest78105 has joined #ruby
<aob> the job takes 10 secs, i basically want it to run again as soon as it finisged
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
<Schmidt> aob: then daemonize it and just keep on running it
<aob> right i tried to daemonize it with 'foreverb'
<aob> but it didn't seem to generate output after the first run
<aob> what's the recommended way to daemonise a very simple job?
<plasku> thanks sandelius and shevy
jimms has quit [Ping timeout: 256 seconds]
Hirzu has joined #ruby
<shevy> ah sandelius was idling!
oddmunds has joined #ruby
<aob> this literally shells out and runs a command that get some status, and pulls out some stuff based on a regex and posts it to an endpoint
<aob> it's 4 lines of code
bricker has joined #ruby
jason^ has quit [Ping timeout: 264 seconds]
n1x has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
teoric has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
teoric has quit [Client Quit]
krz has quit [Ping timeout: 246 seconds]
teoric has joined #ruby
Takle has joined #ruby
teoric has quit [Client Quit]
bricker has quit [Ping timeout: 265 seconds]
Qladstone has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
StoneCypherAW has joined #ruby
frobs has joined #ruby
kyb3r_ has quit [Quit: Leaving]
sevvie has joined #ruby
shredding has joined #ruby
<gr33n7007h> aob, statsd = Statsd.new('localhost', 8125) <- does this line work as you intend?
<aob> gr33n7007h: i think so, yes
<gr33n7007h> aob, Statsd::Client.new ?
<gr33n7007h> Statsd is a module ;)
jason^ has joined #ruby
* aob shrugs - it works :)
<gr33n7007h> mmm.. ok
amundj has joined #ruby
piotrj has quit [Remote host closed the connection]
Takle has quit []
StoneCypherAW has quit [Ping timeout: 272 seconds]
<gr33n7007h> aob, what ruby version?
bim has joined #ruby
amundj has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
amundj has joined #ruby
piotrj has joined #ruby
bweston92 has quit [Read error: Connection reset by peer]
<gr33n7007h> aob, are you using ruby 2.1.5?
The_Phoenix has joined #ruby
commmmodo has quit [Quit: commmmodo]
wldcordeiro has quit [Ping timeout: 265 seconds]
Akagi201 has quit [Read error: Connection reset by peer]
<aob> gr33n7007h: 2.0.0
bim has quit [Ping timeout: 264 seconds]
<aob> gr33n7007h: this might be because i am using ruby-dogstatsd
startupality has joined #ruby
<aob> which might be different interface to vanilla statsd
<gr33n7007h> aob, ah, yep problem solved! :)
Asher has joined #ruby
goshdarnyou has quit [Quit: Connection closed for inactivity]
jimms has joined #ruby
frobs has quit [Quit: Konversation terminated!]
frobs has joined #ruby
sobersabre has joined #ruby
<aob> anyway... what's a simple way to daeomonise this so it basically runs continuously but doesn't need me to keep a shell open?
<sobersabre> hi... is there a standard ruby library code dealing with name, version, release stuff? [nvr]
<sobersabre> If there's a gem for it, it is no good for me.
marr has joined #ruby
Zai00 has joined #ruby
<gr33n7007h> aob, prolly Process.daemon
<aob> ok, i'll go and read about that
<aob> thanks gr33n7007h :)
<gr33n7007h> aob, np
arup_r has joined #ruby
ismaelga has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
roshanavand has joined #ruby
abuzze has joined #ruby
Jetchisel has joined #ruby
jimms has quit [Ping timeout: 246 seconds]
krz has joined #ruby
chthon has joined #ruby
Waheedi has quit [Quit: Waheedi]
ismaelga has quit [Ping timeout: 252 seconds]
Takle has joined #ruby
norc has quit [Quit: Page closed]
serivich has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
abuzze_ has joined #ruby
plashchynski has joined #ruby
abuzze_ has quit [Remote host closed the connection]
abuzze has quit [Read error: Connection reset by peer]
abuzze has joined #ruby
<shevy> sobersabre don't think there is
<sobersabre> yep. thanks.
abuzze has quit [Client Quit]
roshanavand has quit [Remote host closed the connection]
Axy has quit [Read error: Connection reset by peer]
<shevy> I only tried to cover a standardized way for versions and program names https://rubygems.org/gems/program_information
<shevy> ProgramInformation::ProgramInformation.new "htop-1.0.2.tar.xz" # => #<ProgramInformation::ProgramInformation:0xb92fb41c @short_name="htop", @real_short_name="htop", @program_version="1.0.2">
<arup_r> >> require 'date'; Date.today.day == Date.today.mday
<eval-in> arup_r => true (https://eval.in/295832)
<arup_r> Well they are alias
<shevy> for programs that are named in a standard way, things are often much easier, a simple split on - should suffice
robustus|Off is now known as robustus
roshanavand has joined #ruby
<shevy> the problem arises when you have non-standard or deviating names:
<shevy> util-linux-ng-2.15
<shevy> mjpegtools-1.6.3-rc3
<shevy> e_dbus-1.7.10.tar.gz
ndrei has joined #ruby
<shevy> boost_1_54_0.tar.bz2
<shevy> and ltos more. I found many examples over the years :)
<shevy> *lots more
FooMunki has joined #ruby
<certainty> you know shevy has much time
<shevy> hey
<certainty> hehe
<shevy> I needed that for compiling things from source
<certainty> just kidding
Mia has joined #ruby
Mia has joined #ruby
<shevy> the above should allow
<shevy> "compile util"
<shevy> "compile boo"
<arup_r> why we have #day and #mday ? Both are similar
<shevy> certainty I have 2655 yaml files!
pandaant has joined #ruby
<arup_r> shevy: Use MongoDB
<arup_r> life will be better soon!
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> dunno
<shevy> I can edit each file
<shevy> it's so simple
jerematic has joined #ruby
Mia has quit [Read error: Connection reset by peer]
funburn has joined #ruby
<arup_r> ok..
startupality has quit [Quit: startupality]
<arup_r> Mongo would allow you to edit their files.. But well organised.. :) shevy
n1x has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
funburn has quit [Client Quit]
ponga has joined #ruby
Guest123 has joined #ruby
<shevy> in a text editor?
jenrzzz has quit [Ping timeout: 264 seconds]
jerematic has quit [Ping timeout: 264 seconds]
godd2 has quit [Ping timeout: 255 seconds]
Hijiri has quit [Ping timeout: 256 seconds]
<certainty> shevy: are you collecting yaml files? what are you? a yaml horder? ;p
<shevy> certainty well, zsh.yml bash.yml ruby.yml and so forth
segmond has quit [Ping timeout: 256 seconds]
<certainty> shevy: why is that?
sevvie has quit [Ping timeout: 272 seconds]
krz has quit [Ping timeout: 245 seconds]
<shevy> a long time ago I even wanted to create a PKGBUILD, a debian archive etc... for all of these
Hirzu has quit [Ping timeout: 252 seconds]
<certainty> what is zsh.yml for for example?
plashchynski has quit [Quit: plashchynski]
<shevy> it should be somewhat similar to the information on http://www.linuxfromscratch.org/blfs/view/svn/basicnet/curl.html
<zotherstupidguy> ]b /exit
<shevy> zsh.yml contains information about zsh and how to install/compile it
krz has joined #ruby
zotherstupidguy has quit [Quit: leaving]
<certainty> shevy: is that for personal use or some kind of product?
Aswebb_ has joined #ruby
davejacobs has joined #ruby
<diegoviola> any ideas how to refactor this spec? https://gist.github.com/797e5c79acdc33f510ad
Hijiri has joined #ruby
<shevy> certainty I use it personally. others can also use it. https://rubygems.org/gems/cookbooks but I broke it a while ago; you notice the large size though, that's because there are so many yaml files hehehe
<shevy> so now I am once again rewriting everything :(
leafybasil has quit [Remote host closed the connection]
amundj has joined #ruby
rekky has joined #ruby
<certainty> shevy: the ultimate goal is to have a ruby package manager?
<plasku> I'm trying to find out how the general structure of a ruby program written without libs is. requires at the top, constants below, where do I throw the defs etc?
<avril14th> diegoviola: what's wrong with it?
<certainty> diegoviola: your code can't breath
<avril14th> ahah
pheona has quit [Quit: WeeChat 1.0.1]
<arup_r> diegoviola: there?
iamdoo2 has joined #ruby
bjornar has quit [Remote host closed the connection]
<arup_r> you can write https://gist.github.com/anonymous/797e5c79acdc33f510ad#file-lessons_spec-rb-L11-L12 as FactoryGirl.create_list(:lesson, 2)
iamdoo2 has quit [Client Quit]
<avril14th> and use a few let
jimms has joined #ruby
davejacobs has quit [Ping timeout: 246 seconds]
<diegoviola> certainty: what do you mean with breath?
<arup_r> yes
<shevy> certainty yeah
<shevy> certainty well actually...
<arup_r> diegoviola: ^^
<diegoviola> ty
* arup_r feel he knows a bit RSpec .. Thanks to avril14th:
<shevy> certainty the goal is to have a set of tools that do everything related to installing/compiling/building. I'd even love to get away with libtool one distant tool; the umbrella project is called rbt "ruby build tools"; cookbooks is the component for all installable programs
rekky has quit [Ping timeout: 250 seconds]
<shevy> get away/do away
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
<certainty> diegoviola: there are not blank lines :) Also for tests it's good to see the different parts of the spec. setup some context, execute something, verify the outcome.
<certainty> shevy: interesting
frobs has quit [Remote host closed the connection]
frobs has joined #ruby
<certainty> diegoviola: also it's common for tests to only have one reason to fail
martinbmadsen has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
sevvie has joined #ruby
<diegoviola> makes sense, thanks
sandelius has joined #ruby
jimms has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
segmond has joined #ruby
JohnBat26 has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
tunaCanBruh has joined #ruby
Qladstone has quit [Remote host closed the connection]
withnale__ has joined #ruby
robustus has joined #ruby
evangeline__ has joined #ruby
aduken has joined #ruby
<certainty> diegoviola: https://gist.github.com/anonymous/0bba2a2cb5af598bbad1 to show some common ideas. I usually have the methods inside a helper module that i include.
segmond has quit [Ping timeout: 265 seconds]
tunaCanBruh has quit [Ping timeout: 264 seconds]
piotrj has quit [Remote host closed the connection]
frobs has quit [Read error: Connection reset by peer]
piotrj has joined #ruby
evangeline__ has quit [Ping timeout: 256 seconds]
frobs has joined #ruby
<arup_r> I have all kind of rubys managed by Rvm.. How can I install a gem to the default gemset of all gems at one shot ?
<arup_r> rvm list is showing at least 8 Ruby version I have
charliesome has joined #ruby
leafybasil has joined #ruby
rrrutr has joined #ruby
<certainty> arup_r: something like for ruby in $(rvm list strings); do rvm "${ruby}@global" do gem install yourgem; done
<certainty> could do
<diegoviola> will factory girl allow me to have a factory called :users and then have many users there (with different names), not just a sequence
codecop has quit [Remote host closed the connection]
frobs has quit [Read error: Connection reset by peer]
<avril14th> diegoviola: cleaner ways to do this
<arup_r> they have certainty: `rvm all do rvm docs generate all` to install the docs for all currently installed Rubies.
<diegoviola> avril14th: ?
<avril14th> diegoviola: like a loop %w(john eddie).each{ |n| create(:user, :name => n }
frobs has joined #ruby
<avril14th> but yes FactoryGirl should allow a plural factory
<arup_r> rvm all do gem install gem_name all
<arup_r> let me try this certainty
<certainty> arup_r: a great. didn't know. doesn't give you a way to set the gemset though, does it?
<arup_r> wait checking
jonr22 has joined #ruby
<wasamasa> rubyists don't hate on factories?
<arup_r> that's the way /... :)
Musashi007 has joined #ruby
<arup_r> some got error.. may be lower ruby versions have some problem
nuy_19031046 has quit [Quit: Leaving]
DaniG2k has joined #ruby
segmond has joined #ruby
hvxgr has quit [Ping timeout: 250 seconds]
marcoamorales has quit [Ping timeout: 252 seconds]
denwo has quit [Remote host closed the connection]
<certainty> arup_r: that gist 404s on me
<arup_r> Ahh... I deleted..
<arup_r> :(
<certainty> :)
<arup_r> I thought you saw
<certainty> well i suppose it's a onliner?
<arup_r> :p
<certainty> oneliner, even
grrrr_ has joined #ruby
<certainty> wasamasa: sometimes they are useful
jonr22 has quit [Ping timeout: 265 seconds]
ismaelga has joined #ruby
sarkis has joined #ruby
hk3380 has quit [Quit: Page closed]
<arup_r> certainty: yes
<arup_r> rvm all do gem install rcodetools
tkuchiki has quit [Ping timeout: 256 seconds]
adriancb has joined #ruby
mkaesz has quit [Ping timeout: 245 seconds]
<certainty> arup_r: ah nice
segmond has quit [Ping timeout: 264 seconds]
ismaelga has quit [Ping timeout: 244 seconds]
n008f4g_ has joined #ruby
sarkis has quit [Ping timeout: 252 seconds]
hvxgr has joined #ruby
Hirzu has joined #ruby
reinaldob has joined #ruby
<arup_r> certainty: got some issue.. :( Let them think. :) https://github.com/wayneeseguin/rvm/issues/3332
blackmesa has joined #ruby
paradoja has joined #ruby
adriancb has quit [Ping timeout: 265 seconds]
diego1 has joined #ruby
Hirzu_ has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
otisZart has joined #ruby
Hirzu has quit [Ping timeout: 256 seconds]
joonty has quit [Quit: joonty]
zorak8 has quit [Ping timeout: 272 seconds]
sevenseacat has joined #ruby
joonty has joined #ruby
segmond has joined #ruby
norc has joined #ruby
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
startupality has joined #ruby
segmond has quit [Ping timeout: 245 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
rodfersou has joined #ruby
rodfersou has quit [Client Quit]
RegulationD has joined #ruby
rodfersou has joined #ruby
troulouliou_div2 has joined #ruby
joonty has quit [Quit: joonty]
Soda has quit [Read error: Connection reset by peer]
<arup_r> Is it "Ask don't tell" or "Tell don't ask" too much confusing..
plashchynski has joined #ruby
RegulationD has quit [Remote host closed the connection]
Regulati_ has joined #ruby
<workmad3> arup_r: tell don't ask
wmoxam has quit [Remote host closed the connection]
<arup_r> ok
Guest123 has joined #ruby
grrrr_ has quit [Remote host closed the connection]
FooMunki has quit [Read error: No route to host]
FooMunki has joined #ruby
rrrutr has quit [Quit: Leaving]
n008f4g_ has quit [Ping timeout: 252 seconds]
Regulati_ has quit [Ping timeout: 264 seconds]
Waheedi has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<arup_r> OOP came into existence as we were unhappy with procedure programming.. Is it true ?
RegulationD has joined #ruby
Qladstone has joined #ruby
gfawcettpq has joined #ruby
<norc> Hi. Im writing a wrapper for some piece of hardware, that can have a number of different "slots" each with "ports". Now my interface requires specific implementations of functions on port level, that depends on what slot it resides in.
<norc> I was thinking about something along these lines with dynamic mixins to make that work: http://pastie.org/private/kcxkd2rznsebajegfjpjg
<norc> Any opinions?
senayar has quit [Remote host closed the connection]
fabrice31_ has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
troulouliou_div2 has quit [Changing host]
troulouliou_div2 has joined #ruby
polysics has quit [Remote host closed the connection]
mkaesz has joined #ruby
paradoja has quit [Ping timeout: 265 seconds]
joonty has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
polysics has joined #ruby
Aswebb_ has quit []
Soda has joined #ruby
wallerdev has quit [Quit: wallerdev]
oo_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 246 seconds]
DerisiveLogic has joined #ruby
Criztian has joined #ruby
fabrice31 has joined #ruby
sandelius has joined #ruby
FooMunki has quit [Quit: FooMunki]
ndrei has joined #ruby
FooMunki_ has joined #ruby
Zai00 has quit [Quit: Zai00]
nfk has joined #ruby
polysics has quit [Remote host closed the connection]
rekky has joined #ruby
DerisiveLogic has quit [Ping timeout: 252 seconds]
ixti has joined #ruby
polysics has joined #ruby
robustus is now known as robustus|Off
mistermocha has joined #ruby
_ixti_ has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 264 seconds]
<workmad3> norc: I tend to be wary of dynamic mixins... they bust method caches and can cause severe slowdowns... so I'd probably go for something more along these lines: https://gist.github.com/workmad3/c6eb029e54edcb867a6e
polysics has quit [Ping timeout: 245 seconds]
wpp has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
diego1 has joined #ruby
diegoviola has quit [Ping timeout: 250 seconds]
thumpba has joined #ruby
<jhass> norc: yeah, flip the inheritance outside in there, extract the common functionality into modules, not the specific one
shredding has quit [Ping timeout: 250 seconds]
rodfersou has quit [Quit: leaving]
joonty has quit [Quit: joonty]
rodfersou has joined #ruby
joonty has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
emocakes has quit [Ping timeout: 256 seconds]
ismaelga has joined #ruby
paradoja has joined #ruby
ndrei has joined #ruby
thumpba has quit [Ping timeout: 244 seconds]
<norc> workmad3: Ok that took me a bit to understand what you are doing there.
doodlehaus has joined #ruby
<certainty> arup_r: yeah that was one reason. (of course whether or not OOP was the correct move has to be judged seperately)
<norc> jhass: Im not sure what you mean by that exactly. Were you referring to my pastie?
<workmad3> norc: it's pretty much what jhass just said, but I went for a superclass rather than common module include approach (as I figured IS_A models the relationship from a general Slot to a TypeA slot accurately)
ldnunes has joined #ruby
jerematic has joined #ruby
<norc> jhass / workmad3: The reason I split the specific functionality into modules is because I wanted to have separate files for each "type"
<jhass> norc: think about classical inheritance, you wouldn't put the more specific code into the parent, likewise don't put the more specific code into the module, put the shared code there
<workmad3> norc: you can still organise the files like that with other approaches (like the one I showed)
<shevy> put it everywhere!
<jhass> neither approach prevents having multiple files
ismaelga has quit [Ping timeout: 272 seconds]
<certainty> time for the lunch walk
<norc> Oh silly me yeah.
jaygen has joined #ruby
<shevy> certainty nono
<shevy> certainty don't do the lunch walk, do the lunch DANCE man
<workmad3> certainty: do a break-dance/parkour fusion dance around the cafeteria!
<workmad3> certainty: also film it, so I can see what break-dance/parkour fusion looks like ;)
<arup_r> certainty: ok
jerematic has quit [Ping timeout: 244 seconds]
<arup_r> workmad3: lol
Waheedi_ has joined #ruby
razieliyo has joined #ruby
IrishGringo has joined #ruby
<norc> workmad3: So basically I would specialize for each slot type this way? http://pastie.org/9998800
Zai00 has joined #ruby
<workmad3> norc: sure, except you'll probably find it neater if you did 'class Slot::TypeA < Slot'
razieliyo has joined #ruby
Waheedi has quit [Ping timeout: 264 seconds]
Waheedi_ is now known as Waheedi
<norc> workmad3: Oh yeah, naturally.
<workmad3> norc: similarly, you can do 'class Slot::TypeA::Port < ::Port' if you wanted your slots and ports in separate files too
davejacobs has joined #ruby
<workmad3> norc: but yeah, the point is that it makes more sense usually to create concrete instances of specialisations, rather than create a concrete instance of some generic thing and then try to specialise it dynamically
<workmad3> norc: easier to reason about, easier to visualise, easier to work with and debug, etc.
<jhass> norc: I'd choose a module to include over parent class because it makes no sense to have an instance of Slot itself as far as I understood. In places where you use an abstract base class in other languages I tend to use a module in Ruby
ndrei has quit [Ping timeout: 250 seconds]
Criztian has quit []
<norc> jhass: Personally I wouldnt really know how to do the same thing with module. I mean the superclass approach workmad3 has shown me seems fairly straight forward and what he explained makes sense to me.
zorak8 has joined #ruby
<jhass> norc: it's simple, instead of class Slot; def common_code; end; end; class SlotA < Slot; end; you do module Slot; def common_code; end; end; class SlotA; include Slot; end;
<jhass> the only difference is that you can no longer make an instance of Slot
davejacobs has quit [Ping timeout: 244 seconds]
shum has joined #ruby
<norc> jhass: Mhm, it would also remove the "Slot::" namespace from SlotA, which is handy I suppose.
<jhass> norc: no, you could just keep it
<jhass> after all Class is a specialization of Module
<jhass> a Class does pretty much everything a Module, it just specializes it to have a new functionality (making instances) you don't need from Slot in this case
<norc> jhass: That is interesting. So essentially Id just be changing the Slot from class to module, and include it rather than inherit. The entire rest actually stays?
<jhass> yeah
<jhass> >> Class.superclass
<eval-in> jhass => Module (https://eval.in/295880)
<shevy> >> Module.superclass
<eval-in> shevy => Object (https://eval.in/295881)
<norc> jhass: Doesnt that mean that there is no big difference between inheritance and include?
<norc> if any
<workmad3> norc: you can only inherit from a class, you can only include modules, and you can only inherit from one class while you can include multiple modules
joonty has quit [Quit: joonty]
<jhass> what he said
<norc> workmad3: Sure, I just meant functionality wise.
<workmad3> norc: however, the way that mixins work is effectively the same as inheritance (inserts into ancestors chain), but the mechanism prevents 'diamond of death' scenarios because there's always a deterministic linear ordering to the ancestors
Tomtom22 has joined #ruby
zacstewart has joined #ruby
Zackio has quit [Remote host closed the connection]
Zackio has joined #ruby
amundj has quit [Ping timeout: 244 seconds]
tunaCanBruh has joined #ruby
<workmad3> norc: there's also the difference that if you inherit from a class, all the superclass's class methods are accessible as class methods on the subclass, but if you include a module, you don't gain access to the module methods as class methods
Tomtom22 has quit [Remote host closed the connection]
pwnz0r has joined #ruby
<workmad3> norc: or, in code, 'class Foo; def self.hi; end; end; class Bar < Foo; end #Bar.hi works' while 'module Foo; def self.hi; end; end; class Bar; include Foo; end; #Bar.hi doesn't work'
Hackn9 has joined #ruby
<norc> workmad3: Isnt that actually a reason I cant actually switch the class for a module in your example, since there is a class method (self.create) ?
<norc> (Well, I meant just blindly turn it into a module and include rather than inherit)
amundj has joined #ruby
<jhass> just for completeness, the class methods are inherited because class Foo < Bar; end; makes Foos singleton class inherit Bars singleton class
hichtech has joined #ruby
ndrei has joined #ruby
<workmad3> norc: no, that works fine still in this instance, because you're calling Slot.create directly, you're not trying to call it on a subclass of Slot
joonty has joined #ruby
<norc> workmad3: Okay yeah I really need to lose the concept of dynamic dispatch through vpointers in my mind.
segmond has joined #ruby
<workmad3> norc: basically, Slot.create is a factory method that gives you back a slot object based on the specification you passed in
tunaCanBruh has quit [Ping timeout: 245 seconds]
segmond has quit [Max SendQ exceeded]
grrrr_ has joined #ruby
pwnz0r has quit [Ping timeout: 256 seconds]
adac has joined #ruby
<workmad3> norc: and the factory method doesn't really care where it's located (unlike the current implementation of create_port, which depends on self.class::Port existing)
blackmesa has quit [Ping timeout: 245 seconds]
<adac> Time.now gives me for example: "2015-03-04 13:09:11 +0100" is there a way to drop the +0100 information on Time.now?
<jhass> adac: .utc
B1n4r10 has joined #ruby
Takle has quit [Remote host closed the connection]
joset has quit [Remote host closed the connection]
robustus|Off is now known as robustus
postmodern has quit [Quit: Leaving]
claptor has quit [Quit: this channel is bakas]
<certainty> workmad3: i tried todo that dance. all that happend was me walking in circles for 20 minutes
<certainty> i almost puked
oki has quit [Ping timeout: 246 seconds]
<workmad3> certainty: did you at least do a suicide drop at the end?
rekky has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
lanemeyer has quit [Ping timeout: 244 seconds]
piotrj has joined #ruby
<certainty> workmad3: i considered commiting suicide when i thought i couldn't stop you mean that
<arup_r> rand(10) will give me one random number.. what if I need say N ramdom numbers ? What's the way ?
<shevy> arup_r call it!
<arup_r> >> rand(10)
<eval-in> arup_r => 8 (https://eval.in/295886)
<arup_r> only one
<arup_r> call it N times.. :)
<shevy> because you call it once!
jonr22 has joined #ruby
<arup_r> Any other way ?
<jhass> >> rand(10).to_s(2).chars
<eval-in> jhass => ["1", "1"] (https://eval.in/295887)
<jhass> there, two!
<jhass> >> rand(10).to_s(2).chars
<eval-in> jhass => ["1", "0", "1"] (https://eval.in/295888)
<certainty> hah
<adac> hmm lets ask differently: how can I convert a string ie: "2015-03-04 12:50:00" to a datetimeobject with the correct timezone information (in my case +0100)
<jhass> now even three!
hanmac1 has joined #ruby
<arup_r> jhass: I am looking for a Array#sample(n) kind of thingy
<jhass> adac: strptime should use local timezone when none specified
<arup_r> But not having an array
rekky has joined #ruby
<jhass> arup_r: just make one
<arup_r> Array ?
<jhass> Array.new(N) { rand(10) }
<arup_r> Wow...
<arup_r> thanks
<arup_r> I knew you guys can do it
<certainty> the royal you :)
blackmesa has joined #ruby
<arup_r> certainty: who ?
<certainty> jhass:
<certainty> without the :
* jhass feels naked without the :
jonr22 has quit [Ping timeout: 265 seconds]
<arup_r> hehehe
sarkis has joined #ruby
neanderslob has quit [Remote host closed the connection]
tmi_ has joined #ruby
tkuchiki has joined #ruby
Mon_Ouie has joined #ruby
segmond has joined #ruby
Phage has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Phage> I'm trying to create a tool to open a site with my PHPSESSIONID and grab a string which is displayed on the site.
<Phage> But I'm just so confused on Mechanize.
<Phage> Any tips?
rekky has quit []
<Phage> I have written the code in Python, but I'm in the process of moving to Ruby.
<adac> jhass, I tried: Date.strptime "2015-03-04 12:50:00", '%Y-%m-%d %H:%M:%S %Z' but that gives me "invalid date"
arup_r has quit [Remote host closed the connection]
<certainty> there is no timezone in that string that could be parsed
pontiki has joined #ruby
<jhass> adac: yap, you don't have a zone so don't specify %Z
sarkis has quit [Ping timeout: 265 seconds]
it0a has quit [Ping timeout: 246 seconds]
<adac> jhass, that results in: Date.strptime "2015-03-04 12:50:00".to_s, '%Y-%m-%d %H:%M:%S'
<adac> => Wed, 04 Mar 2015
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adac> shouldn't there be the output in the format i suggested?
<jhass> you wanted a DateTime, so call it on DateTime
<adac> jhass, ah right! Thanks!
gccostabr has joined #ruby
pwh has joined #ruby
<jhass> adac: also the to_s seems unnecessary in your example
ghostpl_ has quit [Remote host closed the connection]
grrrr_ has quit [Remote host closed the connection]
<adac> jhass, yeah it comes froma previous attempt :)
<jhass> what's your goal btw?
<jhass> where does that date come from?
<adac> jhass, the date comes form an input of a rake task
arup_r has joined #ruby
<jhass> ah, k
<adac> th reake task then should select a range in the database like:
<adac> *the rake
<adac> MODEL.where(created_at: DateTime.parse(from)..Time.now).all.each
<adac> ant Time.now is +0100 whereas from is +0000
mkaesz has quit [Ping timeout: 240 seconds]
<jhass> well, that shouldn't be a problem
<jhass> for comparing them that is
<adac> jass the db query then looks something like this:
<jhass> it's only a problem when your date is actually in +1 and doesn't specify its timezone
<adac> WHERE ("MODEL"."created_at" BETWEEN '2015-03-04 12:50:00.000000' AND '2015-03-04 12:33:38.824025')
spider-mario has joined #ruby
ghostpl_ has joined #ruby
<jhass> mh
<adac> jhass, so "from" has to be +0100, the same as Time.now
joonty has quit [Quit: joonty]
<adac> then it will work :)
Hackn9 has quit [Read error: Connection reset by peer]
<jhass> yeah, I expected AR to be smarter than that I guess
<adac> jhass, DateTime.strptime "2015-03-04 12:50:00", '%Y-%m-%d %H:%M:%S'
<adac> => Wed, 04 Mar 2015 12:50:00 +0000
serivich has quit [Ping timeout: 255 seconds]
ismaelga has joined #ruby
<jhass> which timezone are dates in your DB actually?
serivich has joined #ruby
<workmad3> jhass: rails converts datetimes to UTC and stores them without TZ info in the database (annoyingly)
<jhass> adac: ^ keep the parsing like you have it and call Time.now.utc
<adac> jhass, the db is UTC
<jhass> oh, nvm
<jhass> skipped breakfast I guess :P
segmond has quit [Ping timeout: 264 seconds]
<workmad3> adac: with the query you showed then AR will ensure times are in UTC before creating the SQL query
sivsushruth has joined #ruby
joonty has joined #ruby
ms7 has joined #ruby
DouweM has joined #ruby
<workmad3> adac: so if that's coming out incorrectly, that would imply (to me) that your from date isn't in UTC already, so by treating it as such you're losing important info
<avril14th> There's something I don't get. On a MatchData, how can offset(i) not be equal to the length of match's i-th group?
zorak8 has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
<adac> workmad3, jhass using Time.now.utc saves the problem
Pumukel has joined #ruby
<adac> *solves the problem
<adac> ain't savving nothing actually :)
qis has joined #ruby
<ms7> Can anyone help me figure out why I can’t find a link with a specific href using capybara? Here’s a paste of the test, html snippet and the error message: http://pastebin.com/NL8Cd42g
<adac> MODEL.where(created_at: DateTime.parse(from)..Time.now.utc).all.each
ismaelga has quit [Ping timeout: 265 seconds]
<jhass> avril14th: why would it?
<jhass> >> "Foo Bar".match(/B(ar)/).offset(1)
<eval-in> jhass => [5, 7] (https://eval.in/295904)
bruno- has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<avril14th> I don't get, these are supposed to be the starting and ending positions
<adac> jhass, nope t does not solve the problem. I was looking at the wrong output. I need to bring the "from" time string to utc+1
<avril14th> so end - start should equal length
<jhass> ms7: how did you verify the HTML is there?
skmp has quit [Quit: Connection closed for inactivity]
<ms7> jhass: ah, I have to provide that html with a fixture of some sort?
<adac> jhass, If I don't want to give an utc input of course
senayar has quit [Ping timeout: 246 seconds]
<jhass> adac: yeah, I'm not too firm with AS added Time/DateTime stuff, so I'd just go for adding %Z and appending +0100 to the input (Or Time.now.zone)
anaeem1__ has joined #ruby
ponga has quit [Quit: Leaving...]
<ms7> jhass: if that’s the case, it’s odd because when I remove the href option from the click_link method, the test passes with has_content? ‘Parking’
hirogen has joined #ruby
cpt_yossarian has quit [Quit: And then he took off.]
<hirogen> hi
senayar has joined #ruby
<hirogen> have a chap whos trying to import data from ruby, its some standalone application inhouse btut based on ruby, hes importing into powerpoint
<hirogen> and he gets the followin gerror
<avril14th> jhass: what does offset second value represent if not a position?
wpp has quit []
<hirogen> runtime error 429 activex activex component cant create object
<jhass> ms7: then p find_link("Show")["href"] should be interesting
<hirogen> im jsut the local tech support guy but this is rather urgent for the suer
<jhass> avril14th: and it does in my example, got a counter one?
<hirogen> the addin for powerpoint has buttons called pullnewdatadeslected
<avril14th> yes, let me make a gist
<hirogen> thats when the error occurs
anaeem1 has quit [Ping timeout: 264 seconds]
davedev24_ has quit [Remote host closed the connection]
anaeem1__ has quit [Ping timeout: 240 seconds]
joonty has quit [Quit: joonty]
* wasamasa feels like he's watching CSI
<ms7> jhass: what’s this p before find_link you added?
<certainty> wasamasa: want some popcorn?
<jhass> ms7: like puts just calling inspect instead
<ms7> ah, got it
grrrr_ has joined #ruby
<jhass> ms7: and returned the passed object, which makes it easy to quickly insert anywhere for debugging ;)
<ms7> (y)
<wasamasa> certainty: yeah, everyone else around me is already eating
<ms7> ah, that doesn’t work here..
<ms7> jhass: returns an ambiguous match, foud 6 elements matching, so it finds the hrefs it seems
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amundj has joined #ruby
StoneCypherAW has joined #ruby
* certainty hands some popcorn over to wasamasa
segmond has joined #ruby
zorak8 has joined #ruby
sambao21 has joined #ruby
mostlybadfly has joined #ruby
hmnhf has quit [Ping timeout: 246 seconds]
rodfersou has quit [Remote host closed the connection]
rodfersou has joined #ruby
Takle has joined #ruby
bweston92 has joined #ruby
<jhass> ms7: mmh, I forgot how to let it return all of them, might peek at all("//a[text()='Show']").map {|a| a["href"] } instead
<ms7> jhass: and if I wanted only to return the specific href=“/parkings/1”?
<avril14th> jhass: guess what, my mistake. :) Don't know where yet, but my mistake
<jhass> ms7: we're trying to verify your assumption that its indeed there ;)
<ms7> I tried p find_link 'Show'['href'], :href => '/parkings/1' but that doesn’t seem to work
<jhass> avril14th: you're welcome ,)
<ms7> jhass: let me try that
serivichi has joined #ruby
<adac> jhass, Played around with Time.now.zone which seems to corerctly detect the timezone, but does not deliver the offset (i.e +0100)
<ms7> jhass: sorry I’m still a beginner with Ruby, that code snippet that beings with ‘all(“…”)’, goes after p find_link?
RegulationD has joined #ruby
<ms7> begins*
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
StoneCypherAW has quit [Ping timeout: 246 seconds]
rodfersou has quit [Client Quit]
serivich has quit [Ping timeout: 244 seconds]
bim has joined #ruby
rodfersou has joined #ruby
Takle_ has joined #ruby
<jhass> adac: oh, thought %Z would parse the aliases too, my bad. Might need to go through a strftime shenigan then
qiffp has joined #ruby
<jhass> ms7: nope, no find_link anymore, just p all...
<adac> jhass, thanks for the hint! will try that out!
yfeldblum has quit [Ping timeout: 265 seconds]
agarie has joined #ruby
<workmad3> jhass: heh, you thought that something reasonable would work with timezones?
piotrj has quit [Remote host closed the connection]
<jhass> workmad3: yeah, as said, my bad
SouL has joined #ruby
<ms7> jhass: passes, returns [“/parkings/863785536”] :/ I guess this is just a test link?
<Qladstone> <3
piotrj has joined #ruby
<ms7> which brings me to believe I need to make use of fixtures :)
<jhass> >> Time.now.strftime("%z") # adac
<eval-in> jhass => "+0000" (https://eval.in/295908)
Takle has quit [Ping timeout: 244 seconds]
Regulati_ has joined #ruby
<jhass> ms7: that gets into the specifics of your application and tests of which you told us nothing so far ;)
RegulationD has quit [Remote host closed the connection]
Qladstone has quit [Remote host closed the connection]
tvw has joined #ruby
<jhass> ms7: but I guess you need to pick the ID from the object you create in your tests setup
bim has quit [Ping timeout: 256 seconds]
nixmaniack has quit [Remote host closed the connection]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n80 has joined #ruby
<ms7> jhass: now to find where that is :) I think I made some progress, thank you jhass
mikecmpbll has quit [Read error: Connection reset by peer]
phale has joined #ruby
<phale> i need to learn ruby quickly
<phale> very quickly i have to go to work soon
polysics has joined #ruby
<jhass> then don't wast time here
Feyn has quit [Quit: Leaving]
<phale> okay
otisZart has joined #ruby
<phale> but i need a good book
robustus is now known as robustus|Off
<phale> that explains the language greatly
<phale> should also have exercises
ghostpl_ has quit [Remote host closed the connection]
<ms7> eloquent ruby?
<phale> ms7: it has exercises?
<ms7> phale: no idea, but I’ve heard it compares to eloquent javascript, which has plenty of exercises
Regulati_ has quit [Ping timeout: 255 seconds]
DouweM has quit [Quit: Leaving...]
<phale> okay thanks
<ms7> np
ndrei has quit [Ping timeout: 252 seconds]
zorak8 has quit [Ping timeout: 245 seconds]
n1x has joined #ruby
amundj has joined #ruby
sevvie has quit [Ping timeout: 264 seconds]
grn has joined #ruby
a5i has joined #ruby
RegulationD has joined #ruby
mikecmpbll has joined #ruby
jtdowney has joined #ruby
vt102 has joined #ruby
sevvie has joined #ruby
phale has quit [Quit: leaving]
spyderman4g63 has joined #ruby
detail_pratique has joined #ruby
<grn> Hi! I'm iterating like https://gist.github.com/grn/9307b70899bd06e807fb. However the assignment on line 4 creates a new local variable instead of setting the one introduced on line 1. How to fix this?
spyderma_ has joined #ruby
ghostpl_ has joined #ruby
<jhass> grn: You know about Enumerable#find ?
jerematic has joined #ruby
tus has joined #ruby
oki has joined #ruby
n1x has quit [Remote host closed the connection]
<grn> jhass: it's more complicated than that. I need to reuse this value in the iteration.
qis has left #ruby [#ruby]
<jhass> >> a = nil; [1,2,3].each do |n| a = n; end; a
<eval-in> jhass => 3 (https://eval.in/295918)
<jhass> maybe show your real code
<jhass> as ^ your example does not reproduce
<IceDragon> grn: Your code should work correctly
RegulationD has quit [Ping timeout: 255 seconds]
razieliyo has quit [Remote host closed the connection]
mikecmpb_ has joined #ruby
spyderman4g63 has quit [Ping timeout: 272 seconds]
rhllor has joined #ruby
<shevy> general question
nettoweb has joined #ruby
polysics has quit [Read error: Connection reset by peer]
<shevy> nah
kp666 has joined #ruby
<shevy> it was too easy
mikecmpbll has quit [Ping timeout: 246 seconds]
Qladstone has joined #ruby
dumdedum has quit [Quit: foo]
jerematic has quit [Ping timeout: 244 seconds]
lxsameer has quit [Remote host closed the connection]
<shevy> will mruby replace ruby?
<jhass> no
zyxelthrone has joined #ruby
mistermocha has joined #ruby
qiffp has quit [Ping timeout: 264 seconds]
oki has quit [Ping timeout: 256 seconds]
terlar has quit [Ping timeout: 252 seconds]
d10n-work has joined #ruby
<alex88> hi guys
<alex88> wops :) wrong chan
shum has quit [Quit: WeeChat 1.1.1]
bradleyp_ has joined #ruby
joonty has joined #ruby
hgl has quit [Max SendQ exceeded]
DouweM has joined #ruby
lanemeyer has joined #ruby
bradleyprice has quit [Ping timeout: 250 seconds]
hgl has joined #ruby
grn has quit []
thumpba has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
dtordable has joined #ruby
n80 has quit [Quit: n80]
zorak8 has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
<dtordable> hello?
Jetchisel has joined #ruby
<jhass> hi
jerematic has joined #ruby
ms7 has left #ruby [#ruby]
dtordable has quit [Remote host closed the connection]
dtordable has joined #ruby
thumpba has quit [Ping timeout: 252 seconds]
grrrr_ has quit [Remote host closed the connection]
dtordable has quit [Changing host]
dtordable has joined #ruby
DouweM has quit [Quit: Leaving...]
x77686d has joined #ruby
topolinux has joined #ruby
paulfm has joined #ruby
rhllor has quit [Quit: rhllor]
kobain has joined #ruby
DouweM has joined #ruby
Megtastique has joined #ruby
pullphinger has quit []
zorak8 has quit [Ping timeout: 246 seconds]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
piotrj has quit [Read error: Connection reset by peer]
aganov has quit [Ping timeout: 264 seconds]
piotrj has joined #ruby
segmond has quit [Ping timeout: 264 seconds]
sanguisdex has left #ruby [#ruby]
razieliyo has joined #ruby
razieliyo has quit [Changing host]
razieliyo has joined #ruby
oki has joined #ruby
codecop has joined #ruby
arup_r has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
Aryasam has joined #ruby
anaeem1_ has joined #ruby
ismaelga has joined #ruby
dereck has joined #ruby
dereck is now known as jefus_
jefus has quit [Ping timeout: 246 seconds]
jefus_ is now known as jefus
triple_b has joined #ruby
sgambino has joined #ruby
max96at|off is now known as max96at
sevvie has quit [Ping timeout: 245 seconds]
x77686d has quit [Read error: Connection reset by peer]
ismaelga has quit [Ping timeout: 250 seconds]
triple_b_ has joined #ruby
x77686d has joined #ruby
ponga has joined #ruby
<shevy> jhass why not!
senayar has quit [Remote host closed the connection]
<ponga> why what
<jhass> shevy: why would it
<shevy> because it is faster
senayar has joined #ruby
<jhass> is it?
zorak8 has joined #ruby
aduken has quit [Quit: Page closed]
<jhass> can I run rails with it?
<jhass> is my rails faster if I do so?
<shevy> as soon as gems will be integrated
triple_b has quit [Ping timeout: 264 seconds]
sankaber has joined #ruby
sankaber has quit [Client Quit]
<Qladstone> shevy asked if mruby would replace ruby
segmond has joined #ruby
User458764 has joined #ruby
<shevy> channel echo :)
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
simone__ has joined #ruby
serivichi has quit [Ping timeout: 255 seconds]
startupality has quit [Quit: startupality]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
startupality has joined #ruby
ghostpl_ has quit [Read error: Connection reset by peer]
startupality has quit [Client Quit]
systemd0wn_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ghostpl_ has joined #ruby
sevvie has joined #ruby
systemd0wn has joined #ruby
ych4k3r has joined #ruby
kupusc is now known as chemiazpolski
delianides has joined #ruby
tunaCanBruh has joined #ruby
kp666 has quit [Quit: Leaving]
zorak8 has quit [Ping timeout: 245 seconds]
tagrudev has quit [Ping timeout: 246 seconds]
sevvie has quit [Ping timeout: 272 seconds]
anaeem1_ has quit [Remote host closed the connection]
delianides has quit [Remote host closed the connection]
terlar has joined #ruby
delianides has joined #ruby
joonty has joined #ruby
mkaesz has joined #ruby
sevvie has joined #ruby
anaeem1 has joined #ruby
tunaCanBruh has quit [Ping timeout: 265 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
Takle_ has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 256 seconds]
polysics has joined #ruby
Takle_ has joined #ruby
DaniG2k has quit [Ping timeout: 245 seconds]
withnale has quit [Ping timeout: 246 seconds]
withnale_ has quit [Ping timeout: 245 seconds]
withnale_ has joined #ruby
Qladstone has quit [Remote host closed the connection]
withnale has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
brb3 has joined #ruby
JDiPierro has joined #ruby
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Deele has joined #ruby
charliesome has quit [Quit: zzz]
sambao21 has joined #ruby
phutchins has joined #ruby
elfuego has joined #ruby
tagrudev has joined #ruby
jonr22 has joined #ruby
mbeasley has joined #ruby
Shazaum has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
n008f4g_ has joined #ruby
zacstewart has quit [Remote host closed the connection]
urbanmonk has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 246 seconds]
sarkis has joined #ruby
jlebrech has joined #ruby
toretore has joined #ruby
skj3gg has joined #ruby
mikecmpb_ is now known as mikecmpbll
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
serivichi has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
anaeem1 has quit [Ping timeout: 245 seconds]
tagrudev has quit [Ping timeout: 252 seconds]
byprdct has joined #ruby
<hirogen> ave a chap whos trying to import data from ruby, its some standalone application inhouse btut based on ruby, hes importing into powerpoint
HOrangeJewce has joined #ruby
<hirogen> runtime error 429 activex activex component cant create object
simone__ has quit [Ping timeout: 246 seconds]
tagrudev has joined #ruby
<hirogen> the addin for powerpoint has buttons called pullnewdatadeslected
grrrr_ has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
amundj has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
Parker0 has joined #ruby
Parker0 has quit [Client Quit]
adriancb_ has joined #ruby
mistermocha has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
doodlehaus has joined #ruby
ismaelga has joined #ruby
Deele has joined #ruby
bim has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
RegulationD has joined #ruby
Aryasam has quit [Ping timeout: 250 seconds]
iamjarvo has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
foureight84 has joined #ruby
coderhs has joined #ruby
Channel6 has joined #ruby
robustus|Off is now known as robustus
danman has joined #ruby
vasilakisfil_ has joined #ruby
iamjarvo has quit [Client Quit]
foureight84 has quit [Client Quit]
<vasilakisfil_> could you please help me understand this part of code? http://pastie.org/9999050 in the helpers do ... end section
Pumukel has quit [Ping timeout: 265 seconds]
<vasilakisfil_> from what I understand helpers is a class method that accepts a block
<vasilakisfil_> inside the helpers do ... end self refers to the Core class.. right ?
RegulationD has quit [Ping timeout: 250 seconds]
<vasilakisfil_> also, methods defined inside the helpers do...end are not visible outside the block
<vasilakisfil_> what I really want is to define such methods (inside helperd do...end) dynamically..
<vasilakisfil_> does anyone know how can I achieve that ?
ta has quit [Remote host closed the connection]
tjohnson has joined #ruby
mitchellhenke has joined #ruby
<vasilakisfil_> I know that to define dynamically a method you can send the method name in the define_method method using send().. but inside the helpers which is the object to send the send() method ?
tkuchiki has quit [Remote host closed the connection]
<shevy> that code looks super complicated
tkuchiki has joined #ruby
<vasilakisfil_> it's a middleman extension..
<shevy> helpers() seems to be a method on class Core
<vasilakisfil_> nd I want to define some helpers (methods available in middleman templates).. but I want the methods to have a name based on the name of the files under data/
<vasilakisfil_> yes that's what I think too
marx has quit [Ping timeout: 244 seconds]
<vasilakisfil_> shevy the problem is more general.. let's say that you have a block like helpers there.. in which you want to define some methods using metaprogramming. I don't know how to do that..
urbanmonk has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
devdazed has joined #ruby
enebo has joined #ruby
rikai has quit [Ping timeout: 252 seconds]
<shevy> you can do everything
<shevy> class_eval and instance_eval
urbanmonk has joined #ruby
<shevy> define_method is available too, method_missing and send
<shevy> you essentially have all the hooks ready
<vasilakisfil_> ok.. and these methods will be available only under helpers ?
sambao21 has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> what kind of question is that!
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<shevy> it depends on the code you write there
<vasilakisfil_> ok let me rephrase..when you call for instance define_method inside helpers, in which object is it sent to ?
TheNumb is now known as OpenRC
tkuchiki has quit [Ping timeout: 265 seconds]
<shevy> where is the code of helpers()
<jhass> vasilakisfil_: we shall take a look at what helpers does ;)
<vasilakisfil_> aha so it depends to what helpers does? ok I didn't know that..
<shevy> vasilakisfil_ there are only two possibilities by the way - either the class-level instance, or for your specific object
charliesome has joined #ruby
<shevy> or you define it on some other object of course
<shevy> mod = Module.new; mod.module_eval(&block)
sevvie has quit [Ping timeout: 246 seconds]
<jhass> vasilakisfil_: as you can see it creates a new anonymous Module, runs the block inside its context and then stores it in some array or so
<shevy> cool
<shevy> I never saw module_eval before
<jhass> vasilakisfil_: module_eval should change both, self and the definee iirc
<jhass> so no matter what you do there, def, define_method, it'll end up in the anonymous module
<vasilakisfil_> aha ok.. look pretty advanced
<vasilakisfil_> thanks!
sobersabre has left #ruby ["Konversation terminated!"]
OpenRC is now known as TheNumb
wasamasa is now known as vms
anaeem1_ has joined #ruby
ta has joined #ruby
xcesariox has joined #ruby
blackmesa has joined #ruby
serivichi has quit [Ping timeout: 244 seconds]
DaniG2k has joined #ruby
freerobby has joined #ruby
RegulationD has joined #ruby
malkomal_ has joined #ruby
malkomal_ has quit [Remote host closed the connection]
serivichi has joined #ruby
sevvie has joined #ruby
urbanmonk has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
tkuchiki has joined #ruby
FooMunki_ has quit [Quit: FooMunki_]
ndrei has joined #ruby
malkomal_ has joined #ruby
decoponio has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheNumb is now known as GRUB2
GRUB2 is now known as TheNumb
selu has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
lys has joined #ruby
grrrr_ has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
millerti has joined #ruby
User458764 has joined #ruby
DerisiveLogic has joined #ruby
B1n4r10 has joined #ruby
gluten_hell has quit [Quit: Lingo - http://www.lingoirc.com]
freerobby has quit [Quit: Leaving.]
meschi has joined #ruby
werelivinginthef has joined #ruby
sambao21 has joined #ruby
freerobby has joined #ruby
zacstewart has joined #ruby
charliesome has quit [Quit: zzz]
Channel6 has quit [Quit: Leaving]
coderhs has quit [Ping timeout: 256 seconds]
jshultz has joined #ruby
Adran has quit [Quit: Este é o fim.]
serivichi has quit [Ping timeout: 244 seconds]
razieliyo has quit [Remote host closed the connection]
razieliyo has joined #ruby
razieliyo has quit [Changing host]
razieliyo has joined #ruby
thumpba has joined #ruby
jaequery has joined #ruby
mitchellhenke has joined #ruby
Adran has joined #ruby
zacstewart has quit [Remote host closed the connection]
nicolastarzia has joined #ruby
fryguy9 has joined #ruby
razieliyo has quit [Remote host closed the connection]
chemiazpolski has quit [Read error: Connection reset by peer]
razieliyo has joined #ruby
razieliyo has quit [Changing host]
razieliyo has joined #ruby
thumpba has quit [Ping timeout: 272 seconds]
jottr_ has joined #ruby
phoo1234567 has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
zacstewart has joined #ruby
phoo1234567 has joined #ruby
kblake has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
yosafbridge has quit [Ping timeout: 245 seconds]
tunaCanBruh has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DEA7TH has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ponga has quit [Quit: Leaving...]
sevenseacat has quit [Remote host closed the connection]
Pumukel has joined #ruby
FooMunki_ has joined #ruby
hs366 has quit [Quit: Leaving]
ponga has joined #ruby
ponga has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
arup_r has joined #ruby
anaeem1 has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
startupality has joined #ruby
SouL has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
iamjarvo has joined #ruby
rbennacer has quit [Remote host closed the connection]
malkomal_ has quit []
anaeem1 has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
anaeem1 has joined #ruby
einarj has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wmoxam has joined #ruby
fabrice31 has quit [Read error: No route to host]
fabrice31_ has joined #ruby
yosafbridge has joined #ruby
AlexRussia has quit [Ping timeout: 255 seconds]
tagrudev has quit [Remote host closed the connection]
rbennacer has joined #ruby
davejacobs has joined #ruby
gfawcettpq has quit [Ping timeout: 244 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
livingstn has joined #ruby
crueber has joined #ruby
Takle_ has quit [Remote host closed the connection]
DouweM has quit [Quit: Leaving...]
sambao21 has joined #ruby
aganov has joined #ruby
DouweM has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
dmolina has joined #ruby
vms is now known as {{{
mune has joined #ruby
{{{ is now known as }}}
}}} is now known as wasamasa
sevvie has quit [Ping timeout: 255 seconds]
davejacobs has quit [Ping timeout: 256 seconds]
mune has left #ruby [#ruby]
andikr has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
adriancb_ is now known as adriancb
phale has joined #ruby
<phale> difference between s += "other string" and s << "other string"
ferr has joined #ruby
havenwood has joined #ruby
norc has quit [Ping timeout: 246 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
<hoelzro> phale: += will create a new string, but << will modify the string in place
aganov has quit [Quit: Leaving]
<phale> hoelzro: += will create a new string called s, overriding the original s?
<hoelzro> >> def plus(s) s += 'bar' end ; def lt(s) s << 'bar' end ; s1 = 'foo' ; s2 = 'foo' ; plus(s1) ; lt(s2) ; puts(s1) ; puts(s2)
<eval-in> hoelzro => foo ... (https://eval.in/295972)
<hoelzro> phale: check out that paste
<phale> ok
sean_s has left #ruby [#ruby]
mkaesz has quit [Remote host closed the connection]
<hoelzro> += is just sugar for s = s + 'other string'
sevvie has joined #ruby
<phale> i see
paulfm has quit [Quit: Zzzzz...]
<phale> but when I did it in irb it wasn't just foo
<phale> i was foobar
<phale> it*
mkaesz has joined #ruby
<hoelzro> right
jobewan has joined #ruby
<hoelzro> because now s is pointing at a new string
<hoelzro> in my example above, s is a variable in a method
<hoelzro> so I modify what that points to, rather than the underlying string in memory
brb3 has quit [Quit: ZZZzzz…]
<phale> ohh
<phale> okay thanks
<hoelzro> np!
<hanmac1> hoelzro: its funny to use << when the string before is below 23 chars, but then gets bigger *g
<hoelzro> I remember reading something about 23 being a magic number on MRI, but I don't recall why
boshhead has joined #ruby
<hanmac1> hoelzro: below ruby does store the string embedded
IrishGringo has joined #ruby
<phale> wait
hanmac1 has quit [Quit: Leaving.]
<phale> ruby has pointers :O
<hoelzro> phale: I prefer to think of them as references
troulouliou_div2 has quit [Quit: Leaving]
<hoelzro> but most languages these days do
<phale> okay
<phale> is it bad if im using 1.9.3?
<jhass> phale: ruby is entirely pass by reference
<jhass> yes
<jhass> it's EOL
bluOxigen has joined #ruby
mkaesz has quit [Ping timeout: 250 seconds]
<phale> ok
SixiS has quit [Ping timeout: 252 seconds]
<phale> is it also a known fact that i have to use 2 spaces for identation
<phale> i read that in a book
ponga has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
ych4k3r has joined #ruby
tvon has quit [Quit: Lost terminal]
juanpablo_ has joined #ruby
agarie has quit [Remote host closed the connection]
sinkensabe has joined #ruby
Takle has joined #ruby
shaman42 has quit [Ping timeout: 265 seconds]
jamo_ has quit [Ping timeout: 265 seconds]
DeanH has joined #ruby
<jhass> the interpreter doesn't care
<jhass> but the people around you will look angry at you if you don't :P
gfawcettpq has joined #ruby
willharrison has joined #ruby
<phale> ;(
pontiki has quit [Ping timeout: 252 seconds]
centrx has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
dblessing has joined #ruby
senayar has joined #ruby
Ankhers has joined #ruby
Hirzu_ has quit [Ping timeout: 255 seconds]
SixiS has joined #ruby
shaman42 has joined #ruby
anaeem1 has quit [Ping timeout: 264 seconds]
qiffp has joined #ruby
<a5i> I wont look angry :)
jonr22 has joined #ruby
paulfm has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> I will look twice as angry to accommodate that
brb3 has joined #ruby
rippa has joined #ruby
thumpba has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
bal has quit [Quit: bal]
jonr22 has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
DouweM has quit [Quit: Leaving...]
sarkis has joined #ruby
Mives has joined #ruby
sambao21 has joined #ruby
jamo_ has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
anaeem1_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 256 seconds]
GnuYawk has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
sinkensabe has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
segmond has quit [Ping timeout: 240 seconds]
anaeem1 has joined #ruby
dfinninger has joined #ruby
last_staff has quit [Quit: last_staff]
User458764 has joined #ruby
Guest78105 has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
Hirzu has joined #ruby
willharrison has joined #ruby
anaeem1 has quit [Ping timeout: 256 seconds]
sinkensabe has quit [Ping timeout: 265 seconds]
blandflakes has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
blandflakes has quit [Disconnected by services]
blackmesa has quit [Ping timeout: 240 seconds]
blandflakes has joined #ruby
jaequery has joined #ruby
davedev24_ has joined #ruby
hichtech has quit [Quit: Quitte]
mistermocha has quit [Ping timeout: 256 seconds]
<phale> is there a library for rendering pixels
topolinux has quit [Ping timeout: 256 seconds]
<jhass> most likely
sevvie has quit [Ping timeout: 264 seconds]
GnuYawk has quit [Quit: WeeChat 1.0]
segmond has joined #ruby
momomomomo has joined #ruby
GnuYawk has joined #ruby
<phale> do you know any libaries for rendering pixels?
sevvie has joined #ruby
<phale> s/libaries/libraries/
benlieb has joined #ruby
amundj has quit [Ping timeout: 252 seconds]
DouweM has joined #ruby
<centrx> phale, What do you mean "rendering pixels", like a GL library?
Morkel has quit [Quit: Morkel]
<phale> sure
tunaCanBruh has quit [Ping timeout: 265 seconds]
<phale> i just need to render pixels
davejacobs has joined #ruby
<phale> to the screen of course
topolinux has joined #ruby
jaequery has quit [Quit: Textual IRC Client: www.textualapp.com]
davejaco_ has joined #ruby
davejacobs has quit [Read error: Connection reset by peer]
Guest42286 has joined #ruby
Guest42286 has quit [Quit: Leaving]
dEPy has joined #ruby
OrbitalKitten has joined #ruby
Mives has quit [Quit: WeeChat 1.1.1]
Mives has joined #ruby
jaequery has joined #ruby
jaequery has quit [Client Quit]
<wasamasa> lol
davejaco_ has quit [Remote host closed the connection]
jaequery has joined #ruby
jaequery has quit [Client Quit]
beneggett has joined #ruby
davejacobs has joined #ruby
nicolastarzia has quit [Ping timeout: 250 seconds]
piotrj has quit [Remote host closed the connection]
davejacobs has quit [Client Quit]
<wasamasa> phale: just use anything wrapping sdl
jaequery has joined #ruby
tunaCanBruh has joined #ruby
<phale> wasamasa: ok
<wasamasa> so, something like gosu I guess
<wasamasa> if you just want to draw, cairo wrappers can do it
<phale> how does gosu render a single pixel with color information
<jhass> what do you mean by how?
<phale> like, what's the method for doing so
startupality has quit [Quit: startupality]
<wasamasa> lol
joonty has quit [Quit: joonty]
<wasamasa> you're mixing a few things in here
sarkis has joined #ruby
<wasamasa> there are APIs for updating a canvas, such as cairo
<wasamasa> there's display-related stuff to take care of with timing, such as blitting and window control which SDL does
d10n-work has quit [Quit: Connection closed for inactivity]
<wasamasa> and then there's a library responsible for it ending up on your screen, like xlib on linux
<wasamasa> or crossplatform GL
lolmaus has quit [Quit: Konversation terminated!]
Ankhers` has joined #ruby
zenith_ has joined #ruby
<phale> no no
<phale> i'm making an image viewer
<phale> it parses bmp, jpg/jpeg, png and ppm files atm
<phale> i just need to render pixel by pixel color information
Ankhers has quit [Ping timeout: 246 seconds]
Ankhers` has quit [Remote host closed the connection]
atomiccc has joined #ruby
pontiki has joined #ruby
gfawcettpq has quit [Ping timeout: 255 seconds]
<jhass> into what buffer?
jenrzzz has joined #ruby
vasilakisfil_ has quit [Quit: Konversation terminated!]
<hirogen> i think i found the fix for the error the user is having error 429
<hirogen> sounds about right? run rub as admin then run the rube.exe /register and hope for the best
charliesome has joined #ruby
goshdarnyou has joined #ruby
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
triple_b_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
mistermocha has joined #ruby
jlast has quit [Remote host closed the connection]
surs has quit [Quit: Lost terminal]
pontiki has quit [Ping timeout: 246 seconds]
msgodf has quit [Ping timeout: 272 seconds]
jlast has joined #ruby
bricker has joined #ruby
agarie has joined #ruby
charliesome has quit [Client Quit]
selu has quit [Quit: Textual IRC Client: www.textualapp.com]
dEPy has quit [Quit: (null)]
benlieb has quit [Quit: benlieb]
jlast_ has joined #ruby
thumpba has quit [Remote host closed the connection]
jlast has quit [Read error: Connection reset by peer]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agarie is now known as caj
caj is now known as agarie
jlast_ has quit [Remote host closed the connection]
juanpablo_ has quit [Quit: (null)]
benlieb has joined #ruby
lkba has joined #ruby
juanpablo_ has joined #ruby
Mives has quit [Quit: WeeChat 1.1.1]
reckoner has joined #ruby
gfawcettpq has joined #ruby
<reckoner> hey
Mives has joined #ruby
<reckoner> can anyone recommend how i might refactor this?
<canton7> you mean... correct? you're defining the same method twice at the moment
freerobby has joined #ruby
<canton7> make use of #respond_to?
odigity has quit [Ping timeout: 265 seconds]
lemur has joined #ruby
<reckoner> yeah i guess correct
lys has quit [Ping timeout: 246 seconds]
juanpablo_ has quit [Ping timeout: 245 seconds]
<reckoner> i tried passsing in an array instead and enumerating over it, but doesn't work
<reckoner> so i had to define this twice.
<canton7> that description isn't enough to figure out what you actually did
<canton7> or why it might not have worked
Hijiri has quit [Quit: WeeChat 1.0.1]
anarang has quit [Quit: Leaving]
<reckoner> 1 sec, updating
beneggett has quit [Ping timeout: 246 seconds]
skj3gg has joined #ruby
_maes_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
<reckoner> canton7 i'm trying to get something like this to work.
<canton7> where @subject is an array?
<reckoner> yes
<canton7> make use of #respond_to?, like I said
<canton7> ... or actually
<reckoner> define respond_to?
<canton7> do you want to send the message to all subjects, or just the first one that can receive it?
<reckoner> ok
<reckoner> first one that can receive it
<canton7> use #respond_to? then
<reckoner> okay, cool. thanks for pointing me in the right direction
<jhass> reckoner: canton7 don't define respond_to?, define respond_to_missing?
pietr0 has joined #ruby
joonty has joined #ruby
<reckoner> jhass thanks. i think i have enough to go on.
<canton7> I'm not asking him to define respond_to?
ghostpl_ has quit [Remote host closed the connection]
pontiki has joined #ruby
spyderma_ has quit [Ping timeout: 246 seconds]
blueOxigen has joined #ruby
ptrrr has joined #ruby
StoneCypherAW has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GaryOak_ has joined #ruby
jtdowney has quit [Quit: Textual IRC Client: www.textualapp.com]
Mives has quit [Ping timeout: 256 seconds]
bluOxigen has quit [Ping timeout: 256 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joonty has quit [Quit: joonty]
chrishough has joined #ruby
blackmesa has joined #ruby
JDiPierro has quit [Remote host closed the connection]
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
segmond has quit [Ping timeout: 264 seconds]
Mives has joined #ruby
rbennacer has quit [Remote host closed the connection]
aphprentice has quit [Remote host closed the connection]
odigity has joined #ruby
alex88 has quit []
centrx has quit [Ping timeout: 264 seconds]
blueOxigen has quit [Ping timeout: 265 seconds]
DouweM has quit [Read error: Connection reset by peer]
lemur has quit [Remote host closed the connection]
User458764 has joined #ruby
JDiPierro has joined #ruby
jaequery has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 252 seconds]
The_Phoenix has joined #ruby
claw_ has quit [Ping timeout: 256 seconds]
dmolina has left #ruby [#ruby]
claw__ has joined #ruby
swgillespie has joined #ruby
rbennacer has joined #ruby
strixd has quit [Quit: 500]
selu has joined #ruby
agent_white has quit [Quit: bbl]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
topolinux has quit [Ping timeout: 252 seconds]
aphprentice has joined #ruby
deuterium has joined #ruby
oki has quit [Ping timeout: 256 seconds]
MatthewsFace has joined #ruby
Sawbones has joined #ruby
DaniG2k has quit [Quit: leaving]
startupality has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
ismaelga has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
jenrzzz has joined #ruby
max96at is now known as max96at|off
DrShoggoth has joined #ruby
paulfm has quit [Quit: Goodbye]
<hirogen> fixed had to run ruby as admin
segmond has joined #ruby
Takle has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Waheedi has quit [Quit: Waheedi]
selu has quit [Ping timeout: 256 seconds]
tkuchiki has joined #ruby
RegulationD has quit [Remote host closed the connection]
Sawbones has quit [Ping timeout: 256 seconds]
chthon has quit [Ping timeout: 246 seconds]
willharrison has quit [Quit: Textual IRC Client: www.textualapp.com]
Hirzu has quit [Remote host closed the connection]
mjuszczak has joined #ruby
iamjarvo has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
Hirzu has joined #ruby
iamjarvo has quit [Client Quit]
sevvie has quit [Ping timeout: 256 seconds]
mleung has joined #ruby
wallerdev has joined #ruby
anarang has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
terlar has quit [Ping timeout: 264 seconds]
justin_pdx has joined #ruby
CustosLimen has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 256 seconds]
ghostmoth has joined #ruby
gf3 is now known as gf3a
coldkey21 has joined #ruby
jp-znc has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
psy_ has joined #ruby
skj3gg has joined #ruby
rkgudboy has joined #ruby
mleung has quit [Ping timeout: 264 seconds]
plashchynski has quit [Quit: plashchynski]
kalusn has quit [Remote host closed the connection]
tgunr has joined #ruby
Hirzu_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mleung has joined #ruby
bluOxigen has joined #ruby
sevvie has joined #ruby
soulcake has quit [Quit: Quack.]
tobiasvl has quit [Ping timeout: 252 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr_ has quit [Ping timeout: 246 seconds]
aswen has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Ping timeout: 256 seconds]
<phale> any image parsers for ruby?
dfinninger has quit [Remote host closed the connection]
jlebrech has quit []
tvl has joined #ruby
Hirzu has quit [Ping timeout: 245 seconds]
tvl is now known as tobiasvl
deric_skibotn has joined #ruby
rkgudboy has quit [Ping timeout: 252 seconds]
ghr has quit [Ping timeout: 255 seconds]
The_Phoenix has quit [Quit: Leaving.]
danman has quit [Quit: danman]
reckoner has left #ruby [#ruby]
joeyjones has quit [Quit: joeyjones - https://altexplorer.net]
joeyjones has joined #ruby
wallerdev has quit [Quit: wallerdev]
rbennacer has quit [Remote host closed the connection]
foureight84 has joined #ruby
<wasamasa> phale: there surely are
beneggett has joined #ruby
<phale> meh nevermind they all suck
<phale> ill make my own
<wasamasa> lol
The_Phoenix has joined #ruby
ki0 has quit [Ping timeout: 245 seconds]
* wasamasa looks forward to see phale give up on the intricacies of JPG wavelets
ade has joined #ruby
<phale> i'll just parse PPM for not
<phale> s/not/now/
mpls_offsec has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
gf3a is now known as gf3
senayar has quit []
<wasamasa> does anything else than PDF even use that format?
skj3gg has quit [Quit: ZZZzzz…]
jenrzzz has joined #ruby
<wasamasa> oh and emacs of course
Shazaum has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
<phale> no
<phale> im just using it because it's easy
tohsig has joined #ruby
nfk has quit [Quit: yawn]
Megtastique has quit []
it0a has joined #ruby
<wasamasa> of course
<phale> that's strange
Mives has quit [Ping timeout: 264 seconds]
<phale> I tried doing ImageParser.parse but it wont work
<phale> but if i instantiate it it will
<phale> it gives me a methoderror
StoneCypherAW is now known as StoneCypher
Aswebb_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
ismaelga has joined #ruby
m8 has joined #ruby
shadoi has joined #ruby
nfk has joined #ruby
HOrangeJewce has quit [Quit: Leaving.]
jonr22 has quit [Ping timeout: 265 seconds]
thumpba has joined #ruby
timanema has joined #ruby
<phale> nvm
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo_ has joined #ruby
ta has joined #ruby
graydot has joined #ruby
dfinninger has joined #ruby
lolmaus has joined #ruby
thumpba has quit [Ping timeout: 244 seconds]
ismaelga has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
Mives has joined #ruby
graydot has quit [Client Quit]
Mives has quit [Remote host closed the connection]
skj3gg has joined #ruby
ta has quit [Ping timeout: 256 seconds]
spyderman4g63 has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
niko has joined #ruby
gfawcettpq has quit [Ping timeout: 250 seconds]
wallerdev has joined #ruby
graydot has joined #ruby
razieliyo has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
mjuszczak has quit []
tunaCanBruh has quit [Ping timeout: 256 seconds]
piotrj has joined #ruby
odigity has quit [Ping timeout: 265 seconds]
ghr has joined #ruby
commmmodo has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
GnuYawk has quit [Ping timeout: 256 seconds]
zachrab has joined #ruby
Shazaum has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
mikecmpbll has joined #ruby
mjuszczak has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rdark has quit [Quit: leaving]
kalusn has joined #ruby
GnuYawk has joined #ruby
tkuchiki has joined #ruby
withnale__ has quit [Ping timeout: 264 seconds]
GnuYawk has left #ruby [#ruby]
delianides has quit [Remote host closed the connection]
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 255 seconds]
ismaelga has joined #ruby
aerth has quit [Ping timeout: 264 seconds]
agarie has quit [Remote host closed the connection]
delianides has joined #ruby
dago has joined #ruby
aerth has joined #ruby
adriancb has quit [Read error: No route to host]
tkuchiki has quit [Ping timeout: 265 seconds]
adriancb_ has joined #ruby
odigity has joined #ruby
dago has left #ruby [#ruby]
gfawcettpq has joined #ruby
byprdct has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cjim has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n008f4g_ has joined #ruby
deuterium has quit [Quit: zzZZZzzz..]
dfinninger has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
piotrj has quit [Remote host closed the connection]
zorak8 has joined #ruby
GaryOak_ has quit [Remote host closed the connection]
mjuszczak has quit []
dtordable has quit [Quit: • IRcap • 8.72 •]
freerobby has joined #ruby
ghr has joined #ruby
jottr_ has joined #ruby
sj has joined #ruby
RandyT_ has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
einarj has joined #ruby
CustosLimen has joined #ruby
Crisix has joined #ruby
RandyT has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
shanlar has quit [Quit: shanlar]
diegoviola has quit [Quit: WeeChat 1.1.1]
ghr has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
einarj has quit [Ping timeout: 246 seconds]
shanlar has joined #ruby
djbkd has joined #ruby
GaryOak_ has joined #ruby
rbennacer has joined #ruby
<phale> COLORS = { 0 => String.colors[:black] }
<phale> this will give me a symbol to integer error
tgunr has joined #ruby
<phale> how do I fix
coldkey21 has quit [Quit: Leaving]
fantazo has joined #ruby
B1n4r10 has joined #ruby
adac has quit [Quit: Leaving]
sevvie has quit [Remote host closed the connection]
baweaver has joined #ruby
<eam> phale: like this?
sevvie has joined #ruby
<eam> >> [1, 2, 3][:foo]
<eval-in> eam => no implicit conversion of Symbol into Integer (TypeError) ... (https://eval.in/296024)
ismaelga has quit [Remote host closed the connection]
<jhass> phale: I guess String.colors is an array, not hash
B1n4r10 has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
djbkd has quit [Remote host closed the connection]
<phale> jhass: yes
<phale> an array
triple_b has joined #ruby
<phale> returns symbols though
<eam> phale: but it doesn't take symbols in the [] index
<jhass> what do yu expect some_array[:a_symbol] to do?
<phale> oh yeah you're right
thebastl has joined #ruby
piotrj has joined #ruby
<phale> thanks this works
<phale> i have now rendered my picture in ascii
<phale> pretty cool
blueOxigen has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
triple_b has quit [Client Quit]
djbkd has joined #ruby
gfawcettpq has quit [Ping timeout: 264 seconds]
gfawcettpq has joined #ruby
Bounga has quit [Quit: Bounga]
blueOxigen has joined #ruby
shadeslayer has quit [Ping timeout: 240 seconds]
buub has joined #ruby
Limix has joined #ruby
shadeslayer has joined #ruby
tunaCanBruh has joined #ruby
Takle has joined #ruby
The_Phoenix has joined #ruby
djbkd has quit [Remote host closed the connection]
piotrj has quit [Ping timeout: 240 seconds]
ki0 has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
sandelius has joined #ruby
startupality has quit [Quit: startupality]
mjuszczak has joined #ruby
fryguy9 has quit [Quit: Leaving.]
piotrj has joined #ruby
serivichi has joined #ruby
max96at|off is now known as max96at
spider-mario has quit [Ping timeout: 265 seconds]
tcrypt has joined #ruby
zachrab has quit [Ping timeout: 245 seconds]
skj3gg has joined #ruby
jenrzzz has joined #ruby
<baweaver> Interesting idea for all of you. What if RSpec could be parsed by a second gem, and instead of being regarded as a BDD language it's regarded as a logic language? As to why, think mock service builders that stay up to date with your test frameworks at various levels of an app.
RegulationD has joined #ruby
ki0 has quit [Ping timeout: 245 seconds]
piotrj has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
<Sou|cutter> not sure I see where the logic is in the DSL, so I struggle to understand quite what you're thinking about
plashchynski has joined #ruby
HOrangeJewce has joined #ruby
<baweaver> contexts define cases of interaction, factories / mocks define return values
<baweaver> context('When passed x') { it('does y') { expect(x).to(y) } }
<baweaver> could be flipped to reflect the condition that when a described method is called with x it does y and returns a value
adriancb_ has quit [Read error: No route to host]
<baweaver> (* noted this is a very early concept idea I'm throwing against a wall a bit for amusement at this point)
lordkryss has quit [Quit: Connection closed for inactivity]
fryguy9 has joined #ruby
HoloIRCUser has joined #ruby
<Sou|cutter> have you seen rspec-given?
<baweaver> Not offhand
* baweaver googles
triple_b has joined #ruby
adriancb has joined #ruby
<baweaver> Ah Jim, RIP.
<Sou|cutter> I'm still not sure I understand what you're getting at, but at least based off the example you gave it sorta sounds more like the Given DSL
Hirzu_ has quit [Remote host closed the connection]
<baweaver> You have a SOA
<baweaver> and need to mock the next level up
<Sou|cutter> yeah, unfortunately I am not aware if any of the efforts to fork/maintain it have been successful
<baweaver> but don't want to have to keep changing your client every time that's updated
<baweaver> so the rspec from the service generates a mock service of itself.
rhg135|zzz is now known as rhg135
SouL has joined #ruby
<baweaver> as the rspec describes the exact behavior of the service if done well.
OrbitalKitten has joined #ruby
<phale> if in ruby, i create a program
<phale> is the program interpreted or compiled
<phale> or both
<baweaver> Which Ruby?
plashchynski has quit [Quit: plashchynski]
<phale> 1.9.3
<phale> at least my version
<baweaver> MRI Interpreted, JRuby compiled in some cases.
<phale> okay
<baweaver> If you don't know, you're likely MRI
<Sou|cutter> you should really upgrade versions also FWIW
<baweaver> JRuby runs on the JVM
plashchynski has joined #ruby
<baweaver> That too, 1.9.3 is deprecated.
<baweaver> as of.... last week was it?
<phale> Sou|cutter: yeah but the problem is
patrick99e99 has quit [Quit: leaving]
<phale> I am a sane person
xEA1E5788 has joined #ruby
patrick99e99 has joined #ruby
* baweaver scratches head
graydot has quit [Quit: graydot]
<phale> I just don't like Ruby 2
<atmosx> phale: a sane person wouldn't use 1.9.3
<baweaver> leaving yourself vulnerable to security breaches by using an old version does not seen same to me mate
anime4christ has joined #ruby
<phale> baweaver: i run most of my programs in a sandbox
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> then go to python where they treat that like a normal thing
<baweaver> won't help
<phale> alright
<phale> what's so different about ruby 2 and 1.9.3?
<baweaver> One's supported
<atmosx> phale: too many to mention really.
djbkd has joined #ruby
<baweaver> mainly performance
<baweaver> syntactically? Not an incredible amount.
paradoja has quit [Ping timeout: 265 seconds]
<atmosx> phale: huge memory performance improvement, especially since 2.2.0 game around (GC etc.)
<phale> oh cool
<phale> any new methods
mjuszczak has quit []
<baweaver> Tons
<atmosx> phale: sure
<baweaver> Anythink like the print hell from Python? No, we're the sane ones.
<baweaver> *anything
plashchynski has quit [Client Quit]
* baweaver is still leery of python and it's 2/3 divide shenanigans.
<havenwood> phale: 2.0 is in maintenance mode and will reach end of life in less than a year.
<baweaver> http://globaldev.co.uk/2012/11/ruby-2-0-0-preview-features/ - you'll have to dig a bit, but that's the general idea
<baweaver> Just go 2.2, chances are very slim you hit anything bad from it.
pullphinger has joined #ruby
<baweaver> Rather the point is to do rolling updates as they come so you're not versions behind and cropped by the deprecation train.
<havenwood> phale: 2.2.1 or 2.1.5 are fine choices and will run whatever you had on 1.9 or 2.0.
<baweaver> 1.8.6 to 1.9.3 was the bad one.
<phale> omg i hate myself now
plashchynski has joined #ruby
<phale> now i have to update all of my projects
<phale> all of it is now gone
<phale> damn
<baweaver> ...dramatic much mate?
<jhass> phale: the only changes that *might* be breaking is that String#chars, Sting#bytes etc. no longer return an Enumerator but an array. But even there most calls will continue to work
<atmosx> phale: you must update "all" of your projects?
<havenwood> Then there'll be another painless bump to 2.3. And then... A compatibility-breaking but refined and much faster Ruby 3.0! \o/
<baweaver> You just change the .ruby-version if you use RVM and install the new version.
<atmosx> havenwood: \o/
mjuszczak has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<phale> alright thanks guys this is good ruby
graydot has joined #ruby
* atmosx loves rvm
* atmosx good ruby
<baweaver> Just hope we don't end up like Python on our 2/3 jump....
<havenwood> baweaver: certainly wont
<atmosx> baweaver: I don't think so.
<baweaver> I still can't take that language seriously after that nonsense.
<havenwood> baweaver: they offered breaking changes with no carrot
<phale> the only thing I dislike about python is indentation
<phale> making code very unreadable
cjim has quit [Quit: (null)]
<atmosx> I don't dislike anything really, about python. But the version thing is hilarious
<baweaver> ironic as that's supposed to make it more readable, but anyways.
<havenwood> baweaver: I'd expect Ruby 3 to be quickly and widely adopted.
chrishough has joined #ruby
<atmosx> it's like if 70% of the language/projects decided to stay back.
kirun has joined #ruby
Megtastique has joined #ruby
<baweaver> Let's hope so. I don't think it'll be an issue, but stranger things.
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> well, if we're honest we had the same thing as python 2/3 with Ruby 1.8/1.9
<baweaver> except our people upgraded
<havenwood> baweaver: If we were going to have had a Python 2/3 debacle it'd have been the 1.8 to 1.9 jump.
<baweaver> 1.8.6 1.9.3 specifically.
<jhass> 1.8.7 never existed to you, eh? :P
mjuszczak has quit [Client Quit]
cjim has joined #ruby
<baweaver> Nope.
<baweaver> 1.8.6 only because default mac version
<jhass> 18>> RUBY_VERSION
<eval-in> jhass => "1.8.7" (https://eval.in/296025)
zachrab has joined #ruby
<jhass> default eval-in version! what can be more important
<baweaver> huh, so you can version that thing. TIL
<jhass> yah
<phale> why isnt that updated
<jhass> 10>> RUBY_VERSION
<baweaver> >> RUBY_VERSION
<eval-in> baweaver => "2.2.0" (https://eval.in/296026)
<eval-in> jhass => /tmp/execpad-2e39750a87f0/source-2e39750a87f0:4: TypeError: can't modify frozen string (https://eval.in/296027)
<baweaver> Like that?
<jhass> :o, it no longer runs 1.0 :(
<havenwood> baweaver: Default OS X version went from 1.8.6 to 1.8.7 to both 1.8.7 and 2.0, to just 2.0.
<baweaver> 19>> RUBY_VERSION
<eval-in> baweaver => "1.9.3" (https://eval.in/296028)
<eam> baweaver: "our people upgraded" isn't really true, distros (rhel, osx) shipped 1.8.7 for a loooong time
<jhass> wrapper is broken I guess
<baweaver> interesting trick.
<eam> the majority of my prod systems still have a 1.8.7 /usr/bin/ruby
<havenwood> RHEL is *special*.
<jhass> baweaver: ^ what eam is saying is what I meant
<eam> havenwood: it's really not
<baweaver> yeah
<jhass> havenwood: Debian & Ubuntu too really
tkuchiki has joined #ruby
<eam> I'd say the impact differed primarily because no one was using ruby for systems stuff
<havenwood> jhass: They have nice modern packages.
<baweaver> Ubuntu still feels like a phone to me now, but that's a different matter.
<jhass> these days
<eam> havenwood: none of the distros used for enterprise had newer versions
<jhass> for far too long they didn't
* baweaver uses ruby for systems stuff
<havenwood> RHEL is like a time machine to the past.
<eam> anyone working on big scale projects uses a container which has a 4-6 year lifecycle
adriancb has quit [Read error: Connection reset by peer]
<baweaver> We just use AWS and deploy a new stateless container for versions
<havenwood> jhass: Not super nice like Arch or Fedora packages. And yeah, they've gotten better over time but still aren't ever quite up-to-date. At least we have Brightbox packages and other options.
thebastl has quit [Quit: Leaving...]
<jhass> yeah
<jhass> btw anybody knows if the brightbox packages would crash a debian?
<havenwood> eam: Hardly Ruby-specific though, right?
<eam> havenwood: right, not ruby specific at all
tvw has joined #ruby
<havenwood> The community when possible seems eager to use latest stable.
<eam> in fact, if your code lives entirely inside a higher level framework (ruby, java, etc) you care much less about the container attributes
<baweaver> What major companies even use Ruby? Seems like a lot of people are tending towards Python for sys internals / tools.
<havenwood> Unlike some other communities.
adriancb has joined #ruby
<havenwood> baweaver: Too many to list.
<baweaver> I know Apple does, and we do some (Sony)
<phale> good?
dfinninger has joined #ruby
<eam> apple's mostly perl, no?
<baweaver> had a ton of ruby postings.
<eam> baweaver: we (square) use ruby for systems stuff
<baweaver> when I was moving to the bay area I was talking to them
<eam> but there's a shift towards go
<jhass> phale: always use the block form of File.open or the helper methods File.read and File.write
<jhass> or File.readlines/File.foreach
<baweaver> Never really liked Go, though that's just me./
OrbitalKitten has joined #ruby
<eam> baweaver: me either
<baweaver> eam: you in the bay area?
<eam> yessir
<baweaver> I'm over in SoMa myself.
<jhass> phale: STDERR.puts is basically available via Kernel as warn
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leafybasil has quit [Remote host closed the connection]
<phale> i should use Kernel.warn
<phale> over STDERR.puts
<phale> ?
<baweaver> >> warn 'nope'
<eval-in> baweaver => nope ... (https://eval.in/296029)
<jhass> phale: Kernel is included everywhere
<jhass> >> method(:warn).owner
<eval-in> jhass => Kernel (https://eval.in/296030)
<jhass> >> method(:puts).owner
<eval-in> jhass => Kernel (https://eval.in/296032)
<phale> oaky
<eam> baweaver: us as well
<phale> okay*
<havenwood> phale: and then instead of #warn, pass the warning message to #abort as an argument.
<baweaver> You know Xavier Shay at all? I think he's over there still
<nickjj> has anyone ever used nokogiri to extract a twitter id from the iframe that twitter's widget js returns?
<eam> baweaver: yes I do, very well
<phale> okay
sevvie has quit [Ping timeout: 250 seconds]
<baweaver> He has some good stuff, I tend to watch around his blog on occasion. Him and cirwin / banisterfiend
<havenwood> phale: use the block form of File::open, it's idiomatic and auto-closes the file unlike your current code which is leaving it open since there's no explicit #close.
<baweaver> cirwin is actually around SoMa as well at Bugsnag
<eam> yeah he's fantastic to work with
ki0 has joined #ruby
xEA1E5788 has quit [Quit: leaving]
<havenwood> fun to hang out with too
<baweaver> I'll have to catch some more bay area folks for coffee some time. Still fairly new to the area.
Hirzu has joined #ruby
<havenwood> Wish they had a high speed train already so I could come up to SF more often from LA.
<eam> baweaver: that'd be rad :) I'm a native, but I prefer the east bay
<baweaver> Ping me if you're ever up this way. I live in Dublin
spider-mario has joined #ruby
<eam> baweaver: hah - I live in Pleasanton
<baweaver> because $3k rent is nope
<eam> we're neighbors
<baweaver> I just take East bart in from Dublin, bike there.
<baweaver> go figure.
<eam> I bet we've seen each other on bart
<baweaver> Probably
<phale> fd.read.split("\n")
<phale> wont work for me ;(
tkuchiki has quit [Ping timeout: 256 seconds]
<eam> phale: what in particular doesn't work?
<phale> not sure
<phale> it returns an empty array
<phale> when there are newlines
<havenwood> phale: check: fd.readlines
<phale> ok
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
<baweaver> https://www.linkedin.com/in/keystonelemur - Only actual non-cartoon character I have out there.
<phale> havenwood: same
<havenwood> phale: what's fd?
<phale> File.open(ARGV[0], 'rb')
<phale> oh rb
<phale> nvm
<baweaver> >> "foo\nbar".readlines.split("\n")
<eval-in> baweaver => private method `readlines' called for "foo\nbar":String (NoMethodError) ... (https://eval.in/296033)
<baweaver> Heh, fine
<phale> nah that wasn't the problem
<hanmac> baweaver: just #lines on a string
<baweaver> yeah, I'm a bit slow this morning
attamusc has joined #ruby
freerobby has quit [Quit: Leaving.]
mjuszczak has joined #ruby
<havenwood> phale: File.readlines 'filename-here'
<havenwood> phale: ^ if the file isn't too large, you don't have to bother with File.open rigmarole
freerobby has joined #ruby
ereslibre has joined #ruby
ereslibre has quit [Changing host]
ereslibre has joined #ruby
Ankhers has joined #ruby
<phale> yeah this seems to work
<phale> i just need to join the string with newlines
<phale> but make it keep the newline
<phale> s/string/array/
<baweaver> .join("\n")
mjuszczak has quit [Client Quit]
<phale> yeah but i want to keep the newline
mkaesz has joined #ruby
<havenwood> phale: #readlines leaves the newlines on the end of each line. you can chomp them off if you want.
<phale> no no
ghr has joined #ruby
<phale> i want to keep the newline
<phale> oh
<phale> but if it's joined
<havenwood> huh?
<phale> what if it's joined
<havenwood> try it
<phale> ok
adriancb has quit [Read error: Connection reset by peer]
<havenwood> File.readlines('xoxo').join == File.read('xoxo') #=> true
sevvie has joined #ruby
oki has joined #ruby
adriancb has joined #ruby
pontiki has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
mkaesz has quit [Ping timeout: 250 seconds]
mkaesz has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
<phale> i want to puts if a newline has been found after a number
ych4k3r has joined #ruby
fantazo has quit [Ping timeout: 246 seconds]
tunaCanBruh has quit [Ping timeout: 250 seconds]
<monsieurp> is there something like cpantesters for Ruby that isn't Travis CI? (I'm aware of it, I simply wanna know if another similar platform exists)
<shevy> then check for that phale
<phale> but width only splits ints
<phale> im really confused
tunaCanBruh has joined #ruby
jp-znc has quit [Quit: ZNC - 1.7.0-git-20-048d118 - http://znc.in]
fantazo has joined #ruby
<havenwood> phale: So you just want to read the file content? I'm more confused.
<jhass> monsieurp: mmh, drone.io
<havenwood> phale: `File.readlines('xoxo').join` is equivalent to `File.read('xoxo')`.
<monsieurp> jhass: another company behind it
<monsieurp> ;)
<havenwood> phale: You're putting extra newlines on it.
<monsieurp> like Travis
n5418 has joined #ruby
<jhass> somebody gotta pay those boxes, no?
jlast has joined #ruby
<monsieurp> how do the chaps at cpantesters manage to pay the bills then?
triple_b_ has joined #ruby
<jhass> do I look like a perl guy that would know?
<phale> i want to
<monsieurp> of course not
<phale> do something like this
<phale> color color color color color (NEWLINE HERE)
<phale> color
<phale> color color color ...
<monsieurp> but your point is not valid
The_Phoenix has quit [Quit: Leaving.]
<monsieurp> you pay if you wanna pay
<jhass> monsieurp: Travis is open source
<monsieurp> ..backed by a company
The_Phoenix has joined #ruby
<jhass> get a server farm and set it up in that model
<jhass> nobody will mind
<monsieurp> ok thank you :)
<jhass> all there
<monsieurp> wasn't my question clear?
<shevy> phale ok, and when does the newline have to happen exactly?
<shevy> you need to be specific
jonr22 has joined #ruby
jp-znc has joined #ruby
<monsieurp> [20:29:33] [ monsieurp ] is there something like cpantesters for Ruby that isn't Travis CI?
<monsieurp> [20:34:33] [ jhass ] monsieurp: https://github.com/travis-ci/
<monsieurp> ?
<monsieurp> not clear enough apparently
<shevy> lol
<jhass> monsieurp: yeah, didn't state why not travis ci
<jhass> I inferred "any company is fundamentally evil" from our convo
<phale> shevy
<phale> i'll give you an input file
<shevy> I only need minimal test cases!
<monsieurp> jhass: is it relevant in this context?
Hirzu has quit [Remote host closed the connection]
triple_b has quit [Ping timeout: 264 seconds]
<jhass> or "not open source/FOSS so I don't use"
<jhass> could be the later, so I linked
<jhass> monsieurp: it sort of is
adriancb has quit [Read error: Connection reset by peer]
ghostpl_ has joined #ruby
<monsieurp> I'm sorry for making the question confusing then
jp-znc has quit [Client Quit]
<shevy> phale ok simplest way is to have an array
ghostpl_ has quit [Remote host closed the connection]
<jhass> when asking for alternatives, stating why you need one helps filtering out those that don't match either
ghostpl_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
<shevy> phale in your example you prepend 'color ' to each element
<phale> yeah
<shevy> so: array.map! {|entry| 'color '+entry }
mjuszczak has joined #ruby
<phale> when do i do that
<shevy> when you need to add strings conditionally, you can do that inside the block
<phale> okay
<shevy> when you need the transformation :)
<monsieurp> jhass: sure
argoneus has joined #ruby
<argoneus> hello
<phale> but color is actually some empty string(with one blank)
<argoneus> so I am trying to learn ruby
<phale> that's colored
n5418 has quit [Quit: TurboIRC for Android. Available @ Google Play.]
<argoneus> and while it seems like a nice language, it fucks with my head quite a bit
anime4christ has quit [Quit: (null)]
<argoneus> could anyone tell me what "on :message, "hello" do |m|" means?
<phale> " ".colorize(:background => String.colors[i])
<jhass> argoneus: new to programming in general or new to ruby?
<argoneus> new to ruby
<shevy> phale yes that is fine, in the above example 'color ' is a string, in your example you can add a variable or anything else inside the block; you can space the block onto multiple lines, or use do/end rather than the {]
<argoneus> I have a bit of experience in C/java/python
<shevy> I mean {}
<argoneus> also did a bit of smalltalk
<phale> okay shevy
<argoneus> but this syntax isn't making much sense to me and I can't find anything on google
<argoneus> I mean, I can tell what it does
<jhass> argoneus: that's calling the method on, passing the argument :message, the argument "hello" and a block
<argoneus> but how does that work
<shevy> String.colors[i] looks weird, you wanted String.colors(i) ?
<phale> what array is array?
<phale> shevy: no it's literally an array
<shevy> hehe
jonr22 has quit [Ping timeout: 256 seconds]
<argoneus> jhass: what is the |m| thing?
<argoneus> I thought it was a local variable
<argoneus> but apparently it's some sort of object
<jhass> argoneus: a block parameter or block argument
<jhass> (argument and parameter are used synonym)
<phale> shevy: ?
Soda has quit [Read error: Connection reset by peer]
<shevy> phale well can you add minimal more code to your codepad example? but .map or .map! seems to be just fine for what you described so far
<argoneus> I'm still confused ._.
<jhass> argoneus: which language can we relate to?
<shevy> I don't know what is .colorize() there, seems to be a custom method from you?
<argoneus> jhass: any imperative, really
<phale> which array is it though
<phale> height or width
adriancb has joined #ruby
<argoneus> unless you bring in something weird like befunge
<shevy> I don't know what require 'colorize' does
<havenwood> phale: change line 14 to #warn like jhass suggested
<shevy> height = File.readlines(ARGV[0]).join("\n")
<shevy> this seems weird though
<jhass> argoneus: Js is easiest here, the block is sort of like an anonymous function, on("message", "hello", function(m) {
<argoneus> oh
jp-znc has joined #ruby
<argoneus> what kind of parameter is :message ?
<argoneus> it's more like
<shevy> argoneus a Symbol
<phale> shevy: yeah i wasn't sure what to do
<havenwood> shevy: indeed, unless you're trying to double space :p
<argoneus> on(message, "Hello", function(m) { } ) then
<argoneus> right?
shum has joined #ruby
mjuszczak has quit [Client Quit]
<jhass> argoneus: no, a Symbol is a value
<argoneus> oh
<shevy> phale yeah, you need to slow down and go step by step. the .join does not seem to make a lot of sense unless you want "\n\n" results
rodfersou has quit [Read error: Connection reset by peer]
<argoneus> so it's some hardcoded event ID or such?
<jhass> argoneus: it's used as an identifying value, for example where you use an enum in other languages
<jhass> yeah
<argoneus> I see
ferr has quit [Ping timeout: 264 seconds]
<shevy> phale ah you wanted a string, well... why not File.read
JDiPierro has quit [Read error: Connection reset by peer]
<havenwood> phale: Look at the result in irb or Pry for each step.
<argoneus> and the |m| part
<phale> good idea
<argoneus> where exactly does the m get its value?
JDiPierro has joined #ruby
<shevy> but actually you have to decide what you want first hehehe
<argoneus> I never understood that much in JS, tbh
<jhass> argoneus: from the code that calls the block
<argoneus> when there's function(event) { }
<argoneus> hmm
<shevy> phale it might be simplest if you manipulate your data, before you start to output it
edwardly has quit [Quit: ??????????]
<argoneus> callbacks are too hard for me
<shevy> in your current code, you iterate, then manipulate while you iterate, then output
sarkis_ has joined #ruby
Hirzu has joined #ruby
<shevy> argoneus all Proc.new in ruby!
<jhass> argoneus: when the method is directly calling the block it typically uses the yield statement to call it, def on; msg = receive; yield message; end, there message ends up in m
larsam has quit [Quit: larsam]
<phale> shevy: okay
mary5030 has joined #ruby
snockerton has joined #ruby
<phale> i'm now reading the file
<phale> what do i do now
c355E3B has joined #ruby
<shevy> phale apply .map
<jhass> argoneus: in this case the block is likely stored for later, def on(&block) @callbacks << block; end; ... message = receive; @callbacks.first.call(message)
<phale> shevy: to what array?
<shevy> phale on the array
<phale> width?
<shevy> phale the File.readlines array
snockerton has quit [Client Quit]
<phale> you said not to use readlines
<shevy> nono
<phale> just read it in
<phale> dude
<phale> omg
<jhass> argoneus: I'm simplifying quite a bit here from the real code of course
<shevy> it depends on what you need
serivichi has quit [Ping timeout: 255 seconds]
<shevy> you used the .join example, not me
sarkis has quit [Ping timeout: 264 seconds]
<phale> shevy: okay
hollywood has quit [Quit: Leaving]
<shevy> I love File.readlines
<jhass> argoneus: best is to type out some simple code yourself that tries to use them
mkaesz has quit [Ping timeout: 252 seconds]
mesamoo has quit [Quit: Konversation terminated!]
<phale> ok
<phale> it is applied
<argoneus> hmm
<phale> i just puts it now?
<shevy> phale verify that you applied the transformation first
<shevy> phale use p your_object; or require 'pp'; pp your_object
yfeldblum has joined #ruby
swgillespie has joined #ruby
<argoneus> thanks jhass I'll just read up about it and try things out
<argoneus> so when I have something like
<argoneus> configure do |c| c.server = ...
<phale> shevy: im having problems
<argoneus> then it's like function(c) { ... } ?
swgillespie has quit [Client Quit]
<jhass> argoneus: http://paste.mrzyx.de/p2wqulx51 use that as a template and play around
<argoneus> where c is passed from above somewhere?
<phale> i can colorize the entry, right?
otisZart has joined #ruby
<phale> .map! {|entry| " ".colorize(:background => String.colors[to_i entry])}
<phale> not sure what im doing atm
<jhass> argoneus: change the values, add more parameters, call yield and block.call multiple times etc.
<phale> this should of worked
<shevy> phale yes
<shevy> well
<phale> it wont work
<shevy> phale you did not do this correctl
Hijiri has joined #ruby
<shevy> look at .colors[to_i entry]
<shevy> this is non-senical
blackmesa has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
<phale> oops
<shevy> doesn't .colorize come with documentation?
<phale> it seems to work now
<phale> but the widths don't
<shevy> perhaps you still did something wrong
<phale> heights do though
<phale> no
<phale> it just outputs three lines
IrishGringo has joined #ruby
fabrice31 has joined #ruby
<shevy> can you pastie the code?
leafybasil has joined #ruby
blueOxigen has quit [Ping timeout: 245 seconds]
affx has joined #ruby
Hirzu has quit [Remote host closed the connection]
<shevy> well
<shevy> if you assign, then you should drop the ! part
<affx> fg
davejlong has joined #ruby
mjuszczak has joined #ruby
<shevy> and I am still sceptical about String.colors[entry.to_i], where did you find this example phale?
<shevy> phale you can think of ! methods as "modify in place"
<shevy> so they would usually be applied like this:
<phale> yeah
<shevy> >> x = 'abc'; x.delete! 'b'; x
<eval-in> shevy => "ac" (https://eval.in/296037)
<phale> "
<phale> String.colors - return array of all possible colors names"
blueOxigen has joined #ruby
phale_ has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
<phale_> ugh
<phale_> i hate when this happens
<shevy> phale_ ok and ... where did you see the example for [] ?
<phale_> it's an array
mjuszczak has quit [Client Quit]
<phale_> what am i supposed to do to access an element of it
fabrice31 has quit [Ping timeout: 245 seconds]
<argoneus> huh
<argoneus> a symbol is p much an immutable string?
nicolastarzia has joined #ruby
zenith_ has quit [Ping timeout: 272 seconds]
<shevy> phale_ hmm
<phale_> still though
<phale_> how do I get the rest
<argoneus> ruby seems like a stepping stone to functional programming ._.
<jhass> argoneus: not really, no
Waheedi has joined #ruby
jp-znc has quit [Quit: ZNC - 1.7.0-git-20-048d118 - http://znc.in]
<argoneus> oh
zachrab has quit [Remote host closed the connection]
<argoneus> "you can look at a symbol as an instant enum"
<argoneus> that's neat
ade has quit [Quit: Connection closed for inactivity]
<jhass> that is to identify the proper usecases of symbols, it doesn't help at all to look at them like they're strings
<argoneus> so symbols are good for things like
<argoneus> game_state :game_state_running
<jhass> yeah, I like the enum comparision a lot better
<argoneus> or whatever
<phale_> shevy: i can only get the line colours
werelivinginthef has quit [Remote host closed the connection]
<phale_> i need to get the width colours as well
<jhass> yup
<argoneus> okay
<shevy> phale_ and where are the widths?
<argoneus> now there's only two words I don't understand :D
<argoneus> making progress
<jhass> argoneus: also as hash keys for example if you pass a hash as options to a method
<shevy> I don't see them in the code example at http://codepad.org/prelLN6U
<jhass> argoneus: we faked keyword arguments for a long time that way
<phale_> shevy: i dont have them
<phale_> how do i make them
phale has quit [Ping timeout: 244 seconds]
<shevy> where are they!
<phale_> im not sure!!
<phale_> colour colour colour colour
<shevy> it's your code!
<phale_> the first colour works
Soda has joined #ruby
<phale_> the other three don't
<shevy> what other three
<phale_> 5, 5, 5, 5
<phale_> the other three 5's
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> argoneus: def foo(opts={}); if opts[:do_it]; do_it!; end; end; foo(do_it: true); foo(do_it: false)
<shevy> >> [5,5,5,5].map {|entry| 'look phale '+entry }
<eval-in> shevy => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/296038)
<argoneus> is do_it! a valid function call?
<shevy> >> [5,5,5,5].map {|entry| 'look phale '+entry.to_s }
<eval-in> shevy => ["look phale 5", "look phale 5", "look phale 5", "look phale 5"] (https://eval.in/296039)
<jhass> argoneus: yes, methods in ruby are allowed to end in !, ? and =
<shevy> argoneus both ? and ! can be the last name for a method, if some character is before them
blueOxigen has quit [Ping timeout: 272 seconds]
kaiZen has joined #ruby
<shevy> *last character
<argoneus> cool
<jhass> argoneus: if it ends in =, you can even put a space before it when calling the method: class Foo; def bar=(v); end; end; Foo.new.bar = :baz
paulfm has joined #ruby
gfawcettpq has quit [Ping timeout: 256 seconds]
<shevy> how sneaky
<phale_> shevy: yeah
<phale_> but how do i combine that with the height and width
blueOxigen has joined #ruby
<preyalone> Does Bundler have a flag to install gems globally, like npm install -g ?
blueOxigen has quit [Client Quit]
<shevy> phale_ what height and width
<argoneus> and yield basically returns a value except it doesn't halt execution and you can yield more things at once?
<phale_> fksjaci sdv xnixcjv x
<shevy> phale_ you have an array right? where is height and width?
<argoneus> and then you catch them with |bla|
<jhass> argoneus: so we also don't name our method isFoo or is_foo, but just foo?
<Senjai> preyalone: All gems are installed "globally
<Senjai> for that ruby
<shevy> >> "fksjaci sdv xnixcjv x".split(' ').map {|entry| 'look phale '+entry }
<eval-in> shevy => ["look phale fksjaci", "look phale sdv", "look phale xnixcjv", "look phale x"] (https://eval.in/296040)
<Senjai> by default
<Senjai> unless you install them to a specific path
<phale_> shevy im so confused ;(
<phale_> i have height
<argoneus> jhass: oh I see that's usefu
<argoneus> l
<phale_> which will print out three lines of colours
<shevy> phale_ you only gave this a name
JDiPierro has quit [Remote host closed the connection]
<ddv> phale_, pro tip just read 'The Ruby Programming Language'
<jhass> argoneus: it's no form of concurrency, no, it's giving control to the caller and then returns from it once the block finished
<shevy> phale_ break your code into smaller chunks
<shevy> height = File.readlines(ARGV[0]); p height
<argoneus> jhass: once the block finished?
<shevy> why do you call it height anyway when you also need width WHERE IS WIDTH
<argoneus> I just looked at an example that was like
<argoneus> yield "hi", puts "yo", yield "hey yo", and when it was called, it wrote them in this order
<phale_> shevy
<phale_> oh
<jhass> argoneus: with yield, you can literally imagine the code of the block to be inserted into your method at the place you call yield, if that helps
cpt_yossarian has joined #ruby
<argoneus> OHHH
jenrzzz has quit [Ping timeout: 240 seconds]
<argoneus> so when I yield a
<argoneus> I basically call an anonymous function with the parameter a
<argoneus> this is executed
<jhass> yes
<argoneus> and then it continues
<jhass> yes
<argoneus> so in the example
<argoneus> on :message, "hello" do |m| { stuff }
<phale_> i gotta go to sleep
phale_ has quit [Quit: leaving]
<argoneus> there is a "yield something" in the "on" function
sambao21 has quit [Quit: Computer has gone to sleep.]
<argoneus> then?
rbennacer has quit [Remote host closed the connection]
<jhass> argoneus: there could be, however I seem to recognize that line of code from the cinchrb examples and in that case there's not :P
<argoneus> oh
<argoneus> and yeah it's cinch
<argoneus> but still
agarie has joined #ruby
<argoneus> this lets me write generic functions
<argoneus> where I can fill in things however I want
JDiPierro has joined #ruby
<jhass> exactly
<jhass> that's the main point of it
<argoneus> so instead of having two functions that look almost the same
<argoneus> I have one and I pass it different code blocks every time
<jhass> in the cinchrb there's actually a reference to the block stored for later
<preyalone> Ah, --system works like npm -g
jottr_ has quit [Ping timeout: 240 seconds]
<argoneus> I actually didn't dare to look at the implementation
<argoneus> I'm sure I would kill myself
<argoneus> (for now)
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
<argoneus> given I can't read most libraries in languages I somehow know
jp-znc has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
<jhass> argoneus: it will be similar to def return_block in my example actually
<argoneus> I really like this syntax though
<argoneus> it reminds me of smalltalk
<argoneus> things like bot = Cinch::Bot.new do ... stuff ... end
<argoneus> it creates an entire object and then assigns it to a variable
<argoneus> also calls some methods while it's at it
<argoneus> neat
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jimms has joined #ruby
tobago has quit [Remote host closed the connection]
sambao21 has joined #ruby
<argoneus> haha I knew I didn't want to do this
<argoneus> def on(event, regexp = //, *args, &block)
<argoneus> ouch
maknz has joined #ruby
<shevy> argoneus such a method is rare
mistermocha has quit [Remote host closed the connection]
jottr_ has joined #ruby
<jhass> argoneus: https://github.com/cinchrb/cinch/blob/master/lib/cinch/bot.rb#L203 there, with the &block it's passed on
HOrangeJewce has left #ruby [#ruby]
pullphinger has quit [Ping timeout: 252 seconds]
Pumukel has quit [Ping timeout: 256 seconds]
StoneCypher has quit [Quit: leaving]
<argoneus> hmm
User458764 has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
jenrzzz has joined #ruby
<argoneus> all this is magic
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
pietr0 has quit [Quit: pietr0]
<jhass> Ruby feels like magic yeah, but there's actually surprisingly little of it in the Syntax/Interpreter when you dig deeper
spicerack has quit [Quit: Textual IRC Client: www.textualapp.com]
rbennacer has joined #ruby
thumpba has joined #ruby
qiffp has quit [Ping timeout: 240 seconds]
thumpba has quit [Remote host closed the connection]
tgunr has quit [Ping timeout: 246 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tgunr has joined #ruby
<argoneus> jhass: I'm just wondering
<argoneus> what you linked me earlier - http://paste.mrzyx.de/p2wqulx51
<argoneus> what exactly is 'p'?
<jhass> argoneus: p is a method
<argoneus> where is it defined ._.
ki0 has quit [Remote host closed the connection]
art-solopov has joined #ruby
<argoneus> oh
<argoneus> so line 5
pontiki has joined #ruby
<argoneus> calls p with the argument call_block
<argoneus> and executes the block on :a
<argoneus> ..or something like that
snockerton has joined #ruby
<jhass> more specifically with the return value of that method call
beneggett has joined #ruby
naftilos76 has joined #ruby
<jhass> I could've written value = call_block do |arg|; end; p value
ghr has joined #ruby
mrgrieves has joined #ruby
davedev24_ has quit [Ping timeout: 264 seconds]
naftilos76 has quit [Read error: Connection reset by peer]
<argoneus> wait
<argoneus> but then you do :a = :b
<argoneus> and that won't work, no?
naftilos76 has joined #ruby
<jhass> no
<jhass> >> a = :a; a = :b; a
<eval-in> jhass => :b (https://eval.in/296048)
<jhass> >> a = :a; a = :b; p a
<eval-in> jhass => :b ... (https://eval.in/296049)
davedev24_ has joined #ruby
<argoneus> so you can assign a symbol to a symbol huh
<jhass> no
momomomomo has quit [Quit: momomomomo]
<shevy> argoneus every method in ruby has a block, optionally
<jhass> and tbh I don't quite follow how you think so :P
<argoneus> well
<argoneus> you yield :a
adriancb has quit [Read error: Connection reset by peer]
<shevy> a symbol is so boring man
<jhass> yes
<argoneus> oh
<argoneus> fuck
segmond has quit [Ping timeout: 244 seconds]
<argoneus> I forgot it returns :b
<argoneus> :a is just a parameter that isn't even used
<argoneus> o it is
<argoneus> p a
<argoneus> p :a *
pontiki has quit [Ping timeout: 255 seconds]
Akuma has quit [Quit: So long sukkas!]
<argoneus> so I call p :a and then assign :b to value
<argoneus> or idk
<shevy> you are way too fascinated about symbols
<jhass> argoneus: basically
ghr has quit [Ping timeout: 256 seconds]
adriancb has joined #ruby
max96at is now known as max96at|off
jerematic has quit [Remote host closed the connection]
mistermocha has joined #ruby
jerematic has joined #ruby
sevvie has quit [Ping timeout: 255 seconds]
sevvie has joined #ruby
timanema has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
Takle has quit [Remote host closed the connection]
affx has quit []
momomomomo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mkaesz has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
Beoran_ has quit [Ping timeout: 256 seconds]
GnuYawk has joined #ruby
jp-znc has quit [Quit: ZNC - 1.7.0-git-20-048d118 - http://znc.in]
mjuszczak has joined #ruby
ponga has quit [Remote host closed the connection]
mjuszczak has quit [Client Quit]
ndrei has quit [Ping timeout: 252 seconds]
Waheedi has quit [Ping timeout: 252 seconds]
brb3 has quit [Quit: ZZZzzz…]
<shevy> hmm how to send a simple email through ruby?
tvw has quit []
brb3 has joined #ruby
ndrei has joined #ruby
ponga has joined #ruby
<jhass> shevy: Mail gem
<argoneus> if I have a config file
<argoneus> where I have things like config["name"], config["server"]
<havenwood> shevy: or the Pony gem if you just need to send
<argoneus> how can I pass it to a variable that expects things like c.name, c.server?
<argoneus> do I need to do it manually
<shevy> havenwood pony?
atomiccc has joined #ruby
red_horned_rihno has joined #ruby
<shevy> why do ruby guys pick so strange names
segmond has joined #ruby
mistermocha has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
<jhass> argoneus: seems to lack a bit of context, but I think the answer is yes
<argoneus> well
<argoneus> I just need to to do c.bla = config["bla"] for each item in config
<jhass> argoneus: yeah
<argoneus> c = config didn't work ;_;
jimms_ has joined #ruby
<argoneus> eh it's just 3 variables I'll do it manually instead of doing some weird ass reflection
bttf has joined #ruby
jimms has quit [Ping timeout: 252 seconds]
bttf has left #ruby [#ruby]
spicerack has joined #ruby
baweaver has quit [Remote host closed the connection]
postmodern has joined #ruby
mistermocha has joined #ruby
Beoran_ has joined #ruby
jimms has joined #ruby
mrgrieves has quit [Quit: leaving]
triple_b_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
blackmesa has joined #ruby
elfuego_ has joined #ruby
<argoneus> is it necessary to have implementation along with the class?
elfuego has quit [Ping timeout: 246 seconds]
elfuego_ is now known as elfuego
jimms_ has quit [Ping timeout: 245 seconds]
<argoneus> like, can I pass all the "on" handlers etc to another file handler.rb?
snockerton has quit [Quit: Leaving.]
<shevy> argoneus if you use software written by others then you depend on what the author decided for you; on() is a method
Hirzu has joined #ruby
<shevy> you can spread out code of the same namespace into different .rb files
snockerton has joined #ruby
SouL has quit [Ping timeout: 240 seconds]
<argoneus> yeah that's what I want to do
<argoneus> but like, I have bot = something.new do ...
<argoneus> can I somehow implement other bot functions in another file?
adriancb has quit [Read error: Connection reset by peer]
<argoneus> specifically all the "on" methods in a handlers.rb or something
Zai00 has quit [Ping timeout: 244 seconds]
x1337807x has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
cphrmky has joined #ruby
mistermocha has quit [Ping timeout: 252 seconds]
adriancb has joined #ruby
<jhass> argoneus: you'd start writing plugins
SixiS has quit [Quit: SixiS]
zachrab has joined #ruby
<argoneus> oh
Hirzu has quit [Ping timeout: 244 seconds]
jottr has joined #ruby
Takle has joined #ruby
startupality has joined #ruby
decoponio has quit [Quit: Leaving...]
foureight84 has quit [Quit: Be back later ...]
<jhass> and then you can perfectly fine extract the class to another file and require_relative it in the main file
checkit has joined #ruby
jottr_ has quit [Ping timeout: 252 seconds]
snockerton1 has joined #ruby
benlieb has quit [Quit: benlieb]
snockerton has quit [Read error: Connection reset by peer]
reinaldob has quit [Remote host closed the connection]
baweaver has joined #ruby
<shevy> damn it
<shevy> I just email-spammed myself
<argoneus> oh
naftilos76 has quit [Remote host closed the connection]
<shevy> argoneus do not use ruby for evil!
<argoneus> jhass: but wait
<argoneus> there is a circular dependency
<argoneus> plugins requires Hello
<shevy> that's not good
<shevy> break out of it
<argoneus> and Hello requires Cinch::Plugin
<argoneus> ah nevermind that's something else
fantazo has quit [Quit: Verlassend]
mistermocha has joined #ruby
zachrab has quit [Ping timeout: 255 seconds]
triple_b has joined #ruby
tunaCanBruh has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
<argoneus> anyway guys you've been a great help
<argoneus> <3
triple_b has quit [Client Quit]
<pipework> shevy, that's so unlike you!
jenrzzz has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Client Quit]
dtordable has joined #ruby
<shevy> pipework compiling sendmail was annoying though
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
GnuYawk has quit [Ping timeout: 250 seconds]
pandaant has quit [Remote host closed the connection]
tunaCanBruh has joined #ruby
werelivinginthef has joined #ruby
sevvie has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby
robustus is now known as robustus|Off
zenith_ has joined #ruby
cjim has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
cjim has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fusl has quit [Read error: Connection reset by peer]
cjim_ has joined #ruby
spyderma_ has joined #ruby
Fusl has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
reset has joined #ruby
EasyCo has joined #ruby
triple_b has quit [Client Quit]
Zleec has joined #ruby
Zleec has quit [Client Quit]
spyderm__ has joined #ruby
blandflakes has quit [Quit: Page closed]
spicerack has quit [Ping timeout: 240 seconds]
jaequery has joined #ruby
werelivinginthef has quit [Ping timeout: 245 seconds]
beneggett has quit [Remote host closed the connection]
tkuchiki has joined #ruby
spyderman4g63 has quit [Ping timeout: 252 seconds]
kalusn has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
piotrj has joined #ruby
kirun has quit [Quit: Client exiting]
apeiros_ has joined #ruby
cjim has quit [Ping timeout: 252 seconds]
Zai00 has joined #ruby
sevvie has joined #ruby
ldnunes has quit [Quit: Leaving]
spyderma_ has quit [Ping timeout: 272 seconds]
startupality has quit [Quit: startupality]
tkuchiki has quit [Ping timeout: 256 seconds]
mjuszczak has joined #ruby
<shevy> hmm question
c355E3B has quit [Quit: Leaving]
Crisix has quit [Ping timeout: 245 seconds]
<shevy> I can now use sendmail + ruby mail gem to send mails, even from a .cgi file. But how can I tie the send-email part to a button-click event on a web interface?
sambao21 has joined #ruby
<argoneus> my plugin doesn't work ;_;
x1337807x has joined #ruby
<apeiros_> shevy: button click is a client side event. the server knows nothing about it. you have to inform it. e.g. via an ajax call.
snockerton1 has quit [Quit: Leaving.]
<shevy> oh
snockerton has joined #ruby
<apeiros_> or your button must be a submit button of a form
mjuszczak has quit [Client Quit]
foureight84 has joined #ruby
HoloIRCUser has quit [Remote host closed the connection]
x1337807x has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
ki0 has joined #ruby
swgillespie has joined #ruby
<argoneus> how does this work
mistermocha has quit [Remote host closed the connection]
<argoneus> listen_to :connect, :method => :on_connect
Shazaum has quit [Quit: Leaving]
wallerdev has joined #ruby
<argoneus> is all this custom implemented or are these ruby features?
<shevy> argoneus all custom
ghr has joined #ruby
<argoneus> so basically
<shevy> argoneus you'd have to look up to listen_to() method documentation; the second part is a hash, with one key called :method
<argoneus> this is like
<argoneus> listen_to("on_connect", method = on_connect())
<argoneus> ?
<canton7> listen_to(:connect, { :method => :on_connect })
<argoneus> I see
<argoneus> this lib is powerful
<argoneus> ruby seems powerful
<argoneus> it can write complicated things simply
<argoneus> when you understand it I guess
<shevy> you can also write very complicated code
<shevy> argoneus the ruby parser is rather liberal/flexible. most () parens are optional
<atomiccc> i love ruby and i also think the way inheritance works makes it very easy to obscure how things are working in a bad way
<shevy> and as canton7 showed, you can drop the {} when it is the last argument (for a hash as argument)
jonr22 has quit [Ping timeout: 256 seconds]
Ankhers has quit [Remote host closed the connection]
ki0 has quit [Remote host closed the connection]
aswen has joined #ruby
ki0 has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
<shevy> do you guys know the "Levensthein-Distance" without having to look it up somewhere?
<argoneus> um
<argoneus> what is the syntax
benedeti has joined #ruby
<argoneus> class bla < something
<argoneus> and class bla << something?
neanderslob has joined #ruby
<shadoi> class << self
<shevy> argoneus must be upcased first character
<shevy> so always: class Bla
<shevy> you could also do class BLA but people won't like that style
<apeiros_> shevy: I couldn't implement it, but I know what it is without looking it up, yes
<havenwood> >> require 'rubygems/text'; include Gem::Text; levenshtein_distance 'shevy', 'chevy'
<eval-in> havenwood => 1 (https://eval.in/296073)
<shevy> apeiros_ cool
<shevy> havenwood what the ...
<shevy> what is that wicked magic
<shevy> what is require 'rubygems/text'
ponga has quit [Quit: Leaving...]
djbkd has quit [Remote host closed the connection]
<havenwood> shevy: ignore the man behind the curtain!
<shevy> how do you even know such things
benedeti has quit [Remote host closed the connection]
<shevy> and besides
<havenwood> shevy: i like reading ruby code
<shevy> why does rubygems have that?
<havenwood> apeiros_: 2.2.1 version bump!
<shevy> I am really confused
rbennacer has quit [Ping timeout: 246 seconds]
<shevy> I thought that was only useful for bioinformatics-related sequence search
<apeiros_> havenwood: thanks, I'll update soon
<havenwood> apeiros_: :)
FooMunki_ has quit [Quit: FooMunki_]
rbennacer has joined #ruby
<shevy> yay
<shevy> ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
<shevy> first time I am faster than apeiros_
wallerdev has quit [Read error: No route to host]
skj3gg has quit [Quit: ZZZzzz…]
davejlong has quit [Remote host closed the connection]
startupality has joined #ruby
<CustosLimen> does ruby gems allow two versions of same library to be installed at once ?
odigity has quit [Ping timeout: 265 seconds]
<havenwood> CustosLimen: yes
Soda has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<CustosLimen> ok and it resolves them correctly, so if one runnable script needs version 1, and another runnable script needs version 2 - it will figure it out ?
<apeiros_> no, you have to tell it
<CustosLimen> I see
<apeiros_> the default is the newest installed version
serivichi has joined #ruby
<apeiros_> you can tell it externally (bundler is the most popular option for this) or internally, using the `gem` method.
<baweaver> shevy: I did
paulfm has quit [Quit: Zzzzz...]
<shevy> beaver!
<shevy> you are alive
<baweaver> I use it for when some people can't decide between typing-like-this or typing_like_this or freaking typingLikeThis
dtordable has quit [Quit: • IRcap • 8.72 •]
<baweaver> useful for finding potential duplicates in a database.
<baweaver> distance 3-4 normally has a good hit rate.
<shevy> ah
<shevy> interesting
<baweaver> helps for reconciling inconsistencies in a database quickly
Hijiri has quit [Quit: WeeChat 1.0.1]
<shevy> <baweaver> useful for finding potential duplicates in a database.
<shevy> you are a very clever beaver
<baweaver> or a very lazy one who didn't want to do that by hand
b_k has joined #ruby
<baweaver> and by which laziness found a better way
<shevy> wait until beavers use chainsaws
GnuYawk has joined #ruby
<shevy> they are already called "ecosystem engineers" in ecology, even without having to earn a degree!
fabrice31 has quit [Ping timeout: 245 seconds]
<b_k> anyone have experience using a gem called feedjira?
ki0 has quit [Remote host closed the connection]
<baweaver> also I tend to ask about it in interviews ;)
Crazy_Atheist has quit [Ping timeout: 272 seconds]
jen_ has joined #ruby
<baweaver> huh, so it's not an atlassian thing
<baweaver> nope, haven't then
lanemeyer has quit [Ping timeout: 245 seconds]
<baweaver> mainly some variant of how would you catch duplicates in a database like that. I prefer to ask things that I know have come up before instead of odd trick questions.
kalusn has joined #ruby
agent_white has joined #ruby
b_k has left #ruby [#ruby]
<baweaver> Aw, he left. Well that's no fun. Doesn't look like a hard gem, just expected it to be some Jira feed thing.
* baweaver shrugs
<baweaver> ah well
agarie has quit [Remote host closed the connection]
odigity has joined #ruby
otisZart has quit [Remote host closed the connection]
zenith_ has quit [Remote host closed the connection]
red_horned_rihno has quit [Ping timeout: 272 seconds]
delianides has quit [Remote host closed the connection]
<baweaver> well off to meetings I go. Cheers.
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
delianides has joined #ruby
ascarter has joined #ruby
djbkd has joined #ruby
baweaver has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
cjim_ has quit [Quit: (null)]
ascarter has joined #ruby
zachrab has joined #ruby
cjim_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Crazy_Atheist has joined #ruby
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reinaldob has joined #ruby
<Phage> I have it grab the div tag, but I need it to grab the hash. Any ideas? https://dpaste.de/wrfz
SixiS has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jen_ has quit [Quit: jen_]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
zachrab has quit [Ping timeout: 245 seconds]
Ryan____ has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
<shevy> use require 'pp'; pp hash
<shevy> with puts you don't really know what the hash has
<Ryan____> Where can i find the constant that holds the machine dependent new line separator?
red_horned_rihno has joined #ruby
<shevy> if you have it as a long string, you could use a regex match for it
<shevy> Ryan____ I think it is ... $/ or so
delianides has quit [Remote host closed the connection]
jimms has quit [Remote host closed the connection]
pullphinger has joined #ruby
<Ryan____> yeah thats it, shevy, thanks
ki0 has joined #ruby
<shevy> "$/ # The input record separator (eg #gets). Defaults to newline."
red_horned_rihno has quit [Max SendQ exceeded]
Ryan____ has quit [Client Quit]
mistermocha has joined #ruby
reinaldob has quit [Ping timeout: 250 seconds]
red_horned_rihno has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
replay has joined #ruby
tkuchiki has joined #ruby
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
IrishGringo has joined #ruby
tkuchiki has quit [Ping timeout: 256 seconds]
pontiki has joined #ruby
lncdslnc has joined #ruby
iamjarvo has quit [Quit: Textual IRC Client: www.textualapp.com]
RegulationD has quit [Remote host closed the connection]
codecop has quit [Read error: Connection reset by peer]
qiffp has joined #ruby
anarang has quit [Quit: Leaving]
timanema has joined #ruby
wallerdev has joined #ruby
elfuego has quit [Quit: elfuego]
riotjone_ has joined #ruby
pontiki has quit [Ping timeout: 264 seconds]
cjim_ has quit [Quit: (null)]
nicolastarzia has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 250 seconds]
lncdslnc has quit [Quit: Leaving]
zachrab has joined #ruby
cjim_ has joined #ruby
art-solopov has quit [Quit: Konversation terminated!]
tohsig has quit [Quit: Textual IRC Client: www.textualapp.com]
piotrj has quit [Remote host closed the connection]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
RegulationD has joined #ruby
kaleido has joined #ruby
kaleido has joined #ruby
willharrison has joined #ruby
JDiPierro has quit [Remote host closed the connection]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
spyderm__ has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
dblessing has joined #ruby
snockerton1 has joined #ruby
kaiZen has joined #ruby
martinbmadsen has joined #ruby
DavidDudson has joined #ruby
snockerton has quit [Ping timeout: 245 seconds]
TheNet has joined #ruby
zacstewart has quit [Remote host closed the connection]
mkaesz has quit [Remote host closed the connection]
snockerton1 has quit [Client Quit]
sambao21 has joined #ruby
snockerton has joined #ruby
<TheNet> how can I pass a predefined proc to a method that's expecting a block?
zacstewart has joined #ruby
jimms has joined #ruby
<workmad3> TheNet: some_method(&the_proc)
<TheNet> workmad3: ty
ponga has joined #ruby
willharrison has quit [Quit: Textual IRC Client: www.textualapp.com]
zacstewart has quit [Ping timeout: 244 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
blandflakes has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
zachrab has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
it0a has quit [Ping timeout: 272 seconds]
<bricker> "and the proc" good band name
<bricker> not as good as "the marshall infection" though
spicerack has joined #ruby
_maes_ has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Quitter]
sevvie has joined #ruby
havenwood has quit []
Asher has quit [Quit: Leaving.]
doodlehaus has quit [Remote host closed the connection]
claw__ has quit [Quit: Konversation terminated!]
devdazed has quit [Quit: Computer has gone to sleep.]
ponga has quit [Read error: Connection reset by peer]
Deele has quit [Ping timeout: 256 seconds]
adriancb_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
Soliah has joined #ruby
crueber has quit [Quit: Leaving.]
mistermo_ has joined #ruby
adriancb_ has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 246 seconds]
<shevy> sometimes I wonder if bricker is drunk-chatting
frobs has quit [Quit: Konversation terminated!]
jimms has quit []
mistermocha has quit [Ping timeout: 264 seconds]
<Senjai> :P
<Senjai> <3 bricker
DeanH has joined #ruby
checkit has quit [Ping timeout: 256 seconds]
adriancb has joined #ruby
jottr has joined #ruby
cphrmky has quit [Read error: Connection reset by peer]
godd2 has joined #ruby
wicope has quit [Remote host closed the connection]
<pipework> shevy: I'm pretty sure bricker is the drunk persona of zenspider.
ponga has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
<shevy> haha
plashchynski has quit [Quit: plashchynski]
kalusn has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
plashchynski has joined #ruby
vdamewood has joined #ruby
maletor has joined #ruby
juanpablo_ has quit [Quit: (null)]
shum has quit [Quit: WeeChat 1.1.1]
ki0 has quit [Remote host closed the connection]
baweaver has joined #ruby
ascarter has joined #ruby
ptrrr has quit [Quit: ptrrr]
commmmodo has quit [Quit: commmmodo]
juanpablo_ has joined #ruby
Megtastique has quit [Read error: Connection reset by peer]
juanpablo_ has quit [Read error: Connection reset by peer]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
ascarter has quit [Max SendQ exceeded]
tkuchiki has joined #ruby
juanpablo_ has joined #ruby
Megtastique has joined #ruby
fryguy9 has quit [Quit: Leaving.]
ghostpl_ has quit [Remote host closed the connection]
ascarter has joined #ruby
commmmodo has joined #ruby
cjim_ has quit [Quit: (null)]
ascarter has quit [Max SendQ exceeded]
FooMunki has joined #ruby
ascarter has joined #ruby
snockerton has quit [Quit: Leaving.]
baweaver has quit [Remote host closed the connection]
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has quit [Max SendQ exceeded]
baweaver has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
DeanH has quit [Remote host closed the connection]
ascarter has joined #ruby
snockerton has joined #ruby
GnuYawk has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
pullphinger has quit []
hobodave has joined #ruby
buub has quit [Ping timeout: 250 seconds]
shum has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
adriancb has quit [Read error: Connection reset by peer]
adriancb_ has joined #ruby
jonr22 has joined #ruby
odigity has quit [Ping timeout: 256 seconds]
elfuego has joined #ruby
Asher has joined #ruby
baweaver has joined #ruby
adriancb_ has quit [Read error: Connection reset by peer]
foureight84 has quit [Quit: Be back later ...]
jonr22 has quit [Ping timeout: 265 seconds]
thumpba has joined #ruby
brb3 has quit [Quit: ZZZzzz…]
qiffp has quit [Ping timeout: 245 seconds]
aphprentice has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 245 seconds]
Asher has quit [Quit: Leaving.]
tunaCanBruh has joined #ruby
thumpba has quit [Ping timeout: 255 seconds]
dfinninger has quit [Remote host closed the connection]
plashchynski has quit [Quit: plashchynski]
adriancb has joined #ruby
VBlizzard has joined #ruby
_blizzy_ has quit [Ping timeout: 250 seconds]
maknz has joined #ruby
m8 has quit [Quit: Sto andando via]
Zai00 has quit [Quit: Zai00]
adriancb has quit [Remote host closed the connection]
odigity has joined #ruby
ghr has joined #ruby
reinaldob has joined #ruby
fabrice31 has joined #ruby
Asher has joined #ruby
plashchynski has joined #ruby
swgillespie has joined #ruby
nicolastarzia has joined #ruby
mbeasley has quit [Quit: WeeChat 0.4.2]
mbeasley has joined #ruby
ghostpl_ has joined #ruby
blandflakes is now known as blandflakes_cook
blandflakes_cook is now known as blandflakes_away
jenrzzz has quit [Ping timeout: 272 seconds]
ghr has quit [Ping timeout: 250 seconds]
JoshGlzBrk has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
pandaant has joined #ruby
sgambino has quit [Remote host closed the connection]
<Phage> How would I convert a string of binary data to a string of ascii characters+
<Phage> ?
nicolastarzia has quit [Ping timeout: 255 seconds]
<godd2> Phage Array#pack
zacstewart has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moonkid has joined #ruby
<Phage> So
<Phage> to_ascii.unpack() ?
<godd2> well it depends on what you have
sdothum has joined #ruby
<godd2> so if you have the string "1000001" and you know that's a binary representation of an ascii char code
zacstewart has quit [Remote host closed the connection]
cjim_ has joined #ruby
<Phage> godd2: I know that.
ghostpl_ has quit [Ping timeout: 252 seconds]
<godd2> then you'd want ["1000001".to_i(2)].pack "c"
<godd2> >> ["1000001".to_i(2)].pack "c"
<eval-in> godd2 => "A" (https://eval.in/296159)
shum has quit [Quit: WeeChat 1.1.1]
<godd2> since 65 is "A"
shum has joined #ruby
<Phage> to_i(2) ?
brb3 has joined #ruby
<Phage> and why "c" ?
<godd2> the to_i(2) part is saying "convert this to a number, from binary
<godd2> "
tmoore has left #ruby [#ruby]
<bradland> Array#pack takes a "template string"
<bradland> godd2
<bradland> doh, sry
<godd2> the "c" is the format of the number you're converting
<bradland> godd2's example only converts one byte, however. the template string specification is kind of archaic.
Aswebb_ has quit []
<godd2> you can have others if your binary data is 16-bit or 64-bit encoded or if it's big or little endian
tunaCanBruh has quit [Ping timeout: 246 seconds]
shum has quit [Client Quit]
commmmodo has quit [Quit: commmmodo]
<Phage> bradland: now I'm confused.
<Phage> That documentation is freaking me out.
<godd2> Phage let's roll back
<godd2> so you have a string of 1's and 0's right?
<Phage> Yup, a big ass one.
<godd2> for simplicity, let's assume that every 8 bits is it's own ascii character
Zai00 has joined #ruby
<godd2> if you were to come across 01000001, that would be the letter capital a
<godd2> and 01000010 would be capital b and so on
cjim_ has quit [Quit: (null)]
<godd2> what Array#pack does is take an array of numbers and map the 01000001 to "A"
<Phage> Okay?
<godd2> now, it will map 01000001 to "A" if you tell it the "c" encoding
<godd2> but that’s assuming every 8 bits is an ascii character in your original big-ass stirng
serivichi has quit [Ping timeout: 244 seconds]
<Phage> How do I know if it's every 8,16 or 64 bits?
<godd2> you’d have to know ahead of time
blandflakes_away has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Phage> But I do not :(
<godd2> Then I have to ask what you’re trying to do
moonkid has quit [Quit: leaving]
<Phage> It's a challenge.
<godd2> because before you said you have binary that you want to turn into ascii
freerobby has quit [Quit: Leaving.]
<Phage> Where you get a string of binary data and have to convert it into sha512.
<Phage> I do "Digest::SHA512.hexdigest("#{to_hash}")" to do the hashing part.
Guest____ has joined #ruby
<Phage> But it needs a string of ascii characters to convert (right?).
Nahra has joined #ruby
mistermo_ has quit [Ping timeout: 246 seconds]
TripTastic has quit [Read error: Connection reset by peer]
<godd2> Phage looks like it can take any string
jobewan has quit [Quit: Leaving]
<bradland> Phage: [string].pack('B*')
Kricir has quit [Remote host closed the connection]
<Phage> Okay, now second problem...
<Phage> hash_me.rb:25:in `<main>': undefined method `pack' for #<Bignum:0x007fe3e45c8da0> (NoMethodError)
<Phage> What do I need to import, to be able to use the 'pack' gem/function?
<godd2> Phage you pack an array
<godd2> >> [123].pack “B*”
<godd2> >> [123].pack "B*"
<eval-in> godd2 => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/296206)
<godd2> >> [123].pack "B"
<eval-in> godd2 => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/296216)
<godd2> wth
Guest____ is now known as peeja
<bradland> 123 isn't a string
<bradland> >> 123.class
<eval-in> bradland => Fixnum (https://eval.in/296217)
<godd2> ugh
<godd2> thank you
<bradland> >> ['01000001'].pack "B*"
<eval-in> bradland => "A" (https://eval.in/296218)
<Phage> Okay, thanks :)
beneggett has joined #ruby
arescorpio has joined #ruby
<godd2> can anyone tell me why my double quote isn’t the normal double quote but the unique-sided one? “test”
<bradland> Phage: this is a class I wrote for working with strings as binary data: https://gist.github.com/bradland/50fc4cb66c2fe2a0dac7
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<jhass> godd2: because apple knows better than you?
<ponga> lol
Rapier- has joined #ruby
<godd2> jhass I’m on Windows and it’s only happening in mirc and it only started happening 2 minutes agoi
<workmad3> godd2: stop using word as an IDE :P
enebo has quit [Quit: enebo]
<jhass> godd2: mirc, that still exists?
<jhass> or maybe microsoft thought knowing better is cool if apple does it so they copy pasted the "smart" quote feature?
DavidDudson has joined #ruby
tkuchiki has joined #ruby
DavidDudson has quit [Client Quit]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jerematic> Can anyone with capistrano experience point me in the right direction. I'm trying to manage multiple branches of the same repository for multiple sites stored in a yaml doc, like this: http://pastebin.com/t9Dak4At Does each site need a separate stage?
sdothum has joined #ruby
vt102 has quit [Remote host closed the connection]
Kricir has joined #ruby
netbun has joined #ruby