jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<ruurd> You can try #rubyonrails
<Oog> i dont think this is rails specific?
lanemeyer has joined #ruby
<Oog> im talking about a module that has a "class" level function and how to access it
devbug__ has quit [Ping timeout: 255 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
<thedonkdonk> i don't even know if my problem is rails specific
<Oog> i thought you were talking about my question lol
lanemeyer has quit [Client Quit]
tubuliferous_ has quit [Ping timeout: 246 seconds]
radialneon has quit [Quit: Leaving]
radialneon has joined #ruby
<thedonkdonk> trying to move a CAS app to a new server.
Exuma has quit []
radialneon has left #ruby [#ruby]
Vile` has joined #ruby
grey_beard has quit [Ping timeout: 246 seconds]
grey_beard has joined #ruby
<havenwood> Oog: Use `self.foo` in practice, or the idiomatic module_function: http://ruby-doc.org/core/Module.html#method-i-module_function
Scroff has joined #ruby
sevenseacat has joined #ruby
<havenwood> Oog: ShiftWindow::foo to explain to other programmers what you're talking about.
mr_blue has joined #ruby
<Oog> when should ShiftWindow.foo be used
<shevy> when the API for it makes sense!
<shevy> .foo is shorter than ::foo so that is one advantage
<havenwood> Oog: With `self.foo` you can change Example to AnotherExample and `self` will switch from Example to AnotherExample without you having to change the code.
<toretore> Oog: there's no difference
<havenwood> Oog: `self.foo` is equivalent to `Example.foo` in my example.
<toretore> Oog: but you shouldn't use :: for methods
jenrzzz has joined #ruby
<havenwood> Oog: Use . to call methods, and :: between namespaces. When you can, use `self` instead of the explicit module/class name to avoid connaisance of name.
<havenwood> Or whatever you want to call it where when you change the name of the module things break.
<havenwood> Oog: But do look at module_function.
lanemeyer has joined #ruby
renderful has joined #ruby
<Oog> thanks what is connaisance of name.
brain_shim has joined #ruby
<havenwood> Oog: It's a way of describing when the name of the thing is what connects different parts so when it changes in one place it also needs to change in another.
mr_blue has quit [Ping timeout: 264 seconds]
<Oog> ah ok
Pisuke has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
arescorpio has joined #ruby
renderful has quit [Ping timeout: 244 seconds]
ruurd has quit [Quit: Zzzzz z zz ...]
iateadonut has quit [Quit: Leaving.]
jfarmer has joined #ruby
kjones_ has joined #ruby
jesterfraud has joined #ruby
abuzze has joined #ruby
Scroff has quit [Ping timeout: 252 seconds]
lala has joined #ruby
wldcordeiro has joined #ruby
Akagi201 has joined #ruby
nwhirschfeld has quit [Quit: No Ping reply in 180 seconds.]
jcoe has joined #ruby
atomical has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
abuzze has quit [Ping timeout: 246 seconds]
urbanmonk has joined #ruby
jbw_ has joined #ruby
jbw__ has quit [Ping timeout: 252 seconds]
fella6s has joined #ruby
bronson has quit [Remote host closed the connection]
Rutix`away has joined #ruby
Rutix`away has joined #ruby
matled- has joined #ruby
kith has quit [Read error: Connection reset by peer]
rawtext has quit [Quit: Textual IRC Client: www.textualapp.com]
kith has joined #ruby
ItSANgo__ has joined #ruby
mkosaki_ has joined #ruby
matled has quit [Read error: Connection reset by peer]
retornam has quit [Ping timeout: 256 seconds]
matled- is now known as matled
Pisuke has joined #ruby
chridal has quit [Ping timeout: 264 seconds]
Rutix has quit [Ping timeout: 256 seconds]
jxf has quit [Ping timeout: 256 seconds]
alexblom has quit [Ping timeout: 256 seconds]
xcesariox has quit [Excess Flood]
alexblom has joined #ruby
marr123 has joined #ruby
nuck has quit [Excess Flood]
super has quit [Ping timeout: 246 seconds]
marr123 has quit [Remote host closed the connection]
marr has quit [Ping timeout: 256 seconds]
jxf has joined #ruby
mkosaki has quit [Ping timeout: 256 seconds]
AdamMeghji has quit [Ping timeout: 256 seconds]
ItSANgo_ has quit [Ping timeout: 264 seconds]
EvilJStoker has quit [Ping timeout: 264 seconds]
Morrolan has quit [Ping timeout: 264 seconds]
oo_ has joined #ruby
chridal has joined #ruby
jenksy has quit [Ping timeout: 265 seconds]
fella5s has quit [Ping timeout: 264 seconds]
AdamMeghji has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
Yzguy has quit [Quit: Zzz...]
EvilJStoker has joined #ruby
retornam has joined #ruby
nuck has joined #ruby
brain_shim has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
urbanmonk has quit [Quit: urbanmonk]
Exuma has joined #ruby
rikai_ has quit [Quit: No Ping reply in 210 seconds.]
keen__________13 has joined #ruby
Blaguvest has quit []
super has joined #ruby
rikai has joined #ruby
keen__________12 has quit [Ping timeout: 264 seconds]
nwhirschfeld has joined #ruby
cognosco41 has joined #ruby
urbanmonk has joined #ruby
Rollabunna has joined #ruby
cognosco41 has left #ruby [#ruby]
jenksy has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
brain_shim has joined #ruby
jesterfraud is now known as jesterfraud_afk
Rollabunna has quit [Ping timeout: 255 seconds]
Muhannad has quit [Ping timeout: 256 seconds]
therod has joined #ruby
jesterfraud_afk is now known as jesterfraud
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
christiandsg has joined #ruby
Contigi has quit [Quit: Leaving]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bf4 has joined #ruby
pen has joined #ruby
MasterPiece has joined #ruby
j4cknewt has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 244 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
Exuma has quit []
duncannz has joined #ruby
eggoez has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
rbennacer has joined #ruby
Akagi201 has quit []
jcoe has joined #ruby
christiandsg has quit [Remote host closed the connection]
leonardoajim has quit [Quit: Be back later ...]
Yzguy has joined #ruby
leonardoajim has joined #ruby
oo_ has quit [Remote host closed the connection]
ivanskie has joined #ruby
brain_shim has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
MasterPiece has quit [Quit: Leaving]
eggoez has joined #ruby
mfranzwa has quit [Quit: mfranzwa]
destra33 has quit [Read error: Connection reset by peer]
ruby-lang696 has quit [Ping timeout: 246 seconds]
Surger has quit [Ping timeout: 246 seconds]
leonardoajim has quit [Ping timeout: 256 seconds]
Agoldfish has quit [Quit: G'Bye]
Rickmasta has joined #ruby
serivich has joined #ruby
vikram___ has left #ruby [#ruby]
therod has quit [Quit: Textual IRC Client: www.textualapp.com]
oddjob001 has quit [Ping timeout: 246 seconds]
iateadonut has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Miesco has joined #ruby
platzhirsch has joined #ruby
brb3 has quit []
choke has joined #ruby
djbkd has quit [Quit: Leaving...]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
willharrison has joined #ruby
willharrison has left #ruby [#ruby]
FernandoBasso has quit [Quit: WeeChat 1.2]
michael_mbp has quit [Excess Flood]
workmad3 has joined #ruby
dgutierrez1287 has joined #ruby
j4cknewt has joined #ruby
GreatSUN has quit [Ping timeout: 246 seconds]
bullcitydev has joined #ruby
Yzguy has quit [Ping timeout: 276 seconds]
michael_mbp has joined #ruby
bmurt has joined #ruby
bruno- has joined #ruby
dgutierrez1287 has quit [Ping timeout: 255 seconds]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jesterfraud> is there a symbol equivalent of %w?
<jesterfraud> >> %s(one two) == [:one, :two]
<ruboto> jesterfraud # => false (https://eval.in/393072)
<sevenseacat> %i iirc
workmad3 has quit [Ping timeout: 276 seconds]
<sevenseacat> >> %i(foo bar)
<ruboto> sevenseacat # => [:foo, :bar] (https://eval.in/393073)
<jesterfraud> legendary
bronson has joined #ruby
<jesterfraud> thanks! :)
<sevenseacat> np
Exuma has joined #ruby
Oog has quit [Remote host closed the connection]
tmtwd has joined #ruby
crazydiamond has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
mesamoo has joined #ruby
CloCkWeRX has joined #ruby
bmurt has quit []
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Rollabunna has joined #ruby
Jimmybee has joined #ruby
weaksauce has joined #ruby
bronson_ has joined #ruby
Jimmybee has left #ruby [#ruby]
hotpancakes has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
bffff_ has joined #ruby
malconis has joined #ruby
mfranzwa has joined #ruby
mfranzwa has quit [Client Quit]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Feyn has joined #ruby
kjones_ has joined #ruby
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
balazs has joined #ruby
platosha has quit [Quit: Leaving]
tkuchiki has joined #ruby
jokester has quit [Quit: wiped]
Channel6 has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
sharpmachine has joined #ruby
urbanmonk has quit [Quit: urbanmonk]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
Nigel_ has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
intyl has quit [Quit: leaving]
joneshf-laptop has quit [Remote host closed the connection]
swgillespie has joined #ruby
rbennacer has quit [Remote host closed the connection]
enders has quit [Remote host closed the connection]
balazs has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has quit [Quit: Leaving.]
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby
arooni-mobile__ has quit [Ping timeout: 248 seconds]
arooni-mobile has quit [Ping timeout: 248 seconds]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has joined #ruby
AhabsBeard has joined #ruby
Spami has joined #ruby
AhabsBeard has quit [Max SendQ exceeded]
AhabsBeard has joined #ruby
jesterfraud is now known as jesterfraud_afk
hotpancakes has joined #ruby
devbug_ has joined #ruby
sharpmachine has quit [Remote host closed the connection]
charliesome has joined #ruby
bf4 has quit [Ping timeout: 246 seconds]
devbug has quit [Ping timeout: 256 seconds]
war_pigs has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
Exuma has quit []
jfarmer has quit [Read error: Connection reset by peer]
hololeap has joined #ruby
daas has quit [Remote host closed the connection]
jfarmer has joined #ruby
dgutierrez1287 has joined #ruby
oo_ has quit [Remote host closed the connection]
arooni-mobile__ has joined #ruby
arooni-mobile has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
AhabsBeard has quit []
yh has quit [Ping timeout: 256 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
abuzze has joined #ruby
leonardoajim has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doctorly has joined #ruby
chouhoulis has joined #ruby
Rickmasta has joined #ruby
oo_ has joined #ruby
jesterfraud_afk is now known as jesterfraud
abuzze has quit [Ping timeout: 246 seconds]
tejasmanohar has joined #ruby
<tejasmanohar> hey guys
<tejasmanohar> anyone know what this means? host-raw? is that arbitrary and supposed to be changed....
G has quit [Disconnected by services]
Nigel_ is now known as G
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
<jesterfraud> ?guys tejasmanohar
<ruboto> tejasmanohar, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<tejasmanohar> sorry sorry
<tejasmanohar> *hey everyone :)
<tejasmanohar> my bad
<jesterfraud> I think there's a vagrant specific channel
<jesterfraud> you might have more luck there
Rollabunna has joined #ruby
<jesterfraud> at a guess though, tejasmanohar, I'd say that's the folder on the VM, and therefore is probably fine
oylm has quit []
<tejasmanohar> hm but its not there on the vm :\
<tejasmanohar> or my comp
NeverDie has joined #ruby
<jesterfraud> not sure
ryan__ has joined #ruby
jeramyRR has quit [Quit: Peace out!]
ryan__ is now known as valetudo
<jesterfraud> sorry, I can't be more help. Have you tried #vagrant?
Rollabunna has quit [Ping timeout: 276 seconds]
kjones_ has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
yh has joined #ruby
<tejasmanohar> ill try now
growlove has joined #ruby
tejasmanohar has quit [Quit: WeeChat 1.1.1]
Matadoer has joined #ruby
yh has quit [Ping timeout: 255 seconds]
_whitelogger_ has joined #ruby
bb010g has joined #ruby
elektronaut has joined #ruby
krz has quit [Read error: Connection reset by peer]
drPoggs has joined #ruby
krz has joined #ruby
weemsledeux has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uptownhr has quit [Quit: uptownhr]
<Miesco> Whats this mean?: <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
christiandsg has joined #ruby
fenjamin has joined #ruby
Sypheren has quit [Ping timeout: 252 seconds]
GriffinHeart has joined #ruby
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
thedonkdonk has left #ruby [#ruby]
Indian has quit [Quit: Leaving]
Sypheren has joined #ruby
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
speaking1ode has quit [Quit: Lost terminal]
nomad has joined #ruby
darkf has joined #ruby
<Miesco> It happens when I type `/usr/bin/rails`
<sevenseacat> lol where did /usr/bin/rails come from
bf4 has joined #ruby
ivanskie has joined #ruby
mistermocha has joined #ruby
<Miesco> sevenseacat: debian repository
<sevenseacat> :(
<Miesco> sevenseacat: But I did something like `rm -rf /usr/lib/ruby`
<sevenseacat> oh good luck with that.
Sypheren has quit [Ping timeout: 246 seconds]
<Miesco> sevenseacat: Could that be related?
<sevenseacat> I don't know why you would have done that. I don't know why you would install rails from a debian package.
SpikeMaster has joined #ruby
<postmodern> why most codeclimate be added to the "very first line" of the helpers file?
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat> probably so it can track everything in the helpers file
Sypheren has joined #ruby
<sevenseacat> kinda hard to track stuff it it loads after you've already loaded all of your code
<Miesco> sevenseacat: I fixed it, but I am getting this now http://paste.debian.net/279475/
<Miesco> I get it from: rails new hello2
<sevenseacat> ?ubuntu
<ruboto> Ubuntu installation guide for Ruby + Rails: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
<sevenseacat> don't use debian packages.
<sevenseacat> for ruby or rails.
dented42 has joined #ruby
<Miesco> sevenseacat: I was using that link, but I deleted all that and am back to debian
mistermocha has quit [Ping timeout: 248 seconds]
<Miesco> sevenseacat: Someone here told me I could
bf4 has quit [Ping timeout: 264 seconds]
Scroff has joined #ruby
<Miesco> sevenseacat: I have rails version 4.1.8 installed from my package manager, so I don't know why its giving me that error
knu0 has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
<Miesco> sevenseacat: How do I check what gem trees its checking?
<sevenseacat> I cant help you because I dont know or want to know what kind of stupidity debian packages do with rails gems. sorry.
knu has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
<jfarmer> Ditto to what sevenseacat said; use the gem command to manage your gems.
dgutierrez1287 has joined #ruby
<Miesco> jfarmer: Fine, i'll use the stupid gem command :)
<Miesco> jfarmer: But i'm still using debian ruby
ljt has quit []
<jfarmer> That might present its own problems, but we should at least control for the use of the gem command first.
SpikeMaster has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<sevenseacat> it likely will, because you'll need to sudo all of the things
<Ox0dea> sevenseacat: Wait, root isn't the only user?
icebourg has joined #ruby
xcesariox has joined #ruby
Shizza has joined #ruby
sarkyniin has quit [Ping timeout: 256 seconds]
<Miesco> sevenseacat: Wait, but debian has this beautiful package: https://packages.debian.org/jessie/rubygems-integration
<sevenseacat> lol
bronson_ has quit [Remote host closed the connection]
<sevenseacat> honestly, not interested.
workmad3 has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
war_pigs has quit [Quit: later... computer is sleeping]
<Ox0dea> A package manager managing a package manager.
dfockler has joined #ruby
mary5030 has joined #ruby
braincras has joined #ruby
<Miesco> How do I get 'bundler'? gem install bundler?
<sevenseacat> yes.
<Ox0dea> baweaver: Did you happen to catch my Muggling of the anagram checker?
<Miesco> Should I do 'gem install rails' as user or sudo user?
<sevenseacat> Miesco: do you have a choice?
<Miesco> sevenseacat: Yes. root has a 'gem' command, and so does my user.
<sevenseacat> that doesnt mean you have a choice
<sevenseacat> one will likely error
<Miesco> sevenseacat: What one will likely error?
<sevenseacat> [11:08:54] sevenseacat:it likely will, because you'll need to sudo all of the things
oo_ has quit [Remote host closed the connection]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Miesco> sevenseacat: So install gems as root?
workmad3 has quit [Ping timeout: 255 seconds]
<sevenseacat> [11:04:23] sevenseacat:don't use debian packages.
<sevenseacat> [11:04:28] sevenseacat:for ruby or rails.
dfockler has quit [Ping timeout: 248 seconds]
<Miesco> mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
mary5030 has quit [Remote host closed the connection]
christiandsg has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
christiandsg has joined #ruby
Tarkers34|2 has quit [Ping timeout: 250 seconds]
<jfarmer> This is really a #debian question
Scroff has quit [Ping timeout: 264 seconds]
<jfarmer> You likely didn't install the "ruby development package" or whatever
tmtwd has quit [Ping timeout: 264 seconds]
<Miesco> jfarmer: Ah yes! Let me try.
<Miesco> I need a hotkey for 'rm -rf ~/.gem'
bronson has joined #ruby
havenwood has joined #ruby
mary5030 has joined #ruby
Rollabunna has joined #ruby
<jfarmer> Miesco These instructions are the ones I'd follow if I were using Ubuntu: https://gorails.com/setup/ubuntu/14.10
jesterfraud is now known as jesterfraud_afk
jesterfraud_afk is now known as jesterfraud
war_pigs has joined #ruby
<havenwood> Miesco: Brightbox ships nice up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
<Miesco> or better yet: find / | grep gem | xargs rm -rf
<havenwood> Miesco: That would be... a bad idea.
<havenwood> mana[gem]ent doesn't like being nuked
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hololeap has joined #ruby
<Miesco> About to through my computer out the window :)
<Miesco> throw
bruno- has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
<jfarmer> I hadn't heard of Brightbox, but that seems like the "right" way to go for a a distro that uses debian packages
dgutierrez1287 has quit [Remote host closed the connection]
<wmoxam> Miesco: you could install bundler from a package if you want to continue down that route ;)
<Miesco> wmoxam: No thanks. Don't need bundler. Just need rails.
<wmoxam> Miesco: rails needs bundler ;)
<havenwood> Miesco: The only reason you'd need Bundler is Rails.
Sypheren has quit [Ping timeout: 248 seconds]
<Miesco> Okay past my bed time
<havenwood> Rails has a hard dep on Bundler.
kjones_ has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
devbug has joined #ruby
lavros has joined #ruby
balazs has joined #ruby
howdoicomputer has joined #ruby
jesterfraud is now known as jesterfraud_afk
Sypheren has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
jaygen_ has joined #ruby
GriffinHeart has joined #ruby
devbug_ has quit [Ping timeout: 246 seconds]
<Miesco> havenwood: What is faster, rails or django?
<Miesco> or catalyst
<wmoxam> Miesco: there isn't really an answer for that
<Miesco> wmoxam: What about a hello world on each of them?
<wmoxam> if used correctly all should be generally in the same ballpark
mary5030 has quit [Remote host closed the connection]
jaygen has quit [Ping timeout: 276 seconds]
<wmoxam> Miesco: dunno. Micro benchmarks are typically useless anyways
bronson has quit [Remote host closed the connection]
urbanmonk has joined #ruby
<havenwood> Miesco: Here are some Hello World micro benchmarks for Ruby frameworks: https://github.com/luislavena/bench-micro
<havenwood> Miesco: Take a look at Roda, it excels as the number of routes exceeds one.
beilabs_ has quit [Ping timeout: 252 seconds]
christiandsg has quit [Read error: Connection reset by peer]
bronson has joined #ruby
christiandsg has joined #ruby
vergeman has joined #ruby
gix has quit [Ping timeout: 256 seconds]
vergeman has left #ruby [#ruby]
<havenwood> Miesco: It'll be faster than Rails or Django if that's what you care about.
f3lp has joined #ruby
urbanmonk has quit [Client Quit]
<wmoxam> if Roda fits the job, then using Rails or Django was overkill anyways ;)
<havenwood> Miesco: Is Hello World speed really what you care about?
<havenwood> ?rails Miesco
<ruboto> Miesco, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
tubuliferous_ has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Miesco> -bash: rails: command not found
<havenwood> Miesco: gem install rails
<Miesco> havenwood: I did that as a user
<havenwood> Miesco: gem which rails
<Miesco> /home/shawn/.gem/ruby/2.1.3/gems/railties-4.2.3/lib/rails.rb
gix has joined #ruby
devbug_ has joined #ruby
woodruffw has joined #ruby
<havenwood> Miesco: So I guess `/home/shawn/.gem/ruby/2.1.3/bin` isn't in your PATH?
<Miesco> havenwood: ah nice. Will 'sudo gem install rails' install the rails binary to my current path?
<havenwood> Miesco: Yup, it should indeed.
hololeap has quit [Ping timeout: 265 seconds]
jaygen has joined #ruby
devbug has quit [Ping timeout: 244 seconds]
<Miesco> havenwood: This isn't working: /home/shawn/.gem/ruby/2.1.3/bin/rails server
<Miesco> rails new APP_PATH [options]
<havenwood> Miesco: In what way isn't it working?
<Miesco> havenwood: It says I am supposed to use rails new APP_PATH [options]
<wmoxam> Miesco: it's working ;)
Hobogrammer has quit [Ping timeout: 252 seconds]
<Miesco> wmoxam: Well how do I make it start the server?
<havenwood> ?rails Miesco
<ruboto> Miesco, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<baweaver> Miesco: now would be a good time to read guides
<Miesco> Wait nvm lol
danielglh has joined #ruby
<Miesco> I'm stupid
<wmoxam> ;)
jaygen_ has quit [Ping timeout: 248 seconds]
sbhatore has quit [Ping timeout: 256 seconds]
Yiota has joined #ruby
mary5030 has joined #ruby
swgillespie has joined #ruby
Yiota has quit [Client Quit]
howdoicomputer has quit [Ping timeout: 255 seconds]
arooni-mobile has quit [Ping timeout: 248 seconds]
arooni-mobile__ has quit [Ping timeout: 248 seconds]
oo_ has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
Miesco has quit [Quit: leaving]
Yiota has joined #ruby
Yiota has quit [Client Quit]
war_pigs has quit [Quit: later... computer is sleeping]
hololeap has joined #ruby
bronson has quit [Remote host closed the connection]
devbug has joined #ruby
Sthebig has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
devbug_ has quit [Ping timeout: 264 seconds]
arooni-mobile__ has joined #ruby
arooni-mobile has joined #ruby
CalvinnHobbes has quit [Ping timeout: 256 seconds]
lessless has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
Channel6 has quit [Quit: Leaving]
balazs has quit [Remote host closed the connection]
balazs has joined #ruby
Sypheren has joined #ruby
devbug_ has joined #ruby
Yiota has joined #ruby
mary5030 has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 250 seconds]
balazs has quit [Ping timeout: 248 seconds]
ebbflowgo has quit [Quit: ebbflowgo]
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
fenjamin has quit [Remote host closed the connection]
abuzze has joined #ruby
braincrash has joined #ruby
Rollabunna has joined #ruby
jenrzzz has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
fella6s has quit [Ping timeout: 252 seconds]
tubuliferous_ has quit [Ping timeout: 248 seconds]
braincras has quit [Ping timeout: 256 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
jesterfraud_afk is now known as jesterfraud
mary5030 has joined #ruby
kkeuning has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
t_ has quit [Ping timeout: 252 seconds]
d0lph1n98 has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
jokester has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
krz has quit [Ping timeout: 265 seconds]
dopie has joined #ruby
krz has joined #ruby
swgillespie has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
parabolize has joined #ruby
krz has quit [Read error: Connection reset by peer]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
krz has joined #ruby
eggoez has joined #ruby
tmtwd has joined #ruby
Sypheren has quit [Ping timeout: 248 seconds]
t_ has joined #ruby
niemcu has joined #ruby
icebourg has quit []
eggoez has quit [Ping timeout: 256 seconds]
Sypheren has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaines has joined #ruby
charliesome has quit [Quit: zzz]
ivanskie has joined #ruby
eggoez has joined #ruby
charliesome has joined #ruby
Symbiosisz has quit [Remote host closed the connection]
jenrzzz has quit [Quit: Lost terminal]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blaines has quit [Ping timeout: 264 seconds]
peter_paule has joined #ruby
Rutix`away is now known as Rutux
blaines has joined #ruby
mary5030 has quit [Remote host closed the connection]
tmtwd has quit [Remote host closed the connection]
krz has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
Musashi007 has quit [Quit: Musashi007]
oo_ has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
blaines has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
auraka has quit [Quit: WeeChat 0.4.2]
jenrzzz has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
workmad3 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
robbyoconnor has quit [Client Quit]
f3lp has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
mistermocha has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
dellavg has joined #ruby
bronson has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
mr_blue has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
Scroff has joined #ruby
charliesome has joined #ruby
jfarmer has quit []
Musashi007 has joined #ruby
sivoais has quit [Ping timeout: 246 seconds]
peter_paule has quit [Ping timeout: 276 seconds]
sivoais has joined #ruby
bodie_ has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
serivich has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 246 seconds]
icosa1 has joined #ruby
bodie_ has joined #ruby
charliesome has quit [Quit: zzz]
f3lp has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
Rollabunna has joined #ruby
tkuchiki has quit [Remote host closed the connection]
war_pigs has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Rollabunna has quit [Ping timeout: 248 seconds]
ixti has joined #ruby
Scroff has quit [Ping timeout: 264 seconds]
roolo has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
serivichi has joined #ruby
iamninja has joined #ruby
davedev24_ has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
damncabbage has joined #ruby
riotjones has joined #ruby
christiandsg has quit [Remote host closed the connection]
balazs has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
DoubleMalt has quit [Ping timeout: 250 seconds]
bffff_ has quit [Quit: Connection closed for inactivity]
allomov has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
idiocrash has quit [Remote host closed the connection]
cir0x has joined #ruby
bhuvan_aurora has joined #ruby
bhuvanaurora has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
Burgestrand has joined #ruby
dhjondoh has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Burgestrand> Cool, so #ruby-lang finally got merged? :)
<sevenseacat> aye
<sevenseacat> hello :)
tagrudev has joined #ruby
<Burgestrand> \o.
<Burgestrand> Not a day too late!
<Burgestrand> or too soon I guess. ;)
Sypheren has joined #ruby
Volsus has quit [Ping timeout: 248 seconds]
* damncabbage waves
<Burgestrand> And Hi :)
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
leonardoajim has quit [Quit: Be back later ...]
leonardoajim has joined #ruby
arooni-mobile has quit [Ping timeout: 248 seconds]
arooni-mobile__ has quit [Ping timeout: 248 seconds]
<postmodern> controversial question, should all new projects use bundler?
ferr has joined #ruby
<postmodern> even ones with <5 common dependencies
<sevenseacat> i believe any ruby project should use bundler.
<postmodern> sevenseacat, how about ones with no dependencies?
<sevenseacat> do they exist? any ruby project will at least have some testing dependencies
mary5030 has joined #ruby
<sevenseacat> plus, a Gemfile allows you to lock a ruby version
<postmodern> sevenseacat, by project i mean gem
leonardoajim has quit [Ping timeout: 256 seconds]
dgutierrez1287 has joined #ruby
<sevenseacat> ah hah
<sevenseacat> I've never built one
<postmodern> i don't count things like rake as a dependency, that's included with ruby
oo_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
mr_blue has quit [Quit: leaving]
<damncabbage> nnnno it isnt
<sevenseacat> well if you rely on a specific version of rake
<sevenseacat> you probably need to specify it
<damncabbage> postmodern: You really need to include Rake. Just because it's _sometimes_ bundled or sometimes people just happen to install it doesn't mean you shouldn't add it to a dev-dependencies list.
<postmodern> damncabbage, yeeeees it is
<damncabbage> ... What version of Ruby? :|
<postmodern> damncabbage, it's added to the gemspec, but i don't count it as an external dependency that needs managing
mary5030 has quit [Ping timeout: 248 seconds]
<postmodern> damncabbage, rake has been included since 1.9
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
* damncabbage suddenly shows his age
<damncabbage> pardon me
<sevenseacat> hah
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<postmodern> and 1.8 is EoLed, thank $deity
<damncabbage> Sorry for my earlier snark and/or plaintive cry
agent_white has joined #ruby
<damncabbage> So is 1.9, thankfully. D:
<sevenseacat> aye
<agent_white> Evenin'
GriffinHeart has quit [Remote host closed the connection]
Sypheren has quit [Ping timeout: 250 seconds]
cir0x has quit [Quit: Leaving.]
iateadonut has quit [Quit: Leaving.]
GriffinHeart has joined #ruby
jenrzzz has joined #ruby
ponga has joined #ruby
jesterfraud is now known as jesterfraud_afk
GriffinHeart has quit [Read error: Connection reset by peer]
GriffinHeart has joined #ruby
Sypheren has joined #ruby
kies^ has quit [Ping timeout: 246 seconds]
railsraider has joined #ruby
<Burgestrand> postmodern: what is the downside to using bundler?
hotpancakes has joined #ruby
_ht has joined #ruby
<postmodern> Burgestrand, more files, bundle exec, etc
Volsus has joined #ruby
<postmodern> Burgestrand, debating whether my ore project generator should enable it by default, or let the user choose per gem
jesterfraud_afk is now known as jesterfraud
SOLDIERz has joined #ruby
A205B064 has quit [Ping timeout: 265 seconds]
<Burgestrand> I consider it optional when developing gems. Sure, it's a nice standard to be able to "bundle install" and get all dependencies regardless if it's a project or not, it's the closest way to a standard build we have. On the other side, you don't get anything else since you don't *want* to lock down gem versions when developing your own gem.
michael_mbp has quit [Excess Flood]
hotpancakes has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
<Burgestrand> I do throw it in all my gems because: it's low cost, not unexpected (most rubyists will encounter bundler many times), it gives some rake tasks that I don't need to write, and I feel it's easier to install gem dependencies that way.
kreantos has quit [Ping timeout: 256 seconds]
kreantos has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
darithorn has joined #ruby
howdoicomputer has joined #ruby
<flughafen> moin everybody
<Burgestrand> By low cost I mean it's one file (I don't check in Gemfile.lock when developing gems), and it's only a development dependency.
toretore has quit [Quit: This computer has gone to sleep]
<Burgestrand> postmodern: it does however give a nicer way if you have dependencies on other gems that are also not released yet, if you're developing two gems in tandem.
michael_mbp has joined #ruby
<Burgestrand> (through `gem "pancakes", path: "../pancakes"`)
<Burgestrand> flughafen: \o.
<Burgestrand> postmodern: I think my own opinion in summary is that if you ask me if you should use bundler for your gem I will say yes, if you ask me if you must I will say no.
Sypheren has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby
ledestin has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
bf4 has joined #ruby
<sevenseacat> my opinions aren't relevant for gems, I don't know whats best practice there :)
Sypheren has joined #ruby
niemcu has quit [Ping timeout: 276 seconds]
<flughafen> moin Burgestrand !
<Burgestrand> sevenseacat: if you ever do, http://guides.rubygems.org/!
chrissonar has joined #ruby
Carnage\ has joined #ruby
GriffinHeart has joined #ruby
Rollabunna has joined #ruby
bf4 has quit [Ping timeout: 256 seconds]
t_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
roolo has quit [Remote host closed the connection]
jaredrhine has quit [Quit: No Ping reply in 180 seconds.]
doctorly has quit [Ping timeout: 276 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
acke has joined #ruby
jaredrhine has joined #ruby
Carnage\ has quit [Ping timeout: 246 seconds]
aganov has joined #ruby
<sphex> why all the hate for the `for` keyword?
t_ has joined #ruby
<sevenseacat> because its unnecessary
<sphex> but it's so readable
<sevenseacat> we already have so many more ways to do loops that make much more sense
mistermocha has quit [Ping timeout: 248 seconds]
emilkarl has joined #ruby
Musashi007 has quit [Quit: Musashi007]
serivichi has quit [Quit: Leaving]
<sphex> one could have the most important flow control "stand out" by using keyword constructs, and methods/blocks for the rest
<sevenseacat> wat
tkuchiki has joined #ruby
jaredrhine has quit [Client Quit]
lxsameer has joined #ruby
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Volsus has quit [Ping timeout: 248 seconds]
<damncabbage> Because we have .map() because we're going to treat the result as a value :D
<sevenseacat> we have map, each, times, loop, while... so many ways of looping
<sphex> yeah.. like "if"/"when"/"for"/etc for the outer, more important layer of flow control in a routine. and ternary operator, inline "if" expressions, enumerators and chained methods, etc for the rest.
yayfoxes has joined #ruby
jesterfraud is now known as jesterfraud_afk
jesterfraud_afk is now known as jesterfraud
<sevenseacat> not seeing it, sorry.
last_staff has joined #ruby
<sphex> okay *looks down*
<sphex> I may be the *only* one thinking that. in the world. :/ my "for" loops will be called stupid by everyone ever.
<sevenseacat> theyre just not idiomatic ruby code
hotpancakes has quit [Remote host closed the connection]
Sypheren has quit [Ping timeout: 264 seconds]
kkeuning has quit [Ping timeout: 265 seconds]
<damncabbage> But why do we need to think of it as flow control? Some other languages have it as a big calculation instead, where it's the result of applying the block-function-thing to each element.
<Burgestrand> sphex: they could also leak information after the loop since they don't have their own scope.
<sevenseacat> its not flow control, its usually used for transformations
riotjones has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
jfarmer has joined #ruby
<postmodern> Burgestrand, so probably a good idea to enable bundler by default in Ore
Sypheren has joined #ruby
tvw has joined #ruby
<sphex> Burgestrand: oh yeah.. but that's hard to avoid in general with ruby. :/ "my" variables must be the only thing I miss from perl.
balazs has quit [Remote host closed the connection]
<Burgestrand> postmodern: yeah, I think I consider the (marginal) benefits outweigh the (marginal) downsides.
christiandsg has joined #ruby
<Burgestrand> sphex: indeed, my point is that for-loops makes it a tiny bit worse. :)
<postmodern> next question
<postmodern> do you think yard or rdoc should be the default documentation tool for all new projects?
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<damncabbage> A piece regarding "idiomatic" code (on for loops, no less): http://learncodethehardway.org/blog/AUG_19_2012.html
<damncabbage> ("Programming Languages Have Social Mores Not Idioms")
ponga has left #ruby [#ruby]
KrzaQ has quit [Disconnected by services]
<sevenseacat> interesting, seems I (and many others) use the word 'idiom' incorrectly
KrzaQ has joined #ruby
<damncabbage> I'm not sure how much I agree with the author, but it's worth the read all the same.
hotpancakes has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
<sevenseacat> either
<sevenseacat> 99.5%ish of the ruby code you read is not going to use for loops, so teaching them (and only them) makes you ill-equipped to deal with any other code but your own
<sphex> oh no.. now gotta worry about non-idiomatic uses of the word "idiom". I just want to ruby right. :/
emilkarl has quit [Quit: emilkarl]
<baweaver> Someone's arguing for loops in ruby?
<baweaver> that's a good way to axe the best part of it (Enumerable)
<baweaver> treat ruby like ruby, leave other languages out of it. Best practice when learning a new language honestly.
<Burgestrand> I think that article has a valid point about mores, but regarding the "for-loops are conceptually easier than .each"-section, while being true doesn't really give a compelling argument *not* to teach "use .each, not for".
joneshf-laptop has joined #ruby
<baweaver> Otherwise you end up with nasty articles like "Rails for PHP developers" or "Ruby for Java developers" that does nothing except exasperate the issue more.
mburns has quit [Remote host closed the connection]
<baweaver> Burgestrand: saying they're easier is laughable at best and downright deceptive at worst
<baweaver> easier only if you're a java/c type programmer learning another language.
tesuji has joined #ruby
<baweaver> it's loaded
bhuvanaurora has quit [Ping timeout: 252 seconds]
howdoi has joined #ruby
bhuvan_aurora has quit [Ping timeout: 252 seconds]
Shizza has quit []
<baweaver> If you come from *any* functional language, you'd say the opposite
<baweaver> it's depressingly like java/c programmers to assume everything on their side of the fence is "easier"
<Burgestrand> baweaver: yeah I'm not really concerned about a programmer coming from another language, mainly thinking about the aspect of people new to programming.
<baweaver> also laughable
<Burgestrand> baweaver: why?
<baweaver> I've taught people various languages to start with
<baweaver> Java had the absolute worst feedback with C++ close behind
<sevenseacat> tbh I think you could teach 'each' without half of those concepts, and then explain them when they become relevant
<Burgestrand> Indeed, a new programmer won't really care about what they use in the start, it's all the same anyway.
allomov has quit [Remote host closed the connection]
Sypheren has quit [Ping timeout: 250 seconds]
<baweaver> false
<Burgestrand> baweaver: in my experience this is not so.
<sevenseacat> half of the syntax you pick up when you learn a language you understand the nuances of anyway
<damncabbage> Just... outright false?
<baweaver> while there are overlaps, I'd dare someone to say learning Haskell first is 'the same anyways'
<sevenseacat> *you dont understan
<sevenseacat> d
<Burgestrand> baweaver: I'm on the topic of for vs. .eahc.
<baweaver> Java and Haskell are about as incongruent as you can get
<Burgestrand> Derp, .each.
<damncabbage> Err. I think it was between 'for' and 'each', not between 'Ruby'and 'Haskell'.
<baweaver> It was, but it also tails into languages that inspire said idioms
<postmodern> do people still use sdoc? or has rdoc/yard caught up?
<shevy> I let love be the message of my documentation.
<baweaver> yard for me
<sphex> baweaver: my idea was that the different syntax of "for" loops could be used to distinguish the "outer layer" of a complicated function. I think they stand out more than enumerator calls. just to make the code easier to "get" at a glance. I think syntax matters a lot to make code readable; uniformity isn't necessarily better.
Sypheren has joined #ruby
<baweaver> if you need an outer then you need to break apart a function
<baweaver> show me an example of that paradigm
Scroff has joined #ruby
<Burgestrand> postmodern: I'm not sure you could get a good answer for your decision, I personally prefer YARD but I respect rdoc.
<baweaver> and I guarantee you it's something that needs to be broken into separate functions anyways
<Burgestrand> postmodern: I guess I'd advise you to pick whichever you prefer. :)
<baweaver> Honestly yard because there are plugins for sublime that auto-gen it
<baweaver> and I'm a bit lazy like that
Pupeno has joined #ruby
<shevy> that's ok
<shevy> after building the dam, you need to relax
<postmodern> Burgestrand, i'm asking because i maintain the ore project generator, trying to figure out the current defacto development preferences
<baweaver> yard is probably the safe bet for now
nomad has quit [Ping timeout: 246 seconds]
<sphex> baweaver: yeah... breaking down into multiple functions is probably always better. I argue about features that make large functions easier to deal with sometimes (like labelled loops too)... but large functions are bad. :/
<Burgestrand> postmodern: I know, I just can't think of a compelling argument to argue for either one of those two.
<baweaver> I had someone try and justify a 290 line method
<baweaver> sufficient to say this same person may have driven me to a slight drinking binge...
<shevy> the mother of all methods
<sphex> ouch. "large" to me is less than a screenful...
Scroff has quit [Ping timeout: 250 seconds]
<baweaver> turns out that by killing that method I took down the SQL queries related with that action by 98% and the code footprint by 60%
<ytti> style question
<ytti> var = string
<ytti> var = another_string if condition1 and condition2
hotpancakes has quit [Remote host closed the connection]
mburns has joined #ruby
<ytti> is this bad style?
<ytti> is
<ytti> var = if condition1 and condition2
<ytti> another_string
<ytti> else
<ytti> string
<ytti> end
<ytti> better?
<baweaver> var = condition1 && condition 2 ? string : another_string
<bnagy> ffs
<baweaver> also, gist for > 3 lines of code
<ytti> i don't like ternary with 2 conditions
<baweaver> then knock yourself out
<baweaver> I tend to abhor variable mutation unless expressly necessary in ruby
williamherry has joined #ruby
<bnagy> the most transparent is if else, but assignment in the if like that is a little ugly
<baweaver> but that's stylistic as well
<ytti> exactly
<baweaver> also substantially easier to test and abstract out later
bhuvan_aurora has joined #ruby
<bnagy> var = blah; if x && y var = otherblah is
bhuvanaurora has joined #ruby
<baweaver> kinda nasty
<bnagy> .. ok I guess. Mostly you can avoid the whole problem
j4cknewt has quit [Remote host closed the connection]
workmad3 has joined #ruby
<Burgestrand> ytti: I don't mind longer pieces of code if they're more clear. I think both of your examples are fine, leaning more towards the first however. The surrounding code should also help you decide.
<baweaver> honestly just use a ternary, or abstract the condition to a named variable
<Burgestrand> Ternaries should however be avoided.
<bnagy> never use ternary in ruby
<bnagy> ever
<baweaver> ...why?
<damncabbage> massive conflicting advice! must be monday
dfockler has joined #ruby
<bnagy> it shouldn't even be in the language, it's one of the ancient perlisms
<ytti> but now i know the potentially unnecessary assignment is very chea
<sevenseacat> you better have some concrete reasoning for that one
<baweaver> it's perfectly easy to read
<ytti> var = method.do_something
j4cknewt has joined #ruby
<damncabbage> var = if foo then bazbar else quux end? :D
<ytti> consideration here is, that the assignment is very very cheap
<baweaver> they don't
<sphex> bnagy: it is well-known though...
<bnagy> it's unreadable for no reason
<ytti> if it owuld be something like
<ytti> var = blaah if foo and bar
<ytti> +p
<baweaver> they just don't like it
<ytti> then i would'nt do it
<bnagy> postfix is with two conditions is not great
<bnagy> sphex: no it's not
<bnagy> unless you wrote perl or C
<baweaver> that's your opinion
<sphex> bnagy: or javascript or php
<bnagy> if is well known
<baweaver> it is
lele is now known as Guest24
<damncabbage> ytti: But now you've created a variable that's nil (if it didn't already exist) if you don't match the "foo and bar" condition. D:
<baweaver> I've worked with production code bases which use it liberally at top companies
<baweaver> it's well known
yardenbar has joined #ruby
<sphex> although PHP messed up and made it left-associative IIRC?
* damncabbage winces
<damncabbage> peter help you if you nest them
<baweaver> I've written Perl and C though.
Pathfinder has joined #ruby
Volsus has joined #ruby
jaredrhine has joined #ruby
<baweaver> Now if you _nest_ ternaries, you should be slapped
<sphex> bnagy: it is hard to read though
workmad3 has quit [Ping timeout: 264 seconds]
<baweaver> a single one? I don't see an issue.
<Burgestrand> I agree, short ternaries are fine.
dfockler has quit [Ping timeout: 265 seconds]
<baweaver> If you have to linebreak, switch it
<baweaver> or factor out the conditional entirely.
<Ox0dea> Can we talk about chaining post-conditions?
<sphex> damncabbage: well you know.. there's that way you can lay out ternaries over multiple lines with the "?" and the ":" lined-up and it behaves like chained ifs.
<Burgestrand> But don't use them to make your code smaller or dense, which is the only reason I can see for nesting them, and even that reason is a bad one.
<bnagy> :|
<baweaver> Ox0dea might have something to say on that one :D
<Ox0dea> foo if a && b vs. foo if b if a.
DoubleMalt has joined #ruby
<bnagy> the best thing about ternaries in ruby is how ?a :a and : a in a ternary are all actually different
<bnagy> so much whitespace sensitivity! How great!
<Ox0dea> baweaver: I Muggled the anagram checker, by the way: https://gist.github.com/0x0dea/4178cbfe1729e989e564
<bnagy> we should give those tokens a third meaning to make it more fun
<Ox0dea> baweaver: Forgive me for presuming a concession of defeat.
<baweaver> More of a concession of getting distracted.
<damncabbage> bnagy: owww
<baweaver> I had it most of the way figured out
jaredrhine has quit [Client Quit]
<baweaver> then figured out that I could make Clairvoyant work and there was a Keep Ruby Weird CFP I wanted to put it up for.
mburns has quit [Quit: ZNC - http://znc.in]
<Ox0dea> That's fair, of course.
<sphex> bnagy: hehe with perl, "?" is also a prefix operator (another kind of regexp match). so that's fun.
j4cknewt has quit [Remote host closed the connection]
<Burgestrand> Huh, TIL you can use var::() as an alternative to var.call()
<baweaver> you can also var === args
<Burgestrand> Yeah, but that's a different method.
<baweaver> >> -> x { 1 + x } === 3
<ruboto> baweaver # => 4 (https://eval.in/393151)
<Ox0dea> Burgestrand: Where foo is a Proc, foo::(), foo.(), foo.call, foo[], and foo===() are all equivalent.
<Burgestrand> Indeed, but when foo is a variable, foo() won't work (it's not a method), but foo.call() and foo::() will.
<sevenseacat> dafuq at some of those
<baweaver> === mainly for case statements
<sevenseacat> I'd never seen the foo.() syntax before looking at elixir
<baweaver> case 'when' uses === for evaluation of conditionals, which is actually pretty dang handy
Rollabunna has joined #ruby
<Burgestrand> Ah, yes, foo.() as well.
* damncabbage cries
<Ox0dea> baweaver: Case equality is one of Ruby's best core ideas.
pengin has joined #ruby
<baweaver> >> Array === [1,2,3]
<ruboto> baweaver # => true (https://eval.in/393152)
<Ox0dea> >> /\w+/ === 'foo'
<ruboto> Ox0dea # => true (https://eval.in/393153)
<baweaver> of course using === explicitly is kinda wonky
<damncabbage> >> Array < Enumerable
<ruboto> damncabbage # => true (https://eval.in/393154)
<Ox0dea> Enumerable#grep uses #===, which makes it very expressive.
<Ox0dea> >> %[foo bar baz].grep(/b/)
<ruboto> Ox0dea # => undefined method `grep' for "foo bar baz":String (NoMethodError) ...check link for more (https://eval.in/393155)
<Ox0dea> >> %w[foo bar baz].grep(/b/)
<ruboto> Ox0dea # => ["bar", "baz"] (https://eval.in/393156)
jesterfraud is now known as jesterfraud_afk
war_pigs has quit [Quit: later... computer is sleeping]
<Ox0dea> >> [1, 'foo', 3.14, :bar, 2i].grep(Numeric)
<ruboto> Ox0dea # => [1, 3.14, (0+2i)] (https://eval.in/393157)
niemcu has joined #ruby
<sevenseacat> lol at 0+2i
<sevenseacat> clever shit
<sphex> this is interesting
Rollabunna has quit [Ping timeout: 248 seconds]
iateadonut has joined #ruby
KnownSyntax has quit [Remote host closed the connection]
Musashi007 has joined #ruby
yayfoxes has quit [Quit: WeeChat 1.2]
KnownSyntax has joined #ruby
hotpancakes has joined #ruby
<apeiros> >> 2/3r.class
<ruboto> apeiros # => Class can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/393158)
<sphex> I've been avoiding "smart matches" so far because I'm never sure what they do. I should read up on them. :/ good to know that it would explain grep too.
<apeiros> >> (2/3r).class
<ruboto> apeiros # => Rational (https://eval.in/393159)
matp has quit [Ping timeout: 246 seconds]
<baweaver> Knowing how === works is dang handy.
<apeiros> it's also essential when you want to use case/when
<baweaver> Ox0dea: Also, I ripped the entire Discourse spec library. Harvested description strings for describe / context / it blocks
<Ox0dea> baweaver: For NLP, then?
<baweaver> now for some natural language processing fun for patterns
<baweaver> indeed
<baweaver> See if there's enough recurrence to make a lexer for it
<baweaver> I'd guess there is from what I can see
<baweaver> Find distinct patterns, then shove them into a proper lexer / parser for that signature of sentence
<Ox0dea> There's quite a bit of uniformity in that area, but you'll still need to "be liberal in what you accept".
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> indeed
<baweaver> worst case it prompts for questions
mistermocha has joined #ruby
<baweaver> which I can call Cold Reading :P
t_ has quit [Ping timeout: 264 seconds]
<Burgestrand> Using case/when for testing class affiliation (which is often a bad idea in itself) has bitten me quite a few times, since the matching is performed with the when-part on the LHS, e.g. it uses String#===(object) instead of object#===(String).
GriffinHeart has quit [Remote host closed the connection]
<baweaver> because === is defined on a per class basis
andikr has joined #ruby
<baweaver> same with any other op
<Burgestrand> No, because case/when uses the when-expression as the LHS instead of the RHS.
pengin has quit [Remote host closed the connection]
<baweaver> of course
hotpancakes has quit [Ping timeout: 256 seconds]
mistermocha has quit [Read error: Connection reset by peer]
<baweaver> case x when val => x.===(val)
nfk has joined #ruby
<Ox0dea> Which makes perfect sense.
t_ has joined #ruby
<baweaver> assuming you know it does that
<Ox0dea> Right, but there's no more sensible alternative.
<baweaver> === is not an associative operator
<baweaver> (most of the time)
<Burgestrand> Assuming you have a method, which wants to test if its argument is a String (for some reason), you could do it by doing String === object, or object === String.
troulouliou_dev has joined #ruby
<Ox0dea> Burgestrand: The latter would require every single class that wanted to implement #=== to do all sorts of nasty argument checking.
mistermocha has joined #ruby
<baweaver> string === is equality
<Burgestrand> Ox0dea: the former also gives you no way of forcing your way around the comparison.
ndrei has joined #ruby
<baweaver> so is object
<baweaver> why?
ohaibbq has quit [Quit: Leaving...]
<Ox0dea> Yeah, I'm not seeing it. #=== is supposed to fill you with joy as soon as you discover how it works.
<Burgestrand> If you have an object that behaves like a string, and quacks like a string, you can't get it past the String===object check unless it IS a string.
<Ox0dea> >> class Foo < String; end; String === Foo.new
<ruboto> Ox0dea # => true (https://eval.in/393164)
<Burgestrand> That's a string.
<Ox0dea> It's a Foo.
<Burgestrand> It's a string.
* baweaver high fives Ox0dea
<Burgestrand> You are inheriting from a class you have no control over and it will bite you.
<baweaver> Then use a proc
<baweaver> otherwise you're being a bit lofty thinking Ruby can assume your object is stringy
<Ox0dea> We Prolog yet?
<Burgestrand> >> class Foo < String; end; p (Foo.new("wat") + "wot").class;
<ruboto> Burgestrand # => /tmp/execpad-ff9cc8be6374/source-ff9cc8be6374:2: Invalid char `\x1C' in expression (https://eval.in/393165)
<Burgestrand> Heh.
<Burgestrand> Darn ALT-space.
SOLDIERz has joined #ruby
<Ox0dea> That subclasses lose their identities so easily is unfortunate, but I don't think it's an argument against how #=== works.
<Burgestrand> No, I'm just arguing that using case/when to check for class confirmance is bad. e.g. case foo when String.
<Ox0dea> It'll work unless you're doing something wonky.
<baweaver> ^
mistermocha has quit [Ping timeout: 248 seconds]
<Burgestrand> You should use duck typing.
<baweaver> which gets back to what I said earlier, you're being a bit lofty thinking Ruby should respond like that
fabrice31 has joined #ruby
transiency has joined #ruby
<damncabbage> is this a roundabout way of saying that oo and inheritance is terrible or
<Burgestrand> And if you want to see if it's a string, you should test it with #is_a? or #kind_of?, since at least there's a way to work around that in case you want to send in an object that isn't a string but will behave the same.
Blaguvest has joined #ruby
solars has joined #ruby
t_ has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 252 seconds]
GriffinHeart has joined #ruby
<Burgestrand> As opposed to using case/when which will leave me with no other option than to rewrite your method just because it was coded badly.
<baweaver> Still not seeing this as an issue.
Timba-as has joined #ruby
<baweaver> you want ruby to guess because of bad code?
<Burgestrand> I guess you haven't encountered this.
workmad3 has joined #ruby
Volsus has quit [Quit: Leaving]
jesterfraud_afk is now known as jesterfraud
<Burgestrand> baweaver: I don't understand your question.
<baweaver> I avoid adding gems with annoying code
<Ox0dea> Burgestrand: I'm afraid you're speaking nonsense. By default, Foo === obj is *equivalent* to obj.is_a?(Foo).
<baweaver> indeed
<Burgestrand> Ox0dea: no, there is no way to override Foo == = obj.
<Burgestrand> Ox0dea: there is a way to override obj.is_a?(Foo).
<baweaver> ...it's a method
<Ox0dea> ...
<baweaver> yeah you can
<Ox0dea> Of course you can.
<Burgestrand> Sure, you can redefine String#===.
<Burgestrand> But are you seriously saying that's a good idea?
<baweaver> we're saying you're doing something off
ferr has quit [Quit: WeeChat 1.2]
<Burgestrand> Yeah, checking if something.is_a?(String) is seldom a good idea.
<Burgestrand> I just want this virus to end.
jaredrhine has joined #ruby
<ljarvis> seems fine to me
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
<Burgestrand> But if you absolutely must check if something is a String, instead of relying on duck typing, allow the coder to work around your check without monkey-patching String#===.
<Ox0dea> Yeah, it's a really elegant feature if you don't go out of your way to muck it up.
rdark has joined #ruby
solocsha1 has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
<baweaver> It kinda feels like you're saying your bike isn't working after you welded a plate to the chain
monod has joined #ruby
<baweaver> and now insist that it's the bike manufacturers problem
msgodf has joined #ruby
<baweaver> meanwhile we're all staring wondering how the devil you welded a plate to the chain, then shortly after why
ta has joined #ruby
<Burgestrand> baweaver: could you speak with proper terms instead of comparing apples to oranges?
<baweaver> then show us an example of this supposed monstrosity
wallerdev has quit [Quit: wallerdev]
<Burgestrand> Absolutely!
hotpancakes has joined #ruby
<sphex> thank god ruby doesn't automatically coerce values all over the place. this is the worse misfeature of so many OO languages...
<Burgestrand> Oh god no I don't want PHP.
<baweaver> javascript ==?
<Burgestrand> I'm not talking about automatic coercion.
<apeiros> you don't like how '5' + 1 == '51' and '5' - 1 == 4?
<Ox0dea> Ruby does do a few weird coercions, though. :/
* apeiros can't understand that… it seems to be such a nice feature</sarcasm>
bruno- has joined #ruby
<baweaver> that's one reason why ruby making operators methods is handy
<apeiros> Ox0dea: the only ones I don't like is nil.to_i == 0 and Integer(10, base) complaining - which ones do you dislike?
<sphex> apeiros: yeah.. and boolean coercions especially. and when everything just turns into a string whenever. :/
<Ox0dea> apeiros: I mostly had nil.to_i in mind as well, but String << Numeric is also a little weird.
<sphex> Ox0dea: oh really?
<Ox0dea> sphex: I mean, I love it and use it, but it's slightly surprising.
<apeiros> sphex: I don't think ruby does any boolean coercions? any example?
<Ox0dea> It also does behave the same for IO objects.
<Ox0dea> *doesn't
<apeiros> ah. I see. I don't think I've ever used String#<<(Int)
<sphex> Burgestrand: ok yeah sorry I wasn't really following. I get that "to_s" should be used in many cases.
<Ox0dea> apeiros: It's handy for shoveling Unicode characters without getting yelled at about encodings.
<Ox0dea> Bit of an outdated problem, of course.
<apeiros> seems I never had the need for that :)
hotpancakes has quit [Remote host closed the connection]
jaredrhine has quit [Quit: No Ping reply in 180 seconds.]
devbug has joined #ruby
<Ox0dea> Burgestrand: That monstrosity you promised?
devbug has quit [Remote host closed the connection]
<Burgestrand> Ox0dea: soon!
<Ox0dea> All right, then. I figured you had it to hand.
bruno- has quit [Ping timeout: 255 seconds]
mesamoo has quit [Ping timeout: 276 seconds]
<Burgestrand> Ox0dea: I've done my best to forcefully forget I ever encountered them.
mesamoo has joined #ruby
<apeiros> ah, right, and I don't like the autosplatting. I don't see the reason for it either. I mean it's not like adding a "*" would be so much effort…
<baweaver> Ox0dea: you like monstrosities
<Ox0dea> I love them.
<Ox0dea> apeiros: Like for puts, you mean?
jaredrhine has joined #ruby
<apeiros> no, I mean `a, b = array`
<apeiros> it's not difficult to be explicit: `a, b = *array`
codecop has joined #ruby
<Ox0dea> But destructuring is a great thing!
<Ox0dea> I think Ruby needs more of it.
<apeiros> not the same :)
<Ox0dea> Isn't it?
ndrei has joined #ruby
<apeiros> no
<apeiros> destructuring is explicit too
devbug_ has quit [Ping timeout: 250 seconds]
<apeiros> you have to put the parens where you want to destructure.
<baweaver> >> head, *tail = [1,2,3,4,5]; tail
<ruboto> baweaver # => [2, 3, 4, 5] (https://eval.in/393182)
<baweaver> <3
<Ox0dea> I think that's the better way to be explicit about it, but it's still noise to me. :)
<apeiros> but honestly, I've even forgotten where it creates situation which can't be done. been working around it for so long…
hotpancakes has joined #ruby
bigkevmcd has joined #ruby
<Ox0dea> apeiros: Are there really such situations?
<apeiros> yepp
<baweaver> apeiros: I've seen them too
yh has joined #ruby
<baweaver> Have to find them again
<baweaver> Ah
<baweaver> that was what it was
<baweaver> Rails Hash#slice
<Burgestrand> Ox0dea: http://pastie.org/private/mpyswyka7rycgwkoeg0ma — something like this, a bit contrived, but I've actually ran into gem library code that does line #25-#32.
<baweaver> {a: 1, b: 2}.slice([:a, :b]) will return jack
<Burgestrand> baweaver: ^
mesamoo has quit [Ping timeout: 256 seconds]
<Ox0dea> baweaver: As expected, no?
<baweaver> I'd think it'd auto splat
<Burgestrand> Ox0dea: which of the three read_file would you prefer?
k3asd` has joined #ruby
<baweaver> class FakeIO; def ===(other) is_a?(other) end end
<baweaver> ?
fantazo has joined #ruby
khebbie has joined #ruby
<Burgestrand> baweaver: to alleviate which method?
<Burgestrand> baweaver: read_file?
<apeiros> baweaver: ah, that's not actually one of my cases
eGGsha has joined #ruby
<baweaver> but an annoying one to be wary of
<baweaver> caused me all types of headaches before.
<baweaver> speaking of which, I should make a PR on that one....
<baweaver> Burgestrand: yeah
eGGsha has joined #ruby
<Burgestrand> baweaver: it won't work.
<Ox0dea> apeiros: You meant that there are times when you can't pluck out exactly which elements you want from an arbitrarily nested array in a single parallel assignment?
<Burgestrand> baweaver: the output will be the same.
ndrei has quit [Ping timeout: 276 seconds]
ljt has joined #ruby
pandaant has joined #ruby
<apeiros> Ox0dea: my memory is really vague on it :(
<Ox0dea> Fair enough, but I'd be interested to see where the semantics break down.
hotpancakes has quit [Remote host closed the connection]
<sphex> doesn't lack of "real" multiple return values support bother anyone? for symmetry! functions should both accept and return multiple values. and ([1, 2, 3]) should be distinguishable from (1, 2, 3) in both cases.
<Burgestrand> I don't know any good way of getting FakeIO to work with #read_file without monkey patching either IO or StringIO.
<Burgestrand> (or rewriting #read_file)
damncabbage has left #ruby [#ruby]
<baweaver> inherit from IO or StringIO, and === will work
<ljarvis> ^
<baweaver> anyways, I need to get to bed.
hotpancakes has joined #ruby
<Burgestrand> Inheriting from IO or StringIO leaves you open to a big chunk of nice bugs from the core classes not expecting to be inherited from.
<Burgestrand> Rails had quite many troubles from inheriting from Hash back in the day.
<Burgestrand> Not to mention it's not always an option if you already have a superclass.
fantazo has quit [Ping timeout: 252 seconds]
jaredrhine has quit [Quit: No Ping reply in 180 seconds.]
white_bear has joined #ruby
d0lph1n98 has quit [Quit: leaving]
<adaedra> Hello
<Burgestrand> (e.g. it's an ActiveRecord model)
<Burgestrand> Hi!
hotpancakes has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
chinmay_dd has quit [Ping timeout: 255 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
jaredrhine has joined #ruby
bayed has joined #ruby
baweaver has quit [Remote host closed the connection]
<shevy> sphex never bothered me much at all; I usually use an Array and that was that really. Is there a real advantage that multiple values have versus arrays?
kp666 has joined #ruby
frekoya_ has joined #ruby
gagrio has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<sphex> shevy: similar advantage to not having to pass an array to each function that takes more than one argument
wldcordeiro has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
Scroff has joined #ruby
olistik has joined #ruby
jaredrhine has quit [Quit: No Ping reply in 180 seconds.]
<Ox0dea> sphex: Why isn't splatting the solution?
<sphex> shevy: and when returning an array, the caller as to expect it and destructure it. the "extra" return values cannot be ignored. in lisp, it is common to return multiple values with the expectation that most caller will only ever use (or even know about) the first one. but this is arguably less "symmetrical".
<Ox0dea> sphex: Ruby lets us ignore values just fine.
livathinos has joined #ruby
bhuvanaurora has quit [Ping timeout: 276 seconds]
bhuvan_aurora has quit [Ping timeout: 264 seconds]
<sphex> Ox0dea: but you have to explicitly do so right?
choke has joined #ruby
jaredrhine has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
<shevy> yeah
<shevy> *array
mburns has joined #ruby
<sphex> a function can be extended to have more arguments will still supporting older callers. but, IIUC, not so when switching from returning just one value to returning multiple ones.
<sphex> *while
jeanlinux has joined #ruby
<Ox0dea> sphex: foo, _ = *bar will put the "first" returned value in foo, even if bar returns a non-array.
hotpancakes has joined #ruby
jeanlinux has quit [Read error: Connection reset by peer]
<Ox0dea> All of the pieces are in place to make argument passing and reception behave however you need it to.
oo_ has quit [Remote host closed the connection]
marr has joined #ruby
fantazo has joined #ruby
<sphex> Ox0dea: yeah, but each callers have to do that. and they cannot do it in all cases; a function that returns just one value must not be destructured like that.
<Ox0dea> sphex: Try it.
elia has joined #ruby
bubbys has joined #ruby
Scroff has quit [Ping timeout: 250 seconds]
yh has quit [Ping timeout: 252 seconds]
wldcordeiro has quit [Remote host closed the connection]
<shevy> I really don't understand the problem, if it returns an array, you can check for that anyway and just apply [0] or .first?
lee-jon has joined #ruby
lee-jon has left #ruby [#ruby]
ferr has joined #ruby
EU826012240 has joined #ruby
j4cknewt has joined #ruby
oo_ has joined #ruby
EU826012240 has quit [Client Quit]
Scroff has joined #ruby
TheHodge has joined #ruby
tlolczyk has quit [Ping timeout: 256 seconds]
<sphex> well.. it's not a problem, it's just a different way of doing it. the advantage it has is mostly that you can have optional return values (just like you can have optional arguments). and the callers do not have to be coded specially to handle it, and there's no risk of an array value being mistakenly destructured (because multiple return values are different from returning an array, (just like for arguments)).
gix has quit [Ping timeout: 276 seconds]
MisterRusty has joined #ruby
christiandsg has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
dumdedum has joined #ruby
iamninja has joined #ruby
hotpancakes has quit [Remote host closed the connection]
ht__ has joined #ruby
transiency has quit [Ping timeout: 252 seconds]
einarj has joined #ruby
f3lp has quit [Ping timeout: 252 seconds]
<sphex> I think lisp handled that really well. perl bastardized it a bit. then scheme generally made returning an unexpected amount of values an error; and thus much less useful.
senayar has quit [Remote host closed the connection]
elia_ has joined #ruby
Scrofff has joined #ruby
mistermocha has joined #ruby
<Ox0dea> sphex: Why do you say Lisp supports returning multiple values?
christiandsg has quit [Ping timeout: 265 seconds]
bluOxigen has joined #ruby
<sphex> well, CL
<Ox0dea> In most Lisps, you return a list of multiple values, and then there's some mechanism for extracting its elements. That's exactly what we have in Ruby, is it not?
<adaedra> Tuples?
<adaedra> (for Lisp)
einarj has quit []
cb_ has quit [Remote host closed the connection]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scroff has quit [Ping timeout: 246 seconds]
eGGsha has joined #ruby
<Ox0dea> sphex: Given `def foo; return 1, 2; end`, you'd want `bar = foo` to be 1?
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
elia has quit [Ping timeout: 256 seconds]
bhuvanaurora has joined #ruby
monod has quit [Remote host closed the connection]
bhuvan_aurora has joined #ruby
<sphex> no, returning multiple values is done using the (values) form
<sphex> the semantics are a bit different
<sphex> it all has to do with what happens when the caller expects or does not expect multiple values
Scroff has joined #ruby
mistermocha has quit [Ping timeout: 248 seconds]
<Ox0dea> You end up doing some form of destructuring regardless, so I'm afraid the crucial difference is lost on me.
Scrofff has quit [Ping timeout: 250 seconds]
<sphex> in scheme, they say the continuation of a function call (which can also be represented as a function) can take a variable amount of arguments. the (values 1 2 3) form calls its continuation with these arguments (which will be the return values of the function if this is a tail call).
eGGsha has quit [Ping timeout: 248 seconds]
cb_ has quit [Ping timeout: 265 seconds]
<sphex> Ox0dea: but if the caller does not expect multiple return values, then the "destructuring" is automatic and it only gets the first value. this is similar to how "optional" arguments of a function work.
eGGsha has joined #ruby
<Ox0dea> sphex: Then the example I gave above is in fact how you'd like Ruby to do it?
<sphex> Ox0dea: yeah.. but automatically. and for that, it would have to know if a function intended to return multiple values, or was merely returning an array.
fantazo has quit [Ping timeout: 250 seconds]
* Eising stares into 230 lines of incomprehensible, and non-working code
<Eising> code of the kind that "used to work"
<Ox0dea> Eising: Did you recently gem up?
<sphex> if functions always returned arrays to represent their return values, then it could be done unambiguously. and it would be more similar to how arguments are handled.
yh has joined #ruby
<Eising> Ox0dea: not at all
ruurd has joined #ruby
<Ox0dea> Eising: The bit rot is real!
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Eising> Ox0dea: but since it's handling external data, it might be that the format of that could have changed just ever so slightly
<sphex> I must sound pedantic as s**t. there's a small difference dammit. it's important. it's slightly better.
<Ox0dea> sphex: It's "better" if you don't perceive it as bad API design.
<ljarvis> maybe we should just inherit tuples and pattern matching
<Ox0dea> We have gimped versions of both. :/
<ljarvis> yep :D
frekoya_ has left #ruby ["Textual IRC Client: www.textualapp.com"]
freemahn has joined #ruby
djbkd has joined #ruby
Scrofff has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
varunwachaspati has joined #ruby
<sphex> Ox0dea: not any worse than optional arguments (which are plenty useful, and so are optional return values (if the callers do not have to explicitly expect them))
<Ox0dea> sphex: Yes, that last bit is the crux of my opposition.
granthatcher has joined #ruby
yh has quit [Ping timeout: 276 seconds]
hotpancakes has joined #ruby
doertedev has joined #ruby
<sphex> IIRC, in ML they decided to make things symmetrical by allowing only one argument too. both multiple arguments and return values need to be explicitly destructured. sounds nice, but it makes optional arguments/return values a problem.
Scroff has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Ping timeout: 256 seconds]
<sphex> I guess if ruby supported MRV (mulpliple retrnvlal..ues) it could look like this `def f; values 1, 2, 3; end`. and then called like that: `a = f # a=1` or `a, b = f # a=1, b=2`. it would be just like lisp then. the key point is that it always happens, no need to explicitly destructure when just one value is expected.
<Ox0dea> One of the most practical use cases for multiple return values is being able to signal errors, which really ought to be ignored explicitly if at all.
frem has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
viki_ has joined #ruby
Rickmasta has joined #ruby
fabrice31 has joined #ruby
<sphex> oh yeah. good point for errors. another use is to yield an extra "detail" value. possibly best solved with OO features. but then one could argue the same for multiple arguments too.
<tbuehlmann> >> def f(hash = {}, foo: nil); end; f(please_dont_raise: ':(')
<ruboto> tbuehlmann # => unknown keyword: please_dont_raise (ArgumentError) ...check link for more (https://eval.in/393243)
<tbuehlmann> :(
ljt has quit [Read error: Connection reset by peer]
dgutierrez1287 has joined #ruby
<adaedra> >> def f(foo: nil, hash = {}); end; f(please_dont_raise: ':(')
<ruboto> adaedra # => /tmp/execpad-b09b0a224f70/source-b09b0a224f70:2: syntax error, unexpected tIDENTIFIER ...check link for more (https://eval.in/393244)
<shevy> tbuehlmann for some strange reason, I read your nick as "Wühlmaus"
thumpba has joined #ruby
<ljarvis> :/
<Ox0dea> >> class Foo; %w[+@ -@ ! ~].each { |m| alias_method m, :itself } end; ~+-~-!!+~!-++Foo.new
<ruboto> Ox0dea # => #<Foo:0x41223c9c> (https://eval.in/393245)
cookiez has joined #ruby
t_ has joined #ruby
<Ox0dea> Fun fact: There's a bug in the parser that prevents you using !~ as a unary combination.
anisha has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgutierrez1287 has quit [Ping timeout: 264 seconds]
thumpba has quit [Client Quit]
Rollabunna has joined #ruby
_blizzy_ has joined #ruby
maasha has joined #ruby
eGGsha has joined #ruby
<tbuehlmann> looks like I can't have a default value for that parameter then *shrug*
dellavg has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<adaedra> { foo: nil }.merge hash
<maasha> I am running mpiexec from a ruby script using a system call. Unfortunately the system call returns successfully before the actually mpi execution is complete. How to properly wait for that?
eGGsha has quit [Client Quit]
iwishiwerearobot has joined #ruby
<tbuehlmann> or not using keyword arguments here and a positional parameter instead
dellavg has joined #ruby
chinmay_dd has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<Ox0dea> maasha: Doesn't that defeat the point of running in parallel?
Rollabunna has quit [Ping timeout: 248 seconds]
<maasha> Ox0dea: the ruby script should not continue until the mpiexec is done
varunwachaspati has quit [Remote host closed the connection]
krz has joined #ruby
bhuvan_aurora has quit [Ping timeout: 252 seconds]
bhuvanaurora has quit [Ping timeout: 252 seconds]
t_ has quit [Ping timeout: 276 seconds]
varunwachaspati has joined #ruby
eGGsha has joined #ruby
<Ox0dea> maasha: I'm not familiar with mpiexec specifically, but waiting on something whose raison d'être is asynchronicity seems counter-productive at best.
<Ox0dea> Well, no, I suppose you're using mpiexec for the free speed boost rather than its parallelism.
aryaching has quit [Ping timeout: 256 seconds]
t_ has joined #ruby
<Ox0dea> It almost certainly forks into a bunch of separate processes, so you'll need to get all those PIDs and wait for them to die.
<Ox0dea> Nothing clean immediately springs to mind.
<shevy> The Oracle is pondering the situation at hand.
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Blaguvest has quit [Ping timeout: 244 seconds]
varunwachaspati has quit [Remote host closed the connection]
aryaching has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
varunwachaspati has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
GriffinHeart has quit [Remote host closed the connection]
arup_r has joined #ruby
senayar has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bhuvan_aurora has joined #ruby
djbkd has quit [Remote host closed the connection]
yh has joined #ruby
Musashi007 has joined #ruby
sevenseacat has joined #ruby
ndrei has joined #ruby
workmad3 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has quit [Client Quit]
haraoka has joined #ruby
<maasha> Ox0dea: so I am running a 1 core ruby script here that starts a mpi job on some thousand cores. When that job is done the ruby script should continue.
<maasha> Ox0dea: yes, I can't seem to find a clean solution either
bhuvanaurora has joined #ruby
<Ox0dea> maasha: Right, the problem is that mpiexec spawns a bunch of processes and then terminates, so you won't be able to determine when to continue based on mpiexec's termination.
lkba_ has quit [Ping timeout: 255 seconds]
<Ox0dea> You'll need to round up all the processes it spawns and continue only once they've all died.
<Ox0dea> I don't believe Ruby provides any "magic" for doing this cleanly.
<maasha> Ox0dea: exactly. So how to do this?
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<maasha> Ox0dea: or maybe mpi have some magic.
<Ox0dea> It might.
workmad3 has quit [Ping timeout: 246 seconds]
granthatcher has quit []
<yorickpeterse> morning
senayar has joined #ruby
<adaedra> hi yorickpeterse
elia has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
elia_ has quit [Ping timeout: 276 seconds]
davedev24_ has joined #ruby
blueOxigen has joined #ruby
olistik has quit [Ping timeout: 250 seconds]
bluOxigen has quit [Ping timeout: 264 seconds]
mistermocha has joined #ruby
iwishiwerearobot has quit [Quit: Be back later ...]
tkuchiki has quit [Remote host closed the connection]
solocsha1 has joined #ruby
Pathfinder has quit [Remote host closed the connection]
platzhirsch has joined #ruby
platzhirsch has quit [Client Quit]
davedev2_ has joined #ruby
eGGsha has joined #ruby
workmad3 has joined #ruby
platzhirsch has joined #ruby
hotpancakes has quit [Ping timeout: 252 seconds]
<Ox0dea> maasha: Do you know how to look at the list of running processes?
<maasha> grmruu#%&!mph!!!! s/supercomputer/super stupid computer/
haraoka has quit [Ping timeout: 246 seconds]
sbhatore has joined #ruby
<Ox0dea> Yep, that should do it.
<maasha> "Computer: Kill Flanders"
<maasha> I mean - how hard can it be?
sbhatore is now known as jaimessi
mistermocha has quit [Ping timeout: 264 seconds]
solocsha1 has quit [Ping timeout: 255 seconds]
<Ox0dea> Well, mpiexec has an option for printing its PID, which wouldn't make sense if it's terminating immediately, so it must be the case that it's simply signalling that it has terminated without actually having done so. You should be able to run it, then query the process table and wait for its PID to no longer be in there.
davedev24_ has quit [Ping timeout: 248 seconds]
CatMartyn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<maasha> Ox0dea: process table on which nodes ?
<maasha> :o)
<Ox0dea> maasha: The process table on your local machine.
chinmay_dd has quit [Read error: Connection reset by peer]
<maasha> Ox0dea: hm, right.
chinmay_dd has joined #ruby
<maasha> -report-pid looks like it
olistik has joined #ruby
lkba has joined #ruby
Spami has joined #ruby
<Ox0dea> maasha: pid = `mpiexec -report-pid - ...`; while sleep 1; break if `ps ax -opid=-`.lines.include?(pid); end
<Ox0dea> Something along those lines.
iwishiwerearobot has joined #ruby
<Ox0dea> Adjust the sleep interval and ps flags as necessary.
tkuchiki has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<maasha> Ox0dea: yup, I am working on it.
olistik has quit [Ping timeout: 244 seconds]
platzhirsch has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
<Ox0dea> maasha: If you know you'll only have one instance of mpiexec running at any one time, you could probably get away with doing `break if system('pgrep mpiexec')`.
bhuvanaurora has quit [Ping timeout: 246 seconds]
bhuvan_aurora has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Remote host closed the connection]
<maasha> Ox0dea: Unfortunately, these supercomputers are shared :o(
<Ox0dea> maasha: Right, but the actual mpiexec process is being run locally, no?
<maasha> Ox0dea: it is run from the login node.
<Ox0dea> Ah, that certainly complicates things.
<Ox0dea> Still, checking for the PID of your mpiexec in the process table should do.
<maasha> Ox0dea: yes
jfarmer has quit []
Rollabunna has joined #ruby
hectortrope has joined #ruby
aryaching_ has joined #ruby
Scrofff has quit [Remote host closed the connection]
Scroff has joined #ruby
Scroff has quit [Remote host closed the connection]
Scroff has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
<bnagy> .. wait how are you starting mpiexec?
<bnagy> are you sure you're not just failing to wait on it?
<bnagy> the manpage suggests it shouldn't exit until all the processes it spawned have exited
Scroff has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 248 seconds]
Scroff has joined #ruby
Scroff has quit [Remote host closed the connection]
blackmesa has joined #ruby
Scroff has joined #ruby
oo_ has quit [Remote host closed the connection]
dellavg has quit [Remote host closed the connection]
bhuvan_aurora has joined #ruby
dellavg has joined #ruby
bhuvanaurora has joined #ruby
alex88 has joined #ruby
<Ox0dea> bnagy: They said they're shelling out and seeing immediate continuation of the Ruby script.
olistik has joined #ruby
Scroff has quit [Remote host closed the connection]
Scroff has joined #ruby
inukshuk has quit [Quit: Lost terminal]
parabolize has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
khebbie has joined #ruby
<bnagy> but there are about 8 ways to shell out
oo_ has joined #ruby
inukshuk has joined #ruby
oo_ has quit [Remote host closed the connection]
<Ox0dea> bnagy: They specifically mentioned using system().
<Ox0dea> Which waits.
arturmartins has joined #ruby
<bnagy> it does. But it's worth double checking, because that doesn't make sense.
zz_Outlastsheep is now known as Outlastsheep
danielglh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
catphish has joined #ruby
<catphish> is there any way i could get sysconf variables in ruby 1.9.3?
<Ox0dea> catphish: RbConfig is bound to have them.
<catphish> Etc has them in 2.0
oo_ has joined #ruby
christiandsg has joined #ruby
<Ox0dea> catphish: Looks like you might need to use Fiddle/FFI. :(
<catphish> actually... my reason for using ruby 1.9.3 is misplaced
<catphish> ubuntu support 2.0 as well
<ddv> 1.9.3 is EOL don't use it
<catphish> ddv: not helpful
<ddv> catphish: truth hurt doesn't it
<ddv> hurts*
<catphish> ddv: unfortunately, the ruby developers deciding a release is EOL doesn't mean it's not the supported version of supported distros
<catphish> as per my comment above, luckily ubuntu LTS also supports 2.0
williamherry has quit [Ping timeout: 248 seconds]
<catphish> i hope this will be true of other distros too
<Ox0dea> Ubuntu should be EOL'd. :)
<catphish> sysconf isn't supported in 2.0.0 either :(
<catphish> so that's no further forward
<catphish> Ox0dea: i can probably do it with ffi, but that adds a ton of dependencies for what is essentially just fetching a constant :(
ixti has quit [Ping timeout: 264 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
christiandsg has quit [Ping timeout: 265 seconds]
<bnagy> catphish: `getconf -a`.lines.map(&:split).reject {|a| a.size !=2}.to_h
<catphish> bnagy: yes, that solves my problem entirely, thank you!
<bnagy> to_h is maybe not 1.9
<bnagy> Hash[] if not
DexterLB has quit [Ping timeout: 252 seconds]
<catphish> .to_h doesn't seem to be in 2.0.0 either but the solution is perfect :)
ixti has joined #ruby
DexterLB has joined #ruby
stamina has joined #ruby
<Ox0dea> #to_h is 2.1.
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<catphish> thanks bnagy"
<catphish> !
duncannz has quit [Ping timeout: 276 seconds]
bronson has quit [Remote host closed the connection]
lotherk_ is now known as lotherk
lotherk has quit [Quit: leaving]
sdothum has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
lotherk has joined #ruby
[k- has joined #ruby
bruno- has joined #ruby
multi_io has quit [Ping timeout: 276 seconds]
multi_io has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
eGGsha has joined #ruby
pandaant has quit [Remote host closed the connection]
bluOxigen has joined #ruby
denver has joined #ruby
Rickmasta has joined #ruby
blueOxigen has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 256 seconds]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
jbw_ has quit [Ping timeout: 246 seconds]
stamina has quit [Quit: WeeChat 1.2]
howdoicomputer has quit [Ping timeout: 265 seconds]
serivich has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
williamherry has joined #ruby
SOLDIERz has quit [Quit: Textual IRC Client: www.textualapp.com]
FastJack has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
blackmes1 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
jbw_ has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
senayar has quit [Remote host closed the connection]
j4cknewt has joined #ruby
fabrice31 has quit [Ping timeout: 276 seconds]
freemahn has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 246 seconds]
alienaut has joined #ruby
fella5s has joined #ruby
j4cknewt has quit [Ping timeout: 246 seconds]
<arup_r> Hi All
<arup_r> how are you guys?
<adaedra> hi
<arup_r> adaedra: 0/
matp has joined #ruby
<[k-> you should use a small o >.<
<adaedra> \ø
<arup_r> [k-: But my head in Big oval shape :/
<arup_r> *is
<sphex> *gasps* he said "guys"
<arup_r> hehe
<sevenseacat> ?guys arup_r
<ruboto> arup_r, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<arup_r> you listed event this stuff also
<arup_r> omg!
<[k-> ?omg
<ruboto> I don't know anything about omg
ndrei has quit [Ping timeout: 265 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r> ruboto: you shouldn't know everything!
<arup_r> :p
lessless has joined #ruby
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<[k-> ?xy
arup_r has quit [Remote host closed the connection]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_whitelogger_ has quit [Ping timeout: 252 seconds]
_whitelogger_ has joined #ruby
dhjondoh1 has joined #ruby
blackmes1 has quit [Ping timeout: 256 seconds]
jaimessi has joined #ruby
serivichi has joined #ruby
elektronaut has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
drPoggs has joined #ruby
dhjondoh has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
<shevy> This is how a meow sounds from the Oracle.
<Ox0dea> You have cat to be kitten me right meow.
<adaedra> ...
<[k-> The most elegant way to switch keys and values would be hash#invert
<Outlastsheep> I think we just crossed the fe-line.
<adaedra> #ruby-puns
aryaching_ has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
<[k-> pls
<shevy> [k- are you reading ruby docu again
<Ox0dea> [k-: Hash#invert is very nice.
<[k-> is that a bad way to learn
<yh> Ox0dea: neat. Don't think I've had to do that before.
<Ox0dea> yh: Which is that?
<Ox0dea> shevy: You didn't know about Hash#invert?
<yh> Ox0dea: the thing you just mentioned
<yh> Hash#invert
<[k-> to be fair, I didn't too
<shevy> I know everything
<[k-> lies, shevy!
<adaedra> except Hash#invert
<[k-> we all saw you make a grave mistake in front of #ruby!
<shevy> I have it well covered in beautiful german words
<[k-> *misconception
<adaedra> »scheiße«
<shevy> hehe
jaygen_ has joined #ruby
<Ox0dea> I vividly remember the first time I used Hash#invert.
mesamoo has joined #ruby
<Ox0dea> It was a super-clean way to implement jumps in both directions for my brainfuck interpreter.
<[k-> The Oracle is reminiscing the past!
dhjondoh has joined #ruby
<Ox0dea> Ah, it seems like thirty years ago. :/
<yh> Time dilation is a beautiful thing in this finite experience of life
ndrei has quit [Ping timeout: 250 seconds]
jaygen has quit [Ping timeout: 248 seconds]
<[k-> The Oracle has endured life for long, no longer is time important a detail.
bruno- has joined #ruby
<shevy> damn it
arup_r has joined #ruby
dgutierrez1287 has joined #ruby
<shevy> there are baby oracles here now
dhjondoh1 has quit [Ping timeout: 252 seconds]
c355E3B has joined #ruby
<shevy> #ruby is beginning to scare me :\
<adaedra> boo.
<adaedra> 3spooky5u
<shevy> [k- on a happy note, I am at about 90% finished of the rewrite I started 5 days ago! \o/
<[k-> I am happy about the refactoring of my code!
<[k-> do you want to see it shevy?
joonty has joined #ruby
bronson has joined #ruby
icosa1 has quit [Read error: Connection reset by peer]
<shevy> ack
<shevy> is that the code that is unreadable?
<shevy> where even the Oracle's code became more readable
arup_r_ has joined #ruby
Timba-as has joined #ruby
<shevy> p begin%/:(/ * %<$>.ordend.chars.tap { |a| a.map! do |h| h.sub %&(&,%=( = end}.join
<shevy> yes
Tarkers34|2 has quit [Ping timeout: 246 seconds]
<[k-> since mine had letters I had to do something to make them less readable
dgutierrez1287 has quit [Ping timeout: 244 seconds]
tkuchiki has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<Ox0dea> [k-: Why not try non-alphanumeric programming? ;)
<[k-> APL?
<Ox0dea> Ruby?
<[k-> brainfuck?
<Ox0dea> Whitespace?
jaimessi has quit [Read error: Connection reset by peer]
<[k-> I can't do your $$/$$ = 1 madness
<Ox0dea> I think you could.
<shevy> >> $$/$$
<ruboto> shevy # => 1 (https://eval.in/393313)
<Ox0dea> We should see who can get to N in the fewest non-alphanumeric characters. ^_^
<shevy> ok
<shevy> N to Infinity
arup_r has quit [Ping timeout: 246 seconds]
<Ox0dea> Bit easy, that.
bronson has quit [Ping timeout: 252 seconds]
Rickmasta has joined #ruby
jaimessi has joined #ruby
<[k-> >> $$/$$.to_f
<ruboto> [k- # => 1.0 (https://eval.in/393318)
<[k-> oh
<Ox0dea> [k-: Come on, guy.
Papierkorb has joined #ruby
<shevy> :?
MagePsycho has joined #ruby
kirun has joined #ruby
<MagePsycho> how to install rvm in ubuntu 12.04? i tried so many ways but not working for me :(
<[k-> ''=~/^/
<MagePsycho> ruby --version
<MagePsycho> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
<MagePsycho> ruby says above
<apeiros> and what does `rvm -v` say?
<ytti> i refuse to code under 1.9.3
<MagePsycho> i want to install rvm first then ruby 1.9.3 so that i can run mechanize gem
<ytti> and i'm thinking of upping that to 2.0.0.0
arup_r has joined #ruby
<ytti> 2.0.0
<MagePsycho> rvm -v
<MagePsycho> The program 'rvm' is currently not installed. You can install it by typing:
<MagePsycho> sudo apt-get install ruby-rvm
<apeiros> ytti: I only work with ruby <2.2.2 at work
<apeiros> and even there we have most things on 2.2 by now.
<ytti> apeiros, 1.8.7 is <2.2.2? :>
<apeiros> yes
<[k-> monster!
<ytti> apeiros, so 1.8.7 is ok to work?
<apeiros> we have one app on 1.8.6
<ytti> oy vey
<apeiros> luckily we don't touch that one
<apeiros> another one is on 1.9.3, not being touched either, but that one is scheduled for 2.2 (or 2.3) on next touch.
<[k-> >> $$/$$/(''~=/^/).to_f
<ruboto> [k- # => /tmp/execpad-4bd1f2051c12/source-4bd1f2051c12:2: syntax error, unexpected '~', expecting ')' ...check link for more (https://eval.in/393321)
<apeiros> and the ruby upgrade won't be the issue. the rails part will cause more pain.
<MagePsycho> how to install rvm?
<apeiros> MagePsycho: https://rvm.io
Guest24 is now known as lele
<apeiros> that line which says "install rvm"
<[k-> I got infinity!
iwishiwerearobot has quit [Quit: >:(]
<Ox0dea> [k-: You're using letters...
arup_r_ has quit [Ping timeout: 252 seconds]
<[k-> I don't have any tricks to coerce ints to floats up my sleeve :(
<apeiros> good thing I don't have enough free time to waste it on this craziness :D
<Ox0dea> [k-: Square root. :)
<MagePsycho> \curl -sSL https://get.rvm.io | bash -s stable --> not working
<MagePsycho> curl: (23) Failed writing body (0 != 860)
<MagePsycho> Could not download 'https://github.com/rvm/rvm/archive/1.26.11.tar.gz'.
<MagePsycho> curl returned status '23'.
<MagePsycho> curl: (23) Failed writing body (0 != 15926)
<MagePsycho> Could not download 'https://bitbucket.org/mpapis/rvm/get/1.26.11.tar.gz'.
<apeiros> MagePsycho: dude
<MagePsycho> curl returned status '23'.
Xeago has joined #ruby
<Ox0dea> What a guy.
<apeiros> MagePsycho: use paste service. don't spam the channel.
solocsha1 has joined #ruby
<Ox0dea> [k-: Shall I reveal the trick?
<MagePsycho> should i use sudo bash . instead of bash?
<apeiros> MagePsycho: sounds like you have a problem with your infrastructure.
ixti has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
<apeiros> MagePsycho: no. you fail to download the data. sudo won't help with that.
<MagePsycho> apeiros, what can be the problem in your opinion?
<MagePsycho> if i download directly https://github.com/rvm/rvm/archive/1.26.11.tar.gz . .it opens
<apeiros> missing proxies. not enough free space. improper access rights to wherever curl should write the download…
<apeiros> I'd ask in #rvm
fantazo has joined #ruby
<MagePsycho> #rvm not working
<apeiros> SERIOUSLY
<Burgestrand> :)
<apeiros> not working is a pointless remark
<MagePsycho> \curl -sSL https://get.rvm.io | sudo bash -s stable --> seems downloading
<MagePsycho> lets see how it goes
<MagePsycho> i added sudo bash
<apeiros> you're not even in #rvm
<[k-> wait wait Ox0dea
<MagePsycho> apeiros, i mean unable to join-> /join #rvm
diegoviola has joined #ruby
solocsha1 has quit [Ping timeout: 255 seconds]
<MagePsycho> whats next? to load rvm in shell session
<Ox0dea> [k-: I should be quite pleased to see you make Infinity from "nothing".
<Ox0dea> You got this.
<apeiros> ?register MagePsycho
<ruboto> MagePsycho, you need to be identified with NickServ, see /msg NickServ HELP
<apeiros> so next thing is you register, then join #rvm
chinmay_dd has quit [Ping timeout: 255 seconds]
Tarkers34|2 has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Outlastsheep is now known as zz_Outlastsheep
Rollabunna has joined #ruby
jhass has quit [Quit: Bye]
jhass has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
withnale_ has joined #ruby
<MagePsycho> type rvm | head -n 1 --> rvm is function
<MagePsycho> rvm 1.26.11 (latest) by Wayne E. Seguin
<MagePsycho> so i guess rvm is installed
but3k4 has joined #ruby
<MagePsycho> now how to install ruby
s00pcan has joined #ruby
<MagePsycho> rvm install ruby
Rollabunna has quit [Ping timeout: 248 seconds]
lennae has joined #ruby
Alina-malina has quit [Ping timeout: 246 seconds]
Scrofff has joined #ruby
serivichi has quit [Ping timeout: 276 seconds]
eGGsha has joined #ruby
varunwachaspati has quit [Remote host closed the connection]
Scroff has quit [Ping timeout: 244 seconds]
<sevenseacat> MagePsycho: are you following some documentation or guide?
r_rios has joined #ruby
ldnunes has joined #ruby
thebastl has joined #ruby
oo_ has quit [Remote host closed the connection]
willhumphreys has joined #ruby
tkuchiki has joined #ruby
<[k-> I GOT IT!
senayar has joined #ruby
danielglh has joined #ruby
<Ox0dea> [k-: Woohoo! ^_^
christiandsg has joined #ruby
<Ox0dea> >> _=$$/$$;_=(_+_)**(_+_)**-_;_/(_-_)
<ruboto> Ox0dea # => Infinity (https://eval.in/393372)
<[k-> I could inline it and it'll be better!
<sevenseacat> [k-: ah, you are studying under Ox0dea i see
<[k-> yes :>
dgutierrez1287 has joined #ruby
<Ox0dea> I am so glad I have a student in such a strange classroom. :)
danielglh has quit [Max SendQ exceeded]
tkuchiki has quit [Remote host closed the connection]
ndrei has joined #ruby
<[k-> oh you just negate the number
<[k-> I did 1-2 to get -1
<[k-> lel
krz has quit [Ping timeout: 248 seconds]
lennae has quit [Ping timeout: 255 seconds]
sgambino has joined #ruby
<Ox0dea> Well, I start _ out as 1, but then I reassign it to 2 ** 2 ** -1, which becomes ~1.4, then I just divide that by 0.0.
hotpancakes has joined #ruby
<[k-> my magic number was ~0.7
dionysus69 has joined #ruby
JohnBat26 has joined #ruby
<Ox0dea> Ruby lets you refer to a variable's previous value within a redefinition.
<Ox0dea> [k-: How come you're assigning _ = $_ (1) / $__ (2) == 0?
<[k-> that was my fake zero, I used it to do 0**0.7
oo_ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
pusewicz has quit []
pusewicz has joined #ruby
<Ox0dea> I see.
millerti has joined #ruby
<sevenseacat> ah, the decoy fake zero
<sevenseacat> a time-honoured tactic
<Ox0dea> Yours simplifies to 1 / 0 ** sqrt(2) ** sqrt(2), but I can't say you didn't get there.
<[k-> redundant is redundant tho :p
hotpancakes has quit [Ping timeout: 264 seconds]
<Ox0dea> Just a little. :)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railsraider_ has joined #ruby
railsraider has quit [Read error: Connection reset by peer]
railsraider_ is now known as railsraider
harleypig has quit []
harleypig has joined #ruby
<Eising> is there a Hash method I'm overlooking? I'd like to do the equivalence of a #select, but also remove the members I return... #select! does exactly the opposite of what I want.
<apeiros> then reject! probably?
decoponio has joined #ruby
<Eising> apeiros: no, it returns the members it doesn't match
vcoinminer has quit []
ljt has joined #ruby
JDiPierro has joined #ruby
<[k-> yours is _=1;_=(2)^(0.5)=1.4;1.4/0
vcoinminer has joined #ruby
<Ox0dea> [k-: Indeed. :)
<[k-> took me long enough :p
fabrice31 has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
oo_ has quit [Remote host closed the connection]
<Ox0dea> Eising: I don't think you'll be able to do it with just one method call.
<Ox0dea> Hash#delete_if might've been your savior, but it returns the new Hash.
decoponyo has quit [Ping timeout: 248 seconds]
<Eising> Ox0dea: right, makes sense
lennae has joined #ruby
<[k-> so you want the members to be extracted out of the hash?
<Ox0dea> Remove and return.
<Eising> Yes, well, thing is I have a rather large Hash that I'm dividing based on something the members has
<Eising> so in order to speed up the process, I wanted to remove already divided members, so it would be continuously faster
<Ox0dea> Eising: And how come you need to know which ones got removed?
<Eising> Ox0dea: because I run them through an each loop
ndrei has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
avdi has quit []
<Ox0dea> Ah, so you want to partition the Hash into those elements which match some criteria and those that don't?
jeregrine has quit []
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
avdi has joined #ruby
symm- has joined #ruby
jeregrine has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<sevenseacat> ooh i see what you did there
<Ox0dea> ^_^
<Eising> so, basically "1) Get all members where element1 == foo1 2) do stuff with them, 3) Get all members where element1 == foo2, 4) do stuff with them, etc"
segmond has quit [Ping timeout: 248 seconds]
<Ox0dea> Eising: Right, Hash#partition should do the trick if you don't mind overwriting the original variable.
sphex_ has joined #ruby
<Eising> Ox0dea: is that a new thing?
<Ox0dea> 1.8>> Hash.instance_method(:partition)
<Ox0dea> We'll find out eventually...
<Ox0dea> 18>> Hash.instance_method(:partition)
<ruboto> Ox0dea # => #<UnboundMethod: Hash(Enumerable)#partition> (https://eval.in/393384)
<Ox0dea> Nope, it's been around since at least Ruby 1.8.7.
<Eising> interesting
<Eising> but it flattens the hash in to arrays
jaimessi has quit [Read error: Connection reset by peer]
<[k-> i have inlined it https://eval.in/393385
sulky has quit [Ping timeout: 246 seconds]
<Ox0dea> Eising: Well, do you absolutely need hashes?
<shevy> huh
<Eising> Ox0dea: I think I do...
<shevy> is that headius? or do I mix up nicks again https://vimeo.com/131394615
<[k-> I needed to ^(1/2)^(1/2) because I got a rational
<Eising> not that I can't rewrite the code entirely to do it as one dimensional arrays, it would just be a lot of hassle of a potential speedup
sulky has joined #ruby
<[k-> shevy yes
<shevy> are you sure you got a rational and not a problem instead [k-
sphex has quit [Ping timeout: 256 seconds]
<[k-> shevy, it works!
<Ox0dea> >> foo = {a:1, b:2, c:3, d:4}; stuff, foo = foo.partition { |k, v| v < 3 }.map(&:to_h); [stuff, foo]
<ruboto> Ox0dea # => [{:a=>1, :b=>2}, {:c=>3, :d=>4}] (https://eval.in/393390)
<Ox0dea> Eising: ^
<shevy> >> ^(1/2)
<ruboto> shevy # => /tmp/execpad-8700422e828c/source-8700422e828c:2: syntax error, unexpected '^' ...check link for more (https://eval.in/393391)
<yorickpeterse> shevy: yes, that's him
<shevy> ok thanks
jaimessi has joined #ruby
<[k-> that's what I told you!
jeanlinux has joined #ruby
semajs has joined #ruby
<Eising> Ox0dea: right, but I think that removes all changes of any speed increases in my code
<Eising> *chances
jokke has quit [Quit: ninja vanish]
<Ox0dea> Eising: How come? The target hash keeps getting smaller and smaller.
<[k-> we can now see why 1 is the most important number in infinity
<shevy> [k- yeah but you are from the other side of the world!
yfeldblum has quit [Ping timeout: 248 seconds]
<[k-> BUT I KNEW THIS!
<Eising> Ox0dea: right... I'll try it
<shevy> you guessed correctly :D
<[k-> I obviously knew who the head of jruby is
<[k-> I read his write up about refinements even
<Ox0dea> Eising: That's how to do it in one "call" anyhow, but I don't see how to do it without creating an intermediate value.
<[k-> shevy do you want the video accompaniment
JDiPierro has joined #ruby
<shevy> [k- hmm perhaps later, I have to salvage for food and beverages soon
ndrei has joined #ruby
<Ox0dea> Eising: You could #reject! based on the keys returned from a #select, but that doesn't seem like it'd be any more performant.
rbennacer has joined #ruby
cir0x has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<[k-> Do everything in one loop!
<[k-> use reverse_each!
frem has quit [Quit: Connection closed for inactivity]
<TheBrayn> I want to replace all . in an ip-address with \.: https://gist.github.com/mmerfort/dce6a124db97cf6f06ab
jokke has joined #ruby
<Ox0dea> TheBrayn: You request the impossible.
centrx has joined #ruby
<TheBrayn> really?
dionysus69 has quit [Ping timeout: 246 seconds]
danielglh has joined #ruby
<Ox0dea> TheBrayn: Nah, you've got an extra backslash in the first argument to #gsub.
senayar has quit [Remote host closed the connection]
<TheBrayn> same output
danielglh has quit [Max SendQ exceeded]
<[k-> The Oracle lied! ∆!∆!∆
<Eising> *sigh* my kingdom for a modern ruby
<TheBrayn> ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
Dreamer3 has joined #ruby
hotpancakes has joined #ruby
<[k-> aha! a Mac user
bjeanes has quit []
* jhass bets on Regexp.escape actually being wanted
<centrx> Get him!
valetudo has quit [Ping timeout: 265 seconds]
<Eising> Ox0dea: how would I do the .to_h equivalent on an older ruby?
<Eising> (1.9.3)
semajs has quit [Ping timeout: 276 seconds]
bjeanes has joined #ruby
<Ox0dea> >> Hash[[1, 2], [3, 4]]
<ruboto> Ox0dea # => {[1, 2]=>[3, 4]} (https://eval.in/393397)
<jhass> Eising: Hash[], but it would be better to upgrade ruby instead
<Ox0dea> Whoops.
<centrx> Eising, Hash[*array_of_pairs.flatten]
<Ox0dea> No need to flatten, I don't think.
<jhass> yeah, the flatten seems bad cargo cult
<[k-> jhass!
thebastl has quit [Read error: Connection reset by peer]
<centrx> it's needed depending on what the array is like
<Ox0dea> >> '1.2.3.4'.gsub('.', '\.')
<ruboto> Ox0dea # => "1\\.2\\.3\\.4" (https://eval.in/393398)
<Ox0dea> TheBrayn: ^
thebastl has joined #ruby
<Ox0dea> Perhaps you were confused by the double backslashes in the result?
<Ox0dea> It's actually just the one, but that's how Ruby represents it in double-quoted strings.
<[k-> \\ == \
JDiPierro has quit [Remote host closed the connection]
<[k-> >> puts "1\\.2\\.3\\.4"
<ruboto> [k- # => 1\.2\.3\.4 ...check link for more (https://eval.in/393400)
featheryahn_ has quit []
<TheBrayn> puts t.render '<%= @switches.map{ |s| "[host] =~ %s" % s.gsub(/./, "\.") } %>' -> ["[host] =~ .........", "[host] =~ ......."]
<Ox0dea> Well done.
featheryahn_ has joined #ruby
<TheBrayn> oh wait
Xeago has quit [Remote host closed the connection]
<Eising> Ox0dea: and the Hash[] inside the Array#map?
khebbie has joined #ruby
ixti has joined #ruby
anisha has quit [Ping timeout: 276 seconds]
<Ox0dea> Eising: No, you don't need the #map anymore.
<Ox0dea> That was to convert the partitions to hashes.
Rollabunna has joined #ruby
senayar has joined #ruby
hellschreiber has quit []
<Eising> right, so I do Hash[...partition]
hotpancakes has quit [Ping timeout: 250 seconds]
alxndr has quit []
ryan__ has joined #ruby
alxndr has joined #ruby
kp666 has quit [Quit: Leaving]
<Ox0dea> Ah, right, you'd do that inside the map.
leonardoajim has joined #ruby
<Eising> Ox0dea: I can't really get that to play nice... Can you show me how that would look?
Xeago has joined #ruby
<TheBrayn> nope, I still can't get it to work
hellschreiber has joined #ruby
havenwood has joined #ruby
<TheBrayn> I either get no backslash or two
willhumphreys has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
<Ox0dea> >> "\\".size
<ruboto> Ox0dea # => 1 (https://eval.in/393401)
<Ox0dea> TheBrayn: ^
<Ox0dea> Does that help clear things up?
<jhass> >> puts "\\".inspect
<ruboto> jhass # => "\\" ...check link for more (https://eval.in/393402)
<jhass> or this?
<Ox0dea> Eising: map { |foo| Hash[foo] } instead of the much nicer map(&:to_h). :/
yh has quit [Ping timeout: 276 seconds]
<Eising> that was simple...
<Ox0dea> Yay, Ruby!
<Eising> I need more coffee it seems
<TheBrayn> Ox0dea: I still have no clue what you are hinting at
Rollabunna has quit [Ping timeout: 246 seconds]
<[k-> >> '\'
<ruboto> [k- # => /tmp/execpad-5bd1b2d62981/source-5bd1b2d62981:2: unterminated string meets end of file ...check link for more (https://eval.in/393403)
<Ox0dea> TheBrayn: You should learn about how single-quoted strings are different from double-quoted strings.
<jhass> TheBrayn: I'm guessing right in that you're trying to build a regexp?
<TheBrayn> jhass: yes
<jhass> TheBrayn: if all the regexp contains is some static sequence, why do you need one?
segmond has joined #ruby
lennae has quit [Ping timeout: 265 seconds]
<TheBrayn> because the configfile output requires it
<jhass> where's that documented?
riotjones has quit [Quit: Leaving...]
rbennacer has quit [Remote host closed the connection]
bf4 has joined #ruby
<jhass> can you quote some docs like "You're not allowed to use any other ruby code than this construct that has to contain a regular expression" ?
jaimessi has quit [Read error: Connection reset by peer]
<TheBrayn> do you want to discuss the documentation of non-public software?
mistermocha has joined #ruby
<jhass> I just question that statement
NeverDie has joined #ruby
<[k-> we should go through all the logs of #ruby and grep Ox0dea!
<Ox0dea> TheBrayn: That you're using a Regexp in #gsub complicates things; you know you can pass it a String as the first argument, right?
<jhass> since your example is =~ regexp, that looks like ruby
duggiefresh has joined #ruby
<TheBrayn> it's not ruby it's part of an intranet software
duggiefresh is now known as Guest64664
<TheBrayn> and it just wants it that way for whatever reason
axl_ has joined #ruby
lennae has joined #ruby
ruby-lang240 has joined #ruby
bf4 has quit [Ping timeout: 256 seconds]
r__rios has joined #ruby
<jhass> well, then get clear on the differences between representation and actual value and how you inspect the result
<ruby-lang240> hi, how can i call a module name dynamically by variable? module_name = "Module1"; module_name::some_method
mistermocha has quit [Ping timeout: 246 seconds]
<jhass> ruby-lang240: remove the quotes
<Ox0dea> ruby-lang240: You shouldn't do that, but you want const_get.
<jhass> modules are just objects assigned to a constant
anisha has joined #ruby
<ruby-lang240> ah cool thanks
tmtwd has joined #ruby
<Ox0dea> >> Object.const_get('Array').new
<ruboto> Ox0dea # => [] (https://eval.in/393404)
<[k-> jhass, you're so funny
* apeiros wonders when people will stop using :: for method invocation
* Ox0dea wonders why it was ever permitted.
<[k-> :: is only for name spacing!
<apeiros> >> x = Module.new # a module which is not assigned to a constant!
<ruboto> apeiros # => #<Module:0x40a10398> (https://eval.in/393405)
jaimessi has joined #ruby
<[k-> rdoc uses it all the time tho
<apeiros> [k-: in docu lingo, :: means class method and # instance method
r_rios has quit [Ping timeout: 246 seconds]
<apeiros> but you wouldn't use # to invoke a method either
<[k-> im saying that adds to the confusion
<[k-> true
<Ox0dea> apeiros: I tried to add that. :)
<[k-> >> %#&#
<ruboto> [k- # => "&" (https://eval.in/393406)
<apeiros> maybe they should use objc lingo?
<[k-> tada!
adambeynon has quit []
<apeiros> Time+at, Time-stftime
quazimodo has joined #ruby
adambeynon has joined #ruby
jhwhite has joined #ruby
<[k-> # is clever but =begin is not
<quazimodo> so I have a class PostsMetric::CompaniesIncludes
<[k-> one of Ox0dea's gripes
<quazimodo> it's job is to <unimplemented> some how hit up an api (the wrapper service exists) and to present some data in a meaningful way
<Ox0dea> [k-: My editor makes Ruby block comments not-painful, but I still think the column of #s looks noisy.
<quazimodo> so, i could do CompaniesIncludes.new(query) and expect an instance which is enumerable - that's cool
<[k-> lucky you :(
<quazimodo> or i can do instance = CompaniesIncludes.new(query); instance.call and
pgatt has joined #ruby
<Ox0dea> [k-: Do you use DroidEdit? :P
<quazimodo> and do instance.data or instance.output or whatever to return an array of interesting data
brotspinne has joined #ruby
<[k-> no! I don't do full blown coding on my phone!
<quazimodo> or i could do CompaniesIncludes.where(query) and just get an array
<[k-> ?flood
<ruboto> Please use https://gist.github.com for more than three lines of text!
<Ox0dea> quazimodo: This should've been a blog post, I think.
<quazimodo> which makes sense?
<[k-> you make no sense because you split it over many lines
<quazimodo> Ox0dea: lol
<quazimodo> ok i'll try again
<[k-> use a gist
<quazimodo> ya
howdoi has quit [Quit: Connection closed for inactivity]
<[k-> :>
willhumphreys has joined #ruby
white_bear has quit [Quit: leaving]
white_bear has joined #ruby
<quazimodo> instance = CompaniesIncludes.new(query)
<quazimodo> instance.call
<quazimodo> instance.data # => [<#obj1>, <#obj2>]
<quazimodo> shit
<quazimodo> sorry
Xeago has joined #ruby
<quazimodo> bear in mind that CompaniesIncludes is consuming an API via some wrapper
Xeago has quit [Remote host closed the connection]
<quazimodo> in fact, this object is a strategy to get the CompanyIncludes of a larger query that hits many APIs. There are also CountriesIncludes, IndustriesIncludes, etc
<quazimodo> I think the enumerable object makes most sense and has least cruft, eh?
<[k-> ?xy quazimodo
<ruboto> quazimodo, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<maloik> my gut reaction is to use something like CI.new(query).results, or even #query or so
poikon has joined #ruby
<quazimodo> [k-: well i find myself fighting this all the time
<quazimodo> in this one case, yeah you may be right
<quazimodo> still, i have service objects all the time with MyDataClass.new(whatever).call
<quazimodo> why do i even have .call??
<[k-> don't worry I'm always wrong
victortyau has joined #ruby
<ddv> lol
<[k-> quazimodo, could you explain your problem :(
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> s/explain/describe
xcesariox has joined #ruby
JDiPierro has joined #ruby
<quazimodo> [k-: so I have 4 of these classes. All they do is take a list of keys, eg [423, 598, 342] and then return a collection of objects related to those keys. In this exact case, the keys are ids of Company objects living in some restful api I have access to. Industries i don't actually hit any api, i have a big data list so the expected behaviour would be to pass in a set of indsutry codes, and get the industry objects back as a collection
maasha has quit [Quit: Page closed]
malconis has joined #ruby
Xeago has joined #ruby
roshanavand has joined #ruby
tkuchiki has joined #ruby
<quazimodo> which one of those 4 classes i actually use depends entirely on what the user clickson the front end
<quazimodo> if they check 'companies' then i use the companies_includes strategy
<quazimodo> makes sense more or less?
brotspinne has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> "Industries i don't actually hit any api"
<[k-> ^^^
<[k-> error parsing
malconis has quit [Remote host closed the connection]
semajs has joined #ruby
Xeago has quit [Remote host closed the connection]
<quazimodo> the CompaniesIncludes needs to get data from remote source, IndustriesIncludes has access to an object that has all the industries
malconis has joined #ruby
<[k-> so basically, you have a frontend with a drop down list
<[k-> like an about page
<[k-> choose one to view about
<[k-> "companies", " industries " etc
JDiPierro has quit [Ping timeout: 244 seconds]
<quazimodo> something like that (actually far more complicated but not important for this instance, user specifies which includes they want to see)
<quazimodo> and that's a small part of the total picture
tkuchiki has quit [Remote host closed the connection]
<quazimodo> but that stuff's not at all important or an issue
<[k-> you give too much information without your problem :(
<quazimodo> i'm actually asking about 3 more or less similar ways to use objects in ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
Alina-malina has joined #ruby
<[k-> ah, that should be your first statement and then you can elaborate later on
peteykun has joined #ruby
Rollabunna has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
<[k-> you should have a Query class specifically for a query
roshanavand has quit [Remote host closed the connection]
fgo has joined #ruby
<[k-> CompanyIncludes does not seem to need to be instantiated
pizzaops has quit []
* ddv is listening to At the Edge of Time by Blind Guardian from the album Beyond the Red Mirror
<[k-> also, it is poor naming
pizzaops has joined #ruby
* ddv is listening to Live Your Life by Headhunterz & Crystal Lake from the album Live Your Life - Single
<ddv> oops sorry
<quazimodo> hrm
<sevenseacat> you get points for listening to blind guardian, though.
<quazimodo> i need to hear someones arguments about instantiation vs not instantiating
<ddv> sevenseacat: <3
<[k-> IMO, wrappers do not need to be instantiated
semajs has quit [Quit: semajs]
<[k-> they do not require state
<[k-> unless you have API keys and all that
eGGsha has joined #ruby
dstarh has joined #ruby
<[k-> but since you just query them without authing, I assume there is no api key to enter
<quazimodo> hrm
Ox0dea has quit [Ping timeout: 252 seconds]
<quazimodo> i don't know, i tend to look at everyting as more or less a data type
Rollabunna has quit [Ping timeout: 248 seconds]
<[k-> we should pull in an expert!
<quazimodo> a query for me is kind of like a data type, it takes some stuff in + magic sauce to create the useful representation that I want (in this case it involves some network IO)
<[k-> *cough* shevy! *cough*
<quazimodo> shev shev
<[k-> Query can be a separate object
<[k-> CompanyIncludes should be a Module
<quazimodo> [k-: also, the usage of the API is entirely taken care of
thiagovsk has joined #ruby
<quazimodo> a module that just returns a collection?
dellavg has quit [Remote host closed the connection]
<[k-> have you not seen factories :o
<[k-> maybe we can pull in jhass too
<quazimodo> factories don't need to be modules
<[k-> they code a lot
dellavg has joined #ruby
<quazimodo> i don't think it's good to use modules for this
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
<[k-> well you know your system best
<quazimodo> i want to be working with a data type that has an interface
<quazimodo> in general that's how i feel
n1ftyn8_ has quit []
<[k-> interface don't have states!
<quazimodo> but i don't know the implications
allomov has joined #ruby
<quazimodo> [k-: eh?
<workmad3> quazimodo: if you're wanting a data type, chances are you want to return an object of some form, but your `.where(blah)` method can then be a factory method that performs your operation and returns a processed data structure
n1ftyn8_ has joined #ruby
<quazimodo> an interface is an abstract collection of operations that the data type would implement?
<quazimodo> workmad3: sure that makes sense
marens has quit [Ping timeout: 248 seconds]
arup_r has quit [Remote host closed the connection]
<workmad3> quazimodo: just don't do something like set up data on the class itself as a way to avoid creating an instance because 'I only ever have one request happening at once'... that logic is almost certainly going to bite you painfully just after you've forgotten you did it that way
<quazimodo> workmad3: i do my utmost to stay away from class instance variables
<quazimodo> i never ever make data on the class itself
<quazimodo> well, 0.0001% of the times
tkuchiki has joined #ruby
* [k- silently scribbles workmad3 on the expert list
<workmad3> quazimodo: I've no problem with class instance variables... as long as they're set up during initialization and then never changed :D
<quazimodo> yeah
<quazimodo> exactly
<quazimodo> which i've needed to do a handful of times
<[k-> if you don't use them, you should be doing fp!
<workmad3> otherwise they're just another form of globally-mutable shared state
<quazimodo> yep
<quazimodo> and then yoru spec fails
<quazimodo> and you nfi why?
<quazimodo> because it doesn't get scrubbed between specs :(
<workmad3> [k-: class-instance variables are instance variables set up at the class level, not on an instance of the class
bmurt has joined #ruby
<[k-> huh?
chinmay_dd has joined #ruby
<workmad3> [k-: `class Foo; @foobar = "blah" #A class instance variable; end`
atomical has joined #ruby
<[k-> there is such a possible thing?
<workmad3> [k-: yup
<workmad3> [k-: classes in ruby are instances of Class, so you get all the normal things available to any instance of a class
<apeiros> them classes be objects!
<ddv> class Class <3
* [k- steps closer to the fp corner
<quazimodo> and if i'm not mistaken, class variables are shared by the class and any subclasses, while class instance variables are private per class
<quazimodo> ya?
<quazimodo> <- dumb
jerius has joined #ruby
<workmad3> [k-: it's not that crazy or confusing... unless you're used to something like Java that draws an arbitrary boundary around classes and says "Classes are a different magisterium from objects, you should think of them as a separate universe"
<workmad3> quazimodo: pretty much
<quazimodo> workmad3: next step, your thuoghts on Butt.new(stuff) vs Butt.new(stuff).call
JoshL has joined #ruby
<quazimodo> i'm thinking
<workmad3> quazimodo: I'd tend towards the second form, if you're meaning that `.call` is doing some processing
<quazimodo> yeah
centrx has quit [Quit: Shutting down, Please wait...]
<quazimodo> such as executing a request to another api
Xeago has joined #ruby
<quazimodo> and finally
lennae has quit [Ping timeout: 248 seconds]
r__rios is now known as r_rios
a346 has joined #ruby
<workmad3> quazimodo: I'd probably not call the method `.call` though, unless I was implementing something that needed to be used as a Callable, and even then I'd probably have a more descriptive name and just alias it to `call`
<quazimodo> Callable?
hinbody has joined #ruby
<quazimodo> that's a thing?
jerematic has joined #ruby
<ddv> call is also a method of Proc
r_rios has quit [Changing host]
r_rios has joined #ruby
<[k-> it may be going to be a thing
<workmad3> quazimodo: procs and lambdas are classed as 'callables' because they implement `.call`
<[k-> .exec maybe?
<quazimodo> i used it specifically because it's a method of procs & lambdas
<quazimodo> i thought, by having that it makes it very obvious what's going on
<[k-> your new method returns a proc?
<quazimodo> my .call objects rarely have much else
Xeago has quit [Remote host closed the connection]
<workmad3> quazimodo: unless the class name is very descriptive of what's happening, I just tend to stay away from that generic a name
mahtennek has joined #ruby
<quazimodo> hrm
<quazimodo> perhaps you have a good point
<workmad3> quazimodo: and even then, I'd probably go for something like `perform` or `process` or `load` over `call` so that it's a bit more descriptive of my thought process
<quazimodo> i'll meditate on that one
RegulationD has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> .execute
* adaedra executes [k-
riotjones has joined #ruby
<quazimodo> workmad3: i implement as .call because i thought, everyone in my organisation kinda knows it'll probably be .call
<workmad3> [k-: I'd even avoid that, unless my class was semantically a command or similar
* [k- hands over head to adaedra
<quazimodo> like a very generic way to make a service object do a thing
<quazimodo> i dno?
<workmad3> quazimodo: I prefer `perform` as a generic method for a service object
<quazimodo> that makes sense to
<quazimodo> *too
<ddv> naming things is hard
<mahtennek> hi, can i ask about an algorithm help. i currently have a json as follows https://gist.github.com/anonymous/a12920ab707f250ac426. how can i find out that "ClassNo" contains "DayText"
<workmad3> quazimodo: because if I was talking about a service, I'd say it was performing an action, not calling an action :)
<mahtennek> i can't seem to figure this algorithm out
Xeago has joined #ruby
<quazimodo> ddv: it's fundamentally hard because human brains invented it, it's not real outside of our minds
<ddv> thats pretty dee
<ddv> p
<quazimodo> workmad3: so why are lambdas called?
<quazimodo> don't they perform a calculation?
<workmad3> quazimodo: because a lambda is a method
<quazimodo> hrm
<workmad3> quazimodo: and you call methods, in the jargon of programming
Xeago has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<quazimodo> grrr
<adaedra> but how can you invent something if your brain is not real?
<quazimodo> yeah that makes sense
<quazimodo> ddv: it's messed up because there's no friggin answer
nettoweb has joined #ruby
elia has quit [Ping timeout: 256 seconds]
<quazimodo> you can have 1000 web casts on naming and structure, etc. end of day all catering to a thoroughly un-understood mindbrainlump
solocsha1 has joined #ruby
<quazimodo> naming stuff, categorisation <- that bastard
<quazimodo> anwya
Xeago has joined #ruby
<[k-> mahtennek, "DayText" is not a child of "ClassNo"
<chrissonar> how to test if a module was included into a class?
yh has joined #ruby
<havenwood> >> methods.all? { |meth| method(meth).respond_to? :call }
<ruboto> havenwood # => true (https://eval.in/393467)
<chrissonar> is there any approach?
<mahtennek> [k-, it is not.
<workmad3> quazimodo: naming things is also a skill... and one that isn't practiced much outside of fairly restricted realms of human activity
<[k-> so you can't test that it is inside, no?
<quazimodo> workmad3: i found that suddenly everything just got better when i started to treat objects as data structures rather than things that perform actions an other thinhgs
<quazimodo> workmad3: indeed
<mahtennek> [k-: i don't get you
<[k-> havenwood that seems like too much work
sulky has quit [Ping timeout: 252 seconds]
<quazimodo> chrissonar: call the methods?
<quazimodo> test the behaviour
<ddv> workmad3: still naming is hard
jlast has joined #ruby
<[k-> mahtennek if it is not a child, it is not inside it
<quazimodo> butts.touch <- raises if not included ...
<[k-> havenwood, what about checking ancestors?
<chrissonar> quazimodo, and repeating the very same tests for each class, which included the module?
lxsameer has quit [Quit: Leaving]
<havenwood> [k-: For chrissonar's question?
bb010g has quit []
<quazimodo> chrissonar: are you exposing a module to the world (ie are you testing the methods on the module) or whether your classes havethose methods?
<[k-> ye
bb010g has joined #ruby
<havenwood> [k-: Show how!
<mahtennek> [k- yes. so how can I tell that in that same level running the loop, i will know that ClassNo of "SL1" is "daytext" of "Wednesday'
sulky has joined #ruby
<[k-> he just wants to know if a module is included by a class
<workmad3> chrissonar: if you're using rspec, you can use shared example groups... with minitest, you may be able to write your tests in a module and include that in your test class
<quazimodo> because if you're just testing if your classes have those methods, i'd still be testing those classes behaviour via shared examples
chouhoulis has quit [Ping timeout: 250 seconds]
jlast_ has joined #ruby
krz has joined #ruby
<quazimodo> chrissonar: shared examples are your friend here in my opinion, unless some technical reason gets in the way
<havenwood> [k-: #include? is a bit more concise
Voker57|2 has quit [Ping timeout: 256 seconds]
ninja-maid-robot has quit [Quit: I have irrefutable proof that D < 0. It follows trivially from 2D > 3D, which is obviously true.]
Voker57|2 has joined #ruby
<chrissonar> workmad3, quazimodo i wonder about that advise, because I already testet the module itself, but only want to ensure the module was included into certain classes.
<[k-> >> module A end; class B; include A end; B.include? A
<ruboto> [k- # => true (https://eval.in/393470)
elia has joined #ruby
ninja-maid-robot has joined #ruby
<[k-> oh your suggestion works
<quazimodo> chrissonar: you don't care at all that your classes included the module
Xeago has quit [Remote host closed the connection]
<quazimodo> you only care if your classes exhibit expected behaviour
solocsha1 has quit [Ping timeout: 255 seconds]
<quazimodo> if you poke your class here, does it do what you thought it shuold
<[k-> mahtennek how do you access ClassNo
<quazimodo> if you don't include your module, that'll break
<workmad3> chrissonar: I'd avoid writing a test that specifically checks if the module is included in the class, tbh... that's testing implementation details pretty heavily, rather than that your class is showing expected behaviour (there's nothing wrong with changing the implementation of a collection from including Enumerable to hand-rolled methods for each method, but if you check for Enumerable in the included mod
<quazimodo> if your module changes, that'll break
<workmad3> ules then your test will break)
j4cknewt has joined #ruby
arup_r has joined #ruby
<quazimodo> if you decide to use something other than a module to do this, yoru test won't break :)
jenrzzz has quit [Ping timeout: 264 seconds]
<quazimodo> and tests breaking = $$ down the drain
<chrissonar> workmad3, good point.
dhjondoh has quit [Remote host closed the connection]
<quazimodo> hey what about my mpoint (which was exactly the same except less eloquently worded)
<[k-> quazimodo: https://eval.in/393385
Xeago has joined #ruby
<quazimodo> :P
<mahtennek> [k-: it's in JSON, so i run a key value and get key=ClassNo matching the value. b
blackmes1 has joined #ruby
jlast has quit [Ping timeout: 246 seconds]
k3asd` has quit [Ping timeout: 246 seconds]
<chrissonar> quazimodo, maybe i did not get the reason?
khebbie has joined #ruby
<quazimodo> lol
<chrissonar> quazimodo, anyway i have to think about it.
<quazimodo> i'm just playing
rbennacer has joined #ruby
<havenwood> mahtennek: So you're doing a `require 'json'` then deserializing the JSON you have already, or no?
<mahtennek> yes i have
<mahtennek> i have gotten the result
<quazimodo> chrissonar: weigh the advantages/costs. Testing isn't about being 100% sure, mathematical certainty or code coverage, it's about running your stuff thruogh similar requirements as production wolud be, and having it not fall apart
willhumphreys has quit [Ping timeout: 255 seconds]
<quazimodo> and you try to do so with the least time/money expenditure
<mahtennek> but it's kind of confusing me at the moment. so i need some clear head guidance
<[k-> so json.select { |array| array.select { |k,v| k == ...
<quazimodo> by testing your module's included, you'll get a green dot even if the module is 100% fucked
elia has quit [Client Quit]
jeanlinux has quit [Remote host closed the connection]
<mahtennek> i'll try that [k-
<quazimodo> if you test that butts.touch prints "Don't touch me", you'll always be guaranteed that butt touching prints that message, regardless of anything else
<chrissonar> quazimodo, very exlicit ;)
<chrissonar> explicit
<[k-> mahtennek no...
<workmad3> quazimodo: it also means that your test will break only if touching butts becomes an allowable action of your system ;)
<[k-> ?code mahtennek
<ruboto> mahtennek, We can't help you without your code, please post it to https://gist.github.com
<quazimodo> haha
<mahtennek> hang on
zly has quit [Changing host]
zly has joined #ruby
<workmad3> s/will/should
<quazimodo> workmad3: so, i think i agree with you on Whatever.new(stuff).perform_the_intended_action
<quazimodo> next step
maZtah has quit []
willhumphreys has joined #ruby
<quazimodo> class Foo < Array; end
j4cknewt has quit [Ping timeout: 256 seconds]
<quazimodo> thoughts?
mistermocha has joined #ruby
<workmad3> quazimodo: noooooooooooooooooooooooooooooooooooo
yh_ has joined #ruby
khebbie has quit [Client Quit]
<adaedra> I think it's frowned upon to inherit from core classes
<quazimodo> ya but y
maZtah has joined #ruby
<apeiros> not just core classes
<quazimodo> better to include enumrable, delegate each to @object and have @oject = [stuff] ?
<apeiros> you should not inherit from classes which you don't own
yh has quit [Ping timeout: 246 seconds]
<workmad3> quazimodo: because lots of operations will silently change your subclass of an array into a non-subclassed array, which makes things difficult to reason about
<apeiros> because if you don't own a class, you must only use its external interface anyway
<mahtennek> this is a sample of my codes. https://gist.github.com/anonymous/71857a3ac67bb0daef7b. it's basically looping through my database to get somthing like this ["module_code":"ST2334","module_title":"Probability and Statistics","class_no":"T4","week_text":"Every Week","lesson_type":"Tutorial","day_text":"Thursday","start_time":"1500","end_time":"1600","venue":"S16-0202","lecture_periods":["Monday Afternoon","Thursday Afterno
<mahtennek> on"],"tutorial_periods":["Monday Afternoon","Thursday Afternoon"]}]
<apeiros> and then there's no point to inheritance. just use composition.
<quazimodo> ok
<quazimodo> so building a class that is a collection
<quazimodo> how would you?
<apeiros> yes
<mahtennek> i want to actually get the modules of today.
<apeiros> has-a instead of is-a
<quazimodo> ok
iamninja has quit [Ping timeout: 255 seconds]
<workmad3> quazimodo: e.g. `a = Foo.new; a += ["foo"]` <-- suddenly your subclass becomes an Array
<quazimodo> i can understand that
<mahtennek> the challenge is that there are lecture_periods and tutorial_periods that only match to ClassNo
<quazimodo> workmad3: rly?
<apeiros> quazimodo: well, class HasArray; def initialize; @array = []; end; end
<apeiros> quazimodo: and see Forwardable module for easy delegation
<mahtennek> sorry the ClassNo that matches with the day in DayText
<[k-> my cyclomatic complexity rating of your code: 10/10!
<quazimodo> ok, and we forward the useful stuff from Array and Enumerable
<workmad3> quazimodo: yup
* apeiros puts [k- into the cyclomat
<apeiros> red button, yeeeeey!
<quazimodo> ok that's another issue solved for me
sarkyniin has joined #ruby
joast has quit [Ping timeout: 264 seconds]
<[k-> my head was cut of
<apeiros> what? nooo!
renderful has joined #ruby
<[k-> you gonna have bloody mess
<apeiros> but I was careful!
christiandsg has joined #ruby
<[k-> adaedra executed me
<apeiros> oh, did they?
<Burgestrand> I'm glad not everybody considers inheriting from core classes a good idea.
gambl0re has quit [Ping timeout: 248 seconds]
* Burgestrand slightly bitter
kobain has joined #ruby
<apeiros> Burgestrand: you got different opinions earlier?
lennae has joined #ruby
<Burgestrand> apeiros: indeed.
<apeiros> or elsewhere?
<workmad3> quazimodo: btw, it's not that your subclass morphs in that example... it's that `a += ["foo"]` is `a = a + ["foo"]` and the Array + operator is coded to create a new Array, not a new instance of whatever is on the left-hand-side of the +
<Burgestrand> apeiros: a few hours ago in here!
Ropeney has joined #ruby
<apeiros> Burgestrand: and I was not here to curb the insanity!
Ropeney has quit [Client Quit]
mistermocha has quit [Ping timeout: 252 seconds]
<Burgestrand> apeiros: when it comes to development I do believe in karma.
<Burgestrand> except it's not fate, it's the past me.
<Burgestrand> ;)
Xeago has quit [Remote host closed the connection]
<workmad3> quazimodo: similar issues abound with basic Enumerable methods like map, select, etc. and with subclasses of other core types, like Hash, String...
<apeiros> ay, so why do I always get bitten by others insane code and never mine?!? :(
<[k-> your problem is this ye? 21:27:09] <mahtennek> [k- yes. so how can I tell that in that same level running the loop, i will know that ClassNo of "SL1" is "daytext" of "Wednesday'
<mahtennek> yes
senayar has quit [Remote host closed the connection]
ht__ has quit [Quit: Konversation terminated!]
<mahtennek> i think it's getting abit messy and complex
<mahtennek> because i am traversing at least 5 records from the db with various module information
<Burgestrand> apeiros: it is indeed unfair!
<[k-> you just use &&
<apeiros> I should write insane code myself
<apeiros> so others can get bitten by it
Xeago has joined #ruby
<jhass> I think subclassing core classes can be okay for internal stuff in small code bases, just don't expose them to somebody not aware of the cavehats
* apeiros puts on the cave hat
<adaedra> ha
<apeiros> it's that @ hat, right?
<apeiros> or was that the @sshat?
<workmad3> jhass: to me, there are just so many caveats that I may as well just use composition and forward the methods I want
* apeiros never remembers, f'ing heat.
<[k-> caveats
Narzew has joined #ruby
Feyn has quit [Quit: Leaving]
devdazed has joined #ruby
* apeiros doesn't know that cav guy either and what he's eating…
<jhass> today it's the heat, in five months it's the cold :D
<apeiros> I have no problems with cold
cir0x has quit [Quit: Leaving.]
christiandsg has quit [Ping timeout: 265 seconds]
<[k-> mahtennek && is the `and` operator
jobewan has joined #ruby
cir0x has joined #ruby
<workmad3> apeiros: same, unless we're talking *really* cold (I probably wouldn't enjoy the arctic circle, or a winter in moscow, for example)
<mahtennek> yes
<[k-> you can use if to check both conditions at once
<mahtennek> but how can i check that the ClassNo correctly matches DayText
<quazimodo> workmad3: makes sense
<havenwood> [k-: Though note all that's between them in precedence: http://ruby-doc.org/core/doc/syntax/precedence_rdoc.html
<jhass> well, wet light cold is usually a lot worse than the dry strong cold in those areas
<quazimodo> I presumed as much
<[k-> so you have value[0][day_text] == sometjjmg && value[0] == something
<quazimodo> probably does a malloc each time an array is operated on
<apeiros> workmad3: I just stay at home and use teleshopping
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Timba-as has quit [Ping timeout: 246 seconds]
<wmoxam> jhass: +++
<[k-> value[0][Class_no]*
Timba-as has joined #ruby
<quazimodo> i dno why it took me so much frigging time to understandthat objects are really really easy to work with (not always but mostly) if you treat them as distinct data type
<mahtennek> [k-: if i value[0][Class_no]* it, what does it do?
<[k-> ignore the *
<[k-> it means that I was correcting my previous sentence
marens has joined #ruby
marens has joined #ruby
<mahtennek> oh yeah but the value[0][class_no] is constantly changing each module information it receives
<mahtennek> so there's no way to ensure a static comparison
senayar has joined #ruby
<[k-> err what?
<mahtennek> as in the JSON records for value[0][class_no] is constantly changing its value for each record
<mahtennek> to set value[0][class_no] == 1 for example, the next record would not be 1
lennae has quit [Ping timeout: 248 seconds]
rbennacer has quit [Read error: Connection reset by peer]
<mahtennek> so wouldn't it be pointless to set [0][class_no] == [0][class_no
<mahtennek> it defeats the purpose isn't it
bryancp has quit []
bryancp has joined #ruby
rbennacer has joined #ruby
<quazimodo> workmad3: ok, @collection = [], def_delegators :@collection, :[], :map, :each, :<< eh?
<[k-> lets step back for a moment what do you mean by class_no == day_text
_blizzy_ has quit [Ping timeout: 248 seconds]
k3asd` has joined #ruby
jpfuentes2 has joined #ruby
<mahtennek> so for example ["module_code":"ST2334","module_title":"Probability and Statistics","class_no":"T4","week_text":"Every Week","lesson_type":"Tutorial","day_text":"Thursday","start_time":"1500","end_time":"1600","venue":"S16-0202","lecture_periods":["Monday Afternoon","Thursday Afternoon"],"tutorial_periods":["Monday Afternoon","Thursday Afternoon"]}]
deimos has quit []
t-richards has quit []
williamherry has joined #ruby
<mahtennek> here i know that class_no T4 is on Thursday, which is found in day_text
deimos has joined #ruby
<mahtennek> but the next record ["module_code":"ST2334","module_title":"Probability and Statistics","class_no":"SL1","week_text":"Every Week","lesson_type":"Lecture","day_text":"Monday","start_time":"1200","end_time":"1400","venue":"UT-AUD3","lecture_periods":["Monday Afternoon","Thursday Afternoon"],"tutorial_periods":["Monday Afternoon","Thursday Afternoon"]}]
<mahtennek> could be class_no SL1 on Monday (day_text)
<mahtennek> so i want to be able to ensure this 2 entities are correct.
<[k-> so SL is not Monday
<mahtennek> it is Monday for that case.
<Papierkorb> Anyone in here knows about rugged? I want to add a file to a git repository as file, and then commit that file. Issue is that when I change this file later on, "$ git status" shows no changes
<[k-> mahtennek, you should have a new method for checking
<mahtennek> okay.
<mahtennek> what would you suggest?
tesuji has quit [Ping timeout: 276 seconds]
Pro| has joined #ruby
<Pro|> what would be a good way to parse "-8,00" to number
<[k-> I'm still not sure how T4 -> Thursday and SL1 -> Monday
<Pro|> "-8,00" to -8.00
<apeiros> from the length of the ongoing discussion, I'd suggest writing down a proper problem spec :-p
<[k-> apeiros halp
Rollabunna has joined #ruby
<apeiros> >> Float("-8,00".tr(",", "."))
<ruboto> apeiros # => -8.0 (https://eval.in/393503)
<apeiros> Pro|: ^
* apeiros senses upcoming additional requirements, though
elia has joined #ruby
<[k-> I was going to suggest a library
<apeiros> [k-: can't. too hot. I'd be pissed within less than 3.87 seconds
atom3 has quit [Ping timeout: 277 seconds]
<[k-> but I have work to do!
davedev24_ has joined #ruby
<mahtennek> erm. well, this Json determines the Class number, module codes, together with the Day_text which is actually the day it is held. so the class T4 in the JSON is a tutorial class held on Thursday, whereas SL1 is a lecture held on Monday. so as of now, i am able to parse this JSON key value.
<[k-> my problem analysis skills aren't up to par
JakFrist has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<apeiros> [k-: nobody forces you to help
<[k-> so if the json determines it, what do you need to check?
atom3 has joined #ruby
<[k-> I can't just leave him alone halfway!
<mahtennek> sorry guys
<[k-> that would be irresponsible
<[k-> no,no its okay
tagrudev has quit [Remote host closed the connection]
<mahtennek> actually the problem is that my current method is getting all the dates of today and displaying it accordingly.
arup_r has quit []
<mahtennek> day of today i mean
DaniG2k has joined #ruby
davedev2_ has quit [Ping timeout: 248 seconds]
<mahtennek> i am not sure if i could actually enforce a check that if the ClassNo is as it is from the JSON, then it would be the DayText as from JSON
Rollabunna has quit [Ping timeout: 248 seconds]
hotpancakes has joined #ruby
<apeiros> ok, seems Pro|'s don't need to thank for received help. noted.
msnyon has joined #ruby
railsraider has quit [Ping timeout: 252 seconds]
* [k- pours cold water over apeiros
<[k-> that should cool you down!
<apeiros> thanks. much appreciated.
* yorickpeterse throws ice cubes at apeiros
momomomomo has joined #ruby
* ljarvis throws ice cube at apeiros
<apeiros> :-o
<[k-> add injury to the heat!
<apeiros> why'd you throw h2o croutons at me?!? they belong into the whiskey-soup!
ninja-maid-robot has quit [Ping timeout: 265 seconds]
<yorickpeterse> because clearly you're suffering too much from the heat so we figured throwing them at you would make things easier
<yorickpeterse> that way you don't have to get up
elia has quit [Quit: Computer has gone to sleep.]
<[k-> ?confused
<ruboto> I don't know anything about confused
howdoi has joined #ruby
elia has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
<[k-> well I am confused about mahtennek's problem
<havenwood> So when they finally put someone's face on an ice cube, naturally it was... Sir Richard Branson: https://a248.e.akamai.net/f/1202/1579/4m/i.dailymail.co.uk/i/pix/2012/05/01/article-2137788-12DB310A000005DC-845_634x623.jpg
<mahtennek> [k- haha yeah i am confused too
charles81 has quit []
charles81 has joined #ruby
<mahtennek> i think i'll try to figure out how to get it
<ljarvis> that woman is scary
<havenwood> mahtennek: Gist the Hashes you get when you deserialize your JSON and the output you want.
<[k-> you could try by simplifying your problem
Xeago has quit [Remote host closed the connection]
<[k-> yay havenwood
<mahtennek> havenwood: ok
hotpancakes has quit [Ping timeout: 276 seconds]
manveru has quit []
<apeiros> [k-, mahtennek: toldya, proper problem spec :-p
manveru has joined #ruby
<apeiros> somebody not being able to explain a problem clearly is indicative of them not fully understanding their problem yet.
serivich has joined #ruby
bcavileer has quit []
<apeiros> havenwood: dear god, why?!?
bcavileer has joined #ruby
<havenwood> apeiros: Billionaires...
<[k-> you mean those contract thingies that some book about Dr scheme told us to do?
<apeiros> balloonionaires?
<[k-> Contract: This function will square a number
CloCkWeRX has joined #ruby
<apeiros> [k-: I thought it was henry uml
<[k-> Examples: (square 2) == 4
<havenwood> [k-: -> n { n ** 2 }
<[k-> Type signature: Int -> Int
<[k-> havenwood : DrScheme
i8igmac has quit [Ping timeout: 256 seconds]
<[k-> it's one of the recipes for great success!
neanias has joined #ruby
<mahtennek> the problem: i want to get the modules of Today
<mahtennek> challenge, there is Lecture_periods and tutorial_periods which have multiple values, i need to ensure that it matches today's day
<apeiros> code formatting, whatsthat?
<mahtennek> and it has to be checked against Day_text with today's day
werelivinginthef has joined #ruby
<mahtennek> it's in JSON
aphprentice has quit [Remote host closed the connection]
charliesome has joined #ruby
<apeiros> yes. and that can't be formatted…
<[k-> ?gist_usage
<ruboto> To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
<[k-> !
<apeiros> mahtennek: hint - I know the days of 80 column screens are over. but when your stuff goes over 120 cols, it's simply unreadable.
<[k-> I knew the command apeiros!
<mahtennek> sorry. hang ong
<mahtennek> on
* apeiros hands [k- the excellent command of ruboto's command medal
bronson has joined #ruby
<[k-> :>
tkuchiki has quit [Remote host closed the connection]
<jhass> this channel is turning into stackoverflow...
<apeiros> mahtennek: hint no. 2: you can edit gists
<[k-> I have no head tho, I can't take a picture of this great moment of time ;-;
charliesome has quit [Read error: Connection reset by peer]
<apeiros> jhass: is that good or bad?
<jhass> apeiros: I'm not sure yet :D
ashemark has joined #ruby
vt102 has joined #ruby
<jhass> hint 3: you don't have json, you got a ruby hash
sshuff has joined #ruby
<jhass> hence the red stuff there
charliesome has joined #ruby
njs126 has joined #ruby
<apeiros> mahtennek: ok. sorry, but definitively not reading something with 320 column lines.
<[k-> apeiros didn't want to get involved anyway :p
<jhass> hint 4: require "pp"; pp whatever
<apeiros> yupp, and that gist helps with that
<ashemark> I'm a newbie to ruby(coming from rails), can anyone explain what's jruby/iron ruby/macruby?
<mahtennek> no no its not the JSON that has the error
<[k-> where's the link on how to ask for help :o
<mahtennek> it's the algorithm
<ddv> how can you be a newbie when you come from rails lol
<ddv> that doesn't make sense
<yorickpeterse> ashemark: they are different implementations of Ruby
<[k-> rails isnt Ruby
<jhass> ddv: really not?
<yorickpeterse> ashemark: as in, they're written using different tools/languages and usually cater to different needs
<yorickpeterse> e.g. JRuby lets you interface with Java code
<jhass> ddv: lucky you if you can't understand it...
<ashemark> ok
<pipework> Mmm, jrubby.
<apeiros> iron ruby is dead, no?
CloCkWeRX has quit [Ping timeout: 246 seconds]
<apeiros> not sure about macruby, but I thought that one was dead too…
<[k-> macruby is cocoa
<apeiros> jruby otoh is going strong
<ashemark> is there a jit compiler for ruby?
<neanias> I think macruby is dead
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> it is ruby with GUI for macs!
<neanias> In favour of that other one
bronson has quit [Ping timeout: 255 seconds]
elia has quit [Quit: (IRC Client: textualapp.com)]
<yorickpeterse> both ironruby and macruby are pretty much dead
<neanias> The guy moved it to a paid format
<apeiros> neanias: rubymotion
<neanias> apeiros: that's the one
eggoez has joined #ruby
<apeiros> jhass: I find it surprisingly frequent how people confuse json and native objects
<jhass> yeah
<quazimodo> workmad3: thats basically what i had in mind with #ca
<quazimodo> #call
bubbys has quit [Ping timeout: 264 seconds]
* apeiros sometimes is tempted to write a JsonObject class…
paulcsmith has joined #ruby
JDiPierro has joined #ruby
<ashemark> is there a jit complier for ruby?
rwilcox has joined #ruby
<[k-> jruby
hotpancakes has joined #ruby
chrissonar has quit [Remote host closed the connection]
kfpratt has joined #ruby
<yorickpeterse> ashemark: JRuby and Rubinius have a JIT
<yorickpeterse> There's no generic JIT that works across all though
<yorickpeterse> (not sure if Topaz has a JIT, but it's pretty much dead anyway)
<ashemark> oh okay
riotjones has quit [Remote host closed the connection]
dudedudeman has joined #ruby
icflournoy has joined #ruby
<apeiros> didn't hear much about maglev anymore either
<apeiros> that sounded so promising…
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
<[k-> maglev is deaddddd
eGGsha has joined #ruby
axl__ has joined #ruby
<[k-> stagnant at best
<adaedra> too bad
<[k-> you! give me back my head!
mahtennek has quit []
gambl0re has joined #ruby
CloCkWeRX has joined #ruby
* adaedra shoots [k-'s head in the direction of his body
<dudedudeman> happy monday, rubyists
eggoez has quit [Ping timeout: 248 seconds]
<[k-> :(
<adaedra> GOOOOOAAAAAL
Kully3xf has joined #ruby
<adaedra> hi dudedudeman
<havenwood> ^ pulse has a heartbeat
hotpancakes has quit [Ping timeout: 264 seconds]
<dudedudeman> yarp
jenrzzz has joined #ruby
<havenwood> faint but there
willhumphreys has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby
<apeiros> zenspider contributed by deleting 60KLoC :D
<apeiros> nice
aganov has quit [Quit: Leaving]
* [k- was brutally murdered by French terrorists (read: adaedra)
cir0x has quit [Quit: Leaving.]
<adaedra> now now now
<adaedra> no need to use such nouns
<apeiros> you mean french freedom fighters
eggoez has joined #ruby
pullphinger has joined #ruby
<dudedudeman> i read that as french tourists at first, and the image made me chuckle
<jhass> apeiros: no, concerned citizens
<Pro|> apeiros: thanks you
<dudedudeman> anyone going to make it to lonestar ruby?
<neanias> What are the advantages of a JIT complier?
howdoicomputer has joined #ruby
<neanias> Speeeeeeeeed?
<jhass> essentially, yes
<neanias> Fair enough
uri_ has joined #ruby
kies^ has joined #ruby
ta has quit [Remote host closed the connection]
<adaedra> Be careful of the ticket
<[k-> speed in the long term
dopie has joined #ruby
<[k-> you don't have speed tickets!
<jhass> if you get speed tickets it means you just were too slow so the camera could catch you
shredding has joined #ruby
<adaedra> you're right, I have no speed tickets.
jenrzzz has quit [Ping timeout: 252 seconds]
<adaedra> The fact I don't have my driver license may help, though.
<neanias> adaedra: you're not trying hard enough
christiandsg has joined #ruby
<dudedudeman> are speeding cameras a thing in europe?
<neanias> Yeah
<neanias> Well, they certainly are here in the UK
<jhass> lol, definitely
<[k-> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
symm- has quit [Ping timeout: 256 seconds]
<neanias> Although, some have since been taken down
<Burgestrand> Sweden too.
<neanias> Booo, [k-
<apeiros> ?ot neanias
<ruboto> neanias, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
christiandsg has quit [Remote host closed the connection]
<dudedudeman> ruby
<apeiros> you can tell [k- booo in #ruby-offtopic :-p
<neanias> [k-, fiiiin
<neanias> eee
<adaedra> dudedudeman: France too
ashemark has quit [Quit: leaving]
IanV0rn2341 has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
renderful has quit [Remote host closed the connection]
mistermocha has joined #ruby
senayar has quit [Remote host closed the connection]
bubbys has joined #ruby
<IanV0rn2341> Hi, I'm having trouble setting an allow and a double on a derived class with class methods. My code looks like https://gist.github.com/anonymous/1bd08d955bcebb44b5fe, but however I stub "client", the real one gets called, can anyone advise me on how to set it up correctly?
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
victortyau has quit [Ping timeout: 250 seconds]
christiandsg has joined #ruby
tfittsy has quit [Ping timeout: 264 seconds]
allomov has quit [Remote host closed the connection]
senayar has joined #ruby
sepp2k has joined #ruby
victortyau has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
<IanV0rn2341> np, got it! writing it down helps!
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
<jhass> yw
axl_ has quit [Ping timeout: 245 seconds]
axl__ is now known as axl_
<adaedra> \_o<
<jhass> mmmh
<jhass> I don't get it
<adaedra> it's a duck
<[k-> lel
<neanias> Oh, so it is
<dudedudeman> looks like a sideways person holding a bat
msgodf has quit [Ping timeout: 256 seconds]
<adaedra> So IanV0rn2341 has a thinking duck
<dudedudeman> wait. this isn't #ruby-offtopic
<ddv> ,ot
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ddv> I always forgot the command
<ddv> forget*
<ddv> .ot
<neanias> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<neanias> Boom
<neanias> ?help
<ruboto> You can find an overview of my commands at http://ruby-community.com/ruboto/commands
Xeago has joined #ruby
ryan__ has quit [Read error: Connection reset by peer]
<ddv> why not using !
<adaedra> ?ri Array
<ruboto> Array, I don't know anything about ri
<adaedra> :D
sevenseacat has quit [Quit: Me dun like you no more.]
tfitts has joined #ruby
<[k-> ?botsnack
<ruboto> nomnomnomnom
<ddv> ?sexycommand
<ruboto> I don't know anything about sexycommand
<ddv> lies
unshadow has joined #ruby
<neanias> ?girls
<ruboto> I don't know anything about girls
<neanias> Shame
eGGsha has joined #ruby
<neanias> ?gem_names
<ddv> ?apeiros
<ruboto> I don't know anything about apeiros
IanV0rn2341 has quit []
<ddv> lies
<adaedra> poor bot
<[k-> ?owner
<ruboto> My owner is apeiros, I have many rulers though
bhuvan_aurora has quit [Ping timeout: 250 seconds]
<ddv> ?abuse
<ruboto> I don't know anything about abuse
acke has quit [Remote host closed the connection]
<ddv> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<ddv> lol
bhuvanaurora has quit [Ping timeout: 256 seconds]
<[k-> ?experiment -- Please use local copy of ruboto
<ruboto> --, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
jamesaxl has joined #ruby
<neanias> ?pry
<ruboto> Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<dudedudeman> ?me
<ruboto> I don't know anything about me
tkuchiki has quit [Remote host closed the connection]
<neanias> >> {hello: 'world'}.inspect
<ruboto> neanias # => "{:hello=>\"world\"}" (https://eval.in/393541)
<havenwood> ?ruboto dudedudeman
<ruboto> dudedudeman, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<neanias> >> require 'pp'; pp {hello: 'world'}
<ruboto> neanias # => /tmp/execpad-e3754f67bf90/source-e3754f67bf90:2: syntax error, unexpected ':', expecting '}' ...check link for more (https://eval.in/393542)
<neanias> I broke it
<dudedudeman> :P
acke has joined #ruby
<havenwood> dudedudeman: Ah, someone beat me to it. Just saw the backlog.
<ddv> ?''
<[k-> time out time out!
<ddv> ?'""'
<dudedudeman> havenwood: lol. no worries. it's just comical to see the occasional freakout by ruboto
tkuchiki has joined #ruby
<ddv> ?why
<ruboto> I don't know anything about why
rippa has joined #ruby
ljt has quit [Read error: Connection reset by peer]
Muhannad has joined #ruby
Skelz0r has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 264 seconds]
allomov has joined #ruby
Skelz0r has joined #ruby
<yorickpeterse> ?_why
<ruboto> I don't know anything about _why
<cout> _why, I think :)
<yorickpeterse> :>
<cout> doh!
<cout> he's succcessfully erased himself!
<havenwood> prefixed by an underscore it's properly private
DEac-_ has joined #ruby
joelataylor has joined #ruby
cb__ has joined #ruby
cb__ has quit [Changing host]
cb__ has joined #ruby
<apeiros> ?apeiros ddv
<ruboto> ddv, is nobody. They're one of the four people with founders access in the #ruby channel, owner of ruboto the channel bot and ruby-community.com the companion website for the #ruby channel
<shevy> lol
<shevy> well, failing is easy with ruboto
<ruboto> I don't know anything about life
<shevy> bad ruboto, bad!
<ddv> well thanks :(
<apeiros> oh, dear
<ruboto> ddv, apeiros is nobody. They're one of the four people with founders access in the #ruby channel, owner of ruboto the channel bot and ruby-community.com the companion website for the #ruby channel
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> ddv is nobody!
<ruboto> nice, I don't know anything about ddv
<apeiros> jhass: we did agree on me being nobody, right? and you're anybody?
<shevy> ?ddv nice
<shevy> lol
mary5030 has joined #ruby
<apeiros> fail
<[k-> ?life
<apeiros> ?apeiros ddv
<apeiros> ddv: there. fixed.
<ddv> i'm a nobody
snockerton has joined #ruby
nettoweb has joined #ruby
<ddv> :)
<shevy> who was somebody?
<jhass> apeiros: I told you I can never remember!
hakunin has joined #ruby
mary5030 has joined #ruby
varunwachaspati has joined #ruby
<apeiros> don't worry. ruboto will.
<cout> I used 'anybody' as one of my first irc nicks back in '95 or '96
paulcsmith has quit [Quit: Be back later ...]
<apeiros> ?jhass
<ruboto> jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
poikon has quit [Quit: Connection closed for inactivity]
<ddv> lol
last_staff has quit [Remote host closed the connection]
<shevy> cout cool. did you use mIRC by chance back then?
<ddv> apeiros: you should have something like apeiros is the supreme overlord of #ruby
werelivinginthef has quit [Remote host closed the connection]
<apeiros> ddv: the "one of the four people with founders access" is that
<ddv> breaker of chains, protector of the realm
<jhass> apeiros: do we accept anyone and noone as aliases?
<shevy> ddv depends on the ban-hammer. who is leading? I think sevenseacat :)
paulcsmith has joined #ruby
<apeiros> hehe, yeah, that'd fit ruboto's self description
<apeiros> jhass: I'd reserve those for other people.
jpfuentes2 has joined #ruby
<jhass> mmh
<apeiros> commuting. brb.
<apeiros> (well, right=30min)
<cout> shevy: either ircII or mirc, not sure
jlast_ has quit [Remote host closed the connection]
<cout> shevy: more likely ircII, I think; I had to jump through hoops to get a shell back then
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has quit [Max SendQ exceeded]
<cout> good ol vms/multinet
sharpmachine has joined #ruby
<shevy> hehe
nettoweb has joined #ruby
jlast has joined #ruby
JakFrist has joined #ruby
JDiPierro has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 276 seconds]
JDiPierro has joined #ruby
<maloik> It seems you can only destroy a resque job by specifying the worker class, or by specifying the worker class and each of its arguments... is there no way to destroy one using the worker class and the first of the arguments?
JDiPierro has quit [Remote host closed the connection]
alex88 has quit []
jlast has quit [Read error: Connection reset by peer]
enebo has joined #ruby
<maloik> In our case, we enqueue jobs using a server's hostname and an id. I want to be able to destroy all of the jobs for a certain server, no matter the id
<yorickpeterse> can't you just pop it from the underlying Redis list?
sharpmachine has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<maloik> Technically: probably. Realistically I simply don't know if that's a good idea? Anyone have experience doing that?
<yorickpeterse> No idea, last used Resque 4-ish years ago
wallerdev has joined #ruby
jlast has joined #ruby
<maloik> maybe we should make the workers dumber so that theyre not using the rails env... that would allow us to create a queue per server, and just split the workers across them
<maloik> errr.... assign each one a worker*
livathinos has quit []
dgutierrez1287 has quit [Remote host closed the connection]
<maloik> splitting the workers doesn't work because then it will empty the first queue before moving onto the second
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
williamherry has quit [Quit: WeeChat 1.2]
Scroff has joined #ruby
werelivinginthef has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
eGGsha has joined #ruby
rfv has quit []
rfv has joined #ruby
Scrofff has quit [Ping timeout: 246 seconds]
fmcgeough has joined #ruby
Xeago has quit [Remote host closed the connection]
<yorickpeterse> I'd suggest not tying your queueing code to your Rails app in the first place
djbender has quit []
msgodf has joined #ruby
djbender has joined #ruby
yorickpeterse is now known as steveballmer
paulcsmith has joined #ruby
<steveballmer> MICRO SERVICES MICRO SERVICES MICRO SERVICES MICRO SERVICES MICRO SERVICES
steveballmer is now known as yorickpeterse
<yorickpeterse> "This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>" haha
sharpmachine has joined #ruby
<cout> good ol vms/multinet
<cout> oops wrong window
fantazo has quit [Quit: Verlassend]
<yorickpeterse> heh, steveballmer registered for 7 years
chouhoulis has quit [Read error: Connection reset by peer]
eGGsha has quit [Client Quit]
<shevy> must be another steve
jtdoncas has joined #ruby
<adaedra> yorickpeterse: it's only valid if you run and jump everywhere
<shevy> and scream
chouhoulis has joined #ruby
<shevy> wow... steve ballmer is almost 200 cm tall
<ccooke> All the better to intimidate naysayers
CloCkWeRX has quit [Ping timeout: 248 seconds]
j4cknewt has joined #ruby
<jhass> Last seen : (about 404 weeks ago)
<jhass> yorickpeterse: ^ totally expired, ask #freenode to get it :P
joneshf-laptop has quit [Ping timeout: 265 seconds]
<jhass> and save the log for out entertainment :D
<yorickpeterse> jhass: it has nick protection
<adaedra> Join #linux with it :3
<jhass> yorickpeterse: yes, but if they don't sign in for some 2 yearish you can ask staff to give you the nick
<adaedra> 404 weeks ago
<adaedra> don'tdonotfoundjokesdon'tdonotfoundjokes
agent_white has quit [Quit: brb]
solars has quit [Ping timeout: 256 seconds]
<jhass> yorickpeterse: http://freenode.net/faq.shtml#userexpirations oh, actually much less than two years
NeverDie has joined #ruby
hotpancakes has joined #ruby
Xeago has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<yorickpeterse> jhass: heh
<yorickpeterse> adaedra: I'm unable to find the joke
icebourg has joined #ruby
<jhass> did it move permanently?
<adaedra> It took me some time x_x
andikr has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Burgestrand]
<shevy> adaedra is it hot in france?
ninja-maid-robot has joined #ruby
chouhoulis has joined #ruby
<yorickpeterse> (͡° ͜ʖ ͡°)
chouhoul_ has joined #ruby
chouhoulis has quit [Read error: Connection reset by peer]
skmp has quit []
axl__ has joined #ruby
skmp has joined #ruby
<shevy> adaedra damn cold
<adaedra> kek
hotpancakes has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby
Agoldfish has joined #ruby
khebbie has joined #ruby
solocsha1 has joined #ruby
GitGud has quit [Ping timeout: 264 seconds]
acke has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
genpaku has quit [Ping timeout: 256 seconds]
varunwachaspati has quit [Remote host closed the connection]
luckyruby has quit [Quit: Leaving...]
uri_ has quit [Quit: Textual IRC Client: www.textualapp.com]
gagrio has quit [Ping timeout: 252 seconds]
genpaku has joined #ruby
trouloulious_dev has joined #ruby
JDiPierro has joined #ruby
CatMartyn has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
yardenbar has quit [Quit: Leaving]
apt-get_ has joined #ruby
Torrieri has quit [Quit: Be back later ...]
JDiPierro has joined #ruby
CatMartyn has quit [Max SendQ exceeded]
sarkyniin has quit [Ping timeout: 264 seconds]
CatMartyn has joined #ruby
JDiPierro has quit [Remote host closed the connection]
bf4 has joined #ruby
troulouliou_dev has quit [Ping timeout: 248 seconds]
CloCkWeRX has joined #ruby
apt-get__ has joined #ruby
<neanias> 30C, christ
<adaedra> That's nothing.
tubuliferous_ has joined #ruby
<adaedra> Next step is taking the underground train, which has no A/C system.
yourwebdevguy has joined #ruby
apt-get_ has quit [Ping timeout: 252 seconds]
msnyon has quit [Read error: Connection reset by peer]
<neanias> adaedra: you don't have to tell me
<adaedra> :D
<neanias> London tube = fucking hot
<neanias> Especially when it was up about 35 last week
<neanias> It's really hot and humid down there
<neanias> It's the absolute worst
varunwachaspati has joined #ruby
apt-get_ has joined #ruby
<adaedra> Yeah, I know
<neanias> I did it in a suit once on one of the hottest days of the year
<neanias> I was sweating like a whore in a church
<adaedra> I hope i'll be quick enough to grab a place next to the window
<adaedra> Nice expression mate
bf4 has quit [Ping timeout: 246 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<neanias> It's nigh on impossible to manage that on the tube in rush hour
<yh_> i have that tube to look forward to in the next hour and a bit
apt-get__ has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
pdoherty has joined #ruby
RegulationD has quit [Remote host closed the connection]
solocsha1 has quit [Ping timeout: 255 seconds]
cstrahan has quit []
axl__ has quit [Ping timeout: 245 seconds]
cstrahan has joined #ruby
<neanias> yh_: I feel your pain
ninja-maid-robot is now known as magical-imouto
<neanias> I'm wfh today as the trains are royally fucked her
<neanias> e
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<neanias> Thanks, Greater Anglia!
<shevy> trains
<shevy> did the bitumen and asphalt melt in the UK as well? :)
<adaedra> /___||___||___||___\
<neanias> No
<neanias> There was a problem on a bridge
casadei has joined #ruby
<shevy> "it was missing"
<neanias> Wait
<shevy> lol
<neanias> What would bitumen have to do with it?
senayar has quit [Remote host closed the connection]
<shevy> adaedra that is a train right?
<adaedra> yeah
<shevy> neanias lemme grab a recent picture I saw, a moment
irk has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
<neanias> shevy: what does bitumen have to do with trains though?
mistermocha has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
<neanias> Holy moley
<neanias> No
<neanias> It hasn't got that hot
<neanias> ...yet
DCameronMauch has joined #ruby
<shevy> I saw a slightly similar picture for a train though
<shevy> let me try to find that one
<neanias> Apparently we're due for the hottest day ever soon
<adaedra> We got some molten road in the south
varunwachaspati has quit [Remote host closed the connection]
<neanias> Well, in the extreme heat, they have to run slightly slower to avoid buckling the rails, I think
jenrzzz has quit [Ping timeout: 255 seconds]
<adaedra> yep
doertedev has quit [Ping timeout: 276 seconds]
y0da has joined #ruby
doertedev has joined #ruby
blackmes1 has joined #ruby
irk has joined #ruby
<adaedra> we have the train season cycle: summer: too hot, autumn: leaves on the tracks, winter: cold, spring: ... mh, nothing particular, just people on the tracks.
<shevy> lol
solocsha1 has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
<neanias> Yeah, I had that problem the other day
bronson has joined #ruby
<adaedra> Last noticeable problems we got were ponies, then sheep on the tracks.
jhwhite has quit [Ping timeout: 256 seconds]
axl__ has joined #ruby
willhumphreys has joined #ruby
<shevy> ponies on rails?
jblancett has joined #ruby
<adaedra> And, my favorite is still when they found a WW2 bombshell next to the tracks.
MiracleBlue has quit []
MiracleBlue has joined #ruby
<shevy> ewww
Muhannad has quit [Ping timeout: 252 seconds]
rcvalle has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 248 seconds]
<shevy> quite some excitement to travel by train
senayar has joined #ruby
<adaedra> Yep.
chouhoulis has joined #ruby
<neanias> Still haven't got to ride the TGV...
Xeago has joined #ruby
Scroff has quit [Remote host closed the connection]
<shevy> hmm that reminds me...
doertedev has quit [Ping timeout: 264 seconds]
jhwhite has joined #ruby
Scroff has joined #ruby
Ilyas has joined #ruby
Xeago has quit [Remote host closed the connection]
DaniG2k has quit [Quit: leaving]
acke has joined #ruby
amclain has joined #ruby
<shevy> ah well. I was thinking of some ruby software that would allow two computers to connect and transmit text messages, but I guess icq still exists - if only I could use ruby!
blenny has quit [Max SendQ exceeded]
willhumphreys has quit [Ping timeout: 255 seconds]
blenny has joined #ruby
* jhass hands shevy a random Ruby XMPP client library
<shevy> xamp?
<jhass> xmpp
troydm has left #ruby ["What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset"]
tkuchiki has quit [Remote host closed the connection]
Xeago has joined #ruby
amclain has quit [Client Quit]
cb__ has quit [Remote host closed the connection]
Gnea has quit [Quit: .]
amclain has joined #ruby
DoubleMalt has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
michael_mbp has quit [Excess Flood]
solocsha1 has quit [Ping timeout: 255 seconds]
shredding has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
32NACBO7F has joined #ruby
<adaedra> shevy: you're not on offtopic! D:
<[k-> he never is :(
<shevy> we mentioned ruby!
<shevy> lol what the
<jhass> I should just ban forward him there for a day I guess
<shevy> that's actually hilarious
acke has quit [Read error: Connection reset by peer]
acke has joined #ruby
michael_mbp has joined #ruby
<neanias> adaedra: wut
<neanias> Roma horses?
<shevy> hahaha
amclain has quit [Client Quit]
amclain has joined #ruby
<shevy> if the whole trek would be like that, they could never escape from down there :D
Cache_Money has joined #ruby
<[k-> forward him!
danielpclark has joined #ruby
* shevy downvotes the petition.
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
Xeago has quit [Remote host closed the connection]
* [k- upvotes [1]
* adaedra upvotes
<[k-> [2]
<shevy> #ruby is not a democracy!
Rickmasta has joined #ruby
<[k-> then it's a dictatorship!
<[k-> we order you to join #ruby-offtopic!
<jhass> a good leader listens to his followers though
Xeago has joined #ruby
rehat has joined #ruby
<shevy> you know what happens there [k-
<[k-> a good follower follows the leader too
<shevy> unicode hangman games non-stop :(
<eam> o/ o/ o/ all hail the topic
<shevy> \o
tkuchiki has quit [Remote host closed the connection]
<[k-> it stopped for days already
<shevy> eam is back, quick, don't mention perl
<[k-> pretty much everyone got bored
<[k-> perl
<shevy> [k- yeah... and I am sure if I join, someone will start it right away
<[k-> oops
<eam> shevy: I started writing a blog about neat ruby/perl command line flags for parsing text
<eam> then I learned that -000 doesn't work with "internet" style \r\n newline delimiters
<eam> ruined my whole day
<[k-> ./ignore !!str.match /DeBot/
<shevy> eam huh
<shevy> I don't even know what is -000
<eam> shevy: paragraph split mode
maletor has joined #ruby
maletor has quit [Client Quit]
* [k- sets mode +f shevy$#ruby-offtopic
DCameronMauch has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
axl__ has quit [Ping timeout: 245 seconds]
khebbie has joined #ruby
DCameronMauch has joined #ruby
cb__ has joined #ruby
cb__ has quit [Changing host]
cb__ has joined #ruby
<shevy> [k- let's wait until someone asks a ruby question here
<[k-> you hardly answer!
Torrieri has joined #ruby
Torrieri has joined #ruby
<shevy> let's patiently wait
jlast has quit [Read error: Connection reset by peer]
codecop has joined #ruby
willhumphreys has joined #ruby
casadei has quit [Remote host closed the connection]
<eam> shevy: try this, for example: curl -s http://frap.net/at_the_mountains_of_madness.txt|ruby -000 -ane'BEGIN{$count=1}; puts "paragraph #$i wc: #{$F.length}"'
Xeago has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
Channel6 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<shevy> cool
<eam> the ruby examples always look kinda ugly due to initialization :(
<shevy> that tells me the word count content of every paragraph?
<eam> yeah
DCameronMauch has quit [Client Quit]
cina has quit [Quit: leaving]
<shevy> oh that is ruby... I thought it was perl :D :D :D
<eam> nop, perl can do it much more cleanly though
<shevy> I don't think I would have ever discovered -000
jeremati_ has joined #ruby
codecop has quit [Remote host closed the connection]
jerematic has quit [Ping timeout: 252 seconds]
<hanmac> shevy i recently got an idea for rwx to impl the #hash method for the primary classes where its possible ;P (like Rect, Color and others)
<eam> curl -s http://frap.net/at_the_mountains_of_madness.txt| perl -000 -anle'print "paragraph: ".++$i." wc: ".@F'
Xeago has joined #ruby
<shevy> hanmac YOU ARE BACK - where were you the last 10 weeks?
<shevy> meanwhile someone else took over your job
rbennacer has quit [Remote host closed the connection]
<shevy> Ox0 something
<[k-> cunts using "#$i" global vars imterpolation!
zendrix has joined #ruby
mleung has joined #ruby
<shevy> uh oh if sevenseacat would be online, you'd get banned!
solocsha1 has joined #ruby
<[k-> toobadhisnot
paulcsmith has quit [Quit: Be back later ...]
<havenwood> [k-: O.o
maletor has joined #ruby
<[k-> it's as bad as ->!
<shevy> [k- still nobody has asked a ruby question so far in the last ~10 minutes
<shevy> almost 1100 people here and nobody has a problem with ruby!
__butch__ has joined #ruby
<eam> shevy: how do I change the end of line delimiter used by puts() ?
<shevy> damn
equestrianerd has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jlast has joined #ruby
<shevy> the magic trick, to assign to some $ var isn't it?
<eam> it doesn't seem to respect $\
<shevy> hmmmm
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<eam> (this is an unfair question; I already know the answer)
varunwachaspati has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Igorshp has joined #ruby
<eam> but you know, you were complaining about not having any questions
hotpancakes has joined #ruby
<eam> the answer is: you can't. Ruby hardcodes "\n" as the puts delimiter
mbeasley has joined #ruby
mbeasley has left #ruby [#ruby]
<apeiros> doesn't it use $/ ?
Xeago has quit [Remote host closed the connection]
<eam> $/ is IFS, $\ is OFS
<apeiros> meh, there was something which defined newline
<havenwood> shevy: When might `puts "hi"` be effectively different than `puts "hi\n"`?
<[k-> print then
solocsha1 has quit [Ping timeout: 255 seconds]
<apeiros> hm, right. puts seems to hardcode it :(
equestrianerd has left #ruby [#ruby]
<eam> if this were rb_output_rs it'd be runtime-settable
<eam> maybe a bug?
<shevy> havenwood hmmmmm
S_Walker has joined #ruby
<shevy> we need newcomers ask questions, not veterans!!!
* eam displays scars
<shevy> havenwood I say both are the same!
<eam> apeiros: yeah. rb_rs is hooked to ifs/ofs like rb_output_rs
jpfuentes2 has quit [Remote host closed the connection]
<eam> I wonder if a patch to switch puts to rb_output_rs would be accepted
<eam> might as well try
jpfuentes2 has joined #ruby
josh_be_ has joined #ruby
<havenwood> shevy: In both cases the "hi" and "\n" will be printed but in one they might not be contiguous.
jhwhite_ has joined #ruby
bronson has joined #ruby
<shevy> huh
<eam> havenwood: because ruby uses two write() syscalls in the former case!
arturmartins has quit [Quit: Linkinus - http://linkinus.com]
<havenwood> eam: Winner!
<josh_be_> Hi all, how do I add stylesheets to a .html.erb file in my /app/views?
[k- has left #ruby [#ruby]
<eam> and *that* is to prevent having to copy the input buffer
[k- has joined #ruby
anisha has quit [Quit: Leaving]
bricker has joined #ruby
<shevy> what the
zendrix has quit [Remote host closed the connection]
<eam> (which, arguably, isn't a good optimization considering the speed of memory vs syscall)
<[k-> hello how may I use CRLF in puts
<shevy> are you saying that `puts "hi\n"` is more expensive than `puts "hi"`?
<eam> shevy: other way around
zendrix has joined #ruby
<shevy> hmmm
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zendrix has quit [Remote host closed the connection]
<shevy> who would have known that newlines make your code slower!
<eam> havenwood: hey, maybe we should patch puts to use writev(2)
jhwhite has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
<havenwood> eam: :)
JoshL has quit [Read error: No route to host]
JoshL has joined #ruby
<Senjai> Good morning ruby
axl__ has joined #ruby
<havenwood> Senjai: g'mornin
* neanias goes for a cup of tea
christiandsg has quit [Remote host closed the connection]
<eam> I drank two extra shots of coffee this morning, I'm looking forward to being spastic for the rest of the day
kjones_ has joined #ruby
<shevy> CUI - coding under the influence
yourwebdevguy has quit [Quit: Bye!]
peteykun has quit [Quit: Leaving]
<eam> I've drugged myself :(
kjones_ has quit [Max SendQ exceeded]
<Senjai> eam: I wish coffee did that to me still
<eam> I had to cut way back, I stopped drinking it for a while
<shevy> btw adaedra I am showing the ponies pics to a friend, telling him that it's so hot in france now that they are using ponies rather than trains
<eam> caffine sensitivity will return
solars has joined #ruby
zendrix has joined #ruby
Timba-as has quit [Quit: Be back later ...]
<josh_be_> How do I add stylesheets to a .html.erb file?
hotpancakes has quit [Remote host closed the connection]
<eam> they're using ponies because all their taxis and ubers are getting concrete bricks thrown at them
<apeiros> josh_be_: you add a <style> or a <link> tag
riotjones has joined #ruby
<apeiros> josh_be_: also that's quite unrelated to it being a .erb file. that's a plain html question.
<phat4life> eam: are you using some sort of asset pipline?
<eam> phat4life: I don't do web stuff generally
<josh_be_> apeiros: I tried linking a stylesheet like I would with regular HTML but it didn't come up
<apeiros> eam's a surfer, not a weaver
<phat4life> are you using a framework (sinatra,rails)?
<eam> apeiros: I do have one rails app though!
<apeiros> josh_be_: it won't come up for all the normal reasons it won't come up in html too
<adaedra> shevy: bwahahaha
<apeiros> eam: so you're a surfer and an engine driver!
<eam> phat4life: I've used sinatra and rails (even with Sequel)
<eam> boy, is rails on jruby with sequel not the right platform to learn rails for the first time
<apeiros> josh_be_: also "it won't come up" is not a helpful problem description. an equally helpful solution is "you're doing it wrong then. just do it right"
<phat4life> eam: jruby............
allomov has quit [Read error: Connection reset by peer]
<phat4life> is there even a reason to use jruby, i always though it was because of threads or something
denver has quit [Read error: Connection reset by peer]
bronson has quit [Remote host closed the connection]
<eam> yes, and it's quite fast for long-lived apps. Quite a few bugs though
<apeiros> phat4life: real parallelism, access to java libs
quazimod1 has joined #ruby
<apeiros> phat4life: and in some cases - runs on anything which has a jvm
darkf has quit [Quit: Leaving]
<josh_be_> apeiros: By it won't come up I mean that despite specifying a stylesheet like I would with regular HTML and linking to it via /app/assets/stylesheets/style.css, the webpage still shows the raw HTML
<eam> apeiros: doesn't it have some jni, though?
<apeiros> josh_be_: and what does your browser tell you about the linked file?
<eam> we just ran into this last week: https://github.com/jruby/jruby/pull/3093 (fixed!)
Igorshp has quit [Remote host closed the connection]
<apeiros> eam: no idea. I have little to do with jruby.
riotjones has quit [Ping timeout: 264 seconds]
senayar has quit []
grey_beard has quit [Ping timeout: 252 seconds]
<headius> eam: thanks for that :-)
grey_beard has joined #ruby
<eam> headius: :) btw https://github.com/jruby/jruby/pull/2768 this one pops up every few months for us
<eam> I don't know if a fix is possible
<eam> I kinda wish mri would remove the magic around descriptors and have those gems break for everybody
quazimodo has quit [Ping timeout: 264 seconds]
Aswebb_ has joined #ruby
zendrix has quit [Remote host closed the connection]
<eam> (but that's definitely not gonna happen)
pengin has joined #ruby
allomov has joined #ruby
zendrix has joined #ruby
symbol has joined #ruby
Xeago has quit [Remote host closed the connection]
Igorshp has joined #ruby
Xeago has joined #ruby
<josh_be_> apeiros: No route matches [GET] "/app/assets/stylesheets/main.css
<josh_be_> That's the error I am getting
emptyflask has joined #ruby
denver has joined #ruby
<apeiros> so sounds like your css file is missing
willhumphreys has quit [Ping timeout: 256 seconds]
<apeiros> that's not a problem of your html file…
JoshL has quit []
Xeago has quit [Remote host closed the connection]
<apeiros> (unless of course you put the wrong link in)
<josh_be_> apeiros: I may not be a smart man but I can see the file sitting right there
* [k- starts crying
shadeslayer has quit [Ping timeout: 276 seconds]
spider-mario has joined #ruby
<apeiros> josh_be_: is this rails?
shadeslayer has joined #ruby
<josh_be_> apeiros: yes
blackmes1 has quit [Ping timeout: 264 seconds]
<apeiros> ok, a) #rubyonrails, b) rails does not expose /app
<apeiros> your link therefore must not include that
<apeiros> /app/assets/stylesheets/main.css will end up in /assets/main.css
<josh_be_> So I have to move my assets?
<apeiros> you should use the helper methods
<josh_be_> okay i understand
<apeiros> josh_be_: no. you have to use the proper channel to ask your question and you have to use the proper methods to link your assets.
rbennacer has joined #ruby
josh_be_ has left #ruby [#ruby]
ferr has quit [Ping timeout: 255 seconds]
zendrix has quit [Ping timeout: 256 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
benlieb has joined #ruby
<eam> Igorshp: override in what way?
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> if you want it to think there isn't a tty, pipe the command into cat: thing.rb | cat
aryaching_ has joined #ruby
jerematic has joined #ruby
<Igorshp> eam: it's being run from jenkins-ci and tty? is used in logger to flip color output on/off. i need to force it to return true
<eam> if you want it to think there is (when it's say, running from a cronjob) you can use screen, tmux, etc
<apeiros> Igorshp: can't you set colored output explicitly via an option?
shinnya has joined #ruby
<apeiros> at least I understand that's all you really want…
jeremati_ has quit [Read error: Connection reset by peer]
<Igorshp> apeiros: nope, they didnt' include that option
aryaching has quit [Ping timeout: 264 seconds]
<eam> other stuff might break if it thinks there's a terminal and there isn't (cursor repositioning, etc)
RegulationD has joined #ruby
paulcsmith has joined #ruby
k3asd`_ has joined #ruby
RegulationD has quit [Remote host closed the connection]
<apeiros> Igorshp: fork, patch & PR?
timonv has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
<Igorshp> apeiros: yeah, but that will take a while to get get processed and released
<eam> you can run your forked version internally
eGGsha has joined #ruby
<eam> Igorshp: add a gem that does this: $stdout.instance_eval { def tty?; false; end }
<eam> ;-)
<eam> er, except return true
<Igorshp> :) heh
randiman has joined #ruby
k3asd` has quit [Ping timeout: 252 seconds]
t_ has quit [Ping timeout: 252 seconds]
<eam> (not even kidding, it's probably the cleanest way to lie)
hotpancakes has joined #ruby
nofxx has quit [Ping timeout: 255 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
RobertBirnie has joined #ruby
_blizzy_ has joined #ruby
lavros has quit [Ping timeout: 250 seconds]
sgambino has quit [Ping timeout: 244 seconds]
Scroff has quit [Remote host closed the connection]
shadoi has joined #ruby
lavros has joined #ruby
Scroff has joined #ruby
atom3 has quit [*.net *.split]
EvilJStoker has quit [*.net *.split]
Ca1us has quit [*.net *.split]
zack6849 has quit [*.net *.split]
JStoker has quit [*.net *.split]
ddfreyne has quit [*.net *.split]
ElderFain has quit [*.net *.split]
Fluent has quit [*.net *.split]
RealMarc has quit [*.net *.split]
Cybergeek_ has quit [*.net *.split]
dbussink has quit [*.net *.split]
cj has quit [*.net *.split]
leslie has quit [*.net *.split]
rj-code has quit [*.net *.split]
jtdoncas has quit [Quit: WeeChat 1.1.1]
hotpancakes has quit [Ping timeout: 264 seconds]
cj has joined #ruby
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
Cybergeek has joined #ruby
dbussink has joined #ruby
Fluent has joined #ruby
ddfreyne has joined #ruby
ElderFain has joined #ruby
EvilJStoker has joined #ruby
JStoker has joined #ruby
RealMarc has joined #ruby
zack6849 has joined #ruby
zack6849 has quit [Changing host]
zack6849 has joined #ruby
fabrice31 has joined #ruby
howdoicomputer has joined #ruby
Kully3xf has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 248 seconds]
chinmay_dd has quit [Quit: Leaving]
slumos has left #ruby [#ruby]
Caius has joined #ruby
rj-code has joined #ruby
sulky has quit [Ping timeout: 256 seconds]
sulky has joined #ruby
atom3 has joined #ruby
t_ has joined #ruby
solars has quit [Ping timeout: 246 seconds]
psy_ has quit [Ping timeout: 252 seconds]
ruby-lang926 has joined #ruby
f3lp has joined #ruby
mleung has quit [Quit: mleung]
Scroff has quit [Remote host closed the connection]
trouloulious_dev has quit [Quit: Leaving]
fabrice31 has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
fabrice31 has joined #ruby
AlphaAtom has joined #ruby
<Igorshp> eam: i was hoping for a bash only method like running the command through 'script -c' or via 'emtpy'
<eam> Igorshp: bash only method would be "run it with stdout connected to a terminal"
lavros has quit [Quit: leaving]
icebourg has quit []
casadei has joined #ruby
<Igorshp> not sure how to best to it in jenkins
<eam> there are some other really crazy things you could do under the ruby layer, but none are a good idea
sshuff is now known as sshuff|food
dumdedum has quit [Ping timeout: 252 seconds]
sulky has quit [Ping timeout: 276 seconds]
yh_ has quit [Quit: leaving]
<Igorshp> it's pretty simple to override if I was running kitchen from inside another ruby script. but from bash....
JakFrist has joined #ruby
<eam> Igorshp: the thing is, a terminal isn't a dumb pipe of bytes -- and the concepts it represents aren't a good fit for piping into a logfile
yardenbar has joined #ruby
tvw has quit [Ping timeout: 252 seconds]
sulky has joined #ruby
wallerdev_ has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
NeverDie_ has joined #ruby
<eam> Igorshp: why not use a gem?
olistik has quit [Remote host closed the connection]
psy_ has joined #ruby
bronson has joined #ruby
AlphaAtom has quit [Client Quit]
<Igorshp> how would the gem be loaded?
psy_ has quit [Max SendQ exceeded]
<eam> Igorshp: ruby -ryour_gem your_script.rb
ruby-lang926 has quit [Quit: Page closed]
zendrix has joined #ruby
white_bear has quit [Quit: leaving]
<eam> easy to insert arbitrary code that way, prior to script execution
<Igorshp> hmm
psy_ has joined #ruby
<eam> my_stdout_shim.rb: BEGIN {$stdout.instance_eval { def tty?; true; end }}
<eam> and -r it
christiandsg has joined #ruby
yaw has joined #ruby
eggoez has quit [Ping timeout: 264 seconds]
howdoicomputer has quit [Quit: WeeChat 1.2]
yaw has quit [Max SendQ exceeded]
howdoicomputer has joined #ruby
NeverDie has quit [Ping timeout: 255 seconds]
cir0x has joined #ruby
apt-get_ has quit [Ping timeout: 265 seconds]
melter has quit [Remote host closed the connection]
railsraider has joined #ruby
<Igorshp> i'll give that a try, thanks
<Igorshp> eam: trying to wrap my head around this as kitchen is run from a bash start script
melter has joined #ruby
<Igorshp> the entry point is not a ruby file
apt-get_ has joined #ruby
[k- has quit [Ping timeout: 264 seconds]
<eam> well, sure, but you're editing that shell script right?
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eggoez has joined #ruby
yaw has joined #ruby
Marsupermammal has joined #ruby
AlphaAtom has joined #ruby
withnale_ has quit [Ping timeout: 264 seconds]
<cout> yay, got ruby to crash in a call to exit()
yaw has quit [Max SendQ exceeded]
Carnage\ has joined #ruby
ruby-lang116 has joined #ruby
randiman has quit [Quit: (null)]
woodennails has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
bf4 has joined #ruby
<eam> ok at some point in the last few months the autoconf config has changed such that it no longer builds on osx
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> this is not what I wanted to be fixing today
momomomomo has quit [Quit: momomomomo]
<eam> anyone else build trunk on osx?
gambl0re has joined #ruby
<jhass> havenwood I'd guess
hotpancakes has joined #ruby
dgutierrez1287 has joined #ruby
lxsameer has joined #ruby
<eam> I just skipped back to a sha from march and no issues, but current trunk bails with bad syntax in exts.mk:41 "multiple target patterns"
Igorshp has quit [Remote host closed the connection]
<eam> I wish apple would provide travis-ci for osx
bronson has quit [Remote host closed the connection]
bf4 has quit [Ping timeout: 248 seconds]
hotpanca_ has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
catphish has quit [Quit: Leaving]
Jackneill has joined #ruby
<miah> travis-ci has osx builders
dgutierrez1287 has quit [Ping timeout: 276 seconds]
ta has joined #ruby
sgambino has joined #ruby
hotpancakes has quit [Ping timeout: 248 seconds]
<phat4life> miah: bought time
eGGsha is now known as eGGshke
yourwebdevguy has joined #ruby
zendrix has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> miah: yeah it exists but you can't use it :)
crdpink has joined #ruby
<eam> "We are not currently accepting multi-OS requests"
<eam> Need someone like apple to step in and fund an environment
cir0x has quit [Quit: Leaving.]
crdpink2 has quit [Ping timeout: 248 seconds]
<bricker> What non-programming IRC channels do you people lurk?
eGGshke is now known as eGGsha
AlphaAtom has joined #ruby
hotpancakes has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
woodennails has quit [Quit: Textual IRC Client: www.textualapp.com]
lxsameer has quit [Ping timeout: 256 seconds]
thebastl has quit [Remote host closed the connection]
<eam> #ruby-offtopic
Xeago has joined #ruby
<bricker> lol
towski_ has joined #ruby
zendrix has joined #ruby
<shevy> :(
jenrzzz has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lessless has joined #ruby
jaycee has joined #ruby
<shevy> I am not in many channels bricker
<shevy> 5 in total; I try to keep that number small
<bricker> I'm only in 3 I beat you
<bricker> but I would like to have a few non-programming ones too
<Senjai> bricker: I lurk in a few gaming related ones
<Senjai> bricker: #cataclysmdda, dwarf fortress etc
<bricker> mmm
<bricker> I don't know what those things are
<Senjai> Most good generic channels exist on other networks imo
<bricker> yeah
<Senjai> They're roguelikes
CloCkWeRX has quit [Remote host closed the connection]
<bricker> maybe I'll look through the reddit IRC channels
<bricker> maybe some good stuff in there
<Senjai> Aye, that's what I did
gambl0re has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
k3asd`_ has quit [Ping timeout: 276 seconds]
lkba_ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
<arup_r> I have 2 classes which are using the same method for some work. Those 2 classes are under same module. Where should I keep the same method to make it DRY ? https://gist.github.com/aruprakshit/7b2e9259367c0c9767fb
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai> arup_r: No fake code please.
<apeiros> arup_r: module A; module Common; def here; …
<apeiros> and then include that module
<Senjai> arup_r: What's the actual code look like
<Senjai> apeiros: Not necessarily, it depends on what the method does
sshuff|food is now known as sshuff
<apeiros> Senjai: not really
<Senjai> If it's complex, it could be extracted to a method object
mistermocha has joined #ruby
<Senjai> Also, if each class is similar, they should probably inherit from a common ancestor
<Senjai> so yeah, depends on the actual code
<apeiros> module inclusion is inheritance
cb__ has quit []
<arup_r> apeiros: thanks
<apeiros> without some of its restrictions
diegoviola has joined #ruby
fella5s has quit [Read error: Connection reset by peer]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
senayar has joined #ruby
jalcine is now known as jacky
Xiti has quit [Quit: Xiti]
Narzew has quit [Ping timeout: 264 seconds]
jhwhite_ has quit [Read error: Connection reset by peer]
<arup_r> Senjai: here is the common method https://gist.github.com/aruprakshit/7b2e9259367c0c9767fb#file-e24_payment_pipe-rb-L27 .. I am refactoring the paymentpipe so it might look like ugly
<arup_r> but for now simple_xor method is duplicated
Narzew has joined #ruby
<Senjai> arup_r: Go with what apeiros suggested
<arup_r> as I don't have much info .. so I think I should go with what apeiros : said
mary5030 has quit [Remote host closed the connection]
<arup_r> humm.. thanks
<arup_r> both of you
flaf has left #ruby ["WeeChat 1.0.1"]
icebourg has joined #ruby
Torrieri has quit [Quit: Be back later ...]
mistermocha has quit [Ping timeout: 265 seconds]
Xiti has joined #ruby
jaycee has quit [Read error: Connection reset by peer]
blaines_ has joined #ruby
yokel has quit [Ping timeout: 248 seconds]
jhwhite has joined #ruby
<eam> I'm going to go nuts here; after doing a bisect I've determined ... ruby now builds fine on osx - some temporary file is being carried over between builds and making it succeed or fail :(
momomomomo has joined #ruby
yokel has joined #ruby
Kully3xf has joined #ruby
<jhass> and make clean doesn't nuke it?
veekram has joined #ruby
mleung has joined #ruby
Xeago has quit [Remote host closed the connection]
<veekram> Konichiwa ! Everyone :)
<eam> jhass: it didn't at first, but at some point bouncing around in the history it seems to have
<eam> knowing me I probably did something terrible and forgot about it
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
podman has joined #ruby
jhwhite has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
ruby-lang116 has quit [Quit: Page closed]
t_ has quit [Ping timeout: 264 seconds]
axl__ has quit [Ping timeout: 245 seconds]
christiandsg has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
loc22 has joined #ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<loc22> Hi guys, quick question. Anyone knows what is the equivalent to --binary-data (cURL) in 'http/net' ?
AlphaAtom has joined #ruby
t_ has joined #ruby
khebbie has joined #ruby
Scroff has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
momomomomo_ has joined #ruby
ixti has quit [Ping timeout: 244 seconds]
AlphaAtom has joined #ruby
momomomomo has quit [Ping timeout: 256 seconds]
momomomomo_ is now known as momomomomo
jhwhite has joined #ruby
alakra has quit [Quit: WeeChat 0.4.2]
Carnage\ has quit [Remote host closed the connection]
choke has joined #ruby
solocsha1 has joined #ruby
apt-get_ has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
jhwhite has quit [Client Quit]
AlphaAtom has joined #ruby
t_ has quit [Ping timeout: 255 seconds]
haxrbyte has joined #ruby
AlphaAtom has quit [Client Quit]
pen has quit [Remote host closed the connection]
jeanlinux has joined #ruby
momomomomo has quit [Quit: momomomomo]
zendrix has quit [Remote host closed the connection]
Marsupermammal has joined #ruby
solocsha1 has quit [Ping timeout: 255 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
bf4 has joined #ruby
NeverDie has quit [Client Quit]
momomomomo has joined #ruby
bffff_ has joined #ruby
NeverDie has joined #ruby
icflournoy has quit [Ping timeout: 244 seconds]
<bodie_> I'm using chruby + ruby-install to manage my ruby versions
howdoicomputer has quit [Ping timeout: 276 seconds]
jackjackdripper has joined #ruby
jeanlinux has quit [Remote host closed the connection]
<bodie_> ruby -e 'puts Gem.user_dir' shows a path for 2.2.0 but I'm using ruby 2.2.2 via chruby
NeverDie_ has quit [Ping timeout: 264 seconds]
slumos has joined #ruby
icflournoy has joined #ruby
genpaku has quit [Ping timeout: 264 seconds]
reset has joined #ruby
reset has quit [Client Quit]
freerobby has joined #ruby
<Senjai> bodie_: Thats intended
leonardoajim has quit [Quit: Be back later ...]
<Senjai> bodie_: 2.2.x should all have the same gem path
<bodie_> okay, cool
<Senjai> as each gem shouldn't break with patch version releases
ndrei has joined #ruby
genpaku has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Torrieri has joined #ruby
<Senjai> It's part of rubys switch to semver iirl
<Senjai> iirc*
t_ has joined #ruby
leonardoajim has joined #ruby
veekram has quit [Quit: Lost terminal]
bmurt has joined #ruby
* bodie_ smacks the page with an "APPROVED" stamp
DLSteve has joined #ruby
Torrieri has quit [Client Quit]
lee-jon has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
appledroid has joined #ruby
Xeago has quit [Remote host closed the connection]
apt-get_ has joined #ruby
leonardoajim has quit [Ping timeout: 252 seconds]
<bodie_> Senjai, is there a "right way" to deal with Bundle?
jordsmi has joined #ruby
Xeago has joined #ruby
<bodie_> I'm just getting into ruby at a basic level, but I need to get some deps and I don't want to mess stuff up
<bodie_> never mind, I'm being dumb
ixti has joined #ruby
jerius has quit [Quit: /quit]
bikram has joined #ruby
JoshL has joined #ruby
baweaver has joined #ruby
hotpancakes has quit [Remote host closed the connection]
jerius has joined #ruby
bikram is now known as veekram
iateadonut has quit [Quit: Leaving.]
haxrbyte_ has joined #ruby
gattuso has quit [Read error: Connection reset by peer]
tsou has quit [Ping timeout: 250 seconds]
cir0x has joined #ruby
wpp has joined #ruby
AlphaAtom has joined #ruby
rdark has quit [Quit: leaving]
zendrix has joined #ruby
joneshf-laptop has joined #ruby
sargas has joined #ruby
denver has quit [Read error: Connection reset by peer]
hotpanca_ has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
AlphaAtom has quit [Max SendQ exceeded]
bronson has quit [Remote host closed the connection]
msnyon has joined #ruby
seal has joined #ruby
<diegoviola> redis is in memory key/value store, it doesn't touch the disk, right?
<eam> diegoviola: correct, unless it pages
sargas has quit [Client Quit]
<diegoviola> ok
<diegoviola> so if I restart the server everything is lost
<eam> yes
<diegoviola> ok ty
<apeiros> I think it can write to disk
<eam> you can configure bgsave or other replication methods
_blizzy_ has joined #ruby
nettoweb has joined #ruby
<eam> but none are transactional
<diegoviola> ty
<apeiros> but there certainly is a redis channel
<diegoviola> sorry
Xeago has quit [Remote host closed the connection]
gattuso has joined #ruby
<jhass> doesn't redis periodically persist to disk by default?
<jhass> at least my log claims so
<eam> bgsave might be the default
<jhass> it just keeps the entire db in memory
<eam> bgsave is a periodic fork/save
bronson has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emptyflask has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
AlphaAtom has joined #ruby
<Senjai> By default, I believe redis periodically stores state to the disk, but you're never guarenteed when it will.
finisherr has joined #ruby
blackmes1 has joined #ruby
<Senjai> Or what data is actually persisted
rawtext has joined #ruby
<Senjai> iirc
<Senjai> my redis foo is limited
Kully3xf has quit [Remote host closed the connection]
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
joelataylor has quit [Quit: Be back later ...]
pen has joined #ruby
joelataylor has joined #ruby
lkba has joined #ruby
Aswebb_ has quit [Ping timeout: 256 seconds]
zendrix has quit [Remote host closed the connection]
gattuso has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
lee-jon has left #ruby [#ruby]
Aswebb_ has joined #ruby
okdas has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
AlphaAtom has quit [Client Quit]
timonv has joined #ruby
lkba_ has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
Internet_ has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
howdoicomputer has joined #ruby
mistermocha has joined #ruby
zendrix has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
apt-get__ has joined #ruby
AlphaAtom has joined #ruby
ruurd has joined #ruby
bnobu has joined #ruby
Internet_ has quit [Client Quit]
AlphaAtom has quit [Max SendQ exceeded]
bayed has quit [Quit: Connection closed for inactivity]
abuzze has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
baweaver has joined #ruby
gattuso has joined #ruby
apt-get_ has quit [Ping timeout: 256 seconds]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
ruurd has quit [Client Quit]
x1337807x has quit [Max SendQ exceeded]
chouhoul_ has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
loc22 has quit [Quit: Be back later ...]
arooni-mobile__ has joined #ruby
arooni-mobile has joined #ruby
mistermocha has quit [Ping timeout: 248 seconds]
x1337807x has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby
InternetFriend has joined #ruby
_whitelogger_ has joined #ruby
hardy_ has left #ruby [#ruby]
drPoggs has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
nitenq has joined #ruby
<nitenq> hi there, Is there a ruby way to get all the ip and netmask of a linux machine ?
subsonik has joined #ruby
gamename has joined #ruby
christiandsg has joined #ruby
EvilJStoker has joined #ruby
elektronaut has joined #ruby
drPoggs has joined #ruby
firevolt_ is now known as firevolt
tomaz_b has joined #ruby
nofxx has quit [Ping timeout: 255 seconds]
Channel6 has quit [Quit: Leaving]
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
JakFrist has joined #ruby
abuzze has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
railsraider has quit [Quit: railsraider]
<shevy> well I can obtain the IP for localhost nitenq
<shevy> IPSocket.getaddress 'localhost' # => "127.0.0.1"
<shevy> :D
nateberkopec has quit [Quit: Leaving...]
<nitenq> well I did it that way
<nitenq> Socket.ip_address_list.select{|intf| intf.ipv4?}
thebastl has joined #ruby
<nitenq> but I don’t have the netmask
christiandsg has quit [Ping timeout: 265 seconds]
wallerdev_ has quit [Quit: wallerdev_]
okdas has joined #ruby
okdas has joined #ruby
Anthony__ has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
genpaku has quit [Ping timeout: 248 seconds]
yokel has quit [Ping timeout: 264 seconds]
joonty has joined #ruby
stef204 has quit [Ping timeout: 252 seconds]
JoshL has quit [Remote host closed the connection]
okdas has quit [Max SendQ exceeded]
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
<nitenq> shevy:
emptyflask has joined #ruby
howdoicomputer has quit [Quit: WeeChat 1.2]
<nitenq> is there another way than parsing ifconfig/ipconfig ?
JoshL has joined #ruby
howdoicomputer has joined #ruby
wpp has quit []
genpaku has joined #ruby
nateberkopec has joined #ruby
AlphaAtom has quit [Excess Flood]
bhuvan_aurora has joined #ruby
bhuvanaurora has joined #ruby
yokel has joined #ruby
zendrix has quit [Remote host closed the connection]
JoshL has quit [Read error: Connection reset by peer]
JoshL has joined #ruby
caseypatrickdris has joined #ruby
<shevy> not that I know, but I know only little about ruby-ways; I usually just use already existing tools, such as: result = `ifconfig -a` or whatever the switches are
caseypatrickdris has quit [Remote host closed the connection]
serivich has quit [Ping timeout: 248 seconds]
ndrei has quit [Ping timeout: 256 seconds]
Torrieri has joined #ruby
<nitenq> ok thanks
gix has joined #ruby
workmad3 has joined #ruby
phutchins has quit [Ping timeout: 252 seconds]
joonty has quit [Quit: joonty]
<izzol> nitenq: you can check ip's from the /proc/tcp too
<izzol> sorry, /proc/net/tcp.
<nitenq> yeah I just didn’t want to parse something like this
hotpanca_ has quit [Remote host closed the connection]
<nitenq> but it’s ok thanks
msmith_ has joined #ruby
<miah> s/ifconfig -a/ip a l/
<izzol> yes, on the linux it's better to use just ip command
subsonik has quit [Quit: Leaving]
<eam> nitenq: getting "the ip" is a difficult concept to get right - machines can have many addresses for many various purposes
<eam> generally what you want is the ip address of the interface which holds the default route
Musashi007 has joined #ruby
<jhass> nitenq: Socket.getifaddrs has it apparently
toretore has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<nitenq> eam: I want the ip I have by typing ifconfig
baweaver has joined #ruby
jenrzzz has joined #ruby
<eam> nitenq: sure, the question is: which one
<nitenq> eam: all of them
JDiPierro has joined #ruby
<nitenq> izzol: but don’t you have to create the ip yourself ?
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
<eam> nitenq: ah, you want all interfaces and not a particular one? /proc/net/dev is the linux-specific place to scrape that from (unless you just parse ifconfig)
msmith_ has quit [Remote host closed the connection]
<eam> ifconfig is a bit more portable, but its output changes so you'll have to do funny things there anyway
<eam> newer systems would use `ip addr`
* jhass would imagine Socket.getifaddrs has all that abstracted away
<izzol> nitenq: so you need to have interfaces or ip's?
<nitenq> eam: yes basically I want an array : ip[0] = 127.0.0.1/22 ip[1] = 192.168.42.42/12 etc
JDiPierro has quit [Remote host closed the connection]
<eam> nitenq: jhass' solution is probably best
<eam> if you want "the" ip, there are some additional tricks
hotpancakes has joined #ruby
<izzol> nitenq: I would not keep my ip's in array ;P but anyway, you can simply create it as: array << `ip a l | grep ....`
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prettiestPony11 has joined #ruby
aryaching has joined #ruby
gizmore has joined #ruby
<nitenq> izzol: why that ?
Xeago has joined #ruby
peter_paule has joined #ruby
railsraider has joined #ruby
railsraider has left #ruby [#ruby]
codecop has joined #ruby
JoshL has quit [Read error: Connection reset by peer]
<eam> I just realized why I hadn't seen getifaddrs; new in 2
JoshL has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
jenrzzz has quit [Ping timeout: 252 seconds]
aryaching_ has quit [Ping timeout: 252 seconds]
davedev24_ has quit [Ping timeout: 246 seconds]
davedev2_ has joined #ruby
baweaver has quit [Remote host closed the connection]
prettiestPony11 has quit [Ping timeout: 264 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
thebastl has quit [Quit: Leaving...]
lokulin has joined #ruby
prettiestPony11 has joined #ruby
prettiestPony11 has quit [Max SendQ exceeded]
baweaver has joined #ruby
<izzol> nitenq: I think it will be hard to say on which element I will have which IP, and if for some reason you will have different output from the ip/ifconfig you will have them on different position in array.
<izzol> But that's just my opinion ;P
bosma is now known as hodI
autrilla has joined #ruby
bhuvanaurora has quit [Ping timeout: 252 seconds]
<izzol> but I guess it depends on, if you want to have just a list of ip's or if you want to do something with the specific ip
prettiestPony11 has joined #ruby
prettiestPony11 has quit [Client Quit]
JDiPierro has joined #ruby
bhuvan_aurora has quit [Ping timeout: 256 seconds]
prettiestPony11 has joined #ruby
gusrub has joined #ruby
prettiestPony11 has quit [Max SendQ exceeded]
appledroid has quit [Quit: Textual IRC Client: www.textualapp.com]
<izzol> ok, time for wiesen mühle ;P
sharpmachine has quit [Remote host closed the connection]
Anthony__ has quit [Ping timeout: 248 seconds]
drew0 has joined #ruby
loc22 has joined #ruby
<shevy> ohhh so german
baweaver has quit [Ping timeout: 265 seconds]
frem has joined #ruby
yourwebdevguy has quit [Quit: Bye!]
<izzol> shevy: it's just the name of the beer ;P
<adaedra> bier*
<izzol> :)
delianides has joined #ruby
delianides has quit [Remote host closed the connection]
<shevy> adaedra aha now I see what you like about german culture
<adaedra> oh, shevy.
<adaedra> if you knew how wrong you were.
howdoi has quit [Quit: Connection closed for inactivity]
jfarmer has joined #ruby
delianides has joined #ruby
delianides has quit [Remote host closed the connection]
jblancett has quit [Quit: Lost terminal]
delianides has joined #ruby
railsraider has joined #ruby
delianides has quit [Remote host closed the connection]
railsraider has quit [Client Quit]
bronson has quit [Remote host closed the connection]
Notte has joined #ruby
pskosinski has joined #ruby
zendrix has joined #ruby
dinhani has joined #ruby
peter_paule has quit [Ping timeout: 264 seconds]
k3asd` has joined #ruby
workmad3 has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nettoweb has joined #ruby
sharpmachine has joined #ruby
mistermocha has joined #ruby
djbkd has joined #ruby
JoshL has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
jerius has quit [Quit: /quit]
JoshL has joined #ruby
yardenbar has quit [Quit: Leaving]
jerius has joined #ruby
jerius has quit [Client Quit]
jenrzzz has joined #ruby
f3lp has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
jerius has joined #ruby
platzhirsch has left #ruby [#ruby]
olistik has joined #ruby
rawtext has quit [Quit: Textual IRC Client: www.textualapp.com]
multi_io has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 248 seconds]
JoshL_ has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mesamoo has joined #ruby
JoshL has quit [Read error: No route to host]
multi_io has joined #ruby
_ht has quit [Quit: Konversation terminated!]
riceandbeans has joined #ruby
<shevy> adaedra are you hacking on ruby code right now
<riceandbeans> is it best practice to do filecontent = File.open("path", "r")
GitGud has joined #ruby
<riceandbeans> and later do
<riceandbeans> filecontent.close
<adaedra> shevy: no
Scroff has quit [Remote host closed the connection]
Scroff has joined #ruby
Igorshp has joined #ruby
jblancett has joined #ruby
Scroff has quit [Remote host closed the connection]
j4cknewt has quit []
bronson has joined #ruby
InternetFriend has joined #ruby
Scroff has joined #ruby
<miah> i can even open up vim
<miah> s/can/cant
<shevy> you can't even type today!
<miah> indeed.
<riceandbeans> try emacs instead
<shevy> it's ok, the heatwave is killing everything all around the world right now
<jfarmer> riceandbeans File.oopen("path", "r") doesn't return the contents of the file.
<jfarmer> open*
<shevy> riceandbeans nah it is not usually used because you can omit the .close, if you use the {} block variant
<miah> interesting as im feeling burnt out
dagda1 has joined #ruby
<riceandbeans> shevy: just seemed wrong but a guy at my company was teaching ruby that way
nertzy has joined #ruby
momomomomo_ has joined #ruby
jpfuentes2 has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
<miah> you should discuss with them your findings, with a test to prove your case
<shevy> well perhaps he has some reason, or it's a style preferences
<miah> maybe they are testing you, maybe they made a mistake
<shevy> I think I was using the .close variant too, until I found out that one can omit it if one uses the {} variant
momomomomo has quit [Ping timeout: 256 seconds]
momomomomo_ is now known as momomomomo
veekram has quit [Quit: leaving]
joast has joined #ruby
postmodern has joined #ruby
<riceandbeans> no this was a class to teach people proper best practices and fundamentals in ruby
Shidash has quit [Ping timeout: 256 seconds]
apt-get_ has joined #ruby
stef204 has joined #ruby
<shevy> well there is a lot of code out there that is no longer ideal
<jfarmer> riceandbeans Calling File.open("path", "r") is fine
<shevy> some ruby 1.8.x idioms; for instance:
<jfarmer> It returns a file handle, not the literal contents of the file
leonardoajim has joined #ruby
<shevy> string[-3,3] == '.rb' versus string.end_with? '.rb' # Which variant do you prefer?
solocsha1 has joined #ruby
<miah> 'filecontent = File.open...' is bad variable naming
<jfarmer> riceandbeans file = File.open("path", "r"); file_contents = file.read
cir0x has quit [Quit: Leaving.]
<jfarmer> That is neither good nor bad per se. It depends on what's in the file, what you intend to do with the contents, and any performance or memory constraints your program might have.
<miah> you dont even have to tecnically do the File.open bit
<miah> as File.read will do that too
<jfarmer> miah Sure, just relating it to the code that he wrote originally
<miah> ya
Scroff has quit [Ping timeout: 264 seconds]
<miah> it will also automatically close once the read is complete
apt-get__ has quit [Ping timeout: 256 seconds]
<jfarmer> For example, if the file contains 10GB of data then calling file.read is _probably_ a bad idea: it will read all 10GB into memory and return a Ruby String containing the contents.
allomov has quit [Remote host closed the connection]
abuzze has quit [Remote host closed the connection]
<jfarmer> But maybe not if you have a super fast hard drive and like 1TB of RAM
<jfarmer> And you get some benefit from having all that data in memory at the same time
<miah> right
zendrix has quit [Remote host closed the connection]
<riceandbeans> omg fake nerd at work
<riceandbeans> star wars the next generation
wallerdev_ has joined #ruby
<shevy> riceandbeans give your friend 22 points out of 100 for his code :D
<shevy> oh I read that as Star Trek for a moment
solocsha1 has quit [Ping timeout: 255 seconds]
<pipework> Star Trek: A new hope
<shevy> I always cheered for the BORG
jblancett has quit [Quit: Lost terminal]
jblancett has joined #ruby
zendrix has joined #ruby
peter_paule has joined #ruby
sargas has joined #ruby
sargas has quit [Changing host]
sargas has joined #ruby
kinduff has joined #ruby
kinduff has joined #ruby
<apeiros> the borg are great, they just have horrible marketing.
baweaver has joined #ruby
sargas has quit [Client Quit]
<apeiros> also a little inflexible with regards to their product palette
dgutierrez1287 has joined #ruby
<shevy> lol
<eam> there's a reason google engineers picked them to represent their infrastructure ;-)
mesamoo has joined #ruby
<shevy> they are nerds
<riceandbeans> nerds are lame
<arup_r> :/
<adaedra> :/
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<apeiros> riceandbeans: dangerous to say with many channel ops self-identifying as nerds :-p
bronson has quit [Remote host closed the connection]
Lucky_ has joined #ruby
arooni-mobile__ has quit [Ping timeout: 248 seconds]
arooni-mobile has quit [Ping timeout: 248 seconds]
<eam> I mean, "lame" means physically disabled so
<adaedra> it does?
<eam> yeah, like a lame horse
<riceandbeans> apeiros: it was supposed to be ironic with me being a nerd too
<pipework> eam: Horses are cool!
<pipework> Ain't no such thing as a lame horse.
<eam> that's the etymology of the popular slang, lame as in "doesn't function properly"
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<eam> like "busted"
<eam> or "retarded"
<pipework> If linux users are lusers, are rubyists rusers, or is that racist?
Shidash has joined #ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> I don't think rubyists are a race…
<shevy> we are a race of poetry
<pipework> apeiros: You're either extending the joke or missing the joke entirely, either way it's still funny.
<jhass> I don't think racism is about race…
<riceandbeans> I don't think racism is funny
<pipework> riceandbeans: It's a joke about the reuse of a term to fit another. similar to how the acronym LUG has been extended.
<arup_r> I can't think anything except PhP :p
<shevy> arup_r did you finish porting
jordsmi has quit [Quit: Connection closed for inactivity]
<riceandbeans> what?
<pipework> arup_r: Did you also complete starboarding?
<shevy> I almost finished! At about 98% ... may finish today \o/ but it was ruby code not php
<pipework> shevy: Blessed is the one that writes ruby and forsakes PHP.
<arup_r> shevy: 80% .. after that.. I don't a 2 nested loops inside a function what is doing.. so I left as it is.. :)
<pipework> For they shall not inherit the wordpress.
<riceandbeans> I also do perl and forsake php
<arup_r> don't get**
<shevy> well, wordpress should be written in ruby
<arup_r> pipework: what do you mean ?
<riceandbeans> shevy: what?
<pipework> arup_r: It's probably not worth explaining.
<riceandbeans> there are ruby based blog engines
<jamesaxl> hi
<pipework> Someone just needs to write a PHP implementation that can do full interop with ruby, and then write a long letter of apology to the ruby community.
<jamesaxl> does ruby have something like twisted?
<pipework> phuby does not count
<pipework> jamesaxl: Did you google around?
tomaz_b has quit [Ping timeout: 248 seconds]
<shevy> riceandbeans I don't know them
<jamesaxl> pipework: i found EventMachine
lele is now known as Guest24
<riceandbeans> octopress
kadoppe has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
<pipework> jamesaxl: That's the most popular of them. There's also other event-driven libraries. celluloid, jruby has some specific to it, and that's the majority of what I know.
crazydiamond has joined #ruby
<riceandbeans> toto
<adaedra> tata
<adaedra> titi
<jamesaxl> pipework: thak you ver much
JDiPierro has quit [Remote host closed the connection]
<pipework> Cheers.
Igorshp_ has joined #ruby
<arup_r> Why JS folks writing one after another a dozens of framework,, while we have only one RoR ?
<eam> JS folks haven't made a good one yet
<apeiros> arup_r: you're quite mistaken
<apeiros> we don't only have RoR
<riceandbeans> comfortable mexican sofa
<riceandbeans> try that one out
<riceandbeans> looks promising
<arup_r> sinatra counts ?
<pipework> arup_r: We have a lot more than Rails.
<jfarmer> arup_r When Rails came out the landscape was much different.
Shidash has quit [Quit: ZNC - http://znc.in]
kadoppe has joined #ruby
<pipework> I don't know why anyone needs a framework for much else than learning.
<eam> what exactly distinguishes a mexican sofa?
baweaver has quit [Remote host closed the connection]
monod has joined #ruby
Igorshp has quit [Ping timeout: 255 seconds]
<Freijo> Being a sofa for one
<pipework> eam: "Hecho en Mexico"
<eam> well, from other sofas I mean
<Freijo> and being made in Mexico is a bonus
hanmac has quit [Ping timeout: 256 seconds]
eggoez has quit [Ping timeout: 246 seconds]
<riceandbeans> omg I just got it
<riceandbeans> C M S
<riceandbeans> comfortable mexican sofa
<riceandbeans> it's a joke
acke has quit [Remote host closed the connection]
<riceandbeans> it's a false enumaration of the CMS acronym
<jfarmer> heyoo
zendrix has quit [Remote host closed the connection]
<eam> does it work well with couchbase
<shevy> arup_r well javascript is one layer below ruby, so they have an unfair advantage :(
<shevy> I want jquery in ruby!
momomomomo has quit [Quit: momomomomo]
drewo has quit [Ping timeout: 246 seconds]
<jfarmer> Huh?
<arup_r> Jquery is sweet indeed!
workmad3 has joined #ruby
<arup_r> shevy: But I got your point..
<riceandbeans> I want a crystal cms
zendrix has joined #ruby
Shidash has joined #ruby
Rahul_Roy has joined #ruby
varunwachaspati has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> take crystals, install drupal, you're set.
AvidChronos has quit [Quit: All your base are belong to us]
* adaedra flees
<shevy> jhass should write one, that lazy dude
<riceandbeans> publify
<riceandbeans> I installed drupal
<riceandbeans> I don't like it
<riceandbeans> I was writing my gf a custom thing in mojolicious but she wanted it up overnight
<adaedra> ahah
<riceandbeans> so I stood up drupal and cried and then went back to perl
jfarmer has quit []
<adaedra> I installed a drupal once
<riceandbeans> I like ruby........but my heart yearns for perl
<adaedra> Since, I discovered that there is not only PHP for web :x
<riceandbeans> system side php is a horrible horrible thing
<riceandbeans> there is a special place in hell for people that do system scripting in php
<adaedra> every side php is an horrible thing
<arup_r> lol
Xeago has quit [Remote host closed the connection]
<riceandbeans> it's right next to brutus and judas
wallerdev_ has quit [Quit: wallerdev_]
<eam> riceandbeans: let's start a hipster trend about picking up perl
<riceandbeans> that other mouth, that's for your head
<riceandbeans> eam: dude totally
<riceandbeans> it's like the older hotter woman that knows what she wants and what she's doing and doesn't give you stupid drama
hotpancakes has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
<eam> oh yeah ruby, lots of kids know that these days, but I'm old school cool
rodferso1 has joined #ruby
<riceandbeans> perl is the milf of programming languages
<pipework> Back in the day. It was a tuesday, if I recall.
renderful has joined #ruby
eggoez has joined #ruby
<arup_r> then...........
<arup_r> ?
<adaedra> no then
<adaedra> you don't use that in ruby
<eam> then;
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
reset has joined #ruby
rodfersou has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 276 seconds]
32NACBO7F has quit [Ping timeout: 264 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
ndrei has joined #ruby
emptyflask has quit [Quit: leaving]
Jackneill has quit [Remote host closed the connection]
<riceandbeans> no one liked what I said aboout perl?
hotpancakes has joined #ruby
howdoicomputer has joined #ruby
kirun has quit [Quit: Client exiting]
lxsameer has joined #ruby
<shevy> dunno
<shevy> can't really relate to it
<jhass> riceandbeans: most of us are out of their puberty
jcoe has joined #ruby
DLSteve has quit [Quit: Leaving]
<riceandbeans> jhass: what?
<shevy> you kinda can do almost everything with a programming language
<shevy> imagine the moment when you can also use it to create organisms
hanmac has joined #ruby
<shevy> hmm... everything? anything? anybody? somebody? I am confused...
<riceandbeans> imagine if there was a comedy sattire show about programming langauges and they were represented by people
<riceandbeans> their luck and personalities governed by their programming type and their actual concepts
<jhass> sure that exists somewhere on youtube
<riceandbeans> we could do it
<jhass> and I'm sure it's horrible to watch
<riceandbeans> lol
niemcu has joined #ruby
momomomomo has joined #ruby
<riceandbeans> harsh
christiandsg has joined #ruby
allomov has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
JoshL_ has quit []
<shevy> dunno about personalities
<shevy> who'd wanna pick java riceandbeans :P
<pipework> Mmm JVM.
wallerdev_ has joined #ruby
r_rios has quit [Ping timeout: 265 seconds]
<adaedra> Mmm slowness at startup.
k3asd` has quit [Ping timeout: 244 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allomov_ has joined #ruby
allomov has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
peter_paule has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
loc22 has quit [Quit: Be back later ...]
christiandsg has quit [Ping timeout: 265 seconds]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
AlphaAtom has joined #ruby
Spami has quit [Client Quit]
<riceandbeans> java would be played by a smug obnoxious guy, slipping money to school professors to have them teach him to the kids and walking around beating up random people for no reason, but he'd have trouble remembering things all the time like where he was and he'd move really slowly, and if someone made him count too high he'd lose focus and go to another plane and say, aww crap, I fell outta my sandbox again
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
icflournoy has quit [Ping timeout: 244 seconds]
<riceandbeans> later on you find out ada is really his cousin and uncle sam is really both of their uncle's
bmurt has quit []
Igorshp_ has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
<riceandbeans> I'm pretty sure we just made the pilot episode right here
Narzew has quit [Read error: No route to host]
<pipework> adaedra: -client ain't so bad. But who cares if jruby is slow to start?
<pipework> My PS1 won't be using jruby anytime soon anyways. I use it for what it's great at, being a fantastic VM implementation for long-running processes.
mistermocha has joined #ruby
baweaver has joined #ruby
<iszak> wat?
<pipework> Le JVM, it is awesome
Gadgetoid has left #ruby ["Leaving"]
<iszak> Yes I know, I like the combination of JVM and the Java API
<noethics> turn your jvm into a server if the boot time is an issue
<pipework> I don't care for the Java language itself, but the API, once massaged into your preferred language, cain't so bad.
peter_paule has joined #ruby
<pipework> in b4 drip
<noethics> pipework, what language
<noethics> just jruby?
dinhani has quit [Quit: Leaving.]
<iszak> pipework: I'm the same.
<noethics> i love clojure and scala
gattuso has quit [Remote host closed the connection]
<pipework> noethics: I actually play around with a few JVM languages, but the implementation I have the most experience with is jruby.
<noethics> java itself isnt that bad either since j8
<pipework> Rhino behind that.
pen has quit [Remote host closed the connection]
<riceandbeans> begone you
<pipework> noethics: I have a few languages to learn in a list. Ocaml is first, second is clojure (I know lisp and scheme too anyways)
<noethics> super easy to learn clojure if you know lisp
<Senjai> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
Notte has quit []
Spami has joined #ruby
hinbody has quit [Quit: leaving]
pen has joined #ruby
nofxx has joined #ruby
baweaver has quit [Ping timeout: 256 seconds]
mistermocha has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Remote host closed the connection]
PotatoCrisps has joined #ruby
<pipework> noethics: Most definitely. I think I'll spend most of my time learning cool things like ring and whatnot. I've been daydreaming about using the jruby to interact with much more complex systems written in clojure.
<pipework> I have too many projects anyways.
chouhoulis has joined #ruby
gattuso has joined #ruby
<headius> is that ruboto message automated?
<pipework> headius: It was triggered by Senjai
momomomomo has quit [Ping timeout: 246 seconds]
<Senjai> headius: No, it was triggered by ?ot
<headius> ahhh
<apeiros> ? triggers factoids
<Senjai> It's also a suitable replacement for vitamin C
diegoviola has quit [Quit: WeeChat 1.2]
<adaedra> [TRIGGERING INTENSIFIES]
workmad3 has joined #ruby
TheHodge has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
Torrieri has quit [Quit: Lingo: www.lingoirc.com]
Azure has joined #ruby
Carnage\ has joined #ruby
momomomomo has joined #ruby
Torrieri has joined #ruby
<Senjai> Man I really love ruby -c sometimes
r_rios has joined #ruby
r_rios has joined #ruby
stantonnet has quit [Ping timeout: 265 seconds]
peter_paule has quit [Ping timeout: 246 seconds]
gkra has left #ruby [#ruby]
<pipework> I love ruby -w
<apeiros> I wish we could restrict -w
<apeiros> as in "only for files from dir X"
codecop has quit [Remote host closed the connection]
nitenq has quit [Quit: nitenq]
sharpmachine has quit [Remote host closed the connection]
<apeiros> I used -w for the first 2y of ruby. then stopped when I started using more and more 3rd party libs which spammed stderr :(
workmad3 has quit [Ping timeout: 256 seconds]
Azulinho has joined #ruby
davedev2_ has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
davedev24_ has joined #ruby
nitenq has joined #ruby
<Senjai> I'm considering preventing vim from saving to disk for ruby files that don't pass -c
<Senjai> but I have a feeling that will be a hassle
<Senjai> 1) wip stuff is still things 2) :w is like a reflex for me
<adaedra> -c is syntax check?
<Senjai> yeah
<adaedra> tried syntastic?
sharpmachine has joined #ruby
arooni-mobile__ has joined #ruby
arooni-mobile has joined #ruby
<Senjai> Aye, its a bit too heavyweight
<Senjai> for what I want
haxrbyte_ has quit [Remote host closed the connection]
<adaedra> ok
<Senjai> And for compiled languages, I use YouCompleteMe
<Senjai> but I've heard good things about syntastic
haxrbyte has joined #ruby
<Senjai> adaedra: https://github.com/Valloric/YouCompleteMe in cas eyou were curious.
<neanias> I find syntastic to be really good
ldnunes has quit [Quit: Leaving]
<Senjai> adaedra: Because the file is constantly compiled, it doubles as a syntax checker
<adaedra> oh
<adaedra> yeah, syntastic is good, when checker is fast
<Senjai> But yeah, highly recommend YCM, its just a pain to setup
<adaedra> on c++, it relied on clang iirc, so #require <boost/...> made vim unusable
<adaedra> require.
peter_paule has joined #ruby
<adaedra> REQUIRE.
<Senjai> adaedra: There are documented workarounds for that
<Senjai> But yeah
<Senjai> adaedra: For basic tab completion I just use https://gist.github.com/Senjai/08b1d3a49577094f63d1
<Senjai> when not running YCM
Timba-as has joined #ruby
<Senjai> It's local to the files open though
<adaedra> I don't often use completion, not often enough help for me
<Senjai> This just makes it automatic :P, it'd give you a reason to
<Senjai> Should try it :P
<neanias> I use neocomplete...
<adaedra> I have on my todo list to make me a real vim config, i'll see at this time
LiquidInsect has quit [Ping timeout: 244 seconds]
<Senjai> I just have that in my giant messy vimrc
<Senjai> atm
<adaedra> wow
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<neanias> I have a somewhat stripped down one for servers
<neanias> Then my one on my laptop
jerius has quit [Quit: /quit]
<neanias> It's split over several files
<Senjai> I just use the default vim on servers
symbol has quit [Quit: WeeChat 1.1]
<neanias> Depends on the server
LiquidInsect has joined #ruby
<neanias> If it's my own server or my own login on a server that I intend to use a lot
<neanias> I bring it in
ascarter has joined #ruby
bricker_ has joined #ruby
Muhannad has joined #ruby
bricker_ has quit [Client Quit]
<Senjai> I dont ever edit things on a server much. I may consider adding a stock vimrc to a chef recipe or something
<Senjai> I have other dev boxes I ssh into with full setups
<Senjai> E.g. working at work,from home
<Senjai> or vica versa
ascarter has quit [Max SendQ exceeded]
Ilyas has quit [Read error: Connection reset by peer]
<neanias> Well, I have an IRC bot which I normally just patch on the server
<Senjai> neanias: Ah, I just use git for deploying little stuff like that
<Senjai> or rsync
<neanias> I started like that
<neanias> It was a nice git project
<neanias> Then I got lazy
saltsa has quit [Ping timeout: 256 seconds]
<neanias> And had configs and stuff
<Senjai> you can do a git hook for automatically restarting the project on every pull
<Senjai> Or if your hosting it as a git server you can do a post receive hook
<neanias> The code is hosted on bitbucket
<neanias> But it's out of date
<Senjai> but usually, my little project deploys go like this:
<Senjai> rsync ....
<neanias> I should really clear it up
<Senjai> ssh && systemctl restart thing
nettoweb has joined #ruby
endash has joined #ruby
endash has quit [Client Quit]
malconis has quit [Quit: Textual IRC Client: www.textualapp.com]
Chef has quit [Quit: leaving]
Marsupermammal has joined #ruby
djbkd has quit [Remote host closed the connection]
peter_paule has quit [Ping timeout: 264 seconds]
nofxx has quit [Remote host closed the connection]
nettoweb has quit [Max SendQ exceeded]
decoponio has quit [Quit: Leaving...]
malconis has joined #ruby
y0da has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
fabrice31 has joined #ruby
monod has quit [Quit: Sto andando via]
Igorshp has joined #ruby
djbkd has joined #ruby
solocsha1 has joined #ruby
riceandbeans has left #ruby [#ruby]
nettoweb has quit [Max SendQ exceeded]
nettoweb has joined #ruby
choke has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
fabrice31 has quit [Ping timeout: 264 seconds]
nettoweb has quit [Max SendQ exceeded]
baweaver has joined #ruby
nettoweb has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haxrbyte has quit [Read error: Connection reset by peer]
momomomomo has quit [Ping timeout: 256 seconds]
FernandoBasso has joined #ruby
haxrbyte has joined #ruby
acke has joined #ruby
gambl0re has joined #ruby
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
momomomomo has joined #ruby
Guest64664 has quit [Remote host closed the connection]
pullphinger has quit []
haxrbyte has quit [Remote host closed the connection]
JakFrist has joined #ruby
haxrbyte has joined #ruby
howdoicomputer has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 250 seconds]
seal has quit [Quit: Ex-Chat]
acke has quit [Ping timeout: 256 seconds]
Scroff has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
pengin has quit [Remote host closed the connection]
icebourg has quit [Read error: Connection reset by peer]
icebourg_ has joined #ruby
haxrbyte_ has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
Xiti has quit [Quit: Xiti]
RegulationD has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 240 seconds]
Scroff has quit [Ping timeout: 244 seconds]
olistik has quit [Remote host closed the connection]
Carnage\ has quit []
olistik has joined #ruby
haxrbyte has quit [Ping timeout: 244 seconds]
djbkd has quit [Quit: My people need me...]
rawtext has joined #ruby
rawtext has left #ruby [#ruby]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
workmad3 has joined #ruby
Xiti has joined #ruby
olistik has quit [Ping timeout: 255 seconds]
sshuff has quit [Quit: Leaving]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
pengin has joined #ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Junaos_ is now known as Junaos
Junaos has quit [Changing host]
Junaos has joined #ruby
howdoicomputer has joined #ruby
pskosinski has quit [Quit: Connection closed for inactivity]
fmcgeough has quit [Quit: fmcgeough]
drewo has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gamename has quit [Read error: Connection reset by peer]
blue_deref has joined #ruby
djbkd has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iamse7en has joined #ruby
PotatoCrisps has quit [Quit: Leaving...]
axl_ has quit [Quit: axl_]
sharpmachine has quit [Remote host closed the connection]
<iamse7en> Hello. I'm trying a row number to my wice_grid table, but getting `unexpected tOP_ASGN` on `g.column do { 0 += 1 } Isn't this the correct way to increment in ruby?
sharpmachine has joined #ruby
<apeiros> iamse7en: you can't mix do/end and {}
zendrix has quit [Remote host closed the connection]
<apeiros> this part: `do {`
<iamse7en> sorry, i didn't actually ahve that in my code. i had a do end block but was converting to one line for irc
<apeiros> aaaand no, you can't do `0 += 1` either
Papierkorb has joined #ruby
Pupeno_ has joined #ruby
<apeiros> do/end can be written on a single line without any issue…
<iamse7en> i just want the row to be 1, 2, 3 etc. how do i increment
iamninja has joined #ruby
<apeiros> and you can always just replace newlines with ;
sharpmachine has quit [Remote host closed the connection]
dopie has joined #ruby
<apeiros> x += 1 # this works
wprice has joined #ruby
rodferso1 has quit [Ping timeout: 252 seconds]
<apeiros> 0 += 1 # this does not. you can't assign to 0. think about it, you do: 0 = 0 + 1 - and obviously you can't do 0 = 1
<iamse7en> right. okay i just need to define x then
mistermocha has joined #ruby
<apeiros> hard to tell what you have to do from the information you provided…
rwilcox has quit [Quit: Textual IRC Client: www.textualapp.com]
Nahra` has joined #ruby
Pupeno has quit [Ping timeout: 256 seconds]
zendrix has joined #ruby
<iamse7en> apeiros, thanks! i just changed 0 to x and then defined x as 0 above that line and it works.
christiandsg has joined #ruby
felixjet__ has quit [Read error: Connection reset by peer]
victortyau has quit [Quit: Leaving]
devdazed has quit [Quit: Computer has gone to sleep.]
gamename has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
mistermocha has quit [Ping timeout: 264 seconds]
felixjet__ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
mary5030_ has joined #ruby
sgambino has joined #ruby
jpfuentes2 has joined #ruby
<jhass> sounds like a complicated way to say x = 1
freerobby has quit [Quit: Leaving.]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
sparr has quit [Changing host]
sparr has joined #ruby
mary5030 has quit [Ping timeout: 255 seconds]
r_rios has quit [Remote host closed the connection]
bruno- has quit [Quit: Lost terminal]
<iamse7en> well i want it to start at 0 and increment for each row
wottam has joined #ruby
solocsha1 has quit [Ping timeout: 255 seconds]
s2013 has joined #ruby
wottam has quit [Client Quit]
bruno- has joined #ruby
charliesome has quit [Quit: zzz]
<al2o3-cr> iam8ight
eggoez has quit [Ping timeout: 240 seconds]
kevin has joined #ruby
troyready has joined #ruby
kies^ has quit [Ping timeout: 265 seconds]
kevin is now known as Guest94034
Pupeno_ has quit [Remote host closed the connection]
rbennacer has quit [Ping timeout: 248 seconds]
solocsha1 has joined #ruby
<Guest94034> Hello! Has anyone ever heard of Posty?
s2013 has quit [Ping timeout: 264 seconds]
thalassa has quit [Ping timeout: 264 seconds]
phutchins has joined #ruby
<al2o3-cr> yeah, they post ya letters don't they?
eggoez has joined #ruby
last_staff has quit [Quit: try {sleep} catch {Z} finally {recharge}]
<al2o3-cr> ignore me!
quazimod1 has quit [Ping timeout: 252 seconds]
<jhass> al2o3-cr: yeah, better stick to -offtopic ;P
djbkd has quit [Remote host closed the connection]
<Guest94034> Its a configuration for Postfix
<Guest94034> But it wont work. I cant get the mysql working in ruby
Pupeno has joined #ruby
<al2o3-cr> jhass: will be doing :P
werelivinginthef has quit [Remote host closed the connection]
charliesome has joined #ruby
djbkd has joined #ruby
gamename has quit [Remote host closed the connection]
gamename has joined #ruby
pengin has quit [Remote host closed the connection]
Aswebb_ has quit [Remote host closed the connection]
gamename has quit [Read error: Connection reset by peer]
pdoherty has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
thalassa has joined #ruby
dellavg has quit [Ping timeout: 264 seconds]
ruurd has quit [Client Quit]
Guest94034 has quit [Quit: Page closed]
howdoicomputer has quit [Ping timeout: 240 seconds]
Igorshp has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
spider-mario has quit [Read error: Connection reset by peer]
pengin has joined #ruby
icebourg_ has quit []
c355E3B has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
acke has joined #ruby
Rickmasta has joined #ruby
hotpancakes has quit [Remote host closed the connection]
acke has quit [Ping timeout: 256 seconds]
emptyflask has joined #ruby
Sid05 has joined #ruby
dgutierrez1287 has joined #ruby
RegulationD has joined #ruby
<slash_nick> So...Using Net::HTTP, I'm comparing running 2 http requests in series to running the same two requests in parallel. I'm not seeing any noticeable difference between the two; does Net::HTTP do some kind of blocking that would prevent the two from actually running in parallel?
JDiPierro has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emptyflask has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 248 seconds]
senayar has quit [Remote host closed the connection]
Timba-as has quit [Quit: Be back later ...]
hotpancakes has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
JDiPierro has quit [Remote host closed the connection]
ivanskie has joined #ruby
<toretore> slash_nick: code?
<toretore> pretty sure ure doin it rong
Sid05 has quit [Quit: Sid05]
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<slash_nick> toretore: using concurrent-ruby library... https://gist.github.com/rthbound/598b7b32418fb4cd13f2#file-application_controller-rb-L11 sorry for the ugliness
hotpancakes has quit [Ping timeout: 244 seconds]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
rbennacer has joined #ruby
jobewan has quit [Quit: Leaving]
drewo has quit [Ping timeout: 246 seconds]
blaines_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renderfu_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
<toretore> well, what does Concurrent::Promise.new(&b) do? unless it ends up running on different threads it's not going to be concurrent
<slash_nick> toretore: it does...
rbennacer has quit [Remote host closed the connection]
Igorshp has joined #ruby
<slash_nick> toretore: Concurrent::Promize#zip builds a promise that produces the result of promises in an Array and fails if any of them fails.
stantonnet has joined #ruby
mandarinkin has quit [Ping timeout: 250 seconds]
<toretore> you should simplify it to see that it actually does do what you think it does
renderful has quit [Ping timeout: 244 seconds]
<slash_nick> toretore: i zipped 64 requests to httpbin.org/delay/1... the 64 requests finished in 45.6 seconds... would that imply that they ran in a somewhat parallel fashion?
ruby-lang481 has joined #ruby
<toretore> well, if it were serial it would most likely be >64s
<slash_nick> right...
jeramyRR has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<toretore> it may be using a thread pool underneath, so not running each of them concurrently
fenjamin has joined #ruby
Muhannad has quit [Ping timeout: 246 seconds]
howdoicomputer has joined #ruby
jlast has joined #ruby
<fenjamin> hi, i would like to know how to use javascript within ruby - i have a javascript file I woud like to be triggered by a ruby file.
thiagovsk has quit [Quit: Connection closed for inactivity]
<toretore> fenjamin: elaborate
<fenjamin> this javascript file needs to be triggered and modified by ruby logic
<fenjamin> the overall logic for the program is ruby however javascript files are dependencies
<toretore> define triggered and modified
<toretore> need more information
iamse7en has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cvtsx1 has joined #ruby
Pupeno has quit [Remote host closed the connection]
<fenjamin> so i would prefer an event to modify the javascript file - update the chart -
leonardoajim has quit [Quit: Be back later ...]
mary5030_ has quit [Remote host closed the connection]
<fenjamin> when the event initiates, i would like the javascript chart to update with the activity
<toretore> are you talking about ruby on the server and then this running in a browser on the client?
<slash_nick> toretore: thanks!
<fenjamin> im trying to make it a protocol therefore stateless
<toretore> slash_nick: did you figure it out?
<Shidash> did rubygems recently switch to udp? suddenly having problems using it over Tor and I never used to
<toretore> fenjamin: i don't really understand what it is you're trying to do
cvtsx has quit [Ping timeout: 265 seconds]
<fenjamin> I'm trying to visualize transactions - when the transaction takes place, the chart updates
frem has quit [Quit: Connection closed for inactivity]
Igorshp has quit [Remote host closed the connection]
Ropeney has joined #ruby
Igorshp has joined #ruby
drewo has joined #ruby
<fenjamin> so when there is a purchase, the chart updates equal to the amount purchased.
<toretore> you still didn't say in which context this is running.. where is this ruby and js code running?
Igorshp has quit [Remote host closed the connection]
<fenjamin> it would be hosted locally
<toretore> are you running the js in a browser?
<fenjamin> yes
<toretore> and then running a ruby script that needs to communicate data to the js running in the browser?
arooni-mobile__ has quit [Quit: Leaving]
<fenjamin> yes!:-)
Sid05 has joined #ruby
<toretore> ok, finally
<toretore> so you have an http (presumably) server written in ruby
<fenjamin> jsonp but yes
<toretore> the javascript in the browser makes requests to this server via http
<slash_nick> toretore: not figured out, but reading the documentation a bit more closely I see something suspect... "A *timeout* value can be passed to `value` to limit how long the call will block. If `nil` the call will block indefinitely. If `0` the call will not block."... The methods I'm using don't take the timeout argument, so I'm guessing they'll "block indefinitely"
<toretore> then you must write the javascript that makes the request, parses the response and uses the data in the response to update the graph
leonardoajim has joined #ruby
<toretore> slash_nick: which shouldn't be a problem
<toretore> "block indefinitely" means "until it's done"
Muhannad has joined #ruby
jerematic has quit [Remote host closed the connection]
<slash_nick> toretore: wouldn't i want "will not block"?
<toretore> no
bnobu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore> the call to `value` is the synchronization point - where you join the n threads together and get their values
<toretore> (presumably - value being Promise#value)
<slash_nick> ok, so i would want that to block until the last one's ready
<toretore> yes
<toretore> you don't really need to use a library for something this simple, you can just use threads directly
lxsameer has quit [Quit: Leaving]
Tarkers34 has joined #ruby
stoodfarback has quit [Ping timeout: 264 seconds]
<toretore> requests.map{|r| Thread.new{ r.result } }.map(&:value)
<toretore> depends tho
paulcsmith has joined #ruby
baweaver has joined #ruby
<fenjamin> yes i agree - i will use RESTful to make the request then jsonp to update the chart - this can be done entirely in javascript? or can ruby structure the logic?
dopie has quit [Quit: This computer has gone to sleep]
Tarkers34|2 has quit [Ping timeout: 250 seconds]
<toretore> the client side must be done in js
paulcsmith has quit [Client Quit]
<toretore> you need to write the js logic for receiving the updates from the server and inserting it into the graph
<fenjamin> i agree. and the server side can be ruby?
<slash_nick> toretore: I guess I'll try without the concurrent-ruby library tomorrow... thanks again for the feedback
<toretore> fenjamin: yes
enebo has quit [Quit: enebo]
<al2o3-cr> slash_nick: use threads :)
t_ has quit [Remote host closed the connection]
Torrieri has quit [Quit: Be back later ...]
kinduff has quit [Quit: leaving]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> nvm
jlast has quit [Ping timeout: 252 seconds]
<slash_nick> toretore: it may just be that one request takes ~3s while the other takes ~0.5s......
mesamoo has quit [Ping timeout: 252 seconds]
<toretore> you can probably measure that, just stick it into the worker logic: t=Time.now; make_request; puts Time.now-t
charliesome has quit [Quit: zzz]
<fenjamin> so then how can i combine the two languages to create a full stack stateless api
Scroff has joined #ruby
<toretore> i don't know what that means
<slash_nick> good thinking... see ya'll in the morning
<fenjamin> the server side is ruby, the client side is js, how can these together be used?
workmad3 has quit [Ping timeout: 252 seconds]
centrx has joined #ruby
t_ has joined #ruby
Azulinho has quit [Ping timeout: 255 seconds]
<baweaver> Rails as an API + AngularJS
hotpancakes has joined #ruby
<baweaver> There are all types of articles on this
<Senjai> *cough* dont use angular *cough*
<Senjai> </opinion>
<baweaver> http://baweaver.com/blog/2014/10/02/the-frivolous-frontend-framework/ - Older post I don't entirely agree with myself on anymore
<baweaver> http://baweaver.com/blog/2014/10/04/revelling-in-rest/ - And some resources on how to hook up to a RESTful backend
ledestin has joined #ruby
<fenjamin> that's the link i was looking for
<baweaver> Angular isn't bad per-se, but most people don't need it
<Senjai> I support a component based architecture. Like with backbone, and whatever other libraries you need
<Senjai> If you want angular, use ember instead.
<baweaver> Honestly I don't have an opinion of Ember
<Senjai> Angular has pretty much abandoned its community, and has shown a few poor design decisions
Scroff has quit [Ping timeout: 240 seconds]
<baweaver> That I have to agree with only partially
<baweaver> They did a heel-face turn after the community freaked out
<Senjai> Yeah, but that was all PR, they still have no upgrade path from 1.x to 2.x
<baweaver> Though letting the lead of Durandal have at it for 2.0 was a nightmare mistake
<baweaver> I won't disagree that that's a freaking mess.
ndrei has quit [Ping timeout: 252 seconds]
<baweaver> and I would say go to Ember, but I don't know it well enough to endorse it
<Senjai> Also google does a lot of stupid stuff, like dropping dart
<Senjai> It's gotten a lot better
<Senjai> the best thing to do, is your research
<baweaver> ^
<baweaver> pretty much that
<Senjai> But I'm a big fan of backbone, + libraries like react, or whatever view layer you want, or marionette
<baweaver> I just ended up migrating towards the backend more so I don't do quite as much frontend research
<Senjai> Simply because I dont believe that a framework can exist for the scope of what a frontend can evolve as, and stay opinionated
<baweaver> though if it's still a matter of interest I can go over it.
<baweaver> I hesitate to call React a framework from what I've heard of it.
<Senjai> We might go a bit ot with that discussion, I think we are already, but always interested in hearing opinions in that other channel
<Senjai> baweaver: It isnt, I'd call it a library
<Senjai> or a view layer
<baweaver> Me and cirwin were talking about it a while back
<fenjamin> ok i will implement RESTful using $http in Ruby without a backbone
<baweaver> Don't implement
havenwood has quit [Read error: Connection reset by peer]
<baweaver> search first
ledestin has quit [Client Quit]
<baweaver> better: write and article on what you find out
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> teaching someone else is a great way to reinforce what you've learned yourself.
duncannz has joined #ruby
ndrei has joined #ruby
<fenjamin> baweaver: truth
senayar has joined #ruby
<baweaver> that, and having a good blog tends to get you a lot of attention
nofxx has joined #ruby
nofxx has joined #ruby
<Senjai> baweaver: Do you get decent attention on yours? :P
<Senjai> j/c
<baweaver> I have 4-5 recruiters a day contacting me if that's any metric
<toretore> fenjamin: don't try to use anything like ember or backbone - it will only complicate things in your case
<toretore> you should be concerned with learning the basics first
<baweaver> depends if they need a RESTful API
<baweaver> oh, they're new?
<baweaver> then definitely avoid those for a while
<baweaver> stay straight Rails
<baweaver> worry about the fancy stuff later, or you'll burn out
<fenjamin> thanks, it's clear
<baweaver> Rails alone from scratch bears that risk, trying to tag on anything else is asking for nightmares early on.
<baweaver> I've seen people do it, but they were also veterans of other languages first
<baweaver> not saying you're not, but giving a general frame of reference here.
<baweaver> honestly I have no idea of your level
blaines has joined #ruby
<Senjai> is alias a reserved word?
<baweaver> >> alias
<ruboto> baweaver # => /tmp/execpad-8b2a12e60bf7/source-8b2a12e60bf7:3:in `<main>': undefined method `Exception' for class ...check link for more (https://eval.in/393754)
<Senjai> ty
<shevy> don't alias your dams!
<baweaver> I call that one hoover
<shevy> haha
blackmes1 has quit [Ping timeout: 265 seconds]
<baweaver> it's used for aliasing methods
coffeecupp has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<baweaver> >> alias :foobar :puts; foobar 'baz'
<ruboto> baweaver # => baz ...check link for more (https://eval.in/393758)
jerematic has joined #ruby
<al2o3-cr> >> alias poopoo puts; poopoo "now"
blaines_ has joined #ruby
<ruboto> al2o3-cr # => now ...check link for more (https://eval.in/393759)
quazimodo has joined #ruby
werelivinginthef has joined #ruby
zendrix has quit [Remote host closed the connection]
Torrieri has joined #ruby
hotpanca_ has joined #ruby
havenwood has joined #ruby
blaines has quit [Ping timeout: 250 seconds]
rodfersou has joined #ruby
choke has quit [Remote host closed the connection]
choke has joined #ruby
choke has quit [Client Quit]
Torrieri has quit [Client Quit]
idafyaid has quit [Ping timeout: 264 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
werelivinginthef has quit [Ping timeout: 244 seconds]
zendrix has joined #ruby
arooni-mobile has quit [Ping timeout: 248 seconds]
<shevy> hmm
<shevy> is alias :foobar different to alias foobar?
dgutierrez1287 has joined #ruby
<centrx> shevy, I think the idea is alias is a Ruby keyword that can accept the actual method name, not a symbol of it
<baweaver> One is a symbol
<baweaver> accepts two symbols
<baweaver> Now as to why it doesn't use a comma between them
<baweaver> Not sure, but that's bitten me before.
tvw has joined #ruby
iateadonut has joined #ruby
<al2o3-cr> >> alias printshitout :puts; printshitout "crap"
<ruboto> al2o3-cr # => crap ...check link for more (https://eval.in/393760)
<al2o3-cr> >> alias :printshitout puts; printshitout "crap"
<ruboto> al2o3-cr # => crap ...check link for more (https://eval.in/393761)
<al2o3-cr> >> alias :printshitout :puts; printshitout "crap"
<ruboto> al2o3-cr # => crap ...check link for more (https://eval.in/393762)
jlast has joined #ruby
<al2o3-cr> shevy: make your decision you've got 5 seconds...
<al2o3-cr> 5
<al2o3-cr> 4
<al2o3-cr> 3
<al2o3-cr> 2
snockerton has quit [Quit: Leaving.]
<al2o3-cr> 1
<al2o3-cr> boom!
<jhass> al2o3-cr: wrong channel ;)
<shevy> wat
<shevy> I am almost sleeping man
Igorshp has joined #ruby
<shevy> you are all just a blur in the current heatwave that plagues europe!
<al2o3-cr> i thought this was offtopic
<jhass> I guess I'll send al2o3-cr to bed for today
<al2o3-cr> jeez
<shevy> talking about offtopic is offtopic!
<jhass> al2o3-cr: will you go to bed on your own or...?
<al2o3-cr> shevy: head off over to offtopic
sharpmachine has joined #ruby
senayar has quit []
meph has joined #ruby
christiandsg has joined #ruby
thiagovsk has joined #ruby