havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby
<RickHull> but looking to slurp a C file, not translate it by hand
<RickHull> or read the object file or whatever
<RickHull> again, apologize for any misunderstandings on the C/Posix side of things
<al2o3-cr> no worries
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<RickHull> i am thinking to dlload or dlopen something. or not the right idea?
<zenspider> "random" numbers w/o duplication aren't really random... they're nonrandom numbers shuffled with even distribution
<al2o3-cr> dlopen or dlload with only open the library
<RickHull> i think the goal is unpredictable
<zenspider> RickHull: "though shuffling itself can be grossly inefficient"... care to back that up? compared to what?
<RickHull> an oracle I guess :)
<RickHull> I have seen it used inefficiently, as the wrong choice of algorithm
<RickHull> i was hedging whether shuffling a sequence would actually be a good idea in this case
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
<zenspider> so not grossly inefficient. just misused in places. big difference
kht has quit [Ping timeout: 258 seconds]
<RickHull> zenspider, btw, got any advice for trying to "automagically" determine the byte size of e.g. kernel's timeval struct from ruby?
<RickHull> what I am really trying to do is determine whether an input event from /dev/input is 16 bytes or 24 bytes
<RickHull> dynamically slash properly
<RickHull> mostly as an exercise
<RickHull> all of my searching told me it should be 16 bytes, but on my system it is 24 bytes, and it looks like that's because timeval is 16 bytes on a 64 bit platform
<RickHull> I'd like to drill down and confirm that from ruby
hahuang65 has joined #ruby
<RickHull> can I read some headers or object files from the system and do a sizeof?
<RickHull> er, not I -- programatically :)
nvms has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
rfoust has joined #ruby
username_ has joined #ruby
<al2o3-cr> RickHull: use Array#pack then
<al2o3-cr> >> [1,2].pack('QQ').size
<RickHull> yeah, that's what I was thinking at first
<ruby[bot]> al2o3-cr: # => 16 (https://eval.in/722592)
hahuang61 has quit [Ping timeout: 256 seconds]
<RickHull> i still have to translate linux code into pack format "by hand"
<RickHull> but that is fair enough
<RickHull> i was pretty sure I would be able to load system libs and query this from ruby though
<RickHull> through FFI or C extension or whatever
<RickHull> not trying to be obtuse -- am I totally wrong about that?
<al2o3-cr> RickHull: might be able to do it with ffi but never used it
cgibsonmm has joined #ruby
<RickHull> i'll keep digging. i think fiddle can do it
hutch34 has quit [Ping timeout: 240 seconds]
<al2o3-cr> RickHull: if you find a solution please do tell ;)
SteenJobs has joined #ruby
<RickHull> hm, looks like Fiddle removed from 2.4.0 core
shinnya has quit [Ping timeout: 240 seconds]
<RickHull> oh, stdlib
<al2o3-cr> no
<al2o3-cr> yep
ianmethyst has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<al2o3-cr> my bad
<RickHull> I think I should be able to load something in /lib/x86_64/*.so*
<RickHull> er /lib/x86_64-linux-gnu/*.so*
<RickHull> or I guess I need the headers?
Fernando-Basso has quit [Quit: WeeChat 1.7]
<al2o3-cr> yeah sure, you can do that but it doesn't give you any access to structs
BackEndCoder has quit [Excess Flood]
_djbkd has quit [Quit: My people need me...]
<zenspider> I agree with al2o3-cr... using pack + size should be sufficient since it is only going to be dependent upon word length.
<RickHull> can I do it without translating the struct definition "by hand" -- and I also don't want to parse headers myself and find dependencies
whathappens has quit [Quit: Leaving...]
<RickHull> I would think there has to be a way to create an input event and then get its size
BackEndCoder has joined #ruby
<RickHull> is that part of libc?
<RickHull> I feel so helpless with the C underpinnings of linux
maleghast has quit [Read error: Connection reset by peer]
ianmethyst has quit [Ping timeout: 264 seconds]
<zenspider> or just cut your losses and go with Fiddle::SIZEOF_LONG
maleghast has joined #ruby
whathappens has joined #ruby
<zenspider> FFI is a crapshoot for this shit
nofxx has quit [Remote host closed the connection]
<RickHull> ok, good to know
nofxx has joined #ruby
<al2o3-cr> rbconfig has some other types too
<zenspider> oh. but SIZEOF_LONG is for a time_t ... no clue what your thing is
<RickHull> yeah, I don't really know either, except it's a very standard thing on a linux system
<RickHull> and I was sure i would be able to introspect it
cgibsonmm has quit []
Rodya_ has joined #ruby
marxarelli has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
nvms has quit [Quit: This computer has gone to sleep]
<RickHull> notice i found this stuff via googling. i was hoping to actually introspect it off the system
charliesome has joined #ruby
<RickHull> but actually it looks like I don't even have these headers on my filesystem xD
Rodya_ has quit [Remote host closed the connection]
<RickHull> and I guess because of the way C programs are built, libs can't know the structs? i mean, really?
<zenspider> meh
<RickHull> how does any program know whether to read 16 or 24 bytes?
<RickHull> or i guess userspace programs aren't expected to use the interface?
raul782 has joined #ruby
<RickHull> i guess you don't make a hard dependency on the kernel data structure. you code to the API?
eizua has joined #ruby
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ocbtec has quit [Quit: leaving]
MrJoshua has joined #ruby
malconis has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
Rodya_ has joined #ruby
<al2o3-cr> RickHull: how did you know the size of the struct was 24?
<RickHull> brute force ;)
<RickHull> reading /dev/input/event0 at different sizes until I didn't get an error
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<RickHull> EINVAL i think
<al2o3-cr> >> require 'rbconfig/sizeof'; %w(int32_t uint16_t uint16_t long long).map { |ty| RbConfig::SIZEOF[ty] }.sum
<ruby[bot]> al2o3-cr: # => undefined method `sum' for [4, 2, 2, 4, 4]:Array (NoMethodError) ...check link for more (https://eval.in/722606)
<al2o3-cr> >> require 'rbconfig/sizeof'; %w(int32_t uint16_t uint16_t long long).map { |ty| RbConfig::SIZEOF[ty] }.inject :+
<ruby[bot]> al2o3-cr: # => 16 (https://eval.in/722608)
<al2o3-cr> 24 on my system
<RickHull> inject(0, &:+) ?
<RickHull> now, where did you get that array of words?
<RickHull> i sort of know the answer ;)
<lucz> So when I try and run bundle exec ... I get this error: mri_21` is not a valid platform.
<lucz> I've googled this and I get maybe five results saying just run gem update bundler, and I've done this, same error.
montanonic has quit [Ping timeout: 240 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
eizua has quit [Quit: Leaving]
<RickHull> mri_21 sounds like a code for ruby 2.1
<RickHull> though I've not come across that before
<RickHull> is this string specified somewhere in your project / bundler config?
<lucz> RickHull: any idea what it means by not a valid platform?
<RickHull> is this RVM (or similar?) related?
Rodya_ has joined #ruby
<RickHull> if your project wants to use ruby 2.1, and ruby 2.1 is not availble or installed, perhaps that is what it means?
<lucz> RickHull: when I run the bundle exec command in the second link I get the error
despai has joined #ruby
nankyokusei has joined #ruby
<RickHull> i think you're going to need to get help from discourse
x0f has quit [Ping timeout: 258 seconds]
<lucz> RickHull: it looks like ruby 2.1 isn't even an option for me to install
<RickHull> yeah, I would take a step back for second
<lucz> RickHull: I have 1.9.3
<RickHull> what OS ?
markholmes has quit [Ping timeout: 255 seconds]
<lucz> ubuntu 14.04
<RickHull> it may be that their script doesn't support ubuntu 14.04
<RickHull> though I would be surprised
skweek has quit [Ping timeout: 255 seconds]
<RickHull> also, ruby 2.x should be available on that system
x0f has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<RickHull> are you a ruby programmer? how familiar are you with the ruby ecosystem?
<RickHull> if yes and very, it's possible you could hack this together. but I'm guessing you will need support from the discourse guys
hlmjr has quit [Quit: Konversation terminated!]
herbmillerjr has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
<RickHull> my guess is that you have taken a step or 2 off the happy path. and it will be better to step back to find the happy path rather than proceed forward
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
Rodya_ has joined #ruby
blackmes1 has quit [Ping timeout: 256 seconds]
Ropeney has joined #ruby
<lucz> I'm not familiar with ruby
<lucz> :(
<lucz> RickHull: I would much prefer the happy path.
Guest3878 is now known as ged
<RickHull> welcome to the club xD
<lucz> RickHull: lol
ged is now known as Guest99282
<RickHull> "We highly recommend to read the script before performing import, as the script is meant for developers, and you will almost certainly need to modify the script file before beginning."
renojdl has quit [Quit: renojdl]
<Radar> lucz: That is how you can install a different version of Ruby. I would recommend at least Ruby 2.3.3.
<RickHull> Radar, I love chruby -- but let's not go there yet
<Radar> RickHull: Ok, sure. You can tell them how to get a modern Ruby installed.
<Radar> glhf bye
<RickHull> lucz, if you want to hack this, figure out who is specifying mri_21
<lucz> RickHull: what do you mean who is specifying it?
<RickHull> you could use find and grep, for example
Rodya_ has quit [Remote host closed the connection]
<RickHull> when you execute `bundle exec $blah` then something is asking for mri_21 and not getting it, right?
<lucz> RickHull: presumably, but I don't know how I would figure that out
Rodya_ has joined #ruby
nullfxn has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
<Radar> lucz: what's the rest of that "not a valid platform" message?
<RickHull> use a paste site, and paste your command line session
<RickHull> e.g. the full command you run, and the full output
markholmes has joined #ruby
kht has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<Radar> lucz: hi?
zeroDi has quit [Ping timeout: 256 seconds]
Rodya_ has joined #ruby
<lucz> RickHull: sorry im here
alexar_ has quit [Remote host closed the connection]
<Radar> [11:51:57] <Radar>lucz: what version of Bundler are you running?
<Radar> [11:57:31] <Radar>lucz: what's the rest of that "not a valid platform" message?
<Radar> I think this is at least due to an out-of-date Bundler install. _Probably_ due to an older version of Ruby too.
<RickHull> he did say his system is on 1.9.3
<RickHull> but I bet ruby2 or similar is available
<lucz> ya know you shouldn't always assume you're talking to a dude :)
<RickHull> my apologies :)
<lucz> RickHull: np ;)
nofxx has quit [Remote host closed the connection]
<RickHull> in my head you wield a lightsaber
<Radar> thanks lucz
nofxx has joined #ruby
<lucz> RickHull: fantastic
<Radar> I don't know why Bundler is giving you that error at all. mri_21 isn't specified in the Gemfile.
<lucz> Radar: this was my confusion as well
saneax is now known as saneax-_-|AFK
<Radar> Trying to pull down Discourse source now to grep through it but it's quite large.
<lucz> Radar: it's a bit of a beast
<lucz> Radar: also very fragile
<lucz> Radar: gets upset easily
<RickHull> i was thinking to make a trivial bundler project and start from there
alexar has joined #ruby
tercenya has quit [Remote host closed the connection]
<RickHull> see what bundler is bringing to the table on its own
<Radar> RickHull: I don't think that would work. The problem is the Gemfile from Discourse.
<Radar> You could try copying over the Gemfile from Discourse into a new directory and running `bundle install`, but you'd probably end up with the same problem.
tercenya has joined #ruby
whathappens has quit [Remote host closed the connection]
SteenJobs has quit [Quit: SteenJobs]
nullfxn has quit [Quit: leaving]
Rodya_ has quit [Remote host closed the connection]
notnadir has quit [Quit: Connection closed for inactivity]
<Radar> fwiw, `bundle install` works fine for me running Ruby 2.3.3 locally.
<lucz> Radar: I tried that already :(
<RickHull> maybe worth chruby now :)
<Radar> lucz: Tried copying over the Gemfile?
<lucz> RickHull: Radar ok I'll give that a go
<lucz> Radar: ya
<Radar> lucz: Ok then. Follow that guide to install Ruby 2.3.3 and try again.
markholmes has quit [Ping timeout: 255 seconds]
username_ has quit [Ping timeout: 276 seconds]
mholmes has joined #ruby
<Radar> lucz: uninstall the current version of Ruby you have installed first.
redhedded1 has quit [Ping timeout: 252 seconds]
<RickHull> eh, may not want to `apt remove ruby`
LoneHermit has joined #ruby
alexar_ has joined #ruby
Rodya_ has joined #ruby
<RickHull> you can leave your apt ruby stuff in place
frozengeek__ has quit [Quit: frozengeek__]
<RickHull> chruby and ruby-install will let you have your own ruby and ecosystem, purely local to your user in $HOME
Guest43 has joined #ruby
Guest43 has quit [Changing host]
Guest43 has joined #ruby
<RickHull> as long as you hook chruby first when you log in, then you will use your local ruby/rubies
alexar has quit [Ping timeout: 255 seconds]
<RickHull> sorry, I haven't read the paste -- maybe I'm barking up the wrong tree, dropping out :)
LoneHermit has quit [Ping timeout: 264 seconds]
raul782 has quit []
alxs has joined #ruby
maleghast has joined #ruby
<lucz> RickHull: so I should or shouldn't do all that?
<RickHull> you shouldn't need to apt remove anything ruby related
<RickHull> doing so would probably be very disruptive
marr has quit [Ping timeout: 264 seconds]
<RickHull> let apt do apt, and you can do ruby on your own with chruby and ruby-install
Channel6 has joined #ruby
<RickHull> it's kind of a longstanding problem, in that apt wants to manage ruby but doesn't do a good job of it
dgarstang has joined #ruby
<RickHull> that way, ubuntu can rely on apt's ruby
<lucz> "Under no circumstance should you install Ruby, Rubygems or any Ruby-related packages from apt-get. This system is out-dated and leads to major headaches. Avoid it for Ruby-related packages. We do Ruby, we know what's best. Trust us."
<lucz> lol
<RickHull> and your dev projects can use chruby
<RickHull> apt's ruby is good for the system to use
<RickHull> it's not good for projects
<lucz> RickHull: noted
<RickHull> what instructions are you following for chruby?
<lucz> RickHull: I'm reading the link that Radar pasted: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
<RickHull> cool, yep you're good
<RickHull> note that's over 2 years old. it's a good starting point and is probably fine
<RickHull> but the chruby github page is a better primary reference
gloscombe has quit [Ping timeout: 240 seconds]
<lucz> RickHull: so is it better I follow that?
<RickHull> that page and I are in agreement: hands off with apt's ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull> don't remove anything, don't add anything
workmad3_ has joined #ruby
<lucz> okay
workmad3 has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
nofxx has quit [Remote host closed the connection]
<RickHull> keep both pages open
<RickHull> the blog post is more comprehensive -- a great reference
<RickHull> but keep in mind it can get out of date
<lucz> RickHull: thank you :)
<RickHull> so for every action, refer back to the github page
<RickHull> and see if there is an update
nofxx has joined #ruby
hutch34 has joined #ruby
<RickHull> for example, don't use the 2+ year old versions
<lucz> Right
<RickHull> one step that can be easy to miss is adding it to your login file, and then making sure your active session has it loaded. it's trivial, but easy to miss
<RickHull> e.g. .bashrc
__Yiota has joined #ruby
workmad3_ has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
<lucz> what's the best way to do that?
<RickHull> it's in the instructions
doug2 has joined #ruby
<RickHull> both of them I'm sure
hutch34 has quit [Ping timeout: 258 seconds]
nvms has joined #ruby
dgarstang has quit [Ping timeout: 264 seconds]
nvms has quit [Client Quit]
coffeecupp has joined #ruby
strongcode has quit [Quit: Changing server]
weaksauce has joined #ruby
strongcode has joined #ruby
nvms has joined #ruby
coldfront has joined #ruby
kht has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
brent__ has quit [Remote host closed the connection]
P_R_Deltoid has joined #ruby
<P_R_Deltoid> What is the best practice for grouping a few variables together into a bundle without the use of a class?
<P_R_Deltoid> I was thinking a dictionary or hash, but is that best practice?
<RickHull> best to give an example. do you have a file you can paste?
coffeecupp has quit [Quit: leaving]
aesthetikxx has quit [Quit: WeeChat 1.4]
Guest43 has quit [Quit: Textual IRC Client: www.textualapp.com]
<P_R_Deltoid> Just trying to bundle the "userid" variable with "command" before handing it out to the rest of the problem
<P_R_Deltoid> program*
kht has joined #ruby
jameser has joined #ruby
<Radar> [12:23:11] <RickHull>note that's over 2 years old. it's a good starting point and is probably fine
<RickHull> hashes are fine, but you have to be somewhat disciplined. you can graduate to some form of struct and then a class if you want more rigid behavior
<Radar> First line in the blog post: Last updated: 28th January 2016
<Radar> You were saying?
<RickHull> ah nice
<Radar> Like, did you not even open the page at all?
prawnzy has joined #ruby
<RickHull> I skimmed the code sections :)
antoniobeyah has quit [Quit: Connection closed for inactivity]
<RickHull> still that's almost a year ago :)
coffeecu1p has joined #ruby
gusrub has quit [Remote host closed the connection]
<RickHull> P_R_Deltoid, when I use hashes like this, I like to use Hash#fetch to make sure they have the expected keys
eizua has joined #ruby
<P_R_Deltoid> Fetch creates an exception when the key doesn't exist?
<RickHull> yep
<RickHull> I never rescue them. if that ever gets raised, something is broken. you use fetch only on required fields of course
SeepingN has quit [Ping timeout: 240 seconds]
<RickHull> so you wouldn't use fetch in this code, but in the notify_observers definition
chouhoulis has joined #ruby
<RickHull> that said, your app and development style have to be able to tolerate runtime validation and exceptions
<RickHull> but that's clearly better than no runtime validation
kht has quit [Ping timeout: 255 seconds]
benlieb has joined #ruby
<RickHull> I've seen many hash-passing styles with no validation that end up with unexpected nils everywhere
ur5us has joined #ruby
alxs has quit [Ping timeout: 276 seconds]
coffeecu1p has quit [Quit: leaving]
coffeecu1p has joined #ruby
splud has quit [Quit: splud]
Guest99282 is now known as ged
<P_R_Deltoid> Not a bad idea to be careful that way, no sweat off my back
<P_R_Deltoid> Thanks for the help, RickHull
<P_R_Deltoid> Got it all working now
Rodya_ has quit [Remote host closed the connection]
ged is now known as Guest25050
coffeecu1p has quit [Quit: leaving]
Devalo has joined #ruby
94KAAB8QJ has joined #ruby
<lucz> RickHull: I'm going to have a go at this tomorrow, my brain is fried now. Thanks for all your help (and Radar)
<Radar> no worries lucz :) See you tomorrow.
<lucz> I may loiter in here tomorrow and poke you guys if it doesnt work :D
<RickHull> how far did you get lucz ?
<lucz> RickHull: I didn't, I got pulled away by a director stamping his feet
workmad3_ has joined #ruby
<lucz> RickHull: always fun
alexar_ has quit [Remote host closed the connection]
<RickHull> Mondays...
<lucz> RickHull: indeed
94KAAB8QJ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 258 seconds]
Devalo has quit [Ping timeout: 252 seconds]
coffeecu1p has joined #ruby
coffeecu1p has quit [Client Quit]
coffeecupp has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
whathappens has joined #ruby
govg has quit [Ping timeout: 264 seconds]
ur5us has quit []
prawnzy has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
maloik has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maloik has joined #ruby
coffeecupp has quit [Client Quit]
workmad3_ has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
gusrub has joined #ruby
SteenJobs has joined #ruby
dogweather has quit [Remote host closed the connection]
SteenJobs has quit [Client Quit]
gusrub has quit [Ping timeout: 255 seconds]
prawnzy has joined #ruby
montanonic has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
tvw has quit [Ping timeout: 255 seconds]
StoneCypher has joined #ruby
dogweather has joined #ruby
jenrzzz has joined #ruby
dogweath_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
dogweath_ has quit [Remote host closed the connection]
dogweath_ has joined #ruby
StoneCypher has quit [Ping timeout: 258 seconds]
dogweather has quit [Ping timeout: 276 seconds]
dogweath_ has quit [Client Quit]
alexar has joined #ruby
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
astrobunny has joined #ruby
guacamole has quit [Quit: leaving]
ur5us has joined #ruby
guacamole has joined #ruby
alexar has quit [Ping timeout: 256 seconds]
brent__ has joined #ruby
hanmac has joined #ruby
bkxd has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astrobunny has quit [Remote host closed the connection]
ecuanaso has joined #ruby
brent__ has quit [Ping timeout: 255 seconds]
nankyokusei has joined #ruby
swills has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
swills has joined #ruby
amclain has quit [Quit: Leaving]
redhedded1 has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
petrichorx_ has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
gusrub has joined #ruby
d^sh has joined #ruby
LoneHerm_ has joined #ruby
despai has quit [Quit: Connection closed for inactivity]
Channel6 has quit [Quit: Leaving]
djuber has joined #ruby
Rodya_ has joined #ruby
sspreitz has quit [Ping timeout: 260 seconds]
LoneHerm_ has quit [Ping timeout: 248 seconds]
<RickHull> looking at this example: http://ruby-doc.org/core-2.4.0/Time.html#method-c-at
sspreitz has joined #ruby
<RickHull> > Time.at(946684800, 123456.789).nsec #=> 123456789
<RickHull> >> Time.at(946684800, 123456.789).nsec
<ruby[bot]> RickHull: # => 123456789 (https://eval.in/722643)
<RickHull> the second field is supposed to be microseconds
<RickHull> (with fraction)
nvms has quit [Quit: This computer has gone to sleep]
<RickHull> oh duh
ramfjord_ has quit [Ping timeout: 260 seconds]
<RickHull> nvm, got it
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
duderonomy has quit [Ping timeout: 255 seconds]
Rodya_ has quit [Ping timeout: 255 seconds]
Guest25050 is now known as ged
ged is now known as Guest48067
govg has joined #ruby
Ruby_Rocks_007 has joined #ruby
xall_ has joined #ruby
Pisuke has joined #ruby
pilne has quit [Quit: Quitting!]
nvms has joined #ruby
MyMind has quit [Ping timeout: 276 seconds]
tolerablyjake has joined #ruby
chouhoulis has joined #ruby
A_Drone_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
alxs has joined #ruby
camilasan has joined #ruby
herbmillerjr has quit [Quit: Konversation terminated!]
hutch34 has joined #ruby
A_Drone has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maleghast has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
chouhoulis has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 245 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doug2 has quit [Ping timeout: 255 seconds]
alxs has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
arescorpio has joined #ruby
govg has joined #ruby
vikaton has joined #ruby
alibby1 has quit [Quit: Leaving.]
alibby has joined #ruby
dmtd has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 240 seconds]
gnufied has quit [Quit: Leaving]
AnoHito has quit [Ping timeout: 255 seconds]
alexar has joined #ruby
herbmillerjr has joined #ruby
gusrub has quit [Remote host closed the connection]
Devalo has joined #ruby
gusrub has joined #ruby
duderonomy has joined #ruby
alibby has left #ruby [#ruby]
gusrub has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 255 seconds]
gusrub has joined #ruby
beatdown has joined #ruby
Channel6 has joined #ruby
JoshS has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
alexar has quit [Remote host closed the connection]
Rodya_ has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ori has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
nofxx has joined #ruby
HoloIRCUser1 has joined #ruby
Guest48067 is now known as ged
Rodya_ has quit [Ping timeout: 255 seconds]
HoloIRCUser1 has quit [Client Quit]
ged is now known as Guest10525
juiko has joined #ruby
StoneCypher has joined #ruby
juiko has quit [Read error: Connection reset by peer]
juiko has joined #ruby
StoneCypher has quit [Ping timeout: 258 seconds]
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 260 seconds]
A_Drone has joined #ruby
AnoHito has joined #ruby
jhack has joined #ruby
A_Drone_ has quit [Ping timeout: 260 seconds]
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
StoneCypher has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.7]
koldbrutality has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has quit []
Lord_of_Life has quit [Remote host closed the connection]
nankyokusei has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
StoneCypher has quit [Ping timeout: 248 seconds]
juiko has quit [Ping timeout: 252 seconds]
Xavaier has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mikecmpbll has quit [Quit: inabit. zz.]
nankyokusei has quit [Ping timeout: 248 seconds]
al2o3-cr has joined #ruby
<RickHull> zenspider, al2o3-cr ended up with this: https://github.com/rickhull/device_input/blob/master/lib/device_input.rb
<RickHull> about to make a gem
<RickHull> I did not introspect -- just mapped the documented struct to the pack values in the code
douglascorrea has quit [Ping timeout: 264 seconds]
jhack has quit [Quit: jhack]
<al2o3-cr> RickHull: :)
aupadhye has joined #ruby
govg has quit [Ping timeout: 240 seconds]
Xiti` has quit [Quit: Xiti`]
Xiti has joined #ruby
gix has quit [Ping timeout: 255 seconds]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby
benlieb has joined #ruby
montanonic has quit [Ping timeout: 252 seconds]
maleghast has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
arescorpio has quit [Excess Flood]
<RickHull> havenwood et al, how does chruby deal with sudo? I used be able to invoke chruby path'd executables like: sudo `which progname` arg1 arg2
<RickHull> but I'm having trouble with that now, maybe with behavior change in newer rubies?
<RickHull> having to do with bin path activation
Trynemjoel has quit [Ping timeout: 245 seconds]
<al2o3-cr> RickHull: shouldn't L_ be l_ or l!
<RickHull> al2o3-cr, it looks to me like those aren't 64 bit longs, right?
<RickHull> (from memory, pulling it up now)
StoneCypher has joined #ruby
<al2o3-cr> no 32bit
<RickHull> so you agree L_ is the platform-correct long?
montanonic has joined #ruby
<al2o3-cr> should be l_
<RickHull> signed vs unsigned? it's just `long` in the C
<RickHull> I assumed time values are unsigned
<al2o3-cr> but it's a signed long no?
<RickHull> is it?
jshjsh has joined #ruby
<RickHull> i honestly don't know. it's literally just `long`
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
<al2o3-cr> one sec
<RickHull> when you map it down from the linux headers
<RickHull> see my README.md for my rationale
valeth has quit [Ping timeout: 258 seconds]
StoneCypher has quit [Ping timeout: 258 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> most definitely signed
valeth has joined #ruby
<RickHull> WTFARGHLBARGHL
<RickHull> how do you know?
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> trust me
* RickHull snorts
<al2o3-cr> i'm a magician
<RickHull> we agree that __kernel_time_t is a __kernel_long_t ? and a __kernel_long_t is a long?
<al2o3-cr> yep
<RickHull> what makes it signed or unsigned?
<RickHull> are longs just inherently signed?
tpendragon has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
<RickHull> answer: yes
<RickHull> unless noted as unsigned. TIL
<RickHull> thx al2o3-cr
<al2o3-cr> np ;)
<RickHull> do you like l_ or l! ?
<al2o3-cr> l!
Guest10525 is now known as ged
<RickHull> whatever NOTABUG WONTFIX WORKSFORME
ged is now known as Guest71727
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maleghast has joined #ruby
<RickHull> gem pushed, yay!
hutch34 has quit [Ping timeout: 245 seconds]
LoneHerm_ has joined #ruby
ecuanaso has joined #ruby
<al2o3-cr> \o/
<RickHull> i forgot to give you credit on the long fix ;)
<al2o3-cr> no worries
<al2o3-cr> RickHull: one little typo at bottom of the README change the first usec to sec and everything is sweet
<RickHull> checking, thx
prawnzy has quit [Remote host closed the connection]
montanonic has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<RickHull> is the cr for chromium?
<al2o3-cr> yep, hehe
<RickHull> what's that give you? i'm familiar enough with aluminum oxide (anodizing etc) and chromium in steel as a hobbyist
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> i read that as corundum :(
<al2o3-cr> but yeah
petrichorx_ has quit [Quit: Connection closed for inactivity]
<al2o3-cr> i wanted al2o3:cr but that was erroneous
<RickHull> there was a bot named corundum a long time ago in a galaxy far far away
<RickHull> known as #ruby-lang
troys has joined #ruby
ecuanaso has joined #ruby
<al2o3-cr> so long #ruby-lang
jenrzzz has quit [Ping timeout: 258 seconds]
skweek has joined #ruby
rajat has joined #ruby
nofxxx has joined #ruby
_djbkd has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
nofxx has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
<RickHull> anyone want to talk bin activation and sudo? with a helping of chruby?
A_Drone has quit []
squ has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
<havenwood> RickHull: How about?: sudo chruby-exec ruby-2.3 -- devsniff /dev/input/event0
<RickHull> i'm workign around it at the moment with sudo ruby -Ilib bin/devsniff
<havenwood> RickHull: Or `sudo -s` then source chruby and set your Ruby and run the command.
Ruby_Rocks_007 has joined #ruby
<RickHull> (bypassing the gem, using the working dir on filesystem)
<RickHull> let me try those in a sec, thx
ifctj has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
AnoHito_ has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ruby
AnoHito has quit [Ping timeout: 240 seconds]
xall_ has quit [Read error: No route to host]
troys has quit [Quit: Bye]
xall_ has joined #ruby
wugy has joined #ruby
wugy has quit [Excess Flood]
wugy has joined #ruby
wugy has quit [Excess Flood]
Rodya_ has joined #ruby
wugy has joined #ruby
wugy has quit [Excess Flood]
wugy has joined #ruby
wugy has quit [Excess Flood]
Rodya_ has quit [Ping timeout: 255 seconds]
LoneHerm_ has quit [Remote host closed the connection]
nug has quit [Ping timeout: 240 seconds]
unshadow has quit [Quit: leaving]
gnarld_ has joined #ruby
benlieb has quit [Quit: benlieb]
nowz has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
Zamyatin has quit [Quit: Knocking out. Peace y'all...]
nvms has quit [Quit: This computer has gone to sleep]
nvms has joined #ruby
teclator has joined #ruby
tpendragon has joined #ruby
nvms has quit [Client Quit]
Ruby_Rocks_007 has left #ruby [#ruby]
nvms has joined #ruby
Guest71727 is now known as ged
ged is now known as Guest64694
brent__ has joined #ruby
nankyokusei has joined #ruby
brent__ has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
montanonic has joined #ruby
kazlock has joined #ruby
kazlock_ has joined #ruby
kazlock has left #ruby [#ruby]
lxsameer has joined #ruby
<kazlock_> Hi, I'm trying to write a Rake task to render an erb template with parameters from a json file, is there a simple way to do this?
matp has quit [Remote host closed the connection]
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matp has joined #ruby
<dminuoso> kazlock_: Show us what you have tried so far.
<dminuoso> kazlock_: Don't let your erb template know about JSON or files though. Do that before you start rendering the erb template.
<dminuoso> Load the file, deserialize your objects and transform them into parameters (after whatever white/blacklisting you require), and then render your template.
ruby-lang710 has joined #ruby
dionysus69 has joined #ruby
<kazlock_> dminuoso: I was able to load the parameters, the trouble is converting them to a binding for ERB.result
<dminuoso> kazlock_: Please show us code.
<dminuoso> kazlock_: Pass a straight binding to #result
hutch34 has joined #ruby
<kazlock_> What's a straight binding?
<dminuoso> &ri Binding
Rodya_ has joined #ruby
maleghast has joined #ruby
<kazlock_> Is that not what I'm doing?
<kazlock_> on line 13
nowz has quit [Ping timeout: 255 seconds]
<dminuoso> &ri instance_eval
<dminuoso> kazlock_: ^- does that say it returns a binding?
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
nowz has joined #ruby
<kazlock_> I guess not
<dminuoso> :)
<dminuoso> Oh wait
<dminuoso> Im silly
eizua has quit [Quit: Leaving]
<dminuoso> It does.
<dminuoso> kazlock_: My apologies, it's a bit early and I haven't had my coffee yet.
<kazlock_> no worries, I have no idea what's going on
<dminuoso> kazlock_: Can you show your ERb template?
<RickHull> havenwood, sorry it took so long
<RickHull> with chruby-exec: bash: chruby: command not found
Rodya_ has quit [Ping timeout: 255 seconds]
<dminuoso> RickHull: You forgot to load chruby
Mr_Pancake has quit [Ping timeout: 240 seconds]
<RickHull> yep, this is trying to make sudo happy without too much effort
<dminuoso> RickHull: What kind of shell do you have? login? non-login? interactive? non-interactive?
<RickHull> what's the test again?
<RickHull> i'm in xterm in openbox
<RickHull> on debian
CloCkWeRX has quit [Quit: Leaving.]
<dminuoso> RickHull: That diagram explains which files get sourced under which conditions. So the matter of where you need to load chruby depends on what kind of shell you have.
ta__ has quit [Remote host closed the connection]
<RickHull> dminuoso, right -- my user is all set
<RickHull> my user has a gem installed, which includes an executable
<RickHull> sudo that_exe # doesn't work
<RickHull> for semi-obvious reasons
<RickHull> in the past, sudo `which that_exe` would work for me
<RickHull> but i think the bin stubs or bin activation works differently now
<dminuoso> kazlock_: Does the object actually have an instance variable @required_plugins ?
<kazlock_> dminuoso: I was trying to figure out how to check the variables in the binding before I came here
Mr_Pancake has joined #ruby
<dminuoso> kazlock_: It may be easier to not pry into an object like you did with instance_eval
ddffg has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
<dminuoso> kazlock_: Provide a wrapper class that a) has a get_binding method, and b) has some accessors or instance variables that you can then use directly inside your erb once you pass the wrapper class objects binding.
jameser has joined #ruby
<dminuoso> Does this make any sense?
<kazlock_> dminuoso: changing @required_plugins => required_plugins fixed it O_o
<dminuoso> kazlock_: Yes, because @required_plugins is a specific instance variable that the object does not have.
Ishido has joined #ruby
minimalism has quit [Quit: minimalism]
<kazlock_> I see
<dminuoso> kazlock_: when you do foo.bar it doesn't impliciltly do a foo.instance_variable_get(:@bar), but foo.send(:bar)
<RickHull> that particular bit of UX with ERb seems unfortunate to me. it kind of does what you think but really not
<dminuoso> kazlock_: Do you have pry?
<kazlock_> I don't have enough ruby experience to fully understand what you just said
<dminuoso> kazlock_: It may be much much easier if you have pry.
<kazlock_> what is pry?
<dminuoso> kazlock_: It's like irb except tons better.
<dminuoso> It's half a debugger basically
<kazlock_> Oh I've heard of pry
nowz has quit [Remote host closed the connection]
<dminuoso> kazlock_: You can then "cd params" and then inspect the object from inside its context
<dminuoso> view what methods it has
<dminuoso> view what instance variables it has
<dminuoso> Amongst many other things
nowz has joined #ruby
<dminuoso> kazlock_: If you explire this yourself, it may become immediately obvious. :)
<dminuoso> RickHull: First, running ruby stuff under root it something you should not do or want.
<RickHull> it is if I'm reading /dev/input :)
<dminuoso> RickHull: So can we first establish the actual need to run ruby as root, before I tell you how?
nowz has quit [Remote host closed the connection]
<RickHull> i can set up a chruby for root, but really I'm interested in sudo working as expected with chruby'd executables
<RickHull> it's a bug in chruby IMHO
<RickHull> or a notable, at least
<dminuoso> roger_rabbit: Change the permissions in udev or whatever you are using.
<dminuoso> RickHull: I mean
<RickHull> sure, I know how to work around it
<dminuoso> RickHull: Using root just because the permissions of the file are "wrong" is dangerous and not something you should get accustomed to.
<RickHull> thanks...
<kazlock_> dminuoso, thanks for your help, I'll check out pry some time
<dminuoso> RickHull: The way that chruby works is by just modifying PATH. Where does that_exe lie in?
<RickHull> just to make sure you're not barking up the wrong tree...
<RickHull> everything works fine for my regular user
_djbkd has quit [Quit: My people need me...]
gnarld_ is now known as nug
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull> but it's at /home/rwh/.gem/ruby/2.4.0/bin/devsniff
<RickHull> the problem is that when sudo tries to execute this file, the bin activation breaks
xcesariox has joined #ruby
<RickHull> i pasted a gist earlier...
agit0 has joined #ruby
nowz has joined #ruby
astrobunny has quit [Remote host closed the connection]
Mortomes|Work has joined #ruby
astrobunny has joined #ruby
last_staff has joined #ruby
anisha has joined #ruby
dmtd has quit [Quit: Connection closed for inactivity]
Lord_of_Life has joined #ruby
kazlock_ has quit [Quit: This computer has gone to sleep]
StoneCypher has joined #ruby
<zacts> hi rubyists
_djbkd has joined #ruby
_djbkd has quit [Client Quit]
<al2o3-cr> RickHull: nice, unfortuntely i'm gr33n7007h on github (someone inpersonating me heh)
<RickHull> ferreal?
nowhere_man has quit [Ping timeout: 258 seconds]
<al2o3-cr> yep
ifctj has quit [Ping timeout: 255 seconds]
<RickHull> just a name collision or is there a backstory?
StoneCypher has quit [Ping timeout: 258 seconds]
<al2o3-cr> a name collision
<RickHull> is it a pop culture reference or something?
<al2o3-cr> what the name?
<RickHull> ya, it seems so obscure to me, i'm surprised
ferr1 has joined #ruby
<al2o3-cr> it's the chemical formula for ruby
conta has joined #ruby
<RickHull> oh duh
* RickHull hides
Silthias has quit [Ping timeout: 258 seconds]
<RickHull> like I said, hobbyist (with metals). no chemist that's for sure
<al2o3-cr> :)
<al2o3-cr> really need to update my profile on github
rajat has quit [Ping timeout: 264 seconds]
walterheck has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
Silthias has joined #ruby
aganov has joined #ruby
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest64694 is now known as ged
ged is now known as Guest43060
Snowy has joined #ruby
blaxter has joined #ruby
frozengeek__ has joined #ruby
Snowy has quit [Ping timeout: 264 seconds]
ledestin has joined #ruby
nowz has quit [Remote host closed the connection]
djbkd_ has joined #ruby
maleghast has joined #ruby
charliesome has joined #ruby
aufi has joined #ruby
Moosashi has joined #ruby
<RickHull> speaking of which, corundum is very closely related to anodizing, as in using electricity to put a protective oxide layer on aluminum alloy
AnoHito_ has quit [Read error: Connection reset by peer]
AnoHito_ has joined #ruby
sebastia_ has joined #ruby
sebastiansier has quit [Read error: Connection reset by peer]
davezd has joined #ruby
saneax-_-|AFK is now known as saneax
frozengeek__ has quit [Quit: frozengeek__]
govg has quit [Ping timeout: 260 seconds]
nowz has joined #ruby
nowz has quit [Remote host closed the connection]
montanonic has quit [Ping timeout: 240 seconds]
nowz has joined #ruby
TomyLobo has joined #ruby
dhollinger has quit [Ping timeout: 245 seconds]
James123 has joined #ruby
SesMan has joined #ruby
nowhere_man has joined #ruby
blaxter has quit [Quit: foo]
dhollinger has joined #ruby
minimalism has joined #ruby
dionysus69 has quit [Remote host closed the connection]
teclator has quit [Ping timeout: 252 seconds]
govg has joined #ruby
McSoFake has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agit0 has joined #ruby
electrostat has quit [Quit: uwotm8]
antgel has joined #ruby
Burgestrand has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BTRE has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
BTRE has joined #ruby
frozengeek__ has joined #ruby
electrostat has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
minimalism has quit [Quit: minimalism]
BTRE has quit [Ping timeout: 260 seconds]
zacts has quit [Quit: WeeChat 1.7]
coffeecupp has joined #ruby
flying has joined #ruby
mikecmpbll has joined #ruby
agit0 has quit [Read error: No route to host]
BTRE has joined #ruby
ta has joined #ruby
nvms has quit [Quit: This computer has gone to sleep]
hutch34 has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.7]
Guest43060 is now known as ged
Rodya_ has joined #ruby
ged is now known as Guest21103
blackmes1 has joined #ruby
vuoto has joined #ruby
Cohedrin_ has joined #ruby
rajat has joined #ruby
Rodya_ has quit [Ping timeout: 252 seconds]
al2o3-cr has joined #ruby
jeffmess has joined #ruby
<jeffmess> Hey guys, I’m about to begin integrating our product with a 3rd party service, they seem to require us sending tcp packets over ipsec. Sys admin and networking is not my strong suit, should I be setting up port forwarding so that when my app makes calls via tcp it forwards those connections through the ipsec connection? I would also like to have this setup inside a docker container so I can easily move from our test server to our productio
<jeffmess> n machines. Aside from the port forwarding has anyone dealt with anything like this before?
<RickHull> not really a #ruby question...
hutch34 has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
Mia has joined #ruby
teclator has joined #ruby
<RickHull> but it sounds fairly reasonable on its face, though I don't know about the ipsec stuff.
Axy has quit [Ping timeout: 248 seconds]
Moosashi has quit [Quit: Moosashi]
smswmedia has joined #ruby
rkazak has joined #ruby
P_R_Deltoid has quit [Quit: Leaving]
charliesome has joined #ruby
zacts has joined #ruby
xall_ has quit [Read error: Connection reset by peer]
meshsmith has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xall_ has joined #ruby
coffeecupp has quit [Quit: leaving]
JeanCarloMachado has joined #ruby
coffeecu1p has joined #ruby
nettoweb has joined #ruby
coffeecu1p has quit [Client Quit]
charliesome has joined #ruby
<jeffmess> thx RickHull, I know it's not a ruby question but when I ask sysadmins they start asking what firewalls and stuff I have running.
<jeffmess> I've stumbled across this which I think could work: https://hub.docker.com/r/ubergarm/l2tp-ipsec-vpn-client/
matp has quit [Remote host closed the connection]
renchan has joined #ruby
matp has joined #ruby
TheWhip has joined #ruby
drptbl has joined #ruby
StoneCypher has joined #ruby
rajat has quit [Remote host closed the connection]
cajone has quit [Ping timeout: 248 seconds]
aupadhye has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
StoneCypher has quit [Ping timeout: 264 seconds]
govg has quit [Ping timeout: 240 seconds]
govg has joined #ruby
aupadhye has joined #ruby
Beams has joined #ruby
marr has joined #ruby
Chair has joined #ruby
Snowy has joined #ruby
Chair is now known as Couch
djbkd_ has quit [Remote host closed the connection]
djbkd_ has joined #ruby
jenrzzz has joined #ruby
djbkd_ has quit [Ping timeout: 240 seconds]
cajone has joined #ruby
pskosinski_ has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
TvL2386 has joined #ruby
bartzy has joined #ruby
<bartzy> Hi! I don’t know any Ruby and am trying to port an algorithm that works very nice to mix colors (from the Sass framework): https://github.com/sass/sass/blob/0154f6589cd438c0389963416e25340bc55b4358/lib/sass/script/functions.rb#L1313
Devalo has quit [Ping timeout: 264 seconds]
<bartzy> Can anyone explain a few basic concepts? For example, what `rgba = color1.rgb.zip(color2.rgb).map {|v1, v2| v1 * w1 + v2 * w2}` means, and what `<<` means in this context: `rgba << color1.alpha * p + color2.alpha * (1 - p)`
Guest21103 is now known as ged
ged is now known as Guest82778
pandaant has joined #ruby
JeanCarloMachado has joined #ruby
jameser has quit [Ping timeout: 276 seconds]
<RickHull> zip means to take two arrays and interleave them into one array
<RickHull> (kind of like the two halves of a zipper coming together)
<RickHull> so we're making rgba by zipping up color1 and color2
<RickHull> then map means to consider each item of the array (or collection)
<bartzy> why does it make rgba, if you took color1.rgb and color2.rgb
<bartzy> ok, so what is v1,v2? I thought it should only have a single element?
sspreitz has quit [Quit: ZNC 1.6.2 - http://znc.in]
<bartzy> zip makes a tuple out of the 2 arrays?
<RickHull> it happens in stages
<tobiasvl> bartzy: it makes an array out of the tuples
<RickHull> we start with 2 arrays
<RickHull> then we zip them into one array
<RickHull> then we map over them
<RickHull> meaning, consider each item of the zipped array
TheHodge has joined #ruby
<bartzy> yeah but if this is a one-dimensional array, then why there are 2 variables in the map function? (v1,v2) ?
<RickHull> the items of the array are not scalars
<RickHull> they could be 2-arys or ... not sure
<RickHull> oh wait
<RickHull> i'm sorry
<tobiasvl> bartzy: the 2 variables are from the tuples
<bartzy> ok so it is a tuple
<RickHull> yes
<tobiasvl> it is an array of tuples, yes
<RickHull> >> [1,2,3].zip([:a, :b, :c])
<ruby[bot]> RickHull: # => [[1, :a], [2, :b], [3, :c]] (https://eval.in/722834)
<bartzy> ok so now we have a flat array of floats in rgba
<bartzy> what << means when the left operand is an array?
<tobiasvl> for each element in color1.rgb and color2.rgb, combine those two elements together in a tuple, and then make an array of all the tuples. then for each of those tuples/pairs, do some arithmetic on them
<RickHull> append to the array
<RickHull> mutate it
<bartzy> ok so they append the alpha component to the rgb they calculated
<bartzy> awesome! Thanks :)
<tobiasvl> yep, << is append for arrays
<bartzy> Now let’s see how writing this in Swift works out ;)
<tobiasvl> godspeed
<bartzy> thanks
jsrn_ has joined #ruby
UnknownSoldier has joined #ruby
mim1k|work has quit [Ping timeout: 252 seconds]
<jokke> hi
ur5us has quit [Remote host closed the connection]
mim1k|work has joined #ruby
unshadow has joined #ruby
biberu has joined #ruby
<jokke> i've never done anything with jruby so i thought i'd just give it a try and bundled my project with jruby. i needed to add platforms: :ruby to some gems with native extensions but so far so good. However when i ran my specs i was surprised to see jruby performing _way_ worse than native ruby
<jokke> the specs ran in 30secs as opposed to 5 secs in native ruby
<jokke> quite the opposite of what i'd expect from http://benchmarksgame.alioth.debian.org/u64q/jruby.html
<jokke> well it depends i guess
<maleghast> @jokke - You are probably paying for the JVM startup cost there... If you use one of the ways of keeping a JVM warm you should see comparable performance to MRI or perhaps better.
<jokke> maleghast: could i simulate this somehow?
<jokke> or: what ways do you mean?
<RickHull> >> "%#0.2x" % 1
<ruby[bot]> RickHull: # => "0x01" (https://eval.in/722882)
Silthias has quit [Ping timeout: 240 seconds]
<RickHull> >> "%#0.2x" % 0
<ruby[bot]> RickHull: # => "00" (https://eval.in/722888)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull> boosh, where's ma 0x
<maleghast> @jokke - I don't know... hold on a sec.
<RickHull> >> 0.upto(5).map { |i| "%#0.2x" % i }
<ruby[bot]> RickHull: # => ["00", "0x01", "0x02", "0x03", "0x04", "0x05"] (https://eval.in/722890)
hightower2 has joined #ruby
<RickHull> one of these is not like the others, just doesn't belong
<maleghast> @jokke - Try this as a first port of call... https://github.com/jruby/jruby/wiki/Improving-startup-time
<maleghast> It's been about 4 years since I used JRuby, but I do use Clojure and the startup penalty is bad, until you find ways to deal with it ;-)
UnknownSoldier has quit [Remote host closed the connection]
Silthias has joined #ruby
<RickHull> also Truffle / Graal / whatever look very promising
blackmes1 has quit [Ping timeout: 240 seconds]
vasilakisfil has joined #ruby
<vasilakisfil> is it only me who things that active model serializers are a bit messed up ??
nankyokusei has joined #ruby
<RickHull> though hm, it looks like a lot of truffle just got sucked out of jruby. or is that just a rename / integration?
<chrisseaton> RickHull: it's now at https://github.com/graalvm/truffleruby
Fernando-Basso has joined #ruby
charliesome has joined #ruby
<RickHull> ah cool, I thought I heard something like that, but I haven't been paying attention. just got back into a bit of ruby after a long layoff :)
nankyokusei has quit [Ping timeout: 256 seconds]
blackmes1 has joined #ruby
djbkd_ has joined #ruby
<jokke> hmm i tried nailgun server
<jokke> but it doesn't seem to run in the bundle
<jokke> i get errors like LoadError: no such file to load -- rspec/core/rake_task
jenrzzz has quit [Ping timeout: 258 seconds]
<jokke> and jruby -G --ng-server doesn't work either
<jokke> Exception in thread "main" java.lang.RuntimeException: JRuby's Nailgun server can only receive arguments via -X or -J-D properties.
stan has quit [Read error: Connection reset by peer]
nowz has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 240 seconds]
rkazak has quit [Quit: Sleep.....ing....]
TheWhip has quit [Read error: Connection reset by peer]
TheWhip_ has joined #ruby
stan has joined #ruby
<chrisseaton> jokke: ask in #jruby (but a bit later in the day) and they'll help you with this
<jokke> alright
<jokke> thanks
<chrisseaton> They're in US Eastern time zones
xen0fon has joined #ruby
Rodya_ has joined #ruby
aswen has joined #ruby
mim1k|work has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
jshjsh has joined #ruby
mim1k|work has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
JoshS has quit [Ping timeout: 240 seconds]
Silthias has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Moosashi has joined #ruby
djbkd_ has quit [Ping timeout: 256 seconds]
xall_ has joined #ruby
Guest82778 is now known as ged
BackEndCoder has quit [Excess Flood]
ged is now known as Guest16813
vuoto has quit [Remote host closed the connection]
BackEndCoder has joined #ruby
StoneCypher has joined #ruby
StoneCypher has quit [Ping timeout: 252 seconds]
vuoto has joined #ruby
nahra has quit [Read error: Connection reset by peer]
nahra has joined #ruby
jeffmess has quit []
blackmes1 has quit [Ping timeout: 245 seconds]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
gajus has joined #ruby
Beams_ has joined #ruby
xall_ has quit [Ping timeout: 248 seconds]
Beams has quit [Ping timeout: 240 seconds]
Moosashi has quit [Quit: Moosashi]
<RickHull> wow, watching the keyboard input as a live hex dump is mesmerizing. I could sell this as a hacker scene to a movie
<RickHull> the cool looking part is just the tv_usec rushing by on every event though :/
whiteline has quit [Quit: Leaving]
whiteline has joined #ruby
Beams has joined #ruby
jaruga____ has joined #ruby
pskosinski_ has quit [Changing host]
pskosinski_ has joined #ruby
pskosinski_ has joined #ruby
pskosinski_ is now known as pskosinski
Beams_ has quit [Ping timeout: 240 seconds]
SesMan has joined #ruby
zapata has quit [Quit: WeeChat 1.7]
govg has quit [Ping timeout: 255 seconds]
hightower3 has quit [Ping timeout: 260 seconds]
blackmes1 has joined #ruby
drptbl_ has joined #ruby
hightower3 has joined #ruby
sparch has joined #ruby
drptbl has quit [Ping timeout: 248 seconds]
aswen has quit [Quit: WeeChat 1.5]
aryaching_ has joined #ruby
meshsmith has quit [Remote host closed the connection]
aryaching has quit [Read error: Connection reset by peer]
sniffer has quit [Quit: No Ping reply in 180 seconds.]
mholmes has quit [Read error: Connection reset by peer]
sniffer has joined #ruby
djbkd_ has joined #ruby
kht has joined #ruby
zapata has joined #ruby
CloCkWeRX has joined #ruby
gregf_ has quit [Quit: Page closed]
saneax is now known as saneax-_-|AFK
psychicist__ has joined #ruby
DaveTaboola has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
Moosashi has joined #ruby
kht has quit [Ping timeout: 256 seconds]
millerti has joined #ruby
sepp2k has joined #ruby
matp has joined #ruby
gregf_ has joined #ruby
Guest16813 is now known as ged
ged is now known as Guest61977
Moosashi has quit [Quit: Moosashi]
Ishido has quit [Remote host closed the connection]
davezd has quit [Quit: Leaving]
notnadir has joined #ruby
djbkd_ has quit [Ping timeout: 245 seconds]
McSoFake has quit [Quit: WeeChat 1.7]
douglascorrea has joined #ruby
drptbl_ has quit [Quit: See you later!]
nowhere_man has quit [Ping timeout: 255 seconds]
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
notnadir has quit []
jameser has joined #ruby
duckpupp1 has joined #ruby
maleghast has joined #ruby
TheWhip_ has quit []
CloCkWeRX has quit [Quit: Leaving.]
nankyokusei has joined #ruby
nadir has joined #ruby
tlaxkit has joined #ruby
Silthias1 has joined #ruby
Silthias2 has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Silthias has quit [Ping timeout: 256 seconds]
nankyokusei has quit [Ping timeout: 245 seconds]
negatifze has joined #ruby
bmurt has joined #ruby
Silthias1 has quit [Ping timeout: 276 seconds]
braunr has joined #ruby
<braunr> hello
aupadhye has quit [Quit: Leaving]
<braunr> is it possible to have devkit installed (on windows) and keep an existing mingw installation in PATH ?
<braunr> and everything working as intended ?
workmad3 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
Rodya_ has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
hutch34 has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
tyang has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
pandaant has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
Snowy has quit [Ping timeout: 264 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lord_of_Life has quit [Excess Flood]
Lord_of_Life has joined #ruby
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #ruby
Lord_of_Life has joined #ruby
ifctj has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
Snowy has joined #ruby
c355e3b has joined #ruby
Ruby_Rocks_007 has joined #ruby
chouhoulis has joined #ruby
Gayathri_ has joined #ruby
nowz has joined #ruby
nowz has quit [Client Quit]
<Gayathri_> Iam a beginner to open source and willing to contribute to open source can anyone please suggest me how to begin
<LambdaSix> Find a project you like the sound of and poke around the issue list for low-hanging fruit stuff?
vuoto has quit [Ping timeout: 240 seconds]
Guest61977 is now known as ged
<Gayathri_> At first I need to set up an environment right?
<LambdaSix> Uh, well, not beyond a standard environment for that project
ged is now known as Guest93415
whiteline has quit [Quit: Leaving]
<LambdaSix> (I'm guessing ruby, which you probably already have setup if you're a ruby dev..?)
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Gayathri_> no
<Gayathri_> Iam not a ruby dev
<LambdaSix> Step 1) Learn $language
<canton7> how come you're asking in the #ruby channel, then? :)
<LambdaSix> canton7: Oh, hey
<LambdaSix> canton7: You polyglotal nerd
<canton7> o/
brent__ has joined #ruby
nettoweb has joined #ruby
<Gayathri_> I mean that I din't do so much till now
ecuanaso has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
<herwin> Gayathri_: there are multiple ways to contribute to open source without coding (thus not needing a development setup)
<herwin> the talk at https://www.youtube.com/watch?v=6jUe-9Y__KM shows a few of them
<Gayathri_> ok I will see it
bigkevmcd has quit [Ping timeout: 240 seconds]
ecuanaso has quit [Client Quit]
Derperperd has joined #ruby
bigkevmcd has joined #ruby
saneax-_-|AFK is now known as saneax
whiteline has joined #ruby
Derperperd has quit [Ping timeout: 255 seconds]
bigkevmcd has quit [Ping timeout: 240 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
hightower3 has quit [Ping timeout: 276 seconds]
polysics has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhack has joined #ruby
jhack has quit [Client Quit]
nettoweb has joined #ruby
Ruby_Rocks_007 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djuber has quit [Ping timeout: 256 seconds]
jhack has joined #ruby
djbkd_ has joined #ruby
nofxxx has quit []
Ruby_Rocks_007 has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
frozengeek__ has quit [Quit: frozengeek__]
harfangk has joined #ruby
frozengeek__ has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 240 seconds]
whiteline has quit [Remote host closed the connection]
whiteline has joined #ruby
ruby-lang664 has joined #ruby
polishdub has joined #ruby
patarr has joined #ruby
workmad3 has joined #ruby
rfoust has joined #ruby
whiteline has quit [Remote host closed the connection]
whiteline has joined #ruby
djbkd_ has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
lmc has joined #ruby
ferr1 has quit [Quit: WeeChat 1.6]
<al2o3-cr> chow for now
a1fa has quit [Remote host closed the connection]
al2o3-cr has quit [Quit: WeeChat 1.7]
a1fa has joined #ruby
<apeiros> zombie chow? good card. good card. sad it's gone.
mostlybadfly has quit [Quit: Connection closed for inactivity]
DLSteve has joined #ruby
`tim` has joined #ruby
saslam has joined #ruby
__Yiota has joined #ruby
ben_____ has quit []
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lord_of_Life has quit [Excess Flood]
gnufied has joined #ruby
ja_ has joined #ruby
maleghast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cibs has quit [Ping timeout: 240 seconds]
<ja_> Hi, Is there a way to call a Proc using a string or symbol?
malconis_ has joined #ruby
<herwin> is there any connection between the proc and the string/symbol?
tomphp has quit [Read error: Connection reset by peer]
tomphp_ has joined #ruby
<ja_> herwin: yep. the string is the name of an already defined Proc
bmurt has joined #ruby
<ja_> I know I can use eval, by I try to avoid it
Lord_of_Life has joined #ruby
saslam has quit [Ping timeout: 255 seconds]
cibs has joined #ruby
patarr has quit [Ping timeout: 256 seconds]
jameser has joined #ruby
patarr has joined #ruby
malconis has quit [Ping timeout: 260 seconds]
`tim` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andikr has joined #ruby
<apeiros> ja_: procs don't have names
<apeiros> ja_: you're probably referring to the variable name
<apeiros> and if so, then you're trying to abuse the variable system as a hash. don't.
<apeiros> the outside of a scope has zero business knowing the internals of your scope.
workmad3 has quit [Ping timeout: 240 seconds]
J_Darnley has joined #ruby
hutch34 has joined #ruby
<J_Darnley> Where can I get help with this ruby bundle POS?
rippa has joined #ruby
<apeiros> POS?
<J_Darnley> piece of shit
nankyokusei has joined #ruby
`tim` has joined #ruby
<RickHull> wow. rude
SesMan has joined #ruby
<apeiros> oh. J_Darnley, a well meant tip: fix your attitude before seeking help. it doesn't do any good. you may well be pissed, maybe even for a good reason. but just don't.
<ja_> apeiros: you are right
<apeiros> J_Darnley: you can ask here, and I think bundler has its own channel too
Guest93415 is now known as ged
ged is now known as Guest61784
benlieb has joined #ruby
<apeiros> ja_: maybe gist your code, so we can give you advice on how to restructure your problem?
<J_Darnley> Then... I need to fix some problem with a "gem" that doesn't compile. How can I make bundle not overwrite the changes I make to the source when I execute `bundle install`
ciao has joined #ruby
ciao has left #ruby [#ruby]
<apeiros> J_Darnley: you'll have to tell it in the Gemfile that it should use your local path instead of the global
<apeiros> I assume you cloned the repository of the gem?
<J_Darnley> No. I got it by runnig `bundle install`
Rodya_ has joined #ruby
<apeiros> oh, you modified it in place? that's not supported.
workmad3 has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
<J_Darnley> WTF
<apeiros> either download the gem and unpack it into a directory, or clone the repo. fix it there. then tell bundler to use that directory via path/git option
<apeiros> J_Darnley: I don't know of any package manager which will keep your modifications you made in place.
jrafanie has joined #ruby
<apeiros> not really a WTF. you don't go manipulating packages which are under a package managers control.
<J_Darnley> The OS's package manager would. Why the heck does this rubbish have its own?
<apeiros> no, it won't. if you install a package, modify it, and reinstall the package, your changes are gone. if not, please tell me of that special package manager which handles things differently.
<J_Darnley> Bollocks. I'll just roll back instead of trying to understand this insanity.
J_Darnley has left #ruby [#ruby]
* apeiros should pay heed to the red flag that is bad attitude…
patarr has quit [Ping timeout: 256 seconds]
ReK2GnULinuX has quit [Ping timeout: 248 seconds]
<Papierkorb> Looks like he's confusing ruby (C?) source code with config files (as in, they're usually not overwritten by packet managers) with the binaries (which are)
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
`tim` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> Papierkorb: as I understood it, they patched the downloaded source
<Papierkorb> That's what I got from it too
sdothum has joined #ruby
<apeiros> anyway, I should stop trying to deal with people who behave like angry bulls.
`tim` has joined #ruby
TinkerTyper has quit [Quit: ZNC - http://znc.in]
<Papierkorb> apeiros: You tried to help, there's nothing to be feel bad about from your end
patarr has joined #ruby
statelesscode has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Read error: Connection reset by peer]
frozengeek__ has quit [Quit: frozengeek__]
frozengeek__ has joined #ruby
tomphp has joined #ruby
statelesscode has joined #ruby
douglascorrea has quit [Ping timeout: 245 seconds]
ta has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<apeiros> Papierkorb: thank you
sid_fules has joined #ruby
bkxd has joined #ruby
hs366 has joined #ruby
walterheck has quit [Ping timeout: 248 seconds]
`tim` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
UserJosh has joined #ruby
patarr has quit [Ping timeout: 245 seconds]
ifctj has quit [Ping timeout: 240 seconds]
Xentil has joined #ruby
jshjsh has quit [Ping timeout: 245 seconds]
ifctj has joined #ruby
anisha has quit [Quit: Leaving]
blackbombay has quit [Ping timeout: 276 seconds]
xen0fon has quit [Quit: xen0fon]
tvw has quit [Remote host closed the connection]
cdg has joined #ruby
RickHull has quit [Ping timeout: 255 seconds]
djbkd_ has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
hs366 has quit [Quit: Leaving]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
xangria has joined #ruby
xangria has quit [Read error: Connection reset by peer]
djbkd_ has quit [Ping timeout: 255 seconds]
gnufied has quit [Remote host closed the connection]
ifctj has quit [Ping timeout: 255 seconds]
xangria has joined #ruby
unshadow has quit [Quit: leaving]
xen0fon has joined #ruby
xen0fon has quit [Client Quit]
gnufied has joined #ruby
hightower3 has joined #ruby
`tim` has joined #ruby
malconis_ has quit [Read error: Connection reset by peer]
malconis has joined #ruby
UnknownSoldier has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
statelesscode has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
UnknownSoldier has joined #ruby
mikecmpb_ has joined #ruby
patarr has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
poolside has joined #ruby
chouhoulis has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 260 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
chouhoulis has joined #ruby
antoniobeyah has joined #ruby
statelesscode has joined #ruby
jhack has quit [Quit: jhack]
patarr has quit [Ping timeout: 258 seconds]
blackmes1 has joined #ruby
nowz has joined #ruby
ecuanaso has joined #ruby
jhack has joined #ruby
workmad3 has joined #ruby
negatifze has joined #ruby
walterheck has joined #ruby
GooseYArd has quit [Remote host closed the connection]
aufi has quit [Ping timeout: 260 seconds]
<Fernando-Basso> We say "use while as a modifier". What if it is not as a modifier, then it is a "normal value" or "the while loop" or "the while construct"?
xangria has quit [Read error: Connection reset by peer]
<Fernando-Basso> s/normal value/normal while/
xangria has joined #ruby
sid_fule_ has joined #ruby
blackbombay has joined #ruby
douglascorrea has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
Gayathri_ has quit [Quit: Connection closed for inactivity]
jhack has quit [Quit: jhack]
sid_fules has quit [Ping timeout: 264 seconds]
patarr has joined #ruby
<Fernando-Basso> while statement?
jhack has joined #ruby
Guest61784 is now known as ged
ged is now known as Guest2994
TvL2386 has quit [Remote host closed the connection]
lele has quit [Quit: Coyote finally caught me]
ironcame1 is now known as ironcamel
ori has left #ruby ["Leaving..."]
patarr has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
skweek has joined #ruby
Definity has joined #ruby
tinti has joined #ruby
cpruitt has joined #ruby
poolside has quit [Remote host closed the connection]
lele has joined #ruby
<Definity> Hi, If i am making a REST call and getting JSON back whats the best way to populate the models with the results from the model itself or from a controller?
<toretore> Definity: is this a rails question?
hightower3 has quit [Ping timeout: 258 seconds]
<Definity> Ah sorry wrong question, I thought I was in #rails
UnknownSoldier has quit [Remote host closed the connection]
xangria has quit [Read error: Connection reset by peer]
blackbom1 has joined #ruby
blackbombay has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
Rodya_ has quit [Remote host closed the connection]
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sid_fule_ has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
<Fernando-Basso> Then it was the wrong channel, not the wrong question. Poor question....
<Fernando-Basso> It took all the blame.
workmad3 has quit [Ping timeout: 256 seconds]
brent__ has joined #ruby
nowz has quit [Quit: Leaving]
aganov has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 252 seconds]
xangria has joined #ruby
teclator has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
sid_fules has joined #ruby
UserJosh is now known as JoshS
vasilakisfil has quit [Quit: Konversation terminated!]
xangria has quit [Read error: Connection reset by peer]
xangria has joined #ruby
sebastia_ has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sebastiansier has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
hobodave has joined #ruby
jameser has joined #ruby
ReK2 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
mikecmpbll has joined #ruby
xangria has quit [Read error: Connection reset by peer]
jhack has joined #ruby
danielpclark has joined #ruby
Rodya_ has joined #ruby
stamina has joined #ruby
sebastiansier has quit [Ping timeout: 255 seconds]
Rodya_ has quit [Remote host closed the connection]
Renich has joined #ruby
jhack has quit [Ping timeout: 256 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
username_ has joined #ruby
sonOfRa has quit [Quit: Bye!]
senayar has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
last_staff has quit [Quit: last_staff]
saneax is now known as saneax-_-|AFK
Evesy has joined #ruby
saneax-_-|AFK is now known as saneax
mwlang has quit [Quit: mwlang]
ReK2 has quit [Ping timeout: 264 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
sonOfRa has joined #ruby
StoneCypher has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
blackmes1 has quit [Ping timeout: 258 seconds]
xangria has joined #ruby
blackmes1 has joined #ruby
nankyokusei has joined #ruby
choke has joined #ruby
negatifze has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
montanonic has joined #ruby
<Evesy> Hi, I'm trying take a copy of an immutable object in Ruby (specifically an array of chef attributes) so that I can then edit this array separately inside of a module, however I keep getting "Chef::Exceptions::ImmutableAttributeModification", even if I'm doing something like new_object = chef_object.clone -- Is there no way to create a copy of an immutable object?
amclain has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
<apeiros> Evesy: clone clones the frozen status. try dup. though, frozen would actually cause another exception… so not sure that comes from ruby, might be some custom thing chef does.
* apeiros afk, back in ~30
workerbeetwo has joined #ruby
marxarelli has joined #ruby
ja_ has quit [Quit: Page closed]
maddmaxx has joined #ruby
<Evesy> apeiros: Unfortunately I had the same such luck with .dup -- It does seem to be a custom chef exception
xangria has quit [Read error: Connection reset by peer]
xangria has joined #ruby
alexar has joined #ruby
sebastiansier has joined #ruby
workmad3 has joined #ruby
[Butch] has joined #ruby
dgarstang has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dgarstang> Does rake or ruby support some sort of import from URL?
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Couch has quit [Ping timeout: 245 seconds]
alexar_ has joined #ruby
xangria has quit [Read error: Connection reset by peer]
ecuanaso has joined #ruby
xangria has joined #ruby
tolerablyjake has joined #ruby
tolerablyjake has quit [Client Quit]
alexar has quit [Read error: Connection reset by peer]
tolerablyjake has joined #ruby
agent_white has joined #ruby
agent_white has quit [Changing host]
agent_white has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest2994 is now known as ged
ged is now known as Guest29905
<agent_white> Mornin folks
jameser has joined #ruby
atmosx has quit [Quit: WeeChat 1.4]
Ruby_Rocks_007 has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
skweek has quit [Ping timeout: 245 seconds]
dc4 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 255 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jgpawletko has joined #ruby
xangria has quit [Quit: Leaving]
jsrn_ has quit [Quit: Leaving]
ecuanaso has quit [Quit: Textual IRC Client: www.textualapp.com]
<dgarstang> What's the best way to bundle or turn a Rakefile into a library?
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> dgarstang: make your rake tasks tiny wrappers around library methods
Beams has quit [Quit: .]
<apeiros> task :foo do YourLib::Foo.run end # or similar
Azure has joined #ruby
sebastia_ has joined #ruby
saneax is now known as saneax-_-|AFK
<apeiros> Evesy: I'd ask in a chef specific place then, and/or consult the API
OTORelic has joined #ruby
<dgarstang> apeiros: oic, that seems ugly
<apeiros> dgarstang: how so?
gusrub has joined #ruby
<dgarstang> apeiros: because there's an extra level of unnecessary obfuscation
tvw has joined #ruby
<apeiros> abstraction != obfuscation
<dgarstang> apeiros: yes, unnecessary
sebastiansier has quit [Ping timeout: 240 seconds]
<apeiros> if you say so
<dgarstang> apeiros: I do. I just want to install the gem containing the rakefile and use it
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
frozengeek__ has quit [Quit: frozengeek__]
<dgarstang> Import from a URL might do too
<apeiros> that plan has some unfinished thoughts
<dgarstang> sure, but gotta get started on the plan to see what they are
<apeiros> it sometimes pays off to take a minute to think before starting. but hey, it's your time.
<dgarstang> Thinking... I want a rakefile library
mikecmpbll has quit [Quit: inabit. zz.]
smswmedia has quit [Ping timeout: 258 seconds]
<dgarstang> I have a bunch of similar projects that could benefit from a common Rakefile library
workerbeetwo has quit [Remote host closed the connection]
<jokke> does someone here know what might be going on here? https://p.jreinert.com/e6hX/
<jokke> i've never seen that error before
choke has joined #ruby
duderonomy has quit [Ping timeout: 255 seconds]
smswmedia has joined #ruby
pilne has joined #ruby
bkxd has joined #ruby
Emmanuel_Chanel has joined #ruby
<dgarstang> so, I guess it's not possible to provide a Rakefile from a common library then?
senayar has quit []
bmurt has joined #ruby
Rodya_ has joined #ruby
<apeiros> dgarstang: it's possible to provide rake tasks from a library
<apeiros> dgarstang: regarding a Rakefile however - tell me again, how does rake figure which Rakefile to use?
tvw has quit []
__Yiota has joined #ruby
<dgarstang> apeiros: It would always use a local Rakefile, which would be a short stub and import the Rakefile library. Or, if it was a gem, the local stub would import the Rakefile library
ta has joined #ruby
<apeiros> dgarstang: it's plain ruby code. how do you load another ruby code file in ruby?
Rodya__ has joined #ruby
<dgarstang> apeiros: import/require.. still don't understand the differnence there but that's another story
Rodya_ has quit [Ping timeout: 255 seconds]
<apeiros> require is core ruby.
<dgarstang> apeiros: Oki... and?
tinti has quit [Remote host closed the connection]
<apeiros> do I have to read the docs to you?
<dgarstang> apeiros: no, i said ok
<apeiros> you also said "and?" :)
<dgarstang> apeiros: Yes, and? The local Rakefile has an import, I presume of a common Rakefile...?
tolerablyjake has quit [Remote host closed the connection]
<apeiros> you put your rake tasks into a file in your gem. you require that file in your Rakefile.
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
<apeiros> or use rake's import if you need its specific way of working.
<apeiros> though not sure whether rake's import works across gems.
<dgarstang> apeiros: So a rakefile in a locally installed gem is loaded with a simple 'import some_rakefile' then?
smswmedia has quit [Ping timeout: 248 seconds]
<apeiros> no. there's exactly one Rakefile.
<apeiros> everything else is just files with code.
<dgarstang> apeiros: ok, I'm confused then.
<apeiros> and that code can be code which defines rake tasks.
<apeiros> and like all other files containing code, you can require it.
<dgarstang> apeiros: some local git repo which needs the tasks...
<dgarstang> apeiros: has to import the common rakefile somehow
<apeiros> dgarstang: when you have a gem which contains a file foo/bar.rb which contains the class Foo::Bar - what do you do in your local git repo which somehow needs that Foo::Bar?
<dgarstang> apeiros: I don't know. I'm not a ruby programmer. I'm using rake because it's relatively simple
<jokke> anyone?
<apeiros> maybe that's the problem then. rake is ruby code. I'd suggest you learn ruby.
<dgarstang> apeiros: Not really an option I'm afraid.
<jokke> sudo -Eu deploy /usr/local/rbenv/bin/rbenv exec bundle exec puma -C config/puma.rb <- this is the command i'm running
bkxd has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
bkxd has joined #ruby
sparch has quit [Quit: Leaving]
gusrub has quit [Remote host closed the connection]
patarr has joined #ruby
nanoz has joined #ruby
gusrub has joined #ruby
Renich has quit [Quit: leaving]
workmad3 has joined #ruby
bmurt has joined #ruby
Devalo has joined #ruby
<dgarstang> So, I made a simle gem, and stuck a rakfile in it. Installed the gem, but when I do 'import foo' it fails. It's looking in PWD
hightower3 has joined #ruby
ta has quit [Ping timeout: 252 seconds]
gusrub has quit [Ping timeout: 255 seconds]
frozengeek__ has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
sid_fules has quit [Remote host closed the connection]
hotpancakes has joined #ruby
tyang_ has joined #ruby
davezd has joined #ruby
Devalo has quit [Remote host closed the connection]
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby-lang664 has quit [Ping timeout: 260 seconds]
<dgarstang> Why would rake import always try and import from my local dir, and not use an installed gem?
tyang has quit [Ping timeout: 256 seconds]
Devalo has joined #ruby
<apeiros> because that's how it works
<dgarstang> apeiros: Well...
<dgarstang> apeiros: I must have misunderstood you earlier then
<apeiros> 18:50 apeiros: though not sure whether rake's import works across gems.
<dgarstang> Well there you go. :(
<dgarstang> apeiros: One rakefile import from another. Crazy idea I guess
<apeiros> *shrug* I gave you an alternative, you chose to ignore it.
<dgarstang> apeiros: Not sure how you can understand my intent on a terminal. I never chose to ignore it
Devalo has quit [Ping timeout: 240 seconds]
<djellemah> jokke: hum, could be puma is expecting a fifo to exist on the filesystem somewhere?
<jokke> hm
<jokke> i "fixed" it by disabling puma output redirection
synthroid has quit [Remote host closed the connection]
Ruby_Rocks_007 has joined #ruby
splud has joined #ruby
ianmethyst has joined #ruby
Guest29905 is now known as ged
hotpanca_ has joined #ruby
ged is now known as Guest16296
<dgarstang> still no luck
xen0fon has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
unshadow has joined #ruby
xall_ has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
hotpanca_ has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
Rodya__ has quit [Remote host closed the connection]
nofxx has joined #ruby
choke has joined #ruby
hotpancakes has joined #ruby
douglascorrea has quit [Remote host closed the connection]
rfoust has quit [Read error: Connection reset by peer]
douglascorrea has joined #ruby
alexar_ has quit []
Rodya_ has joined #ruby
blackmesa has joined #ruby
xall_ has quit [Ping timeout: 260 seconds]
blackmes1 has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
nowhere_man has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Emmanuel_Chanel has joined #ruby
ixti has joined #ruby
douglascorrea has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby
workmad3 has joined #ruby
douglascorrea has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Snowy has quit [Remote host closed the connection]
renchan has quit [Quit: Leaving...]
<Yxhuvud> well, it certainly is possible to inject tasks through gems. Rails certainly do that, but I'm not certain it has a readable example of how to accomplish it.
Devalo has joined #ruby
tlaxkit has quit [Quit: Leaving]
<Yxhuvud> probably by simply requiring the tasks file when loading the rails env.
oryman has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
nowhere_man has quit [Ping timeout: 276 seconds]
nowhere_man has joined #ruby
<apeiros> 18:50 apeiros: you put your rake tasks into a file in your gem. you require that file in your Rakefile.
malconis has quit [Read error: Connection reset by peer]
oryman has quit [Client Quit]
oryman has joined #ruby
duderonomy has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Read error: No route to host]
bkxd has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
electrostat has quit [Quit: uwotm8]
synthroid has joined #ruby
electrostat has joined #ruby
ianmethyst has quit [Quit: WeeChat 1.7]
malconis has joined #ruby
oryman has quit [Quit: Leaving]
nankyokusei has joined #ruby
jaruga_____ has joined #ruby
jaruga______ has joined #ruby
jaruga____ has quit [Quit: jaruga____]
patarr has joined #ruby
andikr has quit [Ping timeout: 264 seconds]
cdg_ has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
jaruga_____ has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
ldnunes has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
tpendragon has quit [Ping timeout: 255 seconds]
BackEndCoder has quit [Excess Flood]
andikr has joined #ruby
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
gusrub has joined #ruby
hotpancakes has joined #ruby
BackEndCoder has joined #ruby
prawnzy has joined #ruby
patarr has quit [Ping timeout: 258 seconds]
Cohedrin_ has joined #ruby
gusrub has quit [Ping timeout: 240 seconds]
ta has joined #ruby
prawnzy has quit [Ping timeout: 255 seconds]
Snowy has joined #ruby
gusrub has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whathappens has quit [Remote host closed the connection]
prawnzy has joined #ruby
moei has quit [Quit: Leaving...]
whathappens has joined #ruby
ta has quit [Ping timeout: 245 seconds]
cdg has joined #ruby
bkxd has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
polyidus has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
ifctj has joined #ruby
<lucz> I'm currently installing chruby https://github.com/postmodern/chruby and when I run sudo ./scripts/setup.sh, I get a message saying: >>> Setup complete! Please restart the shell
mwlang has joined #ruby
bmurt has joined #ruby
<lucz> Do I just run something like exec bash -l ?
<mwlang> for developing a gem, what’s the finer point of including gem dependencies in the Gemfile vs. gem’s *.gemspec file?
<apeiros> mwlang: Gemfile is a bundler thing, not a gem thing
sepp2k has quit [Ping timeout: 255 seconds]
cdg_ has quit [Ping timeout: 248 seconds]
<apeiros> so all non-development dependencies should always go into the gemspec
<mwlang> apeiros: ok, I do see that. So what I place in the gemspec should solely be concerned with deploying the gem (i.e. what’s needed for the gem to work in production apps) and everything else in the Gemfile?
<apeiros> development dependencies can go into the gemfile, but imo should go into the gemspec too
<apeiros> gemspec has a special attribute for development dependencies:
skweek has joined #ruby
__Yiota has joined #ruby
<mwlang> I know about add_dependency and add_development_dependency…it’s just unclear as a gem author why I would choose one over the other (or both as you suggested)
<apeiros> the only exception I see is when your dependencies are either local or a repository (path:/git: ones in the gemfile)
tyang__ has joined #ruby
<apeiros> development dependencies are dependencies needed to work on the gem itself
<apeiros> such as running its tests f.ex.
ecuanaso has joined #ruby
<apeiros> so rspec might be a dev dep, it's not needed to use your gem, but needed if you work on it.
<mwlang> Katz clarifies another question I had about Gemfile.lock: “Do not check your Gemfile.lock into version control”
cdg has quit [Ping timeout: 255 seconds]
<apeiros> important to keep the context
<apeiros> "when developing a gem"
whathappens has quit [Remote host closed the connection]
<apeiros> he says the exact opposite in "when developing an app"
<apeiros> so please refrain from using this without the proper context. it gives a wrong picture.
<mwlang> hmmm…”add_dependency” is not mentioned in the guide…just add_runtime_dependency and add_development_dependency
ur5us has joined #ruby
tyang_ has quit [Ping timeout: 256 seconds]
<apeiros> this is from 2010, might well be that dev deps appeared later in gemspec.
bocaneri has quit [Read error: Connection reset by peer]
<apeiros> because I remember that they haven't always been around, but I don't remember when it was added.
<mwlang> apeiros: right on the Gemfile.lock. I’m mentally in the “gem development” frame of mind so didn’t realize the door I opened there.
whathappens has joined #ruby
nvms has joined #ruby
marxarelli is now known as marxarelli|afk
jackjackdripper has quit [Quit: Leaving.]
<mwlang> ok, so from this, I gather I should strive to put as little as possible in the Gemfile, relying on the gem declarations in the gemspec as much as possible. If I need to reference a local gem for development purposes, then I should add it to the Gemfile where I can tightly control source, paths, etc.
Snowy has quit [Remote host closed the connection]
minimalism has joined #ruby
tyang__ has quit [Quit: Leaving]
tyang has joined #ruby
hotpancakes has joined #ruby
<mwlang> if I have a gem name “foo-bar” (hyphenated), must the gemspec file also be hyphenated “foo-bar.gemspec” and the lib/ subfolder “lib/foo-bar” or can it be named “foo_bar.gemspec” and “lib/foo_bar” (as is my normal inclination…)
synthroid has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest16296 is now known as ged
tomphp has joined #ruby
ged is now known as Guest10753
<lucz> hey guys, I followed this but when I run chruby nothing happens
<apeiros> mwlang: IMO in NAME.gemspec, NAME == gem name. though I think rubygems doesn't care.
edwinvdgraaf has joined #ruby
benlieb has quit [Quit: benlieb]
choke has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
gnufied has quit [Ping timeout: 255 seconds]
meshsmith has joined #ruby
nofxx has joined #ruby
<havenwood> lucz: What is the output of?: command -V chruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
<lucz> havenwood: https://cpy.pt/Nues9d5u
ramfjord has joined #ruby
kent\n has quit [Ping timeout: 245 seconds]
<havenwood> lucz: And what is the output of?: echo $RUBIES
<havenwood> lucz: Do you have no Rubies installed in ~/.rubies or /opt/rubies then?
kent\n has joined #ruby
<mwlang> apeiros: thanks for the pointers. reading through the rest of the guide chapters
<havenwood> lucz: To install the latest stable Ruby in ~/.rubies, install ruby-install and run: ruby-install --latest ruby
jenrzzz has joined #ruby
<apeiros> mwlang: yw, have fun :)
<havenwood> lucz: Then restart your terminal.
<havenwood> lucz: chruby won't detect newly installed Rubies until you resource it or restart (so it resources)
<havenwood> re-sources*
<lucz> havenwood: sorry mah my phone rang, lemme just read your replies
<lucz> havenwood: echo $RUBIES is empty
jenrzzz has quit [Ping timeout: 248 seconds]
Xeago has quit [Ping timeout: 248 seconds]
yonatankoren has quit [Quit: ZNC 1.6.1 - http://znc.in]
<lucz> havenwood: I can't apt-get install ruby-install. doesn't exist
Xeago has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower3 has quit [Ping timeout: 255 seconds]
gnufied has joined #ruby
<havenwood> lucz: You can build Ruby however you want and put it in your ~/.rubies/ dir or install ruby-install from source to install Rubies for you.
tomphp has joined #ruby
marxarelli|afk is now known as marxarelli
smswmedia has joined #ruby
<havenwood> lucz: What Distro are you on?
<havenwood> lucz: If it's Ubuntu, Brightbox maintains up-to-date Ruby packages: https://www.brightbox.com/docs/ruby/ubuntu/
Devalo has quit [Remote host closed the connection]
<lucz> Ubuntu 14.04
RickHull has joined #ruby
Devalo has joined #ruby
<havenwood> lucz: So Brightbox packages are an option if you want to go that route. Or here's a tutorial for ruby-install and chruby on Ubuntu: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
<lucz> I installed from source, then ran ruby-install --latest ruby, and now I'm getting this error: Cannot mkdir: No space left on device
<lucz> havenwood: one sec
smswmedia has quit [Ping timeout: 255 seconds]
<havenwood> What's Ruby, about 35MB?
<RickHull> havenwood, 400+ meg on my system
<havenwood> RickHull: :-)
teclator has joined #ruby
<RickHull> after ruby-install, last i checked
<lucz> RickHull: hey mate
<dgarstang> Anyone ever tried this? https://eng.climate.com/2014/04/18/rake-tasks-from-a-rubygem/ Trying to expose a Rakefile from a gem
tolerablyjake has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
<RickHull> lucz, hey, a couple issues still?
<havenwood> RickHull: du -sh ~/.rubies/ruby-2.4.0 #=> 90M
<lucz> RickHull: yeah, I'm going through the chruby setup, and when I run chruby, nothing happens
sepp2k has joined #ruby
<lucz> I installed ruby-install from source, now I'm getting no space left errors so im fixing those
<havenwood> lucz: ls ~/.rubies
Devalo has quit [Ping timeout: 255 seconds]
<havenwood> LambdaSix: Are there any rubies there?
<RickHull> rwh@dadtop:~/src$ du -sh ruby-2.4.0 410Mruby-2.4.0
<havenwood> oops
<lucz> RickHull: no results
<havenwood> RickHull: yeah, the src is more
<RickHull> lucz, for sure, make sure you have like a gig free
<havenwood> RickHull: good point
hobodave_ has joined #ruby
<RickHull> filling your disk is no big deal these days, but you'll need to clear some space from somewhere
jshjsh has joined #ruby
<lucz> ugh /dev/xvda1 7.8G 7.4G 1.2M 100% /
<lucz> This is because of discourse
<havenwood> RickHull: So about 12M bz2, 410M source, 90M compiled.
<RickHull> dgarstang, take a look at https://github.com/rickhull/buildar
<RickHull> it's a gem that does nothing but load some rake tasks (if you add a special call in your Rakefile)
hobodave has quit [Ping timeout: 240 seconds]
<dgarstang> RickHull: Thanks, I was hoping to work off the other example. it's simpler and my ruby isn't that good
<RickHull> it's not even a special call. just Buildar.new { ... } and set a few vars
<dgarstang> Just keep getting "LoadError: cannot load such file -- chef-rakefile/lib/tasks"
<dgarstang> Even when I put the require into a Rakefile in the root of the gem project, and run rake, same result
JoshS has quit [Ping timeout: 240 seconds]
lele has quit [Excess Flood]
lele has joined #ruby
nowhereman has joined #ruby
<RickHull> that probably wouldn't work, something is off when you have `lib` inside a require path
<RickHull> (generally)
Fernando-Basso has quit [Ping timeout: 240 seconds]
<RickHull> is there a homepage for this chef-rakefile thing? I probably used it in a previous life but can't recall any details
<dgarstang> RickHull: Is the lib/ implied? when I do the local require and remove the lib, it works. It just 'knows' to look in lib/ ?
<RickHull> correct
<dgarstang> RickHull: err, no. I just made it up
<lucz> RickHull: deleted some docker images and that fixed it
<dgarstang> ... /lib is implied. Ahh ruby. So much implication and voodoo.
<RickHull> dgarstang, lib is fundamental piece of what rubygems uses to find stuff
Lord_of_Life has quit [Excess Flood]
<RickHull> if you're interested, there are some good docs on how rubygems basically works
nowhere_man has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
renchan has joined #ruby
<RickHull> there is nothing "magic" about lib being in a path -- it's just that the topmost lib folder inside a rubygem project is what gets loaded into the global namespace
<dgarstang> http://help.rubygems.org/kb.. searched 'lib'... no results
Lord_of_Life has joined #ruby
<dgarstang> Anyway, so I tried require 'chef-rakefile/tasks' ... load error
<RickHull> hm, i'm trying to find the good linkks
<RickHull> looks like there was some reorg
<dgarstang> :-\
<dgarstang> http://guides.rubygems.org/ no mention of lib in documentation there either.
<dgarstang> Anyway
<dgarstang> So, a 'require 'tasks' in the root of the gem works, but a 'require <gem_name>/tasks' from elsewhere (after gem is installed locally) doesn't work
<dgarstang> Even though I'm following model at https://eng.climate.com/2014/04/18/rake-tasks-from-a-rubygem/
<RickHull> http://guides.rubygems.org/rubygems-basics/ "When you require a gem, really you’re just placing that gem’s lib directory onto your $LOAD_PATH"
<RickHull> http://guides.rubygems.org/what-is-a-gem/ "Here, you can see the major components of a gem: The lib directory contains the code for the gem"
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<dgarstang> Well, I tried setting LOADPATH to export LOAD_PATH=~/.chefdk/gem/ruby/2.3.0/gems/chef-rakelib-0.0.0/lib/ ... didn't help
gloscombe has joined #ruby
<RickHull> checked that link... it seems fine
<dgarstang> So, I dunno. require seems to not find the gem
<RickHull> note that there are two projects involved at that link: 1. iron_horse, the gem 2. the application that wants rake tasks
ta has joined #ruby
<RickHull> adding the require to #2's Rakefile will not work unless the iron_horse gem is installed first
<dgarstang> RickHull: yeah it's installed
<RickHull> so are you using chef-rakefile or iron_horse or ? as your #1 ?
<dgarstang> "gem uninstall chef-rakelib && gem build chef-rakelib.gemspec && gem install chef-rakelib"
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<RickHull> oh, is chef-rakelib your code?
<dgarstang> RickHull: I don't think the module/class name in the gem matters. The whole things should be exposed when you run rake
<dgarstang> Yes, I slapped chef-rakelib together to get this to work
patarr has joined #ruby
<dgarstang> It basically just has lib/tasks.rb
<RickHull> you should take the time and read the gem specification guides
<RickHull> i'm a little surprised it let you build the gem with that dir structure
<RickHull> remember everything inside lib/ is global
<dgarstang> what structure?
<RickHull> so file named 'tasks.rb' under lib/ is probably going to clash
<dgarstang> sure, i'm just prototyping to see if this will even work
<RickHull> the correct structure is $project_folder/lib/$gem_name.rb or lib/$gem_name/file.rb
<lucz> ruby-install --latest ruby *goes and makes a three course meal *
<RickHull> you need to "namespace" your lib under $gem_name under lib/
bmurt has joined #ruby
<dgarstang> RickHull: Why? The import already has the gem name at the start
<RickHull> so something like chef-rakelib/lib/chef-rakelib.rb or chef-rakelib/lib/chef-rakelib/tasks.rb
<RickHull> then require 'chef-rakelib/tasks'
<RickHull> dgarstang, the structure on the filesystem matters. it's how rubygems works
<dgarstang> and this is all spelled out somewhere...
<RickHull> if you actually try to understand it and read my links, it will make sense
ldnunes has quit [Quit: Leaving]
<dgarstang> Well, under http://guides.rubygems.org/make-your-own-gem/ ... it doesn't follow your suggestion
<dgarstang> it's just got lib/hola.rb
<RickHull> the name of your $project_dir is irrelevant. only what it contains. when it contains lib/, then the next thing under lib should match the gem name
<dgarstang> weird, but ok
<RickHull> it's how rubygems does namespacing in the global namespace under lib/ in the $LOAD_PATH
whathappens has quit [Remote host closed the connection]
<dgarstang> RickHull: So the require 'gem-name' is ... pointless
<RickHull> in the make-your-own-gem
<RickHull> notice the gem is named hola
<dgarstang> sure
<RickHull> so the first thing under lib/ matches
whathappens has joined #ruby
<RickHull> lib/hola.rb
<lucz> havenwood: ruby-2.4.0. :D
<RickHull> it's completely in accordance with what I've been saying
<havenwood> lucz: \o/
<RickHull> lucz, not too tough, eg? the next one will go quicker. you'll have all the rubies
<lucz> RickHull: thank you :)
<dgarstang> So, with lib/chef-rakelib.rb ... what's the require going to be? require 'chef-rakelib/chef-rakelib' ?!
<RickHull> what you require is whatever is under lib/
<RickHull> remember lib/ is a global namespace
<RickHull> so if you have the hola gem, require 'hola'
<dgarstang> RickHull: So, it looks like JUST require 'chef-rakelib' is all I need
<RickHull> for yours, require 'chef-rakelib' or possibly require 'chef-rakelib/tasks'
<RickHull> yep
<dgarstang> well, there's no tasks/
<RickHull> i just saw you wanted to name something tasks.rb ;)
<dgarstang> RickHull: i got no idea, looks to be basically working. Thanks
<RickHull> take a close look at my buildar gem for reference too
<RickHull> great
<RickHull> also, you don't have to install the gem to test it
<RickHull> go to $project_dir (where lib is in `ls`)
<RickHull> ruby -Ilib $ARGS
<RickHull> that will add the local lib to the LOAD_PATH
<RickHull> so that you can still do: require 'chef-rakelib'
<RickHull> or e.g. irb -Ilib -rchef-rakelib
Rodya_ has quit [Remote host closed the connection]
<RickHull> you will be in an irb session with your gem already required
<RickHull> without having had to build and install the latest
whathappens has quit [Ping timeout: 276 seconds]
agent_white has quit [Ping timeout: 264 seconds]
prawnzy has quit [Remote host closed the connection]
agent_white has joined #ruby
<RickHull> basically, finding what is "installed" or "available" for a standard looking require -- it's all about manipulating LOAD_PATH
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ta has quit [Ping timeout: 276 seconds]
rwb has joined #ruby
hotpancakes has quit [Remote host closed the connection]
sebastia_ has quit []
ifctj has quit [Ping timeout: 276 seconds]
prawnzy has joined #ruby
<RickHull> dgarstang, final thought: require 'foo' -- this not look for a gem named foo. this looks for a file or dir named foo in the LOAD_PATH
skweek has quit [Ping timeout: 260 seconds]
<RickHull> what rubygems (install) does is put a file or dir named foo in the LOAD_PATH, if you've specified the foo gem correctly
<RickHull> your gem's name is not relevant to this nor is the name of $project_dir
<RickHull> if the LOAD_PATH thingie is going to be named foo, then it just makes more sense to name the gem foo
<RickHull> it's more of a UX convention that these match. the gem name does not determine how to correctly perform the requires
<dgarstang> RickHull: Not following you on the testing bit...
<dgarstang> can't I just set LOAD_PATH to where the repo for it is?
AndrewIsHere has joined #ruby
<RickHull> yes, this is what -Ilib can do
<RickHull> or you can just do it manually
bkxd has quit [Ping timeout: 240 seconds]
<RickHull> but that sucks, over time
<dgarstang> so... rake -I<path-to-where-gem-is-before-install> ?
<RickHull> yeah, rake -Ipath/to/lib should work
<RickHull> though i'm not sure if rake follows the same arg conventions
marxarelli is now known as marxarelli|afk
<RickHull> if it does, then rake -Ipath/to/lib -rchef-rakelibs should work too
<RickHull> and you won't need to build or install to test
<RickHull> or futz with require_relative
<RickHull> just to be clear, you should have 2 projects: chef-rakelib and the project that needs rake tasks
nofxx has quit [Remote host closed the connection]
<RickHull> so go to $project_2; rake -Ipath/to/chef-rakefile/lib
nofxx has joined #ruby
nvms has quit [Quit: This computer has gone to sleep]
flying has quit []
<RickHull> or just add path/to/chef-rakefile/lib to your LOAD_PATH manually. there's nothing wrong with that, though it will become tedious
nvms has joined #ruby
username_ has quit [Ping timeout: 276 seconds]
psychicist__ has quit [Ping timeout: 276 seconds]
polyidus has quit [Quit: ZZZzzz…]
Guest10753 is now known as ged
matp has quit [Remote host closed the connection]
ged is now known as Guest37373
patarr has quit [Ping timeout: 264 seconds]
jaffejoe has joined #ruby
matp has joined #ruby
agent_white has quit [Quit: brb]
<dgarstang> RickHull: I set LOAD_PATH to ~/.chefdk/gem/ruby/2.3.0/gems/chef-rakelib-0.0.0/lib/ ... put an error in chef_rakelib.rb on purpose... ran rake, no error. it's still using the gem it seems
duckpupp1 has quit [Ping timeout: 276 seconds]
conta has joined #ruby
marxarelli|afk is now known as marxarelli
<RickHull> oh, right. the installed version is probably first in LOAD_PATH
<RickHull> you can just uninstall it
<dgarstang> oops scrapt that.
malconis has quit [Read error: Connection reset by peer]
<dgarstang> my bad. I was pointing at the gem. Duh
malconis has joined #ruby
<jaffejoe> does class level methods only work for objects that are not instantiated?
<dgarstang> ok, still doesn't work with export LOAD_PATH=~/git/chef-rakelib/lib/
<RickHull> you want to append, not overwrite
<RickHull> you probably blasted some important stuff
nvms has quit [Quit: This computer has gone to sleep]
malconis has quit [Read error: Connection reset by peer]
<dgarstang> RickHull: Well LOAD_PATH isn't set..
<dgarstang> RickHull: something has to set it. It wasn't me.
malconis has joined #ruby
<dgarstang> RickHull: Open a new terminal. echo $LOAD_PATH ... empty
<RickHull> hm, it's not an env var, i forget quite how it works
<dgarstang> rake -I ~/git/chef-rakelib/lib/ seems to work. That will do for now
conta has quit [Ping timeout: 264 seconds]
<RickHull> yep, path/to/chef-rakelib/lib
nankyokusei has joined #ruby
AndrewIsHere has quit [Remote host closed the connection]
teclator has quit [Quit: No Ping reply in 180 seconds.]
AndrewIsHere has joined #ruby
teclator has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d5sx43 has joined #ruby
koldbrutality has quit [Remote host closed the connection]
saslam has joined #ruby
j416 has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 255 seconds]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lord_of_Life has quit [Excess Flood]
teclator has quit [Client Quit]
j416 has joined #ruby
ecuanaso has joined #ruby
lmc has quit [Remote host closed the connection]
Lord_of_Life has joined #ruby
teclator has joined #ruby
saslam has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
teclator_ has joined #ruby
Derperperd has joined #ruby
lmc has joined #ruby
mikolaj9 has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
d5sx43 has quit [Quit: Leaving...]
skweek has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
j416 has quit [Ping timeout: 264 seconds]
patarr has joined #ruby
Derperperd has quit [Ping timeout: 260 seconds]
unshadow has quit [Read error: Connection reset by peer]
nowhereman has quit [Ping timeout: 276 seconds]
j416 has joined #ruby
unshadow has joined #ruby
lmc has quit [Ping timeout: 245 seconds]
Moosashi has joined #ruby
<RickHull> dgarstang, ah, i think the env var is RUBYLIB
blackmesa has joined #ruby
<RickHull> and LOAD_PATH is a ruby internal "constant"
rfoust has joined #ruby
<RickHull> also, congrats for diving in building and installing a gem, you hacker :)
renchan has quit [Remote host closed the connection]
meshsmith has quit [Remote host closed the connection]
lmc has joined #ruby
username_ has joined #ruby
Derperperd has joined #ruby
patarr has quit [Ping timeout: 255 seconds]
ta has joined #ruby
<mikolaj9> anybody using mrubyc ?
andikr has quit [Read error: Connection reset by peer]
AckZ has quit []
patarr has joined #ruby
<dgarstang> thanks Rick
ruby-lang876 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby-lang800 has joined #ruby
jaruga______ has quit [Quit: jaruga______]
Moosashi has quit [Quit: Moosashi]
Fernando-Basso has joined #ruby
gizmore has joined #ruby
enterprisey has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
marxarel_ has joined #ruby
ecuanaso has joined #ruby
marxarelli has quit [Ping timeout: 276 seconds]
teclator_ has quit [Ping timeout: 252 seconds]
teclator has joined #ruby
marxarel_ is now known as marxarelli
<RickHull> mikolaj9, I've been thinking about it, does that count?
lmc has quit [Remote host closed the connection]
rwb has quit [Ping timeout: 240 seconds]
ruby-lang800 has quit [Ping timeout: 260 seconds]
ruby-lang876 has quit [Ping timeout: 260 seconds]
tyang has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
rails364 has joined #ruby
aryaching_ has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
tercenya has quit [Remote host closed the connection]
Ruby_Rocks_007 has joined #ruby
tercenya has joined #ruby
ReK2 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
jackjackdripper has joined #ruby
ReK2 has quit [Client Quit]
Moosashi has joined #ruby
lmc has joined #ruby
benlieb has joined #ruby
Rodya_ has joined #ruby
gusrub has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 248 seconds]
patarr has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
rails364 has quit [Ping timeout: 260 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nanoz has quit [Read error: Connection reset by peer]
ta has quit [Ping timeout: 255 seconds]
unshadow_ has joined #ruby
`tim` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 260 seconds]
dc4 has quit [Ping timeout: 240 seconds]
unshadow has quit [Ping timeout: 240 seconds]
whathappens has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
A124 has quit [Quit: '']
hightower3 has joined #ruby
mikolaj9 has left #ruby [#ruby]
A124 has joined #ruby
Guest37373 is now known as ged
ged is now known as Guest32654
xen0fon has quit [Quit: xen0fon]
Ishido has joined #ruby
<dgarstang> How do I expand variables inside """ ... """ ?
Moosashi has quit [Quit: Moosashi]
<havenwood> >> """#{Time.now}""" #dg
<ruby[bot]> havenwood: # => "2017-01-24 22:00:02 +0000" (https://eval.in/723344)
tvw has joined #ruby
<sonOfRa> What is even the point of """-quoted strings?
ta has joined #ruby
jenrzzz_ has joined #ruby
<RickHull> I've never been tempted to use them
<Papierkorb> sonOfRa: """ doesn't really exist in Ruby, or rather, it's parsed as "" "..." ""
blackwind_123 has quit [Ping timeout: 240 seconds]
<Papierkorb> sonOfRa: So empty-string, double-quoted string, empty-string. In ruby, string literals follwoing after another without operators are concatenated, like in C: "foo" "bar" == "foobar"
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
<RickHull> that would only work for #puts and friends, right?
gusrub has joined #ruby
<Papierkorb> it works everywhere you can put a string literal
cdg has joined #ruby
<RickHull> >> def foo(str); puts foo; end; foo("""stuff""")
<ruby[bot]> RickHull: # => wrong number of arguments (given 0, expected 1) (ArgumentError) ...check link for more (https://eval.in/723346)
Moosashi has joined #ruby
agent_white has joined #ruby
<havenwood> >> require 'ripper'; Ripper.lex('""""""').map { |_, type, _| type }
<ruby[bot]> havenwood: # => [:on_tstring_beg, :on_tstring_end, :on_tstring_beg, :on_tstring_end, :on_tstring_beg, :on_tstring_en ...check link for more (https://eval.in/723347)
jenrzzz has quit [Ping timeout: 252 seconds]
<Papierkorb> I must admit I used the `parser` gem to verify it here, didn't think about using ripper
blackwind_123 has joined #ruby
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ruby
<RickHull> so why would anyone use triple quotes in source code? decoration?
jshjsh has quit [Ping timeout: 240 seconds]
gusrub has quit [Ping timeout: 255 seconds]
hightower3 has quit [Ping timeout: 264 seconds]
<dgarstang> I have a gemspec file with s.version = "#{IO.read(File.join(File.dirname(__FILE__), 'VERSION'))}.#{ENV['BUILD_NUMBER']}" ... it doesn't seem to like the VERSION bit
Rodya_ has quit [Remote host closed the connection]
<RickHull> if you're using ruby >= 2, you can use __dir__
<RickHull> but probably just put a string in your gemspec
<RickHull> rather than trying to read a file
<dgarstang> ah there's a \n in there which might be an issue
unshadow has joined #ruby
<RickHull> yeah, add some #chomp
<dgarstang> hm not sure how to do that...
<dgarstang> "#{{IO.read(File.join(File.dirname(__FILE__), 'VERSION'))}".chomp()} ?
<baweaver> without parens
Asher has quit [Quit: Leaving.]
hightower3 has joined #ruby
<baweaver> IO.read(File.join(__dir__, 'VERSION')).chomp
<baweaver> Why the interpolation there?
<baweaver> It returns a string already
douglascorrea has quit [Ping timeout: 245 seconds]
<dgarstang> yeah but I gotta combine it with the ENV['BUILD_NUMBER']
<baweaver> Ah
<baweaver> linebreaks are fun in IRC
unshadow_ has quit [Ping timeout: 248 seconds]
[Butch] has quit [Quit: I'm out . . .]
<RickHull> [IO.read(blah), ENV['BUILD_NUMBER'].join('.')
Rodya_ has joined #ruby
<dgarstang> oki, "#{IO.read(File.join(File.dirname(__FILE__), 'VERSION')).chomp()}.#{ENV['BUILD_NUMBER']}"
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dgarstang> or that
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
<dgarstang> Doesn't seem to work. When I run it throo irb, no output
cdg_ has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Ping timeout: 245 seconds]
<RickHull> __FILE__ doesn't work in irb
<RickHull> last I checked
<RickHull> __dir__ might
<dgarstang> sigh. ruby makes no sense to me. In irb, run IO.read('VERSION') and I get a result. Ok, so then I run [IO.read('VERSION'), ENV['BUILD_NUMBER'].join('.') and don't get a result. I got back and run IO.read('VERSION') again, and now I dont get a result for that either
ohnowendigo has joined #ruby
<dgarstang> __FILE__ doesn't work. Oh of course.
<dgarstang> Then, when I press ctrl-d, I see all the errors that weren't displayed
<RickHull> this stuff is kind of gross, working out relative paths at gem build time
<RickHull> but the link i pasted should suffice, along with the join trick
<RickHull> always prefer joins to interpolation for string building, when possible
saslam has joined #ruby
<RickHull> it's like structured programming vs GOTO
<dgarstang> RickHull: To me it's like most of ruby, reading right to left.
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<RickHull> not sure about perf, but when you're joining strings, particularly in structured output it makes sense to use join
<dgarstang> Maybe if I learned chinese, then ruby would be easier
teclator has quit [Ping timeout: 240 seconds]
<RickHull> that's the functional style
<dgarstang> Doesn't explain why the irb thing went wacky
<RickHull> it's like a pipeline
d5sx43 has joined #ruby
<RickHull> __FILE__ doesn't work in irb
<RickHull> you are workign with gross hacks and irb is not a faithful environment
<dgarstang> You mean it makes irb go completely bonkers
<RickHull> but join is a functional style of method
<RickHull> we start with some strings, and then we put them into the pipeline
<RickHull> the pipeline joins them and spits out a new string
<RickHull> left to right
<dgarstang> It's the same as array.each do. *shudder*
StoneCyp1er has joined #ruby
<RickHull> you will learn to love it. or not
<dgarstang> Not. It's been several years. Tried many times. I can't get past chapter one because of stuff like array.each do
<RickHull> that's seriously one of my favorite features
<RickHull> so maybe it's just not a good match
<dgarstang> how about for var in something do? That's readable
James123 has quit [Quit: Lost terminal]
<RickHull> you can write it that way. but that's one specific form
toretore has quit [Remote host closed the connection]
<dgarstang> something unless condition. *eyes bleed*
<RickHull> ruby's blocks are a different way of thinking about this stuff, and for loops are just scratching the surface
<dgarstang> That's the other thing that makes ruby hard to read. There is no standard. Gotta translate every time you read it
<RickHull> instead of for loop being a special form, it's just a trivial type of block
Asher has joined #ruby
cdg has joined #ruby
<RickHull> we're moving up the stack to better in built abstractions that work predictably in tons more useful scenarios
StoneCypher has quit [Ping timeout: 260 seconds]
<Papierkorb> dgarstang: ruby is quite readable unless you aren't reading it as english text ;)
<RickHull> going from #each to #map in ruby is a conceptual breeze
<RickHull> unlike say Perl
<dgarstang> Papierkorb: Your kidding right?
<Papierkorb> dgarstang: I think it's easy to read. But I also think of Python as being completely unreadable.
<dgarstang> Papierkorb: rather than say array.append, what is it array << foo? or is it array < foo? I can't remember squiggle very well
d5sx43 has quit [Remote host closed the connection]
<RickHull> aliases exist. they can be annoying at first but this goes away quickly
<dgarstang> or pipes for for loops... I can't even remembre the syntax without looking it up
<RickHull> again, blocks are the shit. once you grok blocks, you won't look back
<Papierkorb> dgarstang: Give it a try. Thinking of operations on collections as piping stuff from one algorithm into the next one is a really powerful mechanism
cdg_ has quit [Ping timeout: 255 seconds]
<RickHull> don't tell him about elixir
<dgarstang> i may be able to write it once, but a week later I won't remember what all the sqiggles and symbols mean
d5sx43 has joined #ruby
<RickHull> step 1. achieve familiarity
<RickHull> these are trivial complaints
<dgarstang> maybe that's why ruby code never catches errors, because they are one giant pipeline
saslam has quit [Ping timeout: 255 seconds]
Ishido has quit [Remote host closed the connection]
<dgarstang> Rick: not if you can't read what you wrote
rwb has joined #ruby
<Papierkorb> dgarstang: Huh? You can catch errors just fine
<RickHull> because you're not familiar yet
ohnowendigo has left #ruby [#ruby]
<RickHull> it's a hurdle, for sure
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dgarstang> Papierkorb: I can honestly say that most of the time, ruby code doesn't catch errors. It just throws a backtrace in a line that's really several operations pipelined together
skweek has quit [Ping timeout: 255 seconds]
<Papierkorb> dgarstang: And no matter your programming background, the other language(s) you use are bound to have operators too
<RickHull> yes there can be several methods per line
Asher has quit [Quit: Leaving.]
<dgarstang> Rick: yeah I can't get familar because of the symbols and squiggles and reading from right to left
<RickHull> you do find out which method raises the error
<RickHull> and ruby does catch it and tell you about it
<dgarstang> So, no catching of errors then. Leave it up to the user to dig through the code?
<baweaver> begin, rescue, try, catch
<RickHull> what do you mean by catch errors?
nettoweb has joined #ruby
<Papierkorb> dgarstang: Don't catch what you can't handle, this is a common paradigm in other languages too. And if you don't like the backtrace, just move the code to the next line.
d5sx43 has quit [Client Quit]
<dgarstang> Papierkorb: Code should never fail with a backtrace
<RickHull> swallowing errors is dumb
Asher has joined #ruby
Asher has quit [Client Quit]
<Radar> popcorn
Asher has joined #ruby
<RickHull> your own code should rescue what it can handle
<Papierkorb> dgarstang: Then catch the error and print a user friendly error message?
<dgarstang> How are you supposed to know where the error happened when the line contains several operations pipelined together?
<RickHull> the trace tells you
<RickHull> this is not rocket science
<dgarstang> There should not be a trace
<baweaver> why not?
<RickHull> you can swallow unhandle-able errors
<RickHull> but that's dumb
<dgarstang> Because a trace means the programmer didn't write good code
<RickHull> no it doesn't
<baweaver> nope
<baweaver> that's kinda screwy
<dgarstang> so, if code fails, it's up to the user to dig through the code?
<Radar> Yo does anyone have opinions about code in here
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> so all code should run perfectly the first time
<baweaver> that doesn't happen in production
nettoweb has quit [Client Quit]
<Radar> Code can fail in _exceptional_ ways that you didn't realise when you first wrote it. Those _exceptional_ ways will raise _exceptions_ which DO have stacktraces.
<RickHull> dgarstang, it's up to your code whether to swallow unhandle-able errors. ruby does not do that by default
<RickHull> for example, when your disk fills
<RickHull> you will get some Errno
<Radar> Code which fails in _known_ ways will not have stacktraces and if your code encounters such an error it will know what to do with it... and there won't be a trace.
<RickHull> do you swallow it or handle it?
<dgarstang> RickHull: Well then wrap the operation which writes to the disk in a catch, try
<RickHull> and then when it fails?
benlieb has quit [Quit: benlieb]
ddffg has quit [Ping timeout: 255 seconds]
<dgarstang> RickHull: print an error saying it failed due to an IO failure
<RickHull> you can do that in ruby \o/
<dgarstang> RickHull: yes, but most dont
<Radar> dgarstang: Because disk filling up isn't what many people would consider to be a problem.
<Radar> It's not like in my day to day work I'm going "but what if my 600GB hdd fills up?"
<dgarstang> Radar; it is if it causes the app to fail to work as expected
Lord_of_Life has quit [Excess Flood]
<baweaver> you cannot possibly cover every exception case, that's incredibly naive.
<Radar> dgarstang: I can't think of an application which I've worked on recently which _wouldn't_ fail if the disk was full.
<RickHull> dgarstang, rails has an exception handler that reports this stuff to the user without a trace
<dgarstang> Radar: maybe i think differently because my background is ops. Developers need to be aware of the system they run on
<RickHull> any command line executable will do this if it wants to
<baweaver> I run ops at a very large org and what you're describing is insane
<dgarstang> baweaver: No, but you do your best to catch as many as possible
<RickHull> don't use software that doesn't do this. it's not inherent to ruby
Moosashi has quit [Quit: Moosashi]
<Radar> dgarstang: Wouldn't the ops people get an alert when the disk usage is high and then handle that before the disk usage got to 100%? If they didn't handle that, then they wouldn't be doing their job.
<zenspider> "Code should never fail with a backtrace" ?!?!?! what crazy BS is that?
<baweaver> We have Sensu or Nagios or Zabbix for that
<Radar> It's not up to the program to ensure that the disk is still writeable. A non-writeable disk is catastrophic.
Lord_of_Life has joined #ruby
<dgarstang> Radar: and when the app fails with a backtrace and nothing else, wat is the ops person supposed to do?
<baweaver> learn how to read a backtrace
<Radar> dgarstang: "hey dev person, can you take a look at this?"
gusrub has joined #ruby
<Radar> ^
hahuang65 has joined #ruby
<Radar> You know, stop and collaborate. Just as the song goes.
<Papierkorb> dgarstang: Forward it to the dev, as without the trace, they cannot easily know where exactly it happened
<dgarstang> Radar: How about a useful error message that saved the developer having to be involved? it might be user error
<RickHull> the backtrace tells you that the disk is full. there is no information an exception handler has that the backtrace doesn't
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Radar> dgarstang: You're shifting the goal posts to suit your argument, and that is frustrating.
<baweaver> An exception tells you something exceptional happened beyond what they designed for
<Radar> dgarstang: The example you used is the disk was full. That is not something that as a developer I would ever consider accounting for when I'm writing a program.
<baweaver> and you are in fact shifting the goal a lot
<RickHull> the question of whether to write a trivial exception handler as the outer loop of your program -- it's not inherent to ruby
Moosashi has joined #ruby
<dgarstang> Well, i guess the next time I use wellsfargo.com and they have an error they should just dump a backtrace to the browser
<Radar> dgarstang: No. They would log an exception through an exception logging service, like Bugsnag, and then report to the user that the application was unable to serve the request.
<Radar> dgarstang: Rails apps do this with a 500.html page by default.
dgarstang has quit [Quit: WeeChat 1.5]
<Radar> The "We're sorry but something went wrong" page.
<RickHull> dgarstang, what code is it you are complaining about it? or are you just talking about stackoverflow snippets?
<RickHull> again, it's not inherent to ruby. it's up to app how it handles exceptions
LoneHerm_ has joined #ruby
biberu has quit []
<zenspider> wellsfargo? OK. Now I call trolling... rein it in and discuss ruby
<zenspider> ah. he quit. good.
xpt is now known as lpt
Guest43 has joined #ruby
<Radar> I love the smell of a good rant early in the morning.
hinbody has quit [Quit: leaving]
<baweaver> A strong opinion is toxic to further growth as a programmer
Snowy has joined #ruby
<zenspider> baweaver: not sure I agree... it might get you stuck in the short/medium term... but I think that can be a good thing... a sign that they're actually thinking about development as a practice. lord knows I've had my opinions over the years. you too, probably
<baweaver> Oh I have
<baweaver> getting over them is what allowed me to move on though
<zenspider> hopefully you're open to being challenged (by others or by your own further study) and can change your mind
<baweaver> If you hold onto them (strong opinions) then you're hosed
LoneHerm_ has quit [Remote host closed the connection]
<baweaver> that's more of what I was getting at.
<mwlang> strong opinion, open mind.
<RickHull> dude was just frustrated. he was following tutorials trying to GET SHIT DONE and tripped a few too many times and got bloodied up
<baweaver> It happens
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
LoneHermit has joined #ruby
<baweaver> zenspider: the ability to get to some strong opinions shows progress, the ability to move beyond them is what gets you the rest of the way
<baweaver> There are just some really deeply held almost religious level convictions about some things which I tend to call toxic
douglascorrea has joined #ruby
nankyokusei has joined #ruby
Guest43 is now known as Rufus
benlieb has joined #ruby
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
hinbody has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
redhedded1 has quit [Quit: Textual IRC Client: www.textualapp.com]
nankyokusei has quit [Ping timeout: 240 seconds]
redhedded1 has joined #ruby
<zenspider> yup yup
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
__Yiota has quit [Read error: Connection reset by peer]
stamina has quit [Quit: WeeChat 1.6]
Moosashi has quit [Quit: Moosashi]
<RickHull> anyone know if this is a bug or an expected quirk (sprintf)? https://bugs.ruby-lang.org/issues/13153
__Yiota has joined #ruby
<RickHull> >> 0.upto(5).map { |i| "%#0.2x" % i }
<ruby[bot]> RickHull: # => ["00", "0x01", "0x02", "0x03", "0x04", "0x05"] (https://eval.in/723380)
Guest32654 is now known as ged
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ged is now known as Guest11429
<Papierkorb> RickHull: I don't know if it's a bug, but it does surprise me too
<RickHull> it's not documented (in rdoc)
<RickHull> it's not new either
<RickHull> i haven't tried older than 2.3.3 yet
millerti has joined #ruby
cdg_ has joined #ruby
LoneHe___ has joined #ruby
<RickHull> i'm imagining some travis-like farm, where you submit a small script and it runs something like `git bisect` but on releases
ecuanaso has joined #ruby
<RickHull> or a small (ugh) bash script with chruby ;)
<Papierkorb> RickHull: It's not a bug actually https://gist.github.com/Papierkorb/aa8ed26773d0c961be1fc2cb299ff2c5
elifoster has joined #ruby
<Papierkorb> The behaviour is equivalent to the one in C
hahuang65 has quit [Ping timeout: 255 seconds]
cdg has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Ping timeout: 248 seconds]
<RickHull> guess i'll have to take it upstream, heh
<RickHull> WTFBBQ
<zenspider> POINT two? not sure what you're expecting that to do w/ the way it is written
yokel has quit [Ping timeout: 240 seconds]
<RickHull> it's the width specifier, no?
<zenspider> it's the width specifier for the fractional part
<zenspider> but %x is for integers... so...
<RickHull> doh
<Papierkorb> >> 0.upto(5).map { |i| "%#02x" % i }
<ruby[bot]> Papierkorb: # => ["00", "0x1", "0x2", "0x3", "0x4", "0x5"] (https://eval.in/723382)
<Papierkorb> It's actually required
<Papierkorb> If you want a leading 0, that is
<RickHull> maybe it just happens to work
<RickHull> WTB sanity
<zenspider> Papierkorb: the 0 is, yes, but not the decimal
<RickHull> it's not but %#02x doesn't zero-fill to 2
<RickHull> s/it's not//
<zenspider> the zero case is odd... but Papierkorb, you said that is the same in C?
<zenspider> you'd want 04 since the # (which I didn't know about, thanks) pads it also
<Papierkorb> zenspider: Yes, the gist I pasted above, if compiled and ran, has the same behaviour
<zenspider> >> 0.upto(5).map { |i| "%#04x" % i }
<ruby[bot]> zenspider: # => ["0000", "0x01", "0x02", "0x03", "0x04", "0x05"] (https://eval.in/723383)
<RickHull> huh
<RickHull> useless
<RickHull> :)
Rodya_ has quit [Quit: Leaving...]
<RickHull> %#0.2x works "better" for some reason
<RickHull> but still the lack of 0x on NULL is a dealbreaker
<RickHull> the POINT form works "better" for widths beyond 2
<zenspider> well I know that in most cases it calls through to snprintf when it can
<zenspider> RickHull: you sure like to beat your drum when you find it... yes, we get that. doesn't matter. this is a C issue
<RickHull> i've been away for a while :)
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has quit [Quit: WeeChat 1.6]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Derperperd has quit [Ping timeout: 248 seconds]
<RickHull> I'm just interested to learn about the behavior, and update the bug report
workmad3 has joined #ruby
kht has joined #ruby
yokel has joined #ruby
<RickHull> also I have a love/hate with format strings and this just proves, well, something...
<zenspider> yeah... printf("%#0.2x %#04x %#0.2x %#04x\n", 0, 0, 1, 1) is the exact same in C and ruby (that's fun, I like that)
cdg has joined #ruby
lmc has quit [Quit: Leaving...]
enterprisey has quit [Remote host closed the connection]
<RickHull> this must be pretty well known behavior, somewhere
cdg_ has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
madsa_ has joined #ruby
dreadnaught has joined #ruby
FMan has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
johnny56_ has quit [Read error: Connection reset by peer]
kaffepanna has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
kaffepanna has joined #ruby
kies has quit [Ping timeout: 264 seconds]
tris has quit [Ping timeout: 256 seconds]
kies has joined #ruby
nettoweb has quit [Client Quit]
<RickHull> thx for the update zenspider and yeah, nice test case. i'll be hands off other than research and lurking :)
johnny56_ has joined #ruby
dgarstang has joined #ruby
tris has joined #ruby
dreadnaught has quit []
dreadnaught has joined #ruby
dreadnaught is now known as pingpong
madsa_ has quit [Quit: Textual IRC Client: www.textualapp.com]
bocaneri has joined #ruby
<dgarstang> I'm confused about require '...'. I had assumed the first part was the gem name, but it's not. it appears to be a path inside the gem. Is that correct?
sepp2k has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
<zenspider> that is correct
<zenspider> most/many gems have a requireable file that is the same name as the gem, but not all
kht has quit [Ping timeout: 240 seconds]
<dgarstang> zenspider: so... jeez that blows my mind. What about scoping ?
<zenspider> dgarstang: what about it?
<dgarstang> zenspider: what if two gems have the same files?
<zenspider> I'm happy to answer your questions... but not if you're going to be a dick. I DO have better shit to do than that
<dgarstang> zenspider: how do you even know what gem your loading from?
cdg has joined #ruby
workmad3 has joined #ruby
<dgarstang> zenspider: not sure if that dick comment was directed torwards me.
<zenspider> it very much was
<zenspider> dgarstang: you can use bundler + a gemfile that fully resolves all the things you're using and limits the load paths
FMan has joined #ruby
<dgarstang> zenspider: Don't see why. Fair questions
Moosashi has joined #ruby
<zenspider> 1) I saw all your previous dialog. 2) determined that you're basically trolling at this point. 3) your "blows my mind" comment is superfluous
nebben has quit [Ping timeout: 255 seconds]
<zenspider> or, in your code you can "activate" a gem with the gem method: gem "minitest", "~> 4.0"
rkazak has joined #ruby
<zenspider> but name collisions on the file system are entirely possible... not sure how that's a scoping issue so much as a packaging issue
jameser has joined #ruby
<dgarstang> zenspider: it's not trolling to be surprised that a require statement doesn't use any sort of qualification
<zenspider> not sure if rubygems warns against that. Back when I looked at the issue there were so few collisions that it didn't warrant it
<dgarstang> zenspider: Well it would mean that every gem developer in the world would have to know the file names of every other gem developer in the world
Hobbyboy has quit [Ping timeout: 252 seconds]
<zenspider> if you want to argue ad absurdum / slippery slope, sure... but I'm not interested
pingpong has left #ruby [#ruby]
<dgarstang> require 'some_file' ... not even sure how I'd interpret that months later when I looked at the code. Require from where?
<zenspider> dunno if you've noticed, but we're doing fine as an ecosystem
<dgarstang> zenspider: So my concern isn't valid your saying?
<zenspider> you can do `gem which some_file` on the cmdline to look at it
<lucz> RickHull: you about?
<dgarstang> ok, that's one workaround
<zenspider> dgarstang: "you're"
OTORelic has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
<zenspider> I'm saying you're making a mountain out of a molehill. in my practice, this stuff works fine
<RickHull> lucz, what's up
<zenspider> and I've had a lot of practice. way more than you (at ruby, at least)
<dgarstang> zenspider: Maybe I'll just put comments on every require line so I know where they come from
<matthewd> dgarstang: It works because a well-behaved gem *makes* the first part (which is a subdirectory) match the gem name
<lucz> RickHull: I'm still going at it with this chruby thing, I had to run bundle install earlier and came up against this: byebug-9.0.6 requires ruby version >= 2.0.0, which is incompatible with the current version, ruby 1.9.3p484
<zenspider> you certainly can... seems like overkill to me
<zenspider> matthewd: doesn't mean I can't do the same in my poorly-behaved gem. :)
<matthewd> dgarstang: .. but it leaves the ability for a gem to do something more creative if that is more appropriate in a given situation
<zenspider> I could totally add rspec.rb in minitest :)
<lucz> RickHull: I also had to run bundler as root, but that shouldn't matter since I'm only using ruby for this one script, and it's a test server
jameser has quit [Client Quit]
rkazak has quit [Client Quit]
marxarelli is now known as marxarelli|afk
<RickHull> lucz, ok, take a step back
<zenspider> I would be eviscerated for it... but I COULD
<RickHull> you don't need root for any of this, so you're off the happy path
<matthewd> zenspider: "the gem name", not "a gem name" ;)
<Zarthus> zenspider, you could also make minitest fail a test at a random chance
<RickHull> lucz, what does `which ruby` give you?
<Zarthus> based from experience, nobody actually inspects the souece of the gems they downloaded :P
<zenspider> yes, but the ordering of discovery isn't defined... maybe it is alphabetical order... so minitest would win :)
<lucz> RickHull: /usr/bin/ruby
<RickHull> lucz, remember when I said there is a trivial but easy to miss step
<zenspider> Zarthus: I've thought about it... well... thought about making it so that stubs randomly don't stub. (can't figure out equivalent for mocks, so it doesn't seem terribly valuable)
<lucz> RickHull: somewhat
<RickHull> about loading chruby in your env
<RickHull> try: chruby ruby, and then: which ruby
jameser has joined #ruby
malconis has quit [Read error: Connection reset by peer]
xen0fon has joined #ruby
<zenspider> lucz: if it is /usr/bin/ruby (and that version of ruby is acceptable) then needing sudo for your bundle is probably correct
<RickHull> trying to use chruby ^
<lucz> RickHull: /home/ubuntu/.rubies/ruby-2.4.0/bin/ruby
<havenwood> lucz: Now: gem install bundler
<RickHull> there are two steps to making sure your user session uses chruby: 1. source the chruby script 2. tell chruby which ruby to use
<zenspider> oh... if they're TRYING to use chruby, then there's definitely an env problem
<RickHull> generally #1 goes in .bashrc and #2 can optionally, or there is a trick using a .ruby-version file
JeanCarloMachado has quit [Ping timeout: 258 seconds]
<lucz> RickHull: I did edit my .bashrc file
hightower3 has quit [Read error: Connection reset by peer]
<lucz> RickHull: to add source.. etc
jameser has quit [Client Quit]
<RickHull> you can add another line for #2, below the `source` or `.` line:
<RickHull> chruby ruby
hightower3 has joined #ruby
<lucz> RickHull: sorry I don't understand what you mean with that last message
blackmesa has joined #ruby
<RickHull> later if you have multiple rubies, you can specify which one
<zenspider> lucz: did you start a new shell tho?
<lucz> zenspider: yup
<havenwood> lucz: Did you also?: source /usr/local/share/chruby/auto.sh
<lucz> havenwood: yup
<zenspider> something's wrong with your PATH (or whatever mechanism chruby uses)
moei has joined #ruby
<RickHull> see my "two steps" comment above. until you do `chruby ruby`, then you are still using the "system" ruby, which you don't want for this purpose
<lucz> RickHull: oh I seeeee
<RickHull> i think everything is ok
<RickHull> it's a bit tricky
<lucz> ok so if I run bundle install as the ubuntu user, I get "Could not locate gemfile"
kht has joined #ruby
<RickHull> let's start a new login session
<lucz> cd /home/ubuntu
<lucz> okidoke, new one started
<RickHull> and if you don't have chruby ruby in your .bashrc, then execute it by hand
pingpong has joined #ruby
<RickHull> confirm with: which ruby
<lucz> RickHull: literally just 'chruby ruby'
<lucz> ?
<RickHull> yeah, we're telling chruby to activate and which ruby to use
JeanCarloMachado has joined #ruby
strongcode has quit [Quit: Lost terminal]
<lucz> RickHull: ah okay. I added it to my bashrc file, now when I run which ruby I get /home/ubuntu/.rubies/ruby-2.4.0/bin/ruby
<lucz> new sesh
<RickHull> ok, now all that crap with bundler you did
<RickHull> none of that affects this. you're in a brand new environment
<lucz> RickHull: okay
<RickHull> probably: gem install bundler
<RickHull> see what happens
<RickHull> anyone else feel free to chime in
<lucz> 1 gem installed
Fernando-Basso has quit [Quit: WeeChat 1.7]
<RickHull> ok, now you can proceed with the migration stuff
<lucz> what does it mean 1 gem? what's a gem?
<lucz> thats a very noob question I realise
<RickHull> it's like an app. a useful chunk of code
<lucz> ah like a module?
<RickHull> sometimes they give you new commands in the shell
<RickHull> yeah
<lucz> I'm learning python at the moment so I know a bit
<RickHull> go ahead and gem install pry