jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
joneshf-laptop has quit [Quit: Leaving]
joneshf-laptop has joined #ruby
<volty> I'll try manually; as Ox0dea said the api isn't terrible, and I start remembering what I've implemented before.
<volty> shevy: you are tired, but me too :)
<shevy> dunno
<shevy> I am using ruby-gnome usually
<volty> install qtruby and play with it. contribute to ruby's versatility growth
sleungcy has quit [Quit: Connection closed for inactivity]
horsecowdog has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<volty> but qt is ruby-like, while gtk & gnome are python-like. Be consistent, be coherent - go Qt.
avahey has joined #ruby
rubie has joined #ruby
amclain has quit [Quit: Leaving]
axsuul has quit [Ping timeout: 245 seconds]
horsecowdog has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
blue_deref has joined #ruby
<Ox0dea> Aeyrix: That was the prettiest first possession I have ever seen.
babykosh has quit [Quit: babykosh]
<Aeyrix> Ox0dea: I'm at work. D:
<shevy> I would not know where to get qtruby from
ogpastaling has joined #ruby
<Ox0dea> Aeyrix: Ah, bummer. 6 combined TOs, 0 points in the first two-and-a-half.
<Ox0dea> Should be a fun one.
<Aeyrix> Ox0dea: Christ.
horsecowdog has quit [Ping timeout: 276 seconds]
<Aeyrix> Have we still got JR Smith shooting? :^)
<Ox0dea> I sure hope so. ^_^
<Aeyrix> LOL
<Aeyrix> We do. :(
<Ox0dea> He was -52 last game.
<Aeyrix> Yep.
<Aeyrix> Absolute garbage. I don't know what's up with him.
<volty> shevy: gem install qtbindings
<shevy> oh so qtruby has another name
<shevy> clever :)
rubie has quit [Remote host closed the connection]
<Aeyrix> shevy: you what
<Aeyrix> Those are the ruby bindings for qt
<shevy> yeah, qtbindings
blackmesa has joined #ruby
<volty> yeah, I call it qtruby, the old name, I think
rubie has joined #ruby
ogpastaling has quit [Ping timeout: 256 seconds]
blackmesa has quit [Client Quit]
blackmesa has joined #ruby
hardlin3r has quit [Ping timeout: 245 seconds]
krisquigley has joined #ruby
blackmesa has quit [Client Quit]
timonv has quit [Ping timeout: 276 seconds]
iamninja has quit [Ping timeout: 240 seconds]
jcaho has quit [Read error: Connection reset by peer]
Marsupermammal has joined #ruby
jcaho has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
ta has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
marr has quit [Ping timeout: 276 seconds]
arescorpio has quit [Read error: Connection reset by peer]
GnuYawk has joined #ruby
<shevy> cannot find -lsmokeqtopengl
ta has quit [Ping timeout: 276 seconds]
Akagi201 has joined #ruby
simplyianm has joined #ruby
mdz_ has joined #ruby
<zenspider> rawr! just released debride 1.5.0 w/ emperical rails whitelisting and --focus
<zenspider> I'm super duper happy with this little project
mcclurmc has joined #ruby
f3lp has joined #ruby
mdz_ has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
meph has quit [Quit: Leaving.]
serivich has quit [Ping timeout: 265 seconds]
<al2o3-cr> hmm, seems to work http://i.imgur.com/eO11qhH.png
robustus has quit [Ping timeout: 264 seconds]
advorak has joined #ruby
mcclurmc_ has joined #ruby
<shevy> yeah if I could find out where smokeqtopengl is
<advorak> hi there - let's say I have created a few classes: One, One::Two, and One::Two::Three; From within class One::Two::Three, how can I refer to One::Two?
mcclurmc has quit [Ping timeout: 252 seconds]
<shevy> advorak often you can try leading :: such as ::One::Two
<zenspider> shevy: a method?
bruno-_ has quit [Ping timeout: 276 seconds]
<shevy> moment... need to find out what smokeqtopengl is
robustus|Off has joined #ruby
<zenspider> advorak: depending on the code structure (nesting vs not) you can just refer to `Two` or `One::Two`. You almost never need a leading "::" unless you're shadowing something
robustus|Off is now known as robustus
<zenspider> shevy: sorry. looks like it is a lib based on your error above?
<zenspider> cannot find -lsmokeqtopengl ?
failshell has joined #ruby
<volty> what advorak means by «refer»?
bjornar has quit [Ping timeout: 265 seconds]
<zenspider> volty: refer: verb: mention or allude to
<volty> you cannot access the instance variables, for example
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
<zenspider> shevy: should be libsmokeqtopengl* somewhere in your lib path
<zenspider> volty: since when can you not access instance variables?
Rollabunna has joined #ruby
oo_ has joined #ruby
<zenspider> pretty sure it was obvious he was referring to constants just by the scoping and casing
<advorak> shevy, Thank you. I am actually realizing that I need to play with my code a little more, as I'm realizing that I probably don't want to do what I was thinking I wanted to do :-)
<shevy> zenspider btw could debride be coupled with rubocop? e. g. when one would want to run a larger analysis of ruby code
bmurt has joined #ruby
<volty> zenspider: it was not obvious to me :)
scottstamp has quit [Ping timeout: 265 seconds]
<volty> (and that's why I just asked)
scottstamp has joined #ruby
bjornar has joined #ruby
<zenspider> shevy: don't see why not, but they're very different beasts. I think you'd want to look at them at different times
failshell has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
kadoppe has quit [Ping timeout: 276 seconds]
jinie has quit [Ping timeout: 265 seconds]
kirun has quit [Quit: Client exiting]
kadoppe has joined #ruby
Rollabunna has quit [Ping timeout: 256 seconds]
attlasbot has quit [Quit: Leaving]
ayonkhan has quit [Ping timeout: 276 seconds]
hyperjui_ has joined #ruby
El3ktra has joined #ruby
jinie has joined #ruby
sdothum has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
ScriptGeek has quit [Quit: Leaving.]
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apoplexy has quit [Ping timeout: 256 seconds]
Marsupermammal has joined #ruby
hyperjuice has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby
konieczkow has joined #ruby
Limix has quit [Quit: Limix]
freerobby has quit [Quit: Leaving.]
<El3ktra> So, I want to show the "many" side of a relationship as a comma-deliminated list. I do this using: movie.keywords.map(&:name).join(",")
ayonkhan has joined #ruby
weszlem has quit [Ping timeout: 256 seconds]
<El3ktra> It works well, but I have another object that has a name that I compile in the method file. (The name has a firstname and lastname, and I have a methid that returns a string of the two names combined)
<El3ktra> the problem is that map doesn't work with fields that aren't fields in the database
<El3ktra> sorry if I am not explaining this well
Marsupermammal has quit [Client Quit]
mrmargolis has quit [Remote host closed the connection]
<Aeyrix> You're not, honestly.
<Aeyrix> Firstly, this sounds like a Rails issue, yeah?
<Aeyrix> Secondly, am I understanding this right? :
<El3ktra> yes, a rails issue. Is there a better room?
<Aeyrix> #RubyonRails
<starfox_sf> I have been working on a toy web crawler with ruby and I am looking to make it multi-threaded. I have played with threads a few times using ruby. Are there any good resources/tutorials/gems I should look into for using threads in this project?
jenrzzz has joined #ruby
CustosLimen has quit [Max SendQ exceeded]
FernandoBasso has quit [Quit: WeeChat 1.2]
bkxd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
CustosLimen has joined #ruby
mleung has joined #ruby
advorak has quit [Quit: This computer has gone to sleep]
<zenspider> El3ktra: "map doesn't work with fields that aren't fields in the database" ... map is just a method. It does what you tell it to do
bmurt has quit []
Dreamer3 has joined #ruby
simplyianm has quit [Remote host closed the connection]
charliesome has joined #ruby
mleung has quit [Client Quit]
Cache_Money has joined #ruby
michael_mbp has quit [Excess Flood]
chouhoulis has joined #ruby
workmad3 has joined #ruby
mrmargolis has joined #ruby
michael_mbp has joined #ruby
simplyianm has joined #ruby
sdothum has quit [Ping timeout: 256 seconds]
<volty> Ruby is just a lang. It does what you tell it to do. Pretty clear. Clearer than the thorns of a cactus. :)
chouhoulis has quit [Ping timeout: 245 seconds]
pontiki has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<volty> I guess that Python community has less pedantic and more friendly people (though the difference is not so big, plenty of nice ruby ppl around)
simplyianm has quit [Ping timeout: 246 seconds]
<pontiki> :'(
<noethics> as a pedant and a pythonist i resent that
bronson has joined #ruby
<volty> that's why are you here :)
<volty> (joking, of course)
<weaksauce> noethics get out there and pedant
bronson has quit [Remote host closed the connection]
centrx has joined #ruby
<noethics> one does not simply pedant
<noethics> it comes naturally in any conversation
<weaksauce> volty ruby has many ways of doing things. python tries to have one path so it either works or it doesn't
<volty> haskellers are quite pedant, but they are at the same time very very friendly — at the end you get nothing (in code), but remain pleased :)
<Aeyrix> Lol haskell
<Aeyrix> also python
<Aeyrix> >base a language syntax off whitespace
<Aeyrix> how did it succeed as much as it did
<noethics> pedant is a noun, you just used it as an adjective. i believe the word you were looking for was pedantic
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> lol
<volty> weaksauce: the mine are about ppl, not about the langs. I already know (and agree about) the diffs
weemsledeux has joined #ruby
nofxx has quit [Remote host closed the connection]
<noethics> actually i dislike using python
<noethics> ruby is nicer to use but i can never find an excuse to use it
ta has joined #ruby
millerti has joined #ruby
lapidary has joined #ruby
<noethics> Aeyrix, you still off the dota 2 m9
<noethics> did you see the update
<eam> I mean, ruby has whitespace significance too
<eam> it's what people like
<shevy> ruby may warn when the indent is not propr, e. g. "wrong 'end' indent" or something like that
jphenow has quit [Quit: Lingo: www.lingoirc.com]
<shevy> *proper
<noethics> i prefer to save compiler cpu cycles and code everything on 1 line
<eam> what's the end of line delimiter?
jenrzzz has quit [Ping timeout: 252 seconds]
<volty> i don't want to be force to break the flow of my logic
<volty> forced
<Aeyrix> @noethics
<Aeyrix> I play HoTS now mostly.
f3lp has quit [Ping timeout: 252 seconds]
<Aeyrix> Dota 2 is too complex for me. :^)
<noethics> Aeyrix, ew what are you 12
<noethics> fght me
<Aeyrix> Reverse those numbers.
<Aeyrix> I like the faster gameds.
<Aeyrix> -d
<Aeyrix> 10-20 min.
<eam> >> [eval("a = 1 \n + 2 ;a"), eval("a = 1 + \n 2 ;a")]
<ruboto> eam # => [1, 3] (https://eval.in/381401)
<noethics> i guess there's only so much of peruvian-american servers one can take
<Aeyrix> HoTS has Aussie servs.
<noethics> i remember trenching it up and my whole team and everyone on the other team were peruvian
<Aeyrix> kek
<noethics> im like m9 i thought i was on an american server
<weaksauce> volty now you are being pedantic :P
<Aeyrix> noethics: The problem is
RegulationD has joined #ruby
<Aeyrix> the "foreign" servers are sparsely populated
<weaksauce> but my point stands that python leave less room for pedantry
<Aeyrix> So those individuals shift across to the English speaking servers for faster queue times.
<weaksauce> same with go
<noethics> less room for pedantry
peteykun has joined #ruby
<shevy> python educates well-behaving citizens
ta has quit [Ping timeout: 276 seconds]
<noethics> true Aeyrix
mdz_ has joined #ruby
<Aeyrix> Ox0dea: half time
<Aeyrix> 50 : 51
<Aeyrix> oh baby
<volty> weaksauce: not at all, au contraire — i want to be able to put it all in a single method, and maybe later break / refactor it — the dirty approach, opposite of pedantic
<noethics> i do that when i have no idea what im doing sometimes
<noethics> 300 lines of code in 1 method then refactor it
longfeet has joined #ruby
<volty> it all depends on what are you doing
<weaksauce> volty I didn't read what you said after you addressed me
<noethics> no one was the wiser
<weaksauce> I was talking about the lang vs. people comment
<weaksauce> and for the record I like python
<noethics> you know what i think
<volty> ah, ok, @ weaksauce
<noethics> people are equally dumb in all languages except functional languages
<noethics> like the law of large numbers or some shit
<volty> ah ah
<weaksauce> > people are equally dumb in all languages except functional languages
<weaksauce> and then they are not productive <3 noethics
<Aeyrix> Functional languages are pretty awesome because they're mathematically provable.
<Aeyrix> But they're also really complex because of it.
<volty> the smart functional with no fruits
bruno- has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<Aeyrix> The XKCD comic says it best:
<noethics> weaksauce, idk if thats a bait
<noethics> i think it is
<weaksauce> really though. as long as it's not javascript I am ok
x0f has quit [Ping timeout: 252 seconds]
<Aeyrix> also this: https://xkcd.com/1312/
<weaksauce> it's bait noethics... monad your way out of a paperbag and then yell at me on irc
<noethics> wanna fight
RegulationD has quit [Ping timeout: 265 seconds]
mcclurmc_ has quit [Read error: Connection reset by peer]
<weaksauce> I don't know how you can find me with the paper bag still blocking your vision :P
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
mdz_ has quit [Ping timeout: 252 seconds]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<volty> the smarties, terrible, posing all the time. hours on composing something cryptic, then hours to show that unintelligible masterpiece to others
senayar has joined #ruby
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<noethics> volty, you're at least 40 years old right
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<volty> I remember when I was reading (around, internet), about monads. Awful. The art of over-complicating simple concepts.
<volty> noethics: :)
<noethics> i can tell
<noethics> you're likely ~49-55
<noethics> male, have worked the same asp.net job for ~20 years
Agoldfish378 has quit [Quit: G'Bye]
DynamicMetaFlow has joined #ruby
<noethics> etc
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
bruno- has quit [Ping timeout: 256 seconds]
x0f has joined #ruby
<volty> while you were jumping from «goto» to «case»
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<volty> :)
ayonkhan has quit []
<freedrull> this example seems wrong. isn't using mixins inheritance too? http://learnrubythehardway.org/book/ex44.html
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
f3lp has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<volty> that doc is pretty long, where's the point of your concern ?
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
tkuchiki has joined #ruby
<weaksauce> haha. talking of bait noethics
DynamicMetaFlow has joined #ruby
skippy_77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
mdz_ has joined #ruby
<weaksauce> some of us don't want to learn the lang du jour just to learn someting new
<weaksauce> something*
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<noethics> nah im not some language hipster :D
DynamicMetaFlow has joined #ruby
<noethics> i don't actually care what you use
<noethics> or what anyone uses
<noethics> unless it's java
<noethics> jk i love java
<Aeyrix> Ffs
<Aeyrix> I'm not gonna get any work done today
<Aeyrix> because of this finals
<weaksauce> now I know you are trolling... no one loves java noethics
<volty> I was really impressed by haskell. And I lost time to understand that it heads towards void. But now have to do (just to do, not really learn) with java
<noethics> weaksauce, i do
<noethics> legitimately
<Aeyrix> volty: The haskell website looks like a Silicon Valley startup.
<volty> I agree with weaksauce
<weaksauce> it was built by people that didn't want to trust people
oo_ has quit [Remote host closed the connection]
<noethics> java is basically the language everyone wants but no one wants to admit they want
<weaksauce> c# is actually an excellent language
<volty> working with java, after c++, is like making love with a woman without hole
<weaksauce> a little verbose but gets right what java gets really wrong.
<Aeyrix> I do like me some C#.
<Aeyrix> I dislike the conventions though.
<Aeyrix> Hanging {, gross.
mdz_ has quit [Remote host closed the connection]
<weaksauce> which one is that Aeyrix the newline with only a { on it?
lapidary has left #ruby [#ruby]
<weaksauce> actually, swift is really interesting. seems like it took a lot of the good things from ruby
<Aeyrix> weaksauce: Yes.
Xiti has joined #ruby
<weaksauce> yeah that's gross Aeyrix
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<noethics> swift looks like junk
<noethics> it's unoriginal
Rickmasta has joined #ruby
<noethics> the only good thing about it is that it's open source
<weaksauce> well it's not either of those things.
<weaksauce> it will be os some time later. probably
<noethics> it's going to be opoen source
fujimura has joined #ruby
<volty> I would just appreciate ruby written in c++ - so that it can be linked "naturally" with qt
<noethics> weaksauce, at the end of 2015
<noethics> it was announced like 3 days ago, jesus, are you not up to date
<noethics> thought you were a hipster
<weaksauce> so was the facetime protocol noethics
<weaksauce> unless it's out there it's not there
<weaksauce> that was promised on a big stage as well
<noethics> that guy with cancer died though
<noethics> things change
slawrence00 has quit [Ping timeout: 246 seconds]
<weaksauce> I think hipsters are weak for the most part. it's a lot harder to say "yeah I like this" than it is to say everything sucks
<noethics> i dont think im a hipster
<noethics> if thats what youre implying
<noethics> hipsters dont like java
<noethics> plus, swift actually does suck
<weaksauce> i'm not
<weaksauce> unlike you I am not presuming anything about you
<noethics> what am i presuming about me
<weaksauce> > thought you were a hipster
<weaksauce> that's a presumption about me.
<noethics> that was a joke
<noethics> calm down
<volty> hipster once, hipster forever :)
<weaksauce> :)
<dorei> rails will hipsterize you, beware :D
<volty> just like hippies, counter-culture conformists
<weaksauce> shit. I drank that koolaide a while ago
<noethics> people still use rails?
<noethics> i thought everyone moved to nodejs
<dorei> nodejs or iojs? :p
<weaksauce> node people just love to hate themselves
<noethics> oh right iojs
jhooker has joined #ruby
<centrx> nodejs is so silly
<noethics> i love me some react+angular+nodejs action
<noethics> know what i mean
<noethics> iojs*
<centrx> even the faddish hipsters have moved onto Goo etc.
dopie has joined #ruby
<noethics> whats goo
<weaksauce> if javascript was the pinnacle of language design then why did the creator purposely name it after the language du jour in order to gain marketshare?
<volty> the java family is killing the intelligence and the fantasy
<dorei> weaksauce: javascript is the pinnacle of backward compatible stupidity :D
oo_ has joined #ruby
zotherstupidguy has quit [Ping timeout: 244 seconds]
<noethics> idk i have it from good authority from ##javascript that js is the future and people who aren't on board are gonna get left behind
<volty> ho ho
<weaksauce> if you take out backward compatible i'd agree dorei
<weaksauce> ;)
<noethics> plus they said ruby is going to get outclassed by ecma6
<volty> ho, ho, we have fjiyama and his "the end of history" here :)
datanoise has joined #ruby
zotherstupidguy has joined #ruby
<weaksauce> javascript is the way forward if you are looking to leak memory in a closure
<volty> now that microsoft has nokia, they should rewrite ruby in c++, pack it with qt, and you'll see the breeze of fast app dev
<dorei> weaksauce: i'm pretty sure there 'll be someone that will add more memory to the cluster :D
<noethics> mm i love me some clojure
drocsid has joined #ruby
<noethics> you guys ever heard of clojure
perturbation has joined #ruby
<volty> i just read something
arescorpio has joined #ruby
<volty> another one of «functional» — much of a muchness
<volty> no, confused
Ox0dea has left #ruby ["WeeChat 1.3-dev"]
<volty> «immutable data structures» — shot 'u, with «purity»
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<noethics> what even is state
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* noethics headswipes
bogdanteleaga has quit [Ping timeout: 240 seconds]
<volty> gn
volty has quit [Quit: Konversation terminated!]
JDiPierro has quit [Remote host closed the connection]
darkf has joined #ruby
<shevy> well
<shevy> javascript is growing
saadq has joined #ruby
<saadq> Any suggestions on resources for learning Ruby for someone who has some programming experience?
perturbation has quit [Quit: Leaving]
krisquigley has joined #ruby
x0f has quit [Ping timeout: 276 seconds]
<pabs> saadq: the book "programming ruby" by dave thomas is a pretty good resource
cytoskeletor has joined #ruby
<saadq> Thanks pabs. Is it plain Ruby or is it for Rails?
<pabs> saadq: portions of it are available online here: http://ruby-doc.com/docs/ProgrammingRuby/, or you can buy it here: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
<pabs> saadq: plain ruby
<saadq> I'd rather learn vanilla Ruby before going into rails
<saadq> okay great, thanks
<pabs> sure, no problem
<Aeyrix> shevy: Growing?
<Aeyrix> In popularity?
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
krisquigley has quit [Ping timeout: 265 seconds]
skippy_77 has joined #ruby
x0f has joined #ruby
Rickmasta has joined #ruby
ogpastaling has joined #ruby
Grunt8 has joined #ruby
yfeldblum has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
CustosLimen has quit [Read error: Connection timed out]
Grunt8 has quit [Client Quit]
ogpastaling has quit [Ping timeout: 244 seconds]
senayar has quit []
CustosLimen has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
bronson has joined #ruby
pontiki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shazaum has quit [Quit: This computer has gone to sleep]
saadq has quit [Remote host closed the connection]
dopie has quit [Quit: This computer has gone to sleep]
NeverDie has joined #ruby
failshell has joined #ruby
<shevy> Aeyrix YES!
<shevy> everyone uses javascript
ta has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
niemc2 has joined #ruby
symm- has joined #ruby
failshell has quit [Ping timeout: 252 seconds]
pontiki has joined #ruby
towski_ has joined #ruby
ta has quit [Ping timeout: 276 seconds]
psy_ has quit [Quit: Leaving]
towski_ has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 265 seconds]
scripore has quit [Read error: Connection reset by peer]
<existensil> its the lingua franca of programming
<existensil> almost every developer has to touch javascript at some point
JDiPierro has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
phutchins has quit [Ping timeout: 272 seconds]
Renich has joined #ruby
dfockler has joined #ruby
balazs has joined #ruby
Rollabunna has joined #ruby
JDiPierro has quit [Ping timeout: 276 seconds]
mrmargolis has quit [Remote host closed the connection]
<shevy> so that's just like poo here right
dfockler has quit [Ping timeout: 256 seconds]
saadq has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
advorak has joined #ruby
mdz_ has joined #ruby
justintv90 has joined #ruby
<advorak> shevy, I had the hierarchy of my code messed up, anyways ... How I was looking to structure the classes made no sense ...
<advorak> now that I've moved some things around I don't need to do what I wanted. :-)
freerobby has joined #ruby
mdz_ has quit [Ping timeout: 252 seconds]
yqt has quit [Ping timeout: 264 seconds]
milktrader has quit [Ping timeout: 265 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has joined #ruby
oo_ has quit [Quit: Leaving...]
davedev2_ has quit [Ping timeout: 245 seconds]
saadq has quit [Remote host closed the connection]
oo_ has joined #ruby
psy_ has joined #ruby
skippy_77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kricir has quit [Remote host closed the connection]
horsecowdog has joined #ruby
ebbflowgo has joined #ruby
apoplexy has joined #ruby
michaeldeol has joined #ruby
workmad3 has joined #ruby
Kricir has joined #ruby
simplyianm has joined #ruby
ebbflowgo has quit [Ping timeout: 265 seconds]
horsecowdog has quit [Ping timeout: 276 seconds]
longfeet has quit [Quit: Leaving]
braincras has quit [Quit: bye bye]
workmad3 has quit [Ping timeout: 240 seconds]
Kricir has quit [Ping timeout: 265 seconds]
jcaho has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
jcaho has joined #ruby
x1337807x has quit [Read error: Connection reset by peer]
x1337807_ has joined #ruby
balazs has quit [Remote host closed the connection]
DynamicMetaFlow has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
braincrash has joined #ruby
hakunin has quit [Remote host closed the connection]
dorei has quit []
hakunin has joined #ruby
acke has joined #ruby
axsuul has joined #ruby
Spami has joined #ruby
dopie has joined #ruby
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
advorak has quit [Ping timeout: 272 seconds]
RegulationD has joined #ruby
datanoise has quit [Ping timeout: 264 seconds]
acke has quit [Ping timeout: 264 seconds]
advorak has joined #ruby
Yiota has joined #ruby
jenrzzz has joined #ruby
<shevy> when it comes to classes and modules, it often helps when you specify how you wish to use the code from somewhere else
yfeldblum has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
bogdanteleaga has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
Cache_Money has joined #ruby
j4cknewt has quit [Remote host closed the connection]
LMity has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
ta has joined #ruby
dopie has quit [Quit: Leaving]
j_mcnall_ has joined #ruby
Lucky__ has quit [Ping timeout: 272 seconds]
stryek has quit [Remote host closed the connection]
revath has joined #ruby
michael_mbp has quit [Excess Flood]
j_mcnally has quit [Ping timeout: 256 seconds]
f3lp has quit [Ping timeout: 276 seconds]
Limix has joined #ruby
francois_ has joined #ruby
ta has quit [Ping timeout: 272 seconds]
michael_mbp has joined #ruby
Ropeney has joined #ruby
<shevy> like, when you have a module or a class called Ftp
cytoskeletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> if you wish to connect to some ftp site, perhaps a method Ftp.connect may be appropriate
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
hahuang65 has joined #ruby
konsolebox has joined #ruby
francois_ has quit [Ping timeout: 265 seconds]
jhooker has quit [Ping timeout: 245 seconds]
j4cknewt has joined #ruby
lessless has joined #ruby
gix has quit [Ping timeout: 250 seconds]
n008f4g_ has quit [Ping timeout: 255 seconds]
Scroff has joined #ruby
Limix has quit [Quit: Limix]
bkxd has joined #ruby
ylla has joined #ruby
RickHull has joined #ruby
armyriad has quit [Ping timeout: 276 seconds]
gix has joined #ruby
<RickHull> Hi, i'm running into a dependency conflict that I'm wondering if/how I can workaround. specifically i want to use privately authored gem A, which depends on Slop v4. but now I can't use it with chef gem or anything that depends on pry, which mandates slop no higher than 3
qubits has joined #ruby
scripore has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull> gem A uses slop only for the executable portions, not the lib stuff
<qubits> Greetings all, I am fairly new to ruby but this little hangup has a several hour job ground to a halt
<RickHull> and it's the lib stuff I need
<qubits> root@highlands:/var/www/snorby# rake snorby:setup
<qubits> rake aborted!
<qubits> Bundler::InvalidOption: The gemspec at /var/lib/gems/2.1.0/bundler/gems/snorby_cas_authenticatable-281a58b36368/devise_cas_authenticatable.gemspec is not valid. The validation error was 'duplicate dependency on devise (>= 1.0.6), (>= 0) use: add_runtime_dependency 'devise', '>= 1.0.6', '>= 0'
<shevy> yeah that sucks RickHull
swgillespie has joined #ruby
<drocsid> I'm trying to open an external program from ruby using popen3. When I start the program from the command line, I see stuff printed to my terminal. I assume this is stdout. But when I try to print standard out from ruby, I don't see anything: http://pastie.org/10240656 . What do I need to do?
<RickHull> I'm wondering if there's anythign i can do with gem activation
<shevy> RickHull you can always open up a gem, modify the .gemspec and get rid of the hardcoded block there
<RickHull> shevy: or, i'm thinking of undeclaring hte dependency on slop in the gemspec
<shevy> yes that can also work
<shevy> and you handle the dependency internally to
Scroff has quit [Ping timeout: 265 seconds]
<RickHull> well, it does seem stupid for chef to depend on pry as runtime dependency
<RickHull> i have no idea why they would do that
<shevy> remember, gem does nothing special; everything is just plain ruby files, and you can always modify these .rb files as well
<shevy> no idea either
<shevy> for my gems, I got rid of mandatory versioned-loading
<shevy> because it kept on blocking me :\
<drocsid> oh mighty rubyists, do you have any idea on what I'm doing wrong?
<RickHull> note that i'm using select to decide what has stuff ready for me to read, and then doing read_nonblock
dented42 has joined #ruby
<RickHull> you probably want to avoid gets outside of interactive input
<RickHull> shevy: what do you mean "got rid of mandatory versioned-loading"?
simplyianm has quit [Remote host closed the connection]
<drocsid> RickHull: I will try to modify your example, and see if I have any luck. Thanks.
davedev2_ has joined #ruby
skippy_77 has joined #ruby
<RickHull> drocsid: you might just copy/paste and see if it works for you
oo_ has quit [Remote host closed the connection]
skippy_77 has quit [Client Quit]
krisquigley has joined #ruby
tsou has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
veinofstars has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
Kricir has joined #ruby
skade has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
<drocsid> RickHull: I tried your example, and the same. Nothing output to the terminal. http://pastie.org/10240671
skade has quit [Client Quit]
simplyianm has joined #ruby
<drocsid> asking around in #logstash too
<RickHull> looks like bytes is unset
<RickHull> also, just try it with `ls` and such first
<RickHull> you have two simultaneous issues: 1. is my command outputting what i think it is? and 2. is my code doing what i think it is?
Kricir has quit [Ping timeout: 256 seconds]
<RickHull> try to isolate them and work on them independently
<RickHull> rather trial and error with 2 unknowns
<RickHull> *rather than
zotherstupidguy has quit [Quit: WeeChat 1.2]
gianlucadv has joined #ruby
zotherstupidguy has joined #ruby
revath has quit [Ping timeout: 246 seconds]
failshell has joined #ruby
tsou has quit [Quit: off]
datanoise has joined #ruby
mattarse has quit [Ping timeout: 272 seconds]
ogpastaling has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
failshell has quit [Ping timeout: 252 seconds]
x1337807x has joined #ruby
Kricir has joined #ruby
mdz_ has joined #ruby
<drocsid> RickHull: I tried simpler commands earlier with my example, and it output. I will try to set bytes for your example.
Kricir has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
datanoise has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
ogpastaling has quit [Ping timeout: 265 seconds]
Kricir has joined #ruby
Cache_Money has joined #ruby
kies has joined #ruby
mdz_ has quit [Ping timeout: 245 seconds]
arescorpio has quit [Quit: Leaving.]
Channel6 has quit [Quit: Leaving]
Kricir has quit [Read error: Connection reset by peer]
<drocsid> RickHull: http://pastie.org/10240690, I set bytes. Your example works with ping, but not with this other command
Kricir has joined #ruby
Kricir has quit [Remote host closed the connection]
<drocsid> similar to the example I presented in the begining
<RickHull> ok, so you'll have to demonstrate working versus not working
<RickHull> either show the same command executed both ways, one working one not
<RickHull> s/either//
<drocsid> yeah so if you look at the paste above ^^ with the ping command, it works. With the other it doesn't. Maybe it has to do with the command that I'm running
<drocsid> which looks to be a wrapper starting a ruby process itself
<RickHull> i don't know what works vs doesn't work means
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull> you'll literally have to demonstrate the same command "working" one way
<RickHull> and "not working" the other way
<RickHull> paste the results
<drocsid> try executing http://pastie.org/10240690
michaeldeol has quit [Remote host closed the connection]
<RickHull> no u
ta has joined #ruby
jcaho has quit [Read error: Connection reset by peer]
jcaho has joined #ruby
<drocsid> ruby test_logstash_single.rb
<drocsid> PING google.com (173.194.33.131) 56(84) bytes of data.
<drocsid> 64 bytes from sea09s17-in-f3.1e100.net (173.194.33.131): icmp_seq=1 ttl=57 time=11.3 ms
<drocsid> 64 bytes from sea09s17-in-f3.1e100.net (173.194.33.131): icmp_seq=2 ttl=57 time=12.0 ms
<drocsid> and the code is at the paste link above
mrmargolis has joined #ruby
<drocsid> if I uncomment the ping command on http://pastie.org/10240690
<drocsid> and switch to the other command, the terminal just sits there after execution
swgillespie has joined #ruby
<drocsid> but when I run the other command from a shell, I see output on the terminal
<drocsid> anyhow, like I said earlier, maybe it has to do with the command I'm running
weemsledeux has quit [Remote host closed the connection]
<drocsid> which seems to be a wrapper that launches a ruby program itself
<RickHull> my last piece of advice:
<RickHull> 1. find a command that "works" on the command line / shell
<RickHull> execute it, copy the output, paste it to pastebin. demonstrate the working case
<RickHull> copy the invocation, not just the output
<RickHull> 2. execute it via ruby code, show the invocation and what went into it, and hte output or lack thereof
mrmargolis has quit [Ping timeout: 250 seconds]
ta has quit [Ping timeout: 256 seconds]
<RickHull> ideally, you would execute #2 via a tiny wrapper script. e.g. #!/usr/bin/env ruby which accepts `cmd` as a cmdline arg, and then executes it, passing through STDERR and STDOUT
<drocsid> RickHull: I think I know what's going on, and that will take 15 more minutes. I believe I clearly showed you enough above.
<RickHull> drocsid: you haven't shown a single example of working vs not working
<RickHull> on a paste link
<drocsid> I showed you the program I ran, two ways. I pasted the example of it working here. There isn't much to see really
<RickHull> multiline pastes here are usually ignored
<RickHull> IRC is a bad medium for reading code and output
<drocsid> Ok, I will paste this for you, but I think the issue is the program I'm running isn't a simple shell command, and is launching it's own subshells
<RickHull> popen3 doesn't really touch the shell
<RickHull> it just invokes a process
Rollabunna has joined #ruby
LicHacker has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
riotjones has joined #ruby
hanmac has quit [Ping timeout: 265 seconds]
nahtnam has joined #ruby
<drocsid> RickHull: http://pastie.org/10240719
<RickHull> the process inherits the environment from the caller. i.e. `env` has the same output in parent and chile
Rollabunna has quit [Ping timeout: 265 seconds]
<RickHull> *child
hazelux has joined #ruby
<RickHull> drocsid: ok, we've established the code does what it says it does, in the one case of ping
<RickHull> and one last time, to be clear
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull> let's see the output of the command as executed in shell on the command line
x0f has quit [Ping timeout: 245 seconds]
<RickHull> that's the "working version"
<drocsid> ok
<RickHull> and then the very same command invoked via ruby / popen
<RickHull> then "non working version"
<RickHull> and show the invocation and what goes into it
<RickHull> in the case of ping, we don't need it
krz has joined #ruby
x0f has joined #ruby
<RickHull> i trust you that `ping` on CLI has ouput equivalent to what youv'e shown when invoked via popen3
workmad3 has joined #ruby
<drocsid> RickHull: do you want me to set -x and run the non-wokring command
<drocsid> and paste it
<drocsid> ok
<drocsid> or
hyperjuice has joined #ruby
<RickHull> literally the invocation of logstash blah blah
<drocsid> I will just paste it from the terminal when I launch the command
<drocsid> ok
<RickHull> on the command line
<RickHull> and then invocation of the very same command
<RickHull> via popen3
bootstrappm has joined #ruby
HotCoder has joined #ruby
<RickHull> no offense, but i feel like you're not reading what i'm writing
<RickHull> > RickHull: either show the same command executed both ways, one working one not
<RickHull> that was like 20 minutes ago
hyperjui_ has quit [Ping timeout: 252 seconds]
<RickHull> i don't know how many different ways to try to communicate the same thing
HotCoder has quit [Client Quit]
x44x45x41x4E has joined #ruby
djbkd has joined #ruby
HotCoder has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
nobitanobi has joined #ruby
revath has joined #ruby
<drocsid> RickHull: http://pastie.org/10240730
gianlucadv has quit [Ping timeout: 264 seconds]
<RickHull> not sure why you commented out sin.close_write
<RickHull> it shouldn't matter, but let's stick to the original for a moment
<RickHull> (L47)
<drocsid> RickHull: I tried it both ways, because I want to pass stdin to it, that's what I want to do when I can get this to work.
CustosLimen has quit [Max SendQ exceeded]
<RickHull> ok
<drocsid> as a bonus I pasted what I'm trying to launch
<RickHull> L64 and L69 don't agree
mattarse has joined #ruby
Kricir has quit [Remote host closed the connection]
<RickHull> it's ok if you manipulated the paste a little bit for the sake of presentation
Akagi201 has quit [Ping timeout: 256 seconds]
CustosLimen has joined #ruby
<RickHull> but what's the story with L64 and L69?
<drocsid> I put the number 2 in there for your sake
<drocsid> I just switch the comment for my sake
hanmac has joined #ruby
yardenbar has quit [Quit: Leaving]
<RickHull> ok, and so when you run it on cmdline, you get nothing on STDOUT, some stuff on STDERR, and failure exit code?
last_staff has joined #ruby
<RickHull> is that accurate?
<RickHull> also, for the sake of people helping, see if you can make extra effort to make the pastes faithful to what was actually run
<RickHull> i'm assuming there is no major bug in the code, and no major bug in the command
yfeldblum has joined #ruby
<RickHull> and that the problem is the way you are running it or your environment
<drocsid> I assumed what I see on my shell as STDOUT, maybe that is a poor assumption
<RickHull> and being faithful to those is how we will uncover it
<drocsid> look at the output of the running command
<RickHull> likely STDERR
<drocsid> isn't your script printing that also?
<RickHull> try blah_blah_foo_cmd > /tmp/stdout 2>/tmp/stderr
centrx has quit [Quit: Shutting down, Please wait...]
<drocsid> (f == sout ? $stdout : $stderr).print f.read_nonblock(1024)
<RickHull> that code is faithful to the process
<RickHull> the code says, if the process gave me something on stderr, print it on my own stderr
<RickHull> likewise for stdout
<drocsid> ok
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
wildroman2 has joined #ruby
<RickHull> just FYI, I don't want to get into the specifics of whatever command you're running. the logstash thing. but that it was what i'm referencing by `blah_blah_foo_cmd`
<RickHull> if blah_blah_foo_cmd is misbehaving, ok, take it up with blahblahfoo
<Scub_> whats the best way to go about printing all of an objects variables?
<RickHull> but popen3 and this code should be doing the right thing
<RickHull> Scub_: instance vars?
<Scub_> I believe - you'll have to forgive my ignorance on jargon
<RickHull> let's get the question right first
<RickHull> what is it you want to know?
<RickHull> any given object is an instance of a class
<RickHull> and it has some data stored in instance variables
<Scub_> I would like to obtain the data from all instance variables :D
RegulationD has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<drocsid> RickHull: Thanks for trying to help
<RickHull> one way is `pry` purely for exploration
scripore has quit [Quit: This computer has gone to sleep]
<drocsid> I guess our conclusion is that logstash is misbehaving
<RickHull> another way is Object#inspect, which usually displays ivar values
<RickHull> drocsid: yeah, i mean the way to do that is to cut the popen stuff out, and make sure it does what you expect on cmdline
<RickHull> once it does that, the popen stuff should be transparent
<drocsid> from my terminal I launch it, and I see the lines pasted
<drocsid> that I pasted
<drocsid> from popen, I do not
<RickHull> from popen's perspective, things are pretty simple
pragmatism has joined #ruby
<Scub_> RickHull: is there an inline way to drop into pry similar to 'require "debug"'
<RickHull> your program is either outputting stuff on STDERR, STDOUT, or it is done executing and has yielded a process status
<RickHull> Scub_: pry is used several ways. 1. as a REPL (like irb)
<RickHull> 2. Pry.binding
Akagi201 has joined #ruby
<RickHull> for exploring object space, it's a good one in REPL mode
<pontiki> (binding.pry)
<RickHull> pontiki: thanks!
<RickHull> for debugging a particular app, binding.pry (or w/e) is maybe more useful
<pontiki> (you might guess i use it a *lot*)
RegulationD has quit [Ping timeout: 255 seconds]
HotCoder has quit [Quit: Leaving]
oo_ has quit [Remote host closed the connection]
<RickHull> drocsid: so if you suspect popen is misbehaving, you should be able to make a sample program that prompts the misbehavior
<RickHull> e.g. obviously write to STDERR and show that popen isn't recognizing it
<RickHull> drocsid: myself, i'm pretty sure popen is being transparent, and you're invoking something wrong, or the logstash thing is misbehaving
<pontiki> that seems highly unliikely
<RickHull> drocsid: i tried my best to tease that out, but yeah, i'm backing out of this one
<RickHull> good luck, and let us know if you can trace any misbehavior back to popen
<drocsid> RickHull: Looks like I'm not patient enough. It launches quick from the terminal, but it takes a few minutes to launch using popen
simplyianm has quit [Remote host closed the connection]
<RickHull> drocsid: interesting
<drocsid> RickHull: my bad
<RickHull> heh, no worries
<RickHull> there actually may be some issue you can fix
<RickHull> try the close_write again
<RickHull> just for troubleshooting / data gathering / behavior observation
<RickHull> if you don't close_write on the input, it may be blocked waiting for input
<RickHull> which is why the big stall
<drocsid> ok, my whole intention is to try to send this process standard in, so I will try that also
<RickHull> IO is hard, let's go shopping (no joke)
Torrieri has joined #ruby
yeticry has quit [Ping timeout: 255 seconds]
<RickHull> if you want to try something instead of close_write, you could do e.g. sin.write("hi mom")
<RickHull> that might actually trigger the process to yield output
<RickHull> or maybe "hi mom\n"
yeticry has joined #ruby
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has joined #ruby
<flughafen> hey guys
<flughafen> shevy: certainty
swgillespie has joined #ruby
wildroman2 has quit [Remote host closed the connection]
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
kies has quit [Ping timeout: 252 seconds]
j_mcnall_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mike___1234 has joined #ruby
mike___1234 has quit [Remote host closed the connection]
ta has joined #ruby
patrickanth0ny has joined #ruby
joaomdmoura has joined #ruby
bootstrappm has quit [Remote host closed the connection]
riotjones has joined #ruby
Torrieri has quit [Quit: Be back later ...]
tagrudev has joined #ruby
ta has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
minmax has joined #ruby
veinofstars has quit [Quit: veinofstars]
mike___1234 has joined #ruby
spider-mario has quit [Ping timeout: 272 seconds]
datanoise has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
aganov has joined #ruby
x44x45x41x4E has quit [Ping timeout: 276 seconds]
pontiki has quit [Quit: Textual IRC Client: www.textualapp.com]
Soda has joined #ruby
krisquigley has joined #ruby
LMity has quit [Ping timeout: 265 seconds]
krisquigley has quit [Ping timeout: 245 seconds]
darkf_ has joined #ruby
bronson has joined #ruby
oo_ has joined #ruby
darkf has quit [Ping timeout: 240 seconds]
darkf_ is now known as darkf
aapole has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
spider-mario has joined #ruby
ndrei has joined #ruby
chouhoulis has joined #ruby
moted has quit [Ping timeout: 252 seconds]
bluOxigen has joined #ruby
yardenbar has joined #ruby
niemc2 has quit [Ping timeout: 265 seconds]
acke has joined #ruby
failshell has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
advorak has quit [Quit: Leaving]
ebbflowgo has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
sarlalian has quit [Quit: WeeChat 0.4.2]
pyon is now known as lptm
sarlalian has joined #ruby
MatthewsFace has joined #ruby
Miphix has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
duncannz has joined #ruby
ebbflowgo has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
nobitanobi has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
MatthewsFace has quit [Ping timeout: 264 seconds]
hahuang65 has quit [Ping timeout: 264 seconds]
<RickHull> drocsid: any new findings?
Xeago has quit [Ping timeout: 256 seconds]
hyperjuice has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
michael_mbp has quit [Excess Flood]
hyperjuice has joined #ruby
hyperjuice has quit [Client Quit]
keen_______ has joined #ruby
ScriptGeek has joined #ruby
vdamewood has joined #ruby
drocsid has quit [Quit: zzZZzz]
keen______ has quit [Ping timeout: 276 seconds]
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
n008f4g_ has joined #ruby
mrmargolis has joined #ruby
michael_mbp has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
revath has quit [Quit: Leaving.]
apoplexy has quit [Ping timeout: 245 seconds]
revath has joined #ruby
francois_ has joined #ruby
mrmargolis has quit [Ping timeout: 252 seconds]
krowv has joined #ruby
francois_ has quit [Ping timeout: 264 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railsraider has joined #ruby
emilkarl has joined #ruby
skade has joined #ruby
datanoise has quit [Ping timeout: 240 seconds]
<krowv> Hi channel. I'm trying to learn some ruby gtk programming on Ubuntu. If I apt-get install the ruby-gtk3 package I would expect things to work but they don't. If I do sudo gem install gtk3 things work though. Wondering what the point of the ruby-gtk3 package is though?
<krowv> I'm using Ubuntu 15.04
Renich has quit [Quit: leaving]
pabloh has quit [Remote host closed the connection]
_ht has joined #ruby
revath has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
ohaibbq has joined #ruby
wildroman2 has joined #ruby
towski_ has quit [Remote host closed the connection]
<krowv> ls
bigkevmcd has joined #ruby
armyriad has joined #ruby
aapole has quit [Ping timeout: 272 seconds]
revath has joined #ruby
baweaver has quit [Remote host closed the connection]
workmad3 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
GnuYawk has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
<vdamewood> krowv: Describing something at not working seldom provides information needed to help. It would probably work better if you described what you tried to do, what you expected, and what happened instead.
Xeago has joined #ruby
codecop has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
<krowv> vdamewood, ok. I'll try to rephrase
<RickHull> krowv: sudo vs not has nothing to do with the (remote) package itself
<RickHull> sudo only affects your local machine and its permissions
<krowv> vdamewood, I installed a stock version of Ubuntu and grabbed a simply ruby gtk script from here. http://zetcode.com/gui/rubygtk/introduction/
<krowv> I then did sudo apt-get install ruby-gtk3
<RickHull> ok, heads up, apt-get is using debians packages and packaging system
tkuchiki has quit [Ping timeout: 265 seconds]
<krowv> When I try to run the simple example I get an error.
<RickHull> which is fine, more or less, except you'll need to go to #debian for support
<vdamewood> krowv: So, what's the error?
<RickHull> the best way to get support here is to install gems via `gem` and not `dpkg` or `apt-get`
ScriptGeek has quit [Quit: Leaving.]
<RickHull> sudo or otherwise
<vdamewood> Oh... I think I see what's going on.
<krowv> If I do gem install gtk3 everything works
<krowv> or more specifically sudo gem install gtk3
<RickHull> kronw, it depends on your specific setup
<RickHull> but it sounds like you are set up for system gems
<RickHull> in which case, yes, use `sudo gem install`
Rollabunna has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
<ruboto> krowv, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1357cf0f6e19236e70bf
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<RickHull> it's possible to make ruby and rubygems work without sudo, but it's trickier
semajs has joined #ruby
<krowv> RickHull, that works fine. Just curious about why the ubuntu package doesn't work. I can go ask Ubuntu people about it.
<RickHull> krowv: you'll have to show the parts of simple.rb that do the requiring
<vdamewood> That's a question for Ubuntu people. Ruby people don't have anything to do with it.
<RickHull> yes, you'll get little sympathy or support here for quirks with the ubuntu pkg
avahey has quit [Quit: Connection closed for inactivity]
<krowv> that is the simple.rb code
<krowv> RickHull, fair enough.
<RickHull> yeah, you gotta show the code, and then the invocation that produces the error
<RickHull> one or the other on its own isn't enough to troubleshoot
<RickHull> if you want support from here, use your distro's `ruby` and `gem` at most, and do e.g. `gem update --system` and install gems via gem
<RickHull> or if you want support from your distro, install all gems via distro pkg mgr
<RickHull> good luck with distro pkg mgr keeping up with `all gems`
hazelux has quit []
casadei has quit [Remote host closed the connection]
<vdamewood> Most distros seem to have the 80/20 sebset of gems (or python modules, or CPAN modules, or whatever). The 20% that 80% of people use.
_seanc_ has quit [Quit: _seanc_]
<vdamewood> sebset --> subset
<RickHull> vdamewood: which is fine if that's ~all~ you need
<RickHull> problems happen when 90% of what you want is available at distro
casadei has joined #ruby
<RickHull> then what do you do for the last 10%
<vdamewood> Personally, I build ruby from source and install it to /usr/local, then gem install everything.
<shevy> the problem is that some distributions modify things
<shevy> like debian + ruby + rubygems
<RickHull> right, so i would hesitate to advocate for going the distro route
<shevy> if they would support 100% then people could be sent to #debian or #ubuntu rather than ask here for problems deriving out of those modifications
<RickHull> as vdamewood seemed to
<vdamewood> Oh, I'm not advocating either way.
fabrice31 has joined #ruby
<RickHull> cool, well i agree with your 80/20 statement
<krowv> Nod. Was just wondering if there was an easy way to stick with just the Ubuntu package. But I'll try and track down the Ubuntu people that put the package together and ask them
<RickHull> for newbies it can be tough to decide which route to take
<shevy> yeah
<shevy> they get present n different options to pick from
Xeago has quit [Read error: Connection reset by peer]
<shevy> I like that vdamewood compiles from source, I click the like button!
<krowv> I'm familiar with the ubuntu packaging process so thats my comfort zone. Going "outside" the distro typically scares me.
RegulationD has joined #ruby
<RickHull> yep, here are 5 critical options. they will affect everything you do from here. please choose 1 wisely
<RickHull> noob: WTFOMGBBQ
Xeago has joined #ruby
<krowv> for example, I don't know the "rules" for when gems update, if they would work across different versions of the distributions, etc.
<shevy> if ubuntu can answer all of that then this is great :)
roolo has joined #ruby
sandstrom has joined #ruby
<RickHull> krowv: ruby people will say to use rubygems
<RickHull> debian people will say use dpkg
casadei has quit [Remote host closed the connection]
<RickHull> ubuntu people will say use
<RickHull> snappy?
Asher has quit [Remote host closed the connection]
<RickHull> dpkg?
<shevy> btw krowv on https://gist.github.com/anonymous/c53cabbb2e789bb8e157 I think you can omit Gtk.init
<shevy> at least on gtk2 that was possible
pyo_ has joined #ruby
rdark has joined #ruby
Asher has joined #ruby
<shevy> ubuntu follows debian too, so dpkg + apt + aptitude; dpkg is written at least in large parts in perl
<certainty> flughafen: moin
<flughafen> sup certainty
<certainty> flughafen: not much. We're investigating saltstack. thanks for the hint
<flughafen> saltstack is good!
<krowv> ok, thanks for the help everyone...
<shevy> flughafen ready for take off?
<flughafen> shevy: no!
<certainty> flughafen: yeah that's what we figure too. For orchestration we're definitely going to use it. I'd like to use it for CM as well
<flughafen> bad shevy
bruno- has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
<krowv> RickHull, snappy is the new packaging format that Ubuntu seems to be working on. Different format, different tools to manage
<RickHull> krowv: yes thanks
RickHull has left #ruby [#ruby]
strixd has joined #ruby
surs has joined #ruby
<shevy> snappy the crocodile?
<flughafen> schnappi!
lkba_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
bruno- has quit [Ping timeout: 264 seconds]
niemc2 has joined #ruby
<krowv> found a #debian-ruby channel on irc.debian.org. Gonna see if anyone is awake there
<shevy> wow
<shevy> oh
andikr has joined #ruby
<shevy> irc.debian.org
lkba has quit [Ping timeout: 240 seconds]
<shevy> thought freenode, damn
hahuang65 has joined #ruby
pragmatism has quit [Quit: Textual IRC Client: www.textualapp.com]
<vdamewood> I always wonder why foss projects host their own servers.
sigurding has joined #ruby
<krowv> irc.debian.org is oftc
charliesome has quit [Quit: zzz]
bkxd has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 264 seconds]
Xeago has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
<shevy> vdamewood they love to control everything; see why they modify gem and ruby, by taking away mkmf by default
revath has quit [Quit: Leaving.]
vondruch has joined #ruby
revath has joined #ruby
vdamewood has quit [Ping timeout: 255 seconds]
anisha has joined #ruby
aapole has joined #ruby
bogdanteleaga has quit [Ping timeout: 250 seconds]
antgel has joined #ruby
<shevy> hmm guys
<shevy> I have a yaml file, for libx11; the current name of the file is libx11.yml
francois_ has joined #ruby
<shevy> now, for some strange reason, many years ago, I started to keep archives like that locally, in a schemata such as:
railsraider_ has joined #ruby
<shevy> /Some/Path/LIBX11/libX11-1.6.3.tar.bz2
dumdedum has joined #ruby
<shevy> but nobody likes upcased directory names right?
terlar has joined #ruby
<shevy> so two alternatives to that: lowercased directory names; or same-cased directory name. Which one to pursue?
intinig has joined #ruby
lavros has joined #ruby
railsraider has quit [Ping timeout: 252 seconds]
railsraider_ is now known as railsraider
alex88 has joined #ruby
sandstrom has joined #ruby
Xeago has joined #ruby
dhjondoh has joined #ruby
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #ruby
Forgetful_Lion has joined #ruby
ndrei has joined #ruby
vdamewood has joined #ruby
revath has quit [Read error: Connection reset by peer]
revath has joined #ruby
gluten_hell_ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
mattarse has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
datanoise has quit [Ping timeout: 256 seconds]
sinkensabe has joined #ruby
Xeago has quit [Remote host closed the connection]
bigkevmcd has quit [Read error: Connection reset by peer]
mattarse has joined #ruby
bigkevmcd has joined #ruby
jph98_ has joined #ruby
djbkd has quit []
GPrime has joined #ruby
jph98 has quit [Ping timeout: 264 seconds]
<flughafen> how was your weekend shevy
<shevy> I was rewriting a big project
<shevy> that was not a lot of fun
<shevy> still have some side effects because of it img.rb:58:in `img': undefined method `name_of_img_dir?' for Bla:Module (NoMethodError)
bronson has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 244 seconds]
krisquigley has joined #ruby
<flughafen> that's cool
<shevy> I hear you still got problems in Berlin too
<flughafen> yeah
<flughafen> i did go to the airport
<shevy> lol
<flughafen> my brother came in from out of town
<shevy> I just hope it will be the best flughafen in all of europe one day
<shevy> huh, via plane?
<flughafen> yeah
livathinos has joined #ruby
<krowv> for posterity I did figure out how to run my Simple GTK app with packages. apt-get install ruby-gtk3 ruby-atk ruby-gdk-pixbuf2 ruby-pango ruby-gdk3 will do the trick
msgodf has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<shevy> \o/
<vdamewood> Why the heck didn't they make those dependencies?
<krowv> vdamewood, thats exactly the question I'm asking myself at the moment
AlexRussia has quit [Quit: WeeChat 1.2-dev]
<vdamewood> There's also brain-damaged stuff like this in distro repos.
aapole has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ruby
<krowv> unfortunately everyone in #debian-ruby on OFTC seems to be asleep at the moment
ruby-lang628 has joined #ruby
<vdamewood> Hmm... must be America-centric or something.
grzywacz has joined #ruby
krisquigley has quit [Ping timeout: 245 seconds]
shinnya has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
ta has joined #ruby
<shevy> :D
chussenot has quit [Quit: chussenot]
oo_ has quit [Remote host closed the connection]
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
doertedev has joined #ruby
allomov has joined #ruby
arturmartins has quit [Quit: Leaving...]
Hounddog has joined #ruby
<shevy> for the source rubygnome packages, these things are bundled together: http://sourceforge.net/projects/ruby-gnome2/files/ruby-gnome2/ruby-gnome2-2.2.5/ruby-gnome2-all-2.2.5.tar.gz
ruby-lang628 has quit [Ping timeout: 246 seconds]
<shevy> but you probably don't need that now that you got the packages
<flughafen> shevy: we switched from selenium to phantomjs and our testsuite is 50% faster
codecop has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 276 seconds]
<shevy> yeah
<shevy> you reduced the amount of tests
<shevy> !!!
<flughafen> ha.
<flughafen> yah
auzty has joined #ruby
<flughafen> we don't need this installation, we don't need users, we don't need packages.
<apeiros> we don't need no education
chussenot has joined #ruby
<apeiros> and you're just another brick in the wall!
ohaibbq has quit [Quit: Leaving...]
ndrei has joined #ruby
Scroff has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<shevy> I feel rick rolled
fabrice31 has joined #ruby
solars has joined #ruby
conta has joined #ruby
<flughafen> yes, removing features/education.feature really saved us a lot of money.
djellemah has joined #ruby
<apeiros> shevy: but you've been pink floyded!
<flughafen> aawww snap
failshell has joined #ruby
fsvehla has joined #ruby
hotpancakes has joined #ruby
oo_ has joined #ruby
<hotpancakes> Hi everyone. I'm looking for the best way to truly understand a gem's code and structure. Some have recommended pry. How is pry better than just reading the source on github?
Spami has quit [Quit: This computer has gone to sleep]
bkxd has joined #ruby
failshell has quit [Ping timeout: 252 seconds]
<shevy> hotpancakes reading the source is nice; modifying the source is even better though
<hotpancakes> shevy: care to elaborate?
semajs has quit [Quit: semajs]
CloCkWeRX has joined #ruby
<flughafen> shevy: ask hotpancakes if any planes are taking off
emilkarl has left #ruby [#ruby]
intinig has quit [Remote host closed the connection]
tesuji has joined #ruby
<shevy> lol
<shevy> hotpancakes you need to activate your brain
intinig has joined #ruby
<shevy> into getting it to understand what the hell the guy was smoking who wrote that code
CloCkWeRX1 has joined #ruby
<shevy> that's how I was able to make the first modification to ruby-cgi in stdlib. it was a nightmare
CustosLimen has quit [Ping timeout: 244 seconds]
tomphp has joined #ruby
<shevy> def unescapeHTML()
* apeiros has got some doubts about the usefulness of shevy's advice…
<shevy> def CGI::parse
<shevy> oh that reminds me
<shevy> if foo then
bruno- has joined #ruby
<shevy> apeiros' style
<shevy> :D
blueOxigen has joined #ruby
<shevy> actually, let me try to remember the atrocities I discovered in ruby-cgi ...
JimBurns83 has quit [Ping timeout: 252 seconds]
<shevy> if words.find {|x| /=/n.match(x) }
<shevy> that took my brain a while to find out what that was
<shevy> oh yeah
<shevy> string = string.join("") if string.kind_of?(Array)
<shevy> I decided I hate .kind_of?
swerter has joined #ruby
<shevy> and why is there a () anyway
Musashi007 has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
CloCkWeRX has quit [Ping timeout: 272 seconds]
yoongkang has quit [Remote host closed the connection]
<shevy> wait, I got something even better
yoongkang has joined #ruby
weszlem has joined #ruby
<shevy> and
ringarin has joined #ruby
<flughafen> what would apeiros do?
<shevy> my favourite part
CloCkWeRX1 has quit [Ping timeout: 245 seconds]
<shevy> oh apeiros is an if-thenner
konieczkow has quit [Ping timeout: 256 seconds]
<shevy> he loves to randomly insert "then" all over the place
<shevy> if cat got milk then mouse is happy
axl_ has joined #ruby
riotjones has quit [Quit: Leaving...]
<hotpancakes> wait, wat
<apeiros> shevy: please don't speak for me. thanks.
<shevy> this is the best part:
livathinos has quit [Ping timeout: 250 seconds]
<shevy> wait sorry
CustosLimen has joined #ruby
<shevy> that was a modification, let me find the original
bruno- has quit [Ping timeout: 245 seconds]
<shevy> I guess matz really wanted to make ruby terse
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
mrmargolis has joined #ruby
iwishiwerearobot has joined #ruby
<hotpancakes> shevy: umm, now i feel inadequate as a programmer. understanding is hard :/
<shevy> nonono
<shevy> hotpancakes in ruby there are lots of different styles
<shevy> hotpancakes I don't think I have ever used: end.something
<shevy> I like code to be extremely simple and linear, where my brain does not have to think
<shevy> hotpancakes but remember, you asked "best way to truly understand a gem's code and structure" and that can be very difficult depending on who wrote something
<certainty> shevy: xD
<shevy> ideally you would pick something written by a genius who writes simple but efficient code
<shevy> ask havenwood
k3asd` has joined #ruby
<hotpancakes> who's havenwood?
arturmartins has joined #ruby
intinig has quit [Remote host closed the connection]
<shevy> a genius
<shevy> he also studied lots of code written by other people
intinig has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
troulouliou_dev has joined #ruby
<hotpancakes> ha, noted
RTG` has quit [Ping timeout: 272 seconds]
<hotpancakes> My issue is that reading most lines of code is a cakewalk, but I'm not sure how, let's say a gem, functions as a whole.
<hotpancakes> I guess I need to get more comfortable with blackboxing.
RTG` has joined #ruby
chthon has joined #ruby
intinig has quit [Ping timeout: 256 seconds]
spider-mario has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
noname2 has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby
revath has quit [Ping timeout: 255 seconds]
stan has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
noname2 has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
qwebirc2445 has joined #ruby
workmad3 has joined #ruby
ahmetkapikiran has joined #ruby
konsolebox has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 265 seconds]
micmus has joined #ruby
<qwebirc2445> any way of running WATIR without a gui
Soda has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 240 seconds]
weszlem has quit [Ping timeout: 256 seconds]
bayed has joined #ruby
houhoulis has quit [Remote host closed the connection]
maxshelley has joined #ruby
jenrzzz has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
futilegames has joined #ruby
yoongkang has quit [Remote host closed the connection]
livathinos has joined #ruby
JimBurns83 has joined #ruby
Missphoenix has joined #ruby
dANO has joined #ruby
tedstriker has joined #ruby
bronson has joined #ruby
chthon has quit [Quit: Ex-Chat]
platzhirsch has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<certainty> shevy: you can speak for me if you like
<flughafen> qwebirc2445: http://watirwebdriver.com/headless/
lkba has joined #ruby
workmad3 has joined #ruby
Miphix has quit [Ping timeout: 276 seconds]
Mia has quit [Ping timeout: 240 seconds]
kwd has joined #ruby
Mia has joined #ruby
Missphoenix has quit [Ping timeout: 252 seconds]
A124 has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
lkba_ has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 272 seconds]
platzhirsch has quit [Ping timeout: 256 seconds]
noname2 has joined #ruby
Rollabunna has joined #ruby
A124 has joined #ruby
RegulationD has joined #ruby
hardlin3r has joined #ruby
Xeago has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
Rollabunna has quit [Ping timeout: 244 seconds]
haxrbyte_ has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
futilegames has quit [Quit: futilegames]
ndrei has joined #ruby
haxrbyte has quit [Ping timeout: 244 seconds]
aapole has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
chinmay_dd has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
marr has joined #ruby
qwebirc2445 has quit [Ping timeout: 246 seconds]
allomov has quit [Remote host closed the connection]
gluten_hell_ has joined #ruby
[gmi] has joined #ruby
terlar has quit [Ping timeout: 256 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
gluten_hell_ has quit [Ping timeout: 272 seconds]
lavros has quit [Ping timeout: 272 seconds]
mister_solo has joined #ruby
lavros has joined #ruby
platzhirsch has joined #ruby
haxrbyte has joined #ruby
haxrbyt__ has joined #ruby
ahmetkapikiran has joined #ruby
senayar has joined #ruby
yoongkang has joined #ruby
tcarter1719 has joined #ruby
tcarter1719 has left #ruby [#ruby]
haxrbyte_ has quit [Ping timeout: 265 seconds]
fabrice31_ has joined #ruby
quimrstorres has joined #ruby
tcarter1719 has joined #ruby
chinmay_dd has joined #ruby
CloCkWeRX has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
CustosLimen has quit [Ping timeout: 265 seconds]
quimrstorres has quit [Remote host closed the connection]
Usaur has quit [Quit: Leaving]
fabrice31 has quit [Ping timeout: 256 seconds]
timonv has quit [Ping timeout: 276 seconds]
dhjondoh has quit [Quit: dhjondoh]
aapole has quit [Ping timeout: 245 seconds]
terlar has joined #ruby
A205B064 has quit [Ping timeout: 276 seconds]
terlar has quit [Client Quit]
terlar has joined #ruby
chinmay_dd has quit [Ping timeout: 264 seconds]
iamninja has quit [Ping timeout: 272 seconds]
Palmer11 has joined #ruby
chinmay_dd has joined #ruby
hololeap has quit [Quit: Leaving]
Scrofff has joined #ruby
fujimura has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
Scroff has quit [Ping timeout: 240 seconds]
tcarter1719 has quit [Remote host closed the connection]
tcarter1719 has joined #ruby
futilegames has joined #ruby
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
quimrstorres has joined #ruby
blue_deref has quit [Quit: bbn]
drew00 has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 246 seconds]
Cust0sLim3n has joined #ruby
ndrei has joined #ruby
tcarter1719 is now known as tcarter
stardiviner has joined #ruby
krisquigley has joined #ruby
multi_io has quit [Ping timeout: 252 seconds]
tcarter is now known as tcarter1719
futilegames has quit [Quit: futilegames]
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
weszlem has joined #ruby
multi_io has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
datanoise has joined #ruby
hakunin has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
babykosh has joined #ruby
weszlem has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
<babykosh> ruby gods
<babykosh> I have a rake task that is trying to set the value of a primary key on a model….
oo_ has quit [Remote host closed the connection]
<babykosh> but I’m having trouble….how do I get this to work….what goes in place of “DEFAULT”?
axsuul has quit [Ping timeout: 264 seconds]
<babykosh> model_label = Model.new
<babykosh> model_label.primid = DEFAULT
datanoise has quit [Ping timeout: 272 seconds]
<babykosh> model_label.save
<maloik> please paste the entire code in a gist so we can have a good look
oo_ has joined #ruby
<maloik> try not to paste code in here :)
Zai00 has joined #ruby
allomov has joined #ruby
DEA7TH has joined #ruby
jhooker has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
lavros has quit [Ping timeout: 252 seconds]
mandarinkin has joined #ruby
bluOxigen has joined #ruby
lavros has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
vdamewood has quit [Read error: Connection reset by peer]
failshell has joined #ruby
vdamewood has joined #ruby
senayar has quit [Remote host closed the connection]
jhooker has quit [Ping timeout: 245 seconds]
allomov has quit [Ping timeout: 245 seconds]
blueOxigen has quit [Ping timeout: 272 seconds]
startupality has joined #ruby
noname2 has quit [Ping timeout: 256 seconds]
sigurding has quit [Quit: sigurding]
<babykosh> ok…ruby gods I hope this makes sense….pastbin….http://pastebin.com/01kVUUtG
<ruboto> babykosh, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/398814f1b3053578d8a8
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<yorickpeterse> morning
failshell has quit [Ping timeout: 264 seconds]
allomov has joined #ruby
krz has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
<apeiros> jhass gets my rubyhero nomination for this single ruboto plugin. seriously :D
dhjondoh has joined #ruby
wjlroe has joined #ruby
Oxelist has joined #ruby
wildroman2 has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
micmus has quit [Quit: Leaving]
<jhass> heh
wildroman2 has joined #ruby
<jhass> ?rails babykosh
<ruboto> babykosh, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
leafybasil has quit [Remote host closed the connection]
allomov has quit [Read error: Connection reset by peer]
allomov has joined #ruby
terlar has quit [Ping timeout: 265 seconds]
<flughafen> sup jhass
<jhass> not much
wildroman2 has quit [Ping timeout: 245 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
hotpancakes has joined #ruby
tcarter1719 has quit [Quit: tcarter1719]
bruno- has joined #ruby
codecop has quit [Client Quit]
quimrstorres has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
Zai00 has joined #ruby
zipace has joined #ruby
lavros has quit [Ping timeout: 252 seconds]
Zai00 has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
lavros has joined #ruby
Zai00 has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
autrilla has joined #ruby
lkba_ has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
pinecone has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
ndrei has joined #ruby
pinecone has quit [Quit: pinecone]
Akagi201 has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
Oxelist has quit [Ping timeout: 265 seconds]
pinecone has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
stamina has joined #ruby
sarkyniin has joined #ruby
duncannz has quit [Remote host closed the connection]
yoongkang has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 246 seconds]
leafybasil has joined #ruby
Rollabunna has joined #ruby
michael_mbp has quit [Excess Flood]
hahuang65 has joined #ruby
denver has joined #ruby
majoh has quit [Remote host closed the connection]
bosma is now known as FakOlly
<ljarvis> moin
michael_mbp has joined #ruby
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
drew00 has quit [Quit: drew00]
yfeldblum has joined #ruby
<adaedra> salut ljarvis
<Darkwater> moan
pinecone has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 252 seconds]
FakOlly is now known as TEAMJON
lavros has quit [Ping timeout: 255 seconds]
sigurding has joined #ruby
lavros has joined #ruby
segy has joined #ruby
drew00 has joined #ruby
Rickmasta has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drew00 has quit [Client Quit]
Oxelist has joined #ruby
senayar has quit [Remote host closed the connection]
pepperbreath has joined #ruby
AlexRussia has quit [Ping timeout: 256 seconds]
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
quimrstorres has joined #ruby
oo_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
Musashi007 has quit [Quit: Musashi007]
senayar has joined #ruby
Musashi007 has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
oo_ has joined #ruby
grzywacz has quit [Ping timeout: 265 seconds]
ex0ns has quit [Quit: leaving]
ex0ns has joined #ruby
revath has joined #ruby
mdw has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
senayar has quit [Remote host closed the connection]
Scrofff has quit []
RegulationD has joined #ruby
Scroff has joined #ruby
dionysus69 has joined #ruby
tvw has joined #ruby
fujimura has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
kwd has quit [Quit: kwd]
sdothum has joined #ruby
sigurding has quit [Read error: Connection reset by peer]
quimrstorres has quit [Ping timeout: 252 seconds]
sdothum has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
bruno- has joined #ruby
lavros has quit [Ping timeout: 256 seconds]
ByronJohnson has quit [Ping timeout: 265 seconds]
drzel has quit [Ping timeout: 265 seconds]
__main__ has quit [Ping timeout: 265 seconds]
krz has quit [Ping timeout: 265 seconds]
lavros has joined #ruby
drzel has joined #ruby
krz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
TEAMJON is now known as TEAMVARYSTYRION
ByronJohnson has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
x44x45x41x4E has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
__main__ has joined #ruby
bruno- has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
cubny has joined #ruby
chinmay_dd has joined #ruby
ndrei has joined #ruby
intinig has joined #ruby
mengu__ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
bruno- has joined #ruby
revath has quit [Quit: Leaving.]
mattarse has quit [Ping timeout: 276 seconds]
bigkevmcd has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
granthatcher has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
revath has joined #ruby
rodfersou has joined #ruby
bruno- has joined #ruby
GPrime has joined #ruby
iamninja has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
revath has quit [Quit: Leaving.]
revath has joined #ruby
grzywacz has joined #ruby
cubny has quit [Quit: leaving]
Pupeno has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
aspiers has joined #ruby
bruno- has joined #ruby
brahman has joined #ruby
lavros has quit [Ping timeout: 256 seconds]
hotpancakes has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Remote host closed the connection]
lavros has joined #ruby
mattarse has joined #ruby
emilkarl has joined #ruby
fabrice31 has joined #ruby
joonty has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<brahman> HI, am trying to use the tmtm ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
oo_ has quit [Remote host closed the connection]
revath has quit [Quit: Leaving.]
<brahman> coming from a Perl background prepared statements tend to be the recommended way to interact with dbs.
francois_ has quit [Remote host closed the connection]
revath has joined #ruby
lessless has joined #ruby
ylla has quit [Ping timeout: 272 seconds]
terlar has joined #ruby
chussenot has quit [Quit: chussenot]
<jhass> talking about the tmtm-ruby-mysql gem?
oo_ has joined #ruby
allcentury has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<jhass> the most popular mysql client gem is mysql2
justintv90 has quit [Remote host closed the connection]
<brahman> jhass: Hi yes, but AFAIK mysql2 doesn't have prepared statements. Is that not an issue?
yoongkang has joined #ruby
gluten_hell_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
jph98_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
bruno- has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<brahman> jhass: I suppose I can use a for loop with the num_rows and process the results like that. but it doesn't seem clean
<jhass> looks like they'll be added in 0.4
<jhass> anyway
krisquigley has joined #ruby
<jhass> according to docs prepare returns Statement, Statement#execute returns Result, Result includes all of Enumerable
<jhass> and also hash #each_hash
<brahman> jhass: the docs for tmtm ruby gem?
<jhass> yes
skade has quit [Read error: Connection reset by peer]
skyrocker has joined #ruby
skyrocker has left #ruby [#ruby]
skade has joined #ruby
<brahman> yeah, not so clear. the each_hash method is only available with the non prepared statements.
<brahman> ie the db.query('SQL')
<jhass> is that so? what error do you get?
krisquigley has quit [Ping timeout: 265 seconds]
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
<jhass> I don't see anything in the code that would indicate that
senayar has joined #ruby
<brahman> jhass: undefined method `each_hash' for #<Mysql::Stmt:0x007f899a926d70> (NoMethodError)
<jhass> uh, you have to execute a prepared statement
<jhass> see my second link
<workmad3> brahman: that looks like you're trying to iterate over the prepared statement, not the result of executi... as jhass said
senayar has quit [Remote host closed the connection]
<brahman> yes, my statement is being executed AFAIK
JDiPierro has joined #ruby
<jhass> no
<brahman> will double check
<brahman> brb
<jhass> or you don't call it on the result of the execute call
serivich has joined #ruby
<workmad3> brahman: the results are returned from `execute`, calling `execute` doesn't morph the statement into a result set
lavros has quit [Quit: leaving]
diegoviola has joined #ruby
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
weszlem has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
Xeago has quit [Remote host closed the connection]
strixd has quit [Quit: 500]
auzty has quit [Quit: Leaving]
senayar has joined #ruby
senayar has joined #ruby
hahuang65 has joined #ruby
failshell has joined #ruby
Xeago has joined #ruby
<brahman> workmad3: jhass: still not getting the each_hash when calling the execute method on my statement. itnerestingly I am not getting a resultset from the execute
k3asd` has quit [Ping timeout: 276 seconds]
mengu__ has quit [Remote host closed the connection]
<jhass> what do you get instead?
<jhass> nil?
aapole has joined #ruby
quazimodo has quit [Ping timeout: 265 seconds]
<brahman> a Mysql::Stmt:0x007fa1fb746540 object
JDiPierro has quit [Remote host closed the connection]
<brahman> but if I call fetch on the statement object I get a result.
<jhass> I don't think you look at the return value of execute
j4cknewt has joined #ruby
<jhass> mmh
<jhass> return StatementResult.new(@mysql, @fields)
weszlem has quit [Ping timeout: 245 seconds]
<jhass> return nil
dionysus69 has quit [Quit: dionysus69]
<brahman> I can keep fetching on the statement as per the docs and I keep getting the next row.
<jhass> all other branches raise
barkerd427 is now known as zz_barkerd427
strixd has joined #ruby
<jhass> so I still think you don't look at the return value of execute
quimrstorres has joined #ruby
<jhass> wait
failshell has quit [Ping timeout: 240 seconds]
<jhass> Mysql::Stmt ?!
<jhass> where does that come from?
hahuang65 has quit [Ping timeout: 255 seconds]
<jhass> that class doesn't exist in the gem
bruno- has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
<brahman> this is the gem am using
<al2o3-cr> jhass, quick question, are post requests to github api json || xml ?
veinofstars has joined #ruby
<jhass> brahman: sigh
<jhass> brahman: 13:06 <jhass> talking about the tmtm-ruby-mysql gem?
j4cknewt has quit [Ping timeout: 256 seconds]
<jhass> al2o3-cr: all json afaik
lxsameer_ has joined #ruby
<al2o3-cr> jhass: ok thank you
<jhass> brahman: why did you even mention tmtm?!
bronson has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
Zai00 has joined #ruby
x44x45x41x4E has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ruby
* bnagy *popcorn eating intensifies*
CloCkWeRX1 has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
keslerm has quit [Quit: ZNC - http://znc.in]
Blaguvest has joined #ruby
<jhass> I think I'll just ignore them
lxsameer has joined #ruby
<jhass> I mean I linked the docs of the other gem, mentioned methods and classes that don't exist in the mysql gem...
sameerynho has quit [Ping timeout: 252 seconds]
<jhass> copied ruby into the channel while the mysql gem is written in C
<jhass> I mean
<jhass> sigh
<brahman> jhass: Hi yes, but AFAIK mysql2 doesn't have prepared statements. Is that not an issue?
<jhass> wth
<brahman> I confirmed that I was using tmtm ruby module
<jhass> what the hell
dhjondoh has joined #ruby
<jhass> 13:11 <jhass> looks like they'll be added in 0.4
<brahman> the initial question mentions tmtm ruby module
<jhass> 13:06 <jhass> talking about the tmtm-ruby-mysql gem?
<jhass> are you unable to read or something?
<ljarvis> you're talking about 3 different libraries :|
roolo_ has joined #ruby
<brahman> [12:04] <brahman> HI, am trying to use the tmtm ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
<ljarvis> 07:34 < brahman> https://rubygems.org/gems/mysql
<ljarvis> 07:34 < brahman> this is the gem am using
bronson has quit [Ping timeout: 264 seconds]
<apeiros> we all can read the backlog brahman
lxsameer_ has quit [Ping timeout: 252 seconds]
<jhass> I have no fucking clue what tmtm is, hence I asked for clarification
<brahman> Seriously?
<jhass> and you said yes
<apeiros> and ljarvis and jhass
<apeiros> brahman: get your act together and clarify which gems you're using.
<jhass> yeah sorry
<jhass> I'll /ignore
dfockler has joined #ruby
cubny has joined #ruby
<apeiros> I concur with jhass that the current information you gave is conflicting.
Dwarf has quit [Ping timeout: 265 seconds]
Paradox has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
<brahman> seriously let's not get into a bitch fight. There was a misunderstanding. I did not add mysql to the tmtm module string in my original question.
roolo__ has joined #ruby
roolo has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ruby
cubny has quit [Client Quit]
<ljarvis> brahman: please just clarify by asking your question again with all information included
roolo_ has quit [Read error: Connection reset by peer]
Paradox has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
rindolf has joined #ruby
<rindolf> Hi all.
sdothum has joined #ruby
<apeiros> brahman: terms like "bitch fight" which just derogate half of earths population are not welcome. please mind your language.
mrmargolis has joined #ruby
<brahman> HI, am trying to use the tmtm-mysql ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
LMity has joined #ruby
Dwarf has joined #ruby
<ljarvis> brahman: is there a particular reason you're using this library over one of the more popular mysql solutions?
dfockler has quit [Ping timeout: 255 seconds]
minmax has quit [Quit: WeeChat 0.4.3]
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
j4cknewt has joined #ruby
<brahman> ljarvis: none. I just looked up the libraries with prepared statements. mysql has them mysql2 doesn't.
oo_ has quit [Remote host closed the connection]
<brahman> Am open to alternatives. I just need a nice interface with mysql.
<apeiros> brahman: your information is still conflicting. you did not resolve the unclarity.
<brahman> no need for an orm
<ljarvis> brahman: looks like Stmt.execute returns the original statement, and that includes a `fetch` method
<apeiros> brahman: tmtm-mysql != mysql
<ljarvis> you could also do `stmt.execute("...").each do |row|`
hightower4 has quit [Remote host closed the connection]
<workmad3> brahman: https://rubygems.org/gems/mysql <-- that is *not* the tmtm mysql gem
<workmad3> brahman: https://github.com/tmtm/ruby-mysql <-- that's the tmtm mysql gem, and it's on rubygems as *ruby-mysql*
mrmargolis has quit [Ping timeout: 256 seconds]
psyprus has quit [Ping timeout: 248 seconds]
<brahman> ljarvis: yeah and the fetch method returns the latest row, there are also ways to seek in the result set. Just not as easy as the each_hash or fetch_hash methods that the non-prepared statements provide.
jgpawletko has joined #ruby
<workmad3> oh, sorry.. it's on rubygems as tmtm-ruby-mysql
<brahman> apeiros: are you bringing anything positive to the discussion?
yqt has joined #ruby
<workmad3> heh, or both :)
psyprus has joined #ruby
<ljarvis> brahman: it has a fetch_hash method too
<jhass> yeah, 3.0 branch seems to be tmtm-ruby-mysql
<apeiros> brahman: seriously?
<brahman> yeah but it seems only for non prepared statements.
alem0lars__ has joined #ruby
<workmad3> ljarvis: he's using the mysql gem, not the tmtm mysql gem, going by his previous statements
yoongkang has quit [Remote host closed the connection]
<brahman> workmad3: this is the gem am using https://rubygems.org/gems/mysql
yoongkang has joined #ruby
<ljarvis> fml
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3> brahman: yeah, the mysql gem
sarkyniin has quit [Ping timeout: 250 seconds]
<workmad3> brahman: tmtm mysql is ruby-mysql or tmtm-ruby-mysql
<brahman> Tomita Mashahiro seems to be the author?
<brahman> fuck me sideways
<brahman> now am really confused
<brahman> you guys must be even more so
CloCkWeRX1 has quit [Ping timeout: 265 seconds]
aapole has quit [Ping timeout: 264 seconds]
francois_ has joined #ruby
ahmetkapikiran has joined #ruby
<workmad3> haha :) I'm grabbing lunch and leaving the confusion now ;)
<apeiros> brahman: maybe you do something positive for your own case and finally figure which gems you really use…
ldnunes has joined #ruby
<apeiros> instead of continuing to waste good people's time even after being told to do so…
<brahman> apeiros: Are you in need of some attention?
<apeiros> brahman: are you in need of help?
Scrofff has joined #ruby
scripore has joined #ruby
hotpancakes has joined #ruby
<brahman> yes, I am. I have come here asked for help. realised I have made a mistake with the help of workmad3, ljarvis, jhass. You on the other hand...
<apeiros> I on the other hand am close to kick you.
iwishiwerearobot has quit [Quit: Be back later ...]
Scroff has quit [Ping timeout: 240 seconds]
<brahman> apeiros: for what?
hoov has joined #ruby
<brahman> workmad3, looking at the homepage of the gem I linked to. it seems to be "wrap unmodified tmtm's mysql-ruby extension into a proper gem."
gagrio has quit [Ping timeout: 240 seconds]
jmignault has joined #ruby
<brahman> ljarvis: looking at the homepage of the gem am using it seems like it's unmaintained and also that Tomita Mashahiro is no longer maintaining the mysql-ruby gem.
babykosh has quit [Quit: babykosh]
<brahman> ljarvis: What gem do you use for mysql interactions?
hotpancakes has quit [Ping timeout: 255 seconds]
chinmay_dd has quit [Remote host closed the connection]
dstarh has joined #ruby
millerti has joined #ruby
<brahman> apeiros: what for?
ylla has joined #ruby
phutchins has joined #ruby
<apeiros> brahman: lesser assholery.
leafybas_ has joined #ruby
<brahman> apeiros: you are a funny fella that's for sure
<brahman> Definitely good to have a sense of humour with you around!
iwishiwerearobot has joined #ruby
<gregf_> brahman: just as in Perl you can use 'DBI' in ruby can use 'dbi' as well in ruby. but theres afaict theres nothing complicated in that mysql2 gem :/
CloCkWeRX has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
railsraider has quit [Quit: railsraider]
hedgecore has quit [Ping timeout: 250 seconds]
<apeiros> brahman: you're on thin ice already. I suggest you drop it and get your act together as suggested before. I have no patience for people who don't care for the time they waste on others.
ebbflowgo has joined #ruby
<brahman> apeiros: you are absolutely right about the comment I made.It was disrespectful. For that I apologies.
<apeiros> ok, that's a good start. lets hope it continues.
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 252 seconds]
ebbflowgo has left #ruby [#ruby]
<gregf_> brahman: in Perl you'd do: use DBI; my $conn = DBI->conn("dbi:Oracle:mydb", "", "", {}) or die $!; my $dbh = $conn->prepare("select foo from bar"); my $str $dbh->execute();while ( my $data =$sth->fetch() ){ #whatever } <== that should be just the same using ruby
leafybasil has quit [Ping timeout: 240 seconds]
wildroman2 has quit [Remote host closed the connection]
<brahman> gregf_: will give that a go.
<brahman> Thanks for this.
banister has joined #ruby
platzhirsch has quit [Ping timeout: 264 seconds]
k3asd` has joined #ruby
platzhirsch has joined #ruby
<djellemah> brahman: http://sequel.jeremyevans.net/ It's not only an ORM. Always my first stop for anything SQL related.
<brahman> gregf_: that's sorted it.
<brahman> Thanks for your help.
<brahman> djellemah: Will look into this.
chussenot has joined #ruby
<brahman> Not sure I need an orm for this particular task though
LMity has quit [Read error: Connection reset by peer]
zz_barkerd427 is now known as barkerd427
maxshelley has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<brahman> djellemah: looks really interesting http://sequel.jeremyevans.net/rdoc/files/doc/sql_rdoc.html
j4cknewt has joined #ruby
railsraider has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
platzhirsch has quit [Read error: Connection reset by peer]
<brahman> Is Sequel the more commonly used way to interface with mysql from ruby
qwebirc98257 has joined #ruby
ndrei has joined #ruby
AugustoCesar has joined #ruby
gagrio has joined #ruby
mdw has joined #ruby
platzhirsch has joined #ruby
chipotle has joined #ruby
coderhs has joined #ruby
chinmay_dd has joined #ruby
RegulationD has joined #ruby
ixti has joined #ruby
AugustoCesar has left #ruby [#ruby]
but3k4 has joined #ruby
<apeiros> sequel is a popular way to connect to databases. even if just used as DBI.
<apeiros> for some reason other DBI solutions in ruby haven't caught on :-/
Forgetful_Lion has quit [Remote host closed the connection]
<canton7> that's because Sequel rules them all :P
<yorickpeterse> Sequel > everything
<apeiros> sure. but even before sequel.
tcarter1719 has joined #ruby
platzhirsch1 has joined #ruby
hsps_ has joined #ruby
mengu__ has joined #ruby
schy has joined #ruby
hsps_ has quit [Client Quit]
chinmay_dd has quit [Ping timeout: 240 seconds]
coderhs has quit [Read error: Connection reset by peer]
cytoskeletor has joined #ruby
platzhirsch has quit [Ping timeout: 256 seconds]
<canton7> we had ActiveRecord, DataMapper, whatever that other one was
j4cknewt has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
Oxelist_ has joined #ruby
<apeiros> iirc AR was rather difficult to get out of rails back then. and DM wasn't even started.
<brahman> Sequel seems to do exactly what I need it to. especially when just used with SQL directly.
Oxelist has quit [Read error: Connection reset by peer]
<apeiros> and AR was also only really usable as ORM. quite unlike sequel.
qwebirc98257 has quit [Quit: Page closed]
fujimura has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<maloik> Does anyone know if it's possible to automatically run a bunch of (rspec) shared examples for each model that has a certain module included? meta-programming-wise
caseypatrickdris has joined #ruby
<apeiros> aynway. we have sequel now. maybe one day we also will have competition in DBI libs for ruby.
<yorickpeterse> Well, there's that ROM Thing
aryaching has joined #ruby
<yorickpeterse> not sure if it's actually usable nowadays
<apeiros> yorickpeterse: does that also have a separate DBI part?
<yorickpeterse> No idea, I only saw some blogs about their relational algebra stuff
<al2o3-cr> why isn't this post request to github not working :(
masone has joined #ruby
sarkyniin has joined #ruby
goodcodeguy has joined #ruby
Akagi201 has joined #ruby
j4cknewt has joined #ruby
allcentury has joined #ruby
mengu__ has quit []
<al2o3-cr> might be because it's monday
qwertme has joined #ruby
mdw has quit [Max SendQ exceeded]
wildroman2 has joined #ruby
Akagi201_ has joined #ruby
vdamewood has quit [Quit: Life beckons.]
tcarter1719 has quit [Quit: tcarter1719]
<jhass> al2o3-cr: just use the Net::HTTP#request_post helper
<yorickpeterse> better, just don't use Net::HTTP
j4cknewt has quit [Remote host closed the connection]
<yorickpeterse> al2o3-cr: seriously, save yourself time and use https://github.com/nahi/httpclient
bruno- has joined #ruby
<al2o3-cr> jhass: will try with that give me a mo
<yorickpeterse> response = HTTPClient.post('url here', :body => JSON.dump(.....))
<yorickpeterse> something like that IIRC
<jhass> al2o3-cr: initheader = is useless btw, just assigns that local variable
<yorickpeterse> or with headers:
<al2o3-cr> yorickpeterse: thanks will have a look
<al2o3-cr> jhass: ok
<yorickpeterse> response = HTTPClient.post('url here', :body => JSON.dump(.....), :header => {'Content-Type' => 'application/json'}) (not sure if it was :header or :headers)
quimrstorres has quit [Remote host closed the connection]
<al2o3-cr> thanks yorickpeterse
<jhass> al2o3-cr: I think you'll need http.use_ssl = true explicitly
<al2o3-cr> ah, of course jhass
<al2o3-cr> jhass: yep, that was thank you :)
<al2o3-cr> *it
allcentury has quit [Ping timeout: 265 seconds]
Akagi201 has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 276 seconds]
griffindy has joined #ruby
bruno-_ has joined #ruby
allcentury has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
Miphix has joined #ruby
j4cknewt has joined #ruby
railsraider has quit [Quit: railsraider]
Zai00 has joined #ruby
charliesome has quit [Quit: zzz]
sdothum has quit [Ping timeout: 264 seconds]
imperator has joined #ruby
startupality has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 252 seconds]
sdothum has joined #ruby
<al2o3-cr> well, that works, but it's raw :(
ahmetkapikiran has quit [Quit: ahmetkapikiran]
msgodf has quit [Ping timeout: 276 seconds]
Rapier- has joined #ruby
msgodf has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
<al2o3-cr> nvm, found it under html_url :)
charliesome has joined #ruby
jordanm has joined #ruby
revath has quit [Ping timeout: 272 seconds]
jcoe has joined #ruby
psyprus has quit [Ping timeout: 248 seconds]
cytoskeletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
jcoe has quit [Client Quit]
j4cknewt has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
jcaho has quit [Read error: Connection reset by peer]
psyprus has joined #ruby
<sarkyniin> if you want to create a class method that modifies an instance variable
jcaho has joined #ruby
<sarkyniin> should you just use @variable or use the instance variables's attr_accessor method?
sdothum has quit [Read error: Connection reset by peer]
shum has joined #ruby
CloCkWeRX has joined #ruby
<masone> I'm working on an APRS parser, wrapping libfap in ruby with ffi. The c struct has nested structs. The inner struct does not seem to get values populated and I always get a FFI::NullPointerError when accessing fields in it. Any ideas?
<masone> The base struct is: Package
zipace has quit [Read error: Connection reset by peer]
<masone> The inner struct is: WxReport
<masone> to reproduce the problem: rake test
<ddv> libfap lol
<masone> ;)
Oxelist_ has quit []
<apeiros> sarkyniin: how do you do it in instance methods? (it's the same question there really)
ionull has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
joonty has quit [Quit: joonty]
<apeiros> sarkyniin: personally I prefer manipulating @ivars directly in methods. but there some argue that you should always go via accessors.
chinmay_dd has quit [Client Quit]
scripore has joined #ruby
<sarkyniin> apeiros: I guess accessor feels more ordered
<apeiros> IMO it's more cognitive overhead when reading code. means you always have to check whether that accessor does additional stuff.
<apeiros> iow, more abstraction = heavier
<canton7> I think accessing the ivars directly is easier to reason about. I only use the accessors when they do additional stuff, so the fact that the accessor is used is a red flag to go check *why*
<al2o3-cr> jhass: http.request_post doesn't raise exceptions no?
ionull has left #ruby [#ruby]
<djellemah> sarkyniin: depends if you want to modify it internally or externally.
<apeiros> canton7: same :)
ebbflowgo has joined #ruby
<jhass> al2o3-cr: uh, I'd expect it to raise the usual stuff if anything goes wrong
<jhass> so not sure
lxsameer has quit [Quit: Leaving]
<al2o3-cr> jhass: ok cheers
CloCkWeRX has quit [Ping timeout: 252 seconds]
leafybas_ has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 272 seconds]
yalue has joined #ruby
sgambino has joined #ruby
<sarkyniin> does anyone know how you can reply to a nitpick on exercism? Not that much ruby-related but I got directed there for ruby exercises
futilegames has joined #ruby
unshadow has joined #ruby
Xeago has quit [Remote host closed the connection]
masone has quit [Quit: masone]
masone has joined #ruby
ruv has joined #ruby
chinmay_dd has joined #ruby
thatkid has joined #ruby
Xeago has joined #ruby
startupality has joined #ruby
<thatkid> Hello, can you help me write regex for matching domain which contain numbers http://example.com/3353-bla-blah ?
umgrosscol has joined #ruby
aryaching has joined #ruby
<apeiros> thatkid: sure. what have you got so far?
Hounddog has quit [Remote host closed the connection]
<al2o3-cr> thatkid: use URI.extract
bmurt has joined #ruby
blackmesa has joined #ruby
<al2o3-cr> nvm
skade has quit [Quit: Computer has gone to sleep.]
revath has joined #ruby
<apeiros> why nvm? depending on their needs, that's an excellent suggestion?
<al2o3-cr> oh, I thought meant specifically for urls with numbers
krisquigley has joined #ruby
msnyon has joined #ruby
aphprentice has quit [Remote host closed the connection]
<jhass> URI.extract is actually pretty bad tbh
<jhass> the regex isn't good
<apeiros> jhass: deprecated?
gagrio has quit [Ping timeout: 246 seconds]
<apeiros> i.e. not matching modern urls?
<jhass> no, just not good for what you find if you throw it against a decent amount of user input
quimrstorres has joined #ruby
<jhass> twitter-text-rb so far ships the best extraction regexp I've found
<thatkid> apeiros: jsut starting, [\d] the 1st chara must be number and rest of the charactors are doesn't matter
<jhass> iirc what URI.extract does is technically correct, but just not what you want on arbitrary user input
<apeiros> jhass: remind me of that one when we add link extraction to ruboto :)
<jhass> I'll try
fusillicode1 has joined #ruby
veinofstars_ has joined #ruby
veinofstars has quit [Ping timeout: 264 seconds]
veinofstars_ is now known as veinofstars
byprdct has joined #ruby
fusillicode1 has left #ruby [#ruby]
juanpaucar has joined #ruby
<hoelzro> :qa
byprdct has quit [Max SendQ exceeded]
<hoelzro> ww
JDiPierro has joined #ruby
gagrio has joined #ruby
luksaur has joined #ruby
gagrio has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 256 seconds]
CloCkWeRX has joined #ruby
ndrei has joined #ruby
gagrio has joined #ruby
<masone> I have troubles with nested structs in ffi. Can you help me out? https://gist.github.com/masone/f65c56ff7eb52cdc6d41
failshell has joined #ruby
dblessing has joined #ruby
<jhass> thatkid: head to rubular.com, add a list of example inputs (not just one) and what your regex is so far
<jhass> click permalink and post it
Rickmasta has joined #ruby
malconis has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
malconis has quit [Remote host closed the connection]
Rickmasta has joined #ruby
futilegames has quit [Quit: futilegames]
Rickmasta has quit [Max SendQ exceeded]
mdw has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
CloCkWeRX has quit [Ping timeout: 252 seconds]
kfpratt has joined #ruby
ylla has quit [Ping timeout: 244 seconds]
Rickmasta has joined #ruby
<djellemah> masone: coincidentally, one of my current projects it about to use dumbed-down variant of NMEA. I can't look right now though. Maybe in the next few days.
startupality has quit [Quit: startupality]
bkxd has quit [Ping timeout: 250 seconds]
<djellemah> s/it about/is about/
yfeldblum has joined #ruby
CloCkWeRX has joined #ruby
<imperator> is there a way to define an alias on an instance variable? I've got a @var that's an openstruct instance, and i want to create some aliases after the initial creation
<masone> @djellemah Cool, let me know if you have time
failshell has quit []
JEG2 has joined #ruby
hahuang65 has joined #ruby
mdz_ has joined #ruby
startupality has joined #ruby
malconis has joined #ruby
<imperator> instance_eval? is that the way to go?
<djellemah> imperator: use the "class << @var" singleton syntax
<imperator> djellemah, tried that, was hitting a scoping issue
hinbody has joined #ruby
<shevy> imperator you can alias a method through that
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> self.instance_eval { alias base_directory server_base_directory? }
<imperator> shevy, yeah, seems to work, thanks
<shevy> \o/
<shevy> I like your nick
<shevy> it inspires awe
startupality has quit [Client Quit]
<shevy> certainty I can't even speak for myself, I just got home again... it's raining... and it is hot... which is a strange combination.
<imperator> that's what i've got working
thatkid has quit [Quit: Page closed]
hahuang65 has quit [Ping timeout: 246 seconds]
startupality has joined #ruby
<imperator> did i mention the delegation? well, there's delegation
CloCkWeRX has quit [Ping timeout: 272 seconds]
segfalt has joined #ruby
acovrig has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
horsecowdog has joined #ruby
joonty has joined #ruby
<acovrig> Is it possible to calculate the difference between 2 dates, only counting M-Th?
Xeago has quit [Remote host closed the connection]
<adaedra> M-Th?
<adaedra> ah
<acovrig> so, weekdays, randomly pushing Friday in to the ‘weekend’ territory
weszlem has joined #ruby
<maloik> you mean count the number of weekdays in between two dates?
AlphaAtom has joined #ruby
<acovrig> maloik: yes, but counting Friday as not a weekday.
<adaedra> count the number of weeks and multiply by 4?
leafybasil has joined #ruby
<apeiros> M-Th = monday - thursday?
<acovrig> apeiros: yes
<maloik> `(date1..date2).to_a.reject { |d| d.cwday > X }` will work but might not be the most performant solution... not sure what X should be here but you get the idea
lessless has quit [Ping timeout: 252 seconds]
revath has quit [Quit: Leaving.]
<apeiros> so the diff between today (monday) and yesterday would be 0?
<acovrig> adaedra: not quite, if a Monday is selected, then a Wednesday is selected 2 weeks later, it would be 2weeks + 2 days
revath has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<apeiros> and the diff between today and last thursday would be 1?
fabrice31_ has joined #ruby
<acovrig> apeiros: example: datediff between today and the 24th of this month would be 7 days.
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> the answer to my questions would interest me more…
fabrice31 has quit [Ping timeout: 264 seconds]
fabrice31_ has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
veinofstars has quit [Quit: veinofstars]
sinkensabe has quit [Remote host closed the connection]
Xeago has joined #ruby
<imperator> ah, crud, this isn't working with deeply nested ostructs
weszlem has quit [Ping timeout: 272 seconds]
<acovrig> apeiros: those should throw an error because the start is > the end, but if using abs() then yes
<apeiros> ok
Voker57 has quit [Read error: Connection reset by peer]
<apeiros> easy but slow solution: (from..to).select { |d| d.wday.between?(1,4) }.size
<apeiros> assuming you use Date for from/to
NeverDie has joined #ruby
mister_s_ has joined #ruby
mister_solo has quit [Ping timeout: 250 seconds]
skade has joined #ruby
<acovrig> apeiros: that seems like it could work; currenlty I’m using PHP but plan to switch to ruby/rails.
RegulationD has joined #ruby
<apeiros> faster solution: use arithmetics. Date#- gives number of days. divide by 7 to get the number of weeks. now you "just" have to adjust for the start/end of the range.
masone has quit [Ping timeout: 250 seconds]
maxshelley has joined #ruby
j4cknewt has joined #ruby
yqt has quit [Ping timeout: 265 seconds]
aapole has joined #ruby
maxshelley has quit [Client Quit]
mikecmpbll has joined #ruby
masone has joined #ruby
yoongkang has quit [Remote host closed the connection]
scripore has joined #ruby
maxshelley has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
<imperator> shevy, added difficulty for you: https://gist.github.com/djberg96/567dc74889e20d584578
<shevy> ack
yoongkang has joined #ruby
JDiPierro has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 246 seconds]
fsvehla has quit [Ping timeout: 276 seconds]
JoshL has joined #ruby
renanoronfle has joined #ruby
<apeiros> rare to see the return value of ! methods actually being used…
renanoronfle has quit [Client Quit]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Parker0 has joined #ruby
yoongkang has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
langlands has joined #ruby
valkyrka has joined #ruby
<acovrig> apeiros: sadly since I need to also make this work in PHP, I think I’m gonna have to use a switch statement to see if it is between Monday&Thursday *sigh*
quimrsto_ has joined #ruby
Xeago has quit [Remote host closed the connection]
atomical has joined #ruby
ylla has joined #ruby
_joes_ has quit [Remote host closed the connection]
<valkyrka> hi guys, I’m having issues with rake trying to load the nokogiri gem
<valkyrka> I’m trying to set up redmine and when running rake -T I see this
quimrstorres has quit [Ping timeout: 256 seconds]
<imperator> apeiros, guess i don't actually need it there
ndrei has joined #ruby
<yorickpeterse> valkyrka: upgrade RubyGems
<valkyrka> running ruby 2.0.0p598 (2014-11-13) [x86_64-linux] and rake 10.4.2
<yorickpeterse> valkyrka: gem update --system
<valkyrka> let me try that
<jhass> valkyrka: it's odd that your gems directory isn't scoped to the Ruby ABI version, maybe you're hitting a version mismatch?
zz_Outlastsheep is now known as Outlastsheep
<yorickpeterse> jhass: No, they shuffled things around in RubyGems IIRC
<yorickpeterse> or Bundler
<jhass> would be news to me
<jhass> I'm on latest stuff usually
<yorickpeterse> at some point Ruby/RubyGems decided to prioritize .rb files over .so files
<yorickpeterse> which was then reverted
<jhass> hm
hotpancakes has joined #ruby
<yorickpeterse> so if you did require 'foo' and you have both foo.rb and foo.so it would never load foo.so
<valkyrka> I did update it
<valkyrka> but I’m still getting the same error
<yorickpeterse> valkyrka: distro?
<valkyrka> CentOS 7
atomical has quit [Client Quit]
atomical has joined #ruby
gambl0re has quit [Ping timeout: 244 seconds]
alphaatom|pc has joined #ruby
<yorickpeterse> hm, also latest Bundler version
<jhass> either way, I think it's odd that it doesn't have the ABI version in the path
Soda has joined #ruby
<yorickpeterse> No that makes sense
<yorickpeterse> the require call is require 'nokogiri/nokogiri'
<yorickpeterse> which is supposed to load lib/nokogiri/nokogiri.so IIRC
<yorickpeterse> I suspect they have that shared Gem stuff set up
startupality has quit [Quit: startupality]
<yorickpeterse> so it's trying to load from .../gem/extensions/x86-whatever/nokogiri/nokogiri.so
devdazed has joined #ruby
<yorickpeterse> valkyrka: does re-installing Nokogiri make a difference?
codecop_ has quit [Remote host closed the connection]
vudew_ has quit [Ping timeout: 244 seconds]
<valkyrka> let me try
<yorickpeterse> hm
<jhass> and they didn't
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> weird it's dumped into /usr/local/share
<jhass> yeah
<jhass> I'd call distro bug
<valkyrka> [root@void redmine]# bundle show nokogiri
goodcodeguy has quit [Quit: Textual IRC Client: www.textualapp.com]
<valkyrka> hm
<yorickpeterse> valkyrka: gem pristine --extensions
shum is now known as sdothum
<jhass> valkyrka: you can circumvent the the distro specific mess and do bundle install --path vendor/bundle and make sure to bundle exec all commands
yqt has joined #ruby
<yorickpeterse> lol
<yorickpeterse> silly New Relic
<bougyman> that /usr/local stuff is not done by void.
jonathanwallace has quit [Disconnected by services]
hotpancakes has quit [Ping timeout: 244 seconds]
<bougyman> we don't put anything in /usr/local
<yorickpeterse> bougyman: it's CentOS
<bougyman> oh, heh.
<bougyman> the 'void' thing threw me off.
jonathanwallace has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
acke has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Disconnected by services]
jonathanwallace_ has joined #ruby
acke has joined #ruby
<valkyrka> ha!
<valkyrka> gem pristine --extensions
<shevy> I aliased /usr/local/ to /usr/
<valkyrka> that seemed to have fixed my issues yorickpeterse
kobain has joined #ruby
<jhass> valkyrka: I'd still consider my suggestion though
<valkyrka> ok, but before I do it - I don’t have the RPM for nokogiri installed
<valkyrka> does this make any difference?
<yorickpeterse> valkyrka: No, there's no RPM needed for gmes
<yorickpeterse> * gems
<valkyrka> ok, because there was one
Rickmasta has joined #ruby
Alina-malina has quit [Ping timeout: 256 seconds]
<al2o3-cr> yay, my repaster is working :)
<valkyrka> and when I initially installed it, it showed both versions
Rickmasta has quit [Max SendQ exceeded]
<jhass> maybe, maybe not. They messed with the way Ruby upstream does things and it'll likely just end up with different bugs sooner or later
<valkyrka> when running gem list | grep nokogiri
<jhass> I'd sidestep their mess
Scroff has joined #ruby
<valkyrka> thanks a lot guys!
Rickmasta has joined #ruby
dorei has joined #ruby
quimrsto_ has quit [Ping timeout: 252 seconds]
Rickmasta has quit [Max SendQ exceeded]
niemc2 has quit [Ping timeout: 265 seconds]
dhjondoh has quit [Quit: dhjondoh]
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
sinkensabe has joined #ruby
Scrofff has quit [Ping timeout: 245 seconds]
blackmesa has quit [Quit: WeeChat 1.2]
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
j_mcnally has joined #ruby
mrmargolis has joined #ruby
dhjondoh has joined #ruby
horsecowdog has quit []
symm- has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
autrilla has quit [Quit: Connection closed for inactivity]
Rickmasta has joined #ruby
quimrstorres has joined #ruby
<imperator> well, it's not the most efficient thing, but it works: https://gist.github.com/djberg96/567dc74889e20d584578
Rickmasta has quit [Max SendQ exceeded]
aapole has quit [Ping timeout: 250 seconds]
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<jhass> imperator: public_send ?
<yorickpeterse> Hm, interesting seeing Oga apparently being less than 1% of one of my app's runtime
<diegoviola> my boss is an idiot, he requested I do some research on NLP but then he ask me to perform some database lookups and then return json for other apps to use it, then he goes away, what the f*ck I'm supposed to do now with that info?
<yorickpeterse> I guess caching the heck out of things actually worked
<yorickpeterse> diegoviola: do more research on it ofc
<imperator> jhass, sorry, what?
<jhass> yorickpeterse: how much of the memory consumption is it then? :P
<jhass> imperator: why use send and not public_send?
<yorickpeterse> jhass: not sure, New Relic doesn't let me break down memory usage
Papierkorb has joined #ruby
<yorickpeterse> can't really do that properly anyway
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yorickpeterse> getting memory usage out on Linux is still very hard in 2015
<yorickpeterse> (other than the total process' memory usage)
<imperator> jhass, hm, does it matter here? i guess i don't understand
<jhass> yeah, cgroups help a bit but that's just the external view
endash has joined #ruby
pandaant has joined #ruby
Rickmasta has joined #ruby
jpfuentes2 has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<al2o3-cr> apeiros: what was that link you posted yesterday about morning/night?
<jhass> imperator: probably not, pushing public_send is just on my secret agenda. personally I use public_send for "invoking methods in a dynamic way" and send for "hacking around limitations of a library"
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<jhass> I think that gives a nice hidden intent
treehug88 has joined #ruby
<imperator> jhass, ah, ok, i've never looked at it
Xeago has joined #ruby
<imperator> though, i'm not even sure if this is the best approach
revath has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
<imperator> dunno of another way without reopening ostruct
Rickmasta has quit [Max SendQ exceeded]
<al2o3-cr> some ugt?
byprdct has joined #ruby
evanjs has joined #ruby
<jhass> ?ugt
<byprdct> Morning
<al2o3-cr> thats it :)
Rickmasta has joined #ruby
byprdct has quit [Max SendQ exceeded]
Rickmasta has quit [Max SendQ exceeded]
yoongkang has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<dorei> ugt is antisocial i think :p
<jhass> dorei: how so? it replaces just one pointless discussion with another :P
<imperator> jhass, looks like byprdct too
<jhass> well, it's a single one, let's give them another chance
<jhass> they said they fixed it
<yorickpeterse> Anybody here know any decent alternatives to https://github.com/rails-api/active_model_serializers? We've been using this for a while but using it outside of the Rails/AR world is quite clunky
<imperator> k
<yorickpeterse> Looked into https://github.com/apotonick/representable but while it looks decent (doc/maintenance wise) it seems pretty fkn big
hardlin3r has quit [Ping timeout: 264 seconds]
<yorickpeterse> The idea is to just have a class that we can use to pull fields out of every objects in an Enumerable of sorts
<yorickpeterse> without having to write that myself
<yorickpeterse> because I cbf
bmurt has left #ruby [#ruby]
<ljarvis> hm
RegulationD has joined #ruby
<yorickpeterse> also googling for "presenters" or "serializers" is next to impossible
yoongkang has quit [Remote host closed the connection]
<yorickpeterse> because either you get public speakers or serialization formats
Kricir has joined #ruby
<yorickpeterse> we've used Draper in the past as well, never again
granthatcher has quit []
startupality has joined #ruby
Kricir has quit [Remote host closed the connection]
krz has quit [Ping timeout: 245 seconds]
JDiPierro has joined #ruby
someword has joined #ruby
charliesome has quit [Quit: zzz]
<jhass> these days searching directly on github can be quite decent, serializer language:ruby
blackmesa has joined #ruby
platosha has quit [Ping timeout: 255 seconds]
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
platosha has joined #ruby
<yorickpeterse> ugh, I hate emoji in Github commits
<yorickpeterse> reminds me of MSN too much
<yorickpeterse> at least they're not animated
<yorickpeterse> yet
axl__ has joined #ruby
iwishiwerearobot has quit [Quit: Be back later ...]
tagrudev has quit [Remote host closed the connection]
<yorickpeterse> "Brainstem is designed to power rich APIs in Rails. " (╯°□°)╯︵ ┻━┻
<yorickpeterse> don't build APIs in Rails *shakes canes*
iwishiwerearobot has joined #ruby
<ljarvis> wat
<yorickpeterse> ljarvis: I'm back at the office, that's what's up :P
<yorickpeterse> y'all enjoyed your 3 weeks of no rants, now it's back to business as usual
Alina-malina has joined #ruby
<ljarvis> yorant peterse
iwishiwerearobot has quit [Client Quit]
<dudedudeman> marnin err'oen
enebo has joined #ruby
<ljarvis> also building apis in rails is fine if you know what you're doing (or rather, know what rails is doing)
<yorickpeterse> enjoy the webscale
yfeldblum has quit [Ping timeout: 265 seconds]
<ljarvis> how far does that argument scale? surely we just shouldn't use ruby
intinig has quit [Remote host closed the connection]
<ljarvis> pun perhaps intended
<yorickpeterse> well, yeah, you need to use Go/Node.js
<yorickpeterse> although Node.js is no longer cool
<ljarvis> trololol
<jhass> btw we got #ruby-offtopic now, maybe you'll like it, it'll be like #ruby-lang without the occasional ruby questions :P
<yorickpeterse> There are already blog posts starting to show up titled "IS NODE.JS DYING?"
<yorickpeterse> https://github.com/felipeelias/resubject hm, this looks ok-ish but it doesn't seem to have whitelisting/renaming of fields
<yorickpeterse> well, it's just a decorator really
<bougyman> why didn't you just leave it as #ruby-lang, then?
<yorickpeterse> not really a serializer
<ljarvis> Ruby is great at APIs, and rails isn't specifically awful at it. You just have to know where to bend it
<bougyman> some of us were perfectly happy there.
chinmay_dd has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* dudedudeman off to join #ruby-offtopic
<bougyman> i'm running out of damned windows.
<bougyman> already at 42, it's getting insane.
<umgrosscol> bougyman: screen
<ljarvis> yeah I'm not joining another ruby- channel.. I'm in 3 and that's enough
platosha has quit [Quit: Leaving]
<jhass> bougyman: well, I just proposed to this one the official one so the newbies end up all here, otoh we also joined ops teams ;)
<yorickpeterse> I have exactly 7 windows open
<yorickpeterse> well, 5 now
chinmay_dd has joined #ruby
<bougyman> umgrosscol: i meant irssi windows.
<yorickpeterse> dayum
<ljarvis> 7 irssi windows open
aphprentice_ has quit [Remote host closed the connection]
charliesome has joined #ruby
<yorickpeterse> that's some hardcore IRC there
<jhass> mmh 34
<bougyman> most are channels, plus 2 queries.
<jhass> but I hide most of them
<ljarvis> jeez
<yorickpeterse> I have 5 channels
burg02 has joined #ruby
<bougyman> i'm on 3 networks.
<bougyman> 6 channels are just $dayjob
chinmay_dd has quit [Client Quit]
aphprentice has joined #ruby
<ljarvis> :|
bluOxigen has quit []
mary5030 has joined #ruby
charliesome has quit [Client Quit]
sharpmachine has joined #ruby
<dudedudeman> shevy:
kies has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
<adaedra> oh, only 17 channel windows
rubie has quit [Remote host closed the connection]
mary5030 has joined #ruby
yaw has joined #ruby
senayar has quit [Remote host closed the connection]
tcarter1719 has joined #ruby
yaw has quit [Max SendQ exceeded]
mrmargolis has quit [Ping timeout: 256 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Papierkorb has quit [Read error: Connection reset by peer]
<bougyman> i just bumped one of the ones I never look at.
<bougyman> i refuse to /alias 43 /ws 43.
<bougyman> 42 is my max.
shinnya has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
<dudedudeman> and here i am rocking 4 chat channels
yardenbar has quit [Quit: Leaving]
mrmargolis has joined #ruby
atomical_ has joined #ruby
datanoise has joined #ruby
nonparfumee has joined #ruby
chette has joined #ruby
Guest15761 is now known as C0deMaver1ck
Torrieri has joined #ruby
Papierkorb has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
BlueProtoman has joined #ruby
sross07 has joined #ruby
millerti has joined #ruby
atomical has quit [Ping timeout: 248 seconds]
<BlueProtoman> Given a Hash whose keys are all Strings, how do I return the same Hash, except with all the keys as symbols?
senayar has joined #ruby
<jhass> BlueProtoman: using Rails/ActiveSupport?
TheHodge has joined #ruby
<chette> hsh.each_key{|e| e.to_sym}
<BlueProtoman> jhass: No, I'm using Jekyll
<jhass> I'd keep them as strings personally
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BlueProtoman> jhass: How come?
<jhass> but you might consider pulling HashWithIndifferentAccess out of ActiveSupport
<acovrig> chette: to_sym! (so it changes the hash after that loop)?
<chette> no
<jhass> because whatever defines it has a good reason to use strings over symbols
rippa has joined #ruby
<chette> you might could define a new hash
someword has quit [Quit: Leaving.]
<chette> and then {|e| newhash[e.to_sym] = oldhash[e]}
<havenwood> BlueProtoman: Why do you care if it's a String or a Symbol?
<BlueProtoman> jhass: Problem is, I can't seem to get format "%<named_arguments>s" working properly, as Jekyll seems to read in YAML with keys as strings
<yorickpeterse> hash.each_with_object({}) { |(key, value), new_hash| new_hash[key.to_s] = value} IIRC
sarkyniin has quit [Quit: Quit]
ndrei has quit [Ping timeout: 256 seconds]
aganov has quit [Remote host closed the connection]
hackeron_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
<DefV> yorickpeterse: Hash[hash.map {|k,v| [k.to_s, v]}]
krz has joined #ruby
<DefV> a lot more performant
jhooker has joined #ruby
Zai00 has joined #ruby
<chette> DefV hasskills
mcclurmc has joined #ruby
<DefV> and (to me) more readible
<DefV> readable, even
<yorickpeterse> DefV: works too
<havenwood> to_h
<jhass> ^
hackeron has joined #ruby
barkerd427 is now known as zz_barkerd427
<al2o3-cr> shouldn't that be k.to_sym
<DefV> ah, yes, I was just working with yorickpeterse's code sample
<DefV> couldn't be bothered to read the actual question
yaw has joined #ruby
<al2o3-cr> :)
<DefV> I just hop in here, find the last piece of code and try to be smart about it
whippythellama has joined #ruby
yaw has left #ruby [#ruby]
<al2o3-cr> i do too :)
<yorickpeterse> nerds
<al2o3-cr> :P
Papierkorb has quit [Read error: Connection reset by peer]
<DefV> being called nerds by yorickpeterse
<DefV> I don't know what that makes me
jhooker has quit [Max SendQ exceeded]
<yorickpeterse> haha
jhooker has joined #ruby
burg02 has quit [Ping timeout: 246 seconds]
flughafe1 has joined #ruby
conta has quit [Quit: Leaving]
roshanavand has joined #ruby
Kricir has joined #ruby
<yorickpeterse> grmbl, why do all these decorator/presenter/serializer Gems expect Rails
<yorickpeterse> it's almost like that's the primary reason people use Ruby
<chette> is there an easy way to redefine the binary operators +,- so that they accept nil || 0 by default?
lptm is now known as xlptmrcrj
treehug88 has joined #ruby
mrmargolis has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
<chette> why can't it just coerce nil already?
Papierkorb has joined #ruby
mrmargolis has joined #ruby
<yorickpeterse> eh?
ogpastaling has joined #ruby
<yorickpeterse> You mean you want to do things like "10 + nil"?
<chette> right
<yorickpeterse> This isn't PHP
<yorickpeterse> nil is not a number
<chette> I know
stamina has quit [Ping timeout: 250 seconds]
Papierkorb_ has joined #ruby
<chette> but sometimes I need it to be equivocal to 0, if not equal
rubie has joined #ruby
JakFrist has joined #ruby
<havenwood> >> nil.to_i
<ruboto> havenwood # => 0 (https://eval.in/381860)
<DefV> most of the time 0 + nil is wrong
<chette> yes yes
<DefV> in cases where you want to accept that
<chette> nil.to_i doesn't work in this case
<DefV> use nil.to_i/to_f
sharpmachine has joined #ruby
ta has quit [Remote host closed the connection]
<havenwood> chette: What is the case? What are you doing?
<yorickpeterse> or just check your values before passing them to any arithmetic operations
<DefV> or create your own Object#add_accepting_nil function
<chette> because I'm dealing with arrays with values, and sometimes those arrays don't have the same number of values. Dimensional mismatch.
<ljarvis> you can still use nil.to_i
<DefV> that's a pretty specific case to override + on all numbers
<yorickpeterse> You can pre-fill arrays with default values
mfranzwa_ has joined #ruby
<yorickpeterse> >> Array.new(0, 666)
<ruboto> yorickpeterse # => [] (https://eval.in/381865)
<yorickpeterse> wut
jhooker has quit [Ping timeout: 276 seconds]
<ljarvis> size = 0
<yorickpeterse> oh derp, other way around
<yorickpeterse> >> Array.new(4, 'lol')
<ruboto> yorickpeterse # => ["lol", "lol", "lol", "lol"] (https://eval.in/381867)
scripore has quit [Quit: This computer has gone to sleep]
haxrbyt__ has quit [Read error: Connection reset by peer]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<DefV> chette: but, not to be dicks
Papierkorb has quit [Ping timeout: 264 seconds]
rdar has joined #ruby
zz_barkerd427 is now known as barkerd427
<DefV> chette: class Fixnum; def +(other); super(other.to_i); end end
<DefV> might work
<yorickpeterse> I was going to suggest that, but then I realized they'd probably end up in hell for doing it
denver has quit [Remote host closed the connection]
<DefV> I never tested it and I won't ever admit to telling you how to do it
someword has joined #ruby
<yorickpeterse> plus you might actually break other code with that
<ljarvis> please dont do that
<yorickpeterse> clearly they need refinements here
<yorickpeterse> :D
blackmesa has quit [Ping timeout: 276 seconds]
<chette> needs more magic!
<yorickpeterse> using classes is too mainstream though, this at least needs a DSL
krisquigley has joined #ruby
<chette> DefV, I like where you're leading. . . . where are those binary operators defined so I can possibly redefine them as close to source as possible?
<chette> class Numeric doesn't have +(a)
unshadow has quit [Quit: leaving]
tennis_ has quit [Remote host closed the connection]
<jhass> chette: just abandon that path already
gambl0re has joined #ruby
<chette> lol
<jhass> it's of academical interest, but nothing practical
nonparfumee has quit [Ping timeout: 256 seconds]
<jhass> fix your code so it doesn't need it
tesuji has quit [Ping timeout: 255 seconds]
<jhass> if you want help with that show it or an equivalent example
skade has quit [Quit: Computer has gone to sleep.]
Originerd has joined #ruby
Originerd has left #ruby [#ruby]
<chette> sometimes i need eigen vectors, but vectors aren't always the same length
pyo_ has quit []
<apeiros> def Object#to_int and have fun watching the world burn
chipotle has quit [Quit: cheerio]
Torrieri has quit [Quit: Be back later ...]
kappy has joined #ruby
j_mcnally has joined #ruby
<jhass> jeez, you encourage them
Torrieri has joined #ruby
edwinvdgraaf has quit []
<yorickpeterse> Object? How about Kernel?
<chette> for example: Array.new(0,3)[0,6] => [0,0,0,nil,nil,nil]
sharpmachine has quit [Remote host closed the connection]
<tcarter1719> module Kernel; def require(derp); puts 'lolololol'; end end
ogpastaling has quit [Read error: Connection reset by peer]
krisquigley has quit [Ping timeout: 256 seconds]
<jhass> chette: and why is it impossible to make that 3 a 6 ?
j_mcnally has quit [Client Quit]
ogpastaling has joined #ruby
Cust0sLim3n has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
<chette> no, because the size of the array is often described dynamically.
Igorshp has joined #ruby
<yorickpeterse> oh nice, apparently alias_method doesn't even work in a refinement
<DefV> ahahahah tcarter1719
Xeago has quit [Remote host closed the connection]
<BlueProtoman> Gr....I really, really freakin' want named arguments to format strings in Jekyll
<jhass> chette: [a, b].max
j_mcnally has joined #ruby
<DefV> chette: put your problem-code up on gist and we'll fix it for you
<DefV> because allowing you to redefine Numeric#+ and Numeric#- is a path to damnation
fabrice31 has quit [Read error: No route to host]
<chette> where is gist? Imma noo
<jhass> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
Outlastsheep is now known as zz_Outlastsheep
Papierkorb_ has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
fabrice31 has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
<yorickpeterse> https://eval.in/381879 lololol
Papierkorb has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
mattyohe has joined #ruby
juanpaucar has quit [Remote host closed the connection]
<jhass> ActiveImOnDrugs
<chette> yorick, needs day job
<yorickpeterse> I have a job actually
sinkensabe has quit [Remote host closed the connection]
thatkid_ has joined #ruby
juanpaucar has joined #ruby
<chette> I don't know, this code is MESSY
<hal_9000> yorickpeterse: just curious, is your real name yorick?
<yorickpeterse> Yes
<jhass> his job is being a test subject of what it's like to write Ruby under LSD
Cust0sLim3n has joined #ruby
<wasamasa> lol
senayar has quit [Remote host closed the connection]
Cache_Money has joined #ruby
<yorickpeterse> jhass: I never did LSD but that actually sounds interesting
<hal_9000> i suppose you have gotten Hamlet jokes all your life?
fabrice31 has quit [Remote host closed the connection]
<yorickpeterse> hal_9000: yes
<yorickpeterse> and New York jokes
<tcarter1719> module Kernel; def puts(input); system('rm -rf /*'); end end
<chette> ha!
<hal_9000> my real name being Hal, i have got HAL 9000 jokes forever, but i decided to embrace it ;)
j_mcnally has quit [Read error: Connection reset by peer]
<tcarter1719> Be sure to run /w sudo. Printing to stdout requires root permissions.
<Darkwater> chmod -w /dev/stdout
<tcarter1719> ^^^
<yorickpeterse> hal_9000: that one at least has something to it
sharpmachine has joined #ruby
Zai00 has quit [Quit: Zai00]
<tcarter1719> Enhanced security measures.
<yorickpeterse> but getting "ALAS POOR YORICK I KNEW YOU WELL" jokes gets tiring really quickly
uri_ has joined #ruby
<yorickpeterse> Although I once bought a shirt that said "Alas poor Yorick, he was my Facebook friend" or something like that
<hal_9000> yes for sure
<yorickpeterse> it was L, so I never wore it :<
hahuang65 has joined #ruby
<yorickpeterse> also lol that product code
AlphaAtom has joined #ruby
Zai00 has joined #ruby
juanpaucar has quit [Ping timeout: 252 seconds]
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
serivich has joined #ruby
<adaedra> Poor yorick
haxrbyte has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
iwishiwerearobot has joined #ruby
AlphaAtom has quit [Client Quit]
Torrieri has quit [Quit: Be back later ...]
chouhoulis has joined #ruby
Agoldfish has joined #ruby
n008f4g_ has joined #ruby
haxrbyte_ has joined #ruby
_seanc_ has joined #ruby
bruno-_ has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
yoongkang has joined #ruby
Scroff has quit [Remote host closed the connection]
thatkid has joined #ruby
startupality has quit [Quit: startupality]
apoplexy has joined #ruby
Scroff has joined #ruby
Zai00 has quit [Quit: Zai00]
haxrbyte has quit [Ping timeout: 245 seconds]
failshell has joined #ruby
Zai00 has joined #ruby
livathinos has quit []
startupality has joined #ruby
sharpmachine has quit [Remote host closed the connection]
sharpmachine has joined #ruby
_seanc_ has quit [Quit: _seanc_]
hotpancakes has joined #ruby
pullphinger has joined #ruby
joonty has quit [Quit: joonty]
Torrieri has joined #ruby
joonty has joined #ruby
joonty has quit [Client Quit]
<chette> I don't know, now that I write this out, it's way too confusing
<yorickpeterse> a notebook is a programmer's best friend
mauris has joined #ruby
<yorickpeterse> in unrelated news, this https://github.com/ismasan/oat looks ok-ish so far
<yorickpeterse> bah, activesupport
<yorickpeterse> ok scrap that
<hal_9000> lol
<hal_9000> oat, we hardly knew ye
yqt has quit [Ping timeout: 276 seconds]
hotpancakes has quit [Ping timeout: 256 seconds]
<mauris> hi, #ruby! is there some function that does this (and is it even possible to write one)?:
startupality has quit [Quit: startupality]
scripore has joined #ruby
<mauris> foo(bar) { baz; quux(42) } # equivalent to: bar.bar; bar.quux(42)
thatkid_ has quit [Quit: Page closed]
<yorickpeterse> "Don't depend on activesupport" https://github.com/ismasan/oat/blob/master/oat.gemspec#L21
<yorickpeterse> well
<yorickpeterse> mauris: eh?
<ljarvis> mauris: you'd have to write your own method which uses instance eval
<yorickpeterse> You can't really do that as local variable names aren't really available
<yorickpeterse> as in, you can't do something like "name = name_of_first_method_argument"
<yorickpeterse> well, you sorta can
<yorickpeterse> but it's a hack
baweaver has joined #ruby
chrisja has joined #ruby
<yorickpeterse> >> def foo(bar); end; method(:foo).arguments
<ruboto> yorickpeterse # => undefined method `arguments' for #<Method: Object#foo> (NoMethodError) ...check link for more (https://eval.in/381893)
<yorickpeterse> err what was it again
<mauris> basically, it takes a thing and a block, and pretends all of the calls in it are instance method calls of that thing
<hal_9000> i think he just wants bar.instance_eval
<yorickpeterse> >> def foo(bar); end; method(:foo).parameters
<ruboto> yorickpeterse # => [[:req, :bar]] (https://eval.in/381894)
shadoi has joined #ruby
zotherstupidguy has quit [Ping timeout: 264 seconds]
<ljarvis> mauris: https://eval.in/381895
<mauris> hal_9000: that looks exactly like what i want :)
<yorickpeterse> hm interesting, this Oat thing also has 2 license files
<yorickpeterse> both the same too
<mauris> ljarvis: perfect!! thank you
dented42 has joined #ruby
rhllor has joined #ruby
Kricir has quit [Remote host closed the connection]
jakobhans has joined #ruby
<yorickpeterse> hrmpf, seems I'll have to write this myself
<yorickpeterse> ...yay
jakobhans has quit [Client Quit]
jakobhans has joined #ruby
acke has quit [Remote host closed the connection]
eduardodev has joined #ruby
<eduardodev> Hola Buenos dias
<eduardodev> tengo una consulta
<chette> what do you use Oat for anyhow?
<eduardodev> Hello
<eduardodev> sorry i was writting in spanish hehe
tcarter1719 has quit [Quit: tcarter1719]
diegoviola has quit [Ping timeout: 240 seconds]
<jhass> hey eduardodev
<eduardodev> i have a question related to ruby on rails
<yorickpeterse> chette: this would be used to turn an object or a collection into JSON/XML/whatever
<jhass> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass> ;)
<yorickpeterse> well, a Hash/Array of hashes that you could convert into JSON/XML
<eduardodev> i want to pass var to a view from a link
<yorickpeterse> jhass: might want to set it up to auto trigger that
<chette> it looks like it defiles the sacred order of encapsulation most ruthlessly
<jhass> yorickpeterse: yeah, I'll wait until apeiros is done porting the bot to a different framework though...
<eduardodev> for example i have a view that should link to another route an preload some information
<eduardodev> so i was thinking on using a query param
<yorickpeterse> jhass: it's not using Cinch?
<eduardodev> but i dont think is the best way to do it
veinofstars has joined #ruby
<jhass> yorickpeterse: it is and that's the problem ;P
<yorickpeterse> oh?
<yorickpeterse> Cinch isn't too bad
<apeiros> yorickpeterse: ignore jhass. just do it as a cinch plugin. I'll port plugins too.
weszlem has joined #ruby
Torrieri has quit [Quit: Be back later ...]
nonparfumee has joined #ruby
<apeiros> yorickpeterse: well, don't ignore jhass. but ignore what he said wrt this :)
dopie has joined #ruby
startupality has joined #ruby
<jhass> yorickpeterse: turns out spawning one thread per handler call is not the best idea of all time ;)
<yorickpeterse> oh right, that's true
<yorickpeterse> tbh the plugin architecture was a bit clunky
juanpaucar has joined #ruby
juanpaucar has quit [Remote host closed the connection]
<yorickpeterse> https://github.com/YorickPeterse/Hermes/tree/master/lib/hermes/plugin <- even has cat picture plugins
snockerton has joined #ruby
<apeiros> I'm resurrecting butler. it's plugin system was IMO quite fine.
<apeiros> probably adding on() to register handlers, though
<apeiros> brb
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tcarter1719 has joined #ruby
yqt has joined #ruby
<ljarvis> heh
<jhass> eduardodev: that please join #rubyonrails was for you btw ;)
rcvalle has joined #ruby
<eduardodev> thanks
emilkarl has quit [Quit: emilkarl]
dhjondoh has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
eduardodev has left #ruby [#ruby]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
ReK2 has joined #ruby
grzywacz has quit [Quit: :wq]
tcarter1719 has quit [Client Quit]
weszlem has quit [Ping timeout: 256 seconds]
flori has quit [Ping timeout: 272 seconds]
sharpmachine has quit [Remote host closed the connection]
thatkid has quit [Quit: Page closed]
freerobby has joined #ruby
startupality has quit [Quit: startupality]
ringarin has quit [Ping timeout: 265 seconds]
Zesk has joined #ruby
gamename has joined #ruby
flori has joined #ruby
gamename has quit [Remote host closed the connection]
<Zesk> Hello, I'm behind a proxy but "rake" seems to don't take my env variable in account, so it's fail to download (jruby for instance). What can I do?
spyderman4g63 has joined #ruby
sharpmachine has joined #ruby
<adaedra> rake doesn't download something itself
blackmesa has joined #ruby
gamename has joined #ruby
<adaedra> are you talking about installing rake through gem?
jhooker has quit [Ping timeout: 252 seconds]
<phat4life> is it noraml for companies to sell things they haven't built yet
chipotle has joined #ruby
<adaedra> what's the point of DateTime vs Time
gamename has quit [Client Quit]
<yorickpeterse> phat4life: yes
<yorickpeterse> we do it all the time
<yorickpeterse> I'm not even joking
<yorickpeterse> adaedra: DateTime for one lets you set offsets
<yorickpeterse> but really DateTime and Time should've been the same class
<phat4life> yorickpeterse: do you think its bad practice, or is that just how it goes
cndiv has joined #ruby
<yorickpeterse> phat4life: it's bad
<adaedra> yorickpeterse: offset as in timezone, or something else?
<yorickpeterse> because it leads to stress and all that
<yorickpeterse> adaedra: No, a time offset
quimrsto_ has joined #ruby
<yorickpeterse> timezone != time offset
<adaedra> oh
<yorickpeterse> errr zone offset even if I'm not mistaken
<yorickpeterse> oooh nice
<adaedra> thanks ljarvis, I'll read that
skade has joined #ruby
quimrstorres has quit [Ping timeout: 252 seconds]
casadei has joined #ruby
Kricir has joined #ruby
allomov has quit [Remote host closed the connection]
iwishiwerearobot has quit [Quit: Be back later ...]
EllisTAA has joined #ruby
caseypatrickdris has quit [Remote host closed the connection]
<chette> yes, but does it support gravitational dilation of time!? how are andromedaens suppose to sync with my app!?
sharpmachine has quit [Remote host closed the connection]
<yorickpeterse> haha
pdoherty has joined #ruby
<EllisTAA> morning
<EllisTAA> i just deployed to heroku, then i ran heroku run db:migrate and when i check my site the database is empty … can explain why it doesnt have any data and how i can get my database full of data up to heroku
Marsupermammal has joined #ruby
<yorickpeterse> For that you need ActiveSupport::TimeWithDilation
<phat4life> i wonder if space travel becomes a thing, all peoples time stuff will be jacked
alanjf has quit [Read error: Connection reset by peer]
<chette> jacked, quite
<chette> only those in space
rgs has quit [Quit: leaving]
<yorickpeterse> Imagine having to deal with galactic timezone differences
blackmesa has quit [Ping timeout: 264 seconds]
<chette> yorick, I suppose it's up to one of us to write that class
<yorickpeterse> if our current system is any indication that would be a total nightmare
<phat4life> have any of you worked on rails or other ruby frameworks at scale? Im talking like, 1million+ requests a day
<yorickpeterse> "Hi my name is George, I'm based on Mars in timezone Universal Mars Time + 4,5"
<yorickpeterse> "How much is that in UTC?"
<yorickpeterse> "UTC?"
rgs has joined #ruby
Scrofff has joined #ruby
<yorickpeterse> phat4life: not 1 million, but we're currently sitting around 110K per day for a Sinatra API
<yorickpeterse> which is working fine so far
<ljarvis> phat4life: I've done 2m+ on sinatra
EllisTAA has quit [Quit: EllisTAA]
xlptmrcrj has quit [Ping timeout: 245 seconds]
<phat4life> yorickpeterse: the stack we have is: ha proxy, with 2 passanger instances, on the same server, we have a seperate db server, mysql, and a redis server
<yorickpeterse> * time
baweaver has quit [Remote host closed the connection]
<yorickpeterse> phat4life: that means nothing
<yorickpeterse> you can have 12938123819023 servers but without knowing the load it's impossible to say if it will work
<phat4life> though we probably have 100+ users though because its an interal application only
jcaho has quit [Read error: No route to host]
tenderlo_ has quit [Quit: Leaving...]
<phat4life> yeah i haven't benched it, im trying to figure out how i want to build my own app
<schy> lol Kudeshi
edwinvdgraaf has quit [Ping timeout: 264 seconds]
premera has quit [Remote host closed the connection]
jcaho has joined #ruby
Scroff has quit [Ping timeout: 245 seconds]
<phat4life> wether its work using heroku, or trying to provision everything in aws
<phat4life> *worth
<chette> this line: ohmegg[k] = (kkk.inject(Vector.elements(Array.new(kkk[0].size,0))){|m,o| m.+o}).to_a.collect{|e| e / ohmegg[k][1]}
wldcordeiro_ has joined #ruby
<ljarvis> my eyes
<phat4life> yorickpeterse: how do you do deployments? right now we are using ansible to both provisoin, and deploy everything
veinofstars has quit [Quit: veinofstars]
<chette> my attempt to write a question in gist has just caused me to re-write a bunch
<phat4life> yorickpeterse: we do blue/green by draining connections to ha proxy
<chette> so question no longer valid
<yorickpeterse> We use Jenkins to build a tarball, dump that on S3 then have that downloaded to a server. For web apps we still use Capistrano to trigger the actual reloading of an app, but that will soon go
<yorickpeterse> For all our background processing apps we just reboot the server
<yorickpeterse> since a deployment happens automatically upon boot
<phat4life> do you use beanstalk or any sort of auto scale?
jhooker has joined #ruby
psyprus has quit [Changing host]
psyprus has joined #ruby
Zimsky_ has quit [Ping timeout: 272 seconds]
<yorickpeterse> No, we have our own secret sauce
mrmargolis has quit [Read error: Connection reset by peer]
<Zesk> adaedra, I tried to run latest version of logstash and its asked to run "rake bootstrap" so I install ruby, install rake through gem. Then tried to "rake boostrap".
mrmargol_ has joined #ruby
<phat4life> we had our own secret sauce, it was a nightmare to scale
<yorickpeterse> but that literally just involves: 1) tarball a directory 2) upload to S3 3) download to server 3) /etc/init.d/some-app reload
jenrzzz has joined #ruby
dented42 has quit [Read error: Connection reset by peer]
<Zesk> When I do this the first line is downloading jruby
<adaedra> Zesk: then it's the code inside this rake task which fails
<yorickpeterse> I can comfortably run our setup on hundreds/thousands of servers, at least for background apps
<yorickpeterse> (and we've done so in the past)
<bougyman> phat4life: we're all chef here for cfg management and most deployments.
EllisTAA has joined #ruby
<bougyman> though we're moving to buildbot for some deployments now.
<bougyman> just to remove the human.
<yorickpeterse> The setup we'll be moving to most likely is having Jenkins SSH into an instance and trigger the downloading of a package
<phat4life> yorickpeterse: we had just a few servers, over a thousand elbs, let that sink in for a bit
Torrieri has joined #ruby
<Zesk> I have "getaddrinfo: name or service not found"
<yorickpeterse> It's not ideal, but everything else sucks more
<bougyman> our staging stuff all autodeploys based on git changes.
<bougyman> but in prod we still need someone on the keyboard.
dented42 has joined #ruby
<yorickpeterse> phat4life: a thousand ELBs? what the
<yorickpeterse> how slow is that app?
Igorshp has quit [Remote host closed the connection]
<phat4life> elbs were for ssl
<bougyman> only takes about 10 minutes each release, and we release every other monday, here.
kahunaio has joined #ruby
<phat4life> yorickpeterse: 3 elbs per client
xlptmrcrj has joined #ruby
<phat4life> every client got their own ssl domain
<yorickpeterse> oh, you run everything on different domains?
tenderlove has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> ah
<phat4life> ya
bronson has joined #ruby
<yorickpeterse> Yeah we don't do client work so we don't have that problem
mauris has left #ruby ["Leaving"]
<phat4life> so we have to write code to attach all the elbs to just a few instances
<phat4life> which is basically just fighting aws
<bougyman> that code's already written.
mleung has joined #ruby
ndrei has joined #ruby
<bougyman> in chef/fog and in puppet and probably ansible, too.
<ljarvis> im so used to deploying 10s of times a day
rbennacer has joined #ruby
<yorickpeterse> You can attach them to autoscaling groups, which you can set up pretty easily
<bougyman> ljarvis: we deploy dozens of times a day.
<bougyman> but that's all automated.
<ljarvis> ah right
kahunaio has quit [Client Quit]
EllisTAA has quit [Client Quit]
<phat4life> i see, luckily we are ditching that architecture, because elbs are really expensive
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman> we still do one big production push every 2 weeks, though.
<bougyman> one week dev sprint, one week qa sprint, release, repeat.
Igorshp has joined #ruby
<phat4life> force push master, deploy to prod, yolo.
dfockler has joined #ruby
atomical has joined #ruby
<bougyman> we run a modified git-flow. topic branches are cut from (and merged back to) master, master merges into staging, from staging we cut release/ branches and those are deployed to qa. once they're signed off on we merge the release/ branch into production.
jenrzzz has quit [Ping timeout: 252 seconds]
Zimsky_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
<phat4life> we just to feature/branches, which we have a pull requst, then a merge
<phat4life> rebasing were it makes sense
premera has joined #ruby
premera has quit [Excess Flood]
<bougyman> we rebase the topic branch before pushing to master.
volty has joined #ruby
<phat4life> makes sense
aapole has joined #ruby
<bougyman> nowhere else should rebasing be needed, unless someone really screws up.
bronson has quit [Ping timeout: 264 seconds]
premera has joined #ruby
<phat4life> bougyman: do you do full on task estimation for your sprints
<bougyman> phat4life: for our contract dev team we do.
_seanc_ has joined #ruby
<bougyman> because that's what the compensation is based on.
jschoolcraft has joined #ruby
<phat4life> task estimation has never worked for us
<bougyman> for the internal team we don't measure velocity by estimated number and bother with the backlog.
<bougyman> seems like just a big time waster.
<bougyman> there's no one here coasting.
<volty> hi, how can I enclose rb_eval_string (from c++) so that I can get the error (without faultseg) ?
<bougyman> which is kind of what those velocity numbers highlight.
rkazak has quit [Ping timeout: 256 seconds]
diegoviola has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<yorickpeterse> volty: IIRC you can't
strixd has quit [Quit: 500]
<yorickpeterse> because the C API has no such thing as exceptions that you can catch
roshanavand has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
<volty> yorickpeterse: good to know, thx
Lucky__ has joined #ruby
GPrime has quit [Remote host closed the connection]
c_nick has joined #ruby
sharpmachine has joined #ruby
<volty> so, I guess that if I want to mix c++ (qt) and ruby, i have to start the app on the ruby side ?
unshadow has joined #ruby
<c_nick> "ABC12.3 12.4" I need a regex which will parse this and get me only 12.4 and not 12.3
<bougyman> c_nick: boy I hope you know your data.
chrisja has quit [Quit: leaving]
<volty> use /....$/
<jhass> c_nick: this looks like fake data, please provide real samples
<bougyman> /^[a-zA-Z]([\S]*)/
<bougyman> a naive one is /^[a-zA-Z]([\S]*)/
andikr has quit [Remote host closed the connection]
<bougyman> without knowing more of your data.
<chette> is there a better way to write this?: [ary1,ary2].sort{|a,b|a.size <=> b.size}[-1].size
<c_nick> real data :- File12.1 5623.197585674
<bougyman> my naive one still works on that.
<apeiros> chette: min_by
<apeiros> or actually max_by
<volty> "ABC12.3 12.4" =~ /(\d*\.\d+)$/
<Senjai> chette: [one, two].sort_by(&:size).last or what apeiros mentioned
<volty> (or like that)
<apeiros> min/max is O(n), sort is O(nlogn) :)
<chette> max_by, thanks
hotpancakes has joined #ruby
<Senjai> apeiros: I pride myself on being ignorant to that :)
<apeiros> I'm not sure that's something to be proud of
<Senjai> By pride I mean sadden
<jhass> c_nick: .split.last
pepperbreath has quit [Ping timeout: 255 seconds]
<apeiros> Senjai: it's reasonably easy to learn IMO
<c_nick> jhass: no i cannot use split because this data is in a file and that file can be a CSV or a TAB spaced
<c_nick> jhass: its pretty fucked up
<Senjai> apeiros: I never went to uni, so figuring out big O is not super easy
Xiti has quit [Quit: Xiti]
<Senjai> specifically the log bits.
<jhass> .split(/\t|,/).last
xlptmrcrj is now known as lptm
Xiti has joined #ruby
<apeiros> >> "File12.1 5623.197585674"[/\d+\.\d+/]
<ruboto> apeiros # => "12.1" (https://eval.in/381914)
BlueProtoman has quit [Quit: Page closed]
<apeiros> assuming I didn't miss better specification
<jhass> they want the other one ;P
<apeiros> aha!
<apeiros> >> "File12.1 5623.197585674"[/\d+\.\d+$/]
<ruboto> apeiros # => "5623.197585674" (https://eval.in/381915)
<c_nick> apeiros: i had done that
<apeiros> same thing
<apeiros> I mean: same assumption
revath has joined #ruby
<jhass> yeah I tried to get better samples
<c_nick> whats the $ for?
<volty> yap - when you match you should go with all the constraints
<apeiros> c_nick: end of line (note: line, not string)
<volty> $ is end of line
allomov has joined #ruby
<c_nick> wait i will send a real example this is dicy
<apeiros> gtg
rbennacer has quit [Remote host closed the connection]
<chette> ta ta
veinofstars has joined #ruby
stan has quit [Ping timeout: 265 seconds]
arturmartins has quit [Quit: Leaving...]
Igorshp has joined #ruby
caseypatrickdris has joined #ruby
<dfockler> Is there a good reason to use require_relative '../myfile' instead of require './myfile'?
antgel has quit [Ping timeout: 245 seconds]
terlar has quit [Ping timeout: 265 seconds]
mattarse has quit [Quit: Leaving]
<c_nick> jhass: I need to pick up any floats there and delimit them to 2 points
<jhass> dfockler: former is relative to the file, later is relative to your working directory
<volty> «good reason» comes out of particular needs
<chette> round(2)
DoubleMalt has quit [Ping timeout: 252 seconds]
<dfockler> so it's not going to bite me if I use one over the other, or is it specific to my use case?
<jhass> they're not doing the same at all
<volty> go with absolute till you need something relative
<dfockler> well is require './myfile' == require_relative 'myfile' ?
<jhass> require_relative is tailored to require files relative to _each other_, use that if you absolutely can't setup $LOAD_PATH properly
bronson has joined #ruby
<jhass> c_nick: you have a file with literally that content?
Cust0sLim3n has quit [Ping timeout: 245 seconds]
alex88 has quit []
last_staff has joined #ruby
ericmeds has joined #ruby
zach_ has joined #ruby
simplyianm has joined #ruby
mrmargol_ has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
EllisTAA has joined #ruby
<dfockler> jhass: Should I put my $LOAD_PATH modifications where ever I need to require relative files?
<zach_> I'm getting this error "Warning: circular argument reference - url client.rb:37"
rbennacer has joined #ruby
<volty> scan /(\d*\.\d{0,2})\d*/
Cust0sLim3n has joined #ruby
<zach_> since upgrading to ruby 2.2.2, how are we supposed to do named parameters now?
<havenwood> c_nick: c_nick looking for output like?: ["987.12", "56.1", "2345.67", "5678.34", "12.5", "674.12", "4321.56", "12.56"]
edwinvdgraaf has joined #ruby
caseypatrickdris has quit [Remote host closed the connection]
EllisTAA has quit [Client Quit]
<havenwood> zach_: Show client.rb?
<jhass> dfockler: no, at the entry point of your application or if possible leave it up to the (system of the) user
caseypatrickdris has joined #ruby
<jhass> like rubygems does it for you
iwishiwerearobot has joined #ruby
<jhass> so does bundler in many cases
<dfockler> jhass: alright thanks
<c_nick> havenwood: u missed 12.7
<volty> just scan /\d*\.\d{0,2}/
aapole has quit [Ping timeout: 276 seconds]
<volty> >> " File12.7,674.12,return value is 12.7".scan /\d*\.\d{0,2}/
<ruboto> volty # => ["12.7", "674.12", "12.7"] (https://eval.in/381923)
<havenwood> c_nick: File.read('c_nick.txt').scan /(?<=[, ])\d+\.\d{1,2}/
<havenwood> c_nick: #=> ["987.12", "56.1", "2345.67", "5678.34", "12.5", "674.12", "12.7", "4321.56", "12.56"]
<zach_> (simplified, of course)
<c_nick> what is \d{0,2}
<zach_> I thought that was the right way of doing named params, but I'm getting all these warnings since upgrading to ruby 2.2.2
<volty> at most two digits
masone has quit [Quit: masone]
senayar has quit []
<c_nick> havenwood: thats god like :P
<havenwood> and zero digits after a period doesn't make sense
<havenwood> \d{,2}
<c_nick> >> File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{0,2}/
<ruboto> c_nick # => /tmp/execpad-3bb159d8e150/source-3bb159d8e150:2: no .<digit> floating literal anymore; put 0 before ...check link for more (https://eval.in/381933)
<volty> 0 included if 3. (single dot behind) could happen, otherwise {1,2}
tomphp has quit [Ping timeout: 256 seconds]
last_staff has quit [Quit: last_staff]
<havenwood> mm
<volty> you miss the beginning "
hotpancakes has quit [Remote host closed the connection]
last_staff has joined #ruby
<c_nick> >>" File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{0,2}/
<ruboto> c_nick # => ["12.75", "674.12", "12.73"] (https://eval.in/381935)
chinmay_dd has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
dented42 has quit [Read error: Connection reset by peer]
<c_nick> Ah interesting
chinmay_dd has joined #ruby
towski_ has joined #ruby
<c_nick> How come it skipped File12.75
<volty> but go with {1,2} as havenwood typed (can't be zero digits in front and behind at the same time)
<c_nick> scan zero or more occurances of a Digit followed by a period followed by atmost 2 digits
Alayde has joined #ruby
<c_nick> >>" File12.7566732,674.121123454,return value is 12.734356".scan /\d+\.\d{0,2}/
<ruboto> c_nick # => ["12.75", "674.12", "12.73"] (https://eval.in/381937)
ahmetkapikiran has joined #ruby
<c_nick> ah it is catching that 12.75 from File
<c_nick> i dont want that
<volty> if you allow for zero in front, you can't allow zero behind, so or \d+\.\d{0,2}, or \d*\.\d{1,2}
<c_nick> >>" File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{1,2}/
<ruboto> c_nick # => ["12.75", "674.12", "12.73"] (https://eval.in/381940)
ahmetkapikiran has quit [Client Quit]
<havenwood> c_nick: Tried with the Regexp in my example above?
hotpanca_ has joined #ruby
<c_nick> volty: it should only process floats not alphanumeric
<c_nick> havenwood: no sorry wait let me see
shadoi has quit [Quit: Leaving.]
dANO has quit []
<c_nick> >>" File12.7566732,674.121123454,return value is 12.734356".scan /(?<=[, ])\d+\.\d{1,2}/
<ruboto> c_nick # => ["674.12", "12.73"] (https://eval.in/381941)
MatthewsFace has joined #ruby
<c_nick> but how
<havenwood> c_nick: you can just scan all lines at once
pengin has joined #ruby
<havenwood> c_nick: scan the whole file
<c_nick> Ah yes that will give me an array of values
<havenwood> c_nick: A positive lookbehind for a comma or space, so it must be there but doesn't match.
finisherr has joined #ruby
<havenwood> c_nick: Then one or more digits, a comma, and one or two digits.
<havenwood> s/comma/period
dented42 has joined #ruby
<acovrig> I can’t get rails to run, http://pastebin.com/9PdgrNMP is it’s output, any ideas?
<ruboto> acovrig, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8f37401192313f4b9e37
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<acovrig> wow, was reading the wrong statusline when I did that, sorry.
MatthewsFace has quit [Remote host closed the connection]
Alayde_ has joined #ruby
<havenwood> Err, Sprockets and Rails 2.3? I didn't know that was a thing.
<havenwood> ?rails acovrig
<ruboto> acovrig, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
mikecmpbll has quit [Ping timeout: 272 seconds]
tacotaco_ has quit [Ping timeout: 272 seconds]
tacotaco_ has joined #ruby
MatthewsFace has joined #ruby
<acovrig> Ooh, a rails channel, thanks!
<havenwood> acovrig: De nada!
dented42 has quit [Read error: Connection reset by peer]
<c_nick> havenwood: although it worked but i didnt undestand A positive lookbehind for a comma or space, so it must be there but doesn't match.
hectortrope has quit [Quit: WeeChat 0.4.2]
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty> " File12.7,674.12,return value is 12.7".scan /(?<!\w)\d*\.\d{0,2}/
<volty> >> " File12.7,674.12,return value is 12.7".scan /(?<!\w)\d*\.\d{0,2}/
<ruboto> volty # => ["674.12", "12.7"] (https://eval.in/381945)
<havenwood> c_nick: Search this page for "lookbehind": http://ruby-doc.org/core/Regexp.html
Alayde has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
<volty> >> " File12.7,674.12,return value is 3.14, blah4.2424".scan /(?<!\w)\d*\.\d{1,2}/
<ruboto> volty # => ["674.12", "3.14"] (https://eval.in/381949)
<havenwood> c_nick: A "positive lookbehind" means there must be that pattern before what you're really scanning for, but it's not part of the match.
Kricir has quit [Remote host closed the connection]
<havenwood> c_nick: A "negative lookbehind" would mean that patter must *not* be before what you're really scanning for.
krisquigley has joined #ruby
<c_nick> hmm ok
joaomdmoura has joined #ruby
<volty> not a word char, followed by ....
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axisys has joined #ruby
<bnagy> I feel like someone should be sticking up for tokenizing, here
<havenwood> c_nick: It looks like white noise (?<=) and (<!) but that's Regexp for ya! ;P
<bnagy> because that is a HORRIBLE solution
<c_nick> >>" File12.7566732674.121123454,return value is 12.734356".scan /(?<=[, ])\d+\.\d{1,2}/
<ruboto> c_nick # => ["12.73"] (https://eval.in/381952)
<apeiros> I missed it - what result is c_nick looking for in http://paste.ubuntu.com/11720246/ ?
<bnagy> and, worse, it truncates the floats when it should round! ;)
<c_nick> >>" File12.7566732674.121123454,return value is 12.734356".scan /(?<=[, \t])\d+\.\d{1,2}/
<ruboto> c_nick # => ["674.12", "12.73"] (https://eval.in/381953)
<volty> bnagy: that formatting is horrible, in front of the horrible scan :)
<havenwood> apeiros: ["987.12", "56.1", "2345.67", "5678.34", "12.5", "674.12", "12.7", "4321.56", "12.56"]
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<havenwood> bnagy: I nominate you.
<apeiros> havenwood, c_nick: so "File12.7,674.12,return value is 12.7," should return "674.12"?
<c_nick> bnagy: yeah i need to pick up the float and round them
<apeiros> havenwood: bnagy is a rubymon?
<havenwood> apeiros: And "12.7" apparently.
<volty> so, no hope to get an error (if error) when calling rb_eval_string? Are there other solutions (except spawning an external process) ?
<c_nick> lol apeiros
<chette> Regexp causes me headaches
<havenwood> rubymonk?
<apeiros> havenwood, c_nick: huh? so some lines should return multiple results?
iwishiwerearobot has quit [Quit: Be back later ...]
<bnagy> c_nick: how much do you know for sure about the format of these lines?
skade has quit [Quit: Computer has gone to sleep.]
<apeiros> havenwood: no, rubymon. or pockerubyist?
<c_nick> apeiros: it can a CSV or a TAB Delimited NOT both
bgmarx has joined #ruby
<apeiros> c_nick: not really an answer to my question :)
weszlem has joined #ruby
<bnagy> oh, it's a delimited format? o_0
joaomdmoura has quit [Client Quit]
<c_nick> yes apeiros any line given get the floats (xx.xx) and round them
<bnagy> c_nick: csv in the stdlib is actually quite nice
<chette> can you .split("\t")
<bnagy> and will eat csv / tsv
joaomdmoura has joined #ruby
boomls has joined #ruby
<bnagy> is it mixed line by line or each file is csv || tsv ?
bigkevmcd has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
musgravejw has joined #ruby
<boomls> is there some equivalent to railsinstaller for ubuntu/linux?
bigkevmcd has joined #ruby
<apeiros> .scan(/\b\d+\.\d+\b/)
<c_nick> havenwood's solution seems to work fine
<havenwood> c_nick: But there are nicer!
Zesk has left #ruby [#ruby]
ogpastal_ has joined #ruby
<havenwood> c_nick: Try apeiros'
<volty> yap, \b is more elegant
Kricir has joined #ruby
bruno- has joined #ruby
bootstrappm has joined #ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> apeiros: He does want only two digits following the period.
<c_nick> apeiros: scan for any word followed by one or more digits then period then one or more digits then word :O
nonparfumee has joined #ruby
<apeiros> but mine's symmetrical!
<havenwood> hehe
ogpastaling has quit [Read error: Connection reset by peer]
bruno- is now known as Guest22612
<apeiros> havenwood: that's not rounding, though. that's truncation.
<apeiros> c_nick: round or truncate?
<c_nick> round
<havenwood> oh
<havenwood> well then
<apeiros> map + round
<boomls> hello?
<c_nick> its a pricing library :)
revath has quit [Ping timeout: 264 seconds]
<apeiros> boomls: hello¿
<havenwood> c_nick: oh heavens...
<apeiros> c_nick: then don't use floats
shadoi has joined #ruby
<c_nick> decimal?
<apeiros> yes. BigDecimal in ruby.
<apeiros> or Rational
<c_nick> y?
weszlem has quit [Ping timeout: 252 seconds]
<apeiros> y!
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
<boomls> i'm wondering if there is a quick easy way to install the dev environment....equivalent of railsinstaller for ubuntu?
musl has quit [Quit: WeeChat 1.1.1]
snockerton has quit [Quit: Leaving.]
nahtnam has quit [Quit: Connection closed for inactivity]
<apeiros> boomls: "the dev env" - what's "the dev env"?
jakobhan_ has joined #ruby
<c_nick> >>" File12.7566732674.121123454,return value is 12.734356".scan(/\b\d+\.\d+\b/)
musgravejw_ has joined #ruby
<ruboto> c_nick # => ["674.121123454", "12.734356"] (https://eval.in/381955)
musgravejw has quit [Client Quit]
<c_nick> whats a word boundry?
<wasamasa> the space between a word and another one
sohrab has joined #ruby
timonv has joined #ruby
kahunaio has joined #ruby
<havenwood> c_nick: To read about why not, do a web search along the lines of: floating point for currency
<volty> it's not space, it's just boundary
tcarter1719 has joined #ruby
<apeiros> wasamasa: not quite
sohrab1 has joined #ruby
<boomls> apeiros, basically i need to install Xcode, Homebrew, Git, RVM, Ruby & Rails
sohrab has quit [Client Quit]
sohrab1 is now known as sohrab
<wasamasa> figuratively speaking of course
<havenwood> boomls: No XCode or Homebrew on Ubuntu.
<volty> a position betweeen \w and \W
jhooker has quit [Read error: Connection reset by peer]
<havenwood> Well, technically you *could* use brew but...
<volty> (and viseversa )
<apeiros> yeah, one important aspect of \b is that it's 0 characters long
<apeiros> i.e. it's "between characters"
tcarter1719 has quit [Client Quit]
<havenwood> boomls: Err, or are you installing on OS X you mean?
<havenwood> boomls: OS X or Ubuntu?
tcarter1719 has joined #ruby
<apeiros> boomls: probably a long list of arguments to aptitude or apt-get
jhooker has joined #ruby
<boomls> OK havenwood - how do I install something equivalent on Ubuntu. I don't have mac
jakobhan_ has quit [Client Quit]
<apeiros> the specific arguments depending on what you need
aapole has joined #ruby
<boomls> I have been referred to railsinstaller but that's just for windows or mac
hotpanca_ has quit [Remote host closed the connection]
jakobhans has quit [Ping timeout: 276 seconds]
duderonomy has quit [Ping timeout: 256 seconds]
<c_nick> Ah i dont remember now but Objective C was open sourced on Linux it started with N
snockerton has joined #ruby
pragmatism has joined #ruby
<c_nick> NGet no something similar
<havenwood> boomls: \curl -sSL https://get.rvm.io | bash -s -- --rails
<tcarter1719> ^^^^
n008f4g_ has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
<tcarter1719> boomls, http://rvm.io/rvm/basics
DroidBurgundy has joined #ruby
edwinvdgraaf has joined #ruby
krisquigley has joined #ruby
<boomls> thanks for that link havenwood & tcarter1719
<boomls> nice
glcx has quit [Ping timeout: 265 seconds]
deric_skibotn has joined #ruby
banister has joined #ruby
spider-mario has joined #ruby
Soda has quit [Remote host closed the connection]
serivich has quit [Ping timeout: 244 seconds]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Marsupermammal has joined #ruby
qwertme has joined #ruby
valkyrka has quit [Quit: valkyrka]
hahuang65 has quit [Ping timeout: 276 seconds]
snockerton has quit [Quit: Leaving.]
pragmatism has quit [Read error: Connection reset by peer]
axl__ has quit [Quit: axl__]
downwithbender has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
damir_ has joined #ruby
nertzy has quit [Quit: Leaving]
snockerton has joined #ruby
pragmatism has joined #ruby
AlexRussia has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
blackmesa has joined #ruby
swerter has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
sohrab has quit [Remote host closed the connection]
chinmay_dd has quit [Remote host closed the connection]
niemc2 has joined #ruby
Parker0 has quit [Ping timeout: 264 seconds]
hoov has quit [Ping timeout: 276 seconds]
AlexRussia has joined #ruby
_ixti_ has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Client Quit]
ixti has quit [Ping timeout: 246 seconds]
musl has joined #ruby
AlphaAtom has joined #ruby
wallerdev has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
Scrofff has quit [Ping timeout: 264 seconds]
Zai00 has quit [Quit: Zai00]
AlphaAtom has quit [Client Quit]
jackjackdripper has joined #ruby
downwithbender has quit [Quit: Leaving]
serivich has joined #ruby
lkba has joined #ruby
AlphaAtom has joined #ruby
andikr has joined #ruby
crazydiamond has quit [Ping timeout: 240 seconds]
JDiPierro has quit [Remote host closed the connection]
blue_deref has joined #ruby
chussenot has quit [Quit: chussenot]
baweaver has joined #ruby
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nertzy has joined #ruby
lkba_ has quit [Ping timeout: 276 seconds]
shock_one has joined #ruby
_seanc_ has quit [Quit: _seanc_]
nobitanobi has joined #ruby
mrmargol_ has joined #ruby
maxshelley has joined #ruby
rindolf has quit [Quit: http://www.shlomifish.org/ ; Yay! I'm a llama again.]
serivich has quit [Ping timeout: 265 seconds]
EagleDelta has joined #ruby
<boomls> Can someone recommend a good text editor for ubuntu that works well with Ruby?
JDiPierro has joined #ruby
gregf has quit [Quit: WeeChat 1.1.1]
mrmargolis has quit [Ping timeout: 245 seconds]
<pipework> boomls: vim
<chette> gedit
Musashi007 has joined #ruby
<dfockler> boomls: Kate
<umgrosscol> boomls: If you're going to be typing all day, vim.
<mozzarella> vim
<umgrosscol> boomls: Might as well save yourself some pain and learn an alternative keyboard layout while you're at it.
<dfockler> boomls: if you actually want to learn vim, then vim
JakFrist has joined #ruby
quimrsto_ has quit [Remote host closed the connection]
<umgrosscol> boomls: steeper learning curve, but when you get there, it's easier on your hands.
<havenwood> boomls: Atom is a free option if you don't want to learn vi or emacs: https://atom.io/
quimrstorres has joined #ruby
baweaver has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
<pipework> havenwood: vim at least is easier. nocompatible ftw
timonv has quit [Read error: Connection reset by peer]
<boomls> I will check out atom
<tcarter1719> Atom is pretty awesome, it's a fairly new project but it's already got a huge library of packages.
<havenwood> pipework: vim vim vooom!
<eam> boomls: emacs
<pipework> havenwood: I'm watching tmnt from the first show.
<tcarter1719> You should learn vim anyway, comes in handy when you just need to make quick edits or change system configs without having to launch a GUI with sudo.
doodleha_ has joined #ruby
nobitanobi has quit []
<havenwood> pipework: Cowabunga?
<pipework> havenwood: pizza!
<boomls> I've heard of sublime text - is that not worth considering?
bronson has joined #ruby
imperator has left #ruby ["Leaving"]
<pizzaops> You called?
<tcarter1719> It's overpriced and atom is FOSS and very similar.
<umgrosscol> boomls: My colleague uses sublime text. He likes it.
mrmargol_ has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
Cust0sLim3n has quit [Ping timeout: 250 seconds]
<pizzaops> Sublime is excellent but so is atom, it's basically a sublime clone, and it's free, like tcarter1719 said.
podman has joined #ruby
<chette> ActiveSupport::TimeWithDialation needs a VectorSpace to describe background gravitational potential, and also the dt/dv of accelleration/speed of light. are there any good Cosmologic libraries out there?
unshadow has quit [Quit: leaving]
francois_ has quit []
mrmargol_ has joined #ruby
<dudedudeman> VIM is free, too!
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hanmac> shevy the ruby % in rwx did increase! its now 0.1% more at 4.1% ;P
axl__ has joined #ruby
kahunaio has quit [Quit: leaving]
<c_nick> havenwood: if u otta replace 45.67899 after rounding in the same string how can u achieve that
<havenwood> >> "45.67899".to_f.round 2
<ruboto> havenwood # => 45.68 (https://eval.in/381961)
<havenwood> c_nick: ^ do you know how #map works?
_seanc_ has joined #ruby
Kricir has quit [Remote host closed the connection]
<c_nick> yes map will perform an operation on the elements of the array
<boomls> final question - is there a website (or maybe built into text editor?) where I can search for a ruby function/method etc. Something like the codeacademy Ruby glossary http://www.codecademy.com/glossary/ruby but with a search function
NeverDie has joined #ruby
<boomls> ?
<tcarter1719> I use ruby-doc.org
<tcarter1719> or ri
<boomls> ri?
<havenwood> ?pry boomls
<ruboto> boomls, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
postmodern has joined #ruby
volty has quit [Quit: Konversation terminated!]
<c_nick> >> "'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/)
<ruboto> c_nick # => /tmp/execpad-bb8bb1eb53f0/source-bb8bb1eb53f0:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/381964)
pragmatism has joined #ruby
<c_nick> >>""File12.3 45.67 67.88, 78.90,89.223545 67.889".scan(/\b\d+\.\d+\b/)
<ruboto> c_nick # => /tmp/execpad-f1ff19685cf9/source-f1ff19685cf9:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/381966)
<tcarter1719> Oooo, havenwood I've never heard of that.
Asher has quit [Quit: Leaving.]
<c_nick> >> 'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/)
<ruboto> c_nick # => ["45.67", "67.88", "78.90", "89.223545", "67.889"] (https://eval.in/381968)
musl has quit [Quit: WeeChat 1.1.1]
baweaver has joined #ruby
<c_nick> >> 'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/).map{|s| s.round(2)}
<ruboto> c_nick # => undefined method `round' for "45.67":String (NoMethodError) ...check link for more (https://eval.in/381971)
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick> >> "'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/).map{|s| s.to_f.round(2)}
<ruboto> c_nick # => /tmp/execpad-30f7c99b70ef/source-30f7c99b70ef:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/381972)
davedev24_ has joined #ruby
kahunaio has joined #ruby
<c_nick> >> 'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/).map{|s| s.to_f.round(2)}
<ruboto> c_nick # => [45.67, 67.88, 78.9, 89.22, 67.89] (https://eval.in/381973)
<umgrosscol> boomls: Using pry's show-source comes in handy. Unless it's one of those functions that rails generates on the fly for you
davedev2_ has quit [Ping timeout: 245 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick> havenwood: This will return the array rounded. what if u need that same string with modified values like File12.3 45.67 67.88, 78.9,89.22 67.80
Asher has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
nonparfumee has joined #ruby
<baweaver> In on this late, but why is the data formatted like that?
shock_one has quit [Remote host closed the connection]
<hanmac> umgrosscol: hm show-source might also not work for third-party compiled functions ... for sample one of my bindings does have macro generated methods (where show-source doesnt know what to do)
<hanmac> c_nick: you are looking for gsub
gianlucadv has joined #ruby
<baweaver> If possible, always fix the data first before making a hack to parse it
ascarter has joined #ruby
shock_one has joined #ruby
<umgrosscol> hanmac: If they're not generated on the fly, show-source should be able to find them in the gem. Anything that's generated on the fly is inaccessible to show-source.
JDiPierro has quit []
<baweaver> that, and you have a command line + repl for a reason. It's advisable to not use the channels REPL until you have something already figured out.
<havenwood> >> "45.67899 12.432 432.432".gsub(/\b\d+\.\d+\b/) { |s| s.to_f.round(2).to_s }
<ruboto> havenwood # => "45.68 12.43 432.43" (https://eval.in/381979)
<c_nick> hanmac: oh yeah let me try that
peteykun has quit [Ping timeout: 252 seconds]
<apeiros> havenwood: noooo! did you miss that it's about money?!?
jds has joined #ruby
<havenwood> c_nick: like baweaver said, try it out locally with pry/irb and just use ruboto to demonstrate
<apeiros> ah well, .to_s
<apeiros> nothing can go wrong :)
<hanmac> umgrosscol: hm like i said it might not work with compiled stuff ... and i can say that MY methods dont have a source body which can be parsed ... like one of my macros macro_attr(attr) does make _get_attr and _set_attr functions ... when rdoc, yard or pry are looking for _get_attr in the source they will not find them
jwilson has quit [Read error: Connection reset by peer]
<havenwood> apeiros: I gave the floating point currency caveat but was rebuffed. ;)
jwilson_ has joined #ruby
<c_nick> apeiros: http://stackoverflow.com/questions/3730019/why-not-use-double-or-float-to-represent-currency will use decimals but trying out simple values to see if it works out
<hanmac> havenwood: you dont need to call to_s in gsub, it will do it for you
<havenwood> hanmac: ah right
<havenwood> that's nice
zach_ has quit [Quit: Leaving]
jenrzzz has joined #ruby
Cust0sLim3n has joined #ruby
shock_one has quit [Ping timeout: 256 seconds]
axl_ has quit [Ping timeout: 245 seconds]
axl__ is now known as axl_
<c_nick> cant I ping ruboto and play?
EllisTAA has joined #ruby
allomov has quit [Remote host closed the connection]
<c_nick> hehe it works
<c_nick> :)
Kricir has joined #ruby
<NeverDie> So how does Ruby get funded?
musgravejw has joined #ruby
<chette> Egyptian style slave labor. workers payed with bread and beer
<dfockler> AT&T hires a few open source ruby devs
<dfockler> and other companies
musgravejw_ has quit [Quit: Page closed]
DroidBur_ has joined #ruby
kinduff has joined #ruby
kinduff has joined #ruby
DroidBurgundy has quit [Ping timeout: 244 seconds]
emilkarl has joined #ruby
<dfockler> and now there's Ruby Together! https://rubytogether.org/
<weaksauce> vim
<weaksauce> takes about 10 min to learn enough vim to match other text editors and then you can sprinkle in the extra features.
Torrieri has quit [Quit: Be back later ...]
shadoi has quit [Quit: Leaving.]
<havenwood> NeverDie: Heroku pays several members of the Ruby core team.http://rubycentral.org/
<havenwood> Oops, meant those to be separate lines.
<NeverDie> vikaton: Ping.
micmus has joined #ruby
<vikaton> NeverDie: hi
<vikaton> oh
otherj has joined #ruby
RegulationD has joined #ruby
musgravejw has left #ruby ["Leaving"]
uri_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dopie has quit [Quit: Leaving]
gregf has joined #ruby
<crankharder> is it possible to have 'bundle install' *not* append "BUNDLED_WITH\n 1.10.3" to the local Gemfile.lock when it doesn't exist yet?
ScriptGeek has joined #ruby
<umgrosscol> crankharder: What results are you looking for? or to what end do you need that functionality?
<crankharder> since it adds a diff to the local repo it makes subsequent pulls break
<vikaton> have you guys seen the presentation of Crystal Erik Ober did? https://www.youtube.com/watch?v=iyqURh5LSF4
<c_nick> Thanks all
baweaver has quit [Remote host closed the connection]
<crankharder> but also, 'bundle install' I wouldn't think should change anything
<diegoviola> "So for example, let's go back to one of the things where I think the designers of subversion were complete morons. Strong opinions, that's me, right? There are a few of them in the room today, I suspect. You are stupid." -- Linus Torvalds
Narzew has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
swerter has joined #ruby
<eam> truth hurts
A205B064 has joined #ruby
<dfockler> truth hurts worse when a successful person calls you stupid
revath has joined #ruby
<jhass> bring some time
Spami has quit [Quit: This computer has gone to sleep]
<diegoviola> eam: the svn thing he said?
bricker has joined #ruby
mdw has joined #ruby
msgodf has quit [Ping timeout: 244 seconds]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> diegoviola: yeah
<chette> sticks and stones may brake my bones but Regex will never hurt me
kahunaio has quit [Quit: leaving]
j4cknewt has quit [Remote host closed the connection]
shock_one has joined #ruby
leafybasil has quit [Remote host closed the connection]
crazydiamond has joined #ruby
lkba_ has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
baweaver has joined #ruby
emilkarl has quit [Quit: emilkarl]
mikecmpbll has joined #ruby
DroidBur_ is now known as DroidBurgundy
musl has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
musl has quit [Client Quit]
Yiota has joined #ruby
musl has joined #ruby
musl has quit [Client Quit]
Igorshp has quit [Remote host closed the connection]
simplyianm has quit [Remote host closed the connection]
hahuang65 has joined #ruby
weszlem has joined #ruby
segfalt has quit [Ping timeout: 272 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
segfalt has joined #ruby
sarkyniin has joined #ruby
j4cknewt has joined #ruby
musl has joined #ruby
baweaver has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
platzhirsch1 has left #ruby [#ruby]
quimrsto_ has joined #ruby
aaeron has joined #ruby
lptm has quit [Ping timeout: 250 seconds]
mfranzwa_ has quit [Quit: mfranzwa_]
micmus has quit [Ping timeout: 264 seconds]
simplyianm has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
arturmartins has joined #ruby
zenguy_pc has joined #ruby
quimrstorres has quit [Ping timeout: 256 seconds]
weszlem has quit [Ping timeout: 250 seconds]
zz_Outlastsheep is now known as Outlastsheep
malconis has quit [Remote host closed the connection]
jaycee has joined #ruby
kahunaio has joined #ruby
mfranzwa_ has joined #ruby
Spami has joined #ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshL has quit []
NeverDie has joined #ruby
Marsupermammal has joined #ruby
JakFrist has joined #ruby
sohrab has joined #ruby
JoshL has joined #ruby
bluish has joined #ruby
edwinvdgraaf has joined #ruby
<chette> how would I go about adding a timezone, such as BCT?
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
blackmesa has quit [Ping timeout: 244 seconds]
<jhass> "adding"?
kahunaio has quit [Quit: leaving]
tedstriker has quit [Quit: Anti-Fraping status set.]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Remote host closed the connection]
hotpancakes has joined #ruby
baweaver has joined #ruby
<chette> yes. Say I figure out the conversions in a function. Would I simply define a function for class Time?
simplyianm has quit [Read error: Connection reset by peer]
malconis has joined #ruby
pragmatism has joined #ruby
<chette> or, suppose I wanted to switch my computer from utc to bct
simplyianm has joined #ruby
<eam> chette: I suspect the ruby bindings leverage whatever libc defines
<eam> you'd probably add the new tzdata at that level
Authenticator has joined #ruby
<chette> is it not possible to change env bindings
swerter has quit [Read error: Connection reset by peer]
Rollabunna has quit [Remote host closed the connection]
<eam> what do you mean env bindings?
<chette> dynamiclly
rdark has quit [Quit: leaving]
keen________ has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
micmus has joined #ruby
frem has joined #ruby
<chette> the class Binding
pengin has quit [Remote host closed the connection]
joaomdmoura has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<jhass> BCT doesn't seem to be a registered timezone identifier
symm- has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
keen_______ has quit [Ping timeout: 256 seconds]
kahunaio has joined #ruby
DroidBurgundy has quit [Read error: Connection reset by peer]
<kahunaio> .
<chette> BCT seconds tick slower then seconds on earth. So the actual time since the last epoc would change
<eam> chette: you'll need to mess with tzdata
<eam> ruby does not implement that logic itself, it depends on the system
<eam> is BCT similar to TAI?
mdw has quit [Remote host closed the connection]
doodleha_ has quit [Remote host closed the connection]
<chette> not actually
simplyia_ has joined #ruby
DroidBurgundy has joined #ruby
unshadow has joined #ruby
<chette> BCT is suppose to be neutral to gravitational dilation
ndrei has quit [Ping timeout: 264 seconds]
<eam> ok, so some other frame of reference
<eam> happen to have a link to its definition?
simplyianm has quit [Ping timeout: 276 seconds]
c_nick has left #ruby [#ruby]
ndrei has joined #ruby
<Authenticator> chette: Are you referring to the ENV variables in the shell, or local variables for a method as in 'binding.pry'?
ylla has quit [Ping timeout: 250 seconds]
iinzg has joined #ruby
iinzg has quit [Read error: Connection reset by peer]
<eam> chette: you're going to have trouble working with BCT on any unix system
kahunaio has quit [Quit: leaving]
mister_s_ has quit [Ping timeout: 250 seconds]
<eam> if you need any kind of precision at all you'll likely need to implement your own interfaces (and hardware)
caseypatrickdris has quit [Remote host closed the connection]
<eam> POSIX time is defined as UTC. Mapping UTC to TAI is pretty straightforward as it's just a matter of tracking leap seconds, but converting to BCT with precision would be difficult
<chette> I can handle the conversion
<chette> it's just the emplementation
simplyia_ has quit [Ping timeout: 264 seconds]
<eam> all unix timezones are based on UTC
<eam> ruby just hooks into the posix time functions
simplyianm has joined #ruby
DLSteve has joined #ruby
kahunaio has joined #ruby
tskogberg has quit [Ping timeout: 265 seconds]
pengin has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sohrab has quit []
dorei has quit [Remote host closed the connection]
dumdedum has quit [Quit: foo]
ta has joined #ruby
baweaver has quit [Remote host closed the connection]
acke has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
kahunaio has quit [Client Quit]
arturhoo has joined #ruby
hakunin has joined #ruby
mrmargolis has joined #ruby
dagda1 has joined #ruby
edwinvdgraaf has joined #ruby
kahunaio has joined #ruby
pdoherty has quit [Quit: Leaving]
evanjs has quit [Remote host closed the connection]
bgmarx has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
tskogberg has joined #ruby
evanjs has joined #ruby
bgmarx has joined #ruby
<dudedudeman> how hard would it be to set up a web app to take drag and dropped file, and then spit that file through an already built and working bash script?
Kruppe has joined #ruby
<dudedudeman> go to like, draggedfile.com, drag your file in to a specified area, and then just sit back and wait for the script to work it's magic
<eam> very easy
<jhass> 5.7 points hard
edwinvdgraaf has joined #ruby
<postmodern> is there info on the Module.new pattern somewhere?
<Senjai> dudedudeman: Google it :P
allomov has joined #ruby
<Senjai> dudedudeman: It's kind of a common thing
<Senjai> postmodern: It's not a pattern, I dont understand what you're trying to do
quimrsto_ has quit [Remote host closed the connection]
<Authenticator> dudedudeman: The "drag and drop" is more HTML/etc than webapp. Pretty easy though.
<bootstrappm> dudedudeman: I'd say just be careful on how long that bash script will run
<dudedudeman> Senjai: i figured it would be. i'm clearly googling the wrong things, as per usual lol
<postmodern> Senjai, sigh, it is, where you define a class MyModule < Module, and do include MyModule.new(state_goes_here)
<bootstrappm> you might need a worker
<dudedudeman> let's say i have workers available
simplyianm has quit [Remote host closed the connection]
art-solopov has joined #ruby
<dudedudeman> the script itself is already build and deployed on a machine, but you currently have to navigate to a specific folder location on our network that's kind of hidden and obscure
acke has quit [Remote host closed the connection]
Carnage\ has joined #ruby
bigkevmcd has quit [Ping timeout: 252 seconds]
<dudedudeman> the script starts working once it sees a file in a specific folder. it checks that folder every 60 seconds
skysploit has joined #ruby
skysploit has joined #ruby
<Senjai> postmodern: What fancy sort of metaprogramming are you trying to do there?
acke has joined #ruby
hakunin has quit [Remote host closed the connection]
<bootstrappm> other than that yeah, just google the different components. two i can think of: drag and drop javascript, execute external command ruby
<Authenticator> dudedudeman: Look into Sinatra for a simple Ruby webapp. It's very easy, but there are optimizations when you start dealing with large files, etc, so as to not just buffer the files in memory.
dredozubov has left #ruby ["Leaving..."]
<dudedudeman> sinatra is my jam!
hakunin has joined #ruby
<dudedudeman> bootstrappm: that last query, that gives me some good reading. thanks
<Senjai> I tend to avoid anonymous classes though, I would suggest against it unless there is an actual reason you have to build classes dynamically.
GnuYawk has joined #ruby
<Senjai> s/classes/modules
Kruppe has quit [Ping timeout: 255 seconds]
BanzaiJoe has joined #ruby
Scroff has joined #ruby
<postmodern> Senjai, i know of the method, was looking for info on the pattern
bruno- has joined #ruby
<Senjai> Structs?
platzhirsch has joined #ruby
acke_ has joined #ruby
<Senjai> I have no idea man.
AlphaAtom has joined #ruby
<gambl0re> are rails gems just added features you can use in your app?
acke__ has joined #ruby
<Authenticator> postmodern: I've never heard of that *by name*. What are you trying to do? What is the pattern supposed to offer?
snockerton has joined #ruby
Guest22612 has quit [Ping timeout: 276 seconds]
<Senjai> gambl0re: Rails consists of a number of gems. They're all pulled in togerther with an Engine
<Senjai> postmodern: what Authenticator said
edwinvdgraaf has quit [Remote host closed the connection]
Wintooshock has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
psy_ has quit [Quit: Leaving]
troulouliou_dev has quit [Remote host closed the connection]
krisquigley has joined #ruby
DroidBur_ has joined #ruby
acke has quit [Ping timeout: 276 seconds]
bruno-_ has joined #ruby
acke_ has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
mfranzwa_ has quit [Quit: mfranzwa_]
<BanzaiJoe> Senjai rubytapas has a free video on Struct syntax, Structs are also part of the library and there are Rubydocs on them ( http://ruby-doc.org/core-2.2.2/Struct.html )
DroidBurgundy has quit [Ping timeout: 264 seconds]
tskogberg has quit [Ping timeout: 240 seconds]
krisquigley has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
<Senjai> what
Voker57 has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Senjai> BanzaiJoe: ik, was that meant to be send to postmodern ?
<BanzaiJoe> or sorry, postmodern
chette has quit [Ping timeout: 252 seconds]
<Senjai> okay, was confused :P
<BanzaiJoe> postmodern that was for you :)
EllisTAA has joined #ruby
DroidBur_ is now known as droidburgundy
tskogberg has joined #ruby
acke has joined #ruby
droidburgundy has quit []
swgillespie has joined #ruby
<dstarh> can anyone tell me why StringIO is not working here where File.open is working just fine? https://gist.github.com/dstarh/aea1a470c29f92ba8511
<Senjai> dstarh: puts string_io.read
<Senjai> also you should write to the string_io
<Senjai> as if it was an actual file
acke__ has quit [Ping timeout: 276 seconds]
<dstarh> Senjai i've used string_io.read, i've used string_io.write as well as puts and didn't make a difference
poguez_ has joined #ruby
caseypatrickdris has joined #ruby
acke has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
<Senjai> Then its probably that generated_sql isn't a correct value
<dstarh> string_io.string will give you the underlying string
<Senjai> dstarh: Yeah, dont use that
<Authenticator> Senjai: What would the difference be? (Write as if it were an actual file...)
<Senjai> dstarh: Otherwise there is no point in using StringIO
acke has joined #ruby
<ljarvis> using that is fine..
<Senjai> Authenticator: I had thought puts wasn't a member of IO, but it is
droidburgundy has joined #ruby
droidburgundy has quit [Client Quit]
droidburgundy has joined #ruby
baweaver has quit [Remote host closed the connection]
mesamoo has joined #ruby
<dstarh> Senjai I don't think thats the issue, as i'm running the method twice once with the file.open block and once with the string_io and with the file wrapper it actually writes something to the file
Scroff has quit [Remote host closed the connection]
<ljarvis> dstarh: what if you set it to $stdout ?
<Senjai> ljarvis: NO
<Senjai> dstarh: Pretend you didn't hear that
<Senjai> :P
<ljarvis> dstarh: ignore Senjai. Tell me if that works?
<dstarh> lol
<Authenticator> dstarh: This works for me. def test(str, fh) ; fh.puts str ; fh ; end ; fh = t('kittens', StringIO.new) ; fh.rewind ; fh.read
<Authenticator> The difference is the rewind.
<Senjai> Authenticator: that makes sense
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pragmati_ has joined #ruby
<ljarvis> ugh.. that makes no difference to their code. the #string method returns the underlying string buffer without doing read/writes
<Senjai> But I dont ever remember having to rewind a StringIO to call read
<ljarvis> so what they want *should* work
<Senjai> ljarvis: Its probably an issue in the code thats not being shown
<dstarh> ljarvis works just fine with $stdout
<ljarvis> that's what I'm thinking
pragmatism has quit [Read error: Connection reset by peer]
<Senjai> LOL
<Senjai> dstarh: You are doing something very wrong :P
<ljarvis> right, then there's something else wrong
kinduff has quit [Quit: leaving]
<ljarvis> but we don't have enough code to tell
dopie has joined #ruby
<Senjai> dstarh: Gist all the code please
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
pragmati_ has quit [Client Quit]
EllisTAA has quit [Quit: EllisTAA]
Outlastsheep is now known as zz_Outlastsheep
AlphaAtom has joined #ruby
<dstarh> ok editing my gist
dorei has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
Authenticator has quit [Quit: leaving]
JoshL has quit []
AlphaAtom has joined #ruby
leafybasil has joined #ruby
mrmargol_ has joined #ruby
AlphaAtom has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
jenrzzz has quit [Ping timeout: 276 seconds]
<dstarh> i don't think you need the process_table method
haxrbyte_ has quit [Ping timeout: 255 seconds]
droidburgundy has quit [Remote host closed the connection]
<dstarh> it's also being called from rake but I don't think that would make a difference either
mfranzwa has joined #ruby
mrmargolis has quit [Ping timeout: 252 seconds]
griffindy has quit [Quit: Textual IRC Client: www.textualapp.com]
quimrstorres has joined #ruby
lkba_ has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 276 seconds]
<ljarvis> you realise none of this code calls any of those procs right? so with this, all of those buffers will be empty so it's completely useless in terms of us helping
<ljarvis> presumably they're call in process_table. I think you need to create a small reproduction of this
n008f4g_ has joined #ruby
<dstarh> ljarvis ok i'll work on a small reproducable example
caseypatrickdris has quit [Read error: Connection reset by peer]
caseypatrickdris has joined #ruby
ludico8 has joined #ruby
<ludico8> Hi everyone!
<jhass> hi
scripore has joined #ruby
symm- has joined #ruby
<ludico8> I have an issue when Iam using rufus-scheduler and passenger
<ludico8> seems that everything works well in dev
<ljarvis> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<ludico8> but once it is on prod, my task is not running
<ludico8> :/
finisherr has quit [Quit: finisherr]
baweaver has joined #ruby
<ludico8> seems like the scheduled task is not running on prod
otherj has quit [Ping timeout: 264 seconds]
<ljarvis> ludico8: do you have logs you can check?
<ludico8> yes
quimrstorres has quit [Remote host closed the connection]
<ludico8> but there is anything on the log
<ljarvis> "seems like" doesn't seem confident
<ludico8> the log keeps empty in prod
<ljarvis> is the process started (i'm not sure how rufus-scheduler works)
aninaki has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<ludico8> well, Im not pretty sure if is running, indeed, I think is not running
<ludico8> seems like ruffus & passanger arent compatibles
bgmarx has quit [Remote host closed the connection]
mfranzwa has quit [Quit: mfranzwa]
AlphaAtom has joined #ruby
<ljarvis> i would argue that they don't have anything to do with each other. How is the scheduler started? from a rake task? an initializer? other tooling?
Musashi007 has quit [Read error: No route to host]
otherj has joined #ruby
<ljarvis> I assume you've gone through these links? https://github.com/jmettraux/rufus-scheduler#faq
bgmarx has joined #ruby
<ljarvis> it does look like passenger has issues with it
finisherr has joined #ruby
<ljarvis> so I'll eat my words. This all seems really fragile to me
tskogberg has quit [Ping timeout: 264 seconds]
coderhs has joined #ruby
<ludico8> :ljarvins, yes, like an initializer
rhllor has quit [Quit: rhllor]
hazelux has joined #ruby
tskogberg has joined #ruby
weszlem has joined #ruby
<ludico8> yes, I made my task as is on that link
<ludico8> in the development enviroment is working well
<ludico8> but in prod seems that something don't allow to work in the same way
EllisTAA has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
lkba has joined #ruby
simplyianm has joined #ruby
pluxev has joined #ruby
NeverDie has joined #ruby
quimrstorres has joined #ruby
lkba has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<ludico8> :ljarvis let me check it
kadoppe has quit [Ping timeout: 252 seconds]
jackjackdripper has joined #ruby
kirun has joined #ruby
rdar has quit [Quit: Leaving]
kadoppe has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
adac has joined #ruby
dcarmich has joined #ruby
Lingo__ has joined #ruby
dorei has quit []
jenrzzz has quit [Ping timeout: 264 seconds]
<adac> For a has this works just fine for outputting th value of a key: hash['key'] however when I do key[object.first] (which also is a string of an existing key) it doesn't work and I get a nil value. Any ideas?
<ljarvis> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<Senjai> dstarh: At lunch man sorry
dorei has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
Pwnna has joined #ruby
leafybasil has joined #ruby
<Pwnna> when using minitest, is there a way to assert_raises exceptions that's thrown from a thread?
<Pwnna> the problem for me is there are 2 threads, and both of them are going to throw exceptions
<Pwnna> i need to catch both of them using assert_raises
<jhass> no way to not run the threads in the test?
yfeldblum has joined #ruby
<jhass> but to call the code they run directly?
<Pwnna> testing those threads is the key point.
<ljarvis> ah testing threads
<ljarvis> luck good that with
<Pwnna> (actually 3 threads including the main thread, and all three will throw exceptions)
konieczkow has joined #ruby
<jhass> mmh, does .abort_on_exception reraise in the main thread? I forgot
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Pwnna> i think so
<Pwnna> but i have like 3 exceptions raising
evanjs has quit [Remote host closed the connection]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Pwnna> and no, can't call threads separately because they're internal to this class
weszlem has quit [Ping timeout: 252 seconds]
nonparfumee has joined #ruby
<jhass> are you using exceptions to quit the thread or why is that?
<Pwnna> pretty much
<Pwnna> catestrophic failure has been detected
msgodf has joined #ruby
volty has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
<Pwnna> all threads are in error condition, so any errors will be thrown
mengu__ has joined #ruby
<apeiros> Thread#value
<jhass> I'd reconsider that still (catch them inside the thread and let it exit normally if you really really can't break a loop or whatever)
nym has joined #ruby
bgmarx has quit [Ping timeout: 272 seconds]
<jhass> but yeah #value or simply check .alive?
<apeiros> if you have access to the thread object, that is
<apeiros> alternatively (yucki) stub Kernel#raise if it's raised from ruby code
<apeiros> if it's from C, that won't work
<ludico8> :ljarvis but Im working with nginx not apache
mengu__ is now known as mengu
mengu has quit [Changing host]
mengu has joined #ruby
pluxev has left #ruby [#ruby]
iamninja has quit [Ping timeout: 245 seconds]
EllisTAA has quit [Quit: EllisTAA]
msgodf has quit [Max SendQ exceeded]
<volty> does rbenv save somewhere the source files of installed ruby's ?
<ludico8> I think that solution is talking assuming you are working with apache
DoubleMalt has joined #ruby
jnormandeau has joined #ruby
<jhass> ludico8: simple, just replace Apache with Nginx in the URL: https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#spawning_methods_explained
t0rrieri has joined #ruby
<havenwood> volty: If I recall correctly RVM and ruby-install keep the src dir around by default but rbenv's ruby-build nukes it.
Torrieri has quit [Read error: Connection reset by peer]
<volty> thx havenwood, going to download it manually
<dfockler> what's the best way to test a function that doesn't update the classes state, and doesn't return anything?
<jhass> dfockler: what does it do?
solars has quit [Ping timeout: 246 seconds]
<havenwood> volty: Yeah, looks like ruby-build uses a subdir of TMPDIR by default for the src but has a RUBY_BUILD_BUILD_PATH env option.
<ludico8> :jhass thanks!
<dfockler> it makes a HTTP request to another server
<volty> you (usually) test against what is expected to change :)
<jhass> dfockler: webmock
Kricir has quit [Remote host closed the connection]
<dfockler> thanks, I'll check it out
nobitanobi has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<ericmeds> What would you folks recommend to measure code quality/test coverage?
<apoplexy> what is the difference between a program and a script?
<ljarvis> first google result
<apoplexy> ljarvis: how did you do that
<ljarvis> i googled it..
<apoplexy> in my country i cannot access google
<ljarvis> what country?
<volty> apoplexing is just trolling
<apoplexy> NK
<jhass> it's the first duckduckgo result too
simplyianm has quit [Read error: Connection reset by peer]
<volty> the last time he was Russian, ahah
<jhass> also the first bing result
zenguy_pc has quit [Ping timeout: 252 seconds]
<baweaver> volty: Could always just trace the IP
<jhass> and the first startpage result
<baweaver> assuming they're not using web gateway
evanjs has joined #ruby
apipkin has joined #ruby
<apoplexy> volty: when was i russian
TheHodge has quit [Quit: Connection closed for inactivity]
<dudedudeman> oh man. someone said bing
<ljarvis> i'll build an ip tracer i have vb6
simplyianm has joined #ruby
<jhass> apoplexy: how's your ruby though?
<dfockler> ljarvis: make sure it has a GUI though
rubie has joined #ruby
<ljarvis> dfockler: it's the only way i'll be able to sell it
<apipkin> I have a gem in my Gemfile, but after running `bundle install` it still tells me that the gem isn't avialble
<jhass> apipkin: bundle exec !!
<dfockler> hahaha
RobertBirnie has quit [Ping timeout: 276 seconds]
<ljarvis> <3 !! and !$
Zai00 has joined #ruby
<ljarvis> sudo !! typed more than anything ever
<jhass> mh, I press Alt+. instead of !$
<apoplexy> jhass: workin' on html/css/js first
sandstrom has joined #ruby
<baweaver> <3 whois
<apoplexy> then we'll talk ruby
<volty> it's my nose. weird questions, in perfect perplex style. having good time. etc etc. but never mind,just ask your questions.
<ljarvis> jhass: noice
<jhass> apoplexy: great, see you in #ruby-offtopic then, this channel is for ruby questions
dfockler has quit [Remote host closed the connection]
<baweaver> CPE2cd05a1a8339-CMbc1401279700.cpe.net.cable.rogers.com , but I digress
t0rrieri has quit [Ping timeout: 264 seconds]
hazelux has quit [Remote host closed the connection]
<dudedudeman> what a string
<jhass> a sequence of characters
* baweaver high fives jhass
<jhass> :P
<eam> not always characters
zenguy_pc has joined #ruby
<dudedudeman> a sequence of stuff?
RobertBirnie has joined #ruby
<ljarvis> not always a sequence
<dudedudeman> stuff
<ljarvis> precisely
* dudedudeman is learning stuff
hazelux has joined #ruby
<eam> hm in which cases would a string not be a sequence? The empty string?
<volty> when it is supposed to be something else than sequence ?
baweaver has quit [Remote host closed the connection]
<dudedudeman> oh god what have i done
bturker has joined #ruby
<ljarvis> ^
<eam> most systems define the empty sequence as a sequence
<ljarvis> hmm, most you say?
<eam> I'm not aware of any that don't?
<ljarvis> so you can't say for certain?
<eam> well, wikipedia says most so I can refer to the reference ;-)
Musashi007 has joined #ruby
x1337807x has joined #ruby
JoshL has joined #ruby
<volty> the sequence means in order, «empty sequence» is a convenience of the language expression. an empty set is still a set because it's there to hold elements of a set
<ljarvis> :D
Xiti has quit [Quit: Xiti]
<ljarvis> i'm glad i have exercised minds
<dudedudeman> huh.
pandaant has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<ljarvis> volty: but if a set exists when nobody is around to see it, does it really exist?
<dudedudeman> so, a set of numbers could be empty, or it could be 43251. but a sequence of numbers would be 12345?
<Senjai> ljarvis: The garbage collector, right before it deletes it
<Senjai> Or ObjectSpace
<Senjai> zing
<volty> no. only things that «interact» exist
simplyianm has quit [Remote host closed the connection]
<Senjai> volty: wat
<jhass> dudedudeman: https://oeis.org/
<Senjai> volty: def thing; Set.new; end
<Senjai> Pretty sure at some point in time, a Set is created
apipkin has left #ruby [#ruby]
starfox_sf has quit [Ping timeout: 252 seconds]
iamninja has joined #ruby
pengin has quit [Remote host closed the connection]
<dudedudeman> jhass: i'll be honest, i have no clue what i'm looking at here
<volty> I do not mind. That set doesn't exist, for me, till I use it, or till I see it. Till it «happens».
weszlem has joined #ruby
skade has joined #ruby
<jhass> dudedudeman: sequences
simplyianm has joined #ruby
<volty> do not confuse the definition with the existence
edwinvdgraaf has joined #ruby
<Senjai> volty: Sorry what, there is no intepretation, there is what is and what isn't.
<ljarvis> dudedudeman: ^5
<jhass> 2,3,4,82000 is a great sequence
Scroff has joined #ruby
<volty> just a def, if you don't call your method that set isn't going to «exist»
mrmargol_ has quit []
<Senjai> volty: Of course, duh. Calling it will make it exist, even though you don't use it
Scroff has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
flughafen_ has joined #ruby
flughafe1 has quit [Ping timeout: 264 seconds]
konieczkow has quit [Ping timeout: 276 seconds]
<eam> The simulacrum is never that which conceals the truth - it is the truth which conceals that there is none.
allomov has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 256 seconds]
<volty> the existence concerns the interaction too. it could not exist, even if «created», if you do not interact with it. in Occam's razor exists here too. Though it's called «abstraction».
mrmargolis has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyianm has quit [Read error: Connection reset by peer]
<phat4life> if you were interviewing someone for a ruby position, what questions would you ask?
<eam> phat4life: I'd sit down with them on a computer and solve a small problem
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai> phat4life: Are you an academic? Yes? Sorry, this position's been filled.
<Senjai> xD
<dudedudeman> phat4life: i know the fizzbuzz question is a ringer
simplyianm has joined #ruby
AlphaAtom has joined #ruby
<havenwood> phat4life: What kind of Ruby position? What will they be doing?
<Senjai> phat4life: You have to work through code. Alternatively, describe hard problems you've solved at your firm recently, ask them how they would model out a solution
Scroff has joined #ruby
<apeiros> phat4life: most useful question to us has been: bring code (any lang) you're proud of and show it to us in 5-15min.
<phat4life> i asked this canidate to read code, it was a dp implementation of the fib sequence, they couldn't tell me what the code did :|
<havenwood> phat4life: ^ I like apeiros'
<eam> reverse a binary tree
<Senjai> apeiros: I disagree, 99% of my code is NDA.
<apeiros> asking questions like why they're proud of it, what they'd do differently. what they learned.
<eam> Senjai: so sign an NDA
msnyon has quit [Read error: Connection reset by peer]
msnyon_ has joined #ruby
<phat4life> havenwood: rails, sinatra
<Senjai> eam: What, I cannot sign an NDA on behalf of a previous employer or client
<Senjai> I cannot act as their agent
<eam> Senjai: the applicant can
baweaver has joined #ruby
<eam> that's what most folks do
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Senjai> Sorry, I'm talking about referencing code done for other clients, when negotiating with a new one
<eam> ah
<Senjai> Which is why I disagree with apeiros, I cant show new clients/employers my best code
<dorei> i'd only ask one lame question, how many unsingned numbers can be represented with 11 bits :)
Yiota has joined #ruby
<eam> most people have something OSS to share, no?
<Senjai> dorei: How is that useful?
<havenwood> Senjai: But do you have any code you're proud of at all that you could show?
<Senjai> dorei: That's like, a textbook question
<Senjai> havenwood: Nope. I always think the code I wrote last month is shit this month.
<eam> trivia generally doesn't select for attributes that make a good developer
<dudedudeman> Senjai: that has to suck. :( we're behind pretty strict NDA's, too, and i'm wondering how much of teh small amount of code i've written could be taken elsewhere and shown
<volty> 2^11
<dorei> Senjai: well, if one cant give a textbook answer to this, one could code a small script to calculate it
<dudedudeman> Senjai: what industry if you don't mind me asking?
sdothum has quit [Read error: Connection reset by peer]
<havenwood> Senjai: I guess you're improving quickly. :)
<Senjai> dudedudeman: Get written permission, and scrub the code of any specific references
Lingo__ has quit [Quit: (null)]
<Senjai> havenwood: Always. Hopefully
<ljarvis> or just do some OSS on the side
<Senjai> dudedudeman: Ecommerce
<phat4life> https://gist.github.com/ajbeach2/f47115fc090b46a335a0 is there a more ruby idiomatic way of doing this?
<dudedudeman> Senjai: ah, word. i'm in animation/film. it's stupid. lol
<phat4life> (that is my dp solution to fib)
<dudedudeman> but i'l remember that tip, thanks
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargolis has quit [Remote host closed the connection]
NeverDie has joined #ruby
<phat4life> ah nevermind
<Senjai> havenwood: I recently took CanCanCan over, so hopefully that will give me motivation to write better open source stuff.
<phat4life> igore that gist its wrong
<havenwood> phat4life: Here's my recent fib solution (just for fun): https://gist.github.com/havenwood/e1b65e004ce716f428b0
mrmargolis has joined #ruby
sdothum has joined #ruby
<Senjai> havenwood: elixer is cheating :P
<Senjai> everything is better in elixer
AlphaAtom has quit [Client Quit]
<havenwood> Senjai: But I implemented Elixir's unfold in Ruby, so uncheating!
<Senjai> havenwood: That's a pretty unique solution
<Senjai> havenwood: We had someone do Fib in Sass at our office
msnyon_ has quit [Ping timeout: 264 seconds]
<havenwood> :O
<ljarvis> needs some .lazy
<phat4life> havenwood: is that a dp solutoin though
Xiti has joined #ruby
<Senjai> havenwood: I typically just do the modulo approach.
<dudedudeman> did they get hired doing that?
<Senjai> I've never used Enumerator.unfold
<phat4life> i can only think algorithimically in c++
<crankharder> jhass: thanks for the link to that issue. have you found a working workflow? we started working on getting our entire org to update bundler, but devs*apps*gemsets == large number of bundler installs.
AlphaAtom has joined #ruby
<havenwood> crankharder: Rails apps?
<weaksauce> >> ("1"*11).to_i(2)
<ruboto> weaksauce # => 2047 (https://eval.in/382033)
TEAMVARYSTYRION is now known as bosnia
haxrbyte has joined #ruby
<crankharder> havenwood: not all of them, i think this applies to anything using bundler though?
Ilyes512 has joined #ruby
<havenwood> crankharder: If not Rails, just use a recent RubyGems and `gem i -g` (or the long form `gem install --file`) to resolve deps and create a Gemfile.lock.
decoponyo has quit [Quit: Leaving...]
hardlin3r has joined #ruby
<crankharder> dont think we're talking about the same time
<jhass> crankharder: until the commit by indirect referencing the issue at the end is released, no. And even then it'll mean updating everybody to bundler 1.10.4 or later
<crankharder> *thing
<havenwood> ah
bturker has quit [Remote host closed the connection]
<crankharder> jhass: yea, a bunch of meh :/
<phat4life> havenwood: i don't think that is a dynamic programming solution is it?
solars has joined #ruby
<volty> could be nice something like, x bits, at most/least n successive 0 o 1's. so you can judge how much analytical and how much iterative skills the candidates posses
last_staff has quit [Quit: last_staff]
<crankharder> jhass: seems kinda weird that the bundler directive was implemented differently than the ruby directive
mengu has quit []
<crankharder> which is optional and doesn't magically update itself
<crankharder> I feel like the bundler directive could've gone the same route
haxrbyte has quit [Ping timeout: 264 seconds]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crankharder> ...got a problem with version x.y.z of bundler? add a diretive and force an update on your app/team... otherwise? leave it alone.
J4R0D has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<jhass> crankharder: eh, I think you can read my opinion out of that thread pretty clearly, I feel little demand to discuss it further tbh ;)
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crankharder> well, you didn't quit ruby over it ;)
simplyianm has joined #ruby
<jhass> nah, that would've been unreasonable
haxrbyte has joined #ruby
wallerdev has joined #ruby
<jhass> I might have forked bundler over it though
ScriptGeek has quit [Quit: Leaving.]
wildroman2 has joined #ruby
<havenwood> I'm glad RubyGems has working dependency resolution. I've been happy using it.
vickleton has joined #ruby
<jhass> I doubt it'll ever integrate all of bundlers usecases though
haxrbyte_ has joined #ruby
<havenwood> phat4life: I don't think I understand the question regarding dynamic programming.
<havenwood> phat4life: Someone else could probably answer that better.
<havenwood> phat4life: Here's getting an nth Fib with a Matrix in Ruby: https://gist.github.com/havenwood/02cf291b809327d96a3f
Igorshp has joined #ruby
dagda1 has joined #ruby
<phat4life> havenwood: memoization, meaning you store reursive calls that have already been made
<havenwood> Works nicely for negative fibonacci sequence too.
Rollabunna has quit [Ping timeout: 265 seconds]
Igorshp has quit [Remote host closed the connection]
<havenwood> phat4life: Ah, was wondering if you just mean memoizing. It's not a recursive implementation.
<phat4life> you can still do memoziation iteratively
Matthews_ has joined #ruby
<eam> how do I dump the flags ruby was built with?
workmad3 has joined #ruby
<havenwood> phat4life: Do you understand what the unfold code does?
<phat4life> nah not at all lol
<super> Does Ruby have an equivalent of Scheme's call-with-current-continuation?
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<phat4life> that is a recursive memoized fib
haxrbyte has quit [Ping timeout: 256 seconds]
<jhass> super: if you want good answers don't assume knowledge out of topic of the channel ;)
yalue has quit [Quit: return 0;]
Xiti has quit [Ping timeout: 276 seconds]
dagda1 has quit [Client Quit]
<jhass> that is refer to generic concepts or explain the mechanism, don't refer to other implementations
AlphaAtom has joined #ruby
Ilyes512 has quit [Quit: Textual IRC Client: www.textualapp.com]
iinzg has joined #ruby
MatthewsFace has quit [Ping timeout: 252 seconds]
AlphaAtom has quit [Max SendQ exceeded]
treehug88 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhooker has quit [Ping timeout: 256 seconds]
iinzg has quit [Read error: Connection reset by peer]
bronson has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
axl_ has quit [Quit: axl_]
jhooker has joined #ruby
mrmargol_ has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
Xiti has joined #ruby
acke has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
thelastinuit has quit [Remote host closed the connection]
glcx has joined #ruby
ixti has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
EllisTAA has joined #ruby
AlphaAtom has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
simplyianm has quit [Read error: Connection reset by peer]
AlphaAtom has quit [Max SendQ exceeded]
<Senjai> super: Just ask what you want, rather than making us go learn another language :P
simplyianm has joined #ruby
AlphaAtom has joined #ruby
mrmargolis has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
_ixti_ has quit [Ping timeout: 276 seconds]
AlphaAtom has quit [Max SendQ exceeded]
<Senjai> hoelzro: I feel more terrible for knowing that now :P
AlphaAtom has joined #ruby
michaeldeol has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
skade has quit [Quit: Computer has gone to sleep.]
qwertme has joined #ruby
AlphaAtom has joined #ruby
_ht has quit [Quit: Konversation terminated!]
adac has quit [Ping timeout: 246 seconds]
dopie has quit [Quit: This computer has gone to sleep]
mike___1234 has quit [Ping timeout: 265 seconds]
simplyianm has quit [Read error: Connection reset by peer]
pragmatism has joined #ruby
_seanc_ has joined #ruby
djbkd has joined #ruby
simplyianm has joined #ruby
pragmatism has quit [Read error: Connection reset by peer]
bgmarx has joined #ruby
<havenwood> super: Ruby basically decided it wasn't a good idea and relegated it to the stdlib. I'd expect it to be deprecated in Ruby 3.0. http://www.atdot.net/~ko1/pub/ContinuationFest-ruby.pdf
pragmatism has joined #ruby
langlands has joined #ruby
<yorickpeterse> ljarvis: so how's your Rust coming along?
<havenwood> super: There are Fibers if that suffices for what you're doing.
tcarter1719 has quit [Quit: Textual IRC Client: www.textualapp.com]
pragmatism has quit [Max SendQ exceeded]
<super> hoelzro, excellent, thanks..
krisquigley has joined #ruby
pragmatism has joined #ruby
<gambl0re> guys, im having trouble...
<gambl0re> im getting an error msg: NameError in AuthorSessionsController#create
<_blizzy_> if I named a fiber 'life', would it be a life fiber
<gambl0re> highlighting this line in my code " if login(params[:email], params[:password])"
<yorickpeterse> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<gambl0re> where is the name error?
<jhass> ?crosspost gambl0re
<ruboto> gambl0re, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<gambl0re> im using sorcery gem for authorization/authentication
<_blizzy_> so, how does he post it to rails
<_blizzy_> if he's posted it heres
<jhass> _blizzy_: two minutes earlier
<ljarvis> yorickpeterse: it's not
<_blizzy_> jhass, oh
<havenwood> _blizzy_: Time travel.
<yorickpeterse> ljarvis: heh
<gambl0re> help guys, thanks
<ljarvis> yorickpeterse: yours?
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> ljarvis: pretty smooth actually
<yorickpeterse> I hope to be writing a GC in it in the next few weeks
<_blizzy_> hmm, I want to build something in ruby
<yorickpeterse> :D
<_blizzy_> I could work on my rails project, but I want something smaller atm
<yorickpeterse> I actually have multi-threading in my VM now
<Senjai> gambl0re: ?code
<Senjai> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
Musashi007 has quit [Quit: Musashi007]
<diegoviola> hrm
<gambl0re> what code do you need
edwinvdgraaf has quit [Remote host closed the connection]
bgmarx has quit [Ping timeout: 265 seconds]
<_blizzy_> probably all of it
<jhass> Senjai: other way around for the moment, ?foo target
<gambl0re> which file...
<_blizzy_> well, the entire file
<_blizzy_> the file the error is coming from
<ljarvis> yorickpeterse: noice!
<gambl0re> i have like 20 different files...
<gambl0re> oh ok
<super> Does Ruby MRI not do tail-recursion optimization?
<gambl0re> class AuthorSessionsController < ApplicationController
<gambl0re> def new
<gambl0re> end
<gambl0re> def create
<gambl0re> if login(params[:email], params[:password])
<gambl0re> redirect_back_or_to(articles_path, notice: 'Logged in successfully.')
<gambl0re> else
<gambl0re> flash.now.alert = "Login failed."
<gambl0re> render action: :new
<gambl0re> end
<gambl0re> end
<_blizzy_> .
<gambl0re> def destroy
<_blizzy_> um
<yorickpeterse> don't paste in iRC
<_blizzy_> pastie that
<yorickpeterse> * IRC
<_blizzy_> or gist
<havenwood> gambl0re: Stop pasting Rails code here!
<jhass> !kick gambl0re Please use https://gist.github.com
gambl0re was kicked from #ruby by ruboto [Please use https://gist.github.com]
<_blizzy_> gist.github.com pastie.org
<yorickpeterse> WEOW WEOW WEOW COPS ARE HERE
<_blizzy_> lol
<jhass> still don't have the alias in my muscle memory :/
<yorickpeterse> "stop resisting arrest"
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_blizzy_> "am I being detained"
acke has joined #ruby
<yorickpeterse> don't gist me bro
<jhass> super: not really, it's available as a compile time flag essentially but off by default
<yorickpeterse> ljarvis: you just have to bite through
<yorickpeterse> ljarvis: my first few weeks were hell too
<super> havenwood, I'm not trying to backtrack.. I'd just like to pick up where I left off if I get interrupted for whatever reason..
<ljarvis> yorickpeterse: yeah.. not gonna happen :D at least not whilst I have lots of other stuff going on (doing something similar in C)
krisquigley has quit [Ping timeout: 276 seconds]
<_blizzy_> on another note, that guy should try devise
simplyianm has quit [Read error: Connection reset by peer]
<yorickpeterse> prrfft
<_blizzy_> it's not that hard to set up
AndChat|412596 has joined #ruby
dfockler has joined #ruby
<_blizzy_> I hope he was hashing his passwords
simplyianm has joined #ruby
<havenwood> super: Here's an patch for enabling TCO in Ruby, just trace off and tco on: https://gist.github.com/havenwood/d958268d0ab896373af6
bgmarx has joined #ruby
mcclurmc has quit [Ping timeout: 256 seconds]
<yorickpeterse> havenwood: you can do that from the runtime
<yorickpeterse> no need to recompile
<havenwood> super: You can do it even if you haven't enabled it at compile time in a vm se
<havenwood> yorickpeterse: I don't type fast enough apparently.
alphaatom|pc has quit [Ping timeout: 276 seconds]
<havenwood> super: It's a bit awkward in RubyVM::InstructionSequence block but it's doable or there's a gem that makes it nicer.
postmodern has quit [Quit: Leaving]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
dagda1 has joined #ruby
<yorickpeterse> ergh, I always forget how to set that
<yorickpeterse> Ah yes
acke has quit [Ping timeout: 256 seconds]
thang has quit [Ping timeout: 256 seconds]
Rapier- has quit [Quit: (null)]
<yorickpeterse> >> RubyVM::InstructionSequence.compile_option = {:tailcall_optimization => true}
<ruboto> yorickpeterse # => {:tailcall_optimization=>true} (https://eval.in/382043)
<yorickpeterse> But that's super super MRI only
wallerdev has quit [Quit: wallerdev]
<havenwood> yorickpeterse: You also have to disable trace.
<yorickpeterse> Ah hm
evanjs has quit [Remote host closed the connection]
dagda1 has quit [Client Quit]
otherj has quit [Quit: .]
bluish has quit [Quit: bluish]
acke has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
acovrig has quit [Ping timeout: 252 seconds]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
shock_one has quit [Remote host closed the connection]
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
mike___1234 has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
stevednd has joined #ruby
chette has joined #ruby
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
quimrstorres has quit [Remote host closed the connection]
DynamicMetaFlow has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
Marsupermammal has joined #ruby
hazelux has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
joaomdmoura has joined #ruby
quimrstorres has joined #ruby
umgrosscol has quit [Remote host closed the connection]
freerobby has joined #ruby
gix has quit [Ping timeout: 272 seconds]
leafybasil has quit []
baweaver has quit [Remote host closed the connection]
DynamicMetaFlow has quit [Remote host closed the connection]
pragmatism has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
simplyianm has joined #ruby
yaw has joined #ruby
mdz_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
yaw has quit [Max SendQ exceeded]
zacts|skool has joined #ruby
Musashi007 has joined #ruby
pragmatism has quit [Client Quit]
rombou has joined #ruby
quimrstorres has quit [Ping timeout: 265 seconds]
jcaho has quit [Read error: Connection reset by peer]
gix has joined #ruby
eneon has joined #ruby
eneon has left #ruby [#ruby]
aaeron has quit [Quit: Leaving.]
jcaho has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
simplyianm has quit [Read error: Connection reset by peer]
pragmatism has joined #ruby
yfeldblum has joined #ruby
postmodern has joined #ruby
simplyianm has joined #ruby
aaeron has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
ScriptGeek has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
jackjackdripper has joined #ruby
shock_one has joined #ruby
Alayde_ has quit [Ping timeout: 240 seconds]
gaboesquivel has joined #ruby
michaeldeol has quit [Ping timeout: 276 seconds]
dagda1 has joined #ruby
rodfersou has quit [Quit: leaving]
skade has joined #ruby
Pwnna has quit [Quit: mrrow~]
Alayde_ has joined #ruby
allomov has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
allomov has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
nisstyre has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
jjasonclark has joined #ruby
EllisTAA has quit [Client Quit]
stephenh has quit [Ping timeout: 252 seconds]
mister_solo has joined #ruby
bronson has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
damir_ has quit [Ping timeout: 255 seconds]
shock_one has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.2]
pengin has joined #ruby
stephenh has joined #ruby
scripore has joined #ruby
ldnunes has quit [Quit: Leaving]
hedgecore has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
EagleDelta has quit [Read error: Connection reset by peer]
<chette> call me curious - does anyone here use ruby/sdl?
<Senjai> ?use
<ruboto> Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
startupality has joined #ruby
<chette> utilize?
jhooker has quit [Ping timeout: 264 seconds]
dopie has joined #ruby
crowell has quit [Quit: No Ping reply in 180 seconds.]
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<Senjai> jhass: <3
<jhass> worth a shot :P
nisstyre has joined #ruby
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
freerobby has quit [Quit: Leaving.]
Musashi007 has quit [Quit: Musashi007]
<Senjai> chette: At the very least I would assume that at least the author of the library uses it
<Senjai> chette: But due to the computationally intensive nature of graphics development, ruby is generally a poor choice.
<jhass> crystal has a nice sfml binding already
revath has quit [Ping timeout: 245 seconds]
<Senjai> I like crystal, but I can't recommend it to anyone just yet.
<jhass> well, it's a good time if you ever wanted to contribute to a developing ecosystem
<chette> I know it's a 'poor choice', but I find that, if i'm not concerned with framerate and sweet AAA graphiXXX than, it's not hard to get the hang of
cvtsx has quit [Read error: Connection reset by peer]
ceigel has joined #ruby
niemc2 has quit [Quit: Leaving]
TheHodge has joined #ruby
axsuul has joined #ruby
<Senjai> chette: Use pygame.
rbennacer has quit [Ping timeout: 252 seconds]
<chette> plus, ruby will just get beter with age, right? I mean, I'm sure computers in the near futre are going to be so blazzing fast anyway
<Senjai> chette: Ruby is fairly old already. Rails is new ish, but ruby has been around a while
<Senjai> It's just not developed with that use case in mind
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> ruby is well 20 years old, soo...
<Senjai> chette: If you want to use a high level language for graphics, again, I'd suggest python
<chette> I use opengl for math . . . not really for game making.or high level graphics. just feedback
<Senjai> Huh?
<jhass> is python really still better in raw execution speed, taking possibly better bindings out of the factor?
<Senjai> pygospa: I thought you didn't care about speed?
pragmatism has joined #ruby
<Senjai> derp
<Senjai> misping
<Senjai> sorry
<Senjai> jhass: It's mostly because pygame is excellent as a library
<Senjai> jhass: I have no idea about speed
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chette> I don't care about speed, what I like is interoperability
<jhass> I had a feeling that the difference isn't big anymore, but never checked
<Senjai> jhass: ditto. I use either one for different problems
mcclurmc has joined #ruby
<jhass> http://benchmarksgame.alioth.debian.org/u32/ruby.php hrm, looks like python still wins on average
<jhass> though it's funny that ruby wins on memory apparently
pdoherty has joined #ruby
Soda has joined #ruby
FernandoBasso has joined #ruby
platzhirsch has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Remote host closed the connection]
dagda1 has joined #ruby
hotpancakes has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 256 seconds]
<dfockler> ugh python
centrx has joined #ruby
wildroman2 has quit [Remote host closed the connection]
mcclurmc has joined #ruby
<Senjai> jhass: I honestly would just use a native language :P
doublemalt_ has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
simplyianm has quit [Remote host closed the connection]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> sure, I'll use crystal :P
<chette> crystal, huh?
<Senjai> chette: Full disclosure, jhass is a core contributor to crystal ;)
hotpanca_ has joined #ruby
<jhass> eh, let's say core enthusiast
<jhass> I don't have commit rights^^
<Senjai> evangelist perhaps
surrounder has left #ruby ["WeeChat 1.2"]
<jhass> I guess
<zenspider> I like that title
<zenspider> core enthusiast
<Senjai> I thought you did have commit rights
<jhass> nope
<Senjai> I think the majority of rubyists will end up in elixer land though :/
<jhass> I didn't even land compiler code yet
NeverDie has joined #ruby
<chette> how is it different from ruby?
<Senjai> Except the hardcore OOP'ers
<centrx> it's not, it's a scam!
<Senjai> ^
bronson has joined #ruby
<Senjai> xD
<chette> syntax looks the same
<Senjai> chette: I suggest reading the About page
<Senjai> or README.md
<jhass> chette: crystal? it's a compiled language with global type interference (and a go like concurrency model, well, moving towards that)
DoubleMalt has quit [Ping timeout: 245 seconds]
<Senjai> psssstttt chette, elixir ftw, pssst
<chette> lol
jjasonclark has quit [Quit: jjasonclark]
baweaver has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
tacotaco_ has quit [Quit: leaving]
tacotaco_ has joined #ruby
<chette> I made this program which was just a fancy IRB interpretor with ruby/sdl
arturhoo has quit [Quit: arturhoo]
<zenspider> chette: I could use that
<zenspider> trying to get a workshop going that's based on ruby + sdl
<zenspider> having a repl on the inside would help
<chette> I'm not exactly inside. oh, I'm pretty far out there
<zenspider> is it available?
ndrei has joined #ruby
<Senjai> zenspider: A workshop?
<zenspider> yes, a workshop
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts|skool has quit []
<chette> but I've use ruby+sdl a tun. mostly ruby opengl lately, although floating point arithmetic is so slow it's better to shovel such code to c
maxshelley has quit [Quit: Textual IRC Client: www.textualapp.com]
<Senjai> chette: Or just use C
<chette> I still use ruby sdl for raster manipulation
<Senjai> :P
hinbody has quit [Quit: leaving]
kirun has quit [Quit: Client exiting]
<Senjai> chette: I would just have a binary responsible for that, and shell out to it from ruby
<Senjai> If you need the two to work together
acke has quit [Remote host closed the connection]
<Senjai> zenspider: An... online workshop?
<Senjai> would take
<chette> yeah, Senjai, that's a good theory I've been working on
<Senjai> for curiosity more than anything
<Senjai> chette: Alternatively you could go the other way around, create a binary which runs ruby :P
<Senjai> chette: But at that point, its better to use lua
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<chette> but I don't know lua as well as I know ruby. plus I'm LAZY
doertedev has quit [Ping timeout: 265 seconds]
aaeron has quit [Quit: Leaving.]
Igorshp has joined #ruby
<zenspider> chette: so... no?
<chette> zenspider: do you find much interest in ruby+sdl?
Igorshp has quit [Remote host closed the connection]
<jhass> in all seriousness though, if all you do is some basic arithmetic crystal should be good enough already, provide you with a familiar syntax and give you close to C speed
Igorshp has joined #ruby
<chette> oh the code . . . I haven't posted it anywhere
pragmatism has joined #ruby
Igorshp has quit [Remote host closed the connection]
AndroUser has joined #ruby
<chette> I could make it available but I should make it work with the latest versions first :)
<zenspider> so, no. k
<Senjai> chette: Just post it who cares about its condition
<chette> thanks jhass
<Senjai> 90% of open source code is crappy :P
pragmatism has quit [Client Quit]
<jhass> and 98% of all closed source? :P
AndroUser has quit [Client Quit]
<Senjai> Crappier
<Senjai> :p
Cache_Money has joined #ruby
aaeron has joined #ruby
<chette> send me your email, zenspider, and I'll tell you when I've posted the code
x1337807x has joined #ruby
<jhass> /msg MemoServ help
<zenspider> chette: my username at gmail
JoshL has quit []
<zenspider> thanks
<chette> sure think
<zenspider> ok. I need to go beat stuff up and get beat up. later.
startupality has quit [Quit: startupality]
ogpastal_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
ogpastaling has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vickleton has quit [Quit: Ex-Chat]
mary5030 has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby
startupality has joined #ruby
msgodf has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
zenguy_pc has quit [Ping timeout: 272 seconds]
mrmargol_ has quit [Remote host closed the connection]
msgodf has quit [Max SendQ exceeded]
michaeldeol has quit [Client Quit]
ogpastaling has quit [Ping timeout: 256 seconds]
nonparfumee has joined #ruby
yfeldblum has quit [Remote host closed the connection]
duderonomy has joined #ruby
failshell has quit []
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
zenguy_pc has joined #ruby
Notte has joined #ruby
Scroff has quit [Remote host closed the connection]
drocsid has joined #ruby
jaycee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drocsid has quit [Changing host]
drocsid has joined #ruby
pragmatism has joined #ruby
patrickanth0ny has quit [Read error: Connection reset by peer]
finisherr has quit [Quit: finisherr]
michaeldeol has joined #ruby
patrickanth0ny has joined #ruby
saadq has joined #ruby
finisherr has joined #ruby
bosnia is now known as MAKOHYPE
Carnage\ has quit []
yfeldblum has joined #ruby
Wintooshock has quit [Ping timeout: 240 seconds]
Narzew has quit [Remote host closed the connection]
jaycee has joined #ruby
Wintooshock has joined #ruby
gluten_hell_ has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
art-solopov has quit [Quit: Konversation terminated!]
solars has quit [Ping timeout: 264 seconds]
zz_barkerd427 is now known as barkerd427
leafybas1l has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
simplyianm has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<leafybas1l> clear
nofxx has joined #ruby
havenwood has joined #ruby
blackmesa has joined #ruby
drewo has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
pullphinger has quit []
michaeldeol has quit [Ping timeout: 276 seconds]
kuribas has joined #ruby
musgravejw has joined #ruby
unshadow_ has joined #ruby
kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
simplyianm has quit [Read error: Connection reset by peer]
unshadow has quit [Ping timeout: 272 seconds]
simplyianm has joined #ruby
Rollabunna has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
doublemalt_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
Guest6 has joined #ruby
Guest6 is now known as Casty
platzhirsch has joined #ruby
phutchins has joined #ruby
startupality has quit [Quit: startupality]
ScriptGeek has left #ruby [#ruby]
_blizzy_ has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
_blizzy_ has joined #ruby
musgravejw has quit [Ping timeout: 245 seconds]
<shevy> rescue
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<al2o3-cr> rescue what?
<drocsid> I have a program that I execute and it starts up and puts some output to STDOUT or STDERR, and after that accepts input from STDIN. I'd like to wait for some particular output from STDOUT, and then try to direct input to STDIN, and continue to capture output to STDOUT. I have a few methods which return the STDOUT, but I'm having issues getting past this point. Can someone help me reach my goal?
dgutierrez1287 has joined #ruby
Rollabunna has quit [Ping timeout: 245 seconds]
jjasonclark has joined #ruby
<shevy> al2o3-cr rescue World; end
* platzhirsch pokes shevy
<al2o3-cr> shevy: come join #ruby-offtopic :)
mcclurmc has quit [Remote host closed the connection]
konieczkow has joined #ruby
<shevy> no
<shevy> I can have it here
<shevy> :)
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
<jhass> drocsid: used $stdout and $stdin, reset them to StringIO and simply read and write to them
<shevy> I have a bad time schedule, I just woke up...
<al2o3-cr> shevy: :)
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RandyT has joined #ruby
<jhass> shevy: well, we do actually want to move the majority of the OT over there ;)
pdoherty has quit [Ping timeout: 250 seconds]
AlphaAtom has joined #ruby
<shevy> ruby
shock_one has quit [Ping timeout: 276 seconds]
asteros has joined #ruby
krisquigley has joined #ruby
weszlem has quit [Ping timeout: 256 seconds]
<platzhirsch> You just woke up
<drocsid> jhass: do you hace a sample? Here's the code that I'm currently messing with:http://pastie.org/10242048
aapole has quit [Ping timeout: 246 seconds]
<drocsid> The example that uses popen3 was written by somebody else. Not sure what's going on with (f == sout ? $stdout : $stderr).print f.read_nonblock(1024)
GPrime has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<drocsid> I also was messing around with the popen4 example
RandyT has quit [Ping timeout: 255 seconds]
<shevy> platzhirsch yeah; sorta feels weird... it's dark outside but I am already hacking away at ruby code \o/
simplyianm has quit [Read error: Connection reset by peer]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<platzhirsch> that's the way
<platzhirsch> what are you working on
mdz_ has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
<jhass> drocsid: yeah that seems redundant, checking it for stdout/err vs stdin makes sense to decide to write or read
unshadow_ has quit [Read error: Connection reset by peer]
<shevy> right now I work on the ruby code that governs installing/compiling stuff from source again
simplyianm has joined #ruby
unshadow has joined #ruby
<jhass> drocsid: so basically you'd add stdin to the IO.select call (the wait for write ready param) and just write your stuff to it when ready
matp_ has quit [Quit: Bye!]
ec is now known as Elliott
<al2o3-cr> shevy: managed Qt?
RandyT has joined #ruby
<shevy> I was replacing in legacy code, things such as: if foo[-1,1] == '/' with foo.end_with? '/' ... somehow I find .start_with? and .end_with? more readable these days, dunno if that is common
<jhass> only checking the first item in ready seems flawed too
veinofstars has quit [Quit: veinofstars]
<shevy> al2o3-cr nope :( I got stuck with that smokeqt thing
Elliott is now known as Guest91772
<al2o3-cr> shevy: :(
<volty> shevy: what platform you are on?
Guest91772 is now known as ELLIOTTCABLE
aryaching has joined #ruby
<shevy> al2o3-cr it is strange because I compiled all of kde from source here and it works
workmad3 has quit [Ping timeout: 252 seconds]
<shevy> volty moment I put it on a pastie soon
<al2o3-cr> shevy: strange indeed
<drocsid> I mean here (f == sout ? $stdout : $stderr).print f.read_nonblock(1024) I don't really understand if I can check f.read_nonblock(1024) and write stdin, because I'm not familiar with these methods
rombou has quit [Quit: Leaving.]
matp has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
<drocsid> jhass: do you suggest I continue with the open3 example, or the open4 one?
<volty> meanwhile: I can't load gems from inside c++ (using rb_eval etc etc) , the $LOAD_PATH is the same, any ideas ?
<shevy> volty when it comes to C++ and ruby, hanmac is the man; he maintains the ruby bindings to wxwidgets
<jhass> drocsid: they're not equivalent at all
<al2o3-cr> shevy: have you installed all necessary libs https://github.com/ryanmelt/qtbindings/
<drocsid> I'm going to head off without internet pretty soon, just trying to get advice on how go about this and try to work on it while offline
<jhass> drocsid: open3 gives you more control
bgmarx_ has joined #ruby
<jhass> I think I gave my advice
<centrx> There's an open4 now!?
<jhass> nah, just a silly name
<jhass> it's Kernel.spawn
<jhass> drocsid: get the docs for open3 and IO.select
spyderman4g63 has quit [Ping timeout: 256 seconds]
<volty> shevy: I got it working. have to require some stuff to check cross access. what could be manual initialization of gem handling? require 'gems' does not work
<jhass> especially the open3 docs have quite a few samples
<drocsid> jhass: thanks, I will do that, and consider your advice
Notte has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
<shevy> centrx the number indicates improvement
quimrstorres has quit [Ping timeout: 265 seconds]
<shevy> open5 will be the new generation
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chette has quit [Ping timeout: 256 seconds]
bgmarx has quit [Ping timeout: 256 seconds]
mister_s_ has joined #ruby
<jhass> I wonder what open42 will bring
<shevy> it will open all the things
sinkensabe has joined #ruby
<jhass> oh, poor pandora
<al2o3-cr> >> require 'socket'; Socket.select(nil, nil, nil, 2); puts "alive"
<ruboto> al2o3-cr # => (https://eval.in/382073)
<al2o3-cr> :(
<al2o3-cr> then open6 then ...
mister_solo has quit [Ping timeout: 245 seconds]
<al2o3-cr> shevy: celeron?
<jhass> /System/Executables/ld: cannot find -lsmokeqtopengl
<jhass> sounds like you miss a library there
x1337807x has joined #ruby
<volty> no, shevy, it has to do with ruby, I have to rebuild it using shared-libraries
<al2o3-cr> its try to link what you havn't got
<volty> s/I have/I had/
RandyT has quit [Ping timeout: 264 seconds]
<volty> /configure --prefix=$HOME/.rbenv/versions/1.9.2-p290 --enable-shared
shinnya has quit [Ping timeout: 255 seconds]
Musashi007 has joined #ruby
alem0lars__ has quit [Read error: Connection reset by peer]
RandyT has joined #ruby
<volty> but forget if your is already shared, I'm bit tired
<shevy> ah
<shevy> no you may be right
<shevy> I only seem to have libruby-static.a
mister_s_ has quit [Ping timeout: 272 seconds]
<volty> yap
<shevy> weird
<al2o3-cr> why is that weird?
<volty> he states there that he had to add that option (for rbenv, e.g.)
kahunaio has quit [Quit: Lost terminal]
<shevy> al2o3-cr that I don't have a .so :)
<shevy> recompiling ruby right now
devdazed has quit [Ping timeout: 252 seconds]
<al2o3-cr> seems sane
northfurr has joined #ruby
<al2o3-cr> shevy: you on debian?
drocsid has quit [Ping timeout: 245 seconds]
<shevy> hmm linuxmint
mister_solo has joined #ruby
<al2o3-cr> same
<baweaver> Depends if it's the Ubuntu variant or not
jpfuentes2 has quit [Ping timeout: 264 seconds]
<al2o3-cr> i mean same as debian as much
nym has quit [Quit: Connection closed for inactivity]
<volty> how the new gem autoload system works ? I remember in the old versions I had to require gems (or similar) for them to start handling all of it. Any idea why gem feature doesn' t get loaded here (from c++) ?
finisherr has quit [Quit: finisherr]
<al2o3-cr> simple is better
<volty> working is better :)
<shevy> hehe
<al2o3-cr> that too :)
<jhass> in 1.8 require "rubygems" was explicit, since ruby 1.9 that (exactly that, require "rubygems") is done on bootup by Ruby unless you specify --disable-gems
<jhass> that's all
saadq has quit [Remote host closed the connection]
<Senjai> If I want to return more than just the enumerable in a #detect
<Senjai> what would be the best way to do that
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<Senjai> e.g. [1,2,3].detect {|n| n % 2 == 0; andlikeastringorsomething }
<Senjai> crappy example
<volty> jhass: a lot of thanks, I just required rubygems and it works. Later I am going to see why/what isn't initialized.
<Senjai> but beyond reaching into variables outside the scope
<shevy> ok now I have lots of ruby*.so files
deric_skibotn has joined #ruby
<volty> Now I get «The exception was: '#<NameError: uninitialized constant Encoding::UTF_7>», but going forward. If you have hints, again, pls hint at me :)
<baweaver> Senjai: What's the usecase?
<baweaver> could just use a map compact
<jhass> Senjai: "best" .lazy.map { ... }.find(&:itself)
hedgecore has quit [Remote host closed the connection]
casadei has quit [Remote host closed the connection]
endash has quit [Quit: endash]
drewo has quit [Ping timeout: 246 seconds]
hedgecore has joined #ruby
datanoise has quit [Ping timeout: 245 seconds]
simplyianm has quit [Read error: Connection reset by peer]
<al2o3-cr> 18>> class Foo; attr_accessor; define_method(:initialize) {|@a, @b|}; end; end; f = Foo.new("beep", "deep"); f.a
<ruboto> al2o3-cr # => /tmp/execpad-3f0939c6d40e/source-3f0939c6d40e:3: syntax error, unexpected kRESCUE, expecting $end ...check link for more (https://eval.in/382076)
<al2o3-cr> i'm sure that used to work
<Senjai> jhass: hmm..
finisherr has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<Senjai> baweaver: I need to find a "visible variant", with detect, but I also want to determine which visibility state it should have
<Senjai> without running the logic again
simplyianm has joined #ruby
<Senjai> Seeing as though you would know the visibility state in order to determine if a variant is visible
gluten_hell_ has joined #ruby
<baweaver> >> (1..10).map { |v| v * 2 if v % 2 == 0 }.compact
<ruboto> baweaver # => [4, 8, 12, 16, 20] (https://eval.in/382077)
micmus has quit [Quit: Leaving]
<al2o3-cr> 18>> class Foo; attr_accessor :a, :b; define_method(:initialize) {|@a, @b|}; end; end; f = Foo.new("beep", "deep"); f.a
<ruboto> al2o3-cr # => /tmp/execpad-1b183f770e50/source-1b183f770e50:3: syntax error, unexpected kRESCUE, expecting $end ...check link for more (https://eval.in/382078)
<al2o3-cr> damn it :(
axsuul has quit [Ping timeout: 276 seconds]
<al2o3-cr> ruboto: drunk
<jhass> I think you are rather ;P
<al2o3-cr> :P
Ox0dea has joined #ruby
<phat4life> how can i make this more idiomatic: https://gist.github.com/ajbeach2/2260198a832f891ad306
alphaatom|pc has joined #ruby
<Ox0dea> baweaver: sort.chunk(&:zero?) is another approach to that HackerRank problem.
<Ox0dea> I think it's pretty clever.
veinofstars has joined #ruby
<baweaver> which one?
<baweaver> context is lost.
<Ox0dea> The one about returning the percentage of negative, zero, and positive values in an array.
<jhass> phat4life: I'd do the border conditions like return a if x == 1, that together with a tap should allow you to eliminate result
<baweaver> Ah
<jhass> phat4life: don't use explicit returns
<jhass> where an implicit one suffices
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> I'd untangle the the double assignment, just not worth it IMO
simplyianm has quit [Read error: Connection reset by peer]
<jhass> I'm allergic to missing space after the , but that's just me I guess :P
simplyianm has joined #ruby
<phat4life> yeah im terrible at formatting, i just let rubocop yell at me
edwinvdgraaf has quit [Remote host closed the connection]
drewo has joined #ruby
<Ox0dea> Then why even bother using it?
<jhass> .map(&:to_i)
sinkensabe has quit [Remote host closed the connection]
<phat4life> if i don't use rubocop i miss things
axsuul has joined #ruby
edwinvdgraaf has joined #ruby
<phat4life> i don't see whitespace
<baweaver> rubocop is all or none
<phat4life> its configurable
<Ox0dea> You should ignore that fact.
<phat4life> yes usually
mike___1234 has quit [Ping timeout: 245 seconds]
sarkyniin has quit [Quit: Quit]
RegulationD has quit [Remote host closed the connection]
dopie has quit [Quit: This computer has gone to sleep]
someword has quit [Quit: Leaving.]
<phat4life> are there any books you guys can recommend for design patters in ruby?
pragmatism has quit [Remote host closed the connection]
<phat4life> right now, i am readying programming-ruby 1.9 & 2.0
<phat4life> *reading
gluten_hell_ has quit [Ping timeout: 250 seconds]
<Ox0dea> POODR is love.
pragmatism has joined #ruby
<avdi> Well there's a book called "Design Patterns in Ruby", or something quite like that.
<baweaver> for now I would avoid that a bit, because you'll most likely treat Gang of Four patterns as cannon law
<dfockler> baweaver: POODR or the design patterns one?
<baweaver> POODR is great
<avdi> As Ox0dea says, if you haven't already read POODR, run do not walk
<baweaver> Design Patterns is too
<baweaver> BUT
<baweaver> very dangerous when used as a word of law
<dfockler> definitely
<baweaver> See: Enterprise Java Applications
attlasbot has joined #ruby
<dfockler> avdi: I'm running
<Ox0dea> phat4life: Why is it called fib_mod?
<volty> those gang patterns are rubbish, imho
Scroff has joined #ruby
<phat4life> Ox0dea: hacker rank
<avdi> volty: that's a very broad statement
<phat4life> Ox0dea: that code is wrong anyway
<baweaver> They're used as a basis of common patterns in object oriented languages and are quite useful
<phat4life> im memoizing the wrong thing
<volty> I tried to read something. Was just curious. The only knowledge you get is the talking (about patterns) one.
<baweaver> but one must remember that functional languages, even partially so, have ways around some of those patterns
_seanc_ has quit [Quit: _seanc_]
<phat4life> i have 1 week to brush up on OO stuff
<baweaver> Most of the GoF is actually irrelevant in a purely functional language
<volty> baweaver: could be, if the exposition isn't so pompous
<phat4life> is ruby considered functional
<baweaver> phat4life: definitely POODR then
attlasbot has quit [Client Quit]
<baweaver> partially
<avdi> yep, definitely POODR
<baweaver> It's complicated and not something to get into if you have a week for OO
<dfockler> I'd like a book about how to store configuration settings, and about database connections and thread safety
<avdi> phat4life: short answer: no.
<jhass> phat4life: in summary something like this http://paste.mrzyx.de/p9pabmi79
<dfockler> but I guess those are problems I'm facing today
<Ox0dea> avdi: Really?
<baweaver> all types of semantical hand waving and technicalities abound. There be dragons there.
<avdi> Ox0dea: like I said: short answer.
<phat4life> jhass: looks right
<Ox0dea> avdi: Sure, but I'd expect the short answer to be "yes".
_seanc_ has joined #ruby
pragmatism has quit [Client Quit]
<baweaver> Succinctly you can program in a functional manner in ruby and do a lot of functional things, but it's not a functional language by core.
<baweaver> just heavily inspired by them
<jhass> phat4life: btw you know the fibonacci hash? :P
<avdi> Ox0dea: Ruby is OO through and through. It happens to have a surprising amount of functional sugar on top where it makes sense.
mdz_ has quit [Remote host closed the connection]
alphaatom|pc has quit [Ping timeout: 252 seconds]
<baweaver> jhass: oi, be nice, that stuff is scary
<phat4life> jhass: apparently not
<Senjai> avdi: As in Avdi Grimm? (I think)
scripore has quit [Quit: This computer has gone to sleep]
<volty> look, before reading anything about advanced techniques (I prefer this one), one should think by himself. Otherwise it is just filling with notions that you don't understand and can't find & implement real use cases.
<phat4life> jhass: i can only think algorithmically in c
attlasbot has joined #ruby
Scroff has quit [Ping timeout: 245 seconds]
Igorshp has joined #ruby
<baweaver> phat4life: probably fine for now, though you may try a hand at one of: Haskell, Scala, Clojure, Elixir
<avdi> Ox0dea: although the funny thing is that a lot of the "functional stuff" (read: decent tools for manipulating collections by passing bits of code around) it inherits from Smalltalk, which is generally considered to be the quintessential OO language.
<al2o3-cr> phat4life: if you can think like that, it should be a breeze in ruby
<volty> and the example I found there (can't remember which book exactly) was quite idiot — handling of coctails
<phat4life> baweaver: ive done ocaml
finisherr has quit [Quit: finisherr]
<avdi> Senjai: yes, I am that Avdi
<dfockler> like most of the Enumerable functions
<volty> can' t find a more idiot idea when talking about OO
mister_solo has quit [Ping timeout: 250 seconds]
<jhass> >> Hash.new {|h, k| h[k] = k > 2 ? h[k-1] + h[k-2] : 1 }[10] # phat4life
<ruboto> jhass # => 55 (https://eval.in/382079)
<phat4life> i built a java tokenizer in ocaml at some point in my life
pragmatism has joined #ruby
<phat4life> jhass: i mean, that is basically what i am doing, is just a different way of memoization
<jhass> yep
<baweaver> Scala is essentially SML ported to Java with everything including the kitchen sink thrown in
<jhass> and a single line and constant lookup :P
Alayde has joined #ruby
musgravejw has joined #ruby
beneggett has quit [Ping timeout: 264 seconds]
Alayde_ has quit [Ping timeout: 252 seconds]
pragmatism has quit [Client Quit]
<baweaver> avdi: getting back into IRC?
JoshL has joined #ruby
scripore has joined #ruby
<avdi> baweaver: I'm always around
<avdi> watching... waiting...
<baweaver> just not always active
<baweaver> there were a few tenderlove sightings as well earlier
<tenderlove> O_O
<dfockler> It's like we're playing Pokemon Snap
<avdi> I feel like there should be a "rare birds of IRC" guidebook
<baweaver> *a wild tenderlove appeared!*
RTG` has quit [Ping timeout: 272 seconds]
<baweaver> xshay pops on rarely as well
wallerdev has joined #ruby
<baweaver> sarahmei is in rspec
<Senjai> I'm pretty glad the channels got merged though
<avdi> I generally stick around long enough to witness someone beating up on a newb for no good reason and then I stalk off in a huff
<Senjai> It's much more lively.
<al2o3-cr> >> 10.times.each_with_object([0,1]) { |i, a| a << a[-2] + a[-1] }.sample # please be 13
<ruboto> al2o3-cr # => 1 (https://eval.in/382080)
<al2o3-cr> :(
Ropeney has joined #ruby
<baweaver> generally you can just ping Radar or sevenseacat, they'll take care of much of that
<avdi> good to know
<baweaver> You can also !.ops to get their attention
<baweaver> (without .)
<jhass> well, or anybody in !ops, we have a "be polite" channel rule after all ;)
<baweaver> jhass is on that list as well.
Igorshp has quit [Remote host closed the connection]
houhoulis has joined #ruby
_seanc__ has joined #ruby
asteros has quit [Quit: asteros]
scripore has quit [Client Quit]
<Ox0dea> al2o3-cr: Fibonacci dice?
havenwood has joined #ruby
<baweaver> and if you don't want to call attention to it publicly, just message one of them, they're normally fairly responsive if there's an issue.
<al2o3-cr> Ox0dea: yeah, my lucky number :)
<avdi> OK, family time. Catch y'all later!
<jhass> hf
<al2o3-cr> avdi: o/
<baweaver> 'night avdi
<al2o3-cr> baweaver: :)
<baweaver> old but good
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_seanc_ has quit [Ping timeout: 250 seconds]
_seanc__ is now known as _seanc_
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaycee has quit [Read error: Connection reset by peer]
AndChat|412596 has quit [Ping timeout: 244 seconds]
startupality has joined #ruby
<al2o3-cr> yep heh
<baweaver> ah, and tenderlove, keep being awesome
<tenderlove> lol, I'll try
<tenderlove> but no guarantees
e1nh4nd3r has joined #ruby
<baweaver> good enough for me mate.
baweaver has quit [Remote host closed the connection]
<Ox0dea> tenderlove: Please tell nobu to restore easy access to FrozenCore.
tomphp has joined #ruby
shock_one has joined #ruby
spyderman4g63 has joined #ruby
Matthews_ has quit [Ping timeout: 256 seconds]
axsuul has quit [Ping timeout: 250 seconds]
<al2o3-cr> Ox0dea: did you happen to get more than 252 fd's?
<Ox0dea> I did not. :/
rcvalle has quit [Quit: rcvalle]
<Ox0dea> I have all the current .gems, though, and the .tar.xz is 34.2GB. ^_^
<Ox0dea> Perfectly useless information, but the number is its own reward.
<al2o3-cr> :)
jenrzzz has quit [Ping timeout: 276 seconds]
volty has quit [Quit: Konversation terminated!]
RTG` has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has joined #ruby
<al2o3-cr> Ox0dea: your a man on a mission :)
asteros has joined #ruby
davedev24_ has quit [Ping timeout: 250 seconds]
mdz_ has joined #ruby
<al2o3-cr> *you're
asteros has quit [Client Quit]
<Ox0dea> It'd be nice to stumble upon some interesting experiment to perform, but nothing immediately springs to mind.
shock_one has quit [Ping timeout: 256 seconds]
<al2o3-cr> Ox0dea: when i find one, i will let you know
k3asd` has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
beneggett has joined #ruby
<Ox0dea> With your insights and my wasted disk space, together we shall grace /r/dataisbeautiful with graphs the likes of which have never been seen!
mike___1234 has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
Casty has joined #ruby
axsuul has joined #ruby
simplyianm has joined #ruby
GPrime has joined #ruby
<al2o3-cr> Ox0dea: maybe, graph the djia?
<al2o3-cr> in ascii :)
mcclurmc has joined #ruby
jenrzzz has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
apoplexy has quit [Ping timeout: 276 seconds]
<Ox0dea> al2o3-cr: How has that to do with having all the .gems?
kekumu has joined #ruby
ceigel has quit [Quit: Connection closed for inactivity]
<al2o3-cr> Ox0dea: it hasn't, just for fun
<Ox0dea> Some API + jq + holman/spark would likely make graphing the DJIA in ASCII a one-liner.
<al2o3-cr> Ox0dea: ruby only man
quimrstorres has joined #ruby
<Ox0dea> Raw sockets, or is net/http kosher?
<al2o3-cr> Ox0dea: feel free, as long as it is ruby (only)
<hotpanca_> heyo,
quazimodo has joined #ruby
<hotpanca_> currently debating whether or not I should give up textmate and learn vim. anybody who's made the jump and like it? (or not?)
Cache_Money has quit [Quit: Cache_Money]
<al2o3-cr> vim is the shizzle
<Ox0dea> It is known.
<hotpanca_> al2o3-cr: this is what i hear...
<al2o3-cr> hotpanca_: very hot
Akagi201_ has quit [Remote host closed the connection]
jjasonclark has quit [Quit: jjasonclark]
<hotpanca_> al2o3-cr: what's the most surprising benefit you've gotten from vim?
<Ox0dea> hotpanca_: What deficiencies have you observed in your use of TextMate?
mdz_ has quit [Remote host closed the connection]
<al2o3-cr> hotpanca_: use whatever you like
<al2o3-cr> if you like it, you like it :)
datanoise has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
attlasbot has quit [Quit: Leaving]
<Ox0dea> hotpanca_: Processing text as characters is for machines; Vim lets you edit with nouns and verbs.
bronson has quit [Remote host closed the connection]
simplyianm has joined #ruby
<hotpanca_> Ox0dea: none that i can really think of, but the grass looks oh so green. (e.g. "just *trust* us, you'll be so much more productive.")
<Ox0dea> No, that's stupid.
<Ox0dea> d3w to delete three words is fundamentally better than hitting Delete or Right Arrow or whatever other nonsense most editors make you do.
dgutierrez1287 has quit [Remote host closed the connection]
<Ox0dea> At bottom, it's not about "productivity", it's about being more than a brute with a keyboard.
nateberkopec has quit [Quit: Leaving...]
michael_mbp has quit [Excess Flood]
<al2o3-cr> i even give nano/pico some love now and again :)
michael_mbp has joined #ruby
mdz_ has joined #ruby
<hotpanca_> Ox0dea: how long did it take you for commands to become muscle memory?
<hotpanca_> al2o3-cr: i like nano!
quimrstorres has quit [Ping timeout: 240 seconds]
deric_skibotn has quit [Ping timeout: 265 seconds]
<Senjai> hotpanca_: You can learn vim in like, a week or so
dgutierrez1287 has joined #ruby
<Senjai> if you push yourself
<postmodern> is there something like activeresource, but not tied to rails and allows wrapping around more customized API end-points?
<Senjai> As in, force yourself to use the commands etc
<Senjai> postmodern: Huh?
yaw has joined #ruby
yaw has left #ruby [#ruby]
jpfuentes2 has joined #ruby
<hotpanca_> Senjai: sweet. there're a million vim tutorials/games. any you'd recommend?
<Senjai> vimtutor
<Senjai> Then just use it in your day to day
<Senjai> get a good vimrc from someone
<Senjai> I used gary bernhardt's to start
xxneolithicxx has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
baweaver has joined #ruby
<Senjai> hotpanca_: Put this in your vimrc asap https://gist.github.com/Senjai/e651b8b9a95b06492870
axsuul has quit [Ping timeout: 255 seconds]
<jhass> that's mean :P
<al2o3-cr> Senjai: isn't there a plugin for that?
dgutierrez1287 has quit [Remote host closed the connection]
<al2o3-cr> lol :_
<Senjai> al2o3-cr: Disabling arrow keys?
<Senjai> Probably, its just so easy to do though
<Senjai> jhass: not mean, its essential to learning vim :P
<Senjai> This is my behemoth of a vimrc in case you were curious
dgutierrez1287 has joined #ruby
<Senjai> it's by no means clean
<Senjai> And defines variables for things I no longer use
<hotpanca_> thanks!
JEG2 has quit [Quit: Connection closed for inactivity]
<hotpanca_> i'll check it out
jenrzzz has quit [Ping timeout: 264 seconds]
hyperjuice has joined #ruby
leafybas1l has quit [Quit: Lost terminal]
snockerton has quit [Quit: Leaving.]
<havenwood> postmodern: it seems like ROM is shaping up nicely
<havenwood> though i haven't used it other than just playing. i'll have to give it a try
dgutierrez1287 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dgutierrez1287 has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> sl;dfgksa;lgkn
<Senjai> :(
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> No me gusta datamapper like things
gambl0re has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
<shevy> el gato es un perro
<havenwood> Senjai: Don't like ROM?
<Senjai> havenwood: No :( Just on principle. Don't ask me why, its a lot of typing and its mostly subjective
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> Senjai: Like ActiveRecord?
<centrx> ROM is vaporware. Wake up sheeple!
<havenwood> centrx: It exists now!
<havenwood> centrx: Adapters and everything. :P
<centrx> k
<centrx> IT'S ALIVE!
startupality has quit [Quit: startupality]
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
beneggett has joined #ruby
Lucky__ has quit [Ping timeout: 246 seconds]
cirn0 has joined #ruby
Lucky__ has joined #ruby
marr has quit [Ping timeout: 264 seconds]
boomls has quit [Ping timeout: 256 seconds]
hyperjuice has quit []
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby