havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
chimche has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
ajf- has joined #ruby
bubbys has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyLobo has quit [Ping timeout: 260 seconds]
bubbys has joined #ruby
underplank has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
hannelita has joined #ruby
froome has joined #ruby
mary5030_ has quit [Ping timeout: 240 seconds]
zotherstupidguy has joined #ruby
hahuang65 has joined #ruby
ympeg has joined #ruby
<zotherstupidguy> whats a good ruby webserver for handling big uploads? and why?
<froome> I'm getting an error when I try to pass a variable containing a URL to open(), but no error when passing the same URL directly, any insight on this? http://pastebin.com/TSyfsMpp
<helpa> Hi froome. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa> Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
<ruby[bot]> froome: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7364ab24072d3ee947d2
<ruby[bot]> froome: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
shadoi has quit [Quit: Leaving.]
Prominent has joined #ruby
<Ox0dea> Calm down, bots!
<apeiros> .mute helpa !P should disable pastebin message
<apeiros> aaah
<apeiros> whoops? whota thunked they run on the same machine :D
hannelita has quit [Ping timeout: 264 seconds]
<Ox0dea> froome: Check that that header actually contains an appropriate value.
<zotherstupidguy> froome print the variable before using it to see it
<shevy> awww ruboto versus helpa, another round of epic bot battle
<zotherstupidguy> helpa is quicker
<apeiros> ya, Radar unmuted it a tad too early
<shevy> oh wait... who is ruby[bot]
<shevy> hehe
baweaver has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 255 seconds]
<zotherstupidguy> guys, server of choice when dealing with file uploads?
<apeiros> shevy: it's the usurper of ruboto
weemsledeux has joined #ruby
<zotherstupidguy> i found this to be pretty good resource on the subject, https://www.nateberkopec.com/2015/07/29/scaling-ruby-apps-to-1000-rpm.html
<froome> Ox0dea: zotherstupidguy: imgofme2 and imgofme3 are equal
<froome> yes
willv has joined #ruby
underplank has quit [Quit: underplank]
atomical_ has joined #ruby
<zotherstupidguy> uri = URI.parse("http://www.ruby-lang.org/en/")
j416 has joined #ruby
sfr^ has joined #ruby
guacamol_ has joined #ruby
underplank has joined #ruby
chimche has quit [Quit: Leaving.]
<zotherstupidguy> hope that helps
<al2o3-cr> >> require('uri'); URI("https://ruby-lang.org/en").host
<ruby[bot]> al2o3-cr: # => "ruby-lang.org" (https://eval.in/501371)
willv has quit [Ping timeout: 240 seconds]
<al2o3-cr> >> RUBY_VERSION
<ruby[bot]> al2o3-cr: # => "2.3.0" (https://eval.in/501373)
<al2o3-cr> :)
atomical has quit [Ping timeout: 240 seconds]
underplank has quit [Client Quit]
janebootydoe has quit [Ping timeout: 265 seconds]
underplank has joined #ruby
guacamole has quit [Ping timeout: 265 seconds]
dlitvak_ has joined #ruby
p337rB has joined #ruby
KineticX has quit [Remote host closed the connection]
sfr^ has quit [Ping timeout: 260 seconds]
spider-mario has quit [Remote host closed the connection]
pawnbox has joined #ruby
sfr^ has joined #ruby
<zotherstupidguy> >> def leet s; s.tr! 'aeiost', '431057'; p s end; leet "al2o3-cr is elite"
<ruby[bot]> zotherstupidguy: # => "4l203-cr 15 3l173" ...check link for more (https://eval.in/501376)
makenoise has quit [Ping timeout: 246 seconds]
<zotherstupidguy> al2o3-cr :D
dlitvak has quit [Ping timeout: 250 seconds]
cajone has quit [Remote host closed the connection]
underplank has quit [Client Quit]
<al2o3-cr> :)
<al2o3-cr> >> RubyVM::InstructionSequence.compile_option.keys.grep /frozen/
<ruby[bot]> al2o3-cr: # => [:frozen_string_literal, :debug_frozen_string_literal] (https://eval.in/501377)
underplank has joined #ruby
makenoise has joined #ruby
<zotherstupidguy> froome your gist, shows an array and a string, they are not the same!
p337rB has quit [Remote host closed the connection]
cajone has joined #ruby
<zotherstupidguy> froome try imgofme2[0].to_s maybe that works for you!!
pawnbox has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
sfr^ has quit [Ping timeout: 260 seconds]
<zotherstupidguy> froome try imgofme2*"" looks cooler :)
<froome> zotherstupidguy: doh! thanks!
kies^ has quit [Remote host closed the connection]
mfb2 has quit [Remote host closed the connection]
makenoise has quit [Read error: Connection reset by peer]
rehat has quit [Ping timeout: 260 seconds]
makenois_ has joined #ruby
lucasb has quit [Quit: leaving]
makenois_ has quit [Client Quit]
mdih has quit [Ping timeout: 240 seconds]
scottschecter has joined #ruby
programmerq has quit [Ping timeout: 272 seconds]
kies^ has joined #ruby
sfr^ has joined #ruby
programmerq has joined #ruby
Rodya_ has joined #ruby
Xeago has quit [Remote host closed the connection]
northfurr has joined #ruby
sfr^ has quit [Excess Flood]
s1kx has quit [Quit: bai]
B1n4r10 has quit [Ping timeout: 260 seconds]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sfr^ has joined #ruby
guacamole has joined #ruby
gizless has joined #ruby
northfurr has quit [Client Quit]
Blaguvest has quit []
Rodya_ has quit [Ping timeout: 276 seconds]
sfr^ has quit [Excess Flood]
gizmore has quit [Ping timeout: 255 seconds]
guacamol_ has quit [Ping timeout: 265 seconds]
Kallis has joined #ruby
scripore has joined #ruby
sfr^ has joined #ruby
mrmargolis has joined #ruby
mfb2 has joined #ruby
guacamol_ has joined #ruby
sfr^ has quit [Excess Flood]
mfb2_ has joined #ruby
hannelita has joined #ruby
sfr^ has joined #ruby
jenrzzz has joined #ruby
mfb2 has quit [Ping timeout: 240 seconds]
sfr^ has quit [Excess Flood]
dlitvak has joined #ruby
sfr^ has joined #ruby
guacamole has quit [Ping timeout: 265 seconds]
underplank has quit [Quit: underplank]
underplank has joined #ruby
dlitvak_ has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
fourq is now known as fourq|away
fourq|away is now known as fourq
sfr^ has quit [Excess Flood]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical_ has quit [Ping timeout: 240 seconds]
sfr^ has joined #ruby
allcentury has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
domgetter has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chimche has joined #ruby
underplank has quit [Quit: underplank]
sfr^ has quit [Ping timeout: 260 seconds]
certainty has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
underplank has joined #ruby
bronson has quit [Remote host closed the connection]
Mirry has joined #ruby
papercode has joined #ruby
KnownSyntax has quit [Ping timeout: 256 seconds]
skade has quit [Quit: Computer has gone to sleep.]
chipotle has quit [Quit: cheerio]
dlitvak_ has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
ledestin has quit [Ping timeout: 276 seconds]
certainty has quit [Ping timeout: 260 seconds]
Mirry has quit [Ping timeout: 250 seconds]
iateadonut has joined #ruby
sfr^ has joined #ruby
dlitvak has quit [Ping timeout: 255 seconds]
northfurr has joined #ruby
sfr^ has quit [Excess Flood]
sfr^ has joined #ruby
TomPeed has joined #ruby
jenrzzz has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
juddey has quit [Ping timeout: 250 seconds]
blt has quit [Ping timeout: 255 seconds]
programmerq has quit [Ping timeout: 276 seconds]
chipotle has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
dstarh has joined #ruby
shpoont has joined #ruby
cdg has quit [Ping timeout: 272 seconds]
programmerq has joined #ruby
nerfando has joined #ruby
sfr^ has quit [Ping timeout: 260 seconds]
chimche has quit [Quit: Leaving.]
DLSteve has joined #ruby
dlitvak has joined #ruby
sfr^ has joined #ruby
dlitvak_ has quit [Ping timeout: 256 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmodlol has quit [Ping timeout: 265 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asmodlol has joined #ruby
underplank has quit [Quit: underplank]
Prominent has quit [Quit: Leaving]
hannelita has quit [Remote host closed the connection]
mfb2_ has quit [Remote host closed the connection]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
zeroDivisible has quit [Quit: WeeChat 1.3]
blt has joined #ruby
weaksauce has joined #ruby
sfr^ has quit [Ping timeout: 260 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has joined #ruby
ledestin has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
jam_ has joined #ruby
solocshaw has quit [Ping timeout: 276 seconds]
houhoulis has quit [Remote host closed the connection]
Sucks has quit [Quit: http://quassel-irc.org - Bate-papo confortável em qualquer lugar.]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest86427 has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 264 seconds]
janebootydoe has joined #ruby
jam_ has quit [Ping timeout: 255 seconds]
growGROW has joined #ruby
Rodya_ has joined #ruby
griffindy has joined #ruby
marr has quit [Remote host closed the connection]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has quit [Ping timeout: 260 seconds]
Rinalds has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 245 seconds]
DLSteve has joined #ruby
kobain has joined #ruby
sfr^ has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
blt has quit [Ping timeout: 255 seconds]
sfr^ has quit [Excess Flood]
ruby-lang727 has joined #ruby
dlitvak has quit [Remote host closed the connection]
chimche has joined #ruby
shpoont has quit [Quit: Textual IRC Client: www.textualapp.com]
froome has quit [Quit: Page closed]
chimche has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 256 seconds]
arescorpio has joined #ruby
ruby-lang727 has quit [Ping timeout: 252 seconds]
dopie has quit [Quit: Lost terminal]
Mirry has joined #ruby
baweaver has joined #ruby
sfr^ has joined #ruby
loatbac has joined #ruby
<loatbac> hello
<al2o3-cr> hi
<Ox0dea> Hey.
<loatbac> anyone here use any neat gems?
TomPeed has joined #ruby
neanderslob has quit [Ping timeout: 245 seconds]
neanderslob has joined #ruby
<al2o3-cr> loatbac: snowman gem is awesome
<loatbac> whats it do
colegatron has quit [Ping timeout: 256 seconds]
<loatbac> huh
hannelita has joined #ruby
<al2o3-cr> wat?
<loatbac> i like tree pretty well https://rubygems.org/gems/tree
jud^ has quit [Quit: Leaving]
<loatbac> i'm pretty new to ruby though, don't know too many gems
alyssadaemon has quit [Quit: alyssadaemon]
ajf- has quit [Ping timeout: 264 seconds]
<Ox0dea> $ gem search | wc -l
<Ox0dea> 111373
<Ox0dea> loatbac: There's only, like, a couple thousand.
<loatbac> lol
<loatbac> yes tons of them
<Ox0dea> >> require 'prime'; 111373.prime?
<ruby[bot]> Ox0dea: # => true (https://eval.in/501398)
<loatbac> i've played around a bit with gosu and shoes
<loatbac> good for guis
blt has joined #ruby
<al2o3-cr> the rainbow gem is pretty cool :p
<Ox0dea> `lolcat` uses ruby-paint nowadays.
<Ox0dea> Maybe it always did.
freerobby has joined #ruby
tenderlo_ has quit [Remote host closed the connection]
<Ox0dea> Er, it's just called paint.
<al2o3-cr> where is turtle that should be stdib
allcentury has joined #ruby
<al2o3-cr> *stdlib
brendan- has joined #ruby
<Ox0dea> Salamander > turtle.
<al2o3-cr> Nice :)
<loatbac> anyone here switched from another language?
hahuang65 has joined #ruby
<al2o3-cr> loatbac: have you?
<Ox0dea> loatbac: If you're here to let somebody else make up your mind, choose Ruby. :P
<loatbac> nah not really
havenwoo_ has joined #ruby
<loatbac> i've fiddled around with some others
<loatbac> but not really used them a lot
<al2o3-cr> loatbac: what you fiddled in?
<loatbac> i kinda want to learn python as well, but i still think ruby will be better
<loatbac> i tried to do java
yeticry has quit [Read error: Connection reset by peer]
<loatbac> and i played a bit with lua and c++
<al2o3-cr> Lua is gooodddd
Moosashi has joined #ruby
yeticry has joined #ruby
<Ox0dea> Why?
<al2o3-cr> loatbac: but ruby is better (but i'm biased) :P
davedev2_ has quit [Remote host closed the connection]
<loatbac> lol
<loatbac> lua is pretty fast isn't it?
<Ox0dea> JavaScript is faster.
KineticX has joined #ruby
epitron is now known as epi____
<al2o3-cr> javascript is the turbo charged (believe)
<loatbac> hmmm
<loatbac> what ide or text editor do you guys use?
<al2o3-cr> loatbac: pico
mostlybadfly has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
colegatron has joined #ruby
<al2o3-cr> and vim when i can get out of it
<loatbac> i did the tutorial for vim but havent used it for anything since then
<loatbac> its pretty neat
<al2o3-cr> nah vim's cool
<al2o3-cr> just use what you feel comfortable with
mdih has joined #ruby
mahk has joined #ruby
<loatbac> i've been using textmate, just a basic text editor with syntax highlighting for various languages
pik has joined #ruby
havenwoo_ has quit [Quit: Leaving]
<al2o3-cr> happy days :)
jud has joined #ruby
<al2o3-cr> loatbac: i use pencil and paper
<loatbac> XD
weemsledeux has joined #ruby
<al2o3-cr> :p
<loatbac> 0_o
<Ox0dea> I use a butterfly.
<Ox0dea> !xkcd 378
<Ox0dea> apeiros plz
<al2o3-cr> :) plz
<loatbac> ( ͡° ͜ʖ ͡°)
<al2o3-cr> !fact add butterfly https://xkcd.com/378/
c355e3b has quit [Quit: Connection closed for inactivity]
<al2o3-cr> :(
<Ox0dea> !fact add xkcd %d https://xkcd.com/%d/
tvw has quit [Remote host closed the connection]
<al2o3-cr> Ox0dea: Isn't that limnoria?
<Ox0dea> al2o3-cr: Could be anything.
Guest has quit [Ping timeout: 260 seconds]
<al2o3-cr> Seems to ring a bell :P
<shevy> I timetravel in order to write code
TheHodge has quit [Quit: Connection closed for inactivity]
<al2o3-cr> blackhole
<al2o3-cr> now that could be anything :P
blackmesa has quit [Ping timeout: 240 seconds]
chimche has joined #ruby
dorei has quit []
Derailed has quit [Quit: ZNC - http://znc.in]
phinary has quit [Ping timeout: 276 seconds]
loatbac has quit [Quit: loatbac]
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
Derailed has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
ferz_ has joined #ruby
ferz_ has quit [Remote host closed the connection]
mrmargolis has quit [Remote host closed the connection]
chimche has quit [Quit: Leaving.]
ferz_ has joined #ruby
ferz_ has quit [Client Quit]
cpup has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby
Moosashi has quit [Quit: Moosashi]
cpup has joined #ruby
ferz_ has joined #ruby
ferz_ has quit [Client Quit]
ledestin has quit [Read error: Connection reset by peer]
dn5 has joined #ruby
<dn5> Yo guys.. I stuck again, check out this gist: https://gist.github.com/dn5/6e5cda4328b0a9d2dc78
<dn5> Code doesn't work for second JSON example
<dn5> Maybe Ox0dea, you could give me a hint
<Ox0dea> dn5: Sure. The block you give Hash#each receives two arguments.
<Ox0dea> Since you're only declaring one (`child`), it's receiving both.
<Ox0dea> >> result = nil; {a: 1, b: 2}.each { |child| result = child }; result
<ruby[bot]> Ox0dea: # => [:b, 2] (https://eval.in/501404)
Bloomer has joined #ruby
hxegon is now known as hxegon_AFK
<dn5> Eh.. I still can't wrap my head around it. So does it actually have to separate each here for a particular key or?
chimche has joined #ruby
jam_ has joined #ruby
akem has joined #ruby
<Ox0dea> dn5: You should declare your block to take two parameters (`key` and `value` are great names here) and proceed accordingly.
<Ox0dea> DATA 1 is an array of hashes, DATA 2 is just a hash.
<Ox0dea> You won't be able to apply the exact same algorithm; they're just differently structured data.
<dn5> Ah..
gm987 has joined #ruby
nfk|laptop has joined #ruby
epi____ is now known as epipens
<dn5> ahh.. makes sense. now I'm either thinking about writing another function but first detect if it's array of hashes or a hash.. But I'm pretty sure there is more faster and common way
gm987 has left #ruby [#ruby]
epipens is now known as epistle
pawnbox has joined #ruby
jam_ has quit [Ping timeout: 250 seconds]
<Ox0dea> dn5: If you want to "array-ify" some random object, just use it as an argument to Kernel#Array.
<Ox0dea> >> [Array(1), Array([1])]
<ruby[bot]> Ox0dea: # => [[1], [1]] (https://eval.in/501406)
<al2o3-cr> dn5: if your using ruby 2.3 you could do hash.dig(:release, :version)
<Ox0dea> dn5: You want Kernel#Array, not Hash#dig.
<al2o3-cr> on the second one i mean sorry
<dn5> Ox0dea, never heard of Kernel#Array. Let me check the docs
<dn5> al2o3-cr, I'm on 1.9.3
<nfk|laptop> is that even supported?
allcentury has quit [Ping timeout: 272 seconds]
<Ox0dea> No.
chimche1 has joined #ruby
<al2o3-cr> nope
<Ox0dea> dn5: Upgrade that corpse forthwith!
<nfk|laptop> dn5, upgrade your ruby installation to at least 2.0
frem has quit [Quit: Connection closed for inactivity]
<dn5> eh..
<dn5> I'm just experimenting guys
<nfk|laptop> the differences between 1.9 and 2.0 iirc are annoying enough that you'll not want to port stuff later on
ropeney has joined #ruby
<Ox0dea> Experiment better.
<nfk|laptop> where did you even get something that old? some ancient windows binary?
<Ox0dea> 19>> %i[symbol arrays]
<ruby[bot]> Ox0dea: # => /tmp/execpad-6ca6c4af6901/source-6ca6c4af6901:2: unknown type of %string ...check link for more (https://eval.in/501407)
<Ox0dea> Joy.
freerobby has quit [Quit: Leaving.]
karapetyan has joined #ruby
_Tariq has joined #ruby
<_Tariq> Hello
<dn5> nfk|laptop, Ox0dea yep :/ gonna update it
pawnbox has quit [Ping timeout: 260 seconds]
sleetdrop_ has joined #ruby
chimche has quit [Ping timeout: 265 seconds]
<_Tariq> I want to know of any legal software license that would allow me to link to it instead of copying and pasting the whole text
<_Tariq> of the license
sleetdrop_ has quit [Client Quit]
lacuna has quit [Remote host closed the connection]
<_Tariq> Just a simple software license for code snippets, in case somebody believes they can't use it
sleetdrop has joined #ruby
<nfk|laptop> _Tariq, the license is what you write
shinnya has quit [Ping timeout: 245 seconds]
<_Tariq> Huh?
<Ox0dea> _Tariq: Are your snippets that amazing?
<nfk|laptop> _Tariq, for pastebin or publication?
<Ox0dea> nfk|laptop: For Gists.
<nfk|laptop> Ox0dea, beware of them
<Ox0dea> ?
<_Tariq> Yeah, for gists usually
<nfk|laptop> Ox0dea, i really don't have brain cells for tsukoming that
<nfk|laptop> _Tariq, are you in US of A?
<_Tariq> Yes.
growGROW has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<nfk|laptop> then say I _Tariq hereby release this code into public domain.
<nfk|laptop> maybe add year
<nfk|laptop> if you totally don't care what happens to them
<_Tariq> That could work. A crayon license.
<Ox0dea> But then French people won't be able to use it.
nb_bez___ has quit [Quit: Connection closed for inactivity]
<Ox0dea> France doesn't observe public domain.
<nfk|laptop> why?
<nfk|laptop> Ox0dea, i thought that matters to french citizens
<nfk|laptop> also that's why i asked about us of a
<Ox0dea> To be clear, we're talking about licensing Gists.
<Ox0dea> Which is retarded.
karapetyan has quit [Ping timeout: 260 seconds]
<nfk|laptop> pretty much everywhere else you can't relinquish your author rights or whatever they're called into public domain yourself
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
<nfk|laptop> Ox0dea, but are you sure that US public domain is copyrighted in EU?
jam_ has joined #ruby
<Ox0dea> Where did I say as much?
<nfk|laptop> [04:57] <Ox0dea> But then French people won't be able to use it.
ajf- has joined #ruby
fatih has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
<fatih> Hi everyone
<nfk|laptop> _Tariq, anyway, to give a more complete answer (IANAL, ya ken) you can also say that they can do whatever or just put it under ISC license which is what i use
<nfk|laptop> for stuff i want to publish and don't care what happens to it
northfurr has quit [Quit: northfurr]
krz has joined #ruby
hannelita has quit [Remote host closed the connection]
<fatih> I'm looking for a book which aims for programmers who knows already 1-2 languages very well
ympeg has quit [Remote host closed the connection]
<_Tariq> nfk|laptop: Got it
<_Tariq> So I will just find some way to handle it
<fatih> Is there any recommendation? It shouldn't be a book that teaches programming from ground
northfurr has joined #ruby
<fatih> I'm new to Ruby and would like to have something that teaches the basics in a short time
<_Tariq> Ox0dea: The only reason I'm worried about licensing Gists is that I want people to use my code but am afraid they might think a few lines of code is copyrightable
<nfk|laptop> fatih, if you know any language really well, just dive in?
<_Tariq> and thus will be deterred from using my code
<al2o3-cr> omg
<nfk|laptop> al2o3-cr, i do actually sometimes get that feeling to
<fatih> a book helps you to show the most important part in a very dense way, there is a reason for it
<nfk|laptop> though i try my best to shrug it off
<nfk|laptop> and i'm talking from the perspective of user there
jbrhbr has quit [Ping timeout: 250 seconds]
<al2o3-cr> this is a joke right?
<nfk|laptop> fatih, ruby koans
certainty has joined #ruby
<nfk|laptop> al2o3-cr, make of it whatever you want, if it makes you laugh, good for you
<nfk|laptop> fatih, there's also codeschool rails course which is how i started before moving on to koans
<_Tariq> fatih: RubyMonk is also a good course as well
bronson has joined #ruby
<_Tariq> Try also Ruby's Codecademy class as well
<fatih> Ok looking into it, thanks a lot for the suggestions
bkxd has joined #ruby
<nfk|laptop> oh, not rails but ruby course at codeschool
dopie has joined #ruby
<_Tariq> Also, "The Well Grounded Rubyist" and "Learn to Program"
<nfk|laptop> their rails for zombies course is more famous but you always start with pure ruby
<_Tariq> are two books that focus on Ruby.
<nfk|laptop> yeah, ruby has really good books
<_Tariq> Well-Grounded Rubyist is a bit more technical so if you already have experience in other languages, you'll like it
<_Tariq> I have also heard of the Pickaxe book, but I never read it.
<nfk|laptop> meanwhile python has some crazy nice irc community
bronson has quit [Remote host closed the connection]
daivyk has quit [Quit: ZZZzzz…]
<nfk|laptop> and python has bindings to almost everything but ruby (probably)
<_Tariq> Is there any way to copy the irc chat and paste it into a book?
djbkd_ has joined #ruby
<nfk|laptop> hopefully not
danieli has joined #ruby
<nfk|laptop> but i'm sure nsa has perfected the art of it anyway
<al2o3-cr> _Tariq: why would you wanna do that?
<_Tariq> al2o3-cr: It's a joke
guacamol_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> Oh, it's you the joker
<_Tariq> A jokey suggestion by which python might be able to have a good book like the Ruby community
<_Tariq> al2o3-cr: Yeah, I guess my jokes aren't that good.
<_Tariq> well, that joke.
<_Tariq> The other license nonsense wasn't a joke.
<_Tariq> But...er...that's a bit offtopic.
certainty has quit [Ping timeout: 272 seconds]
mloveless has joined #ruby
<nfk|laptop> _Tariq, anyway, be sure your license is not as long or longer than the actual code
hxegon_AFK has quit [Quit: BRB]
<nfk|laptop> if it is, make it sorter
bkxd has quit [Ping timeout: 260 seconds]
<nfk|laptop> or just skip it entirely, hopefully whoever decides to borrow a line or two knows how to adapt it to their code
mloveless has left #ruby [#ruby]
<_Tariq> Yeah, ISC seems to be a good fit for me. Only 120 words.
<nfk|laptop> and even if they didn't unless it has some really weird stuff like granny_achings_special_variable no one will be able to prove it's not original code anyway
<nfk|laptop> _Tariq, still long in my books
<_Tariq> Yeah, there really needs to be something even simpler.
<al2o3-cr> _Tariq: Willing to share the code?
<nfk|laptop> dwtfyw licence
djbkd_ has quit [Ping timeout: 265 seconds]
<_Tariq> al2o3-cr: Sure, I can do that
<_Tariq> At least the code that got me kinda upset
<nfk|laptop> al2o3-cr, are you hoping it's a code to select the best license out there?
<al2o3-cr> _Tariq: Link?
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
hxegon has joined #ruby
northfurr has quit [Quit: northfurr]
<_Tariq> This was a long time ago, but this code has annoyed me to no end
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
janebootydoe has quit [Read error: Connection reset by peer]
<_Tariq> 183 words for the code, 173 words for the MIT license.
<nfk|laptop> _Tariq, you are missing the point, every file must have a preamble, at least classically
<nfk|laptop> i'm really not sure any license applies if you don't specify it in the file
<_Tariq> ...oh.
<_Tariq> I thought if it's in the README or there is a license file
<_Tariq> that's it.
<_Tariq> it applies all over the code unless specifically mentioned not
djbkd has quit [Quit: My people need me...]
<nfk|laptop> IANAL but i'm suspecting that stuff is technically (at least by the EU style copyright law) under a proprietary license
<_Tariq> er, which stuff?
juddey has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
<_Tariq> UNLICENSE: 199 words, Code (excluding the paragraphs array): 49 words
<nfk|laptop> _Tariq, you do not need to put the full license text in every file but normally you'd have a small or not so small preamble that states year, author(s), copyright holder (not sure about order there) and usually on another line the license name at least or or something.
hxegon has quit [Ping timeout: 264 seconds]
<_Tariq> This is going to annoying fast.
<_Tariq> Especially because I have already created a lot of repos
<_Tariq> with files that do not have that preamble.
<_Tariq> Hm.
peeja has quit [Ping timeout: 255 seconds]
<nfk|laptop> _Tariq, there, see this as an example https://github.com/mpv-player/mpv/blob/master/video/vdpau.c
<havenwood> >> Gem::Licenses::IDENTIFIERS
<ruby[bot]> havenwood: # => ["0BSD", "AAL", "ADSL", "AFL-1.1", "AFL-1.2", "AFL-2.0", "AFL-2.1", "AFL-3.0", "AGPL-1.0", "AGPL-3.0 ...check link for more (https://eval.in/501408)
<nfk|laptop> i just picked a random file from the best multi-platform video player
dopie has quit [Quit: Lost terminal]
northfurr has joined #ruby
pawnbox has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nfk|laptop> _Tariq, i don't think it's that important
<nfk|laptop> for one, i can't imagine anyone wanting to reuse or even finding your code, sorry
<_Tariq> ...yeah, that is true
<_Tariq> But just in case, you know.
<_Tariq> Always handling edge cases.
<nfk|laptop> then you get to write a ruby script to relicense your code and push the new versions
<_Tariq> ...oh dear.
<nfk|laptop> it will be the most useful code you have written so far, probably, and a good practice
<Ox0dea> nfk|laptop: http://ruby.sadi.st/Flay.html
<Ox0dea> Regarding Granny's variable.
<nfk|laptop> and once you get to it you'll find it will have taken much less time than you expected as long as you KISS
Moosashi has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
<nfk|laptop> Ox0dea, i was being a bit sarcastic there
<nfk|laptop> Ox0dea, i seriously do not think you can prove anything from just few lines
<dn5> Ox0dea, I may found the way how to deal with the problem I wrote. On first example, the hash.count returns 2, while on second, it always return 1. I just need to rewrite a function for the second data example
<Ox0dea> >> {a: 1}.size # dn5
<ruby[bot]> Ox0dea: # => 1 (https://eval.in/501409)
nbdy has joined #ruby
<Ox0dea> It's returning the number of key-value pairs.
<Ox0dea> You want Kernel#Array, my friend.
<nfk|laptop> like if i had foos.map! { |nfk_special_sauce| nfk_special_sauce++ } and someone re-used it with just different identifier in place of foos it would be very indemnifying but otherwise it's as generic as they come
Mirry has quit [Quit: leaving]
<dn5> Ox0dea, It will work. The second example always return one "release"
Ebok has quit [Read error: Connection reset by peer]
<Ox0dea> dn5: But don't you want to treat it like all the other results?
psy_ has joined #ruby
psy_ has quit [Read error: Connection reset by peer]
<dn5> Ox0dea: I don't have to. I just need the output it in the same "style" as first example. But I need to figure out how to do hash.each for a single hash and not array of hashes
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopie has joined #ruby
<nfk|laptop> dn5, countless ways, the worst is by using [*array]
jbrhbr has joined #ruby
<nfk|laptop> the best is to write your code in a way that you never have to "solve" such issues
<dn5> Ic.. it's still experimenting.
<nfk|laptop> note that while it works you are unpacking an array within an array which is at best brain-dead
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
UtkarshRay has joined #ruby
<Ox0dea> I called it `foo`; you're calling it `hash`. Do you see the problem?
<Ox0dea> nfk|laptop: Then why does Kernel#Array exist?
Moosashi has quit [Quit: Moosashi]
<Ox0dea> `Array(foo) == [*foo]` for all `foo`.
<nfk|laptop> i have no idea what Kernel even is for
<Ox0dea> Then you should stop offering "advice".
<nfk|laptop> the only kernels i know are linux kernel and kernel functions both of which i have fuzzy experience with
<dn5> Ox0dea, ah that make sense man
dstarh has joined #ruby
<dn5> much more sense
<Ox0dea> dn5: Your first snippet does indeed work just fine for an array of hashes.
<Ox0dea> So instead of rewriting it, just convert your single hash to a one-element array containing it.
FooMunki has quit [Quit: FooMunki]
<Ox0dea> Via Kernel#Array.
davedev24 has joined #ruby
northfurr has quit [Quit: northfurr]
<dn5> which I guess is not supported in my old version of ruby from what I've seen in docs
<Ox0dea> 19>> Array(1)
dstarh has quit [Client Quit]
<ruby[bot]> Ox0dea: # => [1] (https://eval.in/501416)
<al2o3-cr> so slow :(
<dn5> Ah, that type of array. It's a normal array
<Ox0dea> dn5 plz
davedev24 has quit [Remote host closed the connection]
<Ox0dea> Array is a class, but there is also a method with the same name.
<resin> lol
northfurr has joined #ruby
<dn5> i'm not clear with my head in 5am
<Ox0dea> dn5: The Array method will convert its argument to an Array (the class) unless the argument was already an array.
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
<dn5> So Array(the_hash) if I'm correct
<Ox0dea> Just so.
<Ox0dea> Except that name is terrible.
<Ox0dea> Because sometimes it'll be an array of hashes.
<dn5> It's not in code, just saying
<dn5> Okay, great. Let me try it
kalopsian has joined #ruby
yfeldblum has quit [Remote host closed the connection]
felixdd has joined #ruby
Rodya_ has joined #ruby
sankaber has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
<dn5> Getting [] can't convert String into Integer again
konsolebox has quit [Max SendQ exceeded]
<dn5> Ox0dea, should I .each through newly created Array(hash)?
konsolebox has joined #ruby
mfb2 has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
nbdy has quit [Ping timeout: 264 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
jbrhbr has quit [Quit: Leaving.]
<Ox0dea> Turns out Kernel#Array separates a Hash argument into key-value pairs. :(
swgillespie has joined #ruby
<dn5> I was just checking it out
radgeRayden_ has joined #ruby
twistedpixels has quit [Ping timeout: 250 seconds]
usershell has joined #ruby
<Ox0dea> That breaks the generality in the case that you've already got an array of actual hashes, so you have to resort to wrapping it explicitly.
mfb2 has quit [Ping timeout: 272 seconds]
<Ox0dea> Which is kinda lame.
<dn5> My ruby knowledge is lame so what's the matter :p
<Ox0dea> For what it's worth, you're getting that error because you're trying to index into an Array with a String, which is crazy-talk.
<Ox0dea> >> []['foo'] rescue $!
<ruby[bot]> Ox0dea: # => #<TypeError: no implicit conversion of String into Integer> (https://eval.in/501424)
hxegon has joined #ruby
radgeRayden has quit [Ping timeout: 276 seconds]
<dn5> Ox0dea, ah, ic
<dn5> Ok, no error, but no results either.
hxegon is now known as hxegon_AFK
janebootydoe has joined #ruby
<dn5> hash.each do |child| puts "v" + child[0]['version'].to_s end
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hxegon_AFK is now known as hxegon
jam_ has quit [Remote host closed the connection]
<dn5> hash.each do |child| puts "v" + child[0]['release']['version'].to_s end
<dn5> no error, but no result
UtkarshRay has quit [Remote host closed the connection]
<dn5> welp, I'll keep trying :p
northfurr has quit [Quit: northfurr]
kies^ has quit [Ping timeout: 240 seconds]
hannelita has joined #ruby
tenderlove has quit [Remote host closed the connection]
kies^ has joined #ruby
jam_ has joined #ruby
<Ox0dea> dn5: Because I don't want you to be stuck on something so silly: https://eval.in/501425
<Ox0dea> Your choice of `child` as the parameter was unnecessarily confusing.
braincrash has quit [Quit: bye bye]
<dn5> Ox0dea, thanks man, you da real MVP. But I just finished my version
<Ox0dea> May I see?
bkxd has joined #ruby
astrobun_ has joined #ruby
<dn5> It's a dirty hack. I add brackets around "release" { { release } } and the old version worked fine with the second example of data too
bronson has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby
jam_ has quit [Ping timeout: 264 seconds]
braincrash has joined #ruby
hahuang65 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has joined #ruby
northfurr has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
zast has joined #ruby
nixmaniack has joined #ruby
nixmaniack has joined #ruby
hxegon is now known as hxegon_AFK
bronson has quit [Ping timeout: 256 seconds]
hxegon_AFK is now known as hxegon
hahuang65 has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
<nfk|laptop> now i remember why ruby sometimes drives me crazy, how do i assign a reference to object or is ruby too functional for that?
<Ox0dea> nfk|laptop: What kind of object?
speaking1ode has joined #ruby
<nfk|laptop> an instance to a custom class
<nfk|laptop> like foo.bars = all_bars.sample 10
hakunin has quit [Remote host closed the connection]
<Ox0dea> ?
lacuna has quit [Remote host closed the connection]
chimche1 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
<nfk|laptop> and then when i do all_bars.map! { 42 } i expect that...
<nfk|laptop> right
hakunin has joined #ruby
<nfk|laptop> that was dumb
kp666 has joined #ruby
<nfk|laptop> never mind me
bronson has joined #ruby
astrobun_ has quit []
astrobun_ has joined #ruby
<nfk|laptop> clearly i'm too tired, night
dopie has quit [Quit: Lost terminal]
kp666 has quit [Max SendQ exceeded]
<dn5> me too.. night
<Ox0dea> Ruby's collection types are already references, but there's always #__id__ and ObjectSpace._id2ref if you really need something crazy.
<dn5> Ox0dea, g'night
lacuna has joined #ruby
<dn5> <3
<Ox0dea> Night, dn5.
<dn5> and thanks btw
<Ox0dea> My pleasure.
kp666 has joined #ruby
ozzloy has joined #ruby
ozzloy has joined #ruby
dn5 has quit [Quit: Leaving]
tenderlove has joined #ruby
<nfk|laptop> Ox0dea, yeah, when i rewrote the test code to actually do the right thing it worked as expected
tenderlove has quit [Remote host closed the connection]
<nfk|laptop> that however makes me wonder what happens in case of threading
hxegon has quit [Quit: BRB]
<Ox0dea> I'm convinced you're a buzzword machine.
pawnbox has joined #ruby
djbkd has joined #ruby
<nfk|laptop> i'm not
tenderlove has joined #ruby
User458764 has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bMalum has joined #ruby
houhoulis has joined #ruby
dh64 has quit [Quit: Konversation terminated!]
jam_ has joined #ruby
djbkd has quit [Ping timeout: 246 seconds]
nfk|laptop has quit [Quit: yawn]
moei has quit [Read error: Connection reset by peer]
kies has quit [Ping timeout: 272 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
moei has joined #ruby
cornerma1 has joined #ruby
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
astrobun_ has quit []
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
astrobun_ has joined #ruby
djellemah_ has joined #ruby
djbkd has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
UtkarshRay has joined #ruby
nixmaniack has joined #ruby
scripore has quit [Quit: Leaving]
scripore has joined #ruby
djellemah has quit [Ping timeout: 256 seconds]
_Tariq has quit [Remote host closed the connection]
djbkd_ has joined #ruby
dseitz has quit [Remote host closed the connection]
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
kies^ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
hxegon has joined #ruby
yfeldblum has joined #ruby
akem has quit [Quit: Bye]
JohnT has joined #ruby
djbkd_ has quit [Ping timeout: 265 seconds]
scripore has quit [Quit: Leaving]
pawnbox has joined #ruby
kies has joined #ruby
rkazak has joined #ruby
pik has quit [Ping timeout: 255 seconds]
astrobun_ has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
bobajett has joined #ruby
nbdy has joined #ruby
<bobajett> I need help with naming convention. What should I call a method that does this: def xxx_foo( resource ); foo = get_foo( resource ); if !foo: foo = make_foo(); save(foo); return foo
cpup has quit [Ping timeout: 240 seconds]
<bobajett> where Im mapping get_foo() and save_foo() to getting and saving the resource to a DB.
arup_r has joined #ruby
mary5030 has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cpup has joined #ruby
mary5030 has joined #ruby
mfb2 has joined #ruby
choke has quit [Ping timeout: 276 seconds]
jbrhbr has joined #ruby
bobajett has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
nixmaniack has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Ping timeout: 240 seconds]
nixmaniack has joined #ruby
mfb2 has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Ping timeout: 255 seconds]
krz has quit [Ping timeout: 276 seconds]
janebootydoe has quit [Ping timeout: 256 seconds]
gix has quit [Ping timeout: 246 seconds]
krz has joined #ruby
tmtwd has joined #ruby
arescorpio has quit [Quit: Leaving.]
jbrhbr has quit [Quit: Leaving.]
jbrhbr has joined #ruby
gix has joined #ruby
kt2 has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
dopie has joined #ruby
hannelita has joined #ruby
astrobun_ has joined #ruby
hxegon is now known as hxegon_AFK
vdamewood has joined #ruby
hxegon_AFK has quit [Quit: BRB]
certainty has joined #ruby
atomical has quit [Ping timeout: 265 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has joined #ruby
sankaber has quit [Client Quit]
ohaibbq has joined #ruby
pawnbox has quit [Remote host closed the connection]
guacamole has joined #ruby
lacuna has quit [Remote host closed the connection]
hannelita has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
kies^ has joined #ruby
mary5030_ has joined #ruby
certainty has quit [Ping timeout: 264 seconds]
hxegon has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
mary5030 has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
Encapsulation has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nbdy has quit [Ping timeout: 245 seconds]
mostlybadfly has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
bMalum has joined #ruby
n00bdev has joined #ruby
dopie has quit [Quit: Lost terminal]
pik has joined #ruby
dopie has joined #ruby
darkf has joined #ruby
juddey has quit [Ping timeout: 245 seconds]
atomical has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 276 seconds]
QpQ4 has joined #ruby
kt2 has quit [Quit: ...]
nixmaniack has joined #ruby
astrobu__ has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n1x has joined #ruby
n00bdev has quit []
astrobun_ has quit [Ping timeout: 240 seconds]
nixmaniack has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
JohnT has joined #ruby
<smactive> Can anyone help me with rspec shared example?
<smactive> I expect it_behaves_like to fail
KineticX has quit [Remote host closed the connection]
n1x has quit [Read error: Connection reset by peer]
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has joined #ruby
kalopsian has quit [Ping timeout: 250 seconds]
User458764 has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
jenrzzz has joined #ruby
sigurding has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rkazak has quit [Quit: Sleep.....ing....]
Rodya_ has quit [Ping timeout: 246 seconds]
hxegon is now known as hxegon_AFK
jenrzzz has quit [Ping timeout: 256 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
ponga has joined #ruby
elaptics`away is now known as elaptics
hxegon_AFK has quit [Quit: BRB]
norc_ has joined #ruby
norc is now known as Guest35313
norc_ has left #ruby [#ruby]
norc has joined #ruby
<norc> Good morning folks
yfeldblum has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fatih has quit [Quit: Connection closed for inactivity]
pdoherty has quit [Ping timeout: 255 seconds]
ruby-lang995 has joined #ruby
<ruby-lang995> hey
<ruby-lang995> can someone help me on this ruby code in codepen.io
<ruby-lang995> its a few lines of code that need debugging
<ruby-lang995> i believe the code is right but it is not showing up in the window
sigurding has quit [Quit: sigurding]
terminalrecluse has joined #ruby
govg has quit [Ping timeout: 264 seconds]
<ruby-lang995> is anyoen there
<norc> ruby-lang995: I think you may be in the wrong channel.
djbkd has quit [Quit: My people need me...]
ur5us has quit [Remote host closed the connection]
<norc> ruby-lang995: While I would really like ruby methods to be first class objects, I think you are looking for ##javascript.
dionysus69 has joined #ruby
hannelita has joined #ruby
ruby-lang995 has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
llfwf33 has joined #ruby
hahuang61 has joined #ruby
twistedpixels has joined #ruby
twistedpixels has quit [Excess Flood]
llfwf33 has quit [Max SendQ exceeded]
twistedpixels has joined #ruby
llfwf33 has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
hannelita has quit [Ping timeout: 264 seconds]
usershell has quit [Read error: Connection reset by peer]
QpQ4 has quit [Quit: Textual IRC Client: www.textualapp.com]
bkxd has quit [Ping timeout: 240 seconds]
usershell has joined #ruby
llfwf33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has quit [Ping timeout: 255 seconds]
astrobu__ has quit [Remote host closed the connection]
sneakerhax has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
norc has quit [Ping timeout: 252 seconds]
northfurr has quit [Quit: northfurr]
ur5us has joined #ruby
terminalrecluse is now known as gigatexal
sigurding has joined #ruby
sarkis has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
last_staff has joined #ruby
argentdrake has joined #ruby
fantasticsid has joined #ruby
a1ph4g33k has joined #ruby
naftilos76 has joined #ruby
bronson has quit [Remote host closed the connection]
<argentdrake> Hello fellow Ruby smiths. I was hoping someone could help me out. I have alot of experience programming so I'm not a newby :) I need to learn rails asap due to bossman's orders. Anyone know where I could pick up ruby so I can get started on rails asap?
sarkis has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
djbkd has quit [Remote host closed the connection]
ascarter has joined #ruby
<a1ph4g33k> argentdrake: You can hit one of the Rails courses on Udemy ... if you stick at it, should only take a few days to bang through the entire course. Or you could go with PragStudio.
dagda1 has joined #ruby
<a1ph4g33k> argentdrake: Third option ... codeschool.com
weemsledeux has joined #ruby
dagda1 has quit [Client Quit]
davedev24 has joined #ruby
djbkd has joined #ruby
norc has joined #ruby
alyssadaemon has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
chouhoul_ has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
<Cohedrin> agentdrake: 2 things, one #rubyonrails is what you're looking for probably
sarkis has joined #ruby
<Cohedrin> but if you have programming experience I would just recommend making an app or something
<Cohedrin> rails is really intuitive, along with ruby
<Cohedrin> if you just start making something and google the parts you need you should have a decent understanding pretty quick
znz_jp has quit [Quit: kill -QUIT $$]
<norc> You should really not start with Ruby on Rails if you are new to Ruby.
chouhoulis has quit [Ping timeout: 265 seconds]
<alyssadaemon> RoR will trap you into certain ways that aren’t really ‘ruby’ like anything in the activesupport gem
<cscheib> argentdrake: michael hartl's book is free online... or what a1ph4g33k said. Since it's for work, it may be beneficial to sign up for a paid course that allows you to ask questions from a teacher, whether it's instructor led or not
sarkis has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
northfurr has joined #ruby
bronson has joined #ruby
zast has quit [Remote host closed the connection]
Rodya_ has joined #ruby
znz_jp has joined #ruby
mdih has quit [Ping timeout: 245 seconds]
fantasti` has joined #ruby
<Cohedrin> norc: he said he needs to learn rails for his job
<norc> Cohedrin: Even more important to start off with plain Ruby then.
<Cohedrin> why do you say so?
<argentdrake> Thanks for the answers guys
Xeago has joined #ruby
<argentdrake> a1ph4g33k: Any of those courses you highly reccomend?
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobun_ has joined #ruby
JohnT has joined #ruby
<Cohedrin> micheal hartls is pretty popular
claw has quit [Ping timeout: 264 seconds]
rkazak has joined #ruby
<Cohedrin> its a very simple to read but detailed book
<alyssadaemon> Cohedrin: I agree with norc, they need to start with basic Ruby. Get the base language first.
<Cohedrin> it walks you through making an entire app
<cscheib> the Hartl book is free, but you can pay for videos and such
fantasticsid has quit [Ping timeout: 240 seconds]
<norc> Cohedrin: Rails users dont even understand how mixins work, how method dispatch works, how Enumerable works.
tjohnson has quit [Quit: Connection closed for inactivity]
<norc> Those who dont start off learning Ruby first anyway.
<Cohedrin> fair enough, but why do they need to?
<cscheib> the Hartl book starts with a no-ruby-knowledge assumption, iirc
<norc> Cohedrin: They will just see all these Rails things as magic. They will not understand how to debug, how to make changes.
northfurr has quit [Client Quit]
<norc> And Rails has a pretty huge load of magical things that you need to understand first. Like Rails autoloading magic, or how Rails implements concerns.
<Cohedrin> I guess I can see that, but I think as they work on it they'll begin to understand them
Rodya_ has quit [Ping timeout: 240 seconds]
sarkis has joined #ruby
<cscheib> starting with Ruby first doesn't magically bang that knowledge into your head either
<Cohedrin> I can see where you're coming from, but I don't those reasons alone are enough to say "don't do any rails until you have a full understanding of ruby"
<Cohedrin> I don't really see the argument here, those are all things you pick up as you go along
<cscheib> there's a lot of "magic" that you have to figure out as you learn Ruby as well
<norc> cscheib: Honestly all the magic disappeared when I first visited https://github.com/ruby/ruby
<norc> Quirks remain, but there is nothing magical anymore.
<Cohedrin> that same logic could be applied to the rails repo
claw has joined #ruby
<norc> A lot of things become much easier to understand if you dont think in terms of "instance methods" and "class methods" for example. Ruby has only class methods.
<Cohedrin> "all the magic went away once I read the entirety of the source code"
<norc> Not the entirety.
<norc> I just look it up regularly to understand Ruby features.
<cscheib> sure, if you have a solid programming background
wldcordeiro has quit [Ping timeout: 255 seconds]
djbkd has quit [Quit: My people need me...]
<cscheib> but, still, it's not always apparent what's going on from source.
<a1ph4g33k> argentdrake: You get the best return on codeschool.com
sarkis has quit [Ping timeout: 260 seconds]
<norc> cscheib: Just take my example about "instance" and "class methods"
TomyLobo has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
Rinalds has joined #ruby
<a1ph4g33k> argentdrake: CodeSchool has a whole Ruby class path, including Ruby, Rails, and a set of testing ( both general ruby & rails ) courses.
jam_ has quit [Remote host closed the connection]
<cscheib> I'd agree with a1ph4g33k - start there in addition to the Hartl book
<Cohedrin> +1 for hartl
rkazak has quit [Quit: Sleep.....ing....]
<norc> cscheib: I have just seen too many people in #rubyonrails asking questions like "How do I create a non activerecord model" - which is just a result from not understanding what they are really doing.
jam_ has joined #ruby
arup_r has quit [Remote host closed the connection]
jam_ has quit [Read error: Connection reset by peer]
<cscheib> norc: which is honestly mostly a benefit of the language - you get up and running quickly, and worry about the details later
<Ox0dea> <norc> ... I would really like ruby methods to be first class objects...
<Ox0dea> I did a naughty.
<norc> Wtf.
jam_ has joined #ruby
<Ox0dea> It could be pushed so much furthe rtoo.
<cscheib> it's also a negative of the language
<cscheib> but, that comes later.
<Ox0dea> I suspect binding_of_caller could be used to introduce the auto-curried methods as locals. :P
ascarter has joined #ruby
<cscheib> some people learn by peeling away layers, rather than ingesting everything all at once
symm- has joined #ruby
<cscheib> anyway,they've heard both sides :P
arup_r has joined #ruby
sarkis has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
<norc> Ox0dea: What is this ArgumentError about?
<Ox0dea> norc: It's the Exception that gets raised in the case of an arity mismatch.
blackgoat has quit [Ping timeout: 250 seconds]
akash_ has joined #ruby
<akash_> Hi Can anyone help me regarding ruby on rails?
<norc> Ox0dea: Oh okay. That took me a second to understand. Ugly hack, nice feature.
<Ox0dea> Smells funny.
<cscheib> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<bougyman> that's a #rubyonrails channel for that
<Ox0dea> I bet they know.
arup_r has quit [Ping timeout: 276 seconds]
sarkis has quit [Ping timeout: 246 seconds]
<bougyman> we should rename this channel to #rubynotrails
<norc> Ox0dea: That suddenly explains why this only works for arity != 0 :-)
<Ox0dea> norc: Indeed. :P
<Ox0dea> All sorts of methods already do something slightly fancy with no arguments.
<Ox0dea> >> [1,2,3].map
<ruby[bot]> Ox0dea: # => #<Enumerator: [1, 2, 3]:map> (https://eval.in/501478)
kerunaru has joined #ruby
<akash_> ys rails @cscheib
lxsameer has joined #ruby
Insti has quit [Ping timeout: 250 seconds]
<Ox0dea> ?rails akash_
<ruby[bot]> akash_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<norc> Ox0dea: You should probably do some testing of method(m).arity against args
<norc> Ox0dea: Because you might somehow trigger ArgumentError for some other reason
<Ox0dea> norc: Er, what comparison, though?
<akash_> How can i join #RubyOnRails?
<norc> idk honestly
<Ox0dea> norc: That's the tricky bit.
<akash_> I am new to this site
<Ox0dea> Lots of arity -1 methods.
<norc> Ox0dea: Wait! We have the solution now.
<Ox0dea> Hm?
wldcordeiro has joined #ruby
sarkis has joined #ruby
<norc> Ox0dea: Wouldn't m_arity < 0 ? args.length >= m_arity : args.length == m_arity be enough to verify arity match?
certainty has joined #ruby
<Ox0dea> Certainly not >=, but that looks about right otherwise.
<norc> Why not?
hannelita has joined #ruby
<akash_> In my application, there is a messaging system(not real time) where users can send messages to other users. Now I want to add blocking feature so that users can block other usres to avoid messages from those users. How can I do this?
<norc> Oh it is n-1
<Ox0dea> norc: Extraneous arguments should be an error?
<norc> Ox0dea: Negative arity means variable arguments.
<Cohedrin> akash_ is this rails or ruby
<Ox0dea> norc: I know.
smactive has quit [Remote host closed the connection]
<Ox0dea> Oh, I see now.
<Ox0dea> Well, -1 arity means any number of arguments; other negatives indicate how many are optional.
<Ox0dea> >> def foo a, b = 1, c = 2; end; method(:foo).arity
<ruby[bot]> Ox0dea: # => -2 (https://eval.in/501480)
akash_ has quit [Quit: Page closed]
<norc> "For Ruby methods that take a variable number of arguments, returns -n-1, where n is the number of required arguments"
clauswitt has joined #ruby
yardenbar has joined #ruby
<Ox0dea> Yeah, that.
Bloomer has quit [Remote host closed the connection]
<norc> m_arity < 0 ? args.length > m_arity.abs : args.length == m_arity
<norc> then?
certainty has quit [Ping timeout: 255 seconds]
sarkis has quit [Ping timeout: 276 seconds]
arup_r has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
<Ox0dea> LGTM.
<Ox0dea> I do wish C methods would say more about their parameters.
MissionCritical has quit [Ping timeout: 260 seconds]
<Ox0dea> >> ''.method(:gsub).parameters
<ruby[bot]> Ox0dea: # => [[:rest]] (https://eval.in/501481)
<Ox0dea> Gee, thanks.
solars has joined #ruby
<norc> C method. That expression just does not pass my parser in my brain.
<norc> Oh that you mean.
<Ox0dea> Methods implemented in C.
<Ox0dea> TracePoint calls the event "c_call", but, well, what's being called if not a method?
<norc> Ever since I started learning about grammars and parsing, I suddenly realised that - aside from the written language - Japanese language should be fairly easy to learn.
<Ox0dea> How do you figure?
houhoulis has quit [Remote host closed the connection]
<Ox0dea> (I've tried twice now. :/)
<norc> Japanese uses agglutination in their grammar.
<norc> Which is extremely systematic.
<Ox0dea> Language is pretty systematic in general, really.
sarkis has joined #ruby
solars has quit [Client Quit]
<norc> Ox0dea: The issue is just inflection which can be pretty nasty to learn.
solars has joined #ruby
<norc> Especially when you have languages like German where half your vocabulary is just irregular.
<norc> And then you add grammatical gender into the mix, and you have a language that you cannot learn flawlessly if you are not born with it.
scepticulous has joined #ruby
gigatexal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
certainty has joined #ruby
tagrudev has joined #ruby
<Ox0dea> > [N]o mere mortal has ever "flown out" to center field.
sandstrom has joined #ruby
gagrio has joined #ruby
bithon has quit [Ping timeout: 276 seconds]
zenspider_ is now known as zenspider
<Ox0dea> norc: I do think properly immersing oneself in the surrounding culture can get you extremely close to native fluency, but that's not an easily done thing.
sarkis has quit [Ping timeout: 255 seconds]
CloCkWeRX has quit [Ping timeout: 246 seconds]
MissionCritical has joined #ruby
tjbiddle has joined #ruby
<norc> Ox0dea: Absolutely. However even the best immersed foreigner I will notice immediately when he repeatedly mixes up the grammatical gender of words.
<norc> It is just something that has nothing to do with culture, and things like that really do impact the fluency.
<norc> English is rather simple in comparison. :-)
n00bdev has joined #ruby
<Ox0dea> norc: Grammatical gender is such a dumb idea; what's the benefit that we find it in so many languages?
<norc> Ox0dea: I have no idea. It becomes even more confusing when you use a word like "Mädchen" which is German for girl. Of course that word is not feminine, but neuter.
<norc> It really is dumb.
<Ox0dea> It's because gender applies to the word itself, not what it describes.
<Ox0dea> Which is indeed incredibly stupid.
<norc> Exactly. I mean in Latin it kind of is fine because you can see the grammatical gender most of the time just looking at the suffix.
codecop has joined #ruby
<norc> But in German that only works *sometimes*.
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarkis has joined #ruby
<norc> Though I have a general recipe for non native speakers. I always tell them to use "neuter" if in doubt. It sounds least awkward even if wrong.. :-)
<Ox0dea> How quickly did you pick up on the intended interpretation of "Otokari", then? :)
<norc> Come again?
ta has quit [Remote host closed the connection]
<Ox0dea> It's what I called the refinement?
tagrudev has quit [Quit: This computer has gone to sleep]
<norc> I have not yet.
JohnT has joined #ruby
<norc> My Japanese vocabulary has a length of 0 currently.
<Ox0dea> It's pseudo-Japanese for "auto-curry". :P
x86_ has joined #ruby
<norc> Haha that is hilarious.
bronson has quit [Remote host closed the connection]
<Ox0dea> Related: how hard would it be to make `endddddd` a valid way to close that monstrosity?
<norc> I guess that is one of the downsides of being a German native speaker. I read that with German pronunciation in mind, so it never occured to me.
sarkis has quit [Ping timeout: 256 seconds]
<norc> Extremely simple.
<Ox0dea> norc: But you've been inside insns.def!
chipotle has quit [Quit: cheerio]
<norc> You mean parse.y
x86_ has quit [Client Quit]
<Ox0dea> I meant as exposure to Japanese.
andikr has joined #ruby
blt has quit [Quit: WeeChat 1.3]
chipotle has joined #ruby
x86_ has joined #ruby
dnewkerk has quit [Quit: dnewkerk]
<norc> Thanks for reminding me of that torturous experience.
<Ox0dea> I have fun every time I go. :P
<norc> I meant the Japanese exposure part.
<Ox0dea> Ah, right.
bithon has joined #ruby
<norc> Yesterday I discovered that I need to get into touch with jruby folks more.
<norc> There is plenty of English speaking folks with high knowledge of Ruby internals. :-)
<Ox0dea> It's true.
tagrudev has joined #ruby
<Ox0dea> That's not to say you'll be diverting your interest away from KRI?
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
x86_ has quit [Client Quit]
<norc> Absolutely not. I find Java to be one of the more disgusting languages around.
sarkis has joined #ruby
<Ox0dea> If Ruby ever did get /end+/, we could say it has infinitely many keywords. :P
TomyLobo has quit [Ping timeout: 255 seconds]
gagrio_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
<norc> That should be fairly trivial to hack into parse.y I reckon.
certainty has quit [Ping timeout: 260 seconds]
<Ox0dea> >> def end()end
<ruby[bot]> Ox0dea: # => :end (https://eval.in/501514)
<norc> >> ?q
<ruby[bot]> norc: # => "q" (https://eval.in/501515)
<norc> Oh.
<Ox0dea> Hm?
<norc> I never gave any thought to what ?a actually did.
<Ox0dea> >> ?\M-x
<ruby[bot]> Ox0dea: # => "\xF8" (https://eval.in/501516)
<Ox0dea> >> ?\C-j # This one's a little more recognizable.
<ruby[bot]> Ox0dea: # => "\n" (https://eval.in/501517)
sarkis has quit [Ping timeout: 276 seconds]
dtordable has left #ruby [#ruby]
Rodya_ has joined #ruby
<Ox0dea> norc: You know Ruby has C's juxtaposition-is-concatenation semantics, yeah?
jbrhbr has quit [Quit: Leaving.]
astrobun_ has quit [Remote host closed the connection]
aufi has joined #ruby
<norc> Ox0dea: I have managed to avoid dealing with strings in C for 26 years. Don't stop me now.
<Ox0dea> >> ['a''b', ?a'b', begin; eval("'a'?b"); rescue SyntaxError; :oops end] # norc
<ruby[bot]> Ox0dea: # => ["ab", "ab", :oops] (https://eval.in/501520)
x86_ has joined #ruby
<Ox0dea> It's not a bug either, just... a necessary asymmetry.
sarkis has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
<norc> Ox0dea: What do you mean by juxtaposition here though?
<Ox0dea> norc: Squishin' 'em together.
llfwf33 has joined #ruby
<norc> That must happen in the compiler somewhere.
<Ox0dea> Almost definitely the parser.
<norc> Ox0dea: Whops yeah parser.
<Ox0dea> literal_concat()
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Was looking at the lexer there and was confusing things.
auzty has joined #ruby
ur5us has joined #ruby
x86_ has quit [Client Quit]
sarkis has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Ping timeout: 260 seconds]
x86_ has joined #ruby
dseitz has joined #ruby
tjbiddle has joined #ruby
lacuna has joined #ruby
llfwf33 has quit [Client Quit]
llfwf33 has joined #ruby
llfwf33 has quit [Max SendQ exceeded]
<norc> Ox0dea: There is just some syntax parts that feel weird. ? or `` are some of them.
DirtyFInn has joined #ruby
<Ox0dea> I like `` and would be sad to see them go.
<Ox0dea> And ? is good for golf.
<norc> Just use %x{} already
<norc> ``have this nasty business of being hard to type on some keyboard layouts.
<Ox0dea> That's not Ruby's fault.
<norc> Especially when you are on a Mac where you just cannot reasonably disable dead keys.
lacuna has quit [Ping timeout: 255 seconds]
<norc> I was actually wondering the other day whether I could have Klingon characters in my name. But I cannot be sure that our registry office has UTF8 capable software.. and having the clerk figuring out how to even get those characters into the software would be a PITA:
<Ox0dea> That is next-level masochism.
sarkis has joined #ruby
amclain has quit [Quit: Leaving]
<Nilium> Today I learned that Klingon has a unicode range..
<Ox0dea> Tengwar too!
<Ox0dea> Er, no, still just a proposal.
bronson has joined #ruby
<norc> >> ?_?_:_
<ruby[bot]> norc: # => /tmp/execpad-da29bd1fa295/source-da29bd1fa295:2: syntax error, unexpected tSYMBEG, expecting keyword ...check link for more (https://eval.in/501525)
mgorbach has quit [Ping timeout: 265 seconds]
<Nilium> Ah, no, Klingon's not actually officially in
<norc> That is interesting.. That executes fine on my pry.
<norc> Or it does not.
<Nilium> Turns out the private  symbol my Mac has is in the Klingon range
x86_ has quit [Quit: Leaving]
<norc> Which makes sense nevemrind.
bb010g has quit [Quit: Connection closed for inactivity]
<norc> >> ?1?1:1
ta has joined #ruby
<ruby[bot]> norc: # => /tmp/execpad-651b65e6cad8/source-651b65e6cad8:2: warning: string literal in condition ...check link for more (https://eval.in/501527)
<norc> Sweet.
phinary has joined #ruby
mousier has joined #ruby
<Nilium> So, short answer is that your registry office even if it has UTF8-capable software cannot input Klingon unless you use the "pIqaD" form
ohaibbq has quit [Quit: Leaving...]
<norc> Ox0dea: Ok Im suddenly confused again. This looks like a weird quirk from the parser - ?1?1:1 should not parse imo.
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> norc: Seems fine to me.
sarkis has quit [Ping timeout: 272 seconds]
<Ox0dea> You're using a "character literal" as the driver of a ternary expression.
User458764 has joined #ruby
<norc> That line explains why.
lubekpl has joined #ruby
<norc> The concatenation only works if the RHS is a string1.
fantasti` has quit [Read error: Connection reset by peer]
<Ox0dea> And indeed it couldn't work the other way.
mgorbach has joined #ruby
<Ox0dea> At least, I don't see how the parser could disambiguate `"a"?b` in the general case.
colegatron has quit [Ping timeout: 264 seconds]
<norc> Ox0dea: Fairly simply.. it is a lookahead parser? :-)
<Ox0dea> Fair enough.
<Ox0dea> I incorrectly assumed that ternary expressions and Symbol arguments in method calls would conflict.
<Ox0dea> Which is something that does happen, but it wouldn't here.
sarkis has joined #ruby
<norc> Nilium: Thank you. It would be embarrassing to accidentally end up with a  in my name on my ID card.
konsolebox has joined #ruby
<Ox0dea> The proper orthography is "UTF-8-capable", isn't it?
<Ox0dea> That looks very strange.
hannelita has joined #ruby
bkxd has joined #ruby
mgorbach has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
<Ox0dea> Also, we say "arity-2"; does Ruby's having negative arities make "arity--1" the proper way to write that?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<Ox0dea> Troll fodder for ##English, then. ^_^
<norc> Ox0dea: That channel has become mostly useless ever since the old folks left.
<norc> There used to be actually knowledgable people in there.
sarkis has quit [Ping timeout: 276 seconds]
<Ox0dea> I have no trouble believing that. :<
bkxd has quit [Ping timeout: 255 seconds]
hannelita has quit [Ping timeout: 264 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
sarkis has joined #ruby
Dimik has quit []
<norc> Ox0dea: I remember once venting steam about my confusion regarding the pronunciation of the word "conscience". The next 30 minutes I got a linguistical lecture about how English changed over the past 300 years.
karapetyan has joined #ruby
mark2 has joined #ruby
Bloomer has joined #ruby
<Ox0dea> norc: And, well, did such a digression come to explain the word's pronunciation? :P
arup_r has quit [Remote host closed the connection]
colegatron has joined #ruby
<norc> Ox0dea: Oh absolutely, though admittedly I cannot recall much of that conversation anymore.
sunya7a__ has quit [Ping timeout: 246 seconds]
TomyWork has joined #ruby
<Ox0dea> "Science", "conscience", and "prescience" all end differently.
<Ox0dea> This language, I swear.
sarkis has quit [Ping timeout: 256 seconds]
sunya7a has joined #ruby
Guest71407 is now known as saneax_AFK
karapetyan has quit [Ping timeout: 260 seconds]
<adaedra> And that's why I'm awful at spoken English.
<adaedra> Greetings, everyone.
Bloomer has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 265 seconds]
speaking1ode has quit [Ping timeout: 250 seconds]
mary5030_ has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
<Ox0dea> adaedra: What's the French analog for "well met"?
Dimik has joined #ruby
existensil has quit [Quit: WeeChat 0.4.2]
<Ox0dea> s/well met/mucho gusto/, if that clarifies anything.
antgel has joined #ruby
existensil has joined #ruby
astrobun_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
ta has quit [Remote host closed the connection]
<adaedra> Ox0dea: sample?
sandstrom has quit [Quit: My computer has gone to sleep.]
<Ox0dea> adaedra: I was going to use it on you just then.
<Ox0dea> It's basically "pleasure seeing you here".
sarkis has quit [Ping timeout: 256 seconds]
<adaedra> mh.
ta has joined #ruby
tvw has joined #ruby
skade has joined #ruby
edwardly has quit [Ping timeout: 260 seconds]
<shevy> bon appetite
TheAnachron has joined #ruby
certainty has joined #ruby
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
einarj has joined #ruby
firstdayonthejob has quit [Ping timeout: 245 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
certainty has quit [Ping timeout: 240 seconds]
tvw has quit [Ping timeout: 255 seconds]
atomical has quit [Read error: Connection reset by peer]
UtkarshRay has quit [Remote host closed the connection]
atomical has joined #ruby
pawnbox has joined #ruby
tvw has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
Rodya_ has joined #ruby
curses has joined #ruby
elaptics is now known as elaptics`away
Hounddog has joined #ruby
shredding has joined #ruby
davedev24 has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
BTRE has quit [Quit: Leaving]
sandstrom has joined #ruby
Xeago has joined #ruby
nettoweb has joined #ruby
Anderson69s has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
hannelita has joined #ruby
greg has joined #ruby
smactive has joined #ruby
sarkis has joined #ruby
smactive has quit [Ping timeout: 255 seconds]
rdark has joined #ruby
lipoqil has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
edwinvdgraaf has joined #ruby
ympeg has joined #ruby
davedev24 has joined #ruby
Domaldel has joined #ruby
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
davedev24 has quit [Client Quit]
elaptics`away is now known as elaptics
sarkis has joined #ruby
bkxd has joined #ruby
mgorbach has joined #ruby
pawnbox has quit [Remote host closed the connection]
astrobun_ has quit [Remote host closed the connection]
argentdrake has quit [Ping timeout: 240 seconds]
juddey has joined #ruby
astrobu__ has joined #ruby
drptbl has joined #ruby
sarkis has quit [Ping timeout: 276 seconds]
astrobu__ has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 264 seconds]
tesuji_ has joined #ruby
jam_ has quit [Remote host closed the connection]
jam_ has joined #ruby
tesuji_ is now known as tesuji
jam_ has quit [Remote host closed the connection]
AimlessRaven has joined #ruby
<AimlessRaven> hi all
<AimlessRaven> can someone help me with this method https://gist.github.com/anonymous/4b7eb0f1a8efaa7cde6a
<AimlessRaven> i wanna transform to hash, to get created_at and status
<AimlessRaven> for example if i make @order.test.each do |s| and type s.time this gibe me undefined method `time' for #<Hash:0x007f5570574050>
Bloomer has joined #ruby
<adaedra> ?crosspost
<ruby[bot]> Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
Xeago has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
chussenot has joined #ruby
juddey has quit [Remote host closed the connection]
huyderman has joined #ruby
dEPy has joined #ruby
blaxter has joined #ruby
sarkis has quit [Ping timeout: 276 seconds]
argentdrake has joined #ruby
blarghlarghl has left #ruby [#ruby]
usershell has quit [Read error: Connection reset by peer]
huyderman has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
huyderman has joined #ruby
usershell has joined #ruby
pawnbox has joined #ruby
sftrabbit has joined #ruby
ta has quit [Remote host closed the connection]
solars has quit [Quit: WeeChat 0.4.2]
solars has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
solocshaw has joined #ruby
sarkis has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
a1ph4g33k has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 260 seconds]
gagrio has quit [Ping timeout: 265 seconds]
BTRE has joined #ruby
Xeago has joined #ruby
sigurding has quit [Quit: sigurding]
sarkis has quit [Ping timeout: 256 seconds]
ta has joined #ruby
UtkarshRay has joined #ruby
blaxter has quit [Ping timeout: 256 seconds]
sigurding has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
duckson has quit [Quit: ZNC - http://znc.in]
LiquidInsect has quit [Ping timeout: 260 seconds]
huyderman has quit [Ping timeout: 264 seconds]
Gadgetoid has quit [Ping timeout: 272 seconds]
LiquidInsect has joined #ruby
Gadgetoid has joined #ruby
d0nn1e has quit [Ping timeout: 255 seconds]
<oddmunds> AimlessRaven: replace s.time with s['time']
<ljarvis> >> RUBY_VERSION
<ruby[bot]> ljarvis: # => "2.3.0" (https://eval.in/501567)
<ljarvis> \o/
stamina has joined #ruby
d0nn1e has joined #ruby
Rodya_ has joined #ruby
bluOxigen_ has joined #ruby
ruby-lang094 has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
ta_ has joined #ruby
ta has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
Rodya_ has quit [Ping timeout: 264 seconds]
ta has joined #ruby
TheEyeOfTheTruth has joined #ruby
ruby-lang094 has quit [Quit: Page closed]
blaxter has joined #ruby
AimlessRaven has quit [Quit: Page closed]
<Ox0dea> >> RubyVM::InstructionSequence.compile_option = {frozen_string_literal: true}; eval "'foo'.frozen?"
<ruby[bot]> Ox0dea: # => true (https://eval.in/501575)
<Ox0dea> /o\
ta_ has quit [Ping timeout: 240 seconds]
nerfando has joined #ruby
last_staff has quit [Quit: last_staff]
DoubleMalt has joined #ruby
huyderman has joined #ruby
Arie has joined #ruby
ta has quit [Read error: Connection reset by peer]
dpg_ has quit [Ping timeout: 260 seconds]
ta has joined #ruby
sarkis has joined #ruby
dEPy has quit [Ping timeout: 276 seconds]
n00bdev has quit []
dwfait has joined #ruby
chussenot has quit [Quit: chussenot]
f4cl3y has joined #ruby
sarkis has quit [Ping timeout: 276 seconds]
pandaant has joined #ruby
dlitvak has joined #ruby
chussenot has joined #ruby
rodfersou has joined #ruby
ur5us has quit [Remote host closed the connection]
sftrabbit has quit [Quit: sftrabbit]
catmartyn has joined #ruby
felixdd has quit [Ping timeout: 276 seconds]
<Arie> hey guys, so im using Middlemanapp for my templating system, and apparently it shows the error "ERROR -- : exception while processing events: invalid byte sequence in UTF-8 Backtrace:" whenever im including this file https://gist.github.com/arie741/c3dbe601328e87991867
<Arie> anybody have any ideas why? im stuck here
dlitvak_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
Jackneill has joined #ruby
sftrabbit has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Bloomer has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 240 seconds]
catmartyn has quit [Remote host closed the connection]
Insti has joined #ruby
<Ox0dea> Arie: Blame Jörn Zaefferer: https://git.io/vzZnk
<adaedra> Jörn*
<Ox0dea> Much better.
<Ox0dea> Mojibake is cruise control for quality.
arup_r has joined #ruby
drptbl has joined #ruby
marr has joined #ruby
User458764 has joined #ruby
<Arie> Ox0dea: so i need some validation or some sort before i use the file? im a total noob here.
certainty has joined #ruby
<adaedra> You need to fix the encoding issue.
sarkis has joined #ruby
<Ox0dea> ^
terminalrecluse has joined #ruby
kies^ has quit [Remote host closed the connection]
<Arie> adaedra: what is the encoding issue and how do i fix it? sorry im very noob at this
<adaedra> Arie: look at the line Ox0dea linked to you. Does the name looks ok to you?
iateadonut has quit [Quit: Leaving.]
pawnbox has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
terminalrecluse has quit [Ping timeout: 260 seconds]
<Arie> adaedra: well, is it not ok? if so i dont get it. Is it because it's using unreadable characters and the middleman can't parse it somehow?
<Arie> adaedra: i just tried changing the name but it doesn't solve it lol
certainty has quit [Ping timeout: 272 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Arie> adaedra: maybe they're others that i missed? im checking them one by one right now
<Ox0dea> Arie: The only other non-ASCII characters in the file are the two copyright symbols.
<norc> Oh yes!
<Ox0dea> Protip: let the computer do things "one by one".
<norc> 759 examples, 0 failures, 5 pending
<norc> After a major refacotr.
<norc> This feels good. :-)
<adaedra> Congrats.
<Ox0dea> \o/
chussenot has quit [Quit: chussenot]
curses has quit []
pik has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby
<Arie> adaedra: It just worked! you're my hero, thanks man!
<Arie> Ox0dea: thank you too i just saved some grey hair on this lol
<adaedra> Ox0dea did all the work, tbh.
chussenot has joined #ruby
bronson has quit [Remote host closed the connection]
Arie has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
<norc> Is such a wonderful document for fixing encoding issues. :-)
sarkis has joined #ruby
moei has quit [Quit: Leaving...]
gagrio has joined #ruby
bkxd has joined #ruby
ta has quit [Ping timeout: 255 seconds]
dlitvak has joined #ruby
chussenot has quit [Quit: chussenot]
sarkis has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby
<Ox0dea> charlock_holmes > rchardet
<Ox0dea> If only in name.
Rodya_ has joined #ruby
ICantCook has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 264 seconds]
dlitvak_ has quit [Ping timeout: 264 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
saneax_AFK is now known as saneax
sarkis has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
saneax is now known as Guest94017
chrisarcand has joined #ruby
jschmid has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
Snowy has joined #ruby
chussenot has joined #ruby
avelldiroll has quit [Quit: WeeChat 1.0.1]
Xeago has quit [Remote host closed the connection]
usershel_ has joined #ruby
sarkis has joined #ruby
usershell has quit [Ping timeout: 256 seconds]
akkmaxon has joined #ruby
harai54 has quit [Ping timeout: 255 seconds]
PedramT has quit [Read error: Connection reset by peer]
tagrudev has quit [Quit: This computer has gone to sleep]
sarkis has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
kp666 has quit [Ping timeout: 264 seconds]
avelldiroll has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
iamayam has quit [Ping timeout: 245 seconds]
Lewix has quit [Ping timeout: 240 seconds]
lipoqil has quit [Quit: Connection closed for inactivity]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
viperman_ has quit [Ping timeout: 256 seconds]
tinnvec has quit [Ping timeout: 240 seconds]
sarkis has joined #ruby
xet7 has quit [Quit: Leaving]
PedramT has joined #ruby
sdothum has joined #ruby
Outlastsheep has quit [Ping timeout: 272 seconds]
ghormoon has quit [Ping timeout: 256 seconds]
stryek_ has quit [Ping timeout: 245 seconds]
nirix has quit [Ping timeout: 240 seconds]
stryek has joined #ruby
justinmcp has joined #ruby
tinnvec has joined #ruby
User458764 has joined #ruby
lacuna has joined #ruby
Lewix has joined #ruby
iamayam has joined #ruby
dlitvak_ has joined #ruby
FernandoBasso1 has joined #ruby
ghormoon has joined #ruby
nirix has joined #ruby
viperman has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
TheEyeOfTheTruth has quit [Ping timeout: 276 seconds]
lacuna has quit [Ping timeout: 240 seconds]
FernandoBasso1 is now known as FernandoBasso
dlitvak has quit [Ping timeout: 240 seconds]
chussenot has quit [Quit: chussenot]
jam_ has joined #ruby
benjohn has joined #ruby
sarkis has joined #ruby
jschmid has quit [Read error: Connection reset by peer]
jam_ has quit [Ping timeout: 264 seconds]
greg has quit [Remote host closed the connection]
xet7 has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
ta_ has quit [Remote host closed the connection]
chussenot has joined #ruby
Jibbits has joined #ruby
<Jibbits> Hey guys, I have a little problem which I can't seem to find a good solution to
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
<Jibbits> I need to work with binary data using a string buffer, which means I need to use String#byteslice instead of String#slice. The problem is, I need to remove the bytes that I read from the beginning of the buffer, but there is no String#byteslice! and String#slice! will not handle arbitary bytes reliably
hayden_ has joined #ruby
norc has quit [Ping timeout: 252 seconds]
pik has joined #ruby
<Jibbits> Even if I had to perform a second operation to remove the bytes from the beginning of the buffer, I can't seem to find any method which can accomplish that
<Ox0dea> Jibbits: How come you're not working with bytes instead?
<Ox0dea> Wanting to destructively slice bytes would seem to indicate that something has gone awry.
PedramT has quit [Remote host closed the connection]
sarkis has joined #ruby
<Jibbits> Ox0dea: I have been up until today, but I need to use unpack to read various different values (especially for protobuf deserialization) and it's really inefficient to have to pack the byte array to a string every time that I need to unpack values
jud has quit [Quit: Leaving]
PedramT has joined #ruby
<Jibbits> The go-to method for reading values from a byte buffer in ruby is String#unpack, it seems that reimplementing unpack's functionality to work with a byte array would require a lot of work
<GeorgesLeYeti> Is there any already made methods to compare 2 array in order to know if an array A contain at least 1 element of an array B. For example : A = [ 'a', 'b','c'] // B= ['a', 'd'] // A.include?(B) => true and if B=['d','z'] if return false
yfeldblum has joined #ruby
<adaedra> You can use an intersection
<Ox0dea> Jibbits: I would imagine it would. If you're not liable to get into encoding trouble, String#[] can be used destructively.
<GeorgesLeYeti> adaedra, ty
<adaedra> >> [%w[a b c] & %w[a d], %w[a b c] & %w[d z]]
<ruby[bot]> adaedra: # => [["a"], []] (https://eval.in/501606)
<Jibbits> Ox0dea: Won't String#slice! randomly break with arbitary bytes even if the string is forced to 'binary' encoding?
cgfbee has quit [Ping timeout: 265 seconds]
<Ox0dea> Jibbits: It shouldn't.
<Jibbits> I'm fairly sure I remember running into that exact issue in the past, which is why I ended up rewriting the buffer using a byte array in the first place
sarkis has quit [Ping timeout: 240 seconds]
<Ox0dea> >> (0..255).map(&:chr).join.b.valid_encoding? # Jibbits
<ruby[bot]> Ox0dea: # => true (https://eval.in/501612)
<Jibbits> Encoding is definitely not an issue, since it is a byte buffer, with encoding forced to 'binary', where encoding is needed for strings, the encoding is done after the string has been sliced from the byte buffer
ph1n4ry has joined #ruby
<Ox0dea> See above.
<Ox0dea> All bytes are valid in the 'binary' encoding.
<Jibbits> I hope you're right, and I somehow managed to screw up in the past (which was well over a year ago)
<Ox0dea> I mean, I'm showing you code?
dionysus69 has quit [Ping timeout: 245 seconds]
<Jibbits> Since this application is already in production use, and having it randomly fail due to a specific sequence of bytes would be rather serious
<Jibbits> I see what you are saying, but that doesn't exactly test String#slice! against every possible byte combination
<Ox0dea> >> bs = (0..255).map(&:chr); bs.product(bs).all? { |a, b| (a + b).b.valid_encoding? } # Jibbits
<ruby[bot]> Ox0dea: # => true (https://eval.in/501620)
<Ox0dea> There it is for every bigram.
<Ox0dea> You're free to try it for trigrams on your machine. :P
phinary has quit [Ping timeout: 276 seconds]
<Jibbits> Alright thanks, I'll reimplement using slice! and hope for the best
ta has joined #ruby
PedramT has quit [Read error: No route to host]
PedramT has joined #ruby
<Ox0dea> ?hope
<ruby[bot]> Ox0dea: I don't know anything about hope
<Ox0dea> Jibbits: You agree to indemnify and hold me harmless for any damages, but I can more or less assure you that the problem will not be an invalid byte sequence in a binary-encoded string.
sarkis has joined #ruby
<Ox0dea> It's, like, definitionally nonsensical.
bkxd has joined #ruby
PedramT has quit [Remote host closed the connection]
<Jibbits> Ok, thanks again
FernandoBasso1 has joined #ruby
blackgoat has joined #ruby
AimlessRaven has joined #ruby
<AimlessRaven> hi all, i have https://gist.github.com/anonymous/2b0e2745db26d734b005 this method that return me array
<AimlessRaven> how to refactory to return me hash ?
<Ox0dea> Have mercy.
craysiii has quit [Quit: Leaving.]
<Jibbits> AImlessRaven: Is that a trick question?
sarkis has quit [Ping timeout: 255 seconds]
kp666 has joined #ruby
<AimlessRaven> no
PedramT has joined #ruby
<AimlessRaven> i work on that all day ..
<AimlessRaven> :D
<AimlessRaven> i suggest to not use map..
<Ox0dea> #map is the best method.
<Ox0dea> Ever.
<AimlessRaven> okey, but map return me array
<AimlessRaven> i wanna return me hash ;)
Rodya_ has joined #ruby
<Ox0dea> AImlessRaven: #to_h.
FernandoBasso has quit [Ping timeout: 276 seconds]
<Ox0dea> >> [[:a, 1], [:b, 2]].to_h
<ruby[bot]> Ox0dea: # => {:a=>1, :b=>2} (https://eval.in/501624)
<Ox0dea> You have to have an array of key-value pairs, of course.
konsolebox has quit [Quit: Leaving]
<Jibbits> I thought he was talking about the outer array, where the hash is very clearly wrapped in an array :P
<AimlessRaven> Ox0dea: undefined method `to_h' for "pending":String
joonty has joined #ruby
<AimlessRaven> i wanna create array of hashes and evry hash to have key=time..val=1.12.205/ and key=label val=status
<ljarvis> lolwat
<AimlessRaven> for example
ph1nary has joined #ruby
<Ox0dea> AImlessRaven: This is #ruby.
<Ox0dea> Jibbits: I confess to having tried to understand their description of the problem rather than the code. :P
sarkis has joined #ruby
<Jibbits> Ox0dea: So if the string is forced to binary encoding, does #bytesize still need to be used instead of #size?
Rodya_ has quit [Ping timeout: 264 seconds]
<Ox0dea> Jibbits: No.
<Jibbits> Good to know
ta has quit [Remote host closed the connection]
<Ox0dea> There are considerable benefits to not having to deal with encoding.
zotherstupidguy has quit [Ping timeout: 276 seconds]
<Jibbits> Am I correct that every string which needs to be appended to the buffer needs to first have binary encoding forced?
ph1n4ry has quit [Ping timeout: 250 seconds]
<Ox0dea> That wouldn't be unwise.
<Jibbits> Great
<Ox0dea> You could just as well set the default internal encoding, but that might play havoc with other parts of your system.
<Jibbits> Yeah, I have default encoding set to utf-8 to avoid having to deal with all kinds of other encoding issues
sarkis has quit [Ping timeout: 240 seconds]
<Ox0dea> >> b = ''.b; s = 'foo'; b << s; [b.encoding, s.encoding] # Jibbits
<ruby[bot]> Ox0dea: # => [#<Encoding:ASCII-8BIT>, #<Encoding:UTF-8>] (https://eval.in/501629)
<Jibbits> Roger
dlitvak_ has quit [Remote host closed the connection]
Ishido has joined #ruby
bruce__lee has joined #ruby
zotherstupidguy has joined #ruby
dlitvak has joined #ruby
sarkis has joined #ruby
Xeago has joined #ruby
FooMunki has joined #ruby
davedev24 has joined #ruby
PedramT has quit [Remote host closed the connection]
bruce_lee has quit [Ping timeout: 260 seconds]
<Jibbits> I have decreased deserialization overhead significantly, which will make a big difference now that some packets could be over 1MB, compared to the largest being around 1KB before today
dlitvak has quit [Remote host closed the connection]
sepp2k has joined #ruby
d0lph1n98 has joined #ruby
tjbiddle has quit [Ping timeout: 245 seconds]
usershel_ has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
<Ox0dea> Those are massive packets!
TheBrayn has quit [Ping timeout: 246 seconds]
chrisarcand has quit [Quit: leaving]
<Jibbits> Most 500KB packets are not even long enough to log a time warning anymore (less than 1ms), where they could take over 50ms before
chrisarcand has joined #ruby
<Ox0dea> \o/
<Jibbits> I decided that using my efficient binary protocol channel would be a better idea than making a separate connection for binary blob transfers
<Jibbits> Especially since they will be fairly frequent
sarkis has quit [Ping timeout: 256 seconds]
chussenot has quit [Quit: chussenot]
usershell has joined #ruby
<Ox0dea> You rolled your own, then?
<Jibbits> I roll my own everything
<Ox0dea> Famous last words.
stamina has quit [Quit: WeeChat 1.3]
<Ox0dea> AImlessRaven: https://eval.in/501634
<Jibbits> I am using the beefcake protobuf library, but I have needed to make a bunch of monkeypatches
cgfbee has joined #ruby
platzhirsch has joined #ruby
<Ox0dea> That's for when you hate that most of Hash's Enumerable methods don't return Hashes.
<Jibbits> Packet headers are custom built though, tiny packets don't even require protobuf
edwinvdgraaf has joined #ruby
dlitvak has joined #ruby
prestorium has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
TheBrayn has joined #ruby
d0lph1n98 has quit [Quit: leaving]
skade has quit [Quit: Computer has gone to sleep.]
lucasb has joined #ruby
pik is now known as p1k
<Jibbits> Ox0dea: I've been using ruby for network related stuff for about 8 years now, I'd say that I'm fairly confident that rolling my own everything works out pretty well
<Ox0dea> I certainly won't try to stop you.
abra0 has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Affix has quit [Ping timeout: 260 seconds]
abra0 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
sarkis has joined #ruby
cgfbee has quit [Remote host closed the connection]
tagrudev has joined #ruby
AimlessRaven has quit [Quit: Page closed]
sftrabbit has quit [Quit: sftrabbit]
chrisarcand has quit [Ping timeout: 264 seconds]
sftrabbit has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
Affix has joined #ruby
shredding has quit [Ping timeout: 272 seconds]
Affix is now known as Guest39409
cgfbee has joined #ruby
hannelita has quit [Remote host closed the connection]
certainty has joined #ruby
<lucasb> Ox0dea: I saw that Otokari paste of yours. Is that partially applied methods?
dlitvak has quit [Remote host closed the connection]
<Ox0dea> lucasb: Currying and partial application are slightly different things. Ruby uses the wrong name, so I followed suit. :P
c355e3b has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
<Ox0dea> >> def foo a, b, c; a + b + c; end; curried = method(:foo).curry; curried.call(1, 2).call(3)
<ruby[bot]> Ox0dea: # => 6 (https://eval.in/501640)
<Ox0dea> If it were *properly* curried, we wouldn't be able to fold in more than one argument at a time.
Xeago has quit [Remote host closed the connection]
hannelita has joined #ruby
<Ox0dea> Long story short: yeah. :)
chrisarcand has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
dlitvak has joined #ruby
<lucasb> ah, ok. In that strict mathematical sense, currying only allows one-arg. but most of the time currying and partial application are interchangeable terms :) (or maybe I'm wrong)
karapetyan has quit [Remote host closed the connection]
<lucasb> Ox0dea: but anyway, just wanted to say you look very knowledgeable. I'll start paying attention to everything you post :)
daivyk has joined #ruby
<Ox0dea> Please don't.
<lucasb> the real question is: how many years have you been playing with ruby?
<Ox0dea> Six-ish.
Outlastsheep has joined #ruby
prestorium has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
sigurding has quit [Quit: sigurding]
duckpuppy has joined #ruby
karapetyan has joined #ruby
pawnbox has quit [Remote host closed the connection]
Anderson69s_Deb has quit [Remote host closed the connection]
<apeiros> I guess method.partially_apply just didn't have the same ring to it as .curry? :D
chipotle has quit [Quit: cheerio]
smactive has joined #ruby
gregf has joined #ruby
Xeago has quit [Remote host closed the connection]
* adaedra curries apeiros
<ljarvis> mmm curry
ph1nary has quit [Ping timeout: 276 seconds]
* ljarvis is hungry
<adaedra> Then go eat?
* apeiros applies adaedra partially
sftrabbit has joined #ruby
<Ox0dea> Alternatively, methods could've been partially applicable by default, and you'd use () if you wanted to invoke its 0-arity form.
<Ox0dea> Damn you, optional parentheses!
<Ox0dea> (And bless you too.)
<ljarvis> no dont bless them
bronson has joined #ruby
<Ox0dea> I've never so loved and hated a thing at the same time.
kies^ has joined #ruby
<adaedra> yeah, I feel like I feel a bit of that.
pdoherty has joined #ruby
<ljarvis> my hate:love ratio is 9:1
gbgdev has joined #ruby
tuxillo has joined #ruby
<tuxillo> hello
<ljarvis> howdy
<Ox0dea> Ahoy!
<adaedra> hi
<lucasb> hai
<tuxillo> is it possible to get env variables from another user different than the one you're running the process with?
<adaedra> env variables are per-process.
chipotle has joined #ruby
smactive has quit [Ping timeout: 240 seconds]
<Ox0dea> And accessible via procfs on Linux.
<Ox0dea> And elseways elsewhere.
<tuxillo> yes I know, so I was thinking in some sort of popen or suchlike
dionysus69 has joined #ruby
<adaedra> ?xy
<ruby[bot]> 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
zotherstupidguy has quit [Quit: WeeChat 1.3]
vikas027 has joined #ruby
<Ox0dea> You're running Sun?!
<adaedra> Oracle*
<tuxillo> what?
roshanav_ has joined #ruby
ajf- has joined #ruby
ICantCook has joined #ruby
<Ox0dea> CTCP don't lie.
<Ox0dea> Anyway, you should be able to read /proc/$PID/environ.
bronson has quit [Ping timeout: 260 seconds]
kalopsian has joined #ruby
<adaedra> can != should, remember.
<adaedra> tuxillo: what if you tell us what you're trying to do, in the big picture
<lucasb> hm, what if running something like my_env_var = `su -c 'echo $MY_ENV_VAR' someuser` ?
<Ox0dea> lucasb: Environment variables are per-process.
blackmesa has joined #ruby
pawnbox has joined #ruby
chussenot has joined #ruby
<lucasb> well, su would spawn a new bash process, wouldn't it?
<tuxillo> adaedra: I believe my question is very specific. a ruby script runs as root and relies on su to run certain commands (using popen4)
gregf has quit [Quit: WeeChat 1.3]
<tuxillo> adaedra: but now I need to determine something which is specified in a user's env
<tuxillo> (in this case ORACLE_HOME)
millerti has joined #ruby
<adaedra> a user has technically no env.
darkf has quit [Ping timeout: 272 seconds]
chussenot has quit [Client Quit]
<Ox0dea> adaedra: One of us has to say it again.
<adaedra> is $ORACLE_HOME the same as $HOME?
<adaedra> I feel like it's something you can guess somehow else.
ponga has quit []
roshanavand has quit [Ping timeout: 256 seconds]
<tuxillo> well yeah, you can always read the shell profiles but that kills their evaluation (which is complex)
dlitvak has quit [Remote host closed the connection]
<adaedra> But if you really want to see how the env is initialized when running under su, just run env.
<adaedra> And parse the output.
dlitvak has joined #ruby
<tuxillo> yeah, I know. I was wondering if there was something else that could be used :)
Rodya_ has joined #ruby
<adaedra> If it's $HOME, just use getpwent and friends.
<Jibbits> Ox0dea: There is a very good reason why I roll my own everything whenever possible by the way. I always end up having to debug/profile the gems which I do use at some point, and fix issues myself
sneakerhax has quit [Ping timeout: 250 seconds]
FernandoBasso has joined #ruby
<tuxillo> no, it's not $HOME
karapetyan has quit [Remote host closed the connection]
<Ox0dea> Jibbits: Hey, I'm all for it, mate. It's just... reinvent the wheel only that you would improve it, y'know?
<tuxillo> I'll use env, then
pawnbox has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
<tuxillo> adaedra: thanks
<Jibbits> Sure, I'm all for improving existing implementations, but it's often not worth the effort. There are a lot of really horrid libraries out there, written my talented developers who clearly don't know much about Ruby
pawnbox has joined #ruby
Snowy has quit [Remote host closed the connection]
<Ox0dea> It's hard to pin down idiomaticity in Ruby, but I know how you mean.
<Jibbits> Looks like these large packets have now introduced a lot of GC overhead, which is a big issue. I'm not very familiar with the Ruby 2.2 GC, so I'm not sure what the best course of action will be
bkxd has quit [Ping timeout: 260 seconds]
<Jibbits> I'm getting fairly frequent GC pauses of up to ~500ms
<Ox0dea> Yikes. Profilin' time.
FernandoBasso1 has quit [Ping timeout: 256 seconds]
<Jibbits> Well I'm already profiling with some simple timing logic, and GC count checks
weemsledeux has joined #ruby
<Jibbits> A profiler isn't really going to help solve this
moei has joined #ruby
darkf has joined #ruby
<Ox0dea> Er, a good one will show you your hotspots.
Xeago has joined #ruby
<Jibbits> Perhaps I need to reuse a string buffer for all the large packets and data blobs
<Ox0dea> Slicing into and out of a large string is invariably going to end up moving lots of memory around.
<apeiros> Jibbits: there's some articles about how to tune the GC
<Jibbits> The overhead isn't in my code, I can see that the slow down is being used by GC runs
Rodya_ has quit [Ping timeout: 272 seconds]
ICantCook has quit [Quit: bye]
symbol has joined #ruby
<symbol> I'm parsing a CSV and keep getting a `invalid byte sequence in UTF-8` despite the file being UTF-8. I imagine there's a bad byte somewhere in the CSV. Is there any way to get Ruby to tell me which line?
GeorgesLeYeti has quit [Quit: Quitte]
<symbol> Or am I better of using regex to find the offending line? It's a largggggge csv.
<Jibbits> apeiros: Do you really think that tuning the GC could help here, or should I attempt to pool buffers rather?
<Sp4rKy> Hi, any ruby wrapper for pdftk still maintained ?
<apeiros> depends a bit on what viable solutions are for you. tuning the GC can help "moving around" the problem so it happens at a time when it's not an issue (such as in a webserver between requests)
<Jibbits> Oh, that isn't going to help me, this is a long running reactor application
<apeiros> symbol: one-off solution? or general solution?
<symbol> apeiros: Either or really.
<symbol> one-off for this case.
aupadhye has joined #ruby
<apeiros> symbol: one-off: open the file binary, read line by line, force_encode the line to utf-8 and use .valid_encoding? to check whether it is the offending line.
Snowy has joined #ruby
<symbol> Ah, gotcha.
<apeiros> once you know the line, you'll see whether it is easy or hard to fix it
ta has joined #ruby
arup_r has quit [Remote host closed the connection]
<apeiros> I'd do it in pry (or irb)
sftrabbit has quit [Quit: sftrabbit]
<symbol> Awesome, thank you apeiros
<apeiros> I think one day I'll write a tiny gem to support finding broken sequences in supposedly utf-8 files… it can be done fairly easily…
dlitvak_ has joined #ruby
<adaedra> once you've done with your current workload? :p
<apeiros> correct. hence around 2023
lubekpl has quit [Quit: Textual IRC Client: www.textualapp.com]
<Jibbits> It looks like almost all of this GC overhead is occurring in one or more gems, as soon as I stop pushing these binary blobs into the database, the largest GC spike goes from 500ms to 8ms
<apeiros> when utf-8 is old stuff and we use qutf (qubit-utf)
<Jibbits> Great :|
weemsledeux has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> Jibbits: using an orm?
varunwachaspati has joined #ruby
queden has joined #ruby
<tuxillo> later guys, thanks!
<queden> hi. I trying to run my first tests (sharetribe app) but launching zeus fails: pi@raspberrypi:~ $ zeus /usr/local/rvm/gems/ruby-2.1.2/gems/zeus-0.15.1/build/zeus-linux-386: 1: /usr/local/rvm/gems/ruby-2.1.2/gems/zeus-0.15.1/build/zeus-linux-386: Syntax error: "(" unexpected
dlitvak has quit [Ping timeout: 240 seconds]
sftrabbit has joined #ruby
<Jibbits> This overhead is not related to the ORM, only writes are being based via the driver, all data is cached in memory at start up forever
karapetyan has quit [Remote host closed the connection]
tuxillo has left #ruby [#ruby]
karapetyan has joined #ruby
lubekpl has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
skade has joined #ruby
allcentury has joined #ruby
pawnbox_ has joined #ruby
Guest94017 is now known as saneax_AFK
sigurding has joined #ruby
prestorium has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
AimlessRaven has joined #ruby
<AimlessRaven> how to create many hashesh with each on this method https://gist.github.com/anonymous/a4daac8852601b7ed4a4
arup_r has joined #ruby
<adaedra> It's not because you don't get an answer in 15 seconds in #RubyOnRails that you should come here copy/paste your question.
<AimlessRaven> because no one help me in ror
<apeiros> ?crosspost AimlessRaven
<ruby[bot]> AimlessRaven: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<adaedra> There isn't even 2 minutes between your two questions. Give it some time.
<adaedra> Also, I will replace here the advice you already got: learn ruby properly before going Rails, it helps.
<lucasb> AimlessRaven: you want a array containing one hash for each key=>value pair in the original hash?
arup_r has quit [Remote host closed the connection]
<apeiros> adaedra: they did actually ask ~15min ago the first time in rails
arup_r has joined #ruby
<apeiros> of course, cross-post rules still apply
<adaedra> yeah, I'm looking at that
bkxd has quit [Ping timeout: 246 seconds]
<AimlessRaven> lucasb: i wanna my array contain many hashes with time and label keys and values
davedev24 has quit []
<queden> is something wrong with my zeus installation? Or is it related to the ruby code? Did I miss a step?
<apeiros> AimlessRaven: many.times do array.push a_hash end
synthroid has joined #ruby
lxsameer has quit [Quit: Leaving]
solocshaw has quit [Ping timeout: 260 seconds]
<vikas027> Hello All, I have this (https://dpaste.de/9mW4) content in a variable. How can I do something like echo $var | grep plugin | grep gitlab in ruby. Forgive my ignorance, I am new to ruby.
blackmesa has quit [Ping timeout: 265 seconds]
PedramT has joined #ruby
chussenot has joined #ruby
jam_ has joined #ruby
asmodlol has quit [Ping timeout: 250 seconds]
certainty has joined #ruby
<Jibbits> Looks like the ruby mongo driver is just insanely inefficient with GC when inserting large byte arrays
FernandoBasso has quit [Quit: Leaving]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
fourq is now known as fourq|away
<apeiros> oh, mongo
<apeiros> yorickpeterse, where are you when you're needed?!?
<adaedra> in NL.
asmodlol has joined #ruby
<lucasb> vikas027: maybe var.split("\n").grep(/plugin/).grep(/gitlab/); but seems like you would prefer to parse a XML, no?
<Jibbits> It'll probably be a lot less trouble to scrap the idea of storing 100KB - 1MB binary blobs in the database and just use flat files
<apeiros> Jibbits: or use a proper database - as in: not mongo
jam_ has quit [Ping timeout: 246 seconds]
<Jibbits> I really would have liked to use mongo through, the database is definitely fast and efficient enough to handle these blobs, the ruby driver not so much
<Jibbits> There is really nothing wrong with mongo
<vikas027> lucasb: thanks for the idea of parsing XML. Let me Google that how to do that in ruby :)
<apeiros> the general consensus in this channel begs to differ :)
<adaedra> vikas027: with a regex.
* adaedra flees
chipotle has quit [Quit: cheerio]
queden has quit [Ping timeout: 252 seconds]
<adaedra> ( vikas027 note that this was a joke. Don't do that. )
<apeiros> vikas027: nokogiri or oga
<vikas027> adaedra: Oh :) sorry couldn't digest that
chipotle has joined #ruby
<Jibbits> I've been using mongo for almost all the applications I build for about 6 years now. Although I don't use usually use it for binary blobs, it's far faster than any SQL database
<apeiros> Jibbits: I doubt that
kalopsian has quit [Ping timeout: 240 seconds]
* apeiros needs a stronger word than doubt
<apeiros> I don't believe that
<adaedra> Ox0dea has a "I don't believe you" gif for these cases.
<Jibbits> Out of interest sake, what are your main issues with mongo?
<Jibbits> I've used it more than enough to know what it is capable of, and how to workaround some of it's limitations
<apeiros> that almost every time when somebody says "oh, we don't need a schema for this", they're mistaken.
<Jibbits> I've also imported massive datasets from mongo to postgres, which tooks forever, and ended up running much much slower
<Jibbits> There are very few use cases where I would want to use anything other than mongo these days
<apeiros> and that for almost all workloads they end up with, an RDBMS is better suited
jaymeproni has joined #ruby
<Jibbits> I build write-heavy applications, which do little to no reading from a database, that is where mongo really shines
usershell has quit [Ping timeout: 276 seconds]
bruce__lee has quit [Changing host]
bruce__lee has joined #ruby
bruce__lee is now known as bruce_lee
usershell has joined #ruby
<ljarvis> where is rescue defined in the mri source?
dlitvak has joined #ruby
jyuan has joined #ruby
aryaching has joined #ruby
<Ox0dea> ljarvis: It's a keyword?
<ljarvis> ya
dlitvak_ has quit [Ping timeout: 265 seconds]
<Ox0dea> "Defined" just isn't the right word.
<ljarvis> forgive me
<Ox0dea> I'd like to help.
<yorickpeterse> apeiros: what?
arup_r has quit [Read error: Connection reset by peer]
<yorickpeterse> Ah
<yorickpeterse> "There is really nothing wrong with mongo" this is false
<yorickpeterse> and I base that on using MongoDB for 2,5 years in production
<yorickpeterse> also Mongo doesn't really do anything that's better at storing a blob than say PostgreSQL
<yorickpeterse> Today there should literally be no reason to ever use MongoDB unless you don't actually use your data
kalopsian has joined #ruby
<apeiros> I could imagine that in a write-only usage, postgres' tendency to do things correctly might get in the way.
<ljarvis> for anyone who cares i was looking for rb_rescue/rb_rescue2 in eval.c
<yorickpeterse> apeiros: either you do it correctly and it slows down, or you disregard ACID and have to deal with all those problems
bronson has joined #ruby
<apeiros> yorickpeterse: of course
roshanav_ has quit [Remote host closed the connection]
<apeiros> I basically said that you can gain performance at the cost of correctness. and I wouldn't be surprised if mongo does that.
chipotle has quit [Quit: cheerio]
<yorickpeterse> IIRC by default the drivers now use strong consistency
kp666 has quit [Remote host closed the connection]
chipotle has joined #ruby
<apeiros> especially given that they've been shown to actually do that
<adaedra> ot
roshanavand has joined #ruby
<ljarvis> :)
Guest11 has joined #ruby
Guest11_ has joined #ruby
<apeiros> adaedra: bordering on. databases are part of the ruby ecosystem.
<ljarvis> mongo shouldn't even be part of the database ecosystem
Guest11 has quit [Max SendQ exceeded]
Guest11_ has quit [Max SendQ exceeded]
<yorickpeterse> I think we should stop calling it a database and instead call it a dumpster
Guest11 has joined #ruby
<yorickpeterse> because it's not too bad at stuffing shit in it and never getting it out in a reasonable way
<ljarvis> yeah, and the collectors could come at any time
Guest11 has quit [Max SendQ exceeded]
bronson has quit [Ping timeout: 245 seconds]
wldcordeiro has quit [Ping timeout: 264 seconds]
cpup has quit [Ping timeout: 265 seconds]
<yorickpeterse> also check out my sick Grafana dashboard
dlitvak_ has joined #ruby
<yorickpeterse> that's coming in GitLab, well the code at least
<yorickpeterse> the dashboards may/may not be also available at some point
<ddv> looks sick yorickpeterse
<yorickpeterse> now I'm just trying to hunt down a fkn memory leak of about 250MB
Guest11 has joined #ruby
Guest11 has quit [Max SendQ exceeded]
mfb2 has joined #ruby
blackgoat has quit [Quit: night]
cpup has joined #ruby
rkazak has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Ping timeout: 272 seconds]
Rodya_ has joined #ruby
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT has quit []
aryaching_ has joined #ruby
mfb2 has quit [Ping timeout: 256 seconds]
sftrabbit has quit [Quit: sftrabbit]
roshanavand has quit [Remote host closed the connection]
Snowy_ has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
rkazak has quit [Quit: Sleep.....ing....]
<yorickpeterse> apparently ~530MB is being allocated over the span of 20 minutes
<yorickpeterse> lol Ruby
dorei has joined #ruby
tvw has quit []
roshanavand has joined #ruby
Rodya_ has quit [Ping timeout: 276 seconds]
Bloomer has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
Snowy has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Ping timeout: 264 seconds]
lipoqil has joined #ruby
al2o3-cr has joined #ruby
dlitvak has joined #ruby
chussenot has quit [Quit: chussenot]
dlitvak_ has quit [Ping timeout: 250 seconds]
roshanavand has quit [Remote host closed the connection]
davedev24 has joined #ruby
synthroid has quit [Remote host closed the connection]
<ljarvis> ovewview
unreal has quit [Ping timeout: 240 seconds]
DirtyFInn has quit []
<yorickpeterse> Yeah it was a typo
<yorickpeterse> come at me
victortyau has joined #ruby
colegatron has quit [Ping timeout: 246 seconds]
dlitvak has quit [Remote host closed the connection]
synthroid has joined #ruby
dlitvak has joined #ruby
bkxd has joined #ruby
<shevy> lol
<adaedra> ljarvis is in typo review-mode today
<shevy> dutch don't like the r
roshanavand has joined #ruby
sgambino has joined #ruby
victortyau has quit [Client Quit]
ta0 has joined #ruby
gbgdev has quit [Remote host closed the connection]
symbol has quit [Quit: WeeChat 1.1]
benjohn has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
<atmosx> !!!
cdg has joined #ruby
ramortegui has joined #ruby
sftrabbit has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
TomPeed has joined #ruby
dlitvak has quit [Remote host closed the connection]
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #ruby
gregf has joined #ruby
dlitvak has joined #ruby
jokke has quit [Client Quit]
aegis3121 has joined #ruby
tagrudev has quit [Quit: This computer has gone to sleep]
RaceCondition has left #ruby ["Textual IRC Client: www.textualapp.com"]
tvw has joined #ruby
jokke has joined #ruby
jokke has quit [Client Quit]
workmad3 has joined #ruby
colegatron has joined #ruby
<ddv> is ljarvis making friends again?
chussenot has joined #ruby
sdwrage has joined #ruby
jokke has joined #ruby
andikr has quit [Remote host closed the connection]
<shevy> lol
bMalum has joined #ruby
p1k has quit [Ping timeout: 246 seconds]
jas02 has joined #ruby
AimlessRaven has quit [Quit: Page closed]
mfb2 has joined #ruby
sankaber has joined #ruby
mfb2 has quit [Read error: Connection reset by peer]
pdoherty has quit [Ping timeout: 260 seconds]
bMalum has quit [Ping timeout: 265 seconds]
certainty has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 255 seconds]
iateadonut has joined #ruby
Snowy_ has quit [Remote host closed the connection]
Snowy has joined #ruby
User458764 has joined #ruby
freerobby has joined #ruby
ropeney has joined #ruby
ropeney has quit [Client Quit]
jgpawletko has joined #ruby
razorgfx has joined #ruby
dlitvak has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 272 seconds]
roshanavand has quit [Remote host closed the connection]
casadei has joined #ruby
roshanavand has joined #ruby
grill has joined #ruby
RaceCondition has joined #ruby
govg has joined #ruby
mrmargolis has joined #ruby
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
kalopsian has joined #ruby
auzty has quit [Quit: Leaving]
symbol has joined #ruby
lacuna has joined #ruby
platzhirsch has left #ruby [#ruby]
jschmid has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
treehug88 has joined #ruby
chouhoulis has joined #ruby
jschmid has quit [Client Quit]
razorgfx has quit [Quit: Textual IRC Client: www.textualapp.com]
jyuan has quit [Remote host closed the connection]
razorgfx has joined #ruby
Snowy has quit [Remote host closed the connection]
jschmid has joined #ruby
B1n4r10 has joined #ruby
rodfersou is now known as rodfersou|afk
arup_r has joined #ruby
dlitvak has joined #ruby
ror15 has joined #ruby
chussenot has quit [Quit: chussenot]
rippa has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
lacuna has quit [Remote host closed the connection]
sarkis has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
mfb2 has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has joined #ruby
j416 has quit [Quit: o/]
lacuna has joined #ruby
decoponio has joined #ruby
j416 has joined #ruby
asmodlol has quit [Ping timeout: 240 seconds]
sdwrage has quit [Quit: Leaving]
atomical_ has joined #ruby
FernandoBasso has joined #ruby
asmodlol has joined #ruby
Haris has joined #ruby
JakFrist has joined #ruby
<Haris> hello all
atomical has quit [Ping timeout: 250 seconds]
TheHodge has joined #ruby
chussenot has joined #ruby
brendan- is now known as bmurt
malconis has quit [Remote host closed the connection]
willv has joined #ruby
hxegon has joined #ruby
ta0 has quit [Remote host closed the connection]
malconis has joined #ruby
DarthBane has joined #ruby
loatbac has joined #ruby
<DarthBane> rubies
<loatbac> hi
<Haris> I'm getting the error msg --> /usr/local/rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale) <-- how do I enable english language ? do I have to download a dep for language ?
ta0 has joined #ruby
loatbac has quit [Client Quit]
DarthBane has quit [Client Quit]
chipotle has quit [Quit: cheerio]
clauswitt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshL has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
asmodlol has quit [Ping timeout: 264 seconds]
<Haris> I have this line --> I18n.available_locales = [:pt] <-- and then this line --> I18n.default_locale = :pt <-- in my code. How do I add en to the first line ?
<Haris> how does one concatenate values for a variable in ruby
asmodlol has joined #ruby
<shevy> Haris what does this question mean
<Haris> I18n is a library, most probably. I have a ruby based app "catarse". its config has enforce_available_locales set somewhere. which is raising error because, english is not present in list of available locales
sumark has quit [Remote host closed the connection]
dionysus69 has joined #ruby
akkmaxon has quit [Quit: akkmaxon]
sumark has joined #ruby
unreal has joined #ruby
filipe_ has joined #ruby
filipe_ has left #ruby [#ruby]
<Haris> under heading "Change the Locale"
tomaz_b has joined #ruby
willv has quit [Ping timeout: 260 seconds]
arup_r has quit [Remote host closed the connection]
ta0 has quit [Remote host closed the connection]
<Haris> I was asking, if I could add english to the list of available locales
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Haris> by installing some dependency (ruby based lib), that I might have missed
chipotle has joined #ruby
dstarh has joined #ruby
jam_ has joined #ruby
arup_r has joined #ruby
<ddv> catarse? :p
gbgdev has joined #ruby
<Haris> I18n.available_locales = [:pt]
solars has quit [Ping timeout: 260 seconds]
<Haris> how do I concatenate another option for english language to this variable ?
<Haris> like this --> I18n.available_locales = [:pt,:en] <-- ?
sftrabbit has quit [Quit: sftrabbit]
yardenbar has quit [Ping timeout: 255 seconds]
<lucasb> [:pt] << :en
filipe_ has joined #ruby
<Haris> ?
<Haris> please come again
<Haris> it has suport for pt. I have .rb files for en and other languages. its just doesn't have en listed in that variable mentioned above
jam_ has quit [Ping timeout: 265 seconds]
<lucasb> [:pt].push(:en)
kam270 has joined #ruby
kam270 has quit [Max SendQ exceeded]
filipe_ has quit [Quit: leaving]
cpup has quit [Ping timeout: 276 seconds]
varunwachaspati has quit [Quit: Connection closed for inactivity]
cpup has joined #ruby
<shevy> Haris does this strange gem not have instructions in how to append new entries?
<Haris> no idea. I'm new to ruby and rails ...
<Haris> not new to programming though
tjohnson has joined #ruby
<shevy> I am looking at its github page right now https://github.com/svenfuchs/i18n
aganov has quit [Remote host closed the connection]
<shevy> I am seeing they set it in that test file
<shevy> test/test_helper.rb: I18n.available_locales = nil
<Haris> wait, please
<Haris> hmm
<shevy> Haris if it is just an Array, then you can use <<
yardenbar has joined #ruby
<Haris> I See
<shevy> I18n.available_locales << :en
<shevy> I can't find their docu :)
<shevy> ok
<shevy> "Returns an array of locales for which translations are available."
mrtomme has quit [Ping timeout: 246 seconds]
<shevy> "Unless you explicitely set these through I18n.available_locales= the call will be delegated to the backend."
<shevy> so guess that's the official way anyway
chriscoffee has joined #ruby
chriscoffee has quit [Client Quit]
mrtomme has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
mchu has joined #ruby
Haris has quit [Ping timeout: 265 seconds]
sftrabbit has joined #ruby
Haris has joined #ruby
Haris has quit [Changing host]
Haris has joined #ruby
Jardayn has joined #ruby
usershell has quit [Read error: Connection reset by peer]
<lucasb> enum.each(&method(:foo)) works like {|x| foo(x) } right? but what if want {|x| foo(*x) } is there any other way?
<lucasb> ie, I want to unpack that array as an argument list
gerard0 has joined #ruby
FooMunki has quit [Quit: FooMunki]
<adaedra> yes, no
gerard0 has quit [Client Quit]
<adaedra> no wait
<adaedra> no, no
FooMunki has joined #ruby
<lucasb> adaedra --verbose
sftrabbit has quit [Client Quit]
<adaedra> er, misread two times in a row
<adaedra> so yes, &method(:foo) => { |x| foo(x) }
<adaedra> you can't splat, tho.
chussenot has quit [Quit: chussenot]
<lucasb> hm, ok, was just a detail anyway. thanks, adaedra.
tomaz_b has quit [Quit: Leaving]
usershell has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
sftrabbit has joined #ruby
chussenot has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
asmodlol has quit [Ping timeout: 264 seconds]
chadhs has joined #ruby
dc1 has joined #ruby
Xeago has quit [Remote host closed the connection]
sarkis has joined #ruby
asmodlol has joined #ruby
usershell has quit [Remote host closed the connection]
dhollinger has joined #ruby
<Haris> fixed that one
aegis3121 has quit [Ping timeout: 272 seconds]
<Haris> replaced pt with en
chouhoul_ has joined #ruby
kalopsian has quit [Ping timeout: 246 seconds]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
arup_r has quit [Remote host closed the connection]
chrisarcand has quit [Ping timeout: 260 seconds]
platzhirsch has joined #ruby
willv has joined #ruby
jas02 has quit [Quit: jas02]
pawnbox_ has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
Hounddog has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
scepticulous has quit [Quit: Konversation terminated!]
scepticulous has joined #ruby
rodolfowtf has joined #ruby
pawnbox has quit [Remote host closed the connection]
tagrudev has joined #ruby
pawnbox has joined #ruby
slawrence00 has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
cschneid_ has joined #ruby
aryaching has joined #ruby
ympeg has quit [Ping timeout: 240 seconds]
scepticulous has quit [Client Quit]
hannelita has quit [Remote host closed the connection]
scepticulous has joined #ruby
aryaching_ has quit [Ping timeout: 264 seconds]
B1n4r10 has quit [Ping timeout: 260 seconds]
dlitvak_ has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
bkxd has joined #ruby
d10n-work has joined #ruby
legohead_ has joined #ruby
Jibbits has quit [Quit: Page closed]
<legohead_> Hey, I'm using simple_form to try and get the user's d.o.b with three text inputs like so: [dd] [mm] [yyyy] is it possible to do this using simple_form?
hannelita has joined #ruby
tagrudev has quit [Quit: Leaving]
Firoot73 has joined #ruby
B1n4r10 has joined #ruby
pdoherty has joined #ruby
smactive has joined #ruby
kalopsian has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
ldnunes has joined #ruby
bkxd has quit [Ping timeout: 272 seconds]
jbrhbr has joined #ruby
mark2 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :rajaniemi.freenode.net"]
dlitvak has joined #ruby
KineticX has joined #ruby
chouhoul_ has joined #ruby
scepticulous has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
smactive has quit [Ping timeout: 240 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akkmaxon has joined #ruby
sigurding has quit [Quit: sigurding]
frem has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
legohead_ has left #ruby [#ruby]
terminalrecluse has joined #ruby
leksster has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
jbrhbr has quit [Quit: Leaving.]
chouhoul_ has quit [Remote host closed the connection]
symbol has quit [Ping timeout: 250 seconds]
certainty has joined #ruby
chouhoulis has joined #ruby
<havenwood> lego, ah gone already
wldcordeiro has joined #ruby
terminalrecluse has quit [Ping timeout: 260 seconds]
synthroid has quit [Remote host closed the connection]
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
TomyWork has quit [Ping timeout: 246 seconds]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ror15 has joined #ruby
Pisuke has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby
aegis3121 has joined #ruby
<cschneid_> if I have a regex literal inline with my code: f =~ /foo/, is that any performance difference than f =~ MY_REGEX, where MY_REGEX=/foo/.freeze ?
gagrio has quit [Ping timeout: 255 seconds]
<cschneid_> does the first reconstruct the regex each time through the function?
MyMind has quit [Ping timeout: 245 seconds]
<shevy> cschneid_ good question... I actually did not know that .freeze was possible at all
<cschneid_> well, it's just an object - that's unlikely to be interesting .
<cschneid_> what I was wonder is if the regex literal in a function (in a tight loop even, in my case) gets constructed once at parse time, or over and over, each time it gets called.
tesuji has quit [Ping timeout: 250 seconds]
<aegis3121> cschneid_ my gut instinct is that, yes, it would re-instantiate the object each time. But I could be mistaken. If you're worried about time, Benchmark may offer some answers.
<cschneid_> I'd guess that if the regex was /#{myvar}/, there'd be no way to precompile it..
aufi has quit [Quit: Konversation terminated!]
kalopsian has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
<ljarvis> cschneid_: if it's used mroe than one, you should use a constant.. but not really just for performance reasons
<cschneid_> well, it's used at only one point in the source code. Just inside a loop
<ljarvis> and it's crucial for your code to be performant?
<ljarvis> i ask because this is a bit of an over-optimisation imo
<cschneid_> https://gist.github.com/cschneid/0bcf9498f60665c65bf5 is the results. Ever so slightly different
dc1 has quit [Quit: WeeChat 1.3]
asmodlol has quit [Ping timeout: 256 seconds]
dcunit3d has joined #ruby
<cschneid_> ljarvis: working on a new-relic competitor, and trying to squeeze as much performance out of the agent that we put in other people's apps. :)
asmodlol has joined #ruby
<cschneid_> I didn't think this was a big deal, but was curious, and didn't know
mistermocha has joined #ruby
bkxd has joined #ruby
bronson has quit [Remote host closed the connection]
<ljarvis> yeah I don't *think* ruby will do much optimisation for the literal. But I don't know for sure. The difference is mostly superfluous (and you'd probably gain an extra 1/10th of a second by using =~ instead of #match) but the fact you're benchmarking it tells me you already have a hold on things
podman has joined #ruby
rodfersou|afk is now known as rodfersou
<shevy> sweet 1/10 second optimizations
User458764 has joined #ruby
<aegis3121> 1/10th of a second...for ten million.
gnarf_ is now known as gnarf
<ljarvis> yep :)
<lucasb> I didn't know =~ would be faster than #match, interesting
<aegis3121> It was slower, actually, from ljarvis (unless I can't read)
<aegis3121> constant match = 136, constant squiggly = 138
<ljarvis> that was an assumption, the ips result shows they're about the same and if anything it's slightly slower than match with a precompiled regexp
bkxd has quit [Ping timeout: 255 seconds]
<adaedra> and the difference between `string =~ regex` and `regex =~ string`? :p
<ljarvis> :)
speaking1ode has joined #ruby
<ljarvis> i thought not using match might remove some object allocations and perhaps method call overhead
mfb2 has quit [Remote host closed the connection]
<ljarvis> (assuming $& is applied lazily?)
<ljarvis> $~ rather
lkba has joined #ruby
bkxd has joined #ruby
Guest35313 has quit [Quit: Page closed]
usershell has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
rakm has joined #ruby
atomical_ has quit [Ping timeout: 256 seconds]
<cschneid_> Crazy - in 1.9.3, the behavior is flipped, the literal is ~5% faster
<cschneid_> probably the Constant lookup is slower?
atomical has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
PlasmaStar has quit [Remote host closed the connection]
govg has quit [Ping timeout: 245 seconds]
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
[Butch] has joined #ruby
joonty has quit [Ping timeout: 260 seconds]
usershell has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
workmad3 has joined #ruby
razorgfx has quit [Quit: Textual IRC Client: www.textualapp.com]
psy_ has joined #ruby
polishdub has joined #ruby
<hxegon> Looking for something lighter weight than rspec. Recommendations for minitest vs Test::Unit?
yardenbar has quit [Ping timeout: 272 seconds]
lacuna has quit [Remote host closed the connection]
joonty has joined #ruby
<ljarvis> hxegon: minitest is essentially the test::unit replacement
edwinvdgraaf has quit [Remote host closed the connection]
<ljarvis> and it's in stdlib, so I would recommend minitest
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
renderf__ has quit [Ping timeout: 260 seconds]
<hxegon> ljarvis thanks. having a hard time finding discourse with google.
<adaedra> I went from rspec to minitest and everything was awesome.
ph1nary has joined #ruby
atomical_ has joined #ruby
kalopsian has joined #ruby
renderf__ has joined #ruby
lacuna has joined #ruby
<hxegon> adaedra yeah, kind of getting the feeling rspec is not the framework I should have started on.
dlitvak has quit [Ping timeout: 240 seconds]
<hxegon> want to see what's on the other side of the hill
freerobby has quit [Quit: Leaving.]
einarj has quit [Remote host closed the connection]
greenhat has quit [Quit: ZNC - http://znc.in]
atomical has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
<adaedra> on the other side of the hill, I dunno; on the hill, there's a fool.
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
domgetter has joined #ruby
aegis3121 has quit [Ping timeout: 276 seconds]
preyalone has joined #ruby
synthroid has joined #ruby
amclain has joined #ruby
freerobby has quit [Client Quit]
mikecmpbll has joined #ruby
<shevy> hmm
Firoot73 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby
TomyLobo has joined #ruby
dlitvak has joined #ruby
symbol has joined #ruby
<mikecmpbll> this is a bit obscure, but is there a way to get the line number that I'm writing to when using something like log = Logger.new('/some/file'); log.debug("some message")
symbol has quit [Client Quit]
<mikecmpbll> i'd like to store the line number so when I generate an email i can include a reference to the log file for further info.
atomical_ has quit [Ping timeout: 276 seconds]
<toretore> just add a unique identifier to the line
<mikecmpbll> derp, that would be the smart thing.
<mikecmpbll> thanks :D
sigurding has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
AlphaAtom has joined #ruby
dionysus69 has joined #ruby
blackmesa has joined #ruby
KineticX has quit [Remote host closed the connection]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy> like "# Here be dragons"
<mikecmpbll> :)
finisherr has quit [Quit: finisherr]
KineticX has joined #ruby
greenhat has joined #ruby
joonty has quit [Ping timeout: 250 seconds]
f0ster has joined #ruby
jam_ has joined #ruby
sepp2k has quit [Quit: Leaving.]
mistermocha has quit [Remote host closed the connection]
underplank has joined #ruby
JoshL has joined #ruby
jam_ has quit [Ping timeout: 246 seconds]
chussenot has quit [Quit: chussenot]
bricker has joined #ruby
<domgetter> mikecmpbll: You should also be able to use __LINE__
<domgetter> note the double underscore, and mind that it returns a number, not a string
skade has quit [Quit: Computer has gone to sleep.]
The_Phoenix has quit [Read error: Connection reset by peer]
<ljarvis> that's not what mikecmpbll meant
<ljarvis> he meant the current line of the log file being written go
babblebre has joined #ruby
<ljarvis> to*
<domgetter> oooh "that I'm writing to". got it
mistermocha has joined #ruby
rodferso1 has joined #ruby
rodfersou has quit [Ping timeout: 250 seconds]
lemur has quit [Remote host closed the connection]
shadeslayer has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
mousier has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
northfurr has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
jaymeproni has quit [Remote host closed the connection]
shadeslayer has joined #ruby
chrisarcand has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
B1n4r10 has quit [Ping timeout: 255 seconds]
nerfando has joined #ruby
JakFrist has joined #ruby
tim_s007 has quit [Ping timeout: 250 seconds]
nerfando has quit [Max SendQ exceeded]
dwfait has quit [Remote host closed the connection]
mfb2 has joined #ruby
nerfando has joined #ruby
loatbac has joined #ruby
symm- has joined #ruby
michaellewis has joined #ruby
<loatbac> hi
<michaellewis> hi
mikecmpbll has quit [Ping timeout: 276 seconds]
momomomomo has joined #ruby
tim_s007 has joined #ruby
lacuna has quit [Remote host closed the connection]
<michaellewis> so what should i download
<michaellewis> loatbac
<workmad3> everything?
<michaellewis> msg/msg
usershell has joined #ruby
<michaellewis> 2938745038247569384765239487
northfurr has quit [Quit: northfurr]
<michaellewis> msg/msg
<loatbac> so, anyone here use gosu?
<sandstrom> Is there a word/term for && || (logical operator), but is there a shorter word?
<domgetter> loadtbac: I've used it, what's your question?
<havenwood> andand and oror, or you mean single term for the pair?
<domgetter> loatbac *
<loatbac> just curious
<loatbac> i've used it a little bit
michaellewis is now known as blackwhitejewish
bronson has joined #ruby
loatbac has left #ruby [#ruby]
arthurix has joined #ruby
finisherr has joined #ruby
sigurding has quit [Quit: sigurding]
akkmaxon has quit [Quit: akkmaxon]
sepp2k has joined #ruby
arthurix has quit [Remote host closed the connection]
steerio has quit [Quit: leaving]
arthurix has joined #ruby
blackwhitejewish has quit [Quit: blackwhitejewish]
underplank has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 246 seconds]
underplank has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
rodferso1 has quit [Ping timeout: 250 seconds]
rodfersou has joined #ruby
bkxd has joined #ruby
underplank has quit [Ping timeout: 256 seconds]
underplank has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loatbac has joined #ruby
blackwhitejewish has joined #ruby
dlitvak has joined #ruby
<loatbac> hello
bkxd has quit [Ping timeout: 260 seconds]
momomomomo has quit [Quit: momomomomo]
rodfersou has quit [Ping timeout: 250 seconds]
aibot has quit [Remote host closed the connection]
ascarter has joined #ruby
ror15 has joined #ruby
<loatbac> xyzzy
<blackwhitejewish> im not jewish
<loatbac> ok
underplank has quit [Ping timeout: 272 seconds]
aibot has joined #ruby
loatbac has left #ruby [#ruby]
<blackwhitejewish> underplank y u quit
momomomomo has joined #ruby
blackwhitejewish has left #ruby [#ruby]
aibot has quit [Read error: Connection reset by peer]
aibot has joined #ruby
JohnT has joined #ruby
ascarter has quit [Client Quit]
aibot has quit [Remote host closed the connection]
bronson has joined #ruby
rodfersou has joined #ruby
aibot has joined #ruby
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
radgeRayden_ has quit [Ping timeout: 265 seconds]
radgeRayden__ has joined #ruby
nfk|laptop has joined #ruby
lacuna has joined #ruby
guacamole has joined #ruby
roshanav_ has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
rrichardsr3 has joined #ruby
gbgdev has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
TheHodge has quit [K-Lined]
c355e3b has quit [K-Lined]
ckrailo has quit [K-Lined]
cstrahan has quit [K-Lined]
err_ok has quit [K-Lined]
amitchellbullard has quit [K-Lined]
thesheff17 has quit [K-Lined]
jxf has quit [K-Lined]
DoYouKnow has quit [K-Lined]
kireevco has quit [K-Lined]
glowcoil has quit [K-Lined]
zipkid has quit [K-Lined]
bestie has quit [K-Lined]
bjeanes has quit [K-Lined]
halfdan has quit [K-Lined]
adambeynon has quit [K-Lined]
machty has quit [K-Lined]
deeprave has quit [K-Lined]
jabreity__ has quit [K-Lined]
acadavid has quit [K-Lined]
ELLIOTTCABLE has quit [K-Lined]
mikolalysenko has quit [K-Lined]
troter______ has quit [K-Lined]
babblebre has quit [K-Lined]
frem has quit [K-Lined]
tjohnson has quit [K-Lined]
jmhmccr has quit [K-Lined]
nomadicoder has quit [K-Lined]
knowtheory has quit [K-Lined]
preyalone has quit [K-Lined]
podman has quit [K-Lined]
colstrom has quit [K-Lined]
hayden_ has quit [K-Lined]
ziyadb has quit [K-Lined]
Cihan has quit [K-Lined]
frode15243 has quit [K-Lined]
Guest85414______ has quit [K-Lined]
howdoi has quit [K-Lined]
huddy has quit [K-Lined]
d10n-work has quit [K-Lined]
lipoqil has quit [K-Lined]
swgillespie has quit [K-Lined]
skmp has quit [K-Lined]
gmci has quit [K-Lined]
ELCALOR has quit [K-Lined]
CihanKaygusuz has quit [K-Lined]
avahey has quit [K-Lined]
justinweiss has quit [K-Lined]
mroth has quit [K-Lined]
avdi has quit [K-Lined]
jmcc______ has quit [K-Lined]
ramblinpeck has quit [K-Lined]
jpinnix_______ has quit [K-Lined]
angiebadillo has quit [K-Lined]
acalewin has quit [K-Lined]
joaomdmoura__ has quit [K-Lined]
Eleeleth has quit [K-Lined]
jhill_ has quit [K-Lined]
danzilio has quit [K-Lined]
braderhart has quit [K-Lined]
alxndr has quit [K-Lined]
chrisseaton has quit [K-Lined]
ggherdov has quit [K-Lined]
jlyndon has quit [K-Lined]
pfg has quit [K-Lined]
Lloyd has quit [K-Lined]
jevs has quit [K-Lined]
Guest4184____ has quit [K-Lined]
Arcaire has quit [K-Lined]
spastorino has quit [K-Lined]
S01780_ has quit [K-Lined]
im0b has quit [K-Lined]
bcavileer_ has quit [K-Lined]
shelling__ has quit [K-Lined]
kellabyte has quit [K-Lined]
frankS2 has quit [K-Lined]
rflot has quit [K-Lined]
akahn has quit [K-Lined]
bove has quit [K-Lined]
daxroc has quit [K-Lined]
pizzaops has quit [K-Lined]
benlakey has quit [K-Lined]
bttf has quit [K-Lined]
cardoni has quit [K-Lined]
MiracleBlue__ has quit [K-Lined]
lancetw has quit [K-Lined]
jeregrine has quit [K-Lined]
akitada has quit [K-Lined]
rfv has quit [K-Lined]
cbednarski has quit [K-Lined]
yo61 has quit [K-Lined]
zrl has quit [K-Lined]
iamdevnul has quit [K-Lined]
AdamMeghji has quit [K-Lined]
sideshowcoder has quit [K-Lined]
dukedave has quit [K-Lined]
mrsolo has quit [K-Lined]
deimos has quit [K-Lined]
tejasmanohar has quit [K-Lined]
andersh has quit [K-Lined]
boxrick1 has quit [K-Lined]
charles81 has quit [K-Lined]
vcoinminer_ has quit [K-Lined]
golgaroth has quit [K-Lined]
apipkin has quit [K-Lined]
djbender has quit [K-Lined]
countryHick has quit [K-Lined]
Heero has quit [K-Lined]
tonini has quit [K-Lined]
cbetta has quit [K-Lined]
twodayslate has quit [K-Lined]
PhilK has quit [K-Lined]
HashNuke has quit [K-Lined]
schaary has quit [K-Lined]
pmarreck has quit [K-Lined]
zzak_ has quit [K-Lined]
manveru has quit [K-Lined]
jord has quit [K-Lined]
nfk|laptop has quit [Quit: yawn]
shadoi has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
swgillespie has joined #ruby
kireevco has joined #ruby
deeprave has joined #ruby
halfdan has joined #ruby
gagrio_ has quit [Quit: Leaving...]
jabreity__ has joined #ruby
jmcc______ has joined #ruby
ramblinpeck has joined #ruby
mikolalysenko has joined #ruby
jxf has joined #ruby
thesheff17 has joined #ruby
sigurding has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
M-shine has quit [Ping timeout: 245 seconds]
roshanav_ has quit [Ping timeout: 265 seconds]
joonty has joined #ruby
gbgdev has joined #ruby
ELLIOTTCABLE has joined #ruby
duckpuppy has joined #ruby
kellabyte has joined #ruby
B1n4r10 has joined #ruby
chipotle has joined #ruby
hayden_ has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
Eleeleth has joined #ruby
FernandoBasso1 has joined #ruby
Ebok has joined #ruby
<lucasb> I'm trying to create a generic Pair object. tried to search the ecosystem, but I think this may be too simple to exists as a gem. Can someone review and say what could improve it? I didn't even tested it yet. https://eval.in/private/ebd79b84ad5fdc
jxs_ has quit [Remote host closed the connection]
p0wn3d has joined #ruby
chrisseaton has joined #ruby
jbrhbr has joined #ruby
machty has joined #ruby
bove has joined #ruby
im0b has joined #ruby
tjohnson has joined #ruby
akitada has joined #ruby
ziyadb has joined #ruby
pmarreck has joined #ruby
Heero has joined #ruby
p0wn3d has quit [Client Quit]
joonty has quit [Ping timeout: 256 seconds]
firstdayonthejob has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FernandoBasso has quit [Ping timeout: 276 seconds]
jxs_ has joined #ruby
countryHick has joined #ruby
Lloyd has joined #ruby
benlakey has joined #ruby
podman has joined #ruby
avdi has joined #ruby
dlitvak has quit [Remote host closed the connection]
cbetta has joined #ruby
d10n-work has joined #ruby
acadavid has joined #ruby
Guest85414______ has joined #ruby
jpinnix_______ has joined #ruby
TheHodge has joined #ruby
tomaw has quit [Ping timeout: 600 seconds]
mroth has joined #ruby
skmp has joined #ruby
tomaw_ has joined #ruby
howdoi has joined #ruby
adambeynon has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
apipkin has joined #ruby
PhilK has joined #ruby
xet7 has quit [Ping timeout: 260 seconds]
huddy has joined #ruby
jmhmccr has joined #ruby
amitchellbullard has joined #ruby
andersh has joined #ruby
frem has joined #ruby
glowcoil has joined #ruby
frode15243 has joined #ruby
jeregrine has joined #ruby
lipoqil has joined #ruby
bestie has joined #ruby
CihanKaygusuz has joined #ruby
jevs has joined #ruby
willv has quit [Ping timeout: 256 seconds]
tomaw_ is now known as tomaw
charles81 has joined #ruby
golgaroth has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
ckrailo has joined #ruby
MiracleBlue__ has joined #ruby
akahn has joined #ruby
carella has joined #ruby
shelling__ has joined #ruby
dopie has quit [Quit: Lost terminal]
rflot has joined #ruby
djbender has joined #ruby
zzak_ has joined #ruby
deimos has joined #ruby
M-shine has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
dopie has joined #ruby
knowtheory has joined #ruby
c355e3b has joined #ruby
<carella> Why can't I find to_i method like this `String.methods.grep /to_i/`?
bjeanes has joined #ruby
<ljarvis> carella: instance_methods
rdark has quit [Ping timeout: 250 seconds]
jord has joined #ruby
<carella> oh, thanks
cstrahan has joined #ruby
manveru has joined #ruby
avahey has joined #ruby
twodayslate has joined #ruby
schaary has joined #ruby
braderhart has joined #ruby
bcavileer_ has joined #ruby
lancetw has joined #ruby
<ljarvis> lucasb: review should come after your tests, really
bluOxigen has joined #ruby
aegis3121 has joined #ruby
vcoinminer_ has joined #ruby
dukedave has joined #ruby
<ljarvis> lucasb: but one thing to point out is that your each method doesn't really make a whole lot of sense
bruce__lee has joined #ruby
pfg has joined #ruby
justinweiss has joined #ruby
danzilio has joined #ruby
ELCALOR has joined #ruby
<lucasb> ljarvis: I'll learn how to write some tests, thanks
bluOxigen_ has quit [Ping timeout: 260 seconds]
jlyndon has joined #ruby
joaomdmoura__ has joined #ruby
<lucasb> the each method is supposed to just iterate 2 times, yielding key and value
bruce_lee has quit [Ping timeout: 255 seconds]
mrmargol_ has joined #ruby
<ljarvis> why not yield key, value ?
blaxter has quit [Ping timeout: 264 seconds]
mrmargolis has quit [Read error: Connection reset by peer]
<lucasb> at once?
HashNuke has joined #ruby
<ljarvis> sure
chadhs has quit [Quit: Textual IRC Client: www.textualapp.com]
yo61 has joined #ruby
alxndr has joined #ruby
tonini has joined #ruby
rfv has joined #ruby
<lucasb> then there's no need to iterate at all, since the one can access the key and value already, without using each
<ljarvis> i mean, it's not really enumerberable I guess, I dont really see why you'd enumerate a pair but I guess you'll want the other methods
<ljarvis> I'd just use enum_for(:each)
iamdevnul has joined #ruby
<ljarvis> or something
<ljarvis> er
<ljarvis> :to_a *
spastorino has joined #ruby
zipkid has joined #ruby
guacamol_ has joined #ruby
<ljarvis> your pairs_from methods can just be written as enum.map { |*args| Pair.new(*args) } I think
momomomomo has quit [Quit: momomomomo]
<lucasb> ljarvis: hm, yes. using enum_for(:to_a) would do the same thing. maybe I created each just to get the sugar of Enumerable
B1n4r10 has quit [Ping timeout: 260 seconds]
dmr8 has joined #ruby
cardoni has joined #ruby
daxroc has joined #ruby
certainty has joined #ruby
<ljarvis> also I would recommend avoiding using "and" and "or"
<ljarvis> use && abd || instead
preyalone has joined #ruby
pizzaops has joined #ruby
err_ok has joined #ruby
tejasmanohar has joined #ruby
platzhirsch has left #ruby [#ruby]
Arcaire has joined #ruby
guacamole has quit [Ping timeout: 245 seconds]
cbednarski has joined #ruby
nomadicoder has joined #ruby
<lucasb> that pairs_from_enum methods should really be Hash#to_pairs and Array or Enumerable #to_pairs, but I'll leave at that for now. I still didn't practice how to use module refinements
djbkd has joined #ruby
User458764 has joined #ruby
<lucasb> ljarvis: but, ok. I liked what you said. I'll take into consideration. thank you very much!
sideshowcoder has joined #ruby
colstrom has joined #ruby
bttf has joined #ruby
certainty has quit [Ping timeout: 276 seconds]
jhill_ has joined #ruby
gmci has joined #ruby
frankS2 has joined #ruby
iateadonut has quit [Quit: Leaving.]
UtkarshRay has quit [Ping timeout: 250 seconds]
zrl has joined #ruby
mrsolo has joined #ruby
slayerjain has joined #ruby
AdamMeghji has joined #ruby
arup_r has quit []
boxrick1 has joined #ruby
S01780_ has joined #ruby
angiebadillo has joined #ruby
troter______ has joined #ruby
norc has joined #ruby
Dimik has joined #ruby
rdark has joined #ruby
babblebre has joined #ruby
nb_bez___ has joined #ruby
acalewin has joined #ruby
Bloomer has quit [Remote host closed the connection]
rodfersou has quit [Quit: leaving]
mikecmpbll has joined #ruby
rodfersou has joined #ruby
ht__ has joined #ruby
mrmargol_ has quit []
Macaveli has joined #ruby
Cihan has joined #ruby
dlitvak has joined #ruby
Guest4184____ has joined #ruby
momomomomo has joined #ruby
spider-mario has joined #ruby
kalopsian has joined #ruby
blaxter has joined #ruby
steffkes has joined #ruby
steffkes has joined #ruby
peeja has joined #ruby
ggherdov has joined #ruby
sftrabbit has joined #ruby
mchu has quit [Quit: mchu]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkf has quit [Quit: Leaving]
JohnT has joined #ruby
lapide_viridi has joined #ruby
mchu has joined #ruby
peeja has quit [Ping timeout: 260 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
freerobby has joined #ruby
ht__ has joined #ruby
guacamole has joined #ruby
steffkes has quit [Ping timeout: 260 seconds]
nfk|laptop has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
lapide_viridi has quit [Ping timeout: 260 seconds]
JakFrist has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
blaxter has quit [Ping timeout: 256 seconds]
guacamol_ has quit [Ping timeout: 256 seconds]
craysiii has joined #ruby
craysiii has quit [Max SendQ exceeded]
edwinvdgraaf has joined #ruby
f4cl3y has quit [Ping timeout: 245 seconds]
craysiii has joined #ruby
aibot has quit [Remote host closed the connection]
dlitvak has joined #ruby
aibot has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
mchu has quit [Quit: mchu]
Xeago has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
guacamol_ has joined #ruby
chrisarcand has quit [Quit: leaving]
chrisarcand has joined #ruby
choke has joined #ruby
guacamole has quit [Ping timeout: 255 seconds]
FernandoBasso1 has quit [Quit: Leaving]
harai54 has joined #ruby
baweaver has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 245 seconds]
haraigo has joined #ruby
sigurding has quit [Quit: sigurding]
elaptics is now known as elaptics`away
slayerjain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
harai54 has quit [Ping timeout: 255 seconds]
dlitvak has quit [Remote host closed the connection]
bkxd has joined #ruby
radgeRayden_ has joined #ruby
radgeRayden__ has quit [Ping timeout: 245 seconds]
dcunit3d has quit [Ping timeout: 260 seconds]
lapide_viridi has joined #ruby
rodfersou has quit [Ping timeout: 255 seconds]
rodferso1 has joined #ruby
rdark has quit [Ping timeout: 276 seconds]
Melpaws has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
nerfando has joined #ruby
binaryplease has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ror15> I'm testing a gets.chomp function. I'm trying to not require input while running the test. How do I do this?
<ror15> in rspec
blackmesa has quit [Ping timeout: 240 seconds]
<ror15> Their channel is sleeping
northfurr has joined #ruby
<jbrhbr> you might be able to just stub out gets on object, like `allow(Object).to receive(:gets)`
northfurr has quit [Client Quit]
baweaver has joined #ruby
northfurr has joined #ruby
roshanavand has joined #ruby
<Papierkorb> adding on jbrhbr, make the stub return the input: allow(the_instance).to receive(:gets).and_return "The Input Here\n"
<jbrhbr> i'm not sure what the best practice is here, although in my experience the kind of program where i'd use something like gets (usually one-off hacks) is not the kind of program that i would be writing tests for
<Papierkorb> Oh, no, actually use expect: expect(the_instance).to receive(:gets).and_return "The Input Here\n"
<jbrhbr> depends on if he wants to make sure it's called, but yeah
<Papierkorb> But then, I'd make the function receive a string argument instead of reading directly off $stdin
<jbrhbr> yea
<ror15> stub is deprecated on 3.1.7 and I'm not sure how to use mocks
<jbrhbr> we just wrote the code for you
<Papierkorb> ror15: Like jbrhbr and I wrote
stannard_ has joined #ruby
<Melpaws> struggling with some arrays. I need to find a way to clean up my nested array based on either elements or match . Pretty much need either element [1] of each array removed or to remove the 'First Shift - 7AM' element. : gist : https://gist.github.com/dylnnlsn/3aafbb171004554bae3f
<ror15> Ah I see
<Melpaws> any suggestions?
<Melpaws> i cannot get reject or delete_if to work for some reason
tomaz_b has joined #ruby
jam_ has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
roshanavand has quit [Ping timeout: 260 seconds]
bb010g has joined #ruby
baweaver has quit [Remote host closed the connection]
<toretore> Melpaws, define more precisely what you want to do
symm- has joined #ruby
<Melpaws> ultimately, remove any 'First Shift - 7AM' from the array.
<ror15> jbrhbr: You're right, I'm just using rspec to play with a simple ruby program. Thanks and Papierkorb
bMalum has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
blackwhitejewish has joined #ruby
<blackwhitejewish> hi
<blackwhitejewish> 3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
<toretore> ?ops
<ruby[bot]> to call for ops use the !ops command. You can find a list of channel staff on http://ruby-community.com/pages/irc_staff
<toretore> !ops
<ruboto> fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, jhass, sevenseacat, miah, workmad3, Havenn, Radar, Coraline, slyphon, zenspider, rubyhacker1, drbrain, baweaver, ljarvis, Aria, Adaedra, ruby[bot]
<blackwhitejewish> 132222222231213213213123123123321213213231231231321321123123123
<adaedra> !ban blackwhitejewish !P Good bye
blackwhitejewish was banned on #ruby by ChanServ [blackwhitejewish!*@*]
blackwhitejewish was kicked from #ruby by ChanServ [Banned: Good bye]
jackjackdripper has joined #ruby
<adaedra> thanks, toretore
<toretore> np
<Radar> +1
blackwhitejewish has joined #ruby
blackwhitejewish was kicked from #ruby by ChanServ [Banned: Good bye]
jam_ has quit [Ping timeout: 255 seconds]
camilasan has quit [Remote host closed the connection]
<adaedra> apeiros: is it normal it removes the +b so soon?
blackwhitejewish has joined #ruby
blackwhitejewish was kicked from #ruby by ChanServ [Banned: Good bye]
<toretore> Melpaws, more precisely than that. this is how to solve programming problems; the difficult part is articulating what it is you want to do
stamina has joined #ruby
<jhass> apeiros: well, that's spammy
willv has joined #ruby
<toretore> Melpaws, the way you phrase it can be interpreted in more than one way: 1) remove the second element from each array 2) remove objects that match "First Shift - 7AM" from each array
<jhass> .troll blackwhitejewish
<jhass> still not I guess
chrisarcand has quit [Quit: leaving]
sepp2k has quit [Read error: Connection reset by peer]
chrisarcand has joined #ruby
camilasan has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
<carella> Melpaws, .map {|a| a.reject {|s| s == "First Shift - 7AM"}}
baweaver has joined #ruby
<Papierkorb> Melpaws, carella, or even shorter: the_array.map{|a| a - [ 'First Shift - 7AM' ]}
<Melpaws> ah . thanks carella. That did the trick .
vdamewood has quit [Ping timeout: 245 seconds]
<carella> Papierkorb, thanks, that's better
<hxegon> Melpaws carella Papierkorb ['First Shift - 7AM', 'everything else'] - ['First Shift - 7 AM']
<Papierkorb> ?
dlitvak has joined #ruby
<carella> '7AM' vs '7 AM'
<hxegon> nvm, didn't see the nested part.
momomomomo has quit [Quit: momomomomo]
arup_r has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
kerunaru has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
B1n4r10 has joined #ruby
rusy has joined #ruby
<rusy> hello, someone used sqlite3-ruby?
zeroDivisible has joined #ruby
<jhass> ?anyone
<ruby[bot]> Just ask your question, if anyone has or can, they will respond.
cdg has quit [Remote host closed the connection]
<rusy> ok, how can I bind to a ? parameter with delete?
tomaz_b has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
cdg has joined #ruby
<rusy> i do it like db.execute("DELETE FROM table_name WHERE some_id = ?", someId)
<rusy> but this throws bind or column index out of range
<rusy> and there's literally nothing on the internet about this, not even in the official docs (for ruby)
northfurr has quit [Quit: northfurr]
blackmesa has joined #ruby
<Mon_Ouie> Well that wouldn't belong on the official docs of Ruby since sqlite3-ruby is not a part of stdlib/core
<rusy> no I mean't info for the ruby sqlite driver
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rusy> meant*
<rusy> obviously there wouldn't be documentation for a third party lib, duh
DoubleMalt has joined #ruby
lapide_viridi has quit [Quit: Leaving]
<rusy> correct, I'm passing it like in the example :)
<rusy> question is why it doesn't work, I use it the same way in other queries but with delete it doesn't seem to bind correctly
cdg has quit [Ping timeout: 245 seconds]
<rusy> and I'm sure the names of the columns are correct and so is the parameter.
psyq has joined #ruby
choke has joined #ruby
mchu has joined #ruby
roshanavand has joined #ruby
<Mon_Ouie> Haven't used this gem recently, but according to this you're supposed to pass bind parameters as an array rather than as multiple arguments
aegis3121 has quit [Ping timeout: 272 seconds]
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
<rusy> yeah I'm passing it as an array
ht__ has quit [Quit: Konversation terminated!]
<rusy> for e.g if I bind 3, I pass [3]
ht__ has joined #ruby
aegis3121 has joined #ruby
Krazypoloc has left #ruby [#ruby]
<Mon_Ouie> Oh, okay then, I thought someId would be 3 and not an array containing 3
momomomomo has joined #ruby
programm1 has joined #ruby
momomomomo has quit [Client Quit]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rusy> god knows :)
<rusy> I'm just going to sit and beg for it to work
<rusy> ty anyway
programmerq has quit [Ping timeout: 246 seconds]
rusy has quit [Quit: Page closed]
karapetyan has joined #ruby
usershell has quit [Remote host closed the connection]
ldnunes_ has joined #ruby
dlitvak has quit [Remote host closed the connection]
ldnunes has quit [Ping timeout: 245 seconds]
atomical_ has joined #ruby
<mchu> hi. is anyone familiar w/ the “ serialized_accessor :config, “ ? i can’t seem to find anything on it in google
sandstrom has quit [Quit: My computer has gone to sleep.]
troulouliou_dev has joined #ruby
edwinvdg_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 240 seconds]
synthroid has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 260 seconds]
stannard_ has quit [Remote host closed the connection]
programm1 has quit [Ping timeout: 256 seconds]
symm- has quit [Quit: Leaving...]
atomical has joined #ruby
karapetyan has joined #ruby
nettoweb has quit [Excess Flood]
momomomomo has joined #ruby
programm1 has joined #ruby
speaking1ode has quit [Ping timeout: 272 seconds]
carella has quit [Ping timeout: 252 seconds]
TheEyeOfTheTruth has joined #ruby
atomical_ has quit [Ping timeout: 256 seconds]
leksster has quit [Remote host closed the connection]
colegatron has quit [Ping timeout: 256 seconds]
bruce__lee has quit [Changing host]
bruce_lee has joined #ruby
bruce__lee is now known as bruce_lee
TheEyeOfTheTruth has quit [Client Quit]
FernandoBasso has joined #ruby
stamina has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
pulgolino has quit [Remote host closed the connection]
karapetyan has joined #ruby
joonty has joined #ruby
<choke> afternoon everyone
uri_ has joined #ruby
ldnunes_ has quit [Quit: Leaving]
DoubleMalt has quit [Ping timeout: 240 seconds]
<domgetter> good morning
jgpawletko has quit [Quit: jgpawletko]
joonty has quit [Ping timeout: 276 seconds]
colegatron has joined #ruby
stannard has joined #ruby
last_staff has joined #ruby
Xeago has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
casadei_ has joined #ruby
baweaver has joined #ruby
casadei has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
agentmeerkat has quit [Ping timeout: 256 seconds]
programm1 is now known as programmerq
tvsutton has joined #ruby
SHyx0rmZ has quit [Remote host closed the connection]
edwinvdg_ has quit [Read error: Connection reset by peer]
certainty has joined #ruby
edwinvdgraaf has joined #ruby
baweaver has quit [Ping timeout: 245 seconds]
wldcordeiro has quit [Ping timeout: 256 seconds]
<tvsutton> I have a general Rake question: I'm working on a project with a very large Rakefile and it makes branching/merging problematic because many changes go into a single file. I was looking at splitting it up using simply the "rakelib/foo.rake" pattern. Does this method have any disadvantages for simply splitting up our tasks into files more logically?
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
atomical has quit [Max SendQ exceeded]
pawnbox has quit [Remote host closed the connection]
willv has quit [Ping timeout: 260 seconds]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
Xeago_ has joined #ruby
ixti has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
DoubleMalt has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
kadoppe has quit [Ping timeout: 240 seconds]
norc has quit [Ping timeout: 252 seconds]
atomical has joined #ruby
pdoherty has joined #ruby
kadoppe has joined #ruby
who42 has joined #ruby
Cohedrin has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
pawnbox has joined #ruby
ta has quit [Remote host closed the connection]
ellistaa has joined #ruby
<ellistaa> is peer to peer the same as distributed computing?
baweaver has quit [Remote host closed the connection]
<ellistaa> or is it a type of DC
duckpuppy has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
rodfersou has joined #ruby
_Tariq has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
wldcordeiro has joined #ruby
stamina has joined #ruby
<_Tariq> I am getting the error "undefined local variable or method `define_instance_method'" inside of my initialize method
agentmeerkat has joined #ruby
<_Tariq> what should I do to define an instance method?
roshanavand has joined #ruby
jeff_laplante has joined #ruby
rodfersou has quit [Client Quit]
baweaver has joined #ruby
rodferso1 has quit [Ping timeout: 265 seconds]
<Radar> _Tariq: Show us your code please?
Xeago_ has quit [Remote host closed the connection]
* _Tariq sighs
Xeago has joined #ruby
<Radar> _Tariq: I don't know what this define_instance_method method is that you're talking about.
pandaant has quit [Quit: Lost terminal]
pawnbox has quit [Ping timeout: 264 seconds]
<_Tariq> basically, I want to feed into the class a data_hash, and then have each key in that hash gets turned into a method
blackmesa has joined #ruby
freerobby has quit [Quit: Leaving.]
<_Tariq> that can then be called on
<toretore> use method_missing
babblebre has quit [Quit: Connection closed for inactivity]
<_Tariq> is method_missing a bit discouraged?
<Radar> _Tariq: there is no such thing as "define_instance_method" in Ruby. Perhaps you're thinking of "define_method"?
<_Tariq> Yeah
<_Tariq> I was afraid that define_method would only create class methods
<_Tariq> not methods only local to the instance
<toretore> it creates instance methods on the class it is called
<_Tariq> Ah, got it
willv has joined #ruby
<_Tariq> self.class.send(:define_method, :key) { value }
<aegis3121> So....It looks like they're supposed to be reader, right?
<_Tariq> that is what I had to write out, but it works.
<aegis3121> readers*
<aegis3121> _Tariq?
<_Tariq> Yeah
<_Tariq> They are supposed to be readers
<toretore> no, that's not correct _Tariq
<_Tariq> Huh?
<aegis3121> You're not setting the iVar, but if you set iVars with those values they would be readers
<aegis3121> they're...close.
dlitvak has joined #ruby
<Radar> This is how I would do it.
<Radar> assuming "name" and "address" are in the data_hash
freerobby has joined #ruby
<_Tariq> Yeah this does look cool
<_Tariq> However, I don't know what might be in that data_hash
<_Tariq> so I guess I'll use a more generic approach
<_Tariq> but I really like this
<aegis3121> something like taht might be similar
binaryplease has quit [Quit: WeeChat 1.3]
<Radar> aegis3121: neat
binaryplease has joined #ruby
<_Tariq> yep. This will work.
binaryplease has quit [Client Quit]
freerobby1 has joined #ruby
<_Tariq> Thanks aegis3121
ta has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
blackgoat has joined #ruby
skade has joined #ruby
freerobby has joined #ruby
ziyadb has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
_Tariq has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 265 seconds]
Snowy has joined #ruby
jbrhbr has quit [Quit: Leaving.]
ItSANgo has quit [Quit: Leaving...]
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
aegis3121 has joined #ruby
Snowy has quit [Remote host closed the connection]
guacamole has joined #ruby
elaptics`away is now known as elaptics
bkxd has quit [Ping timeout: 240 seconds]
nfk|laptop has quit [Ping timeout: 272 seconds]
roshanavand has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
roshanavand has joined #ruby
willv has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
karapetyan has quit [Remote host closed the connection]
dling has quit []
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
guacamol_ has quit [Ping timeout: 246 seconds]
Snowy has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
skade has quit [Ping timeout: 265 seconds]
mary5030_ has joined #ruby
willv has joined #ruby
mary5030_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
synthroid has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
guacamol_ has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mary5030_ has joined #ruby
dasilvacontin has joined #ruby
tvw has quit [Ping timeout: 260 seconds]
<dasilvacontin> Hi! ruby n00b here. How can I do "obj.prop?.each { |n| puts n }" so that each only tries to be executed if obj has prop defined?
guacamole has quit [Ping timeout: 260 seconds]
firstdayonthejob has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
mchu has quit [Quit: mchu]
djbkd has quit [Ping timeout: 245 seconds]
<dasilvacontin> Can I do it in a single line?
mary5030 has quit [Ping timeout: 260 seconds]
Dimik has joined #ruby
<dasilvacontin> Getting "undefined method `presets?' for #<Hash:0x007fa97b093658> (NoMethodError)". I guess it's trying to access a prop called `presets?` in the object
<dasilvacontin> When I just wanted to do an existence check
<livcd> does ruby have something similar ? http://wheel.readthedocs.org/en/latest/
ddubs_ has quit [Ping timeout: 246 seconds]
Xeago_ has joined #ruby
mchu has joined #ruby
ellistaa has quit [Quit: ellistaa]
last_staff has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
edwinvdgraaf has quit [Read error: Connection reset by peer]
ht__ has quit [Quit: Konversation terminated!]
edwinvdgraaf has joined #ruby
<drbrain> livcd: ruby only has one package system, RubyGems
<lucasb> dasilvacontin: try obj.prop&.each {} (only in ruby 2.3)
aegis3121 has quit [Ping timeout: 260 seconds]
fourq|away is now known as fourq
Dimik has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
Dimik has joined #ruby
<dasilvacontin> lucasb: Okay, I'll give it a try, thanks!
Jackneill has quit [Remote host closed the connection]
gheegh has joined #ruby
<havenwood> livcd: And RubyGems ships with Ruby!
pwnd_nsfw has joined #ruby
<shevy> :)
gbgdev has quit [Remote host closed the connection]
gbgdev has joined #ruby
ror15 has joined #ruby
dpg_ has joined #ruby
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
gbgdev has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has joined #ruby
FernandoBasso has quit [Quit: Leaving]
ellistaa has joined #ruby
ESpiney has quit [Quit: Leaving]
Snowy has quit []
hxegon has quit [Quit: BRB]
lipoqil has quit [Quit: Connection closed for inactivity]
prestorium has quit [Quit: Leaving]
jam_ has joined #ruby
lannonbr has joined #ruby
arup_r has quit []
karapetyan has quit [Remote host closed the connection]
uri_ has quit [Ping timeout: 272 seconds]
dlitvak has joined #ruby
davedev2_ has joined #ruby
jam_ has quit [Ping timeout: 276 seconds]
dmr8 has quit [Quit: Leaving]
hxegon has joined #ruby
hannelita has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
dostoyevsky has joined #ruby
<dostoyevsky> Is it ok to ask rails questions here? #rails doesn't exist though...
dopie has quit [Quit: Lost terminal]
<havenwood> .rails dostoyevsky
<havenwood> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
momomomomo has quit [Quit: momomomomo]
<havenwood> dostoyevsky: it's #rubyonrails
dopie has joined #ruby
ItSANgo has joined #ruby
<dostoyevsky> havenwood: thx!
baweaver has joined #ruby
<dasilvacontin> lucasb: worked perfectly, though I'm worried about making users have ruby 2.3
DoubleMalt has quit [Remote host closed the connection]
argentdrake has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
Melpaws has quit [Read error: Connection reset by peer]
<lucasb> dasilvacontin: yeah, ruby 2.3 is still very recent
Jello_Raptor has quit [Quit: ZNC - http://znc.in]
<dasilvacontin> lucasb: probably I won't use it then, though it's very nice to know about it, thanks :)
Jello_Raptor has joined #ruby
<dasilvacontin> lucasb: what's the best alternative, use `and`?
<dasilvacontin> obj.prop and obj.prop.each ...
Jello_Raptor has quit [Max SendQ exceeded]
Jello_Raptor has joined #ruby
<lucasb> dasilvacontin: maybe that might work. to be honest I really dunno. maybe someone more experienced here in the channel can tell you.
baweaver has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
hxegon has quit [Quit: BRB]
ur5us has joined #ruby
karapetyan has quit [Remote host closed the connection]
<dasilvacontin> lucasb: yep, it does work. I'll go with that, thanks :)
baweaver has joined #ruby
yfeldblum has joined #ruby
karapetyan has joined #ruby
aupadhye has quit [Quit: Leaving]
bb010g has quit [Quit: Connection closed for inactivity]
dlitvak has quit [Ping timeout: 246 seconds]
tockitj has quit [Ping timeout: 246 seconds]
karapetyan has quit [Remote host closed the connection]
agentmeerkat has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
moei has quit [Quit: Leaving...]
karapetyan has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
nfk|laptop has joined #ruby
<lucasb> inside class Foo, I'm repeating a lot of Foo.some_method. but this will cause problems when the class is subclassed. Other languages have something like __class__ or __CLASS__ for this. In ruby, self.class.some_method is the accepted idiom for this?
<lucasb> in other words, I want a token that means "the current class in scope"
dcunit3d has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
decoponio has quit [Quit: Leaving...]
guacamole has joined #ruby
synthroid has quit []
<adaedra> self
dlitvak has quit [Ping timeout: 240 seconds]
<lucasb> but inside instance methods, self is the object, not the class
<adaedra> or self.class, in instance methods (don't know how it reacts in modules tho)
jbrhbr has joined #ruby
guacamol_ has quit [Ping timeout: 260 seconds]
<lucasb> ok, I just wanted to confirm that was the right thing. thanks, adaedra
jgt has joined #ruby
davedev2_ has quit [Ping timeout: 260 seconds]
mchu has quit [Quit: mchu]
davedev24 has joined #ruby
haraigo has quit [Ping timeout: 264 seconds]
aspire has joined #ruby
tomchapin has joined #ruby
atomical_ has joined #ruby
tockitj has joined #ruby
mchu has joined #ruby
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has joined #ruby
atomical has quit [Ping timeout: 245 seconds]
roshanavand has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 264 seconds]
edwinvdgraaf has joined #ruby
roshanavand has joined #ruby
choke has joined #ruby
ht__ has quit [Client Quit]
imperator has joined #ruby
gbgdev has joined #ruby
dede has joined #ruby
bMalum has joined #ruby
<imperator> i'm spacing, is there a version of delete_if that returns the rejected items instead of the final object?
blackmesa has joined #ruby
baweaver has quit [Remote host closed the connection]
edwinvdgraaf has quit [Read error: Connection reset by peer]
hahuang61 has quit [Quit: WeeChat 1.4]
edwinvdgraaf has joined #ruby
hahuang65 has joined #ruby
FooMunki has quit [Quit: FooMunki]
hahuang65 has quit [Client Quit]
FooMunki has joined #ruby
hahuang65 has joined #ruby
<lucasb> imperator: are you interested only in the rejected items, or you also want the side effects of removing them from the array?
<grill> yo. do instance vars percolate down to child contexts in rspec?
smactive has joined #ruby
djbkd_ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mclong has joined #ruby
<Radar> grill: fo' real dawg
<grill> what
Guest38 has joined #ruby
<Radar> grill: Apologies. Yes they do percolate down.
<Radar> (my homie)
hahuang65 has quit [Quit: WeeChat 1.4]
<Radar> ((I interpret "yo" as like real OG type shit))
hahuang65 has joined #ruby
<shevy> yo man
<Radar> shevy: WHAT UP
<shevy> :D
choke has quit [Remote host closed the connection]
<shevy> I think you overwhelmed grill there!
<jbrhbr> it's really not that slangy
atomical has joined #ruby
<grill> old people still think it's slangy
<shevy> at what point is someone old
<jbrhbr> i'm getting old :(
nfk|laptop has quit [Ping timeout: 246 seconds]
dlitvak has joined #ruby
<shevy> jbrhbr perhaps you are right before the age threshold!
<imperator> lucasb, i also want the side effects
choke has joined #ruby
aegis3121 has joined #ruby
willv has quit [Ping timeout: 240 seconds]
<grill> anyway, i have a before before block where i set an instance var (e.g. @first_file = "/blah"). later on, in a child context's before block, i call FileUtils.touch(@first_file), which promptly comes back with a "can't convert nil into string" error. what gives?
<aegis3121> o___O my first instinct is...don't use an iVar
djbkd_ has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Client Quit]
atomical_ has quit [Ping timeout: 245 seconds]
hahuang65 has joined #ruby
<grill> does let actually allow the var to retain its value across contexts?
<Radar> grill: real code please
hxegon has joined #ruby
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
<shevy> grill you must initialize the @ivar in question to a value
<lucasb> imperator: one way is to previously generate an array with all the elements you want removed, then remove them from the original array
dlitvak has quit [Ping timeout: 240 seconds]
dasilvacontin has quit [Quit: Page closed]
<grill> shevy @first_file = "/blah"
<imperator> lucasb, i was hoping for a single method to do it all :)
<shevy> grill then the error would not be nil
<Radar> grill: Steps to reproduce the problem with code, please.
<lucasb> imperator: sorry, I'm not aware of a method that does this in a single step. maybe others here can help.
chipotle has quit [Quit: cheerio]
babblebre has joined #ruby
<lucasb> imperator: remove_elems = orig_array.reject {...}; orig_array = orig_array - remove_elems
pawnbox has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
<jbrhbr> reject! returns the ones where it was rejected and nil otherwise
<jbrhbr> pretty sure
edwinvdgraaf has joined #ruby
<Ox0dea> jbrhbr: #reject! is an alias for #delete_if.
<aegis3121> work?
<Radar> >> [1,2,3].reject! { |a| a == 1 }
<ruby[bot]> Radar: # => [2, 3] (https://eval.in/501797)
<bnagy> imperator: how about partition?
<aegis3121> bnagy woo! same page
<Radar> +1 for partition
<Ox0dea> Well, never mind.
<jbrhbr> i think that's misleading
<aegis3121> >> [1, 2, 3, 4].partition { |a| a == 1 }
<ruby[bot]> aegis3121: # => [[1], [2, 3, 4]] (https://eval.in/501798)
willv has joined #ruby
<jbrhbr> >> l = [1, 2, 3, 4]; bads = l.reject! { |e| e == 2 || e == 4 }; bads
<ruby[bot]> jbrhbr: # => [1, 3] (https://eval.in/501799)
<Ox0dea> Er, no, yeah, #reject! and #delete_if amount to the same thing.
<Radar> >> rejected, good = [1, 2, 3, 4].partition { |a| a == 1 }
<lucasb> imperator: remove_elems, orig_array = orig_array.partition {|x| x.good? }
<ruby[bot]> Radar: # => [[1], [2, 3, 4]] (https://eval.in/501800)
<Radar> then rejected would be [1] and good would be [2,3,4]
<jbrhbr> ah nm it's the opposite of what he wants once again, sorry
atomical_ has joined #ruby
<imperator> lucasb, that will work, thanks!
lxsameer has quit [Quit: Leaving]
<imperator> bnagy, aegis3121 thanks
terminalrecluse has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
<Ox0dea> >> a = [1,2,3,4]; ret = (_, a = a.partition(&:even?))[0]; [ret, a] # imperator
<ruby[bot]> Ox0dea: # => [[2, 4], [1, 3]] (https://eval.in/501801)
<Ox0dea> That's crazy, though.
mistermocha has quit [Remote host closed the connection]
<jbrhbr> :p i knew it was just a matter of time!
ramortegui has quit [Quit: Ex-Chat]
atomical has quit [Ping timeout: 260 seconds]
<Ox0dea> #reject! should totally return the rejected elements. :/
roshanavand has quit [Read error: Connection reset by peer]
<jbrhbr> would be more useful for sure, it's redundant the current way
mistermocha has joined #ruby
roshanavand has joined #ruby
dopie has quit [Quit: Lost terminal]
terminalrecluse has quit [Ping timeout: 246 seconds]
dopie has joined #ruby
<bnagy> eh
<lucasb> I like that methods return self, but in this case I'll have to agree. Even more since #reject! returns nil when it doesn't find anything to remove.
nerium has joined #ruby
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
<lucasb> (I mean, I agree that #reject! should return the rejected ones)
<Ox0dea> It would be objectively more useful, and those wanting the current behavior could `tap(&:reject!)`.
<jbrhbr> i got bit by that 'returns nil' behavior yesterday actually
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Domaldel has quit [Quit: Leaving]
<bnagy> oic internally redundant, I thought you meant redundancy with reject/reject!
<jbrhbr> i did some console tests to make sure it returned the array it had modified, but in my test i had a block body which actually found something. so the last line of my method was `l.reject! …`
<jbrhbr> but in my actual code, the block never rejected anything, so it was returning nil. took me a while to realize wtf was going on there
baweaver has joined #ruby
<lucasb> yeah, conditionally return either self or nil doesn't make much sense :)
mistermocha has quit [Ping timeout: 265 seconds]
aryaching has quit [Ping timeout: 245 seconds]
mistermocha has joined #ruby
bMalum has joined #ruby
rahult has joined #ruby
guacamole has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
rahult has left #ruby [#ruby]
Limix has joined #ruby
edwinvdgraaf has joined #ruby
<Ox0dea> Unless you're using bang methods in conditionals, which is the intended use case.
<Ox0dea> Regarding their nil-returning semantics, at any rate.
rahult has joined #ruby
agent_white has joined #ruby
hannelita has quit [Remote host closed the connection]
polishdub has quit [Quit: Leaving]
<jbrhbr> yes
casadei_ has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 260 seconds]
willv has quit [Ping timeout: 240 seconds]
bMalum has quit [Ping timeout: 272 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B1n4r10 has quit [Ping timeout: 264 seconds]
B1n4r10 has joined #ruby
<bnagy> you'd need to keep the nil return, but returning the removed items in this case does seem to make sense :\
<bnagy> select! returns what it selected...
tvw has quit [Ping timeout: 255 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
<grill> aegis3121 you aren't supposed to use variables defined with let inside before blocks...
<Ox0dea> bnagy: Well, it returns `self`, which amounts to the same thing.
<aegis3121> Sure
<aegis3121> grill: any particular reason why not?
rahult has quit [Ping timeout: 260 seconds]
ellistaa has quit [Quit: ellistaa]
janebootydoe has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
tvw has joined #ruby
edwinvdgraaf has joined #ruby
<aegis3121> Mm. I've never messed with before(:context), we typically just do before(:each)
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has quit [Remote host closed the connection]
lucasb has quit [Quit: leaving]
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<grill> here's an example snippet http://hastebin.com/ekavasifuv.rb
zenlot1 has joined #ruby
<aegis3121> Your first block is missing a do?
<grill> radar ^
<aegis3121> Wait
<aegis3121> these are iVars, yea?
who42 has quit [Quit: Leaving]
<aegis3121> Wouldn't you need to refer to them as such? expect {Transfer.files_changed?(nil, nil, @flags) } ?
<grill> yeah scratch that. sec
zenlot has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
chipotle has joined #ruby
<grill> good lord
<grill> it was the missing do
<aegis3121> WOO
<grill> i HATE it when i do that
<aegis3121> Those little things. always the best.
<Radar> grill: look what happens when you show your REAL code: MAGIC
<Radar> I hope we've all learned a valuable lesson today.
<grill> thanks for rubbing it in
<Radar> np
ellistaa has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby
atomical_ has quit [Ping timeout: 276 seconds]
[Butch] has quit [Quit: I'm out . . .]
bkxd has joined #ruby
psyq has quit [Quit: Conversation terminated]
edwinvdgraaf has quit [Read error: Connection reset by peer]
antgel has joined #ruby
edwinvdgraaf has joined #ruby
psyq has joined #ruby
agent_white has left #ruby [#ruby]
lkba has quit [Remote host closed the connection]
roshanavand has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
nfk|laptop has joined #ruby
northfurr has joined #ruby
edwinvdgraaf has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
northfurr has quit [Client Quit]
wldcordeiro has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
theery has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 246 seconds]
rrichardsr3 has joined #ruby
northfurr has joined #ruby
edwinvdgraaf has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mchu has quit [Quit: mchu]
dopie has quit [Quit: Lost terminal]
solocshaw has joined #ruby
dopie has joined #ruby
rikai has quit [Quit: No Ping reply in 180 seconds.]
nwhirschfeld has quit [Quit: No Ping reply in 180 seconds.]
mary5030 has joined #ruby
duper has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
rikai has joined #ruby
nwhirschfeld has joined #ruby
imperator has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 256 seconds]
yqt has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solocshaw has quit [Client Quit]
stamina has quit [Quit: WeeChat 1.3]
edwinvdgraaf has quit [Read error: Connection reset by peer]
mary5030_ has quit [Ping timeout: 245 seconds]
al2o3-cr has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
TheAnachron has quit [Ping timeout: 255 seconds]
ropeney has joined #ruby
duper has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
dopie has quit [Quit: Lost terminal]
dopie has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
linduxed has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
gigetoo has joined #ruby
baweaver has joined #ruby
stannard has quit [Remote host closed the connection]
dhollinger has quit [Quit: WeeChat 1.3]
jeff_laplante has quit [Quit: Textual IRC Client: www.textualapp.com]
Seich has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Remote host closed the connection]
atomical_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
Seich has joined #ruby
chadwtaylor has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
snockerton has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snockerton has quit [Client Quit]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
thumpba has joined #ruby
edwinvdgraaf has joined #ruby
atomical has quit [Ping timeout: 276 seconds]
guacamol_ has joined #ruby
northfurr has quit [Quit: northfurr]
sandstrom has quit [Quit: My computer has gone to sleep.]
al2o3-cr has joined #ruby
guacamole has quit [Ping timeout: 255 seconds]
theery has quit []
maletor has joined #ruby
user083 has quit [Remote host closed the connection]
thumpba has quit [Remote host closed the connection]
mistermocha has joined #ruby
vishwa has joined #ruby
jam_ has joined #ruby
ixti has quit [Quit: WeeChat 1.3]
<vishwa> Guys, is it possible to do something like a.equals? 5 then puts a
<aegis3121> so...print a if it equals 5?
wldcordeiro has joined #ruby
<vishwa> Yeah
<aegis3121> I would wager an `if` is what you want
<vishwa> Basically a.equals? something? then do x
linduxed has joined #ruby
<vishwa> More in a ruby-ic method
SHyx0rmZ has joined #ruby
<vishwa> That's why I'm not doing if
edwinvdgraaf has quit [Read error: Connection reset by peer]
<vishwa> I remember something vaguely like that on rubymonks but I can't find it
<aegis3121> >> a = 5; print a if a == 5
RobertBirnie has quit [Ping timeout: 260 seconds]
<ruby[bot]> aegis3121: # => 5nil (https://eval.in/501813)
edwinvdgraaf has joined #ruby
jam_ has quit [Ping timeout: 245 seconds]
<vishwa> aegis3121: That worked
<vishwa> Is there a wat to add an else condition?
momomomomo has joined #ruby
RobertBirnie has joined #ruby
<vishwa> aegis3121: Exactamundo
edwinvdgraaf has quit [Remote host closed the connection]
momomomomo has quit [Client Quit]
yqt has joined #ruby
mistermocha has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
freerobby has quit [Quit: Leaving.]
codecop has quit [Remote host closed the connection]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m1dnight_ has quit [Quit: WeeChat 1.4-dev]
jackcom has joined #ruby
psyq has quit [Quit: Conversation terminated]
axsuul has joined #ruby
maletor has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
<shevy> ack! foreign language!!!
m1dnight_ has joined #ruby
spider-mario has quit [Remote host closed the connection]
Snowy has joined #ruby
pdoherty has quit [Ping timeout: 256 seconds]
kalopsian has quit [Ping timeout: 245 seconds]
<domgetter> aack aack!
axsuul has quit [Ping timeout: 256 seconds]
drocsid has joined #ruby
guacamol_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dionysus69 has quit [Ping timeout: 260 seconds]
<drocsid> I created ruby rvm generated wrappers to start cron jobs. Something happened. Now I'm unable to create them. I'm getting Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.2.1/bin' is not at first place....
ixti has joined #ruby
ixti has quit [Client Quit]
<drocsid> I checked my path, I see /usr/local/rvm/gems/ruby-2.2.1/bin is the second entry. Why does it have to be the first? I also tried the rvm get stable --auto-dotfiles reccomendation
northfurr has joined #ruby
astrofog has joined #ruby
Insti has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
<pipework> shevy: wakka wakka, nanu nanu.
<pipework> shazbot?
Log1x has joined #ruby
bb010g has joined #ruby
B1n4r10 has joined #ruby
last_staff has quit [Remote host closed the connection]
bahar has joined #ruby
bahar has joined #ruby
<drocsid> really why does /usr/local/rvm/gems/ruby-2.2.1/bin have to be the first PATH entry...
<pipework> drocsid: local-first
<pipework> You installed as system, right?
atomical_ has quit [Ping timeout: 272 seconds]
firstdayonthejob has quit [Ping timeout: 245 seconds]
bkxd has joined #ruby
ixti has joined #ruby
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chadwtaylor has quit [Ping timeout: 276 seconds]
aegis3121 has quit [Ping timeout: 265 seconds]
cschneid_ has quit [Remote host closed the connection]
binaryplease has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
troulouliou_dev has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 255 seconds]
xet7 has joined #ruby
atomical_ has joined #ruby
pawnbox has joined #ruby