apeiros changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
rcvalle has quit [Quit: rcvalle]
whiteline has quit [Ping timeout: 246 seconds]
teclator has quit [Quit: No Ping reply in 180 seconds.]
Ropeney has joined #ruby
jhn has joined #ruby
solocshaw has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
tuxaddicted has joined #ruby
ag4ve has joined #ruby
<CausaMortis> baweaver: Appreciate it. Took me longer than anticipated to figure that one out but I got it. Got to love the articles on thoughtbot
pilne has joined #ruby
AlexRussia has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
gusrub__ has quit [Remote host closed the connection]
skweek has joined #ruby
ag4ve has quit [Ping timeout: 260 seconds]
gusrub_ has joined #ruby
vikaton has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dnicole has quit [Remote host closed the connection]
nankyokusei has joined #ruby
hahuang61 has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
muelleme has joined #ruby
hahuang61 has joined #ruby
tvw has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 260 seconds]
frmendes has quit [Quit: cya...]
gusrub_ has quit [Remote host closed the connection]
gusrub_ has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
statelesscode has joined #ruby
muelleme has quit [Ping timeout: 250 seconds]
hays_ has joined #ruby
gusrub_ has quit [Remote host closed the connection]
boombox_ has joined #ruby
sphex has quit [Ping timeout: 244 seconds]
gusrub_ has joined #ruby
hays has quit [Ping timeout: 252 seconds]
GodFather has quit [Read error: Connection reset by peer]
sphex has joined #ruby
mikecmpbll has joined #ruby
ICantCook has quit [Quit: bye]
ICantCook has joined #ruby
csk has joined #ruby
ur5us has joined #ruby
nchambers is now known as god
johnmccabe has joined #ruby
boombox_ has quit [Remote host closed the connection]
marr has joined #ruby
pwnd_nsfw` has joined #ruby
cdg has quit [Remote host closed the connection]
mBailey_j has joined #ruby
AlexRussia has joined #ruby
god is now known as nchambers
GodFather has joined #ruby
jcao219 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 258 seconds]
sneakers has joined #ruby
gusrub_ has quit [Remote host closed the connection]
JoshS has joined #ruby
AlexRussia has quit [Ping timeout: 256 seconds]
gusrub_ has joined #ruby
jhack has quit [Quit: jhack]
Vile` has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
redpants has quit [Quit: leaving]
quazimodo has joined #ruby
gusrub_ has quit [Remote host closed the connection]
bayed has quit [Quit: Connection closed for inactivity]
gusrub_ has joined #ruby
Immune has quit [Ping timeout: 260 seconds]
allcentury has joined #ruby
<alexandernst> I have a method that expects "something" and then it does "something.id". I want to test (rspec) that method, but I don't want to create a new "something" object. Is there some (very short) way to fake that object so the method could still access the ".id" attr?
<xavier2> What's the most widely accepted opinion on the `unless` keyword?
<tobiasvl> it's readable?
mBailey_j has quit [Ping timeout: 246 seconds]
<eam> it starts with the letter u
<ineb> alexandernst: you want to test a method on an object without creating the object? why?
<xavier2> I find it easy to read but people say that you have to read until the end of the line to notice it which is the only weak point I can find
<alexandernst> ineb: I want to test the method itself. I don't care about the object and it's it (it could pretty much be '1')
<alexandernst> s/it/id/
<xavier2> I know I've seen my fair share of pitchforks using it in another language, just wanted to make sure I didn't oppress anyone here
<ineb> alexandernst: then mock it. allow(object).to receive(:id) { 1 }
<alexandernst> let(:e_obj) { OpenStruct.new(:id => 1) }
<alexandernst> that's what I was looking
<alexandernst> now I can pass e_obj and let my method access the .id property
smlocal has quit []
futabachannel has joined #ruby
<ineb> alexandernst: with my approach you can restrict the usage. allow .id to be called only once etc.
AndrewIsHere has joined #ruby
A5101 has quit [Quit: WeeChat 1.4]
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
AndrewIsHere has quit [Client Quit]
Felipe__ has joined #ruby
_sfiguser has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
bronson_ has quit [Read error: Connection reset by peer]
Felipe__ has quit [Quit: Leaving]
mikhael_k33hl has joined #ruby
nahra has quit [Read error: Connection reset by peer]
jhn has joined #ruby
nahra has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
<mikhael_k33hl> Hello, I am writing a ruby script/program invoking linux rsync processes to copy files from a remote host. I would just like to ask for any advice/suggestion or anything on how do I test it before deploying it on production to make sure it is working?
CausaMortis has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ruby
Felipe__ has joined #ruby
d3d1rty has quit [Ping timeout: 244 seconds]
_sfiguser has joined #ruby
Felipe__ has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
jcao219 has quit [Ping timeout: 240 seconds]
gusrub_ has quit [Remote host closed the connection]
enterprisey has joined #ruby
xlegoman has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
whathappens has quit [Remote host closed the connection]
millerti has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
_djbkd has quit [Quit: My people need me...]
MrBusiness has joined #ruby
zukin has joined #ruby
MrBusiness is now known as Guest89253
skweek has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ruby
Felipe__ has joined #ruby
Felipe__ has quit [Remote host closed the connection]
splud has quit [Ping timeout: 260 seconds]
sneakers has quit [Read error: Connection reset by peer]
tau has quit [Remote host closed the connection]
<agent_white> Cross your fingers!
solocshaw has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
jcao219 has joined #ruby
splud has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
honore has quit [Quit: zzz]
Channel6 has joined #ruby
Littlemyu has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bovis> mikhael_k33hl: test how it interacts with various locations, such as a user's home directory or a system root file, which the user shouldn't be able to access
<bovis> What happens when you try to copy nothing from the remote host?
<bovis> Does it preserve/remove permissions like you want it to?
<bovis> *system root directory
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ajsharma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
izaac has quit [Ping timeout: 258 seconds]
<bovis> Come at it with the mindset: I want to break this app. Then see if you can
enterprisey has quit [Ping timeout: 258 seconds]
izaac has joined #ruby
enterprisey has joined #ruby
whiteline has joined #ruby
mipesom has quit [Ping timeout: 244 seconds]
astrobunny has joined #ruby
wpostma1 has joined #ruby
mipesom has joined #ruby
<bovis> mikhael_k33hl: Hand it off to other willing test users to have them break it for you.
fmcgeough has quit [Quit: fmcgeough]
AlexRussia has joined #ruby
<mikhael_k33hl> bovis: Yeah, I guess I'll have to create unit/functional test then run it for acceptance testing
GodFather has quit [Ping timeout: 268 seconds]
<bovis> mikhael_k33hl: Those kinds of tests will be useful in making future changes.
chris349 has quit [Ping timeout: 256 seconds]
<mikhael_k33hl> bovis: yep, guess the only way to make sure that it runs as intended is to actually run it of course hehe, stupid me
<mikhael_k33hl> :D
nankyokusei has joined #ruby
watersoul_ has joined #ruby
AlexRussia has quit [Ping timeout: 246 seconds]
vondruch_ has joined #ruby
d3d1rty has joined #ruby
whathappens has joined #ruby
vondruch has quit [Write error: Broken pipe]
bovis has quit [Write error: Broken pipe]
watersoul has quit [Write error: Broken pipe]
matp has quit [Excess Flood]
wnd has quit [Excess Flood]
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wnd has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
DroidBurgundy has quit []
jenrzzz has quit [Ping timeout: 245 seconds]
matp has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
mikhael_k33hl has quit [Quit: Page closed]
bovis has joined #ruby
enterprisey has quit [Quit: Leaving]
blackwind_123 has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
Olipro has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
blackwind_123 has joined #ruby
Olipro has quit [Excess Flood]
mikecmpbll has quit [Quit: inabit. zz.]
fmcgeough has joined #ruby
Olipro has joined #ruby
p0p0pr37 has quit [Changing host]
p0p0pr37 has joined #ruby
jhack has quit [Client Quit]
kyle__ has quit [Quit: WeeChat 1.6]
kyle has joined #ruby
d^sh has quit [Ping timeout: 258 seconds]
kyle is now known as kyle__
brent__ has quit [Quit: Connection closed for inactivity]
d3d1rty has quit [Ping timeout: 265 seconds]
d^sh has joined #ruby
wpostma1 has quit [Ping timeout: 256 seconds]
Eiam has quit [Ping timeout: 268 seconds]
Robtop__ has joined #ruby
Rickmasta has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 256 seconds]
pwnd_nsfw has joined #ruby
wpostma1 has joined #ruby
dhollinger has quit [Quit: WeeChat 1.0.1]
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
zukin has quit [Ping timeout: 240 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
Robtop__ has quit [Ping timeout: 240 seconds]
dhollinger has quit [Client Quit]
zukin has joined #ruby
dhollinger has joined #ruby
zukin has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ur5us has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
alxgsv has joined #ruby
AlexRussia has joined #ruby
Satyajit has joined #ruby
freedrull has quit [Remote host closed the connection]
cdg has joined #ruby
ajsharma has joined #ruby
solocshaw has joined #ruby
zel has joined #ruby
pawnbox has joined #ruby
zel is now known as Guest1564
AlexRussia has quit [Ping timeout: 268 seconds]
optiz0r has quit [Ping timeout: 245 seconds]
fmcgeough has quit [Quit: fmcgeough]
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
phaza_ has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
phaza has quit [Ping timeout: 250 seconds]
railssmi_ has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
axisys has quit [Ping timeout: 244 seconds]
railssmi_ has quit [Client Quit]
solocshaw has joined #ruby
railssmith has quit [Ping timeout: 258 seconds]
blackwind_123 has joined #ruby
whathappens has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 258 seconds]
charliesome has joined #ruby
hanmac has joined #ruby
ledestin has quit [Read error: Connection reset by peer]
splud has quit [Quit: splud]
pilne has quit [Quit: Quitting!]
marr has quit [Ping timeout: 265 seconds]
optiz0r has joined #ruby
astrobunny has quit [Remote host closed the connection]
mikhael_k33hl has joined #ruby
phaza_ has quit [Read error: Connection reset by peer]
phaza has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
vikaton has joined #ruby
blackwind_123 has joined #ruby
harai_ has quit [Ping timeout: 240 seconds]
byte512 has quit [Ping timeout: 246 seconds]
hightower3 has joined #ruby
<mikhael_k33hl> Anyone know of a more comprehensive documentation for MiniTest?
AlexRussia has joined #ruby
Olipro has quit [Ping timeout: 260 seconds]
Immune has joined #ruby
<nofxx> mikhael_k33hl, you'll probably find some blogs around, but it's really just ruby
<nofxx> that's kinda the point and the 'mini' in the name... there's ain't much ;)
<mikhael_k33hl> nofxx: so you're saying i'm better off using rspec?
<nofxx> nope, both are great
wpostma1 has quit [Ping timeout: 252 seconds]
<mikhael_k33hl> nofxx: okay, i'll give it a try
<mikhael_k33hl> nofxx: fairly new to ruby though
<nofxx> mikhael_k33hl, yeah, go with minitest to start... check out rspec later... thought I was the only one that starts a language looking for tests hehe
AlexRussia has quit [Ping timeout: 260 seconds]
<nofxx> I think it's a great way to learn, have something to test your code
<nofxx> mikhael_k33hl, check out 'guard' if you don't use it yet...
<nofxx> be sure to add the rubocop plugin to it too, great way to improve ugly code
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
blackwind_123 has quit [Ping timeout: 260 seconds]
charliesome has quit [Ping timeout: 244 seconds]
brent__ has joined #ruby
scottschecter has quit [Ping timeout: 260 seconds]
<nofxx> mikhael_k33hl, well, just by look, please set your editor to two spaces... but apart from that looks like ruby =D
solocshaw has joined #ruby
<nofxx> also, you can gist multiple files, in a single gist
jenrzzz has quit [Ping timeout: 258 seconds]
jcao219 has quit [Ping timeout: 260 seconds]
blackwind_123 has joined #ruby
zapata has quit [Quit: WeeChat 1.6]
charliesome has joined #ruby
agent_white has quit [Quit: backinabit]
hahuang61 has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
Olipro has joined #ruby
blackwind_123 has quit [Ping timeout: 268 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
hahuang61 has quit [Ping timeout: 258 seconds]
jcao219 has joined #ruby
mBailey_j has joined #ruby
blackwind_123 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
agent_white has joined #ruby
pawnbox has quit [Remote host closed the connection]
dkam has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
AlexRussia has joined #ruby
harai_ has joined #ruby
cyphase has joined #ruby
astrobunny has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
whathappens has joined #ruby
bihi has quit [Quit: Bye!]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
bihi has joined #ruby
Littlemyu has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
AlexRussia has joined #ruby
alan_w has quit [Quit: WeeChat 1.4]
<mBailey_j> hi, so im running slackware kernel 4.4 atm in live mode and i've already installed ruby 2.2 via slackpkg and later installed -v 2.3 via source. I'm wondering how to run 2.3 rather than 2.2? as i'm having gem dependecy issues for a metasploit-framework git package.
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
dionysus69 has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
AlexRussia has quit [Ping timeout: 256 seconds]
<nofxx> mBailey_j, by chance tried archlinux? it's slack - the suffering
whathappens has quit [Ping timeout: 248 seconds]
byte512 has joined #ruby
<nofxx> it's on ruby 2.3 for months now...
AlexRussia has joined #ruby
dnicole has joined #ruby
<adam12> mBailey_j: When you say via source, is that ./configure ; make ; make install?
<nofxx> I guess so.. that doesn't include the /bin part hence the problem
gix has quit [Ping timeout: 268 seconds]
<nofxx> mBailey_j, another idea is just change slackpkg script... or see what it does
<mBailey_j> adam12, uh. yea i beleive so.
<mBailey_j> so, it's slackware issue...?
<adam12> mBailey_j: if you run `/usr/local/bin/ruby -v`, do you see ruby-2.3?
cdg has quit [Remote host closed the connection]
<mBailey_j> ruby 2.2.5p319
cyphase has quit [Ping timeout: 248 seconds]
<adam12> Strange.
<mBailey_j> from source its theruby 2.2.5p319 2.3 version however.
<adam12> I dont follow.
<mBailey_j> sorry...this install is still buggy
<mBailey_j> from source it's the 2.3 version
gix has joined #ruby
<adam12> But you can't run that version?
<mBailey_j> not sure how...
<mBailey_j> files and directories all look the same
<mBailey_j> meaning none are distinguished by color or bold font
<adam12> What files/directories are you comparing exactly?
blackwind_123 has quit [Ping timeout: 258 seconds]
<mBailey_j> the ones in the ruby-2.3.1 directory
<mikhael_k33hl> I'm getting an error: NameError: uninitialized constant TestMyApp::MyAppUtilities when running my test MyAppUtilities
wpostma1 has joined #ruby
<mikhael_k33hl> Did I miss anything?
<adam12> mBailey_j: Where is that folder exactly?
charliesome has joined #ruby
AlexRussia has quit [Ping timeout: 258 seconds]
blackwind_123 has joined #ruby
ecksit has joined #ruby
byte512 has quit [Ping timeout: 248 seconds]
igniting has quit [Ping timeout: 265 seconds]
jaguarmagenta has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
<mBailey_j> in downloads atm
enterprisey has joined #ruby
<mBailey_j> path is /downloads/ruby-2.3/
enterprisey has quit [Client Quit]
blackwind_123 has quit [Ping timeout: 258 seconds]
Vile` has quit [Ping timeout: 258 seconds]
ecksit has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has joined #ruby
ecksit has joined #ruby
ezrios has joined #ruby
<adam12> mBailey_j: You likely need to `make install`
<adam12> mBailey_j: Which I suspect will put it in /usr/local/bin
<adam12> mBailey_j: which you will then update your PATH to add that path to the front.
ecksit has quit [Client Quit]
<ezrios> suppose I have a `class Foo; def initialize(x,y); @x = x; @y = y; end` and I want to define equality between two instances as `def ==(other); @x == other.x && @y == other.y`, but I don't want to expose the attributes of the `other` instance as attr_readers
<ezrios> is there a common idiom in ruby for achieving this?
<ezrios> short of `instance_variable_get`
xavier2 has quit [Read error: Connection reset by peer]
<adam12> ezrios: Use protected maybe?
jcao219 has quit [Ping timeout: 244 seconds]
<ezrios> ah I always forget about protected
xavier2 has joined #ruby
<adam12> It would expose them, but only to instances of the same class. I think that might work? I dunno.
phaza has quit [Read error: Connection reset by peer]
phaza_ has joined #ruby
jcao219 has joined #ruby
blackwind_123 has joined #ruby
<mBailey_j> sorry, one sec guys. im working with a dev on a package issue also.
bihi has quit [Ping timeout: 260 seconds]
<mBailey_j> is there a paste for this channel?
<bovis> I finally got my word wrapping, numbers, and colors to print properly to screen. Sigh. Of. Relief. What year is it now?
<bovis> mBailey_j: https://gist.github.com
<mBailey_j> mmk
ur5us has quit [Remote host closed the connection]
<mBailey_j> bovis, thank youbash-4.3# ./msfconsole
<mBailey_j> Run `bundle install` to install missing gems.
<mBailey_j> bash-4.3# bundle
<mBailey_j> Your bundle is locked to json (1.8.3), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of json (1.8.3) has removed it. You'll need to update your bundle to a different version of json (1.8.3) that hasn't been removed in order to install.
<mBailey_j> Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root
<mBailey_j> will break this application for all non-root users on this machine.
<mBailey_j> Fetching gem metadata from https://rubygems.org/...........
<mBailey_j> Fetching version metadata from https://rubygems.org/..
<mBailey_j> Fetching dependency metadata from https://rubygems.org/.
<ezrios> adam12: thanks
<mBailey_j> Resolving dependencies....
<mBailey_j> Using rake 11.3.0
<mBailey_j> Using i18n 0.7.0
<mBailey_j> Installing json 1.8.3 with native extensions
<mBailey_j> Using minitest 5.9.1
<ezrios> uh
<mBailey_j> Using thread_safe 0.3.5
<mBailey_j> Using builder 3.2.2
<mBailey_j> Using erubis 2.7.0
<bovis> what's happening?
<mBailey_j> Using mini_portile2 2.1.0
<mBailey_j> Using rack 1.6.5
<mBailey_j> Using arel 6.0.3
<mBailey_j> Using public_suffix 2.0.4
<mBailey_j> Installing ffi 1.9.14 with native extensions
<ezrios> looks like he pasted into the wrong window
<mBailey_j> Using contracts 0.14.0
kareelee has joined #ruby
<mBailey_j> Using gherkin 4.0.0
<bovis> hahah
<mBailey_j> Using cucumber-wire 0.0.1
whathappens has joined #ruby
<mBailey_j> Using diff-lcs 1.2.5
<mBailey_j> Using multi_json 1.12.1
<mBailey_j> Using multi_test 0.1.2
<mBailey_j> Using rspec-support 3.5.0
<mBailey_j> Using thor 0.19.1
<mBailey_j> Installing bcrypt 3.1.11 with native extensions
<mBailey_j> Using bit-struct 0.15.0
<mBailey_j> Using mime-types-data 3.2016.0521
<mBailey_j> Using coderay 1.1.1
<mBailey_j> Using docile 1.1.5
<mBailey_j> Using multipart-post 2.0.0
<mBailey_j> Using filesize 0.1.1
<mBailey_j> Using fivemat 1.3.2
<mBailey_j> Using rkelly-remix 0.0.6
<mBailey_j> Using metasm 1.0.2
bluOxigen has joined #ruby
<mBailey_j> Installing pg 0.19.0 with native extensions
<mBailey_j> Installing pg_array_parser 0.0.9 with native extensions
<mBailey_j> Using rubyntlm 0.6.1
<mBailey_j> Using rubyzip 1.2.0
<mBailey_j> Using metasploit-payloads 1.1.29
<bovis> time for a cup of tea while #ruby compiles
<mBailey_j> Using metasploit_payloads-mettle 0.0.8
<mBailey_j> Installing msgpack 1.0.2 with native extensions
<mBailey_j> Using nessus_rest 0.1.6
<mBailey_j> Using net-ssh 3.2.0
<mBailey_j> Installing network_interface 0.0.1 with native extensions
<mBailey_j> Using openssl-ccm 1.2.1
dinhani has joined #ruby
<ezrios> failed to compile native extension
<mBailey_j> Using openvas-omp 0.0.4
<mBailey_j> Installing pcaprub 0.12.4 with native extensions
<mBailey_j> Using patch_finder 1.0.2
<mBailey_j> Using rb-readline-r7 0.5.2.0
<mBailey_j> Installing redcarpet 3.3.4 with native extensions
<mBailey_j> Using rex-text 0.2.4
<mBailey_j> Using rex-core 0.1.2
<mBailey_j> Using rex-struct2 0.1.0
<mBailey_j> Using rex-java 0.1.2
<mBailey_j> Using rex-registry 0.1.0
<mBailey_j> Using robots 0.10.1
<mBailey_j> Installing sqlite3 1.3.12 with native extensions
<mBailey_j> Using sshkey 1.8.0
<mBailey_j> Using windows_error 0.0.2
<mBailey_j> Using method_source 0.8.2
<mBailey_j> Using slop 3.6.0
<mBailey_j> Using simplecov-html 0.10.0
<mBailey_j> Using timecop 0.8.1
<mBailey_j> Using yard 0.9.5
<mBailey_j> Using bundler 1.13.6
<mBailey_j> Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
<mBailey_j> /usr/bin/ruby -r ./siteconf20161115-981-vi53r2.rb extconf.rb
<mBailey_j> creating Makefile
<mBailey_j> make "DESTDIR=" clean
<mBailey_j> make: error while loading shared libraries: libunistring.so.0: cannot open shared object file: No such file
<mBailey_j> or directory
<mBailey_j> make "DESTDIR="
<mBailey_j> make: error while loading shared libraries: libunistring.so.0: cannot open shared object file: No such file
<mBailey_j> or directory
<mBailey_j> make failed, exit code 127
<mBailey_j> Gem files will remain installed in /usr/lib64/ruby/gems/2.2.0/gems/json-1.8.3 for inspection.
Vile` has joined #ruby
<mBailey_j> Results logged to /usr/lib64/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out
<mBailey_j> An error occurred while installing json (1.8.3), and Bundler cannot continue.
<mBailey_j> Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
<mBailey_j> .
<mBailey_j> crap..
bihi has joined #ruby
<mBailey_j> so sorry
<mBailey_j> bovis, thank you
<ezrios> called it
<ezrios> failed to build native extension
<bovis> mBailey_j: a nice change of pace
<bovis> and you're welcome
<bovis> also, "/topic" can help (if irssi)
<ezrios> you probably need to install libunistring-dev or some such
<baweaver> let's avoid pasting in channel again.
<baweaver> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
futabachannel has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Ping timeout: 258 seconds]
dinhani has quit [Remote host closed the connection]
<mBailey_j> bovis, yeah, this live-distro is still buggy. i appologise to channel again.
<mBailey_j> that and im not in terminal so its really tough...but no-more-excuses.
blackwind_123 has joined #ruby
chadwtaylor has quit [Remote host closed the connection]
<mBailey_j> thanks everyone. gotta start from scratch. not a ruby issue after all but somewhat still is.
mBailey_j has left #ruby ["Leaving"]
chadwtaylor has joined #ruby
ezrios has quit [Quit: WeeChat 1.6]
mikhael_k33hl has quit [Ping timeout: 260 seconds]
chadwtaylor has quit [Ping timeout: 260 seconds]
blackwind_123 has quit [Ping timeout: 240 seconds]
csk has quit [Quit: ZZZzzz…]
blackwind_123 has joined #ruby
allcentury has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
xall has joined #ruby
xall has quit [Client Quit]
xall has joined #ruby
railssmith has joined #ruby
Channel6 has quit [Quit: Leaving]
brendan- has joined #ruby
solocshaw has quit [Quit: solocshaw]
solocshaw has joined #ruby
sneakerhax has joined #ruby
benlieb has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
whathappens has quit [Remote host closed the connection]
xall has quit [Quit: WeeChat 1.5]
blackwind_123 has quit [Ping timeout: 240 seconds]
arescorpio has joined #ruby
cyphase has joined #ruby
solocshaw has quit [Ping timeout: 248 seconds]
kechja has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
blackwind_123 has joined #ruby
ag4ve has joined #ruby
bovis has quit [Quit: leaving]
vuoto has joined #ruby
ajsharma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexRussia has joined #ruby
aupadhye has joined #ruby
vuoto has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
vikaton has quit [Quit: Connection closed for inactivity]
allcentury has joined #ruby
gingray has joined #ruby
Jameser_ has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
amclain has quit [Quit: Leaving]
allcentury has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
cyphase has joined #ruby
Jameser has joined #ruby
ur5us has joined #ruby
Jameser_ has quit [Ping timeout: 244 seconds]
igniting has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
honore has joined #ruby
postmodern has joined #ruby
enterprisey has joined #ruby
blackwind_123 has joined #ruby
ur5us has quit [Remote host closed the connection]
AlexRussia has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
blackwind_123 has joined #ruby
ICantCook has quit [Quit: bye]
CloCkWeRX has quit [Quit: Leaving.]
Krython has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
Krython has quit [Quit: Ciao]
AlexRussia has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaguarmagenta has quit [Remote host closed the connection]
cyphase has quit [Ping timeout: 250 seconds]
pandaant has joined #ruby
nankyokusei has joined #ruby
kareelee has quit [Remote host closed the connection]
kareelee has joined #ruby
brent__ has quit [Quit: Connection closed for inactivity]
cyphase has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
kareelee has quit [Ping timeout: 250 seconds]
ajsharma has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has joined #ruby
aidalgol has joined #ruby
benlieb has quit [Quit: benlieb]
_djbkd has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
cyphase has joined #ruby
Devalo has joined #ruby
rashomoun has joined #ruby
<rashomoun> how to read a csv and skip some lines? with CSV.foreach()?
AlexRussia has joined #ruby
unshadow has quit [Ping timeout: 256 seconds]
Jameser has joined #ruby
NeverTired has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
egg_ has joined #ruby
blackbom1 has quit [Ping timeout: 245 seconds]
cyphase has quit [Ping timeout: 260 seconds]
Littlemyu has joined #ruby
cyphase has joined #ruby
yardenbar has joined #ruby
joonty has joined #ruby
muelleme has joined #ruby
joonty has quit [Remote host closed the connection]
andikr has joined #ruby
xlegoman has joined #ruby
hahuang61 has joined #ruby
Devalo has quit [Remote host closed the connection]
aganov has joined #ruby
ag4ve has quit [Ping timeout: 265 seconds]
kareelee has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
nchambers is now known as voldemort
blackbom1 has joined #ruby
kareelee has quit [Ping timeout: 244 seconds]
kareelee has joined #ruby
radic has quit [Ping timeout: 240 seconds]
cyphase has quit [Ping timeout: 246 seconds]
radic has joined #ruby
<nofxx> any trick to get only 'B' from A::B ?
<apeiros> string manipulation
<nofxx> apeiros, it's done than ;)
<apeiros> I wish there was a more proper way :-/
cyphase has joined #ruby
<nofxx> apeiros, yeah, class vs full_class or something would be a mess
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> well, class doesn't return a name, it returns an object
<nofxx> maybe some kind of leaf_class
<apeiros> class_name and class_path maybe
<nofxx> yup
Littlemyu_ has joined #ruby
Jameser has joined #ruby
Littlemyu has quit [Ping timeout: 260 seconds]
blackwind_123 has quit [Ping timeout: 258 seconds]
pandaant has quit [Remote host closed the connection]
<agent_white> Using an NES emulator in pure Ruby to benchmark new Ruby versions...
<agent_white> We are the most fun :)
blackwind_123 has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ruby
tvw has joined #ruby
Salih has joined #ruby
Salih has joined #ruby
Salih has quit [Changing host]
ur5us has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
muelleme has quit [Ping timeout: 245 seconds]
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bayed has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
yardenbar has joined #ruby
allcentury has joined #ruby
<quazimodo> does tony arcieri ever frequent by here?
conta1 has joined #ruby
AlexRussia has joined #ruby
last_staff has joined #ruby
allcentury has quit [Ping timeout: 258 seconds]
cyphase has quit [Ping timeout: 245 seconds]
bikram has joined #ruby
harai_ has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 268 seconds]
cyphase has joined #ruby
tvw has quit [Ping timeout: 246 seconds]
lorenzoscalfani has joined #ruby
lorenzoscalfani has left #ruby [#ruby]
vondruch_ is now known as vondruch
ferr has joined #ruby
rashomoun has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ruby
harai_ has joined #ruby
rashomoun has joined #ruby
the_drow has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
solocshaw has joined #ruby
agent_white has quit [Quit: agent_white]
pawnbox has joined #ruby
kechja has quit [Remote host closed the connection]
agent_white has joined #ruby
unshadow has joined #ruby
TomyWork has joined #ruby
function has joined #ruby
biberu has joined #ruby
mBailey_j has joined #ruby
claudiuinberlin has joined #ruby
luckyruby has joined #ruby
VanDyke has quit [Read error: Connection reset by peer]
bikram has quit [Quit: Lost terminal]
Derperperd has quit [Quit: Derperperd]
function has quit [Quit: found 1 in /dev/zero]
nankyokusei has joined #ruby
tteer has joined #ruby
<tteer> cs
Madplatypus has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
astrobunny has quit [Remote host closed the connection]
jcao219 has quit [Ping timeout: 260 seconds]
allcentury has joined #ruby
p0p0pr37 has quit [Quit: p0p0pr37]
solocshaw1 has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
lxsameer has joined #ruby
BackEndCoder has quit [Excess Flood]
solocshaw has quit [Ping timeout: 256 seconds]
<blackbom1> quazimodo: why
allcentury has quit [Ping timeout: 256 seconds]
BackEndCoder has joined #ruby
solocshaw1 has quit [Ping timeout: 245 seconds]
blaxter has joined #ruby
zacts has quit [Ping timeout: 260 seconds]
_djbkd has quit [Remote host closed the connection]
MrJoshua has quit [Quit: MrJoshua]
_djbkd has joined #ruby
aufi has joined #ruby
p0p0pr37 has joined #ruby
p0p0pr37 has quit [Changing host]
p0p0pr37 has joined #ruby
harai_ has quit [Ping timeout: 246 seconds]
tteer has quit [Ping timeout: 248 seconds]
BackEndCoder has quit [Ping timeout: 256 seconds]
_djbkd has quit [Ping timeout: 256 seconds]
blaxter has quit [Quit: foo]
kilk has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 268 seconds]
enterprisey has quit [Remote host closed the connection]
zacts has joined #ruby
alirezabashiri has joined #ruby
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
rashomoun has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
k200 has joined #ruby
<k200> when i have a=[1,1,3] which 1 it returns on a.min?
<tobiasvl> does it matter?
flying has joined #ruby
<k200> yes.
<k200> tobiasvl: no.
ur5us has quit [Remote host closed the connection]
<apeiros> k200: if it's not documented, then there's no guarantee on a specific one being returned
<k200> tobiasvl: it does not matter how. "which" is what matters for me in this specific case.
<apeiros> I'd assume the first, but as said - not documented = not guaranteed.
xrlk has quit [Ping timeout: 265 seconds]
mradmacher has joined #ruby
<k200> ok
<apeiros> why does the "which" matter?
<tobiasvl> in this specific case, they're the same object, right?
agent_white has quit [Quit: brbupdate]
* apeiros assumes fake example
<tobiasvl> probably, but k200 did say "in this specific case" ;P
<apeiros> and real example using a "bigger" object compared on one of the attributes, potentially differing in others
<apeiros> but yeah, bad fake examples--
djbkd_ has joined #ruby
<k200> apeiros: tobiasvl I am editing an existing project. where they are building an array.push(Model.column) then they are doing another_value = array.min. Now the new thing I want to add to this code is to get Model.another_column of that Model.column which one was the minimum.
<k200> apeiros: :-p
phaza_ has quit [Read error: Connection reset by peer]
<k200> apeiros: you are smart!
<tobiasvl> what is array.min anyway? some numpy stuff?
<tobiasvl> or do you mean min(array)
<apeiros> k200: I've experienced enough shitty examples on irc :-p
phaza has joined #ruby
<k200> array contains integer value.
<k200> its array of integer.
joonty has joined #ruby
<tobiasvl> if it only contains integers, any duplicates will always point to the same objects, right?
<k200> tobiasvl: no. i meant array.min only.
<tobiasvl> or, well, that depends on implementation I guess
<k200> array is actual integer array.
<tobiasvl> k200: what is array.min ?
<k200> oh I forgot to mention its rails!
* apeiros can't make sense of that explanation
<k200> .min
<ljarvis> Array#min isn't rails, it's in Ruby
<k200> then whats the confusion?
<tobiasvl> sorry, my brainfart
<ljarvis> I don't know :)
<apeiros> you probably should change the code
ocbtec has joined #ruby
<tobiasvl> but I still don't understand how it matters if they're only integers :P
<k200> so if we know, ".min" picks which value when two of them are same, then i can get the other column value depending upon that
<apeiros> array.push(model); min_model = array.min_by(&:column)
<apeiros> then go from there
<k200> ok
<k200> apeiros: thanks.
<apeiros> also if two models have the minimum - why does it matter which of the two you're using?
<apeiros> is one more correct than the other? if so, why? and then codify that "why"
toretore has joined #ruby
<k200> apeiros: because the second column, which I need from them, is different. hence it matters which min is being used.
<k200> ok
<apeiros> and: it sounds a lot like this could be done in the db, without going through ruby.
<k200> its complex.
<k200> :-p
<apeiros> k200: so the other column differs - but the other column isn't the reason why it's the minimum. so again, why does it matter?
<apeiros> what if Array#min returned a random one of all those objects with the minimal value? why'd it matter which one it picked?
<dminuoso> Wew. I must say, zbar is one of the neatest libraries around - amazing to have Ruby bindings for it too. :)
<dminuoso> As long as you dont mind digging in the C source code to figure out what function does what..
cibs has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
GinoManWorks has quit [Read error: Connection reset by peer]
<apeiros> dminuoso: it works reliably? because when I was searching for barcode libs, the best I found was zxing, which required me to run a jruby and communicate via drb
<k200> apeiros: because i need to show the second column value, of the model we picked, and which model we picked? the one with min value? but two has same min value? hence i need to know exactly wihch min model it picked?
AlexRussia has joined #ruby
<apeiros> (and it has a bug wrt binary qrcodes)
sameerynho has joined #ruby
cibs has joined #ruby
<apeiros> k200: again: why? both satisfy your criterion to be picked. so why does it matter? that another column varies is immaterial. it's not why it was picked.
<apeiros> you could just as well say it picked both.
alirezabashiri has quit [Quit: WeeChat 1.4]
<apeiros> so shouldn't you show both model's other column?
ddffg has left #ruby ["Leaving"]
ddffg has joined #ruby
yardenbar has quit [Ping timeout: 248 seconds]
<k200> apeiros: no. only the min should be shown. but since we have two min, the one which is being picked is to be shown.
Silthias has joined #ruby
lxsameer has quit [Ping timeout: 258 seconds]
_sfiguser has quit [Ping timeout: 256 seconds]
<apeiros> you're stuck. you don't have "a" min.
<apeiros> you have "many" mins.
<apeiros> so there isn't "the one" with the min.
Silthias1 has quit [Ping timeout: 260 seconds]
<k200> :-)
<k200> I think i will get first min.
spectrum has joined #ruby
dkam has quit [Ping timeout: 259 seconds]
<dminuoso> apeiros: Absolutely. Zbar is incredibly reliable.
<dminuoso> And it's blazing fast too.
Savage has joined #ruby
<dminuoso> apeiros: I think the android market just made zxing very popular.
<apeiros> dminuoso: good to know. gotta try that out then.
edwinvdgraaf has quit [Ping timeout: 256 seconds]
frozengeek__ has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
yardenbar has joined #ruby
edwinvdgraaf has joined #ruby
AlexRussia has joined #ruby
_sfiguser has joined #ruby
<dminuoso> Is there a better pattern than this to try out multiple serialization formats? https://gist.github.com/norc/622b586714020d28375e1356b4643e0a
marr has joined #ruby
allcentury has joined #ruby
<apeiros> dminuoso: you could probably do it in a loop instead, making it more extensible
j2k has joined #ruby
<apeiros> other than that - yaml is a superset of json. so if yaml can't load it, json can't either.
<dminuoso> apeiros: reload.
AlexRussia has quit [Ping timeout: 245 seconds]
<dminuoso> Like that?
<apeiros> yupp
mark_66 has joined #ruby
<apeiros> that's flexible enough too to plug a proc into it in case of some deserialization differing from some_obj.some_method(data)
<dminuoso> I guess I could shorten that loop by using "meth.call(data) rescue false"
<apeiros> depending on how specific you want to be, you can also add which exceptions you want to rescue per serializer
SesMan has joined #ruby
weaksauce has quit [Ping timeout: 265 seconds]
<apeiros> but not sure it's worth the effort
<dminuoso> Well, if the deserializer throws any kind of exception there is no way to recover anyway.
<dminuoso> Even if it's a small issue.
<apeiros> sure. the question is whether there's exceptions which are unrelated to the data. I think it's unlikely, though.
<dminuoso> apeiros: updated, doesn't look too bad.
<apeiros> things like "failed to load some part of my implementation"
agent_white has joined #ruby
agent_white has left #ruby [#ruby]
allcentury has quit [Ping timeout: 246 seconds]
<dminuoso> I can even put that way into a generic "deserialize_any()" method somewhere else and then use it wherever.
<dminuoso> Not that I intend to reuse this often, but I got this case where I have to accept both formats with no way of knowing which is passed.. ;-)
agent_white has joined #ruby
cek has joined #ruby
<apeiros> sounds like a recipe for disaster ;-p
<apeiros> I really don't get how people design such systems. "hey, guess what's in this!"
<cek> anyone knows why is my EM calling receive callback each 16kb instead of all data that's been received over tcp listening socket?
jsrn_ has joined #ruby
Beams has joined #ruby
<dminuoso> apeiros: It's fine. Especially this order - either this is obvious YAML or it has to be MessagePack (in that order)
<dminuoso> The chance for ambiguity is bigger than me trying out the lottery.
<dminuoso> smaller I mean..
<dminuoso> :D
tomphp has joined #ruby
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> dminuoso: great. zlibs first try gets me "corrupt jpeg data" :(
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<dminuoso> apeiros: What data are you feeding it?
<apeiros> a jpeg with a qr code
<apeiros> hm, no from_png :(
<dminuoso> apeiros: Are you feeding it the raw data from a File.read?
<apeiros> yes, as per the example
j2k has joined #ruby
<apeiros> ZBar::Image.from_jpeg(File.read('test.jpg')) # copy paste from the example, except I replaced the path
<dminuoso> apeiros: Try out the naitve zbarimg - if that works, chances are you are using the interface wrongly.
<apeiros> that'd mean the readme is broken :D
<dminuoso> No.
<dminuoso> The error diagnostics suck because it follows the classic Ruby traditions - it's freaking duck typy without any checkings.
<dminuoso> Which means it randomly breaks because it assumes you are using it correctly like half of the fucking Ruby libraries.
<apeiros> no? I use it precisely as in the example of the readme…
<dminuoso> apeiros: Try out the native "zbarimg" from command line.
<apeiros> the zbarimg cli works indeed. so… example is bogus IMO. or explain how it isn't?
<dminuoso> apeiros: Send me the file
<k200> apeiros: using .order(:column).first.another_column worked
jenrzzz has quit [Ping timeout: 248 seconds]
edwinvdgraaf has quit [Ping timeout: 252 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quazimodo has quit [Ping timeout: 244 seconds]
johnmccabe has joined #ruby
<cek> char readbuffer [16 * 1024 + 1];
<cek> int r = read (sd, readbuffer, sizeof(readbuffer) - 1); damn EM
<toretore> cek: what's the issue?
<cek> small size is the issue
<toretore> would it be better if it was 32?
<toretore> how is it an issue?
<cek> why isn't that configurable? who are you?
matheusmoreira has quit [Remote host closed the connection]
matheusmoreira has joined #ruby
hightower3 has quit [Ping timeout: 268 seconds]
aupadhye has quit [Ping timeout: 256 seconds]
kbdkode has quit [Ping timeout: 256 seconds]
Littlemyu__ has joined #ruby
mim1k|work has quit [Ping timeout: 252 seconds]
nobitanobi has joined #ruby
<pagios> whats the easiest way to generate this hex seq? http://i.imgur.com/Yu17AiY.png
Littlemyu_ has quit [Ping timeout: 260 seconds]
djbkd_ has quit [Remote host closed the connection]
djbkd_ has joined #ruby
<apeiros> pagios: what have you tried?
<apeiros> interesting that it leaves out \x00
aupadhye has joined #ruby
<pagios> i got it printf "%x" $(seq 0 255 )
wpostma2 has joined #ruby
wpostma1 has quit [Ping timeout: 258 seconds]
xavier2 has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
xavier2 has joined #ruby
djbkd_ has quit [Ping timeout: 250 seconds]
p0p0pr37 has quit [Remote host closed the connection]
Jameser has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
volix has quit [Ping timeout: 250 seconds]
nobitano_ has joined #ruby
volix has joined #ruby
volix has quit [Changing host]
volix has joined #ruby
koooge has quit [Quit: Leaving...]
<dminuoso> >> (1..5).reduce { |e| break e if e == 7 }
<ruby[bot]> dminuoso: # => nil (https://eval.in/677829)
<dminuoso> >> (1..5).reduce { |e| break e if e == 4 }
<ruby[bot]> dminuoso: # => nil (https://eval.in/677830)
nobitanobi has quit [Ping timeout: 260 seconds]
<dminuoso> >> (1..5).reduce { |m, e| break e if e == 4 }
<ruby[bot]> dminuoso: # => 4 (https://eval.in/677831)
<dminuoso> >> (1..5).reduce { |m, e| break e if e == 8 }
<dminuoso> Am I missing a method that can do this without break?
<toretore> find? :)
Littlemyu__ has quit [Ping timeout: 260 seconds]
p0p0pr37 has joined #ruby
p0p0pr37 has joined #ruby
p0p0pr37 has quit [Changing host]
<dminuoso> toretore: find will yield the element, not the block value
p0p0pr37 has quit [Client Quit]
<dminuoso> >> (1..5).reduce { |m, e| break "foo" if e == 2 }
<ruby[bot]> dminuoso: # => "foo" (https://eval.in/677832)
<dminuoso> >> (1..5).find { |e| break "foo" if e == 2 }
<ruby[bot]> dminuoso: # => "foo" (https://eval.in/677833)
<dminuoso> >> (1..5).find { |e| break "foo" if e == 10 }
<ruby[bot]> dminuoso: # => nil (https://eval.in/677834)
<dminuoso> Oh guess that works too.
<dminuoso> Still using a break tho
p0p0pr37 has joined #ruby
p0p0pr37 has quit [Changing host]
p0p0pr37 has joined #ruby
igniting has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
emilkarl has joined #ruby
chadwtaylor has joined #ruby
nankyokusei has joined #ruby
luckyruby has quit [Quit: Leaving...]
Snowy has joined #ruby
chadwtaylor has quit [Ping timeout: 252 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby
aidalgol has quit [Quit: zZzZzZzzz]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
<quazimodo> blackbom1: curious if he thinks its possible to get a server like puma also start a webpack dev server using a celluloid actor to manage/read from it's stdout in my development environemnt
<quazimodo> oooo new weirdness. Using puma I can can fork, spawn my webpack dev server in that and ctrl-c exits everyting jush fine. But If I use zeus to preload and do zeus s, then I can't get ctrl-c to kill off webpack server
<quazimodo> and it blocks indefinitely
<quazimodo> weird!
honore has quit [Quit: honore]
ziarkaen has joined #ruby
Snowy_ has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
virgil has joined #ruby
Snowy has quit [Ping timeout: 258 seconds]
postmodern has quit [Quit: Leaving]
SesMan has joined #ruby
AlexRussia has joined #ruby
kareelee_ has joined #ruby
kareelee has quit [Read error: Connection reset by peer]
_sfiguser has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 258 seconds]
Dimik has quit [Ping timeout: 260 seconds]
aupadhye has quit [Ping timeout: 246 seconds]
emilkarl has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
djbkd_ has joined #ruby
AlexRussia has joined #ruby
phaza has quit [Read error: Connection reset by peer]
joonty1 has joined #ruby
phaza has joined #ruby
pandaant has joined #ruby
lenwood has joined #ruby
joonty has quit [Ping timeout: 258 seconds]
nettoweb has joined #ruby
_sfiguser has joined #ruby
joonty2 has joined #ruby
Ropeney has joined #ruby
allcentury has joined #ruby
joonty1 has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 265 seconds]
joonty1 has joined #ruby
joonty2 has quit [Ping timeout: 250 seconds]
allcentury has quit [Ping timeout: 260 seconds]
binaryplease has joined #ruby
zukin has joined #ruby
tau has joined #ruby
AlexRussia has joined #ruby
kilk has quit [Remote host closed the connection]
careta has joined #ruby
Humdai has joined #ruby
<careta> hey guys
<careta> I need to emulate the behaviour of C's rand and srand in Ruby
<careta> is there a way to do that?
joonty2 has joined #ruby
<careta> Ruby's versions do not give the same results as the C one
<elomatreb> Which behaviour do you mean specifically (not familiar with C)?
djbkd_ has quit [Ping timeout: 258 seconds]
<careta> elomatreb, I need ruby to give me the same rand() sequence after I seed srand with a specific number
kareelee_ has quit [Read error: Connection reset by peer]
<careta> and I've noticed that doing that in C and doing that in Ruby gives different results
<careta> probably the way srand and rand works are too different I guess
<careta> unless I'm doing something wrong
kareelee has joined #ruby
joonty1 has quit [Ping timeout: 260 seconds]
<elomatreb> Ah, you want Ruby rand seeded with a specific seed to return the same sequence as C rand with the same seed?
<careta> exactly
<elomatreb> I doubt you'll get Random to do that, since it's implementation specific. Have you considered writing a custom sequence generator that could be implemented in both C and Ruby?
<careta> elomatreb, you mean re-implementing C's version in Ruby?
AlexRussia has quit [Ping timeout: 250 seconds]
<careta> I can't roll my own, as this is to emulate an existing device
<careta> I need to emulate it's random number generation behaviour
<careta> which uses C's srand and rand
<elomatreb> In that case that's probably your only option :(
<careta> there's some gems that allow me to call C from Ruby code right? that might work?
joonty1 has joined #ruby
<elomatreb> I'm not a C programmer, but I assume things like rand/srand are implemented in your libc. So you'd need the same libc as the device you want to be compatible with
<careta> hmm yeah that's true
<careta> the device is using uClibc but I actually get the same results with libc
<careta> anyway that's a good point to keep in mind
<elomatreb> You could take a look at the sourcecode of rand/srand in that libc and see if you can emulate it in Ruby, aside from the initial seed generation that shouldn't be *too* difficult
joonty2 has quit [Ping timeout: 258 seconds]
<careta> the good news is that uClibc didn't change the srand code compared to libc
<careta> I'm looking at it now, still has the '95 headers from Ulrich
<careta> so maybe that C calling gem actually works
<careta> thanks for the tips, much appreciated
<careta> seems pretty easy to emulate actually: https://git.uclibc.org/uClibc/tree/libc/stdlib/rand_r.c
<careta> :)
<elomatreb> Those magic values D:
zukin has quit [Quit: leaving]
<elomatreb> I know why I dislike close-to-metal programming
cek has left #ruby [#ruby]
<careta> why? I love it
<careta> that's one of the reasons I love Ruby, I feel it's the only high level language that emulates the way C works
<careta> converting from Ruby to C and back it's extremely easy
<careta> similar tricks, similar syntax
aupadhye has joined #ruby
<elomatreb> I kind of irks me to have to think about what multiplying a value by 1103515245 does
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<sjums> what does it do, elomatreb ?
<sjums> negates it?
_djbkd has joined #ruby
<elomatreb> sjums: Well, upon googling it I found this: https://stackoverflow.com/questions/8569113/why-1103515245-is-used-in-rand
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nobitano_ has quit []
<sjums> ah... well. ehmm.. that makes sense - I guess :3
<elomatreb> I'm kind of surprised too, I suspected something like negation or some blackmagic bitshift
virgil has quit [Remote host closed the connection]
<MadWasp> Is there any information on how to do custom serialization and deserialization using Psych? Psych itself doesn’t seems to have a documentation
jenrzzz has quit [Ping timeout: 258 seconds]
_djbkd has quit [Ping timeout: 245 seconds]
<ccooke> I recall it being a absolute pain when I implemented it
jaiks has quit [Ping timeout: 256 seconds]
edwinvdgraaf has joined #ruby
<gener1c> how do i run the tests on the ruby repo
edwinvdg_ has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
<ccooke> MadWasp: So, I've dug out some code where I extend Psych.
lenwood has quit [Ping timeout: 256 seconds]
<ccooke> the methods you need are YAML.add_domain_type and potentially an encode_with method on your class instances.
<ccooke> Some useful links:
<ccooke> https://gist.github.com/thinkerbot/118406 <- This is a minimal example I found of adding a domain type to Psych
radic has quit [Ping timeout: 268 seconds]
<ccooke> https://github.com/ccooke/cccb9/blob/master/lib/cccb/irc.rb <- This is some code from my IRC bot that has several objects extended with Psych save/restore code
radic has joined #ruby
AlexRussia has joined #ruby
<ccooke> Sorry, couldn't find a more in-depth document on it (and I have a meeting, so... good luck)
<dminuoso> careta: why do you need this behavior? is this for testing?
<MadWasp> ccooke, thanks a lot :)
edwinvdg_ has quit [Ping timeout: 260 seconds]
<ccooke> MadWasp: basically, check the API reference for those methods and play around a bit. The help isn't great, but once you know the framework you should be able to work it out
ineb has quit [Quit: leaving]
<MadWasp> ccooke, i guess encode_with and init_with should be enough for me
<ccooke> Lucky :-)
<pagios> i have shell="\x01\x0A" print shell is showing unreadable text
<pagios> how can i print it in hex
quazimodo has joined #ruby
jaiks has joined #ruby
AlexRussia has quit [Ping timeout: 258 seconds]
<elomatreb> pagios: Try String#bytes maybe?
startupality has joined #ruby
<pagios> elomatreb, it prints decimal numbers
xavier2 has quit [Read error: Connection reset by peer]
<pagios> i just need it to print \x12\x123 etc
<pagios> the way it is stored in the string
c355e3b has joined #ruby
<elomatreb> Yes, which can convert to hex like this:
xavier2 has joined #ruby
<elomatreb> >> [12, 13].map {|n| n.to_s 16 }
<ruby[bot]> elomatreb: # => ["c", "d"] (https://eval.in/677944)
solocshaw has joined #ruby
<elomatreb> pagios: Actually, take a look at String#unpack, that may be exactly what you want
hahuang61 has joined #ruby
<pagios> ok
startupality has quit [Client Quit]
c0mrad3 has joined #ruby
<pagios> hard to follow
edwinvdgraaf has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
edwinvdgraaf has quit [Read error: Connection reset by peer]
<pagios> unpack('H*') removed the x
edwinvdgraaf has joined #ruby
hahuang61 has quit [Ping timeout: 248 seconds]
AlexRussia has joined #ruby
sdothum has joined #ruby
<careta> dminuoso, I'm reverse engineering a random number generator used in an embedded device
<careta> and the beginning of the operation starts by seeding srand with a specific value
kobain has joined #ruby
LiamW has left #ruby ["WeeChat 1.5"]
AlexRussia has quit [Ping timeout: 258 seconds]
iwmrby has joined #ruby
djbkd_ has joined #ruby
tvw has joined #ruby
AlexRussia has joined #ruby
nankyokusei has joined #ruby
jgt has joined #ruby
mwlang has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
andikr has quit [Remote host closed the connection]
csk has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
kareelee_ has joined #ruby
kareelee has quit [Read error: Connection reset by peer]
gingray has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has joined #ruby
blackbom1 has quit [Ping timeout: 248 seconds]
bluOxigen has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ruby
<manveru> 2.3.2 is out :)
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
pwnd_nsfw has quit [Ping timeout: 256 seconds]
joonty2 has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]
joonty1 has quit [Ping timeout: 256 seconds]
djbkd_ has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
allcentury has joined #ruby
joonty1 has joined #ruby
byte512 has joined #ruby
joonty2 has quit [Ping timeout: 260 seconds]
edwinvdgraaf has quit [Ping timeout: 252 seconds]
mwlang has quit [Quit: mwlang]
edwinvdgraaf has joined #ruby
johnmilton has joined #ruby
hightower3 has joined #ruby
joonty2 has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 260 seconds]
joonty1 has quit [Ping timeout: 256 seconds]
hightower2 has quit [Ping timeout: 265 seconds]
startupality has joined #ruby
Cymew has joined #ruby
SCHAAP137 has quit [Ping timeout: 252 seconds]
<chris2> is there a changelog?
hightower2 has joined #ruby
tk__ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
minimalism has quit [Quit: minimalism]
joonty1 has joined #ruby
hightower3 has quit [Ping timeout: 260 seconds]
dviola has joined #ruby
hightower3 has joined #ruby
joonty1 has quit [Client Quit]
unshadow has quit [Quit: Lost terminal]
joonty2 has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
sdothum has joined #ruby
<dminuoso> chris2: Yes. Summary is as follows: Stuff got fixed.
hightower2 has quit [Ping timeout: 268 seconds]
_sfiguser has quit [Ping timeout: 245 seconds]
matp has quit [Read error: Connection reset by peer]
Madplatypus has quit [Quit: Connection closed for inactivity]
matp has joined #ruby
whiteline has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby
synthroid has joined #ruby
pandaant has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
kbdkode has joined #ruby
troulouliou_div2 has joined #ruby
brendan- has joined #ruby
byte512 has quit [Ping timeout: 248 seconds]
Ishido has joined #ruby
<chris2> very helpful -.-
Ropeney has joined #ruby
hightower2 has joined #ruby
pawnbox has joined #ruby
csk has quit [Quit: ZZZzzz…]
whiteline has joined #ruby
tyang has joined #ruby
<chris2> hm nice, 2.4 can chomp directly on gets
hightower3 has quit [Ping timeout: 240 seconds]
_sfiguser has joined #ruby
csk has joined #ruby
toretore has quit [Ping timeout: 265 seconds]
mBailey_j has left #ruby ["Leaving"]
quazimodo has joined #ruby
Rodya_ has joined #ruby
Immune has quit [Ping timeout: 260 seconds]
csk has quit [Ping timeout: 244 seconds]
pwnd_nsfw has joined #ruby
csk has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
iwmrby has quit [Quit: WeeChat 1.6]
d0nn1e has quit [Ping timeout: 265 seconds]
whiteline has quit [Ping timeout: 246 seconds]
Vile` has quit [Ping timeout: 252 seconds]
startupality has quit [Quit: startupality]
d0nn1e has joined #ruby
toretore has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whiteline has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
k200 has quit [Quit: leaving]
jaruga___ has joined #ruby
marr has quit [Ping timeout: 258 seconds]
chadwtaylor has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hightower2 has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
agent_white has quit [Quit: bbl]
tomphp has quit [Ping timeout: 268 seconds]
Snowy_ has quit [Remote host closed the connection]
agent_white has joined #ruby
agent_white has quit [Client Quit]
Snowy has joined #ruby
egg_ has quit []
Derperperd has joined #ruby
Derperperd has quit [Client Quit]
bmgoog has quit []
jhack has joined #ruby
Snowy has quit [Ping timeout: 256 seconds]
<ljarvis> huh?
<chris2> STDIN.gets :chomp => true apparently
<chris2> i just read the NEWS :)
fmcgeough has joined #ruby
<ljarvis> ah!
<chris2> because STDIN.gets.chomp! will break if you hit EOF
shinnya has quit [Ping timeout: 260 seconds]
<ljarvis> Ruby NEWS should just be: added loads of more core methods, make a couple speed increases
<chris2> news for 2.4 is quite ok
<chris2> finally #sum
<ljarvis> indeed
<chris2> not sure if micro-optimizing [x,y].max was needed
<ljarvis> also, option parser has an into: which will save a lot of boilerplate
sepp2k has joined #ruby
yardenbar has quit [Ping timeout: 246 seconds]
<chris2> since i discovered Optparse#getopts i just use that :P
cdg has joined #ruby
radic has quit [Ping timeout: 260 seconds]
brendan- has joined #ruby
aegis3121 has joined #ruby
ramortegui has joined #ruby
radic has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
Jameser has joined #ruby
ziarkaen has quit [Ping timeout: 256 seconds]
whiteline_ has joined #ruby
rikkipitt has joined #ruby
whiteline has quit [Ping timeout: 246 seconds]
whiteline_ has quit [Client Quit]
whiteline has joined #ruby
gingray has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ruby
rfoust has joined #ruby
nankyokusei has joined #ruby
startupality has joined #ruby
chadwtaylor has quit [Remote host closed the connection]
chadwtaylor has joined #ruby
kareelee_ has quit []
nankyokusei has quit [Ping timeout: 256 seconds]
startupality has quit [Client Quit]
rikkipitt has quit [Quit: Leaving...]
chadwtaylor has quit [Ping timeout: 250 seconds]
ziarkaen has joined #ruby
startupality has joined #ruby
etehtsea has joined #ruby
DLSteve has joined #ruby
cpruitt has joined #ruby
allcentury has quit [Ping timeout: 258 seconds]
blackbombay has joined #ruby
tk__ has quit [Quit: ばいばい]
blackwind_123 has quit [Ping timeout: 258 seconds]
banisterfiend has joined #ruby
jenrzzz has joined #ruby
_djbkd has joined #ruby
saslam_ has joined #ruby
<manveru> :)
<chris2> which is the next easier thing compared to -s :P
jgt has quit [Quit: WeeChat 1.4]
edwinvdgraaf has quit [Read error: Connection reset by peer]
saslam_ has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
saslam_ has joined #ruby
Silthias1 has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
_djbkd has quit [Ping timeout: 260 seconds]
Silthias has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
blackwind_123 has joined #ruby
Jameser has quit [Ping timeout: 244 seconds]
saslam_ has quit [Ping timeout: 260 seconds]
Jameser has joined #ruby
Jameser has quit [Client Quit]
platzhirsch has joined #ruby
jshjsh has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
startupality has quit [Quit: startupality]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
centrx has joined #ruby
JoshS has quit [Ping timeout: 258 seconds]
DroidBurgundy has joined #ruby
Littlemyu__ has joined #ruby
joonty has joined #ruby
ajsharma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JoshS has joined #ruby
jhack has quit [Quit: jhack]
saslam has joined #ruby
rippa has joined #ruby
djbkd_ has joined #ruby
jshjsh has quit [Ping timeout: 258 seconds]
scottschecter has joined #ruby
JoshS has quit [Ping timeout: 258 seconds]
JoshS has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
nikivi has joined #ruby
jphase has joined #ruby
<centrx> What's the latest news
radic has quit [Ping timeout: 252 seconds]
radic has joined #ruby
<dminuoso> centrx: Have you checked like a news website perhaps?
jhack has joined #ruby
<centrx> Looks like Ruby 2.3.2 Released today
<et09> i googled yesterday, newest version of ruby, 2.3.1 :-O
<et09> and i was like, wow really, still
VladGh has quit [Remote host closed the connection]
jhack has quit [Client Quit]
jphase_ has joined #ruby
VladGh has joined #ruby
brendan- has joined #ruby
csk has quit [Ping timeout: 256 seconds]
jphase has quit [Ping timeout: 258 seconds]
aganov has quit [Remote host closed the connection]
AlexRussia has joined #ruby
xavier2 has quit [Read error: Connection reset by peer]
<dminuoso> centrx: It's nothing major though. Just bugfixes and some openssl things.
ferr has quit [Quit: WeeChat 1.5]
xavier2 has joined #ruby
jaiks has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
jaiks has joined #ruby
djbkd_ has quit [Ping timeout: 248 seconds]
AlexRussia has joined #ruby
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.2; 2.2.6; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
centrx has quit [Remote host closed the connection]
jhack has joined #ruby
joonty has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
whiteline has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 260 seconds]
whiteline has joined #ruby
axisys has joined #ruby
saslam has quit [Ping timeout: 248 seconds]
<gener1c> hello
mtkd has joined #ruby
XV8 has joined #ruby
<gener1c> https://github.com/ruby/ruby/pull/1478 can someone help me with my pr?
axisys has quit [Client Quit]
blackbombay has quit [Ping timeout: 256 seconds]
<gener1c> what do i do to move it to the next stage, i.e review or approval
whathappens has joined #ruby
cassianoleal has joined #ruby
mikecmpbll has joined #ruby
axisys has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
binaryplease has quit [Ping timeout: 250 seconds]
edwinvdg_ has joined #ruby
cassianoleal has quit [Client Quit]
jblack has joined #ruby
edwinvdgraaf has quit [Ping timeout: 252 seconds]
chopin_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
Salih has quit [Quit: Leaving]
chopin has quit [Ping timeout: 252 seconds]
centrx has joined #ruby
<cpruitt> Anyone have any experience getting agent forwarding working with sshkit (not capistrano)? I’m trying to write a super simple script to do a remote git pull and, though I can pull fine locally with my keys, running remotely is erroring with “Host key verification failed.”
<cpruitt> To reiterate, I’m using sshkit directly, not using cap on top of it.
binaryplease has joined #ruby
hays__ has joined #ruby
<hays__> Where do I get this file ? addtrustexternalcaroot-2048.pem
<hays__> I am using rubyinstaller on windows, and this file is out of date. I see a bunch of places with this file, but I'd prefer the actual source rather than something in a pastebin
hays__ is now known as hays
chopin has joined #ruby
dviola has quit [Ping timeout: 250 seconds]
swills has quit [Quit: Leaving]
mipesom has quit [Ping timeout: 248 seconds]
<havenwood> hays: Or you can download and install the latest RubyGems. You can download it from here: https://rubygems.org/gems/rubygems-update-2.6.8.gem
chopin_ has quit [Ping timeout: 265 seconds]
<cpruitt> ugh… nevermind. User error (first time ssh from that server).
<havenwood> hays: Then: gem install --local C:\PATH_TO_DOWNLODED_FILE\rubygems-update-2.6.8.gem
mipesom has joined #ruby
<havenwood> hays: And finally: update_rubygems
atmosx has joined #ruby
benlieb has joined #ruby
<havenwood> hays: That gets you the new intermediate certs as well.
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
swills has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
chopin has quit [Remote host closed the connection]
chopin has joined #ruby
loincloth has joined #ruby
aegis3121 has quit [Ping timeout: 260 seconds]
marr has joined #ruby
aryaching has joined #ruby
senesor has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<senesor> hello, I have silly questions
jhn has joined #ruby
<senesor> I work in recruitment, I'm trying to figure some things out so I appear less thick.
tomphp has joined #ruby
chopin has quit [Ping timeout: 256 seconds]
<senesor> ruby = language ruby on rails = ruby the extended edition?
tomphp has quit [Client Quit]
<ule> senesor: rails is a web framework created using ruby
cdg has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
<senesor> Ok. Can you know rails without knowing ruby?
<centrx> Rails is a set of libraries which do add to the functionality of Ruby
<ule> senesor: no
<centrx> senesor: Some people do focus on Rails, or start by learning Rails, so that they have less facility with Ruby itself outside of Rails
skweek has joined #ruby
<senesor> ok, so excellent RoR doesn't mean excellent Ruby.
<ule> disagree
xaxisx has quit [Quit: leaving]
<centrx> senesor: that makes sense, but of course someone _truly_ "excellent" at Rails would be good at Ruby
<ule> ^ now I agree
<centrx> varying degrees of excellence
jphase_ has quit [Remote host closed the connection]
hays has quit [Ping timeout: 260 seconds]
<centrx> Similarly, you could have UI people who might be excellent at UI in Rails and don't really know much database or backend things, or vice-versa
jphase has joined #ruby
dionysus69 has joined #ruby
<senesor> and regarding what ruby is used for - in your option, what's it best for?
xaxisx has joined #ruby
<centrx> Ruby is versatile and can be good for anything
<centrx> although not great in some areas, e.g. for a GUI desktop app probably not be the best choice
conta1 has quit [Ping timeout: 244 seconds]
TomyWork has quit [Ping timeout: 256 seconds]
<centrx> For scientific computing, there is SciRuby, but Python is stronger in that area and the standard
Littlemyu__ has quit [Ping timeout: 260 seconds]
<baweaver> Ruby tends to be used for Web Development and System Administration primarily
hightower2 has joined #ruby
<baweaver> think Chef, Sensu, and other ops tools
<senesor> just thinking where I could find developers. to steal their souls.
brendan- has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<baweaver> RE: Rails / Ruby: Some people have experience in Rails as a framework but know little Ruby. That's a hallmark of a very amateur Rails dev and should be noted.
<baweaver> Even if they have some intermediate skills they're going to fold the second anything actually difficult crops up.
whathappens has quit [Remote host closed the connection]
<baweaver> senesor: what area are you recruiting for?
yardenbar has joined #ruby
<senesor> software developers. I recruit all over the tech map.
<baweaver> Also keep an eye out for a Github account that's active and perhaps a blog.
<senesor> right now, got me some Python, some Ruby, some Data
<baweaver> The big thing though is take a few minutes for each person.
<ule> senesor: tell us which one pays more :)
<baweaver> because I'll straight ignore copy-paste templates 99% of the time.
<senesor> Data
<baweaver> Data Science hands down
<senesor> like, woah data
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
<baweaver> though it has intersection with Python
<baweaver> depending on the toolkit (likely Hadoop / Spark / MapReduce)
<senesor> baweaver: I put time into my stalking before messaging. The trick is to stop before you're outside their house.
<baweaver> Heh
<senesor> "I like your blog" is good "I like your mailbox" is too far
mikecmpbll has joined #ruby
<baweaver> Well you're on the right track there.
<senesor> people still don't reply, it's so sad.
<baweaver> Remember they probably get 100s of messages a day
<senesor> I knooow. But I'm the one who really cares.
<baweaver> For Ruby people at least, putting Ruby in the header / title gets some attention.
<centrx> Ruby people love Ruby
<baweaver> pretty much.
xaxisx has quit [Ping timeout: 240 seconds]
<baweaver> Either that or give them an interesting problem that the company is working on.
<baweaver> the unfortunate fact for recruiters is you're rarely going to get a reply.
pawnbox has quit [Ping timeout: 252 seconds]
<senesor> yeah, that's why recruiters get lazy and start firing out templates
<baweaver> I mean I could literally say I work for the PS4 team and we're hiring Ruby people and I still won't get much feedback on here.
xaxisx has joined #ruby
hays has joined #ruby
<hays> havenwood: thanks. would it be 2.4.x for older rubies?
<baweaver> Probably the worst I've seen is I posted a job once for my team and the recruiter tried to recruit me to work under myself.
<senesor> baweaver: Was it for more money?
<baweaver> Na, I thought about it though :P
<senesor> "No thanks, I heard the boss was an ass"
<baweaver> Hire myself for more money and a better bonus XD
<hays> havenwood: we're running 2.2 right now
<baweaver> Na, I told the poor recruiter to look carefully at my profile
<senesor> I get recruitment messages all the time to be a developer. "right keywords, wrong idea"
<baweaver> and tell me why this was silly.
<loincloth> hallo
<centrx> gird your loins
radic has quit [Ping timeout: 250 seconds]
<SCHAAP137> that's the Dutch version of hello
<senesor> I recently read how you actually gird loins so now I am ready
<baweaver> and that's the jewish way of saying they're ready for a fight
<baweaver> or to run away
<baweaver> something like that
aufi has quit [Quit: Leaving]
nankyokusei has joined #ruby
radic has joined #ruby
<jblack> I had a couple recruiters try to convince me to take the spot I just left. :)
<hays> my ruby 2.2 is a gem version 2.4.5.1. 2.3 is at gem version 2.5.1.
<hays> that's after running gem update
<manveru> i gave up responding to recruiters after the 100th "no, we're actually not looking for remote workers" :P
synthroid has quit [Remote host closed the connection]
<manveru> finding a remote job in europe is like finding the holy grail
<senesor> really? feels likes there's loads of the
<senesor> m
<hays> it looks like gem version is independent of ruby version
nankyokusei has quit [Ping timeout: 260 seconds]
<manveru> senesor: i've mostly looked in DACH, found a single position for remote work with ruby after like 4 months...
jhack has quit [Quit: jhack]
jhack has joined #ruby
<senesor> manveru: To be fair, I've never seen a contract Ruby role but that's because recruiters get hired to find hard things, like the magical Ruby developer with 10 years experience. I've seen plenty of remote work in other areas, Java/.NET/etc
<manveru> maybe i'm too picky, since i don't consider jobs involving mongodb or microsoft stacks and things of that sort :)
binaryplease has quit [Quit: binaryplease]
<manveru> well, yeah
skweek has quit [Ping timeout: 260 seconds]
<manveru> i'm at 11 years now :)
<loincloth> has anyone ever run into a situation where some versions of Ruby used the Mac Keychain app certificates and some didn't?
<chris2> manveru: you still there?
<senesor> manveru: If you can be picky, do it - you'll be happier in the long run and have a nice life :)
<manveru> chris2: yeah
<chris2> at the .ch shop of last time?
<manveru> we got bought by xing
<loincloth> i'm not sure exactly where the issue is or how best to solve it... just trying to understand, if anyone has experience
<chris2> lol
phantompain has quit [Ping timeout: 265 seconds]
<chris2> i think xing was the first company ever to offer me a job
<chris2> i was like 16 and put ruby into my profile
<manveru> they actually have some guy called christian neukirch ;)
<chris2> and the next day they wanted to hire me :P
<chris2> manveru: fun
ziarkaen has quit [Quit: leaving]
<manveru> lol
<chris2> they must be really desperate :P
<manveru> now they have also java/scale besides ruby
<manveru> and phasing out perl slowly
<havenwood> hays: Yup, RubyGems is a gem and can and should be updated independently from Ruby. You'll need to get to RubyGems 2.5.2 or later for the new certs.
<havenwood> hays: Update to RubyGems 2.6.8.
amclain has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
<havenwood> hays: Or at least to 2.5.2.
<chris2> manveru: istr they switched from php (or was it perl...) to ruby back then
<manveru> i think it used to be almost all perl
Devalo has joined #ruby
<manveru> some core stuff still is, but frontend is all ruby/rails now
aryaching has joined #ruby
pawnbox has joined #ruby
<chris2> ok
<manveru> some are trying to introduce elixir recently :)
harfangk has joined #ruby
<havenwood> baweaver: New releases with intermediate ca certs! :-) I guess we still need to handle older versions and it'll take the Windows Installer folk a while to bump.
<baweaver> eesh
<manveru> anw, gtg
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
moei has quit [Quit: Leaving...]
mark_66 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
_djbkd has joined #ruby
nobitanobi has joined #ruby
jphase_ has joined #ruby
NeverTired has joined #ruby
jphase has quit [Ping timeout: 260 seconds]
edwinvdg_ has quit [Ping timeout: 260 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
<hays> havenwood: thanks
hays has quit [Quit: Page closed]
<senesor> thanks for the info, folks. I must off to a meeting.
jenrzzz has quit [Ping timeout: 248 seconds]
<senesor> o/
rodfersou has joined #ruby
_djbkd has quit [Ping timeout: 268 seconds]
VeryBewitching has joined #ruby
xrlk has joined #ruby
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 248 seconds]
phantompain has joined #ruby
nikivi has quit [Ping timeout: 260 seconds]
jphase has joined #ruby
jphase_ has quit [Ping timeout: 260 seconds]
jmignault has joined #ruby
synthroid has joined #ruby
hightower2 has joined #ruby
jsrn_ has quit [Quit: Leaving]
nobitanobi has quit [Remote host closed the connection]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Derperperd has joined #ruby
hightower3 has quit [Ping timeout: 252 seconds]
polishdub has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
hightower3 has joined #ruby
jmignault has quit [Ping timeout: 246 seconds]
nikivi has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
hightower2 has quit [Ping timeout: 265 seconds]
cdg has joined #ruby
kbdkode has quit [Quit:   see ya  ]
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[Butch] has joined #ruby
jmignault has joined #ruby
quazimodo has quit [Ping timeout: 265 seconds]
hightower2 has joined #ruby
_sfiguser has quit [Ping timeout: 256 seconds]
hightower3 has quit [Read error: Connection reset by peer]
ineb has joined #ruby
flying has quit []
the_drow has quit [Quit: This computer has gone to sleep]
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
phantompain has quit [Ping timeout: 248 seconds]
davidt has joined #ruby
hightower3 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 258 seconds]
gusrub_ has joined #ruby
Devalo has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 245 seconds]
pwnd_nsfw has joined #ruby
AndrewIsHere has joined #ruby
_sfiguser has joined #ruby
<dminuoso> Im currently mapping Ruby modules to enum values, but it's sucky. Is there a better pattern for this? https://gist.github.com/norc/eb3e1a8af67ae34ce38c542207439631
<apeiros> yes
troulouliou_div2 has quit [Quit: Leaving]
dviola has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
pawnbox has quit [Remote host closed the connection]
phantompain has joined #ruby
<dminuoso> apeiros: https://eval.in/678242
<dminuoso> That's slightly less shitty.
<apeiros> did you just answer your own question?
SCHAAP137 has quit [Ping timeout: 240 seconds]
<apeiros> and damn you for not playing along ;-p
<dminuoso> apeiros: This still does not feel right.
<apeiros> do you need the constants to be modules? and will they serve as namespace containers?
Ishido has quit [Ping timeout: 256 seconds]
SeepingN has joined #ruby
<dminuoso> They could be classes for all I care - but I developed this habit of not using classes unless you want to instantiate them
<dminuoso> Or anything else I guess?
<dminuoso> Mmm.
<apeiros> I mean more like - could they just be e.g. integers?
platzhirsch has quit [Quit: WeeChat 1.4]
<apeiros> like A1 = 1
Asher has joined #ruby
Beams has quit [Quit: .]
<dminuoso> apeiros: Heh. I want something like puts obj.get_type to put out Foo::BarType rather than 521
<apeiros> if so, there's gems if you can live with how they do it, and if not, I've got an idea or two. but whether they are good depends on your specifics.
ajsharma has joined #ruby
<dminuoso> apeiros: I want to turn the enum values into tag classes, pretty much like "enum class" in C++.
<apeiros> depending on how you do it, you can still do that :)
<apeiros> I do faaaar to little C++ to remember how that works :(
<dminuoso> Boy, what an answer..
<dminuoso> "depending on how you do it, you can still do that"
<dminuoso> :D
<apeiros> heh
<apeiros> soooorry
<apeiros> so you want a constant which is descriptive, yes?
frozengeek__ has quit [Quit: frozengeek__]
<apeiros> and you want little overhead declaring them?
whiteline has quit [Remote host closed the connection]
<dminuoso> Yeah.
whiteline has joined #ruby
<apeiros> do you define a lot of enums? i.e. overhead for a small class/module is justified?
<dminuoso> I dont know. I just started patching zlib.
<dminuoso> zbar I mean.
<dminuoso> ;)
<apeiros> hm
<apeiros> I'd look around for gems first. almost certain that there's a ton of enum/enum-like gems around
FastJack has quit [Quit: bbl]
solocshaw has joined #ruby
<dminuoso> >> class self.Foo; end
<ruby[bot]> dminuoso: # => /tmp/execpad-fb348b4426f1/source-fb348b4426f1:2: syntax error, unexpected ';', expecting &. or :: or ...check link for more (https://eval.in/678248)
Eiam has joined #ruby
<dminuoso> >> class << self; class Foo; end; end;
Humdai has quit [Read error: Connection reset by peer]
<ruby[bot]> dminuoso: # => nil (https://eval.in/678249)
<dminuoso> apeiros: ^- I think this is the trick I can use.
<dminuoso> I got an idea.
hightower2 has joined #ruby
Humdai has joined #ruby
mBailey_j has joined #ruby
pilne has joined #ruby
hightower3 has quit [Ping timeout: 260 seconds]
<dminuoso> Wait..
<apeiros> if you still need your int based lookup, can do that too. it's not in that code.
Devalo has joined #ruby
Ishido has joined #ruby
<apeiros> but then I'd wonder whether you just want 0..(n-1) as numbers, or provide the numbering explicitly
<dminuoso> Yeah I need a mixture of both.
jhack has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
<dminuoso> apeiros: It should work on both. You may have gaps in your enums, or it might start at some random negative or positive number.
<dminuoso> apeiros: Whats the deal with "anonymous" there?
chadwtaylor has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
<apeiros> Class.new do; define_enums :A1, …; end
whathappens has joined #ruby
chadwtaylor has quit [Remote host closed the connection]
solocshaw1 has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
<dminuoso> >> Class.new.inspect
<ruby[bot]> dminuoso: # => "#<Class:0x4213dbec>" (https://eval.in/678264)
<apeiros> Class.new.name
chadwtaylor has joined #ruby
whathappens has joined #ruby
<apeiros> >> Class.new.name
<ruby[bot]> apeiros: # => nil (https://eval.in/678266)
jhack has joined #ruby
<dminuoso> apeiros: And where's that string <Anonymous coming from?
<apeiros> if you meant "just use inspect instead" - yeah, that'd be a viable option :)
<apeiros> well, that's just a replacement for the missing name
chadwtaylor has quit [Remote host closed the connection]
gusrub_ has quit [Remote host closed the connection]
chadwtaylor has joined #ruby
<dminuoso> Oh I get it now.
<apeiros> it just uses the constant's name as default value for the enum, so you get your descriptive thingy
<apeiros> meh, allowing for int lookup blows up the code considerably :(
<apeiros> and I think this is actually like my 5th enum impl in ruby :D
<dminuoso> Mmm
Ishido has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
iwaffles has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Salih has joined #ruby
ramfjord has joined #ruby
jhack has quit [Ping timeout: 256 seconds]
solocshaw has quit [Ping timeout: 252 seconds]
DarkBushido has quit [Quit: ZNC - http://znc.in]
DarkBushido has joined #ruby
DarkBushido has joined #ruby
DarkBushido has quit [Changing host]
iwaffles has quit [Client Quit]
solocshaw has joined #ruby
mustmodify has joined #ruby
mustmodify has left #ruby [#ruby]
<apeiros> too many bugs in that little piece of code…
Humdai has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
nikivi has quit [Quit: irc]
pragmaticus has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
jhack has joined #ruby
solocshaw has quit [Ping timeout: 244 seconds]
jshjsh has joined #ruby
chopin has joined #ruby
csk has joined #ruby
gregf_ has quit [Quit: Page closed]
chris2 has quit [Ping timeout: 256 seconds]
Ishido has joined #ruby
jmignault has quit [Ping timeout: 260 seconds]
JoshS has quit [Ping timeout: 258 seconds]
linuxboytoo has joined #ruby
linuxboytoo has quit [Client Quit]
mBailey_j has quit [Ping timeout: 240 seconds]
senesor has quit [Read error: Connection reset by peer]
Savage has quit [Quit: Connection closed for inactivity]
jhack has quit [Ping timeout: 250 seconds]
rakm has joined #ruby
definity has joined #ruby
jcao219 has joined #ruby
jhack has joined #ruby
<definity> Why cant my code see the http varible? it's in global space http://codepad.org/jnXfZv1C
<apeiros> Definity: but it's a local variable
<definity> Im confused
<apeiros> def/class/module start a new lvar scope
gusrub_ has joined #ruby
<definity> How is it local?
<apeiros> by definition
<definity> ohhhh
<definity> Okay thanks :)
SuperLag has quit [Quit: leaving]
<baweaver> couple quick notes, most ruby people tend to use 2 space indentation and snake_case_for_methods
<baweaver> Move uri and http into the method
<baweaver> If they're needed for other methods, put it in a class
<baweaver> read that
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jhack has quit [Ping timeout: 260 seconds]
Ishido has quit [Ping timeout: 240 seconds]
chris2 has joined #ruby
railssmith has joined #ruby
claudiuinberlin has quit []
jmignault has joined #ruby
jhack has joined #ruby
<dminuoso> apeiros: also I began to realize that zbar has been dead for 4 years..
<dminuoso> :(
<dminuoso> Features such as zbar_symbol_get_orientation were targeted for 0.11 which was never even released.
<dminuoso> Im a real sad panda now.
UserJosh has joined #ruby
splud has joined #ruby
ace05_ has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
ace05 has joined #ruby
jmignault has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
nankyokusei has joined #ruby
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
jshjsh has quit [Ping timeout: 258 seconds]
johnmccabe has joined #ruby
hightower2 has quit [Ping timeout: 260 seconds]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
chopin has quit [Ping timeout: 252 seconds]
johnmccabe has quit [Client Quit]
nankyokusei has quit [Ping timeout: 260 seconds]
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
johnmccabe has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
jmignault has joined #ruby
Ishido has joined #ruby
troys has joined #ruby
<balazs> Can anyone recommend a ruby templating module to create JSON files ?
<balazs> One that's smart enough to create something like an array nicely, so that I don't have to worry about the trailing comma
<dminuoso> Not like the jruby wrapper for zxing is any better though..
<baweaver> hash.to_json?
johnmccabe has quit [Ping timeout: 260 seconds]
<baweaver> It's just converting an object using its `to_json` module and printing that to a file
chadwtaylor has quit []
JoshS has joined #ruby
SesMan has joined #ruby
<baweaver> balazs ^
<baweaver> s/module/method/
jhack has quit [Quit: jhack]
<balazs> I'm not sure I understand. I'll explain what I'm trying to do:
jcao219 has quit [Ping timeout: 244 seconds]
UserJosh has quit [Ping timeout: 258 seconds]
<baweaver> >> require 'json'; {something: %w(with an array)}.to_json
edwinvdgraaf has joined #ruby
<ruby[bot]> baweaver: # => "{\"something\":[\"with\",\"an\",\"array\"]}" (https://eval.in/678274)
<balazs> I have these JSON templates that describe some infrastructure (in Azure). I'd like to make them generic, so for example where the template has one security group, I would like to allow specifying multiple ones. So I have a JSON object to start with.
FastJack has joined #ruby
<balazs> Did that clear things up ?
djellemah has joined #ruby
chris349 has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
<baweaver> So ERB then for templating
ycyclist has quit [Ping timeout: 260 seconds]
centrx has quit []
jhack has joined #ruby
flying has joined #ruby
Asher has joined #ruby
<baweaver> or jbuilder
jphase has quit [Ping timeout: 246 seconds]
chopin has joined #ruby
gusrub_ has quit [Remote host closed the connection]
izaac has quit [Ping timeout: 248 seconds]
sameerynho has quit [Quit: WeeChat 1.6]
mpwin has joined #ruby
izaac has joined #ruby
gusrub_ has joined #ruby
jphase has joined #ruby
<balazs> Well, to give you a concrete example: how do you build a JSON array in ERB ? And I mean to have the template for the array elements in the ERB, not outside
enterprisey has joined #ruby
<toretore> ?code balazs
<ruby[bot]> balazs: We can't help you without your code, please post it to https://gist.github.com
jblack has quit [Ping timeout: 268 seconds]
nikivi has joined #ruby
ajsharma has quit [Quit: Textual IRC Client: www.textualapp.com]
flyingX has joined #ruby
chopin has quit [Ping timeout: 268 seconds]
<balazs> This is the concept that I'm asking about
<balazs> there will be a trailing comma after the last array element
<apeiros> why'd you do that with a template instead of code + to_json?
jphase has quit [Ping timeout: 245 seconds]
<dminuoso> apeiros: What library do you use to generate QR codes? rqrcode?
<balazs> because I have a JSON template (Azure ARM template) to begin with)
claudiuinberlin has joined #ruby
<apeiros> dminuoso: yes
<dminuoso> apeiros: Do you ever encode binary data, or just alphanumeric?
flying has quit [Ping timeout: 258 seconds]
jphase has joined #ruby
<apeiros> balazs: so? seems like you translate that anyway…
<dminuoso> Because I really want to use non-alphanumeric bytes as magic bytes.. but the freaking library seems buggy for the byte_8bit mode
<apeiros> dminuoso: due to the bug in zxing, only ascii. don't remember which qr code setting we used for that.
<dminuoso> "the" bug?
<apeiros> I thought I mentioned it in the pm earlier
<apeiros> zxing does not properly decode binary data
<dminuoso> Then either zbar does not either, or rqrcode cant encode it properly.
<dminuoso> I'm stuffing an \x80 in and get out \xC2\x80 - it's weird.
<apeiros> both possible IMO
<balazs> apeiros: so convert the JSON to a ruby hash, then make that more generic by turning it into a template, then convert that back to JSON. Right ?
<apeiros> balazs: nah, just transform, then call to_json.
<apeiros> your example: {dwarves: @dwarves.map { |dwarf| {name: dwarf.name, birthday: dwarf.birthday } }}.to_json
<balazs> I see
<dminuoso> apeiros: That would be really annoying. How am I supposed to differentiate QR codes? Just guessing and testing?
<apeiros> dminuoso: welcome to the world of average and shitty coders ruining your day
gusrub_ has quit []
<apeiros> or sometimes great coders which are short on time
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
gusrub_ has joined #ruby
j2k has joined #ruby
jphase has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
jphase has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
vuoto has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
rodfersou has quit [Quit: leaving]
chopin has joined #ruby
mBailey_j has joined #ruby
flyingX has quit []
rodfersou has joined #ruby
raul782 has joined #ruby
ur5us has joined #ruby
<dminuoso> Yes you are right.
bocaneri has quit [Read error: Connection reset by peer]
<apeiros> I think for the zxing I had a bugfix which worked. no idea where I put that, though :(
zeroDi has joined #ruby
<apeiros> also "worked". didn't fully test.
emilkarl has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> Well, that masterful patch is a telltale at whats going on.
<dminuoso> Since I know where the behavior stems from, I guess my magic byte has just become a magic double byte
<dminuoso> :)
chopin has quit [Ping timeout: 268 seconds]
enterprisey has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
pragmaticus has quit [Remote host closed the connection]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
radic has quit [Ping timeout: 265 seconds]
startupality has joined #ruby
Xeago has quit [Ping timeout: 248 seconds]
radic has joined #ruby
chrisja has joined #ruby
jackjackdripper has joined #ruby
hahuang65 has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
Derperperd has quit [Quit: Derperperd]
phantompain has quit [Ping timeout: 244 seconds]
frozengeek__ has joined #ruby
hahuang65 has quit [Client Quit]
benlieb has quit [Quit: benlieb]
hahuang65 has joined #ruby
chopin has joined #ruby
agent_white has joined #ruby
zack6849 has quit [Quit: Leaving]
Devalo has quit [Remote host closed the connection]
<agent_white> Afternoon' folks
_djbkd has joined #ruby
raul782 has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
hahuang65 has quit [Client Quit]
nicoulaj has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
sneakers has joined #ruby
whathappens has joined #ruby
harai_ has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
<dionysus69> how do I map array items in single line?
<dionysus69> [1,2,3,4].map(&:---what_goes_here---)
<bougyman> [1, 2, 3].map { |item| item * 2 }
<dionysus69> I just want to return each element
<bougyman> if you just want to return each element why are you mapping?
<dionysus69> hmm
nankyokusei has joined #ruby
<dionysus69> right
<dionysus69> I am just confused anyways thanks :D :
<dionysus69> I was trying to array.add(another_array_elements)
<dionysus69> another_array_elements do |x|
<dionysus69> end
<dionysus69> array.add(x)
<dionysus69> wanted to do it the pretty way xD
zack6849 has joined #ruby
zack6849 has quit [Changing host]
zack6849 has joined #ruby
zerowaitstate has joined #ruby
raul782 has joined #ruby
bovis has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<djellemah> >> [1,2,3].concat [3,4,5] # dionysus69
<ruby[bot]> djellemah: # => [1, 2, 3, 3, 4, 5] (https://eval.in/678287)
<dionysus69> ok let me try that :)
phantompain has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
brendan- has joined #ruby
<dionysus69> ah ok thanks anyway but doesnt work for rails errors xD
<dionysus69> quiz_temp.errors.each { |error| @quiz.errors.add(error) } if quiz_temp.errors.any?
edwinvdgraaf has joined #ruby
Limix has joined #ruby
xavier2 has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 250 seconds]
et09 has quit [Remote host closed the connection]
xavier2 has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub_ has quit [Remote host closed the connection]
phantompain has quit [Ping timeout: 252 seconds]
raul782 has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
<balazs> Is there a nicer way to do something like this ? https://gist.github.com/anonymous/52e45261882e4a41857eda08539c1e19
<balazs> I'm a ruby noob...
JoshS has quit [Quit: Leaving]
tomaw has quit [Quit: Quitting]
ace05 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 260 seconds]
<balazs> It creates all combinations based on the values of a hash. But see the output...
ace05 has joined #ruby
tomaw has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
gusrub_ has joined #ruby
whathappens has joined #ruby
kith has quit [Read error: Connection reset by peer]
ace05 has quit [Remote host closed the connection]
ace05 has joined #ruby
claw has quit [Remote host closed the connection]
csk has quit [Quit: Bye]
claw has joined #ruby
davidt has quit []
[Butch] has quit [Quit: I'm out . . .]
[Butch] has joined #ruby
csk has joined #ruby
chopin has quit [Ping timeout: 240 seconds]
Derperperd has joined #ruby
Immune has joined #ruby
symm- has joined #ruby
igniting has joined #ruby
rodfersou has quit [Quit: leaving]
csk has quit [Read error: Connection reset by peer]
csk has joined #ruby
jgnagy has quit []
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
nikivi has quit [Quit: irc]
zerowaitstate has quit [Quit: leaving]
tyang_ has joined #ruby
<adam12> balazs: What are you trying to achieve?
GodFather has joined #ruby
kirun has joined #ruby
tyang has quit [Ping timeout: 258 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jphase has quit [Remote host closed the connection]
tyang_ has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
definity has quit [Ping timeout: 240 seconds]
byte512 has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Limix has quit [Quit: Limix]
Devalo has joined #ruby
rodfersou has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
<dminuoso> https://gist.github.com/norc/56f1e3c6e6790c6397a4998f947421c8 how can I get this spec failure? the object in question is a hash..
<dminuoso> Ohh
<dminuoso> Reading helps.
jaruga___ has quit [Quit: jaruga___]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
chris2 has quit [Ping timeout: 246 seconds]
Limix has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
phantompain has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
hightower2 has joined #ruby
enterprisey has joined #ruby
enterprisey has quit [Remote host closed the connection]
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
Limix has quit [Quit: Limix]
meshsmith has joined #ruby
<bovis> balazs: I'm also new, so I'd appreciate a fact check, but I think line 20 (flattened_prod = prod.each...) will give you nothing more than the initial array. Anything you have in the block in meaningless to flattened_prod
Jackneill_ has joined #ruby
machinew_ has joined #ruby
<machinew_> are there any gems for streaming .xls files?
<machinew_> I can only find gems for .xlsx, but can't afford to load the whole .xls into memory at once
<bovis> balazs: You can use map there, instead of each, to return a flattened array.
Darmani has joined #ruby
claudiuinberlin has quit [Ping timeout: 244 seconds]
<bovis> balazs: And then the bang (!) won't be necessary
chopin has joined #ruby
chris2 has joined #ruby
hightower3 has joined #ruby
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 258 seconds]
meshsmith has quit [Ping timeout: 248 seconds]
<baweaver> balazs: first, *rest = h.values; first.product(*rest)
<baweaver> * is known as splat (which is a pain to find, so read through that)
cdg has joined #ruby
<baweaver> bovis: ^ simpler.
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
raul782 has joined #ruby
<Darmani> So... I know that Array.new returns a new array but what does Array.new(length) supposed to do exactly?
pwnd_nsfw` has joined #ruby
<bovis> Darmani: Fills in x values... Array.new(5) -> [nil,nil,nil,nil,nil]
<baweaver> ?try
<ruby[bot]> Why don't you try it and see for yourself?
<Darmani> bovis: =o
<baweaver> You're going to need to experiment in the REPL once in a while y'know, it's how you learn
<baweaver> and really, how you get better at Ruby
<bovis> Darmani: open irb and type things
blackbombay has joined #ruby
xaxisx has quit [Ping timeout: 260 seconds]
<baweaver> We make a horrible REPL
<Darmani> Lol calm down ppl.
pwnd_nsfw has quit [Ping timeout: 260 seconds]
<baweaver> you're assuming we're not.
<bovis> baweaver: What would *rest = h.values take the place of?
zeroDi has quit [Quit: WeeChat 1.6]
aurelien has quit [Read error: Connection reset by peer]
raul782 has quit [Ping timeout: 245 seconds]
elastix has joined #ruby
<baweaver> >> first, *rest = [1,2,3,4]; rest
<ruby[bot]> baweaver: # => [2, 3, 4] (https://eval.in/678328)
<baweaver> &ri Array#product
<baweaver> it takes multiple params
<balazs> adam12: look at the output and you'll see. I'm trying to create all the combinations based on the values in a hash
<baweaver> and since that'd be an array of arrays you need to splat it to make it an arg for Array#product
<bovis> baweaver: I'm not familiar with with comma and semicolon syntax
<baweaver> the semicolon was only for one liners
<baweaver> the comma is for array destructuring using splats.
<baweaver> read the above link
<bovis> k
<baweaver> it explains a good amount
<Darmani> I guess I'm supposed to define it somehow.
<baweaver> that would be a valid assessment.
blackbombay has quit [Client Quit]
codfection has joined #ruby
<Darmani> Look, this isn't even my code. I'm trying to understand what someone else did.
mBailey_j has left #ruby ["Leaving"]
<havenwood> balazs: It seems an Array of Hashes is nicer than an Array of Arrays of Hashes: head, *tail = h.values; head.product(*tail).map { |values| h.keys.zip(values).to_h }
Derperperd has quit [Quit: Derperperd]
<baweaver> accumulate doesn't actually accumulate
<baweaver> that's what reduce is for in any case.
<Darmani> baweaver: The point was to create a method that does the same thing.
gusrub_ has quit [Remote host closed the connection]
<baweaver> >> [1,2,3].reduce(0) { |accumulator, i| accumulator + i } # and yes I'm explicitly using longhand
<ruby[bot]> baweaver: # => 6 (https://eval.in/678331)
Snowy has joined #ruby
<baweaver> you're only yielding the value to it
gusrub_ has joined #ruby
<baweaver> you effectively made each
claudiuinberlin has joined #ruby
<balazs> havenwood: yup, yours is infinitely nicer
dionysus69 has quit [Ping timeout: 260 seconds]
<baweaver> Now if you happened to assign something in there....
<baweaver> perhaps with an initial value as well
Dimik has joined #ruby
quazimodo has joined #ruby
<Darmani> I guess not reduce we were supposed to create something like map
<Darmani> or collect.
<quazimodo> morn
cpruitt has quit [Quit: cpruitt]
Snowy has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 268 seconds]
<baweaver> what's the difference between each and map?
Snowy has joined #ruby
machinew_ has quit [Remote host closed the connection]
chopin has quit [Remote host closed the connection]
gusrub_ has quit [Remote host closed the connection]
raul782 has joined #ruby
gusrub_ has joined #ruby
chopin has joined #ruby
<Darmani> baweaver: Each just iterates over the values, map returns a new array with whatever the block has done to it.
<baweaver> aha
<baweaver> now how would you make a new array and put values into it?
malcolmva has quit [Read error: Connection reset by peer]
<baweaver> and then give that back?
cpruitt has joined #ruby
<Darmani> Well if I knew that we wouldn't be here talking about it now would we?
<baweaver> How do you make a new array?
Dimik has quit [Ping timeout: 240 seconds]
<Darmani> []?
<baweaver> Ok. How do you add a value to it?
fmcgeough has quit [Quit: fmcgeough]
<Darmani> [] << something?
<Nilium> A complex FSM
<baweaver> Ok, now how do you put that array in a variable?
<Darmani> arr = []
<baweaver> what does `yield i` return?
<Darmani> uhhhhhhhhhhmmmm...
<Darmani> I think it returns a block with each iteration (i)?
claudiuinberlin has quit [Remote host closed the connection]
<baweaver> class Array; def accumulate; each { |i| yield i } end end
<baweaver> Now what if we put arr above that each?
<baweaver> and put the result from that yield into it
<baweaver> and then returned that instead?
claudiuinberlin has joined #ruby
raul782 has quit [Ping timeout: 268 seconds]
<Darmani> yeah...
<ljarvis> are you rewriting map?
<Darmani> That works.
<baweaver> yep
<Darmani> I am. He's just torturing me.
<ljarvis> ah i see, enjoy
Toledo-bbl is now known as Toledo
<ljarvis> Darmani: does baweaver's example make sense?
<bovis> Darmani: Learning yield is difficult. Or it was for me. Don't get too frustrated.
machinewar has joined #ruby
<Darmani> ljarvis: Yeah it makes sense.
<ljarvis> great
<Darmani> I just wanted to understand how this method works.
<ljarvis> the best kind of torture, then
<baweaver> accumulate: each { |i| yield i }; [1,2,3].accumulate { |i| i * 2 }
<baweaver> so if accumulate is written like that roughly
<Darmani> I don't see the argument "length" defined anywhere and yet it still works somehow.
<baweaver> yield gives i to the block on accumulate
<baweaver> It's an internal method to the array
<ljarvis> You want to understand how Array.new(length) works?
<baweaver> the same as me using each up there
sepp2k has quit [Quit: Leaving.]
<Darmani> BUT WHAT DOES IT DO
allcentury has joined #ruby
<baweaver> it gives the length of the array
Sembei has joined #ruby
<Darmani> So it's a special keyword?
<baweaver> no
blackbombay has joined #ruby
<baweaver> it's a method
<baweaver> in Array
<baweaver> you're monkey patching array, so you have direct access to it.
<ljarvis> I'm so confused
<Darmani> So it's like performing each and creating a new array at the same time?
<Darmani> q.q
<baweaver> essentially
Immune has quit [Ping timeout: 260 seconds]
<baweaver> Array.new(length) { |i| yield self[i] }
<baweaver> i is the index
<baweaver> self is the current array
<baweaver> so self[i] is the current array at i index
wackydoo has joined #ruby
<baweaver> which you're now passing to whatever block accumulate was called with.
<ljarvis> I thought they want to know how Array.new(length) works?
<baweaver> they're trying to remake map
<baweaver> and the implementation they saw used that
<ljarvis> ah I clicked the wrong repl.it link
<ljarvis> that's some interesting code
<Darmani> Okay. So length is "each" essentially. Everything makes sense now.
<baweaver> Nope
malcolmva has joined #ruby
<Darmani> WAT
<baweaver> length is the length of the array
<baweaver> >> Array.new(5)
<ruby[bot]> baweaver: # => [nil, nil, nil, nil, nil] (https://eval.in/678342)
<baweaver> >> Array.new(5) { |i| i }
<ruby[bot]> baweaver: # => [0, 1, 2, 3, 4] (https://eval.in/678343)
<Darmani> yeah but that's a number.
<Darmani> How the fuck is an array defined with a word
<baweaver> >> my_array = [1,2,3,4,5]; Array.new(5) { |i| my_array[i] }
<ruby[bot]> baweaver: # => [1, 2, 3, 4, 5] (https://eval.in/678345)
zapata has joined #ruby
<baweaver> Array is a class. It can be instantiated like anything else.
<baweaver> [] is just shorthand
<Darmani> No I mean how is it's length defined with the word "length"
<baweaver> You're inside the class Array
<Darmani> yus...
<baweaver> so you have access to methods on array
<Darmani> yeah......
<baweaver> length is one of them
<baweaver> >> [1,2,3].length
<ruby[bot]> baweaver: # => 3 (https://eval.in/678349)
<baweaver> >> class Array; def foo; length end end; [0].foo
<ruby[bot]> baweaver: # => 1 (https://eval.in/678350)
<baweaver> I could also call foo in another method directly.
Xeago has quit [Ping timeout: 268 seconds]
<baweaver> >> class Array; def foo; length end; def bar; foo end end; [0].bar
<ruby[bot]> baweaver: # => 1 (https://eval.in/678352)
<Darmani> What's the point of defining it within the context of the code I showed you? o.o
<baweaver> they're all methods on an instance of Array
VeryBewitching has quit [Quit: Konversation terminated!]
<baweaver> What I just did? No point at all except to show you that length is literally a method on a single instance of an array.
ramortegui has quit [Quit: Ex-Chat]
<Darmani> No I mean this https://repl.it/EZIc/1
<ljarvis> what's the point of defining what?
tyang has joined #ruby
<Darmani> Why would you do Array.new(length) when trying to replicate a "map" method.
<Darmani> What purpose does it serve.
Xeago has joined #ruby
<ljarvis> well it's not really a canonical way of achieving what this code achieves, it's just one of many
<ljarvis> so, most probably wouldn't write it like that
<ljarvis> did you write this code or find it?
<Darmani> I found it. I'm trying to understand it.
gusrub_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<ljarvis> I would argue that it's not great code, but you're asking what the point is and my answer is: I don't know, it's weird to write it like that
gusrub_ has joined #ruby
<baweaver> It's making a new array
phantompain has quit [Ping timeout: 244 seconds]
tyang_ has joined #ruby
<baweaver> by pulling the values out of self (the current array) at each index
<baweaver> and giving it to whatever block you pass to it
symm- has quit [Quit: Leaving...]
blackbombay_ has joined #ruby
<Darmani> That part is easy to understand. I get that.
<Darmani> I think I need a break.
<ljarvis> if you want to understand why you should ask the author
moei has joined #ruby
<Darmani> Haha yeah that might be a good idea.
<baweaver> that's a cleaner implementation of it
<Darmani> Yeah that way is clean cut. Very easy to understand.
tyang has quit [Ping timeout: 256 seconds]
ocbtec has quit [Quit: leaving]
<Darmani> Anyway, break time! bbl
<ljarvis> here's an even better way: https://repl.it/EZKZ/2
<ljarvis> seriously, the code is silly
symm- has joined #ruby
johnmccabe has joined #ruby
<baweaver> bovis ^ that's the fun version
<ljarvis> baweaver: .() > .call() :D
<baweaver> I was trying to be more explicit
<baweaver> normally I use []
<ljarvis> yeah
[Butch] has quit [Quit: I'm out . . .]
<baweaver> [] also happens to be the array / hash accessor, so I abuse it :D
<ljarvis> D:
<baweaver> It's an experiment more than anything
<ljarvis> I would hope so :D
<baweaver> but that's nothing
<baweaver> that
<baweaver> that is true fear
<baweaver> It's a deep pruning based on a merge
nettoweb has joined #ruby
nankyokusei has joined #ruby
<blackbombay> .() is cool, Proc#[] is a mind fuck.
Robtop__ has joined #ruby
<baweaver> of which I'm actually gemifying back into Izzy because it's danged useful for nasty amounts of JSON / hashes
<ljarvis> tbh ruby should just do away with paren-less method calls and use first class methods
<ljarvis> then we'd just have proc()
<baweaver> I'd be inclined to agree
<baweaver> but zenspider and SeattleRB would riot XD
<blackbombay> JS got that part right.
synthroid has quit []
<bovis> baweaver: what does "= ->" do? in the 'fun' version?
<baweaver> and Python oddly
<matheusmoreira> but then you couldn't do x.y.z.w
<ljarvis> matheusmoreira: nope, which is great :D
<baweaver> shorthand for Lambda
vuoto has quit [Quit: Lost terminal]
<baweaver> >> -> a { a * 2 }[2]
<ruby[bot]> baweaver: # => 4 (https://eval.in/678363)
<matheusmoreira> no its not.... that syntax is the most concise pipeline I've ever seen
startupality has quit [Quit: startupality]
<baweaver> Something something law of demeter
<baweaver> anyways
<bovis> x.(y.(z.(w))) is prettier, rounder
<ljarvis> yes, law of demeter
<ljarvis> nooo
<baweaver> no no
pwnd_nsfw` has quit [Ping timeout: 256 seconds]
<bovis> joke
<matheusmoreira> at that point I'd just use lisp. (x (y (z (w))))
<bovis> whee
<havenwood> MatzLisp
<ljarvis> x().y().z().w() would be fine for me, but that's a code smell to call methods that are so far away from the parent object
<baweaver> You mean Streem?
<ljarvis> nested fail
nicoulaj has quit [Read error: Connection reset by peer]
<matheusmoreira> >> "noooooo".split.map(&:upcase).join
<ruby[bot]> matheusmoreira: # => "NOOOOOO" (https://eval.in/678364)
<havenwood> baweaver: The pre-Ruby name for Ruby!
<blackbombay> ljarvis: oh man, you would think so but there's scenarios in JS where code like that reads terrible, especially if you pass callbacks.
<havenwood> before release online
<matheusmoreira> >> "noooooo".split().map(&:upcase).join() # python pls
<ruby[bot]> matheusmoreira: # => "NOOOOOO" (https://eval.in/678365)
phantompain has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
quazimodo has quit [Ping timeout: 258 seconds]
<ljarvis> blackbombay: absolutely, I don't think that's JS' fault though
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matheusmoreira> why is it a code smell?
<havenwood> matheusmoreira: "noooooo".split.size #=> 1
<havenwood> matheusmoreira: #each_char or #chars
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
<ljarvis> matheusmoreira: because of loose coupling
<baweaver> or how about
<ljarvis> aka lawl of demeter
<baweaver> >> 'string'.upcase
<ruby[bot]> baweaver: # => "STRING" (https://eval.in/678366)
<xrlk> yo wtf is an instance var
dnicole has quit [Remote host closed the connection]
<baweaver> because ruby
cpruitt_ has joined #ruby
<baweaver> xrlk: have you tried searching?
<bovis> matheusmoreira: it's hard to reason what the code is doing when there are so many jumps from place to place
cpruitt has quit [Read error: Connection reset by peer]
cpruitt_ is now known as cpruitt
<matheusmoreira> I know about String#upcase I was just illustrating a simple string => array of char => operation => string pipeline
<matheusmoreira> doesn't seem that obfuscated
cpruitt has quit [Client Quit]
<havenwood> xrlk: It's a variable visible to all instance methods of an instance of a class. All the instance methods share the instance variables for their instance.
<baweaver> fair. There are a lot of arguments to be made for both.
<ljarvis> i'd be happy with split().map().join() but again, it's personal preference. Many Rubyists would hate that and I understand that
<bovis> I think it's more that it *can be* a problem, not that it is
polishdub has quit [Quit: Leaving]
<baweaver> Scala is a hybrid of both
<xrlk> tnx ha
<ljarvis> Scala is hell
<xrlk> havenwood,
<blackbombay> ljarvis: opal is like thar?
<blackbombay> that
<ljarvis> blackbombay: no idea I've not used it
<blackbombay> i guess it is
<blackbombay> it transpiles to JS
<baweaver> Eh, I like it well enough.
<baweaver> especially when the alt is Java.
<ljarvis> I like Java *shrug*
<matheusmoreira> I like Java too...
<bovis> silence
<ljarvis> :D
<ljarvis> I'm been writing code long enough to embrace it
SCHAAP137 has quit [Ping timeout: 265 seconds]
<ljarvis> I've*
<baweaver> I'll pretty well walk out of a job if they tell me I have to use it.
<ljarvis> I don't really like wrestling with the JVM, and I wouldn't go back to writing it as a job, but I like the language itself
<baweaver> Just way too verbose for me, and the GoF gives me a twitch.
<pilne> i'm starting to try writing my "need moar speed" things in go instead of attempting to do well with c (assuming I can't find a c library that I can understand already)
dnicole has joined #ruby
<ljarvis> that's fair
<yorickpeterse> you should rewrite everything in Rust for webscale
<ljarvis> sorry you spelled nodejs wrong
* baweaver ducks
<blackbombay> rust makes my eyes bleed
<pilne> i adore rust, my brain just has such a crappy time at the concept of "git gud" with it (and haskell... and lisp/scheme)
<yorickpeterse> nodejs is too old
<ljarvis> oh
<ljarvis> i'm not hip enough
GodFather has quit [Ping timeout: 258 seconds]
<baweaver> anyways, off I go for a while. Meeting time for the next 2.5 hours :D
<ljarvis> anyway the rust syntax is absolute firey hell
<blackbombay> c++ meets crack cocaine.
<pilne> cocaine's a helluva drug
<ljarvis> crack cocaine meets ketamin
<yorickpeterse> it's not that bad
<pilne> but i'm really cheering and rooting for crystal, especially if they can implement concurrency
<pilne> and/or parallelism
dnicole has quit [Ping timeout: 260 seconds]
<blackbombay> yeah me too. no small feat though.
<pilne> agreed
<pilne> (sadly)
edwinvdgraaf has quit [Remote host closed the connection]
csk has quit [Remote host closed the connection]
blackwind_123 has quit [Ping timeout: 248 seconds]
claudiuinberlin has quit []
csk has joined #ruby
blackwind_123 has joined #ruby
SCHAAP137 has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
blackbombay_ has quit [Ping timeout: 260 seconds]
kith has joined #ruby
tyang has joined #ruby
railssmith has quit [Quit: Textual IRC Client: www.textualapp.com]
quazimodo has joined #ruby
wpostma2 has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
<matheusmoreira> sadly node.js still doesn't have proper threading support, I posted on their gh issues and the maintainer said "its on the TODO list for v7"
allcentury has quit [Ping timeout: 260 seconds]
tyang_ has quit [Ping timeout: 260 seconds]
d5sx43 has joined #ruby
<matheusmoreira> because of this its impossible to write CPU-bound code in a way that isn't continuation-passing style.
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
<matheusmoreira> you literally gotta break code up so that you can manually schedule the bits and pieces to run, all so you don't block the stupid event loop.
d5sx43 has quit [Client Quit]
<blackbombay> huh weird. i never thought JS would expose threads directly.
<matheusmoreira> proper JS already has threads in the form of web workers.
<matheusmoreira> chrom{e,ium} already implemented it. it works well
<matheusmoreira> you have a separate JS file and it runs in a separate thread. IIRC you can even communicate with it via events
raul782 has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
<matheusmoreira> its just a blocking operation like any other.
sdwrage has joined #ruby
<quazimodo> matheusmoreira: that's cool, i should use that
AndrewIsHere has quit []
<matheusmoreira> honestly I dropped node as a platform for this reason
<matheusmoreira> It just wasn't possible to do what I wanted to do nicely
XV8 has joined #ruby
<quazimodo> matheusmoreira: I find that often it's nice to write cpu intensive code as an external lib and to to IPC with it
<quazimodo> in fact many times I prefer it
tyang has quit [Quit: Leaving]
tyang has joined #ruby
<matheusmoreira> well if we wanted to go that route we'd still be writing CGI programs that printed HTTP responses to stdout piped to the webserver.
<matheusmoreira> these platforms are almost an operating system. they're an environment you get to do everything
<quazimodo> don't overshoot the mark now
<quazimodo> lol
<quazimodo> that's one approach that works for several things
<quazimodo> there are other approaches
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
<quazimodo> and they aren't wrong, you're just not used to them
Salih has quit [Quit: Leaving]
Junaos has quit [Quit: ZNC - http://znc.in]
<quazimodo> there are many things in a ruby app that I sub out to another process
<matheusmoreira> yeah I know, I've written many ruby extensions myself
raul782 has quit [Ping timeout: 268 seconds]
<matheusmoreira> I love JS so much I almost wanted to believe that illusion
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<quazimodo> and now my moment of cognitive dissonance -> "i love JS so much"
definity has joined #ruby
<matheusmoreira> why is it dissonant? JS is the language, not its implementation
<matheusmoreira> chromium app development is rather comfy!
<quazimodo> i've never done a js and never regretted it :P
<quazimodo> it's my personal feeling, I find problem solving easier in other languages
<matheusmoreira> that's alright
<quazimodo> with the addition of decent-ish moduling, it's getting less brainfucky for me
<matheusmoreira> despite all those senseless quirks, I just think its got something right deep down
<matheusmoreira> yeah JS is improving a lot
<quazimodo> actually I finally got rails and zeus to autostart a webpack dev server for me (by spawning an external lib :P)
banisterfiend has quit [Ping timeout: 240 seconds]
<quazimodo> all it got right was closures and a simple object hierarchy, (which I find incredibly hard to think with)
<quazimodo> what else -is there- ?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<quazimodo> i'm not dissing, i think those are 2 very important things
<matheusmoreira> indeed
<matheusmoreira> you mean prototypes? its really simple when you take out all the bullshit they added to make it look like Java
<quazimodo> Still
<quazimodo> haven't been able to write a succint DSL with JS yet. Which is why I think I'm so up ruby's ass.
<matheusmoreira> you have an object x that has a special link to its prototype, another object y. when you access x.property, if x has the property, it is returned, if not, it is looked up in x.prototype === y.
tyang has quit [Read error: Connection reset by peer]
<quazimodo> yeah prototype inheritance is simple, too simple tbh
<matheusmoreira> http://sweetjs.org/
bovis has quit [Quit: leaving]
<matheusmoreira> scheme it up
<blackbombay> yeah chrome app/ext development is sweet.
Vile` has joined #ruby
<matheusmoreira> prototypal inheritance revolutionized my understanding of object-orientation
toretore has quit [Ping timeout: 240 seconds]
<blackbombay> too bad ES6 sold out and introduced classes.
<matheusmoreira> indeed, personally I think all JS "classes" are bullshit
Robtop__ has quit [Ping timeout: 240 seconds]
<quazimodo> I found js classes made it easier to think and build
<matheusmoreira> the concrete concepts that I always thought about were configuration files. you have them at the system, user, environment and command-line levels.
<matheusmoreira> no language ever made implementing these things easy
<quazimodo> matheusmoreira: config files?
<quazimodo> matheusmoreira: couldn't disagree more
pwnd_nsfw has joined #ruby
<quazimodo> well, maybe i don't disagree yet tilly ou elaborate
<quazimodo> elaborate
<matheusmoreira> you can pass cmdline options. if you don't? it uses your ~/.config. if you don't have one? it uses the /etc/config. if it doesn't exist? it uses internal defaults
<matheusmoreira> this abstraction directly corresponds to prototypes
Junaos has joined #ruby
<quazimodo> it's analogous, somewhat
<matheusmoreira> the internal defaults sit at the top of the inheritance chain. /etc/config gets loaded as an object and linked to the internal defaults. ~/.config gets loaded and linked to /etc/config. cmdlines are parsed into an object and linked to your user config.
<quazimodo> hey bbl
<matheusmoreira> you can always override everything
quazimodo has quit [Read error: Connection reset by peer]
jblack has joined #ruby
guacamole has quit [Quit: leaving]
guacamole has joined #ruby
millerti has joined #ruby
Devalo has joined #ruby
TPug has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
GodFather has joined #ruby
johnmilton has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
jcao219 has joined #ruby
jhack has quit [Ping timeout: 265 seconds]
Devalo has quit [Ping timeout: 246 seconds]
xavier2 has quit [Read error: Connection reset by peer]
xavier2 has joined #ruby
charliesome has joined #ruby
banisterfiend has joined #ruby
jhack has joined #ruby
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhack_ has joined #ruby
frozengeek__ has quit [Quit: frozengeek__]
jhack has quit [Ping timeout: 260 seconds]
jhack_ is now known as jhack
frozengeek__ has joined #ruby
railssmith has joined #ruby
aryaching has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
ICantCook has joined #ruby
machinewar has quit []
ddffg has quit [Quit: Leaving]
nettoweb has quit [Quit: Textual IRC Client: www.textualapp.com]
ddffg has joined #ruby
minimalism has joined #ruby
ddffg has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
kcn has joined #ruby
quazimodo has joined #ruby
elastix has quit [Quit: Leaving]
rfoust has joined #ruby
kcn has quit [Quit: Konversation terminated!]
kcn has joined #ruby
kcn has quit [Client Quit]
johnmccabe has joined #ruby
hahuang65 has joined #ruby
CloCkWeRX has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
kcn has joined #ruby
kirun has quit [Quit: Konversation terminated!]
<xavier2> Any ruby-specific vim plugins that could be recommended to someone getting into Ruby?
Immune has joined #ruby
wpostma2 has joined #ruby
<kcn> Have you checked this out? https://github.com/vim-ruby/vim-ruby
Jameser has joined #ruby
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
kcn has quit [Quit: Konversation terminated!]
hahuang65 has quit [Quit: WeeChat 1.5]
hahuang65 has joined #ruby
<xavier2> Yeah, their readme isn't very specific. I guess what I really want is some sort of linter
<jblack> syntastic is excellent
<jblack> I use syntastic for ruby, python, json (which takes some effort)
chopin has quit [Ping timeout: 240 seconds]
jphase has quit [Remote host closed the connection]
<xrlk> ycm doesnt have ruby features it looks like
<xrlk> o nvm
jphase has joined #ruby
chopin has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
MyMind has joined #ruby
Xeago has joined #ruby
hightower3 has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Sembei has quit [Ping timeout: 260 seconds]
Dimik has joined #ruby
jphase has quit [Ping timeout: 260 seconds]
Snowy has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
mikeiniowa has quit [Remote host closed the connection]
csk has quit [Quit: ZZZzzz…]
cdg has quit [Ping timeout: 260 seconds]
mikeiniowa has joined #ruby
raul782 has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Madplatypus has joined #ruby
definity has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Quit: Leaving]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
raul782 has quit [Ping timeout: 256 seconds]
allcentury has joined #ruby
Devalo has joined #ruby
biberu has quit []
mikecmpbll has quit [Quit: inabit. zz.]
nankyokusei has joined #ruby
marr has quit [Ping timeout: 260 seconds]
Devalo has quit [Ping timeout: 252 seconds]
nankyokusei has quit [Ping timeout: 258 seconds]
Asher has quit [Ping timeout: 258 seconds]
enterprisey has joined #ruby
Asher has joined #ruby
Asher has quit [Client Quit]
Asher has joined #ruby
jhack has quit [Quit: jhack]
<pizzaops> Based on the source code viewable here, would it be correct to say that #select is an alias for #find_all, and #find_all is the "core" implementation?
benlieb has joined #ruby
allcentury has quit [Remote host closed the connection]
<pizzaops> I don't know any C so I'm not comfortable making that judgement even if it does seem obvious.
allcentury has joined #ruby
benlieb has quit [Client Quit]
chopin has quit [Read error: Connection reset by peer]
malcolmva has quit [Ping timeout: 244 seconds]
chopin has joined #ruby
phantompain has quit [Ping timeout: 248 seconds]
<SeepingN> I believe they're the same, and I think the find_all type stuff is going away