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/
pengin has quit [Remote host closed the connection]
tedstriker has joined #ruby
caseypat_ has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
allcentury has joined #ruby
pragmatism has joined #ruby
fabrice31 has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
<al2o3-cr> name a vegetable with all the vowels? # answers in #ruby-offtopic
simplyianm has joined #ruby
<Senjai> al2o3-cr: I will preemptively quit
serivich has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
caseypatrickdris has quit [Ping timeout: 244 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> Senjai: spoil sport :)
DLSteve has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 264 seconds]
roolo__ has quit [Remote host closed the connection]
<Ox0dea> Is orange aubergine a vegetable?
caseypat_ has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 252 seconds]
axsuul has joined #ruby
ixti has quit [Ping timeout: 255 seconds]
<al2o3-cr> Ox0dea: color i think, hmm...
<Ox0dea> Fine, Jerusalem artichoke.
ndrei has quit [Ping timeout: 252 seconds]
Lucky__ has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
<al2o3-cr> ah, well :)
<al2o3-cr> still no one answered the question :)
msgodf has joined #ruby
datanoise has quit [Ping timeout: 264 seconds]
boomls has joined #ruby
benegget_ has joined #ruby
pengin has joined #ruby
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zipace has joined #ruby
krisquigley has joined #ruby
musgravejw has quit [Ping timeout: 240 seconds]
jhooker has quit [Ping timeout: 250 seconds]
dfockler has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
dgutierrez1287 has joined #ruby
workmad3 has joined #ruby
A205B064 has quit [Ping timeout: 264 seconds]
bkxd has quit [Ping timeout: 245 seconds]
BanzaiJoe has quit [Ping timeout: 252 seconds]
beneggett has quit [Ping timeout: 264 seconds]
Rollabunna has joined #ruby
davedev2_ has quit [Ping timeout: 245 seconds]
krisquigley has quit [Ping timeout: 264 seconds]
arturmartins has quit [Quit: Leaving...]
dgutierrez1287 has quit [Remote host closed the connection]
benegget_ has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
workmad3 has quit [Ping timeout: 276 seconds]
dgutierrez1287 has joined #ruby
sharpmachine has quit [Remote host closed the connection]
pragmatism has joined #ruby
<Ox0dea> > implying the Jerusalem artichoke isn't a vegetable
<Ox0dea> Please keep your anti-Semitism out of #ruby.
ludico8 has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 256 seconds]
hydrozen has joined #ruby
beneggett has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
scripore has joined #ruby
keslerm has joined #ruby
Channel6 has joined #ruby
starfox_sf has joined #ruby
MAKOHYPE is now known as bosnia
MatthewsFace has joined #ruby
yaw has joined #ruby
sevenseacat has joined #ruby
mrmargolis has joined #ruby
<Aeyrix> Ox0dea: We lost. :<
<Aeyrix> Smith finally worked out how to shoot at the hoop but overall ehh / 10.
towski_ has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
mrmargolis has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
mleung has quit [Quit: mleung]
mrmargolis has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
Marsupermammal has joined #ruby
Marsupermammal has quit [Client Quit]
towski_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has quit [Ping timeout: 276 seconds]
robustus has quit [Ping timeout: 255 seconds]
cirn0 has quit [Remote host closed the connection]
bgmarx_ has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tchebb has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
jenrzzz_ has joined #ruby
robustus|Off has joined #ruby
robustus|Off is now known as robustus
tchebb has joined #ruby
bronson has joined #ruby
<Ox0dea> Aeyrix: I would have been entertained had he started 2-for-2 from three only to get ejected a few minutes later.
<shevy> hmm
<shevy> what if we could load something based on the class name itself, rather than the file position
<Ox0dea> shevy: Then we could have imports!
<shevy> so rather than: require 'foobar/bla.rb', we could do: require Foobar::Bla
<shevy> where Bla could be anywhere
<Ox0dea> tenderlove recently did a talk wherein he discussed the many-headed demon of Ruby's file loading mechanics.
<shevy> hehe
<shevy> well, it's simple! which also means it is dumb
cirn0_ has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<shevy> I really hate having to search for a file...
spyderman4g63 has quit [Remote host closed the connection]
<shevy> right now, in one script, I need the class that handles aliases, which is just a hash lookup; I don't want to search for the name of the .rb file...
<al2o3-cr> Ox0dea: ?
jpfuentes2 has joined #ruby
<Ox0dea> al2o3-cr: A bad joke worth forgetting.
swgillespie has joined #ruby
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> Ox0dea: :P
<Ox0dea> shevy: Ctrl-P? ctags? Such problems are essentially solved for decent editors.
A124 has quit [Ping timeout: 264 seconds]
cndiv has quit []
<shevy> ...
keslerm has quit [Quit: ZNC - http://znc.in]
bronson has quit [Ping timeout: 252 seconds]
<Ox0dea> I mean, you've got to have a rough guess at what you're looking for, but your editor really ought to be able to help you after that.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> Nevertheless, I agree that more granular importing would be handy.
cirn0_ has quit [Remote host closed the connection]
justintv90 has joined #ruby
Miphix has quit [Quit: Leaving]
<shevy> I can find what I need yes
<shevy> :-)
<Ox0dea> Ah, sorry, it's just your wording made it seem like perhaps the search was giving you more trouble than should be necessary.
<al2o3-cr> shevy: why would you want to do Foo::Bar?
<shevy> al2o3-cr because I'd never have to find the name of the .rb file in question
EasyCo has joined #ruby
<al2o3-cr> shevy: that is ludicrous
<shevy> :(
keslerm has joined #ruby
<shevy> Ox0dea well yeah, I am extremely lazy. The only reason I use ruby is so I can be even lazier lateron
apoplexy has joined #ruby
dopie has joined #ruby
<EasyCo> Hey guys, is there a built-in method that will loop through an array and allow you to pass it a block with a conditional statement? If it's false, it'll stop and return false but if it iterates through all the elements successfully it'll return true.
<havenwood> shevy: Aye, it would be simpler to have the class/module also be the gem name and require statement rather than having all three be different: http://guides.rubygems.org/name-your-gem/
Soda has quit [Remote host closed the connection]
Ox0dea has quit [Quit: WeeChat 1.3-dev]
GPrime has joined #ruby
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ox0dea has joined #ruby
<shevy> I sort of defaulted to use _
<nofxx> You can use autoload for that, no need to make it horrible like python
<shevy> not sure if I like rdoc-data -> 'rdoc/data'
<al2o3-cr> +1 nofxx
<nofxx> also , classify() sort of thing... activesupport I presume
hotpancakes has quit [Remote host closed the connection]
<Ox0dea> >> [1, 2, 3].all { |x| x.even? }
<ruboto> Ox0dea # => undefined method `all' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/382089)
<Ox0dea> Grr.
<Ox0dea> >> [1, 2, 3].all? { |x| x.even? }
<ruboto> Ox0dea # => false (https://eval.in/382090)
<Ox0dea> >> [2, 4, 6].all? { |x| x.even? }
<ruboto> Ox0dea # => true (https://eval.in/382091)
<Ox0dea> EasyCo: ^
pontiki has joined #ruby
<nofxx> sorry.. #classify , hehe been wrting too much JS, makes life sad =/
datanoise has joined #ruby
<shevy> yes
<shevy> at least you feel guilty about it
<shevy> imagine if you were to like javascript
<shevy> even more than ruby
cirn0 has joined #ruby
<EasyCo> Ox0dea: all? !!! Thanks, I just couldn't remember or find it for the life of me. Cheers.
<shevy> googling for all is not so easy
<shevy> still easier than googling for *
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<pontiki> better to just read Enumerable docs again :D
keslerm has quit [Quit: ZNC - http://znc.in]
<al2o3-cr> EasyCo: remember all?, any? and none?
DynamicMetaFlow has joined #ruby
Pupeno_ has joined #ruby
keslerm has joined #ruby
Renich_ has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
Renich_ has quit [Client Quit]
<pontiki> we need a some? and maybe? too
<drbrain> some? is any?
simplyianm has quit [Remote host closed the connection]
cirn0 has quit [Remote host closed the connection]
<centrx> >> never!
<ruboto> centrx # => undefined method `never!' for main:Object (NoMethodError) ...check link for more (https://eval.in/382094)
bruno-_ has quit [Ping timeout: 276 seconds]
<al2o3-cr> ?cheek
<ruboto> I don't know anything about cheek
Renich_ has joined #ruby
<Ox0dea> pontiki: What would you want #maybe? to return?
oo_ has quit [Remote host closed the connection]
<pontiki> Ox0dea: the only answer possible: "it depends"
Pupeno has quit [Ping timeout: 276 seconds]
oo_ has joined #ruby
kekumu has quit [Quit: kekumu]
<Ox0dea> I assumed you were going to mention monads.
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
<pontiki> i'd have to be a lot smarter
boomls has quit [Ping timeout: 276 seconds]
<Ox0dea> Do you enjoy Mexican cuisine?
<pontiki> maybe?
<Ox0dea> <3
arescorpio has joined #ruby
<Ox0dea> Monads are basically burritos is why I asked, in case the joke was missed.
dopie has quit [Quit: This computer has gone to sleep]
<shevy> lol
mdz_ has quit [Remote host closed the connection]
cirn0 has joined #ruby
<shevy> Maybe is easy to remember
<shevy> the Schroedinger cat will live. Maybe.
<Ox0dea> Sometimes a cat is Just a cat.
<al2o3-cr> Ox0dea: might be a pussy no?
<Ox0dea> A bad pussy?
<al2o3-cr> any pussy?
pragmatism has joined #ruby
<havenwood> ?offtopic
<ruboto> I don't know anything about offtopic
<havenwood> ruboto is always ontopic
Musashi007 has joined #ruby
jjasonclark has joined #ruby
jjasonclark has quit [Client Quit]
<Ox0dea> How do I reorder at_exit handlers?
sharpmachine has joined #ruby
drewo has joined #ruby
wallerdev has quit [Ping timeout: 272 seconds]
dopie has joined #ruby
<al2o3-cr> Ox0dea: how'd you mean?
Akagi201 has joined #ruby
<Ox0dea> You can use END {} and at_exit {} to register blocks of code to execute right before the program terminates, but they're pushed onto a stack and executed in reverse order.
bricker has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Client Quit]
drewo has quit [Client Quit]
hydrozen has joined #ruby
hydrozen has quit [Remote host closed the connection]
_cake has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> Ox0dea: why woudn't they be pushed on the stack in reverse?
mdz_ has joined #ruby
pengin has quit [Remote host closed the connection]
<al2o3-cr> thats how memory works
CloCkWeRX has joined #ruby
<Ox0dea> I'm not saying it doesn't make sense, but I'd nevertheless like to muck about with the order dynamically if it's possible.
Renich_ has quit [Ping timeout: 276 seconds]
axsuul has quit [Ping timeout: 256 seconds]
Renich has joined #ruby
<al2o3-cr> Ox0dea: not possible afaik
boomls has joined #ruby
<Ox0dea> I could redefine at_exit and manage the process manually, but that feels inelegant.
<drbrain> you can at_exit in an at_exit
djbkd has quit [Quit: My people need me...]
<drbrain> so you can always push new at_exits to run later
<al2o3-cr> Ox0dea: why would you want to do that? just messing?
_cake has quit [Quit: leaving :c]
<Ox0dea> Mostly just messing, but it would actually be a solution to a problem.
sharpmachine has quit [Remote host closed the connection]
axsuul has joined #ruby
<Ox0dea> drbrain: I wouldn't necessarily be in control of the creation of the exit handlers; that is, I'd be called after they already exist.
<drbrain> oh, right
<drbrain> you could define your own exit callback method, then manage the order from your own at_exit
nb_bez___ has joined #ruby
serivich has quit [Quit: Leaving]
jacaho0 has joined #ruby
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Yeah, that seems like the concession I'll have to make.
<Aeyrix> <shevy> what if we could load something based on the class name itself, rather than the file position
<al2o3-cr> probably the only concession
<Aeyrix> I've been whining about this for like two years.
hahuang65 has quit [Ping timeout: 276 seconds]
boomls has quit [Remote host closed the connection]
jcoe has joined #ruby
cirn0 has quit [Remote host closed the connection]
jcaho has quit [Ping timeout: 265 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<pontiki> oh, like Rails autoloader?
simplyianm has joined #ruby
cirn0 has joined #ruby
<Senjai> ^
<al2o3-cr> similar
<Senjai> ActiveSupport::AutoLoad > Ruby
centrx has quit [Quit: Shutting down, Please wait...]
centrx has joined #ruby
<Senjai> al2o3-cr: Are you doing an insane amount of callbacks at_exit?
Agoldfish has quit [Quit: G'Bye]
<Senjai> OH oh way. Do you start your program and then let it terminate, running your entire program in an at_exit block :O xD
<al2o3-cr> Senjai: ask your sensai :)
mdz_ has quit [Remote host closed the connection]
<Senjai> I have a sensai?
<al2o3-cr> do you?
<Senjai> I do not
<al2o3-cr> me neither
<Senjai> < taking applications
hotpancakes has joined #ruby
amclain has joined #ruby
<Senjai> I hate the code I'm writing right now
<al2o3-cr> hotpancakes: welcome back
<al2o3-cr> Senjai: then make it better :)
<Senjai> Business requirements are silly
<baweaver> aha! finally caught you online pontiki
<Senjai> because of some data science team
shock_one has joined #ruby
* pontiki wriggles away
<baweaver> how'd it go?
sung_ has quit [Remote host closed the connection]
<pontiki> well received. they asked good questions, and even had good answers for the questions i posed at them
Yiota has joined #ruby
<pontiki> so i'm happy, and ever so grateful
* al2o3-cr pontiki tries to hide from baweaver
<baweaver> Any time, I just didn't have a chance to respond at all
<pontiki> oh, no worries :)
<baweaver> hackathons and whatnot keep me a bit busy.
<Senjai> Slightly scrubbed
<Senjai> It is not a thing that needs to exist :(. Just because values have to be stored in the database for SQL peoples.
datanoise has quit [Ping timeout: 244 seconds]
<al2o3-cr> Senjai: why you hate that?
dgutierrez1287 has quit [Remote host closed the connection]
<Senjai> al2o3-cr: I hate writing code that shouldn't need to be written
<Senjai> Especially when its SO important.
<Senjai> Eh, well not that it shouldnt be written
<Senjai> but it has to be given the current state of the application
<al2o3-cr> Senjai: just gooin to say
<al2o3-cr> *going
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper1 has quit [Quit: Leaving.]
shock_one has quit [Ping timeout: 272 seconds]
glcx has quit [Ping timeout: 256 seconds]
<baweaver> sanity check time!
<baweaver> I use AWS a lot
<al2o3-cr> Senjai: so what do you (like/dislike) in that code?
krz has joined #ruby
<baweaver> and the responses from aws have grouped items that are unsorted
axsuul has quit [Ping timeout: 256 seconds]
<baweaver> meaning syncing them to rails is ever a pain
<baweaver> should I try and port that to the aws-sdk to sort collections?
<Senjai> al2o3-cr: It's rather complex. It does a lot of things. It has to use update_columns on objects outside of its domain because it would cause an infinite loop otherwise
<al2o3-cr> Senjai: besides that
StephenOTT has joined #ruby
glcx has joined #ruby
<Senjai> al2o3-cr: It has to know variants belong to a group, because the state has to be calculated relative to the group for database persistance, where it could just be done in memory on the fly instead of having to worry how values are set.
<baweaver> or should I see about getting rails to have something to compare collections as having the same objects?
kekumu has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<Senjai> Before the requirement of persistance, it was super simple. Of the visible variants just get the first with the highest priority.
<al2o3-cr> one thing i'm a fan of is individually calling private methods? anyone else?
<Senjai> al2o3-cr: individually?
<al2o3-cr> private :this, private :that
<Senjai> Oh god no
mike___1234 has quit [Ping timeout: 265 seconds]
<al2o3-cr> just me then?
<Senjai> I mean thats a valid way of doing things
<Senjai> I just like to write as less code as possible while still keeping it readable
* baweaver smells a java programmer
<Senjai> baweaver: <3
<pontiki> i will admit i've never seen anyone do it that way, but that doesn't mean much
<Senjai> And I dont like repeating myself
NeverDie has joined #ruby
<pontiki> what?
<baweaver> everything below the first private declaration is private
<al2o3-cr> no, i just think is so much readable
<Senjai> I would rather have private do .. end before I would use individual private delcarations
<pontiki> al2o3-cr: if you are your most likely future reader, then it's perfectly okay
StephenOTT has quit [Remote host closed the connection]
<al2o3-cr> each and every method defined at the bottom
<baweaver> If you have enough methods to justify that you have a different problem
bkxd has joined #ruby
<baweaver> and it's not readability
<pontiki> i think it creates a higher maintenance cost
StephenOTT has joined #ruby
<havenwood> private def sekret
<Senjai> I dont think it would add to maintenance
<pontiki> you have to name it twice
<baweaver> Every extra click to me is extra maintenance
<al2o3-cr> no, i like private :method
<Senjai> Oh
<Senjai> that
<Senjai> that is for sure extra maintenance
<Senjai> :P
<baweaver> kinda nonsensical
<Senjai> And I have to scroll up and down to see what is and isnt marked private
<al2o3-cr> no, not at all
<Senjai> you'd also have private and non private methods mixed up
<Senjai> instead of chunked together
<pontiki> and you have to remember to mark it explicitly private, until you want it protected or public, and *then* you have to remember to mark it so
chipotle has quit [Quit: cheerio]
<havenwood> >> private def whee; end; send :whee
<baweaver> Again, if you have to scroll, you're doing something else wrong
<ruboto> havenwood # => nil (https://eval.in/382138)
axsuul has joined #ruby
<Senjai> baweaver: You would prefer: "def thing; puts "rawr"; end; private :thing"?
<pontiki> it's a similar maintenance headache to me a C prototypes
<havenwood> now that method definitions return a symbol...
<baweaver> no
<al2o3-cr> ftw gotta be
StephenOTT has quit [Remote host closed the connection]
<Ox0dea> >> private def foo; end
<ruboto> Ox0dea # => Object (https://eval.in/382144)
<Ox0dea> havenwood: ^
<Ox0dea> Is that a bug?
<Senjai> Finished in 11 minutes 55 seconds
Azure has quit [Excess Flood]
<Senjai> 1817 examples, 23 failures, 2 pending
<Senjai> Finished in 11 minutes 55 seconds
<Senjai> 1817 examples, 23 failures, 2 pending
<Senjai> Finished in 11 minutes 55 seconds
StephenOTT has joined #ruby
<Senjai> 1817 examples, 23 failures, 2 pending
<Senjai> Finished in 11 minutes 55 seconds
<havenwood> >> def foo; end
<ruboto> havenwood # => :foo (https://eval.in/382145)
<Senjai> 1817 examples, 23 failures, 2 pending
<baweaver> Senjai:
<Senjai> Finished in 11 minutes 55 seconds
<Ox0dea> havenwood: I know.
<baweaver> stop
<Senjai> 1817 examples, 23 failures, 2 pending
<Senjai> Finished in 11 minutes 55 seconds
<Senjai> 1817 examples, 23 failures, 2 pending
<Senjai> Finished in 11 minutes 55 seconds
<havenwood> Ox0dea: showing for others :P
<Senjai> 1817 examples, 23 failures, 2 pending
<baweaver> !ops
<ruboto> apeiros, fflush, banisterfiend, seanstickle, Mon_Ouie, zzak, Havenn, jhass, Radar, miah, sevenseacat, workmad3, Coraline, zenspider, drbrain, slyphon, rubyhacker1, Aria, ljarvis
<baweaver> fine
<Senjai> Im going home
<Senjai> tired
<Senjai> those failures are going to torment me
<baweaver> no reason to spam the channel with them
<Senjai> baweaver: I didn't mean to
<Senjai> sorry
<al2o3-cr> :private ftw all day long (imo)
<Ox0dea> private() currently returns self, but it'd make more sense to return its argument(s).
<Senjai> baweaver: I was scrolled up in my buffer, it didnt look like it was pasting
datanoise has joined #ruby
<Senjai> Apologies
FernandoBasso has quit [Quit: WeeChat 1.2]
baweaver has quit [Remote host closed the connection]
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Ox0dea: on first impression that makes sense to me, hem
chipotle has joined #ruby
chipotle has quit [Client Quit]
<Ox0dea> >> method(:private)
<ruboto> Ox0dea # => #<Method: main.private> (https://eval.in/382154)
jpfuentes2 has joined #ruby
<Ox0dea> That scares me a little.
<havenwood> hehe
<Ox0dea> I've never seen main in that position.
<havenwood> >> method(:private).owner
<ruboto> havenwood # => #<Class:#<Object:0x42022e38>> (https://eval.in/382155)
<al2o3-cr> of course
<al2o3-cr> same with public
simplyianm has quit [Remote host closed the connection]
<Ox0dea> But whose metaclass is that?!
<al2o3-cr> Ox0dea: self at the top level
<Ox0dea> Nope.
<al2o3-cr> yep
<Ox0dea> >> method(:private).owner.object_id == self.object_id
<ruboto> Ox0dea # => false (https://eval.in/382157)
eggoez has joined #ruby
cirn0 has quit [Remote host closed the connection]
<Ox0dea> Erm, wait.
<Ox0dea> Yeah, never mind, you're right.
<Senjai> I love it when you $ self in pry
<Senjai> and see terrible monkeypatches
<al2o3-cr> >> [method(:private).owner, class << self; remove_method(:to_s); end]
<ruboto> al2o3-cr # => [#<Class:#<Object:0x4171ae44>>, #<Class:#<Object:0x4171ae44>>] (https://eval.in/382159)
<krowv> Hi channel. I'm new to both ruby and gtk3. Any help pointing me in the right direction would help. I'm trying to write a simple application. From the main window when a button is clicked I'd like another window opened with more buttons. Here is the code I have so far: https://gist.github.com/anonymous/58bd927178eb59699da8
datanoise has quit [Ping timeout: 264 seconds]
<Senjai> anyways, night all
<Senjai> o7
<Ox0dea> >> method(:private).owner == singleton_class
<ruboto> Ox0dea # => true (https://eval.in/382166)
RickHull has joined #ruby
Renich has quit [Quit: leaving]
Renich has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yaw has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
bgmarx has joined #ruby
<al2o3-cr> Senjai: o/
mcclurmc has quit [Ping timeout: 255 seconds]
jackjackdripper has joined #ruby
DynamicMetaFlow has quit [Remote host closed the connection]
mcclurmc has joined #ruby
MrWharfsnort has joined #ruby
bgmarx has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
j4cknewt has quit [Remote host closed the connection]
Yiota has joined #ruby
banister has quit [Ping timeout: 252 seconds]
Renich has quit [Quit: leaving]
dorei has quit []
Renich has joined #ruby
yfeldblum has quit [Remote host closed the connection]
MrWharfsnort has left #ruby [#ruby]
yfeldblum has joined #ruby
Randroid has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
mike___1234 has joined #ruby
<Ox0dea> havenwood: That was surprisingly easy.
bruno- has quit [Ping timeout: 256 seconds]
cirn0 has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
Renich has quit [Client Quit]
Renich has joined #ruby
blackmesa has quit [Quit: WeeChat 1.2]
krz has quit [Ping timeout: 265 seconds]
Renich has quit [Client Quit]
Renich has joined #ruby
Randroid has left #ruby [#ruby]
charliesome has quit [Quit: zzz]
rbennacer has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<al2o3-cr> Ox0dea: dude! do you teach engrish?
dgutierrez1287 has joined #ruby
Renich has quit [Client Quit]
RegulationD has joined #ruby
Renich has joined #ruby
stryek has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
krisquigley has joined #ruby
dfockler has joined #ruby
Renich has quit [Client Quit]
Renich has joined #ruby
<Ox0dea> al2o3-cr: Whence comes such a question?
Spami has quit [Quit: This computer has gone to sleep]
<Ox0dea> I'd cleared the buffer, and you made me go and check whether I'd accidentally said "surplisingry".
workmad3 has joined #ruby
kies has quit [Ping timeout: 264 seconds]
<al2o3-cr> Ox0dea: your grammer is spot on is all :)
<shevy> krowv always include the error in your program. Also, I think Gtk.init is not needed
<shevy> "include the error in your *pastie"
<shevy> don't include errors in your program please :)
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<krowv> shevy, there is no error at the moment. I just don't know what I'm doing. :)
<krowv> the code I pasted works.
<shevy> ok so you have one window with at the least a button
<shevy> from it you wish to open another window
<krowv> Now I'm trying to make clicking a button open a new window.
<krowv> yes
<krowv> The "exit" button works
<krowv> and closes the application
Yiota has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
<krowv> Now I want for example the "information" button to open a new window that would contain another grid with other buttons
<krowv> Do I need a new class for that?
<shevy> krowv have a look at something like: http://ruby-gnome2.osdn.jp/de/hiki.cgi?Gtk%3A%3AColorSelection
saadq has joined #ruby
<shevy> this is a widget that can pop up
phutchins has quit [Ping timeout: 255 seconds]
<shevy> you could have your button call a method
TheHodge has quit [Quit: Connection closed for inactivity]
<shevy> and in that method you create that widget
imperator has joined #ruby
dfockler has quit [Ping timeout: 250 seconds]
<shevy> def create_dialogue; colour_selection_dialog = ColorSelectionDialog.new("setting color")
krisquigley has quit [Ping timeout: 265 seconds]
<shevy> in gtk/gnome, by default, widgets tend to not be visible
<shevy> so you may have to call .show_all on it
<krowv> I think I see where that is going.
Renich has quit [Quit: leaving]
<shevy> in your current code you also do that too
<shevy> line 31, show_all
<shevy> let me try to find a simple example
zenguy_pc has quit [Read error: No route to host]
workmad3 has quit [Ping timeout: 272 seconds]
<krowv> shevy, awesome. thanks.
* krowv hacks on the code to see if he can make it work
joaomdmoura has joined #ruby
<shevy> btw I think there may be only one Gtk::Window
zenguy_pc has joined #ruby
<shevy> so if you tend to wish to re-use your components, it may be better to subclass from a widget that is below that hierarchy
<shevy> like, Gtk::HBox or Gtk::VBox
<shevy> I can't look at my examples right now, something does not work :\ I think I have to recompile rubygnome
saadq has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 256 seconds]
<shevy> ah
<shevy> I have an idea krowv
<krowv> ok
mary5030 has joined #ruby
<shevy> the rubygnome2 source archive comes with lots of .rb examples
<shevy> about 400 or so
<shevy> that is how I learned rubygnome
<krowv> will do.
<shevy> you may have to go into the subdirectories; I recommend the directory gtk3/
<shevy> there will be a file called main.rb or demo; run that, it showcases all widgets via a demo-menu where you can pick stuff
<shevy> when you want to know how things work, you can look at that specific .rb file \o/
hardlin3r has quit [Ping timeout: 244 seconds]
<krowv> In my code write now I tried creating a method and then calling it when the button is pushed
Igorshp has joined #ruby
<krowv> but thats now quite doing what I want. Will dig around in the ruby-gnome package
<shevy> upload your pastie perhaps
<shevy> sorry
<shevy> *update your pastie perhaps
<krowv> I'm gonna take a better stab at it. If I get completely stuck after looking at examples I'll post something again
LetErikTry has joined #ruby
LetErikTry has joined #ruby
* krowv starts wading through gtk3/sample/misc directory
avahey has joined #ruby
musgravejw has joined #ruby
Rollabunna has joined #ruby
freerobby has joined #ruby
Igorshp has quit [Ping timeout: 250 seconds]
<Ox0dea> What's the most sensible thing for Module#private to return if called with more than one argument?
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n008f4g_ has quit [Ping timeout: 272 seconds]
_blizzy_ has joined #ruby
psy_ has joined #ruby
<al2o3-cr> Ox0dea: hehe
<Ox0dea> Called with 0, you don't really care about the return value. Called with one, you want the symbol for potential decoration. But 2+?
dylanhart has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
<Ox0dea> Feels like 1 is the only special case.
<krowv> shevy, making progress. found a dialog.rb and got a second window to open.
Spami has joined #ruby
musgravejw has quit [Ping timeout: 264 seconds]
<shevy> \o/
Rollabunna has quit [Ping timeout: 265 seconds]
yqt has quit [Ping timeout: 276 seconds]
gluten_hell_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
<al2o3-cr> Ox0dea: what would you like it to return?
<Ox0dea> Ruby isn't mine alone.
<al2o3-cr> Ox0dea: didn't say it was?
x1337807x has joined #ruby
jtdoncas has joined #ruby
<jtdoncas> Hello everyone! I'm creating a DSL and I wanted to know if there was a more elegant way of passing class variables along than I currently have: https://gist.github.com/anonymous/64efa3fc4c6114bba59f
<Ox0dea> al2o3-cr: I can't conceive of a reason to call a visibility modifier with more than one argument, but someone someday will, and I'd like for them to get the return value they expected.
<Ox0dea> MINASWAN and all that. :)
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> Ox0dea, docs say it returns 'self'?
Yiota has joined #ruby
<Ox0dea> centrx: At present, it returns the receiver, which may be an implicit self or an expicit module.
<shevy> jtdoncas pretty peculiar code :)
gluten_hell_ has quit [Ping timeout: 256 seconds]
bootstrappm has quit [Remote host closed the connection]
<jtdoncas> shevy: is it bad?
<Ox0dea> jtdoncas: A more concrete example would likely improve your chances of receiving actionable advice.
<shevy> no real idea, it looks very unusual
platzhirsch has quit [Ping timeout: 246 seconds]
<jtdoncas> Ox0dea: I just to know if there was another than doing @@name = self
<jtdoncas> which seems hack-ey
<shevy> I am sure you have a reason why you need to use a @@foo variable
<jtdoncas> shevy: So I don't have to hardcode the module name in the instance method
casadei has joined #ruby
datanoise has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
<al2o3-cr> Ox0dea: you is going to deep :)
<Ox0dea> Hm?
coderhs has quit [Ping timeout: 252 seconds]
<al2o3-cr> Ox0dea: deep?
centrx has quit [Quit: Shutting down, Please wait...]
<Ox0dea> Method definition returns the method name as a symbol, which is nice for passing along to some decorator.
<shevy> jtdoncas can't you find out the name of the module anyway?
<shevy> via self.class.name and querying .ancestors
<Ox0dea> al2o3-cr: It seems to make sense enough that we should be able to do that with explicitly private methods as well.
<Ox0dea> decorate private def foo ... end
<shevy> ack
Spami has quit [Quit: This computer has gone to sleep]
<shevy> java!
fedexo has joined #ruby
<Ox0dea> But what to return if somebody calls private(:foo, :bar)?
<shevy> private public integer <T>
<shevy> an Array
<shevy> [:foo, :bar]
<shevy> pretty useless too hahaha
<al2o3-cr> 19>> def f; end
<ruboto> al2o3-cr # => nil (https://eval.in/382177)
zenguy_pc has joined #ruby
<al2o3-cr> >> def f; end
<ruboto> al2o3-cr # => :f (https://eval.in/382178)
<shevy> I have no idea what is going through the mind of Ox0dea
nobitanobi has quit [Remote host closed the connection]
<al2o3-cr> shevy: me neither
<shevy> :D
<shevy> he is like the hybrid-mix of what you get when you combine Mon_Ouie with hanmac
<Ox0dea> >> def decorate m; "decorated #{m}" end; decorate def foo; end
<ruboto> Ox0dea # => "decorated foo" (https://eval.in/382179)
<Ox0dea> >> def decorate m; "decorated #{m}" end; decorate private def foo; end
<ruboto> Ox0dea # => "decorated Object" (https://eval.in/382180)
<Ox0dea> ^ Not expected.
saadq has joined #ruby
xxneolithicxx has joined #ruby
<Ox0dea> Does no one observe the principle of least surprise anymore?!
<jtdoncas> shevy: I'm not sure what you mean :(
casadei has quit [Ping timeout: 245 seconds]
<shevy> jtdoncas you said you so don't have to hardcode the module name
bosnia is now known as bosma
<Ox0dea> jtdoncas: Would you mind showing exactly how you'd like to be able to write a Client?
<shevy> but it is known when and where a module will be included into a class
cirn0 has quit [Remote host closed the connection]
<shevy> >> module Foo; end; class Bar; include Foo; end; Bar.ancestors
<ruboto> shevy # => [Bar, Foo, Object, Kernel, BasicObject] (https://eval.in/382181)
cirn0 has joined #ruby
<al2o3-cr> you getting somewhere
<Ox0dea> al2o3-cr, shevy: The visibility modifiers should just be left as they are, then?
mrmargolis has quit [Remote host closed the connection]
auzty has joined #ruby
<shevy> I wouldn't know the first thing about private
<shevy> to be honest, I don't even understand why it even exists
<Ox0dea> Someone's got some reading to do.
<shevy> what for
<al2o3-cr> shevy: come on
<shevy> no really
MrWharfsnort has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
<shevy> you can use .send anyway right?
<al2o3-cr> shevy: thats not the point though
<shevy> so what is the point
<Ox0dea> Clarity of intent.
<Ox0dea> Write code for humans.
<shevy> I have that already
<Ox0dea> jtdoncas: You've not demonstrated why Client should respond to #my_objects.
bosma is now known as BATTLEFRONTHYPE
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jtdoncas> Ox0dea: I need to create the methods using item.name which I get from objects
MrWharfsnort has left #ruby [#ruby]
Scroff has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> how many downloads on rubygems come from bots?
zenguy_pc has quit [Read error: Connection reset by peer]
<jtdoncas> shevy: what were you saying about using self.class instead of @@foo?
<shevy> nono, not instead of @@fo
<Ox0dea> shevy: Every downloader of RubyGems is a bot except you.
<shevy> I meant when you wrote that you have to hardcode the module name
<shevy> I think the biggest problem I have is that I don't really understand what you are doing in your code
drewo has joined #ruby
<shevy> :)
beneggett has joined #ruby
<jtdoncas> shevy: I have a DSL module that defines DSL functions and then I want to use that DSL in the implementor and then pass in the objects created to the client
<krowv> shevy, here is my current attempt. https://gist.github.com/anonymous/9acb04fcafac8ff90151
<krowv> I'm getting a warning now when I click information Gtk-WARNING **:Attempting to add a widget with type GtkGrid to a GtkWindow, but as a GtkBin subclass a GtkWindow can only contain one widget at a time; it already contains a widget of type GtkGrid
<Ox0dea> jtdoncas: Way too much "what", not enough "why".
<krowv> Am I on the right path ya think?
BATTLEFRONTHYPE is now known as bosma
<shevy> krowv yeah, that is why I subclass from Gtk::HBox or Gtk::VBox instead normally
<jtdoncas> Ox0dea: Well I'm not sure what you want me to tell you. The end goal is to make an API wrapper for a service
skysploit has quit []
<shevy> package everything into one widget, then bind that widget into a Window parent
<jtdoncas> Ox0dea: the DSL is to make the client methods that map to endpoints
<Ox0dea> jtdoncas: Do you know all of the endpoints ahead of time?
<jtdoncas> Ox0dea: yes
<Ox0dea> Then why not just `endpoints.each { |ep| define_method(ep) { ... } }`?
x1337807x has joined #ruby
Scroff has quit [Ping timeout: 276 seconds]
<jtdoncas> Ox0dea: So I can support different methods, required parameters, namespaces
dylanhart has quit [Remote host closed the connection]
<Ox0dea> Why do you need distinct definitions of these methods in each class that extends from your DSL module?
schy has quit [Quit: WeeChat 1.2]
zenguy_pc has joined #ruby
zenguy_pc has quit [Read error: No route to host]
rbennacer has quit [Remote host closed the connection]
JoshL has quit []
zenguy_pc has joined #ruby
<krowv> shevy, trying to parse what that means... Basically is it saying I can only have one one GtkGrid per class?
<jtdoncas> Ox0dea: I don't, I just need them to be created in my DSLImplementation -- so I guess I should created the methods in my DSL instead of client, eh?
StephenOTT has quit [Quit: StephenOTT]
<Ox0dea> jtdoncas: Well, in what way is `Client.extend APIMethods` not sufficient?
svf has joined #ruby
<al2o3-cr> >> [:fail, :fail, :fail].sample
<ruboto> al2o3-cr # => :fail (https://eval.in/382188)
<ajaiswal> some help here.. i'm trying to run a if loop in which i'm running a some system commands. if the test is good it should increment the value.. https://gist.github.com/ashish1099/94ac418e28ab74ad14db
<ajaiswal> i'm looking for something "passed totalcount/passedtest"
<Ox0dea> ajaiswal: Holy shit.
zenguy_pc has quit [Read error: No route to host]
<shevy> krowv you have Gtk::Window. This wants to have only one sub-widget. The solution is, package everything into one widget, then add that to Gtk::Window.new.add(your_widget)
<shevy> that is why I said I subclass from Gtk::HBox normally, or Gtk::Frame
<jtdoncas> Ox0dea: it is. I just need to create the methods (I guess instead of accumulating an array I just make the methods directly! )
<ajaiswal> Ox0dea: lol
<Ox0dea> jtdoncas: Well, dynamic method definition is fine as long as it's called for.
<shevy> this is the important part: class Cdripper < Gtk::Frame
<shevy> and then, lateron at the end:
<ajaiswal> Ox0dea: what w
j4cknewt has joined #ruby
<shevy> runner = GtkRunner.new
<ajaiswal> Ox0dea: what wrong i'm doing here
<shevy> cdripper = Cdripper.new(ARGV.first); runner.add(cdripper)
<Ox0dea> ajaiswal: For starters, why are you using "0" and "1"?
aaeron has quit [Quit: Leaving.]
<Ox0dea> If you're wanting to do arithmetic, those should be integers.
GPrime has joined #ruby
<shevy> krowv GtkRunner I wrote so I don't have to deal with Gtk::Window on my own anymore (don't mind the name... I should rename it to Gtk::Runner ... but it is years since I last dealt with ruby-gnome much at all really)
<shevy> krowv so in your case, just subclass from something else like Gtk::Frame for now; and then add this into a Gtk::Window widget, and the above error message will go away
<ajaiswal> hmm $successtest is an interger... hmm
<jtdoncas> Ox0dea: thanks for your help, my code is a lot clearer now! I don't know why I was making that array :D
gr33n7007h has joined #ruby
djbkd has quit [Quit: My people need me...]
frem has quit [Quit: Connection closed for inactivity]
chinmay_dd has joined #ruby
zenguy_pc has joined #ruby
al2o3-cr has quit [Disconnected by services]
gr33n7007h is now known as al2o3-cr
sharpmachine has joined #ruby
saaki has joined #ruby
<jtdoncas> Ox0dea: actually no I needed it in the client to pass it a Curb connection... fuck
j4cknewt has quit [Ping timeout: 265 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> ajaiswal: whats the problem?
<Ox0dea> jtdoncas: Well, shit...
fujimura has joined #ruby
<ajaiswal> al2o3-cr: hmm the output is coming like this totalcount/01.. instead of that i'm looking for totalcount/successtest
<krowv> shevy, ok. thanks for the tips. I'll see what I can come up with. Glad I've made it this far on my second day with ruby gtk3.
<shevy> \o/
happyface has joined #ruby
tkuchiki_ has joined #ruby
<Ox0dea> ajaiswal: In Ruby, "2" + "3" is "23", not 5.
tkuchiki has quit [Read error: Connection reset by peer]
drewo has quit [Ping timeout: 276 seconds]
<ajaiswal> Ox0dea: ok... i have removed the "0" to just 0
<krowv> day one was mostly getting a working environment.
<Ox0dea> jtdoncas: Do you know about hook methods?
baweaver has joined #ruby
banister has joined #ruby
<al2o3-cr> ajaiswal: totaltest = Dir.glob("/var/log/beaker/spec/reports/#{role}/#{osx}/latest/*.xml").count # is always gonna be a fixed number
msgodf has quit [Ping timeout: 250 seconds]
<Ox0dea> al2o3-cr: What if there are an infinite number of matching files; is Infinity a Fixnum?
<bnagy> wat
<al2o3-cr> successtest = "0" -> 0
<ajaiswal> Ox0dea: hmm.. i'm not sure about the infinity, but in my case its 38
<ajaiswal> al2o3-cr: yes i have changed that
<Ox0dea> ajaiswal: Did you change the "1"?
<ajaiswal> Ox0dea: yes that too
<ajaiswal> i have updated the gist
<jtdoncas> Ox0dea: yes
<jtdoncas> Ox0dea: line method_added, included, method_missing, etc... ?
<jtdoncas> like*
<pontiki> don't worry, a filesystem will always be finite
axsuul has quit [Ping timeout: 250 seconds]
<pipework> pontiki: But your mom might not be! (I'm so sorry)
<Ox0dea> pipework: No man is an island... except your mom.
zenguy_pc has quit [Read error: No route to host]
<al2o3-cr> ajaiswal: totaltest is always going to be 38
<pipework> Ox0dea: ho ho ho!
<bnagy> I am extremely unimpressed with using $? and also using the exit status of grep
<ajaiswal> al2o3-cr: yes.. so if the grep i success, it should increment the successtest
<Ox0dea> pipework: I thought I was so clever too, but somebody said it on some random forum eight years ago.
<ght> Question: I have an array of values I'm iterating through by myarray.each do |element|, and I'd like to split the elements via element.split("-") (as all values are a string with a dash in the middle), take that two-part array and dynamically add it to an associative array, where split element[0] is the key and split element[1] is the value.
<pontiki> pulling up a directory of files, though, will likely take longer than the heat-death of the universe
<pontiki> so it won't matter in the end
<bnagy> ght: Hash or to_h should help
braincrash has quit [Quit: bye bye]
<ght> Does anyone have any documentation on dynamically creating a hash like that?
<bnagy> >> Hash([1,2])
<ruboto> bnagy # => can't convert Array into Hash (TypeError) ...check link for more (https://eval.in/382197)
<ajaiswal> bnagy: can you point with better solution ?
<bnagy> I suck
_seanc_ has joined #ruby
<ght> lol
<bnagy> >> Hash(*[1,2])
balazs has joined #ruby
<ruboto> bnagy # => wrong number of arguments (2 for 1) (ArgumentError) ...check link for more (https://eval.in/382198)
<bnagy> o_0
<bnagy> dis mah rage face
<al2o3-cr> ajaiswal:
krz has joined #ruby
<Ox0dea> >> strs = ['foo-bar', 'baz-quux']; Hash[strs.map { |s| s.split('-') }]
<ruboto> Ox0dea # => {"foo"=>"bar", "baz"=>"quux"} (https://eval.in/382199)
<Ox0dea> ght: ^
<bnagy> augh syntax
<ght> Very nice, thank you.
<bnagy> too much !ruby
<ajaiswal> al2o3-cr: hmm.. so the output which i'm expecting is totalcount/successtest
zenguy_pc has joined #ruby
<al2o3-cr> ajaiswal: just do successtest += 1 instead of suc = successtest += 1
towski_ has quit [Remote host closed the connection]
<al2o3-cr> then change suc to sucesstest
<ajaiswal> al2o3-cr: yep. i did that too.. its still returning 38/01
zenguy_pc has quit [Read error: Connection reset by peer]
<al2o3-cr> then you system command isn't right
<ght> Hmm, that hash statement doesn't seem to be altering anything.
braincrash has joined #ruby
zenguy_pc has joined #ruby
<ght> Should I be assigning a variable to that Hash[strs.map statement?
<bnagy> probably?
<bnagy> or using it immediately
kekumu has quit [Quit: kekumu]
<al2o3-cr> Ox0dea: to_h, pfft..
<ght> Yup, that did it.
charliesome has joined #ruby
<bnagy> if you're using each as you're iterating something else then it might actually be easier just to fill an existing hash
<ght> Awesome work, thank you Ox0dea
<bnagy> basically map and create a hash OR each and add to an existing one
bgmarx has joined #ruby
<Ox0dea> ght: Happy to help.
<Ox0dea> 19>> [[1, 2], [3, 4]].to_h
<ruboto> Ox0dea # => undefined method `to_h' for [[1, 2], [3, 4]]:Array (NoMethodError) ...check link for more (https://eval.in/382200)
<Ox0dea> al2o3-cr: ^
svf has quit [Quit: Lost terminal]
bgmarx has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
saadq has quit []
gr33n7007h has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
sharpmachine has quit [Read error: Connection reset by peer]
<gr33n7007h> ajaiswal: it's 4 o'clock here :(
ZOMGITSABEAR has joined #ruby
michael_mbp has joined #ruby
<ZOMGITSABEAR> hi guys
<gr33n7007h> o/
<ZOMGITSABEAR> \o
<ZOMGITSABEAR> i'm interested in persuing a career in system administration
<ZOMGITSABEAR> and for that, i've read that i need to know ruby pretty well
shock_one has joined #ruby
gr33n7007h is now known as al2o3-cr
<al2o3-cr> ajaiswal: put your counter out of the loop
<Ox0dea> ZOMGITSABEAR: We are here to teach you everything you need to know.
<ajaiswal> al2o3-cr: ok
<RickHull> including the spelling of "pursue" xD
<ZOMGITSABEAR> so to a person that has no experience in programming, how do i get started?
<Ox0dea> ajaiswal: `cat *.xml | grep -c 'failures="0"'` will give you the number of failures, and `ls *.xml | wc -l` will give you the total.
<Ox0dea> Use the right tool for the job.
<RickHull> ZOMGITSABEAR: http://pine.fm/ is a good start
<RickHull> oops, wrong link
<ZOMGITSABEAR> also i was wondering
<ZOMGITSABEAR> what all can i do with ruby
balazs has quit [Remote host closed the connection]
<ZOMGITSABEAR> once i learn it
<Ox0dea> Almost nothing.
krz has quit [Ping timeout: 272 seconds]
dopie has joined #ruby
<RickHull> and everything, all at once
<ZOMGITSABEAR> explain
<RickHull> ruby is turing complete
<ZOMGITSABEAR> meaning?
<RickHull> meaning any computation can be expressed in ruby
<ZOMGITSABEAR> ...meaning?
<RickHull> meaning there are no limits to what you can compute with ruby
<RickHull> aside from the limits of computation
<ZOMGITSABEAR> so i can create IRC bots in ruby if i wanted to
<ajaiswal> Ox0dea: i will use linux command..
<Ox0dea> ajaiswal: It just makes sense in this case.
<RickHull> ZOMGITSABEAR: indeed
<al2o3-cr> ajaiswal: don't need to
<Ox0dea> Should.
<bnagy> Ox0dea: the logic is the inverse of that though
balazs has joined #ruby
<Ox0dea> grep has -v.
<RickHull> ZOMGITSABEAR: the best way to learn a language is to start with a project -- a problem that needs solving
darkf has joined #ruby
<al2o3-cr> Ox0dea: ok
rkazak has joined #ruby
<bnagy> I agree that it's better to have one line of shell than 17 lines of rubyperl though
nb_bez___ has quit [Quit: Connection closed for inactivity]
shock_one has quit [Ping timeout: 255 seconds]
<al2o3-cr> he might of wanted to learn ruby though?
<Ox0dea> > might of
sharpmachine has joined #ruby
<ajaiswal> yeah.. i would love to get it done through ruby.. but its just taking lot of time to get me working..
<Ox0dea> ajaiswal: If that's the case, why are you shelling out to grep?
<bnagy> ajaiswal: that's because you don't really understand what you're doing
nobitanobi has joined #ruby
Spami has joined #ruby
<Ox0dea> Ruby in 2015 is the PHP of 2005. :(
<bnagy> it would be easier if you wrote the code yourself, step by step
<ajaiswal> i would rather start small,rather then jumping directly in
<Ox0dea> "How did this happen? Who's to blame?"
* al2o3-cr hides
<ajaiswal> Ox0dea: al2o3-cr bnagy thanks for the supports..
<al2o3-cr> ajaiswal: lets go through this in baby steps
<Ox0dea> Dir['*.xml'].partition { |f| File.read(f)[/failures="0"/] }.map(&:size)
dopieee has joined #ruby
<Ox0dea> ajaiswal: That's an "idiomatic" way to do it with pure Ruby.
<Ox0dea> It returns a two-element array containing the number of successes and failures, respectively.
<ZOMGITSABEAR> sorry, had to go do something
<ZOMGITSABEAR> what kind of problem?
<al2o3-cr> Ox0dea: did i say baby steps
<Ox0dea> al2o3-cr: I must've missed that part.
<al2o3-cr> :P
balazs has quit [Remote host closed the connection]
<bnagy> I want to hate it but it's not even bad. None of it is obscure ruby.
<bnagy> unlike $? :P
<Ox0dea> bnagy: I mean, at least it mirrors the shell variable?
<al2o3-cr> >> $/.ord
<ruboto> al2o3-cr # => 10 (https://eval.in/382209)
someword has joined #ruby
<bnagy> Ox0dea: and yet it doesn't! Because it returns some done class instead of an int
<bnagy> *dumb
<Ox0dea> Fair enough.
krz has joined #ruby
haxrbyte_ has quit [Ping timeout: 255 seconds]
ozzloy has quit [Remote host closed the connection]
dopie has quit [Ping timeout: 264 seconds]
ozzloy has joined #ruby
yeticry has quit [Ping timeout: 256 seconds]
yeticry has joined #ruby
<pontiki> it's analogous
<pontiki> not the same as
ducklobster has joined #ruby
<bnagy> I think the premise of "not bad because similar to a shell variable" is deeply flawed
<ZOMGITSABEAR> ruby's current stable is 2.2.2
<ZOMGITSABEAR> the tutorial is in 2.1.2
<Ox0dea> bnagy: Are you a Windows user?
<ZOMGITSABEAR> safe to download 2.2.2?
<ZOMGITSABEAR> yes, win 8.1
<Ox0dea> ZOMGITSABEAR: Use trunk.
<ZOMGITSABEAR> trunk?
<pontiki> yes, it's save to use the stable
<pontiki> safe
<ZOMGITSABEAR> ok
<Ox0dea> It's also safe to use trunk. :)
bkxd has quit [Ping timeout: 246 seconds]
sharpmachine has quit [Remote host closed the connection]
<ZOMGITSABEAR> what is trunk?
<bnagy> Ox0dea: only for finding bugs on
AlexRussia has quit [Ping timeout: 245 seconds]
<al2o3-cr> so 1.8 isn't the shizzle?
<pontiki> fo shizzle on yo mizzle
nobitanobi has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 276 seconds]
<al2o3-cr> pontiki: muzzle?
* pontiki shuts up
<ZOMGITSABEAR> also, would it be useful to learn how to compile .exes?
<Ox0dea> bnagy: Have you ever passed arguments to a visibility modifier?
<bnagy> are we playing drinking games now?
bruno- has joined #ruby
haxrbyte has joined #ruby
<al2o3-cr> bnagy: i'll go first :)
wldcordeiro_ has quit [Ping timeout: 265 seconds]
jcaho has joined #ruby
michael_mbp has quit [Excess Flood]
AlexRussia has joined #ruby
michael_mbp has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
gix has quit [Ping timeout: 264 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Casty has joined #ruby
bkxd has joined #ruby
<shevy> yay!
<shevy> drinking games
<shevy> you pass me the drinks
<shevy> and I drink!
jacaho0 has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
<bnagy> suits me, I overdid it this weekend anyway :(
<bnagy> plus it's like 11am
gix has joined #ruby
nobitanobi has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dopieee has quit [Quit: This computer has gone to sleep]
dylanhart has joined #ruby
<Ox0dea> Sometimes it's not five o'clock anywhere.
pepperbreath has joined #ruby
RegulationD has joined #ruby
<al2o3-cr> >> [(class G; end; g = G.new; g.singleton_class), method(:inspect).owner]
<ruboto> al2o3-cr # => [#<Class:#<G:0x40923b88>>, #<Class:#<Object:0x4094ee3c>>] (https://eval.in/382210)
<Ox0dea> al2o3-cr: What are you on about?
<al2o3-cr> can anyone explain that to me?
krisquigley has joined #ruby
attlasbot has joined #ruby
<Ox0dea> You expected them to be the same?
<al2o3-cr> no
oo_ has quit [Remote host closed the connection]
<Ox0dea> To what purpose did you include main's singleton class?
workmad3 has joined #ruby
<al2o3-cr> just want to know ?
<al2o3-cr> Ox0dea: you know?
<Ox0dea> I understand Ruby's object model, if that's what you're asking.
<al2o3-cr> please elaborate?
<Ox0dea> Let me think of a particularly illustrative example.
<Aeyrix> Is there a way to initiate TLS on an already established socket?
RegulationD has quit [Ping timeout: 240 seconds]
<Ox0dea> Aeyrix: That's askin' for trouble, innit?
<Aeyrix> Absolutely not.
drewo has joined #ruby
dopieee has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
torpig has quit [Ping timeout: 265 seconds]
kies has joined #ruby
<Ox0dea> >> x = 'foo'; def x.bar; :baz end; x.bar
<ruboto> Ox0dea # => :baz (https://eval.in/382211)
<Ox0dea> >> x = 'foo'; class << x; def bar; :baz end end; x.bar
<bnagy> Aeyrix: as a client or a server?
<ruboto> Ox0dea # => :baz (https://eval.in/382212)
<Aeyrix> bnagy: client
jcaho has quit [Read error: No route to host]
<Ox0dea> al2o3-cr: Defining a method on an object's singleton class defines the method for that object and that object alone.
jcaho has joined #ruby
mary5030 has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 264 seconds]
<bnagy> Aeyrix: ugh.. don't know offhand, but you should be able to use the same approach
<Aeyrix> bnagy: pls explain process
torpig has joined #ruby
<Aeyrix> thanks dawg
<bnagy> the trick is the start_immediately = false
drocsid has joined #ruby
<al2o3-cr> Ox0dea: how did you learn rubyso well?
<Ox0dea> The magic of literacy, dear friend.
djbkd has joined #ruby
<al2o3-cr> Ox0dea: you must be older than ruby itself to learn that
<Ox0dea> Ruby's only twenty?
mike___1234 has quit [Ping timeout: 250 seconds]
<al2o3-cr> wow, quick typer
<al2o3-cr> Ox0dea: sure you're not a bot?
<Ox0dea> No, I'm not sure I'm not a bot.
* shevy has doubts
<al2o3-cr> Ox0dea: compute 45 << 2
<Ox0dea> 180.
<shevy> lol
<al2o3-cr> bot
<al2o3-cr> lol
<Ox0dea> It's multiplication!
<al2o3-cr> jk
<al2o3-cr> Ox0dea: 345**34
<al2o3-cr> ?
<al2o3-cr> quick
<Ox0dea> For what it's worth, I'm not convinced any of us isn't a bot.
<al2o3-cr> how did the bot say that?
<Ox0dea> NLTK is good.
mike___1234 has joined #ruby
<al2o3-cr> got some random quotes too :)
<al2o3-cr> dta my friends
zotherstupidguy has joined #ruby
datanoise has quit [Ping timeout: 252 seconds]
attlasbot has quit [Quit: Leaving]
<ajaiswal> Ox0dea: its returning 28 and 10.. i got that 28 got matched, so what the other 10. ?
<Ox0dea> ajaiswal: Guess.
<ZOMGITSABEAR> wait
<ZOMGITSABEAR> if you're all bots
Scroff has joined #ruby
pepperbreath1 has joined #ruby
<ZOMGITSABEAR> then how do i know that i'm not a bot
<ZOMGITSABEAR> keanuwoah.jpg
<al2o3-cr> ZOMGITSABEAR: you don't
<Ox0dea> /ignore add ZOMGITSABEAR
toretore has quit [Quit: This computer has gone to sleep]
<ajaiswal> Ox0dea: i guess the inverse one ?
<ajaiswal> ok got it
zotherstupidguy has quit [Client Quit]
<Ox0dea> ajaiswal: It's the ones that didn't match 'failures="0"'.
imperator has quit [Quit: Valete!]
<ajaiswal> Ox0dea: yep.. just got that..
<Aeyrix> bnagy: Worked it out, I think.
<Aeyrix> Seems easy, actually.
<Ox0dea> Aeyrix: We should race.
<Aeyrix> OpenSSL::SSL::SSLSocket.new takes an IO object.
<Aeyrix> ... such as Socket::TCPSocket
<Aeyrix> Ox0dea: Race what?
<Ox0dea> You're a pretty speedy typist.
<Aeyrix> Oh.
<Ox0dea> "There's punctuation and everything!"
<Aeyrix> I use speech to text. :x
<Ox0dea> Hax!
<Aeyrix> Everything I type is words out of my mouth.
<Aeyrix> I have a mechanical microphone using Cherry MX cones.
pepperbreath has quit [Ping timeout: 252 seconds]
<al2o3-cr> pfft..
<Ox0dea> Delicious.
<shevy> wat
<Aeyrix> shevy: Did I stutter?
<Ox0dea> Did he stutter?
<Ox0dea> >03 mechanical microphone
<shevy> he types like John Cleese speaks
<Ox0dea> It's so good.
Scroff has quit [Ping timeout: 245 seconds]
<al2o3-cr> hey, nothing wrong with a bit of cheese
<bnagy> Aeyrix: cool.
<Aeyrix> bnagy: I'm actually surprised that was that easy to be honest. :v
<bnagy> going down to Socket means you can't use a Context I think
<Aeyrix> bnagy: Come again?
<bnagy> which can be annoying depending what you're doing
<Aeyrix> I was asking for a friend, literally.
houhoulis has quit [Remote host closed the connection]
<Aeyrix> So if you could explain the side effects that'd be great.
bgmarx has joined #ruby
<bnagy> well there's an openssl thing called a Context which has assorted ssl options and config
<bnagy> as a client you probably don't need it
theery has joined #ruby
<Aeyrix> It's still an OpenSSL-wrapped object.
<bnagy> might want to check that verification and such is set correctly though
<bnagy> like you have to have a ctx internally somewhere, but I'm guessing you get one with default options
<bnagy> long story short, should be fine, on current ruby
pontiki has quit [Quit: <poit>]
<Aeyrix> Hmm.
<bnagy> they underped some options at some point
ledestin has joined #ruby
<Aeyrix> You can pass ctx though.
someword has quit [Quit: Leaving.]
braincra- has joined #ruby
bgmarx has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<bnagy> ahhh there. OK. :)
CloCkWeRX has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
crazydiamond has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 264 seconds]
braincrash has quit [Ping timeout: 276 seconds]
gaboesquivel has quit [Ping timeout: 265 seconds]
chette has joined #ruby
<al2o3-cr> o/
yfeldblum has quit [Ping timeout: 256 seconds]
<Aeyrix> \o
<shevy> \o/
drewo has quit [Ping timeout: 240 seconds]
<shevy> we here on #ruby are the most cheerful crowd
Rollabunna has quit [Ping timeout: 265 seconds]
rkazak has quit [Quit: Sleep.....ing....]
<al2o3-cr> we're the bomb!!!
ylla has joined #ruby
<bnagy> watchlist
<al2o3-cr> gotta go 5:22 zzzzzzzzz
cirn0 has quit [Remote host closed the connection]
<RickHull> al2o3-cr: i'm sorry we can't let you leave at this time. we require clarification regarding your statement about bomb possession
dopieee has quit [Quit: This computer has gone to sleep]
sdothum has quit [Ping timeout: 276 seconds]
<RickHull> yes you are being detained; no you are not under arrest; no you do not have the right to consult with legal counsel
<Aeyrix> ok
<al2o3-cr> bomb in my country means bail
<al2o3-cr> and bail mean trev
<al2o3-cr> work that one out
<phat4life> bomb means dank, or awesome
balazs has joined #ruby
<phat4life> often used with ass: bomb ass chicken wings
<Aeyrix> ass-chicken
<al2o3-cr> phat4life: don't mention chicken at this time in the morning :(
<phat4life> Aeyrix: yeah don't use a hyphen
<RickHull> al2o3-cr: what do your roosters say?
<RickHull> cock-a-doodle-doo?
cirn0 has joined #ruby
<havenwood> this would be on-topic in #ruby-offtopic
<al2o3-cr> RickHull: Sriracha
<RickHull> havenwood: you're diminishing our cheer content
tds5016 has joined #ruby
<Aeyrix> havenwood: I thought the general rule was "its okay if it isn't infringing on someone getting help"?
scripore has quit [Quit: This computer has gone to sleep]
<Aeyrix> I mean, that's what two other ops told me.
<Aeyrix> Please clarify.
<RickHull> can we get a ruling here?
<al2o3-cr> why don't we all go to offtopic?
<RickHull> mods pls
<havenwood> It's on-topic in offtopic. I'm not calling it against the rules.
<havenwood> Just looking to get some folk there. ;)
gambl0r3 has joined #ruby
skade has joined #ruby
tkuchiki has joined #ruby
<RickHull> that's how I understood it. noting the better locus without shutting down the current locus
<tds5016> Speaking of people who need help :-). I have a rails project that has gems that have css...
dgutierrez1287 has joined #ruby
<Ox0dea> Discussing offtopic is off-topic.
<tds5016> I want to switch to using grunt over asset pipeline....
<Aeyrix> tds5016: #RubyOnRails :>
<al2o3-cr> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<tds5016> is there a way to get access to those files in grunt that anyone knows of?
<Aeyrix> Only because #ruby contains a lot of people that don't use Rails.
<tds5016> oh :-/. okay.
JoshGlzBrk has joined #ruby
<RickHull> yup, sriracha is fine. but rails, whoah no
<Aeyrix> So #ror is way better in terms of quality of help
<Aeyrix> RickHull: It's a quality-of-assistance thing.
<tds5016> no worries. Thanks much.
<RickHull> i know, i'm being silly
<al2o3-cr> RickHull: which one?
<phat4life> tds5016: i can help maybe
<tds5016> I like ruby, but hate rails to be honest... lol. so there's that.
datanoise has joined #ruby
<RickHull> tds5016: cool, hang out here. but also get rails help in #ror
<tds5016> phat4life: okay, I have a few gems (select2, etc.) that provide CSS/SASS files.
<phat4life> ah never mind cant help
<phat4life> we use webpack
<tds5016> I have grunt currently compiling all my sass.
Casty has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> RickHull: rooster/flying goose?
<RickHull> al2o3-cr: sorry, what?
<tds5016> lol. I've been using browserify :-) but I support the use of web pack as well :-)
<al2o3-cr> RickHull: rooster/flying goose?
<RickHull> al2o3-cr: yeah, still not sure what you're getting at
<al2o3-cr> nvm
<phat4life> we have a rails backend, webpack react.js front end, the rest is a ruby mess
cirn0 has quit [Remote host closed the connection]
<RickHull> al2o3-cr: my rooster comment was poking fun at the absurdity of having a bad association with chickens and morning time
dopieee has joined #ruby
<RickHull> geese and ducks, fair game i suppose
<al2o3-cr> RickHull: i know, don't worry
skysploit has joined #ruby
skysploit has joined #ruby
rbowlby has joined #ruby
dgutierrez1287 has quit [Ping timeout: 252 seconds]
<RickHull> what is al2o3-cr anyway? chromium aluminum oxide?
scripore has joined #ruby
<al2o3-cr> RickHull: shhh...
<RickHull> from my cycling experience, al is popular, as is CrMo
<RickHull> al2o3-cr: you know about the dangers of DHMO?
<RickHull> be careful, it's a scary world out there
<Ox0dea> I know people who literally drink the stuff!
<RickHull> crazies!!
<al2o3-cr> RickHull: nothing bothers me, nor should it bother others
<RickHull> that stuff will kill you, literally
<tds5016> phat4life: nice. I'm in the process of getting us over to backbone.
Lucky__ has joined #ruby
<RickHull> Ox0dea: i bet they don't inhale it or inject it, do they?
[k- has joined #ruby
<tds5016> for the front-end. everything 1/3 of the site is ROR server-side rendered. lol. Once I get the models working with backbone I think I'm going to be trying to get over to react for the views and just using backbone models.
datanoise has quit [Ping timeout: 245 seconds]
<al2o3-cr> ruby == al2o3-cr
<RickHull> oh shit, right
* RickHull presents noggin for impact with cluestick
tds5016 has left #ruby [#ruby]
j4cknewt has joined #ruby
rbowlby has quit [Remote host closed the connection]
oo_ has joined #ruby
<al2o3-cr> o/ oo_ :)
krz has quit [Quit: WeeChat 1.0.1]
gambl0r3 is now known as higuys
higuys has quit []
<RickHull> /o\ # could've been worse
oo_ has quit [Remote host closed the connection]
gambl0re has quit [Quit: Bye]
gambl0re has joined #ruby
j4cknewt has quit [Ping timeout: 252 seconds]
chinmay_dd has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 265 seconds]
<Ox0dea> Pop quiz! Which uses more memory, the whole Gem module or the main thread?
spider-mario has quit [Ping timeout: 256 seconds]
<shevy> Gem
oo_ has joined #ruby
<al2o3-cr> thread
<shevy> the more gems the slower ruby will be
scripore has quit [Quit: This computer has gone to sleep]
<RickHull> what is the main thread doing?
<al2o3-cr> RickHull: everyting
spider-mario has joined #ruby
<RickHull> then clearly it is the answer
<RickHull> everything > anything
vdamewood has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> lol
<al2o3-cr> anything < everything
freerobby has quit [Read error: Connection reset by peer]
<Ox0dea> >> require 'objspace'; (os=ObjectSpace).each_object.sort_by { |o| os.memsize_of o }.last(2)
<ruboto> Ox0dea # => [<RubyVM::InstructionSequence:<class:Specification>@/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/ ...check link for more (https://eval.in/382225)
freerobby1 has joined #ruby
<Ox0dea> ruboto: Spoiler alert, mate!
tkuchiki has quit [Remote host closed the connection]
<Ox0dea> Interesting. The second-last is Gem on my machine, but it's Gem::Specification on Charlie's server.
<Ox0dea> What does that mean?
<Ox0dea> >> require 'objspace'; (os=ObjectSpace).each_object.sort_by { |o| os.memsize_of o }.last(2).map { |o| os.memsize_of o }
minmax has joined #ruby
<ruboto> Ox0dea # => [27952, 525104] (https://eval.in/382231)
<Ox0dea> Ruby threads are so heavy. :(
bb010g has joined #ruby
<chette> how do I use irb without starting an irb session?
<Ox0dea> chette: That's not what you mean.
<shevy> lol
<Ox0dea> ruby -e 'ruby goes here'
<shevy> how do I start a car without an engine
<chette> lol
<shevy> both ruby and irb.rb have help menus btw; ruby --help; irb.rb --help like --noprompt
jenrzzz has joined #ruby
<chette> I suppose I mean to ask what's the best method for running irb concurrently with another ruby program program
freerobby has joined #ruby
<chette> so that my main program isn't being prompted with the prompt
<Ox0dea> chette: Are you fine with shelling out?
<chette> yes
freerobby1 has quit [Ping timeout: 245 seconds]
<chette> currently I have a method that implements a server
<chette> and a client
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<chette> but I want a cleaner way
<Ox0dea> You'll probably want Open3, then.
lavros has joined #ruby
yfeldblum has joined #ruby
simplyianm has joined #ruby
hanmac has joined #ruby
A205B064 has joined #ruby
rkazak has joined #ruby
oo_ has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 250 seconds]
<chette> thanks dea
oo_ has joined #ruby
<al2o3-cr> o/ oo_ :)
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
revath has joined #ruby
segfalt has quit [Ping timeout: 276 seconds]
Guest60 has joined #ruby
neanderslob has quit [Remote host closed the connection]
rkazak has left #ruby [#ruby]
skade has quit [Quit: Computer has gone to sleep.]
Guest50 has joined #ruby
LetErikTry has quit [Quit: sleep]
neanderslob has joined #ruby
Guest50 has quit [Max SendQ exceeded]
theery has quit []
rbowlby has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
krz has joined #ruby
shock_one has joined #ruby
astrobunny has quit [Ping timeout: 256 seconds]
bkxd has joined #ruby
Guest60 has quit [Quit: Textual IRC Client: www.textualapp.com]
Wintooshock has quit [Read error: Connection reset by peer]
joaomdmoura has quit [Max SendQ exceeded]
bkxd has quit [Ping timeout: 272 seconds]
<flughafen> morning
mleung has joined #ruby
axsuul has joined #ruby
chette has left #ruby [#ruby]
<al2o3-cr> o/
mleung has quit [Client Quit]
bronson has joined #ruby
<havenwood> g'evenin
<shevy> flughafen! ready for take-off?
<flughafen> sup havenwood shevy
<flughafen> i'm not ready for anything
<shevy> lol
<havenwood> \o/
bronson has quit [Ping timeout: 276 seconds]
freerobby has quit [Quit: Leaving.]
wldcordeiro_ has joined #ruby
pepperbreath1 has left #ruby [#ruby]
<Ox0dea> havenwood: What should private(:foo, :bar) return?
tkuchiki has joined #ruby
<havenwood> Ox0dea: hem
_ht has joined #ruby
<al2o3-cr> >> :foo
<Ox0dea> I'm think 0 and 2+ should just return the module as they do now.
<ruboto> al2o3-cr # => :foo (https://eval.in/382256)
<Ox0dea> +ing
<al2o3-cr> :)
lxsameer has joined #ruby
allomov has joined #ruby
<havenwood> Ox0dea: but then it seems consistent to just always do that
<Ox0dea> Huh?
arescorpio has quit [Quit: Leaving.]
<Ox0dea> I'm modifying it to permit decoration of methods with explicit visibility.
datanoise has joined #ruby
mleung has joined #ruby
mleung has quit [Client Quit]
RegulationD has joined #ruby
<Ox0dea> At least, I'll be running the idea by the issue tracker.
<Ox0dea> >> def decorate m; "decorated #{m}" end; decorate private def foo; end
<ruboto> Ox0dea # => "decorated Object" (https://eval.in/382257)
<Ox0dea> That's a surprising result in my opinion.
krisquigley has joined #ruby
towski_ has joined #ruby
tagrudev has joined #ruby
<al2o3-cr> Ox0dea: why is that surprising?
<Ox0dea> >> def decorate m; "decorated #{m}" end; decorate def foo; end
<ruboto> Ox0dea # => "decorated foo" (https://eval.in/382260)
<Ox0dea> Because that isn't.
dylanhart has quit [Remote host closed the connection]
workmad3 has joined #ruby
<al2o3-cr> Ox0dea: it's private
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<Ox0dea> The "subject" of an explicit visibility modification should be the method whose visibility is being modified.
<havenwood> Ox0dea: Then you could waffle on which you wanted: private public private def foo
<al2o3-cr> >> def decorate m; "decorated #{m}" end; decorate public def foo; end
<ruboto> al2o3-cr # => "decorated Object" (https://eval.in/382261)
<Ox0dea> havenwood: Aye, Ruby gives us the power to be very silly.
<Ox0dea> That is not, in my opinion, a point against extending the language's expressiveness.
revath has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
revath has joined #ruby
<shevy> havenwood haha I also used a similar statement above
swgillespie has joined #ruby
<al2o3-cr> some ruby voodoo
<shevy> krowv any progress with ruby-gtk?
<shevy> private public private monster <T> def foo # :nodoc
baweaver has quit []
workmad3 has quit [Ping timeout: 264 seconds]
<al2o3-cr> mysteria lane :)
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pragmatism has joined #ruby
<Ox0dea> shevy: The best bit? That's not a syntax error.
balazs has quit [Remote host closed the connection]
<Ox0dea> >> T, monster = 0, 0; def false.>(_) _ end; private public private monster <T> def foo; end
<ruboto> Ox0dea # => Object is not a symbol nor a string (TypeError) ...check link for more (https://eval.in/382266)
gianlucadv has joined #ruby
pragmatism has quit [Client Quit]
<shevy> man
<shevy> I used to think that hanmac is crazy
<shevy> but you are even crazier than hanmac
<Ox0dea> What makes hanmac crazy?
<shevy> you seem to not know him!
<Ox0dea> Indeed I do not.
<shevy> hanmac, please explain to Ox0dea why you are considered to be crazy
<al2o3-cr> hanmac: is the one!
<shevy> I have to leave in 9 minutes, then it's 08:00
Channel6 has quit [Quit: Leaving]
revath has quit [Read error: Connection reset by peer]
revath has joined #ruby
wldcordeiro_ has quit [Quit: Konversation terminated!]
riotjones has joined #ruby
edwinvdg_ has joined #ruby
patrickanth0ny has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ciao.]
<Ox0dea> shevy: The guy seems to have a thorough understanding of Ruby's string methods.
<Ox0dea> Why is that crazy?
edwinvdgraaf has quit [Ping timeout: 252 seconds]
<al2o3-cr> >> private.extend(Math); public.send :sin, (666) # exercise those demons
<ruboto> al2o3-cr # => -0.01764164581327013 (https://eval.in/382277)
joaomdmoura has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 276 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
zivix has joined #ruby
<Ox0dea> al2o3-cr: Why the verbosity? As it stands, private and public are essentially just synonyms for self.
A124 has joined #ruby
<al2o3-cr> you don't have to tell me
<Ox0dea> The question remains.
<al2o3-cr> verbosity my second name
towski_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
masone has joined #ruby
revath has quit [Quit: Leaving.]
patrickanth0ny has joined #ruby
revath has joined #ruby
<al2o3-cr> >> [*1..49].sample(6).sort # lucky lotto numbers
<ruboto> al2o3-cr # => [9, 10, 34, 40, 42, 47] (https://eval.in/382290)
roolo has joined #ruby
segfalt has joined #ruby
Musashi007 has quit [Quit: Musashi007]
podman has quit [Quit: Connection closed for inactivity]
emilkarl has joined #ruby
dopieee is now known as dopie
codecop has joined #ruby
Notte has joined #ruby
emilkarl has quit [Client Quit]
sigurding has joined #ruby
mister_solo has joined #ruby
Notte has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
emilkarl has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
last_staff has joined #ruby
michael_mbp has quit [Excess Flood]
bkxd has joined #ruby
djbkd has quit [Remote host closed the connection]
michael_mbp has joined #ruby
keen_________ has joined #ruby
keen________ has quit [Read error: Connection reset by peer]
blue_deref has quit [Quit: bbn]
sandstrom has joined #ruby
mister_solo has quit [Ping timeout: 245 seconds]
Rollabunna has joined #ruby
blue_deref has joined #ruby
solars has joined #ruby
andikr has joined #ruby
Rollabunna has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby
ramfjord has joined #ruby
solars has quit [Client Quit]
solars has joined #ruby
aganov has joined #ruby
acke has joined #ruby
bruno- has joined #ruby
nobitanobi has quit [Remote host closed the connection]
wildroman2 has joined #ruby
mister_solo has joined #ruby
kies has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby
vdamewood has quit [Ping timeout: 265 seconds]
bruno- has quit [Ping timeout: 255 seconds]
kies has joined #ruby
stardiviner has quit [Ping timeout: 276 seconds]
datanoise has quit [Ping timeout: 244 seconds]
stan has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
lxsameer has joined #ruby
konsolebox has joined #ruby
Musashi007 has joined #ruby
mister_solo has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
oo_ has quit [Remote host closed the connection]
klaas has quit [Remote host closed the connection]
simplyianm has quit [Remote host closed the connection]
fabrice31 has joined #ruby
_seanc_ has quit [Quit: _seanc_]
oo_ has joined #ruby
rdark has joined #ruby
amclain has quit [Quit: Leaving]
musgravejw has joined #ruby
revath has quit [Ping timeout: 256 seconds]
iamninja has joined #ruby
ndrei has joined #ruby
oo_ has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
fedexo has quit [Ping timeout: 256 seconds]
nofxx has quit [Ping timeout: 276 seconds]
oo_ has joined #ruby
klaas has joined #ruby
musgravejw has quit [Ping timeout: 264 seconds]
michaeldeol has joined #ruby
lavros has quit [Ping timeout: 276 seconds]
lavros has joined #ruby
strixd has joined #ruby
fabrice31 has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
pyon has joined #ruby
theog has joined #ruby
pyon is now known as Guest98438
Guest98438 has quit [Changing host]
Guest98438 has joined #ruby
Guest98438 has quit [Client Quit]
systemd0wn has quit [Ping timeout: 265 seconds]
pyon has joined #ruby
theog has quit [Client Quit]
hubcaps has joined #ruby
k3asd` has joined #ruby
systemd0wn has joined #ruby
haxrbyte has quit [Ping timeout: 272 seconds]
torpig has quit [Ping timeout: 276 seconds]
revath has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
CalvinnHobbes has quit [Ping timeout: 244 seconds]
Palmer11 has quit [Quit: Palmer11]
haxrbyte has quit [Ping timeout: 264 seconds]
A124 has quit [Quit: Luke's IRC Client v0.94 build 682]
stardiviner has joined #ruby
alex88 has joined #ruby
troulouliou_dev has joined #ruby
RickHull has left #ruby [#ruby]
mister_solo has joined #ruby
msgodf has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
duderonomy has joined #ruby
<certainty> moin
<al2o3-cr> o/
<certainty> \o
lavros has quit [Ping timeout: 265 seconds]
<al2o3-cr> how ya doin certainty ?
lavros has joined #ruby
<certainty> al2o3-cr: alright, starting the day
pppt has joined #ruby
<al2o3-cr> i'm dropping sleep ay keyboard here :(
RegulationD has joined #ruby
vdamewood has joined #ruby
<al2o3-cr> need sleep
livathinos has joined #ruby
krisquigley has joined #ruby
edwinvdgraaf has joined #ruby
drewo has joined #ruby
workmad3 has joined #ruby
ylla has quit [Ping timeout: 264 seconds]
<al2o3-cr> i'll see you around like a walnut, i'm working on remote control and out on my legs
Forgetful_Lion has joined #ruby
fabrice31_ has joined #ruby
oo_ has quit [Remote host closed the connection]
antgel has joined #ruby
dgutierrez1287 has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
datanoise has joined #ruby
drewo has quit [Ping timeout: 264 seconds]
krisquigley has quit [Ping timeout: 276 seconds]
fabrice31_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
fabrice31 has joined #ruby
vdamewood has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
vinleod has joined #ruby
Hounddog has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
dgutierrez1287 has quit [Ping timeout: 264 seconds]
tsvenson has quit [Quit: Leaving]
datanoise has quit [Ping timeout: 252 seconds]
dopie has quit [Quit: This computer has gone to sleep]
oo_ has joined #ruby
torpig has joined #ruby
<yorickpeterse> morning children
Hounddog has quit [Ping timeout: 244 seconds]
dhjondoh has joined #ruby
<ZOMGITSABEAR> morning stranger
doertedev has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hounddog has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
fabrice31_ has joined #ruby
happyface has quit [Quit: Connection closed for inactivity]
futilegames has joined #ruby
Macaveli has joined #ruby
<Ox0dea> yorickpeterse: How do you feel about visibility modifiers returning their argument if called with just the one?
Pupeno_ has quit [Quit: Leaving...]
fabrice31 has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
micmus has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
michaeldeol has joined #ruby
lkba has joined #ruby
pwnz0r has joined #ruby
michaeldeol has quit [Client Quit]
fabrice31_ has quit []
<livcd> what should i use for manipulating the DB in Ruby ? The dbi or is there some alternative ?
Scroff has joined #ruby
<maloik> the Sequel gem is pretty popular
<maloik> livcd: ^
adac has joined #ruby
langlands has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
<livcd> maloik: thanks
fabrice31 has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
bruno- has joined #ruby
fujimura has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
joonty has joined #ruby
krisquigley has joined #ruby
anisha has joined #ruby
DEA7TH has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
bruno- has quit [Ping timeout: 255 seconds]
valkyrka has joined #ruby
pwnz0r has quit [Remote host closed the connection]
dumdedum has joined #ruby
tesuji has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pwnz0r has joined #ruby
tedstriker has joined #ruby
fabrice31 has quit [Remote host closed the connection]
intinig has joined #ruby
fabrice31 has joined #ruby
postmodern has quit [Quit: Leaving]
alem0lars__ has joined #ruby
pwnz0r has quit [Ping timeout: 252 seconds]
gianlucadv has quit [Remote host closed the connection]
tcarter1719 has joined #ruby
andikr has quit [Remote host closed the connection]
denver has joined #ruby
auzty has quit [Ping timeout: 265 seconds]
spider-mario has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
konieczkow has quit [Read error: Connection reset by peer]
gianlucadv has joined #ruby
psy_ has joined #ruby
RazorX has quit [Ping timeout: 276 seconds]
haxrbyte_ has joined #ruby
AnoHito has quit [Quit: Leaving]
chinmay_dd has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
kith_ has joined #ruby
cowcow has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
bkxd has quit [Ping timeout: 272 seconds]
haxrbyte_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
RazorX has joined #ruby
haxrbyte has joined #ruby
starfox_sf has quit [Ping timeout: 245 seconds]
cowcow has quit [Client Quit]
TheHodge has joined #ruby
Rollabunna has joined #ruby
<yorickpeterse> Ox0dea: eh?
axl_ has joined #ruby
Zai00 has joined #ruby
surrounder has joined #ruby
surrounder has left #ruby [#ruby]
nux443 has quit [Ping timeout: 276 seconds]
bronson has quit [Ping timeout: 265 seconds]
chinmay_dd has quit [Remote host closed the connection]
<stardiviner> the channel #ruby-lang is deprecated ?
<sevenseacat> it's been merged with this one.
AnoHito has joined #ruby
<stardiviner> great.
<flughafen> hey sevenseacat how is it going?
AlphaAtom has joined #ruby
<flughafen> did you make it through all of flula's vids?
<sevenseacat> flughafen: i am sick :( and no! no i have not yet
chinmay_dd has joined #ruby
<flughafen> sevenseacat: that sucks. sick with what?
Igorshp has joined #ruby
kith has quit [Read error: Connection reset by peer]
Liothen has quit [Ping timeout: 246 seconds]
snapcase has quit [Ping timeout: 246 seconds]
Rollabunna has quit [Ping timeout: 276 seconds]
<sevenseacat> just a cold-type thing, I caught it at railscamp on the weekend :(
marr has joined #ruby
timonv has joined #ruby
<flughafen> that sucks.
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
hotpancakes has quit [Remote host closed the connection]
gluten_hell_ has joined #ruby
sameerynho has joined #ruby
snapcase has joined #ruby
apoplexy has quit [Ping timeout: 252 seconds]
chinmay_dd has quit [Ping timeout: 240 seconds]
masone has quit [Quit: masone]
auzty has joined #ruby
hakunin has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 256 seconds]
allomov has joined #ruby
<Ox0dea> yorickpeterse: Method definition returns the defined as a symbol, letting us say, for instance, "private def foo...", which is pretty nice.
<Ox0dea> It also lets us approximate Python's decorators: "log_calls def foo...".
<Ox0dea> But we can't say "log_calls private def foo...".
<ljarvis> thank god
<silverdust> what's the difference between == and .eql? ?
<ljarvis> first google result
<silverdust> I've thought of them as the same and .eql? has failed me sometimes
<silverdust> ok thanks
quazimodo has quit [Ping timeout: 276 seconds]
tcarter1719 has quit [Quit: tcarter1719]
pyo_ has joined #ruby
charliesome has joined #ruby
dionysus69 has joined #ruby
fabrice31_ has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 240 seconds]
skade has joined #ruby
fabrice31 has joined #ruby
<Ox0dea> ljarvis: Would you mind elaborating on your opposition?
ta has quit [Remote host closed the connection]
emilkarl has quit [Quit: emilkarl]
crazyhorse18 has joined #ruby
ta has joined #ruby
revath has quit [Ping timeout: 246 seconds]
<crazyhorse18> for working with passenger would people recommend rbenv or rvm?
<ljarvis> Ox0dea: I think it'll lead to ugly code
<Ox0dea> ljarvis: We're all consenting adults.
<ljarvis> I'm glad you have faith
<yorickpeterse> Ox0dea: I never had the need for decorators like that
<yorickpeterse> I do think it will lead to weird looking code
<Ox0dea> It's certainly something of an edge case, but that it's not supported feels inconsistent.
lkba_ has joined #ruby
musgravejw has joined #ruby
nux443 has joined #ruby
emilkarl has joined #ruby
<Ox0dea> That it returns the module under modification is effectively useless, since that'll either be self or the object on which you explicitly called the modifier.
ndrei has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
chinmay_dd has joined #ruby
<ljarvis> but should it return an array or a single symbol
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> I've asked that question several times now, to no avail.
<ljarvis> the obvious would be an array, but that might be confusing
<ljarvis> probably more useful than self though i agree
<Ox0dea> No, I think it makes sense to only special case the one-argument call.
<ljarvis> maybe this is why it doesn't do that :)
ndrei has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
<Ox0dea> Ruby is replete with special cases, if that's the point you meant to make.
<Ox0dea> If you otherwise intended to imply that accounting for the change would be tricky, my patch is essentially one additional line.
<ljarvis> my point was that the solution isn't obvious
<Ox0dea> Return *argv if argc is 1, else the module.
musgravejw has quit [Ping timeout: 255 seconds]
<ljarvis> have you suggested it to redmine?
<Ox0dea> I had hoped to acquire some feedback here before doing so.
senayar has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
<ljarvis> I guess my feedback would be that I don't care about "foo(private(....))" but that the behaviour is probably more sensible than returning the module. Then again, it's not a method call..
futilegames has joined #ruby
<Ox0dea> It is a method call.
<ljarvis> right that was poorly worded. I thought it was a keyword too though
<yorickpeterse> honestly I feel "private" is supposed to return a Method
<yorickpeterse> not a Symbol
<Ox0dea> yorickpeterse: But then shouldn't method definition return a Method?
ndrei has quit [Ping timeout: 256 seconds]
<yorickpeterse> e.g. in Rubinius we return a CompiledCode IIRC, allowing for more complex stuff like this
slucx has joined #ruby
<yorickpeterse> Ox0dea: probably
<Ox0dea> This has all been said before with regard to method definition.
ndrei has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
<Ox0dea> That *method* visibility modifiers don't return "methods" is anomalous and counter-intuitive.
jenrzzz has joined #ruby
<yorickpeterse> correct
timonv has quit [Ping timeout: 245 seconds]
<yorickpeterse> both "def" and "private/public/protected" should in my opinion return the method object they operate on
<yorickpeterse> also "def" really should've been a method
<yorickpeterse> same goes for private/public/protected
<Ox0dea> Now you're in the sky.
<yorickpeterse> "class" can easily be made a method too
Rollabunna has joined #ruby
hakunin has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* yorickpeterse may or may not have had too much of the Smalltalk koolaid
<Ox0dea> Methods are defined too frequently and their return values utilized too rarely to justify the cost of returning anything but a primitive.
<yorickpeterse> also hey I got an invite to the Ruby rogues podcast
<yorickpeterse> Ox0dea: there's exactly 0 overhead in returning a usable object
<yorickpeterse> because the object is already allocated anyway
bkxd has joined #ruby
<Ox0dea> Yes, I suppose that's the case.
northfurr has quit [Quit: northfurr]
<Ox0dea> yorickpeterse: Do you know who'll be your co-panelists?
<yorickpeterse> Not besides the usual suspects
mister_solo has quit [Ping timeout: 245 seconds]
<yorickpeterse> https://github.com/YorickPeterse/oga/issues/107#issuecomment-112270213 also yay aws-sdk v2 will support Oga
<yorickpeterse> seems this work might finally start to pay off
<yorickpeterse> now if only sferik could merge my multi_xml pull-request
bkxd has quit [Ping timeout: 256 seconds]
<Ox0dea> sferik was recently seen fraternizing with the enemy.
<Ox0dea> (I speak, in jest, of Crystal.)
<yorickpeterse> oh yeah, Crystal looks interesting
<yorickpeterse> I'm curious though how they're doing multi-threading with a GC in LLVM
<yorickpeterse> since LLVM's GC support is pretty meh for GCs
<yorickpeterse> errrr for multi-threading
<Ox0dea> The project seems to pay little heed to memory consumption. :/
skade has joined #ruby
<Ox0dea> Still, compiled "Ruby" is such a wonderful notion; I don't understand why it's still essentially unknown.
LiquidInsect has quit [Ping timeout: 276 seconds]
<canton7> because, in the world of compiled languages, ruby's a new concept that's contending with much more established players?
<valkyrka> I’m having issues installing Redmine apparently because of a gem version conflict
<valkyrka> does anyone know how to solve this?
<yorickpeterse> Ox0dea: a lot of the features of Ruby are very hard to translate to a compiled language
<canton7> valkyrka, did you try what was suggested?
<valkyrka> yes, but I still get the same error
<canton7> pastie?
<canton7> (the output from that shouldn't include the 'In snapshot (Gemfile.lock)' bit)
mister_solo has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
<valkyrka> I even removed the Gemfile.lock before I ran it
<canton7> now the output of 'rake -T' again?
<canton7> since now you've got i18n 0.6.11 in your Gemfile.lock, not 0.7.0
<yorickpeterse> Ox0dea: e.g. Object.define_method is very difficult in any compiled language
proteusx is now known as acsigusz
<yorickpeterse> or Object.eval with a String
<valkyrka> just a sec
rubie has joined #ruby
<yorickpeterse> also nobody likes dealing with Ruby's encoding system
<canton7> it also pops up at a time that people are getting excited about rust and nim
bayed has joined #ruby
<yorickpeterse> well, Crystal has been around for a while
<yorickpeterse> I recall seeing stuff about it at least well over a year ago
<yorickpeterse> and nim only recently gotten more popular
<canton7> valkyrka, try 'bundle exec rake -T'
senayar has joined #ruby
<canton7> I came across nim shortly before I came across crystal - that's probably just me having my ear to slower news channels, but it may be more typical for a layman
_blizzy_ has quit [Ping timeout: 256 seconds]
<valkyrka> and this is the output when ran w/ trace
_blizzy_ has joined #ruby
RegulationD has joined #ruby
dfockler has joined #ruby
arup_r has joined #ruby
rbowlby has quit [Remote host closed the connection]
quimrstorres has joined #ruby
platzhirsch has joined #ruby
minmax has quit [Quit: WeeChat 0.4.3]
Scrofff has joined #ruby
andikr has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
dfockler has quit [Ping timeout: 255 seconds]
Scroff has quit [Ping timeout: 246 seconds]
stardiviner has quit [Ping timeout: 252 seconds]
bob_f has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
fabrice31_ has joined #ruby
multi_io has quit [Ping timeout: 276 seconds]
ndrei has joined #ruby
multi_io has joined #ruby
pyon has quit [Quit: fix config]
fabrice31 has quit [Ping timeout: 256 seconds]
stardiviner has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
pyon has joined #ruby
bruno- has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
shortCircuit__ has joined #ruby
<shortCircuit__> hi
<shortCircuit__> what can be a better syntax to write https://gist.github.com/argentum47/68e74a2fc4fca3c86617
startupality has joined #ruby
Scrofff has quit [Read error: Connection reset by peer]
riotjones has quit [Quit: Leaving...]
acarpe has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
_blizzy_ has quit [Ping timeout: 255 seconds]
mechanicles has joined #ruby
revath has joined #ruby
<jhass> shortCircuit__: what's current_tenant? why do you have to define the empty hashes and only fill the values for one?
<Ox0dea> shortCircuit__: You have several extraneous "end"s that constitute syntax errors.
<jhass> huh?
<Darkwater> Ox0dea: where?
<Ox0dea> Sorry, I'm tired.
<Ox0dea> Gonna head off to bed now.
<Darkwater> lol
<jhass> shortCircuit__: I think you got a design problem there, you have data which you embed in your code and you'll have to touch the code when the data changes
slucx has quit [Remote host closed the connection]
<Ox0dea> Seeing "end" right before "elsif" is rare enough that it tripped me up.
<jhass> shortCircuit__: start by pulling these values int a DB, JSON or YAML file, that should clean the code up automatically
<jhass> *into
<jhass> Ox0dea: weirichs rule ftw ;D
<Ox0dea> Ha! I'm so glad he has a rule.
Scroff has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Scroff has quit [Ping timeout: 264 seconds]
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
acarpe has quit [Quit: acarpe]
bruno- has joined #ruby
tkuchiki has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
hardlin3r has joined #ruby
Scroff has joined #ruby
rubie has quit [Remote host closed the connection]
acarpe has joined #ruby
wildroman2 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
Lector has quit [Remote host closed the connection]
wildroman2 has joined #ruby
fabrice31_ has quit [Ping timeout: 244 seconds]
hakunin has quit [Remote host closed the connection]
Papierkorb has joined #ruby
tkuchiki has joined #ruby
ahmetkapikiran has joined #ruby
DLSteve has joined #ruby
Igorshp has quit [Remote host closed the connection]
bob_f has left #ruby [#ruby]
revath has quit [Ping timeout: 246 seconds]
A205B064 has quit [Ping timeout: 256 seconds]
<strixd> Is it possible to alias a instance method to a class method
sigurding has quit [Quit: sigurding]
revath has joined #ruby
<ljarvis> strixd: just call the class method inside your instance method
<ljarvis> you could add a helper method for doing it, but no there is nothing built in
<strixd> what is you wanted both Foo.new.bar and Foo.bar to be the same thing
<ljarvis> they can't be the same thing
<ljarvis> but one method could call another
<Darkwater> which mean they can do the same thing
<ljarvis> the way i just described
<Darkwater> (probably)
<strixd> can i call the instance method from the class?
starfox_sf has joined #ruby
<ljarvis> that doesn't really make sense
<Darkwater> if you have an instance, sure
<ljarvis> but if you instantiate a new instance, yes
<Darkwater> maybe we can help you better if you describe what you want
<strixd> nice ty I get it
<strixd> thanks
Soda has joined #ruby
blackmesa has joined #ruby
Zai00 has quit [Quit: Zai00]
roshanavand has joined #ruby
roshanavand has quit [Max SendQ exceeded]
roshanavand has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
starfox_sf has quit [Ping timeout: 256 seconds]
fabrice31 has quit [Remote host closed the connection]
hardlin3r has quit [Quit: Leaving]
auzty has quit [Quit: Leaving]
mechanicles has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 265 seconds]
LiquidInsect has joined #ruby
Igorshp has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
hectortrope has joined #ruby
roshanavand has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
pontiki has joined #ruby
revath has left #ruby [#ruby]
Akagi201 has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> aww yiss, 2nd Aeron arriving this Thursday
<yorickpeterse> that only took over a month to ship
arup_r has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
<ddfreyne> yorickpeterse: Are you so fat that you need two Aeron chairs?
<yorickpeterse> oooooooooooh
<yorickpeterse> But no, I ordered one for my office
stamina has joined #ruby
<adaedra> fat joke
crazyhorse18 has quit [Ping timeout: 265 seconds]
_blizzy_ has joined #ruby
patrickanth0ny has quit [Ping timeout: 265 seconds]
<yorickpeterse> ugh, Delegator's source code is.....hmrpf
emilkarl has quit [Quit: emilkarl]
<yorickpeterse> e.g. it extends BasicObject, duplicates Kernel, undefs a bunch of methods and then includes said dup
fabrice31 has joined #ruby
Xeago has quit [Remote host closed the connection]
<yorickpeterse> though at least it does that upon loading the class and not during runtime
tkuchiki has quit [Remote host closed the connection]
emilkarl has joined #ruby
<yorickpeterse> what the hell does that even do
jesterfraud has joined #ruby
<yorickpeterse> oh what the, that patches an error backtrace
<apeiros> yorickpeterse: "clean" the backtrace
glcx has quit [Quit: byebye~~]
bruno- has quit [Ping timeout: 250 seconds]
vinleod is now known as vdamewood
unshadow has quit [Ping timeout: 256 seconds]
lavros has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
hedgecore_ has joined #ruby
hedgecore has quit [Ping timeout: 252 seconds]
lavros has joined #ruby
unshadow has joined #ruby
quimrstorres has quit [Remote host closed the connection]
Jackneill has joined #ruby
ta has quit [Remote host closed the connection]
<jesterfraud> so do people have a lot of success with non-rails web frameworks in Ruby?
<jesterfraud> interested in broadening horizons
quimrstorres has joined #ruby
hedgecore has joined #ruby
crazyhorse18 has joined #ruby
<pontiki> how would you measure success, jesterfraud ?
<jesterfraud> pontiki, has been successfully used in production sounds reasonable?
<valkyrka> http://pastebin.com/xsSyBkme - why does it complain about that?
<ruboto> valkyrka, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/17f59008344c745d7e02
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<valkyrka> oupsie
futilegames has joined #ruby
Igorshp has quit [Remote host closed the connection]
<valkyrka> https://gist.github.com/anonymous/83fe32aa1daada8d73be is showing when I try to install a Redmine plugin
<valkyrka> the 3rd line of /var/www/html/redmine/config/application.rb looks like this
hedgecore_ has quit [Ping timeout: 265 seconds]
<valkyrka> require 'rails/all'
<valkyrka> what should I be installing? I am guessing it doesn’t like the fact that it doesn’t specify a version?
pppt has quit [Ping timeout: 250 seconds]
<pontiki> jesterfraud: there are certainly far fewer production apps running sinatra than there are of rails, but there are some really solid ones
<jesterfraud> it's not that, it's just that it can't find the rails gem, at a guess
<jesterfraud> pontiki, Sinatra is good, but I find I just try to rebuild Rails in it. Any other popular ones?
alem0lars__ has quit [Quit: Leaving]
alem0lars__ has joined #ruby
<pontiki> volt looks promising
allcentury has joined #ruby
<valkyrka> I’m running irb
<valkyrka> and it was able to load it it seems
<jhass> valkyrka: bundle exec irb too?
<valkyrka> irb(main):003:0> require 'rails/all' => true
jenrzzz has joined #ruby
arup_r has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
<valkyrka> let me see
<valkyrka> hm
quimrsto_ has joined #ruby
<jesterfraud> pontiki, I'm more a fan of the SPA <-> API Server approach, personally.
mathie has quit [Quit: Quitting...]
<valkyrka> you’re right
<valkyrka> it gives out the same error, but why?
<jhass> valkyrka: bundle install went through without errors?
<valkyrka> yes :(
Igorshp has joined #ruby
mathie has joined #ruby
<jhass> gem -v, bundle -v ?
<pontiki> jesterfraud: can i assume you've looked at rails-api ?
<jesterfraud> pontiki, you can indeed
<jesterfraud> doesn't suit things like Doorkeeper though, as an aside
<jesterfraud> because it assumes non-api app :(
decoponio has joined #ruby
<jhass> valkyrka: uh, your Gemfile doesn't list rails
<jesterfraud> huh
<jesterfraud> yup
Azure has joined #ruby
<jhass> valkyrka: that seems to be a very short Gemfile for something like Redmine
<jhass> did you mess with it?
<jesterfraud> yup
quimrstorres has quit [Ping timeout: 265 seconds]
<jesterfraud> valkyrka, the original Gemfile includes a LOT more: https://raw.githubusercontent.com/redmine/redmine/master/Gemfile
ixti has joined #ruby
<valkyrka> no, I just added the rake gem
<valkyrka> because it was missing
<valkyrka> well, that’s for a plugin
<valkyrka> it’s not for the whole redmine install
<jesterfraud> are you in the root folder of the app?
<jesterfraud> so the directory at the base of Redmine?
blackmesa has quit [Ping timeout: 265 seconds]
<jhass> valkyrka: fact is that you're trying to load Rails without having it in your Gemfile, that this fails is completely expected
joonty has joined #ruby
<valkyrka> I am in the plugin folder
<valkyrka> just a sec
jenrzzz has quit [Ping timeout: 272 seconds]
phutchins has joined #ruby
<jhass> this seems to get very specific to developing redmine plugins, did you try #redmine ?
<jhass> that doesn't state "cd into the just extracted folder"
<jhass> so don't
<valkyrka> oh
<jhass> try the commands at redmines root
oo_ has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
emilkarl has quit [Quit: emilkarl]
<valkyrka> oh, wow
<valkyrka> :)
<valkyrka> that was it!
Darryl___ has joined #ruby
ta has joined #ruby
blackmesa has joined #ruby
futilegames has quit [Quit: futilegames]
revath1 has joined #ruby
<valkyrka> thanks a million guys, sorry for the confusion
<valkyrka> guess I was overthinking it
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
lkba has joined #ruby
<jhass> yeah, could've just watched the video :P
denver has quit [Remote host closed the connection]
nonparfumee has joined #ruby
sarkyniin has joined #ruby
acarpe has quit [Quit: acarpe]
sarkyniin has quit [Read error: Connection reset by peer]
sarkyniin has joined #ruby
langland_ has joined #ruby
blue_deref has quit [Quit: bbn]
sarkyniin has quit [Remote host closed the connection]
lkba_ has quit [Ping timeout: 240 seconds]
sarkyniin has joined #ruby
<valkyrka> oh, damn!
lavros has quit [Quit: leaving]
langlands has quit [Ping timeout: 255 seconds]
langlands has joined #ruby
chinmay_dd has joined #ruby
sarkyniin has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
ndrei has joined #ruby
langland_ has quit [Ping timeout: 256 seconds]
sarkyniin has joined #ruby
CloCkWeRX has joined #ruby
justintv90 has quit [Remote host closed the connection]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
rodfersou has joined #ruby
tkuchiki_ has joined #ruby
segfalt has quit [Quit: segfalt]
RegulationD has joined #ruby
sarkyniin has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
volty has joined #ruby
emilkarl has joined #ruby
hedgecore has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
sarkyniin has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
sarkyniin has quit [Remote host closed the connection]
bennyhallett has joined #ruby
AugustoCesar has joined #ruby
haxrbyte has joined #ruby
hoov has joined #ruby
sarkyniin has joined #ruby
konieczkow has joined #ruby
psmolen has quit [Ping timeout: 265 seconds]
sigurding has joined #ruby
AugustoCesar has left #ruby [#ruby]
haxrbyte_ has joined #ruby
rodfersou has quit [Quit: leaving]
edwinvdgraaf has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
psmolen has joined #ruby
konieczkow has quit [Ping timeout: 265 seconds]
CloCkWeRX has quit [Ping timeout: 264 seconds]
skade has joined #ruby
sdegutis has joined #ruby
<sdegutis> Is Ruby a decent language for parsing an HTML file?
<jhass> nokogiri is a decent libxml2 binding, so probably yes
j4cknewt has joined #ruby
rodfersou has joined #ruby
<sdegutis> It's not *that* well structured.
<sdegutis> For example I need to delete everything before the first <h1>
CloCkWeRX has joined #ruby
e1nh4nd3r has quit [Quit: Leaving.]
quazimodo has joined #ruby
<sdegutis> How do you do that without resorting to regex?
quimrsto_ has quit [Remote host closed the connection]
<jhass> I'd try a xpath that selects them and .remove or .each(&:remove) or something
<sdegutis> Ideally I'd use this line if it were possible: string.delete_up_to('<h1>')
hedgecore has joined #ruby
<jhass> do you have some examples?
<volty> h1 is inside what ?
acke has quit [Read error: Connection reset by peer]
j4cknewt has quit [Ping timeout: 265 seconds]
acke has joined #ruby
<GarethAdams> sdegutis: so you want to delete the opening <body> tag but not the closing </body> tag?
haxrbyte has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
<volty> what is before h1 is either a node (same level tag) or attributes, or cdata, so iterate till h1 and delete what is before, or export the rest
<sdegutis> GarethAdams: well later I also want to delete everything starting at <div class="pub"> which includes the closing body tag
<jhass> sdegutis: so you want to extract a fragment
<jhass> that's much simpler
<sdegutis> Basically I want to get all this text and turn it into LaTex
<sdegutis> Programmatically.
givello has joined #ruby
<sdegutis> It's.... terrifying.
bMalum has joined #ruby
<sdegutis> I talked to the guy who runs this website. He said /there are no source files/.
tsvenson has joined #ruby
<sdegutis> He just edits a bunch of .htm files, and has for 20 years.
<sdegutis> For an entire encyclopedia worth of text.
* sdegutis facepalmed hard
<adaedra> html to latex?
<volty> you'll better study nokogiri (and parsing xml in general)
<adaedra> maybe pandoc does it
banister has joined #ruby
<givello> Hey there, I'm kind of a beginner with ruby and here's a quick question: I've got a class A that I want to be able to initialize from either a String or another object of type A. How can I overload initialize ?
<sdegutis> adaedra: no I want to customize the LaTeX that comes out
<sdegutis> volty: I trust nokigiri just fine, it's this source code I'm not sure I trust to have balanced HTML
blackmesa has quit [Quit: WeeChat 1.2]
<jhass> require "open-uri"; require "nokogiri"; doc = Nokogiri::HTML(open("http://www.newadvent.org/fathers/01281.htm", &:read)); File.write("extracted", doc.css("#springfield2").children.to_s)
<jhass> feed to pandoc
<sdegutis> jhass: actually I may try that
<volty> givello: def initialize ... case arg.class; when String ...; when A .... end --- something like that
<sdegutis> If only because I want to see how awful pandoc does it so I know what problems to avoid myself
hoov has quit [Quit: Leaving]
<jhass> volty: givello no need for the .class; just case arg; when String; ... when A; ... end
Abhijit has joined #ruby
<givello> volty: good idea
<volty> jhass is right
<givello> Thank you both :)
<jhass> givello: though you may want to copy with dup instead and define initialize_copy
<givello> So no method overloading in ruby then
<volty> me was wrong, if you go with case arg.class you need to_s ( that's wrongheading)
yoongkang has quit [Remote host closed the connection]
acke has quit [Remote host closed the connection]
<givello> jhass: I'll look into that
ahmetkapikiran has joined #ruby
Cust0sLim3n has quit [Ping timeout: 245 seconds]
<Abhijit> hello
qwertme has joined #ruby
acke has joined #ruby
charliesome has quit [Quit: zzz]
<jhass> hi
allcentury has quit [Ping timeout: 265 seconds]
barkerd427 is now known as zz_barkerd427
Cust0sLim3n has joined #ruby
skade has quit [Ping timeout: 252 seconds]
<volty> Some with sxperience in mixing c++ & ruby? 1. the interpreter (on rb_eval_string....) does not autoload gems, so have to require rubygems. And I am curious how it goes / should go 2. on require 'nokogiri', I have undefined Encoding: UTF-7 exception
but3k4 has joined #ruby
<jhass> maybe just shell out... :P
<volty> jhass: no way, I need it from inside. I have (I want) to mix c++ qt and qtbindings calls (do on the gui from the both sides)
<yorickpeterse> volty: you can use rb_require() to load any Gems you might need
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aapole has joined #ruby
quimrstorres has joined #ruby
nickjj has quit [Ping timeout: 240 seconds]
nickjj has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<volty> yorickpeterse: most requries are inside ruby source. Moving them out over-complicates. But it's ok since require 'rubygems' works (for now). I was just curious. As for the nokogiri, there are other problems too — no way to use it with qtbindings, must be something with name collision
<yorickpeterse> volty: what the heck are you trying to do?
negev has joined #ruby
cosmicexplorer has joined #ruby
nateberkopec has joined #ruby
<negev> hi, using erubis to run ruby as a cgi, how do you include another .erb file as a kind of partial view? when i do: puts Erubis::FastEruby.new(File.read('menu.erb')).result(binding()) it nukes any html that was in the original index.erb before the call
<Aeyrix> volty: ...
<Aeyrix> uhhhhhh
<volty> mixing calls from qtbindgins and c++ qt — or, in general, moving (some parts) towards c++. Done starting the qt from the ruby side, but now I have to go the other way (and hook qtbindings to alreay initialized appliction from c++).
arup_r has quit [Remote host closed the connection]
hedgecore has quit [Quit: leaving]
<yorickpeterse> That makes no sense
arup_r has joined #ruby
<yorickpeterse> As in, the way that was written
RazorX has quit [Ping timeout: 245 seconds]
k3asd` has quit [Ping timeout: 252 seconds]
arup_r has quit [Remote host closed the connection]
knikolov has left #ruby ["WeeChat 1.3-dev"]
sdegutis has left #ruby [#ruby]
aapole has quit [Ping timeout: 244 seconds]
starfox_sf has joined #ruby
k3asd` has joined #ruby
arup_r has joined #ruby
<yorickpeterse> For one, MRI has no decent embed API so that's already going to be a nightmare
<yorickpeterse> Second, replacing Ruby "require" calls with rb_require() isn't going to yield you any real performance benefits
<volty> myEdit.new(); myEdit.show() — ruby side; myEdit is implemented in c++; accessed (findWidget by name) and used from the ruby side // now think of vise versa
<yorickpeterse> It's far easier to keep the Ruby code as Ruby and just run it
sdothum has joined #ruby
hedgecore has joined #ruby
<yorickpeterse> It's also far easier to expose C/C++ to Ruby and not the other way around
<volty> easier? not at all, not stable enough
<yorickpeterse> e.g. the GC will make your life miserable
<volty> as for the what is easier to expose I (as stated) already know that (because I have done it)
<yorickpeterse> "not stable enough"?
haxrbyte has quit [Ping timeout: 265 seconds]
<yorickpeterse> what does that even mean?
<volty> qtbindings isn't stable enough
bronson has joined #ruby
<volty> simple
<yorickpeterse> ...ehm, how does calling the same Ruby code from C++ make any difference?
<yorickpeterse> Are you writing your own Qt bindings?
Abhijit has quit [Quit: Bye.]
<volty> and there are some speed problems (e.g. syntax highlighter). Anyway I want to try this. It's done if I succeed to hook to the Qt::Application from the ruby side.
[k- has quit [Remote host closed the connection]
<volty> no.
starfox_sf has quit [Ping timeout: 276 seconds]
RazorX has joined #ruby
<yorickpeterse> You're literally making absolutely zero sense
<volty> I'd prefer reimplenting ruby using (base) qt libraries
<yorickpeterse> lol
<yorickpeterse> I hope you have a few years for that
<volty> lol, little honey. Go your own way and leave me going my own.
jcaho has quit [Read error: Connection reset by peer]
<yorickpeterse> In that case I suggest not asking questions in here
jcaho has joined #ruby
<volty> You are small coin. You argue without knowing about what.
<yorickpeterse> I'm pretty familiar with the C API
<Darkwater> lol
<yorickpeterse> Having written my fair share of code for it, working on implementing it in Rubinius, etc
<volty> live with your familiarity
<Darkwater> what is advice from someone experienced
acarpe has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
<yorickpeterse> Darkwater: yeah, clearly they know better
bronson has quit [Ping timeout: 245 seconds]
mister_solo has quit [Ping timeout: 245 seconds]
<yorickpeterse> volty: start by formulating a proper question because so far they've been too cryptic
<yorickpeterse> Maybe then somebody can answer you properly
<yorickpeterse> Because right now it sounds like you're trying to implement Ruby using C++/Qt, which is _a lot_ of work
<yorickpeterse> As in, years of work
<jhass> volty: yorickpeterse don't get ad hominem, I don't want to have remove either of you
fujimura has joined #ruby
<volty> the problem is too complex if you don't know the inners of qtbindings. Its you that starting questioning
<volty> I would have remained at my exposing of the initial question
<yorickpeterse> I'm well aware of what qtbindings does
<jhass> also I'd suggest you drop the metadiscussion, neither of you will gain anything from it
<yorickpeterse> I've looked into it in the past pretty extensively, hence I said it's a pain to do
<volty> but you don't know how qt works, how qtbindings programmatically allow you to locate your widgets
<yorickpeterse> Either way, calling back to Ruby from C++ is hard because the API doesn't expose anything remotely C++ like
Akagi201 has joined #ruby
<ddv> litle honey :-)
<yorickpeterse> volty: I suggest to stop making these assumptions
<volty> It was you that begin questioning.
ldnunes has joined #ruby
<volty> begun
<yorickpeterse> Yes, because your questions made no sense
<yorickpeterse> So I was asking what you're trying to achieve
<yorickpeterse> But you answer with only more cryptic answers
<yorickpeterse> also meeting, bbl
<volty> I answered. And you could limit yourself to simple advice, without posing as carapace.
jmignault has joined #ruby
<volty> the prob.. is too complex to answer in a clearer way. honey
<jhass> volty: seriously, last warning
skade has joined #ruby
<volty> jhass: as you please, since you didn't warned yorickpeterse's breaking eggs
<jhass> I did warn both of you
senayar has joined #ruby
fujimura has quit [Ping timeout: 256 seconds]
Igorshp has quit [Remote host closed the connection]
negev has left #ruby [#ruby]
pwnz0r has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
serivich has joined #ruby
<jesterfraud> someone remind me why I voluntarily joined this profession? :)
jds has quit [Quit: Connection closed for inactivity]
<ddv> money
<ddv> m0ney
allcentury has joined #ruby
<jesterfraud> ddv, hasn't worked that well thus far
<jhass> being praised like an artist?
dorei has joined #ruby
<jesterfraud> though, funnily enough, playing with that gem right now
* jhass coughs
<ddv> most will steal your code
<jesterfraud> Yeah. Praise. That's what my clients/bosses do. :)
pwnz0r has quit [Ping timeout: 252 seconds]
yoongkang has joined #ruby
diegoviola has joined #ruby
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
acovrig has joined #ruby
<ccooke> Hmm. Is there a working mmap gem for any recent Ruby?
<ccooke> the only one I can find hasn't been updated in years
<ddv> then no
<ccooke> Damn. Wonder how hard it would be to port to 2.2
startupality has quit [Quit: startupality]
<jesterfraud> one way to find out!
wjlroe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
j4cknewt has joined #ruby
quimrstorres has joined #ruby
banister has joined #ruby
noethics has quit [Quit: Leaving]
banister has quit [Max SendQ exceeded]
<ruboto> volty, as I told you already, please use https://gist.github.com
<volty> and it works
yeticry has quit [Ping timeout: 252 seconds]
malconis has joined #ruby
Bunnycat has joined #ruby
<Bunnycat> Hello
<Bunnycat> anyone lurking around?
<Darkwater> o/
quimrstorres has quit [Ping timeout: 240 seconds]
<Bunnycat> Hi Darkwater
spyderman4g63 has joined #ruby
<Darkwater> jesterfraud: I don't think you voluntarily joined this profession
<Bunnycat> does anyone have experience with having both pry-debugger and pry-byebug?
<Darkwater> the profession consumed you
<Darkwater> not me, sorry
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<jesterfraud> Darkwater, I think that's about right
<volty> Small, not useful, but sufficient to start with. And if it breaks somewhere, I will stop with it. I need only one thread. I need this only to move some pieces from ruby to c++, and start the app from c++. I hope that now I was quite clear. Thank you. :)
aryaching has joined #ruby
<Bunnycat> I have a Ruby2.0.0p0 environment, which cannot be changed at the moment due to legacy support of some of our scripts. We use pry to debug our ruby scripts. The problem is, if the pry-debugger and pry-byebug gems are installed, even if you specifically require only one of them in the code, binding.pry crashes
<Darkwater> volty: I don't understand what you're saying
<jesterfraud> Bunnycat, not specifically, but I have used gdb a tiny bit before (and used that knowledge to use bye-bug successfully a time or two)
<jesterfraud> Bunnycat, are both in the Gemfile?
<volty> Darkwater: have you done gui?
yfeldblum has quit [Ping timeout: 265 seconds]
<volty> inruby?
<jesterfraud> if so, do you have require: false on both of them?
<Darkwater> hm, not yet
Igorshp has quit [Remote host closed the connection]
bennyhallett has left #ruby [#ruby]
<volty> ok. you'll get it when you start :)
<Bunnycat> we don't use gemfiles to manage our projects. Is there a master gemfile where the gems are preloaded before running any scripts?
<jhass> Bunnycat: why are both installed anyway? you should have debugger installed for 1.9 only and byebug for 2.0+ only
<Bunnycat> jesterfraud: yes
hoov has joined #ruby
<jesterfraud> Bunnycat, no, if you don't have a gemfile, then it wouldn't be that...
symbol has joined #ruby
<jhass> well, maybe you should look into using Bundler
apt-get_ has joined #ruby
<jesterfraud> ^
<jhass> it's there to prevent issues like this
bMalum has quit [Quit: bMalum]
<Bunnycat> I'd happilly switch to byebug completely, problem is - we have scripts which have been frozen and use pry-debugger. pry-debugger is deprecated for anything post Ruby 2 and pry-byebug should take over
k3asd` has quit [Ping timeout: 256 seconds]
<Bunnycat> so we have stuff like
<Bunnycat> require 'pry'
<Bunnycat> require 'pry-debugger'
<jhass> if you have to use pry-debugger you can't use Ruby 2.0
<jhass> simple as that
<Bunnycat> require 'pry-rescue'
CloCkWeRX has quit [Ping timeout: 246 seconds]
<Bunnycat> pry-debugger still works for ruby 2.0
sgambino has joined #ruby
<jhass> but let me say that this policy is insanely stupid
<Bunnycat> it won't work for anything later
zz_barkerd427 is now known as barkerd427
<diegoviola> this company I am working for is awful, the boss ask their team members to "clean" shit at the office, what the hell is that? lol
rkazak has joined #ruby
<jhass> diegoviola: #ruby-offtopic ;)
<Bunnycat> For now we had to uninstall pry-byebug and fallback to pry-debugger
joonty has quit [Quit: joonty]
<Bunnycat> :c
<jesterfraud> Bunnycat, are you using rvm/rbenv/chruby?
sarkyniin has quit [Ping timeout: 264 seconds]
<jesterfraud> that might be the best way to handle 'frozen' scripts that expect requirements of a certain version
<dorei> diegoviola: i used to work for a company that had a nazi cleaning lady, she terrorized everyone to keep their desks clean :D
quimrstorres has joined #ruby
<diegoviola> dorei: I don't think they were referring about the desk
<Bunnycat> we use module to manage ruby versions
Igorshp has joined #ruby
<jhass> what's "module"?
<Bunnycat> we load ruby as a module
<jhass> ?!
<Bunnycat> so we can do "module unload [ruby-version]"
<jhass> what's "module"?
<Bunnycat> and then "module load [ruby-version]
<jhass> what's "module"?
<jhass> I'll keep doing that
yeticry has joined #ruby
<ddv> loop { puts "what's module?" }
<jhass> exactly
<Darkwater> $<.each_line { puts "what's module?" }
<Darkwater> (late but w/e)
<jesterfraud> that... seems like overkill
<jesterfraud> and a nightmare to manage across developers
chinmay_dd has quit [Remote host closed the connection]
<jhass> and it seems abandoned
<Bunnycat> we use module to load many other development toolchains since we have several versions
<jhass> doubt many people use it
<Bunnycat> I don't manage this place, so can't really say much about it :D
<Darkwater> by the way, slightly relevant, note that sourceforge is now a scam site, try to avoid it if you can
<dorei> i'm pretty shocked that at least one people is using it
<Bunnycat> is there a way to avoid pre-loading a gem on running a ruby script?
<jhass> my suggestion stands, sidestep that stuff and use Gemfile's and ideally bundle install --deployment for each application
<jesterfraud> Bunnycat, it shouldn't load them by default.
rkazak has left #ruby [#ruby]
<jesterfraud> However, your dependency management sounds like a minefield
<jhass> it's pry that loads all plugins that it can find
<jesterfraud> oh right
<jesterfraud> did not know that
<Bunnycat> oh
denver has joined #ruby
<jhass> bundle exec is a effective way to limit what it can see
<Bunnycat> is there a way to tell pry to not pre-load pry-debugger or pry-byebug?
<Bunnycat> right
<jesterfraud> jhass, I'm actually surprised by that :/
but3k4 has quit [Read error: Connection reset by peer]
nonparfumee has joined #ruby
but3k4 has joined #ruby
<jesterfraud> Bunnycat, would recommend bundler, it's pretty much standard
<Bunnycat> but will bundler help with legacy scripts?
skade has quit [Quit: Computer has gone to sleep.]
fabrice31 has quit [Remote host closed the connection]
<jhass> if you can modify their invocation, yes
<Bunnycat> ok, I'll look into it
<Bunnycat> thanks a bunch!
mujou has joined #ruby
<jesterfraud> This profession - people actually thank me for telling them they've done it wrong. Sometimes.
ringarin has joined #ruby
<Bunnycat> one more question
<Bunnycat> bundler seems to handle gem installation, no?
justintv90 has joined #ruby
<jhass> it can and is very often used to, but it's not required
<Bunnycat> we can't install/uninstall gems ourselves
<Bunnycat> we have to have our CAD team do that for us, since the ruby environment is global for everyone
<jhass> with bundler you could since you can choose an arbitrary location
<Bunnycat> so you can do it locally?
Akagi201 has quit [Read error: Connection timed out]
caseypatrickdris has joined #ruby
<jhass> bundle install --deployment for example would default to installing them to ./vendor/bundle
<jhass> (relative to the Gemfile)
fabrice31 has joined #ruby
<jhass> but it can reuse globally installed ones too
<jhass> it just limits what your application/script sees then
Akagi201 has joined #ruby
<Bunnycat> sounds lovely
fabrice31 has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 272 seconds]
bruno-_ has joined #ruby
fabrice31 has joined #ruby
denver has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 265 seconds]
davec_ has joined #ruby
droidburgundy has joined #ruby
melter has quit [Quit: Client exiting]
mrsolo has quit [Quit: Connection closed for inactivity]
konsolebox has quit [Quit: Leaving]
Xeago has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
gluten_hell_ has joined #ruby
chinmay_dd has joined #ruby
lkba has quit [Remote host closed the connection]
haxrbyte has joined #ruby
endash has joined #ruby
hectortrope has quit [Quit: WeeChat 0.4.2]
hoov has quit [Quit: Leaving]
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
haxrbyte_ has joined #ruby
denver has joined #ruby
bashusr has quit [Ping timeout: 256 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
centrx has joined #ruby
j4cknewt has quit [Remote host closed the connection]
symbol has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
Rollabun_ has joined #ruby
vudew has joined #ruby
rubie has joined #ruby
startupality has joined #ruby
gluten_hell_ has quit [Ping timeout: 265 seconds]
Xeago has quit [Ping timeout: 252 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rollabunna has quit [Read error: Connection reset by peer]
<vudew> /window new
haxrbyte_ has joined #ruby
mujou has quit [Quit: Leaving...]
dopie has joined #ruby
mujou has joined #ruby
malconis has joined #ruby
yardenbar has joined #ruby
malconis has quit [Remote host closed the connection]
Guest41146 has quit [Ping timeout: 256 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
Forgetful_Lion has quit [Remote host closed the connection]
<jesterfraud> oh, that reminds me of the time when someone sent a private message about not engaging the troll, but put a space in front of it
RegulationD has joined #ruby
haxrbyte_ has joined #ruby
mello has joined #ruby
haxrbyt__ has joined #ruby
tesuji has quit [Ping timeout: 256 seconds]
bwicklund has joined #ruby
AlphaAtom has joined #ruby
<Darkwater> /msg nickserv identify hunter1
apt-get__ has joined #ruby
mujou has quit [Client Quit]
mister_solo has joined #ruby
mujou has joined #ruby
malconis has joined #ruby
micmus has quit [Ping timeout: 272 seconds]
haxrbyte has quit [Ping timeout: 255 seconds]
volty has quit [Quit: Konversation terminated!]
* jesterfraud gets that reference
RegulationD has quit [Ping timeout: 255 seconds]
haxrbyte_ has quit [Ping timeout: 265 seconds]
mujou has quit [Client Quit]
mujou has joined #ruby
rubie has quit [Remote host closed the connection]
apt-get_ has quit [Ping timeout: 265 seconds]
bwicklund has left #ruby [#ruby]
<krisquigley> Slack or IRC?
zotherstupidguy has joined #ruby
<krisquigley> Which are you loyal to?
bwicklund has joined #ruby
<jesterfraud> uhh
<jesterfraud> depends what I'm doing
pontiki has quit [Quit: <poit>]
<jesterfraud> haven't found a good Slack team for outside of work
<jesterfraud> hence why I'm here
<krisquigley> lol
<krisquigley> theres a rails and ruby slack team
quimrstorres has quit [Remote host closed the connection]
bkxd has joined #ruby
<krisquigley> good thing about IRC is that anyone can join
sanguisdex has quit [Quit: Leaving.]
<krisquigley> slack is invite only
<jesterfraud> it has a lot of good (and bad) things
fujimura has joined #ruby
<krisquigley> that's what /kick and /ban is for though
wjlroe has joined #ruby
<krisquigley> Slack is pretty awesome though
<jesterfraud> I was more talking from a technical perspective
<jesterfraud> but sure
<jesterfraud> it has its uses
<krisquigley> Yeah, that's true
<jesterfraud> I'd still prefer an updated IRC protocol that doesn't make me weep when I consider writing an IRC client
<krisquigley> IRC can be daunting for newbies, especially less tech-savvy users
<krisquigley> lol
frog0909_ has quit [Remote host closed the connection]
<krisquigley> one for activecable!
rubie has joined #ruby
<Darkwater> you can use irc with a telnet client though
melter has joined #ruby
<Darkwater> which is cool
<Darkwater> I made a bot in bash using netcat
<bougyman> bloat.
<bougyman> gawk with raw sockets ftw
coderhs has joined #ruby
skyrocker has joined #ruby
sarkyniin has joined #ruby
fujimura has quit [Ping timeout: 276 seconds]
sanguisdex has joined #ruby
rbennacer has quit [Remote host closed the connection]
mdz_ has joined #ruby
rbennacer has joined #ruby
<jesterfraud> cat /dev/random >> /dev/irc
gluten_hell_ has joined #ruby
griffindy has joined #ruby
thelastinuit has joined #ruby
Muhannad has joined #ruby
micmus has joined #ruby
Marsupermammal has joined #ruby
mrmargolis has joined #ruby
apt-get__ has quit [Ping timeout: 265 seconds]
JoshL has joined #ruby
segfalt has joined #ruby
acke has quit [Quit: Leaving...]
InternetFriend has joined #ruby
mechanicles has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Muhannad has quit [Remote host closed the connection]
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
corehook has joined #ruby
konieczkow has joined #ruby
bkxd has joined #ruby
infoget has joined #ruby
marsjaninzmarsa has quit [Ping timeout: 265 seconds]
dopie has quit [Quit: This computer has gone to sleep]
marsjaninzmarsa has joined #ruby
konieczkow has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dblessing has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
<jhass> haha, seriously
* jesterfraud makes popcorn
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<adaedra> what did I miss?
axl_ has quit [Remote host closed the connection]
someword has joined #ruby
<yorickpeterse> Yeah
<yorickpeterse> it's a shame the MPL doesn't forbid the use of my name though
<jesterfraud> wow
<yorickpeterse> unless I can trademark my name
rubie has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
Marsupermammal has quit [Read error: Connection reset by peer]
<centrx> I already trademarked it sorry
<yorickpeterse> :<
yqt has joined #ruby
<adaedra> yorickpeterse™
hinbody has joined #ruby
<yorickpeterse> centrx: do you have a .ly domain already?
<yorickpeterse> shit, I should probably register yorickpeterse.sexy
ndrei has quit [Ping timeout: 265 seconds]
<jhass> .sucks ?
<jesterfraud> yorickpeter.sexy
hectortrope has joined #ruby
Bunnycat has quit [Quit: Page closed]
symbol has joined #ruby
<yorickpeterse> jhass: hurrr
<yorickpeterse> jesterfraud: yorick.peterse.sexy
<yorickpeterse> del.ici.us style
<yorickpeterse> errr del.icio.us
<yorickpeterse> I think
<jhass> so they didn't even realize you released af7f2674 in 1.0.3? :D
ndrei has joined #ruby
corehook has quit [Remote host closed the connection]
scripore has joined #ruby
mary5030 has joined #ruby
Muhannad has joined #ruby
allcentury has joined #ruby
infoget has quit [Ping timeout: 252 seconds]
startupality_ has joined #ruby
lkba has joined #ruby
senayar has quit [Remote host closed the connection]
<yorickpeterse> No idea, I blocked them
<yorickpeterse> (I think you can still read issues and such then)
CloCkWeRX has left #ruby [#ruby]
<adaedra> People are so wonderful
kies has quit [Ping timeout: 240 seconds]
startupality has quit [Ping timeout: 276 seconds]
startupality_ is now known as startupality
ziprar has joined #ruby
ziprar has joined #ruby
infoget has joined #ruby
Parker0 has joined #ruby
jesterfraud has quit [Ping timeout: 256 seconds]
caseypatrickdris has quit [Remote host closed the connection]
zipace has quit [Ping timeout: 255 seconds]
devdazed has joined #ruby
freerobby has joined #ruby
crazyhorse18 has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
senayar has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
diegoviola has quit [Quit: WeeChat 1.2]
pyroar has joined #ruby
corehook has joined #ruby
pyroar has quit [Client Quit]
ndrei has joined #ruby
gambl0re has quit [Ping timeout: 265 seconds]
diegoviola has joined #ruby
granthatcher has joined #ruby
starfox_sf has joined #ruby
northfurr has joined #ruby
thalassa has joined #ruby
Pupeno has quit [Quit: Leaving...]
<yorickpeterse> If it wasn't for some of the wonderful people I've come across I probably would've (╯°□°)╯︵ ┻━┻ and become a gardener instead
exadeci has joined #ruby
starfox_sf has quit [Ping timeout: 252 seconds]
<Darkwater> lu2
aryaching has quit [Ping timeout: 265 seconds]
darkf has quit [Quit: Leaving]
livathinos has quit [Read error: Connection reset by peer]
JEG2 has joined #ruby
darkf has joined #ruby
jesterfraud has joined #ruby
livathinos has joined #ruby
Ropeney has joined #ruby
Darryl___ has quit [Quit: Connection closed for inactivity]
<quazimodo> guys
someword has quit [Quit: Leaving.]
<quazimodo> do we have a super light weight object for holding onto larger collections of relatively dumb objects?
<quazimodo> sorry, to be elements of a collection
<yorickpeterse> You mean an array?
<quazimodo> It's late and i'm retarded
quimrstorres has joined #ruby
<quazimodo> i want lots (millions) of objects
<ljarvis> lol
<adaedra> Don't say that
<quazimodo> they have limited functionality
<ljarvis> sounds like you want an array
<quazimodo> what's the best objcet to use for tha
<adaedra> an array.
crazyhorse18 has joined #ruby
<yorickpeterse> quazimodo: your own class
<quazimodo> an array of what kind of objects though
<adaedra> õ_o
<yorickpeterse> quazimodo: do you want to have some object for every thing, or one object to store all things in?
<adaedra> an array of your dumb objects?
mujou has quit [Quit: Leaving...]
<quazimodo> ok yes
<quazimodo> now does ruby have a notion of a 'dumb' object
<ljarvis> i dont even
<quazimodo> something that takes less memory and has less infrastructure ?
<adaedra> what do you call a dumb object
<ljarvis> quazimodo: just use a class with the attributes you want
Kricir has joined #ruby
<quazimodo> yeah ok
<adaedra> if you just need attributes, look at Struct
<yorickpeterse> quazimodo: the methods and what not in an object don't directly dictate how heavy they are
<quazimodo> yorickpeterse: sure
<yorickpeterse> So just use your own class
<quazimodo> yorickpeterse: i thought perhaps theres a ruby object that is ... some sort of abstraction of a very light c structure
umgrosscol has joined #ruby
<yorickpeterse> Struct is probably closest, but it's not really any more lightweight than a regular class
msnyon has joined #ruby
<quazimodo> yeah ok
sarkyniin has quit [Quit: Quit]
<quazimodo> actually, i know very little about what Struct is for
<quazimodo> i know what it can do
sarkyniin has joined #ruby
<quazimodo> but no idea what problem it was invented to solve
* quazimodo googlse
<adaedra> Struct is a short way to have a class with only public rw attributes
<yorickpeterse> https://eval.in/382588 yay got my basic serializer thing
<yorickpeterse> now I need to decide if I actually want this in the first place
<yorickpeterse> because I cbf testing/maintaining/etc this
sarkyniin has quit [Client Quit]
evanjs has joined #ruby
sarkyniin has joined #ruby
hinbody has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
RegulationD has joined #ruby
AlphaAtom has joined #ruby
Kricir has quit [Remote host closed the connection]
quimrsto_ has joined #ruby
sandelius has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
hinbody has joined #ruby
AlphaAtom has joined #ruby
<jnormandeau> Hello everyone, I have been getting intermittent timeouts from rubygems.org when installing gems. According to the uptime section of the site everything seems to be working fine. Has anyone else been having issues?
Cust0sLim3n has quit [Ping timeout: 256 seconds]
skyrocker has joined #ruby
skyrocker has left #ruby [#ruby]
<adaedra> Check your RJ45 cable
<adaedra> :)
quimrst__ has joined #ruby
<quazimodo> class Address < FFI::Struct
<jnormandeau> All the networking on my end has been thoroughly checked
<quazimodo> that's incredibly interesting
quimrstorres has quit [Ping timeout: 264 seconds]
<jnormandeau> I get : Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz) but if I open it in my browser there is no problem
rubie has joined #ruby
arup_r has quit [Remote host closed the connection]
dorei has quit [Remote host closed the connection]
<adaedra> why are you in FFI quazimodo
<adaedra> You do C interfacing?
sinkensabe has quit [Remote host closed the connection]
alphaatom|pc has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
dorei has joined #ruby
quimrsto_ has quit [Ping timeout: 265 seconds]
caseypatrickdris has joined #ruby
AlphaAtom has quit [Client Quit]
symbol has quit [Quit: WeeChat 1.1]
<jhass> jnormandeau: run mtr rubygems.org for a while, check where it breaks
veinofstars has quit [Quit: veinofstars]
Zai00 has joined #ruby
AlphaAtom has joined #ruby
dstarh has joined #ruby
mechanicles has quit []
acovrig has quit [Quit: acovrig]
emilkarl has quit [Quit: emilkarl]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
acovrig has joined #ruby
Xeago has joined #ruby
AlphaAtom has quit [Client Quit]
bkxd has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
jonathanwallace has joined #ruby
rbennacer has quit [Remote host closed the connection]
emilkarl has joined #ruby
rbennacer has joined #ruby
Scroff has quit [Ping timeout: 276 seconds]
emilkarl has quit [Client Quit]
paulcsmith has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scroff has joined #ruby
<quazimodo> adaedra: curiosity :)
chinmay_dd has quit []
tvw has joined #ruby
<adaedra> quazimodo: I was talking about Struct in stdlib, not FFI. FFI::Struct is aimed at C interfacing.
<quazimodo> adaedra: i know :)
<jhass> FFI::Struct will be more expensive than a normal class
rubie has quit [Remote host closed the connection]
davedev24_ has joined #ruby
patrickanth0ny has joined #ruby
j4cknewt has joined #ruby
hoov has joined #ruby
<quazimodo> jhass: it's cool, all I'm doing atm is learning
freerobby has quit [Quit: Leaving.]
druznek has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cust0sLim3n has joined #ruby
<quazimodo> well
<quazimodo> for super awesome ness if i was to make an FFI::Struct with strings i think I need to malloc a space for a char array and return a pointer ... or someting
bMalum has joined #ruby
joaomdmoura has joined #ruby
<yorickpeterse> quazimodo: sounds a bit like you're overcomplicating things
shortCircuit__ has quit [Quit: Leaving.]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
<jhass> quazimodo: so you're not doing anything business critical?
musgravejw has joined #ruby
musgravejw has quit [Max SendQ exceeded]
<quazimodo> nah not at all
musgravejw has joined #ruby
<quazimodo> i'm playing :)
<quazimodo> i wouldn't do any of this in client code
ruby-lang768 has joined #ruby
<jhass> check crystal which lets you explore low level memory access and structuring with a familiar ruby like syntax
emilkarl has joined #ruby
dopie has joined #ruby
<quazimodo> i'd either whack my data into an in memory db or just use classes :)
acovrig_ has joined #ruby
acovrig has quit [Ping timeout: 240 seconds]
acovrig_ is now known as acovrig
patrickanth0ny is now known as badhatter
<jnormandeau> jhass: I have been running mtr for a few minutes and getting a ~80% loss from ae-2-52.edge2.Seattle1.Level3.net and the last entry is ??? with 100% loss
msnyon has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> Memory wise moving things to FFI wouldn't make a huge difference
<yorickpeterse> You'd still need to allocate FII::Struct objects
msnyon has joined #ruby
<jhass> jnormandeau: which IP does rubygems.org resolve to for you?
<quazimodo> yorickpeterse: sure
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
<jnormandeau> 54.186.104.15
InternetFriend has joined #ruby
Muhannad has quit [Quit: Leaving]
fabrice31_ has joined #ruby
<jhass> mmh, same
crazyhorse18 has quit [Ping timeout: 256 seconds]
<jhass> mmh, yeah looks like the host drops icmp traffic or something
byprdct has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
<jhass> but the 80% loss on the level3 router aren't good
fabrice31 has quit [Ping timeout: 276 seconds]
fabrice31_ has joined #ruby
byprdct has quit [Client Quit]
mister_solo has quit [Ping timeout: 244 seconds]
<jhass> I get a route far into amazons network here
<jhass> coming in via telia
casadei has joined #ruby
<jhass> so I guess amazon has some troubles on its level3 link in seattle
mleung has joined #ruby
<jnormandeau> jhass: Are you also getting 80% packet loss from ae-2-52.edge2.Seattle1.Level3.net
<jhass> my route doesn't even touch that, as said I'm coming in via telia
revath has joined #ruby
Abhijit has joined #ruby
jenrzzz has joined #ruby
JakFrist has joined #ruby
revath1 has quit [Ping timeout: 240 seconds]
<jhass> so you can try to contact level 3 or try to tell amazon or your ISP to do that
<adaedra> wow
<adaedra> TIL about mtr
<jhass> but given it's level 3 and amazon, I'd expect that issue to resolve itself in a couple of hours
veinofstars has joined #ruby
<jnormandeau> jhass: Thanks a lot for the help, its been happening since yesterday. I will try to change my route
mleung has quit [Client Quit]
datanoise has joined #ruby
<quazimodo> will the gc dealloc these structs?
codecop has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Abhijit> hi
volty has joined #ruby
sameerynho has quit [Quit: Leaving]
<jhass> hi Abhijit
revath has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
Kricir has joined #ruby
acarpe has quit [Quit: acarpe]
kies has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
someword has joined #ruby
sharpmachine has joined #ruby
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
crazyhorse18 has joined #ruby
ruby-lang768 has quit [Ping timeout: 246 seconds]
nonparfumee has joined #ruby
startupality has quit [Read error: Connection reset by peer]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
brahman has quit [Ping timeout: 272 seconds]
Scroff has quit [Remote host closed the connection]
Scroff has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
langlands has joined #ruby
startupality has joined #ruby
Scroff has quit [Remote host closed the connection]
<dudedudeman> morning folks
segfalt_ has joined #ruby
<havenwood> g'morn
allcentury has quit [Ping timeout: 252 seconds]
<quazimodo> ok
<quazimodo> so
segfalt has quit [Ping timeout: 264 seconds]
segfalt_ is now known as segfalt
<quazimodo> ffi::struct almost crashed my system when i tried to build a million of them
mleung has joined #ruby
<jhass> surprise
<quazimodo> still,
<adaedra> õ_o
<quazimodo> i guess it makes sense though
<havenwood> quazimodo: Does ten million get rid of the "almost" part?
<jhass> :D
<adaedra> :D
<yorickpeterse> quazimodo: You have to manually free FFI::Struct objects by calling "free" on them IIRC
<quazimodo> all the other crap 'wrapping' up the c structs and varios pointers etc would add immense amount of crud
<yorickpeterse> I don't think FFI defines any finalizers for them
<quazimodo> yorickpeterse: i killed the process XD
<yorickpeterse> Ah, that works too
InternetFriend has joined #ruby
Scroff has joined #ruby
<adaedra> Array.new(1000000) { Object.new } works fine though.
aryaching has joined #ruby
tagrudev has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
mleung has quit [Client Quit]
GPrime has joined #ruby
ZYPP has quit [Remote host closed the connection]
symm- has joined #ruby
treehug88 has joined #ruby
AlphaAtom has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
<adaedra> (Still, I wonder what you need 1'000'000 objects for.)
skade has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
<jhass> gotta get the big into the data!
<adaedra> :D
dfockler has joined #ruby
drewo has joined #ruby
<quazimodo> adaedra: why do I need to have a need for them?
<quazimodo> why can't I just do it for the fun of it?
<yorickpeterse> no fun allowed
<quazimodo> yeah i guess
* adaedra shrugs
<quazimodo> hehe
<quazimodo> crystal is like
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<quazimodo> "ruby but with c"
<quazimodo> and that sounds like haskell :Y
<quazimodo> :P
freerobby has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
mcclurmc_ has joined #ruby
<yorickpeterse> I'm a bit surprised it has a nil though
ZYPP has joined #ruby
<yorickpeterse> but at least the compiler detects it I believe
<quazimodo> lol
rbennacer has quit [Remote host closed the connection]
quimrst__ has quit [Remote host closed the connection]
JakFrist has joined #ruby
skade has quit [Client Quit]
GPrime has joined #ruby
<jhass> yorickpeterse: yeah, not a special property of nil though
<quazimodo> I think the guys at haskell got it rigth
<jhass> it just won't let you call stuff that "looks like it could be a String or nil"
<yorickpeterse> jhass: well yeah
<jhass> when just one of them has the method that is
ray_ has joined #ruby
<yorickpeterse> but that begs the question: why not use an Option/Maybe/whatever
<jhass> it still may happen
<yorickpeterse> maybe I've been doing too much Rust though
Kricir has quit []
acovrig has quit [Ping timeout: 276 seconds]
<jhass> it started by resembling Ruby as much as possible and then looking into where it needs to derive in order to work/make sense as a compiled language
dfockler has quit [Ping timeout: 264 seconds]
acovrig has joined #ruby
<acovrig> I’m installing ruby and am getting ‘~/.rvm/scripts/cli: line 855: 18651 Killed "$rvm_scripts_path/set" "$rvm_action" "${rvm_ruby_args[@]}”’ when running ‘curl -L get.rvm.io | bash -s stable --rails’ any ideas?
<jhass> wild guess: you ran out of memory
ray_ has quit [Client Quit]
<adaedra> yeah, look into system logs, processes are not killed for fun
dmolina has joined #ruby
drewo has quit [Ping timeout: 256 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
enebo has joined #ruby
fujimura has joined #ruby
droidburgundy has quit [Ping timeout: 244 seconds]
<yorickpeterse> jhass: oh yeah, I've read the page before
<yorickpeterse> However, they make one mistake
<yorickpeterse> a nill error is not a null pointer exception
<yorickpeterse> The two are very different
<yorickpeterse> nil != null
ogpastaling has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ogpastaling has quit [Read error: Connection reset by peer]
<volty> the meaning of nil depends upon context
hotpancakes has joined #ruby
ogpastaling has joined #ruby
<jhass> yes the semantics differ but I think the generalization is okay there since the frustration point is essentially the same
<hal_9000> i think the underlying “deep semantics” are the same
<yorickpeterse> Well yeah, the result is still the same: stuff doesn't work
gambl0re has joined #ruby
fujimura has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
<yorickpeterse> But NULL is really just 0x0 or void memory, nil is just an object you can't do much with
bigkevmcd has quit [Read error: Connection reset by peer]
polysics has joined #ruby
<yorickpeterse> e.g. you usually can't do something like `if NULL.respond_to?(...)`
<yorickpeterse> but `if nil.respond_to?(...)` works fine
Soda has quit [Remote host closed the connection]
<yorickpeterse> It doesn't really help that sometimes people mix the two names
bigkevmcd has joined #ruby
<yorickpeterse> You can actually very easily fix all your nil problems in Ruby
sinkensabe has quit [Remote host closed the connection]
<yorickpeterse> >> class NilClass; def method_missing(*); nil; end; end
<ruboto> yorickpeterse # => :method_missing (https://eval.in/382596)
<yorickpeterse> >> class NilClass; def method_missing(*); nil; end; end; nil.lol
<ruboto> yorickpeterse # => nil (https://eval.in/382597)
<jhass> you could do the same in crystal :P
yoongkang has quit [Remote host closed the connection]
<adaedra> Obj-C style
<jhass> anyway, "fix", I think that just replaces runtime with logic bugs
<jhass> you didn't expect to have nil there but you got it
<jhass> crystal forces you to handle it before you can run your program at least
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
<yorickpeterse> jhass: that's the beauty of it, nil can be coerced to most other objects
<yorickpeterse> although you have to explicitly do so
<yorickpeterse> Granted it _is_ better to prevent a nothingness "thing" from originating in the first place
Soda has joined #ruby
Cust0sLim3n has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
RegulationD has joined #ruby
joaomdmoura has quit [Quit: Textual IRC Client: www.textualapp.com]
_seanc_ has joined #ruby
<volty> with ruby's nil we have everything, with haskell's skill we are overcomplicating
joaomdmoura has joined #ruby
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pyo_ has quit []
fabrice31_ has quit [Remote host closed the connection]
jmignault has joined #ruby
AlphaAtom has quit [Client Quit]
_seanc_ has quit [Client Quit]
<centrx> crazy beatniks
yqt has joined #ruby
livathinos has quit []
kekumu has joined #ruby
Jimtemp has joined #ruby
JimBurns83 has quit [Ping timeout: 240 seconds]
kahuna_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
segfalt has quit [Quit: segfalt]
Scroff has quit [Remote host closed the connection]
<volty> One day I went to (try to) parse html with one of haskell's libraries (very beginner's parsing, of course). There I found the proof that this elegant language was good just for impressive fibonacci generators (and other infinite structures, of course). They defined so many operators - pretending to impress or to make you believe the parsing is easier using operators instead of simple meaningful verbs
yalue has joined #ruby
segfalt has joined #ruby
<quazimodo> so
<quazimodo> sql is really interesting
<quazimodo> the whole 'set theory' stuff involved
Cust0sLim3n has joined #ruby
kobain has joined #ruby
Scroff has joined #ruby
rbennacer has joined #ruby
<quazimodo> anyone heard of a gem that brings the language of relational data stores to more abstract objects, not necessarily table rows
<quazimodo> ?
<wasamasa> arel
hotpancakes has joined #ruby
<wasamasa> guess what's using it
allcentury has joined #ruby
<quazimodo> yeah but that's about database stuff
<quazimodo> it builds sql that gets sent to a db
<quazimodo> what if we have no db at all
<quazimodo> just a collection of collections of objets
<quazimodo> and we wanted to do things like 'where' clauses to reduce the number of records down
<yorickpeterse> quazimodo: https://github.com/rom-rb/rom
<yorickpeterse> They have some stuff for relational algebra that works on non database objects
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<quazimodo> yorickpeterse: relational algebra *yay*
<volty> I do not believe so. The non-table data is too specific for a generalization.
<roolo> Hey guys, i a bit ashamed to ask, but what am I doing wrong? When i call method from method_missing the method gots nothing/nil -- https://github.com/roolo/mind_meister_client/blob/master/lib/mind_meister_client.rb#L58
<quazimodo> volty: whatcha mean?
rcvalle has joined #ruby
<roolo> Am i using some reserved words, or what?
<roolo> Reproducible via running specs
<quazimodo> roolo: ashamed? have you seen the questions that I ask??
konieczkow has joined #ruby
<volty> I remember a prolog lib used to store its asserts into a db and use them transparently.
Scroff has quit [Ping timeout: 245 seconds]
<quazimodo> volty: eh?
apoplexy has joined #ruby
<quazimodo> what's a prolog assert
<jhass> roolo: for starters add a call to super in the else branch
bashusr has joined #ruby
<yorickpeterse> quazimodo: https://github.com/rom-rb/rom#synopsis actually has an example without databases
<roolo> quazimodo: I kinda do not get what are you asking about :)
<wasamasa> kids, don't you ever forget the term rdbms
Narzew has joined #ruby
Scroff has joined #ruby
<wasamasa> I'm getting sort of upset over the misusage of "database" for it
<quazimodo> wasamasa: why?
<quazimodo> lol
quimrstorres has joined #ruby
<volty> quazimodo: facts & rules
<wasamasa> quazimodo: a csv file is a database, that's why
nikhgupta has joined #ruby
<quazimodo> sure there are other databases, but when the world has rdbms
<wasamasa> quazimodo: so is /etc/passwd
sluukkonen has joined #ruby
<quazimodo> i think the ubiquitousness of rdmbs has lead to that
<quazimodo> also the enchanting elegance of it
<wasamasa> lol
AlphaAtom has joined #ruby
<quazimodo> <- big fan
<wasamasa> clearly you've never looked at their architecture then
jonathanwallace has quit [Quit: WeeChat 0.4.2]
<quazimodo> i like the maths
balazs has joined #ruby
<quazimodo> the implementation details escape me, a lot
veinofstars has quit [Quit: veinofstars]
<wasamasa> the math is a whole lot simpler than what's actually implemented
<quazimodo> unsurprising
<wasamasa> scroll down to figure 1.1
musgravejw has quit [Ping timeout: 246 seconds]
<quazimodo> sure :)
veinofstars has joined #ruby
<quazimodo> ooo
<quazimodo> nice paper
<quazimodo> i always wanted to know how
<yorickpeterse> Surely a database is just a matter of writing to /dev/null
<jhass> roolo: https://github.com/roolo/mind_meister_client/blob/master/lib/mind_meister_client.rb#L92 you don't return anything in the success case
<wasamasa> yorickpeterse: sounds webscale
<yorickpeterse> that's like how half of the NoSQL databases work anyway
<roolo> jhass: Now it makes even less sense. It is complaining about undefined variable in method_missing, which is used in the prepare_api_method :/
<jhass> >> def foo; if false; true; end; end; foo # roolo
<ruboto> jhass # => nil (https://eval.in/382602)
<quazimodo> heh
shinnya has joined #ruby
konieczkow has quit [Ping timeout: 256 seconds]
<quazimodo> looks like the stuff involved in actually doing the maths is only very small
<quazimodo> the rest is about resource management, access and query parsing/building
<wasamasa> quazimodo: the reason why it's recommended to use a RDBMS is because these things have a boatload of features and are the best studied systems to store your data in and to optimize
bashusr has quit [Ping timeout: 245 seconds]
<jhass> if it's commented out that's quite expected
mdz_ has quit [Remote host closed the connection]
wallace1 has joined #ruby
<wasamasa> heck, sometimes it's as simple as just adding indexes and using EXPLAIN judiciously to find out why
k3asd` has joined #ruby
<roolo> jhass: I am not that far yet. Right now i want to make the call, then i'll solve what to do with it
wallace1 is now known as jonathanwallace
<wasamasa> or making the queries your ORM generates more specific
quimrstorres has quit [Remote host closed the connection]
<roolo> What i've forgot to say, it is wip
quimrstorres has joined #ruby
<quazimodo> wasamasa: i've been bitten by prematurely moving to document stores
<pipework> wip it good
<roolo> So some things should be erased and some are missing
<quazimodo> structured relational data should go into postgres :P
<jhass> roolo: so, the again, what exactly is your issue?
bashusr has joined #ruby
<workmad3> quazimodo: unstructured data should probably also go in postgres too ;) JSON and JSONB column types FTW!
<volty> I think that we are condemned to think in terms of tables. When we need higher abstractions we not only use tables, but also have to resort to tables if some problem (out of complexity) arises out. Similar to xml — human readable, in case we get lost, but you can project an entire plane using it.
* quazimodo wishes the publishing world had a law, first edit = remove 30% of words. Second edit removes another 10-20%. Publish
balazs has quit [Ping timeout: 244 seconds]
<volty> (use tables beneath, I mean)
<roolo> jhass: When it come to `api_method_name = prepare_api_method what_was_called` the prepare_api_method get nil for what_was_called
<quazimodo> workmad3: lol yeah can you believe how bad they smash mongo
<quazimodo> stupid mongo
<yorickpeterse> I wish papers were written in plain English
<yorickpeterse> it certainly would've made things a lot easier
<roolo> (recently what_was_called was ruby_method_name, but i thought i am messing with some reserved words)
<quazimodo> mongo is proof that a stupid thing + massive, excessive, drowning deafening nerd hype + *stupid* js developers = relatively successful brain virus
<yorickpeterse> also I really dislike the 2 column layout they usually use
Scroff has quit [Read error: Connection reset by peer]
<quazimodo> roolo: i use
<volty> agree — too much «missed poetry writers» out there :)
<quazimodo> mid
<quazimodo> def method_missing(mid, *args)
Narzew has quit [Ping timeout: 265 seconds]
<jhass> roolo: I kinda doubt that's actually happening in the code that's on github
aapole has joined #ruby
<quazimodo> because openstruct uses mid or some reason
revath has joined #ruby
<quazimodo> message_id? i dno
senayar has quit [Remote host closed the connection]
<ZOMGITSABEAR> from a complete nob with no programming experience, how soon should i expect to grasp ruby enough to the point to where i'm writing my own programs?
<volty> it all depends on your talent :)
<yorickpeterse> ZOMGITSABEAR: depends on the time you invest in it
kinduff has joined #ruby
<centrx> ZOMGITSABEAR, Hello World is a program, so you can start quickly
erts has joined #ruby
<ZOMGITSABEAR> i hardly consider Hello World a program :p
Scrofff has joined #ruby
<volty> ZOMGITSABEAR: state an example. A program of yours to do what?
<ZOMGITSABEAR> idk.. irc bot
<yorickpeterse> few weeks
<volty> that's too easy :)
dzejrou has joined #ruby
<ZOMGITSABEAR> ah, cool
<roolo> jhass: Aaaaa, so ruby was right and i am asshole. I am really using rrong variable name in that method :)
<yorickpeterse> depending on the IRC bot library you'd use
<ZOMGITSABEAR> library?
<ZOMGITSABEAR> do tell
michael_mbp has quit [Excess Flood]
erts_ has joined #ruby
<volty> without library
<quazimodo> ZOMGITSABEAR: from a beautiful magestic man, not long
<quazimodo> ruby's easy
<volty> I guess and suggest
<yorickpeterse> ZOMGITSABEAR: for Ruby there's https://github.com/cinchrb/cinch
<jhass> roolo: don't be so self derogating
<yorickpeterse> Also IRC without a library is anything but easy, you'd have to understand the IRC protocol
<ZOMGITSABEAR> but what does the library do in terms of irc bot creation
<yorickpeterse> Which, for somebody new to programming, is a lot to take in
<quazimodo> i learnt ruby/rails by looking in gumtree(craigslist) for someone who wanted cheap software made
<quazimodo> then i made it for him via rails project
<roolo> jhass: But still ty. The else branch in method_missing pointed me to that
<yorickpeterse> ZOMGITSABEAR: all of the boring work such as connecting, handling what's needed to join a channel, etc
<quazimodo> i learnt and got paid a bit
<ZOMGITSABEAR> ahhhhh
<ccooke> IRC is not, at least, a seriously difficult protocol
krz has quit [Quit: WeeChat 1.0.1]
granthatcher_ has joined #ruby
sepp2k has joined #ruby
<volty> a good library should do everything, so, on your part, you have only to command it.
<quazimodo> good benefit o having to handle a stupid customer that's cheap, deadlines to learn and act etc
la__ has joined #ruby
apoplexy_da_boss has joined #ruby
<roolo> jhass: What is derogating?
<ZOMGITSABEAR> ok, so let's say we're talking about a plug.dj bot
<ZOMGITSABEAR> then what
Channel6 has joined #ruby
<quazimodo> ZOMGITSABEAR: go find a client
<roolo> jhass: The translation i've found does not make much sense
<ZOMGITSABEAR> client?
<quazimodo> yeah
<ZOMGITSABEAR> IRC client?
<workmad3> roolo: I think he meant derogatory
<ZOMGITSABEAR> or paid client?
tomphp_ has joined #ruby
<quazimodo> someone who wants software made
starfox_sf has joined #ruby
<quazimodo> get him to pay you to do it
<quazimodo> i did that
NeverDie has joined #ruby
aganov has quit [Remote host closed the connection]
<yorickpeterse> ZOMGITSABEAR: are you 100% new to programming?
michael_mbp has joined #ruby
<quazimodo> really, really sped up my learning speed
<ZOMGITSABEAR> i don't even know the syntax
<jhass> workmad3: roolo eh, yes
<ZOMGITSABEAR> thats how new i am
<quazimodo> neither did i !
<quazimodo> :D
<volty> he is virgin, already said :)
<yorickpeterse> ZOMGITSABEAR: http://railsgirls.com/materials good start
<ZOMGITSABEAR> does everyone here agree with quazimodo?
timonv has quit [Ping timeout: 246 seconds]
<quazimodo> ZOMGITSABEAR: they probably don't
<workmad3> jhass: or maybe self-deprecating?
<yorickpeterse> https://rubymonk.com/ is also a good start
<jhass> workmad3: ssh, I don't know :P
<yorickpeterse> Take small steps, don't instantly try to climb a mountain
<quazimodo> ZOMGITSABEAR: i figure, always get someone else to pay or you to learn
<roolo> jhass workmad3: Ah, the translation makes just a bit more sense, but i think i've got your thought ;)
<quazimodo> :P
<ZOMGITSABEAR> i was told to start with pine.fm
jackjackdripper has joined #ruby
<ZOMGITSABEAR> here in this channel last night
<yorickpeterse> pine.fm?
Cache_Money has joined #ruby
senayar has joined #ruby
erts has quit [Ping timeout: 256 seconds]
granthatcher has quit [Ping timeout: 256 seconds]
<ZOMGITSABEAR> pine.fm
<ZOMGITSABEAR> it's a website by some dude called pine or something
<ZOMGITSABEAR> and it has a tutorial on it
sharpmachine has quit [Remote host closed the connection]
<jhass> Learn to program by Chris Pine ;)
apoplexy has quit [Ping timeout: 256 seconds]
<ZOMGITSABEAR> yee
tomphp has quit [Ping timeout: 256 seconds]
<quazimodo> jhass and chris pine had a romantic relationship
skade has joined #ruby
<ZOMGITSABEAR> so where do i go to find clients
<quazimodo> craigslist :D
<ZOMGITSABEAR> if it'll speed up my learning, might as well go for it
erts_ has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
<yorickpeterse> ZOMGITSABEAR: honestly just take it slow
<yorickpeterse> clients will introduce stress, deadlines, etc
<quazimodo> ZOMGITSABEAR: do some initial discovery etc
<centrx> clients? You've gone from "never programmed before" to founding a consultancy in 10 minutes?
<quazimodo> get a basic feel
<yorickpeterse> plus you have to maintain whatever you make (likely)
<quazimodo> then decide :D
ringarin has quit [Ping timeout: 265 seconds]
<volty> my receipt: 1) start with exchanging messages (two apps) using a file 2) switch to drb 3) switch to tcp 4) then other, higher, protocols
doertedev has quit [Ping timeout: 244 seconds]
la__ has quit [Ping timeout: 272 seconds]
starfox_sf has quit [Ping timeout: 264 seconds]
<volty> as for the speed I agree with yorickpeterse — our neurals need time to organize (WELL) the new information & paradigms
skysploit has quit [Remote host closed the connection]
<quazimodo> I actually did maintain for a year
<ZOMGITSABEAR> centrx, i'm just doing what quazimodo said would speed up my learning
<quazimodo> then i fucked the guy off
JimBurns83 has joined #ruby
maxshelley has joined #ruby
<centrx> ZOMGITSABEAR, he sounds like a lunatic!
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bwicklund> At least learn the syntax first then you can start reading other peoples code
revath has quit [Ping timeout: 244 seconds]
<volty> or, ZOMGITSABEAR, you can invest a few month asking around what could speed you up :)
<ZOMGITSABEAR> haha
<quazimodo> the thing i wrote for him takes a 3 hour process to about 1.5 hours each day with about 17 workers + himself. Thats like 24 hours a day of productivity
<GPrime> ZOMGITSABEAR if you're coming completely new to ruby, i recommend http://learnrubythehardway.org
<quazimodo> took me 8 weeks to write that thing
haxrbyt__ has quit [Ping timeout: 244 seconds]
<quazimodo> i got abut 3k out of it
paulcsmith has quit [Quit: Be back later ...]
<quazimodo> it's worth 38 * 6 * 24 * 24
<quazimodo> per year to the guy
granthatcher_ has quit [Ping timeout: 276 seconds]
hubcaps has quit [Ping timeout: 255 seconds]
langlands has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<jhass> -1 to the hard way, the used style is not very idiomatic Ruby
Jimtemp has quit [Ping timeout: 265 seconds]
<quazimodo> cheap skate is still trying to suck free features/maintenance from me
leekme has joined #ruby
<quazimodo> i told him, for me to turn my brain on for the project would be $400
<leekme> Hey guys, could someone explain me what I miss understand in begin / rescue blocks ? -> https://gist.github.com/anonymous/54773c9f197254727414 Thanks
Rollabun_ has quit [Remote host closed the connection]
k3asd`_ has joined #ruby
<quazimodo> ZOMGITSABEAR: always remember, you sell a service not a product
<volty> time to absorb — there are ppl that need more time, there are others that need less. monkeys grow faster but stop sooner
<ZOMGITSABEAR> quazimodo: that feels a bit like common sense
skade has quit [Ping timeout: 255 seconds]
edwinvdgraaf has quit [Ping timeout: 276 seconds]
tvw has quit []
<Mon_Ouie> leekme: 'rescue' without a class name is rescue StandardError, it only rescues exceptions that are instances of subclasses of StandardError
sharpmachine has joined #ruby
paulcsmith has joined #ruby
<GPrime> jhass Oh i guess that's true
k3asd` has quit [Ping timeout: 264 seconds]
<quazimodo> ZOMGITSABEAR: we have an eternal tug of war with clients over that very concept
Soda has quit [Remote host closed the connection]
<Darkwater> well adaedra
<Darkwater> I finally got ruby-ed to work
<GPrime> jhass what site would you recommend?
granthatcher has joined #ruby
momomomomo has quit [Ping timeout: 246 seconds]
granthatcher has quit [Max SendQ exceeded]
<adaedra> Darkwater: nice
<Darkwater> the main issue was sed being buffered -.-"
paulcsmith_ has joined #ruby
<Darkwater> so output wasn't sent immediately
<leekme> Mon_Ouie: Thank's ;) Is there a way to rescue any kinds of exceptions ?
<Darkwater> but yeah, it's all set now
kekumu has quit [Quit: kekumu]
<jhass> GPrime: Pine's seems generally recommended and I haven't heard many complaints about it
granthatcher has joined #ruby
momomomomo has joined #ruby
Marsupermammal has joined #ruby
granthatcher has quit [Max SendQ exceeded]
paulcsmith has quit [Read error: Connection reset by peer]
mdw has joined #ruby
kekumu has joined #ruby
<Mon_Ouie> leekme: Explicitly 'rescue Exception'
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
adaedra is now known as undeadaedra
<volty> There are a number of stories about Euclid which may or may not be founded on truth. When King Ptolemy I of Egypt asked him for a short course in Geometry, he is reported to have replied that "there is no royal road to Geometry." Another story concerns a student who asked what was the use of learning Geometry. Euclid did not reply but instructed his servant to give the student a few coins since he must profit from all that
<volty> he learns.
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
<leekme> Mon_Ouie: Thanks for your help, I will try this
<Mon_Ouie> (notice that in real code you should be as specific as you can be about what exceptions you rescue, and not catch all of them like that)
<Darkwater> undeadaedra: it might not be a very smart idea to use apt-get over irc :v
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
snockerton has joined #ruby
<undeadaedra> Darkwater: I don't see what you mean. What could go wrong? :v
dhjondoh has quit [Remote host closed the connection]
<Darkwater> dunno
<Darkwater> maybe the files will be asciified?
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
BanzaiJoe has joined #ruby
<Darkwater> undeadaedra: you should join me
<Darkwater> it woorks
<undeadaedra> where are you again?
<Darkwater> actually if anyone feels like rubying over irc
granthatcher has joined #ruby
<Darkwater> #ruby-ed
<undeadaedra> #ruby-ed
<undeadaedra> >_>
<undeadaedra> you saw nothing
<Darkwater> heh
Soda has joined #ruby
granthatcher has quit [Client Quit]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scrofff has quit [Remote host closed the connection]
<ZOMGITSABEAR> If you do not know how to use PowerShell on Windows, Terminal on OS X, or bash on Linux then you need to go learn that first. You should do the exercises in Appendix A first before continuing with these exercises.
sharpmachine has quit [Remote host closed the connection]
<ZOMGITSABEAR> should i stop learning ruby and go learn powershell?
Scroff has joined #ruby
<ljarvis> everyone should learn powershell
<ljarvis> how do you even programwithout knowing it
<ZOMGITSABEAR> ok
<GPrime> my opinion is you can learn it as you go
darkf has quit [Quit: Leaving]
<ljarvis> ZOMGITSABEAR: im kidding dont do that
<ZOMGITSABEAR> oh
<ZOMGITSABEAR> so i should just keep going?
<ljarvis> ZOMGITSABEAR: are you on windows?
<ZOMGITSABEAR> 8.1, yes
<quazimodo> ZOMGITSABEAR: no
<ZOMGITSABEAR> ?
<undeadaedra> Learn to use your shell for basic things
<undeadaedra> change directories, run programs
<ljarvis> i'd keep going, if you get stuck then you can check out powershell docs but you should have a basic idea of how it works
<ZOMGITSABEAR> i can use cmd well enough
<quazimodo> ZOMGITSABEAR: your environment (windows, mac, linux{yay!}) is part of your toolset
<ZOMGITSABEAR> i know how to change directories and run programs
<quazimodo> you develop that as you go too
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nofxx> wtf is powershell?
<ljarvis> then you're good to go
<ZOMGITSABEAR> ah ok
<ljarvis> nofxx: windows
fedexo has joined #ruby
<ljarvis> ZOMGITSABEAR: also, you should totally sack off windows
<ljarvis> just sayin
allomov has quit [Remote host closed the connection]
<nofxx> ljarvis, ahh... as in windows 95? I remember, I have some (bad) memories.
datanoise has quit [Ping timeout: 240 seconds]
<ljarvis> nofxx: no, powershell is built on .net I think. So Windows XP and later
n008f4g_ has quit [Quit: leaving]
<quazimodo> it's some piece of crap
The_Phoenix has joined #ruby
<ljarvis> nofxx: you're probably just thinking of cmd.exe
<quazimodo> ZOMGITSABEAR: you'll have the best time programming in a linux
<nofxx> ljarvis, joking about windows... hehe sadly that's not true... still need it to play asseto corsa =P
<quazimodo> macs come pretty close too
intinig has quit [Remote host closed the connection]
<quazimodo> but not all the way
_seanc_ has joined #ruby
<ljarvis> nofxx: aye it's good for playing :)
<quazimodo> although they do look nice
<quazimodo> hrm
k3asd`_ has quit [Ping timeout: 255 seconds]
<quazimodo> making half a million regular classes is faster than BasicObject
_seanc__ has joined #ruby
<ZOMGITSABEAR> when i'm opening a .txt file from powershell, what is the proper method?
nikhgupta has quit [Remote host closed the connection]
<ZOMGITSABEAR> if i'm in the directory, don't i just type the name of the file?
skysploit has joined #ruby
nonparfumee has joined #ruby
nikhgupta has joined #ruby
bwicklund has quit [Ping timeout: 245 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> ZOMGITSABEAR: no that's for running executables, you'd need to run a command to open the file ie in a specific program
quimrsto_ has joined #ruby
sandstro_ has joined #ruby
<ljarvis> I think you can use the start command
<ZOMGITSABEAR> wait, i figured it out
<ljarvis> i.e start textedit c:\path\etc
nikhgupta has quit [Remote host closed the connection]
JakFrist has joined #ruby
_seanc_ has quit [Ping timeout: 256 seconds]
_seanc__ is now known as _seanc_
<ZOMGITSABEAR> "if you trust the program, instead type .\<fileneame>
<ZOMGITSABEAR> "
<ljarvis> ah
<ljarvis> go figure
<ZOMGITSABEAR> right?
justintv90 has quit [Ping timeout: 245 seconds]
startupality has quit [Read error: Connection reset by peer]
<ZOMGITSABEAR> so what are array functions?
quimrstorres has quit [Ping timeout: 264 seconds]
yoongkang has joined #ruby
<ljarvis> ZOMGITSABEAR: could you elaborate?
druznek has quit [Quit: Leaving]
rubie has quit [Remote host closed the connection]
<ZOMGITSABEAR> Thanks to search engines such as Google you can easily find anything I tell you to find. If I say, "search online for the ruby array functions" then you simply do this:Go to http://google.com/Type: ruby array functionsRead the websites listed to find the best answer.
ahmetkapikiran has joined #ruby
<ZOMGITSABEAR> in the book that was suggested i read here
<ljarvis> what book is this?
<ZOMGITSABEAR> learn ruby the hard way
<ljarvis> it says "array functions"?
<ZOMGITSABEAR> yep
startupality has joined #ruby
spider-mario has joined #ruby
<ljarvis> bleh
<BanzaiJoe> where's my hand? where's my face?
<BanzaiJoe> let's put the two together!
<ZOMGITSABEAR> why bleh?
rubie has joined #ruby
sandstrom has quit [Ping timeout: 252 seconds]
<BanzaiJoe> in Ruby Arrays are objects
armyriad has quit [Quit: Leaving]
<apeiros> there are no functions in ruby
<ljarvis> ZOMGITSABEAR: everything in Ruby is an Object, so there are no functions
<ZOMGITSABEAR> hmm
ahmetkapikiran has quit [Client Quit]
InternetFriend has joined #ruby
Hounddog has quit [Remote host closed the connection]
<Abhijit> if everything is object then who is class?
corehook has quit [Remote host closed the connection]
<volty> a special object
<jhass> Abhijit: an instance of Class
sharpmachine has joined #ruby
<jhass> and yes, Class too is an instance of Class
<ljarvis> they're methods, and they all have receivers unless they're unbound
<ljarvis> lag
<quazimodo> wow
<undeadaedra> >> Class.class
<ruboto> undeadaedra # => Class (https://eval.in/382606)
<BanzaiJoe> oh yea, ruby baby
<quazimodo> building a million regular classes is 4 times quicker than structs
<Abhijit> :-)
towski_ has joined #ruby
<volty> >> Class.ancestors
<undeadaedra> duh
<ruboto> volty # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/382607)
adac has quit [Ping timeout: 265 seconds]
<quazimodo> to rephrase, a milion instances of regular classes is 4 times faster than a million instances of Struct
<BanzaiJoe> quazimodo but where's the sugar in that ;)
<ljarvis> you know what Struct does right?
<ljarvis> it's for convenience, not speed
<yorickpeterse> for real speed you should use OpenStruct
<undeadaedra> If you need speed at any price, go do C
<workmad3> quazimodo: could be worse... you could be using OpenStruct :D
rubie has quit [Ping timeout: 265 seconds]
<ljarvis> :D
momomomomo has quit [Quit: momomomomo]
<ljarvis> OpenAwful
<workmad3> OpenStruct - for people who think method caches are for wusses
nikhgupta has joined #ruby
<ljarvis> give me a cold method cache any day
_seanc_ has quit [Quit: _seanc_]
pontiki has joined #ruby
<phat4life> what do you mean by method cache?
<yorickpeterse> IIRC it wrecked more than your method cache
<quazimodo> hrm
<yorickpeterse> but I can't remember what it was
strixd has quit [Quit: 500]
<yorickpeterse> phat4life: Ruby will remember where a method originated form when called
<volty> what should I use if I want something like «ordered hash» behavior ?
<quazimodo> using def initialize(args = {}) is like 2.5 x slower than def initialize(arg1, arg2, etc...)
<yorickpeterse> That way the next time it doesn't have to go through the pain of finding that out
<ljarvis> hashes aren't ordered
<yorickpeterse> volty: Ruby 1.9 has ordered hash keys
<phat4life> yorickpeterse: ah, so low level mri stuff?
<yorickpeterse> phat4life: yes
paulcsmith_ has quit [Quit: Be back later ...]
<phat4life> word
<ljarvis> yorickpeterse: stahp
mleung has joined #ruby
<ljarvis> loaded gun
<volty> thx, good to know
<ljarvis> ^
<ljarvis> see what you did
<volty> never mind, nothing critical
<phat4life> ljarvis: wait, so whats the deal with OpenStruct and method cache?
<yorickpeterse> ?
<yorickpeterse> ljarvis: honestly I don't really see the problem with depending on hash keys being ordered
AlphaAtom has joined #ruby
k3asd` has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<yorickpeterse> phat4life: OpenStruct clears a method cache upon every instance created
<phat4life> ah
<yorickpeterse> errr as in, I think it clears the entire method cache
<yorickpeterse> of everything
AlphaAtom has quit [Max SendQ exceeded]
<yorickpeterse> but I haven't really kept up with it
AlphaAtom has joined #ruby
rubie has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
<quazimodo> I like openstruct or some things
anisha has quit [Quit: Leaving]
<quazimodo> pretty nice for a flexible coniguration data type
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 256 seconds]
justintv90 has joined #ruby
AlphaAtom has joined #ruby
<apeiros> yorickpeterse: I think newer rubies improved somewhat in that regard
dopie has joined #ruby
<apeiros> but I think OS still leaks memory
Vile` has quit [Read error: Connection reset by peer]
pengin has joined #ruby
michaeldeol has joined #ruby
<apeiros> i.e. there was a "benchmark" somewhere where OS vs. Hash was like 80MB in difference in a real world application over a short period of time.
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leekme has quit []
<quazimodo> OS leaks memory?
<quazimodo> why??
<volty> I like the hash syntax. I need it for fast assigning to various vars to be iterated over (for gui dialogs) . I need a tree-like structure that can preserve that order of inserting. That's all, for now.
dfockler has joined #ruby
<volty> s/that/the/
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
opalraava has quit [Ping timeout: 265 seconds]
<yorickpeterse> oh hm wait, I can actually test better if it still wrecks caches
n1x has joined #ruby
opalraava has joined #ruby
sigurding has quit [Quit: sigurding]
<apeiros> yorickpeterse: iirc (and not sure I do) it's code does not get GCed
michael_mbp has quit [Excess Flood]
jenrzzz has joined #ruby
neanderslob has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
<undeadaedra> openwat :D
<apeiros> structs are quite fast and memory efficient
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has left #ruby [#ruby]
krisquigley has quit [Remote host closed the connection]
datanoise has joined #ruby
AustinMatherne has joined #ruby
jxpx777 has joined #ruby
michael_mbp has joined #ruby
musgravejw has joined #ruby
simplyianm has joined #ruby
n1x has quit [Max SendQ exceeded]
tercenya_ has joined #ruby
stan has quit [Ping timeout: 265 seconds]
msgodf has quit [Ping timeout: 276 seconds]
tercenya has quit [Ping timeout: 264 seconds]
mrmargolis has quit [Remote host closed the connection]
yardenbar has quit [Quit: Leaving]
nobitanobi has joined #ruby
mrmargolis has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
Zai00 has quit [Quit: Zai00]
<acovrig> undeadaedra: is that a reference to Barnhurst’s “wat” video?
aapole has quit [Ping timeout: 276 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<undeadaedra> acovrig: I was reacting to yorickpeterse's gist, ask him
datanoise has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
<acovrig> OK, there is a talk titled ‘wat’ that pokes a JavaScript and has a plug for Ruby.
<BanzaiJoe> is there some old school *nix thing to have IRC nicks in lowercase? many more people use lower case names
<acovrig> probably because it’s simple(r)
JakFrist has joined #ruby
s2013 has joined #ruby
<BanzaiJoe> I couldn't even finish "/nick banza" before I thought, "that doesn't look right"
nikhgupta has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<jhass> people are lazy
senayar has quit []
<jhass> less shift = less work
balazs has joined #ruby
denver has quit [Remote host closed the connection]
<BanzaiJoe> I get that for 10 hours of coding, but we're talking about humans and communication and maybe a couple dozen a day. /shrug
alex88 has quit []
nikhgupta has joined #ruby
drewo has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical_ has joined #ruby
failshell has joined #ruby
bricker has joined #ruby
allomov has joined #ruby
bMalum has joined #ruby
sdwrage has joined #ruby
bMalum has quit [Client Quit]
balazs has quit [Ping timeout: 240 seconds]
towski_ has quit [Remote host closed the connection]
paulcsmith_ has joined #ruby
nikhgupta has quit [Remote host closed the connection]
t_ has joined #ruby
atomical has quit [Ping timeout: 248 seconds]
RobertBirnie has joined #ruby
bruno- has joined #ruby
_seanc_ has joined #ruby
bruno-_ has quit [Read error: Connection reset by peer]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
towski_ has joined #ruby
denver has joined #ruby
towski_ has quit [Remote host closed the connection]
nikhgupta has joined #ruby
sarkyniin has quit [Quit: Quit]
elev has joined #ruby
mikecmpbll has quit [Ping timeout: 265 seconds]
simplyianm has quit [Read error: Connection reset by peer]
JoshL has quit []
elev is now known as kk33
<kk33> I want to make a game with ruby, how can I do that?
<kk33> an very easy game, with grapics
simplyianm has joined #ruby
<bnagy> hard work and practice, probably
<kk33> but like I have a game
<kk33> rand 100
<kk33> and I want it into an app or a program
<kk33> how can I do that?
mrsolo has joined #ruby
<volty> get qtbindings and study qt, for example
<dfockler> kk33: you can try gosu, it's a game dev library for ruby
<bnagy> maybe check out Shoes
n1x has joined #ruby
pietr0 has joined #ruby
kent\n has quit [Ping timeout: 272 seconds]
<kk33> When I am installing gosu
<kk33> I get this error:
<kk33> While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
InternetFriend has joined #ruby
<kk33> what should I do? and how? I am very bad with mac
fujimura has joined #ruby
starfox_sf has joined #ruby
Agoldfish has joined #ruby
bMalum has joined #ruby
pdev_lifer has joined #ruby
<kk33> pps?
<undeadaedra> I guess you need sudo to install gems with default ruby
<undeadaedra> or use --user-install
polysics has quit [Remote host closed the connection]
pengin has quit [Remote host closed the connection]
<kk33> so whats the command code in terminal?
<kk33> xD
<dfockler> try this tutorial to get started
<kk33> but I cant download it
pengin has joined #ruby
Zai00 has joined #ruby
pyon has quit [Quit: fix config]
aeze has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
<kk33> worked with sudo, thanks
fujimura has quit [Ping timeout: 240 seconds]
kekumu has quit [Quit: kekumu]
allomov has quit [Remote host closed the connection]
centrx has quit [Quit: Shutting down, Please wait...]
<BanzaiJoe> sudo...Mac...terminal...OS-X... my brain hurts everytime I consider that
<dfockler> BanzaiJoe: You're worse than the windows haters
<undeadaedra> why?
datanoise has joined #ruby
<dfockler> Also Homebrew is quite nice
konieczkow has joined #ruby
kent\n has joined #ruby
<undeadaedra> Anyway, time to leave, see y'all
bgmarx has joined #ruby
<jhass> yeah, great package manager not even supporting package renames m(
deric_skibotn has joined #ruby
xcesariox has joined #ruby
bootstrappm has joined #ruby
<havenwood> jhass: that was... irksome
<BanzaiJoe> dfockler maybe you misunderstand, on the one hand we have FOSS and then high-margin Mac over the top. Then in the middle is WinTel.
gianlucadv has quit [Remote host closed the connection]
<bootstrappm> morning all
quimrsto_ has quit [Remote host closed the connection]
pppt has joined #ruby
tomphp has joined #ruby
<BanzaiJoe> If it is a validation of FOSS then there should be more Apple like successes, if it's an anamoly, it's a very successful one
gianlucadv has joined #ruby
<BanzaiJoe> bootstrappm morning
<havenwood> Though pkgsrc does work with OS X now. :)
sdothum has quit [Ping timeout: 250 seconds]
<BanzaiJoe> dfockler btw, I'm a pseudo-Windows fan
valkyrka has quit [Quit: valkyrka]
lkba_ has joined #ruby
Xiti has quit [Quit: Xiti]
<bootstrappm> as we're talking about OSes / manufacturers, I want to start something like system76! :D
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
<havenwood> If I can convince any other OS X user to install pkgin and Ruby with that gist ^ I'd love to get feedback.
ziprar has quit [Quit: Leaving]
<havenwood> It plays nice alongside Brew if that's your thing.
<bootstrappm> but with elementary os instead of ubuntu
<BanzaiJoe> bootstrappm you do realize what a difficult moving(!) target to hit that is, right?
zipace has joined #ruby
<bootstrappm> no I don't :(
gianlucadv has quit [Remote host closed the connection]
<bootstrappm> how difficult? how moving?
Scroff has quit [Remote host closed the connection]
<BanzaiJoe> have you seen the Yoga 3 implemenations?
konieczkow has quit [Ping timeout: 272 seconds]
Xiti has joined #ruby
<bootstrappm> I had a yoga 2 then sold it ... let me look up the yoga 3 real quick
gianlucadv has joined #ruby
bMalum_ has joined #ruby
fabrice31 has joined #ruby
Scroff has joined #ruby
bMalum has quit [Ping timeout: 256 seconds]
bMalum_ is now known as bMalum
codecop has joined #ruby
GPrime has joined #ruby
<volty> k/join #qt
<bootstrappm> looks pretty much same just beefier. I guess system76 was a bad example, I want to build desktops. I'm in Guatemala, those still sell a lot in LatAm
AlphaAtom has joined #ruby
cndiv has joined #ruby
<BanzaiJoe> I don't know much about elementary os, yoga 3 with ubuntu and system76 are linux laptops, you're talking about changing hardware and change operating systems. laptop hardware is actually very dynamic
<BanzaiJoe> ahhhh
lkba has quit [Ping timeout: 255 seconds]
gianlucadv has quit [Remote host closed the connection]
<bootstrappm> there was a sale on the Fractal Design r4 yesterday (awesome case for $60) that I missed :'(
<BanzaiJoe> what about NUCs?
gianlucadv has joined #ruby
drocsid has quit [Ping timeout: 276 seconds]
MatthewsFace has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
mleung has quit [Quit: mleung]
bruno- has quit [Ping timeout: 252 seconds]
<havenwood> <3 BSDs
jxpx777 has quit [Quit: Leaving...]
<BanzaiJoe> even that is an old article, I bet there are more variations already
drocsid has joined #ruby
nofxx has joined #ruby
Deck` has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
kobain has quit [Ping timeout: 255 seconds]
bgmarx has quit [Remote host closed the connection]
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
<bootstrappm> that looks cool
<dfockler> it's like a mac mini
<bootstrappm> didn't even know about NUC - thanks!
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
bgmarx has joined #ruby
<BanzaiJoe> anytime
<dorei> nuc is the future
<dorei> check ubuntu orange box :D
kk33 has quit [Ping timeout: 255 seconds]
caseypatrickdris has quit [Remote host closed the connection]
<BanzaiJoe> I do wonder about Chromebooks, kids will have more and more access to them before Win or Mac. If ever there was a need to get computer literacy and exposure to programming it will likely be through Chromebooks. I don't know what that will look like but that's my bet.
mleung has joined #ruby
Scroff has quit [Remote host closed the connection]
<Deck`> https://dpaste.de/xTNP is it possible to get variables created in class evaluation ?
simplyianm has quit [Read error: Connection reset by peer]
langland_ has joined #ruby
<dfockler> BanzaiJoe: Is OLPC still a thing? That was a cool idea
<bootstrappm> Deck`: mmm I've only seen what you're trying to do with a done with instance variables
The_Phoenix has quit [Quit: Leaving.]
simplyianm has joined #ruby
<bootstrappm> which are set in a method, not in the class eval. If you create @a in the class eval its a class instance variable I believe which is not the same thing
snockerton1 has joined #ruby
JoshL has joined #ruby
<jhass> Deck`: what's your goal? I mean in that example you could just write 5 in the method
<jhass> extract magic values? share data?
<jhass> try to show your real code
<bootstrappm> isn't there a shortcut for that ...
<bootstrappm> ?fake
<ruboto> Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<bootstrappm> ??fake
<bootstrappm> :D!
Marsupermammal has joined #ruby
langlands has quit [Ping timeout: 272 seconds]
andikr has quit [Remote host closed the connection]
wjlroe has quit [Quit: Textual IRC Client: www.textualapp.com]
Scroff has joined #ruby
<bootstrappm> Deck`: if you want want the variable to be available before assigning anything to it look up attr_accessor. Then use it as instance.a, for example; that'll return nil if you haven't set @a to anything
snockerton has quit [Ping timeout: 264 seconds]
<BanzaiJoe> dfockler short answer no, but I do think it achieved some of it's goals of cost reduction in areas that allow for others to follow up.
<Deck`> jhass, I have a function which creates Context class and return it. I want to make it possible to have nested context.
jxpx777 has joined #ruby
<Deck`> sorry, Context object
<havenwood> Deck`: Can you Gist the code?
bMalum has quit [Quit: bMalum]
rbowlby has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n1x has quit [Ping timeout: 240 seconds]
platzhirsch has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
elev has joined #ruby
<elev> I downloaded gosu, but I dont know if it worked, how can I check it?
jmignault has quit [Quit: Textual IRC Client: www.textualapp.com]
<elev> when I typed gosu --version nothing came up
pyon has joined #ruby
startupality has quit [Read error: Connection reset by peer]
<jhass> does gem list show gosu?
langland_ has quit [Ping timeout: 252 seconds]
msgodf has joined #ruby
<wasamasa> >> require 'gosu'
<ruboto> wasamasa # => cannot load such file -- gosu (LoadError) ...check link for more (https://eval.in/382625)
<Xeago> havenwood: we use pkgin at $JOB
<elev> how can I find gem list jhass?
atomical has joined #ruby
elev is now known as master44
roolo_ has joined #ruby
<jhass> it's a command you run
<master44> what command?
<jhass> gem list
<master44> ok thanks
<havenwood> Xeago: nice, what's your impression of it?
nobitanobi has quit [Remote host closed the connection]
<master44> gosu (0.9.2)
<master44> io-console (0.4.2)
<master44> json (1.8.2, 1.7.7)
<master44> libxml-ruby (2.6.0)
<master44> minitest (4.3.2)
<jhass> Deck`: so no code? this is hard with words :(
<master44> nokogiri (1.5.6)
<master44> psych (2.0.0)
<jhass> !kick master44 Please use https://gist.github.com
master44 was kicked from #ruby by ruboto [Please use https://gist.github.com]
x1337807x has joined #ruby
hsps_ has joined #ruby
startupality has joined #ruby
<Deck`> jhass, I'm writing the example right nw
<jhass> cool
sarkyniin has joined #ruby
Scroff has quit [Remote host closed the connection]
master44 has joined #ruby
<master44> sorry jhass
<eam> Master44: ruby -rgosu -e'Gosu::Window.new 640, 480, false; sleep 10'
<master44> never happen again
<master44> thanks
<eam> does that open a blank window?
skade has quit [Ping timeout: 276 seconds]
<master44> jhass I forgot, I am sorry wont happen again
bruno- has joined #ruby
roolo has quit [Ping timeout: 245 seconds]
<Deck`> jhass, havenwood https://dpaste.de/3Ujy
skade has joined #ruby
towski_ has joined #ruby
atomical has quit [Client Quit]
n1x has joined #ruby
dmolina has quit [Quit: Leaving.]
hotpancakes has joined #ruby
beneggett has joined #ruby
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> Deck`: class Context; def thing(&block); @context = Context.new; ...; end; def run; @context.run if @context; ...; end; end;
mleung has quit [Quit: mleung]
mdz_ has joined #ruby
coderhs has quit [Ping timeout: 255 seconds]
<jhass> maybe name it @child_context or even make it an array if multiple are a possibility
platzhirsch has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
djbkd has joined #ruby
<jhass> but basically recreate your DSL in the Context class, perhaps extracting the common parts into a module you can include into both the toplevel and Context
sarkyniin has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
<Deck`> jhass, actually I try to implement something like context or describe methods in rspec.
<jhass> yup, I recognized
sandstro_ has quit [Quit: My computer has gone to sleep.]
platzhirsch has joined #ruby
justintv90 has quit [Remote host closed the connection]
Lucky__ has joined #ruby
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DrShoggoth has joined #ruby
jenrzzz has joined #ruby
Abhijit has quit [Quit: Bye.]
platzhirsch1 has joined #ruby
nonparfumee has joined #ruby
sanguisdex has quit [Remote host closed the connection]
platzhirsch has quit [Ping timeout: 265 seconds]
ottlikg has joined #ruby
master44 has quit [Quit: Lost terminal]
GnuYawk has quit [Quit: WeeChat 1.0]
sanguisdex has joined #ruby
kobain has joined #ruby
Parker0 has quit [Ping timeout: 255 seconds]
Igorshp has quit [Remote host closed the connection]
sanguisdex has quit [Client Quit]
musgravejw has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
Azure has quit [Read error: Connection reset by peer]
someword has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
musgravejw has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
Spami has joined #ruby
maxshelley has joined #ruby
Azure has joined #ruby
Jackneill has quit [Ping timeout: 244 seconds]
Marsupermammal has quit [Read error: Connection reset by peer]
someword has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
sanguisdex has joined #ruby
mrmargol_ has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
flughafen_ has quit [Ping timeout: 256 seconds]
cb__ has joined #ruby
fantazo has joined #ruby
quimrstorres has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<Deck`> jhass, actually it supports lazy evaluation. I mean that contexts are created in any level but they should be evaluated when the root context is run only
djbkd has joined #ruby
<jhass> Deck`: my solution should do that
<jhass> just check @context after running
n1x has quit [Ping timeout: 250 seconds]
kirun has joined #ruby
alem0lars___ has joined #ruby
alem0lars__ has quit [Ping timeout: 246 seconds]
snockerton1 has quit [Quit: Leaving.]
<jhass> it'll harm full example randomization but I can't think of any lazy evaluation approach that doesn't
tcarter1719 has joined #ruby
mrmargolis has quit [Ping timeout: 276 seconds]
volty has quit [Ping timeout: 245 seconds]
elev has joined #ruby
tcarter1719 has quit [Max SendQ exceeded]
nixmaniack has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
Notte has joined #ruby
baweaver has joined #ruby
msgodf has quit [Ping timeout: 265 seconds]
snockerton has joined #ruby
RegulationD has quit [Remote host closed the connection]
TheHodge has quit [Quit: Connection closed for inactivity]
rbennacer has quit [Remote host closed the connection]
RegulationD has joined #ruby
bgmarx has quit [Remote host closed the connection]
Rollabunna has joined #ruby
sandstrom has joined #ruby
bootstrappm has quit [Ping timeout: 255 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aaeron has joined #ruby
quimrsto_ has joined #ruby
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdwrage has quit [Quit: This computer has gone to sleep]
gaboesquivel has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kekumu has joined #ruby
elev is now known as master44
<master44> filename = ARGV.first
<master44> txt = open(filename)
<master44> puts "Here's your file #{filename}:"
<master44> print txt.read
<master44> print "Type the filename again: "
<master44> file_again = $stdin.gets.chomp
<master44> txt_again = open(file_again)
<master44> wtf!
<master44> I copy something else
joevandyk has joined #ruby
quimrstorres has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 245 seconds]
<BanzaiJoe> master44, and you're still here...
<master44> there we go
<BanzaiJoe> careful, there's an automatic rate check
startupality has quit [Quit: startupality]
ElChoppo has joined #ruby
<master44> in the gisthub is the code correct? still works?
Rollabunna has quit [Ping timeout: 265 seconds]
corehook has joined #ruby
kekumu has quit [Remote host closed the connection]
cosmicexplorer has quit [Remote host closed the connection]
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
infoget has quit [Quit: Leaving.]
pingveno has joined #ruby
<pingveno> I'm not sure if this is the right channel for this, but... Is there a way to convert a Ruby File to a Java InputStream in JRuby? My search skills are failing me.
Adran has quit [Quit: Este é o fim.]
sdwrage has joined #ruby
Adran has joined #ruby
maxshelley has joined #ruby
konieczkow has joined #ruby
Notte has quit []
nixmaniack has joined #ruby
<jhass> pingveno: might have more luck in #jruby
<master44> jhass?
lkba has joined #ruby
<jhass> sup?
<master44> is this still the correct way to read a file in ruby=
<master44> ?*
<jhass> you tell me, does it work?
<master44> well I dont quite understand the code
<master44> at the 3 line
<master44> is it open filename, the variable? or like the file name
sdwrage_ has joined #ruby
tercenya_ has quit []
edwinvdgraaf has joined #ruby
<Deck`> jhass, I managed to do what I want, thank you very much
<jhass> Deck`: cool, did you went with basically my approach or did you find something else?
araujo has quit [Quit: Leaving]
sdwrage has quit [Ping timeout: 264 seconds]
Scroff has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 246 seconds]
konieczkow has quit [Ping timeout: 265 seconds]
<Deck`> jhass, your approach, but instead of having @child_context I set @child_contexts = [] and calling run on each instances to make it possible to have several child contexts
<jhass> k, cool, just curious ;)
platzhirsch1 has left #ruby [#ruby]
bgmarx has joined #ruby
stamina has quit [Ping timeout: 245 seconds]
sarkyniin has joined #ruby
blackmesa has joined #ruby
<master44> jhass the rdoc doesnt show good about files
lkba_ has quit [Ping timeout: 272 seconds]
<master44> jk found it now :P
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
pandaant has joined #ruby
svoop has joined #ruby
J4R0D has quit []
InternetFriend has joined #ruby
<master44> nope, jhass doesnt say anything about how the program can read a file
zz_Outlastsheep is now known as Outlastsheep
<jhass> quote
<jhass> Examples:
<jhass> Reading from “testfile”:
atomical has joined #ruby
mesamoo has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
mesamoo has joined #ruby
<master44> where?
pengin has quit []
edwinvdgraaf has quit [Remote host closed the connection]
<jhass> in my link
sinkensabe has joined #ruby
flughafen_ has joined #ruby
yardenbar has joined #ruby
edwinvdgraaf has joined #ruby
tercenya has joined #ruby
<master44> ahh
dumdedum has quit [Ping timeout: 272 seconds]
tlarevo has joined #ruby
<master44> so thats just print all the things that is in the file
momomomomo has joined #ruby
jpfuentes2 has joined #ruby
DaniG2k has joined #ruby
bMalum has joined #ruby
<master44> jhass how can I print all of the file? not just one line?
<jhass> what makes you say you don't?
<master44> the gets
<master44> but without gets nothing happend
<jhass> your example doesn't use gets
baweaver has quit [Remote host closed the connection]
<jhass> the one in the docs does
sinkensabe has quit [Ping timeout: 244 seconds]
<master44> you mean my example?
<master44> I am using your example from rdoc
nixmaniack has quit [Ping timeout: 255 seconds]
segfalt has quit [Quit: segfalt]
aaeron has quit [Quit: Leaving.]
bgmarx_ has joined #ruby
bootstrappm has joined #ruby
rdark has quit [Quit: leaving]
torpig has quit [Ping timeout: 265 seconds]
aaeron has joined #ruby
<master44> I understand what you mean now I try :P
quimrsto_ has quit [Ping timeout: 272 seconds]
tedstriker has quit [Quit: Anti-Fraping status set.]
djbkd has quit [Remote host closed the connection]
<master44> still doesnt work
segfalt has joined #ruby
k3asd` has quit [Ping timeout: 256 seconds]
bgmarx has quit [Ping timeout: 245 seconds]
Cust0sLim3n has quit [Ping timeout: 246 seconds]
pontiki has quit [Quit: ZZZZZZZZ<clunk>NNNNNNNNN]
mattbillock has joined #ruby
quimrstorres has joined #ruby
<master44> I found the game.. thanks
<master44> code*
swills has joined #ruby
master44 has left #ruby [#ruby]
nobitanobi has quit [Remote host closed the connection]
postmodern has joined #ruby
mattbillock has quit [Remote host closed the connection]
meatchicken has joined #ruby
alex88 has joined #ruby
<meatchicken> Would it work if I just substitute the sql functions with ruby methods?
ElChoppo has quit [Remote host closed the connection]
Cust0sLim3n has joined #ruby
nobitano_ has joined #ruby
pontiki has joined #ruby
dseitz has joined #ruby
banister has joined #ruby
<jhass> yup
noethics has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has quit [Remote host closed the connection]
mattbillock has joined #ruby
Carnage\ has joined #ruby
[H]unt3r has joined #ruby
polysics has joined #ruby
beneggett has joined #ruby
ramfjord has joined #ruby
baweaver has joined #ruby
pdev_lifer has quit [Ping timeout: 240 seconds]
towski_ has quit [Ping timeout: 256 seconds]
hotpancakes has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
sinkensabe has joined #ruby
hotpancakes has joined #ruby
sinkensabe has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
DaniG2k has quit [Quit: leaving]
aryaching has quit [Ping timeout: 265 seconds]
fujimura has joined #ruby
pandaant has quit [Remote host closed the connection]
ramfjord has joined #ruby
psy_ has quit [Quit: Leaving]
djbkd has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
psy_ has joined #ruby
torpig has joined #ruby
alex88 has quit [Remote host closed the connection]
sonOfRa has quit [Remote host closed the connection]
troulouliou_dev has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 244 seconds]
fujimura has quit [Ping timeout: 256 seconds]
flughafen_ has quit [Ping timeout: 265 seconds]
hakunin has joined #ruby
sinkensabe has joined #ruby
RegulationD has joined #ruby
towski_ has joined #ruby
prettiestPony11 has joined #ruby
sonOfRa has joined #ruby
<prettiestPony11> hi all! more of a python user, but heard you can end multiple blocks in ruby with ennd ennnd.. is that true?
<prettiestPony11> couldn't find it in the docs
bgmarx_ has quit [Remote host closed the connection]
<pontiki> no, but you can use ]
<jhass> sounds like a hoax
<jhass> pontiki: huh?
swills has quit [Quit: leaving]
hahuang65 has joined #ruby
<pontiki> jhass: another hoax
<jhass> :(
gregf has quit [Quit: WeeChat 1.1.1]
<prettiestPony11> pontiki: do you know where that operator lives in the ruby lang docs? i couldn't find anything on that.
<pontiki> where that did work was on UT Lisp to close off multiple open parens, tho
keslerm has quit [Quit: ZNC - http://znc.in]
sandstrom has quit [Quit: My computer has gone to sleep.]
<Ox0dea> pontiki: How could that work?
nullwarp has joined #ruby
<pontiki> Ox0dea: bear in mind this is pre-CL and pre-Scheme
bgmarx has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
<Ox0dea> I just mean from the standpoint of disambiguation.
<pontiki> you'd just put a closing square bracket and it would close up all the open parens
<Ox0dea> Oh, right.
<pontiki> if you wanted to bound it, you could start a s-exp with [ and it would close up all the open parens inside that
sinkensabe has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
towski_ has quit [Ping timeout: 265 seconds]
djbkd has quit [Remote host closed the connection]
<jhass> prettiestPony11: in case it's not clear yet, pontiki tried to be funny
swgillespie has joined #ruby
<hal_9000> prettiestPony11: yes :) there’s no way to do this in Ruby
<pontiki> i'm not clear that's not just a troll
<prettiestPony11> hm a friend told me you could
<prettiestPony11> trying in irb right now
<pontiki> because python: no ends at all
elev has joined #ruby
elev is now known as master44
atomical has joined #ruby
<master44> is it possible to give a method a name?
<master44> like the whole loop?
Guest25_ has joined #ruby
<hal_9000> question is unclear
<master44> yes I know
sdwrage has joined #ruby
<master44> is it possible to make all of one code into a variable?
<master44> like I dont need to write the same thing many times, if I want it to run many times
Guest25_ is now known as gabhart
<ljarvis> master44: you want a method
<master44> no not exacly
<hal_9000> a proc maybe?
<master44> I give a new example here
<master44> while true do puts "You are cool!" end
<master44> and every time I type in m that loop will run
<master44> are that possible?
<ljarvis> "type in m"
<ljarvis> what does that mean?
<jhass> prettiestPony11: note that the proposal was rejected
swgillespie has quit [Client Quit]
<master44> like instead of typing all of that
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<master44> I can jsut type m
<ljarvis> you want a method
<master44> like I set all of that code == to a variabe
<master44> like m
<master44> I guess
<prettiestPony11> right.. was surprised because a rubyist friend told me about it as if it were real
<prettiestPony11> but, guess not!
<jhass> as said, hoax ;)
<jhass> but that issue is probably the origin
fabrice31 has quit [Ping timeout: 272 seconds]
sandstrom has joined #ruby
<hal_9000> m = proc { loop { sleep 1; puts "Hello!" } }
<jhass> I think I also saw a gem ones that implements it as a preprocessor, but can't find it
djbkd has joined #ruby
<hal_9000> m.call
aredridel is now known as Aria
axsuul has joined #ruby
<ljarvis> that's no different to a method
<ljarvis> (in this case)
<master44> ok thanks
<hal_9000> true
<master44> so i can do it with everything?
vdamewood has quit [Quit: Life beckons.]
scripore has joined #ruby
<master44> I just google ruby procs thanks, bye :D
<hal_9000> actually there is a difference with scope, but that’s all
master44 has left #ruby [#ruby]
<hal_9000> depending on how/where the method is defined
towski_ has joined #ruby
<hal_9000> but the OP is gone anyway :)
<baweaver> closures :D
torpig has quit [Quit: WeeChat 1.1.1]
platzhirsch has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.2]
frem has joined #ruby
hahuang65 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
flughafen_ has joined #ruby
jenrzzz has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
corehook has quit [Remote host closed the connection]
workmad3 has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
torpig has joined #ruby
hakunin has joined #ruby
gregf has joined #ruby
sinkensabe has joined #ruby
konieczkow has joined #ruby
drocsid has quit [Ping timeout: 244 seconds]
corehook has joined #ruby
<Ox0dea> if an mehtod is calling with not a block like asdf(1,2){} is it posiblei can do block_given? be false
cirn0 has joined #ruby
crazyhorse18 has quit [Ping timeout: 244 seconds]
<undeadaedra> {} is a block
<ljarvis> it's still given a block
<Ox0dea> how can it make it be false tho
<ljarvis> if you want to check the return value is nil you'll have to call it
<Ox0dea> :(
<undeadaedra> >> def f(&blk); blk; end; f
<ruboto> undeadaedra # => nil (https://eval.in/382648)
<ljarvis> well, don't send a block if you want it to be false :D
InternetFriend has joined #ruby
<undeadaedra> oops
segfalt has quit [Quit: segfalt]
<undeadaedra> >> def f(&blk); blk; end; f {}
<ruboto> undeadaedra # => #<Proc:0x40a0f448@/tmp/execpad-6183db53f072/source-6183db53f072:2> (https://eval.in/382649)
<Ox0dea> ljarvis: user might send empty block
<ljarvis> Ox0dea: sounds like a bad API
<Ox0dea> long story
workmad3 has quit [Ping timeout: 256 seconds]
stamina has joined #ruby
<Ox0dea> is a syntax hax
micmus has quit [Ping timeout: 240 seconds]
<undeadaedra> If it sends an empty block it sends a block, it can also send no block
<ljarvis> you can't call it to tell?
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> real block might return nil?
<ljarvis> true
<ljarvis> then yep, you're stuck :)
stamina has quit [Remote host closed the connection]
<Ox0dea> no
baweaver has quit [Remote host closed the connection]
platzhirsch has quit [Remote host closed the connection]
<Ox0dea> just not sure how to use RubyVM::InstructionSequence.of(foo) to determine empty block
<undeadaedra> what do you want to do
workmad3 has joined #ruby
<ljarvis> :/
<ljarvis> have fun
simplyianm has quit [Remote host closed the connection]
hoov has quit [Quit: Leaving]
simplyianm has joined #ruby
uri_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Cust0sLim3n has quit [Ping timeout: 252 seconds]
erts has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> >> def foo; 'empty' if block_given? && RubyVM::InstructionSequence.of(proc).to_a[13][3] == 0 end; [foo, foo{}, foo{nil}]
<ruboto> Ox0dea # => [nil, "empty", nil] (https://eval.in/382659)
<Ox0dea> But there must be a better way.
Scrofff has joined #ruby
infoget has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
<undeadaedra> <ljarvis> Ox0dea: sounds like a bad API
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cirn0 has quit [Remote host closed the connection]
<hanmac> Ox0dea: i tested it too and foo{} and {nil} are different procs, even if they are similar enough
<Ox0dea> hanmac: Right, the iseqs are quite different.
deric_skibotn has quit [Ping timeout: 265 seconds]
griffindy has joined #ruby
<Ox0dea> But I don't know what this 0 at [13][3] indicates and whether or not it might be there in other circumstances.
Scroff has quit [Ping timeout: 272 seconds]
platzhirsch has joined #ruby
cirn0 has joined #ruby
rubie has quit [Remote host closed the connection]
<hanmac> yeah lets make a freature request for Proc#empty? ;P
<Ox0dea> That would be so handy right about meow.
simplyianm has quit [Ping timeout: 256 seconds]
Cust0sLim3n has joined #ruby
<undeadaedra> Also, your solution seems to be MRI only
chinmay_dd has joined #ruby
<Ox0dea> Yes. :(
AlphaAtom has joined #ruby
deric_skibotn has joined #ruby
barkerd427 is now known as zz_barkerd427
<undeadaedra> so what are you trying to do in the first place?
DoubleMalt has quit [Remote host closed the connection]
crazyhorse18 has joined #ruby
pppt has quit [Ping timeout: 272 seconds]
GPrime has joined #ruby
<Ox0dea> I'm constructing a DSL for writing extremely terse lambda expressions in Ruby.
StephenOTT has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
<undeadaedra> ok
<sweeper> aka job security
micmus has joined #ruby
finisherr has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Outlastsheep is now known as zz_Outlastsheep
zenguy_pc has quit [Read error: Connection reset by peer]
StephenOTT has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
drocsid has joined #ruby
cirn0 has quit [Read error: Connection reset by peer]
cirn0 has joined #ruby
apt-get_ has joined #ruby
tubuliferous_ has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
hotpancakes has quit []
sarkyniin has quit [Ping timeout: 250 seconds]
corehook has quit [Remote host closed the connection]
hakunin has joined #ruby
<ljarvis> why would a user supply a block without any contents?
edwinvdgraaf has quit [Remote host closed the connection]
<ljarvis> and what is "a user"? who's consuming this?
corehook has joined #ruby
denver has quit [Remote host closed the connection]
<Ox0dea> ljarvis: Y'got me. I was only pretending.
<BanzaiJoe> a user creates programs ;)
<Rager> is there a way to make bundler STFU about which version bundled an app?
<BanzaiJoe> they take down the MCP
<Rager> because it's getting annoying not to be able to change branches without checkout out Gemfile.lock
edwinvdgraaf has joined #ruby
yardenbar has quit [Quit: Leaving]
cirn0 has quit [Read error: Connection reset by peer]
nertzy2 has joined #ruby
<ljarvis> Rager: your branches are using different versions?
cirn0 has joined #ruby
nertzy has quit [Ping timeout: 265 seconds]
<phat4life> Rager: i had that same issue
<phat4life> but it was because people on my team had different versions of bundler
krisquigley has quit [Ping timeout: 276 seconds]
<phat4life> or that is what i think at least
<Rager> ljarvis: not my branches
<Rager> my developers
<Rager> one guy's on 1.9
<Rager> one guy's on gods know what
<Rager> I'm on 1.10
bigkevmcd has quit [Ping timeout: 252 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Rager> so their bundlers keep reverting my bundler's versioning
<BanzaiJoe> you're on 1.1?
blue_deref has joined #ruby
Igorshp has joined #ruby
<Rager> BanzaiJoe: no, 1.10
hakunin has quit [Ping timeout: 252 seconds]
Channel6 has quit [Quit: Leaving]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Rager> these are symbols, not numbers
<Rager> they just happen to be made of numbers
blackmesa has quit [Ping timeout: 265 seconds]
<BanzaiJoe> gotcha (sorta)
<phat4life> do you specifiy bundler in yoru gem file?
dagda1 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<Rager> bundler is putting the version of bundler into Gemfile.lock: https://github.com/bundler/bundler/issues/3697
<Rager> and it's not cool
jxpx777 has quit [Quit: Leaving...]
bigkevmcd has joined #ruby
lavros has joined #ruby
<phat4life> git shame
hakunin has joined #ruby
cirn0 has quit [Remote host closed the connection]
sinkensabe has joined #ruby
chinmay_dd has quit []
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
davedev2_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
cirn0 has joined #ruby
* Ox0dea rings the bell.
davedev24_ has quit [Ping timeout: 250 seconds]
<dfockler> ding ding
fantazo has quit [Ping timeout: 276 seconds]
corehook has quit [Remote host closed the connection]
<Ox0dea> It was just the one ding.
bgmarx has quit [Remote host closed the connection]
<Ox0dea> After every three "shame"s.
podman has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
ruv has quit [Ping timeout: 265 seconds]
jxpx777 has joined #ruby
pyon is now known as lptm
<Ox0dea> Is it possible to determine that the Module really has absolutely no methods left?
sigurding has joined #ruby
alex88 has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hakunin has joined #ruby
cb__ has quit [Remote host closed the connection]
infoget has left #ruby [#ruby]
AlphaAtom has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
solars has quit [Ping timeout: 245 seconds]
<pontiki> "Module full. Please empty and start over."
AlphaAtom has quit [Read error: Connection reset by peer]
balazs has joined #ruby
balazs has quit [Remote host closed the connection]
Blaguvest has quit [Ping timeout: 272 seconds]
elev has joined #ruby
<elev> I guess all of you have heard about the random 100 game
balazs has joined #ruby
AlphaAtom has joined #ruby
<Ox0dea> /ignore add elev
aapole has joined #ruby
elev is now known as master44
RazorX has quit [Ping timeout: 246 seconds]
<master44> 0x0dea why?
graft is now known as Guest82953
alex88 has quit [Ping timeout: 265 seconds]
sigurding has quit [Quit: sigurding]
autrilla has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<master44> I want to make it like it counts every time you type something in
<master44> and at the end it go: You used attemps good job
lavros has quit [Ping timeout: 264 seconds]
<master44> someone knows?
Rollabunna has joined #ruby
RazorX has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lavros has joined #ruby
hakunin has quit [Ping timeout: 256 seconds]
<master44> someone can help me?
sdothum has joined #ruby
cirn0_ has joined #ruby
hakunin has joined #ruby
<jalcine> for every letter?
<master44> yes
AlphaAtom has quit [Ping timeout: 252 seconds]
cirn0 has quit [Read error: Connection reset by peer]
<master44> every time they type a number it will count
symm- has joined #ruby
<Ox0dea> master44: The $. variable holds your answer.
<Ox0dea> Just print its value at the end of your program.
RazorX_ has joined #ruby
<master44> the $ variable?
<master44> what is that?
<Ox0dea> No, the $. variable.
<master44> what is that
<Ox0dea> puts "You used #$. attempts."
<Ox0dea> Put that at the end of your program.
<Ox0dea> Do it.
<master44> ok
<Ox0dea> You know you want to.
<master44> yes I will but I have to understand why
<master44> I try to learn ruby lol
<Ox0dea> Clearly not?
AlphaAtom has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
RazorX has quit [Ping timeout: 252 seconds]
Rollabunna has quit [Ping timeout: 272 seconds]
InternetFriend has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<master44> lol..
<master44> if you just tell me what to do I dont learn bro..
wildroman2 has quit [Ping timeout: 256 seconds]
eggoez has quit [Ping timeout: 265 seconds]
zz_barkerd427 is now known as barkerd427
hakunin has quit [Ping timeout: 255 seconds]
fusillicode has joined #ruby
momomomomo has joined #ruby
fusillicode has left #ruby [#ruby]
rb4637 has joined #ruby
<master44> 0x0dea?
<rb4637> How do I introduce a new "artificial" scope in Ruby code?
<rb4637> like { } in C
AlphaAtom has joined #ruby
<Ox0dea> master44: You really ought to know how to add 1 to a variable's value at this stage in your learning.
arup_r has joined #ruby
<rb4637> purpose is to make variables only accessible to that scope and not later in the code.
<yorickpeterse> rb4637: there's no real way of doing that
AlphaAtom has quit [Read error: Connection reset by peer]
<rb4637> bummer
<rb4637> ok
<Ox0dea> rb4637: Erm, does a Proc not suffice?
deric_skibotn has quit [Ping timeout: 252 seconds]
<rb4637> Ox0dea: what do you mean?
<master44> so the #$ just counts every type you click something?
<master44> can you use it every where?
<Ox0dea> > every type you click
cirn0 has joined #ruby
<master44> every time you enter?
<yorickpeterse> Ox0dea: that does more than just introducing a scope
<master44> kk thanks
<yorickpeterse> if also requires you to invoke "call" on every proc
<Ox0dea> IIFEs to the rescue!
cirn0_ has quit [Ping timeout: 250 seconds]
sdwrage has quit [Quit: Leaving]
qwertme has joined #ruby
eggoez has joined #ruby
klaas has joined #ruby
<master44> 0x0dea?
<Ox0dea> >> a, b = 1, 2; (-> { c = a + b })[] # c doesn't exist out here
<ruboto> Ox0dea # => 3 (https://eval.in/382683)
<Ox0dea> rb4637: ^
<master44> the #$ happens every time you click but what if I just want it to add to spesific things
<jhass> master44: btw why don't you leave your client running?
<master44> what you mean jhass?
<jhass> you very often close and reopen your client
<master44> how can I do that?
ndrei has quit [Ping timeout: 256 seconds]
<master44> I use terminal on macbook
<jhass> you just leave it running
<master44> how?
<master44> xd
<jhass> by not closing it
<master44> it just happens I dont do anything
<master44> when I go to facebook 5 minutes
<master44> and come back
<master44> it automaticly reconnects
<jhass> bullshit, it happens if you're satisfied with an answer
<master44> I dont leave never
ndrei has joined #ruby
<master44> no
<master44> sometimes yes but not always
<jhass> yes
jaycee has joined #ruby
<master44> like 3 min ago
<master44> I was going to toilet and when I came back it reconnect
<jhass> I've been watching it, it's not like that
<master44> well ok
<master44> I will just leave it open and see
<Ox0dea> You should've stayed in the toilet.
<master44> LOL
<master44> dude pls
<Ox0dea> no u
<master44> 0x0dea?
<master44> what if I want it to add only when you press spesific things?
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
balazs has quit [Read error: Connection timed out]
deric_skibotn has joined #ruby
AlphaAtom has joined #ruby
flughafe1 has joined #ruby
bMalum has quit [Quit: bMalum]
rbowlby has quit [Ping timeout: 265 seconds]
_seanc_ has joined #ruby
balazs has joined #ruby
chris613 has joined #ruby
rubie has joined #ruby
<Ox0dea> master44: Incrementing a counter is way beyond my current level of Ruby knowledge, I'm afraid.
benegget_ has joined #ruby
<master44> dude why are you that way man
<master44> why you hate me?
<Ox0dea> I hate what you are, not who you are.
<chris613> Can someone explain to me why a = var || raise "var must be set" gives me a syntax error, whereas a = var || raise("var must be set") does not?
<master44> I am a 13 year old boy with autism who want to try to learn ruby
<master44> so pls
<master44> stfu
baweaver has joined #ruby
<master44> I got a type of autism so I am not that good social but pls dont be mean to me
beneggett has quit [Read error: No route to host]
segfalt has joined #ruby
flughafen_ has quit [Ping timeout: 264 seconds]
cirn0 has quit [Read error: Connection reset by peer]
cirn0 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
decoponio has quit [Quit: Leaving...]
<master44> and btw I did it without you gets.chomp += 1
<master44> I dont even want to get help from you, jhass how can I ignore a user?
<jhass> lol
<jhass> chris613: because the || binds stronger than the method argument (yes, raise is a method call)
<master44> he is so mean all time
kadoppe has quit [Ping timeout: 252 seconds]
allomov has joined #ruby
corehook has joined #ruby
ramfjord has joined #ruby
wildroman2 has joined #ruby
<chris613> jhass: Thanks!
<jhass> chris613: a = var or raise "var must be set" would be valid too, but I'd encourage you to just do it on two lines
quimrstorres has joined #ruby
baweaver has quit [Remote host closed the connection]
iceden has quit [Remote host closed the connection]
<Ox0dea> >> nil || p 1
<ruboto> Ox0dea # => /tmp/execpad-9a0ffbf4218a/source-9a0ffbf4218a:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/382685)
<Ox0dea> chris613: ^ Just to clarify.
baweaver has joined #ruby
<rb4637> Is this code synchronous in Ruby? open('myfile.out', 'a') { |f| f.puts "Hello, world." }
<rb4637> in other words, does the append file complete before moving to the line below open?
<Ox0dea> Yes.
<rb4637> are you sure?
bash33 has joined #ruby
<jhass> yes
<rb4637> ok thanks
<phat4life> >> "1.#{'1'*1000000000000000}".to_f
<ruboto> phat4life # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/382686)
kadoppe has joined #ruby
wallerdev has quit [Quit: wallerdev]
chris613 has left #ruby [#ruby]
<phat4life> >> "1.#{'1'*10000000000000}".to_f
<ruboto> phat4life # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/382687)
<master44> jhass do you own this channel?
<phat4life> that bit of ruby, my computer doesnt like it
<yorickpeterse> No, he just polices it :D
<master44> haha ok xD :D
<phat4life> yeah "1.#{'1'*10000000000000}".to_f will crash my mac
<phat4life> on ruby 2.2.0
<havenwood> vi
_seanc_ has quit [Quit: _seanc_]
aapole has quit [Ping timeout: 246 seconds]
ogpastaling has quit [Remote host closed the connection]
mleung has joined #ruby
<master44> thanks havenwood :)
<postmodern> is there some reason that Set has no #to_json method?
<yorickpeterse> phat4life: works fine here
pdoherty has joined #ruby
<postmodern> one would think Set would be coerced to an Array and dumped as Array#to_json
<bash33> exit
bash33 has quit [Client Quit]
<havenwood> postmodern: I swear I recently saw something about addition of Set#to_json.
<BanzaiJoe> phones down company wide, time to call BanzaiJoe!!! ta-daaa!
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
drocsid has quit [Ping timeout: 276 seconds]
<Ox0dea> havenwood: You did.
corehook has quit [Remote host closed the connection]
<phat4life> yorickpeterse: it causes my mac to run out of memory
<phat4life> if i let it run
corehook has joined #ruby
<yorickpeterse> wtf?
<yorickpeterse> it just outputs 1.1 for me
drocsid has joined #ruby
<yorickpeterse> $ ruby --version
<yorickpeterse> ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
<yorickpeterse> maybe it's because I'm using a superior operating system
bMalum has joined #ruby
corehook has quit [Remote host closed the connection]
<phat4life> likely
InternetFriend has joined #ruby
hakunin has joined #ruby
wildroman2 has quit []
<havenwood> Ox0dea: Aye, that's the one, thanks. Couldn't find it.
<havenwood> postmodern: ^
bgmarx has joined #ruby
apoplexy_da_boss is now known as apoplexy
<postmodern> sweet! ruby delivers
bgmarx_ has joined #ruby
j4cknewt has joined #ruby
dstarh has quit [Read error: Connection reset by peer]
lavros has quit [Remote host closed the connection]
cirn0_ has joined #ruby
cirn0 has quit [Ping timeout: 252 seconds]
lavros has joined #ruby
bMalum has quit [Client Quit]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
serialsito has quit [Read error: No route to host]
ogpastaling has joined #ruby
bgmarx has quit [Ping timeout: 276 seconds]
hakunin has quit [Ping timeout: 256 seconds]
fujimura has joined #ruby
cvtsx has joined #ruby
tjbiddle has joined #ruby
_seanc_ has joined #ruby
master44 has quit [Ping timeout: 252 seconds]
hakunin has joined #ruby
rbennacer has joined #ruby
<jhass> Rager: fyi bundler 1.10.4 just got released with a workaround https://github.com/bundler/bundler/blob/1-10-stable/CHANGELOG.md
<jhass> to at least reduce the biggest pain point
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
nonparfumee has joined #ruby
fujimura has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
ogpastal_ has joined #ruby
ogpastaling has quit [Write error: Connection reset by peer]
fabrice31 has joined #ruby
_ht has quit [Quit: Konversation terminated!]
El3ktra has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Read error: Connection reset by peer]
pontiki has quit [Quit: ZZZZZZZZ<clunk>NNNNNNNNN]
MatthewsFace has joined #ruby
lavros has quit [Ping timeout: 252 seconds]
rbowlby has joined #ruby
lavros has joined #ruby
jenrzzz has joined #ruby
revath has joined #ruby
kinduff has quit [Quit: leaving]
revath has left #ruby [#ruby]
sinkensabe has joined #ruby
JoshL_ has joined #ruby
JoshL has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 252 seconds]
jenrzzz_ has quit [Ping timeout: 272 seconds]
pipework is now known as Spaceghostc2c
fedexo has quit [Ping timeout: 265 seconds]
x1337807x has joined #ruby
<rb4637> File.open('file.txt', 'wb') do |f|
<rb4637> f.write('foo')
<rb4637> f.write('bar')
<rb4637> end
<rb4637> Does the second .write append "bar" to the file?
<rb4637> or overwrite the whole file?
cb_ has joined #ruby
cb_ has joined #ruby
<undeadaedra> try it and cat the file ;)
baweaver has quit [Remote host closed the connection]
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 265 seconds]
rbowlby_ has joined #ruby
jenrzzz has joined #ruby
pontiki has joined #ruby
Akagi201_ has joined #ruby
wallerdev has joined #ruby
djbkd has joined #ruby
benegget_ has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
toretore has joined #ruby
rbowlby has quit [Ping timeout: 264 seconds]
Akagi201 has quit [Ping timeout: 255 seconds]
jgpawletko has joined #ruby
ottlikg has quit [Ping timeout: 265 seconds]
momomomomo has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
momomomomo has joined #ruby
<arup_r> ok bye
jenrzzz has quit [Ping timeout: 256 seconds]
sharpmachine has quit [Remote host closed the connection]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
sinkensabe has quit [Remote host closed the connection]
__butch__ has joined #ruby
<yorickpeterse> rb4637: you'll end up with "foobar"
<rb4637> yeah, thanks
<rb4637> :)
Ox0dea has quit [Ping timeout: 265 seconds]
lavros has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
lavros has joined #ruby
baweaver has quit [Remote host closed the connection]
solars has joined #ruby
DLSteve has joined #ruby
rb4637 has quit [Quit: rb4637]
_seanc_ has quit [Quit: _seanc_]
allomov has quit [Remote host closed the connection]
<yorickpeterse> oh boy, seems this week I finally get to write code that converts XPath to Ruby
<yorickpeterse> :<
unshadow has quit [Ping timeout: 265 seconds]
balazs has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 265 seconds]
balazs has joined #ruby
<Rager> why do that?
aeze has quit [Quit: aeze]
mrmargol_ has quit [Remote host closed the connection]
k3asd` has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> Right, so the background is: Oga (https://github.com/YorickPeterse/oga) has support for XPath queries but it's rather slow (due to a bunch of reasons)
quimrstorres has quit [Remote host closed the connection]
<yorickpeterse> The idea I had is to throw away everything it currently uses for evaluating XPath queries and instead generate Ruby code based on an XPath query
jenrzzz has joined #ruby
<yorickpeterse> Said Ruby code would do what it takes to get the right stuff out of a document
gianlucadv has quit [Ping timeout: 264 seconds]
<yorickpeterse> But without having to write a fully fledged interpreter
wallerdev has quit [Quit: wallerdev]
<yorickpeterse> One of the benefits is that you can generate very specific snippets of code, cache these and have them JIT compiled (in case of JRuby/Rubinius)
iamninja has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
<yorickpeterse> https://github.com/YorickPeterse/oga/blob/master/lib/oga/xpath/evaluator.rb this is what it uses right now to evaluate XPath
<yorickpeterse> quite the beast
allomov has joined #ruby
<yorickpeterse> most expressions can probably be done in less than 50 lines of dedicated Ruby code
gambl0re has quit [Ping timeout: 245 seconds]
<yorickpeterse> I did some rough benchmarking and I had some code which IIRC was already 2x faster
toretore has quit [Quit: This computer has gone to sleep]
failshell has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargolis has joined #ruby
mdz_ has quit [Remote host closed the connection]
evanjs has quit [Remote host closed the connection]
jonathanwallace has quit [Quit: WeeChat 0.4.2]
GPrime has joined #ruby
y0da has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nym has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
rcvalle has quit [Quit: rcvalle]
musgravejw has quit [Ping timeout: 265 seconds]
<undeadaedra> congrats
krisquigley has joined #ruby
but3k4 has quit [Ping timeout: 250 seconds]
<undeadaedra> what about oga-without-the-wimpiness? :3
<yorickpeterse> heh
s2013 has joined #ruby
blackmesa has joined #ruby
mdw has joined #ruby
rodfersou has quit [Quit: leaving]
krisquigley has quit [Ping timeout: 252 seconds]
acovrig has quit [Quit: acovrig]
aaeron has quit [Quit: Leaving.]
ozialien has joined #ruby
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
aaeron has joined #ruby
baweaver has joined #ruby
aaeron has quit [Client Quit]
Spami has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 276 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
workmad3 has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
mdw has quit [Read error: Connection reset by peer]
polysics has quit []
mrmargol_ has joined #ruby
aaeron has joined #ruby
spyderman4g63 has joined #ruby
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
but3k4 has joined #ruby
pietr0 has quit [Ping timeout: 255 seconds]
pietr0 has joined #ruby
momomomomo has quit [Quit: momomomomo]
codecop has quit [Remote host closed the connection]
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
iamninja has joined #ruby
y0da has quit [Ping timeout: 244 seconds]
JoshL_ has quit []
workmad3 has quit [Ping timeout: 255 seconds]
ldnunes has quit [Quit: Leaving]
mrmargolis has quit [Ping timeout: 276 seconds]
spyderman4g63 has quit [Ping timeout: 256 seconds]
micmus has quit [Quit: Leaving]
rbennacer has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 265 seconds]
rubie has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 252 seconds]
erts has quit [Quit: erts]
nikhgupta has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
otherj has joined #ruby
Zai00 has joined #ruby
<yorickpeterse> I think ljarvis once had the perfect quote for all this
yfeldblum has quit [Remote host closed the connection]
segfalt has quit [Quit: segfalt]
mdw has joined #ruby
<yorickpeterse> but ofc I can't find it
segfalt has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nikhgupta has joined #ruby
Scroff has joined #ruby
sharpmachine has joined #ruby
Scroff has quit [Remote host closed the connection]
mike___1234 has quit [Ping timeout: 252 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mike___1234 has joined #ruby
rcvalle has joined #ruby
pontiki has quit [Quit: <poit>]
Scrofff has quit [Ping timeout: 245 seconds]
nikhgupta has quit [Remote host closed the connection]
sdegutis has joined #ruby
endash has quit [Quit: endash]
Squarepy has joined #ruby
lkba has quit [Remote host closed the connection]
<sdegutis> Help, what's the name of the thing I need to use within Nokogiri if I want to just replace all <b>foo</b> with **foo** ?
renier has joined #ruby
<sdegutis> A regex won't cut it that's why I need Nokogiri.
<ljarvis> yorickpeterse: quote for what?
<sdegutis> But I can't figure out how to use Nokogiri to do it.
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> ljarvis: to describe what I'm doing
yfeldblum has joined #ruby
<ljarvis> yorickpeterse: are you making a mess?
<yorickpeterse> Ah, got it
<yorickpeterse> 2013-06-18 13:48:49injektdo you just wake up in the morning and think, "what kind of weird ass shit can i do today?"
<yorickpeterse> that took a lot of grepping
<yorickpeterse> sdegutis: can't remember how to do it with Nokogiri, but I do know how to do it with https://github.com/YorickPeterse/oga
<ljarvis> im let down with my own quote
lkba has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<yorickpeterse> *cough cough*
theery has joined #ruby
umgrosscol has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
<ljarvis> yorickpeterse: is that file generated?
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
<yorickpeterse> ljarvis: what file?
<ljarvis> yorickpeterse: xpath/evaluator
<yorickpeterse> ljarvis: No
<yorickpeterse> written by hand
<sdegutis> Think I found it
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> yorickpeterse: nice code
rbennacer has joined #ruby
mike___1234 has quit [Ping timeout: 265 seconds]
<yorickpeterse> sdegutis: ah yeah, that's pretty similar
alem0lars___ has quit [Read error: Connection reset by peer]
<yorickpeterse> ljarvis: meh, it's ok
pietr0 has quit [Quit: pietr0]
_seanc_ has joined #ruby
simplyianm has joined #ruby
<ljarvis> :P
<ljarvis> ok it's bed time
renier has quit [Quit: Textual IRC Client: www.textualapp.com]
<sdegutis> yay
Rollabunna has joined #ruby
<sdegutis> Now I just need to delete everything in @doc up until and including the first <h1> match.
<sdegutis> Is that hard?
dmolina has joined #ruby
shock_one has quit [Remote host closed the connection]
<yorickpeterse> you'll need to iterate over all nodes for that
<baweaver> side note, regex is a very bad answer for anything html/xml
<yorickpeterse> something like
dagda1 has joined #ruby
bigkevmcd has quit [Ping timeout: 264 seconds]
<yorickpeterse> document.every_node_in_document_thing { |node| if node.name == 'h1'; break; else; node.remove; end }
shock_one has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
rbowlby_ has quit [Remote host closed the connection]
shock_one has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
<sdegutis> I thought it'd be more like i = @doc.index('h1') and @doc.remove(1..i)
kalusn has joined #ruby
<yorickpeterse> IIRC Nokogiri has no way to get the "index" of an element
Rollabunna has quit [Ping timeout: 256 seconds]
<yorickpeterse> which doesn't really work to begin with since HTML is a tree, not a list
bigkevmcd has joined #ruby
<sdegutis> well then @doc.keep_until('h1').delete
<ZOMGITSABEAR> if you planted html in the ground, what would sprout? a tree?
<sdegutis> yes
<sdegutis> a tree.
<ZOMGITSABEAR> TIL
<sdegutis> btw good joke.
<ZOMGITSABEAR> i'm chock full of 'em
Mia has quit [Ping timeout: 255 seconds]
<yorickpeterse> again in Oga this is pretty simple :P
ledestin has joined #ruby
casadei has quit [Remote host closed the connection]
s2013 has joined #ruby
devdazed has quit [Ping timeout: 265 seconds]
Squarepy has quit [Ping timeout: 245 seconds]
<yorickpeterse> err that leaves the first h1 though
<yorickpeterse> but if you'd move the "node.remove" before the if statement that would solve it
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
workmad3 has joined #ruby
<sdegutis> yorickpeterse: why do you hate nokogiri so much that you made oga btw?
Lucky__ has quit [Read error: Connection reset by peer]
GPrime has joined #ruby
GPrime has quit [Client Quit]
AndroidLoverInSF has joined #ruby
segfalt has quit [Quit: segfalt]
scottschecter has joined #ruby
<sdegutis> yorickpeterse: also im working with *really badly* formatted html with all sorts of badnesses in it
shock_one has quit [Ping timeout: 264 seconds]
<sdegutis> yorickpeterse: so im gonna put my foot in nokogiris bucket because its tried/true even if badly implemented
yfeldblum has joined #ruby
<yorickpeterse> Oga supports fucked up HTML just fine
blackmesa has joined #ruby
<sdegutis> yorickpeterse: well *maybe* i might use yours
mdw has quit [Ping timeout: 250 seconds]
musgravejw has joined #ruby
<sdegutis> yorickpeterse: but if i do, and if it works, know this: i will thank the crap out of you
centrx has joined #ruby
<yorickpeterse> Not suggesting you'd move now of course, that might be too costly, just saying that in general document modifications are a bit of a PITA in Nokogiri
GPrime has joined #ruby
<sdegutis> yorickpeterse: costly? this is my script bruh: https://gist.github.com/sdegutis/1bb16d82df774a52554a
<yorickpeterse> e.g. to create an element you do Nokogiri::XML::Element.new('name here', document)
<yorickpeterse> in oga it's just Oga::XML::Element.new(:name => 'name here')
<yorickpeterse> sdegutis: ah ok, I thought this might've been an entire app
griffindy has joined #ruby
<sdegutis> im seriously head scratching at this guy who wrote these html files. he wrote them 20 years ago, and he's been editing them FOR 20 YEARS with no source files, just the htm files
<sdegutis> shared headers, everything!
<yorickpeterse> replace Nokogiri::HTML() with Oga.parse_html(), replace //* in the XPath with descendant-or-self::* (//* sucks for performance, like really badly)
<sdegutis> yorickpeterse: hahaha noted
<yorickpeterse> Oga doesn't have a "replace" method, so you need to use the "before" method in the above gist
<sdegutis> brb gem installing oga
<yorickpeterse> then you should be set
<sdegutis> yorickpeterse: add #replace plz
<sdegutis> or ill monkey patch it (a threat, not a promise)
segfalt has joined #ruby
<yorickpeterse> heh
<yorickpeterse> I'll add it as a ticket since it is sorta useful
lkba has quit [Remote host closed the connection]
casadei has joined #ruby
<sdegutis> replace = self.before(new_node) && self.remove
bgmarx_ has quit [Remote host closed the connection]
hinbody has quit [Quit: leaving]
aaeron has quit [Quit: Leaving.]
<sdegutis> the thought "i wish i just knew haskell" is happening more often every month
benanne has joined #ruby
<sdegutis> who knows what the haskell version of this would be
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> Probably too long to fit on 10 lines
freerobby has quit [Quit: Leaving.]
<sdegutis> haha
<sdegutis> maybe parsec would help :P
<baweaver> ReplaceHTML :: [String] -> [String]
<sdegutis> yorickpeterse: how do i print the result afterwards?
<sdegutis> yorickpeterse: im literally turning this thing into markdown
<yorickpeterse> sdegutis: puts doc.to_xml
<baweaver> ReplaceHTML = SomeHTMLParser.substitute(pattern, with)
<sdegutis> yorickpeterse: but itll all just be text in the end
paulcsmith_ has quit [Quit: Be back later ...]
<sdegutis> all text elements.
<baweaver> ignore my bad psuedo-Haskell
<sdegutis> baweaver: done before you even asked
aaeron has joined #ruby
<yorickpeterse> sdegutis: not sure if I'm following
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zotherstupidguy has quit [Read error: Connection reset by peer]
zotherstupidguy has joined #ruby
<sdegutis> yorickpeterse: im turning this "<h2>foo</h2> \n <strong>bar</strong>" into "#foo \n **bar**"
<sdegutis> (extra spaces only added here for readability)
<yorickpeterse> Yes, and what is the problem exactly with calling to_xml on the resulting document?
rbowlby has joined #ruby
<yorickpeterse> Oga doesn't inject things like <html> elements and such, so that should be fine
malconis has quit [Ping timeout: 252 seconds]
LMity has joined #ruby
bgmarx has joined #ruby
skade has joined #ruby
alphaatom|pc has quit [Ping timeout: 272 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aeze has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
<sdegutis> oh it works
<sdegutis> nice
ledestin has quit [Read error: Connection reset by peer]
<undeadaedra> you're just trying to have Markdown from HTML?
kalusn has quit [Remote host closed the connection]
ledestin has joined #ruby
<sdegutis> not 100%
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sdegutis> undeadaedra: im also trying to strip away before/after html that i dont want -- only everything inside the #springfield2 element
<sdegutis> *only want
<sdegutis> undeadaedra: and i will eventually to do custom things with the transformation that arent technically markdown -- like turn it into LaTeX
<undeadaedra> AH, I remember this
<sdegutis> undeadaedra: what
duderonomy has joined #ruby
<undeadaedra> You talked about this before here, no?
baweaver has quit [Remote host closed the connection]
badhatter has quit [Read error: Connection reset by peer]
<sdegutis> yeah like a few hours ago or something?
<sdegutis> i forgot
<sdegutis> im just trying to grab the important stuff out of http://www.newadvent.org/fathers/01281.htm
Channel6 has joined #ruby
badhatter has joined #ruby
<undeadaedra> so I should already have said that there are already tools for these kind of transformations
allcentury has joined #ruby
<sdegutis> uhhhhhhhhh
failshell has joined #ruby
jaycee has quit [Read error: Connection reset by peer]
<jhass> sdegutis: that's easy, just two characters: ""
<jhass> scnr
<sdegutis> jhass: --------->
simplyianm has quit [Read error: Connection reset by peer]
<undeadaedra> that's an arrow
<yorickpeterse> -===☆ THE MORE YOU KNOW
<undeadaedra> congrats, you killed me
<Darkwater> ^and that's why you don't +c a channel
simplyianm has joined #ruby
Musashi007 has joined #ruby
<sdegutis> undeadaedra: no its like me pointing at the door
<jhass> uhm
<yorickpeterse> ᕕ(ᐛ)ᕗ
<sdegutis> undeadaedra: with this face :|
<jhass> Darkwater: +Ccnt
deric_skibotn has quit [Ping timeout: 276 seconds]
<yorickpeterse> get a better client if it doesn't like unicode
fujimura has joined #ruby
jgpawletko has joined #ruby
<undeadaedra> 11:28 <adaedra> maybe pandoc does it
<undeadaedra> yep, been there
<undeadaedra> yorickpeterse: I think problems is colors
<yorickpeterse> ehm, my stuff isn't using colors
<jhass> sdegutis: heh, if you don't want that your stuff is made fun of (especially for religion), better not put it into the internet ;)
segfalt has quit [Quit: segfalt]
<undeadaedra> so no problems \o/
<sdegutis> jhass: haahahhahahahahahahaa
<yorickpeterse> I have a plugin which can do it, but thankfully most channels have it disabled
<sdegutis> jhass: hahahahahahhahahahahahahahahhahaha wink
<sdegutis> anyway
benanne has quit [Quit: kbai]
allomov has quit [Remote host closed the connection]
<sdegutis> yorickpeterse: it broke
<sdegutis> yorickpeterse: lemme try again, maybe i messed itup
<yorickpeterse> 4h '/35, I 4£50 h4\/3 7hi5 |*£|_|6i|\|
<undeadaedra> d'accord
<yorickpeterse> ^ plugin called leet.py
<yorickpeterse> <3 weechat
Zen-Zen has joined #ruby
<yorickpeterse> but wait, there's more!
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyianm has quit [Remote host closed the connection]
<undeadaedra> I liked the rainbow.ext
<jhass> /prism is still the best
<undeadaedra> prism, here it is
northfurr has joined #ruby
<yorickpeterse> jhass: have that
<sdegutis> yorickpeterse: hey how do i strip out the top level element somehow?
* undeadaedra searches his memory
* yorickpeterse likes slapping people and randomly picks yorickpeterse to slap
mary5030 has quit [Remote host closed the connection]
<sdegutis> yorickpeterse: like technically i know thats not a possible thing
jgpawletko has quit [Client Quit]
<sdegutis> yorickpeterse: i mean i just want to combine all the children nodes into text (they are all text nodes afaik)
<yorickpeterse> sdegutis: you can just move its contents up, or only to_xml it
<undeadaedra> Channel is color-protected, can't rainbow :(
Zen-Zen has quit [Client Quit]
fujimura has quit [Ping timeout: 245 seconds]
<jhass> yorickpeterse: we can try in #ruby-offtopic how long it takes until apeiros would put +c back in ;D
<yorickpeterse> sdegutis: you can do something like...
sandstrom has quit [Quit: My computer has gone to sleep.]
autrilla has quit [Quit: Connection closed for inactivity]
<sdegutis> hi
casadei has quit [Remote host closed the connection]
<yorickpeterse> document = Oga.parse_html('...'); document.children = document.children[0]
<yorickpeterse> eerrrrr
<yorickpeterse> wait
<sdegutis> yorickpeterse: uhhhhh
<sdegutis> lol
<undeadaedra> oh, it's past midnight
<yorickpeterse> document = Oga.parse_html('...'); document.children = Oga::XML::NodeSet.new([document.children[0]])
<undeadaedra> good night everyone
<sdegutis> haha undeadaedra
<sdegutis> hahahah
<jhass> night undeadaedra
<undeadaedra> ok, going to bed seems to be funny :(
<yorickpeterse> sdegutis: you can also just take whatever root element you want and serialize that back to XML
jgpawletko has joined #ruby
<yorickpeterse> to_xml can be called on any node, not just the document itself
casadei has joined #ruby
<sdegutis> ok
simplyianm has joined #ruby
simplyianm has quit [Remote host closed the connection]
<sdegutis> yorickpeterse: im just trying to make it stop printing <div id="springfield2"> at the top of my output
<sdegutis> lol
simplyianm has joined #ruby
<jhass> undeadaedra: perhaps because you're undead?
rbennacer has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
kriskropd has quit [Remote host closed the connection]
<yorickpeterse> sdegutis: oh hmmm
<yorickpeterse> sdegutis: it might be easier to copy over Markdown to a String instead of modifying the document
<sdegutis> oh yeah maybe
<yorickpeterse> so you iterate over all nodes, find their replacements, append them to a separate String in order
kies has quit [Ping timeout: 265 seconds]
fabrice31 has joined #ruby
<sdegutis> yorickpeterse: thats tricky for nested nodes though, like string/em/a/blockquote nested inside p
<sdegutis> or sometimes blockquote nested inside p
<sdegutis> cuz you know, html
simplyianm has quit [Read error: Connection reset by peer]
k3asd` has quit [Ping timeout: 252 seconds]
failshell has quit [Remote host closed the connection]
<yorickpeterse> hm, true
<sdegutis> (that was my first attempt btw)
simplyianm has joined #ruby
<sdegutis> (to enumerate rather than transform)
<sdegutis> (but its hard)
rbennacer has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.2]
Luyt__ has joined #ruby
nitenq has joined #ruby
<nitenq> what is the keyword “ok” in ruby ?
<sdegutis> nitenq: haha there is no ok
sdegutis has quit [Remote host closed the connection]
mdz_ has joined #ruby
<ruboto> nitenq, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/246cebcc809f0ff43d34
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Luyt_ has quit [Ping timeout: 256 seconds]
kriskropd has joined #ruby
lkba has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
<nitenq> output : test 42 1434493071
<yorickpeterse> nitenq: that's probably a method defined in Sensu::Plugin::Metric::CLI::Graphite or somewhere else
blackmesa has quit [Quit: WeeChat 1.2]
<yorickpeterse> There's no actual "ok" keyword
sharpmachine has quit [Remote host closed the connection]
dgutierrez1287 has quit [Remote host closed the connection]
solars has quit [Ping timeout: 246 seconds]
<nitenq> all right thanks
whippythellama has quit [Quit: WeeChat 1.2]
evanjs has joined #ruby
cb_ has quit [Remote host closed the connection]
hefest has quit [Ping timeout: 276 seconds]
sharpmachine has joined #ruby
cb_ has joined #ruby
qwertme has joined #ruby
rubie has joined #ruby
CpuID has joined #ruby
CpuID has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
CpuID has joined #ruby
djbkd has joined #ruby
rbennacer has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
evanjs has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 250 seconds]
zenguy_pc has joined #ruby
dzejrou has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
hefest has joined #ruby
sharpmachine has quit [Remote host closed the connection]
rubie has quit [Ping timeout: 265 seconds]
sharpmachine has joined #ruby
rubie has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
yfeldblum has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
simplyianm has joined #ruby
malconis has joined #ruby
DrShoggoth has quit [Quit: Leaving]
pragmatism has joined #ruby
<EasyCo> Say you're using a gem, and you initialise the gem's class with arguments. How would you expect those arguments to be validated? On instantiation and throw and exception? On instantiation and return nil but have an #errors method (a-la Rails)? Manually run a #valid? method on instance after and get a list of #errors.
evanjs has joined #ruby
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
malconis has quit [Ping timeout: 255 seconds]
realDAB has joined #ruby
enebo has quit [Quit: enebo]
<havenwood> EasyCo: I'd expect duck typing and that it'd blow up wherever it stops quacking.
<havenwood> NoMethodError: undefined method `quack' for nil:NilClass
bruno- has joined #ruby
apt-get_ has quit [Quit: Quit]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: i've nodded off.]
otherj has quit [Quit: .]
mikecmpbll has joined #ruby
_seanc__ has joined #ruby
<centrx> That means it's not a duck
pragmati_ has joined #ruby
northfurr has quit [Quit: northfurr]
<meatchicken> Anyone familiar with lat/lng math here?
Zai00 has quit [Quit: Zai00]
northfurr has joined #ruby
<meatchicken> I have a point(lat/lng) and a distance. I need to figure out if another point is within the "circle"
<EasyCo> havenwood: Unfortunately in this instance duck typing wouldn't work because the gem takes information and outputs a parsed plain text file. So the user could really give it whatever value they want as long as it's a string within a certain max length. I'm just undecided of the best way to deal with that validation.
pragmati_ has quit [Client Quit]
pragmatism has quit [Ping timeout: 256 seconds]
Ox0dea has joined #ruby
someword has left #ruby [#ruby]
evanjs has quit [Remote host closed the connection]
<Rager> meatchicken: define: "the \"circle\""
<jhass> meatchicken: figure out in which projection your coordinates are, digging up the right formula with projection within radius / within range as search term should be easy
_seanc_ has quit [Ping timeout: 265 seconds]
_seanc__ is now known as _seanc_
roolo_ has quit [Remote host closed the connection]
<meatchicken> jhass, slow down there please -> projection?
<jhass> if you don't know it's probably wgs84
<centrx> meatchicken, isn't itsqrt((x1 - x0)^2 + (y1 - y0)^2)
gaboesquivel has quit []
realDAB has quit [Quit: realDAB]
<meatchicken> Rager, Well the base point(lat/lng) and the distance => make a "circle" of coverage
<jhass> centrx: if a broad approximation is okay
<Rager> centrx: on a cartesian plane, sure
ogpastal_ has quit [Remote host closed the connection]
volty has joined #ruby
<Rager> looks like a gem for you: https://github.com/djberg96/gis-distance
simplyianm has quit [Read error: Connection reset by peer]
<Rager> sounds like GIS work
<Rager> even if it's simple GIS
<meatchicken> What search terms to read up about this? you guys know what you're talking about
<meatchicken> centrx, what is that formula called? I recognize it from math classes lol
<centrx> probably called 'the distance formula'
<centrx> it's just a triangle
<meatchicken> centrx, isn't that a square?
skade has quit [Read error: Connection reset by peer]
<meatchicken> it was 4 points lol
<centrx> but the map is not the territory
<meatchicken> has*
simplyianm has joined #ruby
skade has joined #ruby
<centrx> the main proof of the Pythagorean theorem is with squares yes IIRC
nobitano_ has quit [Remote host closed the connection]
<centrx> but a square is just a triangle with four sides
<centrx> some call it a 'rectangle'
<centrx> Are you a quadriped?
nobitanobi has joined #ruby
<meatchicken> centrx, lol
<meatchicken> no a chicken is a two-legged animal
<volty> a triangle has, implied by its name, three angles
<dfockler> a biangle is a two angled line
<centrx> Plato says that a featherless chicken is a man
<meatchicken> wot is going on here
<Rager> what makes birds not quadrupeds?
<Rager> they use all four limbs for locomotion, after all
[H]unt3r has quit []
<centrx> ped means foot not wing
<havenwood> the unoangle is no angle at all
<Rager> or is quadrupedal locomotion actually formally defined as motion with four ground-touching apendages?
Xeago has quit [Remote host closed the connection]
<meatchicken> Rager, Is there a way to figure out without the 2nd lat/lng?
swgillespie has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<volty> what are the angles of a biangle ?
<meatchicken> nvm. I'll think it over
<volty> (the sum too)
<Rager> meatchicken: you're trying to find out of point 2 is within some given distance of point 1
<Rager> no
<Rager> ?
<dfockler> it's technically one angle, but at the same point and arc
krisquigley has joined #ruby
<havenwood> biangles, digons and hoshedrons--oh my
baweaver has joined #ruby
<havenwood> hosohedrons*
<meatchicken> Rager, yes. But I don't have access to point 2. I need to think on this more. thank you
<Rager> another gis kinda gem: https://github.com/rgeo/rgeo
<meatchicken> Idk what I started here, but pls be nice to chickens
balazs has quit [Remote host closed the connection]
<Rager> I eat chicken nearly every day
Igorshp has quit [Remote host closed the connection]
<Rager> mm, meat
RegulationD has quit [Remote host closed the connection]
lexun has joined #ruby
<dfockler> This is what happens when no one has a ruby question
<centrx> I wonder why rubyists weren't named rubes
<havenwood> Hmm, what can we do that's nice for chickens with Ruby...
scottschecter has quit [Ping timeout: 265 seconds]
<eam> anyone know of any ruby that segvs on a current interpreter?
<dfockler> pythonista + rubyist = pubyist
simplyianm has quit [Read error: Connection reset by peer]
<jhass> how are php people called actually?
<centrx> tards
<dfockler> phpers
<eam> we just try not to talk about it
krisquigley has quit [Ping timeout: 244 seconds]
<eam> don't make eye contact
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
Musashi007 has joined #ruby
simplyianm has joined #ruby
* jhass is tempted to search for php hipster on youtube
<Ox0dea> eam: Whose day are you trying to ruin?
<dfockler> I wish I was better at Ruby, but there is only so much I can know
<Rager> I think we mostly call them "employed"
<dfockler> BOOM!
<eam> Ox0dea: oh, I don't need anything like that, for that
<Ox0dea> Well, why are you wanting to crash Ruby?
<havenwood> Here, quick script to choose eggs from farms that treats chickens right: https://gist.github.com/havenwood/8f5433c21b65e798d6b9
alex88 has joined #ruby
<eam> Ox0dea: find bug fix bug
drewo has quit [Ping timeout: 255 seconds]
<Ox0dea> Oh.
<eam> there's probably still a ton in Regexp
<havenwood> Green eggs are good.
<Ox0dea> >> require 'fiddle'; Fiddle::Pointer.new(1)[0]
<ruboto> Ox0dea # => /tmp/execpad-4041a7a48552/source-4041a7a48552:2: [BUG] Segmentation fault at 0x000001 ...check link for more (https://eval.in/382726)
<Ox0dea> That's not a bug, though.
<havenwood> Helping chickens with ruby, check.
<eam> oh haha, the eval bot has a FFI gem loaded?
<Ox0dea> Fiddle is part of the standard library.
<eam> is ffi deprecated?
<Ox0dea> I'd imagine so.
hahuang65 has quit [Quit: WeeChat 1.2]
<eam> wow fiddle has been around for a while
workmad3 has quit [Ping timeout: 256 seconds]
dmolina has quit [Quit: Leaving.]
<eam> it doesn't do jruby though, does it
<Ox0dea> No, of course not.
<eam> why "of course?"
<eam> ffi does
paulcsmith_ has joined #ruby
<eam> looks like ffi is still current, just core vs supplementary?
hahuang65 has joined #ruby
<dfockler> Do any of the other ruby implementations have better performance in general than MRI?
<eam> jruby does for some workloads, and doesn't for others
alex88 has quit [Ping timeout: 250 seconds]
<dfockler> I know jruby has real threads
<eam> mri has real threads too
<dfockler> it just has the GIL
<eam> yes, which synchronizes across the real threads :)
paulcsmith_ has quit [Client Quit]
<eam> as distinct from say green threads
theery has quit []
j4cknewt has quit [Remote host closed the connection]
<dfockler> so if you want parallelism you shouldn't use MRI?
x1337807x has joined #ruby
<baweaver> If you want parallelism you shouldn't use Ruby
<eam> depends what kind of parallelism, i/o or interpreter/cpu
mdz_ has quit [Remote host closed the connection]
<eam> baweaver: or just don't use threads (fork is fine)
<baweaver> fine fine, but honestly this is Erlang/Elixir's crowning feature
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler> Elixir is starting to get popular
<baweaver> what I'm getting at is use the right tool for it, and those are far better for it.
<dfockler> baweaver: that makes good sense
<eam> >> Regexp.new ("[" * (2**20)) + "a" + ("]" * (2**20))
<ruboto> eam, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<eam> there's one
<Rager> if you want parallelism in ruby, you can usually get away with background jobs
<eam> that wasn't hard
<eam> oh wait, it's just a SystemStackError in 2.2, sigh
<dfockler> Rager: That's what I'm using now
<havenwood> dfockler: JRuby+Truffle on Graal has very, very impressive performance. It's just lately able to run Rack. No RubyGems or Rails yet.
<dfockler> havenwood: I read about that, it sounds pretty cool
mister_solo has joined #ruby
<dfockler> It's so cool that languages are now just an interface to a computation engine, I guess they always were
<havenwood> dfockler: If you haven't already, check out these benchmarks: http://jruby.org/bench9000/
skade has quit [Quit: Computer has gone to sleep.]
<eam> I mean honestly, if there's any kind of performance aspect for a task you probably don't want ruby
Ropeney has joined #ruby
<havenwood> truffle-graal really stands out from the pack
<dfockler> dang!
podman has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
aryaching has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<havenwood> dfockler: Some great reading on other things it makes possible: http://www.chrisseaton.com/rubytruffle/modularity15/rubyextensions.pdf
jackjackdripper has quit [Quit: Leaving.]
platzhirsch has left #ruby [#ruby]
<zenspider> you don't use ruby because it is fast. you use ruby because it is fast enough and MUCH better to implement in / maintain
<zenspider> which one is topaz?
<havenwood> zenspider: rpython proof of concept for speedy dynamic lang
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> zenspider: like pypy for ruby but they stopped development as soon as they proved they could do it
<zenspider> POC meaning it doesn't run real things (eg rails) yet?
<havenwood> no rails
<zenspider> kk. then headius' critique applies. They haven't added all the cases that'll slow it down
<havenwood> they claimed they did
<havenwood> dunno
podman has joined #ruby
Akagi201_ has quit [Remote host closed the connection]
cb_ has quit [Remote host closed the connection]
rbowlby has quit [Remote host closed the connection]
cb__ has joined #ruby
mleung has quit [Quit: mleung]
dfockler has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
DLSteve has quit [Quit: Leaving]
bruno- has quit [Ping timeout: 256 seconds]
<havenwood> zenspider: There was a rogues episode with the lead topaz dev a while back: http://devchat.tv/ruby-rogues/096-rr-topaz-with-alex-gaynor
dgutierrez1287 has joined #ruby
evanjs has joined #ruby
<havenwood> two years ago, time flies..
veinofstars has quit [Quit: veinofstars]
<zenspider> I can't / won't do rogues
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> :P
<nitenq> how can I get the output of a shell comand with ruby ?
<jhass> nitenq: Kernel#`
<jhass> >> `ls`
<ruboto> jhass # => (https://eval.in/382735)
<jhass> in theory
Silent__ has quit [Read error: Connection reset by peer]
<centrx> >> :bravo
<ruboto> centrx # => :bravo (https://eval.in/382736)
baweaver has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has quit [Read error: Connection reset by peer]
ascarter has quit [Read error: Connection reset by peer]
jcaho has quit [Read error: Connection reset by peer]
Silent__ has joined #ruby
davedev24_ has joined #ruby
cb__ has quit [Ping timeout: 265 seconds]
Mon_Ouie has quit [Ping timeout: 264 seconds]
<nitenq> ok thanks
jcaho has joined #ruby
towski__ has joined #ruby
wookiehangover has quit [Ping timeout: 252 seconds]
mister_solo has quit [Quit: So long, and thanks for all the fish!]
mattbillock has quit [Read error: Connection reset by peer]
snockerton has quit [Quit: Leaving.]
mikecmpbll has quit [Quit: i've nodded off.]
startupality has joined #ruby
crdpink has quit [Read error: Connection reset by peer]
crdpink has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
towski_ has quit [Ping timeout: 276 seconds]
finisherr has quit [Quit: finisherr]
mdz_ has joined #ruby
<zenspider> havenwood: I can't skim audio and I _really_ can't listen to rogues... tons of rambling bullshit
Pisuke has quit [Ping timeout: 240 seconds]
<zenspider> nitenq: depends on what you want to do... you might want to look at popen
<nitenq> it’s ok it works perfectly with `` :)
eggoez has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
cirn0_ has quit [Remote host closed the connection]
diegoviola has joined #ruby
A205B064 has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
kfpratt has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> >> [].lazy.map.with_index
<ruboto> Ox0dea # => tried to call lazy map without a block (ArgumentError) ...check link for more (https://eval.in/382739)
Rollabunna has joined #ruby
<Ox0dea> Having to reverse the calls to #map and #with_index feels leaky.
veinofstars has joined #ruby
kfpratt has joined #ruby
evanjs has quit [Remote host closed the connection]
kfpratt has quit [Remote host closed the connection]
<Ox0dea> All the standard Enumerable methods are special-cased on lazy ones to fail when not provided with a block, and I can't quite see why that should be.
gluten_hell_ has joined #ruby
<zenspider> why?
sharpmachine has quit [Remote host closed the connection]
<Ox0dea> Good question.
<chrisseaton> zenspider: even speaking as a competitor to Topaz (I do the Truffle implementation) I think they did actually solve most of the hard parts of Ruby by the time they stopped - they weren't complete but they tackled most things that might be problematic
<zenspider> oh hey! how goes chrisseaton ?
<chrisseaton> good thanks - writing up my PhD on Truffle right now
<zenspider> I'm... sorry?
<chrisseaton> yeah it's not fun
cirn0 has joined #ruby
<chrisseaton> well actually it is, it's just hard
Rollabunna has quit [Ping timeout: 252 seconds]
<zenspider> I've enjoyed following your work (tho, admittedly, it isn't much... my nerd fetishes are currently falling on the PLT camp, and then viewpoints research institute)
<zenspider> *nod*
shock_one has joined #ruby
ItSANgo has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
ItSANgo has joined #ruby
<zenspider> 500
* baweaver whistles at url length
eggoez has joined #ruby
<zenspider> yeah... something is bad in that url... prolly the token
<zenspider> god I hate what the acm has done to open academia
gluten_hell_ has quit [Ping timeout: 265 seconds]
ItSANgo has quit [Max SendQ exceeded]
<baweaver> considering all the escaped chars in there
startupality has quit [Quit: startupality]
<centrx> An error occurred while processing your request.
<centrx> This is going to be my new phrase instead of "No comment"
ItSANgo has joined #ruby
<zenspider> oh. the IP address is in there, so it probably borks on that against the token
<chrisseaton> search seaton on that and I think the link works from there
<chrisseaton> it's open access, as long as you have the right referral header I think!
ItSANgo has quit [Max SendQ exceeded]
<havenwood> chrisseaton: Yup, that worked. :)
<zenspider> ah. I forgot that you're working w/ Ducasse on this
<zenspider> nice
workmad3 has joined #ruby
ItSANgo has joined #ruby
shock_one has quit [Ping timeout: 276 seconds]
segfalt has joined #ruby
<zenspider> chrisseaton: was there a similar paper ~6 mo back?
<zenspider> I don't remember the timeframe, tbh
<Rager> question on what the common practice is
<Rager> wait... wrong channel
<chrisseaton> zenspider: there was a blog post that was similar before we got the paper
<chrisseaton> papers are about six months behind what we're doing
ItSANgo has quit [Max SendQ exceeded]
djbkd has quit [Remote host closed the connection]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
<zenspider> that's probably it
ItSANgo has joined #ruby
<zenspider> I'll queue this up for a read. interesting that there's only one ungar ref...
veinofstars is now known as veinofJebDays
<zenspider> hrm... looks like I want to read "A Domain-Specific Language for Building Self-Optimizing AST Interpreters."
djbkd has joined #ruby
fujimura has joined #ruby
JEG2 has quit [Quit: Connection closed for inactivity]
RegulationD has joined #ruby
<zenspider> yay. found it outside of the acm paywall
rcvalle has quit [Quit: rcvalle]
ndrei has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
<zenspider> chrisseaton: oh. that's also about truffle?
InternetFriend has joined #ruby
volty has quit [Quit: Konversation terminated!]
<chrisseaton> yeah that's how we represent Ruby objects
<chrisseaton> oh sorry - misread - that's the DSL that we use to build JRuby+Truffle
drewo has joined #ruby
jgpawletko has joined #ruby
InternetFriend has quit [Client Quit]
<nitenq> I want to catch the aggrb value from this file. All is in a string “cmd” so I tried to do something like this http://pastebin.com/XjgMtV9h and it works for value[1] = “60317” but value[2] is not = “60222”
<ruboto> nitenq, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5a9f171f5ea6e761ab30
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
fujimura has quit [Ping timeout: 244 seconds]
Cust0sLim3n has quit [Max SendQ exceeded]
<zenspider> nitenq: you're splitting on that regexp
RegulationD has quit [Ping timeout: 256 seconds]
ItSANgo has quit [Max SendQ exceeded]
<zenspider> that's treating the text you're interested in as the delimiter
<zenspider> you probably want scan?
<nitenq> what do you mean ?
sevenseacat has joined #ruby
<zenspider> >> "a b c".scan(/\w+/)
<ruboto> zenspider # => ["a", "b", "c"] (https://eval.in/382744)
<zenspider> >> "a b c".split(/\w+/)
<ruboto> zenspider # => ["", " ", " "] (https://eval.in/382745)
Cust0sLim3n has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]