<workmad3>
eam: and you could also unambigously assign different values to upper and lower case, giving you 62 characters without roaming into symbols or non-latin glyphs
jenrzzz has quit [Ping timeout: 244 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
ta_ has quit [Ping timeout: 245 seconds]
s00pcan_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
emmesswhy has joined #ruby
SilkFox_ has quit [Ping timeout: 265 seconds]
<shevy>
eam digs deep into encoding
<eam>
and oddly, base16 allows for 17 characters to comprise the number string
<eam>
0-9a-fx
<eam>
but only with "x" as the second digit
djbkd has joined #ruby
valeriansaliou has quit [Read error: Connection reset by peer]
<pozican>
bricker: hrm, am I misunderstanding the << operator?
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s00pcan_ has joined #ruby
jordonbiondo has quit [Ping timeout: 245 seconds]
<sevenseacat>
definitely not the same
<bricker>
pozican: it looks more like you are misunderstanding =
<pozican>
:(
<pozican>
I'm trying to understand `stdout << data if stream == :stdout`
SOLDIERz has quit [Ping timeout: 256 seconds]
<bricker>
pozican: that works probably as you expect it would
<bricker>
pozican: the second snippet is doing... something else
<pozican>
the second snippet was my understanding :(
<terrellt>
I kind of expect stdout = data to set the local variable "stdout" to data.
pietr0 has quit [Quit: pietr0]
nicolastarzia has quit [Remote host closed the connection]
valeriansaliou has quit [Read error: Connection reset by peer]
skj3gg has joined #ruby
valeriansaliou has joined #ruby
<pozican>
Ok, what would i call the << operator?
<sevenseacat>
an append operator
<pozican>
oh
scripore has joined #ruby
roolo has joined #ruby
Hijiri has quit [Ping timeout: 264 seconds]
codefo has joined #ruby
valeriansaliou has quit [Client Quit]
deconfigured has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Quit: ciao.]
icebourg has quit []
roolo has quit [Ping timeout: 264 seconds]
<pozican>
I can't figure out why on_request('exit-status') gets called back on freebsd systems but not ubuntu systems
<pozican>
inside of Net::SSH::Connection::Session#exec
codefo has quit [Ping timeout: 245 seconds]
Xspl0it has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Hijiri has joined #ruby
DadoCe has joined #ruby
Xsploit has quit [Ping timeout: 264 seconds]
s00pcan_ has quit [Remote host closed the connection]
pwnz0r has quit [Remote host closed the connection]
emmesswhy has quit [Quit: Leaving]
pwnz0r has joined #ruby
Mia has quit [Read error: Connection reset by peer]
s00pcan_ has joined #ruby
nunayerBeezwax has quit []
s00pcan_ has quit [Remote host closed the connection]
DadoCe has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
beneggett has quit [Ping timeout: 256 seconds]
pwnz0r has quit [Ping timeout: 264 seconds]
skj3gg has quit [Quit: ZZZzzz…]
Spami has quit [Read error: Connection reset by peer]
pen has quit [Remote host closed the connection]
pen has joined #ruby
jetblack has quit [Ping timeout: 244 seconds]
pdoherty has joined #ruby
delianides has joined #ruby
s00pcan_ has joined #ruby
TheRinger has joined #ruby
GaryOak_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
s00pcan_ has quit [Remote host closed the connection]
iamninja has quit [Quit: ZZZzzz…]
alkoma has quit [Remote host closed the connection]
pen has quit [Ping timeout: 264 seconds]
sshao has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
delianides has quit [Ping timeout: 244 seconds]
thumpba has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
vinc has joined #ruby
mary5030 has joined #ruby
Rollabunna has joined #ruby
skj3gg has joined #ruby
sshao has quit [Ping timeout: 256 seconds]
Channel6 has joined #ruby
marr has quit [Ping timeout: 255 seconds]
Photism_ has quit [Quit: Leaving]
rbennacer has joined #ruby
graydot has joined #ruby
Rollabunna has quit [Ping timeout: 256 seconds]
Spami has quit [Quit: This computer has gone to sleep]
rpag has quit [Ping timeout: 265 seconds]
davasaurous has quit [Remote host closed the connection]
s00pcan_ has joined #ruby
s00pcan_ has quit [Remote host closed the connection]
beneggett has joined #ruby
pwh has quit []
babykosh has quit [Quit: babykosh]
rbennacer has quit [Ping timeout: 244 seconds]
pwh has joined #ruby
mleung_ has joined #ruby
baweaver has quit [Remote host closed the connection]
mleung has quit [Ping timeout: 256 seconds]
mleung_ is now known as mleung
pen has joined #ruby
Mdgd` has joined #ruby
<Mdgd`>
Hey guys
<Mdgd`>
I've got a weird issue in Rails and I was hoping you fellas could help me debug it.
Takle has joined #ruby
<Mdgd`>
I've got an applicationcontroller where I set some instanced vars, one of which @user, which references the currently logged in user.
mrmargolis has joined #ruby
<Mdgd`>
This basically does a .find() after establishing session[:id] isn't nil.
charliesome has joined #ruby
<zenspider>
... bring it back to ruby?
pen has quit [Remote host closed the connection]
<zenspider>
otherwise, you prolly want #rubyonrails
nfk has quit [Quit: yawn]
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Mdgd`>
All across the application this works, e.g. I can call @user.first_name anywhere. Except in a new controller/view combination I just generated, where it always returns nil. I have no idea why.
<ericwood>
hey ruby friends, I'm trying to organize a new project, but I'm not sure if I'm taking the right approach
<zenspider>
I'd push the instantiation into a bin/script
conniemj has joined #ruby
<zenspider>
makes for more testability too
<ericwood>
oooh good point
<zenspider>
I don't know how testable shoes apps are tho
<ericwood>
this whole thing will be not testable
<ericwood>
the critical piece of it is that thread with the timer thing going on
jordsmi has quit [Quit: Connection closed for inactivity]
<ericwood>
zenspider: what do you think about the @@ variables?
Hobogrammer has joined #ruby
s00pcan_ has quit [Remote host closed the connection]
duncannz has quit [Ping timeout: 245 seconds]
s00pcan_ has joined #ruby
<ericwood>
there's a couple big state things I need to keep track of across all of my bits and pieces
leafybasil has joined #ruby
<zenspider>
hrm... where's @@output?
Trep has quit [Read error: Connection reset by peer]
<ericwood>
oof I haven't committed it yet, it gets defined in the initializer of the Sequencer class
<ericwood>
it basically just looks like "@@input = UniMIDI::Input.use(:first)"
<zenspider>
ok. just confused. seems fine
<ericwood>
woohoo
<zenspider>
but I'm not in the camp of ZOMG NO CLASS VARS
<zenspider>
and many are
Trep has joined #ruby
bricker has quit [Ping timeout: 244 seconds]
conniemj has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
sankaber has joined #ruby
s00pcan_ has quit [Remote host closed the connection]
<ericwood>
if this were a more serious project I'd be inclined to be in that camp
<ericwood>
but it's so convenient for sharing state in this case :\
codeFiend has quit [Quit: codeFiend]
Kazuhiro has joined #ruby
tuelz1 has joined #ruby
Photism has joined #ruby
tuelz has quit [Read error: Connection reset by peer]
<zenspider>
I still access my cvars via methods 99% of the time
<Kazuhiro>
Is the cost of GC::Profiler.enable expensive in ruby 2.1.5? Or is this a negligible performance hit?
leafybasil has quit [Ping timeout: 240 seconds]
reset has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 244 seconds]
vin` has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
Techguy305 has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<zenspider>
Kazuhiro: tenderlove would be a better person to answer that than me... but I believe it is fairly negligible. IIRC, it isn't sampling, but it is still fairly lightweight
<zenspider>
not for production... but for measurement
jenrzzz has quit [Ping timeout: 264 seconds]
ishikawa91 has joined #ruby
<pipework>
You could benchmark your app with and without profiling. :D
ahem has joined #ruby
<Kazuhiro>
ok thanks.
ishikawa91 has left #ruby [#ruby]
emmesswhy has joined #ruby
yfeldblum has joined #ruby
Trep has quit [Read error: Connection reset by peer]
nicolastarzia has quit [Ping timeout: 245 seconds]
skj3gg has joined #ruby
codefo has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
<ptrin>
charliesome: ah, cool
s00pcan_ has quit [Remote host closed the connection]
AlexRussia has joined #ruby
<bradland_>
ptrin: that applies to most places where you’ve initialized an empty array and push on to it.
nanoyak has quit [Quit: Computer has gone to sleep.]
<charliesome>
ptrin: with the regex stuff, you can check for a match with the =~ operator and then use the back ref variables rather than indexing the match object
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<charliesome>
that trick is a double edged sword though, it can make code more concise and easy to read sometimes, and other times it can just make things confusing
<charliesome>
still worthwhile having that in your toolbox though
<ptrin>
Yeah, =~ is something that I've missed out on so far
<ptrin>
wasn't covered by codecademy :)
<gr33n7007h>
agreed on gistfile2 more readable to me :)
<charliesome>
also rather than passing the plane hash into each get_ method and having that method add data to the hash, I think you'd be better off returning that data from the method and doing the assignment in the main loop
<ptrin>
right
az7ar_away has joined #ruby
_maes_ has joined #ruby
Neomex has quit [Read error: Connection reset by peer]
JollyRoger12 has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
conniemj has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
jgrevich has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ajaiswal has joined #ruby
whomp has joined #ruby
whomp has quit [Client Quit]
ta_ has joined #ruby
silkfox has quit [Ping timeout: 240 seconds]
bradland_ has quit [Quit: bradland_]
<ericwood>
it's more active during work hours
<XvXBladeXvX>
Oh okay.
wallerdev has joined #ruby
* sevenseacat
is in work hours
hmsimha has quit [Ping timeout: 252 seconds]
<XvXBladeXvX>
I'm messing around with esxi at the moment anyway.
* sevenseacat
is messing around with promotions in Spree
thumpba has joined #ruby
reinaldob has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
sshao has joined #ruby
deric_skibotn has quit [Ping timeout: 264 seconds]
<ericwood>
what would be some good resources on code organization for ruby apps?
<ericwood>
I'm really weak in this area and would love to read about it
<pipework>
ericwood: Mostly I just look through gems I like or people I think aren't terrible's code.
reinaldob has quit [Ping timeout: 252 seconds]
<ericwood>
tumaru: get the fuck out you spammer
<ericwood>
PM spam is intolerable
<pipework>
A lot of people split up code by what kind of thing it is, I deal with it, but I prefer to split by vertical features, having a pseudovertical for shared behaviours.
_maes_ has joined #ruby
acrawford_ has quit [Remote host closed the connection]
<ericwood>
yeah, I'll just keep reading source code
sshao has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
<ericwood>
most of my ruby work falls either into the Rails category or simpler things that require minimal architecture
ptrin has quit [Quit: Page closed]
<ponga>
hi ericwood
<ericwood>
hello
Kazuhiro has left #ruby [#ruby]
Takle has joined #ruby
<ericwood>
I'm really upset with Shoes right now...I can't seem to split some threading code outside of the block the DSL takes in
<ericwood>
it makes no sense
baroquebobcat has joined #ruby
<ericwood>
the threading code is in a separate class; in the shoes DSL block I instantiate it thinking that'd work, but no
bradland_ has joined #ruby
<ericwood>
but if I copy/paste the thread code into that block directly it works
thumpba has quit [Remote host closed the connection]
Techguy305 has quit [Ping timeout: 252 seconds]
paulfm has quit [Quit: Zzzzz...]
dc__ has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
Guest67716 is now known as bl4ckdu5t
bl4ckdu5t is now known as Guest28988
hmsimha has joined #ruby
Guest28988 is now known as bl4ckdu5t
bl4ckdu5t has quit [Changing host]
bl4ckdu5t has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
cpt_yossarian has joined #ruby
Hijiri has quit [Ping timeout: 265 seconds]
metadave has joined #ruby
<bradland_>
when using attr_accessor, what is the difference in accessing the value using a class variable versus just the method name?
aagdbl has quit [Quit: This computer has gone to sleep]
<ericwood>
but yeah it's Ruby, nothing is truly private
<bradland_>
yeah, i’m used to that by now
Techguy305 has joined #ruby
Techguy305 has quit [Max SendQ exceeded]
braincrash has quit [Quit: bye bye]
davasaurous has joined #ruby
hephaestus_rg has joined #ruby
<bradland_>
pipework: what circumstance would they differ were a getter is not defined?
ohaibbq has joined #ruby
Techguy305 has joined #ruby
<pipework>
bradland_: you'd probably raise an exception trying to call the getter without it.
duncannz has joined #ruby
<pipework>
An instance method references a value. That's all it can do. A method can do anything.
<bradland_>
have another look at the code
<bradland_>
attr_accessor :foo
<bradland_>
err :bar
<pipework>
When you say getter not defined, what do you mean?
<bradland_>
so, in my example, if the method bar were not defined
<pipework>
Do you mean that there's no #foo method, or that there's an alternative foo method other than the one that attr_reader and attr_accessor defines?
<bradland_>
both @bar and bar still work
<pipework>
bradland_: It is defined, you're redefining it.
<bradland_>
well, technicall bar is defined by attr_accessor
<bradland_>
ok, i see. i was misunderstanding what you meant earlier
<pipework>
If it were not defined, I'd expect it to not be defined.
davasaurous has quit [Remote host closed the connection]
<pipework>
bradland_: What are you confused about though?
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<bradland_>
i meant the difference between the bar method being defined by calling attr_accessor versus defining it explicitly in the class body
<bradland_>
i’ll gist it up
Fusl has quit [Ping timeout: 250 seconds]
<pipework>
bradland_: Not much.
bigmac has quit [Read error: Connection reset by peer]
<wasamasa>
install it, then see whether any more errors pop up
<superrorc>
got it! =)
<superrorc>
gem installed
^wald0 has joined #ruby
mquin has quit [Read error: Connection reset by peer]
mquin has joined #ruby
yfeldblu_ has joined #ruby
unshadow has joined #ruby
<unshadow>
What is the 'right' way to restart\poweroff a Linux system from inside a ruby code ? I know I can do system("poweroff") or %x(poweroff), but is there a better way ?
yfeldblum has quit [Ping timeout: 256 seconds]
Takle has joined #ruby
<ddv>
unshadow: shutdown -r now, shutdown -h now?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ddv>
unshadow: not sure if restarting a system via ruby is the best way to do it though
<unshadow>
ddv: yeha, but those are shell commands, I mean a better way to do that programic speaking
<unshadow>
instead of sending poweroff into shell
<ddv>
maybe some gem exists that wraps some systemcalls
<unshadow>
TBH, sending Process.kill('SIGHUP',1) will do it no ?
hephaestus_rg has quit [Ping timeout: 264 seconds]
baltazore has joined #ruby
arup_r_ has quit [Remote host closed the connection]
Mia has joined #ruby
elaptics`away is now known as elaptics
LouisRoR has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
conniemj has joined #ruby
pwnz0r has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
<astrobun_>
here is a completely uneducated and irresponsible answer: maybe use the original version you were using before?
<evlute>
I'm using Archlinux. Rolling Release. So i did not see that it was going to ruby 2.2.0.
poetazus_ has joined #ruby
poetazus_ has quit [Remote host closed the connection]
<evlute>
But i have to downgrade what will need some time, because i have to get rvm.
josephndenton has quit [Ping timeout: 244 seconds]
Takle has joined #ruby
<evlute>
So i was hoping that it will be easy to fix the problem with your help and stay at the new version of ruby which can't be wrong.
dangerousdave has joined #ruby
<canton7>
evlute, are you using 'mysql' or 'mysql2'?
<unshadow>
I'm using Arch too, if by "breaking" you mean all those gems shuting "pristine me" then use gem pristine --all, or, Like I did, install ruby via RVM
<shevy>
like a lucky charm or a little buddha, a shevy brings good luck and fortune
SOLDIERz has quit [Quit: Be back later ...]
krz has joined #ruby
zorak8 has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
SOLDIERz has joined #ruby
RTG` has joined #ruby
thsig has joined #ruby
<leafybasil>
Strangely, my client shows a ruby in the bottom right corner of this channel's log. Is this an actual IRC feature or just my client?
SOLDIERz has quit [Ping timeout: 244 seconds]
kp666 has joined #ruby
larissa has joined #ruby
larissa has left #ruby [#ruby]
<thatslifeson>
probably just your client
poetazus has joined #ruby
koderok has quit [Quit: koderok]
wpp has quit []
thiagovsk__ has joined #ruby
sigurding has joined #ruby
ferr has joined #ruby
Timgauthier has joined #ruby
<ddv>
leafybasil: your client
<leafybasil>
That seems like a really odd choice...
ajaiswal has quit [Quit: Leaving]
<canton7>
maybe it has some ruby plugin infrastructure?
<canton7>
which client is it?
<leafybasil>
It's not written in Ruby, and it doesn't seem to happen for other languages.
<leafybasil>
Limechat
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
himsin has quit [Quit: himsin]
<ddv>
leafybasil: try textual
hamakn has quit [Remote host closed the connection]
<leafybasil>
why?
<canton7>
looks like it might have a ruby plugin architecture?
<leafybasil>
If anything ddv I'm going back to IRSSI
<ddv>
if that is your cup of tea I would use WeeChat
<workmad3>
but irssi has true-colour console support now!
<certainty>
yeah, i don't like that
<workmad3>
certainty: you don't like 24bit colour? :(
<certainty>
no
<certainty>
i like 2 bit color
<certainty>
black and white
<canton7>
so.. 1 bit colour?
<certainty>
erm
<certainty>
yeah
* certainty
goes back to bed
<canton7>
:P
<certainty>
ok i deserve it
emirozer has joined #ruby
<certainty>
you're allowed to bash
sandelius has joined #ruby
<canton7>
heh, I'm hardly awake myself
<workmad3>
canton7: yeah, just rub it in, make certainty feel even worse ;)
alex88 has quit []
<canton7>
nooo I didn't mean it like that
<workmad3>
canton7: :D
* canton7
proof that he's still asleep
gfawcettpq has joined #ruby
<workmad3>
bleh, I should stop reading things about securing services... I then want to roll things into my chef deploy
hamakn has joined #ruby
<workmad3>
and then I'm waiting for hours for /etc/ssh/moduli to regenerate...
<workmad3>
similar happened when I realised the default dhparams file for nginx was only 1024 bit... waiting for entropy to generate these keys just takes an age :(
krzkrz has quit [Read error: Connection reset by peer]
kasperti_ has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
krzkrz has joined #ruby
<leafybasil>
ddv: again, any reason for the recommendation?
<ddv>
leafybasil: well weechat has easy to use horizontal/vertical splits
<workmad3>
leafybasil: weechat is a bit easier to configure and I think has a nicer plugin architecture... but I personally stuck with irssi :)
nicolastarzia has joined #ruby
<leafybasil>
ddv: irssi has easy to use splits?
<ddv>
I found them to be a hassle in irrsi
mikecmpbll has joined #ruby
krz has quit [Ping timeout: 265 seconds]
haroldwu has joined #ruby
haroldwu has quit [Changing host]
haroldwu has joined #ruby
psy_ has joined #ruby
krz has joined #ruby
avril14th has quit [Ping timeout: 264 seconds]
nicolastarzia has quit [Ping timeout: 264 seconds]
pico-pete has joined #ruby
bronson has joined #ruby
jdripper has joined #ruby
lordvirtex has quit [Ping timeout: 240 seconds]
<arup_r>
Suppose let(:dbl) { double('user) } is a test double... What extra configuration will treat as partial test double? I'm not able to understand the thin difference between them.. Please some lights on it
shazaum has joined #ruby
valeriansaliou has joined #ruby
SOLDIERz has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
oo_ has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
shazaum has joined #ruby
shazaum has quit [Changing host]
SolarSailor has quit [Ping timeout: 244 seconds]
elabs-developer has joined #ruby
Takle has quit [Remote host closed the connection]
SOLDIERz has quit [Ping timeout: 240 seconds]
pico-pete has quit []
fabrice31 has joined #ruby
dangerousdave has joined #ruby
<arup_r>
It seems no body use here Rspec :)
sigurding has quit [Quit: sigurding]
tvw has quit [Ping timeout: 264 seconds]
<ddv>
arup_r: minitest is all you need
<ddv>
even DHH hates rspec
blizzy has joined #ruby
shredding has quit [Quit: shredding]
<workmad3>
ddv: both of those are rather poor arguments, IMO :P
<ddv>
I blindly follow DHH
avril14th has joined #ruby
<workmad3>
:)
poetazus has quit [Remote host closed the connection]
<arup_r>
ddv: Rspec is easy to install :)
<arup_r>
and easy to write read/write...
<workmad3>
arup_r: 'easy to install' is a rather poor response too ;) seeing as minitest is part of stdlib ;)
<arup_r>
Install 3 packages.. and you are done..
<arup_r>
workmad3: It seems so.. But while you start working.. it needs hell lots of other gems to work on
<workmad3>
arup_r: of course, I omitted what he is the cutest example of...
<arup_r>
I see that ;)
devoldmx has quit [Remote host closed the connection]
<arup_r>
waxjar: Thanks for letting me know. I never heard about it.
<waxjar>
it's basically miniminitest, i doubt you'll like it much :p
<arup_r>
Aww.. /me is stepping back then..
* arup_r
is stepping back then..
SilkFox_ has joined #ruby
* arup_r
has allergy with minitest
shredding has joined #ruby
Tricon has quit [Ping timeout: 244 seconds]
avril14th has joined #ruby
Spami has quit [Max SendQ exceeded]
<ddv>
arup_r: because you are asking very basic questions all the time
<arup_r>
ddv: basic is relative to one's skill.. Is not it?
<waxjar>
but i think it's all you need really, ruby has built-in functionality for mocking and stubbing (just redefine the method). benchmarks don't belong in tests (i want them to run quick, please).
<ddv>
arup_r: well not everyone is a genius like me
<arup_r>
ddv: God knows and you ofcourse :)
<ddv>
I don't believe in a God
Spami has joined #ruby
<arup_r>
Then you know only..
<workmad3>
I have no need for this 'god' hypothesis... :)
DadoCe has joined #ruby
<arup_r>
ddv: Ego and sometimes patience is the only problem
hmsimha has joined #ruby
SilkFox_ has quit [Ping timeout: 244 seconds]
<ddv>
arup_r: the genius remark was actually sarcasm
<workmad3>
I always love people who say "You don't need the extra features of X, because you can do everything you need just with Y" and then they use ruby instead of assembler...
<arup_r>
one who don't have these should not be the member any community.. as it is harmful
avril14th has quit [Ping timeout: 244 seconds]
aganov has quit [Ping timeout: 252 seconds]
<arup_r>
ddv: I have no problem with why do you have ?
<arup_r>
with you**
<chipotle_>
good morning; i'm up way too early
<sandelius>
Is it possible it intergare rails autoloading feature in a sinatra app?
<arup_r>
Lets discuss something helpful in Ruby...
snath has quit [Ping timeout: 244 seconds]
<arup_r>
sandelius: join #sinatra
<workmad3>
sandelius: it would be rather painful, I suspect
<workmad3>
sandelius: personally, I'd suggest just setting up guard for the project and configuring it to restart your sinatra app when you change files
<ponga>
i always ask stupid questions
<sandelius>
Trying to read the source for require_dependency but it's a mess
delianides has joined #ruby
<ponga>
don't i shevy?
teddyp1c_ has joined #ruby
SOLDIERz has joined #ruby
<arup_r>
ponga: Hi
<workmad3>
sandelius: reloading code in a running process is a mess
<workmad3>
sandelius: it's useful... but it's also messy :)
<sandelius>
workmad3 it's not the reloading part I want, I can live without that, I just don't wan't to include all files manually
<workmad3>
sandelius: and with rails having pretty slow start up times, it was a bit prohibitive to simply restart the server on file changes
emirozer has quit [Quit: Be back later ...]
Macaveli has joined #ruby
<waxjar>
shotgun works pretty well, though it's a bit slow
<workmad3>
Bish: because the block isn't something that can exist on its own... so when you chain a method onto the end of a block, it gets called on the result of the previous method
jack_rabbit has quit [Ping timeout: 264 seconds]
<workmad3>
Bish: or, in other words, it works for the same reasons that 'foo(a, b, c).bar' works and .bar isn't called on the parameter list ;)
aganov has joined #ruby
phutchins has joined #ruby
<workmad3>
Bish: also, by wrapping the block in parens, ruby identified the opening { as a hash literal... hence the syntax error ;)
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
Takle has joined #ruby
Pharaoh2 has joined #ruby
doodlehaus has joined #ruby
conniemj has quit [Ping timeout: 264 seconds]
npg has quit [Quit: npg]
<Bish>
but the syntax looks really weird, doing something like that
<workmad3>
Bish: looks pretty normal to me, tbh :P
<Bish>
so if select also had a parameter
<Bish>
it would look like x.select(param){...}.each {..}
<Bish>
?
renderful has joined #ruby
pengin has quit [Remote host closed the connection]
delianides has quit [Remote host closed the connection]
echooo has quit [Quit: echooo]
<Bish>
>> 1..3.select(){|x| x > 0}.each { |x| p x }
<eval-in>
Bish => private method `select' called for 3:Fixnum (NoMethodError) ... (https://eval.in/240542)
<Bish>
>> (1..3).select(){|x| x > 0}.each { |x| p x }
<havenwood>
cvtsx1: I meant everything, from where you require to where the code is called. I imagine the answer is somewhere between what you've pasted.
<cvtsx1>
kk lol
fabrice31 has quit [Ping timeout: 245 seconds]
uri_ has joined #ruby
<havenwood>
cvtsx1: My guess would be that you're calling `Net::HTTP` inside a namespace so you need to use `::Net::HTTP`.
maletor has quit [Quit: Computer has gone to sleep.]
<cvtsx1>
will it let u do that in the console?
rbrs has quit [Quit: rbrs]
<surs>
I run FileUtils.touch(errorLogFilePath) , errorLogFilePath is defined on the previous line. When this line is executed the variable errorlogFilePath gets destroyed. Why?
<havenwood>
cvtsx1: depends, but typically sure
<havenwood>
cvtsx1: are you running this on a toaster?
sambao21 has quit [Quit: Computer has gone to sleep.]
<cvtsx1>
i know in cmd you can but not in the ruby console
<havenwood>
toasters don't usually have screens, unless they're really nice
Takle has quit [Remote host closed the connection]
<havenwood>
cvtsx1: irb you mean?
livathinos has quit [Ping timeout: 240 seconds]
<cvtsx1>
yeah, i just started ruby
<havenwood>
cvtsx1: Pry is a very nice alternative to irb by the way. Just `gem install pry pry-doc` and use `pry` instead of `irb`. http://pryrepl.org/
DaniG2k has quit [Ping timeout: 256 seconds]
<havenwood>
cvtsx1: You can gist code directly from Pry. You might also need to `gem install gist`.
Morkel has quit [Quit: Morkel]
<havenwood>
surs: It gets destroyed? Have a code example to gist so we can see what you mean?
<cvtsx1>
kk but how do i specify whether i want to run irb or pry? I use notpad++
<waxjar>
surs, are you sure you're not misspelling it?
doodlehaus has joined #ruby
<surs>
after 5 times, I'm pretty sure
jefus has quit [Ping timeout: 245 seconds]
<havenwood>
cvtsx1: I don't know how one would use a REPL from notepad++, I've never used it.
<surs>
how can I list the local variables? I'm running ruby bla.rb -rdebug
<bradland>
cvtsx1: you should be able to use your mouse to select text regardless of whether you're at a command prompt or at an irb prompt
Takle has joined #ruby
<bradland>
cvtsx1: i can walk you through this, but i need some basic info
<bradland>
what operating system are you using?
<cvtsx1>
windows 8
DaniG2k_ has quit [Read error: Connection reset by peer]
<bradland>
ok, and when you run your program, are you running it from a window you started with cmd.exe?
<waxjar>
if you just want to run a file, use the ruby executable rather than the irb executable
<cvtsx1>
save the ruby file to my desktop and click on the icon
<bradland>
ok, so you're double-clicking the file to run it, correct?
<cvtsx1>
yes
baroquebobcat has joined #ruby
<bradland>
ok, i want you to do a couple of things differently
<bradland>
this will make it easier to get help
<cvtsx1>
k
<bradland>
and to understand what's happening
<bradland>
you're going to need to get comfortable with the command line
<cvtsx1>
i am
<bradland>
ok, do you know how to start a cmd.exe session?
<cvtsx1>
ya
mleung has joined #ruby
<surs>
how can I list the local variables? I'm running ruby -rdebug bla.rb
<bradland>
ok, great. i want you to start a cmd.exe window
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
surs: local_variables
<bradland>
rather than double-clicking a file to run it, you should use "cd" to navigate to where the ruby file is, then type "ruby filename.rb" to run the file
<bradland>
when you receive an error, the window will stay open, and you'll return to the prompt
<pipework>
Well, yeah. But more specifically, it's referencing the value at the constant Net::HTTP
<bradland>
right
<bradland>
the key is to understand that it's a hierarchy
<cvtsx1>
hmm so req should be a const?
<bradland>
HTTP is "within" Net
<bradland>
but where is Net?
<bradland>
that's what the warning is talking about
<bradland>
it's looking for Proxycheck::Net
GaryOak_ has joined #ruby
<cvtsx1>
k
<pipework>
In the global namespace.
apeiros has joined #ruby
<bradland>
you know how paths in HTML can be relative or root based?
Hobogrammer has quit [Read error: Connection reset by peer]
<bradland>
root relative: /folder/file.jpg
St1gma has joined #ruby
<bradland>
versus relative: folder/file.jpg
<cvtsx1>
ya
<bradland>
it's the same with ruby namespaces
Takle has quit [Remote host closed the connection]
<bradland>
relative: Net::HTTP
<bradland>
root relative: ::Net::HTTP
<bradland>
the characters :: are the namespace separator
<bradland>
just like the character / is the file path separator
<cvtsx1>
k
<workmad3>
bradland: you mean 'absolute' not 'root relative'
<bradland>
so if you say ::Net::HTTP, you're telling Ruby to look at the root of the namespace
cazrin has quit [Remote host closed the connection]
msgodf has quit [Remote host closed the connection]
<cvtsx1>
k
<bradland>
any time someone corrects my terminology, you should pay close attention, because i'm horrible about that :)
athan has quit [Remote host closed the connection]
<cvtsx1>
lol
<bradland>
::Net::HTTP is an absolute path
<workmad3>
also, un-rooted constant references in ruby will 'look up' the scope if it doesn't find a match (unlike HTTP paths or file system paths)
<bradland>
err, not path
<bradland>
lol
<bradland>
again with the terminology
defrang has quit [Quit: defrang]
<pipework>
It just references the top-level namespace.
<cvtsx1>
k
DadoCe has joined #ruby
sambao21 has joined #ruby
<bradland>
so to resolve that error, should he use ::Net::HTTP ?
<workmad3>
(and by 'the scope', I mean the lexical scope that you can look at by using Module.nesting)
<cvtsx1>
bradland just tried it and i am still getting errors
<bradland>
different error or the same?
<cvtsx1>
but it did solve that one error
<workmad3>
bradland: the 'top level constant' bit is just a warning by the way
<bradland>
ya
<workmad3>
(also to cvtsx1)
defrang has joined #ruby
defrang has quit [Client Quit]
<workmad3>
it's saying "You used Net::HTTP inside Proxycheck, but Proxycheck::Net didn't exist so we used ::Net::HTTP instead"
sambao21 has quit [Client Quit]
jmcharnes has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has joined #ruby
<cvtsx1>
hmm it did solve that warning :)
<workmad3>
right, because you're now explicitly stating that you want to use the Net from the global namespace, rather than relying on the lexical scoping rules to find the right one
<workmad3>
cvtsx1: ok, so the problem is probably that you're trying to connect to an HTTPS site without having loaded 'net/https' (which pulls in SSL support) and possibly also an error if you're trying to connect to it via an http proxy
sambao21 has joined #ruby
<cvtsx1>
workmad3 ok, i dont think any of the proxies support ssl so should i use another site w/o ssl?
<workmad3>
cvtsx1: the 'could not find class' is going to be because it's trying to find Net::HTTPS, and you haven't loaded it (put require 'net/https' at the top)
<workmad3>
cvtsx1: I'd suggest so, yes
lele has quit [Ping timeout: 265 seconds]
gsd has joined #ruby
<workmad3>
cvtsx1: if you don't think you have an https proxy
<cvtsx1>
ok
fryguy9 has joined #ruby
<cvtsx1>
same errors :(
conniemj has joined #ruby
<cvtsx1>
is there something wrong with my installation? like am i missing some libraries?
rbrs has joined #ruby
delianides has joined #ruby
C1V0 has quit [Ping timeout: 245 seconds]
<workmad3>
cvtsx1: as for why you're getting malformed exception output... that's because you're catching the exception and then printing it out using a method that doesn't print newlines in arrays :)
<cvtsx1>
changed the site to stackoverflow.com (non ssl) and same errors
C1V0 has joined #ruby
<cvtsx1>
k
<cvtsx1>
how should i go about doing it?
nicolastarzia has joined #ruby
harax has quit [Ping timeout: 252 seconds]
<cvtsx1>
loop through it?
icebourg has joined #ruby
<workmad3>
cvtsx1: personally, I'd say don't catch the exception
geggam has joined #ruby
<workmad3>
cvtsx1: especially don't catch the exception with a 'rescue Exception' block...
<bradland>
yeah, right now, pull out the rescue line and the two puts
<cvtsx1>
why?
<bradland>
because Exception is too broad
<cvtsx1>
k
<bradland>
you're literally catching everything
<workmad3>
including syntax errors
thsig has quit [Remote host closed the connection]
<bradland>
with exception handling, you only want to catch exceptions when you can do something productive with them
wallerdev has joined #ruby
lkba_ has quit [Quit: Bye]
<cvtsx1>
k
lkba has joined #ruby
<bradland>
if you're just going to put the message and let the script die, you can just not catch the exception at all
jefus_ is now known as jefus
thsig has joined #ruby
pu22l3r_ has quit [Ping timeout: 255 seconds]
<workmad3>
cvtsx1: I can see why you wanted to put in the exception handling... it's so you can try a proxy and move on to the next if it fails, correct?
<cvtsx1>
yeah kinda like a on error do next
<workmad3>
cvtsx1: but right now, it would be more useful for your dev efforts to ignore the error handling :)
gr33n7007h has joined #ruby
<cvtsx1>
kk
renderful has quit [Remote host closed the connection]
<workmad3>
cvtsx1: and just let the script get killed when a proxy that should work isn't
<cvtsx1>
k
n008f4g_ has quit [Ping timeout: 244 seconds]
max96at is now known as max96at|off
lele has joined #ruby
nicolastarzia has quit [Ping timeout: 252 seconds]
<gr33n7007h>
do you know what the terminal font is called?
<workmad3>
gr33n7007h: I think mine defaulted to monaco
gfawcettpq has joined #ruby
<workmad3>
gr33n7007h: but I changed it on my machine :)
<gr33n7007h>
workmad3, cheers, lemme check :)
andikr has quit [Remote host closed the connection]
<arrubin>
gr33n7007h: The defaul tis Monico I believe.
<gr33n7007h>
arrubin, thanks :)
Macaveli has joined #ruby
<arrubin>
Actually, looks like Menio now.
bricker has joined #ruby
tumaru has joined #ruby
<arrubin>
There are different profiles. The default is Menio. Some others use Monaco and Courier.
greenbagels has joined #ruby
yfeldblum has joined #ruby
SilkFox_ has quit [Ping timeout: 245 seconds]
<arrubin>
And Andale Mono.
codeFiend has quit [Quit: codeFiend]
max96at|off is now known as max96at
<arrubin>
I believe that the default in iTerm is Monaco though.
<gr33n7007h>
It looks like the monaco one is it
apurcell has quit [Ping timeout: 264 seconds]
renderful has joined #ruby
az7ar is now known as az7ar_away
<gr33n7007h>
super, monaco's the one ;)
<gr33n7007h>
cheers guys
n3b has left #ruby [#ruby]
elabs-developer has quit [Quit: elabs-developer]
claw_ has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
recurrence has joined #ruby
claw has quit [Ping timeout: 256 seconds]
deric_skibotn has joined #ruby
thsig_ has joined #ruby
thsig has quit [Read error: Connection reset by peer]
chrishough has joined #ruby
pdoherty has quit [Remote host closed the connection]
thsig has joined #ruby
harax has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 264 seconds]
josephnd1nton has joined #ruby
russt has quit [Read error: Connection reset by peer]
Flcn has joined #ruby
thsig_ has quit [Ping timeout: 245 seconds]
russt has joined #ruby
livingstn has joined #ruby
tus has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
thumpba has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 264 seconds]
Maxino has joined #ruby
thumpba_ has joined #ruby
josephnd1nton has quit [Ping timeout: 252 seconds]
codeFiend has joined #ruby
einarj has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
blackmesa has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
thumpba has quit [Ping timeout: 244 seconds]
dc_ has joined #ruby
pwnz0r has joined #ruby
godd2 has joined #ruby
french has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
econerd4ever has joined #ruby
<dfinninger>
anyone worked with Mixlib::Config before?
<dfinninger>
trying mix config_contexts and from_file
xxneolithicxx has joined #ruby
wallerdev has quit [Quit: wallerdev]
Mdgd` has quit [Quit: Leaving]
<xxneolithicxx>
hello all, does ruby have any built in numeric range constants for things a C/C++ unsigned long int max
wald0 has joined #ruby
pdoherty has joined #ruby
<pwnz0r>
a range or a constant?
<xxneolithicxx>
constant
Tricon has quit [Quit: leaving]
<xxneolithicxx>
like Fixnum.uint_max == 4,294,967,295
Tricon has joined #ruby
<xxneolithicxx>
i know ruby doesnt technically have the same limitations number wise just looking to see if some of the standard values are stored as constants somewhere
uri_ has quit [Read error: Connection reset by peer]
mjuszczak has joined #ruby
harax has quit [Ping timeout: 245 seconds]
robustus is now known as robustus|Off
osvico has joined #ruby
djbkd has quit [Remote host closed the connection]
<omosoj>
i want to use the select method to shorten an object jsut to see if i'm workign in the right part of the code. don't know if it's a hash or array or anything
djbkd has joined #ruby
tkuchiki has joined #ruby
<apeiros>
omosoj: uh, just ask the object what it is?
<omosoj>
how do i do that? it's tangled in a rails app
<apeiros>
obj.class
<apeiros>
obj.is_a?
<omosoj>
where do i type that?
<omosoj>
it appears as super in thsi method
<apeiros>
super is like a method call
elaptics is now known as elaptics`away
Takle has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ciao.]
<omosoj>
is there a simple way to select every other object or something? just looking for something quick and dirty
agjacome has joined #ruby
<apeiros>
so you either assign the return value of super, print the value of obj.class, then let it continue using the variable you assigned the value to
<apeiros>
it's a rather bad idea to do *something* on stuff you have no clue what it is.
allcentury has joined #ruby
<apeiros>
but sure… see things like each_slice
<omosoj>
apeiros, why? i just want to know if i'm in the right part of the code to alter this. it wont be permanent
teddyp1cker has quit [Read error: Connection timed out]
arup_r has quit [Ping timeout: 264 seconds]
<apeiros>
you seem to be using rather odd tools for your purposes.
harax has joined #ruby
cazrin has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
elaptics`away is now known as elaptics
arup_r has joined #ruby
teddyp1cker has joined #ruby
<omosoj>
lol i'm a newbie, trying to learn :)
luksaur has quit [Ping timeout: 264 seconds]
LouisRoR has quit [Ping timeout: 252 seconds]
Pharaoh2 has joined #ruby
Lewix has quit [Remote host closed the connection]
evanjs has quit [Remote host closed the connection]
renderful has quit [Remote host closed the connection]
Techguy305 has joined #ruby
mjuszczak has quit []
Techguy305 has quit [Max SendQ exceeded]
allcentury has quit [Ping timeout: 255 seconds]
fandi has joined #ruby
davedev2_ has joined #ruby
luksaur has joined #ruby
luksaur has quit [Changing host]
luksaur has joined #ruby
cazrin has quit [Ping timeout: 264 seconds]
treehug88 has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
davedev24_ has quit [Ping timeout: 255 seconds]
bitcycle has quit [Ping timeout: 245 seconds]
mjuszczak has joined #ruby
athan has joined #ruby
defrang has joined #ruby
apurcell has joined #ruby
tier has joined #ruby
sambao21 has joined #ruby
Zekka has quit [Read error: Connection reset by peer]
mjuszczak has quit [Client Quit]
Photism_ has joined #ruby
Photism has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
jottr has joined #ruby
wallerdev has joined #ruby
Maxino has quit [Quit: Leaving]
Spooner has joined #ruby
allcentury has joined #ruby
treehug88 has joined #ruby
Ankhers` has joined #ruby
sargas has joined #ruby
SparkMasterTape has joined #ruby
<sargas>
when can you call send messages to `end`? Ex: `end.present?`
<apeiros>
sargas: misunderstanding. you don't send messages to end. ever.
<apeiros>
you send messages to the *object* returned by the expression terminated by end.
<sargas>
I see
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sargas>
apeiros: is it possible on method definitions?
<sargas>
apeiros: Thanks, it takes time to comprehend some concepts still...
jenrzzz has quit [Ping timeout: 244 seconds]
Faiqus has joined #ruby
hornairs_ has joined #ruby
Ankhers` is now known as Ankhers
sambao21 has quit [Quit: Computer has gone to sleep.]
rdark has quit [Quit: leaving]
amoeba has quit [Quit: Leaving]
jenrzzz has joined #ruby
sambao21 has joined #ruby
djbkd has quit [Remote host closed the connection]
Photism has joined #ruby
bitcycle has joined #ruby
Photism_ has quit [Read error: Connection reset by peer]
doodleha_ has quit [Remote host closed the connection]
hornairs has quit [Ping timeout: 256 seconds]
sambao21 has quit [Client Quit]
Tricon has quit [Quit: leaving]
Tricon has joined #ruby
<sargas>
gr33n7007h: that's great, blocks are awesome
codeFiend has joined #ruby
djbkd has joined #ruby
<gr33n7007h>
:)
<sargas>
I'm going to play with these more, including on procs and lambdas
sambao21 has joined #ruby
<bradland>
omosoj: if you have an object buried deep within a rails app, use Rails.logger to write information about it to the log, and keep `tail -f log/development.log` running in a separate tab
<bradland>
be sure to choose the appropriate log level, and clean up when you're done
<bradland>
here's a guide: rpvps11
rkalfane has joined #ruby
bitcycle has quit [Ping timeout: 244 seconds]
akemrir has quit [Quit: WeeChat 1.0.1]
<bradland>
cvtsx1: how's the debugging going?
pengin has quit [Remote host closed the connection]
<powersurge>
so in an activerecord model I've got an attr_accessor :current_user, but when to_yaml gets called on it, the yaml serialization no longer has the current_user
<powersurge>
I'm guessing that activerecord overrides the to_yaml in some way but I'm a little bit confused in how to track that down and how to get it to deserialize as an ActiveRecord instance with current_user property intact
<pipework>
Because #attributes
ptrrr has joined #ruby
mjuszczak has joined #ruby
studiotate has joined #ruby
<powersurge>
I did see that all of the activerecord attribtues were serialized into an attributes list
<powersurge>
is there a way to get my normal attr_accessor methods + their related ivars to serialize/deserialize?
dumdedum has quit [Quit: foo]
<pipework>
Yeah, but it sucks.
<Senjai>
powersurge: You might as well not use attr_accessor if you need to do things
<Senjai>
powersurge: Just define the getter and setters yourself
jerius has joined #ruby
<Senjai>
powersurge: Or is this a rails question
treehug88 has quit [Ping timeout: 244 seconds]
<pipework>
Senjai: Still won't help with the #attributes stuff.
<Senjai>
powersurge: serialize :attribute
<Senjai>
in rails
<powersurge>
it is a rails project
pdoherty has quit [Remote host closed the connection]
<powersurge>
I'm not really in control of the serializer, it's just incidental that it gets serialized to yaml as a part of another library
<Senjai>
If you wanted to persist abstract data types to the database, you'll want to use serialize on the model
<bradland>
yes, the context matters
<bradland>
just something to look at. use it only if it fits your need.
pdoherty_ has joined #ruby
mjuszczak has quit [Ping timeout: 252 seconds]
<pipework>
powersurge: You can insert a serializer to call #to_yaml on eventually.
<pipework>
But .serialize is the better choice here.
treehug88 has joined #ruby
az7ar_away is now known as az7ar
bitcycle has joined #ruby
djbkd has quit [Remote host closed the connection]
<powersurge>
hmmm
sinkensabe has quit [Remote host closed the connection]
pengin has joined #ruby
<powersurge>
I added serialize :current_user just below my attr_accessor called and in the rails console I tried doing .to_yaml on an appraisal that I set a current_user on and it doesn't seem to be in the yaml representation
<powersurge>
did I miss a step?
treehug88 has quit [Max SendQ exceeded]
az7ar is now known as az7ar_away
cazrin has quit [Remote host closed the connection]
<Senjai>
whoa whoa
<Senjai>
Are you trying to serialize another active record model
<powersurge>
yea, I am
<Senjai>
why
treehug88 has joined #ruby
<Senjai>
Just use the association
<powersurge>
there's no association
<Senjai>
make one
<Senjai>
Serialization is for database attributes
<powersurge>
so here's what's happening
sambao21 has quit [Quit: Computer has gone to sleep.]
<powersurge>
I have an appraisal and the user who is currently doing work is attached as a property (because someone at some point thought that was a good idea) and then when an event is called (via the state_machine gem) it captures who is performing that event via current_user
<Senjai>
code plz
<Senjai>
Code speaks louder than words
pu22l3r has joined #ruby
<powersurge>
and that all worked fine. but now that I need to send an appraisal into a delayed_job, which serializes it as yaml to the db and deserializes later, it's breaking down
treehug88 has quit [Read error: Connection reset by peer]
<pontiki>
powersurge: !code
<helpa>
powersurge: 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.
sambao21 has joined #ruby
treehug88 has joined #ruby
<powersurge>
I'll see if I can't get you guys a couple of snippets
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
jottr has joined #ruby
x77686d has joined #ruby
marr has quit [Read error: Connection reset by peer]
<jeregrine>
anyone know if there is a changelog for ruby-pg?
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<powersurge>
hmmm, I'm not even sure how to capture the current_user in a transition callback
<powersurge>
what a pain
mjuszczak has joined #ruby
jmosco has left #ruby ["WeeChat 0.4.2"]
DonOtreply has joined #ruby
DonOtreply has quit [Client Quit]
pengin has joined #ruby
<apeiros>
powersurge: select current_user() ?
shaileshg has joined #ruby
emmesswhy has joined #ruby
gheegh has joined #ruby
<apeiros>
oh, actually not a function. just `select current_user`
blackmesa has quit [Ping timeout: 244 seconds]
claymore has joined #ruby
hornairs_ has quit [Quit: hornairs_]
wolf4ood has quit [Quit: (null)]
thsig has joined #ruby
Photism has quit [Read error: Connection reset by peer]
Photism has joined #ruby
^wald0 has quit [Quit: ^wald0]
SilkFox_ has joined #ruby
claw__ has joined #ruby
bricker has quit [Ping timeout: 255 seconds]
davedev24_ has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lingo___ has quit [Quit: (null)]
TheTopBloke has joined #ruby
<TheTopBloke>
Hello, I take it this is the place to ask all ym stupid ruby questions?
davedev2_ has quit [Ping timeout: 255 seconds]
jgrevich has joined #ruby
<TheTopBloke>
It has been a while since I've used it, so I'm sure I will have a couple good one
<shevy>
yea
<shevy>
there are no stupid questions
SilkFox_ has quit [Ping timeout: 244 seconds]
<TheTopBloke>
thanks. Does anyone on here use textmate?
<shevy>
if the asker is honestly seeking answers
<wasamasa>
only questions that make people post stupid answers
<Senjai>
TheTopBloke: Nope, only you
<wasamasa>
TheTopBloke: no metaquestions please
claw_ has quit [Ping timeout: 245 seconds]
<shevy>
I guess only osx users use mac; I am on linux. but ask guys such as apeiros or havenwood
<TheTopBloke>
what is a metaquestion?
<shevy>
erm *use textmate
<Senjai>
shevy: Nuuu, dont encourage that type of question
<wasamasa>
TheTopBloke: a question used to introduce your real question
<Senjai>
TheTopBloke: Your the only person to ever use it ever
<shevy>
it's a perfectly fine question to have
<Senjai>
shevy: No it isnt
<shevy>
yeah it is
<Senjai>
shevy: Instead, he should ask the question he wants to ask if someone says yes
<TheTopBloke>
Ok, I'll RTFM and get back to you in a bit.
<Senjai>
shevy: and wait
<shevy>
if you don't like it then don't answer Senjai
<wasamasa>
TheTopBloke: in other words, just ask directly instead of screening for people who could answer it
<Senjai>
shevy: I'm pretty sure I'm not alone in this. It's kind of a thing, like everywhere
Pharaoh2 has joined #ruby
<shevy>
Senjai what difference does it make whether you are alone in this or not?
<havenwood>
TheTopBloke: Yeah, I really like TextMate 2. They won me over by going with a GNU license for version 2.
thumpba has quit []
<Senjai>
shevy: Because that means I'm more correct than you are, obviously
<shevy>
Senjai the question is perfectly fine to have. I don't understand why you want TheTopBloke to not ask questions like that.
<havenwood>
TheTopBloke: It's fast and works great with Ruby.
thumpba has joined #ruby
<Senjai>
#argumentsontheinternet
devdazed has quit [Quit: Computer has gone to sleep.]
<shevy>
Senjai I don't see it that way at all.
function90 has joined #ruby
<shevy>
#SenjaiHatesNewcomers
<Senjai>
shevy: Because, he obviously has a question about using TextMate, so he should just ask that, instead of a useless question and an inevitable "yes"
<shevy>
Senjai he asked whether people are using Textmate.
<TheTopBloke>
havenwood: Do you use it remotely? That's what I am consdiering at the moment. Apparently it requires an install of Ruby on the server.
<Senjai>
shevy: ANd the obvious answer is, duh, yes
thumpba has quit [Client Quit]
devdazed has joined #ruby
<shevy>
Senjai please don't spam me with bot propaganda, thank you. I interact with you, not with bot-answers yes? Or shall I also put up a bot that puts up some pre-generated answers to you?
<TheTopBloke>
Senjai, if your sole intent is to limit the volume of transactions in the window, then you're doing it wrong :)
<havenwood>
TheTopBloke: No, I haven't used the rmate feature. I just use vim. I'd be curious to hear how it works out.
thumpba has joined #ruby
reset has joined #ruby
^wald0 has joined #ruby
hornairs has joined #ruby
baweaver has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving.]
<shevy>
TheTopBloke have you used irb already?
<Senjai>
shevy: Sure, because these are things the internet should no. If there was no bot, I'd find and link the exact same article to you
codecop has quit [Remote host closed the connection]
<Senjai>
s/no/know
<TheTopBloke>
irb? no
<wasamasa>
you should
<havenwood>
TheTopBloke: It looks like there're Bash and Python ports of rmate, so Ruby, Python or Bash. :P
<wasamasa>
or even better, pry
<havenwood>
TheTopBloke: I'm sure you'll have one of the above!
mjuszczak has quit []
<shevy>
Senjai Yeah that is fine, so please do it rather than be lazy and spam me with a bot ok?
frem has joined #ruby
<Senjai>
shevy: To link the same thing?
<shevy>
Senjai Yes.
codecop has joined #ruby
<Senjai>
shevy: Why do the same thing over and over. I automate that.
<Senjai>
Because I have to say the same thing, so many times
<shevy>
Senjai Ok fine. Would you please stop spamming me with a bot?
timonv_ has quit [Remote host closed the connection]
<shevy>
Yes and I disagree with it every single time you do.
bricker has joined #ruby
timonv_ has joined #ruby
<shevy>
TheTopBloke irb is very useful for evaluating ruby code "live" (locally, on your computer)
<shevy>
TheTopBloke such as the bot eval-in here could also be used, if you use a leading >>
<Senjai>
shevy: I linked one article to you
<Senjai>
shevy: You cant come to a programming channel, and complain about people automating common tasks xD
<TheTopBloke>
LOL
<shevy>
Senjai Ok so you want me to put up a bot with pre-ready made opinions that collect and refute all your erroneous links.
<pontiki>
huh, seems like you can
<Senjai>
shevy: Sure
<TheTopBloke>
Wow, somebody needs to get some sunlight.
<shevy>
Senjai ok gimme a little time, need to set it up first
mloveless has joined #ruby
<TheTopBloke>
ok I'll check out irb.
<Senjai>
shevy: If you constantly have to say it all the time, its being efficient
<Senjai>
shevy: But you're still wrong. xD
^wald0 has quit [Client Quit]
<shevy>
Senjai yeah no worries, gimme some time ;)
<shevy>
Senjai not in the slightest.
<Senjai>
K
thsig has quit [Remote host closed the connection]
<pontiki>
talk about filling the channel with useless crap
recurrence has quit [Quit: recurrence]
_ixti_ has joined #ruby
spyderma_ has quit [Ping timeout: 245 seconds]
<havenwood>
TheTopBloke: REPLs are great. A nice alternative to the `irb` that ships with Ruby is Pry. You can `gem install pry pry-doc` then use `pry` instead of `irb`.
Lingo___ has joined #ruby
anarang has joined #ruby
<Senjai>
havenwood: It ships with ruby now?
DonOtreply has joined #ruby
timonv_ has quit [Ping timeout: 264 seconds]
<Senjai>
err derp, yeah, you still have to install it
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
<havenwood>
Senjai: yeah, i just said that badly
<Senjai>
all good, didnt read the whole thing
tjbiddle has joined #ruby
<Senjai>
lol
rkalfane has joined #ruby
ixti has quit [Ping timeout: 244 seconds]
pandaant has quit [Remote host closed the connection]
mengu has quit []
towski_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
bdamos has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
poetazus has joined #ruby
lolmaus_ has quit [Quit: Konversation terminated!]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sargas has quit [Quit: This computer has gone to sleep]
bdamos has joined #ruby
jheg has joined #ruby
dfinninger has joined #ruby
TheTopBloke has quit [Ping timeout: 244 seconds]
fryguy9 has quit [Quit: Leaving.]
sinkensabe has joined #ruby
TheTopBloke has joined #ruby
bears has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zesty has joined #ruby
mattmcclure has joined #ruby
havenwood has quit [Remote host closed the connection]
BTRE has quit [Read error: Connection reset by peer]
auxbuss has quit [Quit: I'm gone.]
AndyBotwin has joined #ruby
AndyBotwin has joined #ruby
Lingo___ has joined #ruby
Lingo___ has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
graydot has quit [Quit: graydot]
ddd has joined #ruby
Parker0 has joined #ruby
poetazus has quit [Ping timeout: 265 seconds]
poetazus has joined #ruby
tier has joined #ruby
jmcharnes has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
thatslifeson_ is now known as thatslifeson
hmsimha has quit [Quit: Leaving]
hornairs has quit [Read error: Connection reset by peer]
sevvie has quit [Ping timeout: 245 seconds]
hornairs has joined #ruby
x1337807x has joined #ruby
nanoyak has joined #ruby
synaptik has joined #ruby
DrCode has quit [Ping timeout: 250 seconds]
iamninja has quit [Quit: ZZZzzz…]
shellfu has joined #ruby
einarj has joined #ruby
baweaver has quit [Remote host closed the connection]
n1lo has quit [Quit: Leaving]
michaeldeol has joined #ruby
davidhq has joined #ruby
DrCode has joined #ruby
einarj has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
djbkd has quit [Remote host closed the connection]
baltazore has quit []
recurrence has quit [Quit: recurrence]
timonv_ has joined #ruby
spyderman4g63 has quit [Ping timeout: 255 seconds]
metadave_ has joined #ruby
baweaver has quit [Remote host closed the connection]
livingstn has quit [Ping timeout: 265 seconds]
timonv_ has quit [Remote host closed the connection]
Timgauthier has joined #ruby
metadave has quit [Ping timeout: 240 seconds]
anarang has quit [Quit: Leaving]
Timgauthier is now known as timgauthier_away
timonv_ has joined #ruby
mjuszczak has joined #ruby
timonv_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
SOLDIERz has quit [Quit: Be back later ...]
baroquebobcat_ has joined #ruby
BTRE has joined #ruby
hrs has joined #ruby
rbennacer has joined #ruby
Val_ is now known as rand0mbits
Photism_ has joined #ruby
baroquebobcat has quit [Ping timeout: 240 seconds]
baroquebobcat_ is now known as baroquebobcat
Photism has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
sinkensabe has joined #ruby
reinaldob has quit [Remote host closed the connection]
cvtsx1 has quit [Quit: Leaving]
cvtsx has joined #ruby
elaptics is now known as elaptics`away
<cvtsx>
havenwood haven't worked on it since this morning lol, i had to go to the hospital since i thought i had a chest infection (turns out it is the flu). And i am going to take a nap now lol so i will work on it afterwards
benlieb has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
econerd4ever has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yalue has quit [Quit: return 0;]
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
recurrence has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
icarus has joined #ruby
blackmesa has joined #ruby
<bashusr>
with a class method, you can assign the method to a variable with someMethod = instantiatedClass.method(:methodName); and then call it with someMethod.call(), how can i get module methods assigned to a variable?
paulfm has quit [Quit: Goodbye]
v0n has quit [Ping timeout: 240 seconds]
studiotate has quit [Read error: No route to host]
studiotate has joined #ruby
timonv_ has joined #ruby
bitcycle has joined #ruby
jfran has joined #ruby
rbennacer has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
pdoherty_ has quit [Remote host closed the connection]
jottr_ has joined #ruby
michaeldeol has joined #ruby
mjuszczak has quit []
pierre1_ has joined #ruby
malcolmva has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby
v0n has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
pdoherty has joined #ruby
SilkFox_ has joined #ruby
sambao21 has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
ghr has joined #ruby
hjlsteffens has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<shevy>
when I use include Foo though, I use 3 extra lines (two empty newlines, one before, one after the include statement)
<dpy>
I get this erro: /var/lib/gems/1.9.1/gems/unimidi-0.4.6/lib/unimidi/device.rb:97:in `use_device': undefined method `enabled?' for nil:NilClass (NoMethodError)
<shevy>
*two newlines
<mosez>
shevy: and why do you want to do this wired stuff? =)
<shevy>
not sure if a newline is empty haha
<shevy>
mosez for efficiency and more control upon require time
postmodern has joined #ruby
<mosez>
but imo you dont get more control...
<shevy>
why not?
<shevy>
I can require in the normal way fine too
thumpba has quit [Ping timeout: 245 seconds]
<zenspider>
dpy: you'll have to look at the stack trace
<mosez>
this sounds simply wired and useless to me :)
<shevy>
I can attach at the same place in modules or classes
<zenspider>
that means that use_device was passed nil
<zenspider>
figure out how
lkba has quit [Ping timeout: 265 seconds]
<mosez>
shevy: but that is just my opinion :)
<zenspider>
prolly from use(<n>) where <n> is larger than the number of devices you have
luriv has joined #ruby
<dpy>
hmm, maybe my ruby is too old (1.9.1; I read here that unimidi needs MRI 1.9.2)
<rpag>
shevy, its easy to achieve what you want
<shevy>
mosez yeah that is perfectly fine, people have different opinions, everyone may have one
^wald0 has quit [Client Quit]
<rpag>
shevy, but, i struggle to see whats the point
elaptics is now known as elaptics`away
<shevy>
mosez I am less curious about the different opinion, but the use case. Like whether my (perceived) use case would be different from others
<shevy>
k so people don't need something like that
<zenspider>
dpy: I doubt that matters. look at the stack trace and debug the problem
i5um41ru has joined #ruby
<rpag>
shevy, i wouldn't let that stop you creating it as a github repo or w/e
<rpag>
shevy, people want niche things like that sometimes
AndyBotwin has quit [Quit: Leaving]
<shevy>
rpag ah no, I don't mean that. One can modify require fine, but then one has to carry modifications forward in the event that I wish to distribute code that makes use of it, but I found that it is too much hassle to keep up with, so I mostly stick to just default ruby and don't modify core behaviour like that
AndyBotwin has joined #ruby
AndyBotwin has joined #ruby
fabrice31 has joined #ruby
<rpag>
i wouldn't modify require to do it
<shevy>
I almost never modify core classes either when I push out gems. Not sure how refinements work either
<shevy>
aha?
<shevy>
rpag but how would you do it if you want to have it on require-time? like I guess the python important statement has something similar
<rpag>
i would do something like Shevy.require
<shevy>
why is this named Shevy
<rpag>
cuz idk what else to call it and its your idea
shredding has joined #ruby
xxneolithicxx has left #ruby [#ruby]
i5um41ru has quit [Quit: leaving]
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
<rpag>
i like how node.js implements require()
<rpag>
it returns something that you end up using
claymore has quit [Ping timeout: 244 seconds]
srruby has joined #ruby
davidhq has quit [Max SendQ exceeded]
fabrice31 has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
v0n has joined #ruby
davidhq has joined #ruby
claymore has joined #ruby
Kricir has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ddd has quit [Quit: leaving]
sevvie has joined #ruby
aclearma_ has quit [Quit: I'm out!]
zorak8 has joined #ruby
jaequery has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
baweaver has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 245 seconds]
decoponio has quit [Read error: Connection reset by peer]
<dpy>
zenspider: I think unimidi assumes a hardware midi device
<dpy>
there is none, hence the nil
jaequery has joined #ruby
decoponio has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 245 seconds]