havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
railswebdev has joined #ruby
tau has quit [Remote host closed the connection]
Patadas has joined #ruby
dcluna has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
Pepu has quit [Ping timeout: 260 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AnoHito has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
_main_ has joined #ruby
mrconfused has quit [Ping timeout: 240 seconds]
herbmillerjr has quit [Remote host closed the connection]
__main__ has quit [Ping timeout: 260 seconds]
_main_ is now known as __main__
nertzy has quit [Ping timeout: 255 seconds]
im0nde has quit [Ping timeout: 276 seconds]
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
_whitelogger has joined #ruby
zacts_pi has quit [Ping timeout: 276 seconds]
marr has quit [Ping timeout: 276 seconds]
ascarter has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railswebdev has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has quit [Ping timeout: 240 seconds]
SeepingN has quit [Remote host closed the connection]
dcluna has quit [Ping timeout: 260 seconds]
mikeiniowa has quit [Remote host closed the connection]
mikeiniowa has joined #ruby
jak_ has quit [Remote host closed the connection]
jak_ has joined #ruby
umaaji has joined #ruby
nirix has joined #ruby
marxarelli is now known as marxarelli|afk
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
ResidentBiscuit has joined #ruby
cdg has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ule has joined #ruby
comet23 has joined #ruby
<comet23> is there a list that has all the methods senior devs should have memorized in 2017?
cdg_ has quit [Ping timeout: 260 seconds]
gnufied has quit [Quit: Leaving]
cdg has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
mitki has joined #ruby
brent__ has quit [Remote host closed the connection]
railswebdev has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
t-recx has quit [Quit: t-recx]
Cohedrin_ has joined #ruby
<mitki> is there any way to ensure the second loop only runs one time for each? https://pastebin.com/raw/NkqLV0aB
<ruby[bot]> mitki: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<mitki> I mean I'm expecting ==> 1 a 2 b 3 c 4 d ....
GodFather has joined #ruby
<elomatreb> mitki: Not like that, but you can construct an array of pairs that does what you need using Array#zip
jameser has joined #ruby
jphase has quit [Read error: Connection reset by peer]
jphase has joined #ruby
jak has joined #ruby
jak_ has quit [Read error: Connection reset by peer]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mitki> it works thank you
ecuanaso has joined #ruby
GinoMan2440 has joined #ruby
Coldblackice has joined #ruby
Coldblackice is now known as Guest77146
Guest77146 has quit [Client Quit]
jak_ has joined #ruby
<Fenhl> hello, I recently updated my server to Debian jessie and now one of the web apps I'm running on it won't work anymore. It's the only one that uses Ruby and I'm a bit lost since I don't really work with the language at all
jak has quit [Read error: Connection reset by peer]
<Fenhl> this is the error message I get when I follow the instructions: rack-2.0.3 requires ruby version >= 2.2.2, which is incompatible with the current version, ruby 2.1.5p273
<Fenhl> the code in question is at https://github.com/taw/magic-search-engine
ule has quit [Read error: Connection reset by peer]
<Fenhl> both `ruby --version` and `sudo ruby --version` output ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
zacts_pi has joined #ruby
mim1k has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
astrobunny has joined #ruby
jottr has joined #ruby
ascarter has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 255 seconds]
uZiel has joined #ruby
tgragnato has left #ruby ["Sto andando via"]
d^sh has joined #ruby
ascarter has quit [Ping timeout: 276 seconds]
Pepu has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
d^sh_ has quit [Ping timeout: 240 seconds]
snowcrshd has quit [Remote host closed the connection]
graft has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
patadas has quit [Ping timeout: 260 seconds]
graft has joined #ruby
graft has joined #ruby
railswebdev has joined #ruby
jak__ has joined #ruby
jak_ has quit [Read error: Connection reset by peer]
zacts_pi has quit [Quit: WeeChat 1.9]
astrobunny has quit [Remote host closed the connection]
graft has quit [Ping timeout: 260 seconds]
astrobun_ has joined #ruby
jnollette has quit [Quit: ZNC 1.6.5 - http://znc.in]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astrobun_ has quit [Remote host closed the connection]
xall has joined #ruby
planigan has quit [Ping timeout: 255 seconds]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sunrunner20> ... is ruby space sensitive?
<Radar> sunrunner20: depends
<Radar> got some code we can talk about?
<sunrunner20> let me pull up the screenshot
<comet23> what are the methods every senior developer should have memorized?
<Radar> Worth noting that a/m/n has different behaviour to a<space>/m/n
dcluna has joined #ruby
<Radar> comet23: Enumerable
<Radar> sunrunner20: yunogst
<Radar> gist*
<sunrunner20> a sr developer is not measured in the shit they have memorized
<Radar> sunrunner20: shhhh comet23 doesn't know that yet
<sunrunner20> I'm always stunned by some of the mistakes our sr developers make
<sunrunner20> "sr"
<comet23> so it's a total of 55 methods right?
<elomatreb> It's not space sensitive like Python if that's what you mean, indentation is purely visual
<comet23> when you memorize things you can start actually being creative and not trip up on the docs every 12 seconds
<comet23> and memorization is good for your brain
bmurt_ has joined #ruby
<sunrunner20> uselessly memorizing every function is time wasted where you could be doing better stuff
<comet23> it's not useless, think of it as knowing what tools to use when you need to get the job done
<elomatreb> Enumerable is really useful in Ruby, but just going in and memorizing the methods is not going to be very helpful
bmurt_ is now known as bmurt-
<Radar> comet23: hi I've been doing this for 11 years almost and I still look up stuff in the docs
<Radar> No one person can remember all the useful methods
bmurt- is now known as bmurts
<Radar> AND I also get flatten + compact mixed up near weekly
bmurts is now known as bmurt--
<comet23> you don't just memorize every method, you just memorize all the useful methods by using them
<Radar> sunrunner20: your code seems fine
<sunrunner20> I've been doing various languages for 17yrs
genpaku has quit [Remote host closed the connection]
__Yiota has joined #ruby
<sunrunner20> Radar, and yet it didn't work :|
<matthewd> comet23: Being able to recall more things is useful, but there isn't a "now you're senior" checklist
<Radar> ?didntwork
<ruby[bot]> What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
<Radar> comet23: yes, you get good at recalling things the more times you recall it. NEXT TIME ON PSYCHOLOGY 101.
jak__ has quit [Read error: Connection reset by peer]
jak has joined #ruby
<comet23> lol
<sunrunner20> Radar, chef didn't see it and so the rspec tests failed
charliesome has joined #ruby
<Radar> sunrunner20: "didn't see it"
<Radar> :thinking_face:
<comet23> like detect and find are the same method, so you use the one that reads more like american
<Radar> comet23: everyone knows detect is the right method to use
<Radar> especially seniors
<Radar> after the Great Detect / Find War of '08
genpaku has joined #ruby
<sunrunner20> as in string.find()?
<Radar> and "collection.each do |thing|" is preferred over "for thing in collection"
<sunrunner20> returns -1 if it doesn't find it?
<Radar> sunrunner20: there is no String#find
<Radar> sunrunner20: Waiting for you to provide something useful wrt to debugging your problem.
dcluna has quit [Ping timeout: 276 seconds]
<Radar> just fyi ps btw
<comet23> i'll be a junior dev with senior dev skills i should be able to get a promotion quickly or leave and go to a company that will pay me more eventually and let me grow
<Radar> comet23: sigh
<Radar> This long term thinking is doing nobody good.
hahuang65 has quit [Read error: Connection reset by peer]
<Radar> "OMG I WANT TO KNOW WHAT I NEED TO KNOW 10 YEARS FROM NOW"
<Radar> Yeah, so does everyone.
<Radar> how about you just focus on things that you want to learn now? as you need them?
<comet23> long term thinking is important
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<comet23> that's a paradox
<comet23> you don't know what you need until you need it and you won't know what you need unless you know what is available
<sunrunner20> long term goals are important
<comet23> so off to memorizing every method i go
<Radar> great glhf]
<sunrunner20> you need to evaluate yearly what will get you to that 10yr goal
nobitanobi has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sunrunner20> if your early in your career
<matthewd> comet23: Noone is measured by which methods they have memorized. If you do that, you will not have "senior dev skills", any more than memorizing a dictionary gives you "published author skills".
<sunrunner20> 5yrs/6mo
<elomatreb> Learn to predict the future, that's a great long term goal
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
Rodya_ has joined #ruby
<comet23> matthewd you're missing the point about memorizing every method
<Radar> comet23: what exactly is the point, pray tell?
JoshS has joined #ruby
<comet23> so you can be creative and not trip up on the docs every 10 seconds
<sunrunner20> are you brand new to programming?
<Radar> Hey so I've got this app open in my dash and it's _fixed_ there, it's called Dash
<Radar> It contains the documentation for every programming language I use
<Radar> if there is a day where I do not open that app, I will let you know
<sunrunner20> you sound like it tbh
wilbert has joined #ruby
<elomatreb> I never sat down to memorize the Enumerable docs yet I use them without looking them up daily
<elomatreb> It's a matter of practice
<sunrunner20> ^
<Radar> If you're opening the docs every couple of seconds then at least you're reading the docs. That'll get less frequent the more you practice coding.
__Yiota has joined #ruby
<Radar> comet23: asl btw
<Radar> out of curiosity more than anything
jnollette has joined #ruby
<comet23> or you could have spent an hour memorizing 55 methods, that's a little over a minute on each method twice a day for 5 days and keep practicing them on a daily basis and you would have gotten to where you are now faster
<arahael> elomatreb: I always check the api, frequently.
<sunrunner20> your time is much better spent finding a $languageofchoice project on github that has more open issues that developers
<matthewd> I still open the Enumerable docs frequently
* arahael is a polyglot dev, and the number of times languages are subtly different is infuriating.
<elomatreb> I'm thinking of the simpler things, but of course
<sunrunner20> find an easy issue and fix it
<Radar> arahael: tell me about it ;) I keep putting "do" after method defs in Ruby.
<comet23> i'm not saying memorize all the methods of a language, jus the most important ones that won't change and the ones that are idiomatic
<sunrunner20> I keep typing do{
<arahael> Radar: I wasted hours on a .NET project, because stupid sockets were auto-closing. I miss RAII. :(
<sunrunner20> idk if it'll work
nobitanobi has quit [Ping timeout: 240 seconds]
<Radar> comet23: how is Delray Beach this time of year?
<elomatreb> select/map/inject, maybe some others like group_by and zip and you're good to go most of the time. Most of these also transfer readily into other languages
<sunrunner20> arahael, I wasted 50hrs trying to get PHP to set a cookie on my local dev box
<sunrunner20> gave up and uploaded the page to prod and it worked
<Radar> map vs collect was explained elegantly to me: collect when you want to _collect_ a value from all elements of an array, map when you want to perform an operation on each element.
<sunrunner20> I stopped programming at all for about a year
<Radar> (I still use map for both tbh)
railswebdev has joined #ruby
<elomatreb> sunrunner20: secure cookies can behave weirdly with some softwares for local domains
<sunrunner20> was a plain old regular cookie
<sunrunner20> before secure cookies existed iirc
<sunrunner20> this was like 2003
<sunrunner20> started programming as a literal kid
<sunrunner20> like 10yrs old
<arahael> Those were the days.
<arahael> I wrote a drawing app, in QBasic.
<sunrunner20> restarting college for a formal SE degree this fall
Andrevan has joined #ruby
amclain has quit [Quit: Leaving]
bmurt-- has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sunrunner20> I should have had a CS degree from a prestegious college and was like "I don't want computers to stop being fun so I'll do something else as a job"
<sunrunner20> lost a full ride to that decision
<arahael> It's really no big deal.
<arahael> Most of your learnings are on the job/hobby, anyway.
<arahael> (On the hobby, really - so to speak)
<sunrunner20> the SE degree should be a breeze
<sunrunner20> except for calculus
<elomatreb> Software Engineering or "actual" computer science?
<sunrunner20> software engineering
<elomatreb> Good, because CS is mostly maths, certainly not what you want if you have fun programming. Still interesting though
jak has quit [Remote host closed the connection]
<sunrunner20> I'm doing it for the paper
snowcrshd has joined #ruby
<arahael> I hate the title "software engineering", particularly when said degree isn't an engineering degree. :(
jak has joined #ruby
<sunrunner20> my 6mo goal in 5yr plan is new job
<comet23> Radar why do you care
<Radar> comet23: just making conversation
<sunrunner20> just told a recruiter i'd take a 5k/yr hit to be on an established team
<elomatreb> People actively asking for things to memorize certainly is not the usual
<comet23> oh usually people say that when they're upset at something or trolling or about to dox or something but not to make conversation lol
gil_- has quit [Ping timeout: 240 seconds]
<comet23> it's humid
zacts has joined #ruby
<sunrunner20> I don't think I've ever memorized something intentionally for programming in my life
<Radar> yeah of course it's florida
<sunrunner20> comet23, dfw
<Radar> and p.s. the only place where you're expected to be able to recall any method / api / algo is a really shitty interview.
<sunrunner20> and my AC unit is oversized :(
<comet23> what is dfw?
<Radar> One of the first things I tell anyone we interview here is that they can look up things in the docs if they want.
<sunrunner20> dallas fort worth metroplex
Pepu has quit [Ping timeout: 276 seconds]
grymmjack has quit [Ping timeout: 240 seconds]
<sunrunner20> I read through some programmer review questions once
<arahael> Radar: To be fair, it's a good proxy to for familiarity, particularly if you want someone for a specific language and project.
<sunrunner20> only ones I failed were math heavy
gil_ has joined #ruby
gil_ has joined #ruby
gil_ has quit [Changing host]
<Radar> arahael: Sure, I can quiz you on things but I'm not going to prevent you from looking it up in docs or trying it on a console
<sunrunner20> I will admit
<Radar> arahael: If you spend all your time going back to the console / docs then I'll probably judge based on that.
<Radar> bbl, lunch
<arahael> Radar: That's fair.
snowcrshd has quit [Ping timeout: 276 seconds]
<sunrunner20> I pickup a book or two on any new language I need to know and throughly skim it
ResidentBiscuit has quit []
<arahael> Well, I spend all my time going to the docs...
<arahael> Which is why I have dual screens!!!
<sunrunner20> I won't remember exactly the answer, but I'll remember what to google.
<arahael> Good enough.
<bazzy> Docs are everything <3
<arahael> I also have an O'Reilly "cookbook" on my left.
<arahael> Today I had to figure out how to wait for 2 seconds, in .NET :(
<comet23> what you need to do is get a subscription to safari books
ascarter has joined #ruby
<comet23> it's amazing
<sunrunner20> Archrover, threading.thread.sleep(2000) iirc
<arahael> comet23: Irrelevant... Whatever book I want, I ask my boss. He passes it to the team assistant, and she gets it.
jottr has joined #ruby
<arahael> sunrunner20: Incorrect, that'd deadlock the program.
<comet23> ?
<arahael> (For 2 seconds)
<comet23> i thought you were talking to me
<comet23> safari books is my favorite learning site
astrobunny has joined #ruby
<comet23> they have every technical book
<sunrunner20> how do you do it without a deadlock then?
<comet23> from every publisher
<arahael> sunrunner20: "It depends". :(
<sunrunner20> lol
<arahael> sunrunner20: Hence why I use a cookbook in this case - turned out to be Task.Delay(2000)
<sunrunner20> sleep for 10ms then compare to an elapsed time lol
astrobunny has quit [Remote host closed the connection]
<arahael> sunrunner20: If you use sleep directly, nothing else can run on that thread.
<sunrunner20> work has a hilariously optimized application.
<sunrunner20> but its literally on the bottom of my todo list
<sunrunner20> *unoptimized
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
<sunrunner20> it queries a table one row at a time for 260k rows... then selects on another table based on that result
enterprisey has quit [Quit: Leaving]
<sunrunner20> might be even worse
ascarter has quit [Ping timeout: 255 seconds]
<arahael> It's only 260k rows. Not a problem.
<sunrunner20> iirc the thing makes 7 or 8 queries for one record
<sunrunner20> *result
<sunrunner20> takes 2hrs to run
astrobunny has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
<sunrunner20> has to be run weekly. SO come in monday morning, login, start the program, and get my ice
<arahael> sunrunner20: Setup a cronjob. Done.
<sunrunner20> arahael, WCF application
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sunrunner20> err
<sunrunner20> WPF
<arahael> Well, schedule it for auto-run, then.
dcluna has joined #ruby
<sunrunner20> can't without additional programming, which that department has no funds for development.
<sunrunner20> I tried to get 4hours last week and got shot down
<arahael> sunrunner20: First rule of programming: Someone else has very likely already done it.
dcunit3d has joined #ruby
<sunrunner20> thats not the issue
GinoMan2440 has quit [Ping timeout: 276 seconds]
<sunrunner20> its a GUI app not a CLI that has like 6 options
<sunrunner20> I'd have to add in a CLI
<sunrunner20> it'd be less time to expose a CLI
<arahael> Maybe.
rohitpaulk has joined #ruby
ecuanaso has joined #ruby
dcunit3d has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 276 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby635 has joined #ruby
<ruby635> hey hey all
govg has joined #ruby
brent__ has joined #ruby
<ruby635> anyone around?
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb> Hi, yep
<ruby635> I have a rails question is this the right place to ask those question?
<elomatreb> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<ruby635> ruby on rails
ruby635 has left #ruby [#ruby]
__Yiota has joined #ruby
mrconfused has joined #ruby
railswebdev has joined #ruby
arescorpio has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
<comet23> what is it called when you want to assign a new copy of a variable?
<comet23> instead of pointing
<elomatreb> ... copying? Or maybe cloning, or after the method duping?
<comet23> i wasn't sure
<comet23> i found an answer on stackoverflow
<comet23> i'm making a cli tic tac toe game
<comet23> it's pretty hard =/
enterprisey has joined #ruby
snowcrshd has joined #ruby
jak has quit [Remote host closed the connection]
jak has joined #ruby
ecuanaso has joined #ruby
administ1aitor is now known as nopacienc3
runescape07rsps has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mitki has quit [Quit: mitki]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grymmjack has joined #ruby
uZiel has quit [Remote host closed the connection]
mim1k has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uZiel has joined #ruby
segy has joined #ruby
mogaj has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
hndk has joined #ruby
jottr has joined #ruby
ascarter has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
Dreamer3 has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 260 seconds]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has quit [Ping timeout: 268 seconds]
gix has joined #ruby
V1s1ble has quit [Ping timeout: 246 seconds]
planigan has joined #ruby
Rodya_ has quit [Remote host closed the connection]
raul782 has quit []
justizin has quit [Quit: Connection closed for inactivity]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Rodya_ has joined #ruby
railswebdev has joined #ruby
brent__ has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 246 seconds]
uZiel has joined #ruby
texasmynsted has joined #ruby
ozcanesen has joined #ruby
mogaj has quit []
mrconfused has quit [Ping timeout: 246 seconds]
planigan has quit [Ping timeout: 260 seconds]
snowcrshd has quit [Remote host closed the connection]
Rodya_ has joined #ruby
herbmillerjr has joined #ruby
Cohedrin_ has joined #ruby
railswebdev has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
hndk has quit [Quit: Leaving]
<comet23> i'm trying to make a winning condition
xall has quit [Ping timeout: 258 seconds]
<comet23> i want to use all, but i am getting a no implicit conversion to string error
Andrevan has quit [Quit: WeeChat 1.9]
<elomatreb> Can't help you without code
<comet23> what's a good paste site?
<elomatreb> gist.github.com
<comet23> is there anything else?
<elomatreb> Is there a problem with gist? It has revisions, multiple files, syntax highlighting, comments, everyhint you'd ever need
<comet23> i don't like it because it's not temporary and you can't delete it
ur5us has quit [Ping timeout: 276 seconds]
<comet23> i'm stuck on the full method
<elomatreb> If you log into github you can delete them
<nirix> Was about to say that, it's what I usually do
<comet23> what i want to do is if every element's position is taken return true for the full method, my head can't do that... =(
<comet23> i tried using the all method and pass a block but it's giving me the no impicit conversion to string error
<elomatreb> all? is a good way. Update your code with that attempt and give full error
<matthewd> comet23: There's Enumerable#all?, but you're probably better off solving it with each at this stage IMO
mim1k has joined #ruby
<comet23> how do i update?
<matthewd> comet23: You know how to return early if you find the answer while looping, as you did in won?
<matthewd> So, I'd find a way to do that here too
<comet23> here's the updated method
<matthewd> all? doesn't yield the index
<comet23> and i forgot a parenthesis
<comet23> oh
<comet23> all yields the item
<comet23> that makes sense
mim1k has quit [Ping timeout: 240 seconds]
<comet23> how can i make it yield the index?
<matthewd> .with_index
<comet23> all?.with_index{|index| position_taken?(board, board[index]) ???
<matthewd> Close, but that's not what with_index yields either
agent_white has joined #ruby
<comet23> =*(
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
xall has joined #ruby
<comet23> there is no all with index listed on the docs
Doc_ has joined #ruby
<matthewd> `all?.with_index` is right
<comet23> how can i know what all yields?
<matthewd> The documentation for all? should tell you what it yields, and the documentation for with_index should tell you what it yields
jottr has joined #ruby
<comet23> i don't really understand the documentation
<comet23> it's way too short
<matthewd> There's an example of map.with_index at the top of the Enumerator documentation that might help
dasher00 has quit [Ping timeout: 240 seconds]
snowcrshd has joined #ruby
<Doc_> What benefits may Ruby have over Perl for CGI uses?
<comet23> what is *args?
<comet23> with_index(offset = 0) {|(*args), idx| ... }
<comet23> i see that but no code example like for the other methods
ascarter has joined #ruby
<matthewd> comet23: The arguments the enumerator receives (from all?, in this case)
jottr has quit [Ping timeout: 246 seconds]
<comet23> is that optional?
cadillac_ has quit [Ping timeout: 240 seconds]
<matthewd> No, it's going to yield whatever it got
<matthewd> So your block will get two arguments: the element value from all?, and the index from with_index
<comet23> so after .with_index{|item, index| position_taken?(board, board[index]) ?
cadillac_ has joined #ruby
<matthewd> Yup
snowcrshd has quit [Ping timeout: 240 seconds]
sarbs has joined #ruby
arescorpio has quit [Quit: Leaving.]
<comet23> what an awful method
<comet23> i mean the one i wrote
dasher00 has joined #ruby
<matthewd> I'd suggest the problem is in the position_taken? method
jak has quit [Remote host closed the connection]
<matthewd> This would've been trivial if you had a method that just checked a given 'position value', instead of needing the index, for example
<comet23> it's too long
ascarter has quit [Ping timeout: 240 seconds]
jak has joined #ruby
<comet23> the other problem is that i am following a course from flatiron school and i feel like a lot of this stuff is easy and straightforward, it also helps that their tutorial is well-written
<matthewd> e.g. board.all? { |pos| occupied?(pos) }
<comet23> it's at a very easy level for me usually and when it's hard or something new comes up i have to think about it for a moment because the answer is in the page, they give you pseudocode, but it's still up to me to figure out the implementation which i like
<matthewd> In time this would be much better with a class to represent the board etc, but I assume you're not up to that yet
<comet23> classes are in the next part
<comet23> right after this
<comet23> intro to OO
<comet23> Classes and Methods
<comet23> Instance Methods
<matthewd> Cool, so I wouldn't get too hung up on less-than-ideal looking code at this stage
<comet23> it's also not workign
<matthewd> Recognising things that don't feel good is useful, but your toolkit to improve it will expand a lot soon
<matthewd> Your last gist contained any? instead of all?
<comet23> i'm tired
<comet23> thank you so much
<comet23> it's 12:57 and i was supposed to be in bed at 10
nofxxxx has joined #ruby
<comet23> i'm still getting the same error though
<comet23> it's saying that .with_index can't be used on .all?
<elomatreb> Well, what's in line 36 of game_status.rb?
<matthewd> Oh, right, oops :|
<comet23> board.all?.with_index {|item, index| position_taken?(board, board[index])}
<matthewd> So, there are two possible solutions
astrobun_ has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
gusrub has quit []
<matthewd> `board.size.times.all? {|index| .. }`, or `board.enum_for(:all?).with_index {|item, index| .. }`
anisha_ has joined #ruby
weinstein has quit [Ping timeout: 240 seconds]
<matthewd> I mean, there are plenty of other solutions, because computers.. but they're the ones I'd consider to be adjacent to where we are now
<elomatreb> Now it's getting ugly
<comet23> but you said that all doesn't yield an index
nofxxx has quit [Ping timeout: 260 seconds]
<matthewd> I'm not calling all? on the board, though -- I'm calling it on .times, which will yield 0 to n-1, which matches the indexes of the array
perniciouscaffei has joined #ruby
<comet23> oh
<comet23> i see how that works
<comet23> how does the second one work?
<matthewd> Extracting the "is this cell blank?" check from position_taken? does look increasingly appealing, though
<matthewd> That one just forces an Enumerator of all?
<comet23> that one is way too advanced for me
<matthewd> Some methods, like map and each, automatically return an Enumerator when called without a block; all? doesn't, but we can explicitly ask for one
Hobbyboy has quit [Ping timeout: 255 seconds]
<matthewd> Yeah.. I mentioned it because it's the closest to what we were already trying to do, but I'd hesitate to actually write it that way
<comet23> but you'd write the first one?
<matthewd> No, I'd create a method that takes a cell value and returns whether it's occupied
<comet23> okay great, you probably won't believe me, but that was my instinct
<comet23> wait a minute
<comet23> i'm tired
<comet23> don
<comet23> i already have a method that takes a cell value and returns whether it's occupied
FastJack has quit [Ping timeout: 258 seconds]
<matthewd> No, you have a method that takes a cell *index* (and a board)
<matthewd> def cell_occupied?(cell); ['X', 'O'].include?(cell); end; def position_taken?(board, index); cell_occupied?(board[index]); end
Xiti` has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
<elomatreb> Maybe write a class to represent the board, that'll be a whole lot cleaner than having to pass it with every method call
<matthewd> elomatreb: Apparently classes are in the next chapter
<elomatreb> Oh, ok
<comet23> what is the position taken method?
<comet23> it's not taking a cell value and returning whether or not it's occupied?
<matthewd> comet23: It's not taking a cell value
<comet23> what is it doing with the index then?
<matthewd> comet23: It's taking a board and a cell index, then going and finding the value for itself
<comet23> what is the difference between that and what you're talking about
<matthewd> comet23: And our whole problem is that it's much easier to get the value directly. We're having to work harder to get the index, just to pass it to that method.
Eiam has quit [Ping timeout: 268 seconds]
Xiti has quit [Ping timeout: 268 seconds]
Hobbyboy has joined #ruby
<comet23> i'm still getting the same error even after calling all? on board.size.times
<comet23> def full?(board)
anisha_ has quit [Read error: Connection reset by peer]
Hobbyboy has quit [Ping timeout: 240 seconds]
domgetter has joined #ruby
kies has quit [Ping timeout: 240 seconds]
weaksauce has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobbyboy has joined #ruby
oleo has quit [Quit: irc client terminated!]
enterprisey has quit [Remote host closed the connection]
FastJack has joined #ruby
jak_ has joined #ruby
jak has quit [Read error: Connection reset by peer]
enterprisey has joined #ruby
conta has joined #ruby
comet23 has quit [Ping timeout: 276 seconds]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fysicus has quit [Quit: The Truth Is Just An Excuse For A Lack Of Imagination]
jottr has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
Silthias has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 255 seconds]
cschneid_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
aupadhye has joined #ruby
jak_ has quit [Remote host closed the connection]
ascarter has quit [Ping timeout: 240 seconds]
jak_ has joined #ruby
andikr has joined #ruby
Silthias has joined #ruby
xall has quit [Ping timeout: 246 seconds]
jak_ has quit [Remote host closed the connection]
jak_ has joined #ruby
bdevel has joined #ruby
Ishido has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
johnny56_ has joined #ruby
V1s1ble has joined #ruby
V1s1ble has joined #ruby
V1s1ble has quit [Changing host]
dfoolz has quit [Ping timeout: 240 seconds]
nahra has quit [Read error: Connection reset by peer]
nahra has joined #ruby
nahra has quit [Changing host]
nahra has joined #ruby
_br__ has quit [Ping timeout: 240 seconds]
piotrj has quit [Ping timeout: 240 seconds]
piotrj has joined #ruby
timmow has quit [Ping timeout: 240 seconds]
_br__ has joined #ruby
balazs has quit [Remote host closed the connection]
dfoolz has joined #ruby
timmow has joined #ruby
nobitanobi has joined #ruby
jak has joined #ruby
Rodya__ has joined #ruby
jak_ has quit [Read error: Connection reset by peer]
conta has joined #ruby
nobitanobi has quit [Ping timeout: 268 seconds]
Rodya__ has quit [Ping timeout: 246 seconds]
ta_ has quit [Remote host closed the connection]
de9nie has joined #ruby
birdyondrugs has quit [Ping timeout: 240 seconds]
birdyondrugs has joined #ruby
rgr has joined #ruby
marr has joined #ruby
Ishido has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
djbkd has joined #ruby
Ishido has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
xall has joined #ruby
ascarter has joined #ruby
bdevel has quit [Remote host closed the connection]
bdevel has joined #ruby
bdevel has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
bkxd_ has joined #ruby
ascarter has quit [Ping timeout: 240 seconds]
Vingador has joined #ruby
Vingador has quit [Client Quit]
Vingador has joined #ruby
wilbert has quit [Ping timeout: 276 seconds]
hs366 has joined #ruby
kies has joined #ruby
vondruch has joined #ruby
joevandyk has joined #ruby
aufi has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
bkxd_ has quit [Ping timeout: 276 seconds]
agent_white has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
Vingador has quit [Remote host closed the connection]
yaewa has joined #ruby
moei has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
snowcrshd has joined #ruby
anisha has joined #ruby
vondruch has quit [Quit: vondruch]
DoubleMalt has joined #ruby
biberu has joined #ruby
agent_white has joined #ruby
snowcrshd has quit [Ping timeout: 255 seconds]
nobitanobi has joined #ruby
Rodya_ has joined #ruby
yaewa has quit [Quit: Leaving...]
ddddddd has joined #ruby
fugue has joined #ruby
moei has joined #ruby
djbkd has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 246 seconds]
Dimik has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
djbkd has joined #ruby
jenrzzz has joined #ruby
DoubleMalt has quit [Ping timeout: 260 seconds]
patarr has quit [Ping timeout: 260 seconds]
mathys has joined #ruby
jak has quit [Remote host closed the connection]
jak has joined #ruby
nanoz has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
jottr has joined #ruby
uZiel has joined #ruby
montanonic has joined #ruby
djbkd has quit [Remote host closed the connection]
morfin has joined #ruby
<morfin> hello
<morfin> this is not fine: /tmp/ruby-build.20170630122900.3163/ruby-2.3.0/lib/fileutils.rb:1747: [BUG] Segmentation fault at 0xfffffffffffffff9
<morfin> this is full paste - i do not know why could such thing happen
jenrzzz has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 268 seconds]
<mozzarella> you need to sacrifice a goat
ascarter has joined #ruby
<herwin> morfin: are you sure you want to compile 2.3.0, instead of 2.3.4 (the latest 2.3)?
<herwin> the problem might magically disappear
djbkd has joined #ruby
jaruga________ has joined #ruby
elsevero has joined #ruby
jaruga________ has quit [Remote host closed the connection]
hurricanehrndz_ has quit [Quit: Goodbye]
de9nie has quit [Remote host closed the connection]
ozcanesen has quit [Quit: Textual IRC Client: www.textualapp.com]
jaruga________ has joined #ruby
<morfin> hm
jaruga________ has quit [Client Quit]
<morfin> no idea
jaruga________ has joined #ruby
<morfin> some projects contain it in .ruby-version
cseder has joined #ruby
djbkd has quit [Remote host closed the connection]
<morfin> at least i managed to force it call proper pkgconfig for openssl
ascarter has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 258 seconds]
alnewkirk has joined #ruby
cseder has quit [Client Quit]
vondruch has joined #ruby
mikecmpbll has joined #ruby
hurricanehrndz has joined #ruby
im0nde has joined #ruby
bdevel has joined #ruby
yeticry_ has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
MarkBilk__ has joined #ruby
bdevel has quit [Ping timeout: 276 seconds]
hanmac has joined #ruby
MarkBilk_ has quit [Ping timeout: 240 seconds]
im0nde has quit [Ping timeout: 255 seconds]
rgr has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
KillerFox has quit [Ping timeout: 258 seconds]
romank has joined #ruby
dcunit3d has joined #ruby
<morfin> same result with 2.3.4
mim1k has joined #ruby
<morfin> trying to build 2.4.0
mim1k has quit [Read error: Connection reset by peer]
im0nde has joined #ruby
piyush has joined #ruby
piyush has quit [Client Quit]
Rodya_ has quit [Ping timeout: 258 seconds]
gothicsouth has joined #ruby
blackwind_123 has quit [Ping timeout: 276 seconds]
pwnd_nsfw` has joined #ruby
KillerFox has joined #ruby
Ilie[] has joined #ruby
ferr has joined #ruby
mim1k has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
riceandbeans has left #ruby [#ruby]
jottr has joined #ruby
lxsameer has joined #ruby
nofxxxx has quit [Ping timeout: 260 seconds]
jottr has quit [Ping timeout: 260 seconds]
montanonic has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.7]
xall_ has joined #ruby
xall has quit [Ping timeout: 240 seconds]
umaaji has quit [Quit: Leaving...]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
riceandbeans has joined #ruby
<riceandbeans> how would you go about finding a memory leak in a ruby script?
<riceandbeans> I'm using mechanize, pg, and not much else and the memory use has gone from 5MB to 175MB and it's still going
mim1k has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
brent__ has joined #ruby
snowcrshd has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
brent__ has quit [Ping timeout: 240 seconds]
ascarter has quit [Ping timeout: 276 seconds]
snowcrshd has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
Beams has joined #ruby
Serpent7776 has joined #ruby
bkxd_ has joined #ruby
umaaji has joined #ruby
nanoz] has joined #ruby
pandaant has joined #ruby
tvw has joined #ruby
nanoz has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
ur5us has joined #ruby
mlehrer has quit [Ping timeout: 246 seconds]
astrobun_ has quit [Remote host closed the connection]
patarr has joined #ruby
Rodya_ has quit [Ping timeout: 276 seconds]
patarr has quit [Ping timeout: 276 seconds]
snowcrshd has joined #ruby
jak has quit [Remote host closed the connection]
<dminuoso> riceandbeans: ruby-prof
jak has joined #ruby
bdevel has joined #ruby
<riceandbeans> thanks
im0nde has quit [Quit: im0nde]
jottr has joined #ruby
nanoz] has quit [Quit: <3]
jak has quit [Ping timeout: 240 seconds]
bdevel has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 240 seconds]
jak has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
fugue has quit [Quit: Computer has gone to sleep]
Fernando-Basso has joined #ruby
marr has joined #ruby
hs366 has quit [Quit: Leaving]
uZiel has quit [Ping timeout: 248 seconds]
ascarter has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cseder has joined #ruby
ascarter has quit [Ping timeout: 260 seconds]
uZiel has joined #ruby
nobitanobi has quit []
<zenspider> riceandbeans: chances are you don't have a leak.
<zenspider> where "leak" means memory you've allocated and can't get back
<zenspider> mechanize and pg are solid, and ruby doesn't leak. 175 isn't that much in the grand scheme of things. really depends on what you're doing.
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
sysvalve has joined #ruby
domgetter has quit [Ping timeout: 268 seconds]
xall_ has quit [Quit: xall_]
bkxd has quit [Ping timeout: 260 seconds]
<riceandbeans> zenspider: looping thousands of times, parsing data with mechanize, some database interactions, repeat
bkxd_ has quit [Ping timeout: 255 seconds]
Rodya_ has joined #ruby
bkxd has joined #ruby
<riceandbeans> zenspider: but you're probably right, it's down to 150Mb
bkxd_ has joined #ruby
ur5us has quit [Remote host closed the connection]
ryzokuken has joined #ruby
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
lel- has quit [Ping timeout: 240 seconds]
Fernando-Basso has quit [Read error: Connection reset by peer]
lel has joined #ruby
Fernando-Basso has joined #ruby
dcunit3d has quit [Ping timeout: 240 seconds]
<zenspider> riceandbeans: maybe you have a closure holding onto a collection of something preventing it from being GC'd... but that's not a leak.
<zenspider> but just let it go... as long as you're not on a tiny VPS it'll do its job and finish fine. check your swap. if it is OK, then you're OK
<riceandbeans> I am on a tiny VPS lol
patarr has joined #ruby
jottr has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
jottr has quit [Ping timeout: 240 seconds]
jaruga________ has quit [Quit: jaruga________]
jaruga________ has joined #ruby
dcunit3d has joined #ruby
sepp2k has joined #ruby
agent_white has quit [Quit: bai]
clemens3 has joined #ruby
roshanavand has joined #ruby
ascarter has joined #ruby
psychicist__ has joined #ruby
bdevel has joined #ruby
ascarter has quit [Ping timeout: 258 seconds]
DoubleMalt has joined #ruby
jaruga________ has quit [Ping timeout: 260 seconds]
dcunit3d has quit [Ping timeout: 255 seconds]
jak_ has joined #ruby
mim1k has joined #ruby
jak has quit [Read error: Connection reset by peer]
bdevel has quit [Ping timeout: 240 seconds]
ogotai_ is now known as ogotai
jaruga________ has joined #ruby
shinnya has joined #ruby
bkxd_ has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
Rodya_ has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
ule has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
ldnunes has joined #ruby
dcunit3d has joined #ruby
jottr has joined #ruby
<CustosLimen> hi
<CustosLimen> "a,b,c,,,".split(",") -> ["a", "b", "c"]
<CustosLimen> how can I keep empty's ?
jottr has quit [Ping timeout: 246 seconds]
<leah2> >> "a,b,c,,,".split(",", -1)
<ruby[bot]> leah2: # => ["a", "b", "c", "", "", ""] (https://eval.in/825174)
marahin has left #ruby ["Textual IRC Client: www.textualapp.com"]
ryzokuken has quit [Quit: Leaving]
<CustosLimen> leah2, thanks a bunch
<leah2> yw
Guest90994 is now known as jdelStrother
<darix> zzak: any plans to push sdoc 1.0.0?
jottr has joined #ruby
bkxd has joined #ruby
bkxd_ has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
Ishido has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
GinoMan2440 has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
bkxd_ has quit [Ping timeout: 240 seconds]
simmaniac has joined #ruby
roshanavand has quit [Ping timeout: 258 seconds]
cats has quit [Quit: BURN HIS HOUSE DOWN]
ascarter has joined #ruby
cats has joined #ruby
bdevel has joined #ruby
ishigoya- has quit [Remote host closed the connection]
sysvalve has quit [Ping timeout: 246 seconds]
kaneki993 has quit [Quit: Connection closed for inactivity]
Ishido has joined #ruby
SenpaiSilver has joined #ruby
ddddddd has quit [Ping timeout: 268 seconds]
ascarter has quit [Ping timeout: 240 seconds]
Ilie[] has quit []
bdevel has quit [Ping timeout: 240 seconds]
herbmillerjr has quit [Remote host closed the connection]
conta has quit [Remote host closed the connection]
conta has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Tempesta has quit [Quit: AdiIRC is updating to v2.9 Beta Build (2017/06/30) 64 Bit]
Tempesta has joined #ruby
conta has quit [Ping timeout: 260 seconds]
brent__ has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
herbmillerjr has joined #ruby
mathys has quit [Quit: Leaving]
splitshot has joined #ruby
dcunit3d has quit [Ping timeout: 260 seconds]
Ishido has quit [Ping timeout: 276 seconds]
ferr has quit [Quit: WeeChat 1.8]
kruppm has joined #ruby
jak_ has quit [Remote host closed the connection]
jak_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
conta has joined #ruby
oleo has joined #ruby
cseder has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cseder has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
umaaji has quit [Quit: Leaving...]
Ishido has joined #ruby
coderhut has joined #ruby
alveric has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
dcunit3d has joined #ruby
mathys has joined #ruby
brent__ has quit [Ping timeout: 255 seconds]
runescape07rsps has joined #ruby
my123_ has joined #ruby
my123_ has quit [Changing host]
my123_ has joined #ruby
jottr has joined #ruby
agimenez has joined #ruby
ekinmur has joined #ruby
haylon has joined #ruby
my123 has quit [Ping timeout: 255 seconds]
simmaniac has quit [Ping timeout: 240 seconds]
elsevero has quit [Quit: elsevero]
jottr has quit [Ping timeout: 260 seconds]
Ishido has quit [Ping timeout: 240 seconds]
monzie has joined #ruby
mathys has quit [Quit: Leaving]
ascarter has joined #ruby
agimenez has quit [Ping timeout: 240 seconds]
bdevel has joined #ruby
bdevel has quit [Ping timeout: 260 seconds]
ascarter has quit [Ping timeout: 260 seconds]
Gasher has joined #ruby
<Gasher> hello, I'm getting the following error when trying to install the gtk3 gem: https://gist.github.com/anonymous/f99128834c4d0c2564e35fc2a8595d82
Gasher is now known as Guest73958
<Guest73958> I mean, I'm getting an error, and that's the log
Lyfe_ is now known as Lyfe
__Yiota has joined #ruby
splitshot has quit [Remote host closed the connection]
alveric has quit [Quit: WeeChat 1.9]
PatrikasZvaigzde has quit [Ping timeout: 246 seconds]
alex`` has quit [Quit: WeeChat 1.8]
alveric has joined #ruby
<ineb> it might be better to post the error :)
gnufied has joined #ruby
chouhoulis has joined #ruby
PatrikasZvaigzde has joined #ruby
Ishido has joined #ruby
<Guest73958> it's the standard "failed to build gem native extension"
<ineb> yes and most likely you are missing something on your system and therefore it fails
<ineb> for example this line: ave_package: checking for cairo version (>= 1.2.0)... -------------------- no
<ineb> afaik gtk3 hardly depends on cairo, so if you dont have it, it wont build
haylon has quit [Ping timeout: 260 seconds]
<Guest73958> I do
<Guest73958> without the devel though
<ineb> see
<Guest73958> yeah, builds cairo now, thanks
chouhoulis has quit [Ping timeout: 268 seconds]
haylon has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
im0nde has joined #ruby
__Yiota has joined #ruby
pandaant has quit [Remote host closed the connection]
splitshot has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
tvon has quit [Remote host closed the connection]
tvon has joined #ruby
ddddddd has joined #ruby
Bock has quit [Ping timeout: 260 seconds]
coderhut has quit [Ping timeout: 260 seconds]
tvon has quit [Ping timeout: 260 seconds]
mrconfused has joined #ruby
DLSteve_ has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
mrconfused_ has joined #ruby
truenito has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mrconfused has quit [Ping timeout: 268 seconds]
DoubleMalt has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
tvon has joined #ruby
tvon has quit [Remote host closed the connection]
griffindy has joined #ruby
tvon has joined #ruby
tvon has quit [Read error: Connection reset by peer]
tvon has joined #ruby
cseder has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
Danny has joined #ruby
Danny is now known as Guest12566
jak_ has quit [Remote host closed the connection]
jak_ has joined #ruby
mim1k has joined #ruby
Miah_ has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
piotrj has quit [Ping timeout: 260 seconds]
gaurav has quit [Ping timeout: 240 seconds]
gaurav has joined #ruby
ekinmur has quit [Remote host closed the connection]
Rodya_ has joined #ruby
tvw has quit [Remote host closed the connection]
ascarter has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
theunraveler has joined #ruby
jottr has joined #ruby
Triskelion5 has joined #ruby
ekinmur has joined #ruby
piotrj has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ResidentBiscuit has joined #ruby
ascarter has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
ddddddd has quit [Ping timeout: 255 seconds]
__Yiota has joined #ruby
al2o3-cr has quit [Ping timeout: 276 seconds]
cpruitt has joined #ruby
alex`` has joined #ruby
bahamas has joined #ruby
jason^^ has quit [Quit: WeeChat 1.8]
tau has joined #ruby
cpruitt has quit [Quit: cpruitt]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
endemic has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
cseder has joined #ruby
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
cpruitt has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
gizmore has joined #ruby
tvon has quit [Remote host closed the connection]
comet23 has joined #ruby
<comet23> how is my code?
<comet23> i did not code the helper method that's on the first line so please disregard
mrconfused_ has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
AnoHito_ has joined #ruby
mrconfused has joined #ruby
AnoHito has quit [Ping timeout: 255 seconds]
imperator has joined #ruby
<imperator> good morning
snowcrshd has quit [Remote host closed the connection]
<cseder> good evening
<imperator> does mime-types just check the extension when determing a file type?
patarr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has quit [Quit: WeeChat 1.8]
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
patarr has quit [Ping timeout: 276 seconds]
<morfin> there is also magic bytes
mrconfused_ has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
jak_ has quit [Remote host closed the connection]
anjen has joined #ruby
jak_ has joined #ruby
mwlang has joined #ruby
mrconfused has quit [Ping timeout: 258 seconds]
snowcrshd has joined #ruby
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
<anjen> Hi, I might be in the wrong group here, but I'll ask anyway. I'm in rails 3.2, debuggin using Aptana Studio. When I hit a respond_to block, instead of stopping on the specified line, mime_respons.rb pops up, so I have no diea what's gong on inside the block. Is there a way around this behavior?
<mwlang> hmmm….I’m a little bit shocked Ruby’s Float leads to rounding errors on even simple numbers. 1045.85 * 100 => 104584.99999999999 I can understand rounding errors when you have, say 4 or 5 digits, but 2? :-o
<anjen> *mime_responds.rb
bdevel has joined #ruby
urux has joined #ruby
urux has quit [Client Quit]
snowcrshd has quit [Ping timeout: 258 seconds]
AnoHito_ has quit [Read error: Connection reset by peer]
<comet23> umm.... i disagree with this:
<comet23> If you've been following along with the progression of Tic Tac Toe labs you've probably already built lots of the methods required to solve this lab. As you solve this lab, when you encounter a requirement you have previously solved, like defining the WIN_COMBINATIONS constant, or the #display_board method, you should take a second and find your old code. The ability to recognize previously solved problems and integrate a known soluti
urux has joined #ruby
AnoHito_ has joined #ruby
aufi has quit [Remote host closed the connection]
Doc_ has quit [Quit: Page closed]
conta has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 240 seconds]
<anjen> mwlang: that is pretty bad. Even 1045.85 *100.0 produces the same result.
<mwlang> So, experimenting with combinations of math operations…is this the best way to convert dollars and cents to just cents? (1045.85 * 100.0).round.to_i => 104585
<mwlang> anjen: yeah. I thought Ruby must be horribly broken, but even python 2.7 produces same answer!
bdevel has quit [Ping timeout: 260 seconds]
<anjen> mwlang: (1045.85*100.0).round produces the correct result
ascarter has joined #ruby
patarr has joined #ruby
jottr has joined #ruby
synthroid has joined #ruby
nahra has quit [Remote host closed the connection]
joelwallis has joined #ruby
mrconfused_ has quit [Read error: Connection reset by peer]
<mwlang> anjen: right you are! I thought the additional #to_i was needed, but rounding gives a Fixnum. (1045.85 * 100).round.class.to_s => Fixnum
mrconfused has joined #ruby
<anjen> mwlang, as a workaround, we operate in pennies and convert later. fwiw...
<anjen> (using the money gem)
<mwlang> that’s essentially what I’m moving this solution towards.
<mwlang> I just need the correct pennies from the Float
* mwlang goes to find money gem...
<anjen> lol, I hear ya. I'm struggling with a version update m'self.
<anjen> fwiw, we're using collectiveidea-money. Notr sur eif it'll work with your verison but ...
<anjen> cripes..typing skills are down today ...*Not sure if it'll...*
tvon has joined #ruby
ascarter has quit [Ping timeout: 240 seconds]
zacts has quit [Ping timeout: 276 seconds]
<mwlang> Ah, I was looking at https://github.com/RubyMoney/money which seems very solid on the surface.
<mwlang> It has all the facilities I need at least…representing amounts in specific currencies and converting them.
<anjen> whichever works for you...good luck!
patarr has quit [Ping timeout: 268 seconds]
urux has quit [Remote host closed the connection]
cdg_ has joined #ruby
anjen has quit [Quit: anjen]
enterprisey has joined #ruby
antgel has joined #ruby
<_2easy> Has anyone read blue or red book for DDD?
<_2easy> I wonder which of them to read first.
mim1k has quit [Ping timeout: 260 seconds]
kruppm has quit [Ping timeout: 258 seconds]
patarr has joined #ruby
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
patarr has quit [Ping timeout: 276 seconds]
byte512 has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
imperator has left #ruby ["Leaving"]
conta has joined #ruby
minimalism has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
mrconfused has quit [Ping timeout: 268 seconds]
mim1k has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
<mwlang> _2easy: "You take the blue pill, the story ends. You wake up in your bed and believe whatever you want to believe. You take the red pill, you stay in Wonderland, and I show you how deep the rabbit hole goes." :-D
uZiel has joined #ruby
<mwlang> but seriously, no idea what the blue and red book for DDD is. got a link for them?
Guest12566 has quit []
patarr has joined #ruby
Triskelion5 has quit [Ping timeout: 260 seconds]
snowcrshd has joined #ruby
Ishido has joined #ruby
snowcrsh_ has joined #ruby
snowcrshd has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 268 seconds]
JoshS has quit [Ping timeout: 260 seconds]
tau has left #ruby [#ruby]
planigan has joined #ruby
bahamas has quit [Quit: leaving]
skinnymg1 has quit [Remote host closed the connection]
pwnd_nsfw` is now known as pwnd_nsfw
lxsameer has quit [Quit: WeeChat 1.7]
alex`` has joined #ruby
im0nde has quit [Quit: im0nde]
im0nde has joined #ruby
amclain has joined #ruby
zacts has joined #ruby
Renich has joined #ruby
brent__ has quit [Remote host closed the connection]
svara has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
weaksauce has joined #ruby
zacts has quit [Ping timeout: 255 seconds]
ascarter has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
Renich_ has joined #ruby
gusrub has joined #ruby
mrconfused has joined #ruby
Renich has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 260 seconds]
ascarter has quit [Ping timeout: 260 seconds]
<_2easy> mwlang: nice one :D
brent__ has joined #ruby
snowdt has joined #ruby
<snowdt> hello, is there any "idiomatic" way to get the array with smaller number? e.g. [ [ "Book 1", 10 ], [ "Book 2", 11 ], [ "Book 3", 3 ] ]
<_2easy> (sorry for double linke)
<_2easy> snowdt: arr.min {|x| x[1]}
<mwlang> _2easy: they both look good to me. Red one looks more introductory. Blue one looks like it gets more advanced quicker.
<apeiros> _2easy: that'd need min_by, not min.
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_2easy> apeiros: ruby 2.3.0 in irb works for me
<mwlang> snowdt: [ [ "Book 1", 10 ], [ "Book 2", 11 ], [ "Book 3", 3 ] ].min_by(&:last)
<apeiros> _2easy: "works" != "does what you want"
<apeiros> or rather "seems to work" != …
<comet23> so the general rule for programming is that if your code works it's good right?
__Yiota has joined #ruby
kies has quit [Ping timeout: 240 seconds]
<apeiros> o0
<Papierkorb> Oô
<apeiros> comet23: I'd not subscribe to that, no
<Papierkorb> not sure if troll
<apeiros> same
<comet23> how is my code?
<snowdt> yeah the first one doesn't work, actually it just prints the first one
gothicsouth has joined #ruby
<snowdt> thank you mwlang, _2easy
<snowdt> ust prints the first array*
xfbs has joined #ruby
<_2easy> apeiros: i don't understand what you mean. Could you elaborate more on this?
brent__ has quit [Remote host closed the connection]
<apeiros> _2easy: your code produced a result which for *one specific* case was correct. you concluded from that, that your code "works". you were mistaken.
jottr has quit [Ping timeout: 240 seconds]
xco has joined #ruby
patarr has joined #ruby
mrconfused has quit [Ping timeout: 260 seconds]
<_2easy> apeiros: ok, I see my mistake. thank you!
<apeiros> xco: not possible like that, no
<apeiros> meth(1,2,{params: …}, 3, 4) # this is possible, though
mim1k has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
<apeiros> the argument order in ruby is required to be: positional args, keyword args, block arg. you can't mix any of those.
Renich_ is now known as Renich
Renich has quit [Quit: Renich]
<apeiros> by using {} we make the keyword argument a regular hash.
<xco> hmmmm
Renich has joined #ruby
<xco> let me edit and ask another question :D
Serpent7776 has quit [Quit: Leaving]
HoierM has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 276 seconds]
devster31 has quit [Read error: Connection reset by peer]
[Butch] has joined #ruby
<apeiros> not possible either. optional positional arguments must come after required positional arguments.
<apeiros> you can fake it using something like `RequiredArg=Object.new; def foo(a,b=1,c=RequiredArg); raise ArgumentError, "…" if c.equal?(::RequiredArg); … end
monzie has quit [Ping timeout: 260 seconds]
<xco> apeiros: i wouldn’t want to go that path
<apeiros> did you try it? :)
<xco> not yet
<apeiros> you know about irb and/or pry, yes?
<xco> yes
<apeiros> for "does X work" type of questions, I suggest you use those.
R11 has quit [Ping timeout: 260 seconds]
<apeiros> and then when you need help in either interpreting what you see or finding a way to make it possible, ask here.
<xco> this is more like “how do i do it?”
<apeiros> that's not reflected by your questions atm.
<apeiros> anyway, refinement of what I said above re arg order: required positional args, optional positional args, keyword args (required/optional can be in any order here), block arg
gusrub has quit [Remote host closed the connection]
synthroid has quit []
zacts has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
cdg_ has quit [Read error: Connection reset by peer]
cdg_ has joined #ruby
Eiam has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
electrostat has quit [Ping timeout: 240 seconds]
electrostat has joined #ruby
skweek has joined #ruby
<xco> what’ll be the simplest way to get “params: {money: "dollar”}” out of a variable like a = {params: {money: "dollar"}}?
<apeiros> a[:params]
<apeiros> oh, wait…
patarr has quit [Ping timeout: 276 seconds]
comet23 has quit [Quit: Download IceChat at www.icechat.net]
jak_ has quit [Remote host closed the connection]
<apeiros> `params: {money: "dollar”}` as a standalone is not valid. so elaborate on what exactly you mean.
jak_ has joined #ruby
<xco> a is a hash
<xco> i want it to return its’ first value
<xco> i mean item
<xco> which happens to be a hash too
<Zarthus> a[a.keys.first]
<Zarthus> ?
<apeiros> so you want `{money: "dollar"}`, not `params: {money: "dollar"}`=
<apeiros> *?
<xco> no
<xco> i want
<xco> `params: {money: "dollar"}`
<apeiros> again, that makes no sense.
Beams has quit [Quit: .]
<xco> :D
<apeiros> you can either have :params plus {money: "dollar"}, or {params: {money: "dollar"}}, but not params: {money: "dollar"},
<xco> ok i thought it made sense and there was a way to do it
<apeiros> so again, what do you want? you can't have something that's not valid.
<Zarthus> you could have `params = a[:params]` at best
<apeiros> that's mean they'd have {money: "dollar"} (in params), which they refuted…
<apeiros> but I think they don't really understand what they want anyway… so…
<Zarthus> :D
<Zarthus> maybe he wants a string
<apeiros> xco: maybe provide us the full picture? your questions make little sense and seem out of context. context might help overcome your weakness to specify what you want.
<Zarthus> that would be painful
<apeiros> who knows!
<xco> ok let me write it in a gist ;)
bdevel has joined #ruby
jottr has joined #ruby
__Yiota has joined #ruby
Bock has joined #ruby
bdevel has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
catphish has joined #ruby
<catphish> i want to implement "cp --reflink" in ruby, this requires calling an ioctl BTRFS_IOC_CLONE, what would be the correct way to get this linux system constant into ruby?
<apeiros> xco: just invoke it as `meth(country, capital, currency, one: 1, two: 2)`
<catphish> i actually don't know what it's value is, it's established by a macro in C: #define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int)
<apeiros> or `meth(country, capital, currency, {one: 1, two: 2})` if you prefer the explicit braces
<xco> not that easy
patarr has joined #ruby
<xco> params:
<xco> HAS to be in the invocation
<apeiros> you seem to still leave away lots of required context.
<apeiros> *why* does it have to be the invocation?
<xco> because the frameworks (Rails) i’m using wants it present
Cyrus has joined #ruby
seggy has joined #ruby
mikecmpbll has quit [Ping timeout: 276 seconds]
ascarter has joined #ruby
tvon has quit [Remote host closed the connection]
minimalism has joined #ruby
<apeiros> xco: ok, who implements what in your scenario?
FastJack has quit [Read error: Connection reset by peer]
<apeiros> do you implement meth or rails?
<apeiros> do you implement the invocation of meth or rails?
patarr has quit [Ping timeout: 268 seconds]
<xco> i do
<apeiros> for both?
<xco> yes
<apeiros> then where does rails come into play? how can it be that rails has a requirement on a method which you both implement and call?
callahanrts has quit [Quit: WeeChat 1.2]
<catphish> so, is there a way to get the value of a constant from /usr/include, or do i need a C extension here?
conta has quit [Ping timeout: 255 seconds]
FastJack has joined #ruby
cdg_ has quit [Remote host closed the connection]
<apeiros> catphish: I'm not proficient in the matter, but I'd bet it means you need an extension one way or the other (fiddle, ffi or native ext)
montanonic has joined #ruby
ascarter has quit [Ping timeout: 260 seconds]
Triskelion5 has joined #ruby
perniciouscaffei has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
ddddddd has joined #ruby
cdg has joined #ruby
hogetaro has joined #ruby
electrostat has quit [Ping timeout: 246 seconds]
masterasia has quit [Quit: Leaving]
__Yiota has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
<catphish> i think FFI:ConstGenerator is what i want, just trying to work out how to use it :)
<apeiros> good luck :)
jaruga________ has quit [Quit: jaruga________]
kies has joined #ruby
patarr has joined #ruby
al2o3-cr has joined #ruby
Ishido has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 258 seconds]
<catphish> this works: https://paste.ubuntu.com/24990600/
im0nde has quit [Ping timeout: 276 seconds]
dcunit3d has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
electrostat has joined #ruby
VladGh has quit [Ping timeout: 240 seconds]
chouhoul_ has joined #ruby
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> xco: no answer? magic requirement then?
vondruch has quit [Quit: vondruch]
minimalism has quit [Quit: minimalism]
chouhoulis has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
<xco> apeiros: i’m trying to work it out
vondruch_ has quit [Quit: vondruch_]
Rodya_ has quit [Remote host closed the connection]
Ishido has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
gusrub has joined #ruby
vondruch has joined #ruby
ta_ has joined #ruby
patarr has joined #ruby
dcunit3d has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
JoshS has joined #ruby
bed7 has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
tvon has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
<haylon> has anyone worked with Ruby's OpenSSL Gem? I'm tryign to add an extension_factory item to a CSR, but I'm getting unexpected type, but the example shows nil, and the csr object.
<haylon> You know what, I'm probably doing this wrong.
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
patarr has joined #ruby
stryek has joined #ruby
Bock has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
stryek_ has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
snowdt has quit [Quit: Page closed]
ltem has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
ascarter has quit [Ping timeout: 260 seconds]
Cohedrin_ has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
vondruch has quit [Remote host closed the connection]
jak_ has quit [Remote host closed the connection]
vondruch has joined #ruby
jak_ has joined #ruby
tycoon177 has left #ruby [#ruby]
patarr has joined #ruby
Mudstart has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Meeh has left #ruby ["Screw u guys, I'm going home!"]
electrostat has quit [Quit: uwotm8]
muelleme_ has joined #ruby
electrostat has joined #ruby
mikecmpbll has joined #ruby
justizin has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
vondruch_ has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
elsevero has joined #ruby
Gasher has joined #ruby
Gasher is now known as Guest33777
<haylon> maybe. Looking at how to generate a key/csr using the openssl command line tool, I can generate a key and csr using a config file, but I'm not sure how that would translate into using the OpenSSL gem to set the different attributes such as Extended Key Usage
bdevel has joined #ruby
<cseder> anybody else having trouble installing the pg gem on the latest os x?
<apeiros> cseder: worked fine for me
<apeiros> installed pg from brew
<apeiros> that's the server, not the gem.
<cseder> apeiros yes, I had to install postgres via brew first to get it working
Ishido has joined #ruby
Guest73958 has quit [Ping timeout: 276 seconds]
<cseder> But I usually just install Postgres.app and never had any trouble installing pg gem until now
patarr has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
patarr has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
bdevel has quit [Ping timeout: 247 seconds]
knight33 has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
________ has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
<haylon> This is close to what I'm doing, but I'm not sure hwo to set the ExtensionFactory settigns at CSR creation instead of signing
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
Ishido has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 246 seconds]
choke has joined #ruby
d10n-work has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
aglorei has quit [Ping timeout: 248 seconds]
jottr_ has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
wnd_ has joined #ruby
theRoUS is now known as theRoUS|afk
m4rCsi has joined #ruby
caw_ has joined #ruby
KnownSyntax has quit [Ping timeout: 255 seconds]
caw has quit [Ping timeout: 255 seconds]
wnd has quit [Excess Flood]
voker57 has joined #ruby
hays has quit [Quit: No Ping reply in 180 seconds.]
Phage has quit [Ping timeout: 255 seconds]
rideh- has quit [Ping timeout: 255 seconds]
voker57 has quit [Quit: No Ping reply in 180 seconds.]
lupine has quit [Quit: No Ping reply in 180 seconds.]
m4rCsi_ has quit [Quit: No Ping reply in 180 seconds.]
hays has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
voker57 has joined #ruby
voker57 has quit [Changing host]
hays has joined #ruby
hays has quit [Changing host]
KnownSyntax has joined #ruby
caw_ is now known as caw
vondruch_ has quit [Remote host closed the connection]
Phage has joined #ruby
Phage has joined #ruby
Phage has quit [Changing host]
vondruch_ has joined #ruby
rideh has joined #ruby
lupine has joined #ruby
patarr has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
sarbs has quit [Ping timeout: 240 seconds]
mgorbach has quit [Ping timeout: 240 seconds]
csaunders has quit [Ping timeout: 240 seconds]
tvon has quit [Remote host closed the connection]
ujjain has quit [Ping timeout: 260 seconds]
Dark_Arc has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
jnollette has quit [Ping timeout: 240 seconds]
ChickeNES has quit [Ping timeout: 240 seconds]
tvon has joined #ruby
ChickeNES has joined #ruby
Dark_Arc has joined #ruby
sarbs has joined #ruby
bokayio has joined #ruby
mgorbach has joined #ruby
csaunders has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
gothicsouth has joined #ruby
mikecmpb_ has joined #ruby
tvon has quit [Ping timeout: 276 seconds]
mikecmpbll has quit [Ping timeout: 240 seconds]
wnd_ is now known as wnd
jnollette has joined #ruby
aglorei has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Renich has quit [Quit: Renich]
bed7 has quit [Quit: Leaving]
marr has quit [Ping timeout: 240 seconds]
joelwallis has quit [Remote host closed the connection]
ascarter has joined #ruby
ModusPwnens has joined #ruby
<ModusPwnens> Is it bad practice to refactor a large class by extending some related behaviour into a module that you just include back into that class?
<ModusPwnens> i'm having trouble finding best practices for modules to answer this question.
<bougyman> what do you mean by related behavior?
<bougyman> Will it be used by any other class?
<ModusPwnens> No, it won't be used by any other class.
<bougyman> if it's solely to make a class smaller, seems like just complicating things for religious reasons.
soLucien has joined #ruby
<ModusPwnens> it's also because the methods I'm encapsulating out are often changed but the rest of the code is not.
Ishido has quit [Ping timeout: 240 seconds]
<bougyman> you should certainly look at if all of the behavior belongs on one class.
<bougyman> sometimes it does.
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
<ModusPwnens> so the idea was to extract all the commonly changed code that are all related so that engineers can just use that class for changes instead of peppering methods all over the other class.
choke has joined #ruby
<ModusPwnens> but i'm not sure if that's bad ruby as I'm not that experienced with ruby guidelines and best practices.
patarr has joined #ruby
<ModusPwnens> in java, it would certainly be wierd, but in java you can't really do mixins like you can in ruby
vondruch_ has quit [Remote host closed the connection]
konsolebox has joined #ruby
vondruch_ has joined #ruby
ascarter has quit [Ping timeout: 240 seconds]
marr has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
meshsmith has joined #ruby
oleo has quit [Read error: Connection reset by peer]
<Yxhuvud> ModusPwnens: In general, I'd say 'Favor composition over inheritance' (and using modules is in this case more or less a variant of inheritance.
patarr has quit [Ping timeout: 255 seconds]
montanonic has quit [Ping timeout: 260 seconds]
oleo has joined #ruby
tvon has joined #ruby
ixti has joined #ruby
<ixti> Hi all! Is it normal practice to manually call `GC.start`?
jak_ has quit [Remote host closed the connection]
<ixti> I'm processing a lot of CSV files (around 11K files). Each contains different amount of rows, 10 rows smallest one, 300-500K big ones...
jak_ has joined #ruby
<ixti> Seems like without calling GC.start after each 10K rows - RSS jsut keeps growing until process OOM killed ;((
yaewa has joined #ruby
tgragnato has joined #ruby
joelwallis has joined #ruby
moei has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby
Ishido has joined #ruby
<soLucien> hi guys ! Is it possible to store credentials in the gemrc file ?
brent___ has joined #ruby
<soLucien> i have my own rubygems repo , and i'm trying to connect to it and install stuff from it
<soLucien> (it's actually a Vagrant plugin, but I expect it to be very similar to the Ruby way of installing plugins)
learningRuby has joined #ruby
truenito has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
<learningRuby> QUESTION: This is from The Ruby Programming Language (Matz and others) → “Every object has a well-defined class in Ruby, and that class never changes during the lifetime of the object. An object's type, on the other hand, is more fluid. The type of an object is related to its class, but the class is only part of an object's type. When we talk about
<learningRuby> the type of an object, we mean the set of behaviors that characterize the object.” My question is: why is the type of an object more fluid? Can we change the type of an object?
Rodya_ has joined #ruby
<Papierkorb> learningRuby: In fact you can change the behaviour of a specific object through Object#singleton_class
brent___ has quit [Remote host closed the connection]
<Yxhuvud> ixti: what version of ruby do you use? If you use a horribly old version then you might have reason to call GC.start manually in some regressive cases, but that should not be the case for modern Rubys.
patarr has quit [Ping timeout: 240 seconds]
vondruch_ has quit [Remote host closed the connection]
<ixti> Yxhuvud: not horribly old. 2.3.0
vondruch_ has joined #ruby
<Yxhuvud> Then there shouldn't be an issue..
<ixti> Yeah. But, by some reason withou GC.start RSS grows like crazy :((
Rodya_ has quit [Ping timeout: 276 seconds]
__Yiota has joined #ruby
KeyJoo has joined #ruby
<havenwood> ixti: Can you try to reproduce on 2.3.4 or better yet 2.4.1?
xfbs has quit []
<ixti> havenwood: trying to find the way of doing that now ;D
<havenwood> ixti: what os/distro?
<soLucien> guys ? Is there a way to store credentials in gemrc files ?
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
domgetter has joined #ruby
lxsameer has joined #ruby
<ixti> havenwood: the problem is not installing new ruby (i'm on gentoo linux with chruby - and have all latest rubies) - it's just data is on production server ;))
<havenwood> soLucien: Why don't you want to use?: ~/.gem/credentials
<havenwood> ixti: ah, gotcha
<learningRuby> Papierkorb: oh, so I could for example take a String object and change its behaviors (override) so it would behave exactly like a Numeric object? Is that what the text mean?
<soLucien> heavenwood i had no idea it existed. I'm looking into it right away
<havenwood> ixti: It makes me wonder if you could tune the GC to be more aggressive so you don't need the manual GC.start.
<learningRuby> Papierkorb: (but it would still be a String object, although it wouldn't behave anymore like one)
brent___ has joined #ruby
<ixti> Hm. Good point. I guess, if I'll figure out that latest ruby behaves the same for me as 2.3.0 - then I'll think on tuning default behavior.
<Papierkorb> learningRuby: "behave like" is the key. Ruby does 'duck typing': if it walks like a duck, and quacks like a duck, it's a duck. Exactly like a Numeric? Nah, but Numeric is kinda special. But you could totally create a Object (Yes, you can do `Object.new`), and then through its singleton_class, modify its behaviour to mimic an object of a specific class. This is actually done in tests ("mocking").
<Papierkorb> learningRuby: E.g., you could teach your Object #[] and #[]= and pass it to something expecting a Hash or Array, as long that something only uses #[] and #[]= ;)
bdevel has joined #ruby
jottr_ has quit [Read error: Connection reset by peer]
vondruch_ has quit [Remote host closed the connection]
jak has joined #ruby
plujon has joined #ruby
vondruch_ has joined #ruby
jottr_ has joined #ruby
jak_ has quit [Read error: Connection reset by peer]
patarr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
vondruch_ has quit [Remote host closed the connection]
<learningRuby> Papierkorb: mmm alright, I think now I get well why a “type is fluid”, but not a class. It means you can freely modify an object's behaviors, so class and type are not 100% tied to one another. But since Numeric for example is “special” as you say, than I would say that in Ruby type is fluid, yet not 100% fluid because there are certain classes wit
<learningRuby> h special behaviors.
vondruch_ has joined #ruby
<learningRuby> *then
quobo has quit [Quit: Connection closed for inactivity]
patarr has quit [Ping timeout: 260 seconds]
bdevel has quit [Remote host closed the connection]
bdevel has joined #ruby
bdevel has quit [Remote host closed the connection]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
bdevel has joined #ruby
<xco> so i’m wondering, we can find find the parent of a child object by doing child.class, can we find which class a method comes from?
bdevel has quit [Remote host closed the connection]
bdevel has joined #ruby
bdevel has quit [Remote host closed the connection]
<Papierkorb> xco: A class is an object itself. If you know how to find where an instance method comes from, you can find where a class method was defined too
bdevel has joined #ruby
<apeiros> xco: the class of an object is not its parent
mwlang_ has joined #ruby
<apeiros> classes have parents, but not all objects are classes (but all classes are objects)
bdevel has quit [Remote host closed the connection]
<xco> apeiros: i know it’s not its parent but you get the picture
<apeiros> xco: no I don't. that's the point. learn to express yourself. stop relying on others to figure out what you might mean.
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xco> Papierkorb understood me
<xco> :)
<apeiros> maybe. he might have understood something you didn't mean, though.
<apeiros> &ri Method#owner xco
<apeiros> &ri Object#method xco
<apeiros> also see those to figure the source of a method
mwlang has quit [Ping timeout: 260 seconds]
mwlang_ is now known as mwlang
marxarelli|afk has quit [Ping timeout: 260 seconds]
montanonic has joined #ruby
<xco> apeiros: thanks, looking
ascarter has joined #ruby
<havenwood> git push tblp-staging
Rodya_ has quit [Remote host closed the connection]
<havenwood> well, that's not going to work >.>
<havenwood> sorry for the noise
vondruch_ has quit [Remote host closed the connection]
patarr has joined #ruby
vondruch_ has joined #ruby
HoierM has quit [Ping timeout: 240 seconds]
brent___ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
wilbert has joined #ruby
<ljarvis> should have tried with -f havenwood
patarr has quit [Ping timeout: 255 seconds]
ascarter has quit [Ping timeout: 276 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
__Yiota has joined #ruby
brent__ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
__Yiota has quit [Client Quit]
muelleme_ has quit [Ping timeout: 260 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
wilbert has quit [Ping timeout: 268 seconds]
nowhere_man has quit [Remote host closed the connection]
__Yiota has joined #ruby
ModusPwnens has quit [Quit: Page closed]
patarr has joined #ruby
eckhardt has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
meshsmith has quit [Remote host closed the connection]
knight33 has joined #ruby
knight33 has quit [Client Quit]
uZiel has quit [Ping timeout: 248 seconds]
joelwallis has quit []
GinoMan2440 has quit [Ping timeout: 260 seconds]
<havenwood> ljarvis: error: You are not allowed to push code to protected branches on this project.
<havenwood> Friday ¯\_(ツ)_/¯ ;-P
Rodya_ has quit [Remote host closed the connection]
<havenwood> Heh, and of course I paste the wrong error message for force pushing to protected branches.
NightMonkey has quit [Quit: ZNC - http://znc.in]
__Yiota has quit [Ping timeout: 248 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
dviola has joined #ruby
Rodya_ has joined #ruby
__Yiota has joined #ruby
jphase has quit [Ping timeout: 276 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
Guest33777 has quit [Quit: Leaving]
jphase has joined #ruby
nowhere_man has joined #ruby
brent__ has quit [Remote host closed the connection]
NightMonkey has joined #ruby
knight33 has joined #ruby
cseder has quit [Quit: Textual IRC Client: www.textualapp.com]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
max_at_work has joined #ruby
<max_at_work> I found Ruby's printf function, but does Ruby have an equivalent to fprintf?
<max_at_work> other than sprintf and then write?
<ixti> havenwood: 2.3.4 behaves same as 2.3.0 for m :((
<ixti> *me
Cohedrin_ has quit [Read error: Connection reset by peer]
<apeiros> max_at_work: printf is on IO
<apeiros> i.e. any_io.printf
<apeiros> I assume you looked at Kernel#printf, which is a shorthand for $stdout.printf
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
<max_at_work> oh, great, thanks
contradictioned has quit [Ping timeout: 240 seconds]
Cohedrin_ has joined #ruby
PatrikasZvaigzde has quit [Ping timeout: 260 seconds]
max_at_work has quit [Quit: Leaving]
yaewa has quit [Quit: Leaving...]
PatrikasZvaigzde has joined #ruby
moei has joined #ruby
theunraveler has quit []
knight33 has quit [Quit: Textual IRC Client: www.textualapp.com]
jaruga________ has joined #ruby
ldnunes has quit [Quit: Leaving]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
bed7 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jak has quit [Remote host closed the connection]
plujon has quit [Remote host closed the connection]
jak has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
xco has quit [Quit: xco]
patarr has quit [Ping timeout: 255 seconds]
KeyJoo has quit [Ping timeout: 255 seconds]
moei has quit [Quit: Leaving...]
postmodern has joined #ruby
ascarter has joined #ruby
vondruch_ has quit [Remote host closed the connection]
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch_ has joined #ruby
gothicsouth has joined #ruby
Miah_ has quit [Quit: Connection closed for inactivity]
baweaver is now known as baweaver_away
knight33 has joined #ruby
splitshot has left #ruby ["Leaving"]
ascarter has quit [Ping timeout: 255 seconds]
HoierM has joined #ruby
GinoMan has joined #ruby
jaruga________ has quit [Quit: jaruga________]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
HoierM_ has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
ltem has quit [Quit: Leaving]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
HoierM has quit [Ping timeout: 276 seconds]
patarr has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
quobo has joined #ruby
Mudstart has quit [Remote host closed the connection]
muelleme_ has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
gothicsouth has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
cats has quit [Quit: BURN HIS HOUSE DOWN]
cats has joined #ruby
ResidentBiscuit has quit [Quit: Critical Miss]
muelleme_ has quit [Ping timeout: 255 seconds]
clemens3 has quit [Ping timeout: 240 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
bjpenn has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 255 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
patarr has joined #ruby
jak has quit [Remote host closed the connection]
runescape07rsps has quit [Ping timeout: 255 seconds]
patarr has quit [Ping timeout: 240 seconds]
Puffball has quit [Remote host closed the connection]
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
jnollette has quit [Ping timeout: 260 seconds]
jottr_ has quit [Ping timeout: 255 seconds]
AnoHito_ has quit [Quit: Leaving]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
montanonic has quit [Ping timeout: 248 seconds]
jnollette has joined #ruby
morfin has quit []
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
Mia has quit [Ping timeout: 255 seconds]
ged has quit [Quit: WeeChat 1.7.1]
VladGh has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
ascarter has joined #ruby
ekinmur has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
dviola has joined #ruby
bkxd has joined #ruby
bkxd_ has joined #ruby
ascarter has quit [Ping timeout: 248 seconds]
FastJack has quit [Ping timeout: 258 seconds]
montanonic has joined #ruby
learningRuby has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
alex`` has quit [Ping timeout: 255 seconds]
uranellus_ has quit [Ping timeout: 255 seconds]
FastJack has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
patarr has joined #ruby
Puffball has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mwlang has quit [Quit: mwlang]
patarr has quit [Ping timeout: 248 seconds]
marr has quit [Ping timeout: 260 seconds]
Cohedrin_ has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
montanonic has quit [Ping timeout: 248 seconds]
jottr_ has joined #ruby
moei has joined #ruby
Rodya_ has joined #ruby
bdevel_ has joined #ruby
bdevel_ has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr_ has quit [Ping timeout: 248 seconds]
bjpenn has quit [Quit: leaving]
Rodya_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
uranellus has joined #ruby
uranellus has joined #ruby
uranellus has quit [Changing host]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Puffball has quit [Read error: Connection reset by peer]
alveric1 has joined #ruby
Bock has joined #ruby
catphish has quit [Quit: Leaving]
Puffball has joined #ruby
kobain has joined #ruby
alveric has quit [Ping timeout: 276 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
haylon has quit [Remote host closed the connection]
ddddddd has quit [Ping timeout: 268 seconds]
texasmynsted has quit [Read error: Connection reset by peer]
Fernando-Basso has quit [Quit: WeeChat 1.9]
texasmynsted has joined #ruby
choke has joined #ruby
d^sh has quit [Ping timeout: 276 seconds]
d^sh has joined #ruby
uranellus has quit [Ping timeout: 276 seconds]
vondruch_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
s2013 has joined #ruby
ascarter has joined #ruby
comet23 has joined #ruby
<comet23> check it out!
<comet23> i did it all by myself
<comet23> wow i feel like i'm 5 years old again and proud of accomplishing something lol
gusrub has quit [Remote host closed the connection]