jhass changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has joined #ruby
marmotini_ has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
wojnar has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 244 seconds]
camilasan has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
camilasan has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
orbyt_ has joined #ruby
venmx has quit [Ping timeout: 272 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
cloaked1 has quit [Ping timeout: 264 seconds]
cesario has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
FastJack has quit [Ping timeout: 264 seconds]
Nicmavr has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marmotini_ has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
marmotini_ has joined #ruby
xfbs has quit [Quit: afk]
AJA4350 has quit [Quit: AJA4350]
marmotini_ has quit [Ping timeout: 252 seconds]
Rapture has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jidar has quit [Quit: WeeChat 2.2]
jidar has joined #ruby
marmotini_ has joined #ruby
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hanmac has joined #ruby
hanmac1 has quit [Ping timeout: 240 seconds]
esrse has joined #ruby
cesario has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jidar has quit [Quit: WeeChat 2.2]
luckyruby has joined #ruby
jidar has joined #ruby
luckyruby has quit [Quit: Leaving...]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
Dimik has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
jp has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
chongtxtx has quit [Ping timeout: 252 seconds]
sauvin has quit [Read error: Connection reset by peer]
sauvin has joined #ruby
dellavg_ has joined #ruby
danguita has quit [Quit: Connection closed for inactivity]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
marmotini_ has quit [Ping timeout: 240 seconds]
wojnar has joined #ruby
danguita has joined #ruby
whysthatso has joined #ruby
cd has quit [Quit: cd]
Inline has quit [Quit: Leaving]
arescorpio has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.2]
al2o3-cr has joined #ruby
dellavg_ has quit [Ping timeout: 240 seconds]
MoritaShinobu has joined #ruby
FastJack has joined #ruby
arescorpio has quit [Quit: Leaving.]
SuperL4g has quit [Ping timeout: 246 seconds]
SuperL4g has joined #ruby
whysthatso has quit [Quit: whysthatso]
Sup3rLurk has joined #ruby
kapil____ has joined #ruby
SuperL4g has quit [Ping timeout: 252 seconds]
Furai has quit [Quit: WeeChat 2.3]
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
Tuor has joined #ruby
idiocrash has joined #ruby
anubhav996 has joined #ruby
Furai has joined #ruby
uplime has joined #ruby
uplime has left #ruby [#ruby]
cloaked1 has joined #ruby
reber has joined #ruby
drale2k_ has joined #ruby
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
ponga has joined #ruby
aupadhye has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
venmx has joined #ruby
wojnar has quit [Ping timeout: 252 seconds]
wojnar has joined #ruby
idiocrash has quit [Quit: Textual IRC Client: www.textualapp.com]
wojnar has quit [Client Quit]
graphene has quit [Remote host closed the connection]
venmx has quit [Ping timeout: 240 seconds]
graphene has joined #ruby
clemens3 has joined #ruby
graphene has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
darkhanb has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
ineb has joined #ruby
stemid has joined #ruby
<stemid> hey forgive me but I have no desire to learn ruby I just want to run a small piece of code and I can't figure out how to import Sidekiq::ScheduledSet because I keep getting the error "uninitialized constant Sidekiq::ScheduledSet (NameError)" from this code https://bpaste.net/show/2ce55dbea5a1
tdy has quit [Ping timeout: 240 seconds]
cloaked1 has quit [Ping timeout: 244 seconds]
<stemid> think I figured it out require 'sidekiq/api'
lxsameer has joined #ruby
mikecmpbll has joined #ruby
<z4phod> dd
jp has joined #ruby
venmx has joined #ruby
<Bish> WHATS UP RUBYFOOOLKS
<Bish> to the windoow \o\
<Bish> stemid: what's wrong with ruby >:|
status402 has joined #ruby
tdy has joined #ruby
<stemid> the name is too feminine
stemid has left #ruby [#ruby]
ansraliant has quit [Quit: My planet needs me]
Snowy has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
tdy has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(50).map { |x| y = 1 << x; dr.(y) } # physical
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(50).map { |x| y = 1 << x; dr.(y) }.each_cons(2).map { |n| dr.(n.sum) } # non-physical
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(50).map { |x| y = 1 << x; dr.(y) }.each_cons(2).map { |n| dr.(n.sum) }.each_cons(2).map(&:sum) # unknown-entity
kapil____ has quit [Quit: Connection closed for inactivity]
vondruch has quit [Ping timeout: 252 seconds]
anubhav996 has quit [Quit: Connection closed for inactivity]
vondruch has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.3]
status402 has quit [Quit: status402]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
xfbs has joined #ruby
esrse has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Quit: WeeChat 2.3]
al2o3-cr has joined #ruby
whysthatso has joined #ruby
beefjoe has joined #ruby
drale2k_ has joined #ruby
troulouliou_div2 has joined #ruby
whysthatso has quit [Quit: whysthatso]
whysthatso has joined #ruby
vondruch_ has joined #ruby
AJA4350 has joined #ruby
vondruch has quit [Ping timeout: 272 seconds]
vondruch_ is now known as vondruch
tdy has joined #ruby
marmotini_ has joined #ruby
jsc has joined #ruby
jsc is now known as status402
tdy has quit [Ping timeout: 252 seconds]
marmotini_ has quit [Ping timeout: 240 seconds]
Nicmavr has quit [Write error: Connection reset by peer]
kurko_ has joined #ruby
Nicmavr has joined #ruby
apparition47 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
surrounder has quit [Remote host closed the connection]
surrounder has joined #ruby
ldnunes has joined #ruby
psmolen has quit [Quit: bai]
status402 has quit [Quit: status402]
status402 has joined #ruby
xfbs has quit [Quit: afk]
discopatrick has joined #ruby
gr33n7007h has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
kapil____ has joined #ruby
Snowy has quit [Remote host closed the connection]
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby
status402 has quit [Ping timeout: 240 seconds]
status402 has joined #ruby
status402 has quit [Client Quit]
GodFather has quit [Ping timeout: 252 seconds]
Fusl has quit [Remote host closed the connection]
k0mpa has joined #ruby
status402 has joined #ruby
Fusl has joined #ruby
megabozz has joined #ruby
megabozz has quit [Max SendQ exceeded]
Puffball has quit [Read error: No route to host]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Puffball has joined #ruby
nowhere_man has joined #ruby
bak1an has joined #ruby
thejamespinto has joined #ruby
ua has joined #ruby
ua_ has quit [Ping timeout: 252 seconds]
Snowy has joined #ruby
Snowy has quit [Ping timeout: 264 seconds]
mostlybadfly has joined #ruby
drale2k_ has joined #ruby
jottr has joined #ruby
jottr has quit [Client Quit]
apparition47 has quit [Quit: Bye]
tdy has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k_ has joined #ruby
Snowy has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 252 seconds]
status402 has quit [Ping timeout: 240 seconds]
rubydoc has quit [Remote host closed the connection]
darkxploit has joined #ruby
rubydoc has joined #ruby
<darkxploit> hello, i want to install the latest development version of NET-SSH which is a ruby implementation of SSH from https://github.com/net-ssh/net-ssh. How do i make the installation from source ?
nchambers has quit [Ping timeout: 252 seconds]
<darkxploit> there is both a gemfile and a rakefile inside the source code
status402 has joined #ruby
<phaul> execute `bundle install` then execute `bundle exec rake build`
<darkxploit> phaul: can you please tell me what will the command bundle install do
<phaul> darkxploit: install the gem dependencies
<darkxploit> ok
<darkxploit> and bundle exec rake build
<darkxploit> will it build it from source
<darkxploit> ?
<phaul> build a .gem file that the gem utility can install
<darkxploit> imagine i modify the source code
<phaul> the compilation should be part of rake build
Rapture has joined #ruby
Rapture has quit [Client Quit]
<darkxploit> ahh okay
<darkxploit> thanks .. just did a snapshot of the machine.. and launched a bundle install..
<darkxploit> phaul: ok bunlde exec rake build is succesful
cd has joined #ruby
<phaul> gem install <yournewlybuilt.gem>
beefjoe has quit [Quit: <3]
<phaul> is the last step to make it useable on the system
beefjoe has joined #ruby
Snowy has quit [Ping timeout: 276 seconds]
Bish has quit [Ping timeout: 272 seconds]
Tuor has quit [Quit: Konversation terminated!]
beefjoe has quit [Client Quit]
<darkxploit> phaul: i dont find a new .gem file in the directory
ogres has joined #ruby
<darkxploit> ahh ok
<darkxploit> sorry
<darkxploit> sorry its in pkg directory where it was built by bundle exec rake
<darkxploit> phaul: now it says i gem installed
<darkxploit> ls
<phaul> darkxploit: so I expect the gem to be installed and functioning at this point
<darkxploit> phaul: thank you sir
<phaul> you are welcome
<darkxploit> phaul: how do i uninstall everything
<phaul> gem list --local lists what you have installed. gem uninstall gemname uninstalls it
<darkxploit> hmm okay,,,, easy
LiftLeft has quit [Ping timeout: 264 seconds]
orbyt_ has joined #ruby
LiftLeft has joined #ruby
Puffball has quit [Remote host closed the connection]
aupadhye has quit [Remote host closed the connection]
Puffball has joined #ruby
marmotini_ has joined #ruby
Snowy has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
venmx has quit [Quit: leaving]
tdy has joined #ruby
aces1up has joined #ruby
<aces1up> i know this isnt an active record channel but not getting a response on those chnnels for the issue im having maybe someone here can help https://paste.ofcode.org/XuBbAx3Jq2g6RQxCQkFY6E
<aces1up> is my code.
<aces1up> trying to get a has_many association to work
status402 has quit [Quit: status402]
bmurt has joined #ruby
darkxploit has quit [Ping timeout: 256 seconds]
conta1 has joined #ruby
gr33n7007h has quit [Quit: WeeChat 2.3]
al2o3-cr has joined #ruby
<phaul> aces1up: is /ruby/bot_framework_gem/lib/util/utility.rb your file or one of your dependencies?
<aces1up> hrmm yes could be let me check
<aces1up> yes
<aces1up> its there
<phaul> did you write that source file or it's coming from a gem?
<aces1up> hrmm didnt notice it was referencing my framework.. just assumed it was coming from AR
<aces1up> thanks i will fix that up and see what happens.
<phaul> ok np
<aces1up> yep that fixed it man
<aces1up> was looking at it so long didnt see that lol
venmx has joined #ruby
aces1up has quit []
xfbs has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
mkroman has quit [Ping timeout: 252 seconds]
mkroman has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
Inline has joined #ruby
nowhere_man has joined #ruby
dbugger_ has joined #ruby
ivanskie has joined #ruby
Puffball has quit [Remote host closed the connection]
kurko_ has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
conta1 has quit [Quit: conta1]
SteenJobs has joined #ruby
xfbs has quit [Ping timeout: 252 seconds]
xfbs has joined #ruby
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
<SteenJobs> Hi all - been reading through the various different ways to execute system/shell commands, and I still can’t quite figure out which methods execute the given commands in a subshell vs as a subprocess (akin to python’s `shell=false`), so was hoping someone could help me clear things up
jcarl43 has joined #ruby
jp has joined #ruby
jp has quit [Client Quit]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ogres has quit [Quit: Connection closed for inactivity]
<al2o3-cr> SteenJobs: Kernel#system executes in a subshell
<al2o3-cr> spawn, exec etc.. subprocesses.
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
kurko_ has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
Rapture has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mangold has quit [Quit: This computer has gone to sleep]
c0ncealed3 has quit [Read error: Connection reset by peer]
c0ncealed3 has joined #ruby
<SteenJobs> al2o3-cr: Great, thanks! - so in my script, i want to run a couple git commands, (1) `git fetch` and (2) `git pull`, and then (3) check `git status` - it seems like Open3#capture2 is a great candidate for (3), but for (1) and (2) I see no reason to execute in a subshell, but `exec` will replace the current process rather than creating a subprocess, so what would be a good option for (1) and (2)?
<SteenJobs> (i
<SteenJobs> ugh *i’m writing the script based on a python script from a coworker, where the (1) and (2) equivalent is called using `subprocess.call` to provide some context
kurko__ has joined #ruby
kurko_ has quit [Ping timeout: 272 seconds]
<al2o3-cr> SteenJobs: then use Process.spawn for #1 and #2; Open3#* are just an easy to use wrapper around Process.spawn if that helps.
clemens3 has quit [Remote host closed the connection]
<al2o3-cr> SteenJobs: do you want to capture stderr too?
<al2o3-cr> SteenJobs: if so use Open3.capture2e/3
avelldiroll has quit [Quit: WeeChat 1.6]
<al2o3-cr> you know what open3 was written by the man himself.
darkhanb has joined #ruby
GodFather has joined #ruby
avelldiroll has joined #ruby
<al2o3-cr> SteenJobs: anything your not sure about just ask ;)
<SteenJobs> haha typing rn, ironing out my thoughts/questions, very much appreciated :)
<al2o3-cr> np =P
<SteenJobs> al2o3-cr: my understanding is the parent process will inherit stderr when using Open3.capture2e/3, and i don’t really need to do anything with stderr other than display it and exit the script (which I understand I can do using the status object)
<SteenJobs> as for Process.spawn, it looks like the execution is done asynchronously without explicitly calling Process.wait, is that correct?
<al2o3-cr> correct.
GodFather has quit [Ping timeout: 264 seconds]
jp has joined #ruby
<SteenJobs> is the same true for Open3?
<al2o3-cr> no
<SteenJobs> asking with regards to both Open3.capture* and Open3.popen*
<SteenJobs> ah ok - what exactly is the `wait_thr` param that gets passed into the block for the popen* methods?
<al2o3-cr> well, specifically not with caputre but popen you get a thread
rippa has joined #ruby
<al2o3-cr> the process
zapata has quit [Read error: Connection reset by peer]
cloaked1 has joined #ruby
<al2o3-cr> wht_thr is a Process::Status object with is just basically a thread.
zapata has joined #ruby
<al2o3-cr> returns a p/s object when called
mfunkmann has joined #ruby
<SteenJobs> ok got it, yea wasn’t sure what the object type was
<SteenJobs> so out of curiosity, if Open3 is by default synchronous, how would one use Open3 methods asynchronously? (not applicable to my use case since i need synchronous execution)
<al2o3-cr> sorry Process::Waiter my bad
<al2o3-cr> fork/thead them.
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
<SteenJobs> hmm just pulled up the Process::Waiter docs and looks like pid is its only instance method - but the docs for Open3 show `wait_thr.value` returning a Process::Status object
gigetoo has quit [Ping timeout: 272 seconds]
gigetoo has joined #ruby
GodFather has joined #ruby
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
onkelhotte has joined #ruby
<ivanskie> I have a little bit of code that checks if an executable out of an array exists, then gives me version number. Just spent half an hour googling a way to regex out the version number to no avail.
<bougyman> what's the version number?
<bougyman> I mean, what's an example?
<ivanskie> but then realized wait.. i can just do. string.split(' ')[1]
<bougyman> hahah
<al2o3-cr> SteenJobs: because inherits from Thread
dbugger__ has joined #ruby
<SteenJobs> ah ok, missed that bit
<ivanskie> pip --version, python --version, etc
<al2o3-cr> Thread#value
<ivanskie> so far the only edge case is gcc
<ivanskie> good thing i don't care about gcc
<al2o3-cr> SteenJobs: the # refers to instance methods btw
dbugger_ has quit [Ping timeout: 264 seconds]
jetchisel has joined #ruby
<SteenJobs> right
<SteenJobs> al2o3-cr: i’ll look thru the docs - it does seem that Kernel#system is probably the most straightforward way for (1) and (2) above, and since there’s no input, i guess there’s no potential issue with running a subshell
<al2o3-cr> SteenJobs: for that, sure.
<al2o3-cr> well, #1 and #2 anyway.
<al2o3-cr> ivanskie: what does this string look like?
<ivanskie> pip 18.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
<ivanskie> curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.
<SteenJobs> al2o3-cr: do any of the methods for executing commands bubble up exceptions such that the parent process will simply fail and terminate execution without explicitly checking the Process::Status object?
<ivanskie> or Python 2.7.15
<al2o3-cr> Open3 methods?
<ivanskie> from open3 yes
<ivanskie> nevermind
<al2o3-cr> ivanskie: thats for SteenJobs
<SteenJobs> haha
<al2o3-cr> ;)
* ivanskie slowly turns around and walks away
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
<SteenJobs> al2o3-cr: for either Open3 or Kernel (are Kernel#spawn and Process#spawn identical?)
<al2o3-cr> yeah, identical.
venmx has quit [Ping timeout: 252 seconds]
<al2o3-cr> oh, no.
<al2o3-cr> obviously only if the command doesn't exist
<al2o3-cr> and that'll be Error.
<al2o3-cr> and that'll be Error::ENOENT
<al2o3-cr> ivanskie: what string?
<SteenJobs> i guess for example if the subprocess executes a `git fetch` and for whatever reason origin doesn’t exist or something occured that would cause `git fetch` to fail, would all the methods we discussed require explicitly checking the status object?
<al2o3-cr> SteenJobs: yes.
<ivanskie> "pip 18.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)" or "curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2." etc...
<al2o3-cr> but for 1 and 2 just use system. it will either return true or false.
<SteenJobs> Ok cool - oneeee last q - with Open3.capture*, if stderr is inherited, what exactly does that mean? I assume it means that the subprocess shares the same stderr as the parent process, so in the `git fetch` case, if the child process has a non-zero exit status, would that cause the parent process (the containing script) to stop execution?
<SteenJobs> but yea, in practice i’ll use system for 1 and 2
<al2o3-cr> stderr will be captured in the same stream as stdout using c2/e, c3 will be two seperate streams.
ptx0 has quit [Read error: Connection reset by peer]
<al2o3-cr> SteenJobs: oh yeah sorry. yes.
mikecmpbll has joined #ruby
<al2o3-cr> you can check with t.value.exitstatus.
wojnar has joined #ruby
mangold has joined #ruby
<al2o3-cr> what versoin you after?
<al2o3-cr> how can you split(' ')[1]?
conta1 has joined #ruby
<al2o3-cr> what's is everybodys thoughts on (-1..)? for infinte ragne?
siaw23 has joined #ruby
<al2o3-cr> i think it's brilliant myself
<al2o3-cr> oh and yield_self is alaised to then.]
<siaw23> good eve everyone! what’s be the easiest way to grab the second string. eg: “some cat”
<siaw23> i want to grab “cat” only
<siaw23> currently i’m using
<siaw23> string[] which i don’t want to
<siaw23> will there be an easier way?
<siaw23> so the way i’m doing it is like string[first_string.length + 1, string.length - first_string + 1]
<siaw23> which is too long and i feel there’s an easier way
<al2o3-cr> split.[]/first?
<woodruffw> ^
<al2o3-cr> split.[]/last?
<al2o3-cr> haha
<woodruffw> if the string is exactly two words, String#split and Array#last are what you want
<woodruffw> otherwise, String#split and then get the first element
<woodruffw> err, second element, index 1
<mfunkmann> Hey, which GUI Framework would you guys use for a ruby macOS Desktop App?
<al2o3-cr> "some cat"[/\S+\z/]
<siaw23> woodruffw: sounds like a good idea
<al2o3-cr> shit i forget more ruby i used to nkow.
<al2o3-cr> *know
ptx0 has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
<al2o3-cr> siaw23: ^^
<al2o3-cr> other than that waht woodruffw said. ;)
* al2o3-cr pissed up agian forgive me
SeepingN has joined #ruby
<siaw23> yeah got it
<al2o3-cr> how small this screen going be?
dellavg_ has joined #ruby
<al2o3-cr> x270 thinkpad i ant see on this now
Snowy has quit [Remote host closed the connection]
<al2o3-cr> siaw23: ak, cool.
Snowy has joined #ruby
<phaul> oh ffs. https://github.com/guidomb/app_configuration#customize-your-configuration of course it's instance evaled on an object that doesn't even respond to those methods. But it gets them with method_missing, and then does nothing.
<al2o3-cr> phaul: think of 3, 6 and 9.
<al2o3-cr> tesla was clam
<al2o3-cr> *calm
<phaul> :)
<al2o3-cr> he was a genius by many,.
<al2o3-cr> that dude, WOW.
<al2o3-cr> the univerese is number
Snowy has quit [Ping timeout: 252 seconds]
<al2o3-cr> *numbers
<phaul> also it doesnt bother implementing respond_to_missing. I shouldn't use that library....
<mfunkmann> baweaver: Thank you very much, sir.
<baweaver> I will warn you though that it's not incredibly common
<baweaver> So finding resources may be interesting.
<al2o3-cr> bin nums to ^ 2 = each con 1 2 4 8 5 7 -> digital root -> 6 3 - > each con -> 9 then sum given (49) = 432 wow 432 ^ 2 == speed light
<phaul> al2o3-cr: ok
<phaul> :) if you say so
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).map { |n| dr.(n.sum) }.each_cons(2).map(&:sum).sum
<al2o3-cr> very interesting to me,
<al2o3-cr> 432 ** 2 = 186....
<phaul> looks pretty much random to me. what is this
GodFather has quit [Ping timeout: 240 seconds]
<al2o3-cr> phaul: random? wtf ;)
whysthatso has quit [Quit: whysthatso]
<baweaver> ....
<baweaver> It's too early for me to try and figure that out
<baweaver> al2o3-cr: the last three could be flatten.sum, no?
<al2o3-cr> baweaver: no.
<al2o3-cr> baweaver: one sec i give you my 3 dimensoins
<al2o3-cr> on tik
<baweaver> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).sum { |n| dr.(n.sum) }
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).sum
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).sum { |n| dr.(n.sum) }
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).sum { |n| dr.(n.sum) }.map(&:sum)
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).sum { |n| dr.(n.sum) }.map(&:sum).sum
<al2o3-cr> dr = -> n { 1 + (n - 1) % 9 }; 0.step(49).map { |x| y = 1 << x; dr.(y) }.each_cons(2).sum { |n| dr.(n.sum) }.map(&:sum).sum ** 2
<al2o3-cr> thats it.
* baweaver goes to get coffee
ivanskie has quit [Read error: Connection reset by peer]
<phaul> I must have missed the begining of the conversation because this makes 0 sense to me :)
<al2o3-cr> phaul: tesla 3,6 and 9
<phaul> yeah, that cleared it up
<al2o3-cr> i'd explain it but to drunk ;)
<al2o3-cr> that was before +)
<phaul> no problemo :)
<al2o3-cr> that was ctrl+r it doesn't even make senes to me naw :)
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> base 2 to infinite and beyond
<al2o3-cr> i should of litsened in mathematics.
<al2o3-cr> Complex(3,4) * Complex(3,4).conj # real / imaginary pythag.
<al2o3-cr> Complex numbers + - + -
<al2o3-cr> wow so difficlut
whysthatso has joined #ruby
<al2o3-cr> axis this axis that.
<al2o3-cr> i should of listened instead of pissing about.
<al2o3-cr> baweaver: have some coffee for me too ;)
voiceftp has joined #ruby
voice_ftp has joined #ruby
voiceftp has quit [Client Quit]
voice_ftp has quit [Remote host closed the connection]
siaw23 has quit [Quit: siaw23]
voiceftp has joined #ruby
voice_ftp has joined #ruby
siaw23 has joined #ruby
siaw23 has left #ruby [#ruby]
voice_ftp has quit [Client Quit]
<al2o3-cr> (1..10).select &-> n { n > 3 }.curry
<al2o3-cr> that's the best currt in the worl.xd
<al2o3-cr> *curyy sorry
mfunkmann has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> the lang is just amazing"!!!!!!
<al2o3-cr> Process.arv0 still f*ck'd
sameerynho has joined #ruby
lxsameer has quit [Quit: WeeChat 2.1]
x0f has quit [Ping timeout: 250 seconds]
x0f has joined #ruby
Snowy has joined #ruby
conta1 has quit [Remote host closed the connection]
<al2o3-cr> Etc.nprocessors >> 1 # who has here as the most physical processors?
<al2o3-cr> cores.
<al2o3-cr> i'll go first 128
<al2o3-cr> with hyperthraeding 64
dogweather has joined #ruby
<cthulchu_> so we've been discussing ops
<cthulchu_> and we decided that the less an op uses their power, the better op they are
<cthulchu_> also best channels seem to have no ops at all
<al2o3-cr> cthulchu_: how are you dude?#
dogweather has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<cthulchu_> I'm good, thanks
<al2o3-cr> i got a blazing fast laptop here, faster than rust. you just wouldtn beleive it ;+)]
<cthulchu_> hehe, where did you get it from? :)
<al2o3-cr> it's was given to me
<cthulchu_> by whom
dogweather has joined #ruby
<al2o3-cr> the local church.
<cthulchu_> congrats on that
<al2o3-cr> thank you.
<al2o3-cr> but need upgrade naw
<al2o3-cr> *now
<al2o3-cr> i need a x270
<al2o3-cr> x280 no good.
<al2o3-cr> im on t430s still good but..
<al2o3-cr> the samsing ssd probably worth more than this now.
<al2o3-cr> i reckon if sell 125
<al2o3-cr> cthulchu_: what you running on ?
LiftLeft is now known as NpcOrangeManBad
x0f has quit [Quit: quit]
x0f has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dellavg_ has quit [Ping timeout: 240 seconds]
Snowy has quit [Ping timeout: 264 seconds]
Snowy has joined #ruby
akosednar has quit [Ping timeout: 268 seconds]
al2o3-cr is now known as cmtptr2
cmtptr2 is now known as al2o3-cr
eckhardt_ has joined #ruby
voolik has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
sameerynho has quit [Quit: WeeChat 2.2]
Snowy has quit [Quit: ragequit]
kurko__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko_ has joined #ruby
venmx has joined #ruby
voolik has quit [Quit: Leaving]
akosednar has joined #ruby
thejs has joined #ruby
thejs has quit [Remote host closed the connection]
voolik has joined #ruby
tdy has quit [Ping timeout: 268 seconds]
zapata has quit [Quit: WeeChat 2.2]
voolik is now known as toolik
toolik is now known as voolik
cd has quit [Quit: cd]
reber has quit [Read error: Connection reset by peer]
whysthatso has quit [Quit: whysthatso]
BH23 has joined #ruby
BH23 has quit [Client Quit]
<baweaver> cthulchu_: Depends on whether or not the usage is warranted.
<cthulchu_> I believe you can always justify usage
<cthulchu_> the opposite is true too
<cthulchu_> you can always avoid usage
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
voolik has quit [Quit: Taking a nap...]
<baweaver> If someone's disrupting the channel or breaking the rules we do something about it.
SteenJobs has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
xfbs has quit [Quit: afk]
mangold has joined #ruby
kurko_ has joined #ruby
onkelhotte has quit [Quit: WeeChat 2.2]
<SteenJobs> al2o3-cr: thanks for the help before, sorry i suddenly disappeared, totally lost track of time and had to bolt to an appointment haha
<al2o3-cr> SteenJobs: wt. yw.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
SteenJobs has quit [Quit: SteenJobs]
<al2o3-cr> baweaver: best wishes
<al2o3-cr> baweaver: best wishes dude!
SteenJobs has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
eddof13 has joined #ruby
<al2o3-cr> baweaver: "amFzb24gbXllcnM=" unpack this string (base64)
<al2o3-cr> using String#unpack
ldnunes has quit [Quit: Leaving]
dbugger__ has quit [Remote host closed the connection]
<al2o3-cr> "amFzb24gbXllcnM=".unpack1('m0') == %(jason myers)
<al2o3-cr> the michaels brothre
<al2o3-cr> baweaver: you need to get ya pecking sweet!
leitz has joined #ruby
<al2o3-cr> *order
pharma_joe has joined #ruby
<baweaver> al2o3-cr: easy on the juice.
<al2o3-cr> baweaver: sweeto ;)
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> ok, i.m ko np.
<al2o3-cr> ^ baweaver
<phaul> don't forget to hydrate yourself. large glass of water will help. you will be thankful tomorrow :)
<al2o3-cr> phaul: too true.]
<al2o3-cr> big water tomos.
<al2o3-cr> never break the chain.
BlaDe^ has joined #ruby
<BlaDe^> with the erb command line tool, how can I define an array?
<al2o3-cr> BlaDe^: var=arrzy that'll do it.
venmx has quit [Ping timeout: 252 seconds]
<al2o3-cr> no spaces tho
<al2o3-cr> arr=[blha,blah,blah]
<al2o3-cr> gets reads until \n
<BlaDe^> oh, easy. What about an object? .. so foo[:bar]
<al2o3-cr> ok, no probs
Nicmavr has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: inabit. zz.]
<al2o3-cr> BlaDe^: what have you tried oin the command line??
Nicmavr has joined #ruby
<BlaDe^> well, right now I'm trying to do erb -r ./env.rb config.erb
<BlaDe^> and I get undefined local variable or method `node' for main:Object (NameError) .. when defining node = {:environment => 'local'} in env.rb
SteenJobs has quit [Quit: SteenJobs]
<al2o3-cr> BlaDe^: your env.eb isn't relative then.
<BlaDe^> it is picking up the .rb for sure because if I make a syntax error it barfs
<al2o3-cr> a systax error?
SteenJobs has joined #ruby
<BlaDe^> yeah, instead of => if I do = I get: env.rb:2: syntax error, unexpected '=', expecting => (SyntaxError)
<BlaDe^> so it is reading the correct file..
<al2o3-cr> BlaDe^: so you got a syntax error somewhere
<BlaDe^> I made that on purpose to prove the env.rb is relative and is being loaded by erb
<BlaDe^> the real issue I'm facing is why it thinks `node` is undefined when I'm setting node = { ... } in the .rb file
<al2o3-cr> well its not finding node]
pharma_joe has joined #ruby
<BlaDe^> yeah :( any ideas why?
Eiam has quit [Remote host closed the connection]
<al2o3-cr> it'll help if you can show your code? (if possible)
<al2o3-cr> hsow gist
<al2o3-cr> !gsit
_phaul has joined #ruby
<al2o3-cr> !gist
<al2o3-cr> ffs
im0nde has quit [Ping timeout: 264 seconds]
xfbs has joined #ruby
<al2o3-cr> just psate in
fluxAeon has joined #ruby
<al2o3-cr> *paste
<ruby[bot]> BlaDe^: as I told you already, please use https://gist.github.com
<BlaDe^> wow, aggressive bot :p
phaul has quit [Ping timeout: 246 seconds]
_phaul is now known as phaul
<BlaDe^> I don't have my 2FA right now to login to github to gist :X
<al2o3-cr> that basically telling you there is no method at top level.
nicesignal has quit [Remote host closed the connection]
<al2o3-cr> line 26
nicesignal has joined #ruby
<BlaDe^> how should I go about that? the .erb is fine when I run via my chef cookbook
<BlaDe^> I'm trying to share the .erb with a local setup and just run erb against a .env file
<al2o3-cr> paste config.lua.erg
<al2o3-cr> paste config.lua.er*b
<al2o3-cr> redeacted
<al2o3-cr> your namespacing is no good.
<BlaDe^> it's a huge lua file with <%= node[:var] %> and <% unless node[:environment] == 'prod' %> blocks in it -- i don't _have_ any namespacing in the .erb file itself
<BlaDe^> I didn't setup our chef stuff, so I don't really know how it works.. I'm just trying to make the .erb file render without a full chef run, locally
<al2o3-cr> you sure that definitly name is right?
<al2o3-cr> node?
<al2o3-cr> just check please.
marmotini_ has quit [Ping timeout: 244 seconds]
<BlaDe^> the .env.rb i pasted is raw from my text editor - not changed at all, and I apsted the 3 lines from .config.erb .. Let me play a little
<al2o3-cr> BlaDe^: node doesn't exist.
im0nde has joined #ruby
<BlaDe^> $ head -1 env.rb ---> node = {
<BlaDe^> do i have to... export it or something?
<phaul> use instance variables
<phaul> @node = { ...
<phaul> and @node in the erb file
<al2o3-cr> phaul: they dont't have to, if it's in the namespace they're saying.....
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> braincrash: -O
<al2o3-cr> braincrash: sorry, shit tab-comp
<al2o3-cr> BlaDe^: that should see it.
<al2o3-cr> are you a dir down?
<phaul> can we try it though? I bet it will fix it
<al2o3-cr> phaul: globals will fix it too.#
<al2o3-cr> that's not the point.
<BlaDe^> if I use @node I get config.lua.erb:26:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
<BlaDe^> al2o3-cr: actually I am a dir down.... that matters?!
SteenJobs has quit [Quit: SteenJobs]
<BlaDe^> i have .env.rb and app/config.lua.erb ... expect that erb -r .env.rb app/config.lua.erb would work..
<al2o3-cr> BlaDe^: what does pwd
<al2o3-cr> say?
<ruby[bot]> BlaDe^: as I told you already, please use https://gist.github.com
leitz has quit [Remote host closed the connection]
<al2o3-cr> BlaDe^: that should work. really.
<BlaDe^> pwd is /Users/admin/demo/ ... which houses .env.erb and app/config.lua.erb
<BlaDe^> yeah, that's my thinking too?!
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
<BlaDe^> I just added .env.rb -- @test = 'foo' and <%= @test %> to the .erb and it passes fine, still barfs on the node line
<BlaDe^> but test = 'foo and <%= test %> doesn't work for probably an unrelated reason config.lua.erb:7:in `test': wrong number of arguments (given 0, expected 2..3) (ArgumentError)
<al2o3-cr> i'll have to see config
<BlaDe^> al2o3-cr: this is actually SUPER easy to repro
<BlaDe^> echo "node = { :environment => 'foo' }" >> foo.rb; echo "<%= node[:environment] %>" >> bar.erb ; erb -r ./foo.rb bar.erb
<BlaDe^> bar.erb:1:in `<main>': undefined local variable or method `node' for main:Object (NameError)
<al2o3-cr> haveoh ffs
fluxAeon has quit [Ping timeout: 252 seconds]
SeepingN_ has quit [Quit: The system is going down for reboot NOW!]
<al2o3-cr> BlaDe^: SUPER clueless.
<BlaDe^> al2o3-cr: im glad i'm not crazy, at least
<phaul> al2o3-cr: I don't think it's supposed to work with local vars
<phaul> use instance vars. as I already suggested. That *will* fix it
<BlaDe^> yeah... the @ does help - but then I can't use the same file in chef and locally, which is... kind of what im striving for
<phaul> well you could define methods :) def node ...
<phaul> that should also fix it
<BlaDe^> huh? a method can be treated like an object?
<BlaDe^> I basically hammer chef cookbooks until they do what I want, and have no real idea how anything works in ruby land
phenom has joined #ruby
<al2o3-cr> a method can retrun anytink
<phaul> def node ; { environment: 'foo' }; end
<BlaDe^> return.. right.. but wouldn't I need to call it to access the resulting object? so it wouldn't be the same erb
* BlaDe^ tests
eddof13 has quit [Quit: eddof13]
<al2o3-cr> that should of worked regardless.
<BlaDe^> woah, that works
<BlaDe^> WHY DOES THAT WORK. lol.
bak1an has joined #ruby
<al2o3-cr> BlaDe^: instance variables and shit.
hitchhikingcoder has joined #ruby
<BlaDe^> thanks al2o3-cr & phaul
hitchhikingcoder has quit [Remote host closed the connection]
eddof13 has joined #ruby
<al2o3-cr> BlaDe^: don't thank me. thank phaul !:)
hitchhikingcoder has joined #ruby
hitchhikingcoder has quit [Remote host closed the connection]
eddof13 has quit [Client Quit]
<al2o3-cr> that should work. wtf.
<BlaDe^> but you provided emotional support in the form of making me feel like less of a dumbass
leitz has joined #ruby
eckhardt_ has joined #ruby
<phaul> al2o3-cr: I see the code getting the top level binding being passed into erb. but how does it get the top level of the -r file? isn't thata separate lexical scope anyways?
<al2o3-cr> BlaDe^: tomorrow i test this out.
hitchhikingcoder has joined #ruby
<BlaDe^> ha ok I am intrigued to hear more
<phaul> I mean is this broken, .... ?
jetchisel has quit [Ping timeout: 252 seconds]
hitchhikingcoder is now known as darthfork
<al2o3-cr> phaul: BlaDe^ I FIX THIS,]
<BlaDe^> lol
jetchisel has joined #ruby
<phaul> this is from 2010
<phaul> so hard to beleive that it was ever working like that
<al2o3-cr> too much drink tnight. i cee tmos.
<phaul> take care mate
nexraf1 has joined #ruby
<al2o3-cr> you too. ruby elite ;)
darthfork has quit [Quit: darthfork]
hitchhikingcoder has joined #ruby
hitchhikingcoder has quit [Remote host closed the connection]
darthfork has joined #ruby
Eiam has joined #ruby
wojnar has quit [Remote host closed the connection]
kapil____ has quit [Quit: Connection closed for inactivity]
leitz has quit [Quit: Leaving]
darthfork has quit [Remote host closed the connection]
dnewkerk has joined #ruby
ziggylazer has quit [Ping timeout: 264 seconds]
orbyt_ has joined #ruby
thejamespinto has quit [Ping timeout: 252 seconds]
ziggylazer has joined #ruby
<phaul> fwiw this also works TOPLEVEL_BINDING.local_variable_set(:node, {... , the difference has to be that the required file does not run in TOPLEVEL. I am guessing though, can anyone confirm?
bhaak has quit [Ping timeout: 268 seconds]