<ryanprior>
polpak: yeah, I think it could be more consistent
<pontiki>
reject does the same thing
<ElSif>
seems to at the very least constitute 'undocumented behavior', afaict
casadei_ has quit [Remote host closed the connection]
<Ox0dea>
pontiki: But not #map, #each, &c.
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ElSif>
though i will defer to whatever Ox0dea can dig up
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Well...
<Ox0dea>
> hash.c (rb_hash_each): Hash#each should yield single value.
<pontiki>
but it doesn't...
<Ox0dea>
That was matz on Oct. 24, 2003.
jpfuentes2 has joined #ruby
rcvalle has quit [Quit: rcvalle]
benlovell has quit [Ping timeout: 246 seconds]
<pontiki>
or, well, it does, but it's an array
<pontiki>
idk
<pontiki>
i'm just very confuzzled now
<Ox0dea>
Right, that's the "single value" to which he refers.
<Ox0dea>
I think it must be something to do with the fact that #select and #reject return Hashes rather than key-value pairs like most of the other enumerable methods on Hash.
willharrison has joined #ruby
<ElSif>
seems like a reasonable guess
_djbkd has quit [Quit: My people need me...]
ledestin has joined #ruby
<Ox0dea>
It seems like it'd be more useful if it yielded the value rather than the key, such that hash.select(&:even?) does something useful.
<ryanprior>
Ox0dea: okay, I'll have to investigate that more. Working through this has been instructive if nothing else. =D
<Ox0dea>
Whoops. I gave the solution above. :P
<Ox0dea>
That Hash#select/#reject only yields keys to single-argument blocks is unfortunate, but it's very old behavior that's unlikely to go away.
<Ox0dea>
Just something to be wary of.
user1138 has quit [Ping timeout: 255 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
apt-get_ has quit [Quit: Quit]
linuxboytoo has quit [Remote host closed the connection]
veduardo has joined #ruby
bigkevmcd has joined #ruby
sharpmachine has joined #ruby
sharpmachine has quit [Remote host closed the connection]
gambl0re has quit [Ping timeout: 264 seconds]
user1138 has joined #ruby
<ljen>
Hi again – I'm trying to figure out how to skip to another index on the next iteration through an array. Any help would be much appreciated.
<Ox0dea>
ljen: Please clarify.
gguggi has quit [Ping timeout: 264 seconds]
<havenwood>
ljen: Have an example expected input with the return value you're seeking?
bubbys has joined #ruby
serivich has joined #ruby
allcentury has joined #ruby
<ljen>
Well I am changing this: "(first (list 1 (+ 2 3) 9))" to this: ["first", ["list", "1", ["+", "2", "3"], "9"]] but I am getting something more like this: ["first", ["list", "1", ["+", "2", "3"], "+", "2", "3", "9"]
aspiers has joined #ruby
NeverDie has joined #ruby
<ljen>
Basically after evaluating the (+, 2, 3) it goes back and does it again because the index hasn't moved
<Ox0dea>
>> wtf = {}; foo = {a: 1, b: 2}; Enumerable.instance_methods.each { |m| next if m == :cycle; foo.send(m) { |x| break wtf[m] = x } rescue nil }; [wtf.size, wtf.select { |k, v| Symbol === v }]
<Ox0dea>
Of the 33 Enumerable methods on Hash that take blocks, only #select and #reject behave differently.
<Ox0dea>
It's gotta be a bug, no?
Thomas-0725 has joined #ruby
<pontiki>
i think it's worth raising the question, but as it's old old behaviour i would expect anything to change
<pontiki>
that would be a breaking change, i think
dom__ has joined #ruby
<Ox0dea>
It would.
<havenwood>
A Ruby 3.0 change.
_blizzy_ has quit [Ping timeout: 246 seconds]
<pontiki>
now i'm wondering if i've encountered this and not understood what was going on
Torrieri has joined #ruby
<aaeron>
hey @Ox0dea
<Ox0dea>
Hi.
<aaeron>
I want to upload a jar file
yqt has quit [Ping timeout: 256 seconds]
<Ox0dea>
Uh-oh.
<aaeron>
And I am not able to find any matching content type
<Ox0dea>
aaeron: It's application/jar, no?
<aaeron>
Ok. Let me check
<Ox0dea>
Consider "application/java-archive" as well.
RobertBirnie has quit [Ping timeout: 255 seconds]
<Ox0dea>
ljen: There's a really simple way to tokenize S-expressions.
<aaeron>
ok
Lucky_ has joined #ruby
allcentury has quit [Ping timeout: 265 seconds]
bronson has quit [Remote host closed the connection]
rcvalle has joined #ruby
bronson has joined #ruby
fgo has joined #ruby
workmad3 has joined #ruby
allomov has joined #ruby
Lucky_ has quit [Client Quit]
<aaeron>
@Ox0dea : it does not accept that as well
bodgix has quit [Quit: Leaving.]
bungoman has joined #ruby
user1138 has quit [Ping timeout: 256 seconds]
monstordh has joined #ruby
bungoman has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 248 seconds]
bungoman has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
Lectus has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
aaeron: "application/java-archive" is the appropriate MIME type for .jar files. If the endpoint is rejecting it, it's probably to defend against malicious uploads.
allomov has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
dfockler has quit [Remote host closed the connection]
<aaeron>
oh. okay. but multipart has its own class called uploadIO. And I guess they dont accept jar files.
<Ox0dea>
aaeron: multipart-post doesn't seem to concern itself with MIME types.
Muhannad has joined #ruby
<Ox0dea>
aaeron: Scratch that.
j4cknewt has joined #ruby
Thomas-0725 has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
enali has joined #ruby
bungoman_ has joined #ruby
<aaeron>
Ox0dea: shall I use something else u mean?
jcabmin has joined #ruby
<Ox0dea>
aaeron: No, no, I just did a quick scan for "mime" in the source tree and didn't find anything, but that's only because they always use "Content-Type".
<aaeron>
okay.
Muhannad has quit [Max SendQ exceeded]
jackjackdripper has quit [Quit: Leaving.]
Muhannad has joined #ruby
<kenichi>
isn't a jar just a zip with certain layout?
<Ox0dea>
Yes.
<aaeron>
I did not understand what should I do now
<Ox0dea>
Still, using the proper Content-Type is a Good Thing.
CloCkWeRX has joined #ruby
monstordh has quit [Quit: monstordh]
<Ox0dea>
aaeron: You're getting an error from UploadIO.new when you try to create an instance with a content_type of "application/java-archive"?
bungoman has quit [Ping timeout: 255 seconds]
<aaeron>
Yes
<Ox0dea>
Could you post that error?
<aaeron>
Sure
ryanprior has quit [Remote host closed the connection]
<Ox0dea>
Would making Integers enumerable be a breaking change?
cassioscabral has quit [Quit: cassioscabral]
zacstewart has joined #ruby
cassioscabral has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
serivich has quit [Quit: Leaving]
jbw_ has joined #ruby
arooni-mobile has joined #ruby
jbw has quit [Ping timeout: 250 seconds]
dhjondoh has joined #ruby
rubie has joined #ruby
amclain has quit [Quit: Leaving]
ulises has joined #ruby
ulises has quit [Client Quit]
zz_barkerd427 is now known as barkerd427
railsraider has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
Channel6 has quit [Quit: Leaving]
enders has quit [Remote host closed the connection]
lokulin has joined #ruby
railsraider_ has joined #ruby
senayar has quit []
Rickmasta has joined #ruby
railsraider has quit [Ping timeout: 244 seconds]
railsraider_ is now known as railsraider
j4cknewt has quit [Remote host closed the connection]
dseitz has joined #ruby
<certainty>
moin
NightMonkey has quit [Ping timeout: 244 seconds]
Rickmast_ has quit [Ping timeout: 246 seconds]
last_staff has joined #ruby
_ht has joined #ruby
fgo has joined #ruby
<certainty>
bah it's raining like hell here
<zenspider>
I'm jealous
barkerd427 is now known as zz_barkerd427
NightMonkey has joined #ruby
Muhannad has joined #ruby
enali has quit [Quit: Page closed]
ScriptGeek has joined #ruby
finisherr has quit [Quit: finisherr]
Muhannad has quit [Max SendQ exceeded]
Muhannad has joined #ruby
<ScriptGeek>
Is there any way to create a string that references variables that can change at any moment while not having to reinterpolate the string into a static object?
fgo has quit [Ping timeout: 256 seconds]
<zenspider>
this sounds like a bad idea...
<Ox0dea>
ScriptGeek: Sounds like you want a closure.
<zenspider>
but, wrap it in a lambda and call that everytime you want the string
<Ox0dea>
zenspider: Not in Seattle at the moment, then?
Muhannad has quit [Max SendQ exceeded]
<zenspider>
I'm totally in Seattle
railsraider has quit [Quit: railsraider]
<zenspider>
looking at it right now
<Ox0dea>
Ah, couple hours till the rain, then.
Muhannad has joined #ruby
gwendall has joined #ruby
<zenspider>
I'll believe it when I see it. but most likely it's just gonna make tomorrow muggy
<ScriptGeek>
I've used lambdas before, but not sure how to use it in this instance
<zenspider>
y = lambda { "my #{x} string" }
<zenspider>
y[]
<Ox0dea>
->/[] or lambda/call; don't cross the streams.
Musashi007 has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<zenspider>
>> x = 42; y = lambda { "my #{x} string" }; p y[]; x = 24; p y[]
astrobunny has quit [Remote host closed the connection]
joonty has joined #ruby
Musashi007 has joined #ruby
JohnBat26 has joined #ruby
zacstewart has quit [Ping timeout: 256 seconds]
devbug has quit [Ping timeout: 246 seconds]
NightMonkey has joined #ruby
<Ox0dea>
RAWR is the perfect name for a reddit API wrapper in Ruby, but alas.
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dumdedum has joined #ruby
gwendall has quit [Ping timeout: 246 seconds]
sp1rs has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
schaerli has joined #ruby
<awk>
Hello, please advise (ruby noob) say I have $blah = '' ... then I do for example puts "hello" ... puts "goodbye" how do I pipe both hello and goodbye to $blah so I can call $blah later.. $blah < puts... ?
sp1rs has joined #ruby
<Ox0dea>
awk: You want to... append to a String?
fabrice31 has quit [Remote host closed the connection]
<Ox0dea>
Do you want to print *and* capture the output, or just capture the output for printing later?
<awk>
Ox0dea: well i'm writing different classes and instead of sending an e-mail in each class I want to store each output in a variable and then later I can send_email( "Backup successsful for ${$blah}" )
fabrice31 has joined #ruby
<Ox0dea>
awk: Then just use String#<< to "shovel" data into the string.
VonPyrex has quit [Read error: Connection reset by peer]
<awk>
perfecto, thanks
<Ox0dea>
Sure thing.
Mendenhall has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
<Ox0dea>
>> s = ''; s << 'foo'; s << 98; s << 'ar'; s # awk
dopie has quit [Quit: This computer has gone to sleep]
yfeldblum has joined #ruby
Ilyas has joined #ruby
<apeiros>
awk: note that $vars are *globals*. you don't want globals. ever.
schaerli has quit [Remote host closed the connection]
msgodf has joined #ruby
arup_r has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dukedave has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
tonini has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby
dukedave has joined #ruby
tonini has joined #ruby
ledestin has quit [Ping timeout: 244 seconds]
<SebastianThorn>
apeiros: i sometime use a global variable for loggin-level, that bad aswell?
allomov has joined #ruby
<Ox0dea>
apeiros: What do you suppose was the rationale behind making Hash#select/#reject behave differently from all the other Enumerable methods when passed a single-argument block?
keen__________27 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
keen__________26 has quit [Ping timeout: 246 seconds]
zacstewart has joined #ruby
white_bear has joined #ruby
last_staff has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
markholmes has quit [Quit: So it goes.]
troulouliou_div2 has quit [Remote host closed the connection]
<arup_r>
hi
bove has quit [Ping timeout: 240 seconds]
Ox0dea has quit [Read error: No route to host]
ohaibbq has quit [Quit: Leaving...]
Ox0dea has joined #ruby
last_staff has joined #ruby
last_staff has quit [Client Quit]
benlovell has quit [Ping timeout: 264 seconds]
bove has joined #ruby
baweaver has quit [Remote host closed the connection]
fabrice31 has quit [Read error: Connection reset by peer]
anisha has joined #ruby
fabrice31 has joined #ruby
christiandsg has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
<ljarvis>
moin
matcouto has joined #ruby
troulouliou_div2 has joined #ruby
matcouto has joined #ruby
matcouto has quit [Client Quit]
ironhide_604 has joined #ruby
matcouto has joined #ruby
neersighted has quit [Ping timeout: 240 seconds]
matcouto has quit [Client Quit]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MiracleBlue has quit [Ping timeout: 240 seconds]
exadeci has quit [Ping timeout: 240 seconds]
yo61 has quit [Read error: Connection reset by peer]
exadeci has joined #ruby
matcouto has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
MiracleBlue has joined #ruby
matcouto has quit [Client Quit]
christiandsg has quit [Ping timeout: 265 seconds]
neersighted has joined #ruby
schaerli has joined #ruby
matcouto has joined #ruby
matcouto has quit [Client Quit]
CloCkWeRX has left #ruby [#ruby]
yo61 has joined #ruby
workmad3 has joined #ruby
matcouto has joined #ruby
apfeluser has joined #ruby
matcouto has quit [Client Quit]
ndrei has quit [Ping timeout: 264 seconds]
matcouto has joined #ruby
matcouto has quit [Client Quit]
desigx has quit [Ping timeout: 248 seconds]
matcouto has joined #ruby
blackmes1 has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
senayar has quit [Remote host closed the connection]
matcouto has quit [Client Quit]
ruurd has joined #ruby
Soda has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<adaedra>
hi
senayar has joined #ruby
ScriptGeek has quit [Quit: Leaving.]
matcouto has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
mikecmpbll has joined #ruby
matcouto has quit [Client Quit]
zacstewart has quit [Ping timeout: 244 seconds]
matcouto has joined #ruby
howdoicomputer has quit [Ping timeout: 255 seconds]
matcouto has quit [Client Quit]
matcouto has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
tsujp has joined #ruby
matcouto has quit [Client Quit]
ruurd has quit [Quit: ZZZzzz…]
matcouto has joined #ruby
ledestin has joined #ruby
matcouto has quit [Client Quit]
gwendall has joined #ruby
hisso has quit [Quit: hisso]
matcouto has joined #ruby
smooth_p1nguin is now known as smooth_pengiun
matcouto has quit [Client Quit]
matcouto has joined #ruby
smooth_pengiun is now known as smooth_penguin
stardiviner has joined #ruby
matcouto has quit [Client Quit]
rails733 has quit [Ping timeout: 246 seconds]
matcouto has joined #ruby
ruurd has joined #ruby
ScriptGeek has joined #ruby
matcouto has quit [Client Quit]
kj_ has joined #ruby
michael_mbp has quit [Excess Flood]
senayar has quit [Remote host closed the connection]
<kj_>
hello m getting error while getting rails in my ubuntu
senayar has joined #ruby
<ljarvis>
?rails kj_
<ruboto>
kj_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<kj_>
says Failed to connect to get.rvm.io port 443: No route to host
matcouto has joined #ruby
<kj_>
ok
kj_ has quit [Client Quit]
matcouto has quit [Client Quit]
charliesome has joined #ruby
<adaedra>
this looked like a network issue
gwendall has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby
matcouto has joined #ruby
tomphp has joined #ruby
neanderslob has quit [Remote host closed the connection]
matcouto has quit [Client Quit]
fgo has joined #ruby
<awk>
Ox0dea: another question please... I define a hostname eg... $hostname="blah" ... then I have a whole lot of things it does... what I want to do is if #{$hostname} == '' then puts "no hostname" exit 1 ... or abort... else do this...
<awk>
What happens is I get the no hostname but it doesnt exit or abort it carries on with the else ?
matcouto has joined #ruby
matcouto has quit [Client Quit]
<Ox0dea>
awk: Would you mind posting the offending code?
chussenot has joined #ruby
<Ox0dea>
It must be that you're not putting the call to `exit` in the right place.
Igorshp has joined #ruby
axl_ has joined #ruby
matcouto has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
matcouto has quit [Client Quit]
arup_r has quit [Remote host closed the connection]
matcouto has joined #ruby
Musashi007 has joined #ruby
matcouto has quit [Client Quit]
<yorickpeterse>
morning
havenwood has quit [Ping timeout: 256 seconds]
iateadonut has joined #ruby
iateadonut has quit [Client Quit]
matcouto has joined #ruby
Zai00 has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
acke has joined #ruby
casadei_ has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
matcouto has quit [Client Quit]
charliesome has quit [Quit: zzz]
matcouto has joined #ruby
laurentide has quit [Quit: Leaving]
DLSteve has quit [Quit: Leaving]
matcouto has quit [Client Quit]
matcouto has joined #ruby
gwendall has joined #ruby
matcouto has quit [Client Quit]
Sert has joined #ruby
einarj has joined #ruby
tsujp has quit [Quit: tsujp is snoozing]
schaerli has quit [Remote host closed the connection]
gagrio has quit [Ping timeout: 255 seconds]
matcouto has joined #ruby
casadei_ has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 264 seconds]
matcouto has quit [Client Quit]
<Sert>
Hey all
matcouto has joined #ruby
Iskarlar has joined #ruby
<Sert>
Can someone help me converting some code to an Class ? i dont understand how the inheritance works, i want to extend the google api.
matcouto has quit [Client Quit]
marr has joined #ruby
Igorshp has quit [Remote host closed the connection]
matcouto has joined #ruby
<izzol>
Sert: the best will be to show us what you have now ;-)
matcouto has quit [Client Quit]
krz has quit [Quit: WeeChat 1.0.1]
matcouto has joined #ruby
jack_rabbit has quit [Ping timeout: 248 seconds]
zacstewart has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matcouto has quit [Client Quit]
matcouto has joined #ruby
jamesaxl has joined #ruby
matcouto has quit [Client Quit]
Feyn has joined #ruby
matcouto has joined #ruby
tkuchiki has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
matcouto has quit [Client Quit]
matcouto has joined #ruby
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
matcouto has quit [Client Quit]
Philipp_ has quit [Read error: Connection reset by peer]
<Sert>
izzol: ok
<Sert>
wait :)
matcouto has joined #ruby
fumihiro has quit [Ping timeout: 246 seconds]
matcouto has quit [Client Quit]
devbug has joined #ruby
fabrice31_ has joined #ruby
matcouto has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.2]
matcouto has quit [Client Quit]
TheHodge has joined #ruby
matcouto has joined #ruby
<mikecmpbll>
do classes get garbage collected? for instance if I create a bunch of junk classes inside a loop tmp_sub_class = Class.new(OtherClass)
matcouto has quit [Client Quit]
matcouto has joined #ruby
matcouto has quit [Client Quit]
al2o3-cr has joined #ruby
schaerli has joined #ruby
matcouto has joined #ruby
Sert2 has joined #ruby
railsraider_ has joined #ruby
<mikecmpbll>
i assume tmp_sub_class just gets garbage collected like anything else, now that i think about it
matcouto has quit [Client Quit]
<mikecmpbll>
not as though i'm defining it in the global scope
matcouto has joined #ruby
matcouto has quit [Client Quit]
fabrice31 has quit [Ping timeout: 244 seconds]
matcouto has joined #ruby
devbug has quit [Ping timeout: 246 seconds]
eminence_ has joined #ruby
matcouto has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
<awk>
It runs the puts "Not running synchronization for DB02 as no hostname specified" but it doesn't abort or exit or anything, it goes straight to the else
msgodf has quit [Ping timeout: 264 seconds]
Sert has quit [Ping timeout: 246 seconds]
gagrio has joined #ruby
Iskarlar has joined #ruby
tomphp has joined #ruby
safeforge has joined #ruby
senayar has quit [Remote host closed the connection]
seansith has quit [Ping timeout: 255 seconds]
senayar has joined #ruby
schaerli has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
krz has joined #ruby
krz has quit [Client Quit]
gizmore has joined #ruby
safeforge has quit []
gizmore has quit [Client Quit]
safeforge has joined #ruby
oo_ has joined #ruby
seansith has joined #ruby
nikhgupta has quit [Ping timeout: 264 seconds]
msgodf has joined #ruby
krz has joined #ruby
<Sert2>
haha
<Sert2>
adaedra: my problem was only adding super in front of constructor
<Sert2>
..
krz has quit [Remote host closed the connection]
<zenspider>
awk: if #{$db02DestDir} == nil
<zenspider>
# is a comment
<zenspider>
that's nonsensical code
krz has joined #ruby
<zenspider>
so it's really saying "if puts ..."
jbw__ has joined #ruby
bodgix has joined #ruby
<zenspider>
it doesn't even make sense if it was supposed to be a string w/ interpolation
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
quimrstorres has joined #ruby
fantazo has joined #ruby
allomov has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
quimrstorres has quit [Remote host closed the connection]
lkba has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
zacstewart has joined #ruby
workmad3 has joined #ruby
<zenspider>
apeiros: oh holy fucking shit I **need** that
chussenot has quit [Quit: chussenot]
emilkarl has joined #ruby
<shevy>
lol
<shevy>
hilarious animation
fgo has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
sp1rs has quit [Ping timeout: 240 seconds]
chussenot has joined #ruby
relix has joined #ruby
quimrstorres has joined #ruby
ph8 has quit [Changing host]
ph8 has joined #ruby
oo_ has joined #ruby
axl_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
ndrei has joined #ruby
<jhass>
old idea though, there are two or three that map that two a keyboard shortcut :P
Olipro has quit [Ping timeout: 244 seconds]
anisha has quit [Ping timeout: 240 seconds]
xkickflip_ has joined #ruby
xkickflip has quit [Ping timeout: 256 seconds]
xkickflip_ is now known as xkickflip
chussenot has quit [Quit: chussenot]
chussenot has joined #ruby
quimrstorres has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 250 seconds]
schaerli has joined #ruby
axl_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
quimrstorres has joined #ruby
htmldrum has quit [Ping timeout: 246 seconds]
benlovell has joined #ruby
axl_ has joined #ruby
krz has joined #ruby
krz has quit [Client Quit]
krz has joined #ruby
krz has quit [Client Quit]
<Sert2>
hey
duncannz has quit [Read error: Connection reset by peer]
dfockler has joined #ruby
<Sert2>
how can i create a multi level (2 level) array and push date and time in these levels ?
<adaedra>
It's funny, I already read that somewhere
CustosLimen has quit [Ping timeout: 246 seconds]
krz has joined #ruby
benlovell has quit [Ping timeout: 265 seconds]
DEA7TH has joined #ruby
[k- has joined #ruby
CustosLimen has joined #ruby
anisha has joined #ruby
xkickflip has quit [Ping timeout: 250 seconds]
krz has quit [Read error: Connection reset by peer]
<[k->
hello
<adaedra>
moin
ruurd has quit [Quit: ZZZzzz…]
<Sert2>
Na Ihr
<[k->
work work work
dfockler has quit [Ping timeout: 256 seconds]
<[k->
all I have now is work, like we all do :(
<[k->
I don't like this work :(
<[k->
I realised if I actually read a book about Ruby instead of mashing my knowledge together, I would probably have written better code
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xkickflip has joined #ruby
krz has joined #ruby
<shevy>
you will become a railroad tycoon in Singapore - the only one who can write Ruby code
schaerli has quit [Remote host closed the connection]
<[k->
actually there are a lot of people who can write Ruby code in Singapore
<[k->
we have the red dot conference (Ruby) here in singapore
<[k->
I didn't go tho
<adaedra>
[k-: writing good code requires knowledge, practice, and feedback.
<[k->
it's such a pity that I write bad code
<adaedra>
Everyone did once.
sp1rs has joined #ruby
<workmad3>
adaedra: not me!
<[k->
:3
<adaedra>
workmad3: right, you still do.
<workmad3>
:D
<Sert2>
how can i create 2 level array ?
ruurd has joined #ruby
<ddv>
i'm not at level yet, Sert2, so I can't tell
chussenot has quit [Quit: chussenot]
<ddv>
+that
fabrice31_ has joined #ruby
Iskarlar has joined #ruby
<shevy>
Sert2 do you know how to create a normal array?
* adaedra
puts ddv in a lift
* shevy
presses the shredder-button
CustosLimen has quit [Ping timeout: 246 seconds]
<ddv>
:p
<Sert2>
sure
<Sert2>
shevy:
<workmad3>
shevy: I worry about your place of work, if the lifts have shredder buttons....
<shevy>
you can stack arrays in arrays like those matroshka puppets
<ddv>
array inception
<Sert2>
i want to create 2 levels, like Date => Time and create one more array and compare these arrays if same Date, check if time is conflicting like between?
<shevy>
lol ddv
<adaedra>
Sert2: that was already discussed yesterday, did you not got answers?
<shevy>
Sert2 well if you have a Date => Time association, that more sounds like a hash actually
CustosLimen has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
<Sert2>
shevy: ok so what u think
<shevy>
but you can store like [[date1, time1],[date2,time2]] etc..
<Sert2>
adaedra: yes we had :p
<shevy>
I normally don't think :)
<Sert2>
shevy: yes thats the way i want it
felixr has joined #ruby
<shevy>
yeah, that is the literal ruby array syntax there [], you can use as many [] as you like. though it is usually best to keep your data structures as simple as possible
<Sert2>
can i do it like test.push([#{event.date}, #{event.time}]) ?!
<[k->
Sert2, what do you want to do with the array
<[k->
you can drop the #{} since it isn't a string
<Sert2>
i want to create 2 arrays with 2 levels (date, time) and then compare these two arrays if there are events which conflicts, like same date and time .
<[k->
2 hashes will work too
<Sert2>
okay can you explain me how ?
<[k->
and they are designed for that purpose
<Sert2>
:p
<[k->
{ Date => Time, Date2 => Time2
<[k->
you need to close the }
lkba has quit [Ping timeout: 250 seconds]
<Sert2>
which function
mandarinkin has joined #ruby
Igorshp has quit [Ping timeout: 244 seconds]
<[k->
{}
<[k->
.Equality—Two hashes are equal if they each contain the same number of keys and if each key-value pair is equal to (according toObject#==) the corresponding elements in the other hash.
postmodern has quit [Quit: Leaving]
msgodf has quit [Ping timeout: 240 seconds]
c355E3B has joined #ruby
chussenot has joined #ruby
<[k->
the order doesn't matter unlike an array, right
chussenot has left #ruby [#ruby]
arup_r_ has joined #ruby
<Sert2>
hm want to check overlaping events
<Sert2>
like (StartA >= EndB) and (EndA >= StartB)
<adaedra>
I swear, if I find solution in the logs
<Sert2>
:p
arup_r has quit [Ping timeout: 256 seconds]
<ruurd>
adaedra what was that again?
<shevy>
adaedra yeah what was the solution!
<adaedra>
ruurd: ?
allomov has quit [Remote host closed the connection]
<adaedra>
08:27 <jhass> and then by_status["needs_action"].each do |important_event| by_status["accepted"].select {|event| event.start.dateTime.between?(important_event.start.dateTime, important_event.end.dateTime) || event.end.between?(...) }.each do |conflicting_event| stuff(conflicting_event); or whatever
<Sert2>
:>
fabrice31_ has quit [Remote host closed the connection]
allomov has joined #ruby
<[k->
ugly code >.>
<adaedra>
what was wrong with that?
<[k->
end is reserved in my brain
emilkarl has quit [Quit: emilkarl]
<[k->
also, snake case
<[k->
also, important_event vs event?
<ddv>
what brain, [k-
<ruurd>
BURRRRRRRRN
<[k->
that's rude :(
<[k->
I don't take nasty comments from just anyone
<adaedra>
[k-: iirc, it was based on external JSON data, hence the snake case and "end"
valkyrka has joined #ruby
<[k->
I'm fine with adaedra calling me things but not you, ddv
<Sert2>
i stuck :D
rubie has joined #ruby
<ddv>
s/stuck/suck
<ddv>
?
<ddv>
:)
<ddv>
[k-: just a little joke man
<ddv>
mangggg
<[k->
I don't believe so.
CustosLimen has quit [Read error: Connection timed out]
<adaedra>
i_want_to_believe.jpg
<shevy>
are you saying that jhass code is ugly [k- :(
arup_r_ has quit [Read error: Connection reset by peer]
<[k->
it happens to the best of us sometimes
<[k->
you know, inheriting a ugly codebase
bubbys has quit [Ping timeout: 250 seconds]
<ddv>
thats awesome
arup_r has joined #ruby
bubbys has joined #ruby
<adaedra>
you got out of your shredding lift?
<shevy>
ugly code should be replaced by beautiful code
fantazo has quit [Ping timeout: 240 seconds]
astrobunny has quit [Remote host closed the connection]
emilkarl has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
msgodf has joined #ruby
<shevy>
the less optimal programming language should be replaced by the more optimal programming language
<shevy>
I am preaching from the shevy bible here ddv
<adaedra>
?better
<ruboto>
"Best" and "better" are subjective. Try to use a different term.
<adaedra>
?gooder
<ruboto>
I don't know anything about gooder
<ddv>
dont drag me into this
<shevy>
?ruboto is dumb
<ruboto>
is, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<shevy>
hahaha
<[k->
?but_i_am_dumb
<ruboto>
I don't know anything about but_i_am_dumb
saeid has joined #ruby
* `derpy
pats ruboto
dangerousdave has joined #ruby
astrobunny has joined #ruby
saeid has quit []
<ddv>
?'[ke- is dumb'
vondruch has quit [Ping timeout: 256 seconds]
<ddv>
:'(
<adaedra>
dat failure
<ddv>
?ke- is dumb
<ruboto>
I don't know anything about ke
<ddv>
i failz
<shevy>
the nick is a hard one
<adaedra>
but we should stop with the insults now.
<[k->
as I said, I don't appreciate such comments coming from you.
<Sert2>
i want to execute the drop shit if di include stuff
<Sert2>
right ?
felixr has quit [Quit: Konversation terminated!]
victortyau has quit [Max SendQ exceeded]
<Sert2>
or must i add the dorp shit on other place
<jhass>
izzol: that's in the Received header
quimrstorres has quit [Remote host closed the connection]
<jhass>
[k-: still way too open IMO, the empty match is not valid here
<jhass>
nor are spaces for instances. Or snowmans
victortyau has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
but3k4 has joined #ruby
arup_r_ has joined #ruby
havenwood has joined #ruby
d10n-work has joined #ruby
<[k->
how about `[^ ]*? for`
<shevy>
wat
<shevy>
the unicode snowman rules
chussenot has quit [Quit: chussenot]
emilkarl has joined #ruby
<[k->
more Regexp training!
<workmad3>
[k-: s/*/+/
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
[k-: any time you use '*', you're allowing the complete absence of a match
<[k->
ah, yes, that be an important change!
arup_r has quit [Ping timeout: 246 seconds]
<[k->
`ESMTP id ([^ ]+?) for`
sinkensabe has joined #ruby
<workmad3>
[k-: no particular need to use +? there now... + is fine
<lxsameer>
can i have access to caller object inside a Exception subclass?
ItSANgo has quit [Quit: Leaving...]
chussenot has joined #ruby
juanpaucar has joined #ruby
juanpaucar has quit [Read error: Connection reset by peer]
<[k->
lxsameer: any particular reason for doing that?
juanpaucar has joined #ruby
schaerli has joined #ruby
LoBoGoL has joined #ruby
<lxsameer>
[k-: I wat to call method on caller and fetch some info
<[k->
what kind of info?
<pontiki>
lxsameer: only if you rescue the exception inside that object
Zai00 has joined #ruby
<pontiki>
then it's on self
<[k->
why do you need this info during an exception
<lxsameer>
[k-: for example current 'name' on a person class
<[k->
logging purposes?
<lxsameer>
pontiki: so no luck in Exception it self?
<lxsameer>
[k-: yeah kind of
<[k->
the person should log it itself
<pontiki>
lxsameer: no
<[k->
it shouldnt leak its variables
<pontiki>
if you are raising the exception yourself, you can put as much information as you wish into the exception message
<pontiki>
it all has to be a string, tho
juanpaucar has quit [Ping timeout: 244 seconds]
<lxsameer>
I see, but Since I have lots of code doing this, I just wanted a shortcut :P
shredding has joined #ruby
<lxsameer>
but It seems that I'm ran out of luck
malconis has joined #ruby
<[k->
that is not a good way
<workmad3>
pontiki: you can create your own subclass of exception and pass it anything you want
tmtwd has joined #ruby
<pontiki>
...
<pontiki>
workmad3: that is brilliant
<[k->
but it leaks!
xkickflip has quit [Ping timeout: 246 seconds]
<pontiki>
[k-: it isn't leaking
<pontiki>
you still cannot affect the internals of that object
<[k->
I do not like this though
<pontiki>
then don't do it
xkickflip has joined #ruby
<[k->
exactly!
<pontiki>
no one is saying you have to
alemi has joined #ruby
<[k->
I'm just advising lxsameer
v0n has quit [Ping timeout: 244 seconds]
<workmad3>
pontiki: the ActiveRecord::RecordInvalid exception has a method 'record' that gives you the record that was invalid
<pontiki>
TIL
ruurd has joined #ruby
zacstewart has quit []
v0n has joined #ruby
<lxsameer>
thanks guys
pullphinger has joined #ruby
kies^ has quit [Ping timeout: 240 seconds]
serivich has joined #ruby
skyrocker has joined #ruby
skyrocker has left #ruby [#ruby]
<alemi>
Hi, I am new to ruby just learnt about modules. I have these two files 'domain_extractor.rb' and 'test_domain.rb' in same directory. The contents of this file are http://dpaste.com/24VCT7F and http://dpaste.com/1B8VE4F respectively. But when I do 'ruby test.rb' it gives error. How to fix this?
<shevy>
hanmac1 nobu is the most active core dev right now right?
<[k->
don't need the .rb!
Igorshp has quit [Remote host closed the connection]
<al2o3-cr>
[k-: i just do it anyway :)
<hanmac1>
shevy hm yeah i think ;P
<shevy>
Koichi Sasada is also very active
malconis has quit [Remote host closed the connection]
<[k->
ah the GC guy
yeticry has quit [Ping timeout: 244 seconds]
<alemi>
al2o3-cr: thanks
sp1rs has quit [Ping timeout: 255 seconds]
<shevy>
interesting that only nobu has an email appended at @ruby-lang.org
<al2o3-cr>
alemi: np
<[k->
you are welcome al2o3-cr!
eggoez has quit [Ping timeout: 246 seconds]
<al2o3-cr>
well, thanks you [k- :)
Igorshp has joined #ruby
atomical has joined #ruby
<[k->
:3
mhib has joined #ruby
senayar has quit [Remote host closed the connection]
yeticry has joined #ruby
albedoa has joined #ruby
senayar has joined #ruby
bmurt has joined #ruby
malconis has joined #ruby
failshell has joined #ruby
Spami has joined #ruby
aganov has quit [Ping timeout: 240 seconds]
tagrudev has quit [Ping timeout: 264 seconds]
troulouliou_div2 has joined #ruby
eggoez has joined #ruby
endash has quit [Quit: endash]
alienaut has joined #ruby
lavros has joined #ruby
Mon_Ouie has joined #ruby
rubie has joined #ruby
jgpawletko has joined #ruby
bungoman has joined #ruby
bungoman has quit [Read error: Connection reset by peer]
bungoman has joined #ruby
Kully3xf_ has joined #ruby
chinmay_dd has joined #ruby
alemi has quit [Quit: Page closed]
Kully3xf has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
dorei has joined #ruby
schaerli has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
tagrudev has joined #ruby
chinmay_dd has quit [Quit: Leaving]
[k- has quit [Ping timeout: 240 seconds]
sp1rs has joined #ruby
tkuchiki has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
blackmes1 has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
[k- has joined #ruby
Kully3xf has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rideh has quit [Read error: Connection reset by peer]
rideh^ has joined #ruby
jpfuentes2 has joined #ruby
Juanchito has joined #ruby
aganov has joined #ruby
Kully3xf_ has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
JoshL has joined #ruby
kies^ has joined #ruby
nettoweb has joined #ruby
jonee has joined #ruby
<shevy>
[k- I am learning C :(
blackmes1 has quit [Ping timeout: 246 seconds]
chinmay_dd has joined #ruby
<[k->
In Soviet Russia, c learns you
<[k->
in Soviet Russia, c am you
<[k->
hmm
<adaedra>
[k-: why the bad face? That's not such a bad thing.
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
<[k->
you mean shevy?
allcentury has joined #ruby
<adaedra>
yes, sorry
sevenseacat has joined #ruby
dhjondoh has joined #ruby
<shevy>
[k- may have a bad face :)
<adaedra>
[k- is a broken face
<shevy>
but I see, the nicks are similar... shevy ... [k- ...
<adaedra>
with an helmet
schaerli has quit [Remote host closed the connection]
<shevy>
adaedra biggest problem I have so far is how boring C is compared to ruby
<adaedra>
pff.
<adaedra>
A language is not "boring".
<[k->
pfft
<[k->
> java
blackmes1 has joined #ruby
<jhass>
?ot shevy
<ruboto>
shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
dhjondoh has quit [Client Quit]
<[k->
jhass has spoken!
<jhass>
we also got C hangman over there!
<[k->
he doesn't like hangman at all :/
charliesome has quit [Quit: zzz]
j4cknewt has joined #ruby
Kully3xf_ has joined #ruby
Kully3xf has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
hahuang65 has joined #ruby
user1138 has joined #ruby
quimrstorres has joined #ruby
lapide_viridi has quit [Quit: Leaving]
fabrice31 has quit [Remote host closed the connection]
lxsameer has quit [Remote host closed the connection]
fabrice31 has joined #ruby
michael_mbp has quit [Excess Flood]
railsraider has quit [Quit: railsraider]
lxsameer has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
chussenot has quit [Quit: chussenot]
aryaching has joined #ruby
BTRE has joined #ruby
rideh^ has quit [Ping timeout: 252 seconds]
quimrstorres has quit [Ping timeout: 250 seconds]
diegoviola has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
Feyn has quit [Quit: Leaving]
dblessin_ has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<shevy>
hangman is offtopic
<[k->
oooooo burn
hahuang65 has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
fabrice31_ has joined #ruby
Stratege___ is now known as Stratege
bffff_ has joined #ruby
<Mon_Ouie>
C hangman? So hangman without vowels? :p
wottam has joined #ruby
prefixed has joined #ruby
<ljarvis>
Mon_Ouie: join #ruby-offtopic and be forever broken
freerobby has joined #ruby
khando has joined #ruby
endash has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
fabrice31 has quit [Ping timeout: 256 seconds]
<shevy>
what would jquery $() look like in ruby?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
what do you mean
<adaedra>
it's a function named $, which is not possible
fgo has joined #ruby
<shevy>
:(
<adaedra>
well, not directly at least
<jxf>
shevy: like, an omnibus object with a lot of methods?
<[k->
$¢
<shevy>
jxf lol... omnibus :D that cracked me up
schaerli has joined #ruby
<ljarvis>
what about using an uppercase $
<adaedra>
In js, var $ = jQuery;
aganov has quit [Remote host closed the connection]
<wasamasa>
there is no uppercase $
<jxf>
"$" is a legal method name in Ruby
<shevy>
adaedra ah so there was a prior assignment
<ljarvis>
so wasamasa is the easy target
<wasamasa>
the only reason javascript people have resorted to undercores and dollars is because they have no namespaces
<adaedra>
why do you need namespaces when you have objects
<wasamasa>
so they went for using the shortest possible name and assigning it a boatload of functionality
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
<shevy>
omnibus objects :D
diego__ has joined #ruby
* wasamasa
wonders whether this kind of approach would work in C
<hanmac1>
wasamasa: tones of macros? ;P
<wasamasa>
hanmac1: ugh
<wasamasa>
well, in elisp there's utility libraries with short names
<ruboto>
[k- # => /tmp/execpad-7457571dd40e/source-7457571dd40e:2: `$ ...check link for more (https://eval.in/402409)
chouhoulis has joined #ruby
<[k->
lies
DEA7TH has quit [Quit: DEA7TH]
<[k->
$ is not allowed
tagrudev has quit [Remote host closed the connection]
<ljarvis>
$_ is already a usable variable
<[k->
>> def $_ *args; args end; $_(1,2)
<ruboto>
[k- # => /tmp/execpad-f7f6488b73bd/source-f7f6488b73bd:2: syntax error, unexpected '*', expecting :: or '.' ...check link for more (https://eval.in/402410)
<ruboto>
adaedra # => /tmp/execpad-6ce180e3d94a/source-6ce180e3d94a:2: syntax error, unexpected ->, expecting keyword_end ...check link for more (https://eval.in/402412)
<[k->
using libobf: $-o[?+][self, [:$_,1,2]]
<adaedra>
:'(
<[k->
that is if $_ was already a method
<shevy>
this is really really ugly
<[k->
what?
<ljarvis>
also $_ and $~ aren't actually global variables
aaeron has joined #ruby
freerobby has quit [Quit: Leaving.]
<wasamasa>
ಠ_ಠ
<ljarvis>
just to throw some fun out there #lolruby
<[k->
1,2 are just placeholder arguments?
codecop has joined #ruby
<[k->
they aren't globals?
<[k->
TIL
<ljarvis>
no they're locally scoped
werelivinginthef has joined #ruby
<ljarvis>
the prefixed $ is convenience
DEA7TH has joined #ruby
<havenwood>
[k-: the $$ is a lie!
prefixed has quit [Changing host]
prefixed has joined #ruby
<havenwood>
Now how can we trust that there will really be cake?
<prefixed>
:(
<hanmac1>
in the C api they are defined as "virtual" variables ;P
zpr has joined #ruby
zpr has left #ruby [#ruby]
<[k->
everyone got sad today :(
<ljarvis>
aren't all variables virtual
<havenwood>
Then have a slice of virtual cake to go along with your virtual global variables:
Igorshp has joined #ruby
<[k->
First there was unviolated encapsulation
<ljarvis>
?cookie
<ruboto>
here's your cookie:
<[k->
(but you can't eat it)
<ljarvis>
!fact cake here's your cake:
<ruboto>
here's, I don't know anything about cake
<ljarvis>
!fact add cake here's your cake:
<ruboto>
ljarvis, I will remember that cake is here's your cake:
<prefixed>
uh
<[k->
uhhhhhhh
<[k->
uhhhhhhhhhhh
gwendall has quit [Remote host closed the connection]
* [k-
searches for pizza
<prefixed>
is there a simple way to ignore "named pipes" with the File module?
<ljarvis>
<[k->
:( I wanted the honour!
Igorshp has quit [Remote host closed the connection]
<ljarvis>
first you must earn it
<ljarvis>
prefixed: how so?
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
<hanmac1>
[k-: funny there is red apple
<[k->
they are equally important!
<prefixed>
ljarvis I am listing all files in a directory, and when i come across named pipes, everything goes to hell
quimrstorres has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
Iskarlar has joined #ruby
The_Phoenix has joined #ruby
jgpawletko has quit [Remote host closed the connection]
The_Phoenix has quit [Max SendQ exceeded]
<hanmac1>
prefixed: show us a gist of your stuff ... for checking you can use File.file? or !File.pipe?
jgpawletko has joined #ruby
The_Phoenix has joined #ruby
Igorshp has joined #ruby
<prefixed>
hanmac perfect. I knew there would be a way to detect pipes!
The_Phoenix has quit [Max SendQ exceeded]
treehug88 has joined #ruby
Igorshp has quit [Remote host closed the connection]
sp1rs has quit [Quit: sp1rs]
* hanmac1
equips itself now with a "metal detector" to detect pipes
sp1rs has joined #ruby
The_Phoenix has joined #ruby
joonty has quit [Remote host closed the connection]
The_Phoenix has quit [Max SendQ exceeded]
[k-_ has joined #ruby
The_Phoenix has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
The_Phoenix has quit [Max SendQ exceeded]
momomomomo has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
The_Phoenix has quit [Changing host]
The_Phoenix has joined #ruby
pullphinger15 has joined #ruby
chussenot has quit [Remote host closed the connection]
hal_9000 has quit [Ping timeout: 260 seconds]
segfalt has quit [Ping timeout: 264 seconds]
allomov has quit [Remote host closed the connection]
pullphinger has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
Kully3xf has joined #ruby
allomov_ has joined #ruby
iceyec has quit [Read error: No route to host]
iceyec has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
pullphinger15 has quit [Ping timeout: 240 seconds]
sp1rs has quit [Ping timeout: 264 seconds]
Kully3xf_ has quit [Ping timeout: 246 seconds]
pullphinger has joined #ruby
<shevy>
I found one working on pipes here. pipework
dopie has joined #ruby
Kully3xf_ has joined #ruby
jgpawletko has joined #ruby
Kully3xf has quit [Ping timeout: 248 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
The_Phoenix has quit [Ping timeout: 248 seconds]
gwendall has joined #ruby
mase-chatter has joined #ruby
imanzarrabian has joined #ruby
moritzs has quit [Ping timeout: 246 seconds]
jgpawletko_ has joined #ruby
_blizzy_ has joined #ruby
grill has joined #ruby
<adaedra>
?badumtss
<ruboto>
I don't know anything about badumtss
grill has quit [Changing host]
grill has joined #ruby
<adaedra>
shame.gif
Zai00 has quit [Ping timeout: 256 seconds]
jgpawletko has quit [Ping timeout: 244 seconds]
jgpawletko_ is now known as jgpawletko
wprice has quit [Ping timeout: 252 seconds]
The_Phoenix has joined #ruby
charliesome has joined #ruby
decoponio has joined #ruby
prefixed has quit [Ping timeout: 244 seconds]
tennis has joined #ruby
valkyrka has quit [Ping timeout: 264 seconds]
duoi has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 260 seconds]
krz has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
schaerli has joined #ruby
hanmac1 has left #ruby [#ruby]
quimrstorres has quit [Remote host closed the connection]
dangerousdave has joined #ruby
delsol has quit [Ping timeout: 240 seconds]
Papierkorb has joined #ruby
freerobby has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
imanzarrabian has quit [Read error: Connection reset by peer]
casadei_ has joined #ruby
Casty has joined #ruby
Tritone has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
riotjones has quit [Remote host closed the connection]
iamvery has quit [Remote host closed the connection]
apfeluser has quit [Ping timeout: 252 seconds]
apfeluser has joined #ruby
blackmes1 has quit [Ping timeout: 250 seconds]
apfeluser has quit [Client Quit]
casadei_ has quit [Ping timeout: 244 seconds]
Hounddog has quit [Remote host closed the connection]
quimrstorres has joined #ruby
darkf has quit [Quit: Leaving]
Rodya_ has joined #ruby
rubie has joined #ruby
quimrstorres has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gagrio has quit [Ping timeout: 244 seconds]
lxsameer has quit [Quit: Leaving]
last_staff has quit [Quit: last_staff]
cassioscabral has joined #ruby
aaeron has quit [Quit: Leaving.]
casadei_ has joined #ruby
schaerli has quit [Remote host closed the connection]
<shevy>
adaedra what are you doing
quimrstorres has joined #ruby
leat1 has joined #ruby
chinmay_dd has quit [Read error: Connection reset by peer]
gagrio has joined #ruby
<adaedra>
working
cassioscabral has quit [Quit: cassioscabral]
dfockler has joined #ruby
<[k-_>
adaedra what are you doing
leat has quit [Ping timeout: 264 seconds]
dangerousdave has joined #ruby
pengin has joined #ruby
<yorickpeterse>
adaedra what are you wearing
<adaedra>
:3
havenn has joined #ruby
<dfockler>
what's going on?
khando_ has joined #ruby
Stratege_ has joined #ruby
<yorickpeterse>
adaedra: ANSWER THE QUESTION
Kully3xf has joined #ruby
miwood_ has joined #ruby
<yorickpeterse>
dfockler: nothing to see here, move along
<dfockler>
WHAT!
<adaedra>
come and see by yourself, yorickpeterse :3
Igorshp has joined #ruby
iateadonut has joined #ruby
j4cknewt_ has joined #ruby
sharpmachine has joined #ruby
relix_ has joined #ruby
dented42 has joined #ruby
MiracleBlue_ has joined #ruby
Juanchito_ has joined #ruby
tonini_ has joined #ruby
allomov_ has quit [Remote host closed the connection]
jxf_ has joined #ruby
cbednarski_ has joined #ruby
crdpink2 has joined #ruby
redteam has joined #ruby
allomov has joined #ruby
allomov has quit [Remote host closed the connection]
fumihiro_ has joined #ruby
lavros_ has joined #ruby
charliesome_ has joined #ruby
allomov has joined #ruby
Derasi has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
hostess_ has joined #ruby
drewdavis_ has joined #ruby
allomov has quit [Remote host closed the connection]
balazs_ has joined #ruby
leslie_ has joined #ruby
mighty_gorilla has joined #ruby
C0deMaver1ck_ has joined #ruby
prestorium has joined #ruby
chinmay_dd has joined #ruby
pengin has quit [Remote host closed the connection]
hahuang65 has joined #ruby
gagrio has quit [*.net *.split]
charliesome has quit [*.net *.split]
Kully3xf_ has quit [*.net *.split]
relix has quit [*.net *.split]
mase-chatter has quit [*.net *.split]
miwood has quit [*.net *.split]
Juanchito has quit [*.net *.split]
Stratege has quit [*.net *.split]
khando has quit [*.net *.split]
j4cknewt has quit [*.net *.split]
lavros has quit [*.net *.split]
troulouliou_div2 has quit [*.net *.split]
atomical has quit [*.net *.split]
v0n has quit [*.net *.split]
havenwood has quit [*.net *.split]
fumihiro has quit [*.net *.split]
al2o3-cr has quit [*.net *.split]
MiracleBlue has quit [*.net *.split]
tonini has quit [*.net *.split]
martinium has quit [*.net *.split]
crdpink has quit [*.net *.split]
Volsus has quit [*.net *.split]
dudedudeman has quit [*.net *.split]
ZeeNoodleyGamer has quit [*.net *.split]
mjmac has quit [*.net *.split]
kriskropd has quit [*.net *.split]
johnhamelink has quit [*.net *.split]
Klumben has quit [*.net *.split]
KC9YDN has quit [*.net *.split]
Kellin has quit [*.net *.split]
skarn has quit [*.net *.split]
terrellt has quit [*.net *.split]
DrCode has quit [*.net *.split]
blackjid has quit [*.net *.split]
Liam` has quit [*.net *.split]
zz_barkerd427 has quit [*.net *.split]
psyprus has quit [*.net *.split]
phat4life has quit [*.net *.split]
george2 has quit [*.net *.split]
jalcine has quit [*.net *.split]
linc01n has quit [*.net *.split]
hostess has quit [*.net *.split]
jxf has quit [*.net *.split]
cbednarski has quit [*.net *.split]
drewdavis has quit [*.net *.split]
LBRapid has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
nullwarp has quit [*.net *.split]
universa1 has quit [*.net *.split]
wookiehangover has quit [*.net *.split]
waxjar has quit [*.net *.split]
larissa has quit [*.net *.split]
Nightmare has quit [*.net *.split]
tylersmith has quit [*.net *.split]
mistym has quit [*.net *.split]
hollywood has quit [*.net *.split]
sfr^ has quit [*.net *.split]
epochwolf has quit [*.net *.split]
Seich has quit [*.net *.split]
asi_ has quit [*.net *.split]
Guest6069 has quit [*.net *.split]
leslie has quit [*.net *.split]
C0deMaver1ck has quit [*.net *.split]
douglasssss has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
<[k-_>
adaedra invites yorickpeterse :o
<shevy>
please
acke has quit [Remote host closed the connection]
MiracleBlue_ is now known as MiracleBlue
<shevy>
the heat is making the people funny
tonini_ is now known as tonini
<adaedra>
what heat
yardenbar has quit [Quit: Leaving]
Juanchito_ is now known as Juanchito
balazs_ has quit [Ping timeout: 244 seconds]
acke has joined #ruby
endash has quit [Quit: endash]
<shevy>
adaedra admit it
gwendall has quit [Remote host closed the connection]
Pyrotecnix has quit [Quit: WeeChat 0.4.2]
dcunliffe has joined #ruby
<adaedra>
we have A/C
fabrice31 has quit [Remote host closed the connection]
<shevy>
soon you have to go home
NeverDie has joined #ruby
<adaedra>
soonish
jxf_ is now known as jxf
allomov has joined #ruby
<[k-_>
hsinoos!
monstordh has joined #ruby
dcunliffe has quit [Client Quit]
Pyrotecnix has joined #ruby
martinium has joined #ruby
acke has quit [Ping timeout: 246 seconds]
leat1 has quit [Remote host closed the connection]
fumihiro has joined #ruby
troulouliou_div2 has joined #ruby
leat1 has joined #ruby
v0n has joined #ruby
tennis has quit []
gamename has joined #ruby
al2o3-cr has joined #ruby
krz has joined #ruby
dudedudeman has joined #ruby
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
gagrio has joined #ruby
livathinos has quit []
kriskropd has joined #ruby
Volsus has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
mase-chatter has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
startupality has joined #ruby
<yorickpeterse>
adaedra: sure babez
<yorickpeterse>
adaedra: now just tell me
<yorickpeterse>
too lazy to get up
maletor has joined #ruby
<dfockler>
WHAT!
DrCode has joined #ruby
Igorshp has quit [Remote host closed the connection]
fumihiro_ has quit [Ping timeout: 264 seconds]
<startupality>
When implementing file upload functionality locally and using heroku server for production do you think its better that the code uses local machine storage for files when in development or it should use aws s3 for development, staging and production? What would be the standard/best way?
hackeron_ has quit [Ping timeout: 256 seconds]
Iskarlar has joined #ruby
LiquidInsect has joined #ruby
<yorickpeterse>
we just use S3 during development
<yorickpeterse>
we prefix our bucket names with "development-" in that case
rehat has joined #ruby
RegulationD has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<startupality>
@yorickpeterse thanks for feedback. wouldnt suffixing make more sense?
<yorickpeterse>
doesn't really matter, depends on what you prefer
hobodave_ has joined #ruby
endash has joined #ruby
Igorshp has joined #ruby
TomyWork has quit [Ping timeout: 264 seconds]
hobodave_ has quit [Client Quit]
unshadow has joined #ruby
cassioscabral has joined #ruby
maletor has quit [Client Quit]
hobodave_ has joined #ruby
<startupality>
@yorickpeterse ok, btw can you rename the existing bucket?
<yorickpeterse>
Don't think so
krz has quit [Quit: WeeChat 1.0.1]
mase-chatter has quit [Quit: Leaving]
<shevy>
if you have a .rb file, where the user can give basic instructions such as "help" or "create", would you check the user input as string or symbol?
Mon_Ouie has joined #ruby
<monstordh>
I'm trying to get a SASS environment set up. I just found out that sass-globbing 1.1.1 has issues with relative paths and breaks for projects using things like: @import "../../variables/**/*". I have uninstalled and reinstalled -v 1.1.0, which works by all testimonies I have read. However, whenever I do a bundle install sass-globbing 1.1.1 is automatically RE-installed. How do I get this to stop? Am I using a version of sass version that can only use
<monstordh>
sass-globbing 1.1.1? Currently using 3.4.16 (Selective Steve)
dangerousdave has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
<grill>
why is "else if" spelled "elsif" in ruby?
<ElSif>
because of me :D
<shevy>
grill I think because it is shorter
<ElSif>
(ok not true)
<grill>
why not elif then?
<shevy>
because the s would be missing
<[k-_>
the s is important!
<[k-_>
it stands for shevy!
<adaedra>
ßhevy
<dudedudeman>
chevy
<shevy>
people here can be nuts
<dudedudeman>
ruby nuts
* adaedra
throws shevy nuts
<dudedudeman>
nucking futs i tell you!
<ElSif>
honestly i think it has to do with what Matz was used to, perl, etc (that may be also not true)
hectortrope has joined #ruby
* [k-_
shines a cold hard light at ELSif
<[k-_>
we want nothing but the truth, ELSif!
* ElSif
blinks in confusion
senayar has quit [Remote host closed the connection]
<ElSif>
but... i can only occur if something wasnt true!
senayar has joined #ruby
<[k-_>
:o touché
<shevy>
lol
<shevy>
I just realized the ElSif nick
<shevy>
those upcased letters tricked my brain before
<grill>
does ruby have java-type enums?
<[k-_>
java enums? what's that
<[k-_>
:>
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
senayar has quit [Changing host]
senayar has joined #ruby
Channel6 has joined #ruby
anisha has quit [Quit: Leaving]
howdoi_ has quit [Quit: Connection closed for inactivity]
<shevy>
only constants, arrays, hashes, strings... Struct.new ...
presto has joined #ruby
gwendall has joined #ruby
hackeron has joined #ruby
prestorium has quit [Ping timeout: 252 seconds]
<grill>
thats too bad. i like java enums
bubbys has quit [Ping timeout: 246 seconds]
<jhass>
grill: we mostly use symbols for those usecases
<grill>
?
drewo has joined #ruby
<jhass>
:foo, :bar, :baz
<jhass>
if color == :red
<[k-_>
is it READ_WRITE = 1, 2, 3 that sort of thing
jackjackdripper has joined #ruby
charliesome_ has quit [Quit: zzz]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
freerobby has quit [Client Quit]
hahuang65 has joined #ruby
freerobby has joined #ruby
<vimz>
if I have a class that excepts a block argument, and the block argument is prepended with a &, then to_proc is automatically called on that block. to_proc is a method inside the class that you can override by writing it manually right? | class MyClass def to_proc end end | anyway, how to I pass an argument to that to_proc method?
hobodave_ has quit [Quit: Computer has gone to sleep.]
gwendall has quit []
Igorshp has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
<grill>
hm
<[k-_>
to_proc should not accept any arguments
<grill>
perhaps I want to use constants then
<[k-_>
you send arguments to the created proc
ArchRogem has joined #ruby
riotjones has joined #ruby
<shevy>
vimz the short notation will only work with no-arguments-required, so [:a, :b, :c].map(&:to_s)
<adaedra>
now I'm tempted to go to js channel, throw "That's because undefined is not a function", and quit.
sdothum has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in great anger.]
jackjackdripper has quit [Quit: Leaving.]
rippa has joined #ruby
rubie has joined #ruby
ruurd has quit [Ping timeout: 252 seconds]
rdark has quit [Quit: leaving]
rdark has joined #ruby
jackjackdripper has joined #ruby
axl_ has quit [Ping timeout: 245 seconds]
rubie has quit [Read error: No route to host]
startupality has quit [Quit: startupality]
rubie has joined #ruby
<dudedudeman>
do it!
shadoi has joined #ruby
<adaedra>
That would be trolling, dudedudeman. You know I'm not like that.
<dudedudeman>
:(
<dudedudeman>
you're right
<dudedudeman>
i've been doing some js reading and such lately
flak has joined #ruby
<dudedudeman>
i need to understand it better. as much as we like to hate it, it has it's place for client interaction. and, because i for some bloody reason enjoy creating client experiences, javascript is a must :/
Igorshp has quit [Read error: Connection reset by peer]
cassioscabral has joined #ruby
_djbkd has joined #ruby
<adaedra>
rip dudedudeman
Rutix has quit []
tuelz has joined #ruby
Igorshp has joined #ruby
shadoi has quit [Client Quit]
sdothum has joined #ruby
aryaching has joined #ruby
cassioscabral has quit [Client Quit]
cassioscabral has joined #ruby
kies^ has joined #ruby
cassioscabral has quit [Client Quit]
rippa has quit [Ping timeout: 264 seconds]
<adaedra>
time to go
<adaedra>
\o
<dudedudeman>
cheers!!!
sdothum has quit [Client Quit]
kohgpat has joined #ruby
spider-mario has joined #ruby
howdoicomputer has joined #ruby
bubbys has joined #ruby
blaines has joined #ruby
shadoi has joined #ruby
failshell has quit [Remote host closed the connection]
quimrstorres has quit [Read error: Connection reset by peer]
dseitz has joined #ruby
emilkarl has joined #ruby
quimrstorres has joined #ruby
rcvalle has joined #ruby
gambl0re has quit [Ping timeout: 256 seconds]
jonee has quit [Ping timeout: 240 seconds]
presto has joined #ruby
lavros_ has quit [Quit: leaving]
presto has quit [Client Quit]
quimrsto_ has joined #ruby
gambl0re has joined #ruby
wallerdev has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
quimrstorres has quit [Ping timeout: 240 seconds]
devbug has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
cnngimenez has joined #ruby
Kully3xf has joined #ruby
phoo1234567 has joined #ruby
ruurd has joined #ruby
khando_ has quit [Quit: Lost terminal]
rdark has quit [Ping timeout: 256 seconds]
Kully3xf_ has quit [Ping timeout: 255 seconds]
bubbys has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
<grill>
is it possible to remove a key + value pair from a hash by key?
iamvery has joined #ruby
sharpmachine has quit [Remote host closed the connection]
<ccooke>
grill: hash.delete(key), which returns the value
ndrei has quit [Ping timeout: 240 seconds]
bubbys has joined #ruby
k3asd` has joined #ruby
allomov has joined #ruby
k3asd` has quit [Changing host]
k3asd` has joined #ruby
bodgix has quit [Quit: Leaving.]
ndrei has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
phoo1234567 has joined #ruby
tomphp has quit [Ping timeout: 244 seconds]
shinnya has quit [Ping timeout: 252 seconds]
lsmola has quit [Ping timeout: 265 seconds]
eminence_ has joined #ruby
blaines has quit [Ping timeout: 246 seconds]
stamina has quit [Quit: WeeChat 1.2]
zly has joined #ruby
mikecmpbll has joined #ruby
cassioscabral has joined #ruby
Jackneill has joined #ruby
blaines has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
failshell has joined #ruby
iamvery has quit [Ping timeout: 255 seconds]
benlieb has joined #ruby
balazs has quit [Remote host closed the connection]
<baweaver_>
they are, but overridden. Semantics though.
mistym has joined #ruby
sfr^ has joined #ruby
safeforge has quit [Ping timeout: 246 seconds]
<apeiros>
the one thing I find interesting is that each_pair doesn't work that way
Igorshp has quit [Remote host closed the connection]
<apeiros>
baweaver_: a method being overridden is not just semantics.
<baweaver_>
it's not
nullwarp has joined #ruby
<Ox0dea>
apeiros: By "Enumerable methods on Hash", I refer to the results of `{}.methods & Enumerable.instance_methods`.
<baweaver_>
I'm saying that me stating it is a bit pedantic.
tylersmith has joined #ruby
Seich has joined #ruby
Klumben has joined #ruby
Blaguvest has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bungoman has joined #ruby
larissa has joined #ruby
skarn has joined #ruby
girakrok has joined #ruby
<Ox0dea>
baweaver_: They are the only ones that return Hashes, but why should that have any bearing on what gets yielded to the block?
LBRapid has joined #ruby
george2 has joined #ruby
<baweaver_>
ah
<baweaver_>
still waking up a bit
<baweaver_>
ignore me for the next hour or so
quimrstorres has quit [Remote host closed the connection]
<bricker>
done.
quimrstorres has joined #ruby
<baweaver_>
bricker: oh?
hobodave has quit [Quit: Computer has gone to sleep.]
scripore has quit [Ping timeout: 256 seconds]
cbednarski_ is now known as cbednarski
hfp_work has quit [Ping timeout: 246 seconds]
hfp has quit [Ping timeout: 244 seconds]
quimrstorres has quit [Remote host closed the connection]
allomov has joined #ruby
<shevy>
lol
<shevy>
great conversation between bricker and the old beaver :D
hfp has joined #ruby
charliesome has quit [Quit: zzz]
hfp_work has joined #ruby
Esya has quit [Disconnected by services]
fullofcaffeine has quit [Remote host closed the connection]
<baweaver_>
This time next week I'll be over in Seattle saying hi
kies^ has quit [Ping timeout: 256 seconds]
eggoez has quit [Ping timeout: 256 seconds]
msnyon has joined #ruby
quimrstorres has joined #ruby
fullofcaffeine has joined #ruby
Esya has joined #ruby
danzilio has joined #ruby
blackjid has joined #ruby
hfp_ has joined #ruby
<AccordLTN>
halp, I'm a newbie and I'm going insane because rspec isn't loading up my Array class extension despite requiring the file with said extensions :I I just threw a new function in there and that gets loaded by rspec just fine, but not my Array extensionsss
fgo_ has joined #ruby
charliesome has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
rubie has quit [Remote host closed the connection]
<jhass>
?code AccordLTN
<ruboto>
AccordLTN, We can't help you without your code, please post it to https://gist.github.com
<baweaver_>
gist the spec file
<jhass>
no, gist everything
<baweaver_>
^
cassioscabral has quit [Quit: cassioscabral]
gambl0re has quit [Remote host closed the connection]
miwood has joined #ruby
A_ron has joined #ruby
jerius has quit [Quit: /quit]
Liam` has joined #ruby
<AccordLTN>
can I separate it into multiple files in a gist orrr...
<AccordLTN>
I'm following a tutorial that places them there, but noted for the future
Mendenhall has joined #ruby
eggoez has joined #ruby
<AccordLTN>
hm
<Avat>
Hey guys, I want to write a MQTT broker in Rails, is it possible? All gems are clients as far as I understand
ruurd has joined #ruby
<AccordLTN>
but my spec_helper still isn't loading up core_extensions.rb for some reason
toretore has joined #ruby
jhack32 has joined #ruby
<baweaver_>
#RubyOnRails Avat
jackjackdripper has joined #ruby
hfp has quit [Ping timeout: 246 seconds]
<yorickpeterse>
_sillymarkets: your two queries are very different
startupality has quit [Quit: startupality]
aaeron has joined #ruby
<yorickpeterse>
In the mongo shell you're grouping on "$date" but in Ruby you're grouping on the sum
<AccordLTN>
and I fixed that too now, welp
hfp_work has quit [Ping timeout: 265 seconds]
corpsicle has left #ruby [#ruby]
lannonbr has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
hfp_work has joined #ruby
cnngimenez has joined #ruby
hfp has joined #ruby
werelivinginthef has joined #ruby
<_sillymarkets>
yorickpeterse: i tried the same query multiple times, ruby script wont even run with regular mongo. Says undefined method "aggregate". When I convert it into Moped, I get an empty array for the same query in mongo shell that works
<_sillymarkets>
yorickpeterse: I checked my mongo gem versions to make sure they were up to date for aggregation pipeline, should be fine
<jhack32>
where can i post a small snippet of my code?
<jhack32>
for some help
kirun has joined #ruby
<jhass>
?gist jhack32
<ruboto>
jhack32, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
werelivinginthef has quit [Remote host closed the connection]
<baweaver_>
?gist
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver_>
oho, so I can use that. I'll need to remember it
werelivinginthef has joined #ruby
ruby-lang282 has joined #ruby
<jhass>
?rails baweaver_
<ruboto>
baweaver_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<ruby-lang282>
hola amigos
<baweaver_>
nifty jhack32
<jhass>
ruby-lang282: welcome to the english Ruby channel
hobodave has joined #ruby
DLSteve has joined #ruby
<baweaver_>
jhass
<baweaver_>
*
<ruby-lang282>
haha jhass
<yorickpeterse>
_sillymarkets: Moped only supports the aggregation framework since newer versions, the Ruby mongo driver has supported it for a while now IIRC
<ruby-lang282>
is there a spanish ruby channel that i can migrate to
<baweaver_>
jaja
<jhass>
?channels
<ruboto>
I don't know anything about channels
<jhass>
meh
DLSteve has quit [Max SendQ exceeded]
<_sillymarkets>
yorickpeterse: yeah, but i keep getting undefined method "aggregate" for mongo ruby driver. Even though im on 2.0.6, and my db version is higher than 2.2
<yorickpeterse>
_sillymarkets: you might want to ask in whatever IRC channel MongoDB operates
lala has quit [Quit: Connection closed for inactivity]
<doug_f>
I am installing ruby to a docker/progrium/busybox and get the error when running it that "/usr/lib/ruby/ruby2.2-bin: not found" ls shows it there and executable.
<doug_f>
Any ideas to further troubleshoot?
<jhass>
benlieb: huh? it should fail if there's an uncatched exception bubbling up
kies^ has joined #ruby
jhack32 has joined #ruby
havenwood has joined #ruby
Aswebb_ has quit []
fullofcaffeine has quit [Remote host closed the connection]
jhack32 has quit [Remote host closed the connection]
DarkBushido has joined #ruby
andikr has quit [Remote host closed the connection]
<benlieb>
jhass: it doesn’t. if I have get :create as the only thing in the test, and there is an exception in the create method, it doesn’t fail. It only fails on exceptions that don’t match
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fullofcaffeine has joined #ruby
<jhass>
ah, I guess for a controller test rails catches it and the response turns into not being success
pengin has quit [Remote host closed the connection]
<jhass>
like it would be in the real app
<jhass>
it wouldn't crash your appserver
sanguisdex has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
dimasg has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
sanguisdex has joined #ruby
<jhass>
that's why you have expect(response).to be_success as a common controller spec
Asher1 has joined #ruby
Asher has quit [Read error: No route to host]
Asher1 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 244 seconds]
A_ron has joined #ruby
THEahindle is now known as ashleyhindle
rubie has quit [Remote host closed the connection]
Asher has joined #ruby
ruurd has joined #ruby
tercenya_ has quit []
tercenya has joined #ruby
rubie has joined #ruby
u3d4dd has joined #ruby
pengin has joined #ruby
reset has quit [Ping timeout: 252 seconds]
allomov has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Kully3xf>
can you have a hash where only some keys have a value?
havenwood has joined #ruby
peter_paule has joined #ruby
<jxf>
Kully3xf: sure: {:x => 'foo', :y => nil}
dseitz has joined #ruby
<Kully3xf>
coolio
n008f4g_ has joined #ruby
<Kully3xf>
thank ya much
vdamewood has joined #ruby
chipotle has joined #ruby
fantazo has quit [Ping timeout: 255 seconds]
navs_ has left #ruby [#ruby]
j4cknewt_ has quit [Remote host closed the connection]
<Kully3xf>
if I have a has of 1100 items, and then another hash of ~100 items, is best practice to do a a.includes?(b) do |k,v| puts k puts v
<Kully3xf>
?
<apeiros>
so indeed, 15bit is sufficient
<Kully3xf>
hash*
<apeiros>
Kully3xf: that question makes no sense
<Kully3xf>
wording is off - my bad.
<apeiros>
a) because there's no Hash#includes? (I assume you meant #include?) and b) because #include? does not take a block
bruno- has joined #ruby
<apeiros>
sooo… what are you asking really?
rubie has quit [Remote host closed the connection]
<Kully3xf>
basically have a list of 1100 plugins (all available for this program) so if I want to allow jus tthese 100 to be installed it's best to just loop through the smaller one and see if it's included, if it is install it, if not uninstall
rubie has joined #ruby
<apeiros>
Kully3xf: I still don't follow. you say you have 2 inputs (1100 plugins, whitelist of 100), but it sounds like you had a third input ("please install those N plugins") - is that correct?
swgillespie has joined #ruby
<Kully3xf>
so the end result is that if a user installs a plugin not allowed on the white list, it is uninstalled
<Kully3xf>
(chef)
<apeiros>
so the 1100 plugins list is irrelevant
<Kully3xf>
how so
<apeiros>
relevant is only that 1 plugin the user installs and that 100 whitelisted plugins…
scripore has quit [Quit: This computer has gone to sleep]
<apeiros>
and you can test inclusion in a hash with a single .include? call
jerius has joined #ruby
<Kully3xf>
nah because there's no clean way to get the installed plugins listed
<apeiros>
ok, I can't really make sense of your question. maybe somebody else can.
<Kully3xf>
I'll try to be more explicit.
bruno- has quit [Ping timeout: 240 seconds]
<apeiros>
but it seems to me like Array#&, #| and #- are methods you want to look into
<apeiros>
also Hash#include? of course.
eminence_ has joined #ruby
peter_paule has quit [Ping timeout: 255 seconds]
<Ox0dea>
Kully3xf: What are `a` and `b` actually called in your code?
<Kully3xf>
i'm using chef to install plugins on jenkins. Jenkins currently has 1100 available plugins. I currently have a list of ~100 approved plugins. I want it to be so that if a dev installs a plugin, chef will delete it. Unfortunaltey there's no clean way to pulldown the currently installed plugins and compare against the current list. So my idea was create a hash of all available plugins, create a hash of all approved plugins, default is uninstall, so chef
_blizzy_ has joined #ruby
Sypheren has joined #ruby
<Kully3xf>
and if we want to install a new plugin, just flip the action: uninstall switch to action: install
baweaver has quit [Remote host closed the connection]
blaines has joined #ruby
<Kully3xf>
say with an if statement and a corresponding value to the key "name of the plugin"
<Kully3xf>
so hash "name_of_plugin" => "install" if we want it uninstalled and if value == "install" then run thhrough install, else uninstall
<Ox0dea>
Kully3xf: You should find out how to get the list of installed plugins.
scripore has joined #ruby
blaines_ has joined #ruby
baweaver has joined #ruby
last_staff has quit [Quit: last_staff]
Musashi007 has quit [Quit: Musashi007]
chipotle has quit [Quit: cheerio]
<Ox0dea>
If you want to remove non-whitelisted plugins without the list of installed ones, then you have to iterate over all ~1100, no?
blaines has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
baweaver_ has joined #ruby
<ruurd>
Kully3xf maybe you should let the stupid devs maintain their own Jenkins?
CustosLimen has quit [Ping timeout: 240 seconds]
<ruurd>
Or allow them to maintain the current one to begin with.
CustosLimen has joined #ruby
<Kully3xf>
they can - but I want chef to maintain the plugins
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<shevy>
they want chocolate and cheese
snockerton has joined #ruby
<Ox0dea>
They want faster horses.
<snockerton>
i'm trying to find an object in an array of hashes based on a subset string in one of the values of the object, what's the best way to do this?
allomov has quit [Remote host closed the connection]
<Ox0dea>
Looks fine to me.
<snockerton>
ruby ftw
<grill>
yo. do Dir file matchers support regex or just glob?
<Ox0dea>
grill: Just globs, and not as powerful as the shell's. :/
<snockerton>
shevy: Ox0dea: thx
<grill>
:(
Silox| has quit [Quit: Connection closed for inactivity]
charliesome has quit [Quit: zzz]
<Ox0dea>
Sure thing.
<grill>
why
<Ox0dea>
Because reasons.
<grill>
bad ones?
<Ox0dea>
Old ones.
<shevy>
yeah Ox0dea's solution is shorter than the earlier one
<Ox0dea>
shevy: It's not just shorter, it's easier to read and probably slightly more performant.
<shevy>
oh a triple win
<Ox0dea>
Yay!
Musashi007 has joined #ruby
<apeiros>
Ox0dea: (I fully believe you) what kind of globs does the shell allow which ruby's glob doesn't?
pengin has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
Well, zsh's
<Ox0dea>
zsh's ^ isn't supported.
<Ox0dea>
Also, exclusion with ! doesn't appear to work like it does at the shell.
hololeap has joined #ruby
kawaii-imouto has quit [Quit: fix config]
<apeiros>
what does ^ do there? negation?
<jhack32>
apeiros: can you explain to me why it would be better to use an array instead of a hash in a tictactoe game? I currently have everything under one class. Wouldn't i be able to push the X/O into hashes easier than arrays? or am i not understanding something correctly
hanmac has joined #ruby
rubie has joined #ruby
<dfockler>
because you have a fixed amount of slots you need to deal with
dimasg has quit [Ping timeout: 240 seconds]
<apeiros>
jhack32: with an array, you have 9 slots at index 0-8. you put the X/O into those.
FernandoBasso has joined #ruby
<apeiros>
the hash just adds indirection
<dfockler>
and you are only dealing with storing a boolean
<apeiros>
dfockler: incorrect. it's tri-state.
<Ox0dea>
apeiros: Hm, no, I suppose ^ doesn't participate in globs, but ! exclusion is definitely different.
<dfockler>
apeiros: ahh yeah X/O/Blank
<apeiros>
exactly :)
<Ox0dea>
A while back, Senjai wanted to exclude a single directory matching a static string, and answers weren't forthcoming. :/
<apeiros>
Ox0dea: they are not evaluated if a value is passed in. but they are evaluated every time if nothing is passed in.
swgillespie has joined #ruby
<apeiros>
the former you can test by having e.g. puts("hi") as default value
<mdcox>
Oh...only when defined? Darn. I'm trying to get around a very expensive method call that I don't always have to call depending on what's passed in. Guess I'll just have some really ugly if statements.
finisherr has joined #ruby
<mdcox>
Thanks for the help :)
<Ox0dea>
mdcox: ||= to the rescue?
<apeiros>
mdcox: no. see what I wrote. ignore Ox0dea :-p
Kully3xf_ has joined #ruby
<apeiros>
mdcox: also if it's that expensive, be explicit? but IMO: show real code… (the relevant part)
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mdcox>
Yeah, explicit is better, so I'll just go through and have some crazy conditionals. It's hitting a database table that's crazy huge and running a silly query. But if we are already working with the value where the caller is I'd rather just pass it in.
Kully3xf has quit [Ping timeout: 240 seconds]
<mdcox>
Probably just split it into a different method. It'd be clearer
LoBoGoL has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
ndrei has joined #ruby
Kully3xf_ has quit [Ping timeout: 252 seconds]
_ht has quit [Quit: Konversation terminated!]
bigbadbear has joined #ruby
diegoviola has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has quit [Remote host closed the connection]
dawkirst has joined #ruby
dorei has quit []
bmurt has quit []
choppington has quit [Ping timeout: 265 seconds]
<dawkirst>
Hi - does duck typing implicitly imply that the object to which the duck type is sent returns in a uniform way?
<drbrain>
yes
<dawkirst>
Would not returning in a uniform way not make it a duck type?
<Ox0dea>
mdcox: It's hard to go wrong with Extract Method, but instance variable + ||= is pretty idiomatic.
<drbrain>
dawkirst: maybe
<drbrain>
part of duck typing is that types are fuzzy
<Ox0dea>
dawkirst: You would be violating Liskov's Substitution Principle, which is pretty much always a Bad Thing.
Jarboe has joined #ruby
bronson has quit [Remote host closed the connection]
<drbrain>
↑ there are excellent reasons that you do similar reasons as the other implementors
<dawkirst>
drbrain: I understand that types of classes are fuzzy, but surely the method name and the form of what it returns need to be uniform across the duck type, right?
<drbrain>
but raising an exception when the other objects do not is probably ok
<drbrain>
in order to work uniformly you must return uniformly
<dawkirst>
yeah
<drbrain>
but in order for your implementation to match the others you must have a clear specification to work from
<drbrain>
without one it's hard to say if you're doing something too-strange
codecop has joined #ruby
sdothum has joined #ruby
cyrus_ has joined #ruby
ascarter has joined #ruby
dseitz has joined #ruby
LoBoGoL has joined #ruby
<cyrus_>
Very newbie on ruby (outside of basic syntax). Trying to troubleshoot a puppet issue. Could not autoload puppet/provider/cisco_vlan/cisco_ios: no such file to load -- puppet/provider/cisco_ios. https://gist.github.com/cyrus-mc/64641a7b8b30ad112fdd. As you can see the file puppet/provider/cisco_ios.rb exists and defines a new class Cisco_ios. My question is, is the capital (Cisco_ios) the possible cause of the issue?
Igorshp has joined #ruby
CloCkWeRX has joined #ruby
ldnunes has quit [Quit: Leaving]
solars has joined #ruby
<drbrain>
cyrus_: yes, the cases should match
<cyrus_>
k will try
aryaching has quit [Ping timeout: 256 seconds]
Igorshp has quit [Ping timeout: 244 seconds]
<finisherr>
anyone know how i can translate a \n character to a literal \n
mfp has joined #ruby
weemsledeux has joined #ruby
<Ox0dea>
finisherr: You have to use eval. :(
<adaedra>
gsub('\n', "\n")
<finisherr>
Ohhh
gamename has quit []
<finisherr>
i was doing it the other way wround
<finisherr>
around
<finisherr>
k
gamename has joined #ruby
<adaedra>
meh, don't know if it would work, never remember which languages do \n inside of ''
gamename has quit [Remote host closed the connection]