<zenspider>
chovy: that's all fine. and it doesn't show your problem
<zenspider>
so again, flunked mindreading 101
shevy has quit [Ping timeout: 252 seconds]
iMe has quit [Ping timeout: 256 seconds]
chu has quit [Read error: Connection reset by peer]
amclain has joined #ruby
chu_ has joined #ruby
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
krisquigley has joined #ruby
niko has joined #ruby
iMe has joined #ruby
doodmtl has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bim has quit [Remote host closed the connection]
livingstn has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
livingstn has quit [Max SendQ exceeded]
lele is now known as Guest31
<zenspider>
chovy: I don't have time to wait 30 minutes for this. you're on your own.
livingstn has joined #ruby
willharrison has joined #ruby
riotjones has joined #ruby
jespada has joined #ruby
jonr22 has joined #ruby
avarice has joined #ruby
JaTochNietDan has quit [Ping timeout: 252 seconds]
tubuliferous has joined #ruby
<chovy>
zenspider: geez man. how can i say it any easier? how do I access a property like 'email'?
<chovy>
i have no idea what that blob is it spit out
delianides has quit [Remote host closed the connection]
<havenwood>
chovy: Despite protestations to the contrary zenspider has already read your mind and saw you doing `r.admin_contacts email` instead of the intended `r.admin_contacts.email`. I mean, ahem, nobody can read minds--nothing to see here folk.
argoneus has quit [Ping timeout: 252 seconds]
Cache_Money has quit [Quit: Cache_Money]
Trynemjoel has quit [Ping timeout: 256 seconds]
rbennacer has joined #ruby
<zenspider>
chovy: I can't help you if you aren't going to listen
Diabolik has quit [Ping timeout: 272 seconds]
<chovy>
zenspider: its ok if you don't know, but you don't need to be a dick about it
argoneus has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
<zenspider>
that's fresh... bullshit.
Diabolik has joined #ruby
<chovy>
havenwood: he didn't see anything
doritostains has quit [Ping timeout: 256 seconds]
<chovy>
i wasn't doing r.admin_contacts email
<havenwood>
chovy: What code did you run to get the error. The exact line of code.
zerowaitstate has joined #ruby
JaTochNietDan has joined #ruby
fryguy9 has quit [Quit: Leaving.]
Trynemjoel has joined #ruby
<zenspider>
how can I say it any easier? show us ACTUAL code and the output. if you can't supply such a simple request, why should we bother guessing?
jespada has quit [Ping timeout: 265 seconds]
avarice has quit [Client Quit]
<zenspider>
the fact that you pasted `main' above says you're not doing what you say you're doing
<eat_multi>
yope, seems r.admin_contacts returns an array
<havenwood>
chovy: If you're on a Ruby newer than 1.8 drop the: require 'rubygems'
shevy has quit [Ping timeout: 252 seconds]
<zenspider>
chovy: because you were being difficult and I called you on it and instead of owning up to it you got defensive and became a price.
<zenspider>
prick
<baweaver>
chovy: you are being a bit of an asshat
<chovy>
zenspider: haha.
<chovy>
sure sure.
<zenspider>
I said I didn't have time to wait after 8 minutes.
<baweaver>
anyways, mute list time. Bye
<chovy>
i ask a question, you guys want clarification, i give it to you. and the whole time you guys are dicks about it. why even hangout in a help channel if that's how you're going to be?
<zenspider>
what'd you do? did you supply the code? no, you acted like a prick.
<zenspider>
the truth continues. too bad you can't se it. have fun with that.
<zenspider>
see. ugh. my pinkies are cold.
it0a has joined #ruby
<baweaver>
zenspider: just mute him and move on. Not worth the time.
duncannz has quit [Max SendQ exceeded]
<chovy>
no wonder ruby is dying if this is how it goes
duncannz has joined #ruby
<zenspider>
baweaver: I'm hungry. I want to be right because I wasted food time on this jackass. I'm long past being effective since we know he has reading comprehension problems.
patrick99e99 has quit [Read error: Connection reset by peer]
<baweaver>
Leave it be
Hijiri has joined #ruby
duncannz has quit [Max SendQ exceeded]
ajsdklfjalksdf has joined #ruby
<zenspider>
yeah. I'm done.
acl_ has quit [Ping timeout: 255 seconds]
isxek has joined #ruby
<baweaver>
Have a good night mate, take it easy
duncannz has joined #ruby
doritostains has joined #ruby
<baweaver>
I've muted him anyways, works well enough for me.
<zenspider>
steaaaaaak
bronson has quit [Remote host closed the connection]
<baweaver>
I'm calling it a night too.
<baweaver>
Cheers
<zenspider>
ooh... steak and bacon. I'm light on calories today
<zenspider>
later man
rbennacer has quit [Remote host closed the connection]
lessless has joined #ruby
MatthewsFace has joined #ruby
jenrzzz_ has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
chovy: It really helps cut to the chase to show the actual code along with the resulting error. It's nice to name the Gist files with appropriate extensions so they syntax highlight and for people who fork them to try locally.
patrick99e99 has joined #ruby
<havenwood>
chovy: Adding another file to a Gist so you have one that runs and the error in a separate file is nice.
<chovy>
havenwood: yeah. i get that. i didn't show the complete code, he asked for it, i reposted. don't know what the big deal is.
<chovy>
he immediately went to insults
rbennacer has joined #ruby
millerti has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
<havenwood>
chovy: Are you stuck on 1.8 or are you on a more recent Ruby?
Virtual_ has joined #ruby
<chovy>
havenwood: 2.0.0p481
<chovy>
i removed the rubygems. thanks
<chovy>
its been a few years since i did any ruby. forgot most of it
baweaver has joined #ruby
<eat_multi>
r.admin_contacts showed up just like in the gist for me when I ran the snippet, despite it containing an array of structs containing those key/value pairs, kind of weird
<chovy>
eat_multi: yeah. its an array. i thought it was an object
<chovy>
looping through it works fine.
Hijiri has quit [Quit: WeeChat 1.0.1]
<havenwood>
chovy: When debugging using #p instead of #puts can be really helpful.
<chovy>
kk
<eat_multi>
ohhhh, it's puts's fault :3
<chovy>
haha
<eat_multi>
I just realized
<havenwood>
chovy: Check the difference between say `puts [1, 2]` and `p [1, 2]`.
<chovy>
havenwood: yah. that is more intuitive. i would have seen it was an array
<jhass>
the entire run method seems redundant, I'd just make that toplevel code and also move the constants into that file
<jhass>
or rather require the settings file there instead of irc.rb
nonks has joined #ruby
jonr22 has quit [Remote host closed the connection]
<Virtual_>
what do you mean by toplevel
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nonks has quit [Client Quit]
Lewix has joined #ruby
nonks has joined #ruby
<jhass>
the toplevel is the code outside any module, class or method
<jhass>
in Roobybot#initialize, @time is never reused, so don't make it an instance variable
<Virtual_>
ahh I see
<jhass>
in fact I'd skip the variable altogether, just Time.now.month directly
jaequery has quit [Client Quit]
nonks has quit [Client Quit]
<jhass>
probably the same for @ssl
nonks has joined #ruby
nonks has quit [Client Quit]
<jhass>
it's unused currently not sure about your future plans
hcnewsom has quit [Quit: hcnewsom]
<Virtual_>
yeah it's unused atm I should have commented it out
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
@s is just not worth the savings, you sacrifice them in clarity, name it @socket
milesmatthias has joined #ruby
jasonwebster has joined #ruby
nonks has joined #ruby
<eat_multi>
it looks cool, I'd just say don't abbreviate var names too much, especially if you do it inconsistently
bim has joined #ruby
krz has joined #ruby
<eat_multi>
you have methods: #on_joinchn and #joinchan
<jhass>
Virtual_: code should be indented into begin/end blocks
djbkd has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
threh has joined #ruby
<jhass>
you can write hostname, command, channel = message.split (and I'll skip going into that it's rather lacking in correctly parsing an IRC message)
<Virtual_>
I did try that originally but I couldn't get it to work right for some reason
<jhass>
hostname, command, channel, *message = message.split actually and then message = message.join
cjim has joined #ruby
alphaatom has quit [Ping timeout: 255 seconds]
albert_ has joined #ruby
<threh>
anyone know what the use-cases for rubinius are, exactly?
duncannz has quit [Ping timeout: 256 seconds]
<eat_multi>
yeh, I second the correctly parsing irc messages thing, the two things (non-stylistically) that jumped out at me were that rescue Exception and the treatment of IRC message format
<jhass>
Virtual_: don't rescue Exception, rescue specific exceptions, RuntimeError as the most general one (which is also the default if you specify none), don't go higher, you break stuff
triangles2 has joined #ruby
Beoran has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<jhass>
Virtual_: Ruby community standard is also to use snake_case for variable names, so argOne -> arg_one or better first_argument
Joufflu has joined #ruby
beef-wellington has joined #ruby
<jhass>
Virtual_: until condition do -> until condition, the do is not needed and uncommon
triangles has quit [Ping timeout: 255 seconds]
B1n4r10 has joined #ruby
<Virtual_>
alright
Limix has joined #ruby
iMe has quit [Ping timeout: 264 seconds]
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Virtual_>
i've made notes so I don't forget something when I come to fix it up tomorrow
<jhass>
the channel is also logged, see /topic ;)
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
digitalextremist has joined #ruby
paradoja has quit [Ping timeout: 252 seconds]
<Virtual_>
cool well I bookmarked that too
iMe has joined #ruby
zerowaitstate has quit [Ping timeout: 246 seconds]
<Virtual_>
thanks for helping me out
<jhass>
you're welcome
<Virtual_>
I'm not an amazing programmer and I knew I must have messed up somewhere
<mozzarella>
threh: same use cases as mri, plus also when you want real multithreading with no global lock
SouL has quit [Ping timeout: 252 seconds]
ajsdklfjalksdf has joined #ruby
<jhass>
Virtual_: it's fine, we all start somewhere
ajsdklfjalksdf has quit [Client Quit]
<Virtual_>
I started with python you see and didn't like it much but there is just something I like about Ruby more
beef-wellington has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby
<jhass>
anybody who claims their first stuff looked any better is lying either just to you or also to themselves too
<eat_multi>
Virtual_: enjoy making roobybot, hope to see it plague this channel some time
<eat_multi>
or is that bad advice...
<jhass>
eh, yeah
<eat_multi>
sorry
<Virtual_>
I usualyl test it out on my own dead channel on rizon not to annoy others haha
<jhass>
adding bots to 800+ user channels without op approval is not a good idea ;)
<eat_multi>
but the enjoy making it part isn't
<jhass>
Virtual_: sure, I do the same
<eat_multi>
oh that's responsible, fair
senayar has joined #ruby
jasonwebster has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<threh>
mozzarella, thanks
shadoi1 has quit [Quit: Leaving.]
<jhass>
Virtual_: btw if you get tired of the idiosyncrasies of IRC and want to focus on some awesome commands instead, check https://github.com/cinchrb/cinch
serivichi has quit [Ping timeout: 252 seconds]
<jhass>
if you have fun dealing with them I won't stop you though ;)
<eat_multi>
summer looks cool too (for source code reading especially)
<helpa>
Hi rubie. 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!
blazes816 has quit [Ping timeout: 252 seconds]
tiago has quit [Ping timeout: 246 seconds]
tiago_ is now known as tiago
echevemaster has quit [Ping timeout: 264 seconds]
crueber has joined #ruby
elfuego has quit [Quit: elfuego]
RegulationD has quit [Ping timeout: 246 seconds]
jcdesimp has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
deric_skibotn has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
x1337807x has joined #ruby
duncannz has quit [Ping timeout: 255 seconds]
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
pwnz0r has quit [Remote host closed the connection]
wallerdev has joined #ruby
sevvie has quit [Ping timeout: 250 seconds]
<rubie>
hi all: im trying to learn recursion, this problem uses recursion to find all the ways to make change of a certain amount. There is a return on line 9 that I have a question about. There is a recursive call on line 22 in an each block, then a return call outside the each block. I think what happens is when that return is called it brings the parser back into the each block to go the the next element in the array, but I"m not sure. Here
maletor has quit [Quit: Computer has gone to sleep.]
towski_ has quit [Remote host closed the connection]
yuung has quit [Ping timeout: 252 seconds]
dc_ has quit [Read error: Connection reset by peer]
pwnz0r has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
crueber has quit [Quit: Leaving.]
dc has joined #ruby
mjuszczak has quit []
astrobunny has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
amystephen has quit [Quit: amystephen]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
Sawbones has joined #ruby
bigmac_ has quit [Read error: No route to host]
dc has quit [Ping timeout: 264 seconds]
duncannz has quit [Max SendQ exceeded]
bigmac_ has joined #ruby
ponga has joined #ruby
iamjarvo has joined #ruby
User458764 has joined #ruby
rajeshchawla has quit [Remote host closed the connection]
<eam>
rubie: the return returns from the current change() method
rajeshchawla has joined #ruby
<rubie>
okay thats what I thought, but wasn't sure
<rubie>
thank you
<eam>
think of each method call as a thing on a stack
<eam>
every method is another item on this stack -- and a return removes an item from the stack
ramfjord has quit [Ping timeout: 252 seconds]
<rubie>
is that how it works?
<rubie>
under the hood?
<eam>
yes
<rubie>
interesting
davedev24_ has quit [Remote host closed the connection]
<eam>
the data structure that handles nested method calls is literally called a "stack"
<rubie>
that is a good way to think about it
Pupeno has joined #ruby
ponga has quit [Ping timeout: 255 seconds]
nahtnam has joined #ruby
Rephiax__ has joined #ruby
DerisiveLogic has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sargas has joined #ruby
Rephiax has quit [Ping timeout: 272 seconds]
chu_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mjuszczak has joined #ruby
mjuszczak has quit [Client Quit]
echevemaster has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
arescorpio has quit [Excess Flood]
OrbitalK_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
revoohc has quit [Ping timeout: 246 seconds]
rajeshchawla has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 252 seconds]
Nuck has joined #ruby
rorra has quit [Quit: rorra]
Hirzu has joined #ruby
bricker has joined #ruby
commmmodo has quit [Quit: commmmodo]
adriancb has quit [Remote host closed the connection]
dc has joined #ruby
nonks has joined #ruby
Sawbones has quit []
nii2361 has quit [Ping timeout: 272 seconds]
delianides has quit [Remote host closed the connection]
braincrash has joined #ruby
bricker has quit [Ping timeout: 256 seconds]
Hirzu has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
aarwine has joined #ruby
chinmay_dd has joined #ruby
<aarwine>
is there anything I can do to better understand why I'm spending so much time in Gem::StubSpecification#name ?
yuung has joined #ruby
<yuung>
what's the difference betweeen a = { b: 'c' } and a = { :b => 'c' }?
<sevenseacat>
nothing.
<sevenseacat>
the former won't work in ruby 1.8 though
<aarwine>
is the first valid? b should be defined
it0a has quit [Ping timeout: 256 seconds]
<yuung>
aarwine, first works; it seems to just conver to the second though
<yuung>
sevenseacat, ty
<aarwine>
interesting, I thought you'd need a : to signify a symbol or '' for str
<aarwine>
cool
tubuliferous has quit [Ping timeout: 264 seconds]
<mozzarella>
: means symbol
oo_ has joined #ruby
chinmay_dd has quit [Read error: Connection reset by peer]
<sevenseacat>
when do we get to stop putting 1.8 caveat warnings on things
<aarwine>
mozzarella: right, but in this example `a = { b: 'c' }` the : used is to seperate key from value; the : in the second example was for a symbol `a = {:b=>"c"}`
<aarwine>
but for some reason, ruby knows b is a symbol in the first
<mozzarella>
it's a shortcut that only works with symbols
<mozzarella>
hence why it's using ':'
<aarwine>
I don't like it because it's ambiguous, I don't know if b is a symbol or if b = "hidden string"
<aarwine>
but, it's good to know
jefus has quit [Ping timeout: 265 seconds]
<aarwine>
maybe it will be useful in some underhanded ruby contest :o
ismaelga has quit [Remote host closed the connection]
willharrison has joined #ruby
oo_ has quit [Ping timeout: 252 seconds]
<sevenseacat>
b cannot be a string in {b: c}
<aarwine>
h
<aarwine>
oh
nonks has quit [Ping timeout: 252 seconds]
<aarwine>
wow, you're right
Brando753 has quit [Ping timeout: 265 seconds]
rhg135 is now known as RowdyHeavingGuy
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RowdyHeavingGuy is now known as rhg135
rajeshchawla has joined #ruby
akkad has quit [Ping timeout: 252 seconds]
connor_goodwolf has quit [Ping timeout: 246 seconds]
nonks has joined #ruby
xenokiller has quit [Ping timeout: 265 seconds]
Hirzu has joined #ruby
Brando753 has joined #ruby
connor_goodwolf has joined #ruby
jcdesimp has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
agrinb_ has quit [Remote host closed the connection]
maletor has joined #ruby
nii2361 has joined #ruby
yuung has quit [Quit: Leaving]
akkad has joined #ruby
michael_mbp has quit [Excess Flood]
enali has joined #ruby
michael_mbp has joined #ruby
umby24 has joined #ruby
djbkd has joined #ruby
<enali>
self[0] == (c=self[0,1].upcase[0])
lessless has quit [Ping timeout: 246 seconds]
<enali>
I don't know the necessary of "self[0,1].upcase[0]"
chinmay_dd has joined #ruby
juanpablo_ has joined #ruby
<enali>
why not just "self[0].upcase"
autojack has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat>
because that wont change the value of self
<sevenseacat>
oh i misread
<enali>
I'm reading the <Ruby Cookbook 2th>, chapter2, Changing the case of a string
vdamewood has joined #ruby
<enali>
'self' is string, here
jespada has joined #ruby
<autojack>
I have Ruby 2.0.0 on a MacOS 10.9 laptop. I've been trying to get a simple Tk app to work, but when I run it it just hangs and displays nothing on screen. I tried a very simple test app too - same thing. anyone know what I might be doing wrong? I've written a lot of Ruby but never used Tk.
<autojack>
is it possible the MacOS Ruby doesn't have Tk support?
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<enali>
"self[0].upcase!" will change itself, but "self[0].upcase" not
<autojack>
I would think it would give an obvious error if so.
<vdamewood>
autojack: It might not be relivent, but OS X does include wish.
zorak8 has joined #ruby
oo_ has joined #ruby
<enali>
sevenseacat: ???
<autojack>
vdamewood: hmm.
juanpablo_ has quit [Ping timeout: 272 seconds]
<autojack>
if I ctrl-c after running the code, it exits in /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tk.rb:1866:in `mainloop': Interrupt
<autojack>
so it seems pretty clear it's loading the Ruby tk.
<autojack>
I can try to build a Ruby in rbenv with Tk support explicit.
jespada has quit [Ping timeout: 272 seconds]
<vdamewood>
that might help. Trying to do a hello with wish might help eliminate Tk itself as the problem.
tgunr has quit [Ping timeout: 245 seconds]
<vdamewood>
err do a hello-world app
iMe has quit [Ping timeout: 250 seconds]
Rephiax__ has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
rrichardsr3 has joined #ruby
<autojack>
ok, that seems to result in the same. it just hangs.
<autojack>
so that's interesting.
cjim has quit [Quit: (null)]
<vdamewood>
I'm surprised.
<autojack>
the only other thing that might be of interest is, I installed ActiveTCL.
SOLDIERz______ has joined #ruby
reinaldob has joined #ruby
<vdamewood>
gist some test cases?
iMe has joined #ruby
<vdamewood>
autojack: hmm... what do you get if you run which tcl wish?
<vdamewood>
err tcsh not tcl
<autojack>
/bin/tcsh
<autojack>
/usr/bin/wish
Hirzu has quit [Remote host closed the connection]
shevy has joined #ruby
tgunr has joined #ruby
Hirzu has joined #ruby
<vdamewood>
err, oops. tclsh
krisquigley has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<autojack>
so when I run wish on that, I get nothing.
<vdamewood>
autojack: That example is wrong. If you use Tk, you use wish, not tclsh.
nonnatus has joined #ruby
<vdamewood>
Oh... nevermind then.
ninedragon has quit [Quit: Quit, BBL :D]
Rephiax has joined #ruby
<autojack>
yeah, I did wish foo.tcl.
Sgeo has quit [Remote host closed the connection]
reinaldob has quit [Ping timeout: 250 seconds]
<vdamewood>
I got a bouncing wish icon in my doc, and a window popped up.
<vdamewood>
err dock
<autojack>
weird.
a5i has quit [Quit: Connection closed for inactivity]
<autojack>
oh!
<autojack>
my dock auto hides.
<autojack>
now I see, it's there.
ev_ has joined #ruby
<autojack>
I'm surprised the window didn't appear on top of my other windoes.
<autojack>
*windows
x1337807x has quit [Remote host closed the connection]
Hirzu has quit [Ping timeout: 246 seconds]
<autojack>
aha, the hello world works too.
<autojack>
this is making me feel stupid.
krisquigley has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
<vdamewood>
Let me guess, the postage stamp of a window appeared, but it wasn't quite obvious *where* at first?
milesmatthias has quit [Remote host closed the connection]
<autojack>
not even. it didn't become the top window.
<autojack>
I'm only on a 15" laptop screen.
<vdamewood>
Same here.
<autojack>
weird. it appears top left, but underneath my terminal window.
<vdamewood>
Though, in my case, the window got placed in some 'empty' space.
milesmatthias has joined #ruby
eat_multi has quit [Quit: leaving]
<autojack>
if I just move iterm to the right and run it again, I can see it even though it doesn't have focus. strange that it appears between iterm and the Chrome window behind it.
<autojack>
sheesh.
<autojack>
ok I think my real app code works too.
<autojack>
thanks!
<autojack>
and sorry for all the scroll :)
ramfjord has joined #ruby
riotjones has joined #ruby
<vdamewood>
I'm surprised I was helpful.
Channel6 has quit [Quit: Leaving]
<autojack>
heh
<autojack>
sometimes it's the simplest things.
enali has quit [Ping timeout: 246 seconds]
cjim has joined #ruby
<autojack>
8 years of programming experience, this is a new one on me.
Sgeo has joined #ruby
ev_ has quit [Ping timeout: 264 seconds]
milesmatthias has quit [Ping timeout: 255 seconds]
<vdamewood>
Well, I might have fallen for it too if my open PDF had been 2cm to the left.
sngeth has joined #ruby
pontiki has quit [Ping timeout: 272 seconds]
iamninja has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 250 seconds]
iamninja has joined #ruby
SOLDIERz______ has quit [Quit: Be back later ...]
jaequery has joined #ruby
triangles has joined #ruby
Apocalypse has quit [Ping timeout: 272 seconds]
sngeth has quit [Ping timeout: 252 seconds]
Pharaoh2 has joined #ruby
chinmay_dd has quit [Quit: Leaving]
triangles2 has quit [Ping timeout: 272 seconds]
tubuliferous has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Apocalypse has joined #ruby
Apocalypse has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
kappy has quit [Ping timeout: 244 seconds]
djbkd has quit []
kappy has joined #ruby
tvon has joined #ruby
jefus has joined #ruby
tvon has quit [Client Quit]
agrinb has joined #ruby
RegulationD has joined #ruby
olivier_bK has joined #ruby
umby24 is now known as umby24|offline
jenrzzz has quit [Ping timeout: 244 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
govg has quit [Quit: leaving]
agrinb has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 265 seconds]
hvxgr has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
cjim has quit [Quit: (null)]
jespada has joined #ruby
nonks has quit [Read error: Connection reset by peer]
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
autojack has left #ruby [#ruby]
Hijiri has joined #ruby
ponga has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
rajeshchawla has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
nonks has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
tubuliferous has quit [Ping timeout: 264 seconds]
jespada has quit [Ping timeout: 245 seconds]
iMe has quit [Ping timeout: 246 seconds]
ponga has quit [Ping timeout: 252 seconds]
bboss has joined #ruby
cjim has joined #ruby
iMe has joined #ruby
DavidDudson has joined #ruby
phutchins has quit [Ping timeout: 250 seconds]
amclain has quit [Quit: Leaving]
jasonwebster has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
I'll then contact flughafen for the official things...
isxek has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
<shevy>
that just cracks me up
<shevy>
that reads like: "I'll then contact airport for the official things..."
Mon_Ouie has quit [Ping timeout: 272 seconds]
<sevenseacat>
arup_r: you need to go through air traffic control
last_staff has joined #ruby
tubuliferous has quit [Ping timeout: 245 seconds]
<arup_r>
I meant Govt. official things.. for land...
nii2361 has quit [Ping timeout: 264 seconds]
arup_r_ has joined #ruby
apeiros_ has joined #ruby
Pharaoh2 has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
krz has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<sevenseacat>
i think he missed my joke.
<sevenseacat>
granted it wasnt very funny
<shevy>
sometimes you are too subtle!
enali has quit [Ping timeout: 246 seconds]
craigp has joined #ruby
giuseppesolinas has joined #ruby
sigurding has quit [Quit: sigurding]
arup_r_ has quit [Ping timeout: 245 seconds]
<flughafen>
arup_r_: your flight is still on time
<sevenseacat>
lol
Xoro__ has joined #ruby
giuseppesolinas has quit [Client Quit]
jonr22 has joined #ruby
sigurding has joined #ruby
Rarikon has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
giuseppesolinas has joined #ruby
mengu has joined #ruby
sandelius has joined #ruby
bal has quit [Quit: bal]
jonr22 has quit [Ping timeout: 250 seconds]
b00^wk has joined #ruby
<b00^wk>
hello
<SebastianThorn>
b00^wk: hello
<b00^wk>
can i have two versions of a gem installed?
<sandelius>
Good morning my fellow Rubyists
bal has joined #ruby
<sandelius>
b00^wk using bundler yes
<certainty>
b00^wk: yes
<b00^wk>
i know nothing about Ruby to be honest, but i'm struggling with an install
<b00^wk>
i need ffi-1.96, but i have ffi-1.9.8
<b00^wk>
and i would like to get ffi-1.9.6 somehow, and make it co-exist
Wolland has quit [Ping timeout: 244 seconds]
<sandelius>
b00^wk gem uninstall ffi
<sandelius>
gem install ffi -v 1.9.6
<b00^wk>
ok, trying
<sandelius>
ahh co-exist
<certainty>
xD
phutchins has joined #ruby
<sandelius>
b00^wk then don't uninstall it
<b00^wk>
already did
<certainty>
lol
<b00^wk>
actually, i prob don't care
<sandelius>
Use either bundler or e.g RVM
<b00^wk>
let me first see if that helps
<b00^wk>
ERROR: Could not find a valid gem 'ffi-1.9.6' (>= 0) in any repository
<b00^wk>
neeeeeeeeeeeeeeeei
<b00^wk>
please help
<sandelius>
certainty you sneaky bastard :)
<b00^wk>
i really want it
<flughafen>
holy cow. relax dude.
<flughafen>
this isn't #python, hahaha
<sevenseacat>
1.9.6 does exist
<certainty>
imagines the same situation with something different. A: "Pull that cable!" B: "Ok" A: "Wait don't!!!!" B: "Already did -.-" .... earth melts
<b00^wk>
certainty, :)
<sandelius>
certainty haha :)
Wolland has joined #ruby
Wolland has quit [Client Quit]
Pupeno has quit [Remote host closed the connection]
<b00^wk>
i want that ffi .... sandelius are you going to help ?
agrinb has joined #ruby
sigurding has quit [Quit: sigurding]
Pupeno has joined #ruby
<sandelius>
b00^wk relax dude, I'm working as well :) Create a file called Gemfile in the root of your project
<sandelius>
then run gem install bundler
<b00^wk>
err, hold on
<b00^wk>
sandelius, ok, i m not quite with you, but here is what I'm doing :
<certainty>
but it can be normal for your distro (still unexpected)
<sevenseacat>
normal enough
<sevenseacat>
because system rubies are stupud
<sevenseacat>
stupid
wicope has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
<R1ck>
it seems.. my ruby install is all sorts of messed up
<certainty>
stupud sounds like a spell you can learn in hogwarts
<sevenseacat>
its possible.
<R1ck>
whats the best way to get ruby 2.2.0? apt-get remove -f ruby and install manually?
<sevenseacat>
use something like ruby-install
<sevenseacat>
and delete everything system ruby
<R1ck>
thanks.
olivier_bK has quit [Ping timeout: 272 seconds]
iterator_ has joined #ruby
<certainty>
system ruby is a ruby for systems programming?
CorySimmons has quit [Quit: Bye!]
<R1ck>
i'm actually trying to run https://github.com/rvdh/lamernews in unicorn, but "bundle exec rake assets:precompile" results in "rake aborted! LoadError: cannot load such file -- rspec/core"
<R1ck>
which I dont understand because the rspec gem is installed
<shevy>
certainty it's the bad boy at the /usr prefix
<shevy>
R1ck debian changes things
<b00^wk>
this sucks nuts
<shevy>
I compiled ruby from source into /usr prefix and don't have a problem
<shevy>
R1ck first study the output of "gem env"
rkgudboy has quit [Ping timeout: 246 seconds]
iteratorP has quit [Ping timeout: 252 seconds]
<b00^wk>
sandelius, thanks for your attempt to help,
<shevy>
then go into the gem directory and verify which gems are installed; on my system cd /usr/lib/ruby/site_ruby/2.2.0/
<b00^wk>
now i'm gonna troll at redmine
<shevy>
I have these rspec gems: rspec-3.1.0.gem rspec-core-3.1.6.gem rspec-expectations-3.1.2.gem rspec-mocks-3.1.3.gem rspec-support-3.1.2.gem
<sevenseacat>
'sucks nuts' is such a wonderfully descriptive term.
<R1ck>
shevy: thanks, gonna try to reproduce it here locally first (this issue comes up in a docker image)
<R1ck>
the original repo references ruby 1.9.3 too, so gonna try to install that first
<shay->
hi, I am new to ruby and want to use log4r in some classes. I think it is a good idea to have a file logging.rb where the log4r logger gets configured. And then include the module in each class which want to use the logger. is there a guide for that? or what is best practise?
<jlebrech>
like ^foo
strixd has quit [Quit: 500]
<apeiros_>
jlebrech: you must misremember. all strings in ruby have delimiters on both ends
<workmad3>
jlebrech: there's a way to write individual characters with just a prefix... not whole strings
<jlebrech>
when the string is a single woth
<apeiros_>
there are symbols, which look like :foo
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Musashi007>
can i ask what a db extension is in here?
lele is now known as Guest24
<shevy>
ruby_extension "test_ruby",
<shevy>
why the , ?
a5i has joined #ruby
<shevy>
Musashi007 an extension for a database? :)
<shevy>
I'd assume that things stored in a .sql can be put into the interactive psql console
<jhass>
shevy: because it's a macro and the whole class is passed as an argument to it :P
<shevy>
or you can somehow load that
<jhass>
Musashi007: more context
<Musashi007>
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
<jhass>
Musashi007: that's a postgresql thing
lkba has joined #ruby
<Musashi007>
it’s in that file I was refering to earlier which ap[epars to set up all the tables
<workmad3>
Musashi007: in postgres, an extension is a way of introducing new types and features into the database... things like uuid generation inside postgres or the entire postgis package for turning pg into a geographically aware db are released as pg extensions
ankit has joined #ruby
SOLDIERz________ has quit [Quit: Be back later ...]
<ankit>
anyone is participating in gsoc
<Musashi007>
wow thank you
sandelius has joined #ruby
<workmad3>
Musashi007: extensions are also installed into the pg server and then activated on a database-by-database case, hence that line in your tables.sql (which, iirc, is for pulling in a stored procedure language)
Guest24 is now known as lele
<ankit>
anyone participating in gsoc?
bim has quit [Ping timeout: 256 seconds]
craigp has joined #ruby
anaeem1 has quit [Quit: Leaving...]
marr has quit [Ping timeout: 265 seconds]
anaeem1_ has joined #ruby
<Musashi007>
so the fact that it’s creating an extension if it doesn’t exist means that the db program will then install that particular extension?
Pupeno has joined #ruby
<jhass>
mmh, it's more like marking it at active for the current database, but yeah
<workmad3>
if the pg server is aware of the extension, it'll install it into that database
<Musashi007>
wait - so, this means I can just take this file and load it into postgresql server?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<workmad3>
the 'CREATE' is a bit of a misnomer there
<jhass>
Musashi007: likely
<jhass>
psql db_name < tables.sql
<Musashi007>
hoooly shit
phutchins has joined #ruby
<Musashi007>
is it alright for me to be asking db questions here?
<jhass>
are you kicked from the channel? ;)
RegulationD has joined #ruby
<jhass>
we're good in telling people elsewhere, no worries
<jhass>
*to go elsewhere I mean
rsavage has joined #ruby
<Musashi007>
ha
<Musashi007>
ok thanks
<jhass>
so, how do I get a list of all gems?
snath has quit [Ping timeout: 264 seconds]
Pupeno has quit [Remote host closed the connection]
<workmad3>
jhass: there's an API call on rubygems that should get that... they introduced it so that bundler could work a bit quicker :)
jimms has joined #ruby
coderhs has joined #ruby
<jhass>
good thing that rubygems.org has a link to the API docs right on the front page... or rather it would be nice if
timonv has joined #ruby
<undeadaedra>
go rubydoc.info
RegulationD has quit [Ping timeout: 245 seconds]
rkgudboy has joined #ruby
jimms has quit [Remote host closed the connection]
<jhass>
not that kind of API :)
phutchins has quit [Ping timeout: 250 seconds]
<undeadaedra>
oh
<jhass>
workmad3: don't see the endpoint in the API docs :/
leafybasil has joined #ruby
sngeth has joined #ruby
fgo has joined #ruby
zeeraw has joined #ruby
rodfersou has joined #ruby
nii2361 has joined #ruby
<workmad3>
jhass: oh drats... they introduced an API for bundler wher bundler could throw a list of gem names and get back a list of dependencies... sorry
<workmad3>
jhass: my bad, mis-remembered what they did
<jhass>
yeah
vtunka has quit [Quit: Leaving]
<jhass>
there must be some way to get a list of of them though :/
<jhass>
basically what bundler used previously
sngeth has quit [Ping timeout: 264 seconds]
rohitkashyap has joined #ruby
kedare has quit [Quit: WeeChat 1.0.1]
<shevy>
cool
<shevy>
workmad3 so bundler helped evolve rubygems
<workmad3>
jhass: also what gem list -r does
lanemeyer has quit [Ping timeout: 245 seconds]
<jhass>
yeah
<jhass>
mitmproxy time I guess
hcnewsom has joined #ruby
CorySimmons has quit [Quit: Bye!]
<shevy>
when you guys find a bug in one of your projects, when it is somewhat large... do you sometimes feel that it may be better to rewrite the whole thing?
<shevy>
rather than just fix that one little bug
<jhass>
if I still call it bug, probably not
<undeadaedra>
it depends of the kind of the problem
umby24|offline is now known as umby24
<undeadaedra>
if it’s a conception flaw, maybe
vadviktor has quit [Remote host closed the connection]
<jhass>
what you describe I use the term "design issue" for, I think
vadviktor has joined #ruby
rkgudboy has quit [Ping timeout: 246 seconds]
withnale_ has joined #ruby
<withnale_>
Hello.
<Musashi007>
hello
delianides has joined #ruby
<Musashi007>
does anyone know the command to end a postgresql statement? I recall there being some specific way to end them but can’t remember what it is
amystephen has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa>
;
<R1ck>
so unicorn is an application server for ruby apps.. how would I run the ruby app on the commandline, just for debugging purposes?
mengu has joined #ruby
<undeadaedra>
R1ck: what kind of app ?
<Musashi007>
@wasamasa thanks
delianides has quit [Remote host closed the connection]
<undeadaedra>
It will start a server and you will be able to access it through your browser
<R1ck>
yes.. that seems to work
User458764 has joined #ruby
<R1ck>
well.. "work" :) it generates the same error I'm trying to fix so thats good :P
<R1ck>
thanks!
oo_ has joined #ruby
<undeadaedra>
yw
<withnale_>
Does anyone know of something like jeweller or 'bundle gem' but using your own template?
chthon has quit [Ping timeout: 264 seconds]
<undeadaedra>
withnale_: cp -R
ankit has quit [Read error: Connection reset by peer]
umby24 is now known as umby24|offline
<withnale_>
a less low rent solution :)
bim has joined #ruby
ankit has joined #ruby
<undeadaedra>
it’s the most flexible though
joonty has quit [Quit: joonty]
martinbmadsen has joined #ruby
joonty has joined #ruby
<R1ck>
yes!
<R1ck>
I fixed my bug \o/
senayar has quit [Remote host closed the connection]
<undeadaedra>
congrats
blackmesa has joined #ruby
seal has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lele is now known as Guest24
kedare has joined #ruby
<jlebrech>
I need to do a group_by and sum columns in SQL (or an array of hashes), it's so complex in ruby, and i've already figured the sql query. I only need sql temporeraly, would you recommend sqlite and sequel for that?
jottr has joined #ruby
oo_ has quit [Remote host closed the connection]
Lewix has joined #ruby
<canton7>
tbh if you've got the sql, there should be some fairly simple corresponding ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
jonr22 has joined #ruby
umby24|offline is now known as umby24
Mia has quit [Read error: Connection reset by peer]
martinbmadsen has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
jgt1 has quit [Ping timeout: 244 seconds]
zeeraw has joined #ruby
<shevy>
undeadaedra I fixed your bugs
elfuego has quit [Quit: elfuego]
<undeadaedra>
you did?
<shevy>
yep
<undeadaedra>
So it should work then.
<shevy>
your french accent got fixed!!!
<undeadaedra>
Ah
<shevy>
there used to be Mon_Ouie here
<shevy>
hmm
<DaniG2k>
does anyone know of a junior/mid-level ruby dev position in London I could apply to by any chance?
<undeadaedra>
I don’t think this is something you can fix like that, shevy :)
<gregf_>
DaniG2k: we did have one but its fill only 3 days back :/
zeeraw has joined #ruby
<gregf_>
s/fill/filled/
zeeraw has quit [Client Quit]
seal has quit [Quit: Ex-Chat]
<gregf_>
well, not dev tbp. devops
oo_ has joined #ruby
<gregf_>
devops can't code properly lol
akky has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<akky>
there?
plashchynski has joined #ruby
<gregf_>
everywhere ;)
agrinb has quit [Ping timeout: 265 seconds]
oo_ has quit [Read error: Connection reset by peer]
lordkryss has joined #ruby
bim has quit [Remote host closed the connection]
delianides has joined #ruby
bronson has quit [Remote host closed the connection]
oo_ has joined #ruby
milesmatthias has joined #ruby
Zai00 has quit [Quit: Zai00]
dblessing has joined #ruby
sigurding has quit [Quit: sigurding]
<akky>
how can i create custom matchers
umby24|offline is now known as umby24
<jhass>
akky: for?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
<akky>
expect(some_function).to be_xxxx
nonks has joined #ruby
<DaniG2k>
gregf_: I'm doing devopsy stuff now
<DaniG2k>
:P
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<DaniG2k>
gregf_: sys-admin & support
<jhass>
akky: the answer is rspec
<jhass>
to my question
lkba_ has joined #ruby
phutchins has joined #ruby
milesmatthias has quit [Ping timeout: 245 seconds]
ankit has quit [Ping timeout: 250 seconds]
bim has joined #ruby
banister has joined #ruby
<workmad3>
akky: it's rare you need to create a new custom matcher of the form be_xxxx... rspec provides a fairly general form where 'expect(something).to be_foobar' is equivalent to 'expect(something.foobar?).to be true'
<machty>
i have a file-importing ruby process that expands to 512MB mem usage and doesn't seem to contract after that. Is that evidence of a leak, or just that a ruby process will expand to its max and not contract after the fact?
schickung has quit [Quit: schickung]
Musashi007 has quit [Quit: Musashi007]
<certainty>
bradland: Event.where(id: list_of_ids).then_the_formatting is probably more efficient
n008f4g_ has quit [Ping timeout: 244 seconds]
<bradland>
certainty: this is code that came to me from an analyst. meant to paste it in to a rake task wherein my task is to clean this mess up.
<certainty>
bradland: ah i see. have fun :)
n008f4g_ has joined #ruby
mjuszczak has joined #ruby
Hirzu has joined #ruby
mjuszczak has quit [Client Quit]
ghostpl_ has joined #ruby
adriancb has joined #ruby
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
anaeem1 has joined #ruby
krz has quit [Ping timeout: 246 seconds]
paradoja has quit [Ping timeout: 256 seconds]
fryguy9 has joined #ruby
jespada has quit [Ping timeout: 246 seconds]
commmmodo has quit [Quit: commmmodo]
nonks has joined #ruby
livathin_ has quit [Read error: Connection reset by peer]
<bradland>
machty: it's important to understand the goals of garbage collection before tuning
<shevy>
drive your car
<shevy>
tune it good
Aswebb__ has joined #ruby
<bradland>
you don't want the ruby GC removing objects from memory that will probably be needed again
<bradland>
in other words, you shouldn't tune the GC to use the minimum amount of memory, you should tune it to use the most efficient amount of memory
n80 has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
werelivinginthef has joined #ruby
dinhani has joined #ruby
AlexRussia has joined #ruby
DEA7TH has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo_ has joined #ruby
j_mcnally has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tier_ has joined #ruby
juanpaucar has joined #ruby
RegulationD has joined #ruby
j_mcnally has quit [Client Quit]
enebo has joined #ruby
j_mcnally has joined #ruby
lkba has joined #ruby
dEPy has joined #ruby
elfuego has joined #ruby
nii2361 has joined #ruby
sepp2k has joined #ruby
tier has quit [Ping timeout: 255 seconds]
JDiPierro has joined #ruby
n008f4g_ has joined #ruby
User458764 has joined #ruby
juanpablo_ has quit [Ping timeout: 272 seconds]
tier_ has quit [Remote host closed the connection]
a346 has joined #ruby
tier has joined #ruby
<machty>
bradland: what does it mean to "probably be needed again"? wouldn't i have a reference to that object somewhere in my code?
nii2361 has quit [Ping timeout: 256 seconds]
<bradland>
machty: that samsaffron.com article is pretty good. i'd recommend reading it.
<bradland>
it talks about what triggers a GC event, and how tuning the GC can result in increased performance, but possibly increased memory usage.
<bradland>
if you're memory constrained in your environment, then you may have to choose different priorities.
schickung has joined #ruby
<machty>
bradland: i am reading it
<machty>
i think what you meant was you don't want ruby _sweeping_ young objects
<machty>
that i get
<machty>
i just thought you were suggesting there was some concept of not wanting to clean up objects you've definitely lost reference to as if they could be re-referenced in the future
imanzarrabian has joined #ruby
mengu has joined #ruby
delianides has quit [Remote host closed the connection]
<machty>
sorry
<bradland>
no, what i'm suggesting is that by setting limits too low, you can cause performance issues
<machty>
you don't want ruby _sweeping_ old objects
<machty>
at least, not in a minor sweep
MXfive has joined #ruby
delianides has joined #ruby
<bradland>
seems like the new GC instrumentation will be useful to you
<machty>
yeah
agrinb has joined #ruby
krisquigley has joined #ruby
Takle has quit [Remote host closed the connection]
delianid_ has joined #ruby
delianides has quit [Read error: Connection reset by peer]
scottstamp has quit [Ping timeout: 245 seconds]
axisys has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
jerematic has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
nucular11 has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
commmmodo has joined #ruby
HOrangeJewce has quit [Quit: Leaving.]
scottstamp has joined #ruby
fryguy91 has joined #ruby
mitchellhenke has joined #ruby
raph_ael has joined #ruby
bruno- has joined #ruby
<raph_ael>
Hi, I manage a ruby mirror, seems that source rsync mirrors do not work anymore
fryguy9 has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
j_mcnally has quit [Ping timeout: 264 seconds]
DerisiveLogic has joined #ruby
ych4k3r has joined #ruby
plashchynski has quit [Quit: plashchynski]
plashchynski has joined #ruby
DeBot has quit [Quit: Crystal]
bruno- has quit [Ping timeout: 252 seconds]
DeBot has joined #ruby
bruno- has joined #ruby
j_mcnally has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
vtunka_ has joined #ruby
flughafen has quit [Quit: WeeChat 1.0]
triangles has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 245 seconds]
vtunka has quit [Ping timeout: 250 seconds]
nii2361 has joined #ruby
bruno- has joined #ruby
triangles3 has quit [Ping timeout: 252 seconds]
aclearman037 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
mjuszczak has joined #ruby
astrobunny has joined #ruby
senayar has joined #ruby
iamjarvo has joined #ruby
milesmatthias has joined #ruby
senayar has quit [Remote host closed the connection]
rikai has joined #ruby
rkgudboy has quit [Ping timeout: 252 seconds]
SOLDIERz________ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 245 seconds]
juanpablo_ has joined #ruby
SOLDIERz________ has joined #ruby
B1n4r10 has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
nii2361 has quit [Ping timeout: 252 seconds]
milesmatthias has quit [Ping timeout: 244 seconds]
commmmodo has quit [Quit: commmmodo]
<Karunamon>
Hiya folks - Just wondering if anyone has any experience invoking Rspec mid-program
roger_rabbit has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
<Karunamon>
i'm writing a virtual machine management tool, and I'm using rspec to check the data provided by the user to create a machine beacuse the syntax is really simple.. problem is I have to jump through some silly hoops to make this process work (writing an external file which loads a couple of gems and contains the object i'm testing). Ideally I could just run rspec mid-program and check the status of the tests afterwards
schickung_ has joined #ruby
Megtastique has joined #ruby
zenith_ has joined #ruby
krz has joined #ruby
banister has joined #ruby
DaniG2k has joined #ruby
schickung has quit [Ping timeout: 246 seconds]
schickung_ is now known as schickung
rajeshchawla has joined #ruby
ramfjord has joined #ruby
bim has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
slap_stick has joined #ruby
Rollabunna has joined #ruby
j_mcnally has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
DeBot has quit [Quit: Crystal]
DeBot has joined #ruby
deol has joined #ruby
jasonwebster has joined #ruby
bim has joined #ruby
SOLDIERz________ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
paradoja has joined #ruby
j_mcnally has joined #ruby
deol has quit [Client Quit]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iMe has quit [Ping timeout: 265 seconds]
j_mcnally has quit [Max SendQ exceeded]
j_mcnally has joined #ruby
jasonwebster has quit [Client Quit]
craigp has quit [Remote host closed the connection]
Takle has joined #ruby
iMe has joined #ruby
jlast has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
mjuszcza_ has joined #ruby
cphrmky has joined #ruby
<Karunamon>
I'm also wondering what the best way to write a function that checks the state of a string against some external tools. I'd like to be able to write 'something'.is_a_foo?, but extending String feels wrong
jerius has quit [Quit: /part]
triangles2 has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
juanpaucar has quit [Remote host closed the connection]
ghostmoth has joined #ruby
mjuszczak has quit [Ping timeout: 246 seconds]
rkgudboy has joined #ruby
iamjarvo has joined #ruby
j_mcnally has quit [Read error: Connection reset by peer]
triangles has quit [Ping timeout: 246 seconds]
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
j_mcnally has joined #ruby
j_mcnally has quit [Max SendQ exceeded]
mjuszcza_ has quit [Ping timeout: 256 seconds]
j_mcnally has joined #ruby
eighthbit has joined #ruby
triangles3 has joined #ruby
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
bim has quit [Remote host closed the connection]
jottr has joined #ruby
rkgudboy has quit [Ping timeout: 256 seconds]
juanpaucar has joined #ruby
juanpaucar has quit [Read error: Connection reset by peer]
bjonnh is now known as openssl
juanpaucar has joined #ruby
openssl is now known as bjonnh
crueber has joined #ruby
User458764 has joined #ruby
mjuszczak has joined #ruby
triangles2 has quit [Ping timeout: 272 seconds]
bim has joined #ruby
sigurding has quit [Quit: sigurding]
bim has quit [Read error: Connection reset by peer]
bim has joined #ruby
mikepack has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
martinbmadsen has joined #ruby
bim has quit [Remote host closed the connection]
jerius has joined #ruby
wm3|away is now known as workmad3
sigurding has joined #ruby
jonr22 has joined #ruby
HOrangeJewce has joined #ruby
willharrison has joined #ruby
HOrangeJewce has quit [Client Quit]
ismaelga has joined #ruby
HOrangeJewce has joined #ruby
mjuszczak has quit []
delianid_ has quit [Remote host closed the connection]
martinbmadsen has quit [Ping timeout: 272 seconds]
aclearman037 has joined #ruby
kblake has joined #ruby
RegulationD has quit []
mjuszczak has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
jonr22 has quit [Ping timeout: 264 seconds]
<jhass>
Karunamon: yeah, avoid core extensions unless they're extremely useful and fit into the domain of the extended object
RegulationD has joined #ruby
hs366 has quit [Remote host closed the connection]
hobodave has joined #ruby
willharrison has quit [Client Quit]
<jhass>
like String#colorize makes sense, String#my_application_has_a_method_name_like_this does not
phprs has joined #ruby
mjuszczak has quit [Client Quit]
nii2361 has joined #ruby
phprs has quit [Client Quit]
delianides has joined #ruby
Aswebb__ has quit [Remote host closed the connection]
<apeiros_>
I tried to use refinements for that kind of stuff
<apeiros_>
but at the moment, I'm quite unhappy about them. they're just way too unflexible. and so out of touch with how ruby works otherwise.
jottr has quit [Ping timeout: 256 seconds]
kblake has quit [Ping timeout: 252 seconds]
bim has joined #ruby
oo_ has joined #ruby
DaniG2k has quit [Quit: leaving]
jottr has joined #ruby
hcnewsom has quit [Quit: hcnewsom]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
triangles3 has quit [Ping timeout: 255 seconds]
triangles2 has joined #ruby
mengu has quit [Remote host closed the connection]
sandelius has quit [Read error: Connection reset by peer]
<workmad3>
jhass: I've found adding String#sanitize to perform HTML whitelist sanitization quite useful in rails projects
mitchellhenke has joined #ruby
<jhass>
yeah, I think that makes sense
<jhass>
since you work with the data of string
mjuszczak has joined #ruby
bim has quit [Remote host closed the connection]
huddy has joined #ruby
nii2361 has quit [Ping timeout: 265 seconds]
sevenseacat has quit [Remote host closed the connection]
<jhass>
opposed to being lazy about MyStore.has_in_store? thing and want to do thing.is_in_store?
<jhass>
with thing being a core class
craigp has joined #ruby
mistermocha has joined #ruby
bim has joined #ruby
j_mcnally has quit [Read error: Connection reset by peer]
<Karunamon>
man I can't wait for libressl to seriously take off :(
<jhass>
"just" DoS, thankfully
brb3 has joined #ruby
<certainty>
jhass: if you have 1.0.2 deployed :)
werelivinginthef has quit [Remote host closed the connection]
<jhass>
of course I have
nii2361 has joined #ruby
mjuszczak has quit []
<certainty>
i was a bit worried about the CVE-2015-0289 and CVE-2015-0292
jottr has quit [Ping timeout: 252 seconds]
bim has quit [Ping timeout: 252 seconds]
deol has joined #ruby
werelivi_ has joined #ruby
alphaatom has quit [Ping timeout: 245 seconds]
RegulationD has quit []
paradoja has quit [Ping timeout: 252 seconds]
dfinninger has joined #ruby
craigp has quit [Remote host closed the connection]
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
<jhass>
DeBot: !hangman ruby
<DeBot>
␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<jhass>
DeBot: #
<DeBot>
␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣#␣␣ [] 0/12
<jhass>
DeBot: :
<DeBot>
␣␣␣␣␣␣␣::␣␣␣␣␣␣#␣␣ [] 0/12
delianides has quit [Remote host closed the connection]
jshultz has joined #ruby
deol has quit [Ping timeout: 246 seconds]
<jhass>
DeBot: aeoui
<DeBot>
O␣e␣␣␣␣::␣i␣e␣␣#␣␣ [au] 2/12
GnuYawk has joined #ruby
craigp has joined #ruby
<plsk>
Debot: v
<Karunamon>
DeBot: Openssl::
<DeBot>
OpenSSL::␣i␣es␣#␣␣ [au] 2/12
hcnewsom has joined #ruby
<certainty>
how fitting
<jhass>
:D
<gregf_>
DeBot: python
<DeBot>
OpenSSL::␣i␣est#␣␣ [auyh] 4/12
jottr has joined #ruby
<Karunamon>
speak of the devl
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass>
DeBot: d
<DeBot>
OpenSSL::Di␣est#␣␣ [auyh] 4/12
<certainty>
DeBot: Digest
<DeBot>
OpenSSL::Digest#␣␣ [auyh] 4/12
arup_r has quit []
chipotle_ has joined #ruby
<jhass>
DeBot: =
<DeBot>
OpenSSL::Digest#␣␣ [auyh=] 5/12
<Karunamon>
DeBot: <<
<Karunamon>
DeBot: []
raph_ael has left #ruby ["pouet"]
<jhass>
uh, right
<jhass>
I might have not whitelisted those xD
<certainty>
:)
<Karunamon>
hehe
<certainty>
it should be << i think
<Karunamon>
If it's not one of those, that method name is awful
<Karunamon>
then again, this is openssl we're talking about
<certainty>
hah
milesmatthias has joined #ruby
tier_ has joined #ruby
<workmad3>
jhass: have you changed the _ character you were using?
chipotle has quit [Ping timeout: 245 seconds]
senayar has joined #ruby
<jhass>
workmad3: yeah
<jhass>
since method names can have _
<certainty>
too bad for shevy
<jhass>
so gems with _ are in now too
<jhass>
I should add - too
<shevy>
lol
<jhass>
Karunamon: it's <<, only two letter method there
maletor has joined #ruby
<jhass>
alias for update
<workmad3>
jhass: ah... it renders weird for me is all :)
rhllor has joined #ruby
<workmad3>
DeBot: <
<certainty>
renders fine for me.
<certainty>
who cares about the crazy britains
willharrison has joined #ruby
<jhass>
workmad3: yeah, all others I considered rendered worse though
<jhass>
if you come across any nice one
maletor has quit [Client Quit]
tier has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
<workmad3>
certainty: more accurately, who cares about the crazy brit using symbola rather than apple's default emoji fonts because he prefers symbola symbols in his utf-8 command prompt? :)
nii2361 has quit [Ping timeout: 250 seconds]
<jhass>
so, =?!<[], anything else in core method names?
<jhass>
oh
<workmad3>
jhass: ()
<jhass>
+-@
arrubin has joined #ruby
bim has joined #ruby
<workmad3>
jhass: and >
<jhass>
right
lyuben_ has quit [Quit: This computer has gone to sleep]
<certainty>
workmad3: not so crazy if you don't use apple's stuff
Channel6 has joined #ruby
<jhass>
what's () though? isn't that a parser rewrite to .call?
milesmatthias has quit [Ping timeout: 252 seconds]
<workmad3>
jhass: ah, scratch ()... for some reason I thought it could be overridden
JDiPierro has quit [Remote host closed the connection]
sivsushruth has joined #ruby
hanmac1 has quit [Quit: Leaving.]
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alphaatom has joined #ruby
mjuszczak has quit [Client Quit]
aimada has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
MXfive has joined #ruby
aclearman037 has joined #ruby
nonks has quit [Ping timeout: 246 seconds]
evident has joined #ruby
Takle has quit [Ping timeout: 246 seconds]
L8 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DeBot has quit [Quit: Crystal]
DeBot has joined #ruby
<evident>
hi everybody... I just wanted to install ruby and ruby on rails on my Mac, but I can only call gem as root... how can I fix that, so that I can run gem, bundle, rake etc as normal user?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tobago has quit [Remote host closed the connection]
<evident>
well the weird thing is: when I run rvm install ruby, it will download and install everything... after that, I can call gem, bundle etc... but when I open a new terminal, I can't anymore
<evident>
which ruby --> /usr/bin/ruby
<undeadaedra>
is rvm correctly setup in your shell ?
<undeadaedra>
yes, this is not normal
<undeadaedra>
it should point to rvm ruby
<workmad3>
evident: 'rvm use <version> --default' to automatically activate an rvm ruby on a new shell
<workmad3>
replace <version> with the version you want as default, obviously :)
JDiPierro has joined #ruby
krisquigley has joined #ruby
<jlebrech>
how do I go through each in an array of hashes and add a vey and value into it?
<helpa>
Hi evident. 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!
willharrison has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
<undeadaedra>
that’s a pretty solid argumentation you have here
<undeadaedra>
you should sum it all in a blog post
andikr has joined #ruby
<colorados>
its well known things
hakunin has quit [Remote host closed the connection]
<undeadaedra>
maybe even a book
<undeadaedra>
you could sell it millions
<undeadaedra>
lol, millions.
<undeadaedra>
BILLIONS!
<colorados>
i present idea to you
sambao21 has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stef204 has quit [Ping timeout: 246 seconds]
krz has quit [Quit: WeeChat 1.0.1]
hakunin has joined #ruby
riotjone_ has quit [Ping timeout: 255 seconds]
Takle has joined #ruby
lemur has quit [Remote host closed the connection]
<colorados>
windows only for scoolboys
ptierno_ has joined #ruby
<undeadaedra>
what is the point you’re trying to reach here?
nonks has joined #ruby
martinbmadsen has joined #ruby
Lewix has quit [Remote host closed the connection]
kirun has joined #ruby
Synthbread has quit [Ping timeout: 252 seconds]
<colorados>
its shit os
Lewix has joined #ruby
pengin has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
lele has quit [Ping timeout: 272 seconds]
<undeadaedra>
ok
<undeadaedra>
this is an argument, what point does this arguments help ?
jonr22 has joined #ruby
<undeadaedra>
*-s
wicope has quit [Remote host closed the connection]
<jhass>
undeadaedra: that swift is better than ruby, obviously
<jhass>
how can you not see this
hakunin has quit [Ping timeout: 255 seconds]
<undeadaedra>
ah, yes.
Takle has quit [Remote host closed the connection]
<undeadaedra>
this I already know, you see
thahive has joined #ruby
<undeadaedra>
since I’m on a mac, I can only do swift.
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
finally, why did you make this so hard
IrishGringo_ has joined #ruby
nonks has quit [Ping timeout: 256 seconds]
mahtennek has quit []
Takle has joined #ruby
martinbmadsen has quit [Ping timeout: 264 seconds]
lele has joined #ruby
<jhass>
Swift on OS X, C# on Windows, Vala on Fedora, Bash script on Arch, QML on OpenSuse
IrishGringo has quit [Ping timeout: 256 seconds]
<jhass>
every language has its place
<undeadaedra>
Yes
Takle has quit [Remote host closed the connection]
<undeadaedra>
Predefined cases for everyone
<undeadaedra>
Pefect world
<undeadaedra>
And colorados, with its superior knowledge on OSes, manages all of that
<jhass>
evident: how's it going?
<undeadaedra>
What a time to be alive
jonr22 has quit [Ping timeout: 244 seconds]
oetjenj has joined #ruby
vtunka has joined #ruby
thumpba has joined #ruby
dANO_ has quit []
deric_skibotn has joined #ruby
<undeadaedra>
his* (sorry)
oetjenj has quit [Max SendQ exceeded]
x77686d has joined #ruby
<jhass>
*their
<undeadaedra>
:)
oetjenj has joined #ruby
j_mcnally has joined #ruby
<evident>
jhass: better... :) Had some issues with the paths in my shell... they weren't set correctly when starting a new zsh... So rvm had some issues
thumpba_ has joined #ruby
<jhass>
great
mitchellhenke has quit [Quit: Computer has gone to sleep.]
nonks has joined #ruby
<evident>
not everything is working correctly yet, but I have some thigns to test and try :)
reinaldob has quit [Remote host closed the connection]
Cadillactica has joined #ruby
<centrx>
It's something
<undeadaedra>
I hurd they are still on it
<undeadaedra>
hehehe
rajeshchawla has joined #ruby
allcentury has quit [Ping timeout: 252 seconds]
<havenwood>
colorados: I'd just like to interject for a moment. What you’re referring to as Hurd, is in fact, GNU/Hurd, or as I’ve recently taken to calling it, GNU plus Hurd.
rajeshchawla has quit [Remote host closed the connection]
razrunelord has joined #ruby
razrunelord has quit [Remote host closed the connection]
<colorados>
i ve never seen hurd so difficult question for me
a1fa has joined #ruby
<a1fa>
in two loops, how do you "next" the first loop?
robbyoconnor has quit [Read error: Connection reset by peer]
<jhass>
a1fa: you can't in ruby, usually there's a better way to write something that would need it anyway
<apeiros_>
a1fa: you jump out of the inner loop and call next in the outer.
robbyoconnor has joined #ruby
<apeiros_>
a1fa: and what jhass said. there's almost always a better way to do it.
allenn has quit [Remote host closed the connection]
sambao21 has joined #ruby
Rahul_Roy_ has joined #ruby
danjordan has quit [Quit: danjordan]
delianides has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
Lewix has quit [Remote host closed the connection]
plashchynski has joined #ruby
dogweather has joined #ruby
Lewix has joined #ruby
razrunelord has quit [Client Quit]
nonks has quit [Ping timeout: 252 seconds]
plashchynski has quit [Client Quit]
terlar has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
ramfjord has joined #ruby
vtunka has quit [Quit: Leaving]
jokke has joined #ruby
<jokke>
hi
<apeiros_>
hi jokke
keen_____ has joined #ruby
<jokke>
i'm building a rather complex application and i try to split up as much as possible into seperate testable gems
keen____ has quit [Ping timeout: 246 seconds]
<colorados>
wow
fryguy91 has quit [Quit: Leaving.]
<jokke>
however some of the code is so specific to the project that it doesn't make sense to publish it on rubygems
_64k has quit [Ping timeout: 256 seconds]
<jokke>
now some of the gems depend on others, that aren't published
<apeiros>
jokke: you can install gems without publishing them
<apeiros>
do you use bundler?
<jokke>
but afaik i can't add them as dependencies
Cust0sL1men has quit [Ping timeout: 265 seconds]
<jokke>
apeiros: sure
<apeiros>
just add them as dependencies and document the git repo
<jokke>
apeiros: in the gemspec?
<apeiros>
bundler has no issues resolving it, but it requires that you put the dependencies into the Gemfile
<jokke>
or in the Gemfile
<jokke>
ok
<jokke>
so i did that
<apeiros>
we put it in both places
graydot has joined #ruby
<jokke>
apeiros: oh ok
Hobogrammer has quit [Ping timeout: 265 seconds]
<apeiros>
in the gem to ensure that all dependencies are met, and in the gemfile for bundler to resolve it correctly
<apeiros>
wish there was a better way, though :)
<jokke>
yeah
<jokke>
geminabox
Takle has quit [Remote host closed the connection]
<jokke>
but i don't have time to set it up here
<apeiros>
I'd prefer to be able to just add a git "base" as gem source
<jokke>
yeah
deuterium has joined #ruby
_maes_ has joined #ruby
<apeiros>
e.g. git.example.com/gems, and then it tries to resolve e.g. foo-gem as git.example.com/gems/foo-gem.git first
jenrzzz has joined #ruby
<apeiros>
but yes, geminabox or similar could work too. just never tried that.
dseitz has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 272 seconds]
codecop has quit [Ping timeout: 272 seconds]
rajeshchawla has joined #ruby
shadoi1 has joined #ruby
razrunelord has joined #ruby
OrbitalKitten has joined #ruby
avril14th has quit [Ping timeout: 244 seconds]
Takle_ has joined #ruby
phutchins has joined #ruby
shadoi1 has quit [Client Quit]
aclearma_ has joined #ruby
idrthe has joined #ruby
avril14th has joined #ruby
plashchynski has joined #ruby
deuterium has quit [Quit: zzZZZzzz..]
aclearman037 has quit [Ping timeout: 265 seconds]
akurilin has quit [Read error: Connection reset by peer]
joris974 has quit [Read error: Connection reset by peer]
plashchynski has quit [Client Quit]
phutchins has quit [Ping timeout: 264 seconds]
joris974 has joined #ruby
astrobunny has joined #ruby
_64k has joined #ruby
Jiyuhen has quit [Remote host closed the connection]
RDash has quit [Changing host]
RDash has joined #ruby
akurilin has joined #ruby
senayar has joined #ruby
Jiyuhen has joined #ruby
senayar has quit [Remote host closed the connection]
idrthe has quit [Remote host closed the connection]
CatMartyn has joined #ruby
<milesmatthias>
stupid question, but had trouble googling -- can someone remind me how to define an attribute on a parent class so that every subclass of the parent has that attribute?
plashchynski has joined #ruby
<apeiros_>
class ParentClass; attr_accessor :foo; end
<apeiros_>
milesmatthias: ^
yfeldblum has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<apeiros_>
if that's not what you're looking for - please elaborate what you consider to be an attribute.
kblake has quit [Remote host closed the connection]
kblake has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<milesmatthias>
apeiros_: no, that's what I'm looking for, thanks. I've been trying that which is why I thought I'm going crazy. it's not working for some reason.
tier_ has quit [Ping timeout: 245 seconds]
<jhass>
milesmatthias: !gist
<helpa>
milesmatthias: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
rhllor has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
hakunin has joined #ruby
mjuszczak has joined #ruby
jlebrech has quit [Remote host closed the connection]
rhllor has joined #ruby
92AAAURJT has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodlehaus has quit [Ping timeout: 265 seconds]
n008f4g_ has joined #ruby
mjuszcza_ has joined #ruby
92AAAURJT has quit [Read error: Connection reset by peer]
pandaant has quit [Remote host closed the connection]
<apeiros_>
milesmatthias: note that all `attr_accessor :foo`does is define two methods for you: `def foo; return @foo; end; def foo=(value); @foo = value; return @foo; end`
_64k has quit [Ping timeout: 252 seconds]
eqmnbe has joined #ruby
ChoiKyuSang has quit [Quit: AdiIRC is updating to v1.9.6 Beta Build (2015/03/19) 32 Bit]
_64k has joined #ruby
krisquigley has joined #ruby
mjuszczak has quit [Ping timeout: 265 seconds]
ghr has quit [Ping timeout: 265 seconds]
<jokke>
apeiros_: something with the load path isn't right..
AlexRussia has quit [Ping timeout: 246 seconds]
<milesmatthias>
apeiros_: yup. problem distracted -- that wasn't actually the issue. that was working all along. sorry to bug everyone. ::resume snarky irc chat:: so how about that left shark, huh?
<jokke>
annot load such file -- bsh/persistence/models/asset_property
<jokke>
bsh-persistance is a gem
<jokke>
which is resolved by bundler via local path for now
godd2 has joined #ruby
ChoiKyuSang has joined #ruby
rhllor has quit [Quit: rhllor]
dogweather has quit [Remote host closed the connection]
mikepack_ has joined #ruby
jgt1 has joined #ruby
<apeiros_>
jokke: such things should work. work for us at leas.t
<apeiros_>
*at least
martinbmadsen has joined #ruby
<jokke>
never mind...
<jokke>
file is missing
meatherly has joined #ruby
werelivi_ has quit [Remote host closed the connection]
<apeiros_>
:)
<meatherly>
does anyone know if you can do this with the ruby openssl library? 'openssl pkcs12 -in cert.p12 -out cert.pem -nodes -clcerts'
mikepack has quit [Ping timeout: 272 seconds]
nateberkopec has joined #ruby
<jokke>
:D
<meatherly>
would the OpenSSL::PKCS12 class do it?
slap_stick has joined #ruby
iamjarvo has joined #ruby
pengin has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
mjuszcza_ has quit []
DerisiveLogic has quit [Ping timeout: 246 seconds]
<jhass>
sounds like your on the right path
<jhass>
if something can do it, then that one
_64k has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
withnale_ has quit [Ping timeout: 264 seconds]
plashchynski has quit [Quit: plashchynski]
mjuszczak has joined #ruby
hcnewsom has joined #ruby
<jhass>
meatherly: maybe to_der returns you what you want already
<jokke>
hm nope it still fails with another require
leafybasil has quit [Remote host closed the connection]
<jokke>
require 'bsh/persistence/models/asset'
<jhass>
if not you should be able to rebuild a OpenSSL::X509 with the attributes
bronson has joined #ruby
<jhass>
(key, certificate)
<jokke>
in bsh-persistence: lib/bsh/persistence/models/asset.rb
<bradland>
yeah, i should clarify that i'm referring to String#% as sprintf
commmmodo has quit [Quit: commmmodo]
baweaver has quit [Remote host closed the connection]
<xxneolithicxx>
hi all
sambao21 has joined #ruby
<bradland>
i never use the Kernel#sprintf(format, str) format
<apeiros_>
if I don't have the arguments in an array, I actually prefer (s)printf over String#%
<eam>
I'd tend to use the sprintf method as well, for clarity
<bradland>
ah, i see you can just send them all in as args
<bradland>
String#% is hard to google for
<bradland>
i'll give sprintf that
dannon has joined #ruby
phutchins has joined #ruby
<apeiros_>
I find `sprintf "template", a, b, c` much less noisy than `print "template" % [a, b, c]`
<jhass>
that's why we got symbolhound.com
<eam>
if you have an array you can just splat it to sprintf
<xxneolithicxx>
looking for some recommendations for modules to expand (pretty print)/ collapse (collapse an entire document down to a single line or as close as i can get it if any nodes arent multiline content)
<bradland>
OMG where has symbolhound.com been all my life
<xxneolithicxx>
* HTML'
<apeiros_>
whoops -print
<eam>
I feel like I should prefix all my opinions with the disclaimer "I think perl is readable and"
riotjones has joined #ruby
<bradland>
lol
Cadillactica has quit [Quit: Cadillactica]
<jhass>
xxneolithicxx: reality check: you're in #ruby
<apeiros_>
eam: hehe
<xxneolithicxx>
and?
* apeiros_
thinks perl can be pretty readable
<xxneolithicxx>
im using ruby..
MXfive has joined #ruby
<jhass>
oh you mean reformat?
werelivinginthef has joined #ruby
<apeiros_>
and I think you can easily write impenetrable ruby code
<canton7>
sounded like an editor question at first
<jhass>
collapse sounded editor-ish to me
msgodf has quit [Remote host closed the connection]
<bradland>
i think he's looking for a minify tool
User458764 has joined #ruby
doodlehaus has joined #ruby
<bradland>
i think middleman has a minify feature?
arietis has quit [Read error: Connection reset by peer]
phutchins has joined #ruby
arietis has joined #ruby
kblake has quit [Read error: Connection reset by peer]
pengin has joined #ruby
_ixti_ has joined #ruby
kblake has joined #ruby
failshell has joined #ruby
jonr22 has joined #ruby
arietis1 has joined #ruby
arietis has quit [Read error: Connection reset by peer]
ixti has quit [Ping timeout: 250 seconds]
<failshell>
do you guys know of a gem that lets you edit .doc/.docx document properties? like changing the font? need to do a mass edit on lots and lots of docs
eqmnbe has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
<bradland>
you can munge around in the XML from there
thahive has joined #ruby
<wasamasa>
the xml is pretty horrific
<failshell>
i was looking at that one earlier. as you said, .doc will be a PITA
Kabal619 has joined #ruby
chu has joined #ruby
<bradland>
IMO, don't bother with .doc
<bradland>
MS never released specifications for their binary formats (xls and doc)
<wasamasa>
I bet they're ashamed of them
<bradland>
every single implementation is the result of reverse engineering, and brings with it only pain and suffering
starless has joined #ruby
<wasamasa>
just like adobe is with psd
<apeiros>
I think you can bother with .doc by using faceless libreoffice to convert it to docx
<apeiros>
and then deal unified with that
shadoi has joined #ruby
<failshell>
yeah that might work too
delianides has quit [Remote host closed the connection]
<failshell>
was hoping for something that doesnt need anything external
<bradland>
hate to be debbie downer, but don't get your hopes up
<failshell>
basically, i want to write a troll that changes the font to comic sans of all docs in a directory hehe
<bradland>
as good as libreoffice is, i find it a rare case that it meets end-user expectations
<bradland>
lol
<apeiros>
good thing then I managed to avoid doc/docx the last ~10y
OrbitalKitten has joined #ruby
<apeiros>
we only evaluated using those things, luckily decided against it
perrier has quit [Remote host closed the connection]
xxneolithicxx has left #ruby [#ruby]
ghostmoth has joined #ruby
perrier has joined #ruby
<bradland>
problem is that people expect to get documents back that are constructed they way they'd construct them
jenrzzz has quit [Ping timeout: 265 seconds]
<bradland>
picky users :P
<wasamasa>
failshell: that's a lot of effort for nothing
<failshell>
bradland: you'd think in 2015 we would have solved documents formats.
OrbitalKitten has quit [Read error: Connection reset by peer]
<bradland>
we have (programmers), mostly
<bradland>
users have not
perrier has quit [Remote host closed the connection]
mjuszczak has quit []
OrbitalKitten has joined #ruby
<apeiros>
there's tons of shit problems which should have been solved by today
perrier has joined #ruby
<bradland>
it's strictly a matter of perspective, but when MS moved to XML, we took a huge leap forward
<apeiros>
tbh, I'm very disappointed by the state of affairs RE software
_maes_ has quit [Read error: Connection reset by peer]
davidcel- has quit [Quit: K-Lined.]
ismaelga has quit [Remote host closed the connection]
OrbitalKitten has quit [Client Quit]
perrier has quit [Read error: Connection reset by peer]
perrier has joined #ruby
jusmyth has joined #ruby
<failshell>
see for a docx its easy, once unzipped, there's a file named word/fontTable.xml which contains which font the document uses
<bradland>
that's why you'll find gems for docx, but not doc
<bradland>
XML = ZOMG, I know this!
bim has quit [Remote host closed the connection]
<failshell>
its prolly the first time in my life im happy seeing XML
<wasamasa>
lol
<wasamasa>
have you taken a look at the xml?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa>
it's pretty horrific
<bradland>
it's a rats nest, but it'll parse fine with XPath
<wasamasa>
which is to be expected considering how the document is structured internally, but still
<wasamasa>
will be still a pain to work with
iMe has quit [Ping timeout: 246 seconds]
<bradland>
derp... parse fine with XPath makes no sense :\
<wasamasa>
it's a combination of applying properties to selected text and office doing whatever the hell it does
<wasamasa>
so it may look right, but is totally weird
juanpaucar has joined #ruby
<wasamasa>
so, yes, if all you want to do is extracting text, that will work
<wasamasa>
but manipulation, eh
davedev24_ has joined #ruby
<bradland>
yeah, MS Word doesn't care much about how the XML looks
<bradland>
XML is best when you don't look at it lol
<wasamasa>
right
eric_lagergren has joined #ruby
<wasamasa>
it's the best when you treat it as not human-readable
<wasamasa>
in some cases even as binary
<godd2>
Wasn't that the purpose of XML? To be human-readable?
<centrx>
HAHAHAHAHA
<godd2>
And then got hi-jacked for serialization?
<bradland>
that's a common misconception, IMO
<wasamasa>
well, yeah
triangles has joined #ruby
davedev2_ has quit [Ping timeout: 256 seconds]
<bradland>
XML was meant to be human readable in contrast to binary formats
<wasamasa>
it's not even usable for semantic stuff
iMe has joined #ruby
<bradland>
but it wasn't intended to be consumed by humans
zorak8 has quit [Ping timeout: 265 seconds]
<wasamasa>
since it's too free regarding representation
<godd2>
Wikipedia: XML is a markup language that defines a set of rules for encoding documents in a format which is both human-readable and machine-readable.
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
<GaryOak_>
human-"readable"
<godd2>
right, that could be interpreted as "yea you can read it if you have to, but we aren't really trying"
<wasamasa>
JSON is a lot less silly for just serializing stuff
colorados has quit [Remote host closed the connection]
<eric_lagergren>
uhm, which ever jekyll is the default install..
<eric_lagergren>
but, see, it's the same issue with jekyll, sass, etc.
zorak8 has quit [Read error: Connection reset by peer]
jimms has joined #ruby
<jhass>
that's weird, let me spin but a clean chroot
perrier has quit [Remote host closed the connection]
<jhass>
do you have a ~/.gemrc
zorak8 has joined #ruby
colorados has joined #ruby
<jhass>
ß
<jhass>
er, ?
perrier has joined #ruby
<eric_lagergren>
no, I do not.
<apeiros>
what bouncer do you folks use? (cross posting this in #ruby-lang)
delianides has joined #ruby
<jhass>
znc here
<jhass>
basically first I tried and didn
<jhass>
't lack anything I wanted
ismaelga has joined #ruby
<jhass>
you can also use weechat as bouncer
<jhass>
has a dedicated protocol though afaik
<jhass>
so you need a weechat client
<jhass>
(which exists for android)
milesmatthias has quit [Remote host closed the connection]
<apeiros>
ok, twice znc so far
phutchins has joined #ruby
milesmatthias has joined #ruby
RegulationD has joined #ruby
swgillespie has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimms has quit [Ping timeout: 252 seconds]
slap_stick has joined #ruby
baweaver has quit [Remote host closed the connection]
jimms has joined #ruby
triangles has joined #ruby
gfawcettpq1 has joined #ruby
<eric_lagergren>
mmmk
Mon_Ouie has joined #ruby
triangles2 has quit [Ping timeout: 252 seconds]
talntid has joined #ruby
<apeiros>
any recommendation on modules? I think I'd want fail2ban, saslauth, sasl, keepnick, simple_away (cross posting this in #ruby-lang)
<talntid>
anyone here have experience with the watchr gem? right when i start it I get this error: /usr/local/rvm/gems/ruby-2.2.0/gems/watchr-0.7/lib/watchr.rb:111:in `handler': uninitialized constant Module::Config (NameError)
milesmatthias has quit [Ping timeout: 264 seconds]
MXfive_ has joined #ruby
MXfive has quit [Read error: Connection reset by peer]
<jhass>
eric_lagergren: so just tried in a clean chroot (since my ruby setup differs a bit from arch defaults), had to patch up $PATH to include the binary dir, but then working fine here. Can you post your gem env output?
uptownhr has quit [Read error: Connection reset by peer]
<eric_lagergren>
Sorry, I'm clueless about Ruby but I use a couple Gems :/
Ridley5 has quit [Ping timeout: 256 seconds]
<jhass>
apeiros: chansaver, saslauth is the deprecated version of sasl I think?
centrx has quit [Ping timeout: 250 seconds]
frem has joined #ruby
jespada has joined #ruby
<apeiros>
jhass: I understood as saslauth = enable me to log into znc with sasl, and sasl = enable ZNC to log into irc with sasl. maybe just bad reading on my part or bad wording on theirs…?
Lewix has quit [Remote host closed the connection]
<bradland>
talntid: interesting. i see that Config object referenced in a few locations, but i don't see it defined in the project
<havenn>
talntid: The gem hasn't been updated for modern Rubies. It doesn't seem it is being maintained. See all the PRs for RbConfig: https://github.com/mynyml/watchr/pulls
zzz_Ridley has joined #ruby
ArchRogem has quit [Read error: Connection reset by peer]
<havenn>
bradland: Config is a 1.8 thing.
zzz_Ridley is now known as Ridley5
krisquigley has joined #ruby
Ridley5 has quit [Changing host]
Ridley5 has joined #ruby
<bradland>
huzzah
MXfive_ has quit [Read error: Connection reset by peer]
nonks has quit [Ping timeout: 246 seconds]
martinbmadsen has joined #ruby
steve-la__ has quit [Quit: Be back later ...]
aclearma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
razrunelord has quit [Remote host closed the connection]
<jhass>
PATH is not all that important here, though I don't see how it even find that jekyll command if that's really the case
<apeiros>
nice
milesmatthias has joined #ruby
<jhass>
we care about GEM_PATH, which is actually bogus
zz_Outlastsheep is now known as Outlastsheep
<jhass>
apeiros: \o/
andikr has quit [Remote host closed the connection]
<eric_lagergren>
well, $GEM_PATH has nothing
<eric_lagergren>
it's unexported, and I ran `source ~/.bashrc, hash -r`
<eric_lagergren>
several times.
<jhass>
eh
<jhass>
where does gem env get it from though?
<jhass>
still lists the bogus one in GEM PATHS
<eric_lagergren>
jhass: could you repeat your last ~4 comments after I said, "...ran it several times"
<eric_lagergren>
jhass: I accidentally hit ctrl+l in irc :/
<jhass>
hehe
zorak8 has joined #ruby
duncannz has joined #ruby
<jhass>
eric_lagergren: let's try something else and patch it up manually: export GEM_PATH="/home/eric/.gem/ruby/2.2.0"
duncannz has quit [Max SendQ exceeded]
aclearman037 has joined #ruby
<jhass>
that's the default value, so something is still overriding it if gem env reports anything else without ^ export
DerisiveLogic has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
<eric_lagergren>
jhass: okay, so after I unexported GEM_PATH I removed .gems, reinstalled ruby, reinstalled jekyll, and now GEM_PATH doesn't appear *anywhere* (including gem env) but now I get 'jekyll command not found'
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
eric_lagergren: okay, readd /home/eric/.gem/ruby/2.2.0/bin to $PATH, but not $GEM_PATH
Takle has quit [Remote host closed the connection]
<eric_lagergren>
WOOP.
<eric_lagergren>
jhass: adding it to path w/o gem_path worked
dblessing has quit [Ping timeout: 252 seconds]
<eric_lagergren>
jhass: thanks <3
duncannz has joined #ruby
<jhass>
eric_lagergren: yeah, I guess that's where the confusion came from, me not noticing you did that and you doing that without telling :P
alec-c4 has quit [Remote host closed the connection]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duncannz has quit [Max SendQ exceeded]
<apeiros__>
jhass: mind a pm?
<jhass>
apeiros__: nope
<jhass>
eric_lagergren: to clarify: GEM_PATH overrides the lookup path for gems (libraries), it's like LD_LIBRARY_PATH or GOPATH, not like PATH
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
<eric_lagergren>
ahhh. gotcja/
ghostmoth has quit [Quit: ghostmoth]
<eric_lagergren>
s/gotcja\//gotcja
<eric_lagergren>
welp. Apparently I can't type today.
<eric_lagergren>
Anyway, thank you so much jhass. You saved me a huuuge headache.
davedev2_ has joined #ruby
Hirzu has joined #ruby
davedev24_ has quit [Ping timeout: 255 seconds]
Asher has quit [Quit: Leaving.]
<jhass>
eric_lagergren: you're welcome
Asher has joined #ruby
Ridley5 has quit [Ping timeout: 264 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
zenith_ has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
<elfuego>
is there a way in ruby to get value from the cookies hash without the $Version= strings?
<baweaver>
Like tap I'd agree the name would make it confusing
tier_ has joined #ruby
sandelius has joined #ruby
<baweaver>
itself is an identity function and tap is a K-combinator
ponga has quit [Read error: No route to host]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver>
I'd agree with the last comment that that might not be straightforward
bim has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
<sandelius>
I just ported a small app from Rails to Sinatra/ActiveRecord. My Rspec test suite is really slow on sinatra. Is Rails, or rspec-rails, doing something special in rails to speed thing up?
crdpink has joined #ruby
<baweaver>
probably spring
tgunr has joined #ruby
<baweaver>
keeps the entire app going
<jhass>
or transactional fixtures
razrunelord has joined #ruby
<baweaver>
well, if you're on Rails 4.x that is
<baweaver>
jhass: what about object.yield?
<baweaver>
straightforward with current language
jgt1 has quit [Ping timeout: 256 seconds]
kadoppe has quit [Ping timeout: 252 seconds]
<jhass>
dunno, tbh I'm not entirely convinced we need either yet
<baweaver>
it's more of a nicety thing
<baweaver>
I just don't like intermediate variables in a good chain
<baweaver>
but preference really.
swgillespie has joined #ruby
tier has quit [Ping timeout: 256 seconds]
kadoppe has joined #ruby
chu has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<sandelius>
baweaver it's not the load time that is slow (spring). I'm using database cleaner and transaction with sinatra
apeiros has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<sandelius>
jhass hmm same thing with database_rewinder :/
lulzmachine has quit [Quit: lulzmachine]
<jhass>
was worth a shot at least
<jhass>
you need to start profiling to pin down where time is spent I guess
pardusf has quit [Ping timeout: 245 seconds]
triangles2 has joined #ruby
<sandelius>
jhass yeah I'm using -p with rspec and has located the slowest test but the thing is that it's the same as in Rails. This is really weird. When I run siege on both apps the sinatra one kills rails :)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
iamjarvo has joined #ruby
jimms has quit [Remote host closed the connection]
<jhass>
sandelius: I meant real profiling, ruby-prof / rbkit stuff
sambao21 has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
<shevy>
undeadaedra no the thing there is, that the question must be asked properly. It should be like so: "object, do you end_with? xyz"
revoohc has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
coderhs has quit [Ping timeout: 264 seconds]
<undeadaedra>
ah, in this way it makes sense
<shevy>
it's the same as you have with: File.exist? versus File.exists?
<shevy>
matz added File.exists? after someone said that it should happen years ago, I forgot when
davlaw__ has joined #ruby
<eam>
kinda surprised php doesn't have a standard builtin for a social networking app
<shevy>
then I think two years ago or so, it was deprecated again
<undeadaedra>
but it is good if we say ”if string.ends_with? %(foo)”, no ?
sngeth has joined #ruby
<shevy>
undeadaedra dunno, I guess it depends on the point of view, you could just as easily compose text messages in pseudo-english sentence "if this string ends with a xyz, do that"
lanemeyer has quit [Ping timeout: 256 seconds]
<shevy>
well that might even be a real sentence
jenrzzz has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
<undeadaedra>
so yeah, when not really thinking about it, the ”ends with” comes more naturally
razrunelord has joined #ruby
razrunelord has quit [Remote host closed the connection]
<undeadaedra>
but I didn’t think about turning it into a ”Does it” question, actually, good one
<zenspider>
the argument is that ruby is not english. it ends there.
<undeadaedra>
D:
allcentury has joined #ruby
<shevy>
it.ends_there?
<shevy>
or
<shevy>
it.end_there?
<shevy>
undeadaedra is that a smiley from right to left?
jlast has quit [Remote host closed the connection]
<undeadaedra>
yes
adriancb has quit [Ping timeout: 250 seconds]
<shevy>
somehow my brain works only with smileys in this direction :D
ghostpl_ has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<morenoh149>
moreover. It's usage is in a rails template file index.html.erb. I'd declare my overload in an erb tag above it's first usage? or does it fit better elsewhere?
PaulCapestany has joined #ruby
jonr22 has joined #ruby
<jhass>
to_json uses as_json to obtain a representation of your object from which the json should be generated
<jhass>
so you return a hash, an array or whatever
<jhass>
it's called template method pattern
last_staff has quit [Quit: last_staff]
senayar has joined #ruby
<ericwood>
^^^^^^
Nuck has quit [Quit: Computer has gone to sleep.]
josephleon has joined #ruby
tubuliferous has joined #ruby
allcentury has quit [Quit: WeeChat 1.1.1]
dc has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 255 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
pietr0 has quit [Quit: pietr0]
revoohc has quit [Ping timeout: 272 seconds]
graydot has quit [Quit: graydot]
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
apxm has joined #ruby
baweaver has joined #ruby
wallerdev has quit [Quit: wallerdev]
pietr0 has joined #ruby
centrx has quit [Remote host closed the connection]
razrunelord has joined #ruby
sivsushruth has joined #ruby
centrx has joined #ruby
tubuliferous has quit [Read error: Connection reset by peer]
chridal has joined #ruby
revoohc has joined #ruby
jonr22 has quit [Remote host closed the connection]
<chridal>
I have this hash hash = {a: 1, b: 2}, I would like to do this foo(hash), and then use it as hash[:a] inside the function.
<chridal>
How can I do this?
josephleon has quit [Ping timeout: 255 seconds]
_64k has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<chridal>
It only works if I do foo(a: 1, b:2), only then am I able to do hash[:a] inside the function
<jhass>
def foo(hash); hash[:a]; end; foo(hash)
josephleon has joined #ruby
rajeshchawla has quit [Remote host closed the connection]
<jhass>
yes
<chridal>
jhass: That doesn't work for me at all. The hash is empty when I get in there.
<jhass>
!code
<helpa>
We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
<centrx>
code or it didn't happen
<bradland>
1st rule of programming: Yes, it's probably you, not the computer :)
AnxiousGarlic has quit [Read error: Connection reset by peer]
centrx has quit [Remote host closed the connection]
pengin has quit [Remote host closed the connection]
<chridal>
Sorry, but Gist was bugged, so I couldn't turn on syntax highlighting.
dEPy has quit [Quit: (null)]
kblake_ has joined #ruby
<bradland>
name your files with filename.rb instead of filename.txt
kirun has quit [Quit: Client exiting]
<chridal>
Fixed.
<chridal>
Thanks,
<chridal>
I know those functions are humongous. I will refactor it when it works :-)
revoohc has quit [Ping timeout: 272 seconds]
<bradland>
so what are you expecting from the code, and what are you actually getting?
<bradland>
an error?
ramfjord has quit [Ping timeout: 252 seconds]
<chridal>
Right now, as you can see on line 25, I am passing it directly into the function call. Then it works. But when I try to do Resque.enqueue(AddDeviceToken, new_request) it doesn't.
<chridal>
Well, I am expecting to be able to use new_request[:arn] inside of the method that I am calling, when passing `new_request` as a param directly into the function call, not having to list them individually
icebourg has joined #ruby
kblake has quit [Ping timeout: 246 seconds]
razrunelord has quit []
mjuszczak has joined #ruby
deric_skibotn has quit [Ping timeout: 244 seconds]
<jhass>
that should work, I think your problem is somewhere else
<bradland>
what error are you getting?
elfuego has joined #ruby
<bradland>
NoMethod error nil class?
a5i has joined #ruby
kblake_ has quit [Ping timeout: 252 seconds]
<chridal>
No, they're just blank.
<bradland>
if you could comment with the error message and stack trace on the gist, that'd be great
<chridal>
I tried printing them out inside the method I called, and got nothing.
razrunelord has joined #ruby
<bradland>
where did you print them?
<bradland>
from withing SessionsController#create ?
razrunelord has quit [Client Quit]
<bradland>
or from within AdDeviceToken::perform ?
<chridal>
no, from within AddDeviceToken::perform
<jhass>
there's a conceptual problem with this code though
baweaver has quit [Remote host closed the connection]
<jhass>
resque doesn't guarantee execution order
<jhass>
your jobs will race
<chridal>
jhass: I know, that's why I am calling it from within remove.
<chridal>
Inside of RemoveToken, I actually call AddToken
baweaver has joined #ruby
<jhass>
so you're showing us code you're not using
<chridal>
No, I'm using that code too.
<chridal>
The RemoveToken is not where the problem is at currently.
<chridal>
The problem is just that when I pass that hash, I doesn't work as I expect it to. I get errors from SNS saying that I am not passing the parameters.
<bradland>
what does Resque::enqueue do to parameters? does it serialize them somehow? maybe the keys are no longer symbols.
Takle has quit [Read error: Connection reset by peer]
Yzguy_ has quit [Quit: I'm sleeping, go away.]
<jhass>
yeah, it to_json them I think
keen_____ has quit [Read error: Connection reset by peer]
<jhass>
but shouldn't make a diff where the literal is defined really
<bradland>
i'd log new_token.inspect directly inside AdDeviceToken::perform to see what's in there
werelivinginthef has joined #ruby
<bradland>
true
willnewby has quit [Read error: Connection reset by peer]
<jhass>
I think this is racing somewhere and just misinterpretation
jobewan has quit [Quit: Leaving]
IrishGringo has quit [Ping timeout: 265 seconds]
<bradland>
true dat
keen_____ has joined #ruby
HoloIRCUser1 has joined #ruby
sngeth has quit [Ping timeout: 246 seconds]
<chridal>
Not sure how this is going to even work?
lkba has joined #ruby
haxrbyte has joined #ruby
<chridal>
Trying to use remote-pry, but it doesn't seem like this will work
deric_skibotn has joined #ruby
haxrbyte has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
Musashi007 has joined #ruby
haxrbyte has joined #ruby
<chridal>
I put `binding.remote_pry` on line 6 of test.rb, then restarted the queue, and then issue `pry-remote` from pty, but I'm not getting to connect to anything.
<willnewby1>
@jhass I'll admit, I'm mostly lost, I've added ruby-prof to my bundle and tried "ruby-prof bundle -- exec jekyll build --trace", "ruby-prof -- bundle exec jekyll build --trace" and a whole host of other options. I'm not sure what you mean by "swap them around".
rpad has quit [Remote host closed the connection]
<jhass>
bundle exec ruby-prof jekyll build
<jhass>
would be my guess
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
crueber has quit [Quit: Leaving.]
<bradland>
willnewby1: bundle exec will always be first
Nuck has joined #ruby
<bradland>
that sets up the bundler environment so only binaries and libs within your bundle will be available
<willnewby1>
That makes sense!
iMe has quit [Ping timeout: 256 seconds]
<willnewby1>
I had to run it as: bundle exec ruby-prof `which jekyll` build
<willnewby1>
It needed the full path to jekyll… but it works!
<willnewby1>
Thanks @jhass + @bradland !
kblake has quit [Ping timeout: 246 seconds]
<chridal>
bradland: Is there any way for me to do a new_request.inspect, without using pry? I tried adding it directly to line 6, but there is no output to STDOUT
pengin has joined #ruby
<bradland>
what are you using for logging?
<jhass>
chridal: Rails.logger.info
anaeem1 has quit [Ping timeout: 264 seconds]
<bradland>
i'd write it to my log
<jhass>
bradland: it's rails...
haxrbyte_ has joined #ruby
Takle has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
haxrbyte has quit []
haxrbyte_ has quit [Client Quit]
x1337807x has joined #ruby
djbkd has quit [Remote host closed the connection]
haxrbyte has joined #ruby
iMe has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
<chridal>
This is so weird! When I do new_request.inspect, I get {a: 1, b:2, c:3} just like it is supposed to be. So why can't I access them?
<bradland>
like jhass said, you've probably misidentified the problem
HoloIRCUser1 has quit [Ping timeout: 252 seconds]
<chridal>
Hang on
<bradland>
try logging new_request[:a]
krisquigley has joined #ruby
<chridal>
When doing Rails.logger.info(new_request[:a]) I get nothing.
vroomanj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
Alex-_ has joined #ruby
<jhass>
actually in your gist it's called new_token...
<jhass>
new_request just in the controller
tkuchiki has quit [Ping timeout: 272 seconds]
martinbmadsen has joined #ruby
x1337807_ has joined #ruby
<chridal>
I know. That's not the issue, I just typed wrong here, and continued not to confuse you.
dfinninger has quit [Remote host closed the connection]
<jhass>
you should probably unify in your app too
<jhass>
it's good to keep consistent names
willnewby1 has quit [Quit: Leaving.]
x1337807x has quit [Ping timeout: 245 seconds]
<chridal>
yea, I did that at first, but I felt like new_request didn't make any sense from within Add****, I will probably change it in the first one too
kblake has joined #ruby
<chridal>
new_request[:a].inspect = nil, class is Hash
a346 has quit [Ping timeout: 244 seconds]
<jhass>
the new_ is contextual, that's okay to differentiate
<jhass>
but either it's a token or a request
krisquigley has quit [Ping timeout: 244 seconds]
<chridal>
Yes, that's true.
<jhass>
.key.inspect ?
<chridal>
is that new_request.key.inspect?
<jhass>
er, keys.inspect, but yes
Nuck has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
<chridal>
["arn", "device_id", "user_id"]
<jhass>
there you go
<jhass>
json turns it into strings
<chridal>
is the problem that they are strings?
<jhass>
yes
<chridal>
*bangs forehead*
djbkd has quit [Remote host closed the connection]
<jhass>
though I have no idea how this ever worked in either version
<chridal>
The obscure part was how it works if I just pass it directly in.
<chridal>
Oh! Because then there's no .to_json
<jhass>
yes, I think it didn't
<bradland>
man, i said this like 20 minutes ago! lol
<jhass>
of course there is
SouL_ has quit [Ping timeout: 264 seconds]
<chridal>
how could it work then?
<jhass>
see my links to the resque source earlier
<bradland>
indifferent access?
<jhass>
I think it didn't
<jhass>
nah, it's both literals
rrichardsr3 has joined #ruby
<chridal>
It does! I'll test it again.
<chridal>
to make sure
djbkd has joined #ruby
tkuchiki has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
B1n4r10 has joined #ruby
<chridal>
It works.
<chridal>
If I pass them like this foo(a: 1, b:2 c:3) they all arrive, and I can do new_request[:a]
<bradland>
so the hash keys are accessible as a symbols when you pass a literal directly
<bradland>
but not if you assign a hash literal to a variable, and pass the variable in
<chridal>
if I pass foo(bar) where bar = {a:1, b:2, c:3} they get turned into strings.
<jhass>
that's stupid
art-solopov has quit [Quit: Konversation terminated!]
<bradland>
in your method arguments, you're using an implicit hash though, right?
<chridal>
My god. The time I've spent.
<bradland>
no curly braces?
<chridal>
bradland: Correct.
<bradland>
is it possible that has something to do with it?
<chridal>
Which is why I think it's not calling .to_json on it
<bradland>
try wrapping it with curly braces in the method argument list
<chridal>
bradland: Then it will call .to_json, and they will get stringified. Will check.
djbkd has quit [Remote host closed the connection]
snath has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
<bradland>
wonder why new_request.inspect was showing symbol keys
<bradland>
man, friggin' rails sometimes....
tkuchiki has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 255 seconds]
<chridal>
Yes, if I pass them inside {} they get stringified.
tkuchiki has joined #ruby
<bradland>
so it has something to do with the implicit hash argument
<bradland>
geeze
<bradland>
someone smarter than me could probalby tell you why
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chridal>
might it be that if you pass it one object, it will call .to_json on it, but there isn't an equivalent function if you pass an implicit hash?
robustus|Off has joined #ruby
<bradland>
i will say this though, a good debugger (pry, byebug, etc) makes this kind of thing a *lot* easier to debug
<bradland>
is there a difference in the output of Rails.logger.info(new_token.keys.inspect) between those two?
<chridal>
I can only guess that either Resque or Rails does something to them.
<bradland>
jhass: posted a method trace. it's just serializing them with JSON.dump/load
bricker has joined #ruby
ghostpl_ has joined #ruby
snath has joined #ruby
spider-mario has quit [Ping timeout: 246 seconds]
<chridal>
new_token.keys.inspect is the same in both
MatthewsFace has quit []
antivert has quit [Quit: leaving]
<bradland>
strings?
dc has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<bradland>
you see why it would be so hard to believe that they're accessible as symbols when keys.inspect says they're strings in both cases, right?
<jhass>
the code is likely just racing and the hash alloc makes the diff
thumpba_ has quit [Ping timeout: 251 seconds]
spider-mario has joined #ruby
<jhass>
have fun in prod
lanemeyer has joined #ruby
<chridal>
Yes, I see how this is obscure.
<chridal>
jhass: What should I be doing about this?
senayar has joined #ruby
jottr has joined #ruby
<jhass>
dunno, if I'm really honest I'm not motivated to dig into
ghostpl_ has quit [Ping timeout: 246 seconds]
<jhass>
the obvious race I pointed out you said you're aware
Yzguy_ has quit [Quit: I'm sleeping, go away.]
alphaatom has joined #ruby
<chridal>
that one I know about. I was thinking about this weird stuff with the hash
<chridal>
I should be safe using strings tho?
<jhass>
but things like you posting "I get {a: 1, b:2, c:3} just like it is supposed to be" while it's string keys, makes it hard to believe your assertions
<bradland>
both of these look to like they contain some good reading on the challenge you're facing
ponga has quit [Quit: Leaving...]
bricker has quit [Ping timeout: 252 seconds]
karmatr0n has quit [Read error: Connection reset by peer]
<chridal>
jhass: I have been programming for the last 14 hours now.. That's why I made a mistake there.
<jhass>
then get some sleep
<chridal>
bradland: Thanks! I will make sure to read both of them after I get some sleep.
karmatr0n has joined #ruby
<bradland>
i know that feels bro
<chridal>
Yea. I just really HAD to solve this issue. It's been nagging me.
<bradland>
went for 37 hours straight once on our first ASP.NET project with a good friend
baweaver has joined #ruby
<bradland>
... the mistakes we make when we're young!
<chridal>
Wow! That's crazy.
<bradland>
(referring to using ASP.NET, not going 37 hours lol)
<jhass>
like starting with ASP.NET? :P
<chridal>
I just participated in a hackathon (24 hours), it was crazy.
* bradland
fistbump jhass
<chridal>
At least we won. I was smashed. I can't even imagine doing 37 hours.
<chridal>
It would be impossible.
commmmodo has joined #ruby
<bradland>
code quality suffered
<bradland>
heh
<chridal>
You must have some serious code muscle :-D
<bradland>
that was back in 2001 or so
ponga has joined #ruby
<bradland>
i was just young
<jhass>
well, I'm not better
<jhass>
PHP is my first lang
Junaos has quit [Remote host closed the connection]
<bradland>
were were an ASP (classic) shop
<bradland>
when ASP.NET hit (along with webforms), we did 1 project
<bradland>
i looked at PHP, but rails had just hit 0.7, and was usable
mjuszczak has joined #ruby
<chridal>
PHP is mine as well.
<bradland>
we've been rails ever since
cvtsx has quit [Quit: Leaving]
<bradland>
although i don't do much rails coding these days
Junaos has joined #ruby
<bradland>
the guy i started with in 2001 is still with me though; he's one of my co-founders
<bradland>
not a lot of guys that have been doing rails since 0.7
<alphaatom>
would you guys consider the codecademy stuff a good starting place for learning ruby, I already have rudimentary knowledge of other programming languages like java, javascript, php etc
edwardly has quit [Quit: ??????????]
<chridal>
I still remember trying to use Rails back when I was about 15 (2005). I only knew how to write PHP, and hardly any OOP. Hashes and blocks confused me a lot.
graydot has joined #ruby
<bradland>
AlphaAtom: i've been through a good bit of codeacademy. it's pretty decent.
<bradland>
it'd be a good intro
Musashi007 has joined #ruby
<bradland>
coming from ASP, Rails was a real dream
<chridal>
I used classes in PHP just to be able to separate my functions into classes so that it would be cleaner. Had no idea what an object was.
<bradland>
we used to use the IIS 404 ISAPI as a router lol
bricker has joined #ruby
<chridal>
Is ASP.net still bad?
<bradland>
no, it's way, way better
kaspergrubbe has quit [Ping timeout: 246 seconds]
<jhass>
chridal: you don't read tdwtf I gather :P
Affix has quit [Ping timeout: 272 seconds]
<bradland>
when ASP.net first hit, MS tried to do something called WebForms, which everyone (including ASP.net devs) would prefer to forget.
<chridal>
I am actually in bed now. I just need to test this for a bit :-P
<jhass>
wish I had ops
<jhass>
I'd totally kick you now
Affix has joined #ruby
<chridal>
Why should I be kicked tho?
zorak8 has joined #ruby
<jhass>
so you get some sleep
<chridal>
I will sleep now. But should that code race?
zorak8 has quit [Max SendQ exceeded]
<jhass>
no, other parts might
<chridal>
Now I can sleep.
<chridal>
Bye.
sevvie has joined #ruby
zorak8 has joined #ruby
kaspergrubbe has joined #ruby
zorak8 has quit [Max SendQ exceeded]
<alphaatom>
as someone new to ruby
<alphaatom>
why on earth does unless exist
<chridal>
Because it's beautiful.
zorak8 has joined #ruby
<jhass>
because don't do if is easier to think than if this, I mean not_this
Yzguy_ has joined #ruby
zorak8 has quit [Max SendQ exceeded]
<jhass>
give it a chance
bricker has joined #ruby
zorak8 has joined #ruby
<jhass>
it'll click after a while
zorak8 has quit [Max SendQ exceeded]
fuzzyhorns2 has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
vt102 has quit [Ping timeout: 265 seconds]
baweaver has quit [Remote host closed the connection]
<godd2>
user.log_in unless user.logged_in?
astrobunny has joined #ruby
chridal has quit [Ping timeout: 244 seconds]
Affix has quit [Ping timeout: 256 seconds]
<alphaatom>
I suppose, but it just seems to be sugar for if !condition
<jhass>
well, on the implementation detail ! is a method call wall unless isn't
<jhass>
but that shouldn't be the point
graydot has joined #ruby
graydot has quit [Client Quit]
<jhass>
in if !condition you evaluate (in your brain when reading the code) condition, then negate the result and use that to say if x
<jhass>
unless skips that step
martinbmadsen has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
<jhass>
"wall" lol, I should get some sleep too
<jhass>
"while" I meant
postmodern has quit [Quit: Leaving]
bim has quit [Remote host closed the connection]
jusmyth has joined #ruby
Yzguy_ has quit [Quit: I'm bouncing outta here!]
jerematic has quit [Remote host closed the connection]
jusmyth has quit [Client Quit]
checkit has joined #ruby
<godd2>
AlphaAtom there are plenty of things that are "just sugar"
<godd2>
remember, the computer doesn't care that we're using Ruby to program ;)
<jhass>
ruby has surprisingly few actual keywords
iamjarvo has joined #ruby
pico-pete has quit [Read error: Connection reset by peer]
pico-pete has joined #ruby
<alphaatom>
yeah, I'm not hating or anything, just trying to make sure I understand the language fully, plus its the first language i've ever seen use something like that