jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<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.
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<ryanprior> that would at least be less surprising
laurentide has joined #ruby
<hanmac> >> wtf = []; foo = {a: 1, b: 2}; Enumerable.instance_method(:select).bind(foo).call { |x| wtf << x }; wtf
<ruboto> hanmac # => [[:a, 1], [:b, 2]] (https://eval.in/401891)
<Ox0dea> Still, you can use Numerics as keys, so it'd be ambiguous.
<Ox0dea> >> Hash.include? Enumerable
<ruboto> Ox0dea # => true (https://eval.in/401892)
<Ox0dea> hanmac: It ought to work out of the box, in my opinion.
user1138 has quit [Ping timeout: 264 seconds]
swgillespie has joined #ruby
blackmes1 has joined #ruby
<hanmac> >> wtf = []; foo = {a: 1, b: 2}; foo.select { |*x| wtf << x }; wtf
<ruboto> hanmac # => [[:a, 1], [:b, 2]] (https://eval.in/401893)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DEA7TH has joined #ruby
calleerlandsson has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 265 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mleung has quit [Quit: mleung]
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
havenwood has joined #ruby
benlieb has quit [Quit: benlieb]
user1138 has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aaeron> Hey
<pontiki> hi
<aaeron> I want to make a http post with json string and a file
<aaeron> I got this
jpfuentes2 has joined #ruby
<aaeron> Is there any other way I can do that?
<Ox0dea> ryanprior: So, do you see why it was trying to call #nodoc on 'e'?
blaines has joined #ruby
choke has quit [Ping timeout: 246 seconds]
polpak has quit [Quit: leaving]
<pontiki> aaeron: there's serveral such gems
<aaeron> Is restclient one of them?
<aaeron> Do u have a preference.
chipotles has quit [Quit: Textual IRC Client: www.textualapp.com]
marr has quit []
Torrieri has quit [Ping timeout: 264 seconds]
rubie has joined #ruby
howdoicomputer has joined #ruby
<Ox0dea> aaeron: multipart-post is probably the simplest.
<pontiki> actually, the last time i had to do that, i just wrote it like in that blog
choke has joined #ruby
<Ox0dea> aaeron: It just adds multipart capabilities to Net::HTTP.
<ryanprior> Ox0dea: because 'e' was a key in the hash, I think.
<aaeron> okay
<Ox0dea> ryanprior: No, not quite.
Feyn has joined #ruby
<aaeron> Cool
<aaeron> Thanks @pontiki @Ox0dea
<Ox0dea> Yep, should do the trick.
<pontiki> the app already had too many gems, i thought, and it was one service that i was proxying
<Ox0dea> >> :help[1] # ryanprior
<ruboto> Ox0dea # => "e" (https://eval.in/401898)
<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 }]
oo_ has joined #ruby
<ruboto> Ox0dea # => [33, {:select=>:a, :reject=>:a}] (https://eval.in/401906)
Wolland has joined #ruby
dented42 has joined #ruby
<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]
msnyon has quit [Ping timeout: 264 seconds]
bungoman_ has quit [Ping timeout: 255 seconds]
Muhannad has quit [Max SendQ exceeded]
ged_ is now known as ged
bruno- has quit [Ping timeout: 255 seconds]
<aaeron> api_helper.rb:121:in `initialize': invalid access mode application/java-archive (ArgumentError)
Muhannad has joined #ruby
<aaeron> @Ox0dea
<aaeron> please see above
jackjackdripper has joined #ruby
<Ox0dea> aaeron: That error isn't coming from multipart-post.
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
<Ox0dea> It seems you're using "application/java-archive" where an access mode (like "r" or "w") is expected.
helpa has joined #ruby
Muhannad has quit [Max SendQ exceeded]
zz_barkerd427 is now known as barkerd427
Muhannad has joined #ruby
pengin has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
jbw__ has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hololeap has joined #ruby
jbw_ has quit [Ping timeout: 244 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
Muhannad has quit [Max SendQ exceeded]
<aaeron> @Ox0dea: Shoot. I totally missed it. Thanks a lot for pointing out.
<aaeron> Running again
<aaeron> Will update
<Ox0dea> Standing by.
Muhannad has joined #ruby
baweaver has quit [Remote host closed the connection]
maletor has quit []
linuxboytoo has quit [Ping timeout: 240 seconds]
<aaeron> Awesome
<aaeron> I think it works. But this time the json object failed
<aaeron> I think u solved the jar issue for me.
Muhannad has quit [Max SendQ exceeded]
<aaeron> Thanks Ox0dea
<aaeron> :)
<aaeron> I'll update once the full request is posted
Muhannad has joined #ruby
mikenovikov has joined #ruby
casadei_ has joined #ruby
endash has quit [Quit: endash]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Muhannad has quit [Max SendQ exceeded]
Muhannad has joined #ruby
Thomas-0725 has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hatzopoulos has joined #ruby
casadei_ has quit [Ping timeout: 240 seconds]
shazaum has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user1138 has joined #ruby
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Musashi007 has joined #ruby
dom__ has quit [Quit: Lost terminal]
reset has quit [Ping timeout: 240 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Read error: Connection reset by peer]
scripore has joined #ruby
gwendall has quit [Ping timeout: 264 seconds]
choke has quit [Ping timeout: 248 seconds]
tmtwd has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
cassioscabral has joined #ruby
dgutierrez1287 has joined #ruby
jcabmin has quit [Ping timeout: 265 seconds]
rcvalle has quit [Quit: rcvalle]
Thomas-0725 has joined #ruby
dgutierrez1287 has quit [Ping timeout: 248 seconds]
DEA7TH has quit [Quit: DEA7TH]
j4cknewt has quit [Remote host closed the connection]
Lucky_ has joined #ruby
avahey has joined #ruby
Lucky_ has quit [Client Quit]
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
lannonbr has joined #ruby
michael_mbp has quit [Excess Flood]
DEA7TH has joined #ruby
Channel6 has joined #ruby
freerobby has joined #ruby
Soda has joined #ruby
michael_mbp has joined #ruby
Wolland has quit []
Musashi007 has quit [Quit: Musashi007]
imkj has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
FernandoBasso has quit [Quit: May the force be with you.]
pengin has joined #ruby
<Ox0dea> aaeron: Happy to help. :)
bronson has quit [Remote host closed the connection]
<aaeron> @Ox0dea: U have easily saved several hours for me.
<aaeron> :)
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
annihilannic has left #ruby [#ruby]
<aaeron> I am not done yet though. Have to donwload the jar file from some location before I post it
blue_deref has quit [Quit: bbn]
Musashi007 has joined #ruby
jaycee has joined #ruby
towski_ has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 248 seconds]
davedev24 has joined #ruby
tkuchiki has joined #ruby
Agoldfish has quit [Quit: G'Bye]
choke has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
user1138_ has joined #ruby
GitGud has quit [Quit: My name is your name]
GitGud has joined #ruby
[H]unt3r has quit [Quit: Leaving]
pico-pete has quit [Ping timeout: 248 seconds]
pengin has quit [Remote host closed the connection]
GitGud has quit [Remote host closed the connection]
GitGud has joined #ruby
pico-pete has joined #ruby
j4cknewt has joined #ruby
user1138 has quit [Ping timeout: 246 seconds]
sharpmachine has joined #ruby
drewo has quit [Ping timeout: 240 seconds]
redteam has quit [Quit: Leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky_ has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
jbw__ has quit [Ping timeout: 248 seconds]
qiukun has joined #ruby
code1o6 has joined #ruby
fumihiro has joined #ruby
GitGud has left #ruby ["Leaving"]
wallerdev has quit [Quit: wallerdev]
oo_ has quit [Remote host closed the connection]
[H]unt3r has joined #ruby
Stratege___ has joined #ruby
pico-pete has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
Stratege has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
pico-pete has joined #ruby
nateberkopec has quit [Ping timeout: 265 seconds]
hatzopoulos has quit [Quit: Leaving]
Unicorn| has quit [Quit: Connection closed for inactivity]
linuxboytoo has joined #ruby
Mendenhall has quit [Ping timeout: 265 seconds]
jamesaxl has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
eggoez has quit [Ping timeout: 248 seconds]
Musashi007 has joined #ruby
linuxboytoo has quit [Ping timeout: 240 seconds]
Vile` has quit [Read error: Connection reset by peer]
tmtwd has quit [Remote host closed the connection]
Vile` has joined #ruby
choke has quit [Read error: Connection reset by peer]
eggoez has joined #ruby
oo_ has quit [Remote host closed the connection]
icebourg has quit []
benlovell has joined #ruby
MasterPiece has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 256 seconds]
mleung has joined #ruby
chipotle has quit [Quit: cheerio]
mleung has quit [Client Quit]
Spami has joined #ruby
oo_ has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
hololeap has joined #ruby
chipotle has joined #ruby
dopie has joined #ruby
Xiti has quit [Quit: Xiti]
pullphinger has joined #ruby
avitzurel has joined #ruby
Musashi007 has quit [Quit: Musashi007]
podman has quit [Quit: Connection closed for inactivity]
benlovell has joined #ruby
aaeron has quit [Quit: Leaving.]
balazs_ has joined #ruby
blkperl has left #ruby [#ruby]
Mendenhall has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
workmad3 has joined #ruby
benlovell has quit [Ping timeout: 260 seconds]
balazs_ has quit [Ping timeout: 244 seconds]
dopie has quit [Quit: This computer has gone to sleep]
[H]unt3r has quit [Quit: Leaving]
charliesome has joined #ruby
xcesariox has joined #ruby
shazaum has quit [Quit: Leaving]
avitzurel has quit [Remote host closed the connection]
hahuang65 has joined #ruby
avitzurel has joined #ruby
avitzurel has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 246 seconds]
jaycee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 246 seconds]
dented42 has joined #ruby
dfockler has joined #ruby
Xiti has joined #ruby
Lectus has quit [Quit: Page closed]
dopie has joined #ruby
bronson has joined #ruby
willharrison has joined #ruby
willharrison has quit [Client Quit]
mistermo_ has joined #ruby
Soda has quit [Remote host closed the connection]
mistermo_ has quit [Remote host closed the connection]
ljen has quit [Quit: Connection closed for inactivity]
eminence_ has quit [Remote host closed the connection]
aaeron has joined #ruby
dfockler has quit [Ping timeout: 248 seconds]
mistermocha has quit [Ping timeout: 248 seconds]
<aaeron> Ox0dea: Done. Thanks a lot for your help
Lucky_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<aaeron> used open-uri for download a jar
bronson has quit [Ping timeout: 246 seconds]
jackjackdripper has joined #ruby
allomov has joined #ruby
<Ox0dea> aaeron: My pleasure. open-uri is definitely one way to do it.
<aaeron> thanks :)
michaeldeol has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
<Ox0dea> aaeron: I trust you're not downloading from and uploading to the same server, right?
<aaeron> nope.
<aaeron> hehe
<aaeron> thanks for checking
<Ox0dea> Okay. Otherwise it'd probably make more sense to reuse the connection.
<aaeron> :)
<aaeron> yep.
shadoi has quit [Quit: Leaving.]
mistermocha has joined #ruby
desigx has quit [Ping timeout: 248 seconds]
dimasg has joined #ruby
allomov has quit [Ping timeout: 252 seconds]
rcvalle has joined #ruby
sharpmachine has quit [Remote host closed the connection]
veduardo has quit [Ping timeout: 256 seconds]
sharpmachine has joined #ruby
Lucky_ has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
mistermocha has joined #ruby
nfk has quit [Remote host closed the connection]
zr2d2 has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
swgillespie has joined #ruby
Mendenhall has quit [Ping timeout: 244 seconds]
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
linuxboytoo has joined #ruby
sharpmachine has quit [Remote host closed the connection]
miwood has joined #ruby
xkickflip has quit [Ping timeout: 240 seconds]
astrobunny has quit [Ping timeout: 246 seconds]
uri_ has joined #ruby
uri_ has quit [Client Quit]
desigx has joined #ruby
yfeldblum has quit [Remote host closed the connection]
linuxboytoo has quit [Ping timeout: 264 seconds]
_blizzy_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
bronson has joined #ruby
braincrash has quit [Quit: bye bye]
_blizzy_ has quit [Read error: Connection reset by peer]
segfalt has quit [Quit: segfalt]
linuxboytoo has joined #ruby
kies^ has quit [Ping timeout: 250 seconds]
braincrash has joined #ruby
christiandsg has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
fromthedepths1 has left #ruby [#ruby]
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
uri_ has joined #ruby
bigmac is now known as i8igmac
Ox0dea has quit [Read error: Connection reset by peer]
uri_ has quit [Client Quit]
dimasg has quit [Ping timeout: 240 seconds]
aaeron has quit [Quit: Leaving.]
Spami has quit [Quit: This computer has gone to sleep]
htmldrum has joined #ruby
user1138_ has quit [Ping timeout: 246 seconds]
lkba_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
framling has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
RobertBirnie has quit [Max SendQ exceeded]
dwithers has joined #ruby
RobertBirnie has joined #ruby
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 246 seconds]
dwithers1 has joined #ruby
eminence_ has joined #ruby
pl1ght has quit [Read error: No route to host]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacstewart has quit [Remote host closed the connection]
godzillaenlacasa has quit [Ping timeout: 250 seconds]
charliesome has quit [Read error: Connection reset by peer]
cassioscabral has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
rhm50_ has joined #ruby
cassioscabral has joined #ruby
baweaver has quit [Remote host closed the connection]
dwithers has quit [Ping timeout: 244 seconds]
CloCkWeRX has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
Casty has quit [Quit: Textual IRC Client: www.textualapp.com]
barkerd427 is now known as zz_barkerd427
finisherr has joined #ruby
rhm50_ is now known as wasserschlange
devbug has quit [Ping timeout: 256 seconds]
wasserschlange is now known as wasserschlange_
MatrixBridge has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
MatrixBridge has joined #ruby
finisherr has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wasserschlange_ is now known as rhm50_
RobertBirnie has quit [Ping timeout: 256 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devbug has joined #ruby
devbug has quit [Remote host closed the connection]
devbug has joined #ruby
eggoez has joined #ruby
RobertBirnie has joined #ruby
imkj has quit [Quit: ircII EPIC5-1.1.10 -- Are we there yet?]
ecksit has joined #ruby
Muhannad has quit [Ping timeout: 240 seconds]
tsou has quit [Quit: off]
cats has quit [Ping timeout: 256 seconds]
qiukun_ has joined #ruby
ecksit has quit [Read error: Connection reset by peer]
dgutierrez1287 has joined #ruby
qiukun has quit [Ping timeout: 244 seconds]
qiukun_ is now known as qiukun
gix- has quit [Ping timeout: 248 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
jbw has joined #ruby
miwood has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
cats has joined #ruby
dgutierrez1287 has quit [Ping timeout: 256 seconds]
gix has joined #ruby
tsou has joined #ruby
bffff_ has quit [Quit: Connection closed for inactivity]
hahuang65 has quit [Ping timeout: 244 seconds]
ohaibbq has joined #ruby
CloCkWeRX has joined #ruby
fumihiro has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
<xxneolithicxx> anyone know any good websites for technical conference listings?
oo_ has joined #ruby
Igorshp_ has joined #ruby
tjbiddle has joined #ruby
dented42 has joined #ruby
fgo has joined #ruby
Igorshp has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
rhm50_ has quit [Quit: Leaving]
uri__ has joined #ruby
martinium has quit [Ping timeout: 260 seconds]
pwnz0r has joined #ruby
uri__ has quit [Client Quit]
christiandsg has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
finisherr has quit [Quit: finisherr]
lannonbr has quit [Quit: WeeChat 1.2]
workmad3 has joined #ruby
finisherr has joined #ruby
arescorpio has joined #ruby
pengin has joined #ruby
sevenseacat has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
Ox0dea has joined #ruby
<Ox0dea> xxneolithicxx: Are you trying to learn Ruby by absorbing talks?
revath has joined #ruby
lorikeet has quit [Ping timeout: 248 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<xxneolithicxx> lol Ox0dea ... I dont think it works that way
<Ox0dea> You're right, it doesn't.
<Ox0dea> Were you looking to find a conference at which to speak, then
<Ox0dea> +?
<xxneolithicxx> to attend
<xxneolithicxx> not speak
<Ox0dea> But not Ruby-centric?
<xxneolithicxx> no not specifically
<xxneolithicxx> anything dev/devops
sepp2k has quit [Read error: Connection reset by peer]
<Ox0dea> xxneolithicxx: lanyrd.com would probably be a very good place to start.
pengin has quit [Remote host closed the connection]
<Ox0dea> This page (http://www.techmeme.com/events) also looks to be reasonably comprehensive.
RobertBirnie has joined #ruby
pwnz0r has quit [Remote host closed the connection]
<Ox0dea> Go to DEFCON. :)
aaeron has joined #ruby
<xxneolithicxx> :-) see, this is why I ask you guys. That site is gold, ty.
<xxneolithicxx> hah I wish
baweaver has joined #ruby
astrobunny has joined #ruby
<xxneolithicxx> id need to get a faraday cell phone/laptop bag first before i consider going
<Ox0dea> xxneolithicxx: Where's the fun in that? :P
zacstewart has joined #ruby
<Ox0dea> DEFCON is for testing your setup. ^_^
<xxneolithicxx> haha
user1138 has joined #ruby
<xxneolithicxx> luckily i already have a protective wallet for my cards so im good there. id be more worried about my cell phone than my laptop.
scripore has joined #ruby
benlovell has joined #ruby
peter_paule has joined #ruby
eminence_ has quit [Remote host closed the connection]
swgillespie has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
rubie has quit [Remote host closed the connection]
kies^ has joined #ruby
gwendall has joined #ruby
<Aeyrix> Taking any device into DEFCON is an idiot move.
aaeron1 has joined #ruby
<Aeyrix> Take a pencil and a notepad.
<toretore> what if they hack ur brain
<Aeyrix> You're fukt anyway.
benlovell has quit [Ping timeout: 264 seconds]
<bnagy> defcon mystique amuses me
duncannz has quit [Remote host closed the connection]
hahuang65 has joined #ruby
<Ox0dea> bnagy: When did you last attend?
aaeron has quit [Ping timeout: 265 seconds]
<bnagy> not sure.
<bnagy> 2010, apparently
<Ox0dea> Did you bring any of your daily drivers?
<bnagy> my wha?
fumihiro has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
Musashi007 has joined #ruby
<bnagy> wow.. I have been vegas free for 5 years? \o/
<bnagy> I think I went every year from 04 :/
duderonomy has joined #ruby
<Aeyrix> I refrain from attending.
<bnagy> the numbers now are just nuts
<bnagy> even last year I went it was claustrophobic as hell
<xxneolithicxx> err, claustrophobic geeks = no bueno
<bnagy> too many scene people and not enough actual hackers
jackjackdripper has quit [Quit: Leaving.]
jenrzzz has joined #ruby
fgo has quit [Ping timeout: 248 seconds]
darkf has joined #ruby
casadei_ has joined #ruby
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby
peter_paule has quit [Ping timeout: 265 seconds]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby
baweaver has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
oo_ has quit [Remote host closed the connection]
casadei_ has quit [Ping timeout: 256 seconds]
ChasedSpade has quit [Remote host closed the connection]
fabrice31 has joined #ruby
doctorly has joined #ruby
aaeron1 has quit [Ping timeout: 244 seconds]
poguez_ has joined #ruby
michael_mbp has quit [Excess Flood]
enders has joined #ruby
gwendall has quit [Ping timeout: 265 seconds]
martinium has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
Musashi007 has quit [Client Quit]
ChasedSpade has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
martinium has quit [Max SendQ exceeded]
michael_mbp has joined #ruby
davedev24 has quit [Remote host closed the connection]
martinium has joined #ruby
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
martinium has quit [Max SendQ exceeded]
sp1rs has joined #ruby
martinium has joined #ruby
martinium has quit [Changing host]
martinium has joined #ruby
astrobunny has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
hisso has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
fumihiro has quit [Ping timeout: 255 seconds]
sevenseacat has joined #ruby
jenrzzz has joined #ruby
cornerma1 has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
hisso is now known as hisso_
hisso_ is now known as hisso
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
aganov has joined #ruby
riotjones has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
roolo has joined #ruby
desigx has quit [Ping timeout: 248 seconds]
finisherr has quit [Quit: finisherr]
lokulin has quit [Quit: bye!]
Violentr has joined #ruby
finisherr has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
desigx has joined #ruby
tagrudev has joined #ruby
Mendenhall has joined #ruby
arescorpio has quit [Quit: Leaving.]
<Ox0dea> >> class Integer; include Enumerable; def each; bit_length.times { |i| yield self[i] } end end; 0x0dea.each_slice(4).to_a
<ruboto> Ox0dea # => [[0, 1, 0, 1], [0, 1, 1, 1], [1, 0, 1, 1]] (https://eval.in/401955)
<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[]
<ruboto> zenspider # => "my 42 string" ...check link for more (https://eval.in/401969)
<Ox0dea> You seem to support this "bad idea".
<zenspider> I'm currently working in scheme. everything is wrapped in a lambda
dgutierrez1287 has joined #ruby
<ScriptGeek> Taking all perspectives into consideration, I'm sure my code is nothing but one giant bad idea, line by line.
<Ox0dea> How does one go about taking all perspectives into consideration?
oo_ has joined #ruby
<ScriptGeek> By never getting a damned thing accomplished. lol
Muhannad has quit [Max SendQ exceeded]
Muhannad has joined #ruby
Musashi007 has quit [Client Quit]
revath has quit [Quit: Leaving.]
<ScriptGeek> So, I wrote a console menu system, for the command line console, in ruby.
workmad3 has joined #ruby
<Ox0dea> Using io/console?
<ScriptGeek> It's most certainly another wheel invention
<zenspider> getting kicked out of my cafe...
<ScriptGeek> But I made it for a project
<Ox0dea> >> class Integer; include Enumerable; def each; bit_length.times { |i| yield self[i] } end end; 0xcafe.each_slice(4).to_a
<ruboto> Ox0dea # => [[0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 0, 1], [0, 0, 1, 1]] (https://eval.in/401970)
<ScriptGeek> Ox0dea: yeah, I used io/console
<Ox0dea> ScriptGeek: And TTY?
<Ox0dea> Ah, never mind; you mentioned you're reinventing a wheel.
revath has joined #ruby
<ScriptGeek> Ox0dea: yeah, it's a command line application, no internetworking
<Ox0dea> Hm
<Ox0dea> +?
sinkensabe has joined #ruby
<Ox0dea> TTY is a TUI toolkit.
hashrocket has quit [Quit: Connection closed for inactivity]
<ScriptGeek> nope, I wrote everything
dgutierrez1287 has quit [Ping timeout: 244 seconds]
Muhannad has quit [Max SendQ exceeded]
j4cknewt has joined #ruby
Muhannad has joined #ruby
<ScriptGeek> I took the Ruby course on Treehouse and I'm working through the requirements in their career program to help me find a job
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<Ox0dea> What's the menu for?
revath has quit [Client Quit]
revath has joined #ruby
<Ox0dea> Oh, it's a menu factory?
<ScriptGeek> The menu system can be used for all kinds of other stuff
chussenot has joined #ruby
<ScriptGeek> Yeah, it's a factory, makes the menu creation system easier
Feyn has quit [Ping timeout: 246 seconds]
djbkd_ has joined #ruby
<Ox0dea> I can has combo boxes?
<ScriptGeek> It's very simple
<ScriptGeek> no, it's all text based
workmad3 has quit [Ping timeout: 260 seconds]
<Ox0dea> Not how I meant.
<Ox0dea> Does selecting one option open up more options?
<Radar> ScriptGeek: You should go through the lessons on Exercism.io too. They're quite good.
<ScriptGeek> yeah, kinda
<ScriptGeek> it's recursive
yardenbar has joined #ruby
<ScriptGeek> you can navigate through a complicated tree of menus if you want to define each of those menus
<Ox0dea> Why "kinda"? Why "complicated"?
Muhannad has quit [Max SendQ exceeded]
<ScriptGeek> Thanks, Radar, I'll check it out sometime
Muhannad has joined #ruby
havenwood has joined #ruby
<ScriptGeek> complicated or simple, just depends on how many levels of menus are needed
user1138 has quit [Ping timeout: 246 seconds]
<Ox0dea> Do menus interact with each other?
<ScriptGeek> So I'm using this menu system in a simple drug wars game clone
lxsameer has quit [Ping timeout: 248 seconds]
<ScriptGeek> I don't think so
<Ox0dea> Then whence complication?
<ScriptGeek> Just by levels of menus
<Ox0dea> That's called "nesting", not "complexity".
<ScriptGeek> oh ok
Rickmast_ has joined #ruby
Rickmasta has quit [Ping timeout: 240 seconds]
<ScriptGeek> I suppose if you wanted you could add in a method in the event handler of an option that gets something from another menu
lxsameer has joined #ruby
Muhannad has quit [Max SendQ exceeded]
<Ox0dea> Do you make that easy or difficult?
Muhannad has joined #ruby
<ScriptGeek> I don't have to do that for my project, so not sure. I wouldn't imagine it to be difficult
revath has left #ruby [#ruby]
Igorshp_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
<Ox0dea> Numbers to select, or button-mashing and Enter?
<ScriptGeek> It's user definable, based on key strokes, right now.
<Ox0dea> What's the default?
zacstewart has quit [Ping timeout: 256 seconds]
<ScriptGeek> Well, there's no hitting Enter, just hit a key and another menu displays or a menu option executes
Muhannad has quit [Max SendQ exceeded]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
Muhannad has joined #ruby
Igorshp has joined #ruby
<Ox0dea> Labels must be explicitly defined, then?
<ScriptGeek> There's an input validation system, so that it checks the input against a set of user-defined rules before executing an option
<ScriptGeek> Yeah, it has to be explicitly defined
<ScriptGeek> It's just a crappy little framework
<ScriptGeek> but it's better than hard coding every single menu and option
arup_r_ has joined #ruby
<Ox0dea> Then why's it crappy?
<ScriptGeek> cause there's probably 20 other libraries that do the same thing, only better
arup_r_ has quit [Read error: Connection reset by peer]
<Ox0dea> Doesn't there being a single best one make the other nineteen just as "crappy", by that logic?
roolo has quit [Remote host closed the connection]
Muhannad has quit [Max SendQ exceeded]
arup_r_ has joined #ruby
arup_r_ has quit [Read error: Connection reset by peer]
Muhannad has joined #ruby
<ScriptGeek> Hmm... well, crappy meaning a wide range of lacking aspects from code design to feature set
arup_r_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
schaerli has joined #ruby
<Ox0dea> Are you okay with your library being crappy?
arup_r has quit [Ping timeout: 256 seconds]
<ScriptGeek> sure
thiagovsk has quit [Quit: Connection closed for inactivity]
<ScriptGeek> everything has to start somewhere
charliesome has quit [Quit: zzz]
<Ox0dea> Then the project has met its design goals.
tno has joined #ruby
<ScriptGeek> I made it entirely from my own fingertips, no copying or using any other libraries aside from the standard ruby ones
<ScriptGeek> And the point of the library is to make it easier to finish my project, which is a drug wars game clone
AlphaAtom has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<Ox0dea> Thus, an improvement to the library would improve your game.
<ScriptGeek> The menu library is 95 lines of code, with a decent amount of comments
<Ox0dea> You've gone from calling $thing "crappy" to defending it, and I'm afraid I can't follow the logic.
<ScriptGeek> My bad
riotjones has joined #ruby
<Ox0dea> It's a little confusing is all.
bayed has joined #ruby
<ScriptGeek> So it's not crappy if it meets design goals, even though it lacks a lot of "nice to have" features?
rdark has joined #ruby
fumihiro has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
markholmes has joined #ruby
<ScriptGeek> I think I'm going to use the lambda suggestion presented earlier, for menu content creation.
calleerlandsson has joined #ruby
<ScriptGeek> Then I can use it for dynamic data
arooni-mobile has quit [Ping timeout: 248 seconds]
dubkoidragon has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby
fabrice31 has joined #ruby
doctorly has quit [Ping timeout: 256 seconds]
simplyianm has quit [Remote host closed the connection]
arup_r_ has quit []
<ScriptGeek> Ox0dea: thanks for chatting
rubie has joined #ruby
<Ox0dea> ScriptGeek: Sure thing. Good luck with Treehouse.
andikr has joined #ruby
railsraider has joined #ruby
zacstewart has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
Philipp_ has joined #ruby
charliesome has joined #ruby
charliesome has quit [Client Quit]
stan has joined #ruby
schaerli has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 252 seconds]
troulouliou_div2 has joined #ruby
charliesome has joined #ruby
xkickflip has joined #ruby
chussenot has quit [Quit: chussenot]
djbkd_ has quit [Remote host closed the connection]
baweaver has joined #ruby
charliesome has quit [Quit: zzz]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has joined #ruby
Violentr has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
NightMonkey has quit [Quit: ZNC - http://znc.in]
aaeron has joined #ruby
<zenspider> rawr
howdoi_ has joined #ruby
Violentr has joined #ruby
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
<ruboto> Ox0dea # => "foobar" (https://eval.in/401980)
<Ox0dea> Something to be mindful of.
astrobunny has joined #ruby
CloCkWeRX has joined #ruby
<flughafen> moin
Iskarlar has joined #ruby
<Ox0dea> Any takeoffs?
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]
fgo has joined #ruby
jsaak has quit [Ping timeout: 240 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
rails733 has joined #ruby
Hounddog has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
krz has joined #ruby
aaeron has quit [Quit: Leaving.]
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]
matcouto has joined #ruby
sp1rs has quit [Ping timeout: 252 seconds]
<Sert2> izzol:
calleerlandsson has quit [Quit: Connection closed for inactivity]
railsraider has quit [Ping timeout: 256 seconds]
railsraider_ is now known as railsraider
matcouto has quit [Client Quit]
matcouto has joined #ruby
<apeiros> SebastianThorn: yupp
matcouto has quit [Client Quit]
<apeiros> Ox0dea: no idea. what exactly do you mean?
matcouto has joined #ruby
RTG` has joined #ruby
<Sert2> can someone help me getting the Class working ?
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
Pupeno has joined #ruby
matcouto has quit [Client Quit]
<apeiros> ?code Sert2
<ruboto> Sert2, We can't help you without your code, please post it to https://gist.github.com
sp1rs has joined #ruby
<ljarvis> apeiros: their code is above
<apeiros> ah. sorry.
<Sert2> Here u go
eminence_ has quit [Ping timeout: 248 seconds]
<Sert2> its some basic stuff.
<Sert2> think its easy to fix for u :/
troulouliou_div2 has quit [Remote host closed the connection]
meow has joined #ruby
meow has left #ruby [#ruby]
<apeiros> ok, so we have the code gisted - but what's the problem with running the code?
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<Sert2> ok apeiros the problem is i want to extend the google api as you can see
<Sert2> i dont know how to init the basic stuff
zz_barkerd427 is now known as barkerd427
<Sert2> the last line 60
Torrieri has quit [Ping timeout: 248 seconds]
tkuchiki has joined #ruby
arup_r has joined #ruby
<apeiros> Sert2: you'd pass that as an argument to Mcalendar.new
<apeiros> i.e. m = Mcalendar.new(:application_name => APPLICATION_NAME)
axl_ has quit [Remote host closed the connection]
<apeiros> Mcalendar.new will create a new Mcalendar instance and call initialize on it, passing the same arguments on
<Sert2> i know but how apeiros :p i dont understand it
<apeiros> you can then do e.g.: def initialize(application_name:); @application_name = application_name; end
<Sert2> Ah
<apeiros> I can't help with "I don't understand it".
<adaedra> it would be nice to have something like def initialize(@application_name)
<apeiros> adaedra: yes. has been petitioned too, but afaik was rejected.
<apeiros> don't remember the reason
<apeiros> funny enough:
<adaedra> shame
<apeiros> 18>> proc { |@x, $y| }.call(1,2); [@x, $y]
<ruboto> apeiros # => [1, 2] (https://eval.in/402087)
<Sert2> adaedra: ok my last problem is, how can i use the last line code
<Sert2> i get
<Sert2> . /root/.gem/ruby/2.2.0/gems/google-api-client-0.8.6/lib/google/api_client.rb:411:in `discovered_api': undefined method `[]' for nil:NilClass (NoMethodError)
_blizzy_ has quit [Ping timeout: 248 seconds]
<adaedra> tab fail?
lkba has quit [Ping timeout: 265 seconds]
<Sert2> nah
barkerd427 is now known as zz_barkerd427
Igorshp has joined #ruby
arturmartins has joined #ruby
Igorshp has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
nikhgupta has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
allomov has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
zacstewart has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mhib has joined #ruby
<awk> Ox0dea: here is what i'm trying to do https://gist.github.com/tripolitrax/34fc3fae4e7821f8e465
Bloodshot has quit [Ping timeout: 246 seconds]
bricker has quit [Ping timeout: 246 seconds]
stamina has joined #ruby
<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
jbw_ has quit [Ping timeout: 246 seconds]
stamina has quit [Quit: WeeChat 1.2]
<awk> got it thanks, working now
<apeiros> "the fuck 2.0" looks like a tool I need: https://twitter.com/nvbn/status/622852907424174080/photo/1
<apeiros> (safe for work)
dtcristo has joined #ruby
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
<[k-> >> [[[[[[?h]]]]]]
<ruboto> [k- # => [[[[[["h"]]]]]] (https://eval.in/402188)
<[k-> I didn't even count!
Igorshp_ has joined #ruby
lkba_ has joined #ruby
<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.
<adaedra> peace and love, brothers.
<ddv> why adaedra?
<adaedra> and sisters, of course.
sdothum has joined #ruby
livathinos has joined #ruby
fumihiro has joined #ruby
<dangerousdave> morning
<dangerousdave> Comparing two csv files with cmp -b returns me https://gist.github.com/deathwishdave/3e18a0b37f93430d4549
<ddv> haha dangerousdave
saeid has joined #ruby
<dangerousdave> ddv yo
<ddv> dave is pretty dangerousdave mangggg
<dangerousdave> the two files appear to have the same contents, but one is twice the size
fgo has joined #ruby
<adaedra> UTF-16?
<dangerousdave> what are the "0 ^@" in the cmp results?
saeid has quit [Client Quit]
<dangerousdave> adaedra, that could be it
<adaedra> yep, looks like it
<dangerousdave> adaedra, would that account for size difference?
<adaedra> well, since all characters would be twice the size...
<adaedra> what does file says about your files?
<dangerousdave> if one is UTF-16, would the other be UTF-8?
fg_ has joined #ruby
<adaedra> possible
<fg_> installing rails is difficult
<adaedra> ?rails fg_
<ruboto> fg_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<dangerousdave> adaedra, spot on! one is 8, one is 16, thanks for your help!
schaerli has joined #ruby
zacstewart has joined #ruby
fabrice31 has joined #ruby
bruno- has joined #ruby
ArchRogem has joined #ruby
<adaedra> yw
<fg_> ruboto there is says to register nickserver means?
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> ?bot fg_
<ruboto> fg_, I don't know anything about bot
<shevy> you have to register once at freenode
<adaedra> ?ruboto fg_
<ruboto> fg_, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<apeiros> grah
<apeiros> ?justabot fg_
<ruboto> fg_, I'm just a bot. You don't need to address me.
<adaedra> hello apeiros
<shevy> afterwards you can join the channel there
Zai00 has quit [Quit: Zai00]
<adaedra> fg_: #RubyOnRails is accessible only if you registered your nick.
Philipp_ has joined #ruby
<ddv> we got that
<ddv> :p
arturmartins has quit [Quit: Linkinus - http://linkinus.com]
senayar has quit [Remote host closed the connection]
<fg_> how to get registered
monstordh has joined #ruby
<adaedra> /msg NickServ HELP
fgo has quit [Ping timeout: 260 seconds]
<fg_> then
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<adaedra> then read what it says to you
<jhass> apeiros: if we only had aliases now... :P
* adaedra brings cold water
<apeiros> …
* apeiros walks away, head hanging in shame
<jhass> !fact mk freenode Please join #freenode for help with this IRC network.
<ruboto> jhass, I will remember that freenode is Please join #freenode for help with this IRC network.
<jhass> ?freenode fg_
<ruboto> fg_, Please join #freenode for help with this IRC network.
<ruurd> reading... that's a novel concept...
<ruurd> I must try that.
fg_ has quit [Quit: Page closed]
<adaedra> \o
<apeiros> jhass: IMO start with lower case letter, as it comes after addressing a person ("mrfoobar, please …" instead of "mrfoobar, Please …")
scripore has joined #ruby
dtcristo has joined #ruby
<jhass> mmh
<adaedra> or just write in CAPS LOCK MODE
<jhass> !fact ed freenode please join #freenode for help with this IRC network.
<ruboto> jhass, I stand corrected that freenode is please join #freenode for help with this IRC network.
<ruurd> Hey! Mind my ears please!
Guest70108 is now known as bl4ckdu5t
bl4ckdu5t has quit [Changing host]
bl4ckdu5t has joined #ruby
* adaedra tickles ruurd ears
bl4ckdu5t is now known as silverdust
<ruurd> hmmmmm... continue please....
<Sert2> man ich verstehe es nicht
zenspider has quit [Ping timeout: 255 seconds]
<adaedra> Wir sprechen English hier, Sert2
<jhass> Sert2: this channel is English only, join #ruby-de for german help
<adaedra> Englisch*
zz_Outlastsheep is now known as Outlastsheep
monstordh has quit [Quit: monstordh]
emilkarl has quit [Quit: emilkarl]
DoubleMalt has quit [Ping timeout: 264 seconds]
<ddv> but jhass will understand you :)
<shevy> ddv eh I think he forgot german
<ddv> oh
<adaedra> jhass is the chan's Polizei
<ddv> op stands for oppression
<shevy> ddv is so eager today...
<ddv> :)
v0n has quit [Ping timeout: 244 seconds]
rao_ has joined #ruby
<rao_> hi
astrobunny has quit [Remote host closed the connection]
zz_barkerd427 is now known as barkerd427
<adaedra> hi
Philipp_ has quit [Remote host closed the connection]
anisha has quit [Ping timeout: 265 seconds]
zenspider has joined #ruby
nettoweb has joined #ruby
<[k-> hi
Olipro has joined #ruby
<Sert2> Okay i guess i make progress
Igorshp_ has quit [Remote host closed the connection]
<Sert2> here is sample output and code
<Sert2> may someone can help me solving the final step now
<Sert2> adaedra:
<Sert2> shevy:
<[k-> [k-:
<adaedra> what's the "final step"
<Sert2> last line in paste
<Sert2> #{:sData=>"2015-07-24 12:00:00 +0200", :eData=>"2015-07-24 13:00:00 +0200"} #EXAMPLE OUTPUT! how to compare for overlapping events ?!
<[k-> that's quite a nice progress you have made
<[k-> s is start?
<Sert2> yes
<Sert2> sData is start and eData is end
<Sert2> of an event
<[k-> now it's just logic then
<Sert2> if an needaction conflicts with an already accepted one i want to drop the shit
<[k-> (sData..eData).include? sData2
<Sert2> thats it lol ?
<Sert2> :D
Soda has quit [Remote host closed the connection]
<bnagy> uh
<[k-> I would advise you to rename sData to start_date tho
<Sert2> okay
<SebastianThorn> [k-: ruby is beautiful
<bnagy> I don't think include? is right. The logic that is commented out but broken is better
barkerd427 is now known as zz_barkerd427
<[k-> :o it doesn't work?
<bnagy> conflicts are when e1.start is inside e2 or e1.end is inside e2, no?
<Sert2> yes
<bnagy> and yes, please don't name ruby variables like that :)
schaerli has quit [Remote host closed the connection]
<Sert2> xD
Ilyas has quit [Read error: Connection reset by peer]
nofxx has quit [Ping timeout: 264 seconds]
<Sert2> so bnagy what do you advise me to do
_blizzy_ has joined #ruby
<Sert2> for comparing operation
emilkarl has joined #ruby
<bnagy> write a small method called conflicting? e1, e2 maybe
anisha has joined #ruby
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
allcentury has joined #ruby
<Sert2> but how :D
endash has joined #ruby
allomov has quit [Remote host closed the connection]
<bnagy> by typing code into your editor
<[k-> Sert2, if you don't get the logic right, you will not be a very good programmer :(
Ilyas has joined #ruby
<bnagy> e1.start_time.between? e2.start, e2.end or e1.end_time.between? e2.start, e2.end
<[k-> as a programmer, we have to solve problems
<bnagy> that is not actual code, but close enough
allomov has joined #ruby
safeforge has quit [Remote host closed the connection]
mandarinkin has quit [Ping timeout: 256 seconds]
ecksit has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
<workmad3> [k-: I thought the job of a programmer was to create problems?
csavola has quit [Quit: Linkinus - http://linkinus.com]
<adaedra> to better solve them my child
v0n has joined #ruby
Igorshp has joined #ruby
<ccooke> workmad3: no, no. The job of a programmer is to solve just enough of the problems they create to remain employable
_blizzy_ has joined #ruby
zz_barkerd427 is now known as barkerd427
ecksit has quit [Read error: Connection reset by peer]
Igorshp has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
Igorshp has joined #ruby
Igorshp has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
lkba_ has quit [Read error: Connection reset by peer]
Aswebb_ has joined #ruby
<lxsameer> is it possible to find out what class raised the current exception?
Igorshp has joined #ruby
<adaedra> exception don't always come from a class, but you could be able to find that in the exception stacktrace
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lxsameer> adaedra: thanks
quimrstorres has quit [Remote host closed the connection]
dangerousdave has joined #ruby
<bnagy> I thought $@ was just line number based
<ruurd> lxsameer nope.
<bnagy> I think this is actually pretty tricky
tkuchiki has quit [Remote host closed the connection]
<ruurd> unless you derive your own Exception type and pass self when throwing one
diegoviola has joined #ruby
qiukun has quit [Quit: qiukun]
ecksit has joined #ruby
ecksit has quit [Client Quit]
jeramyRR has joined #ruby
<apeiros> lxsameer: you could redefine Kernel#raise and ::raise, and set an additional attribute
<[k-> that wouldn't be wise
zacstewart has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> it wouldn't?
jamesaxl|2 has joined #ruby
schaerli has joined #ruby
mhib has quit [Read error: Connection reset by peer]
Muhannad has quit [Remote host closed the connection]
cccc has joined #ruby
schaerli has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby
<[k-> what do you mean by additional attribute
TeresaP has quit [Ping timeout: 246 seconds]
Tritone has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
arup_r has quit [Remote host closed the connection]
<jhass> for debugging I'd just use pry-rescue & pry-stack_explorer
lordkryss has joined #ruby
fgo has joined #ruby
<cccc> is there anyway to delegate a method to an Enumerator's items? e.g. `enum.send` to be delegated to run `enum.each(&:send)`?
<[k-> could you elaborate further
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
sarkyniin has joined #ruby
<[k-> cccc: ^
tvw has joined #ruby
<jhass> I don't think writing enum.each(&:foo) is too bad
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lxsameer> apeiros: thanks
<[k-> I'm not sure why he stated a solution to his problem without clarifying why it's bad
tmtwd has quit [Ping timeout: 264 seconds]
fgo has quit [Ping timeout: 248 seconds]
<yorickpeterse> omg monads
relix has joined #ruby
<jhass> call it delegator or proxy if you like :P
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
schaerli has quit [Remote host closed the connection]
casadei_ has joined #ruby
kp666 has quit [Remote host closed the connection]
davedev24 has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
but3k4 has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
arup_r has joined #ruby
<cccc> thanks! :+1:
<apeiros> [k-: class Exception; attr_accessor :raising_object; end
Igorshp has quit [Remote host closed the connection]
<[k-> ah
<apeiros> [k-: then in the redefined raise: exc.raising_object = self; end # only in Kernel#raise, though, Kernel::raise can't
pullphinger has quit [Ping timeout: 250 seconds]
<[k-> wouldn't the stack trace have this info
<apeiros> stack trace is a piece of text
fabrice31 has quit [Remote host closed the connection]
<[k-> but it violates encapsulation!
<Encapsulation> =(
<[k-> why do you want to access the object anyway
<Encapsulation> don't violate me =S
<adaedra> poor Encapsulation
casadei_ has quit [Ping timeout: 240 seconds]
<jhass> ?cookie Encapsulation
<ruboto> Encapsulation, here's your cookie:
oo_ has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 246 seconds]
t_ has quit [Read error: No route to host]
<Sert2> dsad
<Sert2> hm
<Sert2> if (event.start.dateTime || event.end.dateTime).include?(aAccepted)
<Sert2> ?!
<Sert2> aAccpted is the 2 level array
<adaedra> won't work like that
<[k-> ^
<Sert2> okay can u help me ? :D
senayar has quit [Remote host closed the connection]
<adaedra> event.start.dateTime || envent.end.dateTime will always be only event.start.dateTime (except if you have a startless event)
<[k-> Sert2, can 12/7 include 13/4?
senayar has joined #ruby
<ljarvis> death by camel case
t_ has joined #ruby
<jhass> ljarvis: worse, it's hungarian notation
ldnunes has joined #ruby
<Sert2> hm
schaerli has joined #ruby
<ljarvis> dateTimeStringWidget
<jhass> ...FactoryBean
senayar has quit [Remote host closed the connection]
<[k-> Sert2, that's a logic question :/
aganov has quit [Ping timeout: 244 seconds]
eregon_ is now known as eregon
tagrudev has quit [Ping timeout: 244 seconds]
<[k-> I'm not sure why you are saying hmmm
senayar has joined #ruby
<[k-> it's like, can an apple include an orange?
<[k-> include here means contain
Iskarlar has joined #ruby
* ljarvis cuts open an apple and puts an orange inside
pengin has joined #ruby
<jhass> with science everything is possible!
* bougyman cross breeds and apple and orange
<bougyman> *an
<jhass> Isn't there a tree that has like a dozen different fruits?
<adaedra> You know how many apples grow on a tree?
<[k-> Sert2: this is a basic question!
fabrice31 has joined #ruby
<[k-> Sert2: is 12/7/2015 the same as 13/4/2015?
dumdedum is now known as blaxter
chussenot has joined #ruby
konsolebox has quit [Quit: Leaving]
DoubleMalt has joined #ruby
nettoweb_ has joined #ruby
<adaedra> use YYYY-MM-DD please.
last_staff has joined #ruby
<[k-> I live in Singapore :/
konsolebox has joined #ruby
<adaedra> And?
<adaedra> ?iso8601
<ruboto> I don't know anything about iso8601
<[k-> I use DD/MM/YYYY
<[k-> I don't care about iso8601!
nettoweb has quit [Ping timeout: 246 seconds]
<adaedra> you're wrong, it's the standard.
zacstewart has joined #ruby
tagrudev has joined #ruby
pengin has quit [Remote host closed the connection]
<shevy> standard eh? https://xkcd.com/927/
<[k-> :/
<apeiros> it's too hot, damit. doing stupid stuff like .gsub(Regexp.escape(some_str), …)
<shevy> yeah it is damn hot :(
syath has joined #ruby
ndrei has joined #ruby
dede has joined #ruby
arup_r_ has joined #ruby
arup_r has quit [Ping timeout: 248 seconds]
<SebastianThorn> apeiros: not in sweden :S
<adaedra> it's hot?
<adaedra> SebastianThorn: hej
aganov has joined #ruby
<apeiros> SebastianThorn: why ":-S" then? wanna trade places?
<SebastianThorn> apeiros: not really, went to tukey a cpuoåple of years ago, got 2nd degree skinburn :S
stamina has joined #ruby
<adaedra> We got 26°C :/
<SebastianThorn> 20 is perfect
<apeiros> I bet we have 30°+ in the office here
<SebastianThorn> ooohh
* apeiros drips
<izzol> I have a string: "(...) TTi ZYRE954BB88003 for (...)" and I need just the value between the "TTi" and "for".
* adaedra sends some air in apeiros general direction
<izzol> So I guess sub will do this?
<apeiros> izzol: that's one way, yes
<apeiros> izzol: alternatively String#[] in one of its many forms
<[k-> or a regexl
quazimodo has joined #ruby
<adaedra> regexl
<izzol> I need something which is fast :-)
vondruch has joined #ruby
wottam has joined #ruby
jeramyRR has quit [Quit: Peace out!]
mandarinkin has joined #ruby
rideh has joined #ruby
<[k-> optimise your Regexp to make it do less backtracking?
<apeiros> [k-: String#[] takes a regex
voxxit has quit [Ping timeout: 256 seconds]
<apeiros> izzol: so?
<[k-> he rejected it anyway
yardenbar has quit [Ping timeout: 240 seconds]
<apeiros> izzol: are you saying regex is not fast?
rubie has joined #ruby
<[k-> String#[] does all the things!
voxxit has joined #ruby
quimrstorres has joined #ruby
<izzol> apeiros: no, I'm just asking :-)
konsolebox has quit [Quit: Leaving]
<[k-> I reduced something from ~160min to a few seconds
<[k-> and the few seconds had regexp in them
<[k-> it's not slow!
<izzol> hmm, ok I did something like: match('ESMTP id (.*)for')[1]
<SebastianThorn> [k-: what did the slow version have?
<izzol> and I have the result.
Igorshp has joined #ruby
hahuang65 has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> SebastianThorn I forgot
<[k-> wasn't my code anyway
<apeiros> izzol: str.match('ESMTP id (.*)for')[1] --> str[/ESMTP id (.*)for/, 1]
rubie has quit [Ping timeout: 265 seconds]
<SebastianThorn> [k-: well, prolly not worth remebering hu? ;)
<apeiros> personally I'd probably use [^ ]* instead of .*
<[k-> it had arrays for large amount of unique data
<[k-> soooooooo
<[k-> and it was checking if the data included something as well
<apeiros> but then again, you didn't say anything about the form of your data. and it doesn't follow from a single example.
blackmes1 has joined #ruby
<[k-> (probably not the best idea)
xcesariox has quit [Ping timeout: 244 seconds]
<izzol> apeiros: thanks :)
<[k-> izzol: yeah I'm confused too
<[k-> why do you have 2 different examples
<SebastianThorn> [k-: love looking at my own old code, feels alot lite this http://devopsreactions.tumblr.com/post/120682285491/reading-your-own-code
<white_bear> SebastianThorn: rofl
<[k-> but you didn't fix it!
<[k-> shevy: he didn't fix it!
<shevy> well I also don't fix everything in my own code :\
chussenot has quit [Quit: chussenot]
codecop has quit [Remote host closed the connection]
<[k-> am disappointed with your previous claims
<shevy> I would if I would have enough time!
chussenot has joined #ruby
hahuang65 has quit [Ping timeout: 244 seconds]
thiagovsk has joined #ruby
lapide_viridi has joined #ruby
<SebastianThorn> you never have the time you wont to program..
<Sert2> if aAccepted.any? {|di| di.include? event.start.dateTime.to_date || (di.include? event.end.dateTime.to_date)}
<Sert2> hehe
<Sert2> got it
<Sert2> dateInterval = event.start.dateTime.to_date..event.end.dateTime.to_date
<Sert2> question how to say does NOT include ?
<Sert2> simply adding ! infront of if !( XXX ?
blackmes1 has quit [Ping timeout: 246 seconds]
schaerli has quit [Remote host closed the connection]
<SebastianThorn> unless
konsolebox has joined #ruby
yardenbar has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
arup_r_ has quit []
<[k-> if !
<[k-> I hate code that says unless user.not_alive?
arup_r has joined #ruby
sgambino has joined #ruby
nateberkopec has joined #ruby
segfalt has joined #ruby
emilkarl has quit [Quit: emilkarl]
sinkensabe has quit [Remote host closed the connection]
<jhass> izzol: if you want to read up on the no/less backtracking: http://www.regular-expressions.info/possessive.html http://www.regular-expressions.info/atomic.html
<SebastianThorn> [k-: i dont mind it
CloCkWeRX has joined #ruby
Silvr has quit [Ping timeout: 252 seconds]
<izzol> This is what I want to do.
<izzol> I did it by match but I'm not sure if this is the best way.
<[k-> unless !user.not_alive?.nil?
<izzol> All waht i want do check is ESMTP id.
fabrice31 has quit [Remote host closed the connection]
Silvr has joined #ruby
<jhass> izzol: you should make (.*) as specific as possible, (.*) is basically never the best way
fabrice31 has joined #ruby
<[k-> you are getting it from #inspect? :(
<workmad3> Sert2: if aAccepted.non?
<jhass> oh yeah, that's horrible too
<workmad3> Sert2: if aAccepted.none? even
rao_ has quit [Quit: Page closed]
<workmad3> (with the same block)
<Sert2> i die
<Sert2> :D
<[k-> you could do .*?
<[k-> I think it is the non-greedy version
<shevy> Sert2 rescue Death
sankaber has joined #ruby
<[k-> #=> Death
<[k-> shevy you killed him!
<jhass> izzol: http://www.rubydoc.info/gems/mail/Mail/Message#[]-instance_method
<shevy> yeah
<[k-> I did not expect a yeah :/
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> [k- in games I like to use: if game_over?
rbennacer has joined #ruby
<shevy> Death is not useful. Have you ever seen him write any documentation at all, that lazy bum?
<lxsameer> guys, what's the difference between 'raise Exception, "asdad"' and 'raise Excetion.new "zxczxc"'
<[k-> one creates an exception with "asdad", another with " zxczxc"
victortyau has joined #ruby
<izzol> jhass: I'm already using mail gem. But there is no option such as ESMTP id, so I'm getting it from mail.header.to_s[/ESMTP id (.*)for/, 1]
<[k-> izzol replace .* with .*?
<Sert2> hey
Kully3xf has joined #ruby
<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?
hanmac1 has joined #ruby
charliesome has joined #ruby
<shevy> lol
<shevy> nobu is drunk :>
<[k-> alemi: and what would the error be?
<shevy> "Not a bug."
<shevy> "Sorry, it is not a stability issue."
<alemi> error is : test_domain.rb:1:in `<main>': uninitialized constant DomainExtractor (NameError)
<shevy> "It is a stability issue."
<shevy> wtf...
<al2o3-cr> alemi: have you required the file first?
<[k-> al2o3-cr finally stopped playing hangman!
ryanpc has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> :P
ItSANgo has joined #ruby
<alemi> al2o3-cr: you mean adding 'require 'domain_extractor'' ? yes I did it. It shows error as http://dpaste.com/0M52SAS
<[k-> what is a stability issue
<shevy> good question :)
<al2o3-cr> alemi: require_relative 'domain_extractor.rb'
stantonnet has joined #ruby
<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
wottam has quit [Quit: Textual IRC Client: www.textualapp.com]
<wasamasa> like the infamous dash.el
<wasamasa> which has -filter and -zip and whatnot
allomov has quit [Remote host closed the connection]
moritzs has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
Casty has joined #ruby
allomov has joined #ruby
diego__ has quit [Changing host]
diego__ has joined #ruby
diego__ is now known as diegoviola
momomomomo has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
iamvery has joined #ruby
zenguy_pc has joined #ruby
Stratege has quit [Read error: Connection reset by peer]
Stratege has joined #ruby
Yiota has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
choppington has joined #ruby
allomov has quit [Ping timeout: 260 seconds]
athos_diddy has joined #ruby
<jxf> which account is the Ruby bot here?
<adaedra> ?bot
<ruboto> I don't know anything about bot
senayar has quit [Remote host closed the connection]
<adaedra> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<[k-> ?justabot
<ruboto> I'm just a bot. You don't need to address me.
schaerli has quit [Remote host closed the connection]
senayar has joined #ruby
<Sert2> hehehehe
<Sert2> :D
arup_r_ has quit []
rubie has joined #ruby
willywos has joined #ruby
icebourg has joined #ruby
[H]unt3r has joined #ruby
Igorshp has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
miwood has joined #ruby
senayar has joined #ruby
emilkarl has quit [Quit: emilkarl]
<jxf> >> jQuery = Class.new { def foo; "123"; end; def bar; "456"; end }; define_method(:"$") { jQuery.new }; self.send(:"$").foo
<ruboto> jxf # => "123" (https://eval.in/402408)
<jxf> shevy: now look what you did
paulcsmith has joined #ruby
ruurd has quit [Remote host closed the connection]
<jxf> horrible, terrible jQuery in Ruby ;)
joonty has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
<shevy> awww
joonty has joined #ruby
Sert2 has quit [Ping timeout: 246 seconds]
relix has joined #ruby
allomov has joined #ruby
<shevy> can we have a variable such as $_ that is also a method? e. g. .send(:"$_")
<[k-> >> Fixnum.send.define_method(:'$') { 'hello' }; $$.$
<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)
<[k-> we can def $_.method tho :/
<havenwood> >> define_method :$_, ->{ :nooo }; send :$_
<ruboto> havenwood # => :nooo (https://eval.in/402411)
CloCkWeRX has quit [Quit: Leaving.]
hectortrope has quit [Quit: WeeChat 0.4.2]
<havenwood> shevy: Don't be doing these things! :P
<havenwood> But if you must, do a lot of them!
<adaedra> >> define_method :$, ->{ :noooo }; send :$
<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)
<shevy> >> [:a, :b, :c].map(&:to_s)
<ruboto> shevy # => ["a", "b", "c"] (https://eval.in/402462)
iamvery has joined #ruby
<shevy> although I think there were proposals to allow arguments
Igorshp has joined #ruby
<shevy> but matz says ... ruby 3.0 days
Igorshp has quit [Remote host closed the connection]
msgodf has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 264 seconds]
linc01n has joined #ruby
sepp2k has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<vimz> shevy haha I think they should. but okay.
ruurd has joined #ruby
wprice has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
centrx has joined #ruby
towski_ has joined #ruby
SkNix has joined #ruby
<shevy> yeah
<shevy> I even read one proposal which had a nice syntax
iamvery has quit [Ping timeout: 244 seconds]
riotjones has quit [Ping timeout: 244 seconds]
<shevy> and I think I read it on #ruby too so one of the people here suggested it :)
Kully3xf_ has joined #ruby
safeforge has joined #ruby
<SkNix> hi.
hobodave_ has joined #ruby
sphex has quit [Ping timeout: 252 seconds]
Kully3xf has quit [Ping timeout: 240 seconds]
<SkNix> can anyone help me please.
endash has quit [Quit: endash]
<adaedra> Not if you don't ask your question.
ruurd has quit [Client Quit]
<SkNix> how do I delete a key / value of a hash?
<adaedra> &ri Hash#delete
<SkNix> thanks.
<SkNix> I will test here
gambl0re has joined #ruby
<shevy> :D
jaycee has joined #ruby
Cache_Money has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maletor has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
melter has quit [Ping timeout: 246 seconds]
pengin has joined #ruby
xcesariox has joined #ruby
amclain has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 244 seconds]
sdothum has joined #ruby
hahuang65 has joined #ruby
allomov has quit [Remote host closed the connection]
gambl0re has quit [Remote host closed the connection]
arup_r has joined #ruby
gambl0re has joined #ruby
pengin has quit [Remote host closed the connection]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lannonbr has joined #ruby
RegulationD has quit [Remote host closed the connection]
sphex has joined #ruby
Rodya_ has quit [Remote host closed the connection]
presto has quit [Ping timeout: 246 seconds]
melter has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
dangerousdave has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
senayar has quit []
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamvery has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
hahuang65 has quit [Ping timeout: 264 seconds]
SkNix has quit [Quit: Saindo]
ryanpc has joined #ruby
ryanpc has quit [Max SendQ exceeded]
yqt has joined #ruby
balazs has joined #ruby
imperator has joined #ruby
paulcsmith has joined #ruby
ruby-lang460 has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
<ruby-lang460> hola chicos
sarkyniin has quit [Ping timeout: 250 seconds]
iamvery has quit [Ping timeout: 256 seconds]
<ruby-lang460> ["EssenceText: cheddar cheese", "EssenceText: with your bagels", "EssenceText: 4.99"]
<adaedra> hablas ingles
<ruby-lang460> how can you convert the strings to hashes?
scripore has quit [Quit: This computer has gone to sleep]
<ruby-lang460> eval(["EssenceText: cheddar cheese", "EssenceText: with your bagels", "EssenceText: 4.99"]) doesn't work :(
<ruby-lang460> any ideas?
<adaedra> use Array#map and String#split, then Array#to_h
<adaedra> Better, String#partition
jpfuentes2 has joined #ruby
ruurd has joined #ruby
Lucky_ has joined #ruby
<ruby-lang460> NICE!!
<adaedra> mh, take that back. split's more suited, as it won't return the separator. I though partition didn't.
jackjackdripper has quit [Quit: Leaving.]
<ruby-lang460> arr.map{|x| x.split}
<adaedra> also, avoid eval as much as you can.
shredding has quit [Ping timeout: 255 seconds]
<adaedra> split(': ', 2) rather.
<ruby-lang460> I've heard that eval is dangerous
<adaedra> I won't say it's dangourous
<adaedra> It's more close to evil hitler with a fire chainsaw
einarj has quit [Remote host closed the connection]
fgo has joined #ruby
<ruby-lang460> Lol
<ruby-lang460> Because it evaluates any and every string it recieves
<ruby-lang460> ?
Aswebb_ has joined #ruby
<adaedra> Because using it is the first step to inject user input in it
sarkyniin has joined #ruby
<adaedra> And most of the time, it's not needed
stan has quit [Ping timeout: 246 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<[k-_> its also slow
ruurd has quit [Ping timeout: 255 seconds]
<ruby-lang460> use Array#map and String#split, then Array#to_h
<ruby-lang460> arr.map{|x| x.split(' ', 2).to_h}
towski_ has quit [Remote host closed the connection]
<adaedra> this will give you an array of hashes
<adaedra> ah, didn't looked well, seems to be what you want
<ruby-lang460> thats what I'm expecting
<adaedra> you'll have the : in the keys though
scripore has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
DEA7TH has quit [Quit: DEA7TH]
<ruby-lang460> thanks adaedra
<adaedra> yw
nveselinov has joined #ruby
<ruby-lang460> so irc is like a ruby playground?
andikr has quit [Remote host closed the connection]
aaeron has joined #ruby
<miah> Irrational Ruby Chatting
<adaedra> no, it's like anonymous programmers
<adaedra> I'm adaedra, and I write PHP code
miwood_ has quit [Ping timeout: 246 seconds]
<miah> _this_ channel is, not all of IRC is =)
<adaedra> HELLO ADAEDRA
<centrx> IRC is the real Internet
ruurd has joined #ruby
<miah> Internets Real Chat
<centrx> ever since AOL took over
ValicekB has quit [Ping timeout: 244 seconds]
rubie has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
<adaedra> ruby-lang460: we're here to discuss ruby: issues, projects, ideas, etc.
<ruby-lang460> nice
<adaedra> we also hang out for more diverse topics (also see: #ruby-offtopic )
<ruby-lang460> Im interested in all of those things
michaeldeol has joined #ruby
ndrei has joined #ruby
<adaedra> But yeah, this is for #ruby, this channel. IRC is not only this channel or even this server :)
maletor has quit [Read error: Connection reset by peer]
dopie has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
gambl0re has quit [Remote host closed the connection]
<ruby-lang460> I've been developing in rails
shinnya has joined #ruby
<adaedra> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<adaedra> :)
<ruby-lang460> rails is amazing
<ruby-lang460> but I'm at the point where rails can't really help me to much
<ruby-lang460> :(
<ruby-lang460> too*
<adaedra> why so?
<ruby-lang460> Im mostly dealing with ruby and js
<dudedudeman> he said the dreaded word
gambl0re has joined #ruby
* dudedudeman hides
DEA7TH has joined #ruby
dangerousdave has joined #ruby
* adaedra finds and puts dudedudeman in the middle of the room for all to look at
* dudedudeman wears the cone of shame
cassioscabral has quit [Quit: cassioscabral]
rdark has quit [Ping timeout: 264 seconds]
* miah looks and converts dudedudeman into a npm module
jackjackdripper has joined #ruby
<dudedudeman> dammit!
hectortrope has quit [Quit: WeeChat 0.4.2]
<ruby-lang460> got to go to target guys
<adaedra> dudedudejs
hectortrope has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang460> thanks for the insight adeadra
<adaedra> yw
bricker has joined #ruby
* havenn reminesces on the good 'ole days before dudedudeman was turned into an npm module
rdark has joined #ruby
Alayde has joined #ruby
prettiestPony11 has joined #ruby
<miah> but just think of the performance we'll get out of dudedudeman now while running on node!
drewo has quit [Quit: WeeChat 1.2]
* dudedudeman bustles with excitement at the possibility of being a performer
white_bear has quit [Quit: leaving]
<miah> well, you'll only be a microservice
<adaedra> dudedudeman had a problem. Now he is converted to nodejs and async and problem he has a now new.
bungoman has quit [Remote host closed the connection]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
lkba has quit [Ping timeout: 255 seconds]
pengin has joined #ruby
polpak has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
havenn is now known as havenwood
<dudedudeman> console.log("Hello World");
AccordsLTN is now known as AccordLTN
<adaedra> undefined is not a function
<dudedudeman> var = oops()
ruby-lang460 has quit [Ping timeout: 246 seconds]
<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]
RegulationD has joined #ruby
<dfockler> grill and ccooke!
aaeron has quit [Quit: Leaving.]
<grill> ccooke! ?
balazs has joined #ruby
clocKwize has joined #ruby
schaerli has joined #ruby
<shevy> >> hash = { cat: 'tom', mouse: 'jerry' }; hash.delete :cat; hash
<ruboto> shevy # => {:mouse=>"jerry"} (https://eval.in/402524)
<shevy> grill ^^^
howdoicomputer has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has joined #ruby
startupality has quit [Client Quit]
emilkarl has quit [Quit: emilkarl]
The_Phoenix has quit [Read error: Connection reset by peer]
jhack32 has joined #ruby
quimrsto_ has quit [Ping timeout: 256 seconds]
ruurd has quit [Ping timeout: 244 seconds]
schaerli has quit [Remote host closed the connection]
NeverDie has joined #ruby
postmodern has joined #ruby
quimrstorres has joined #ruby
jhack32 has quit [Remote host closed the connection]
werelivinginthef has quit [Remote host closed the connection]
towski_ has joined #ruby
yfeldblum has joined #ruby
NeverDie has quit [Max SendQ exceeded]
solars has joined #ruby
simplyianm has joined #ruby
NeverDie has joined #ruby
sharpmachine has joined #ruby
imperator has left #ruby ["Leaving"]
failshell has quit [Remote host closed the connection]
dstarh has joined #ruby
bungoman has joined #ruby
failshell has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
AlphaAtom has joined #ruby
jerius has joined #ruby
simplyianm has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
bungoman has quit [Ping timeout: 252 seconds]
startupality has joined #ruby
hfp has quit [Ping timeout: 256 seconds]
axl_ has joined #ruby
chinmay_dd has quit [Quit: See ya!]
hfp_work has quit [Ping timeout: 256 seconds]
gambl0re has quit [Remote host closed the connection]
ruurd has joined #ruby
Esya has quit [Disconnected by services]
gambl0re has joined #ruby
fantazo has joined #ruby
Esya has joined #ruby
baweaver has joined #ruby
icebourg has quit []
_blizzy_ has joined #ruby
baweaver has quit [Remote host closed the connection]
_sillymarketing has joined #ruby
bruno- has joined #ruby
_sillymarketing is now known as sillymarketing
sillymarketing is now known as sillymarketing_
sillymarketing_ is now known as sillymarketing
allomov has quit [Remote host closed the connection]
baweaver has joined #ruby
cornerma1 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
baweaver_ has joined #ruby
sillymarketing has left #ruby [#ruby]
sillymarkets has joined #ruby
pengin has quit [Remote host closed the connection]
sillymarkets has left #ruby [#ruby]
mhib has quit [Quit: Leaving]
_sillymarkets has joined #ruby
aaeron has joined #ruby
pengin has joined #ruby
fullofcaffeine has joined #ruby
balazs has quit []
<_sillymarkets> anyone work with MongoDB with Ruby?
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
stef204 has joined #ruby
mhib has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
lkba has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
hobodave_ has quit [Quit: Computer has gone to sleep.]
mhib has quit [Remote host closed the connection]
simplyianm has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<apeiros> wow, my laziness reached new levels.
<apeiros> I'm too lazy to write my setup script in ruby :-O
Alayde has quit [Quit: WeeChat 1.1.1]
<apeiros> _sillymarkets: yorickpeterse works with mongodb :D
quimrstorres has joined #ruby
<dfockler> I get lazy setting up JSON config files, :(
hobodave has joined #ruby
aaeron has quit [Quit: Leaving.]
<_sillymarkets> thanks apeiros, i'll see if he is available
<_sillymarkets> yorickpeterse: are you around? ;)
aaeron has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> lol
bayed has quit [Quit: Connection closed for inactivity]
reset has joined #ruby
<jhass> apeiros: isn't it kinda mean to direct all mongo questions to yorickpeterse? :D
lkba has quit [Ping timeout: 250 seconds]
<jhass> not that I don't participate...
<apeiros> jhass: but that's not what I did
endash has joined #ruby
yqt has quit [Ping timeout: 244 seconds]
simplyianm has quit [Read error: Connection reset by peer]
Alayde has joined #ruby
<jhass> semantics...
jaycee has quit [Ping timeout: 244 seconds]
<apeiros> anyway, I'm sure yorick has excellent insights into *how exactly* to use mongo. with or without ruby.
<_sillymarkets> I'm having trouble on the aggregation pipeline
simplyianm has joined #ruby
<_sillymarkets> when I use Mongo shell, I get my aggregation result. But can't get the same thing from my ruby script
lannonbr has quit [Quit: WeeChat 1.2]
hahuang65 has joined #ruby
safeforge has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
crazydiamond has joined #ruby
safeforge has joined #ruby
sarkyniin has quit [Ping timeout: 265 seconds]
Olipro_ has joined #ruby
Olipro_ is now known as Guest74977
rehat has quit [Read error: Connection reset by peer]
<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 }]
<ruboto> Ox0dea # => [33, {:select=>:a, :reject=>:a}] (https://eval.in/402549)
<Ox0dea> apeiros: That.
andikr has joined #ruby
<Ox0dea> Hash#select/#reject behave differently from all the other Enumerable methods on Hash.
Guest23359 has quit [Ping timeout: 240 seconds]
sarkyniin has joined #ruby
wookiehangover has joined #ruby
gambl0re has quit [Remote host closed the connection]
hfp has joined #ruby
Silox| has joined #ruby
hfp_work has joined #ruby
<baweaver_> they're the only ones to actually return a hash
epochwolf has joined #ruby
<apeiros> they are also not on Enumerable :)
mjmac has joined #ruby
gambl0re has joined #ruby
<apeiros> >> {}.method(:select).owner
<ruboto> apeiros # => Hash (https://eval.in/402558)
Nightmare has joined #ruby
jalcine has joined #ruby
universa1 has joined #ruby
<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...
Ilyas has quit [Quit: Leaving]
terrellt_ has joined #ruby
hfp has quit [Ping timeout: 240 seconds]
hfp_ is now known as hfp
A_ron has quit [Client Quit]
cassioscabral has joined #ruby
hfp_work has quit [Ping timeout: 256 seconds]
A_ron has joined #ruby
Yiota has joined #ruby
<yorickpeterse> apeiros: HEY
<yorickpeterse> You do not talk about Mongo and me behind my back
<apeiros> HI yorickpeterse! :D
<yorickpeterse> also I only have a tiny mongo cluster remaining
<yorickpeterse> which basically does nothing all day
toretore has quit [Ping timeout: 264 seconds]
<apeiros> right. I don't ^^
<yorickpeterse> _sillymarkets: I am now
<jhass> AccordLTN: yes, click edit and Add file at the bottom
hfp_work has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<baweaver_> Honestly I wouldn't use core extensions for that.
Channel6 has quit [Quit: Leaving]
<AccordLTN> updated
<yorickpeterse> _sillymarkets: please don't PM me for Ruby questions, ask them in here
aaeron has quit [Quit: Leaving.]
NeverDie has quit [Excess Flood]
<jhass> AccordLTN: spec run output would be great too
safeforge has joined #ruby
<Ox0dea> AccordLTN: #all_same? should just be uniq.size == 1, for what that's worth.
<AccordLTN> oops yes
jerius has joined #ruby
gambl0re has joined #ruby
clamstar has quit [Quit: ZNC - http://znc.in]
<_sillymarkets> sure, having problems with the aggregation pipeline when using my ruby script. It works fine when I'm in mongo shell
relix_ has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 264 seconds]
<yorickpeterse> without an example there's not much to help with
relix has joined #ruby
<AccordLTN> updated with rspec output
cnngimenez has quit [Ping timeout: 240 seconds]
<jhass> AccordLTN: it's be true, not be_true
<AccordLTN> ........
<jhass> if you read the output that sort of hints that
<AccordLTN> oh my gosh I'm retarded
NeverDie has joined #ruby
<AccordLTN> It was erroring for a different reason just a bit ago
<AccordLTN> where it wasn't recognizing the new array methods
yfeldblum has quit [Ping timeout: 246 seconds]
<AccordLTN> welp uh, thank you and sorry :D
Avat has joined #ruby
<jhass> nothing to worry about, yw
simplyianm has quit [Read error: Connection reset by peer]
<jhass> btw I agree that I'm not sure they're worth to have as core exts
<_sillymarkets> yorickpeterse: https://gist.github.com/anonymous/6254abad506461cd1cb4 | sorry I was putting the example in gist
simplyianm has joined #ruby
<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
doctorly has joined #ruby
<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
<jhass> !fact mk channels see http://ruby-community.com/pages/channels for a list of Ruby related channels on Freenode
<ruboto> jhass, I will remember that channels is see http://ruby-community.com/pages/channels for a list of Ruby related channels on Freenode
rubie has joined #ruby
<jhass> ?channels ruby-lang282
<ruboto> ruby-lang282, see http://ruby-community.com/pages/channels for a list of Ruby related channels on Freenode
DLSteve has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
<yorickpeterse> _sillymarkets: as I'm unsure why this wouldn't work
<_sillymarkets> yorickpeterse: okay, thanks for taking a look
<yorickpeterse> np
<ruby-lang282> ["hello: joe", "im: looking"]
blaxter has quit [Quit: foo]
<ruby-lang282> i want an array of hashes. but i have strings
<jhass> ruby-lang282: what would the hash look like?
benlieb has quit [Quit: benlieb]
workmad3 has joined #ruby
<ruby-lang282> [hello: joe, im: looking]
<yorickpeterse> ruby-lang282: you'll need to parse it
safeforge has quit [Remote host closed the connection]
<ruby-lang282> or even [:hello => "joe", :I'm =>'looking' ]
<jhass> >> ["hello: "joe", "im: looking"].map {|item| item.split(": ") }.to_h
<ruboto> jhass # => /tmp/execpad-e7126e7cce43/source-e7126e7cce43:2: syntax error, unexpected tIDENTIFIER, expecting ']' ...check link for more (https://eval.in/402565)
clamstar has joined #ruby
<jhass> wat
<jhass> d'oh
<jhass> >> ["hello: joe", "im: looking"].map {|item| item.split(": ") }.to_h
<ruboto> jhass # => {"hello"=>"joe", "im"=>"looking"} (https://eval.in/402566)
<ruby-lang282> that only returns the last value as the transformed in www.repl.it
<shevy> ruby-lang282 you can decompose it
gambl0re has quit [Remote host closed the connection]
<jhass> ruby-lang282: we don't see what you enter on repl.it
gambl0re has joined #ruby
<shevy> :I'm seems like an invalid symbol
swgillespie has joined #ruby
<ruby-lang282> it worked
<ruby-lang282> r = arr.map{|x| x.split(': ', 2)} this is what i ran before
<jhass> >> :"I'm"
<ruboto> jhass # => :"I'm" (https://eval.in/402567)
kevb has joined #ruby
tuelz has quit [Ping timeout: 265 seconds]
kevb has left #ruby [#ruby]
<ruby-lang282> thanks jhass
jhack32 has quit [Ping timeout: 264 seconds]
benlieb has joined #ruby
baweaver_ has quit [Read error: Connection reset by peer]
doctorly has quit [Quit: leaving]
chipotle has quit [Quit: cheerio]
kidoz has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
kevb has joined #ruby
baweaver has quit [Remote host closed the connection]
kevb has left #ruby [#ruby]
podman has joined #ruby
iateadonut has quit [Quit: Leaving.]
davedev24 has quit [Remote host closed the connection]
johnhamelink has joined #ruby
albedoa has left #ruby ["Textual IRC Client: www.textualapp.com"]
jpfuentes2 has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
davedev24 has joined #ruby
girakrok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
monod has joined #ruby
aaeron1 has joined #ruby
poguez_ has joined #ruby
ndrei has joined #ruby
tuelz has joined #ruby
quimrstorres has quit [Remote host closed the connection]
autrilla has quit [Quit: Connection closed for inactivity]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_sillymarkets> yorickpeterse: I figured it out. I need "collection.find.aggregate([match, group])"
<_sillymarkets> yorickpeterse: I was missing find, and thought aggregate was a direct method under collection
<_sillymarkets> collectionView
aaeron has quit [Ping timeout: 246 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
centrx has joined #ruby
f3ttX] has joined #ruby
nofxx has joined #ruby
waxjar has joined #ruby
relix has joined #ruby
bf4 has joined #ruby
DoubleMalt has joined #ruby
bf4 is now known as Guest75720
autrilla has joined #ruby
sphex has quit [Ping timeout: 255 seconds]
lkba has joined #ruby
sphex has joined #ruby
mary5030_ has joined #ruby
kadoppe has quit [Ping timeout: 246 seconds]
prestorium has joined #ruby
emilkarl has joined #ruby
ruby-lang282 has quit [Quit: Page closed]
kadoppe has joined #ruby
relix has quit [Ping timeout: 265 seconds]
Juanchito has quit [Quit: Connection closed for inactivity]
kohgpat has quit [Quit: leaving]
mary5030 has quit [Ping timeout: 240 seconds]
rehat has joined #ruby
iamvery_ has joined #ruby
fgo_ has quit [Ping timeout: 246 seconds]
robbyoconnor has quit [Ping timeout: 255 seconds]
DoubleMalt has quit [Ping timeout: 252 seconds]
allomov has quit [Remote host closed the connection]
fumihiro has quit [Ping timeout: 244 seconds]
hashrocket has joined #ruby
rehat has quit [Read error: Connection reset by peer]
iamvery_ has quit [Ping timeout: 240 seconds]
jerius has quit [Quit: /quit]
girakrok has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
girakrok has quit [Client Quit]
decoponio has quit [Quit: Leaving...]
monod has quit [Ping timeout: 255 seconds]
icebourg has joined #ruby
terrellt_ is now known as terrellt
icebourg has quit [Max SendQ exceeded]
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
Avat has quit [Quit: Page closed]
last_staff has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
user1138 has quit [Ping timeout: 246 seconds]
jerius has joined #ruby
allomov has joined #ruby
icebourg has joined #ruby
jenrzzz has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 265 seconds]
A_ron has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solars has quit [Ping timeout: 256 seconds]
startupality has joined #ruby
startupality has quit [Client Quit]
prettiestPony11 has quit [Quit: Textual IRC Client: www.textualapp.com]
<benlieb> how can I get rspec to fail when an error occurs in a method it calls?
<benlieb> right now it only fails when an expectation fails specifically
allomov has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 244 seconds]
emilkarl has quit [Quit: emilkarl]
wallerdev has quit [Quit: wallerdev]
aaeron1 has quit [Quit: Leaving.]
ruurd has quit [Quit: ZZZzzz…]
bruno- has joined #ruby
yqt has joined #ruby
scripore has joined #ruby
doug_f has joined #ruby
aaeron has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> expect(...).to raise_error(ExceptionClass)
wallerdev has joined #ruby
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]
rehat_ has joined #ruby
baweaver has joined #ruby
<Ox0dea> >> defined?({}[:foo])
<ruboto> Ox0dea # => "method" (https://eval.in/402580)
reset has joined #ruby
Bloodshot has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
jhack32 has joined #ruby
ruurd has quit [Client Quit]
lala has joined #ruby
ruurd has joined #ruby
benlieb has quit [Quit: benlieb]
dimasg has quit [Ping timeout: 256 seconds]
<jhack32> hey
<jhack32> so i'm creating a tic tac toe game
baweaver has quit [Ping timeout: 264 seconds]
<jhack32> im a little stuck on how to check to see if the player wins? I have created an array for the possible wins
benlieb has joined #ruby
j4cknewt has joined #ruby
dimasg has joined #ruby
peter_paule has quit [Ping timeout: 252 seconds]
athos_diddy has quit []
<apeiros> jhack32: normal 3x3 tictactoe?
<jhack32> apeiros: yes
user1138 has joined #ruby
<apeiros> you test 3 rows + 3 cols + 2 diagonals whether all of them have the same sign… if any has, you have a winner
saaki_ is now known as saaki
miwood has quit [Remote host closed the connection]
ruurd has quit [Client Quit]
miwood has joined #ruby
miwood has quit [Remote host closed the connection]
<shevy> I win!
<shevy> jhack32 you know how to query your array?
<shevy> every slot should have a state
<shevy> empty-one_colour-other_colour
<jhack32> the board is created as a hash
<shevy> so now you can query whether it'll be the same colour/token
kidoz has quit [Quit: Ухожу я от вас]
<shevy> how does the hash store the board slots?
hostess_ is now known as hostess
CustosLimen has joined #ruby
pullphinger has quit []
fgo_ has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doug_f has left #ruby [#ruby]
<jhack32> its something like this: @board = { "1" => " ", "2" => " ", etc
jgpawletko has quit [Quit: jgpawletko]
iamvery_ has joined #ruby
<jhack32> im assuming i would check to see if the spaces to win are occupied by using .each commands or something like that?
bruno- has quit [Ping timeout: 256 seconds]
<apeiros> jhack32: if all your keys are integers, contiguous and start at 0 - just use an array, not a hash.
<apeiros> and I'd definitively represent a TTT board as a 9 slot array
ruurd has joined #ruby
nfk has joined #ruby
ruurd has quit [Client Quit]
AlphaAtom has quit [Read error: No route to host]
Musashi007 has joined #ruby
bricker has quit [Ping timeout: 252 seconds]
AlphaAtom has joined #ruby
fgo_ has quit [Ping timeout: 272 seconds]
<apeiros> s/represent/store/ (I'd use a custom class to represent it, which in turn stores the data in an array)
jerius has quit [Ping timeout: 250 seconds]
werelivinginthef has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
pengin has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving]
iamvery_ has quit [Remote host closed the connection]
iamvery has joined #ruby
bricker has joined #ruby
codecop has quit [Remote host closed the connection]
<Ox0dea> I'd use an 81-bit integer.
rbennacer has quit []
ndrei has quit [Ping timeout: 264 seconds]
dangerousdave has joined #ruby
iamvery has quit [Client Quit]
peter_paule has joined #ruby
<Ox0dea> Erm, no, a 15-bit integer could be used to represent the entire state of the board.
eminence_ has quit [Remote host closed the connection]
<apeiros> Ox0dea: 3 states for 9 fields? that's 27bit ;-)
<apeiros> oh, wait
<Ox0dea> >> '222222222'.to_i(3).bit_length
<ruboto> Ox0dea # => 15 (https://eval.in/402584)
kies^ has quit [Ping timeout: 272 seconds]
<apeiros> oh, wait
<apeiros> yeah…
<apeiros> 3**9 states
<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> uninstall(plugin) unless whitelisted_plugins.include?(plugin)
ruurd has joined #ruby
baweaver has joined #ruby
<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
syath has quit [Quit: WeeChat 1.2]
<ruurd> Don't. Just do what your devs want.
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
hanmac has quit [Ping timeout: 244 seconds]
_blizzy_ has joined #ruby
baweaver has quit [Ping timeout: 244 seconds]
jerius has quit [Quit: /quit]
werelivinginthef has joined #ruby
workmad3 has joined #ruby
nettoweb has joined #ruby
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?
<shevy> perhaps .select ?
<shevy> and an .include?
<snockerton> h[:images].select { |x| x[:name].include?("ubuntu") }
<snockerton> i'm trying that, but it throws an error if comes across an object where :name is nil
yfeldblum has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
alienaut has quit [Read error: Connection reset by peer]
<snockerton> NoMethodError: undefined method `include?' for nil:NilClass
<snockerton> h[:images].select { |x| x[:name].include?("ubuntu") unless x[:name] == nil }
workmad3 has quit [Ping timeout: 244 seconds]
<snockerton> seems to work but there has to be a better way
<shevy> hmm
roolo has joined #ruby
<Ox0dea> >> nil.to_s # snockerton
<ruboto> Ox0dea # => "" (https://eval.in/402594)
rubie has quit [Remote host closed the connection]
<snockerton> h[:images].select { |x| x[:name].to_s.include?("ubuntu") }
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. :/
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
decoponio has joined #ruby
mdcox has joined #ruby
<apeiros> Ox0dea: and zsh's globs can do that? nice.
<apeiros> my way in ruby is to use Array#- on the result. but that's of course cumbersome.
JoshL has quit []
<mdcox> Does anyone know if default arguments to methods are evaluated everytime it's called?
<apeiros> mdcox: somebody knows, yes.
<apeiros> mdcox: try Time.now as a default value
<mdcox> Awesome. Totally didn't think of that.
<apeiros> would show with ruboto, but long running code is not allowed :)
<apeiros> (and spoiler alert: yes, they are evaluated every time)
<Ox0dea> >> def foo x = Time.now; x end; [foo, foo]
<ruboto> Ox0dea # => [2015-07-21 20:53:17 +0000, 2015-07-21 20:53:17 +0000] (https://eval.in/402606)
<mdcox> Darn...
<apeiros> (and second spoiler alert: they are evaluated in the method's context)
<wmoxam> apeiros: great, you just ruined the movie
<mdcox> apeiros: Just to clarify, they are evaluated even if something else is passed in right?
<Ox0dea> mdcox: No.
<apeiros> wmoxam: I'm awesome this way :D
<mdcox> Oh really? Awesome!
howdoicomputer has joined #ruby
<apeiros> mdcox: as Ox0dea says
<Ox0dea> mdcox: They are evaluated at the time you define the method; that's why apeiros suggested Time.now.
<Ox0dea> >> def foo x = Time.now; x.to_f end; [foo, foo]
<ruboto> Ox0dea # => [1437512063.077658, 1437512063.0777125] (https://eval.in/402607)
<Ox0dea> Uh-oh...
<apeiros> Ox0dea: eh, no
<Ox0dea> That's not what I expected. :/
<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]
<adaedra> "Hello\\nWorld".gsub('\n', "\n")
<adaedra> >> "Hello\\nWorld".gsub('\n', "\n")
<ruboto> adaedra # => "Hello\nWorld" (https://eval.in/402612)
<adaedra> cool
<adaedra> wait finisherr
<adaedra> which way you want it?
<shevy> the other way
<Ox0dea> finisherr: Is it only '\n' that you want to translate, or also other escape characters like '\r' and '\t'?
<finisherr> I want the string to end up like “yada yada\nyada yada\n”
endash has quit [Quit: endash]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<finisherr> I’m trying to make a string json compiant
<finisherr> can't type today
<adaedra> string.to_json
shmilan has joined #ruby
<finisherr> haha, so simple
codecop has quit [Remote host closed the connection]
<finisherr> awesome
monod has joined #ruby
<Ox0dea> JSON strings can't contain literal newlines?
<adaedra> but if it's in a data structure, just .to_json the structure above
<finisherr> the to_json call worked just great
failshell has quit [Remote host closed the connection]
workmad3 has joined #ruby
dangerousdave has joined #ruby
grill has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
gamename has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
bhorn1 is now known as bhorn1|away
dawkirst has quit [Quit: Leaving...]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Volsus has quit [Quit: Leaving]
bungoman has quit [Remote host closed the connection]
neanderslob has joined #ruby
mfp has quit [Quit: Yikes! Someone hit the wrong switch....]
workmad3 has quit [Ping timeout: 256 seconds]
Mendenhall has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
cnngimenez has quit [Ping timeout: 250 seconds]
guest343 has joined #ruby
<guest343> How can I make a custom rails SQL query chainable? Model.find_by_sql("...").order("...")
AlphaAtom has joined #ruby
mfp has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
EllisTAA has joined #ruby
shinnya has joined #ruby
howdoicomputer has joined #ruby
mfp has quit [Client Quit]
mhf has joined #ruby
douglasssss has quit [Quit: Leaving]
reset has quit [Quit: Linkinus - http://linkinus.com]
solars has quit [Ping timeout: 264 seconds]
lannonbr has quit [Ping timeout: 246 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ironhide_604 has quit [Ping timeout: 256 seconds]
LoBoGoL has quit [Ping timeout: 244 seconds]
RickHull has joined #ruby
swills has quit [Quit: leaving]
autrilla has quit [Quit: Connection closed for inactivity]
<RickHull> is there a good way to render an erb template via command line?
<RickHull> e.g. erb --foo bar --baz qux
pyon has joined #ruby
<RickHull> oops, erb --foo bar --baz qux template.erb
pyon is now known as kawaii-imouto
joshbamboo1 has quit [Read error: Connection reset by peer]
joshbamboo1 has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
apfeluser has joined #ruby
htmldrum has joined #ruby
ArchRogem has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
fullofcaffeine has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Soda has joined #ruby
phutchins has joined #ruby
guest343 has quit [Quit: Page closed]
Rutix has joined #ruby
Rutix has joined #ruby
Silvr has quit [Remote host closed the connection]
lannonbr has joined #ruby
michael_mbp has joined #ruby
k3asd` has quit [Ping timeout: 264 seconds]
LoBoGoL has joined #ruby
mrmargolis has joined #ruby
RobertBirnie has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
RobertBirnie has quit [Client Quit]
[H]unt3r has quit []
baweaver has joined #ruby
opalraav1 is now known as opalraava
workmad3 has joined #ruby
user1138 has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
nymous has joined #ruby
<nymous> hey folks
<nymous> do you know a way to compare debian package versions?
apfeluser has quit [Quit: Leaving]
user1138 has joined #ruby
Stratege_ is now known as Stratege
allcentury has quit [Ping timeout: 264 seconds]
entropie has quit [Ping timeout: 244 seconds]
<adaedra> Satan.invoke
EllisTAA has joined #ruby
eggoez has quit [Ping timeout: 244 seconds]
<Ox0dea> nymous: Would piggybacking on Gem::Version suffice?
<Ox0dea> >> Gem::Version.new('1.0') < Gem::Version.new('1.0.1')
<ruboto> Ox0dea # => true (https://eval.in/402625)
<nymous> letme check
marr has quit []
rapha has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
decoponyo has joined #ruby
<nymous> >> Gem::Version.new('0.4.22') < Gem::Version.new('0.4.22~2.g60d88fa')
<ruboto> nymous # => Malformed version number string 0.4.22~2.g60d88fa (ArgumentError) ...check link for more (https://eval.in/402626)
<Ox0dea> :(
<nymous> nope
<Ox0dea> What if you tr('~', '-')?
yalue has quit [Read error: Connection reset by peer]
victortyau has quit [Quit: Leaving]
willywos has quit [Ping timeout: 244 seconds]
<nymous> >> Gem::Version.new('0.4.22') < Gem::Version.new('0.4.22-2.g60d88fa')
<ruboto> nymous # => false (https://eval.in/402627)
<Ox0dea> Bummer.
rapha has joined #ruby
sn0wb1rd has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
<adaedra> debian package versions are based on software versions, no?
xsdg has quit [Ping timeout: 240 seconds]
<nymous> yes
<adaedra> there are even svn/git/hg/whatever versions in it
<adaedra> it's pretty unmanageable
Cache_Money has quit [Quit: Cache_Money]
<nymous> the problem is that 0.4.22~2 precedes 0.4.22
cccc has quit [Ping timeout: 240 seconds]
NuckingFuts has quit [Ping timeout: 240 seconds]
<nymous> it's like pre 0.4.22
decoponio has quit [Ping timeout: 265 seconds]
xsdg has joined #ruby
EllisTAA has quit [Client Quit]
Olipro has quit [Ping timeout: 246 seconds]
<adaedra> debian, fun for the whole family
cccc has joined #ruby
<nymous> i've seen a python lib for managing that
crankharder has quit [Ping timeout: 240 seconds]
<Ox0dea> nymous: In any case, you'd have to fetch (or at least query) the relevant git repository to determine if one SHA "precedes" another.
<nymous> but not for ruby(
<nymous> it's nothing to do with git
bruno- has joined #ruby
sn0wb1rd has joined #ruby
<Ox0dea> What's the "g60d88fa"?
wsterling has joined #ruby
joneshf-laptop has quit [Ping timeout: 252 seconds]
<nymous> 0.4.22~2.g60d88fa reads as 2 commits after 0.4.21 with sha 60d88fa
tdy has quit [Ping timeout: 252 seconds]
crankharder has joined #ruby
eggoez has joined #ruby
EllisTAA has joined #ruby
<Ox0dea> I see.
dangerousdave has joined #ruby
<nymous> so 0.4.22~3.g71a2950 would be next and so on
nuck has joined #ruby
<nymous> until tagged 0.4.22 commit
Alayde has quit [Ping timeout: 252 seconds]
zacts has quit [Ping timeout: 240 seconds]
<Ox0dea> So only the number immediately following the tilde is relevant for comparison.
sash_ has quit [Remote host closed the connection]
<nymous> technically, yes
sash_ has joined #ruby
bungoman has joined #ruby
<Ox0dea> Are there edge cases where tr('~', '.') would fail?
bronson has joined #ruby
joneshf-laptop has joined #ruby
<Ox0dea> s/fail/not suffice/
<nymous> 0.4.22 is after 0.4.22.2
mrmargolis has quit [Remote host closed the connection]
<nymous> not before
<Ox0dea> Ah, right.
<Ox0dea> Have fun. :P
<nymous> debian version number are quite complicated
hobodave has quit [Quit: Computer has gone to sleep.]
<adaedra> Mh, isn't there pre in some gem versions?
entropie has joined #ruby
kirun has quit [Quit: Client exiting]
<nymous> they might be something like 1:0.4.22~5+debian7.7 whatever
tuelz has quit [Ping timeout: 244 seconds]
<Ox0dea> >> Gem::Version.new('4.22-pre2') < Gem::Version.new('4.22')
<ruboto> Ox0dea # => true (https://eval.in/402630)
<nymous> maybe there a gem which implements full version compare of debian versions?
crankharder has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
<nymous> *is
werelivinginthef has quit [Remote host closed the connection]
redteam has quit [Quit: Leaving]
julieeharshaw has quit [Ping timeout: 240 seconds]
crankharder has joined #ruby
<Ox0dea> nymous: Is shelling out to `dpkg` out of the question?
shinnya has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 265 seconds]
tomphp has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
bronson has quit [Ping timeout: 250 seconds]
marr has joined #ruby
<nymous> it would make script too slow
<Ox0dea> Shell out from within a C extension. :P
zacts has joined #ruby
<nymous> i recently redid such a script which usually run 40 minutes before, now it runs for just 1 second
<nymous> it was shelling some commands too
<Ox0dea> Well, there doesn't appear to be a Ruby equivalent for Python's apt package.
devbug has joined #ruby
<Ox0dea> "Be the change you wish to see in the world."
linuxboytoo has quit [Remote host closed the connection]
shinnya has joined #ruby
gamename has quit [Remote host closed the connection]
<Ox0dea> Or finagle your strings until Gem::Version knows what to do with them. :/
linuxboytoo has joined #ruby
<nymous> debian has much more cases to deal with
gamename has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevin has quit [Ping timeout: 240 seconds]
tuelz has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
<Ox0dea> nymous: I guess you'll probably have to wrap libapt-pkg if you don't want to rewrite the version comparison logic.
bruno- has joined #ruby
julieeharshaw has joined #ruby
sevin has joined #ruby
Alayde has joined #ruby
<nymous> well, i've seen a C implementation of comparison algorithm, i can try to rewrite it
fullofcaffeine has joined #ruby
<nymous> or i can just use my silly edge case and to bother about others
bigbadbear has quit [Ping timeout: 255 seconds]
<nymous> *not to
roolo has quit [Remote host closed the connection]
rafaelsales has joined #ruby
linuxboytoo has quit [Ping timeout: 246 seconds]
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in great anger.]
centrx has joined #ruby
<Ox0dea> I don't know whether that code is correct, but it's likely to be easier to port than the equivalent C.
rubie has quit [Remote host closed the connection]
gamename has quit [Read error: Connection reset by peer]
<nymous> i guess so
[H]unt3r has joined #ruby
<Ox0dea> The deb-version manpage is pretty thorough.
monod has quit [Quit: bye]
robbyoconnor has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has quit [Remote host closed the connection]
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
livcd_ has quit [Ping timeout: 240 seconds]
swgillespie has joined #ruby
swgillespie has quit [Client Quit]
malconis has quit [Ping timeout: 244 seconds]
livcd has joined #ruby
quazimodo has quit [Ping timeout: 244 seconds]
bhaak has quit [Ping timeout: 240 seconds]
contradictioned_ has quit [Ping timeout: 246 seconds]
contradictioned has joined #ruby
bhaak has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
tdy has joined #ruby
DEac-_ has quit [Ping timeout: 264 seconds]
drizz has quit [Ping timeout: 246 seconds]
bungoman_ has joined #ruby
tmtwd has joined #ruby
ujjain has quit [Ping timeout: 246 seconds]
Agoldfish has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DEac- has joined #ruby
duoi has joined #ruby
mleung has joined #ruby
drizz has joined #ruby
Kero has quit [Ping timeout: 256 seconds]
EllisTAA has joined #ruby
Kero has joined #ruby
rubie has joined #ruby
A_ron has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jud has quit [Quit: Leaving]
bungoman has quit [Ping timeout: 272 seconds]
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
tomphp has joined #ruby
bungoman_ has quit [Ping timeout: 250 seconds]
LoBoGoL has quit [Quit: Bye]
workmad3 has joined #ruby
dblessin_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Regulati_ has joined #ruby
mandarinkin has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
jhack32 has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 240 seconds]
Ropeney has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
jhack32 has joined #ruby
icebourg has quit []
bffff_ has quit [Quit: Connection closed for inactivity]
shmilan has quit [Ping timeout: 272 seconds]
devbug has quit [Ping timeout: 244 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
shevy has quit [Ping timeout: 252 seconds]
shevy has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shadeslayer has quit [Ping timeout: 256 seconds]
t_ has quit [Ping timeout: 250 seconds]
dimasg has joined #ruby
tno has quit [Remote host closed the connection]
shadeslayer has joined #ruby
endash has joined #ruby
duoi has quit [Quit: duoi]
duoi has joined #ruby
FernandoBasso has quit [Quit: May the force be with you.]
failshell has joined #ruby
<darix> Ox0dea: that looks more like rpm's algorithm
shevy has quit [Ping timeout: 252 seconds]
t_ has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
acl_ has joined #ruby
lele|w has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
lele|w has joined #ruby
swgillespie has joined #ruby
<Ox0dea> darix: Are you able to tell by the absence of a check for '+'?
malconis has joined #ruby
wsterling has quit [Quit: Leaving.]
Cache_Money has joined #ruby
<[k-> Ox0dea!
<darix> epoch
<Ox0dea> darix: Debian uses epochs.
<Ox0dea> [k-!
CloCkWeRX has quit [Quit: Leaving.]
<[k-> :3
<Ox0dea> [k-: I'm trying to come up with the best non-alphanumeric encoding.
<Ox0dea> I'll use two symbols to represent each ASCII character, and then some sentinel value for UTF-8 codepoints.
failshell has quit [Ping timeout: 264 seconds]
EllisTAA has quit [Quit: EllisTAA]
<Ox0dea> But I'm trying to improve on Perl's ACME::EyeDrops, so I want the characters to "naturally" fit well in ASCII art.
<Ox0dea> *Acme
mike___1234 has quit [Ping timeout: 252 seconds]
christiandsg has joined #ruby
dfockler has quit [Remote host closed the connection]
<[k-> I don't have any knowledge on encodings tho
<Ox0dea> "Mapping" is probably the better term here.
<[k-> seems expensive
<Ox0dea> It's essentially just a different represenation of hexadecimal in most cases.
tmtwd has joined #ruby
decoponyo has quit [Quit: Leaving...]
prestorium has quit [Quit: Konversation terminated!]
<[k-> but it would look nice?
<Ox0dea> It's easy to make whitespace completely insignificant.
<Ox0dea> The only issue would be ensuring that the "prelude" could contain arbitrary whitespace.
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
ruby-lang747 has joined #ruby
malconis has quit [Ping timeout: 246 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> the prelude?
lannonbr has quit [Quit: WeeChat 1.2]
bronson has joined #ruby
ascarter has joined #ruby
stantonnet has quit [Ping timeout: 260 seconds]
<[k-> ah got to leave, bye bye
Jackneill has quit [Remote host closed the connection]
nveselinov has quit [Quit: Connection closed for inactivity]
<ElSif> bye [k-
dopie has quit [Quit: This computer has gone to sleep]
[k- has quit [Ping timeout: 240 seconds]
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
t_ has quit [Ping timeout: 246 seconds]
[H]unt3r has quit [Quit: Leaving]
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
phoo1234567 has quit [Quit: Leaving]
ruby-lang747 has quit [Ping timeout: 246 seconds]
chrishough has joined #ruby
Tritone has joined #ruby
mike___1234 has joined #ruby
slawrence00 has joined #ruby
mary5030 has quit [Ping timeout: 255 seconds]
CloCkWeRX has joined #ruby
DLSteve has quit [Quit: Leaving]
jesterfraud has joined #ruby
Pupeno has quit [Remote host closed the connection]
xkickflip has quit [Quit: xkickflip]
Musashi007 has quit [Quit: Musashi007]
baroquebobcat has quit [Quit: baroquebobcat]
pietr0_ has joined #ruby
shmilan has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
pietr0 has quit [Ping timeout: 244 seconds]
pietr0_ is now known as pietr0
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cache_Money has quit [Quit: Cache_Money]
Caldmann has joined #ruby
rehat_ has quit [Remote host closed the connection]
<Caldmann> i
<shevy> am
<Caldmann> awesome!
<Caldmann> ;)
<Ox0dea> Caldmann: Please explain.
Caldmann is now known as wcalderipe
dede has quit [Quit: Connection closed for inactivity]
<Ox0dea> wcalderipe: Are you still awesome?
Olipro has joined #ruby
<wcalderipe> i don't feel that way haha
[H]unt3r has joined #ruby
<wcalderipe> just miss clicked `i` by mistake
jbw_ has joined #ruby
EllisTAA has joined #ruby
mrmargolis has joined #ruby
<Ox0dea> Yeah, something's definitely gone pear-shaped if you find yourself clicking your keyboard.
mrmargolis has quit [Client Quit]
<RickHull> it's a touchscreen
Thomas-0725 has joined #ruby
<drbrain> my keyboard clicks
<Ox0dea> But do *you* click your keyboard?
<eam> >> def !; 123; end; send :!
<ruboto> eam # => 123 (https://eval.in/402671)
jbw__ has quit [Ping timeout: 264 seconds]
<wcalderipe> *miss taped.. if you will feel better! :)
<RickHull> in soviet russia
<Ox0dea> >> define_method('') { :ok }; send('')
<ruboto> Ox0dea # => :ok (https://eval.in/402672)
<wcalderipe> *makes
<drbrain> that's what my fingers feel, so I guess you could say that?
EllisTAA has quit [Client Quit]
<eam> Ox0dea: aka the shortest ruby method
<RickHull> was clicking a verb before mice?
<eam> Ox0dea: but in this case it changes !
<Ox0dea> RickHull: People have been "clicking their tongues" for centuries.
<eam> >> def !; 123; end; send :!; !1
<ruboto> eam # => private method `!' called for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/402673)
<RickHull> so to click is to produce a clicking sound
<RickHull> so i'm definitely clicking my keyboard
<shevy> I hammer into it
allcentury has joined #ruby
<RickHull> swan dive ftw
<Ox0dea> I use my noses.
<shevy> how many of them?
<Ox0dea> It varies.
<eam> as many as necessary
rcvalle has quit [Quit: rcvalle]
rafaelsales has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
nitenq has joined #ruby
<Ox0dea> >> class Fixnum; %w[+@ -@ ! ~].each { |m| alias_method m, :itself } end; +~---+!!++~~+42 # eam
<ruboto> Ox0dea # => 42 (https://eval.in/402674)
<Ox0dea> Unary is best -ary.
christiandsg has joined #ruby
<nitenq> hi, is there a way to convert the string “0xffffff00” to a int to be able to use NetAddr.i_to_bits()
zeroklain has joined #ruby
finisherr has quit [Quit: finisherr]
zeroklain has left #ruby [#ruby]
xkickflip has joined #ruby
<shevy> Ox0dea is writing not code but atrocities
<eam> my favorite fixnum unary trick is:
<eam> >> class Fixnum; def -@; 5; end; end; x = 7; [-7, -(7), - 7, -x]
<ruboto> eam # => [-7, 5, 5, 5] (https://eval.in/402675)
<shevy> what the
rafaelsales has joined #ruby
<eam> in ruby everything is a method (except when it's hardcoded in the parser)
ruby470 has joined #ruby
<ruby470> Hi?
ruby470 has quit [Client Quit]
quazimodo has joined #ruby
<Ox0dea> >> 'ff'.to_i(16) # nitenq
<ruboto> Ox0dea # => 255 (https://eval.in/402676)
<nitenq> Ox0dea: that’s not what I am trying to do
eggoez has quit [Ping timeout: 246 seconds]
<nitenq> Ox0dea: I want to do this
<nitenq> ip = NetAddr.i_to_bits(0xffffff00)
shmilan has quit [Quit: Leaving]
<Ox0dea> nitenq: Then my advice is sound.
<Ox0dea> >> '0xffffff00'.to_i(16) == 0xffffff00
shmilan has joined #ruby
<ruboto> Ox0dea # => true (https://eval.in/402677)
<nitenq> oh ok thanks
casadei_ has quit [Remote host closed the connection]
<Ox0dea> >> class Fixnum; def bits; bit_length.pred.downto(0).map { |i| self[i] } end end; 0x0dea.bits
<ruboto> Ox0dea # => [1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0] (https://eval.in/402678)
<Ox0dea> For what that's worth.
ruurd has quit [Quit: ZZZzzz…]
PpPyg has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
<zenspider> >> 0x0dea.to_s(2).split(//).map(&:to_i)
<ruboto> zenspider # => [1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0] (https://eval.in/402679)
d10n-work has quit [Quit: Connection closed for inactivity]
<Ox0dea> split(//) > chars?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eggoez has joined #ruby
t_ has joined #ruby