apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
starkhalo has quit [Ping timeout: 240 seconds]
Celm_ has quit [Client Quit]
Eiam has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<terrellt> Rubygems dead?
mehlah has quit [Read error: Connection reset by peer]
mehlah has joined #ruby
johnmolina has quit [Read error: Connection reset by peer]
johnmolina has joined #ruby
northfurr has joined #ruby
bruno- has joined #ruby
zaiste has joined #ruby
zaiste_ has quit [Ping timeout: 245 seconds]
end_guy has quit [Ping timeout: 264 seconds]
atmosx has quit [Ping timeout: 264 seconds]
tacos1de has quit [Ping timeout: 264 seconds]
axsuul has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<ericwood> long live rubygems
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
gbaway has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
terrellt has quit [Quit: Leaving...]
DrCode has quit [Ping timeout: 264 seconds]
jottr has quit [Ping timeout: 250 seconds]
jobewan has joined #ruby
endash has quit [Quit: endash]
ddv has quit [Ping timeout: 245 seconds]
mikeg has joined #ruby
GriffinHeart has joined #ruby
ddv has joined #ruby
b00stfr3ak has quit [Ping timeout: 264 seconds]
asdasdasdasss has joined #ruby
Blizzy has joined #ruby
ghr has joined #ruby
Blizzy is now known as _Blizzy
GriffinHeart has quit [Ping timeout: 240 seconds]
ephemerian has quit [Quit: Leaving.]
jle` has quit [Ping timeout: 260 seconds]
zkay11 has joined #ruby
saarinen has quit [Quit: saarinen]
caboose_m_j has quit [Quit: Leaving]
ghr has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby
arrubin has joined #ruby
edgarjs is now known as edgarjs_afk
fabrice31 has joined #ruby
mary5030 has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
Fretta has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
war32 has quit [Quit: WeeChat 0.4.3]
nfk has quit [Ping timeout: 240 seconds]
mr_snowf1ake has joined #ruby
aspiers has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
asdasdasdasss has quit [Ping timeout: 240 seconds]
Deele has quit [Ping timeout: 256 seconds]
Shidash has joined #ruby
geggam has quit [Remote host closed the connection]
awc737 has joined #ruby
dangerousdave has quit [Ping timeout: 240 seconds]
andrewjanssen has quit [Quit: Linkinus - http://linkinus.com]
kachi8| is now known as kachi8|1
cashnguns has quit [Ping timeout: 250 seconds]
zz_karupa is now known as karupa
<Fretta> i was just overlooking this and this doesnt seem accurate, I get missing permutations: http://stackoverflow.com/a/22131499 <— can you spot why?
Fretta has quit [Quit: Fretta]
amargherio has joined #ruby
lukec has quit [Quit: lukec]
Fretta has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
mordof has joined #ruby
francisfish has joined #ruby
Fretta has quit [Client Quit]
datafirm has quit [Quit: Computer has gone to sleep.]
virtualize has quit []
datafirm has joined #ruby
<gzl> is there any reason not to use $n to refer to the nth capture in the last match, as opposed to indexing into /regex/.match(string).captures?
nanoyak has quit [Quit: Computer has gone to sleep.]
sheepman has quit [Ping timeout: 250 seconds]
datafirm has quit [Read error: Connection reset by peer]
gregf has joined #ruby
fjfish has quit [Ping timeout: 260 seconds]
datafirm has joined #ruby
Xeago has quit [Remote host closed the connection]
virtualize has joined #ruby
marr has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
_2_Lima134 has joined #ruby
_2_Lima134 has left #ruby [#ruby]
jaimef has quit [Excess Flood]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
frellnet has joined #ruby
jmbrown412 has quit [Remote host closed the connection]
timonv_ has joined #ruby
datafirm has quit [Ping timeout: 240 seconds]
pietr0 has quit [Quit: pietr0]
sheepman has joined #ruby
mehlah has quit [Quit: Leaving...]
timonv_ has quit [Ping timeout: 272 seconds]
virtualize has quit [Ping timeout: 272 seconds]
jaimef has joined #ruby
virtualize has joined #ruby
whomp_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
asdasdasdasss has joined #ruby
djbkd has quit [Remote host closed the connection]
bruno- has joined #ruby
djbkd has joined #ruby
<kachi8|1> _
ericmathison has quit [Ping timeout: 260 seconds]
PanPan has joined #ruby
fold has quit [Quit: WeeChat 0.4.3]
mijicd has quit [Remote host closed the connection]
ehlovader has quit [Ping timeout: 260 seconds]
bmurt has quit []
cnj has quit [Ping timeout: 240 seconds]
fold has joined #ruby
sevenseacat has joined #ruby
kireevco has quit [Quit: Leaving.]
deric_skibotn has quit [Ping timeout: 272 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
phinfonet has quit [Read error: Connection reset by peer]
mgberlin has joined #ruby
centrx has joined #ruby
ehlovader has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
cnj has joined #ruby
kireevco has joined #ruby
ramfjord has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
phinfonet has joined #ruby
Channel6 has joined #ruby
macclearich has joined #ruby
j_mcnally has joined #ruby
ra4king has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 250 seconds]
ra4king has joined #ruby
macclearich has quit [Client Quit]
kachi8|1 is now known as kachi8|0
Cache_Money has joined #ruby
larissa has joined #ruby
lukec has joined #ruby
alvaro_o_ has quit [Quit: Ex-Chat]
chipotle has joined #ruby
dustint has quit [Quit: WeeChat 0.4.1]
benzrf is now known as benzrf|offline
Andy__ has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
benzrf|offline is now known as benzrf
banjara has quit [Quit: Leaving.]
Cache_Money has quit [Quit: Cache_Money]
charlied3 has quit [Quit: WeeChat 0.4.2]
charlied3 has joined #ruby
<Andy__> hey all, i have a question about flow control w/ threads... basically, I don't know how to do it and googling around hasn't really yielded a good read on it.. here's the closest example I can think of (but unfortunately, it doesn't seem to wait until all thread operations are finished?): https://gist.github.com/anonymous/efdcfebc1c2e5b64d309
Andy__ is now known as NivenHuH
ziyadb has quit [Quit: Connection closed for inactivity]
jarray52 has left #ruby [#ruby]
aspires has quit []
Cache_Money has joined #ruby
ghr has joined #ruby
jack_rabbit has joined #ruby
<centrx> NivenHuH, What's the question:
<centrx> *?
j_mcnally has quit [Read error: Connection reset by peer]
bricker`work has quit [Quit: leaving]
<NivenHuH> the question is, how do i run both functions in parallel and properly wait for both of them to complete?
j_mcnally has joined #ruby
bmurt has joined #ruby
phoo1234567 has quit [Remote host closed the connection]
freerobby has joined #ruby
tkuchiki has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
j_mcnall_ has joined #ruby
oo_ has joined #ruby
Sammael has quit [Ping timeout: 240 seconds]
lucianosousa has joined #ruby
charlied3 has quit [Ping timeout: 240 seconds]
preller has quit [Ping timeout: 245 seconds]
jaimef has quit [Excess Flood]
preller has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
jaimef has joined #ruby
j_mcnally has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 250 seconds]
<centrx> NivenHuH, Sorry I am not very familiar with Ruby threads, but isn't there a way for a thread to indicate it is done?
<NivenHuH> yeah it's when it's status goes to nil/false/dead
<NivenHuH> but i'm pretty sure what i'm doing there isn't what you're supposed to do
<centrx> ah I see
<centrx> Maybe this:
<NivenHuH> i suspect i need to use threads.each {|t| t.join}
<centrx> threads.all {|i| i.status }
robustus has joined #ruby
<centrx> or in this case it would be #none
<centrx> maybe that's not what you're asking
<centrx> NivenHuH, The concept I am familiar with is you issue "jobs" that run in parallel. A third job/thread may check that is prerequisites are ready and either exit until called again, or execute
j_mcnall_ has quit [Quit: さよなら]
Vivekananda_y510 has joined #ruby
j_mcnally has joined #ruby
mikecmpbll has joined #ruby
charlied3 has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
kireevco has quit [Quit: Leaving.]
bmurt has quit []
asdasdasdasss has joined #ruby
kireevco has joined #ruby
charlied3 has quit [Client Quit]
jfran has quit [Ping timeout: 250 seconds]
sdouglas has joined #ruby
timgauthier has joined #ruby
poindontcare has quit [Read error: Connection reset by peer]
thumpba_ has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mgberlin has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
tacos1de has joined #ruby
war32 has joined #ruby
DrCode has joined #ruby
mgberlin has joined #ruby
end_guy has joined #ruby
edgarjs_afk is now known as edgarjs
Hanmac1 has joined #ruby
lanox has quit [Quit: leaving]
machete has quit [Ping timeout: 264 seconds]
tokik has joined #ruby
<j_mcnally> So whats better, rbx or mri ?
jenskarlsen has quit [Quit: jenskarlsen]
proxie has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hanmac has quit [Ping timeout: 256 seconds]
virtualize has quit [Ping timeout: 272 seconds]
r3zn0r has joined #ruby
machete has joined #ruby
jenskarlsen has joined #ruby
echevemaster has joined #ruby
asdasdasdasss has quit [Ping timeout: 272 seconds]
ericwood_ has joined #ruby
crazymykl has quit [Ping timeout: 240 seconds]
Photism_ has joined #ruby
hamakn has quit [Remote host closed the connection]
jrhe has joined #ruby
<jrhe> Hi
crazymykl has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
proxie has quit [Ping timeout: 260 seconds]
Photism has quit [Ping timeout: 264 seconds]
atmosx has joined #ruby
edgarjs is now known as edgarjs_afk
vsoftoiletpaper has quit []
<jrhe> I am trying to architect a greenfield single page app. Ordinarily I use rails for my API, some js framework for the frontend. Problem is that the app does a fair amount of machine learning, natural language processing and math which ruby isn't great for. Do you think it makes sense to use rails and then delegate to other services in other languages for the
<jrhe> stuff ruby isn't good at?
mattmcclure has quit [Quit: Connection closed for inactivity]
<ericwood_> jrhe: you should definitely use rails to delegate other services
<ericwood_> keep that stuff out of rails itself
<centrx> That said, Ruby is good for everything :P
<centrx> I'm building a BIOS in Ruby as we speak
<jrhe> :p
kireevco has quit [Quit: Leaving.]
<ericwood_> I mean, ruby is cool for all kinds of stuff
<centrx> jrhe, You mentioned "single page app", so you might be interested in something like Jekyll instead of Rails, which is big
<ericwood_> I have a whole library for programming roombas
hgl_ has joined #ruby
<jrhe> centrx: Rails will just be for the API
<ericwood_> centrx: rails is serving up the API< though
<jrhe> situation is this
<centrx> ah I see
xerxas has quit [Quit: Connection closed for inactivity]
wallerdev has quit [Quit: wallerdev]
sputnik13net has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
heftig has quit [Ping timeout: 272 seconds]
virtualize has joined #ruby
jaimef has quit [Excess Flood]
mgberlin has quit [Remote host closed the connection]
<jrhe> company disbanded, company gets back together. Theres a senior dev who has been here before me who loves python and has been using it for longer. I am slightly less senior and love ruby and have been using that for longer although have some python experience. Trying to vouch for ruby but I figure the best way is to let him do all his machine learning,
<jrhe> natural language processing crap in python with numpy, scipy, scilearn etc (which I do think are better than anything ruby has- sorry!) and get away with having ruby for the API.
chipotle has quit [Quit: cya]
arya_ has joined #ruby
<jrhe> Or even grape
<centrx> Python does likely have better libraries for it
_reset has joined #ruby
<ericwood_> jrhe: use a queueing service or datastore or whatever to talk back and forth
<ericwood_> those two things should be completely decoupled
<ericwood_> that's how we do it where I'm at
<centrx> Modular is good
<ericwood_> tons of python stuff for analytics
jaimef has joined #ruby
<jrhe> ericwood_: Any preferences? Something redis based would be good
<ericwood_> jrhe: I'm not a crazy architect, nor do I know how things fit together
<jrhe> ericwood_: ooh! What company? Could you elaborate more? Could help me make my case
<jrhe> ericwood_: Ahh right ok
<ericwood_> rabbitMQ is nice for queueing, redis can be cool, postgres idk do whatever
<jrhe> its sensible to me, just worried he will get the last say as he's more senior
<ericwood_> assert your dominance
heftig has joined #ruby
<centrx> The usual issues with using different technologies is that the developers don't know both, or difficulty hiring
chipotle has joined #ruby
<jrhe> oh I will. If things don't work out we fight to the death.
<ericwood_> be like I'm the biggest baddest dev round these parts we do what I want
reset has quit [Ping timeout: 264 seconds]
<jrhe> centrx: which is why I want rails as its good for the web stuff and essentially its a web product. And then python makes sense for the backend stuff as the guys who know numerical stuff seem to know itmore
<centrx> Remember, you can always leave and take that VP position at Google/Twitter they keep hounding you about
GriffinHeart has joined #ruby
<jrhe> centrx: Hahah. Sounds familiar. That probably involves writing python though based on what my course mates have said.
<jrhe> Cheers for the help :)
troyready has quit [Ping timeout: 256 seconds]
_reset has quit [Ping timeout: 256 seconds]
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
Zenigor has joined #ruby
<godd2> I submitted a pull request to rspec and they're considering using my change, but they're asking me to add a sepc to cover it, and I'm in over my head
<godd2> Could anyone offer some guidance? https://github.com/rspec/rspec-core/pull/1636
heftig has quit [Ping timeout: 272 seconds]
GriffinHeart has quit [Ping timeout: 250 seconds]
<centrx> That's some deep rspec context right there
<godd2> Should I point out that they're asking for a spec to cover a private method? Or should I try to write one even if it's wrong? I don't know that much about testing yet
absolutezeroff has quit [Quit: Leaving]
timgauthier has joined #ruby
thumpba has joined #ruby
<centrx> godd2, I think you just need to determine how the error is caused, from a minimal/testing standpoint
<centrx> godd2, You are filing bugs in rspec, so you must know something about testing!
<centrx> filing actual correct bugs I should add too
doritostains has quit [Quit: doritostains]
ericwood_ has quit [Quit: WeeChat 0.4.3]
ericwood_ has joined #ruby
doritostains has joined #ruby
heftig has joined #ruby
fabrice31 has joined #ruby
Zenigor has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 240 seconds]
lewis__ has joined #ruby
<godd2> haha, thanks, but thats more a testament to my knowledge of Ruby. I was trying to learn following a tutorial and I got a nasty error, so I went about fixing it using pry, but I wouldn't know how to a) make a spec for what they're asking, or b) verify my test
lewis__ is now known as Lewix
britneywright has quit [Quit: Textual IRC Client: www.textualapp.com]
mios has joined #ruby
thumpba has quit [Ping timeout: 256 seconds]
ericwood_ has quit [Client Quit]
mgberlin has joined #ruby
tus has quit []
saarinen has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
jle` has joined #ruby
Soda has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
mios has quit [Ping timeout: 250 seconds]
dapz has joined #ruby
hamakn has joined #ruby
virtualize has quit [Ping timeout: 260 seconds]
virtualize has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
Andrevan has joined #ruby
<j_mcnally> centrx: are u really building a bios in ruby?
<centrx> hah no
<centrx> only advanced AI
sunya7a has joined #ruby
<centrx> which will eventually be able to write a BIOS
<centrx> so yes
arya_ has quit [Ping timeout: 240 seconds]
<j_mcnally> somehow i feel like ur still joking lol
Shidash has quit [Ping timeout: 240 seconds]
saarinen has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
<Sgeo> What's the point of the 'yield self if block_given?' pattern I sometimes read about? I mean, for Files and other things where there's a specific task to do immediately after, that makes sense. Or, say, an object where you'll allow initialization to mutate it but after that it becomes immutable. But I think I've seen it suggested even for cases where there's no obvious benefit, except maybe grouping code together in a pretty manner.
<Sgeo> I guess I'm mostly thinking of as used in initialize
saarinen has joined #ruby
virtualize has quit [Remote host closed the connection]
virtualize has joined #ruby
GriffinHeart has joined #ruby
<centrx> Sgeo, Are you asking about the yield or the block_given?
<centrx> Sgeo, block_given? allows for methods that can take blocks but not require them
<Sgeo> About the pattern of giving self to the block if it exists during initialization
<jrhe> Sgeo: Initialize seems the main time. It gives you access to self so you can customise the object without having to go through its accessors. The immutability thing basically
<Sgeo> Without having to go through accessors? It's not a instance_eval, right? Do accessors operate differently during initialization?
<jrhe> Sgeo: Sorry, got mixed up. Listen to the more seasoned peeps :p
<Sgeo> Like in this code:
<centrx> Yeah example would be good
Sammael has joined #ruby
virtualize has quit [Client Quit]
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
<Sgeo> YieldPerson's initialize does it. Is there a good reason for it to be doing it? Because it lets lines 39-43 be nicely organized? Or is it just an example, and useless here?
<centrx> Sgeo, Yes, it is a way of organizing code that would otherwise be multi-line code outside of the block
<centrx> Otherwise, parameters are passed by hash
sunya7a has quit [Ping timeout: 240 seconds]
<centrx> Instead, you can pass parameters through a programmatic block, very Ruby-tastic
<centrx> Usually used for initialize of course, it's available in Mechanize for example, and ActiveRecord I think
<Sgeo> def yieldto(o); yield o; o; end;
<Sgeo> Makes it possible to do it to any object regardless of its support, if it doesn't have extra work to do after the yield
yetanotherdave has quit [Ping timeout: 240 seconds]
<jrhe> I remember where I have seen it now. It is just purely syntactic but it aids in the production of nice dsls
<Sgeo> Ah, I guess 19-22 are a bit ugly?
Audace has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
radic has quit [Ping timeout: 240 seconds]
Pharaoh2 has joined #ruby
benlieb has joined #ruby
Zenigor has joined #ruby
radic has joined #ruby
kireevco has joined #ruby
jaimef has quit [Excess Flood]
Zenigor has quit [Remote host closed the connection]
Wolland_ is now known as Wolland
kachi8|0 has quit [Ping timeout: 240 seconds]
SJr has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k1 has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
timgauthier has joined #ruby
tectonic has joined #ruby
jaimef has joined #ruby
timgauthier has quit [Client Quit]
mikecmpbll has joined #ruby
NinoScript_ has joined #ruby
bruno- has joined #ruby
jmbrown412 has joined #ruby
Avahey_ has quit [Quit: Connection closed for inactivity]
axl_ has quit [Quit: axl_]
Vivekananda has quit [Read error: Connection reset by peer]
theharshest has quit [Quit: This computer has gone to sleep]
jmbrown412 has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 256 seconds]
m_3 has quit [Quit: leaving]
freerobby has quit [Quit: Leaving.]
_maes_ has joined #ruby
m_3 has joined #ruby
freerobby has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jobewan has quit [Remote host closed the connection]
<jameyd> anybody have any experience using activerecod-import outside of rails...?
awc737 has joined #ruby
awc737 has quit [Max SendQ exceeded]
bellow has joined #ruby
<bellow> I was wondering if anyone know of a program for keeping track of dvds(movies) you own(like you search then click the title so you have a picture too) and I am not asking about media or files on the computer. Like the Shelves app(and also free) but for Windows(on/offline)
<centrx> jameyd, Probably not, especially at this hour, but if you give us some code...
saarinen has quit [Quit: saarinen]
kachi8 has joined #ruby
isthisreallife has joined #ruby
<jameyd> basically experiencing this woe: https://github.com/zdennis/activerecord-import/issues/119
darkxploit has quit [Ping timeout: 240 seconds]
isthisreallife has left #ruby [#ruby]
<jameyd> vanilla-ish case, let me hastebin
kireevco has quit [Quit: Leaving.]
<jameyd> get_ngrams returns an array of things like "the||boat||sank."
<bellow> I was wondering if anyone know of a program for keeping track of dvds(movies) you own(like you search then click the title so you have a picture too) and I am not asking about media or files on the computer. Like the Shelves app(and also free) but for Windows(on/offline)
johnmolina has quit []
<centrx> jameyd, I think it's pretty unlikely this code would work outside Rilas
<jameyd> works without the #import bit, just slow as hell. i want to bulk this thing
baweaver has joined #ruby
<centrx> jameyd, Note that the gem only requires activerecord, which is one component of Rails
<centrx> jameyd, There is nothing wrong with using the parts of Rails as libraries. ActiveRecord and ActiveSupport are often used this way, separated from Rails.
<jameyd> centrx: sure, i'm using active record without rails for this project
Zebroid has joined #ruby
<jameyd> but the error: undefined method `import' for #<Class:0x007fab1a252ae8> and the same error for that issue i posted makes me wonder
mikecmpbll has quit [Quit: i've nodded off.]
<jameyd> but since there's no rails dependency on ar-import, maybe it's a different issue
jxf has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
zmattpetty has joined #ruby
<bellow> I was wondering if anyone know of a program for keeping track of dvds(movies) you own(like you search then click the title so you have a picture too) and I am not asking about media or files on the computer. Like the Shelves app(and also free) but for Windows(on/offline)
Lewix has joined #ruby
mary5030 has joined #ruby
<centrx> jameyd, I suppose you have "activerecord-import 0.4.0 or higher"
<sevenseacat> bellow: seems quite unrelated to ruby
<centrx> bellow, FYI wait longer between asking questions on IRC
<centrx> bellow, Also yeah you will get better response in a more general channel
zmattpetty has left #ruby [#ruby]
zkay11 has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 260 seconds]
<bellow> no
<jameyd> yeah centrx let me downgrade...
<sevenseacat> lol no?
zorak has quit [Ping timeout: 264 seconds]
Eiam has joined #ruby
kireevco has joined #ruby
<Sgeo> >> case; when proc { |x| p x }; end;
<eval-in__> Sgeo => nil (https://eval.in/172813)
mesamoo has joined #ruby
<Sgeo> >> p true===nil; p false===nil; p false===5;
<eval-in__> Sgeo => false ... (https://eval.in/172815)
braincrash has quit [Quit: bye bye]
<Sgeo> Eh, so I can't use case when to just try a series of boolean expressions?
<Sgeo> For some reason I thought I saw that being done
<centrx> That should work
<centrx> Note that there are two forms of the case expression
<jameyd> bah. this doesn't seem promising. anyone know of bulk insert tools off the top of their head, that will work with AR? :(
war32 has quit [Quit: WeeChat 0.4.3]
war32 has joined #ruby
<Sgeo> centrx: I think the bot tricked me into thinking === nil was used
mr_snowf1ake has quit [Quit: Leaving]
<Sgeo> Because the bot's code that it sent to eval.in had a p in front of the entire thing
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has quit [Ping timeout: 272 seconds]
<bellow> I was wondering if anyone know of a program for keeping track of dvds(movies) you own(like you search then click the title so you have a picture too) and I am not asking about media or files on the computer. Like the Shelves app(and also free) but for Windows(on/offline)
<Sgeo> I guess the nil that got printed actually came from the case expression as a while?
<Sgeo> >> case; end;
<eval-in__> Sgeo => /tmp/execpad-cb515f644da0/source-cb515f644da0:2: syntax error, unexpected keyword_end, expecting keyword_when ... (https://eval.in/172817)
asdasdasdasss has joined #ruby
<jameyd> bellow: we saw your question
<centrx> Sgeo, You had case when x then nothing end
<Sgeo> Well, that would make me uncomfortable with code generation, if Ruby advertized itself as a code generation language. But it's run-time metaprogramming based, so meh
<Sgeo> (that = inability to have 0 whens)
braincrash has joined #ruby
hmsimha has quit [Ping timeout: 240 seconds]
Beoran__ has quit [Ping timeout: 240 seconds]
<centrx> Sgeo, There may be a great way to do what you are trying to do, but probably not with the case statment.
iamjarvo has joined #ruby
<Sgeo> >> case; when true then 5; when false then 6; end;
<eval-in__> Sgeo => 5 (https://eval.in/172818)
<Sgeo> Completely different form from case with an expression. Got it
thumpba has joined #ruby
<bellow> Then where should I ask
_foka has joined #ruby
<jameyd> somewhere that's about software and not a specific programming language
<bellow> where is that
<Sgeo> bellow: what if there's an app like that but it's not written in Ruby?
<sevenseacat> welcome to the internet?
<Eiam> bellow: google.com
<bellow> no help
<sevenseacat> trollolololol?
<jameyd> well nobody has an answer here, we're not being silent out of spite
<Sgeo> Shelves for Windows is a not too surprisingly unhelpful search
<Eiam> whoops
<Eiam> there
<Eiam> top hits on google
<bellow> not free
<bellow> Not what I asked about
<Eiam> bellow: go forth and learn google, it will get you far in life
ARCADIVS has quit [Quit: WeeChat 0.4.3]
asdasdasdasss has quit [Ping timeout: 260 seconds]
<sevenseacat> you didnt say free
<Sgeo> Could try searching the name of the program, along with 'alternative'
<Eiam> indeed you did not! ;)
kachi8 has quit [Ping timeout: 240 seconds]
<Sgeo> Actually, e did. "Like the Shelves app(and also free) "
amystephen has quit [Quit: amystephen]
<sevenseacat> ah i missed that
<jameyd> IN THAT CASE
<Sgeo> Eiam's second link lists a free one, not sure if it's sufficient for what you want
<gzl> sweet
havenwood has quit [Remote host closed the connection]
<bellow> With Shelves, you can add items in a number of ways, such as: * By scanning barcodes * From the Internet * Entering details manually
<bellow> I want to do that
<bellow> not the scanning one or mannually
<sevenseacat> this guy cant take a hint can he
<centrx> bellow, Have you heard of the Ruby programming language?
<Eiam> sevenseacat: matz is nice and so are we
<Eiam> =0
<sevenseacat> i'm nice!
<sevenseacat> i gave nice hints
wahh has joined #ruby
wahh has left #ruby [#ruby]
Noob101 has joined #ruby
ghr has joined #ruby
<jameyd> i'll buy anybody some nice dvd organizing software if they can find me an active record bulk insert gem that works without rails
zkay11 has joined #ruby
Beoran__ has joined #ruby
<centrx> jameyd, That doesn't really make much sense does it?
<centrx> jameyd, How can it be an _ActiveRecord_ gem that does not depend on ActiveRecord?
<j_mcnally> jameyd: i bet most of they that mention rails would work with stand alone activerecord
<jameyd> i'm just bumming. can't get it to work in my case. i just have to debug more, i guess.
Lewix has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<j_mcnally> jameyd: did u try https://github.com/zdennis/activerecord-import ?
<bellow> hello
ghr has quit [Ping timeout: 256 seconds]
<j_mcnally> jameyd: i know it mentions rails but thats unlikely that its a real dependency
heftig has joined #ruby
<j_mcnally> jameyd: at a minimum i bet you only actually need active support
<jameyd> ah, i'll try that
<j_mcnally> jameyd: https://github.com/zdennis/activerecord-import/blob/master/activerecord-import.gemspec only lists active record as a dependency
Takle has joined #ruby
dapz has joined #ruby
<bellow> what channel an i ask
<j_mcnally> jameyd: if it works you owe me software
<j_mcnally> ;p
Lewix has joined #ruby
<j_mcnally> bellow: you are in #ruby
zorak has joined #ruby
<bellow> yes and waas told to try a different channel
SCommette has joined #ruby
lucianosousa has quit [Quit: lucianosousa]
<j_mcnally> what is your problem?
<jameyd> jack_rabbit: haha
<jameyd> dangit
<jack_rabbit> :P
<jameyd> j_mcnally: that 'haha' was aimed at you
<j_mcnally> i know i actually just read up the buffer ;p
lng_ has left #ruby ["ruby"]
mikecmpbll has quit [Client Quit]
anaeem1_ has joined #ruby
<jameyd> i'm looking through the source and i see the models are just inheriting from ActiveRecord::Base, trying to figure out if there's some other connection i need to make to give my models an import method
<j_mcnally> Dont pm me brah
m3_del_ has joined #ruby
<jameyd> (i'm newish to ruby so sorry if some things seem granted)
<j_mcnally> bellow: what does that have to do with Ruby ?
hgl_ has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has quit [Remote host closed the connection]
<bellow> Whih is why I asked what channel can I ask
Takle has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
<j_mcnally> this is a network for Open source projects
<j_mcnally> not for finding people free software.....
m3_del has quit [Ping timeout: 240 seconds]
<j_mcnally> Opensource is "Free as in pizza" not "Free as in beer"
<j_mcnally> wait
<j_mcnally> i mean
arya_ has joined #ruby
<landodger> =O
<j_mcnally> "Free as in speech" not "Free as in beer"
anaeem1_ has quit [Remote host closed the connection]
<landodger> lol
<jameyd> bellow: we don't know any better than you where to ask, but you did get some great help a while back
zorak has quit [Ping timeout: 272 seconds]
<landodger> fuck that, give me free pizza AND beer mcnally
<jameyd> unfortunately i don't think we know where you should look either, besides google
<sevenseacat> mm pizza
<bellow> no
bellow has left #ruby [#ruby]
<landodger> i want pizza now, and a good beer
<landodger> a nice deep dish with some shiner bock
oo_ has joined #ruby
hgl has quit [Ping timeout: 240 seconds]
SJr has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
jameyd has quit [Ping timeout: 240 seconds]
jameyd has joined #ruby
<jameyd> whew, vpn went down
sdouglas has joined #ruby
Andrevan has quit [Quit: WeeChat 0.4.4-dev]
zorak has joined #ruby
bruno- has joined #ruby
anaeem1 has joined #ruby
lukec has quit [Quit: lukec]
sdouglas has quit [Remote host closed the connection]
<Eiam> woo shiner bock!
<Eiam> you must be from texas =)
<landodger> lived there for a while :) fell in love with shiner haha
<Eiam> haha no one else ever seems to know what it is and looks at me weird for ordering it
<Eiam> "You have any Bocks?" *waiter stares at me*
<landodger> haha except when ur in tx and its on tap EVERYWHERE lol
anaeem1 has quit [Ping timeout: 240 seconds]
<Eiam> im sorry I don't like giant fucking hop fests triple quadruple IPA
<landodger> hahaha yeah
ericwood_ has joined #ruby
<Eiam> landodger++, we can be friends. I'll buy you a shiner bock =)
<landodger> im sorry when its 110 degrees and humid im not gona choke down a 11% beer
<landodger> :) yayy!
bruno- has quit [Ping timeout: 272 seconds]
<jameyd> i like ipas that are balanced, but there’s a trend in oregon where so many of them are just over the top
<landodger> ive found 2 placed in cali that sell shiner near me, love it
<jameyd> they taste like marijuana or something
benlieb has quit [Quit: benlieb]
<Eiam> landodger: oh, bay area?
<Eiam> you may get that beer sooner than expected
<ericwood_> oddly enough I find double IPAs to be more my thing
<ericwood_> they tend to be smoother
<landodger> socal, OC
<godd2> jameyd why are you eating marijuana?
<jameyd> the CDA is making its rounds and getting more popular, and i love it so much
<Eiam> I really wish that ruby would just swallow nils instead of making me check objects before accessing them
<Eiam> jameyd: hahah I call them like drinking liquid cigars =)
<jameyd> godd2: the question is why am i drinking it, and i’m not!
<ericwood_> Eiam: you can make that happen
<Sgeo> That option is bad too
timonv_ has joined #ruby
jarto has joined #ruby
<Eiam> ericwood_: i know, nilmethod paradigm right?
<Eiam> it just infects the whole code base so I'm scared to implement it
<ericwood_> yeah you can define method_missing on nil :P
<Sgeo> The only good way to handle nils that I know of are really only possible in statically typed languages
<Eiam> every time I have to write "if <thing> if <thing.attr> then <thing.attr stuff>" I want to die a bit inside
<ericwood_> class NilClass; def method_missing(*args, &block); nil; end; end
MusachiMiyamotoF has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jameyd> is Object#try just a rails thing?
<ericwood_> most likely
<ericwood_> easy to check the official ruby docs though
<Eiam> begin/rescue/end
frellnet has quit [Remote host closed the connection]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
frellnet has joined #ruby
<ericwood_> eh exception handling as flow control can be bad bad bad
<ericwood_> also note that exceptions aren't the fastest things ever
<Eiam> super slow
Eroc has joined #ruby
<Sgeo> Something something Haskell something something
<Eiam> I have a block of code where the remote service returns exceptions that I have to rescue when it hits to keep going
starkhalo has joined #ruby
<Eiam> sooo slow
MCDev has quit [Ping timeout: 250 seconds]
mmoretti has joined #ruby
<ericwood_> oof
timonv_ has quit [Ping timeout: 250 seconds]
<Eiam> its called in a loop too
* Eiam piles on the pain
<jameyd> holy hell, i think activerecord-insert is working!
<jameyd> but it’s… slower...
OffTheRails has joined #ruby
<Eroc> In my app, I receive epoch time, with an assumed timezone of UTC. I'm trying to do something like Time.at(1405357200), but it returns time in my local zone. If I convert it to UTC, it changes the time. Is there a way to convert an epoch timestamp to a time in UTC?
djbkd has joined #ruby
mmoretti has quit [Client Quit]
<Eiam> I'm trying to do something like this, where I split out the hash that I'm enumearting from an array but.. no dice, https://gist.github.com/Eiam8821/d4cbb0d56b66935b5bb1
<Eiam> what mojo am I missing here? (this is possible right?)
frellnet has quit [Ping timeout: 250 seconds]
<centrx> Eiam, I doubt that () inside the block syntax would work with a hash like that
<ericwood_> Eroc: I don't see the problem with converting it to UTC, unless I'm missing something?
<Eiam> centrx: so.. not possible?
<centrx> Eiam, If you can rely on the order of the values in the hash, you can use x.values.select, but in that case, why have a hash at all?
<Eiam> centrx: I don't generate the hash, its given to me
<Eiam> I just need to find a specific action inside of it
<Eiam> in particular, I need to find out when a particular action happened inside the hash
DivineEntity has quit [Quit: leaving]
<centrx> Eiam, array_of_hashes.select { |hash| hash["read"] == "checked" } ?
freerobby has quit [Quit: Leaving.]
<centrx> Actually,
<centrx> array_of_hashes.select { |hash| hash["action"]["read"] == "checked" }
orangerobot_ has joined #ruby
<ericwood_> huh didn't know about that paren trick inside block args
theharshest has joined #ruby
<eam> centrx: rescue false
<centrx> ericwood_, It is pretty awesome
<Eiam> ericwood: it would be cooler if it worked here too =)
kure_ has quit [Ping timeout: 250 seconds]
jameyd_ has joined #ruby
<eam> if you don't ignore exceptions it won't work because the key structure isn't reliable
<centrx> Eiam, It would if you made those hashes into arrays always in the right order
<Eiam> I don't even actually know what the real rule is for it
<Eroc> ericwood: I'm in EST. If I use Time.at, then it returns a time in EST. If I call .utc in it, then it moves the time ahead 4 hours. I don't want it to change the time. I, basically, want it to assume UTC from the get go.
<eam> wait, ignore me -- this is not python
<Eiam> i just use it randomly and it normally works
<Eiam> eam: imposter? =)
<orangerobot_> do you guys think it's good practice to :freeze all objects sent as parameters to methods unless I absolutely need to modify them?
theharshest has quit [Client Quit]
<j_mcnally> Eiam: rails has a nice try function that helps swallowing nil
<eam> had it in my head that ruby hash raises on missing key access, but I'm wrong
<ericwood_> Eiam: you're assuming the order of hash keys in your loop
<j_mcnally> Eiam: you could steal it
<orangerobot_> eam: need to call .fetch I think
<eam> orangerobot_: yah, but he doesn't want the behavior so all good
<centrx> orangerobot_, Not so bad, but it is more of a stop-gap to avoid uncareful developing. You can avoid the necessity by being careful how methods are defined
<Eiam> ericwood: the order is set
m_3 has quit [Quit: leaving]
<Eiam> its always that order
<ericwood_> Eiam: fair enough. I'm just always wary with hashes, although I know ruby hashes are ordered ;\
<Eiam> since 1.9 yep
<Eiam> anyway, it doesn't *work* so, kinda irrelevant
<centrx> orangerobot_, If someone defines a method that is destructive with its arguments disrupting other parts of the program, its just as easy to forget adding ".freeze" to every single method call, which would be a big apin
<centrx> PAIN
MCDev has joined #ruby
ericwood_ has quit [Quit: WeeChat 0.4.3]
benzrf is now known as benzrf|offline
theharshest has joined #ruby
<Eiam> centrx: yep, I could. I was more curious about seeing if I could make |()| work in that context
<Eiam> which, i can't apparently
<Eiam> whats that even called ?
<Eiam> () in the block
drago777 has joined #ruby
<centrx> scuba-diving walrus?
<orangerobot_> centrx: Yes indeed. And what about no private methods? Is a vim vs emacs type of thing or is there some sort of consensus about that?
fabrice31 has joined #ruby
<orangerobot_> is that *
oo_ has quit [Remote host closed the connection]
<centrx> orangerobot_, private methods are similar to that sure, but defining methods to be private in a class is a much simpler, smaller task
<centrx> orangerobot_, and private method are important for APIs used by others. They declare in the code how it was designed, self-documenting code is good.
<landodger> bang bang bang goes my head against the wall, might be time for bed soon
benlieb has joined #ruby
<orangerobot_> centrx: i read somewhere that it was a bad smell which could indicate that your class is doing more than it should
kure_ has joined #ruby
<centrx> There are a lot of specific styles of programming that can be strict about these things.
<orangerobot_> if your class is so complex you can't show all method to the outside then maybe it's time to extract some of that behaviour to another class <- thisis the argument I think
_foka has quit [Quit: Termin.conz0l3-.Avlprk]
oo_ has joined #ruby
kachi8 has joined #ruby
<centrx> Single-Responsibility Principle (SRP) is another theory/style that might say that a class should have only one public method, which would mean a lot of private methods.
<orangerobot_> does single responsibility imply a single method?
Gooder``` has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
<centrx> orangerobot_, I don't think that's a valid argument. The usual argument would be that private is unnecessary and it is flexible to have methods be accessible. They are accessible anyway with send.
<centrx> orangerobot_, There are even various concepts of the Single Responsibilty Principle, some I think insane restrictions on it
<landodger> Eiam you there man?
<Eiam> yep
Gooder`` has quit [Ping timeout: 250 seconds]
<landodger> mind if i PM u
<Eiam> sure
<orangerobot_> centrx: I see. Thanks for the heads-up. I've still got a lot of OO reading to do, it seems. =)
stytown has joined #ruby
asdasdasdasss has joined #ruby
<centrx> orangerobot_, It's also a matter of the language or maybe the people who use the language. private declarations and unnecessary complications with boilerplate are symptoms of Java-ism
Soliah has quit [Read error: Connection reset by peer]
<centrx> orangerobot_, In Ruby, we generally favor clear, simple code
centrx has quit [Quit: Mead error: Connection reset by beer]
jarto has quit [Remote host closed the connection]
CodeLicker has quit [Ping timeout: 240 seconds]
OffTheRails has quit [Quit: Leaving]
lukec has joined #ruby
asdasdasdasss has quit [Ping timeout: 272 seconds]
rippa has joined #ruby
SJr has quit [Read error: Connection reset by peer]
Cache_Money has quit [Quit: Cache_Money]
<godd2> are there any ruby standard libraries that offer additional regex stuff?
SJr has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
terryb has joined #ruby
<arup_r> Is there any equivalent of https://github.com/ttilley/fssm .. As it is currently not maintained.
foo-bar- has joined #ruby
<sevenseacat> a lot of things still use it though
d4nk has joined #ruby
<sevenseacat> and its not like a million issues are piling up that make it unsuitable
zorak has quit [Ping timeout: 240 seconds]
jameyd_ has quit [Ping timeout: 240 seconds]
SJr has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
zorak has joined #ruby
SJr has joined #ruby
hgl_ has joined #ruby
foo-bar- has quit [Ping timeout: 272 seconds]
<Eiam> ugh
amargherio has quit [Remote host closed the connection]
<Eiam> why is each_with_object inverted from inject/reduce ?
<Eiam> so annoying
<orangerobot_> arup_r: maybe Puppet can work for you. It's a bit of an overkill if you just need that feature.
<Eiam> arup_r: God ?
<terryb> Anyone one using steak is it dead? https://github.com/cavalle/steak
<arup_r> That's Process monitoring Eiam:. I want FS monitoring
<Eiam> well, I guess god is more for process
sdouglas has joined #ruby
<jameyd> this is great, activerecord-import has sped up the parsing of a text (heart of darkness for this test) from 5 or so minutes to 30 seconds
<jameyd> reading moby dick...
<sevenseacat> terryb: a lot of steak's functionality got rolled into capybara
<Eiam> arup_r: well, just be careful there. don't want to pull a dropbox, hooking into FSEvents and causing tons of issues for customers
<terryb> sevenseacat: thank you
<Eiam> arup_r: RubyCocoa?
<Eiam> rubymotion I guess now? just use the real cocoa api
<arup_r> Eiam: My goal is if any new files comes into a specific directory, then my web bot should get up...
Soda has quit [Remote host closed the connection]
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axl_ has joined #ruby
arrubin has joined #ruby
arrubin has quit [Client Quit]
<arup_r> Is it for Mac only ?
yetanotherdave has joined #ruby
<Eiam> I thought you wanted mac only sorry
<Eiam> FSEvents is a mac only implementation yes
hgl_ has quit [Remote host closed the connection]
terryb has quit [Quit: Bye]
hgl_ has joined #ruby
zkay11 has quit [Quit: Leaving.]
aoeu256 has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
yetanotherdave has quit [Ping timeout: 240 seconds]
<Mon_Ouie> It's called each_with_object: It's like each, with another object added at the end. Just like each_with_index.
SCommette has quit [Quit: SCommette]
<Eiam> =( its inject without having to return the memo. and inverted.
jshultz has quit [Quit: Connection closed for inactivity]
<Eiam> but yes, I see your reasoning and it makes sense from that standpoint
<Eiam> so apparently you cannot "next" inside of an inject, but you can inside each_with_object
<Eiam> maybe i was losing my mind and that wasn't what I saw
<Eiam> (they are both enumerable so..)
<Mon_Ouie> >> [1, 2, 3].inject(0) { next }
<eval-in__> Mon_Ouie => nil (https://eval.in/172837)
<Mon_Ouie> No problem with that
Vivekananda_y510 has quit [Ping timeout: 264 seconds]
<Eiam> so, Mon_Ouie says, losing your mind. got it =)
gbaway has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 240 seconds]
<Sgeo> Oh hey, Ruby has continuations and a delimited continuation library, those could be abused
<Sgeo> To reduce nil checking
hsps_ has quit [Read error: Connection reset by peer]
Zebroid has quit [Remote host closed the connection]
kireevco has quit [Quit: Leaving.]
hsps_ has joined #ruby
bradleyprice has joined #ruby
<lagweezle> Has ... what? O.o
* lagweezle feels ignorant.
lukec has quit [Quit: lukec]
yfeldblum has quit [Remote host closed the connection]
sigurding has joined #ruby
larissa has quit [Quit: Leaving]
m_3 has joined #ruby
orangerobot_ has quit [Quit: Page closed]
cleopatra has joined #ruby
kireevco has joined #ruby
arya_ has joined #ruby
<cleopatra> hellooo
<cleopatra> :L
m_3 has quit [Client Quit]
axl_ has quit [Quit: axl_]
kure_ has quit [Ping timeout: 250 seconds]
fold has quit [Ping timeout: 260 seconds]
foo-bar- has joined #ruby
AndyWojo has quit [Remote host closed the connection]
<agent_white> Herro
Atrumx has joined #ruby
axsuul has joined #ruby
<cleopatra> what new here
oo_ has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
tvw has joined #ruby
foo-bar- has quit [Ping timeout: 264 seconds]
arya_ has joined #ruby
arup_r has left #ruby [#ruby]
<cleopatra> hello friend i need a litle help in rails
<cleopatra> nested forms and nested
<cleopatra> nested forms and nested_attributes
<mozzarella> why are you not asking in #RubyOnRails instead?
Vivekananda_y510 has joined #ruby
jameyd_ has joined #ruby
fold has joined #ruby
jameyd has quit [Quit: jameyd]
NinoScript_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Ping timeout: 240 seconds]
ValicekB has quit []
yfeldblum has joined #ruby
amystephen has joined #ruby
phinfonet has quit []
<cleopatra> hehe i am there too
<cleopatra> mozzarella, :P You are best
prathamesh has joined #ruby
Channel6 has quit [Quit: Leaving]
yetanotherdave has joined #ruby
heftig has quit [Quit: Quitting]
mostlybadfly has quit [Quit: Connection closed for inactivity]
yfeldblum has quit [Ping timeout: 256 seconds]
washtubs has quit [Ping timeout: 256 seconds]
asdasdasdasss has joined #ruby
sdouglas has quit [Remote host closed the connection]
Spami has joined #ruby
sdouglas has joined #ruby
tobago has joined #ruby
mikepack has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
mehlah has joined #ruby
M-Technic has quit [Quit: leaving]
jrhe has quit [Quit: Connection closed for inactivity]
asdasdasdasss has quit [Ping timeout: 256 seconds]
nemesit|znc has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
rkazak_ has joined #ruby
aganov has joined #ruby
havenwood has joined #ruby
stytown has left #ruby [#ruby]
mgberlin_ has joined #ruby
ericmathison has joined #ruby
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
mgberlin has quit [Ping timeout: 256 seconds]
dogeydogey has joined #ruby
<dogeydogey> hi, if i want to tar a file with ruby, how would I do that?
compAz has joined #ruby
ghr has joined #ruby
whyy has joined #ruby
<agent_white> dogeydoge: What do you mean?
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
Eroc has quit [Quit: leaving]
<pontiki> dogeydogey: you could run the tar command several ways, depending on your needs
<Mon_Ouie> dogeydogey: If it's an existing file, the most straightforward way is to just shell out
axl_ has joined #ruby
<pontiki> backticks, system(), %x{}
mgberlin_ has quit [Remote host closed the connection]
rgarver has joined #ruby
timgauthier has joined #ruby
axl_ has quit [Client Quit]
apeiros has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
<Mon_Ouie> You can also use Gem::Package::TarWriter :p
<cleopatra> pontiki, :P
arya_ has quit [Ping timeout: 272 seconds]
timgauthier has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
<agent_white> Huh. TIL system() returns bool, not a string.
<agent_white> Kewl!
anarang has joined #ruby
sdouglas has joined #ruby
whyy has quit [Read error: Connection reset by peer]
whyy has joined #ruby
rgarver has quit [Client Quit]
<cleopatra> agent_white, O.o
kyb3r_ has joined #ruby
timonv_ has joined #ruby
oo_ has joined #ruby
timonv_ has quit [Client Quit]
bruno- has quit [Ping timeout: 256 seconds]
prathamesh has quit []
starkhalo has quit [Ping timeout: 240 seconds]
timonv_ has joined #ruby
ylluminarious has quit [Quit: Leaving...]
theharshest has quit [Quit: This computer has gone to sleep]
GriffinHeart has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
arup_r has joined #ruby
mercwithamouth has joined #ruby
_Blizzy has quit [Ping timeout: 264 seconds]
buub has joined #ruby
dogeydogey has left #ruby ["Bye"]
timgauthier has joined #ruby
tagrudev has joined #ruby
whomp_ has quit [Ping timeout: 256 seconds]
chipotle has quit [Quit: cya]
turristan_ has joined #ruby
timgauthier has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
rkazak_ has quit [Quit: Sleep.....ing....]
benlieb has quit [Quit: benlieb]
timonv_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
Atrumx has quit [Quit: Quitting]
axl_ has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
Sgeo_ has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
axl_ has quit [Client Quit]
Sgeo has quit [Ping timeout: 256 seconds]
mikepack has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 272 seconds]
Gooder``` has quit [Ping timeout: 250 seconds]
apeiros has quit [Ping timeout: 250 seconds]
<eam> have I mentioned how much I love ruby's ffi recently?
<eam> this stuff is *impossibly* easy to prototype in
<agent_white> eam: Whatcha doon?
m_3 has joined #ruby
<mozzarella> what's ffi?
<eam> agent_white: wrapping a prototype binding to a newly open sourced nosql library
<agent_white> eam: Ooo :D
<eam> it's taken me like 10 minutes to get the basics create / set / fetch / delete working in about a page of code
pu22l3r has quit [Ping timeout: 264 seconds]
<eam> but in general, every time I use this it's just SO. EASY.
<eam> like why not do it in a ruby -e level easy
<eam> mozzarella: https://github.com/ffi/ffi
timgauthier has joined #ruby
<eam> I think common lisp popularized this method, basically cram a bunch of fixed sized data on the stack and do all the arg translation dynamically
<agent_white> Can't say I've tinkered with it! Though I have been itching to learn some C and figured it out be kinda fun to make some trivial C code work in Ruby.
<eam> well the real amazing part is there is no C at all
<agent_white> :o
<eam> you allocate memory, define structures, manipulate pointers, load C shared objects and bind functions all from ruby
GriffinHeart has joined #ruby
cleopatra has quit [Ping timeout: 250 seconds]
bal has joined #ruby
<eam> I'll go back and write it in C later when I care about speed
<eam> ffi is kinda inefficient, but not really a huge deal considering it's a map to ... ruby
oo_ has quit [Remote host closed the connection]
<agent_white> Whoa...
<agent_white> That's pretty gnarly.
oo_ has joined #ruby
asdasdasdasss has joined #ruby
pu22l3r has joined #ruby
whomp has joined #ruby
jwp has joined #ruby
relix has joined #ruby
<timgauthier> hey, ... its sort of ruby related. Have any of you used boxen before?
dapz has joined #ruby
dapz has quit [Max SendQ exceeded]
asdasdasdasss has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
whomp has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
tvw has quit []
dawkirst has quit [Remote host closed the connection]
<timgauthier> *churp churp*
compAz has quit [Remote host closed the connection]
m_3 has quit [Quit: leaving]
<timgauthier> shevy i blame you
m_3 has joined #ruby
turristan_ has quit [Ping timeout: 260 seconds]
dawkirst has joined #ruby
yfeldblum has quit [Remote host closed the connection]
bruno- has joined #ruby
claymore has joined #ruby
<pontiki> he's a good scapegoat
claymore has quit [Changing host]
claymore has joined #ruby
yfeldblum has joined #ruby
Vivekananda_y510 has quit [Ping timeout: 264 seconds]
<eam> and *done* I'm now fetching and storing keys
kireevco has quit [Quit: Leaving.]
oo_ has quit [Remote host closed the connection]
anarang has quit [Quit: Leaving]
bruno- has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
Aaaal has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
northfurr has quit [Quit: northfurr]
gaussblurinc1 has joined #ruby
terryb has joined #ruby
Hanmac has joined #ruby
yetanotherdave has quit [Quit: Lost terminal]
GriffinH_ has joined #ruby
GriffinHeart has quit [Ping timeout: 256 seconds]
Hanmac1 has quit [Ping timeout: 240 seconds]
terryb is now known as tbenade
agent_white has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 250 seconds]
nobodyzzz has joined #ruby
godd2 has quit [Ping timeout: 250 seconds]
<tbenade> what is idiomatic/best practise for returning a couple of values. rolling a class for this purpose seems live overkill? hashes?
baweaver has joined #ruby
compAz has joined #ruby
<pontiki> or array
whomp has joined #ruby
<pontiki> depends on what makes the most sense for calling programs to use
apeiros has joined #ruby
<pontiki> sometimes a class is appropos, which could come from a Struct, or OpenStruct
ericmathison has quit [Ping timeout: 264 seconds]
agent_white has joined #ruby
<mozzarella> if it's small, array, if it's big, hash or object
kyb3r_ has quit [Read error: Connection reset by peer]
<mozzarella> unless…
<tbenade> ok, caller wants a status true/false plus a description of reason for outcome?
<mozzarella> returning a big array of values is what you want, of course
alem0lars has joined #ruby
<tbenade> {outcome:true/false, description:"blah blah"}
<pontiki> hash is ok there
<mozzarella> array is also ok
<pontiki> is this going to be a public library for others to use?
turristan_ has joined #ruby
shime has quit [Quit: Lost terminal]
<pontiki> ther are lots of precedents for returning an object, and even having different objects for success and failure
<tbenade> nope, it is currently more learning than anything I am coming from C# so trying to compare apples with ham sandwiches
kyb3r_ has joined #ruby
<pontiki> well, in that case, there's more than one way to do it :)
<mozzarella> outcome, description = function()
jwp has quit [Quit: Leaving]
baweaver has quit [Ping timeout: 250 seconds]
febuiles_ has quit [Remote host closed the connection]
<tbenade> mozarella: an array?
febuiles has joined #ruby
whomp has quit [Ping timeout: 260 seconds]
<mozzarella> yes
techsethi has joined #ruby
<tbenade> thanks, and that would not offend you as a consumer of the API. This is the bit I care most about. Struggling with why you would do it differently for internal vs public consumption. Why not just consistently awesome?
Morkel has joined #ruby
GriffinH_ has quit []
<pontiki> awesome is almost always in the eye of the beholder
Aaaal has quit [Quit: Aaaal]
tbenade has quit [Remote host closed the connection]
tbenade has joined #ruby
turristan_ has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
Aaaal has joined #ruby
tbenade has quit [Read error: Connection reset by peer]
claymore has quit [Ping timeout: 260 seconds]
matchaw has quit [Ping timeout: 240 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
foo-bar- has joined #ruby
pranny has joined #ruby
GriffinHeart has joined #ruby
chipotle has quit [Client Quit]
war32 has quit [Ping timeout: 272 seconds]
matchaw has joined #ruby
alexju has quit [Remote host closed the connection]
kyb3r_ has joined #ruby
r3zn0r has quit [Quit: leaving]
_tpavel has joined #ruby
claymore has joined #ruby
foo-bar- has quit [Ping timeout: 250 seconds]
Aaaal has quit [Quit: Aaaal]
Asher has joined #ruby
timgauthier has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
Bira has joined #ruby
Bira has quit [Client Quit]
chipotle has quit [Client Quit]
axsuul has joined #ruby
terryb has joined #ruby
timgauthier has joined #ruby
sdouglas has quit [Remote host closed the connection]
jackneill has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
ndrei has joined #ruby
<terryb> in strongly typed languages we can easily make it the responsibility of the caller to place nice and meet expectations. So what is the go in Ruby, do you write methods to accept anything and try convert it or do you validate arguments. Integers being the example
chipotle has joined #ruby
<pontiki> terryb: the concept of "duck typing" is rather popular in dynamically typed languages. writing your methods to accept various types and assume they will work as expected is useful. writing your classes to respond to common methods is really useful
<pontiki> have a look at "confident ruby" by avdi grim
fabrice31 has joined #ruby
chipotle has quit [Client Quit]
senayar has joined #ruby
<pontiki> also, sandi metz goes through duck typing, and a great c&c of static vs. dynamic typing
echevemaster has quit [Quit: Leaving]
<pontiki> ... in POODR
hsps_ has quit [Read error: Connection reset by peer]
turristan_ has joined #ruby
hamakn_ has joined #ruby
<apeiros> poodr?
hsps_ has joined #ruby
<sevenseacat> !poodr
<helpa> Practical Object Oriented Design in Ruby - http://www.poodr.info/
<agent_white> She also did a nice talk, essentially on POODR -- http://www.confreaks.com/videos/3871-goruco2011-less-the-path-to-better-design
turristan_ has quit [Max SendQ exceeded]
mercwithamouth has quit [Ping timeout: 240 seconds]
turristan_ has joined #ruby
Lewix has quit [Remote host closed the connection]
<terryb> pontiki: got sandi's book, just got avdi's so hope royalties inbound ;)
<pontiki> lol, hope so too!
sdouglas has joined #ruby
<pontiki> avdi has a birthday month special right now
jxf has quit [Ping timeout: 240 seconds]
<terryb> pontiki: damn I just kindled it!
<sevenseacat> confident ruby was a great book
hamakn has quit [Ping timeout: 240 seconds]
memph1s has joined #ruby
<pontiki> i *think* he'll give you a deal
<terryb> anyways, def drink_beer(units) {}. General suggestion is I should be taking units and doing all i can to make it a number?
zigomir has joined #ruby
whomp has joined #ruby
mattmcclure has joined #ruby
kaspergrubbe has joined #ruby
buub has quit [Remote host closed the connection]
<pontiki> if your method *requires* it to be a number, then yes
<pontiki> the duck typing thing, tho, is it doesn't actually have to be a number, if it can act like one in your method
<pontiki> but even if it requires a number, don't waste lots of code ensuring it is, just let the numeric operations fail and raise exceptions
asdasdasdasss has joined #ruby
senayar has quit [Read error: Connection reset by peer]
senayar has joined #ruby
<terryb> pontiki: cool that is much more what I am accustomed to. trying to over think it. Thanks
whomp has quit [Ping timeout: 272 seconds]
kaspergrubbe has quit [Ping timeout: 260 seconds]
hgl_ has quit [Remote host closed the connection]
hgl_ has joined #ruby
jhass|off is now known as jhass
asdasdasdasss has quit [Ping timeout: 240 seconds]
sungai_keruh has joined #ruby
<terryb> pontiki: book (Confident Ruby) awesome thanks
j_mcnally has quit [Quit: さよなら]
ndrei has quit [Ping timeout: 240 seconds]
tmcgoo has quit [Ping timeout: 272 seconds]
senayar has quit [Remote host closed the connection]
rubydog has joined #ruby
IceDragon has quit [Quit: Space~~~]
<pontiki> my pleasure
francisfish has quit [Ping timeout: 240 seconds]
febuiles has quit [Quit: febuiles]
Wolland has quit [Remote host closed the connection]
terryb has quit [Remote host closed the connection]
Wolland has joined #ruby
ndrei has joined #ruby
senayar_ has joined #ruby
kalusn has joined #ruby
alex88 has joined #ruby
rtdp has joined #ruby
fold has quit [Quit: WeeChat 0.4.3]
<rtdp> is there a way to distribute custom ruby build via rvm or rbnev ?
lolmaus has joined #ruby
Wolland has quit [Ping timeout: 264 seconds]
<apeiros> sevenseacat: thanks
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
relix has quit [Read error: Connection reset by peer]
relix has joined #ruby
razum2um has joined #ruby
whyy has quit []
tkuchiki_ has joined #ruby
agent_white has quit [Quit: gnight]
tkuchiki has quit [Ping timeout: 250 seconds]
arup_r has quit [Remote host closed the connection]
blackmesa has joined #ruby
dangerousdave has joined #ruby
olivier_bK has joined #ruby
Takumo has quit [Ping timeout: 272 seconds]
senayar_ has quit [Read error: Connection reset by peer]
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
senayar has joined #ruby
Takumo has quit [Excess Flood]
Takumo has joined #ruby
atmosx has quit [Ping timeout: 264 seconds]
marcel has quit [Ping timeout: 272 seconds]
marcel has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axsuul has quit [Ping timeout: 264 seconds]
elaptics`away is now known as elaptics
agjacome has joined #ruby
GriffinHeart has joined #ruby
pu22l3r_ has joined #ruby
pranny has quit [Quit: Leaving.]
atmosx has joined #ruby
adamholt has quit [Ping timeout: 272 seconds]
shredding has joined #ruby
yacks has quit [Ping timeout: 250 seconds]
pu22l3r has quit [Ping timeout: 240 seconds]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adamholt has joined #ruby
Takle has joined #ruby
sk87 has joined #ruby
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby
bruno- has joined #ruby
LiohAu has joined #ruby
tesuji has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
Jake232 has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
Aaaal has joined #ruby
mikecmpbll has joined #ruby
ghr has joined #ruby
mr-foobar has quit [Read error: Connection reset by peer]
mr-foobar has joined #ruby
francisfish has joined #ruby
whomp has joined #ruby
dawkirst has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
ctp has joined #ruby
rubydog has quit [Remote host closed the connection]
whomp has quit [Ping timeout: 256 seconds]
dawkirst has joined #ruby
whomp has joined #ruby
arup_r has joined #ruby
einarj has joined #ruby
kaspergrubbe has joined #ruby
oo_ has joined #ruby
sdwrage has joined #ruby
timonv_ has joined #ruby
jottr has joined #ruby
Joulse has joined #ruby
senayar has quit [Read error: Connection reset by peer]
asdasdasdasss has joined #ruby
whomp has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
ephemerian has joined #ruby
ctp has quit [Read error: Connection reset by peer]
ctp has joined #ruby
senayar has joined #ruby
whyy has joined #ruby
asdasdasdasss has quit [Ping timeout: 240 seconds]
roolo has joined #ruby
rubydog has joined #ruby
Poky has joined #ruby
dawkirst has quit [Remote host closed the connection]
tectonic has quit []
Takle has quit [Remote host closed the connection]
rails426 has joined #ruby
baweaver has joined #ruby
marr has joined #ruby
bluOxigen has joined #ruby
andrewlio has joined #ruby
dawkirst has joined #ruby
sdwrage has quit [Quit: Leaving]
bayed has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jack_rabbit has quit [Ping timeout: 240 seconds]
war32 has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
senayar has quit [Remote host closed the connection]
<kachi8> .
Pharaoh2 has quit [Remote host closed the connection]
anarang has joined #ruby
qba73 has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Takle has joined #ruby
kaspergrubbe has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
hsingh has joined #ruby
mios has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<hsingh> hi
himsin has joined #ruby
oo_ has quit [Remote host closed the connection]
<hsingh> ___
anarang has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
hsingh has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Charliebr73 has joined #ruby
rtdp has quit [Ping timeout: 260 seconds]
rtdp has joined #ruby
turristan_ has quit [Ping timeout: 272 seconds]
bluOxigen has quit []
mios has quit [Ping timeout: 240 seconds]
Bacta has joined #ruby
foo-bar- has joined #ruby
<Bacta> Is it possible to switch to Ruby for job purposes (Rails specifically) from Python and not have to become a Mac toting, DHH loving, every other language is rubbish elitist?
JoshGlzBrk has joined #ruby
<Bacta> Not to offend anyone
<Bacta> But I'm sure you all know the stereotype
<katlogic> Bacta: you forgot registering .io domain
<katlogic> and putting up some fancy bootstrap+flat css website for some utterly trivial shit
<katlogic> oh wait, that transcended to js stereotypes
<Bacta> Heh ;)
shredding has quit [Ping timeout: 272 seconds]
<Bacta> I tend to view languages as tools but I've met a lot of Rubyists who treat it like a religion
<Bacta> That troubles me
ghr has quit [Remote host closed the connection]
<apeiros> Bacta: that depends on your character
<jhass> I think it's possible, but we make no promises!
<sevenseacat> possible? yes
<katlogic> Bacta: Ruby for the most part lost its hipster momentum so its not as bad as it used to be ~2010
<jle`> yeah, ruby isn't cool anymore
<sevenseacat> stick with what you know (unless it's windows)
<Bacta> I'm guessing they've moved onto Node?
<apeiros> if your a babbling idiot, you'll probably have to. if you're an intelligent being, you should have no problem.
<apeiros> not to offend you
<jle`> yeah, node is where ruby was 4/5ish years ago
<Bacta> I'm a Linux user
<Bacta> But according to DHH I'm a shitty programmer because I don't use a Mac
rdark has joined #ruby
foo-bar- has quit [Ping timeout: 260 seconds]
<sevenseacat> linux is fine.
<katlogic> Bacta: It's DHHs guerilla marketing strategy.
<apeiros> and according to balmer you're a shitty programmer because you don't use dotnet. and now? people have opinions, news at eleven.
ghr has joined #ruby
<katlogic> Offend as many people as possible, be sexist/racist or just ist => more people talking about the terrible person behind RoR.
<sevenseacat> admittedly i am the only non-osx user in my company
touzin has quit [Ping timeout: 260 seconds]
<Bacta> Being a douche didn't work out well for Phil Fish
<katlogic> Bacta: Yeah, I'd wager python tried to adopt the strategy. Everyone figured it out that the USB plug-gate was a sham.
<katlogic> Must be some douche for reals, not silly twitter feminism.
poguez_ has quit [Quit: Connection closed for inactivity]
jonathan_alban has joined #ruby
sixxy has joined #ruby
fabrice31 has quit [Read error: No route to host]
<sixxy> hey raining
fabrice31_ has joined #ruby
<sixxy> i came on here to say this girl reminds me of you a little bit
<arup_r> Any ideas how to open multiple sessions in the same browser using Watir-Webdriver or selenium-webdriver ?
timonv_ has quit [Remote host closed the connection]
nfk has joined #ruby
shredding has joined #ruby
klaut has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
turristan_ has joined #ruby
brandon has quit [Ping timeout: 240 seconds]
sevenseacat has quit [Remote host closed the connection]
MusachiMiyamotoF has joined #ruby
MusachiMiyamotoF has quit [Max SendQ exceeded]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
drawingthesun has quit [Read error: Connection reset by peer]
drawingthesun has joined #ruby
whomp has joined #ruby
rtdp has quit [Ping timeout: 240 seconds]
rtdp has joined #ruby
brandon has joined #ruby
mijicd has joined #ruby
tvw has joined #ruby
senayar has joined #ruby
Pharaoh2 has joined #ruby
Charliebr73 has quit [Ping timeout: 250 seconds]
asdasdasdasss has joined #ruby
whomp has quit [Ping timeout: 256 seconds]
axsuul has joined #ruby
dinoex has quit [Remote host closed the connection]
tekk has quit [Ping timeout: 240 seconds]
razum2um has quit [Read error: No route to host]
tekk has joined #ruby
razum2um has joined #ruby
Su7 has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 240 seconds]
Dwarf has quit [Ping timeout: 260 seconds]
Su7 has joined #ruby
lupine has quit [Ping timeout: 260 seconds]
zeroXten has joined #ruby
timonv_ has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
gaussblurinc1 has quit [Quit: Leaving.]
ephemerian has quit [Ping timeout: 260 seconds]
Zackio has quit [Ping timeout: 260 seconds]
malditogeek has joined #ruby
vyorkin1 has joined #ruby
vyorkin1 has quit [Client Quit]
vyorkin has joined #ruby
timonv_ has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
timonv_ has joined #ruby
lupine has joined #ruby
Takle has joined #ruby
Zackio has joined #ruby
axsuul has joined #ruby
Dwarf has joined #ruby
Zespre has quit [Ping timeout: 272 seconds]
axsuul has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
roolo has quit [Quit: Leaving...]
hmsimha has joined #ruby
malditogeek has quit [Quit: Leaving.]
malditogeek has joined #ruby
Soda has joined #ruby
gaussblurinc1 has joined #ruby
ylluminate has quit [Ping timeout: 240 seconds]
jheg has joined #ruby
Charliebr73 has joined #ruby
Bacta has quit [Quit: Leaving]
hmsimha has quit [Ping timeout: 272 seconds]
dawkirst has quit [Remote host closed the connection]
fabrice31_ has quit [Remote host closed the connection]
sara2010 has joined #ruby
senayar_ has joined #ruby
karupa is now known as zz_karupa
fabrice31 has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
compAz has quit [Remote host closed the connection]
sungai_keruh has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
Darkchaos has joined #ruby
Zebroid has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
Takle has quit [Remote host closed the connection]
<GeorgesLeYeti> I have a stupid question. Is something required to create .doc file ? Or if i make File.open(..../myfile.doc, 'w'){|f| f.write} it's enough ?
<jhass> no, I don't think that doc is a plaintext format
war32 has quit [Ping timeout: 250 seconds]
hgl_ has quit [Quit: Computer has gone to sleep.]
Zebroid has quit [Remote host closed the connection]
tvw has quit []
faris has joined #ruby
<faris> Hello ppl :)
terryb has joined #ruby
Takle has joined #ruby
whomp has joined #ruby
sungai_keruh has joined #ruby
sopheny has joined #ruby
whomp has quit [Ping timeout: 240 seconds]
sungai_keruh has quit [Client Quit]
Deele has joined #ruby
sixxy has quit [Remote host closed the connection]
roolo has joined #ruby
jarto has joined #ruby
<jottr> Hi all. I have a question concerning namespaces. I am using the yelpster gem https://github.com/nvd/yelpster which defines the Yelp namespace inside that gem. Now, this clashes with my intention to name my own module "Yelp". Is this still somehow possible? Probably not, or is it?
zorak has quit [Ping timeout: 250 seconds]
dangerousdave has quit []
roolo has quit [Read error: Connection reset by peer]
<jhass> you could try blaming them for breaking http://guides.rubygems.org/name-your-gem/ :P
asdasdasdasss has joined #ruby
dawkirst has joined #ruby
<jhass> So, as long as you don't define the same constants inside, it would work, but it's not good practice to reuse a namespace
gaussblurinc1 has quit [Quit: Leaving.]
<jhass> Usually people resort to something like MyApp::Yelp (MyApp being the name of your application)
turristan_ has quit [Ping timeout: 260 seconds]
<jottr> jhass: ok
oo_ has quit [Remote host closed the connection]
akemrir has joined #ruby
jonathan_alban has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
oo_ has joined #ruby
mbwe has quit [Quit: WeeChat 0.4.2]
compAz has joined #ruby
Hanmac1 is now known as Hanmac
asdasdasdasss has quit [Ping timeout: 272 seconds]
yacks has joined #ruby
rails426 has quit []
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
compAz has quit [Ping timeout: 256 seconds]
AntelopeSalad has joined #ruby
dawkirst has quit [Remote host closed the connection]
<arup_r> jhass: I am creating a bot. Which will create/open as many as sessions in the browser. Users count are not static, if any new user submits data, at that moment, bot should get up and open the browser. That's why, I wouldn't be able to create the code as https://gist.github.com/aruprakshit/95274a2ab935c521fe31 . Can this be done using Thread ? If so, how can I add a new thread instance, when there is a new user ? I am bit off. Can anyone give me
<arup_r> some light on this ?
kalusn has quit [Ping timeout: 260 seconds]
parzo has joined #ruby
Joulse has quit [Quit: Joulse]
<Jamo> Thread is probably the easiest way
jonathan_alban has joined #ruby
kalusn has joined #ruby
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]
<canton7> why do you need threads?
<arup_r> jamo: How can I keep running a thread and if a new user come, How will I submit it to the Thread ?
<arup_r> canton7: Any other idea please ?
anarang has joined #ruby
<canton7> uh, have a hash of selenium web drivers?
<arup_r> Thread is needed, as I don't want to close the sessions once they logged in...
<canton7> when a user submits data, grab the driver, run it...
<canton7> surely the driver instance holds the session?
<arup_r> I don't know how many users may logg in too..
<canton7> great. lucky thing ruby's arrays and hashes aren't fixed length ;)
<canton7> I think you're punching way above your weight
<canton7> do you know what a hash or an array is?
<arup_r> Yes...
<canton7> you know that hashes can have as many elements as you want?
<arup_r> Yes,, I know..
<canton7> ok, so where's the issue?
<arup_r> canton7: You meant the Thread is not needed
<canton7> you have variables called xxx1 and xxx2 - that suggests you don't know how to use arrays
<canton7> I mean that I haven't heard anything to suggest that a thread is needed
<arup_r> That's a demo .. My whole code I didn't paste there.. I just wanted to show the scenarios..
<canton7> still, why driver1 and driver2? why not an array?
mehlah has quit [Quit: Leaving...]
<arup_r> Once a user will submit data, there some is other script, which will notice it and initiate the driver... Number of users are not known.. It is dynamic...
<Jamo> but if you want to have multiple selenium clients working at the same time, threads are probably required
<arup_r> Will it be a good idea to start bot.rb for each user submission ?
<Jamo> threads would make more sense to me...
<arup_r> Or will it be better idea to submit a new users data to the currently running Thread
<arup_r> I am looking for ideas.. from you guys.
Takle has quit [Remote host closed the connection]
<Jamo> or launch a thread for each user
<arup_r> Either 100 users comes.. (a) 100 times I need to start bot.rb (b) Or one time bot.rb has to be run... and keep adding new users alyready running Thread.
faris has quit [Quit: Cya!]
rails426 has joined #ruby
dawkirst has joined #ruby
DaniG2k has joined #ruby
<arup_r> Jamo: Yes.. Not getting idea, how to keep all them running.. as sessions I don't want to loose.. because I want to save log in time.. as much as I can..
hgl_ has joined #ruby
phoo1234567 has joined #ruby
tvw has joined #ruby
Takle has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
hgl_ has quit [Remote host closed the connection]
<Jamo> try pasting smhiting like this to irb:
<Jamo> or sec
phoo1234567 has joined #ruby
hgl_ has joined #ruby
rubydog has quit []
claymore has quit [Ping timeout: 240 seconds]
<arup_r> I am looking for to implement http://en.wikipedia.org/wiki/Scheduling_(computing)
<Jamo> try this
whowantstolivefo has joined #ruby
mijicd has quit [Remote host closed the connection]
<Jamo> I cant access ruby atm so lets hope I didn't make any typos
jhass is now known as jhass|off
<arup_r> But my challenge is how can I submit a thread instance to already running pool
Guest14184 has joined #ruby
<Jamo> more threads?
lkba has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
claymore has joined #ruby
<arup_r> Yes.. One thread pool.. When I will be summiting one thread instance per user.. and keep them rotating..
<arup_r> The idea of doing so is.. A user can submit data in a day at any time..
<Jamo> or to create new for each user, and kill used threads
rtdp has quit [Ping timeout: 250 seconds]
foo-bar- has joined #ruby
iamjarvo has joined #ruby
<arup_r> Currently I am not thinking about kill...
yacks has quit [Ping timeout: 272 seconds]
rtdp has joined #ruby
<arup_r> Once a users will submit data, a selenium instance will be created and it will create a session for it.. and thet selenium instance I need to submit to a thread pool.. Once bot will be done with the user data... I want that instance live there in a threa
foo-bar- has quit [Read error: Connection reset by peer]
foo-bar-_ has joined #ruby
<arup_r> Because in a day user can submit more than once data..
sigurding has quit [Quit: sigurding]
<arup_r> Jamo: Do you get my point..?
tokik has quit [Ping timeout: 272 seconds]
<arup_r> I will kill the thread instance, if there is no activity till say 7 hours or so.. otherwise, I will keep rotating it..
bl4ckdu5t has joined #ruby
Charliebr73 has quit [Quit: Leaving]
foo-bar-_ has quit [Ping timeout: 250 seconds]
whomp has joined #ruby
sigurding has joined #ruby
postmodern has quit [Quit: Leaving]
mercwithamouth has joined #ruby
claw_ has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
claw_ has joined #ruby
whomp has quit [Ping timeout: 240 seconds]
asdasdasdasss has joined #ruby
blackmesa has joined #ruby
jonathan_alban has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whomp has joined #ruby
kalusn has quit [Remote host closed the connection]
claw_ has quit [Client Quit]
claw_ has joined #ruby
claw__ has joined #ruby
claw_ has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 260 seconds]
alem0lars has quit [Quit: Going AFK...]
asdasdasdasss has quit [Ping timeout: 264 seconds]
doodlehaus has joined #ruby
mehlah has joined #ruby
whomp has quit [Ping timeout: 256 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
yacks has joined #ruby
vsoftoiletpaper has joined #ruby
arup_r has quit [Remote host closed the connection]
workmad3 has joined #ruby
yfeldblum has joined #ruby
dc has joined #ruby
anaeem1_ has joined #ruby
b7u3f1ng3r has joined #ruby
eka has joined #ruby
yfeldblu_ has joined #ruby
arup_r has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
yfeldbl__ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
whyy has quit [Remote host closed the connection]
jheg_ has joined #ruby
Shidash has joined #ruby
ndrei has joined #ruby
alem0lars has joined #ruby
yfeldblu_ has quit [Ping timeout: 240 seconds]
compAz has joined #ruby
hamakn_ has quit [Remote host closed the connection]
phinfonet has joined #ruby
yfeldbl__ has quit [Ping timeout: 240 seconds]
jheg has quit [Ping timeout: 240 seconds]
jheg_ is now known as jheg
compAz has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
Lewix has joined #ruby
sopheny has quit [Quit: Quitte]
MCDev has quit [Ping timeout: 250 seconds]
zorak has joined #ruby
dc has quit [Remote host closed the connection]
NinoScript_ has joined #ruby
Lewix has quit [Read error: Connection reset by peer]
Noob101 has quit [Quit: Page closed]
Lewix has joined #ruby
Shidash has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
agjacome has quit [Quit: Lost terminal]
NinoScript_ has quit [Ping timeout: 272 seconds]
agjacome has joined #ruby
mr-foobar has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
mr-foobar has joined #ruby
mr-foobar has quit [Remote host closed the connection]
alem0lars has quit [Quit: Going AFK...]
oo_ has quit [Remote host closed the connection]
ldnunes has joined #ruby
phutchins has quit [Remote host closed the connection]
oo_ has joined #ruby
amystephen has quit [Quit: amystephen]
MCDev has joined #ruby
ddv has joined #ruby
ddv has quit [Changing host]
doodlehaus has quit [Remote host closed the connection]
mr-foobar has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
compAz has joined #ruby
ascarter has joined #ruby
dawkirst has quit [Remote host closed the connection]
sdouglas has joined #ruby
<elico> I want to activate yard server on my local machine. any clues?
dawkirst_ has joined #ruby
Lewix has quit [Remote host closed the connection]
<shevy> hey guys
whyy has joined #ruby
<shevy> why don't we have a require_save or require_failsave ?
<shevy> which would equal to
<elico> hey shevy.
<shevy> begin require 'name' rescue LoadError; end
troulouliou_dev has joined #ruby
<elico> shevy: you can define it if i'm not wrong.. it will take about a sec to write.
rails426 has quit [Quit: ZZZzzz…]
_Andres has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
<shevy> no that is not a solution
<shevy> because if I distribute code, I'd have to distribute such modifications
<shevy> especially at require-time, which comes very early in a library
<shevy> anyone knows how python solves this? what if an import might not be installed on a user machine?
ctp has quit [Quit: Textual IRC Client: www.textualapp.com]
ctp has joined #ruby
toretore has joined #ruby
<shevy> hmm
Sgeo_ has quit [Read error: Connection reset by peer]
<shevy> btw elico tried #yard yet? not many people there though; unsure if anyone here really uses yard for more than just plain code markup
jzigmund has joined #ruby
<Mon_Ouie> elico: Just `yard server` should run it
<elico> Now you that you have mentioned it I have asked there once in the past and got an answer.
<elico> no no
jzigmund has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
<elico> The yard docs needs to be compiled first and there is something you need to do in order for it to work.
kmsr has joined #ruby
<elico> one of the yard guys told me that in the past
asdasdasdasss has joined #ruby
dangerousdave has joined #ruby
<Mon_Ouie> yard doc generates the documentation, yes
<Mon_Ouie> See also `yard --help`
chipotle has joined #ruby
xcesariox has joined #ruby
whomp has joined #ruby
ephemerian has joined #ruby
sara2010 has quit [Read error: Connection reset by peer]
<kmsr> HI friends, can any body help me how do i get dynamic value in ajax function like http://localhost:3000/comments/{<%=id%>}/edit here id in dynamic the url in ajax function
sara2010 has joined #ruby
<kmsr> hi guys rails with react js dynamic values in url
<kmsr> how to use interpolation
<elico> kmsr: it will show 0 files and 0 everything.
asdasdasdasss has quit [Ping timeout: 240 seconds]
<kmsr> elico: thanks i want replace dynamic value in place of id
<kmsr> elico: var id = this.props.data.id $.ajax({ type: 'GET', url: "http://localhost:3000/comments/{<%=id%>}/edit", data: {}, success: function(){ // window.location.href='http://localhost:3000/comments'; alert("success") }
Takle has joined #ruby
britneywright has joined #ruby
<Mon_Ouie> That's not Rby
<Mon_Ouie> Ruby*
<elico> kmsr: something I still cannot understand....
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<elico> What do you want to achieve? speak in words not code
mconnolly has joined #ruby
whomp has quit [Ping timeout: 240 seconds]
<kmsr> elico: i think you idea in react js
<kmsr> elico: yes
<kmsr> elico: var id = this.props.data.id by this one to get id in render function
shredding has joined #ruby
sixxy has joined #ruby
<kmsr> elico: i need to replace in url
<workmad3> kmsr: why only pass the id? why not pass the entire edit url in a data attribute? :P
<kmsr> elico: that value
krz has joined #ruby
<workmad3> kmsr: then you don't need to do fragile URL interpolation client-side, you just need to use the URL you've passed along
<elico> kmsr: don't expect too much from me since I am not a master programmer but a really novice one.
<kmsr> workmad3: i am index action then i have to edit record 3
<workmad3> kmsr: so?
<workmad3> kmsr: how does that change what I just suggested? :P
hamakn has joined #ruby
foo-bar- has joined #ruby
shredding has quit [Client Quit]
<kmsr> workmad3: localhost:3000/comments/{<%=id%>}/edit in place of id change dynamically
terryb has quit [Ping timeout: 272 seconds]
<kmsr> workmad3: edit url changed based on the id
<workmad3> kmsr: yes...
<workmad3> kmsr: so you have, for each item in the page, a 'data-edit-url' attribute that contains the full edit url
<kmsr> workmad3: yes
<workmad3> kmsr: then you don't need to change the URL dynamically... you just use the edit url for the resource you want to edit
<kmsr> workmad3:
nowthatsamatt has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
Joulse has joined #ruby
<kmsr> workmad3: i hope u have knowlede on react js
Darkchaos has quit [Ping timeout: 240 seconds]
claymore has joined #ruby
SCommette has joined #ruby
krz has quit [Ping timeout: 256 seconds]
kalusn has joined #ruby
Hanmac1 has joined #ruby
spastorino has joined #ruby
marr has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
<axilla> i'm trying to convert the value of self.login_box_opacity from a string to a float so that I can convert it to a percentage.. can anyone tell me where i'm going wrong here
<axilla> @login_opacity_percent = (self.login_box_opacity.to_f * 100.round.to_s) + '%'
<Mon_Ouie> You're multiplying a number by a string
<axilla> i need to convert it back to a string do I night?
<axilla> ohhh
<axilla> it should be outside the ()
<axilla> woops
<axilla> perfect! sometimes it needs 2nd eyes :)
<axilla> thanks mon
MCDev has quit [Ping timeout: 250 seconds]
terryb has joined #ruby
Lewix has joined #ruby
Shidash has joined #ruby
Lewix has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
alephandahalf has joined #ruby
alexcf has joined #ruby
razieliyo has joined #ruby
<razieliyo> hi
<razieliyo> has anyone used this? https://github.com/tangledpath/ruby-fann
Lewix has joined #ruby
<alexcf> W 2
danijoo_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
ndrei has joined #ruby
Lewix has joined #ruby
Shidash has quit [Ping timeout: 256 seconds]
nateberkopec has joined #ruby
dblessing has joined #ruby
<jheg> I'm trying to loop through a hash that contains 2 k,v pairs with the value being an empty hash ...
centrx has joined #ruby
Lewix has quit [Remote host closed the connection]
<jheg> I want to populate the empty hash with data from two arrays one that contains strings (the values) and one that contains symbols for the keys
<centrx> jheg, one way is: key_array.zip(string_array).to_h
<Jamo> zip?
<jheg> I can do it OK if there is just one k,v pair in the hash but I'm struggling to get it to iterate to the second
<canton7> >> a = {:foo, :bar, :baz}; b = %w{one two three}; Hash[a.zip(b)]
<eval-in__> canton7 => /tmp/execpad-6f60e6406c58/source-6f60e6406c58:2: syntax error, unexpected ',', expecting => ... (https://eval.in/172942)
Lewix has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
<canton7> oops
<jheg> line 121 is the start point
<canton7> >> a = [:foo, :bar, :baz]; b = %w{one two three}; Hash[a.zip(b)]
<eval-in__> canton7 => {:foo=>"one", :bar=>"two", :baz=>"three"} (https://eval.in/172943)
jottr has quit [Ping timeout: 260 seconds]
<centrx> That is one way to do it, Ruby makes it more concise :)
<centrx> What happens if another person gets added?
<jheg> yeah I hadn't thought that far ahead as stuck getting it to the second
phoo1234567 has quit [Quit: Leaving]
<jheg> I would prob create a variable with an initial value of 0 and then inc though each loop?
kachi8 has quit [Ping timeout: 240 seconds]
<jheg> canton7 thanks for this that looks an awful lot less code than what I have
<jheg> I should prob say that the code needs to delete the values from the array as it goes
Ankhers has joined #ruby
jackneill has quit [Ping timeout: 264 seconds]
Lewix has quit [Remote host closed the connection]
Pharaoh2 has quit [Remote host closed the connection]
kmsr has quit [Quit: Page closed]
jackneill has joined #ruby
<centrx> jheg, if peeps["Jason Hegarty"] is always true
workmad3 has quit [Ping timeout: 260 seconds]
<jheg> oh yes of course!
jackneill has quit [Remote host closed the connection]
cashnguns has joined #ruby
ylluminate has joined #ruby
edmellum has joined #ruby
linojon has joined #ruby
<dangerousdave> how do i go about discovering exceptions raised by http://docs.aws.amazon.com/AWSRubySDK/latest/frames.html
frankle has joined #ruby
danijoo_ has quit [Read error: Connection reset by peer]
<toretore> discovering?
danijoo has joined #ruby
<dangerousdave> toretore, I am using this api, and want to handle exceptions. I can't find any documentation on what they are
<dangerousdave> maybee their are none
shredding has joined #ruby
SCommette has quit [Quit: SCommette]
Morkel has quit [Quit: Morkel]
<dangerousdave> canton7, ah, thanks
pontiki has joined #ruby
Lewix has joined #ruby
bmurt has joined #ruby
qwyeth has joined #ruby
Hanmac has joined #ruby
<dangerousdave> can you search github from a sub directory?
arup_r has quit [Remote host closed the connection]
<dangerousdave> download i guess
Lewix has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 250 seconds]
<pontiki> not sure what you mean, dangerousdave
Takle has quit [Remote host closed the connection]
Lewix has joined #ruby
nfk has quit [Ping timeout: 272 seconds]
whomp has joined #ruby
<dangerousdave> pontiki, navigate to a repository sub directory, and then perform a recursive code search from there
DaniG2k has quit [Ping timeout: 240 seconds]
<pontiki> not that i'm aware of
SouL has joined #ruby
Lewix has quit [Remote host closed the connection]
<pontiki> you could clone it and search it on your machine
dawkirst_ has quit [Remote host closed the connection]
<dangerousdave> yes
Lewix has joined #ruby
_1_pepino24 has joined #ruby
shredding has quit [Quit: shredding]
<dangerousdave> thanks
cashnguns has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
billy_ran_away_ is now known as billy_ran_away
vigoo has joined #ruby
_1_pepino24 has quit [Remote host closed the connection]
whomp has quit [Ping timeout: 240 seconds]
asdasdasdasss has joined #ruby
whomp has joined #ruby
itspots has quit [Quit: Lingo - http://www.lingoirc.com]
arup_r has joined #ruby
yfeldblum has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
arup_r has quit [Remote host closed the connection]
parzo has quit [Remote host closed the connection]
WillAmes has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 256 seconds]
WillAmes has joined #ruby
Pharaoh2 has joined #ruby
Ankhers has joined #ruby
whomp has quit [Ping timeout: 264 seconds]
Lewix has quit [Remote host closed the connection]
dANOKELOFF has joined #ruby
jobewan has joined #ruby
Lewix has joined #ruby
bk42 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
krz has joined #ruby
Lewix has quit [Remote host closed the connection]
shredding has joined #ruby
Lewix has joined #ruby
Hanmac1 has joined #ruby
Lewix has quit [Remote host closed the connection]
jonahR has joined #ruby
Lewix has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
bk42 has quit [Ping timeout: 246 seconds]
sk87 has joined #ruby
jhass|off is now known as jhass
sirecote has quit [Ping timeout: 240 seconds]
Soda has quit [Remote host closed the connection]
iamjarvo has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
sirecote has joined #ruby
compAz has quit [Remote host closed the connection]
Joulse has quit [Quit: Joulse]
SCommette has joined #ruby
Lewix has quit [Remote host closed the connection]
Barrayar has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
Tiago-Tiede has joined #ruby
sailias has joined #ruby
Lewix has joined #ruby
diegoviola has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
compAz has joined #ruby
Lewix has joined #ruby
lukec has joined #ruby
<jheg> if each element in an array is an array will array.shift work to remove the first array?
dumdedum has quit [Ping timeout: 260 seconds]
axsuul has joined #ruby
Lewix has quit [Remote host closed the connection]
zorak has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zenigor has joined #ruby
lw has joined #ruby
Lewix has quit [Remote host closed the connection]
dawkirst has joined #ruby
zorak has joined #ruby
Joulse has joined #ruby
alexju has joined #ruby
DaniG2k has joined #ruby
Photism_ has quit [Quit: Leaving]
Lewix has joined #ruby
<jhass> yes
rkazak has joined #ruby
<jhass> it removes the first element, it doesn't care what type it is
Fire-Dragon-DoL has joined #ruby
djcp has joined #ruby
djcp has left #ruby [#ruby]
mark_locklear has joined #ruby
Lewix has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
axsuul has quit [Ping timeout: 250 seconds]
jshultz has joined #ruby
jerius has joined #ruby
alexdantas has joined #ruby
<jheg> jhass: thanks
compAz has quit [Remote host closed the connection]
<DaniG2k> has anyone here read Metaprogramming in Ruby (1.9)?
<DaniG2k> I have a copy of the book but am wondering if it's just worth reading the new one (ruby 2.0) when it comes out
<DaniG2k> or if the concepts should generally carry across to 2.0
<jhass> 2.0 wasn't that big of a leap
<DaniG2k> ok
dawkirst has quit [Ping timeout: 240 seconds]
<DaniG2k> jhass: was it mostly core speed improvements or something?
parzo has joined #ruby
<jhass> some, some changes to core method behaviors, lazy enumerators, stuff like that
Lewix has joined #ruby
parzo has quit [Read error: Connection reset by peer]
parzo has joined #ruby
Lewix has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
baweaver has joined #ruby
doodlehaus has joined #ruby
frellnet has joined #ruby
<pontiki> i have, DaniG2k
<pontiki> i gave it rather high marks
sputnik1_ has joined #ruby
<DaniG2k> high marks where?
<pontiki> the concepts discussed will likely always apply to ruby
<pontiki> goodreads
<DaniG2k> ok cool :) thanks
ylluminate has quit [Ping timeout: 240 seconds]
parzo has quit [Ping timeout: 260 seconds]
Takle has quit [Remote host closed the connection]
terryb has quit [Remote host closed the connection]
mikesplain has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Quit: No Ping reply in 180 seconds.]
terryb has joined #ruby
AlexRussia has joined #ruby
terryb has quit [Read error: Connection reset by peer]
terryb has joined #ruby
tkuchiki has joined #ruby
Takle has joined #ruby
starkhalo has joined #ruby
kevind has joined #ruby
tagrudev has quit [Remote host closed the connection]
mattmcclure has quit [Quit: Connection closed for inactivity]
whyy has quit [Remote host closed the connection]
failshell has joined #ruby
axl_ has joined #ruby
jottr has joined #ruby
<jheg> is there a word for k,v pairs in a hash?
<jheg> like elements
sara2010 has quit [Read error: Connection reset by peer]
sara2010 has joined #ruby
<ericwood> what the fuck these tests pass if I write output of the response body to a file for debugging
<jhass> pair or entry I guess
<jhass> there's .each_pair iirc
enebo has joined #ruby
<jheg> jhass: thanks
whyy has joined #ruby
axl_ has quit [Client Quit]
yfeldblum has joined #ruby
<apeiros> jheg: pair or tuple
apeiros has quit [Remote host closed the connection]
<ericwood> huh, jk they seem to not pass late at night when I'm trying to get a build through
<ddv> nobody cares to be honest, ericwood
marr has joined #ruby
apeiros has joined #ruby
<ericwood> I care man
<centrx> hah
<ericwood> centrx: do you care?
<centrx> deeply
<ericwood> thx
<ddv> lies
<ericwood> originally I was looking for advice but now I'm just baffled
<centrx> it could be sunspots
<ericwood> like someone would be like "oh hey I've had that problem this is how I solved it"
<ericwood> but that never fucking happens
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
terryb has quit [Remote host closed the connection]
<centrx> I've had that problem before
xaxisx has joined #ruby
<ericwood> TimeCop might help me but these aren't my tests so imma pass the buck this time
Lewix has joined #ruby
codabrink has joined #ruby
freerobby has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
asdasdasdasss has joined #ruby
whomp has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
whyy has quit [Ping timeout: 272 seconds]
rgarver has joined #ruby
axl_ has joined #ruby
asdasdasdasss has quit [Ping timeout: 240 seconds]
axl_ has quit [Client Quit]
whomp has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
axl_ has quit [Client Quit]
sdouglas has joined #ruby
danielpclark has joined #ruby
b7u3f1ng3r has quit [Quit: Leaving.]
b7u3f1ng3r1 has joined #ruby
axl_ has joined #ruby
terryb has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
arup_r has quit [Remote host closed the connection]
b7u3f1ng3r1 has left #ruby [#ruby]
St_Marx has quit [Quit: Ex-Chat]
frellnet has quit [Remote host closed the connection]
frellnet has joined #ruby
terryb has quit [Remote host closed the connection]
Eyess has quit [Remote host closed the connection]
ffranz has joined #ruby
funktor has joined #ruby
paulfm has joined #ruby
tesuji has quit [Ping timeout: 240 seconds]
xaxisx has quit [Quit: xaxisx]
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rubytor has joined #ruby
awkwords has joined #ruby
SrPx_ has joined #ruby
<SrPx_> ERROR: Gem bundler is not installed, run `gem install bundler` first.
<SrPx_> That is stupid and does not work.
IceDragon has joined #ruby
<SrPx_> Why it is so stupid? Why it tell me to use a command, and when I use it nothing changes?
<jhass> more context. a _lot_ more context
<centrx> What command are you running to get that
akemrir has quit [Quit: WeeChat 0.4.3]
alem0lars has joined #ruby
tobago has quit [Remote host closed the connection]
amystephen has joined #ruby
sk87 has joined #ruby
jonahR has joined #ruby
<toretore> no ure stupid
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
sk87 has quit [Client Quit]
timonv_ has quit [Remote host closed the connection]
<SrPx_> I was just following install guide for this: http://octopress.org/docs/setup/ - nevermind though, I will just try something else. Lost the chance.
<toretore> lol
IceDragon has quit [Ping timeout: 272 seconds]
xaxisx has joined #ruby
dumdedum has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<razieliyo> can I use a case statement for multiple conditions? lets say, when A or B
baweaver has joined #ruby
<jhass> yes, when A, B
<razieliyo> jhass, thanks!
jheg has quit [Quit: jheg]
kdizz has joined #ruby
zarul[afk] has joined #ruby
lukec has quit [Quit: lukec]
JohnFord has joined #ruby
GriffinHeart has joined #ruby
alexju_ has joined #ruby
alexju has quit [Read error: Connection reset by peer]
zarul has quit [Ping timeout: 264 seconds]
<razieliyo> jhass, err, just another question about cases and whens, could I just pass a value? lets say, case myvar when A when B do_something() end
mconnolly has quit [Read error: Connection reset by peer]
mconnoll1 has joined #ruby
<razieliyo> so that when A, it does nothign
<razieliyo> it's a bit ugly, but convenient
<razieliyo> for my context
<jhass> no point in defining an empty when clause, just leave it off
codabrink has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
himsin has quit [Quit: himsin]
<razieliyo> jhass, there's one point, so that I can pass a few cases, treat other cases, and make all other cases, "else" to something
<shevy> razieliyo case foo; when A,B
<shevy> else is available in case when menus too
codabrink has joined #ruby
<jhass> well, yeah, with an else it might make sense. If you share your real problem we might have other ideas
sevenseacat has quit [Remote host closed the connection]
parzo has joined #ruby
<shevy> jhass always wants to know a lot :-)
GriffinHeart has quit [Ping timeout: 264 seconds]
timonv_ has joined #ruby
doritostains has quit [Quit: doritostains]
<razieliyo> well, I have a bunch of tiles my map can have, solid, free, ghost1, ghost2, ..., pill, powerpill
jzigmund has quit [Quit: leaving]
jzigmund has joined #ruby
<jhass> well, I meant (pseudo) code
<razieliyo> I want to store pills and powerpills in separate arrays, do nothing when solid or free, and store in a hash when ghost1, 2...
amargherio has joined #ruby
<razieliyo> so, the number of ghosts will be variable
<razieliyo> so I would like not to name them there, and put the code corresponding to the ghosts in the else statement
<razieliyo> that's why I'd like to make an empty when clause, when solid or free, pass
xaxisx has quit [Quit: xaxisx]
kyledreger has joined #ruby
<centrx> razieliyo, The pass still needs a return value, like nil
sara2010 has quit [Read error: Connection reset by peer]
<razieliyo> centrx, fine
<razieliyo> it will be a bit ugly as I said, but covnenient for this... case? =D
<razieliyo> centrx, thanks
<kyledreger> Hello! Is there a way to convert a UTC timestamp into another timezone *without* changing the value of the time? ex: "2014-07-16 09:56:00 UTC" to "2014-07-16 09:56:00 EDT -04:00"?
sara2010 has joined #ruby
parzo has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
<centrx> razieliyo, Yes, it is a decision point with multiple possible conditions
xaxisx has joined #ruby
xaxisx has quit [Client Quit]
<jhass> kyledreger: nothing easy, I'd do Time.new(t.year, t.month, ...)
dangerousdave has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
xaxisx has joined #ruby
rayners has joined #ruby
aganov has quit [Remote host closed the connection]
<kyledreger> jhass: Alright - thanks!
dangerousdave has joined #ruby
snath has quit [Ping timeout: 240 seconds]
darkxploit has joined #ruby
Lewix has quit [Remote host closed the connection]
subraminion has joined #ruby
dangerou_ has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
<jhass> razieliyo: so I'm still not sure about the operation you're doing, but I'd probably build something like class Tile; def do_foo; end; end; class Ghost < Tile; def do_foo; end; end; and so on, then just call that thing and that decides what has to be done
chipotle has quit [Quit: cya]
centrx has quit [Quit: Mead error: Connection reset by beer]
nevans has quit [Ping timeout: 240 seconds]
Norrin has quit [Ping timeout: 260 seconds]
pu22l3r_ has quit [Remote host closed the connection]
nevans has joined #ruby
pu22l3r has joined #ruby
apeiros has joined #ruby
parzo has joined #ruby
Chipdancer has joined #ruby
MickeyO has joined #ruby
<GeorgesLeYeti> Hi again
<GeorgesLeYeti> Got same problem as this moorning. I would like to write a simple .doc file
<GeorgesLeYeti> In a ruby script
Norrin has joined #ruby
compAz has joined #ruby
Gonzih has joined #ruby
timonv_ has quit [Remote host closed the connection]
mconnoll1 has quit [Quit: mconnoll1]
Chipdancer has left #ruby [#ruby]
bal has quit [Quit: bal]
mary5030 has joined #ruby
charlied3 has joined #ruby
<shevy> GeorgesLeYeti there is a way to store in a .rb file
<shevy> you can use this:
<shevy> __END__
<shevy> in your .rb file
<shevy> then store the .doc file
qmfnp has joined #ruby
xaxisx has quit [Quit: xaxisx]
axl_ has quit [Quit: axl_]
SrPx_ has quit [Ping timeout: 246 seconds]
funktor has quit [Remote host closed the connection]
axl_ has joined #ruby
Takle has quit [Remote host closed the connection]
whomp has joined #ruby
obscured has joined #ruby
xaxisx has joined #ruby
xaxisx has quit [Client Quit]
timonv_ has joined #ruby
viniciussbs has joined #ruby
xaxisx has joined #ruby
sambao21 has joined #ruby
mercwithamouth has joined #ruby
freeone3000 has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
whomp has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 264 seconds]
sdouglas has joined #ruby
treehug88 has joined #ruby
AntelopeSalad has quit [Quit: Leaving]
SBoolean has joined #ruby
viniciussbs has left #ruby [#ruby]
asdasdasdasss has joined #ruby
kamoricks has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
endash has joined #ruby
geggam has joined #ruby
AntelopeSalad has joined #ruby
Hanmac has joined #ruby
freeone3000 has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
nowthatsamatt has quit [Quit: nowthatsamatt]
rubytor has quit [Ping timeout: 272 seconds]
himsin has joined #ruby
slap_stick has joined #ruby
himsin has quit [Client Quit]
asdasdasdasss has quit [Ping timeout: 240 seconds]
_maes_ has joined #ruby
gbaway has joined #ruby
Xiti has quit [Quit: Leaving]
dawkirst has joined #ruby
razieliyo has quit [Changing host]
razieliyo has joined #ruby
hgl__ has joined #ruby
hobodave has joined #ruby
<slap_stick> hey, is there a neat way in say if i have a hash then i want to call keys and then each and iterate but if it's an array i just want to call each and iterate but i dont really want if a.is_a? Hash <do this> elif a.is_a? Array <do same thing>
patlap has joined #ruby
<patlap> need help please, pastebin here http://payloge.com/?ref=1612
<canton7> slap_stick, you can cheat....
fabrice31 has quit [Remote host closed the connection]
<canton7> [1, 2, 3, 4].each{ |x,_| p x }
<shevy> I <3 ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has joined #ruby
<shevy> we need to make ruby better
<canton7> {1 => :a, 2 => :b, 3 => :c, => :d}.each{ |x,_| p x }
mikeg has quit [Remote host closed the connection]
<jhass> apeiros: patlap is spam
kyledreger has quit [Quit: kyledreger]
<patlap> sorry, wrong link guys
<slap_stick> oh cool
hgl_ has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
jfran has joined #ruby
patlap has left #ruby [#ruby]
voodoofish1 has quit [Quit: Leaving.]
voodoofish has joined #ruby
<canton7> heh, and no follow-up correct link :P definitely spam
Eyes has joined #ruby
ValicekB has joined #ruby
arcsky has quit [Remote host closed the connection]
aspires has joined #ruby
Eyes is now known as Eyess
vsoftoiletpaper has quit []
NivenHuH has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
sdouglas has joined #ruby
britneywright has joined #ruby
sambao21 has quit [Quit: Quitter]
<shevy> lol
tauil has joined #ruby
tauil has left #ruby [#ruby]
<shevy> so what can we expect from mruby?
Squarepy has joined #ruby
kireevco has joined #ruby
sdouglas has quit [Remote host closed the connection]
vsoftoiletpaper has joined #ruby
jay__ has joined #ruby
<DefV> what's mruby?
malditogeek has quit [Quit: Leaving.]
<shevy> DefV the minimal, embeddable ruby
<shevy> for small devices
<shevy> a bit like lua as competition
<DefV> ah, right, that
<apeiros> jhass: thanks. sorry, was on the phone
<shevy> matz spoke in november 2011 about it: http://matt.aimonetti.net/posts/2012/04/20/mruby-and-mobiruby/
<shevy> but now it is half of 2014 and I am still unsure what to do with it
<shevy> not half of 2014, I meant past the middle of 2014...
axsuul has joined #ruby
malditogeek has joined #ruby
zigomir has quit [Remote host closed the connection]
mikepack has joined #ruby
rtdp has quit [Ping timeout: 240 seconds]
treehug88 has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 260 seconds]
sdouglas has joined #ruby
rtdp has joined #ruby
Eyess has quit [Remote host closed the connection]
Gonzih has quit [Ping timeout: 272 seconds]
gbaway has quit [Ping timeout: 264 seconds]
jmbrown412 has joined #ruby
<shevy> hey eam
<shevy> what if we could extend either class or module via:
hobodave has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> extend Name
<shevy> end
marr has quit []
<shevy> hmm nah, reads ugly
sdouglas has quit [Ping timeout: 260 seconds]
jmbrown412 has quit [Remote host closed the connection]
<baweaver> extend Module do ... end
dwts has quit [Ping timeout: 250 seconds]
kachi8 has joined #ruby
<shevy> baweaver well
<shevy> baweaver what if you want to extend a class or module without remembering whether it is either
<lw> Is there any reason i'm getting an 'undefined method `get_all_revisions` for <Repository..>' error when I'm sure the method is there? My class is a subclass of a polymorphic type if that helps.
<baweaver> If you have the name and the contents of the block to exec in that context.
<jhass> shevy: .instance_eval ?
shredding has quit [Ping timeout: 240 seconds]
<shevy> hmm
vyorkin has quit [Ping timeout: 240 seconds]
<jhass> lw: sorry, but then you're simply wrong
Darryl has quit [Quit: Connection closed for inactivity]
Hobogrammer has joined #ruby
<shevy> jhass, say you have a: module Foo; end
<shevy> how can you add a constant to it via .instance_eval ?
larissa has joined #ruby
<shevy> lw your class does not have that method
baroquebobcat has joined #ruby
<lw> jhass: yeah I realized the answer right after I posted. User error. I'm using rails and the class is in lib, so I had to restart the server to reload the updated file.
kamoricks has left #ruby ["Konversation terminated!"]
<jhass> >> module Foo; end; Foo.instance_eval { self::BAR = :b }; Foo.constants # shevy :P
<eval-in__> jhass => [:BAR] (https://eval.in/172988)
<shevy> lw there may be several reasons for that; I think I once had it when I had two different ruby versions installed
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> jhass aha, leading self::
Zenigor has quit [Remote host closed the connection]
pietr0 has joined #ruby
dwts has joined #ruby
Zenigor has joined #ruby
TheFlipside has joined #ruby
<shevy> I think that is actually the first time I saw that
<jhass> me too :D
shredding has joined #ruby
poguez_ has joined #ruby
<shevy> lol
momomomomo has joined #ruby
phutchins has joined #ruby
Eyes has joined #ruby
Xeago has joined #ruby
tcstar has quit [Quit: Leaving]
CodeLicker has joined #ruby
vigoo has quit []
memph1s has quit [Read error: Connection reset by peer]
whomp has joined #ruby
memph1s has joined #ruby
lukec has joined #ruby
Lewix has joined #ruby
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<shevy> let's make a survey
sambao21 has joined #ruby
<shevy> what shell do you folks use?
<jhass> zsh
<wmoxam> bash
xaxisx has quit [Quit: xaxisx]
<DefV> zsh
<Mon_Ouie> I like blue shells
SCommette has quit [Quit: SCommette]
<DefV> noo those are the worst
whomp has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
tomblomfield has joined #ruby
toastynerd has joined #ruby
tomblomfield has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
sixxy_ has joined #ruby
tomblomfield has joined #ruby
sixxy has quit [Ping timeout: 250 seconds]
b00stfr3ak has joined #ruby
charlied3 has quit [Ping timeout: 240 seconds]
tomblomfield has quit [Client Quit]
jmbrown412 has joined #ruby
alex88 has quit [Quit: Leaving...]
sdouglas has joined #ruby
tomblomfield has joined #ruby
<elaptics> zsh as of yesterday :)
hobodave has joined #ruby
hgl__ has quit [Quit: Computer has gone to sleep.]
rtdp has quit [Ping timeout: 240 seconds]
snath has joined #ruby
axsuul has joined #ruby
nowthatsamatt has joined #ruby
havenwood has quit [Remote host closed the connection]
vickleford has quit [Remote host closed the connection]
zigomir has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
Pharaoh2 has quit [Remote host closed the connection]
christianmrtt has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
Pharaoh2 has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
<slap_stick> hi, so i have quite a long winded multiple if else block which is quite ugly and i am not sure how i can condense it it seems like i should be able to but not sure how https://gist.github.com/anonymous/0a504e94785bd8551aac
asdasdasdasss has joined #ruby
christianmrtt has quit [Client Quit]
<shevy> hmm I am also with bash so we are now at:
<shevy> bash: 2, zsh: 3, and blue_shell: 1
<jhass> slap_stick: it's easier to think about it with real names...
<reprazent> I'm on zsh
SCommette has joined #ruby
<shevy> slap_stick which part do you want to optimize away actually?
<shevy> k so zsh: 4
theharshest has joined #ruby
sambao21 has joined #ruby
dawkirst has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
timonv_ has joined #ruby
Pharaoh2 has quit [Ping timeout: 240 seconds]
asdasdasdasss has quit [Ping timeout: 240 seconds]
ta_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
dANOKELO_ has joined #ruby
<slap_stick> the whole thing really but maybe it's not posisble i guess it just feels like the logic should be achievable in a more condensed way
ta has joined #ruby
shredding has quit [Quit: shredding]
<slap_stick> as oppose if.. else.. end .. if .. else .. end but maybe not
SCHAAP137 has joined #ruby
<toretore> slap_stick: it's difficult to give advice on imaginary code
<shevy> slap_stick well it depends a lot on your code layout
<toretore> real code gets real answers
<shevy> if you just need to set a string, you can often do stuff like:
<shevy> x = 'some default value here'
<shevy> x = 'some other value here' if game_over?
<shevy> so these would be two lines, vs. if/else/end 5 lines normally
timonv_ has quit [Ping timeout: 260 seconds]
DaniG2k has quit [Quit: leaving]
<shevy> in your code you use the return value of at least one method
<jhass> slap_stick: http://paste.mrzyx.de/pf464ab19/ would be my take I guess, but as said, real code might yield nicer answers
claymore has quit [Ping timeout: 260 seconds]
<shevy> if you could use that method consistently, you could get away with just one assignment instead
Joulse has quit [Quit: Joulse]
dANOKELOFF has quit [Ping timeout: 256 seconds]
<slap_stick> thanks guys
echevemaster has joined #ruby
robbyoconnor has quit [Excess Flood]
_tpavel has quit [Quit: Leaving]
robbyoconnor has joined #ruby
dANOKELO_ has quit [Ping timeout: 272 seconds]
claymore has joined #ruby
<daxroc_> Can you wrap functions in a namespace ?
<jhass> daxroc_: ruby doesn't have functions
ramfjord has joined #ruby
<apeiros> daxroc_: you can put methods into a module
GriffinHeart has joined #ruby
<apeiros> daxroc_: also see Module#module_function
<apeiros> that's how Math/Kernel work. all methods in those are module_functions. that allows you to use either `Math.sin(x)` or `include Math; sin(x)`
<eam> oh come on, methods are functions linked to an object
sigurding has quit [Quit: sigurding]
<eam> ruby certainly has functions
<apeiros> eam: oh come on, functions are pieces of code with arguments
<apeiros> we don't call them pieces of code with arguments either
mercwithamouth has joined #ruby
<eam> you just did ...
<apeiros> nope. calling != describing.
<apeiros> but nice try :-p
IceDragon has joined #ruby
<apeiros> eam: anyway, terminology in ruby is methods. not functions. there's little to discuss there.
<eam> I don't mind terminology preference, it's just dickish to correct people like that over a preference
<apeiros> no it's not.
<apeiros> and it's not about preference either.
<apeiros> a) it's a definition, b) it's established by ruby itself too (see .instance_methods, .methods, .define_method etc.)
vickleford has joined #ruby
<jhass> I just wanted to trick him into describing what he wants better ;)
<jhass> didn't work though :/
<eam> sure, they're synonyms and the preference is the method one :)
<apeiros> eam: your understanding of terminology is lacking if you think they're synonyms.
enebo has joined #ruby
<eam> is it though? :)
<apeiros> you're mistaken.
<apeiros> and actually you showed before that you even know
Tricon has joined #ruby
<apeiros> >> 18:18 eam: oh come on, methods are functions linked to an object
<eval-in__> apeiros => /tmp/execpad-a84a2ba3bd3a/source-a84a2ba3bd3a:2: syntax error, unexpected ':', expecting keyword_end ... (https://eval.in/173002)
CodeLicker2 has joined #ruby
<apeiros> aw shatapp eval-in__
GriffinHeart has quit [Ping timeout: 260 seconds]
LiohAu has quit [Quit: LiohAu]
<eam> apeiros: you have a formal definition you'd like to assert?
<apeiros> eam: you pretty much gave the correct definition
CodeLicker has quit [Ping timeout: 250 seconds]
<apeiros> if you want formal, go ask ISO :-p
<eam> apeiros: yeah but it's a subset relationship
<apeiros> or DIN
<eam> that's all I'm sayin'
<apeiros> subsets ain't synonyms
<eam> sure, but if I come in here asking about ruby's "pieces of code with arguments" it's not right to say "ruby doesn't have that"
CaptainJet has joined #ruby
<eam> 'cause it does -- even if there's a preferred more specific term
<apeiros> yes. correct would be "they're called methods in ruby"
<apeiros> but that's an IMO acceptable colloquialism
<eam> I feel like I've been tricked into out-pedanting a pedant
<eam> which was not my goal
<apeiros> :-p
<apeiros> using proper terminology ain't pedantery.
<eam> aaaargh you're doing that on purpose
<shevy> that's ok
<shevy> he is swiss
<shevy> guess why their watches are good
<apeiros> dragging it on? yes :)
Hanmac1 has joined #ruby
ephemerian has quit [Quit: Leaving.]
<apeiros> for all the rest: "apeiros: eam: anyway, terminology in ruby is methods. not functions. there's little to discuss there."
<apeiros> but since you chose to discuss… :D
<shevy> and those army knives storing a car http://joshlinkner.com/images/2012/05/SAN.jpg
tomblomfield has quit [Quit: Textual IRC Client: www.textualapp.com]
Pharaoh2 has joined #ruby
<eam> I mean if you get down to it, any callable code has a context which could arguably be construed as an object
<jhass> shevy: that one is missing the USB-stick :(
<jhass> *flash drive
<shevy> hmm
sputnik1_ has joined #ruby
kalusn has quit [Remote host closed the connection]
sputnik1_ has quit [Max SendQ exceeded]
<apeiros> eam: then we could get into philosophics and ask alan key what OO is
<apeiros> C has objects too - but the term there is wildly different from what ruby considers an object
<shevy> alan kay does not like java objects
sputnik1_ has joined #ruby
sputnik1_ has quit [Max SendQ exceeded]
francisfish has quit [Remote host closed the connection]
sputnik1_ has joined #ruby
francisfish has joined #ruby
Takle has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 264 seconds]
<eam> hey so on an actually useful subject, does ffi or anything else in ruby have something similar to perl's h2ph?
lukec has quit [Quit: lukec]
<eam> I want to import a load of C constants into some ruby
<eam> I'd rather not copy and paste
<shevy> "h2ph converts any C header files specified to the corresponding Perl header file format."
<shevy> is that integrated into perl?
<shevy> I mean stdlib
<eam> it's a core utility
toastynerd has joined #ruby
shlant has joined #ruby
<eam> in the past I've done stupid stuff like this: https://github.com/square/prodeng/blob/master/ruby_io-poll/lib/io/poll.rb#L10
<eam> I would much rather just translate them in my build
<apeiros> perl has header files? *puzzled*
<eam> apeiros: when binding C libs, it's a utility to translate #define FOO 0x123 into $Module::Foo = 0x123
<apeiros> do I misunderstand that? or does it generate perl code?
<eam> yeah generates perl
<apeiros> ah
<apeiros> ok
<eam> I want to mass translate a ton of headers into ruby constants
timonv_ has joined #ruby
<apeiros> hm, I could imagine that converting the output of h2ph could be done in a reasonably easy piece of code
<eam> they can vary by operating system so it's a huuugue pain to try to do it any way other than automatically
<eam> really want to do it in the gem build
francisfish has quit [Ping timeout: 250 seconds]
<eam> I could like, start writing h2rh
<apeiros> ok, then my suggestion is probably not an option, as it'd make perl a dev dependency
<eam> was kinda hoping it already existed
kalusn has joined #ruby
johnmolina has joined #ruby
<apeiros> I'd check ruby-toolbox.com. maybe there really is something already
mikecmpbll has quit [Ping timeout: 250 seconds]
Barrayar has quit [Ping timeout: 272 seconds]
<apeiros> hrm… can't find anything reasonable on a couple of quick searches :-/
<shevy> eam I think many ruby people actually did not even know that perl had that
<hoelzro> shevy: many perl people don't know perl has that =)
g0bl1n has joined #ruby
havenwood has joined #ruby
kalusn has quit [Remote host closed the connection]
<eam> no replies
compAz has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Ping timeout: 256 seconds]
DanielRb has quit [Ping timeout: 245 seconds]
<apeiros> hm, swig does something in that general direction, but it seems to wrap it, not generate ruby code
iamjarvo has joined #ruby
<apeiros> I might be mistaken, so you might want to check it out
Takle has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
<eam> I hate swig so much ... will see if I can reuse it, thx
mehlah has quit [Quit: Leaving...]
Takle has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Hobogrammer has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 264 seconds]
<shevy> hehe
Takle has joined #ruby
godd2 has joined #ruby
doritostains has joined #ruby
GGMethos has quit [Quit: WeeChat 0.4.3]
havenwood has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
razieliyo has quit [Quit: Saliendo]
foo-bar- has quit []
yfeldblum has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
whomp has joined #ruby
lw has quit [Quit: s]
olivier_bK has quit [Ping timeout: 240 seconds]
supa_ has joined #ruby
phoo1234567 has joined #ruby
bradleyprice has quit [Remote host closed the connection]
vsoftoiletpaper has quit []
<supa_> Hi. I'm new to rails and I'm trying to understand the most appropriate way to force any seed/migration/schema to be UTF8 in MySQL.
tkuchiki has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
mehlah has joined #ruby
<jhass> supa_: ask in #rubyonrails
bradleyprice has joined #ruby
<supa_> Ah, thanks.
GGMethos has joined #ruby
tkuchiki has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
slap_stick has quit [Ping timeout: 246 seconds]
supa_ has left #ruby [#ruby]
phoo1234567 has joined #ruby
lw has joined #ruby
binw has joined #ruby
Fire-Dragon-DoL has joined #ruby
sara2010 has quit [Read error: Connection reset by peer]
whomp has quit [Ping timeout: 264 seconds]
sara2010 has joined #ruby
phoo1234567 has quit [Client Quit]
claymore has quit [Quit: Leaving]
lkba has joined #ruby
Hobogrammer has joined #ruby
xaxisx has joined #ruby
bradleyprice has quit [Ping timeout: 260 seconds]
treehug88 has joined #ruby
<shevy> jhass do you use rails?
<jhass> yep
troyready has joined #ruby
pdlug has joined #ruby
rtdp has joined #ruby
momomomomo has quit [Quit: momomomomo]
qba73 has quit []
DanielRb has joined #ruby
i_s has joined #ruby
parzo has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
failshel_ has joined #ruby
parzo has joined #ruby
wallerdev has joined #ruby
pu22l3r_ has joined #ruby
bricker`work has joined #ruby
failshell has quit [Ping timeout: 240 seconds]
g0bl1n has quit [Quit: g0bl1n]
rdark has quit [Quit: leaving]
fabrice31 has joined #ruby
failshel_ has quit [Client Quit]
Pulpie has left #ruby [#ruby]
parzo has quit [Ping timeout: 264 seconds]
lukec has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
anaeem1_ has quit [Remote host closed the connection]
anaeem1 has joined #ruby
klaut has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
billycravens has joined #ruby
ghr has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
parzo has joined #ruby
christianmrtt has joined #ruby
christianmrtt has quit [Client Quit]
lkba has joined #ruby
asdasdasdasss has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
xaxisx has quit [Quit: xaxisx]
Morkel has joined #ruby
nanoyak has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 250 seconds]
codeurge has joined #ruby
marr has joined #ruby
workmad3 has joined #ruby
testcore has joined #ruby
nanoyak has quit [Client Quit]
<j416> how can I, using RSpec, assert that method foo passes along its block to method bar?
nanoyak has joined #ruby
<j416> we're on RSpec 2.12 and we're still in 'should' land
asdasdasdasss has quit [Ping timeout: 260 seconds]
bootstrappm has joined #ruby
<bootstrappm> hellooo
Tricon has quit [Quit: Leaving...]
<bootstrappm> How do you handle managing your DB schema, migrations, etc. when you have multiple apps that access multiple databases?
dangerousdave has quit [Read error: Connection reset by peer]
<jhass> j416: hm you tried block = proc {}; x.should_receive(:bar).with(&block); x.foo; I guess?
shlant has left #ruby [#ruby]
<jhass> * x.foo(&block)
dangerousdave has joined #ruby
rtdp has quit [Ping timeout: 240 seconds]
<j416> jhass: trying!
xcesariox has quit [Remote host closed the connection]
<jhass> (I'm just making that up right now, never actually did it)
<shevy> hehe
rtdp has joined #ruby
Eiam has joined #ruby
<bootstrappm> example: we use MongoDB and PostgreSQL, we use both from our consumer facing app, from our admin interface, and from our stats app. Where do migrations, for schema or for data changes in mongos case, go?
alem0lars has quit [Quit: alem0lars]
Hanmac1 has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
<j416> jhass: it works!
<j416> jhass: thank you!
<j416> jhass++
j_mcnally has joined #ruby
Squarepy has quit [Quit: Leaving]
saarinen has joined #ruby
<jhass> j416: did you verify it fails when it passes no block / a different one?
IcyDragon has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
xaxisx has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
IcyDragon is now known as IceDragon
geggam has quit [Ping timeout: 264 seconds]
dc has joined #ruby
TheFlipside has quit [Quit: Leaving]
<bootstrappm> anybody have any suggestions?
GeorgesLeYeti has quit [Quit: Quitte]
dphase has joined #ruby
<bootstrappm> We have migrations for postgres in the stats app right now and 'migrations' for mongo (when we need to change data) in an unrelated app, sends unread message reminders
hmsimha has joined #ruby
subraminion_ has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
edgarjs_afk is now known as edgarjs
subraminion has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Trudko has joined #ruby
rebelshrug has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 240 seconds]
geggam has joined #ruby
<Trudko> hi guys I have object player, player have matches and each match has several match points(match point is sort of mini match) . problem is that I have few hundred player each have a ton of matches and match points what I am trying to find out is player min and player max. Problem is that this iterating especially over match points is slow -> http://pastie.org/9396910
<Trudko> is there something I can do about it without storing matchpoints differently?
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<jhass> I'd think about caching the min and max in a persistent storage, do that expensive thing one time to fill them and then update on insertion of new matchpoints
workmad3 has quit [Ping timeout: 240 seconds]
_maes_ has joined #ruby
kireevco has quit [Read error: Connection reset by peer]
<j416> jhass: good catch... :(
kireevco has joined #ruby
<jhass> j416: I only found something to assert that the block is called, but not that it is passed :/
<j416> yeah, I found .and_yield, but I want the opposite
<Trudko> jhass: ok so you don't think there is other way how to process this at once without low performance?
dc has quit [Remote host closed the connection]
<jhass> Trudko: not without changing structure, for example an alternative would be to keep the entries sorted
yetanotherdave has joined #ruby
rebelshrug has joined #ruby
Xeago has quit [Remote host closed the connection]
<jhass> then min would be head and max would be tail for example
arup_r1 has joined #ruby
chrishough has quit [Quit: chrishough]
<arup_r1> why puts [1,2] breaks the array and print it as 1 2 in seprate lines ?
<jhass> Trudko: if you have a DBMS behind that stuff using it to compute the values should be a lot faster too
Spami has joined #ruby
<wallerdev> what would you expect puts to do
shtirlic has quit [Quit: ZNC - http://znc.in]
<havenwood> arup_r1: That's just how #puts works when you pass it an Array.
enebo has quit [Quit: enebo]
<havenwood> arup_r1: It doesn't have to be that way except that for it is.
<Trudko> jhass: everything is stored in mysql
centrx has joined #ruby
<arup_r1> How does it ...
<jhass> Trudko: then I definitely would look into querying the values there
mercwithamouth has quit [Ping timeout: 264 seconds]
<arup_r1> I mean p [1.2] means puts [1,2].inspect
<arup_r1> but puts [1,2] -- how it works ?
Zenigor has quit [Remote host closed the connection]
<wallerdev> it loops over the items and prints one per line?
Spami has quit [Client Quit]
<jhass> Trudko: the MAX and MIN aggregate functions should be pretty optimized there, even in mysql
<Mon_Ouie> Yes, puts just treats arrays as a special case
agent_white has joined #ruby
shtirlic has joined #ruby
<centrx> >> puts [1,2]
<eval-in__> centrx => 1 ... (https://eval.in/173018)
Spami has joined #ruby
claymore has joined #ruby
<centrx> Turns out it doesn't work
<havenwood> arup_r1: `puts [1, 2]` is `[1, 2].each { |n| puts n }` because that's how #puts works, I don't get what you're asking
Zenigor has joined #ruby
tvw has quit []
<havenwood> arup_r1: if you want `1 2` outputs then: puts [1, 2].join(" ")
<arup_r1> I mean did it join like with "\n" internally then do `print`.. like print [1,2].join("\n") ?
mercwithamouth has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mostlybadfly has joined #ruby
<mostlybadfly> hi all, has anyone run across this error? cannot load such file -- SecureRandom
mikepack has quit [Remote host closed the connection]
<jhass> mostlybadfly: the file to require is securerandom not SecureRandom
<mostlybadfly> oh my goodness
<mostlybadfly> damn
zigomir has quit [Remote host closed the connection]
mark_locklear has quit [Quit: Leaving]
<centrx> arup_r1, This is what it is doing: http://rxr.whitequark.org/mri/source/io.c#6813
<mostlybadfly> noob mistake huh?
<mostlybadfly> one of my friends said it worked with require ' SecureRandom' so maybe that threw me off
<havenwood> arup_r1: #puts actually does the string printing and \n separately, hence in multithreaded code you'll see the output and \n's staggered unless you `IO.sync = true` or manually add a "\n" to your string (then it prints at the same time as the rest of the string).
Aaaal has quit [Quit: Aaaal]
djbkd has quit [Remote host closed the connection]
Hanmac has joined #ruby
djbkd has joined #ruby
TheAtomicGoose has joined #ruby
war32 has joined #ruby
<arup_r1> Could you give a Gist to follow your example if you want :-)
<arup_r1> havenwood: ^
Eyes is now known as Eyess
kdizz has quit [Ping timeout: 240 seconds]
cleopatra has joined #ruby
<havenwood> arup_r1: Try: 100.times { Thread.new { puts 'Betelgeuse' } }
<havenwood> arup_r1: Notice how the "\n"'s are irregular
Eyess has quit [Read error: Connection reset by peer]
<havenwood> arup_r1: Then set `IO.sync = true` and notice they line up.
<havenwood> If you run it again.
<arup_r1> Does Betelgeuse means "Go to hell " ;) ?
mrsolo has joined #ruby
<arup_r1> ok
stytown has joined #ruby
<arup_r1> Let me try
<havenwood> arup_r1: Then even without sync, this also lines up: 100.times { Thread.new { puts "Betelgeuse\n" } }
<havenwood> arup_r1: This ^ works because an explicit \n prints at the same time as the String. In the first example we see that an implicit \n doesn't.
bradleyprice has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
relix has joined #ruby
relix has quit [Client Quit]
sk87 has joined #ruby
parzo has quit [Ping timeout: 250 seconds]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
Pynix has joined #ruby
iamjarvo has joined #ruby
sambao21 has joined #ruby
r3zn0r has joined #ruby
<havenwood> arup_r1: by `IO.sync` i mean actually type `$stdin.sync = true`
<arup_r1> centrx: Not finding http://rxr.whitequark.org/mri/ident?i=rb_io_puts *rb_io_puts* :(
<havenwood> arup_r1: shoulda said
aspires has quit []
Pynix has left #ruby [#ruby]
sk87 has quit [Client Quit]
bradleyprice has quit [Remote host closed the connection]
<centrx> arup_r1, The link you gave seems to work, that function is also right below the function I linked you to before
aspires has joined #ruby
anaeem1 has joined #ruby
<arup_r1> I became blind due to pressue
Eyes has joined #ruby
Eyes is now known as Eyess
whomp has joined #ruby
<shevy> guys
Takle has quit [Remote host closed the connection]
<shevy> did you get the big news
<shevy> php 5.7 is nearly twice as fast as php 5.6
<centrx> I got the news that that was BS
pu22l3r_ has joined #ruby
bradleyp_ has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
Trudko has quit [Remote host closed the connection]
malditogeek has quit [Quit: Leaving.]
ndrei has quit [Ping timeout: 272 seconds]
<shevy> lol
<eam> php should extend the stat cache to all other system calls
<eam> huge speedup
reset has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
ndrei has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
pu22l3r has quit [Ping timeout: 264 seconds]
<shevy> reddit is fun
<shevy> I get all kind of great quotes:
<shevy> "WordPress is bulky and slow, which is why it ironically makes a great test program to benchmark php."
<eam> havenwood: wow, I'm surprised it hardcodes \n instead of using $\
Fire-Dragon-DoL has quit [Ping timeout: 250 seconds]
anarang has quit [Ping timeout: 264 seconds]
Guest14184 has quit [Read error: Connection reset by peer]
<eam> looks like a bug
<shevy> eam how comes you used perl but not php?
<havenwood> :)
<havenwood> :O
<atmosx> shevy: you work now?
<havenwood> rather
<eam> shevy: php is gross
<cleopatra> reading some of Yukihiro "Matz" Matsumoto,
parzo has joined #ruby
<wasamasa> reading some of Julius "Gaius" Caesar
zorak has quit [Ping timeout: 240 seconds]
<shevy> atmosx yeah; I am using all sorts of strange new programs I don't understand yet... UCFS chimera or however the visualizer is called.. relion... xmipp; I have to (help) make sense of electron microscopic datasets... at least I can use ruby so it's not so annoying now
<havenwood> eam: $/
<havenwood> yeah, hem
<cleopatra> hello people i am selene from Venezuela also I'm also on other channels of related ruby
<arup_r1> Can any one tell me .. How can I make a global Thread pool in Ruby ?
* havenwood closes his eyes tight and pretends Win doesn't exist.
Hanmac1 has joined #ruby
<arup_r1> I have some problem..
Jake232 has joined #ruby
<eam> havenwood: or even macos pre-darwin
<shevy> atmosx this week I am trying to make sense of coordinate positions, and convert it into new formats... like spider image format (I think that was the name) and ... .mrc or something... medical... research center, or whatever; some guys from UK cambridge came up with it... I spend hours reading wikis and documentation :(
<eam> where \r is your record separator
<centrx> Oh, /that/ Julio Cesar
<havenwood> eam: Deprecated, muahaha. :)
<shevy> Julius Cesar!
<eam> havenwood: also, $\ because it's output, right?
<havenwood> glad to be done with that
<shevy> I saw him in the movie gladiator!
<eam> $/ would be if we're reading lines
<havenwood> eam: ah
<cleopatra> Gaius Iulius Caesar in latin
<eam> (such descriptive variables :)
<havenwood> eam: yeah, i'm wrong, i got it backwards :(
<cleopatra> shevy, me too :P
Hanmac has quit [Ping timeout: 240 seconds]
dANOKELOFF has joined #ruby
<atmosx> shevy: for fun or you're working on something? university/job?
ValicekB has quit [Ping timeout: 250 seconds]
<shevy> atmosx still university for now, industry wants post-docs so yeah...
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
claymore has quit [Ping timeout: 256 seconds]
<arup_r1> Can anyone give me some light on - https://gist.github.com/aruprakshit/45bc0cfa11d3194f2075 ?
Photism has joined #ruby
whomp has quit [Ping timeout: 240 seconds]
pu22l3r_ has quit [Remote host closed the connection]
<centrx> arup_r1, I think there is a lot of context missing from that description that makes it difficult to understand the project
pu22l3r has joined #ruby
<centrx> arup_r1, It is already long enough already, so see if you can clarify it or reduce it to a simpler question
senayar_ has quit [Ping timeout: 272 seconds]
claymore has joined #ruby
GriffinHeart has joined #ruby
whomp has joined #ruby
SCommette has quit [Quit: SCommette]
CodeLicker2 has quit [Ping timeout: 240 seconds]
<arup_r1> I want to make a global thread pool.. which will be running forever. I should be able to submit webdriver objects..
<atmosx> shevy: I see, good luck then
<arup_r1> I wrote all there..
asdasdasdasss has joined #ruby
<centrx> arup_r1, You may want something like delayed_job. Instead of constantly running threads, you have "workers" which start up when there is a "job" for them to do.
CodeLicker has joined #ruby
jameyd_ is now known as jameyd
<arup_r1> I am having problem to think how can I make a thread which can solve what I wrote after the line *Till now, I am done. Next challenge is -*
<jhass> arup_r1: look into task based programming
<atmosx> json files in directory? arup_r1 why not use a DB and store/retrieve values there?!
<arup_r1> I need some event which can kick bot to start work..
baroquebobcat has quit [Quit: baroquebobcat]
bwilson has joined #ruby
<arup_r1> so with DB I couldn't find a way, thus FS monitoring gem to monitor it
Fire-Dragon-DoL has joined #ruby
<arup_r1> and kick the bot when there is file
<arup_r1> But Threading sucks for me.. I never worked on threading in my 2 years programming career
GriffinHeart has quit [Ping timeout: 250 seconds]
zorak has joined #ruby
ltd_ has quit [Ping timeout: 240 seconds]
<havenwood> arup_r1: I agree with centrx. Use something built for the task like delayed_job, sidekiq or resque.
awkwords has quit [Ping timeout: 256 seconds]
<atmosx> arup_r1: I'm strongly for DB's and sidekiq
asdasdasdasss has quit [Ping timeout: 250 seconds]
<arup_r1> I have not the full project in my control.. I am doing part of it.. Just bot part ..
<atmosx> find a way to kick the bot (as you say) that doesn't revolve FS. On the other hand in the real world, since this way works... who gives a shit about the implementation (except from real programmers)
<atmosx> arup_r1: okay, I see.
ValicekB has joined #ruby
ltd has joined #ruby
NinoScript_ has joined #ruby
bronson has joined #ruby
zoosjuice has joined #ruby
Poky has quit [Remote host closed the connection]
vyorkin has joined #ruby
Vivekananda_y510 has joined #ruby
shtirlic has quit [Quit: ZNC - http://znc.in]
nateberkopec has quit [Quit: Leaving...]
shtirlic has joined #ruby
<havenwood> arup_r1: we're saying your part is the job queue and workers
kachi8 has quit [Ping timeout: 272 seconds]
nateberkopec has joined #ruby
momomomomo has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r1> tough,, for me.. :(
codezomb has joined #ruby
<centrx> delayed_job makes it easy!
shtirlic has quit [Quit: ZNC - http://znc.in]
<arup_r1> centrx: let me read it.
shtirlic has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
britneywright has joined #ruby
vt102 has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
enebo has joined #ruby
stytown has quit [Quit: stytown]
<banisterfiend> Mon_Ouie Hi, has anyone really been far even as decided to use even go want to do look more like?
pcfreak30 has quit [Ping timeout: 240 seconds]
awkwords has joined #ruby
<Mon_Ouie> Yes, absolutely
zB0hs has joined #ruby
kaspergrubbe has joined #ruby
<Mon_Ouie> (I think you've already used a similar line)
rtdp has quit [Ping timeout: 240 seconds]
bradleyp_ has quit [Remote host closed the connection]
bradleyprice has joined #ruby
fmauz has joined #ruby
zoosjuice has quit [Ping timeout: 264 seconds]
mikesplain has quit [Ping timeout: 250 seconds]
<TheAtomicGoose> how do you make it so that a workspace in xmonad is split up into 4 equally sized windows? after reading the doc i'm still confused
mikecmpbll has joined #ruby
blackmesa has joined #ruby
<TheAtomicGoose> shit sorry wrong irc
<TheAtomicGoose> my bad
tacos1de has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Client Quit]
mikesplain has joined #ruby
Rahul_Roy has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
diegoviola has joined #ruby
<shevy> hey
mikecmpbll has joined #ruby
<shevy> haskell is on the loose here
parzo has quit [Remote host closed the connection]
wasamasa has quit [Quit: ZNC]
tacos1de has joined #ruby
parzo has joined #ruby
Lewix has quit [Remote host closed the connection]
<atmosx> I use Divvy on macs TheAtomicGoose :-P
j_mcnally has quit [Ping timeout: 240 seconds]
<atmosx> xmonad looks seriously cool though
<atmosx> maybe in the future, I'll be back on lnx who knows
parzo has quit [Ping timeout: 240 seconds]
klaut has joined #ruby
<jameyd> atmosx: what are you on? os x?
<jameyd> i ask bc i just found out about spectacle, which is really simple but pretty great if you don't have any window management set up
<atmosx> jameyd: yes
<jameyd> apparently hydra is really cool, too, but it's more setup
g0bl1n has joined #ruby
<atmosx> jameyd: yeah, I knew about hydra but not about spectacle. It's free, although I don't mind paying small amounts for software
SBoolean has quit [Ping timeout: 256 seconds]
klaut has quit [Remote host closed the connection]
<jameyd> yeah neither do i. i think spectacle is neat since it comes out of the box working
<jameyd> do you use seomthing right now?
anaeem1 has quit [Remote host closed the connection]
<atmosx> divvy is the same thing as spectacle as far as I can see. Hydra takes a lot of setup and I'm too bored to do it :-) ... I've lost too many hours with WM in the past (fluxbox mostly)
<jameyd> oh i see, if i had just read 3 messages up...
<atmosx> yeap
renderful has joined #ruby
dANOKELOFF has quit [Remote host closed the connection]
compAz has joined #ruby
danielpclark has quit [Quit: Leaving]
<atmosx> later all
SBoolean has joined #ruby
<arup_r1> In this example... how can I pass password of root from the `sudo line itslef ? https://gist.github.com/aruprakshit/ae73deb8673092d528a3
Lewix has joined #ruby
<jhass> meh, why you need sudo
<eam> arup_r1: depends on your sudo config
doritostains has quit [Quit: doritostains]
absolutezeroff has joined #ruby
<arup_r1> in IRB it don't ask password the sudo line.. But in Rspec it is asking..
SCommette has joined #ruby
<arup_r1> which makes me a bit crazy
theharshest has quit [Read error: Connection reset by peer]
<jhass> seriously, why do you need to call sudo
fabrice31 has joined #ruby
<jhass> if you can't give a reason you shouldn't
r3zn0r has quit [Quit: leaving]
aspires has quit []
<arup_r1> may be there is another command I am trying to execute.. which is secret ;) the one is I am showing there is a demo one.. main question is how can I sent password, while using sudo..
Photism has quit [Quit: Leaving]
<jhass> still, if you can't explain why that command needs to be run as root, you shouldn't do it, especially in an automated way
<eam> arup_r1: you don't want to. Instead, change sudoers to use :NOPASSWD or run your entire rspec as root
<eam> ideally the latter
<jhass> ideally the former!
<jhass> seriously
fabrice31 has quit [Ping timeout: 250 seconds]
<eam> in a throwaway build system
<eam> jhass: no way
enebo has quit [Quit: enebo]
dumdedum has quit [Quit: foo]
<eam> calling to sudo from automation is a recipe for pain
<jhass> well, ideally you change your stuff to not need root
<eam> eh, not always possible
<eam> it's totally fine to run the entire build chain as root
<jhass> but more often than not it is
SBoolean has quit [Ping timeout: 260 seconds]
doritostains has joined #ruby
<eam> just don't run it on anything important
<jhass> and people tend to not fix their stuff because "it works with root"
j_mcnally has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
doritostains has quit [Client Quit]
SBoolean has joined #ruby
doritostains has joined #ruby
<eam> in a virtualized world, *shrug*
<jhass> also I'm still puzzled what would be secret about a commandline, I mean how much engineering and originality can possibly go into that...
shredding has joined #ruby
<jhass> and I doubt he runs in any sort of container, really
mijicd has joined #ruby
<centrx> That guy has lost all his containers
bradleyp_ has joined #ruby
baroquebobcat has joined #ruby
sopheny has joined #ruby
yetanotherdave has quit [Read error: Connection reset by peer]
Takle has joined #ruby
sopheny has quit [Client Quit]
bradleyp_ has quit [Remote host closed the connection]
bradleyprice has quit [Read error: Connection reset by peer]
bradleyprice has joined #ruby
sdouglas has joined #ruby
yetanotherdave has joined #ruby
<arup_r1> `echo <your password> | sudo -S echo 11` solve the problem
<arup_r1> :-)
wasa has joined #ruby
<jhass> good, ignore all advice
<shevy> arup_r1 remove sudo
ghr has joined #ruby
larsam has quit [Remote host closed the connection]
<arup_r1> jhas: I didn't ignore
wasa is now known as wasamasa
Takle has quit [Ping timeout: 256 seconds]
<arup_r1> I was just testing it for learning.. I will try to do it other way.
<arup_r1> shevy: I will remove.
asdasdasdasss has joined #ruby
<shevy> \o/
timonv_ has joined #ruby
freerobby has quit [Quit: Leaving.]
sdouglas has quit [Ping timeout: 240 seconds]
qmfnp has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has joined #ruby
<j_mcnally> arup_r1: thats a bad idea.
sixxy_ has quit [Remote host closed the connection]
<j_mcnally> arup_r1: puts you password as plain text in the history
jheg has joined #ruby
<j_mcnally> arup_r1: you should run `visudo` and add NOPASSWD:ALL to you user account so that sudo can be ran w/o password if you need to script sudo commands.
JoshGlzBrk has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
asdasdasdasss has quit [Ping timeout: 256 seconds]
<jhass> meh, ^ I dislike that
<jhass> something you can do in said throwaway systems/containers
<jhass> but outside, meh, can as well work as root
St_Marx has joined #ruby
<apeiros> that sounds like: please open all your doors and put a sign in front of your house with big arrows pointing at your open doors :)
Wolland has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
axsuul has joined #ruby
* shevy suspects that someone is working for the NSA here ...
larsam has joined #ruby
<j_mcnally> well even considering secure systems.... what is your solution. even with the password enabled what do you gain? Didnt they need the password to login in the first place?
<j_mcnally> i like requirements like a password for sudo are a bit fruitless
<j_mcnally> *think
<arup_r1> How `sudo echo 1` can be written with your suggestion... j_mcnally:
<jhass> not necessarily
<jhass> there could be flaws in remote access systems that allowed access
mjuszczak has quit [Quit: leaving]
<jhass> no need to give free privilege escalation
doritostains has quit [Quit: doritostains]
mjuszczak has joined #ruby
<j_mcnally> jhass: those flaws could likely be exploited for privledge escalation....
<jhass> or consider the lock screen bugs ubuntu had recently
<j_mcnally> jhass: are we even talking about workstations?
<jhass> I'm talking about all systems
djbkd has quit [Remote host closed the connection]
<jhass> it's just never good practice
doritostains has joined #ruby
<j_mcnally> meh
<jhass> and being it for the sake of realizing what you're about to run
<jhass> *giving time for that
<j_mcnally> hehe
<j_mcnally> well once u password auth subsequent sudos dont typically require reauth
<jhass> I usually start with the dangerous stuff
<jhass> ;P
<j_mcnally> o
<arup_r1> j_mcnally: How would you right backtick with your suggestions ?
<jhass> but seriously, such a measure is no excuse, there are more than enough alternatives
Brando753 has quit [Ping timeout: 260 seconds]
momomomomo has quit [Quit: momomomomo]
grieg has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> and if it's suid bit or whitelisting certain commands in the sudoers
<j_mcnally> arup_r1: dont run anything with sudo ever....
<j_mcnally> arup_r1: why do you even need it
<arup_r1> Oopps!! Leave it thenn ;)
<jhass> arup_r1: the issue isn't the backticks, it's that you need to gain higher privileges in a program. A program should be started with all necessary privileges and even drop them if no longer needed
djbkd has joined #ruby
<arup_r1> If I need to run some command with as a super user.. what is the best practice ?
shredding has quit [Quit: shredding]
<j_mcnally> arup_r1: like what command tho...
<jhass> I'm questioning that you actually need to run that as root
lw has quit [Quit: s]
<jhass> you can get very very far with a little effort
<jhass> without root
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
jay____ has joined #ruby
kirun has joined #ruby
Xiti` has joined #ruby
rayners has quit [Remote host closed the connection]
renderful has quit [Remote host closed the connection]
mikesplain has quit [Read error: Connection reset by peer]
dayepa1 has quit [Ping timeout: 240 seconds]
jay__ has quit [Ping timeout: 240 seconds]
mikesplain has joined #ruby
shredding has joined #ruby
<jhass> arup_r1: my rule of thumb is that if you can't explain why a particular program needs root rights, what it's doing that only root can do, you shouldn't run it as root
jheg has quit [Quit: jheg]
freerobby has quit [Quit: Leaving.]
sepp2k has joined #ruby
claymore has quit [Quit: Leaving]
Xiti has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
<arup_r1> Ok.. Leave it for now.. I need to think on this..
carraroj has quit [Quit: Konversation terminated!]
dayepa has joined #ruby
M-Technic has joined #ruby
centrx has quit [Quit: Mead error: Connection reset by beer]
hmsimha has quit [Ping timeout: 272 seconds]
aspires has joined #ruby
Tricon has joined #ruby
relix has joined #ruby
chrishough has joined #ruby
wasamasa has quit [Quit: ZNC]
lmickh has joined #ruby
Takle has joined #ruby
kireevco has quit [Quit: Leaving.]
wasamasa has joined #ruby
Zespre has joined #ruby
jay____ has quit [Read error: Connection reset by peer]
<shevy> arup_r1 work as superuser
Georg3 has joined #ruby
jay__ has joined #ruby
<jhass> shevy: do you also keep statistics about your troll attempts? I'm interested in the success rate
lkba has joined #ruby
<shevy> jhass 0 %
<jhass> good
<shevy> nono
<shevy> 0 % troll attempts
<arup_r1> shevy: :-(
<jhass> check your priv.. er I mean objectivity
mikesplain has quit [Ping timeout: 260 seconds]
<shevy> not necessary
maestrojed has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kaspergrubbe has quit []
jay____ has joined #ruby
vyorkin has quit [Ping timeout: 260 seconds]
jay____ has quit [Read error: Connection reset by peer]
jay____ has joined #ruby
orionstein_away is now known as orionstein
jay____ has quit [Read error: Connection reset by peer]
jay____ has joined #ruby
<eam> 0 % anything is 0
<shevy> hmm
<shevy> >> 0 % 0
<eval-in__> shevy => divided by 0 (ZeroDivisionError) ... (https://eval.in/173044)
<shevy> !!!
jay__ has quit [Ping timeout: 240 seconds]
bayed has quit [Quit: Connection closed for inactivity]
<shevy> ok what is the rationale for... some programs
<shevy> storing in i. e. ~/gnupg
kireevco has joined #ruby
<eam> uh oh, is this a bug?
yeticry has quit [Ping timeout: 240 seconds]
<eam> >> 0 % Float::NAN
<shevy> vs ... I dunno ... ~/.wine/
vyorkin has joined #ruby
<eval-in__> eam => 0.0 (https://eval.in/173045)
nanoyak has joined #ruby
<shevy> hey
<shevy> you got more precision!
cg433n has joined #ruby
<shevy> you turned the 0 into a 0.0
CaptainJet has quit []
<eam> well NAN is a float
<shevy> you are a magician
<eam> but 0 % NAN should be NAN
vyorkin has quit [Client Quit]
francisfish has joined #ruby
jay____ has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
jay__ has joined #ruby
MCDev has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
stytown has joined #ruby
mikesplain has joined #ruby
<shevy> benzrf|offline, I just had a haskell guy state this:
<shevy> "I don't like state. I really don't."
GriffinHeart has joined #ruby
<agent_white> Anarchist
dawkirst has joined #ruby
renderful has joined #ruby
<Georg3> hey someone mind helping me by explaining how a factory method works? I understand it's a method of the actual class that creates an instance of itself but what is the instance assigned to?
codeurge has quit [Quit: Sleep.]
<Georg3> is it temporarily strictly so you could say run another method on it and return the results?
tomblomfield has joined #ruby
enebo has joined #ruby
decoponio has quit [Quit: Leaving...]
codeurge has joined #ruby
pothibo has joined #ruby
<Georg3> or if someone knows of a good resource that explains the design pattern, that would be much appreciated!
baroquebobcat has quit [Quit: baroquebobcat]
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
GriffinHeart has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
kachi8 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
jay__ has quit [Read error: Connection reset by peer]
<pontiki> chapter 13 in "design patterns in ruby" goes through it quite well
<arup_r1> why not throwing error Date.strptime('01-11-2010', '%Y-%m-%d')
jay has joined #ruby
<arup_r1> > Date.strptime('01-11-2010', '%Y-%m-%d')
<arup_r1> >> Date.strptime('01-11-2010', '%Y-%m-%d')
<eval-in__> arup_r1 => undefined method `strptime' for Date:Class (NoMethodError) ... (https://eval.in/173063)
j_mcnally has quit [Ping timeout: 240 seconds]
<arup_r1> >> require 'date' ; Date.strptime('01-11-2010', '%Y-%m-%d')
<eval-in__> arup_r1 => #<Date: 0001-11-20 ((1721747j,0s,0n),+0s,2299161j)> (https://eval.in/173064)
Xiti` has quit [Quit: Leaving]
<Georg3> pontiki: Do you know if this is the chapter you're talking about? Just found this on google - http://www.informit.com/articles/article.aspx?p=1398605
<pontiki> yes, Georg3, that's it
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Georg3> pontiki: Thanks, I'll give that a read!
Xiti has joined #ruby
<pontiki> i hope it is useful as a stand alone
<pontiki> although i have to say, that's a fabulous book
ndrei has joined #ruby
shtirlic has quit [Quit: ZNC - http://znc.in]
mikepack has joined #ruby
garethrees has joined #ruby
mikepack has quit [Remote host closed the connection]
shtirlic has joined #ruby
<Georg3> Me too, it sounds great and the reviews all say it's worth it just a little pricey
jdj_dk has joined #ruby
<Georg3> $50, I'll have to save my pennies =)
mijicd has quit [Remote host closed the connection]
mikepack has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Quit: bronson]
asdasdasdasss has joined #ruby
charliesome has joined #ruby
figgleberry has joined #ruby
jheg has joined #ruby
<pontiki> it's half that at amazon
<pontiki> for kindle, anyway
charliesome has quit [Client Quit]
figgleberry has quit [Client Quit]
gregf has joined #ruby
benzrf|offline is now known as benzrf
garethrees has quit [Ping timeout: 256 seconds]
<arup_r1> Can I use this - without using browser ? https://code.google.com/p/selenium/wiki/RubyBindings#API_Example
asdasdasdasss has quit [Ping timeout: 240 seconds]
<arup_r1> I want to write an automation script... but I don't want to use real browser..
<benzrf> shevy: of course you did
<benzrf> haskell doesnt have state
<jhass> arup_r1: afaik the two major headless testing methods are phantomjs and running selenium inside Xvfb
compAz has quit [Remote host closed the connection]
<arup_r1> I am not doing testing rather automatic web page filling..
charliesome has joined #ruby
nfk has joined #ruby
claw___ has joined #ruby
CaptainJet has joined #ruby
Lingo_ has joined #ruby
jobewan has quit [Quit: Leaving]
yfeldblum has joined #ruby
<pontiki> those also work for automating non-testing scripts
bruno- has quit [Ping timeout: 260 seconds]
j_mcnally has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
claw__ has quit [Ping timeout: 240 seconds]
srji has joined #ruby
srji has quit [Client Quit]
Morkel has quit [Quit: Morkel]
<arup_r1> jhass: Well target machine don't have any browser, then http://elementalselenium.com/tips/38-headless wouldn't work ...
sigurding has joined #ruby
<jhass> did you have a look at mechanize?
Karpuragauram has joined #ruby
<arup_r1> Yes.. it sucks when there is Ajax..
<jhass> so phantomjs it is
IcyDragon has joined #ruby
Karpuragauram has quit [Read error: Connection reset by peer]
IceDragon has quit [Ping timeout: 250 seconds]
<arup_r1> jhass: you are referring - https://rubygems.org/gems/phantomjs ?
<jhass> kinda
<jhass> that's more an installer though
timonv_ has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
codezomb has quit [Ping timeout: 240 seconds]
<arup_r1> phantomjs seems a JS shit.. I don't know JS :(
<pontiki> look at watirwebdriver.com
lkba has quit [Ping timeout: 260 seconds]
<arup_r1> pontiki: I don't want browser,,, :-)
<pontiki> you can use it headlessly as well
axsuul has quit [Ping timeout: 264 seconds]
<arup_r1> humm that I can do with selenium-webdriver and headless gem too..
skyjumper has joined #ruby
<skyjumper> is there a better way than !!expr to cast expr to boolean?
<arup_r1> I have code ready using Firefox and selenium-webdriver
nanoyak has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
<arup_r1> My client don't want browser.. sooo pain on ass!
nanoyak has joined #ruby
<skyjumper> read a blog post once, something about "if i caught a dev using !!expr, they would be fired immediately"
<jhass> skyjumper: I never needed that
<skyjumper> not sure why
renderful has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<pontiki> some people have strong opinions
<skyjumper> it's a little sloppy, i guess
Ankhers has quit [Remote host closed the connection]
<jhass> what possible values do you convert? and why?
<pontiki> it's not sloppy -- it's the most compact way possible
<pontiki> it is, however, a bit obscure
<skyjumper> well you're forcing anything non nil and non false to be true
<skyjumper> doesn't handle edge cases well
bricker`work has quit [Read error: Connection reset by peer]
<jhass> yeah, but what's the reason you need true/false? Why isn't truthy/falsey enough?
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zebroid has joined #ruby
codezomb has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
lw has joined #ruby
<skyjumper> i don't want my method to break some code that expects strict true/false
bricker`work has joined #ruby
banister has joined #ruby
<skyjumper> dunno how often that'd happen
<baweaver> nil/false are falsy values
<baweaver> everything else is true
<baweaver> No real need to hack it
robbyoconnor has joined #ruby
codeurge has quit [Quit: Sleep.]
<jhass> skyjumper: sounds like premature optimization
jarto has quit [Ping timeout: 240 seconds]
<baweaver> kinda the point of a dynamic language.
<jhass> it's common to work with truthy/falsey in ruby
cg433n has quit [Quit: Lingo - http://www.lingoirc.com]
<baweaver> you're always working with it, just not explicitly....
<pontiki> more common than not, i'd say
<jhass> so most people will do if x, not if x == true
<skyjumper> point taken
fabrice31 has quit [Ping timeout: 264 seconds]
Zenigor has quit [Remote host closed the connection]
GusCE6 has joined #ruby
failshell has joined #ruby
<GusCE6> Hello?
<baweaver> If you're really paranoid on nullables and all that, go with the Maybe Monad instead.
<jhass> GusCE6: hi!
<GusCE6> Hello!
<cleopatra> hey friend some resource for rspec
kireevco has quit [Quit: Leaving.]
<GusCE6> I am currently learning Ruby, but am still a beginner.
<pontiki> welcome, GusCE6
kireevco has joined #ruby
<GusCE6> Thank you!
sigurding has quit [Quit: sigurding]
bruno- has joined #ruby
kireevco has quit [Client Quit]
<GusCE6> The version I have is 1.9.3.
<shevy> ack
<GusCE6> Does that count here?
<pontiki> old, but still supported
<shevy> it can count
<shevy> it will correctly tell you what 1+2 is
<GusCE6> Superb!
<GusCE6> What can the more recent versions do that it cannot?
codeurge has joined #ruby
<pontiki> GusCE6: look at the topic ^
dayepa has quit [Ping timeout: 240 seconds]
kireevco has joined #ruby
<GusCE6> I have- but I am just starting.
<jhass> they're mostly faster, some slight behavior changes, new are lazy enumerators and refinements, mostly
IcyDragon has quit [Ping timeout: 260 seconds]
grieg has quit [Remote host closed the connection]
IcyDragon has joined #ruby
<pontiki> nearly everything you'll need to start learning ruby is available in 1.9.3
<GusCE6> What is a "lazy enumerator?"
<pontiki> i can't think of anything it won't support for beginners
<jhass> don't care right now
awkwords has quit [Ping timeout: 240 seconds]
arup_r1 has left #ruby [#ruby]
<pontiki> something you don't need to worry about yet
codeurge has quit [Client Quit]
<GusCE6> Oh.
hmsimha has joined #ruby
Tricon has quit [Quit: Leaving...]
<GusCE6> Currently, I have programmed a few simple conversion-calculators, a simple text-RPG, and the dice game Bunco.
<pontiki> in ruby?
<GusCE6> Yes- but only using the CMD window.
<pontiki> well done
<GusCE6> Thank you.
bruno- has quit [Ping timeout: 240 seconds]
<pontiki> what's next, then?
Tricon has joined #ruby
<GusCE6> Well, there is one thing: what exactly is Ruby used for on the Internet? I assume, like Java, it must be installed in your computer for you to properly interact with a website that uses it.
<pontiki> no, not so much like that.
<baweaver> More like PHP
<baweaver> (forgive me for that comparison)
<pontiki> on the net, the primary use of ruby is rails, but there are also other web app frameworks
<baweaver> installed and run on the server side.
<GusCE6> I don't quite understand, although I've heard of Ruby-On-Rails.
<pontiki> do you understand the difference between a server and a client/browser?
[1]MCDev has joined #ruby
icarus_ has joined #ruby
<GusCE6> Yes. Javascript=client side; PHP=server-side, for example.
lkba has joined #ruby
jorjah has joined #ruby
<pontiki> right, so rails runs on the client side
jdj_dk has quit [Read error: Connection reset by peer]
aspires has quit []
Takle has quit [Remote host closed the connection]
<GusCE6> So Rails is anything like Javascript?
<pontiki> nothing like, really
<GusCE6> What does Rails do?
maoko has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
[1]MCDev is now known as MCDev
jorjah has quit [Remote host closed the connection]
<pontiki> it is a framework for people to create web applications
<baweaver> It'd be substantially faster just to dive into the Rails tutorial and see for yourself.
IcyDragon has quit [Ping timeout: 264 seconds]
francisfish has quit [Remote host closed the connection]
<jhass> GusCE6: most webapplications just parse http requests, do actions upon that and maybe generate a http response with an HTML, JSON or XML body
IcyDragon has joined #ruby
francisfish has joined #ruby
<GusCE6> I'll check that website out.
<baweaver> Follow that to the end and it'll answer most everything you need to know along the way.
JohnFord has joined #ruby
Georg3 has quit [Quit: Computer has gone to sleep.]
klaut has joined #ruby
<GusCE6> But would a computer need Ruby (and Rails?) installed to handle such websites?
IcyDragon is now known as IceDragon
<pontiki> no, you likely already interact with rails web applications
<pontiki> you just need a browser
<jhass> GusCE6: no, as I explained that code runs on the server and just generates stuff your usual webbrowser can interpret
NinoScript_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
kaspergrubbe has joined #ruby
<pontiki> if you want to develop, test, and run a rails web application, then you will need ruby and rails installed (and a few more things besides)
dawkirst has joined #ruby
baroquebobcat has joined #ruby
Takle has joined #ruby
<pontiki> do look at rails tutorial
<pontiki> it answers these and other questions
bmurt has quit []
<GusCE6> If one doesn't need these things installed, then that is amazing. And encouraging. Could, say, IE6 or Opera Mini 5 handle these things?
<baweaver> not well, but that's not related
<jhass> if your app responds with HTML/CSS that can be handled by these...
<baweaver> that's to do with your CSS and JS more than anything
<jhass> (you don't really want to support them, it's a pain)
<baweaver> IE8 is bad enough right now
<baweaver> IE6 is the devil
<wmoxam> Safari 5.1 is bad too
<wmoxam> :p
<GusCE6> IE6 is awful- those securiity notices drive you insane.
<GusCE6> But Opera Mini 5 is superb.
<wmoxam> IE6 is dead though
claw has joined #ruby
<shevy> let's revitalize it \o/
<GusCE6> Shoot- I went to that website, but no content is available.
<wmoxam> IE6 is 0.22% of our IE traffic
SBoolean has quit [Read error: Connection reset by peer]
<wmoxam> :p
nateberkopec has quit [Quit: Leaving...]
<kaspergrubbe> We are supporting a library where their sysadms have them on old IEs, but we pursuaded them to let us VNC in and install Chrome, no complaints after that :-)
larissa has quit [Quit: Leaving]
claw___ has quit [Read error: Connection reset by peer]
frellnet_ has joined #ruby
<GusCE6> I went to the HKEY files and changed IE6 to IE9. It has a curiouys and nifty effect on certain websites.
dayepa has joined #ruby
<benzrf> GusCE6: rails is a library for making websites
<benzrf> a "rails app" is a website
<benzrf> made with rails
<GusCE6> How well does Opera Mini 5 respond to Ruby/Rails websites?
<benzrf> GusCE6: that's an absurd question
<baweaver> irrelevant question
Georg3 has joined #ruby
kith has quit [Quit: kith]
<benzrf> GusCE6: rails is a *backend* framework
<wallerdev> lol
<baweaver> rails gives you html/css/js which are all handled on the client side by the browser
<benzrf> you write the code that governs the logic in ruby using rails
<benzrf> it can spit out any kind of output
<GusCE6> I'm beginning to understand this much better now.
<wallerdev> ruby on rails is built from the ground up for opera mini support
<benzrf> it happens to be primarily used for spitting out website code
<GusCE6> So Rails is sort of a website framework- builder?
MCDev has quit [Ping timeout: 250 seconds]
<benzrf> GusCE6: rails is a library that you use from your ruby code to simplify the task of writing a website backend
Xeago has joined #ruby
asdasdasdasss has joined #ruby
<benzrf> GusCE6: i wouldnt start with rails though
<benzrf> learn to use ruby first
<benzrf> then learn a web framework
<GusCE6> (By the by, tyhis mobile device relies heavily on Opera Mini 5.)
<benzrf> it doesnt even have to be rails
<shevy> should he not rather learn haskell benzrf?
<benzrf> GusCE6: whta's the use case?
<benzrf> shevy: shoosh
frellnet has quit [Ping timeout: 264 seconds]
frellnet_ has quit [Ping timeout: 240 seconds]
JBreit has joined #ruby
<GusCE6> If ity's any help, I do understand HTML, CSS, and some Javascript. I've only been at it for a few weeks, though, but I wrote a pretty fair prototype website, with a manual slideshow and descriptive paragraph under the images. It is also responsive.
mikesplain has quit [Ping timeout: 264 seconds]
kith has joined #ruby
renderful has joined #ruby
paulfm has quit []
<GusCE6> PHP and MySQL is still in the future, though.
tomblomfield has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> GusCE6: do NOT learn php
<benzrf> php is a horrible, horrible abomination
<canton7> heh, php+mysql is the past, not the future
<GusCE6> Why?
<benzrf> and mysql is ok but postgres is much better
baweaver has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
<GusCE6> Wouldn't it help to learn it since so many websites use them?
baweaver has joined #ruby
asdasdasdasss has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
dayepa has quit [Ping timeout: 256 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
ldnunes has quit [Quit: Leaving]
<GusCE6> A week ago, Chris Pine's Ruby programming book arrived at the e-Bay place. It has proven very helpful.
keystonelemur has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
jerius has quit []
larsam has quit [Read error: Connection reset by peer]
lw has quit [Quit: s]
larsam has joined #ruby
hmsimha has quit [Ping timeout: 240 seconds]
e4xit has quit [Read error: Connection reset by peer]
<GusCE6> So far, you have been very helpful- finding out that a device does not need to have Ruby installed for a website using it to work was VERY important!
mehlah has quit [Quit: Leaving...]
momomomomo has joined #ruby
larsam has quit [Client Quit]
<benzrf> GusCE6: expecting that is like expecting to need a call routing system set up to call an orginizatoin that uses one
e4xit has joined #ruby
<GusCE6> Well, Java must be installed for a device to prperly use a Java-using website- until just now I had thought Ruby was similar.
<jhass> that's not true
<jhass> you're mixing a backend in java with java applets
<GusCE6> Nobody I had asked elsewhere had ever answered that question- you were the first.
grieg has joined #ruby
asdasdasdasss has joined #ruby
andrewhl has quit [Quit: andrewhl]
<GusCE6> So I had to guess, and it was difficult getting an answer on the web.
tus has joined #ruby
<benzrf> GusCE6: if a website is written in java you dont need java to use it
diegoviola has quit [Remote host closed the connection]
<benzrf> if a website links to an applet written in java, you need java to use the applet
alvaro_o_ has joined #ruby
<GusCE6> jhass: I often get a message saying"...you must have Java installed..." so I assumed Java had to be installed for the applets to be installed.
<benzrf> GusCE6: for applets, yes
<benzrf> applets are client-side programs loaded from webpages
<benzrf> that is not the same thing as a program running on the server that generates the site
grieg is now known as amanita
<benzrf> i guess i can see where the misconception comes from though :v
<GusCE6> I see- now.
<GusCE6> But for applets to be installed on one's device, Java must be installed on it.
<GusCE6> Otherwise, you're out of luck.
dayepa1 has joined #ruby
timonv_ has joined #ruby
fold has joined #ruby
<GusCE6> But for website antics that don't need applets to be installed on your device, it should work?
doodlehaus has quit [Remote host closed the connection]
Sgeo has joined #ruby
<jhass> I avoid using sites that require java applets
<kaspergrubbe> Yes, because your browser just crunch the javascript and html that is given to it.
doodlehaus has joined #ruby
xaxisx has quit [Quit: xaxisx]
<jhass> today you can get a much much much nicer and interactive experience with HTML, CSS & JavaScript
<jhass> note that JavaScript shares nothing with Java except the Java in its name
<cuqa> hey, im trying to get a clients ip address with a ruby job in dashing, but request.remote_ip does not work
<cuqa> does request.remote_ip require a certain gem file?
<cuqa> s/gem//
<jhass> cuqa: "does not work" means?
<GusCE6> I like Javascript and CSS. I programmed the dice game Bunco with it as part of that proto-webpage.
<cuqa> without file I mean :[
MrMic has joined #ruby
<kaspergrubbe> cuqa: Dashing uses sinatra, you could try request.ip
<GusCE6> Responsive websites are nifty, too.
<kaspergrubbe> cuqa: http://www.sinatrarb.com/intro.html#Accessing%20the%20Request%20Object
<cuqa> im getting this error: scheduler caught exception: undefined local variable or method `request' for main:Object
kireevco has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
codezomb has quit [Quit: Textual IRC Client: www.textualapp.com]
<GusCE6> But now I understand a good deal more about what Ruby and Rails actually are.
failshell has quit []
axl_ has quit [Ping timeout: 272 seconds]
mehlah has joined #ruby
<GusCE6> Ah- the download for Dave's Ruby manual is complete. Hmmm...pretty big PDF file.
axl_ has joined #ruby
doodlehaus has quit [Ping timeout: 250 seconds]
banister has quit [Ping timeout: 256 seconds]
shlant has joined #ruby
<benzrf> GusCE6: depending on your use case, you might want to use something simpler than rails
aspires has joined #ruby
shlant has left #ruby [#ruby]
<benzrf> rails is kind of huge and "do it our way"-ish
<GusCE6> What would be an alternative?
TheAtomicGoose has quit [Ping timeout: 250 seconds]
<cuqa> kaspergrubbe: thanks. request.ip actually works in the file I need it in
<benzrf> sinatra is pretty popular on the light end
<benzrf> GusCE6: what are you making?
<cuqa> but apparently does not work in widgets
andrewhl has joined #ruby
aspires has quit [Client Quit]
andrewhl has quit [Client Quit]
_Andres has quit [Read error: Connection reset by peer]
whomp has quit [Quit: Lost terminal]
_Andres has joined #ruby
<GusCE6> Right now, nothing. I'm a beginner. But I can, right now, with HTML, CSS, and some Javascript, make up a pretty decent basic webpage minus passwords or the like.
<GusCE6> In other words, a "look & listen to me" webpage with a manual slideshow, links, that sort of thing.
end_guy has quit [Ping timeout: 264 seconds]
<GusCE6> But no posting, passwords, cookies, etc. But a few weeks ago I couldn't paste an image with Javascript or make a sound.
danijoo has quit [Read error: Connection reset by peer]
<GusCE6> It seemed a good idea to learn something about that in order to have some idea how to apply Ruby and Rails.
end_guy has joined #ruby
<GusCE6> Heck, I programmed Minesweeper in Visualbasic a while back...
<jhass> hm, no, don't start with authentication
danijoo has joined #ruby
hmsimha has joined #ruby
<jhass> there are some decent frameworks that abstract that away for you and its good to use them as you can get it wrong easily
blackmesa has joined #ruby
saarinen has quit [Quit: saarinen]
<jhass> however dynamic content (like postings) is a fine thing to start with
obscured has quit [Quit: leaving]
<GusCE6> I'll look into that tonight, then.
<GusCE6> At least the basics.
<GusCE6> The only dynamic content I know is Javascript- some, at least.
djbkd has quit [Remote host closed the connection]
<benzrf> GusCE6: if i were you i would try to get a good handle on ruby itself before learning any web frameworks
cajone has joined #ruby
<benzrf> doing otherwise is kind of like trying to learn to make bookcases specifically before getting the hang of using woodworking tools
<benzrf> i like analogies
<GusCE6> Well, my time's up, here- thanks again for all of your help. At least now I know more about what this is all about. The fact one does not need Ruby installed was very significant. And yes, I'll make sure I'm pretty good at Ruby before tackling Rails. Again, thanks!
kaleido has quit [Read error: Connection reset by peer]
GusCE6 has left #ruby [#ruby]
<cajone> guys is there a smart way to initialize an new array say '@ar=Array.new(10)' where all the elements are set to say 0 rather than nil?
<jhass> Array.new(10, 0)
<jhass> only use that form for immutable values (like numbers or symbols)
<eam> [0] * 10
<jhass> for mutable values use Array.new(10) { 'foo' }
<kaspergrubbe> Array.new(10,0)
<cajone> jhass: thank you !
larsam has joined #ruby
banister has joined #ruby
saarinen has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
krz has quit [Quit: WeeChat 0.4.3]
GriffinHeart has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Georg3 has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby
dawkirst has quit [Remote host closed the connection]
Georg3 has joined #ruby
awkwords has joined #ruby
<bricker`work> >> Array.new(16) { "Na" }.join + " Batman!"
<eval-in__> bricker`work => "NaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNa Batman!" (https://eval.in/173068)
androidbruce has left #ruby ["Leaving"]
<eam> >> "Na" * 16 + " Batman!"
<eval-in__> eam => "NaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNa Batman!" (https://eval.in/173069)
GriffinHeart has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
<jhass> >> "#{'Na'*16} Batman!"
<eval-in__> jhass => "NaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNa Batman!" (https://eval.in/173070)
<Mon_Ouie> Obviously a better way to do that is to use 0.0/0.0
<eam> >> (0.0/0.0).to_s[0,2] * 16 + " Batman!"
<eval-in__> eam => "NaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNa Batman!" (https://eval.in/173071)
Georg3 has quit [Ping timeout: 272 seconds]
amanita has quit [Remote host closed the connection]
sambao21 has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codabrink has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jdj_dk has joined #ruby
Hanmac has joined #ruby
<wasamasa> wat
<wasamasa> >> (0.0/0.0).to_s * 16 + " Batman!"
<eval-in__> wasamasa => "NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN Batman!" (https://eval.in/173072)
<wasamasa> much truer to the original
nateberkopec has joined #ruby
<eam> to many Ns
Hanmac1 has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
<eam> >> 0 % (0.0 / 0.0)
<eval-in__> eam => 0.0 (https://eval.in/173073)
<eam> O_O
Barrayar has joined #ruby
jottr has joined #ruby
qhartman has joined #ruby
jheg has quit [Quit: jheg]
<shevy> no
<shevy> that is not as funny as it is in javascript
klaut has quit [Remote host closed the connection]
Zebroid has quit [Ping timeout: 264 seconds]
MrMic has quit []
britneywright has joined #ruby
saarinen has quit [Quit: saarinen]
sailias has quit [Quit: Leaving.]
bklane has joined #ruby
pdlug has quit [Quit: Leaving...]
grieg has joined #ruby
Vivekananda has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkope has joined #ruby
shlant has joined #ruby
<shlant> rubygems not resolving deps for anyone else?
<eam> >> [0.0,1,2] * ""
<eval-in__> eam => "0.012" (https://eval.in/173075)
washtubs has joined #ruby
bklane has quit [Client Quit]
dda has joined #ruby
end_guy has quit [Remote host closed the connection]
<eam> >> [0.0/0.0] * "wat" * 16 + " Batman!"
<eval-in__> eam => "NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN Batman!" (https://eval.in/173078)
yfeldblum has quit [Ping timeout: 250 seconds]
endash has quit [Quit: endash]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
axl_ has quit [Quit: axl_]
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dblessing has quit [Quit: dblessing]
kirun has quit [Quit: Client exiting]
yfeldblum has joined #ruby
Shidash has joined #ruby
testcore has quit [Ping timeout: 264 seconds]
nateberkope has quit [Ping timeout: 240 seconds]
nobodyzzz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Barrayar has quit [Quit: Leaving]
hmsimha has quit [Ping timeout: 256 seconds]
end_guy has joined #ruby
qwyeth has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
elaptics`away is now known as elaptics
SCommette has quit [Quit: SCommette]
jay has quit [Read error: Connection reset by peer]
nowthatsamatt has quit [Quit: nowthatsamatt]
asdasdasdasss has quit [Quit: Computer has gone to sleep.]
jay has joined #ruby
<shevy> MAN
<shevy> I just spent 15 minutes debugging
<shevy> why my class was not working
<shevy> def initalize
asdasdasdasss has joined #ruby
yacks has quit [Read error: Connection reset by peer]
timonv_ has quit [Ping timeout: 272 seconds]
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Georg3 has joined #ruby
Georg3 has quit [Client Quit]
keystonelemur has quit [Remote host closed the connection]
baweaver has joined #ruby
sixxy has joined #ruby
awkwords has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 250 seconds]
bricker`work has quit [Read error: Connection reset by peer]
Vivekananda_y510 has quit [Ping timeout: 264 seconds]
asdasdasdasss has quit [Ping timeout: 260 seconds]
DivineEntity has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 250 seconds]
codezomb has joined #ruby
gregf has joined #ruby
riotjones has quit [Ping timeout: 272 seconds]
<eam> >> ObjectSpace.each_object.select { |o| 0 / o != 0 rescue false}[0,16] * "" + " Batman!"
<eval-in__> eam => "NaN Batman!" (https://eval.in/173081)
MCDev has joined #ruby
<eam> what a sparse environment :(
treehug88 has quit []
axsuul has joined #ruby
crazydiamond has joined #ruby
shlant has left #ruby [#ruby]
ctp has joined #ruby
riotjones has joined #ruby
timonv_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bricker`work has joined #ruby
ffranz has quit [Quit: Leaving]
NinoScript has quit [Ping timeout: 240 seconds]
TheAtomicGoose has joined #ruby
nanoyak has joined #ruby
DrCode has quit [Remote host closed the connection]
NinoScript has joined #ruby
DrCode has joined #ruby
Trynemjoel has quit [Quit: Trynemjoel]
nanoyak has quit [Read error: Connection reset by peer]
Trynemjoel has joined #ruby
Vivekananda has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
djbkd has joined #ruby
jdj_dk has quit [Remote host closed the connection]
fabrice31 has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
senayar has quit [Read error: Connection reset by peer]
nmokru has joined #ruby
Xeago has joined #ruby
senayar has joined #ruby
Wolland has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
grieg has quit [Quit: Leaving]
Wolland has joined #ruby
baroquebobcat has joined #ruby
iamjarvo has joined #ruby
nowthatsamatt has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
JohnFord has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has quit [Quit: Computer has gone to sleep.]
andrewlio has quit [Remote host closed the connection]
<Eiam> argghhh
<Eiam> moving to Docker broke pry
* Eiam frowns
<Eiam> I hate new technology sometimes
bronson has quit [Quit: bronson]
geggam has quit [Remote host closed the connection]
<Eiam> shevy: bummer =( hate those errors they are the worst
<Eiam> eam: I had one in jQuery, sucess: function() { //why isn't it executing on success???
bruno- has joined #ruby
<Eiam> whoops, shevy ^
hobodave has quit [Read error: Connection reset by peer]
<shevy> hey
<shevy> that is javascript
<shevy> I am a ruby man, man
hobodave has joined #ruby
<shevy> and really old school
amargherio has quit [Remote host closed the connection]
<shevy> so old school that I use only irb
<shevy> or I just directly call methods from the commandline
Wolland has quit [Ping timeout: 260 seconds]
<shevy> I wrote a script called weather.rb the other day, which just tells me the current temperature in my current town
timonv_ has quit [Ping timeout: 250 seconds]
<shevy> if we could replace javascript with ruby, the world would be a better place
<Eiam> amen
alexju_ has quit [Remote host closed the connection]
<Eiam> =)
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa> are you guys sure about that?
[1]MCDev has joined #ruby
[1]MCDev has quit [Changing host]
[1]MCDev has joined #ruby
<dphase> 23222
<shevy> yeah wasamasa
<wasamasa> we'd no longer get to see stuff like runtime.js or webkit.js then
<Eiam> or batman.js
djbkd has quit [Quit: My people need me...]
<shevy> those are impossible to do in ruby?
alexju has joined #ruby
mbwe has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
MCDev has quit [Ping timeout: 250 seconds]
[1]MCDev is now known as MCDev
<elaptics> seen http://opalrb.org/ ?
<momomomomo> decaf vs opal
mary5030 has quit [Remote host closed the connection]
<momomomomo> or, just learn the good parts of javascript
<elaptics> momomomomo: that won't take long :)
alexju has quit [Remote host closed the connection]
<Eiam> its a thin book =)
hmsimha has joined #ruby
<momomomomo> he also has a talk on some front end screencasts site
snath has quit [Ping timeout: 264 seconds]
senayar has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
qhartman has quit [Quit: Ex-Chat]
senayar has joined #ruby
enebo has quit [Quit: enebo]
<momomomomo> in any case, I'm sitting at a large corporate office, compiling an old vb app
<momomomomo> deploying it to their 'development' then 'qa' (which no one QAs), then 'production' server
mikepack_ has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
<Eiam> javascript: the bad parts is a really big book
<shevy> lol
Lewix has joined #ruby
<momomomomo> Eiam: no, I believe that's "people who don't understand how to avoid javascript pitfalls or callback hell"
<Eiam> momomomomo: also known as, most javascripters ?
<Eiam> the language doesn't help itself here
lw has joined #ruby
elaptics is now known as elaptics`away
<Eiam> you can blame the people all you want but, the language does a terrible job of guiding you into anything sane
lw has quit [Max SendQ exceeded]
SilkFox has joined #ruby
<Eiam> worse, its many peoples first language
<shevy> not so sure
<momomomomo> agreed, but if you use it consistently in app development on the front end, you should no longer be making these mistakes
lw has joined #ruby
<shevy> I know a few people who get exposed to javascript when doing e. g. php, which then often gets to be their first language
<momomomomo> or at least, be guarded when using it
<Eiam> momomomomo: sure, and I don't, but I still don't really "enjoy" using the language.
<momomomomo> I never said you had to :p
<shevy> you love javascript
<shevy> admit it
saarinen has joined #ruby
<shevy> it's ok to do so
benzrf is now known as benzrf|offline
<Eiam> do not, you take that back!
<shevy> it could be worse
<shevy> php
<shevy> phpscript
<shevy> embeddable php in javascript
<momomomomo> I'm not a big fan, but I've used it for years -- since I was like ~12, and it's just not that bad
freggles has quit [Remote host closed the connection]
<shevy> ok don't admit too much man!
Lewix has quit [Remote host closed the connection]
<shevy> say something neutral
<shevy> like
<shevy> "it pays the bills"
<shevy> or
<shevy> "it kills kittens"
<bootstrappm> for a second I thought I was hanging out in the javascript IRC and was suprised at the # of ruby fans :D
<Eiam> momomomomo: as the language thats a gateway language, javascript is an embarrassment. =)
mikepack has quit [Ping timeout: 240 seconds]
<momomomomo> ha bootstrappm
<Eiam> bootstrappm: =p
<shevy> well that's a point
<sixxy> guys, pardon the silly question, but i just started learning javascript, and i'm wondering what the best way to practice coding is; in ruby you have irb and you can save a .rb file and run it in the terminal... in javascript, do i have to make an empty html file and paste my code in there? or is there something else i can do that's less tedious?
<shevy> coffeescript was inspired by ruby too or?
senayar has quit [Ping timeout: 240 seconds]
<shevy> and there is this opalrb thingy
SCHAAP137 has quit [Remote host closed the connection]
<Eiam> sixxy: just open the browser console? =)
<shevy> sixxy you can save it in .js files
<shevy> yeah, you can probably run it in some firefox web console thing
<Eiam> sixxy: you can also use node
Shidash has quit [Read error: Connection reset by peer]
<momomomomo> sixxy: if you really want to try messing around with some given code, open up firefox/chrome and load up the developer console
<Eiam> e.g. brew install node; node
<shevy> sixxy less tedious? hahahahaha no there is not! :D
<momomomomo> I prefer firebug still
<momomomomo> that'll act as a 'terminal'
Eulipion has left #ruby [#ruby]
<shevy> Eiam that does not work for linux users :(
<momomomomo> apt-get install nodejs
<Eiam> shevy: people use something other than os x? =p
TheAtomicGoose has quit [Quit: WeeChat 0.4.3]
<momomomomo> yum install nodejs
jobewan has joined #ruby
<sixxy> i have nodejs for my rails app
<shevy> does apt-get install nodejs really work??
<sixxy> hmm, never used it apart from a gem dependency
<j_mcnally> momomomomo: /configue && make && make install
<j_mcnally> momomomomo: lol
<j_mcnally> shevy: its usually super out of date
testcore has joined #ruby
<shevy> wow
<shevy> it works
baroquebobcat has quit [Quit: baroquebobcat]
<shevy> I can not believe this
<j_mcnally> shevy: why not?
<momomomomo> j_mcnally: not that bad though for node
<shevy> cuz this is debian
<momomomomo> or, at least for my uses
northfurr has joined #ruby
<shevy> it's a server OS!!!!!!!
<sixxy> so i opened nodejs, i declared a variable and it returns 'undefined'
<shevy> sixxy haha
<momomomomo> nodejs is often used just for the javascript runtime
<j_mcnally> shevy: isnt nodejs a server language ?
<shevy> sixxy you are a javascript nooooob
<sixxy> obv
<sixxy> i'm a programming noob in general :<
<shevy> doesn't javascript force var bla
<shevy> nono sixxy
<momomomomo> sixxy: in javascript, just declaring a variable sets it to undefined
<shevy> sixxy ruby is poetry
<momomomomo> it doesn't initialize it ot a zero value
<shevy> omg
dangerousdave has joined #ruby
<shevy> do you really want to go down that rabbit hole sixxy ...
<sixxy> that was an accident
<shevy> javascript OOP
<shevy> no wait
<shevy> it is "prototypic" OP
<j_mcnally> shevy sixxy momomomomo : https://github.com/opal/opal-node
<momomomomo> j_mcnally: my brain
<shevy> HTTP::Server.start 3000 do [200, {'Content-Type' => 'text/plain'}, ["Hello World!\n"]]
<shevy> j_mcnally they stole rack!
<shevy> and uglified int too
<shevy> what
<shevy> the fuck:
<shevy> server = new `function(request, response) {
yfeldblum has quit [Remote host closed the connection]
fold has quit [Ping timeout: 240 seconds]
<j_mcnally> hahaha, i think its an example of how to implement rack in opal / node
rubytor has joined #ruby
<shevy> ok that explains the first part
<momomomomo> I like how it's just interpolated javascript
<shevy> but the new 'function stuff, now that's ...
<shevy> what is that...
<shevy> >> def new; puts 'hmm'; end; new
<j_mcnally> i dont think its feature complete
<eval-in__> shevy => hmm ... (https://eval.in/173083)
<shevy> aha
<shevy> it is just a method?
<shevy> now that got me tricked for a moment
<j_mcnally> back ticks denote raw js
<shevy> cool
Vivekananda_y510 has joined #ruby
<shevy> that's actually creative
dangerou_ has quit [Ping timeout: 250 seconds]
<sixxy> hm so whoever suggested nodejs as an irb like thing for JS, that's nice
<j_mcnally> sixxy: whats wrong with chrome's developer tools tho?
<momomomomo> >> -> { p 'h' + 'm'*2 }[]
<eval-in__> momomomomo => "hmm" ... (https://eval.in/173084)
johnmolina has quit []
<sixxy> j_mcnally, to be honest i'm so much of a noob i can't find out where to write my code there, and i like my sublime setup and skin
<Eiam> sixxy: =) yw
<Eiam> sixxy: you may want to try ##javascript
<Eiam> as they are more likely to ya know, do it for a living.
matchaw has quit [Remote host closed the connection]
MCDev has quit [Ping timeout: 250 seconds]
<sixxy> yeah but you guys are nicer
<Eiam> there is a sublime text plugin that gives you a REPL at the bottom
<sixxy> and ruby > js
<Eiam> we are, I know =)
moted has joined #ruby
<bootstrappm> sixxy, thats why I love ruby + community :)
<sixxy> coool Eiam
<bootstrappm> no matter where i go they're always nicer
hobodave has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
<shevy> sixxy write ruby and let ruby generate the javascript you need
matchaw has joined #ruby
bootstrappm is now known as frank_
<sixxy> haha, to be honest i just got started programming about a month and a half ago, i started practicing a lot to attend appacademy's Rails course, ended up being accepted (!) and then realized i didn't have the bank to go live in SF for the duration of the program
r3zn0r has joined #ruby
<sixxy> now i'm second guessing my goal of learning rails as a whole, and kind of going towards JS because my programmer friends say it's the way to go
<sixxy> but i really like ruby.
<shevy> back in the days we learned ruby through IRC!
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> well
<shevy> thankfully I started with ruby before rails even existed
<shevy> I used php before ruby :(
<momomomomo> sixxy: I highly recommend not going with nodejs
<Eiam> as a REPL???
<frank_> I still use php too, laravel makes it ok
<momomomomo> no, as in comparing nodejs vs rails
<Eiam> oh
<Eiam> hell no @ nodejs as a backend =0
<Eiam> use Sinatra or something
hmsimha has quit [Ping timeout: 250 seconds]
mikepack_ has quit [Remote host closed the connection]
<Eiam> =)
<frank_> sixxy, come to Guatemala and learn Rails :P Cheap cost of living
nateberkopec has joined #ruby
<sixxy> lol :P
charliesome has joined #ruby
mikepack has joined #ruby
<momomomomo> frank_: that's not bad; I've been considering moving out of state to travel and work contractually
<sixxy> i'm at such a point of noobery that i don't even fully grasp the scope of what i'm learning/what i want to do/any goals
<momomomomo> sixxy: why not learn via a class: cs50.net
<momomomomo> it's an intro to CS
<sixxy> i meant in terms of languages, like why node, why rails, why not something else?
<sixxy> what do i want to do? i'm not so sure of that
<sixxy> but i really enjoy the mindset of programming
<momomomomo> it depends what you want to do; I'd say right now most apps target the web
<momomomomo> so, rails / ruby is a great place to start
<sixxy> right, and rails seemed like a good start
<sixxy> ^
<momomomomo> if you find you need more performance, you may upgrade to java, jruby, go, c++, etc
<frank_> sixxy, I always says ruby to start because its the most intuitive. You hit the unintuitive stuff pretty late relative to other languages
edgarjs is now known as edgarjs_afk
<momomomomo> but that, for you, is wayyy down the road
asdasdasdasss has joined #ruby
<sixxy> what kind of apps do you develop, momo?
<momomomomo> all sorts; a lot of web apps for managing business processes, some machine learning apps ; lots of APIs and fanciful javascript
<sixxy> *_*
<momomomomo> on the front end, that is, with JS - angularJS, d3
<sixxy> so dreamy
blackmesa has quit [Ping timeout: 256 seconds]
<sixxy> what would you suggest as a good short term goal with rails?
rubytor has quit [Quit: No Ping reply in 180 seconds.]
<momomomomo> sixxy: here's a good idea: http://tryruby.org/levels/1/challenges/0
rubytor has joined #ruby
<sixxy> i'm so deep into all these rails tutorials, big books, that i'm stuck in exercises and examples and getting discouraged with finding its real world applications
<frank_> yeah that ^ learn ruby stuff before rails
<momomomomo> then, the free e-book sixxy http://www.railstutorial.org/
<sixxy> oh yeah, i did a lottt of ruby stuff as prep for that course
<sixxy> rubykoans etc
<frank_> the blocks will really get you if you don't understand them eearly on
<momomomomo> sixxy: just go through the railstutorial
<sixxy> i'm on that railstutorial right now
nateberkopec has quit [Ping timeout: 240 seconds]
<frank_> oh nice, then make a todo list! that seems to be the goto lately
<momomomomo> 2 hours a day minimum - of actually learning and doing the exercises, not page flipping
<momomomomo> that'll get you going
jobewan has quit [Ping timeout: 264 seconds]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Georg3 has joined #ruby
<sixxy> i think i got discouraged a bit then started learning javascript to get away from it
<sixxy> kind of weird
<Eiam> Mon_Ouie: have you used pry-remote with docker?
enebo has joined #ruby
<momomomomo> sixxy: many people work only on the front-end, doing html/javascript/css designy sort of stuffs
exgf has quit [Remote host closed the connection]
lw has quit [Quit: s]
Shidash has joined #ruby
<frank_> sixxy, want some work to get going? we have some non-urgent/mission critical work that you could get your hands dirty w/ at http://ayalo.co
<sixxy> i guess i haven't really figured out what suits me best
asdasdasdasss has quit [Client Quit]
exgf has joined #ruby
<momomomomo> frank_: are you offering a job? nice
terryb has joined #ruby
asdasdasdasss has joined #ruby
<frank_> mhm, contract work
<sixxy> frank_ : depends on what it entails
<sixxy> i'm really intermediate
<momomomomo> nice, lucky you sixxy
<momomomomo> and very nice frank_
<momomomomo> +1 internet points
<sixxy> but if you can give me something to get motivated, i'd do my best to learn ++
<frank_> ahaha thanks
<frank_> depends what you're comfortable with, take a look at the site first, its mobile only
<frank_> we do classifieds for mass market in emerging markets. Think Craigslists for feature phones
bradleyprice has quit [Remote host closed the connection]
<sixxy> i'm checking it out
<momomomomo> adios all
bradleyprice has joined #ruby
<sixxy> goodbye momo
<frank_> Right now we're pivoting to focus more on retailers, display their catalogs/the weeks offers on phones
momomomomo has quit [Quit: momomomomo]
<frank_> see ya momomomomo
<frank_> see ya momomomo
<frank_> *
<frank_> re-writing our whole admin interface in rails, it was in padrino previously
Georg3 has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
<frank_> we have two pure ruby devs, myself and one other guy as well as a local company (juntostudio.com) that occasionally jumps on a project or two
jobewan has joined #ruby
<sixxy> cool
jottr has quit [Ping timeout: 272 seconds]
<sixxy> it'd be good experience for me, that's for sure
ghr has joined #ruby
doritostains has quit [Quit: doritostains]
<sixxy> i'm in a position right now where i can afford to spend a lot of time learning for the sake of learning
axsuul has quit [Ping timeout: 240 seconds]
asdasdasdasss has quit [Ping timeout: 240 seconds]
Wolland has joined #ruby
<frank_> moving to PM
arya_ has joined #ruby
<Eiam> Mon_Ouie: well, it works, so thats good =)
Xeago has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 272 seconds]
terryb has quit [Remote host closed the connection]
terryb has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
ghr has quit [Ping timeout: 260 seconds]
tokik has joined #ruby
dangerousdave has quit [Ping timeout: 256 seconds]
knite has joined #ruby
sdouglas has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
doritostains has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
terryb_ has joined #ruby
terryb has quit [Ping timeout: 250 seconds]
hmsimha has joined #ruby
<knite> I’m on a relatively fresh OS X Mavericks and my ruby appears to be broken. ruby -v is 2.0.0p451. ruby hangs, ruby -w hangs, ruby -d says rubygems/defaults/operating_system and defaults/ruby are missing files. what have I done, can I fix it, and should I just brew install ruby instead?
kachi8 has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
lw has joined #ruby
rubytor has joined #ruby
kevind has quit [Quit: kevind]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wallerdev> what do you expect ruby -w to do
<jhass> knite: they don't hang, they wait for input
<wallerdev> you like type
<wallerdev> puts 'hi'
<wallerdev> then press enter and ctrl+D
<wallerdev> should work
<knite> ah, I was expecting a REPL with a prompt. :-)
<wallerdev> try irb
bruno- has joined #ruby
subraminion_ has quit [Quit: Lingo - http://www.lingoirc.com]
AlexRussia has quit [Quit: No Ping reply in 180 seconds.]
baweaver has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ruby
JBreit has left #ruby ["Leaving"]
dayepa1 has quit [Read error: Connection reset by peer]
sputnik1_ has joined #ruby
harshjha has joined #ruby
<harshjha> I get error with this - gz = Zlib::GzipReader.new(open("http://www.amazon.com/sitemaps.f3053414d236e84.SitemapIndex_0.xml.gz"))
<harshjha> but this works file - gz = Zlib::GzipReader.new(open("sitemaps.f3053414d236e84.SitemapIndex_0.xml.gz"))
orionstein is now known as orionstein_away
GriffinHeart has joined #ruby
timonv_ has joined #ruby
<harshjha> I mean after downloading file and then using it works fine
<harshjha> In first case I get "Zlib::GzipFile::Error: not in gzip format"
<harshjha> what can be the issue?
orionstein_away is now known as orionstein
bruno- has quit [Ping timeout: 250 seconds]
<harshjha> havenwood, jhass
SilkFox has quit [Ping timeout: 272 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
icarus_ has quit [Ping timeout: 240 seconds]
<wallerdev> you probably need to do .read
<wallerdev> or something
<wallerdev> probably doesnt support using open-uri
Takle has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 250 seconds]
timonv_ has quit [Ping timeout: 260 seconds]
<harshjha> wallerdev: .read with open?
<wallerdev> yeah just download it to a string and then use gunzip it from that or somethin
jrichocean has joined #ruby
asdasdasdasss has joined #ruby
<harshjha> wallerdev, gzip won't work on string
<jrichocean> hey i was curious if anyone out there is a freelancer?
terryb_ has quit [Remote host closed the connection]
terryb has joined #ruby
<frank_> I think sixxy just became one haha :D
<wallerdev> maybe use StringIO, not sure haha
lyuzashi has joined #ruby
havenwood has quit [Remote host closed the connection]
tacos1de has quit [Remote host closed the connection]
rkazak has joined #ruby
<wallerdev> or save to a temp file
marahin has quit [Quit: ZNC - http://znc.in]
<landodger> ahhh why do people lie and exaggerate so muchhh!!!
tacos1de has joined #ruby
havenwood has joined #ruby
<harshjha> wallerdev, ya that can be done, but I want to skip that extra step
<landodger> "the printer is fried, its leaking everywhere and going crazy!!" ... rush to office since everyone else is retarded and its a paper jam!
<wallerdev> well it sounds like gzipreader is limited so you have those two options
hmsimha has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #ruby
<wallerdev> printers are trouble
<wallerdev> i work next to a printer
<wallerdev> and 50% of the time something is wrong with it
<landodger> yet 90% of time something is 'wrong' its luser related issues
renderful has quit [Remote host closed the connection]
<landodger> i cant say how many times someone wallks in my office saying we need toner, i say hold on log into printer and its 70% full and hasnt issues any messages in like a year
<wallerdev> well why dont you get a job programming then instead of fixing printers
sdouglas_ has joined #ruby
<wallerdev> lol
renderful has joined #ruby
terryb has quit [Ping timeout: 250 seconds]
mrsolo has quit [Quit: Leaving]
<landodger> lol, i want a full time programming job, atm doing everything
Neomex has quit [Read error: Connection reset by peer]
<landodger> small businesses suck!
jhass is now known as jhass|off
<landodger> especially ones in the financial industry
<eam> program in postscript
sdouglas has quit [Ping timeout: 272 seconds]
<wallerdev> yeah its rare to find a small business that has the tech side of things down unless its specifically a tech company
<landodger> yeah
<landodger> atleast all the crap i deal with makes for some good reddit posts lol
<wallerdev> someone is right next to me right now trying to figure out why the printer wont print
<wallerdev> probably needs paper lool
<landodger> lol
rkazak has quit [Ping timeout: 256 seconds]
chrishough has joined #ruby
havenwood has quit []
<Norrin> ruby in finance eh?
<landodger> havnt put it to use much at this job
asdasdasdasss has quit [Ping timeout: 240 seconds]
<landodger> used it other day just yanking information out of some huge reports to format it to import into another database
<landodger> thats about as much use as i get though
dda has quit [Quit: logging out.]
Shidash has quit [Quit: Leaving.]
moritzs has joined #ruby
renderful has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ciao.]
terryb has joined #ruby