<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
<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
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
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...
<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]
<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?
<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;
<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>
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?
<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?
<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
<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]
<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
<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>
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>
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..
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?
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
<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
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>
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!"]
<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
<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
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?
<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
<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 :-)
<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`
<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.
<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 :(
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)
<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]
<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.
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 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')
<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
<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.
<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>
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]
<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 ...
<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.]
<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
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. :-)
<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]