havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Can't talk? Register/identify with Nickserv first! || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<platzhirsch> If it has a state, it's not functional
<Ox0dea> False.
<Ox0dea> Programming is a subset of mathematics, not strictly equal to it.
riskish has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nyon is now known as quater-nyon
chouhoulis has quit [Remote host closed the connection]
hinbody has quit [Quit: leaving]
<platzhirsch> Well, I stand on that, I really don't mind. Even Haskell can't follow with this one completely through, especially when it comes to IO and usage of Monads, even they can't avoid introducing a state
tiagonobre has quit [Quit: Connection closed for inactivity]
<Ox0dea> platzhirsch: You stand on what? That truly functional programs should just make the machine run a little hotter?
<platzhirsch> You can call it false and put emphasis on it by ending it with a period . ;) but these are my definitions, I learned them this way in my studies, if you can point me to some thorough definitions that say otherwise, be my guest
<Ox0dea> > put emphasis on it by ending it with a period
<platzhirsch> What's wrong now?
<Ox0dea> It's rather tragic how quickly that interpretation has managed to spread.
<Ox0dea> Proplery ending sentences is now passive-aggressive.
<Ox0dea> *Properly
<platzhirsch> so tragic, fills me with sorrow every morning
RegulationD has joined #ruby
<Ox0dea> >> make_adder = -> n { -> x { n + x } }; add3 = make_adder[3]; add3[2]
<ruboto> Ox0dea # => 5 (https://eval.in/437794)
cyrus_mc has joined #ruby
<Ox0dea> platzhirsch: What stops us considering `add3` to be functional here?
Eddieh_ has joined #ruby
baweaver has joined #ruby
<Ox0dea> There exists an obvious bijection between the inputs and the outputs.
<Ox0dea> Is that not the mathematical definition of a function?
<cyrus_mc> Looking at some code: https://github.com/puppetlabs/mcollective-puppet-agent/blob/master/util/puppet_agent_mgr.rb, line 115 where it references Puppet[:resourcefile]) I don't see where Puppet hash map (assuming that is what it is) is defined. This class doesn't inherit from another so where could it be finding that
<Ox0dea> cyrus_mc: Try seeing what `Puppet.method(:[])` resolves to.
polly_wog has quit [Remote host closed the connection]
<cyrus_mc> k
bayed has quit [Quit: Connection closed for inactivity]
<platzhirsch> Ox0dea: That's a great example, I would say nothing would stop us considering this functional, seems to satisfy all conditions
<Ox0dea> platzhirsch: Excellent. :)
tcopeland has quit [Ping timeout: 240 seconds]
<Ox0dea> cyrus_mc: It's for querying settings.
RegulationD has quit [Ping timeout: 246 seconds]
ebragaparah has joined #ruby
tcopeland has joined #ruby
<Ox0dea> cyrus_mc: http://git.io/vnwar
<Ox0dea> (Virtually) any object can have a #[] method.
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
slackbotgz has quit [Remote host closed the connection]
<cyrus_mc> Ox0dea: I figured something like this .. but in the class I posted above I don't see it referencing this library (woudln't it need to include/require it or inherit this class or create an instance of that class to access it)
<cyrus_mc> doh .. just saw it
<cyrus_mc> never mind
lxsameer has quit [Quit: Leaving]
<Ox0dea> cyrus_mc: Not your fault; it was tucked away a bit.
<cyrus_mc> it was
robinboening has quit [Quit: robinboening]
bigmac has quit [Ping timeout: 240 seconds]
ngscheurich has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
<platzhirsch> But I never denied that Ruby doesn't incorporate functional programming aspects, I only said if it has a state it's not functional. That's why only add3 is functional, embedded in an imperative environment which relies on objects, states and order of execution
<Ox0dea> platzhirsch: I'm not sure I follow. You've conceded that `add3` is both functional and that it has state, which is a contradiction of your own terms.
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
michael_mbp has quit [Excess Flood]
pengin has quit [Remote host closed the connection]
ramfjord has joined #ruby
howdoico1 has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
cajone has quit [Read error: Connection reset by peer]
<platzhirsch> sigh, the definition of add3 is functional, add3 itself is still an object
devoldmx has joined #ruby
tuxero has quit [Quit: tuxero]
evanjs has joined #ruby
quater-nyon is now known as hamilto-nyan
mary5030 has quit [Ping timeout: 240 seconds]
<Ox0dea> platzhirsch: Then my initial question stands. Why isn't `add3` itself functional?
<Ox0dea> How does it violate the mathematical definition?
workmad3 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
solocshaw has joined #ruby
Adran has left #ruby [#ruby]
Ropeney has joined #ruby
allcentury has joined #ruby
benlovell has joined #ruby
<Ox0dea> (Spoiler alert: it doesn't.)
hamilto-nyan has quit [Quit: F...ix you, Emacs!!!]
quater-nyon has joined #ruby
tkuchiki has joined #ruby
<platzhirsch> Because it depends on side-effects, it's not enough to just declare it. The function exists within the scope of an object, it needs that, in order to be invoked you have to make it part of a code that is executed in a procedural way
Igorshp has joined #ruby
<Ox0dea> platzhirsch: You've got it backwards. It's the "scope" that exists within the "function", so to speak.
devoldmx has quit [Ping timeout: 272 seconds]
j4cknewt_ has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
<platzhirsch> If the order of execution doesn't matter, it's functional, but here the order is crucial so we get a result
bronson has quit [Remote host closed the connection]
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
casadei_ has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
workmad3 has quit [Ping timeout: 252 seconds]
Igorshp has quit [Remote host closed the connection]
paulcsmith has joined #ruby
<Ox0dea> platzhirsch: The division "function" relies on some definition of "predecessor"; does that mean division isn't functional?
<platzhirsch> For me it would be strictly functional, if once declared and bound to it's name, it cannot be changed, because there is no order, no change possible, it's just declared as it is and that's the only thing that matters. The example is imperative, because all it's part have a state, that depend on each other, variable assignment, invoking the objects by sending methods to them here [](3)
tatsuo has joined #ruby
benlovell has quit [Ping timeout: 255 seconds]
<Ox0dea> You're using a lot of words to say almost nothing of consequence.
tkuchiki has quit [Remote host closed the connection]
opensource_ninja has quit [Quit: opensource_ninja]
<platzhirsch> You're talking about mathematical functions, where as I am talking about the functional programming paradigm
<platzhirsch> I guess that's where most of the confusion comes from
<Ox0dea> platzhirsch: It was you who initially declared that programs can't be functional in the mathematical sense.
<Ox0dea> Because state.
Wolland has quit []
asdasdas has joined #ruby
<pipework> Ooh nerd-off!
* pipework grabs the popcorn
<platzhirsch> Exactly
jenrzzz has quit [Ping timeout: 250 seconds]
casadei_ has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
rezzack has joined #ruby
<platzhirsch> Ox0dea: Listen, you're absolutely right. I think you have very well demonstrated how smart you are, I mean that was the point of this whole discussion, who can outsmart who with his definitions, pretty mindless. But I am not too put off, at least it made me go through my old uni notes and read up again about how we defined that stuff, still love it
asdasdas has left #ruby [#ruby]
<Ox0dea> Ad hominem means you lose, bud.
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
skweek has joined #ruby
skweek has quit [Remote host closed the connection]
ledestin has joined #ruby
marr has quit [Ping timeout: 250 seconds]
<platzhirsch> This basically screams for a Hitler comparison, just to make the Internet laugh
<platzhirsch> Yes Ox0dea, you won the argument
<platzhirsch> on the Internet
evanjs has quit [Remote host closed the connection]
<Ox0dea> platzhirsch: But you learned something!
<Ox0dea> What a foolish thing about which to be butthurt.
<platzhirsch> You write very inflammatory
bmurt has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
cajone has joined #ruby
<Ox0dea> Offense cannot be given.
baweaver has joined #ruby
zenspider has joined #ruby
atomical has joined #ruby
<zenspider> can I get someone to ping envy.zenspider.com ??
<platzhirsch> sure dude
<platzhirsch> doesn't pong much
<zenspider> looks down, but I'm on shitty SF wireless
<zenspider> much, or at all?
bricker has quit [Ping timeout: 244 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
<zenspider> actually, the fact that my proxy isn't holding "zenspider" here, means it's dead. how is it that it ONLY goes out when I trevel? I how does it know?
redondo has quit [Ping timeout: 264 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
<platzhirsch> Hope it's not on a Raspberry Pi ;)
<jhass> well, comcast
<jhass> not too surprised I guess :P
vdamewood has joined #ruby
<zenspider> that was the next plan... call in and see if it is them or me
<jhass> I do get pretty far into their network though
bmurt has quit []
NeverDie has quit [Quit: http://radiux.io/]
<jhass> up to te-0-1-0-ten14.seattle.wa.seattle.comcast.net / e-0-1-1-ten14.seattle.wa.seattle.comcast.net
<zenspider> yeah, but I'm only 1 hop off the neighborhood trunk, so you can get all but
cyrus_mc has quit [Ping timeout: 260 seconds]
<jhass> smells like borked home router to nonetheless (or failed to update dyndns?)
<jhass> * to me
j4cknewt has joined #ruby
mary5030 has joined #ruby
NeverDie has joined #ruby
<craysiii> have you tried turning the flux capacitor off and on again?
unop has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has quit [Client Quit]
stardiviner has joined #ruby
<zenspider> cable is up. host is down. comcast business support can barely understand "ping" so... *shrug*
cantaberry has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
<zenspider> argh. luckily my neighbors have a key
wildlander has quit [Quit: Saliendo]
sharkman has quit [Quit: Leaving]
<zenspider> ah. neighborhood lost power... my UPS may have stayed off
<craysiii> not a very good UPS :P
tatsuo has quit [Remote host closed the connection]
<zenspider> well... it can signal to the box to shutdown cleanly because it is running out. In those cases, I don't think the server comes back up when power is restored
<drbrain> it's been out for an hour or two now over there
<zenspider> tho, maybe I should have a scheduled "on" time, so it'll always recover if I just wait it out
<zenspider> drbrain: about as long as I've been trying to use shitty SF cafe networks. :)
<zenspider> was there weather or something?
evanjs has joined #ruby
<zenspider> I didn't hear about any storms
tatsuo has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
<drbrain> a tree fell over randomly, it seems: https://twitter.com/SEACityLight/status/646474861720682496
<drbrain> the map says you should have power
<zenspider> hah. stupid tree
allcentury has quit [Ping timeout: 265 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<zenspider> yeah. it's been restored, server jsut didn't come back up
<zenspider> I really should move it offsite so I can switch to fiber
towski_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
drewvanstone has joined #ruby
maletor has quit []
<zenspider> welp... guess I'm not releasing minitest today :)
dravine has joined #ruby
casadei_ has joined #ruby
renancarvalho has joined #ruby
rattatmatt has joined #ruby
jobewan has quit [Quit: Leaving]
Technodrome has quit [Quit: Technodrome]
karapetyan has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
workmad3 has joined #ruby
roxtrongo has quit [Ping timeout: 244 seconds]
drewvanstone has quit [Ping timeout: 255 seconds]
tatsuo has quit [Remote host closed the connection]
<zenspider> hrm... should be back up :/
Kricir has joined #ruby
<platzhirsch> Any suggestions for this code to write it either shorter or more understandable? https://gist.github.com/platzhirsch/41326d2df2dd631470ce Personally I'd just hack it in one line, but that won't help others really understand what's going on. It basically padds up a certain number with zeros if there are not enough and converts the number to a base 36
tatsuo has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
jackjackdripper has quit [Ping timeout: 256 seconds]
jackjackdripper1 has joined #ruby
tjbiddle has joined #ruby
<zenspider> platzhirsch: `ri String.rjust`
G__ is now known as g
g is now known as G
<zenspider> oops. ljust
<zenspider> >> ("12".ljust 6, "0").to_i.to_s 16
<ruboto> zenspider # => "1d4c0" (https://eval.in/437809)
<platzhirsch> oh boy, why haven't I thought of ljust, good one zenspider
NeverDie has joined #ruby
<platzhirsch> also handles negative values, much better
workmad3 has quit [Ping timeout: 264 seconds]
<zenspider> mmm... that'll pad to the wrong amount
<zenspider> assuming you always want 6 digits
<platzhirsch> ?
<platzhirsch> oh no, just a minimum basically
mary5030 has quit [Remote host closed the connection]
swgillespie has joined #ruby
RobertBirnie has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
RobertBirnie has joined #ruby
djbkd has quit [Quit: My people need me...]
baweaver has quit [Remote host closed the connection]
<zenspider> PINGING
mary5030 has quit [Ping timeout: 240 seconds]
<platzhirsch> 9% packet loss sir
<platzhirsch> err 0
podman has quit [Quit: Connection closed for inactivity]
<platzhirsch> everything is turned off on your web server
<zenspider> all back up it seems
<zenspider> brb
zenspider has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
zenspider has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
shum has joined #ruby
<zenspider> yay
Rodya_ has joined #ruby
wallerdev has joined #ruby
PlasmaStar has quit [Ping timeout: 246 seconds]
Rodya_ has quit [Remote host closed the connection]
ebragaparah has quit [Remote host closed the connection]
dopamean_ has joined #ruby
renancarvalho has quit [Ping timeout: 265 seconds]
Rodya_ has joined #ruby
freerobby has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
alphaatom|pc has quit [Ping timeout: 240 seconds]
PlasmaStar has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joufflu has joined #ruby
bronson has joined #ruby
dopamean_ has quit [Ping timeout: 240 seconds]
yqt has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
MeMoc has quit [Quit: Connection closed for inactivity]
Kricir has left #ruby [#ruby]
mjs2600 has quit [Quit: Connection closed for inactivity]
wallerdev has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby
<ICantCook> Is there a general webdev chan on freenode?
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
iamninja has joined #ruby
<BraddPitt> i think #webdev ICantCook
<BraddPitt> not certain though
<ICantCook> thanks
renderful has joined #ruby
blackmesa has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Ping timeout: 268 seconds]
michael_mbp has quit [Excess Flood]
bmurt has joined #ruby
iamninja has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
Feyn has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
renderful has quit [Ping timeout: 265 seconds]
<beauby> When defining a block, when is the method resolution happening? When the block is ran?
<beauby> (for methods inside the block)
opensource_ninja has joined #ruby
michael_mbp has joined #ruby
evanjs has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Quit: tjbiddle]
Rodya_ has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
meatherly has joined #ruby
ngscheurich has joined #ruby
bkulbida has joined #ruby
<centrx> right
andybernard has joined #ruby
<andybernard> does anyone know how to save "/" in mongoid?
diegoviola has joined #ruby
Yzguy has quit [Quit: Zzz...]
bronson has joined #ruby
Respek has joined #ruby
Respek has quit [Client Quit]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
andybernard has quit [Quit: Leaving]
bmurt has quit []
Lucky__ has joined #ruby
arescorpio has joined #ruby
ariedler has joined #ruby
timanema has joined #ruby
Narzew has quit [Remote host closed the connection]
eat_multi has joined #ruby
<ICantCook> yes
bronson has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
swgillespie has joined #ruby
michael_mbp has joined #ruby
tjbiddle has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<beauby> centrx: how about doing `def g; yield; end; def f; g do yield; end; end`, will the implicit block be resolved in f or in g?
benlovell has joined #ruby
dorei has quit []
workmad3 has joined #ruby
agent_white has joined #ruby
agent_white has quit [Client Quit]
benlovell has quit [Ping timeout: 240 seconds]
ddrmanxbxfr has joined #ruby
freerobby1 has quit [Quit: Leaving.]
jimmybomb1 has joined #ruby
<jimmybomb1> hey guys, im developing a web api and im having a debate with my colleagues whether we should put guid in our 'GET' urls.. do you guys think this is a smell? if it is what are the alternatives to put in get urls (assuming that all our resources already have guid assigned to them as their id)?
crdpink2 has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 268 seconds]
crdpink2 has joined #ruby
<beauby> jimmybomb1: This question is probably more suited to #rubyonrails, or a more general purpose webdev channel
<jimmybomb1> alright thanks
wldcordeiro has joined #ruby
dopamean_ has joined #ruby
meatherly has quit []
rezzack has quit [Ping timeout: 240 seconds]
jimmybomb1 has quit [Quit: Leaving]
crdpink has joined #ruby
devoldmx has joined #ruby
bruno- has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has quit [Ping timeout: 268 seconds]
wldcordeiro has quit [Ping timeout: 240 seconds]
crdpink2 has quit [Ping timeout: 260 seconds]
crdpink has quit [Ping timeout: 240 seconds]
pontiki has joined #ruby
Rodya_ has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 264 seconds]
<Ox0dea> >> def g; yield; end; def f; g do yield; end; end; f { caller[0, 3] } # beauby
<ruboto> Ox0dea # => ["/tmp/execpad-3ef329ea5a54/source-3ef329ea5a54:2:in `block in f'", "/tmp/execpad-3ef329ea5a54/sourc ...check link for more (https://eval.in/437821)
bruno- has quit [Ping timeout: 250 seconds]
<Ox0dea> Dammit. I forgot that'd be so ugly.
cantaberry has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crdpink has joined #ruby
<jt__> is "Class#method" is just a convention but no actual meaning? I notice on rails route there is this 'class#method'
meatherly has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<Ox0dea> jt__: Right, it's just notational convention for instance methods.
pontiki has quit [Client Quit]
crdpink has quit [Client Quit]
crdpink has joined #ruby
<jt__> how about the former the one on rails route? e.g get 'link' => 'link#new'
ryez has joined #ruby
howdoico1 has quit [Ping timeout: 264 seconds]
aghalarp has joined #ruby
<Ox0dea> jt__: Same meaning, for all intensive porpoises.
scoot has joined #ruby
<jt__> ok, thanks
<beauby> >> class A; def self.a(&block); Class.new do block.call; end; end; class B < A; a do p self; end; # Ox0dea
<ruboto> beauby # => /tmp/execpad-3df07b561a1f/source-3df07b561a1f:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/437822)
<beauby> >> class A; def self.a(&block); Class.new do block.call; end; end; end; class B < A; a do p self; end; # Ox0dea
<ruboto> beauby # => /tmp/execpad-35c10e772dae/source-35c10e772dae:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/437823)
<Ox0dea> beauby: One more. :P
<beauby> Damn, sorry, I have to get better at one-lining ruby
<beauby> >> class A; def self.a(&block); Class.new do block.call; end; end; end; class B < A; a do p self; end; end; # Ox0dea
<ruboto> beauby # => B ...check link for more (https://eval.in/437824)
<beauby> And that's what I nailed my issue down to
<beauby> I want `self` to be that of `Class.new` here
<beauby> I had some hope it would be some implicit blocks limitation when I started with yield, but it seems to make no difference
meatherly has quit [Ping timeout: 252 seconds]
stardiviner has joined #ruby
aghalarp has quit [Ping timeout: 256 seconds]
<Ox0dea> beauby: Are you sure you want to call the block and have that be the body of the class?
<beauby> Ox0dea: yes I am
<Ox0dea> beauby: I'm pretty sure #instance_eval could be finagled into doing your monstrous bidding.
tejasmanohar has quit [Ping timeout: 256 seconds]
tejasmanohar has joined #ruby
<beauby> Ox0dea: Thanks, I'll look that up. Basically what I'd like to achieve is, inside a class `B < A`, having a class method from `A`, let's say `implicit_define_class` called like `implicit_define_class do ... end`, that would actually create a class inside `A`, with body what's provided in the given block
aghalarp has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
<beauby> >> class A; def self.a(&block); Class.new.instance_eval do block.call; end; end; end; class B < A; a do p self; end; end; # Ox0dea
<ruboto> beauby # => B ...check link for more (https://eval.in/437825)
<beauby> :'(
ryez has quit [Quit: Page closed]
bkulbida has quit [Ping timeout: 250 seconds]
casadei_ has quit []
redondo has joined #ruby
<beauby> Thing is, if I directly do `p self` inside the `Class.new do ... end`, it does not output `B`
<beauby> >> class A; def self.a(&block); Class.new.instance_eval do p self; end; end; end; class B < A; a do p self; end; end; # Ox0dea
<ruboto> beauby # => #<Class:0x407a3c18> ...check link for more (https://eval.in/437826)
<beauby> Which somehow gives me hope I can make it work, but I have to understand what's going on with the blocks a bit better
meatherly has joined #ruby
Contigi has quit [Read error: Connection reset by peer]
yosafbridge has quit [K-Lined]
mary5030 has joined #ruby
yosafbridge has joined #ruby
mdih has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
howdoico1 has joined #ruby
fastAndSlow has joined #ruby
<beauby> >> class A; def self.a(&block); c = Class.new; c.instance_eval &block; end; end; class B < A; a do p self; end; end; # Ox0dea
<ruboto> beauby # => #<Class:0x40833cc8> ...check link for more (https://eval.in/437830)
<beauby> Woohoo, thanks a lot for the suggestion Ox0dea! Now onto understanding why it didn't work with the block.call inside the do..end
moeabdol has quit [Ping timeout: 246 seconds]
psy_ has joined #ruby
j4cknewt has joined #ruby
mrtomme has quit [Ping timeout: 264 seconds]
mrtomme has joined #ruby
gener1c has joined #ruby
drewvanstone has joined #ruby
gener1c_ has quit [Ping timeout: 264 seconds]
nettoweb has joined #ruby
braincrash has quit [Quit: bye bye]
baweaver has joined #ruby
vdamewood has quit [Quit: Life beckons.]
bronson has joined #ruby
braincrash has joined #ruby
swgillespie has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
j4cknewt has joined #ruby
fastAndSlow has quit [Quit: leaving]
shadoi has quit [Quit: Leaving.]
meatherly has quit []
darkf has joined #ruby
ddrmanxbxfr has quit [Quit: This computer has gone to sleep]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 252 seconds]
phutchins2 has quit [Ping timeout: 246 seconds]
voltalio has joined #ruby
meatherly has joined #ruby
jackjackdripper has joined #ruby
michael_mbp has quit [Excess Flood]
kies^ has joined #ruby
michael_mbp has joined #ruby
karapetyan has joined #ruby
llua has joined #ruby
<llua> !tutorial
timanema has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 240 seconds]
michael_mbp has quit [Excess Flood]
banjara has quit [Quit: Leaving.]
michael_mbp has joined #ruby
Oka has quit [Quit: o/]
Pupeno has joined #ruby
tkuchiki has joined #ruby
ckuhn has joined #ruby
meatherly has quit [Ping timeout: 246 seconds]
iamninja has joined #ruby
gix has joined #ruby
<ckuhn> is jruby ultra slow for anyone else?
diegoviola has quit [Quit: WeeChat 1.3]
tkuchiki has quit [Ping timeout: 240 seconds]
Pupeno has quit [Ping timeout: 264 seconds]
iamninja has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
djbkd has joined #ruby
scoot_ has joined #ruby
zotherstupidguy has joined #ruby
scoot has quit [Ping timeout: 240 seconds]
drewvanstone has quit [Ping timeout: 256 seconds]
vjdhama has joined #ruby
vjdhama has quit [Remote host closed the connection]
vjdhama has joined #ruby
howdoico1 has quit [Ping timeout: 244 seconds]
arescorpio has quit [Quit: Leaving.]
agent_white has joined #ruby
scoot_ has quit [Remote host closed the connection]
<eam> ckuhn: to start?
<ckuhn> To compile and run
<baweaver> JVM is like that regardless
scoot has joined #ruby
<baweaver> crap start time, but decent over distances
<eam> yeah you're looking at the jvm startup overhead
<agent_white> Evenin'
<ckuhn> I guess I didn't notice because java is already compiled
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> ckuhn: it should be faster for a server which is started once and runs long
havenwood has joined #ruby
howdoi has joined #ruby
Eddieh_ has quit [Quit: Textual IRC Client: www.textualapp.com]
howdoico1 has joined #ruby
<Ox0dea> beauby: Still about?
vjdhama_ has joined #ruby
favadi has joined #ruby
vjdhama has quit [Read error: Connection reset by peer]
benlovell has joined #ruby
drewvanstone has joined #ruby
<bnagy> I can't find a pretty way to strip an optional string prefix :/
<bnagy> >> ".foo".reverse.chomp('.').reverse
<ruboto> bnagy # => "foo" (https://eval.in/437835)
<Ox0dea> bnagy: Allergic to Regexp?
<bnagy> yes
<Ox0dea> How come?
voltalio has quit [Read error: Connection reset by peer]
aghalarp has joined #ruby
<bnagy> not pretty :)
voltalio has joined #ruby
ngscheurich has quit [Ping timeout: 252 seconds]
benlovell has quit [Ping timeout: 240 seconds]
ariedler has quit []
workmad3 has joined #ruby
<eam> pretty in terms of compute efficiency or pretty in terms of "someone with a liberal arts degree can easily read it?"
<bnagy> I have a liberal arts degree :`(
<baweaver> just use regex
<bnagy> but performance is not a factor at all here
<ckuhn> its not that hard
<baweaver> being concerned with how "pretty" code is is asinine
diegoviola has joined #ruby
<bnagy> that's kind of contentious
<bnagy> but I am not particularly interested in fighting about it
<ckuhn> ease of coding >
<ckuhn> imo
benlieb has joined #ruby
<ckuhn> then performance
<ckuhn> for most things
<Ox0dea> ckuhn: Greater than nothing?
<ckuhn> mean *
<ckuhn> meant *
<ckuhn> greater than everything lols
devoldmx has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
polly_wog has joined #ruby
Rickmasta has joined #ruby
bronson has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
howdoico1 has quit [Ping timeout: 268 seconds]
bronson has quit [Ping timeout: 240 seconds]
tejasmanohar has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
nettoweb has joined #ruby
benlieb has quit [Quit: benlieb]
Macaveli has quit [Client Quit]
nettoweb has quit [Client Quit]
tejasmanohar has joined #ruby
dopie has joined #ruby
howdoico1 has joined #ruby
dopieee has joined #ruby
j4cknewt has quit [Remote host closed the connection]
scoot has quit [Remote host closed the connection]
eat_multi has quit [Ping timeout: 250 seconds]
dopie has quit [Ping timeout: 256 seconds]
timanema has joined #ruby
manfe has quit []
zapata has quit [Quit: WeeChat 1.3]
scoot has joined #ruby
michael_mbp has quit [Excess Flood]
devoldmx has joined #ruby
timanema has quit [Ping timeout: 256 seconds]
tatsuo has quit [Remote host closed the connection]
krz has joined #ruby
_blizzy_ has joined #ruby
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
michael_mbp has joined #ruby
Technodrome has joined #ruby
St1gma has quit [Quit: Leaving]
eat_multi has joined #ruby
s00pcan has quit [Remote host closed the connection]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
j4cknewt has joined #ruby
michael_mbp has quit [Excess Flood]
x-light has joined #ruby
michael_mbp has joined #ruby
sunone has joined #ruby
Ox0dea has quit [Read error: No route to host]
jackjackdripper has quit [Quit: Leaving.]
ckuhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
hashrocket has quit [Quit: Connection closed for inactivity]
tkuchiki has quit [Ping timeout: 240 seconds]
unclouded has quit [Quit: Leaving]
karapetyan has joined #ruby
zotherstupidguy has quit [Ping timeout: 250 seconds]
howdoico1 has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
voltalio has quit [Read error: Connection reset by peer]
drewvanstone has quit [Ping timeout: 246 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
voltalio has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
favadi has joined #ruby
yfeldblum has joined #ruby
vjdhama_ has quit [Remote host closed the connection]
vjdhama has joined #ruby
mdih has quit [Ping timeout: 260 seconds]
paracr4ck has left #ruby ["Leaving"]
sanjayu has joined #ruby
Musashi007 has quit [Quit: Musashi007]
eat_multi has quit [Ping timeout: 250 seconds]
vjdhama has quit [Remote host closed the connection]
vjdhama has joined #ruby
scoot has quit [Remote host closed the connection]
bluOxigen has joined #ruby
bronson has joined #ruby
x-light has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Quit: tjbiddle]
djbkd has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 272 seconds]
karapetyan has quit [Remote host closed the connection]
ndrei has joined #ruby
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> bnagy string[0,1]= '' is acceptable?
karapetyan has joined #ruby
mdih has joined #ruby
mdih has quit [Max SendQ exceeded]
mdih has joined #ruby
beauby has quit [Ping timeout: 264 seconds]
<bnagy> no, because it's an _optional_ prefix. Basically I want lchomp to exist.
<baweaver> you mean like lstrip?
vjdhama has quit [Ping timeout: 250 seconds]
<bnagy> yes, except like chomp
dhjondoh has joined #ruby
<baweaver> sub
<bnagy> I mean, I used sub in the end, I couldn't bring myself to actually do reverse chomp reverse
shinnya has quit [Ping timeout: 265 seconds]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
polly_wog has quit [Remote host closed the connection]
vjdhama has joined #ruby
mdih has quit [Ping timeout: 272 seconds]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Technodrome has quit [Quit: Technodrome]
ruurd has joined #ruby
timanema has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has quit [Excess Flood]
rattatmatt has quit [Quit: Leaving]
Technodrome has joined #ruby
aganov has joined #ruby
timanema has quit [Ping timeout: 246 seconds]
michael_mbp has joined #ruby
iamninja has joined #ruby
swgillespie has joined #ruby
codenapper has joined #ruby
tagrudev has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 255 seconds]
renderful has joined #ruby
vjdhama has quit [Remote host closed the connection]
mdih has joined #ruby
iamninja has quit [Ping timeout: 246 seconds]
vjdhama has joined #ruby
MyMind has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
renderful has quit [Ping timeout: 244 seconds]
zapata has joined #ruby
amystephen has quit [Quit: amystephen]
allomov has quit [Remote host closed the connection]
Sembei has quit [Ping timeout: 256 seconds]
rattatmatt has joined #ruby
vjdhama has quit [Remote host closed the connection]
vjdhama has joined #ruby
workmad3 has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
Ox0dea has joined #ruby
ttilley has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> bnagy: Some cursory benchmarking says str[//] + $' is best.
<Ox0dea> >> 'abcfoo'[/^abc/]; $'
<ruboto> Ox0dea # => "foo" (https://eval.in/437844)
<Ox0dea> >> 'deffoo'[/^abc/]; $'
<ruboto> Ox0dea # => nil (https://eval.in/437845)
Fraeon has quit [Read error: Connection reset by peer]
vjdhama has quit [Remote host closed the connection]
Fraeon has joined #ruby
<Ox0dea> Whoops. I forgot I defined #lchomp in terms of #lchomp!.
workmad3 has quit [Ping timeout: 244 seconds]
tmtwd has quit [Ping timeout: 252 seconds]
vjdhama has joined #ruby
BTRE has quit [Quit: Leaving]
ruurd has quit [Quit: Bye]
favadi has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
last_staff has joined #ruby
coffeecupp has joined #ruby
amystephen has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
Xeago has joined #ruby
WizJin has joined #ruby
<shevy> might be worth a try to suggest it for core to add, in the event that nobody suggested a .lchomp variant yet
karapetyan has quit [Ping timeout: 272 seconds]
coffeecupp has quit [Quit: leaving]
WizJin is now known as WizJin_
Xeago has quit [Ping timeout: 250 seconds]
WizJin_ is now known as Blah1234
Blah1234 is now known as Blahblah__
alexUaN has joined #ruby
<zenspider> bnagy: regexp slice assignment?
Rodya_ has quit [Quit: Leaving...]
NeverDie has quit [Quit: http://radiux.io/]
Blahblah__ is now known as WizJin
Macaveli has joined #ruby
<zenspider> oops. needs to match or it raises. n/m
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
<certainty> moin
yfeldblu_ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
karapetyan has joined #ruby
eGGsha has joined #ruby
pusewicz has joined #ruby
shinnya has joined #ruby
emilkarl has joined #ruby
pencilcheck has quit []
arup_r has joined #ruby
<tangentstorm> oh, hey! can we get this ruboto fellow to come hang out in #learnprogramming ?
bruno- has joined #ruby
hal_9000_ has quit [Ping timeout: 265 seconds]
codecop has joined #ruby
<baweaver> it's a bot y'know
hal_9000_ has joined #ruby
ICantCook has quit [Quit: Leaving]
Feyn has quit [Ping timeout: 256 seconds]
weemsledeux has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
vjdhama has quit [Read error: Connection reset by peer]
firstdayonthejob has joined #ruby
atmosx_laptop has joined #ruby
sunone has left #ruby ["Leaving"]
jenrzzz has joined #ruby
unclouded has joined #ruby
Musashi007 has joined #ruby
keen____ has joined #ruby
pen has joined #ruby
michael_mbp has quit [Excess Flood]
ramfjord has joined #ruby
keen___ has quit [Ping timeout: 268 seconds]
ElSif has joined #ruby
tvw has joined #ruby
Gnomethrower has joined #ruby
Gnomethrower has joined #ruby
michael_mbp has joined #ruby
sanjayu has quit [Remote host closed the connection]
<shevy> don't let him steal ruboto!!!
unclouded has quit [Read error: No route to host]
vjdhama has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
aswen has joined #ruby
opensource_ninja has joined #ruby
Apomelasma has joined #ruby
sanjayu has joined #ruby
karapetyan has quit [Remote host closed the connection]
ttilley has quit [Read error: Connection reset by peer]
prasselpikachu has quit [Quit: ZNC - http://znc.in]
Biohazard has quit [Quit: Stary2001 killed me D:]
solars has joined #ruby
Apomelasma has quit [Client Quit]
ttilley has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
marvin81 has joined #ruby
t_mmyv has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Voker57 has joined #ruby
Biohazard has joined #ruby
Biohazard has quit [Remote host closed the connection]
Biohazard has joined #ruby
Biohazard has quit [Client Quit]
marvin81 has quit []
Biohazard has joined #ruby
skullcrasher has joined #ruby
prasselpikachu has joined #ruby
ta has joined #ruby
ta has quit [Remote host closed the connection]
opensource_ninja has quit [Quit: opensource_ninja]
ta has joined #ruby
ICantCook has joined #ruby
Xeago has joined #ruby
scoot has joined #ruby
<ICantCook> what's the ruby equivilent of python -m "some_code" ?
<ICantCook> to run a single line of ruby code from the shell
<null__> ruby -e ""
<ICantCook> null__: thanks
jas02 has joined #ruby
baweaver has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
ruurd has joined #ruby
devoldmx has quit [Remote host closed the connection]
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
crdpink2 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
crdpink has quit [Ping timeout: 240 seconds]
drawesome has joined #ruby
mike___1234 has joined #ruby
tomaz_b has joined #ruby
blackmesa has joined #ruby
amystephen has quit [Quit: amystephen]
ankr has joined #ruby
opensource_ninja has joined #ruby
Pupeno has joined #ruby
AccordLTN has joined #ruby
mike___1234 has quit [Remote host closed the connection]
SylarRuby has joined #ruby
mike___1234 has joined #ruby
iamninja has joined #ruby
bronson has joined #ruby
atmosx_laptop has quit [Ping timeout: 272 seconds]
opensource_ninja has quit [Quit: opensource_ninja]
blackmesa has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 264 seconds]
agent_meerkat has joined #ruby
TheHodge has joined #ruby
scoot has quit [Remote host closed the connection]
slayerjain has joined #ruby
scoot has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
jgt has joined #ruby
Technodrome has quit [Quit: Technodrome]
vjdhama has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
<shevy> the picture looks so fake
mdih has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Excess Flood]
<bnagy> Ox0dea: ha. That regex is the same as using sub but I don't use crazy perl globals :)
<KervyN> like every selfy
<shevy> nah
<bnagy> the $' is cute though, I didn't know that one
firstdayonthejob has quit [Ping timeout: 272 seconds]
ruurd has quit [Quit: ZZZzzz…]
* bnagy saves up for golf
jenrzzz has joined #ruby
bigbadbear has quit [Ping timeout: 268 seconds]
scoot has quit [Remote host closed the connection]
michael_mbp has joined #ruby
sabrehagen has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sabrehagen> i've never use a ruby gem before. i just typed `gem install pdf-extract` which succeeded, now typing `pdf-extract` as per the docs yeilds "command not found". how do i use the gem? (https://github.com/CrossRef/pdfextract)
youngbaks has joined #ruby
<janno> Could you run 'ruby -v' and 'gem list'
<janno> gem list shows all installed gems
<sabrehagen> ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
<sabrehagen> gem list shows pdf-extract as installed
psy_ has quit [Ping timeout: 240 seconds]
vjdhama has joined #ruby
UtkarshRay has joined #ruby
<sabrehagen> another gem installed is rake. typing `rake` runs rake as expected.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<agent_white> sabrehagen: Not all gems are executables.
<janno> You could also check if echo $PATH gives you bin folder that has 'pdf-extract' in it.
nso95 has joined #ruby
<shevy> sabrehagen for that command to work, the file bin/pdf-extract must exist
benlovell has joined #ruby
<shevy> if that file exists and the command does not work then it is not in the $PATH
<sabrehagen> shevy: where is bin/pdf-extract likely to be located? i.e. what's the prefix to that path?
<shevy> normally if you have as --prefix /usr it should work as-is; have a look at "gem env" output
<shevy> all .gem files will also be in the cache/ subdirectory... --prefix-here/lib/ruby/gems/2.2.0/cache/
Rickmasta has joined #ruby
Igorshp has joined #ruby
keen_____ has joined #ruby
youngbaks has quit [Ping timeout: 250 seconds]
<shevy> sabrehagen I assume you use something like chruby or rbenv or rvm?
<shevy> I just installed pdf-extract, it works for me without having to modify $PATH
keen____ has quit [Ping timeout: 260 seconds]
<sabrehagen> shevy: thanks for trying that. interestingly, directory listing of /usr/lib/ruby/gems/2.2.0/gems/ which was given by gem env shows:
<sabrehagen> maruku-0.7.2 power_assert-0.2.2 rdoc-4.2.0 test-unit-3.0.8
<sabrehagen> minitest-5.4.3 rake-10.4.2 sass-3.4.14 yard-0.8.7.6
<shevy> ah so you have /usr as prefix
<shevy> that is strange, it should work without any modifications
<shevy> oh
<shevy> gem env does not list it?
<shevy> do you have multiple different ruby versions?
workmad3 has joined #ruby
mdih has joined #ruby
mdih has quit [Max SendQ exceeded]
mdih has joined #ruby
pecpec has joined #ruby
dmolina has joined #ruby
User458764 has joined #ruby
<agent_meerkat> hello
weaksauce has quit [Ping timeout: 246 seconds]
<shevy> ack
<shevy> agent_white, agent_meerkat is here
zenspider has quit [Ping timeout: 240 seconds]
<sabrehagen> shevy: after trying to install again i received the message "You don't have /home/user/.gem/ruby/2.2.0/bin in your PATH"
<sabrehagen> so back to your path suggestion
<sabrehagen> thanks
<agent_white> agent_meerkat: Greetings, colleague!
pietr0 has quit [Ping timeout: 246 seconds]
<agent_white> shevy: The Main Office must be leaking. :D
<sabrehagen> shevy: i misunderstood the gem env output
greenarrow has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
agent_meerkat has quit [Ping timeout: 240 seconds]
<Klamber|ext> Hahaha :D
lxsameer has joined #ruby
timonv has joined #ruby
workmad3 has joined #ruby
Salehi has joined #ruby
nso95 has quit [Remote host closed the connection]
ruurd has joined #ruby
Spami has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
zenspider has joined #ruby
jt__ has quit [Ping timeout: 246 seconds]
coffeecupp has joined #ruby
drptbl has joined #ruby
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
coffeecupp has quit [Quit: leaving]
c0m0 has joined #ruby
vjdhama has quit [Remote host closed the connection]
giuseppesolinas_ has quit [Client Quit]
giuseppesolinas has quit [Client Quit]
<ljarvis> >> {}.merge(Class.new { def to_hash; { some: "stuff" } end }.new)
<ruboto> ljarvis # => {:some=>"stuff"} (https://eval.in/437972)
<ljarvis> >> {}.merge(Class.new { def to_h; { some: "stuff" } end }.new)
<ruboto> ljarvis # => no implicit conversion of #<Class:0x42477fd8> into Hash (TypeError) ...check link for more (https://eval.in/437973)
<ljarvis> k
startupality has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pocketprotector has quit [Ping timeout: 250 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
<apeiros> so to_h/to_hash is similar to to_i/to_int?
Xeago has joined #ruby
RegulationD has joined #ruby
AccordLTN has quit [Ping timeout: 240 seconds]
AccordLTN has joined #ruby
bronson has joined #ruby
blackmesa has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Klamber|ext has quit [Quit: Lost terminal]
UtkarshRay has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 252 seconds]
michael_mbp has quit [Excess Flood]
drewvanstone has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Hounddog has joined #ruby
AccordLTN has quit []
BMW365 has joined #ruby
EXID123_ has joined #ruby
michael_mbp has joined #ruby
EXID123_ has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
Rickmasta has joined #ruby
jgt1 has joined #ruby
schlubbi has joined #ruby
1JTAACCFM has joined #ruby
giuseppesolinas has joined #ruby
schlubbi has quit [Client Quit]
Hounddog has quit [Ping timeout: 240 seconds]
drewvanstone has quit [Ping timeout: 252 seconds]
<ljarvis> but different from to_a/to_ary
Hounddog has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
<janno> Lol I made whole android app just to catch push notifications and now I heard that chrome has implemented push notification api...
j4cknewt has quit [Remote host closed the connection]
vjdhama has joined #ruby
ruurd has joined #ruby
marr has joined #ruby
UtkarshRay has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chthon has joined #ruby
startupality has quit [Quit: startupality]
rdark has joined #ruby
tomphp has joined #ruby
startupality has joined #ruby
krisquigley has joined #ruby
subshad has joined #ruby
j4cknewt has joined #ruby
pocketprotector has joined #ruby
craysiii has quit [Ping timeout: 240 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
1JTAACCFM has quit [Quit: This computer has gone to sleep]
rattatmatt has quit [Quit: Leaving]
einarj has joined #ruby
atmosx_laptop has joined #ruby
leafybasil has quit [Remote host closed the connection]
UtkarshRay has quit [Ping timeout: 240 seconds]
scoot has joined #ruby
Technodrome has joined #ruby
workmad3 has joined #ruby
startupality has quit [Quit: startupality]
karapetyan has joined #ruby
giuseppesolinas has joined #ruby
32NAAFAD3 has joined #ruby
<certainty> as the world turns :)
Burgestrand has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
scoot has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
michael_mbp has quit [Excess Flood]
<yorickpeterse> morning
michael_mbp has joined #ruby
<apeiros> ljarvis: hm, interesting, yes. Array#concat e.g. does not try to use to_ary
<apeiros> oh, wait
<certainty> morning
davedev24 has quit [Ping timeout: 240 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> it does
<apeiros> (forgot to call .new)
<apeiros> >> ary=1,2,3;ary.concat(Class.new{def to_ary; [4,5,6];end}.new)
<ruboto> apeiros # => [1, 2, 3, 4, 5, 6] (https://eval.in/438047)
<apeiros> >> ary=1,2,3;ary.concat(Class.new{def to_a; [4,5,6];end}.new)
<ruboto> apeiros # => no implicit conversion of #<Class:0x4112fee4> into Array (TypeError) ...check link for more (https://eval.in/438048)
tkuchiki has joined #ruby
<apeiros> ljarvis: where did you see differences appear?
davedev24 has joined #ruby
avelldiroll has quit [Quit: WeeChat 0.3.8]
beast has joined #ruby
michael_mbp has quit [Excess Flood]
tjbiddle has joined #ruby
tvw has joined #ruby
amystephen has joined #ruby
platzhirsch has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
UtkarshRay has joined #ruby
michael_mbp has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
rikkipitt has joined #ruby
pocketprotector has quit [Ping timeout: 240 seconds]
avelldiroll has joined #ruby
amystephen has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
leafybas_ has joined #ruby
Iskarlar has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 240 seconds]
sheepman has joined #ruby
platzhirsch has joined #ruby
<sheepman> hi all, whats the best way of getting the pid of a running process (i.e. not the pid of the ruby script thats running) ?
benlovell has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
stan has joined #ruby
SylarRuby has quit [Remote host closed the connection]
pecpec has quit [Remote host closed the connection]
<adaedra> A process you started? A random process on the system?
benlovell has joined #ruby
Iskarlar has left #ruby [#ruby]
<sheepman> Random process
blackmesa has joined #ruby
<sheepman> looks like sys-proctable to me but i was hoping for something simpler as in, without pulling in an additional gem
<certainty> pgrep -f
<certainty> depends on what you know about the process
<certainty> also /proc is pretty accessible
keksi_ has joined #ruby
sepp2k has joined #ruby
<sheepman> certainty, i guess pgrep will work for me
arup_r has quit [Remote host closed the connection]
<sheepman> just wanted to stick inside ruby but meh :)
devoldmx has quit [Ping timeout: 246 seconds]
<keksi_> hey, im using rbenv for handling my ruby versions. rbenv says that I only have 2.2.1 installed, but ruby -v says its using 2.0. So I think I have a random v. 2.0 installed, which I want to get rid of, what do?
<certainty> i'm curious if there's a way without forking a shell. I'm not aware of a way (without gems)
<certainty> reading information from /proc is perfectly possible though
<sheepman> ok thanks certainty
ruurd has quit [Quit: ZZZzzz…]
tjbiddle has quit [Ping timeout: 240 seconds]
rikkipitt has quit [Quit: Leaving...]
startupality has quit [Quit: startupality]
ndrei has joined #ruby
blaxter has joined #ruby
benlovell has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
yfeldblu_ has quit [Ping timeout: 256 seconds]
pocketprotector has joined #ruby
iamninja_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
tjbiddle has joined #ruby
benlovell has joined #ruby
tjbiddle has quit [Remote host closed the connection]
iamninja has quit [Read error: Connection reset by peer]
solocshaw has joined #ruby
Kendos-Kenlen has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
dravine has quit [Read error: Connection reset by peer]
dravine has joined #ruby
ndrei has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
pecpec has joined #ruby
startupality has joined #ruby
j4cknewt has quit [Remote host closed the connection]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
ruurd has joined #ruby
charliesome has joined #ruby
phatypus has joined #ruby
leafybas_ has quit [Read error: Connection reset by peer]
BackEndCoder has quit [Ping timeout: 246 seconds]
leafybasil has joined #ruby
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
duncannz has quit [Ping timeout: 255 seconds]
ndrei has quit [Ping timeout: 272 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
lolmaus has joined #ruby
<ljarvis> apeiros: I'm not sure now actually, moved on. Maybe there wasn't a difference, I found it odd that to_h didn't work like to_hash in that situation but actually it seems quite consistent
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
startupality has joined #ruby
davedev24 has quit []
krz has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
<yorickpeterse> ljarvis: wow, you're back
BackEndCoder has joined #ruby
Burgestrand has quit []
Timba-as has joined #ruby
renderful has joined #ruby
emilkarl has quit [Quit: emilkarl]
arup_r has joined #ruby
hs366 has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renderful has quit [Ping timeout: 240 seconds]
arup_r_ has joined #ruby
workmad3 has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
Technodrome has quit [Quit: Technodrome]
j4cknewt has joined #ruby
davedev24 has joined #ruby
arup_r has quit [Ping timeout: 255 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24 has quit [Remote host closed the connection]
Rickmasta has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Technodrome has joined #ruby
patientj has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
vjdhama has quit [Read error: Connection reset by peer]
ishahnaz has joined #ruby
michael_mbp has quit [Excess Flood]
startupality has quit [Quit: startupality]
vjdhama has joined #ruby
terlar has joined #ruby
startupality has joined #ruby
unop has joined #ruby
devoldmx has joined #ruby
michael_mbp has joined #ruby
32NAAFAD3 has quit [Quit: This computer has gone to sleep]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
postmodern has quit [Quit: Leaving]
beagles has joined #ruby
shredding has joined #ruby
lxsameer has quit [Quit: Leaving]
michael_mbp has quit [Excess Flood]
devoldmx has quit [Ping timeout: 265 seconds]
michael_mbp has joined #ruby
bronson has joined #ruby
ifmy has quit [Quit: Page closed]
jgt1 has quit [Ping timeout: 272 seconds]
phatypus has quit [Quit: .>]
<tuor> hi, what is the difference between Hash.key?() and Hash.has_key?() ?
<adaedra> one is longer to type
<adaedra> other than that I think they're aliases
<adaedra> &ri Hash#key?
<adaedra> Here, all aliases
bronson has quit [Ping timeout: 264 seconds]
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
<tuor> ah ok. thx.
j4cknewt has quit [Remote host closed the connection]
leat has joined #ruby
apt-get has joined #ruby
Phil-Work has joined #ruby
<Phil-Work> can someone tell me what this code does? Struggling to Google as I have no idea what kind of programming structure it is...
<Phil-Work> b1.use Call, UploadIsoFile do |env2, b2|
<Phil-Work> ... some code ...
<Phil-Work> end
mattprelude has joined #ruby
j4cknewt has joined #ruby
<canton7> execute the method 'b1.use', passing in the parameters Call and UploadIsoFile (which looks like they're classes). Also pass in an anonymous function, which takes the parameters env2 and b2, and may or may not return something...
karapetyan has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
emilkarl has joined #ruby
<Phil-Work> canton7, so... what relevance does it have as a control structure?
<Phil-Work> in what instance will the "some code" execute?
Siyfion has joined #ruby
<Phil-Work> if b1.use returns something trueish?
<canton7> 'some code' is an anonymous function, which is passed to 'b1.use'. It will execute if and when the code in 'b1.use' executes it
<jhass> Phil-Work: it's passed to b1.use, which can call it or store it for calling it later
<Phil-Work> ah, ok
<Phil-Work> I see now
<Phil-Work> b1 is presumably an object?
<Phil-Work> how do I see what it is an instance of so I can find "use"?
<canton7> probably. it may be a local method which returns an object, but it's probably an object :P
vivcheri has joined #ruby
<canton7> 'p b1'
<canton7> or 'puts b1.class'
dhjondoh has quit [Remote host closed the connection]
<Phil-Work> "Vagrant::Action::Builder"
<Phil-Work> excellent - thanks
<Phil-Work> gives me something to go on
rodfersou has joined #ruby
dhjondoh has joined #ruby
<vivcheri> Hi, I am trying a vagrant installation of bosh-lite and I am getting the following error http://paste.ubuntu.com/12530122/
<vivcheri> How do I resolve this ?
Kariel has joined #ruby
<Kariel> Hi everyone.
moeabdol has joined #ruby
cajone has quit [Quit: Leaving.]
<jhass> vivcheri: do you see a Gemfile?
blackmesa has quit [Ping timeout: 250 seconds]
michael_mbp has joined #ruby
dionysus69 has joined #ruby
allomov has joined #ruby
<vivcheri> jhass: Iam new to ruby
<vivcheri> jhass: Do you mean to_specs ?
<jhass> no I mean whether you see a file called "Gemfile"
tomphp has quit [Read error: Connection reset by peer]
suchness has joined #ruby
<vivcheri> jhass: Where is the Gemfile located ?
<jhass> usually at the root of a project
bruno- has joined #ruby
terlar has quit [Quit: WeeChat 1.3]
nhhagen has joined #ruby
michael_mbp has quit [Excess Flood]
<Kariel> Are we talking Rails here?
<vivcheri> That is the root of the bosh-lite project
<jhass> ?rails Kariel
<ruboto> Kariel, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass> vivcheri: okay, where does /usr/local/bin/bosh come from? how did you install it?
<Kariel> I meant vivcheri 's question, if it's about Rails, since I just joined.
<jhass> no ;)
cajone has joined #ruby
<jhass> ?logs
<ruboto> You can find a log of this channel at http://irclog.whitequark.org/ruby/
jamesaxl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<vivcheri> I followed the steps there.
quater-nyon is now known as hamilto-nyan
drewvanstone has joined #ruby
<Kariel> Thanks. Well, I had similar problems with some other software, installing gems manually will probably work, even though it's not optimal.
<vivcheri> jhass: It was gem install bosh_cli
<jhass> vivcheri: do you have multiple rubies installed? chruby, rvm, rbenv, anything like that?
bruno- has quit [Ping timeout: 252 seconds]
michael_mbp has joined #ruby
tomphp has joined #ruby
<vivcheri> jhass: How do I check that ?
<jhass> usually you would know if so ;)
<vivcheri> jhass: I am using Ubuntu 14.04
<vivcheri> No I did not install anything extra
<jhass> idk, maybe just retry the gem install step in your current context
<vivcheri> gem install bosh_lite ?
<jhass> yes
<jhass> ell, _cli
<jhass> *well
<vivcheri> ok
<vivcheri> jhass: I am re-installing: gem install bosh_cli
<jhass> good
tkuchiki has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<vivcheri> jhass: It's re-installed.
<vivcheri> jhass: Now what do I do ?
<jhass> retry
drewvanstone has quit [Ping timeout: 268 seconds]
<vivcheri> jhass: bosh target 192.168.50.4 lite ?
<jhass> that's the command that we're trying to fix
<vivcheri> Ok
<vivcheri> Do I need to re-try that command ?
<jhass> btw no need to highlight me with every message, especially if nobody else was talking in between ;)
<vivcheri> ok
<jhass> you know, most people learn this stuff by trial and error
<vivcheri> Yea
<jhass> I too am just proxying some educated trial and error through you now
<vivcheri> I am re-ran the command and I am getting the same error.
<jhass> no need to act like a shell and ask for every single thing ;)
SylarRuby has joined #ruby
<jhass> well, gem install mini_portile then? perhaps its deps are off
<jhass> or maybe the gem install bosh_cli command actually failed and you ignored some error output?
banister has joined #ruby
<jhass> weird
timanema has joined #ruby
<jhass> so what about gem install mini_portile?
tkuchiki has quit [Ping timeout: 240 seconds]
tatsuo has joined #ruby
<vivcheri> Will try that command
SylarRuby has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
SylarRuby has joined #ruby
<jhass> looks successful
<vivcheri> jhass: Tried re-running the bosh target 192.168.50.4 lite
<vivcheri> I am getting the same error.
<vivcheri> It was failing there earlier also.
<jhass> ah, try gem install mini_portile -v ~> 0.5.0 actually
j4cknewt has quit [Remote host closed the connection]
<jhass> or gem install mini_portile -v 0.5.3 if that doesn't work
timanema has quit [Ping timeout: 272 seconds]
<vivcheri> re-running the bosh target 192.168.50.4 lite
Cysioland has joined #ruby
<vivcheri> jhass: It works now
<Cysioland> Is there a gem that converts something like '1h10m30s' to seconds?
<jhass> Cysioland: chronic_duration or so
<vivcheri> jhass: Thanks a lot
<vivcheri> I am logged into the bosh director.
<jhass> no idea what went wrong there
<jhass> probably fixed in a less ancient rubygems version than what Ruby 1.9/Ubuntu ships
blackmesa has quit [Ping timeout: 252 seconds]
tomphp has quit [Ping timeout: 250 seconds]
shredding has quit [Ping timeout: 272 seconds]
pecpec has quit [Remote host closed the connection]
tomphp has joined #ruby
<shevy> hehe
Burgestrand has joined #ruby
<Cysioland> jhass++
<Cysioland> thank mr jhass
<Cysioland> bye
Cysioland has left #ruby ["thank mr jhass"]
blackmesa has joined #ruby
sdothum has joined #ruby
phutchins2 has joined #ruby
diegoviola has joined #ruby
ndrei has joined #ruby
bruno- has joined #ruby
unop has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
workmad3 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
phutchins2 has quit [Read error: No route to host]
eGGsha has joined #ruby
[k- has joined #ruby
patientj has left #ruby ["WeeChat 1.0.1"]
workmad3 has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 256 seconds]
tvw has quit [Remote host closed the connection]
krz has joined #ruby
r00ster has joined #ruby
Salehi has quit [Quit: Leaving]
greenarrow has quit [Quit: 500]
minimalism has quit [Quit: leaving]
<vivcheri> jhass: Are you still there ?
tvw has joined #ruby
<yorickpeterse> jhass: oooh, I see you've been promoted to Mr now
<matti> yorickpeterse: ;]
<yorickpeterse> (っ´ω`)っ
<matti> Haha
<matti> :)
<vivcheri> jhass: I am asked to add a route on step 4 in the bosh lite documentation.
<vivcheri> Wondering what route is he meaning ?
<jhass> doesn't the readme or other docs explain?
<jhass> I never even saw that stuff before either
<matti> Mr Hass.
<matti> Souds very official.
<apeiros> mr zyx
<vivcheri> jhass: No
Technodrome has quit [Quit: Technodrome]
<yorickpeterse> but so who will be the other Mr or Mrs jhass? :>
<matti> Hey apeiros
<apeiros> oy matti
<matti> Oh pardon me. Mr apeiros :)
<vivcheri> There is a add-route binary in the bin folder under the bosh-lite binary
<apeiros> matti: I prefer deity
<matti> Hehe
<matti> apeiros-sama?
<matti> :)
<apeiros> or actually… proto-deity
<yorickpeterse> apeiros-senpai
<jhass> vivcheri: so run it?
<jhass> ?apeiros
<ruboto> apeiros is nobody. They're one of the four people with founders access in the #ruby channel, owner of ruboto the channel bot and ruby-community.com the companion website for the #ruby channel
<jhass> nobody doesn't need any titles
Ryzokuken has joined #ruby
<vivcheri> jhass: done.
<Ryzokuken> Hey
<Ryzokuken> Anyone up?
<Ryzokuken> I had a little problem
<Ryzokuken> Could you help?
<jhass> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<Ryzokuken> I wanted to serialize an array of objects
<Ryzokuken> How could I achieve that?
<yorickpeterse> Serialize to what?
allcentury has joined #ruby
<Ryzokuken> String
<Ryzokuken> Binary
nuck has quit [Read error: Connection reset by peer]
<Ryzokuken> Then save to disk
<yorickpeterse> Marshal
<vivcheri> jhass: Works like a charm.
<yorickpeterse> &ri Marshal
<Ryzokuken> Yeah
<yorickpeterse> Not the best in town, but it comes with the stdlib
<Ryzokuken> But it aint working
<vivcheri> jhass: Moving to the CloudFoundry Installation.
<Ryzokuken> For complete array
<yorickpeterse> Ryzokuken: you're going to have to provide more info than just "it doesn't work"
<Ryzokuken> I mean
<yorickpeterse> a code sample along with output on gist.github.com helps a lot
<Ryzokuken> I defined 2 fncs
<Ryzokuken> I have the source on gist
<Ryzokuken> Wait a sec
but3k4 has joined #ruby
<Ryzokuken> Check this please?
BackEndCoder has quit [Ping timeout: 240 seconds]
benlovell has quit [Ping timeout: 240 seconds]
syath has joined #ruby
<yorickpeterse> and what exactly doesn't work?
<Ryzokuken> It isn't saving
<Ryzokuken> The file is created
<Ryzokuken> But text isn't saved
<Ryzokuken> +
<Ryzokuken> The function isn't being called completely
<Ryzokuken> The alert does not show up
<jhass> https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228#file-save-rb-L52-L55 you should build a single array instead and dump it to the file
greenarrow has joined #ruby
<jhass> Probably just Marshal.dump(notes) instead of the each
jgt1 has joined #ruby
<Ryzokuken> I did actually
<Ryzokuken> That
<Ryzokuken> But does not work
<Ryzokuken> So I tried things
dhjondoh has quit [Quit: dhjondoh]
<jhass> so the code you showed doesn't produce your problem?
<Ryzokuken> None of the two workk
<Ryzokuken> I've tried many things
blackmesa has joined #ruby
<yorickpeterse> my only guess is that at https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228#file-save-rb-L53 `notes` returns an empty array
Kariel has quit [Quit: Leaving]
<apeiros> jhass: "nobody doesn't need any titles" -> "nobody needs titles"
<certainty> makes sense
<apeiros> therefore I need titles!
<certainty> i need turtles
<Ryzokuken> Shall I try marshal.dump(notes) once again?
<Ryzokuken> + notes is global
<jhass> yes
<yorickpeterse> add a `p notes` before writing to the file
<jhass> also add a p notes to look at it
<yorickpeterse> jhass: 2fast4u
<Ryzokuken> Ok
<jhass> yah
<Ryzokuken> Thanks
<Ryzokuken> Notes is global. Do I need @ or $ ?
<Ryzokuken> Or is it alright?
ragingcake has joined #ruby
<jhass> it's all right since all your blocks closure over it
r00ster has left #ruby [#ruby]
dhjondoh has joined #ruby
benlovell has joined #ruby
krz has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
<Ryzokuken> If a block ends
<certainty> it has blocked
<jhass> ?rimshot
<Ryzokuken> But I still want to retain variables
<Ryzokuken> Then what?
<Ryzokuken> @?
<certainty> jhass: come on. It wasn't that bad, was it? xD
<jhass> Ryzokuken: your toplevel has a reference to it, it won't be garbage collected as long as your program runs
r00ster has joined #ruby
<jhass> certainty: don't ask if you don't want to know the answer
<certainty> jhass: ok point taken :)
<yorickpeterse> Ryzokuken: just use `p notes`
<Ryzokuken> What?
<Ryzokuken> Sorry
<Ryzokuken> I didn't get it
<Ryzokuken> P notes?
ndrei has quit [Ping timeout: 252 seconds]
<jhass> no, p notes
<jhass> like puts notes just p instead of puts
workmad3 has joined #ruby
<Ryzokuken> What would that achieve?
<jhass> print it to stdout so you can check its value is what you think it is
Tempesta has quit [Quit: AdiIRC is updating to v1.9.7 Beta Build (2015/09/23) 32 Bit]
<Ryzokuken> Okay
<Ryzokuken> Or maybe alert for my desktop app
<Ryzokuken> Thanks
Tempesta has joined #ruby
benlovell has quit [Ping timeout: 260 seconds]
<ljarvis> yorickpeterse: back?
ndrei has joined #ruby
<ljarvis> I never went anywhere :)
<Ryzokuken> BTW according to you guys, what is the best solution for developing desktop apps?
<pwnd_nfsw> the one that works
tkuchiki has joined #ruby
<shevy> is it worth to distribute documentation in the form of .pdf files?
<Ryzokuken> Tkinter? Electron? Kivy? Qt?
<shevy> these are autogenerated for one gem, but it's quite huge... about 200k
<shevy> (as part of a .gem)
<ljarvis> shevy: wat, no
beast has quit [Quit: Leaving]
<apeiros> shevy: as part of a gem: no
<certainty> no
<apeiros> shevy: but available for download from the gem homepage? sure
<shevy> ok
Tempesta has quit [Client Quit]
<apeiros> that is - if you can automate its generation
BackEndCoder has joined #ruby
<shevy> yeah
devoldmx has joined #ruby
gener1c_ has joined #ruby
devbug_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 250 seconds]
elperdut has joined #ruby
gener1c has quit [Ping timeout: 240 seconds]
elperdut has quit [Max SendQ exceeded]
slayerja_ has joined #ruby
elperdut has joined #ruby
keksi_ has left #ruby [#ruby]
Xeago_ has joined #ruby
elperdut has quit [Max SendQ exceeded]
elperdut has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
startupality has quit [Quit: startupality]
slayerjain has quit [Ping timeout: 246 seconds]
r00ster has left #ruby [#ruby]
amystephen has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 255 seconds]
Igorshp has quit [Remote host closed the connection]
suchness has left #ruby [#ruby]
suchness has joined #ruby
ericjphillips has joined #ruby
agent_white has quit [Remote host closed the connection]
j4cknewt has joined #ruby
<yorickpeterse> ljarvis: you were MIA for a while
<matti> Good not KIA.
nhhagen has quit [Ping timeout: 268 seconds]
startupality has joined #ruby
<yorickpeterse> not _yet_
<[k-> kia?
<matti> Killed in Action
<apeiros> and MIA is missing
<apeiros> but I think ljarvis rather went AWOL than MIA :)
Igorshp has joined #ruby
cornerma1 has joined #ruby
cantaberry has quit []
andyrs has joined #ruby
<matti> Yeah
jenrzzz has joined #ruby
j4cknewt has quit [Ping timeout: 240 seconds]
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
jenrzzz has quit [Ping timeout: 244 seconds]
quazimodo has quit [Ping timeout: 246 seconds]
BMW365 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
DmitryBochkarev has quit [Read error: Connection reset by peer]
linduxed has joined #ruby
<shevy> away from duty!
blackmesa has joined #ruby
tomphp_ has joined #ruby
Jardayn has joined #ruby
nateberkopec has joined #ruby
<atmosx_laptop> hello
<Ryzokuken> Hi
tomphp has quit [Ping timeout: 240 seconds]
RegulationD has joined #ruby
shredding has joined #ruby
sarovin has joined #ruby
einarj has quit [Ping timeout: 244 seconds]
einarj has joined #ruby
vjdhama has quit [Ping timeout: 246 seconds]
<shevy> atmosx_laptop is this with laptop-at-home?
phutchins has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Ropeney has joined #ruby
drptbl_ has joined #ruby
bronson has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
<Ryzokuken> Anyone here has had experience with shoes??
vjdhama has joined #ruby
<certainty> yeah. they're comfortable
<shevy> I wear them often
<certainty> also protect feet. good to wear them
<Ryzokuken> Ruby shoes
<certainty> sorry :)
<Ryzokuken> _why
<Ryzokuken> Lol
<shevy> people took over the project, it's now different
<Ryzokuken> Yeah
nzst has joined #ruby
<Ryzokuken> But you got it, right?
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<Ryzokuken> So, anyone familiar?
drptbl has quit [Ping timeout: 250 seconds]
<Ryzokuken> + I had a doubt
jmignault has joined #ruby
<atmosx_laptop> shevy: yes
<atmosx_laptop> shevy: I moved the iMac at the office and now I"m home almost all day every day
<Ryzokuken> Shouldn't my marshal_dump and marshal_load use strings instead of an array?
s00pcan has joined #ruby
dhjondoh has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
Keltia has quit [Changing host]
Keltia has joined #ruby
Timba-as has quit [Quit: Lingo: www.lingoirc.com]
<shevy> Ryzokuken I settled for ruby-gnome rather than shoes, the main shoes requires jruby
Tempesta has joined #ruby
<Ryzokuken> Shoes 4?
<Ryzokuken> So, is there a better GUI toolkit?
Tempesta has quit [Client Quit]
<shevy> "better"
<shevy> there are not many GUI toolkits in ruby
Tempesta has joined #ruby
vjdhama has quit [Ping timeout: 264 seconds]
Lycanii has quit [Ping timeout: 268 seconds]
<Ryzokuken> Shoes works with functions?
<Ryzokuken> My code.
<Ryzokuken> No functions
<Ryzokuken> Destroys the perfectionist in me
absklb has joined #ruby
<absklb> i installed bundler 1.10.6 and my canvas lms script cant fint it. it complains that i have old version of bundler. but gem list b shows it at 1.10.6 which is needed by canvas
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
andyrs has joined #ruby
Tempesta has quit [Client Quit]
karapetyan has joined #ruby
Tempesta has joined #ruby
dstarh has joined #ruby
Igorshp has quit [Remote host closed the connection]
apt-get has quit [Read error: No route to host]
apt-get has joined #ruby
Tempesta has quit [Client Quit]
<shevy> Ryzokuken you use lots of methods there
terlar has joined #ruby
vjdhama has joined #ruby
<Ryzokuken> Guys
Tempesta has joined #ruby
<Ryzokuken> I used p notes
<Ryzokuken> Or whatever
<Ryzokuken> Its like
nhhagen has joined #ruby
<shevy> that is Kernel.p
<Ryzokuken> Yeah
<Ryzokuken> Actually I used alert
<Ryzokuken> But whatever
<shevy> lol
<yorickpeterse> Ryzokuken: and?
<Ryzokuken> It out putted
<yorickpeterse> outputted what?
<Ryzokuken> Note @text = "" @title="" @color =rgb()
yalue has joined #ruby
Feyn has joined #ruby
<yorickpeterse> That's not what `p` outputs
<Ryzokuken> I had no time to type the values
<tobiasvl> copy/paste? :P
benlovell has joined #ruby
<yorickpeterse> Ryzokuken: add `p notes` before writing to the file and launch the script from a terminal
Tempesta has quit [Client Quit]
evanjs has joined #ruby
<yorickpeterse> you should either see just [] or something like [#<Note:0xa0dasdjkasdjasd......>, ....]
eGGsha_ has joined #ruby
iceyec has quit [Quit: Leaving]
<yorickpeterse> Don't use "alert" or whatever there is, use `p`
<yorickpeterse> (minus the backticks)
iceyec has joined #ruby
eGGsha has quit [Ping timeout: 240 seconds]
emilkarl has quit [Quit: emilkarl]
emilkarl has joined #ruby
Tempesta has joined #ruby
<Ryzokuken> Ok
s2013 has joined #ruby
krisquigley has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
<Ryzokuken> Kernel.p doesn't work :(
<apeiros> "doesn't work" doesn't work
<tobiasvl> just p
<tobiasvl> although both should work
<yorickpeterse> Ryzokuken: I didn't say Kernel.p
<yorickpeterse> here's what you literally need to add:
workmad3 has joined #ruby
<yorickpeterse> p notes
<yorickpeterse> that's _all_
<yorickpeterse> Before writing the marshal stuff to the file
<apeiros> >> Kernel.p ["this", "certainly", "works", "hurray", "module_function"]
<ruboto> apeiros # => ["this", "certainly", "works", "hurray", "module_function"] ...check link for more (https://eval.in/438214)
<yorickpeterse> apeiros: wasn't p private?
<apeiros> but unless you're in a BasicObject, just `p`
<yorickpeterse> or am I mistaking it for pp?
<apeiros> yorickpeterse: yes, it is private - as an instance method
<apeiros> that's what module_function does. it makes the instance method private and the class method public.
<yorickpeterse> >> require 'pp'; Kernel.pp 'butts'
<ruboto> yorickpeterse # => "butts" ...check link for more (https://eval.in/438215)
<yorickpeterse> huh
<yorickpeterse> oooh I think I know
<yorickpeterse> >> STDOUT.p 'butts'
<ruboto> yorickpeterse # => private method `p' called for #<IO:<STDOUT>> (NoMethodError) ...check link for more (https://eval.in/438216)
<apeiros> >> self.p "p is private"
<yorickpeterse> Yeah that was the one
<ruboto> apeiros # => private method `p' called for main:Object (NoMethodError) ...check link for more (https://eval.in/438217)
<yorickpeterse> hehe, check link for more
<yorickpeterse> if only
<yorickpeterse> "Sorry, this gem currently does nothing. Team Shoes is working on Gemifying Shoes, and this is just a placeholder until then."
devoldmx has joined #ruby
<yorickpeterse> oh for fucks sake, how do I install Shoes?
<yorickpeterse> don't tell me I need to Git clone things...
<bougyman> likely
<bougyman> is someone taking care of shoes again?
<Ryzokuken> Don't use gem
<yorickpeterse> wait what, I have to download binaries? Ughhhh
<Ryzokuken> Lol yeah
<yorickpeterse> not in AUR either, great
cmisenas has joined #ruby
<yorickpeterse> a .install file, the fuck is this
<yorickpeterse> ok whatever, too much effort
<yorickpeterse> either way
<yorickpeterse> I'm pretty sure the issues is the list of notes being empty
voltalio has joined #ruby
p0wn3d_ has joined #ruby
<Ryzokuken> Lol
<Ryzokuken> Just chmod
<Ryzokuken> No
devoldmx has quit [Ping timeout: 240 seconds]
<Ryzokuken> See notes
<Ryzokuken> Shows up all notes
<Ryzokuken> With color :3
<yorickpeterse> That doesn't mean `notes` can't be empty when the file is written
<yorickpeterse> hence the need for dumping whatever it contains at that point
<Ryzokuken> Buy certainly file.write is failing
<Ryzokuken> Or marshal.dump
<Ryzokuken> Cuz anything afterwards never happens
workmad3 has quit [Ping timeout: 268 seconds]
<Ryzokuken> BTW lol
atomical has quit [Ping timeout: 255 seconds]
<Ryzokuken> Do I need to require Marshal?
atomical has joined #ruby
<yorickpeterse> No, Marshal is available by default
<Ryzokuken> Don't tell me it was that stupid a mistake
<yorickpeterse> >> Marshal
<ruboto> yorickpeterse # => Marshal (https://eval.in/438219)
<Ryzokuken> Thank god
<Ryzokuken> >> puts "hello"
<ruboto> Ryzokuken # => hello ...check link for more (https://eval.in/438220)
vondruch has quit [Quit: Ex-Chat]
<Ryzokuken> Wow
dstarh has quit [Read error: Connection reset by peer]
<Ryzokuken> yorickpeterse: Ubuntu?
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has joined #ruby
<Ryzokuken> p "hi"
<Ryzokuken> >> p "hi"
<yorickpeterse> I don't use Ubuntu
<ruboto> Ryzokuken # => "hi" ...check link for more (https://eval.in/438221)
blackmesa has quit [Ping timeout: 246 seconds]
<Ryzokuken> Which distro?
dravine has quit [Ping timeout: 260 seconds]
<yorickpeterse> Arch
<Ryzokuken> Ok
Feyn has quit [Quit: Leaving]
<Ryzokuken> Is it awesome?
<Ryzokuken> I'm using Ubuntu 14.something
<yorickpeterse> It's a total pain if you're not familiar with Linux
<yorickpeterse> because it's just the kernel + package manager + systemd
<shevy> arch was awesome when judd was in charge
dravine has joined #ruby
dmolina has quit [Quit: Leaving.]
<yorickpeterse> Everything else you have to set up yourself
<Ryzokuken> GNOME?
<Ryzokuken> Ubuntu uses lightdm
<shevy> my sympathy is with you
St1gma has joined #ruby
<yorickpeterse> No, I'm using xfce
<shevy> \o/
<yorickpeterse> I want as little UI to get in the way of getting things done
<yorickpeterse> and I can't stand GNOME's massive buttons, title bars, etc
<Ryzokuken> Lol
<Ryzokuken> Yeah
<Ryzokuken> Forget Marshal
<Ryzokuken> I just wanna get this crap done
<Ryzokuken> How do I achieve this?
vondruch has joined #ruby
InternetFriend has joined #ruby
<shevy> u progress
<yorickpeterse> did you add the `p notes`?
<yorickpeterse> and if so, what was the output in the terminal?
<Ryzokuken> Not on gist
<Ryzokuken> I used p notes
<Ryzokuken> Nothing happened
<Ryzokuken> Wait
<yorickpeterse> Then it never reaches that code
<Ryzokuken> Lemme try again
atomical has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
timanema has joined #ruby
<Ryzokuken> I used alert before and after
<Ryzokuken> Its running
<Ryzokuken> But does not show up?
krz has joined #ruby
<Ryzokuken> Wtf?
sross07 has quit [Read error: Connection reset by peer]
sross07 has joined #ruby
<Ryzokuken> Yeah
<Ryzokuken> Figured out
<Ryzokuken> Maybe
<Ryzokuken> I did
<Ryzokuken> Alert notes
<Ryzokuken> Worked
decoponio has joined #ruby
atomical has joined #ruby
<shevy> this fail is too painful to see
<Ryzokuken> Alert Marshal. Dump(notes) did not work
crunk_bear has joined #ruby
ta has quit [Remote host closed the connection]
decoponyo has quit [Ping timeout: 246 seconds]
<Ryzokuken> shevy: help me pls :(
iateadonut has quit [Quit: Leaving.]
<Ryzokuken> Marshal is having probs
iateadonut has joined #ruby
<Ryzokuken> No require
<yorickpeterse> Marshal is not the problem
<yorickpeterse> >> Marshal.dump(42)
<ruboto> yorickpeterse # => "\x04\bi/" (https://eval.in/438224)
<yorickpeterse> there's no require needed
<Ryzokuken> Does it need gem?
<yorickpeterse> No, as I said already it comes with Ruby's standard library
timanema has quit [Ping timeout: 264 seconds]
<Ryzokuken> Marshal(notes) is not evaluating
<Ryzokuken> As I said
Burgestrand has quit []
<yorickpeterse> ...
<yorickpeterse> Use Marshal.dump
<yorickpeterse> Not Marshal(notes)
<Ryzokuken> Yeah
<Ryzokuken> That
nhhagen has quit [Remote host closed the connection]
<Ryzokuken> Marshal.dump(notes)
<Ryzokuken> Sry
<Ryzokuken> See the code again?
<shevy> Ryzokuken you need to read the docs
<Ryzokuken> Marshal dump and load alright?
<shevy> ruby-doc.org/core/Marshal.html
<Ryzokuken> Do I need to use dump and load as well?
lagrangi-wan has joined #ruby
<yorickpeterse> Marshal.load is used to turn marshalled data back into Ruby
<yorickpeterse> >> Marshal.load(Marshal.dump(42))
<ruboto> yorickpeterse # => 42 (https://eval.in/438226)
p0wn3d__ has joined #ruby
timanema has joined #ruby
<Ryzokuken> I declared marshal_dump and marshal_load
krisquigley has joined #ruby
p0wn3d_ has quit [Ping timeout: 250 seconds]
<Ryzokuken> Do I need _dump and _load as well?
r0x0rZ has joined #ruby
pecpec has joined #ruby
workmad3 has joined #ruby
<r0x0rZ> I'm going through LRTHW (http://learnrubythehardway.org/book/ex46.html) and when I try to run command `rake test` I get the following output in terminal -> https://gist.github.com/comatory/298bce215d3cde9d79b4
<shevy> require': cannot load such file -- test/unit (LoadError)
<yorickpeterse> Ryzokuken: you need to figure out what `notes` is before writing the file
hamilto-nyan has quit [Quit: F...ix you, Emacs!]
<jhass> Ryzokuken: how do you verify your claim "x is not evaluating"? What do you expect, what do you observe?
jdawgaz has joined #ruby
terlar has quit [Quit: WeeChat 1.3]
<Ryzokuken> What?
ChoiKyuSang has joined #ruby
<Ryzokuken> X ? Claim?
<shevy> I think this is part of the testunit gem ?
<ljarvis> yorickpeterse: ah, just super busy at the moment with work and house move
<r0x0rZ> shevy: sorry I'm still pretty new to Ruby
<yorickpeterse> r0x0rZ: test-unit is a Gem starting with 2.something
<jhass> 15:01 <Ryzokuken> Marshal(notes) is not evaluating
<yorickpeterse> robbyoconnor: gem install test-unit
<r0x0rZ> shevy: oh I see
<shevy> r0x0rZ yeah that error message usually means that some gem is not installed, sometimes it is not easy to find out the name
<yorickpeterse> ljarvis: didn't you already move into the new house?
<r0x0rZ> yorickpeterse: yes I did not have that gem installed
<Ryzokuken> Yeah
<yorickpeterse> I recall something about you buying it a few months ago
Tempesta has quit [Read error: Connection reset by peer]
ChoiKyuSang is now known as Tempesta
<Ryzokuken> Its not evaluating
<shevy> yorickpeterse said that it should be this one https://rubygems.org/gems/test-unit
<r0x0rZ> yorickpeterse: works like a charm now. thank you!
<ljarvis> yorickpeterse: no, had lots of trouble the last few weeks. We exchange contracts a few months ago but it was still being built. We move in this weekend
<Ryzokuken> Because wherever it is, its not called
ttilley has quit [Quit: Linkinus - http://linkinus.com]
<Ryzokuken> Anything afterwards is skipped
mondayrain has joined #ruby
nhhagen has joined #ruby
<yorickpeterse> robbyoconnor: what exercise was this?
r0x0rZ has quit [Client Quit]
<yorickpeterse> ljarvis: aah
<yorickpeterse> ljarvis: you bought a new house too?
<yorickpeterse> dayum
Coldblackice has quit [Ping timeout: 250 seconds]
<ljarvis> yeah we bought off-plan
Kallis has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
<ljarvis> it's generally cheaper, and it meant we got to design lots of stuff
<tobiasvl> #ruby-offtopic ;)
<maloik> wow congrats dude!
Kallis has quit [Max SendQ exceeded]
<yorickpeterse> tobiasvl: he's a mod, police give no fucks
<yorickpeterse> ᕕ(ᐛ)ᕗ
<maloik> :D
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ryzokuken> Yorik?
<maloik> :D/exit
<ljarvis> thanks! looking forward to the damn weekend and then not having internet for a month
<maloik> so I broke my irssi
<tobiasvl> yeah, hence my cheeky wink, so I'm clear of being banned ;)
imperator has joined #ruby
<tobiasvl> Ryzokuken: maybe you should gist your output
atmosx_laptop has quit [Quit: Lost in trance]
<tobiasvl> and code
Yzguy has joined #ruby
Burgestrand has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<tobiasvl> you're not communicating very well what you expect to happen, and what's actually happening
<Ryzokuken> What irc client you guys use for Ubuntu?
<tobiasvl> irssi
<ljarvis> irssi
vjdhama has quit [Read error: Connection reset by peer]
<Ryzokuken> Thx
patientj has joined #ruby
drewvanstone has joined #ruby
<shevy> xchat!
<certainty> weeckat!
<certainty> erm
<shevy> weakcat!
<certainty> xD
<Ryzokuken> How can I install xchat?
<Ryzokuken> Its for fedora
<shevy> lol
freerobby has joined #ruby
<diegoviola> Ryzokuken: weechat, I run Arch Linux though
<yorickpeterse> ljarvis: didn't order it before moving in?
<Ryzokuken> Oh
<diegoviola> but it's available for any distro
<Ryzokuken> Help?
<tobiasvl> Ryzokuken: just install it like you install any program…
<certainty> Ryzokuken: sudo dnf install ....
<tobiasvl> it's in yum/dnf
<Ryzokuken> Marshal.dump ain't even working
<ljarvis> yorickpeterse: yeah but basically they suck
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> Ryzokuken: OK I'm going to repeat this one more time
<Ryzokuken> Sudo apt-get install
<yorickpeterse> Ryzokuken: your problem is not Marshap.dump
RegulationD has joined #ruby
<Ryzokuken> Thanks lol
<yorickpeterse> because the code apparently never reaches it
<tobiasvl> Ryzokuken: apt-get? in fedora?
<Ryzokuken> No
<Ryzokuken> Ubuntu
<yorickpeterse> So again, figure out if `notes` is empty or not
<tobiasvl> oh
* certainty is confused
<yorickpeterse> instead of trying to work around having to do that
krisquigley has joined #ruby
<yorickpeterse> "oh but I used alert" No, use `p`
<yorickpeterse> Dumping the same gist in here is not going to get you an answer quicker
<yorickpeterse> ljarvis: ah
havenwood has joined #ruby
<yorickpeterse> ljarvis: 100/100 fiber all the way
allcentury has quit [Ping timeout: 250 seconds]
auzty has joined #ruby
InternetFriend has joined #ruby
<yorickpeterse> ljarvis: http://www.speedtest.net/my-result/4672360012 :haters
<yorickpeterse> fk
<yorickpeterse> ᕕ(ᐛ)ᕗ
<ljarvis> yorickpeterse: to be fair, when I finally get it I have FTTP so should get up to 350 down
<ericjphillips> I'm working on https://projecteuler.net/problem=3 and I have https://jsfiddle.net/ericjphillips/s9g9m866/3/ but I think I'm doing something illegal with the for loop on line 9
<ericjphillips> any thoughts?
<ljarvis> ericjphillips: this is #ruby
<ljarvis> that is not ruby
<ericjphillips> lol wrong tab
<Ryzokuken> Its not empty
<Ryzokuken> I used alert notes
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> Ryzokuken: ........
<Ryzokuken> It worked
<yorickpeterse> "use p"
<yorickpeterse> "I used alert"
<yorickpeterse> I'm done
<ljarvis> yorickpeterse: jesus that upload.. glorious
<yorickpeterse> You're on your own
* certainty admires yorickpeterse for his patience
<tobiasvl> Ryzokuken: and when you used p, what did it output?
bronson has joined #ruby
<sabrehagen> using jquery's html function as a setter (http://api.jquery.com/html/) with html that contains the string '\text' converts the \t to a tab. how do i make it not interpret escaped characters?
<Ryzokuken> Sorry :(
pyoor has joined #ruby
gurix has joined #ruby
<ljarvis> sabrehagen: this is #ruby
<yorickpeterse> ljarvis: it really helps uploading cat pictures
<ljarvis> that is not Ruby
Kallis has joined #ruby
<Ryzokuken> P is not outputting anything
<sabrehagen> ljarvis: wow sorry, new irc client and confused the channel :)
<Ryzokuken> Nothing shootsup
drewvanstone has quit [Ping timeout: 264 seconds]
<Ryzokuken> No p
<Ryzokuken> No kernel.p
<Ryzokuken> Nothing
<Ryzokuken> + I'm sorry
elperdut has joined #ruby
s2013 has joined #ruby
<ljarvis> sabrehagen: no worries :)
<Ryzokuken> Forgive me
<pyoor> what is the safest way to include a variable in a string? I'm currently using "foo #{bar}" but special characters in bar is causing the string to be truncated.
<Ryzokuken> Help me figure out
<ljarvis> pyoor: what kind of special characters?
<Ryzokuken> yorickpeterse: pls?
<ljarvis> Ryzokuken: please stop hitting return so often. You can type many things on a single line
kies^ has quit [Ping timeout: 246 seconds]
<pyoor> ljarvis \' - I'm calling a string as part of a regex
<pyoor> My regex is - data = data.sub(/<head.*?>/im, "\\0\n<script type='text/javascript'>\n#{foo}\n</script>")
slayerja_ has quit [Read error: Connection reset by peer]
<ljarvis> pyoor: I don't understand what you want exactly, but if it's a regexp maybe you want Regexp.escape
<yorickpeterse> Ryzokuken: No, I have work to get done
RegulationD has quit [Ping timeout: 255 seconds]
<Ryzokuken> :(
<pyoor> ljarvis: this is part of the replace string
<ljarvis> pyoor: then I don't understand the problem
slayerjain has joined #ruby
<yorickpeterse> haha, somebody is trying to parse JS with regex it seems
<shevy> pyoor you mean \ character ?
<pyoor> well I'm not entirely sure - the string is truncated where #{foo} contains \'
ryze has joined #ruby
gurix has quit [Client Quit]
s2013 has quit [Read error: Connection reset by peer]
MTGeni has joined #ruby
gurix has joined #ruby
<shevy> yorickpeterse they locked that post :(
bronson has quit [Ping timeout: 252 seconds]
<ryze> whatever
ryze has quit [Client Quit]
Burgestrand has quit []
<yorickpeterse> shevy: for good reasons
banister has quit [Ping timeout: 268 seconds]
Kallis has quit [Ping timeout: 240 seconds]
Kallis has joined #ruby
vjdhama has joined #ruby
gurix has quit [Client Quit]
allcentury has joined #ruby
Sou|cutter has quit [Quit: bbiab]
gurix has joined #ruby
centrx has joined #ruby
asxbr has joined #ruby
Igorshp has joined #ruby
vjdhama has quit [Read error: Connection reset by peer]
Luming has quit [Read error: Connection timed out]
chouhoulis has joined #ruby
bkulbida has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
vjdhama has joined #ruby
victortyau has joined #ruby
malconis has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Luming has joined #ruby
gusTester has joined #ruby
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
wpp has joined #ruby
joufflu has quit [Ping timeout: 240 seconds]
ruurd has quit [Quit: ZZZzzz…]
sarovin has left #ruby [#ruby]
Dacky has joined #ruby
arup_r_ has quit []
sanjayu has quit [Ping timeout: 240 seconds]
<Dacky> strane when did #rails become invite only
<jhass> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<havenwood> Dacky: #RubyOnRails
<Dacky> ahhh ha!
gurix has left #ruby [#ruby]
<Dacky> tks u guys are swell
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unop has joined #ruby
krz has quit [Ping timeout: 260 seconds]
hinbody has joined #ruby
teclator has joined #ruby
Dacky has quit []
Ox0dea has left #ruby ["WeeChat 1.3"]
Dacky has joined #ruby
Dacky is now known as Yank
Yank is now known as Yankk
whippythellama has joined #ruby
startupality has quit [Quit: startupality]
absklb has quit [Quit: Leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
absklb has joined #ruby
tagrudev has quit [Remote host closed the connection]
startupality has joined #ruby
aganov has quit [Remote host closed the connection]
hectortrope has quit [Remote host closed the connection]
nettoweb has joined #ruby
lsmola has quit [Ping timeout: 255 seconds]
chthon has quit [Ping timeout: 244 seconds]
thejoecarroll has quit [Quit: ZNC - http://znc.in]
marvin81 has joined #ruby
Sou|cutter has joined #ruby
duggiefresh has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hinbody has quit [Quit: leaving]
thejoecarroll has joined #ruby
ruurd has joined #ruby
momomomomo has joined #ruby
malconis has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
malconis has joined #ruby
Yankk is now known as YankNYC
podman has joined #ruby
lsmola has joined #ruby
tomaz_b has quit [Ping timeout: 250 seconds]
benlovell has quit [Ping timeout: 252 seconds]
benlovell has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
sanguisdex has joined #ruby
freerobby has joined #ruby
sanguisdex has left #ruby [#ruby]
voltalio has joined #ruby
chthon has joined #ruby
<YankNYC> haha this really sucks. i don't remember my nicknames and can't recover by email only
JoshL has joined #ruby
dopieee has quit [Ping timeout: 260 seconds]
ryze has joined #ruby
Burgestrand has joined #ruby
davedev24 has joined #ruby
eGGsha_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ryzokuken_ has joined #ruby
ngscheurich has joined #ruby
hectortrope has joined #ruby
dopamean_ has quit [Ping timeout: 264 seconds]
Hounddog has quit [Read error: Connection reset by peer]
nhhagen has quit [Remote host closed the connection]
nhhagen has joined #ruby
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
ericjphillips has quit [Quit: Leaving.]
bigmac has joined #ruby
Rollabunna has quit [Quit: Leaving...]
<gusTester> mornin
<havenwood> gusTester: Good mornin
<[k-> g
beauby has joined #ruby
Kricir has joined #ruby
Kricir has left #ruby [#ruby]
ryzokuken_ has quit [Quit: Page closed]
thejoecarroll has quit [Quit: ZNC - http://znc.in]
pontiki has joined #ruby
tjohnson has joined #ruby
<imperator> uri question. if I have "http://myaccount.blob.core.windows.net", and I call URI.parse on it to get a uri object, is there a method to just get "myaccount"? Or am I just supposed to split the host manually?
thejoecarroll has joined #ruby
* imperator is dealing with "canonical urls"
nhhagen has quit [Remote host closed the connection]
davidt has quit [Quit: Leaving]
stardiviner has quit [Ping timeout: 268 seconds]
<absklb> anyone using canvas lms here?
bigbadbear has joined #ruby
<jhass> imperator: URI doesn't specify a decomposition for authority I think
<jhass> so yeah, split
Kallis has quit [Read error: Connection reset by peer]
alveric has joined #ruby
<imperator> jhass, thanks
<imperator> wonder if Addressable does
hinbody has joined #ruby
Evanescence has joined #ruby
teclator has quit [Quit: leaving]
<jhass> highly doubt it
Xeago_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
Kendos-Kenlen has joined #ruby
nhhagen has joined #ruby
polly_wog has joined #ruby
bronson has joined #ruby
<jhass> reg-name = *( unreserved / pct-encoded / sub-delims )
<jhass> an URI doesn't care too much about the structure of it
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<imperator> ok, thanks, figured that but thought I'd ask
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Coraline> absklb: what do you need to know about Canvas?
timanema has quit [Quit: leaving]
leafybasil has quit [Ping timeout: 252 seconds]
startupality has quit [Quit: startupality]
RegulationD has quit [Ping timeout: 264 seconds]
rbennacer has joined #ruby
* imperator grumbles about the Hash.new constructor
kies^ has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
<absklb> Coraline, it was giving me error regarding one mocha.git repo on git hub. it said me to do bundle install to check it out. i did. still same error. but now i after many tries i diid bundle update and now finally it is getting that repo!
<absklb> Coraline, still not solved though. can use your help if you are free.
<jhass> ?anyone absklb
<ruboto> absklb, Just ask your question, if anyone has or can, they will respond.
* absklb knows.
<Coraline> What's not solved? It sounds like it works now?
<absklb> he repilied and my next reply is going to take time due to bundle update in progress hence....
<absklb> Coraline, i will know once this bundle update fiinishes
<Coraline> She
spcmastertim has joined #ruby
Xeago has joined #ruby
auzty has quit [Quit: Leaving]
<shevy> he reptilied?
<jhass> don't you know we're ruled by reptiloids?
<absklb> :-)
<shevy> I was an eye witness when dinosaurs were programming!
startupality has joined #ruby
nopc0de is now known as j2k
<Burgestrand> And then the great refactor, now no more dinosaurs.
<shevy> yeah
<imperator> and then.....someone used a goto statement
<imperator> adios programming dinosaurs
ruurd has quit [Quit: ZZZzzz…]
workmad3 has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
youngbaks has joined #ruby
tenderlove has joined #ruby
leafybasil has joined #ruby
j2k is now known as j2k_
nolic has joined #ruby
NeverDie has joined #ruby
voltalio has joined #ruby
leafybas_ has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
krz has joined #ruby
polysics has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
hs366 has quit [Read error: Connection reset by peer]
<absklb> libxml2 is missing. is that to be installed by gem or os?
<Coraline> OS
workmad3 has quit [Ping timeout: 264 seconds]
<absklb> ok
polysics has quit [Client Quit]
<absklb> I did sudo apt-get install ruby-libxml libxml2 libxml2-dev and still get error for libxml in canvas bundle update?
<absklb> whats wrong?
ragingcake has quit [Ping timeout: 240 seconds]
ryze has quit [Quit: Leaving]
bluOxigen has quit []
<absklb> so it says nokogiri needs its own libxml not random by os.
<absklb> but i can make it use os one. shall i?
bluOxigen has joined #ruby
<apt-get> absklb: the easiest way might be to "gem install nokogiri"
<absklb> i think its already installed. its now trying to update
<absklb> let me try though
<yorickpeterse> hihi, nokogiri
<absklb> ??
marvin81 has quit []
<havenwood> yorickpeterse: I was just thinking of Oga.
<yorickpeterse> havenwood: how romantic
<yorickpeterse> havenwood: Oga also thinks a lot about you
* havenwood cries a single tear
<yorickpeterse> (͡° ͜ʖ ͡°)
ruurd has joined #ruby
devoldmx has joined #ruby
axl_ has joined #ruby
vjdhama has quit [Read error: Connection reset by peer]
Evanescence has quit [Ping timeout: 252 seconds]
Evanescence has joined #ruby
MVPhelp has quit [Remote host closed the connection]
slayerja_ has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
devoldmx has quit [Ping timeout: 268 seconds]
Technodrome has joined #ruby
EllisTAA has joined #ruby
rbennacer has quit [Remote host closed the connection]
InternetFriend has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rbennacer has joined #ruby
tatsuo has quit [Quit: Leaving...]
slayerjain has quit [Ping timeout: 272 seconds]
gurix has joined #ruby
tkuchiki has joined #ruby
asxbr has quit [Ping timeout: 246 seconds]
drptbl_ has quit [Quit: My MAC has gone to sleep. zZz..]
ragingcake has joined #ruby
p0wn3d__ has quit [Ping timeout: 260 seconds]
dopamean_ has joined #ruby
chthon has quit [Ping timeout: 244 seconds]
rbennacer has quit [Remote host closed the connection]
<shevy> you nerds!
banister has joined #ruby
<adaedra> no u
rbennacer has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
dopie has joined #ruby
FernandoBasso has quit [Quit: Leaving]
<shevy> you french!
<adaedra> Plait-il ?
RegulationD has joined #ruby
workmad3 has joined #ruby
wookiehangover has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<shevy> oui baguette
<pyoor> Can anyone explain this behavior to me? http://pastebin.com/HW01VREq
<ruboto> pyoor, as I told you already, please use https://gist.github.com
<shevy> god is this ugly
mary5030 has quit [Remote host closed the connection]
<shevy> slightly better, now what is the behaviour that is confusing?
mary5030 has joined #ruby
<pyoor> I'm trying to make a replacement in a string but the replacement string contains \\'. For some reason, the replacement string is split into two parts
<Kendos-Kenlen> C'est bon la baguette !
<pyoor> The second occuring at the end of the source string
<Kendos-Kenlen> Vive la baguette, le pain et les bérêts ! :D
rodfersou has quit [Ping timeout: 260 seconds]
<shevy> I can't even get the example to work
absklb has quit [Remote host closed the connection]
<shevy> syntax error, unexpected $undefined, expecting end-of-input
workmad3 has quit [Ping timeout: 240 seconds]
<shevy> ok
<shevy> you truncate there right?
karapetyan has quit [Remote host closed the connection]
rodfersou has joined #ruby
<shevy> "123\\'asdasd"
drptbl has joined #ruby
<pyoor> shevy: yessir
wookiehangover has joined #ruby
karapetyan has joined #ruby
drewvanstone has joined #ruby
jas02 has quit [Quit: jas02]
chthon has joined #ruby
<pyoor> that's just an example. I'm getting this issue when reading a file containing \\'
rippa has joined #ruby
j4cknewt has joined #ruby
einarj has quit [Ping timeout: 246 seconds]
<pyoor> is there a way to sanitize the file or string prior to performing the replacement or is it some other issue?
einarj has joined #ruby
beauby has quit [Ping timeout: 240 seconds]
drptbl has quit [Max SendQ exceeded]
<shevy> you mean these three characters are in a file? "\\'"
hashrocket has joined #ruby
drptbl has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
<shevy> in your example you actually add \\'
<pyoor> yes, those characters - I used 123\\'asdasd rather than pasting the entire file
ruurd has joined #ruby
drewvanstone has quit [Ping timeout: 268 seconds]
Jardayn_two has joined #ruby
nhhagen has quit [Remote host closed the connection]
solars has quit [Ping timeout: 264 seconds]
j4cknewt has quit [Ping timeout: 240 seconds]
iamninja has joined #ruby
freerobby has quit [Quit: Leaving.]
iamninja_ has quit [Read error: Connection reset by peer]
[Butch] has joined #ruby
ankr has quit [Quit: bye bye]
<shevy> yeah, typically \\ means literal \ whenever you have a string
alveric has quit [Read error: Connection reset by peer]
dorei has joined #ruby
<Burgestrand> It becomes a bit weird in String#sub and String#gsub.
<Burgestrand> >> "Hello".sub(/e/, "\\'")
vondruch has quit [Ping timeout: 250 seconds]
canton7 has quit [Ping timeout: 250 seconds]
<ruboto> Burgestrand # => "Hllollo" (https://eval.in/438323)
alveric has joined #ruby
BTRE has joined #ruby
Jardayn has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
InternetFriend has quit [K-Lined]
crunk_bear has quit [K-Lined]
<Burgestrand> You have to double-escape backslashes if you're using a string as replacement in String#sub.
<Burgestrand> >> "Hello".sub(/e/, "\\\\'")
<ruboto> Burgestrand # => "H\\'llo" (https://eval.in/438324)
tuxero has joined #ruby
<Burgestrand> (it prints doubly because of #inspect)
<shevy> pyoor you can test with a test file... have one line be: \\'
dopamean_ has quit [Ping timeout: 246 seconds]
<shevy> pyoor then read this in via: File.readlines()
drewvanstone has joined #ruby
canton7 has joined #ruby
canton7 has quit [Changing host]
canton7 has joined #ruby
<shevy> This will return an Array that may look like this: ["abc\n", "def\n", "ghi\n", "\\\\'\n"]
<shevy> there you can see that ruby represents it differently, the last entry of that array
hobodave has joined #ruby
<pyoor> so I thought about that but when I do bar.kind_of?(Array) it returns false
<pyoor> is there a safer way to read the file?
hobodave has quit [Read error: Connection reset by peer]
<Burgestrand> pyoor: pass your replacement string as a block instead.
<pyoor> Burgestrand: how do I do that? I'm relatively new to ruby
<Burgestrand> >> "Hello".sub(/e/) { "some string containing backslash \\'" }
hobodave has joined #ruby
<ruboto> Burgestrand # => "Hsome string containing backslash \\'llo" (https://eval.in/438329)
<shevy> pyoor yeah, File.read() will give you a string, File.readlines() an array. for .gsub you can use a {} variant
fedexo has joined #ruby
<Burgestrand> pyoor: ^
Evanescence has quit [Quit: Code, Sex, Just fucking world.]
emilkarl has quit [Quit: emilkarl]
darkf has quit [Quit: Leaving]
<Burgestrand> pyoor: when you pass "bar" as a second argument to #sub, it will be interpreted by Ruby in a special way, replacing things prefixed by \\.
prestorium has joined #ruby
<Burgestrand> pyoor: if instead you pass it as a block, e.g. "Your string".sub(/regex/) { "replacement" }, it won't be interpreted in this special way.
<Burgestrand> Like here.
benlieb has joined #ruby
<pyoor> interesting - thanks for that Burgestrand
blueOxigen has joined #ruby
<Burgestrand> >> "aabaa".sub(/a/, "\\'")
<ruboto> Burgestrand # => "abaaabaa" (https://eval.in/438333)
bluOxigen has quit [Ping timeout: 268 seconds]
<Burgestrand> pyoor: ^
youngbaks has quit [Read error: Connection reset by peer]
<Burgestrand> Actually, bad example, should have been /b/.
<pyoor> Burgestrand: do I wrap the entire replace string in curly braces?
<Burgestrand> >> "aabaa".sub(/b/, "\\'")
<ruboto> Burgestrand # => "aaaaaa" (https://eval.in/438335)
<pyoor> or just the data itself
arashb has quit [Remote host closed the connection]
<Burgestrand> pyoor: Yes. Skip the second argument.
dopamean_ has joined #ruby
<Burgestrand> pyoor: foo.sub(/<head>/) { bar }
<pyoor> awesome - thanks again for that
bmurt has joined #ruby
<Burgestrand> pyoor: Ruby will use the return value of the block (code inside curly braces), which is "bar", and will *not* interpret it in the special way that String#sub interprets its second argument.
<pyoor> I completely missed that in the documentation
<Burgestrand> pyoor: Most people do, including me, I've been bitten by it before. :)
sshuff|gone is now known as sshuff
<Burgestrand> String#sub and String#gsub be crazy when it comes to backslashes in the replacement string.
cschneid_ has joined #ruby
<pyoor> well thanks again - I've been stuck on this for a few hours this morning
<pyoor> trying different string concatenation, etc - thinking that was the issue
<Burgestrand> pyoor: Nope, it's just String#sub being incredibly weird.
<Burgestrand> Most of the time the stdlib does useful things, String#sub is a rare occurrence.
SylarRuby has quit [Remote host closed the connection]
<Burgestrand> stdlib/core, I should say.
mwlang has joined #ruby
bronson has joined #ruby
bigmac has quit [Ping timeout: 260 seconds]
pusewicz has quit [Quit: Bye! http://www.layer22.com]
ruurd has quit [Quit: ZZZzzz…]
workmad3 has joined #ruby
slackbotgz has joined #ruby
dfockler has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
Jardayn_two is now known as Jardayn
<shevy> off-topic, perhaps someone knows, I just want to know if it is possible - if you have a rails site, can you easily generate a .pdf from this, by just using ruby code? (I currently use wkhtmltopdf)
<lagweezle> shevy: Generate a PDF of/from .. what, exactly?
workmad3 has quit [Ping timeout: 252 seconds]
<shevy> hmm let's say you just have a single page in rails, let's say ... hmm... just a page with lots of pictures
<shevy> or perhaps a pay-stuff formular :)
pietr0 has joined #ruby
Xeago has quit [Remote host closed the connection]
blackmesa has joined #ruby
mdih has quit [Ping timeout: 272 seconds]
einarj has quit [Remote host closed the connection]
Xeago has joined #ruby
freerobby has joined #ruby
rwyoung has joined #ruby
<shevy> wkhtmltopdf works quite ok so far, the only minor issue I see so far is with the inner-page padding being too large in the .pdf file
dopamean_ has quit [Ping timeout: 240 seconds]
jdawgaz has joined #ruby
rbennacer has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 252 seconds]
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beauby has joined #ruby
<pyoor> Burgestrand: is it possible to still use backreferences in block code?
blackmesa has quit [Ping timeout: 268 seconds]
<Burgestrand> pyoor: yes, but not by doing it how you did before. The first parameter to the block is the matched text.
<Burgestrand> >> "aabyaa".sub(/b./) { |x| "<#{x}>" }
<ruboto> Burgestrand # => "aa<by>aa" (https://eval.in/438352)
circ-user-dLt7c has joined #ruby
<Burgestrand> pyoor: ^
<pyoor> ahh I see
<pyoor> thanks
<pyoor> sub is so weird
<Burgestrand> pyoor: inside the block, the magic global variable "current match" is also properly set, $~, which is a MatchData object containing information about the current match.
<Burgestrand> >> "aabyaa".sub(/b(.)/) { |x| "<#{$~[1]}>" }
<ruboto> Burgestrand # => "aa<y>aa" (https://eval.in/438353)
<Burgestrand> It looks an awful lot like perl soon. :)
Kendos-Kenlen has quit [Ping timeout: 264 seconds]
rbennacer has joined #ruby
scoot has joined #ruby
Rickmasta has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
MVPhelp has joined #ruby
tkuchiki has quit [Remote host closed the connection]
p0wn3d__ has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SCHAAP137 has quit [Remote host closed the connection]
jas02 has joined #ruby
vjdhama has joined #ruby
malconis has quit [Ping timeout: 252 seconds]
aswen has quit [Ping timeout: 260 seconds]
Technodrome has quit [Quit: Technodrome]
towski_ has joined #ruby
dionysus69 has joined #ruby
Iniesta8 has joined #ruby
Alina-malina has quit [Ping timeout: 255 seconds]
Iniesta8 has quit [Client Quit]
tejasmanohar has joined #ruby
jas02 has quit [Ping timeout: 256 seconds]
nateberkopec has quit [Quit: Leaving...]
mondayrain has quit [Quit: Leaving]
iateadonut has quit [Quit: Leaving.]
scoot has quit []
bigmac has joined #ruby
dopamean_ has joined #ruby
scoot has joined #ruby
Vae_DuckZ has joined #ruby
yqt has joined #ruby
blackmesa has joined #ruby
<Vae_DuckZ> hello, I'm wondering if there's a negated version of =~ in ruby? I'm in a "if cond1 && !(str =~ r) then" scenario
<Vae_DuckZ> is that the correct way of doing it?
<lagweezle> shevy: Not experienced in this realm, sadly.
<lagweezle> ... or maybe, 'luckily'
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
<Burgestrand> Vae_DuckZ: !~
<shevy> I seem to remember something in rails like link_to: :pdf or something like that. no idea what it did
<Vae_DuckZ> Burgestrand: thanks
spcmastertim has quit [Ping timeout: 264 seconds]
cyrus_mc has joined #ruby
<shevy> perhaps my imagination is cooler than the reality
* jhass prefers !x.match
parduse has joined #ruby
siaw has joined #ruby
nolic has quit [Quit: Lost terminal]
<siaw> how do i write a regex that satisfies something like this: “06-25 14:58:04.258953”
<Burgestrand> siaw: //
<jhass> siaw: looks like a borked time, maybe your want strptime?
yfeldblum has joined #ruby
skullcrasher has quit [Remote host closed the connection]
<Burgestrand> siaw: ^
<havenwood> siaw: Where's that coming from?
<siaw> havenwood: it’s a db timestamp
ruurd has joined #ruby
<jhass> get a better DB
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Burgestrand> Without a year attached?
<siaw> havenwood: seriously?
<havenwood> siaw: Hem?
<jhass> yeah, havenwood, seriously!
rgb-one has joined #ruby
<siaw> it looks like this actually “2015-07-11 15:17:45.957181”
<siaw> my bad
<Burgestrand> siaw: :)
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<siaw> so questions again how do i write a regex that satisfies “2015-07-11 15:17:45.957181” :D
<Burgestrand> siaw: use String#strptime like jhass said, it's meant for these things.
speakingcode has quit [Ping timeout: 256 seconds]
cyrus_mc has quit [Ping timeout: 240 seconds]
<Burgestrand> Oh, sorry, it's on DateTime, not String.
wpp has quit [Quit: ZZZzzz…]
parduse has quit [Ping timeout: 246 seconds]
amclain has joined #ruby
<jhass> >> require "time"; Time.strptime("%F %T.%N")
<ruboto> jhass # => wrong number of arguments (1 for 2..3) (ArgumentError) ...check link for more (https://eval.in/438367)
yfeldblum has quit [Read error: Connection reset by peer]
<jhass> eh, derp
EllisTAA has quit [Quit: EllisTAA]
malconis has joined #ruby
<jhass> >> require "time"; Time.strptime("2015-07-11 15:17:45.957181", "%F %T.%N")
bigmac has quit [Ping timeout: 244 seconds]
<ruboto> jhass # => 2015-07-11 15:17:45 +0000 (https://eval.in/438368)
rodfersou is now known as rodfersou|lunch
yfeldblum has joined #ruby
malconis has quit [Remote host closed the connection]
<jhass> >> require "time"; Time.strptime("garbage", "%F %T.%N")
<ruboto> jhass # => invalid strptime format - `%F %T.%N' (ArgumentError) ...check link for more (https://eval.in/438369)
Xeago has quit [Remote host closed the connection]
<siaw> i figured it out. thanks guys ;)
<Burgestrand> >> require "datetime"; DateTime.strptime
<ruboto> Burgestrand # => cannot load such file -- datetime (LoadError) ...check link for more (https://eval.in/438370)
<Burgestrand> :(
<Burgestrand> Oh.
<havenwood> siaw: /\A\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{6}\z/
<Burgestrand> >> DateTime.strptime
<ruboto> Burgestrand # => uninitialized constant DateTime (NameError) ...check link for more (https://eval.in/438371)
<Burgestrand> …
<Burgestrand> >> require "time"; DateTime.strptime
<ruboto> Burgestrand # => #<DateTime: -4712-01-01T00:00:00+00:00 ((0j,0s,0n),+0s,2299161j)> (https://eval.in/438372)
<Burgestrand> Consistent.
malconis has joined #ruby
<Burgestrand> Not.
Aswebb_ has joined #ruby
<jhass> require "date" works too :D
<Burgestrand> But that's because require date requires time, no? :p
rcvalle has joined #ruby
<jhass> or vice versa? idk
jenrzzz has joined #ruby
gurix has quit [Quit: gurix]
<apeiros> iirc time requires date
<Burgestrand> Yeah, looks like both require each other.
<apeiros> because Time.strptime uses Date._strptime
<siaw> havenwood: thanks :). but doesn’t work btw ;)
<apeiros> hasn't always been like that
<havenwood> >> '2015-07-11 15:17:45.957181' =~ /\A\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{6}\z/
<ruboto> havenwood # => 0 (https://eval.in/438373)
<havenwood> siaw: Works for the one arbitrary example you gave.
<havenwood> siaw: :P
elperdut has joined #ruby
<siaw> havenwood: haha ok :)
benlovell has quit [Ping timeout: 260 seconds]
<havenwood> siaw: Or are you wanting to match the smartquotes too? If you do a gist with a bunch of examples I'm sure there's someone here who can't resist matching all of them.
<Burgestrand> Like with Time.strptime!
* havenwood likes the idea that the DB's timestamp has smartquotes
Soda has joined #ruby
<siaw> i found a solution anyway thank you :)
yfeldblum has quit [Ping timeout: 240 seconds]
<havenwood> siaw: Hopefully not Regexp-based!
<Burgestrand> Hopefully using strptime!
<havenwood> siaw: What did you go with?
<havenwood> ^
pontiki has quit [Ping timeout: 250 seconds]
mghaig has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
spcmastertim has joined #ruby
rgb-one has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
<mghaig> In an initialize method i'm trying to set an instance var to an argument only if it's a float and raise an argument error if it's anything else, is this valid ruby, when i run it in irb it always raises the error...
<mghaig> @distance = distance if distance.is_a? Float else raise ArgumentError, "Distance must be a Float."
mattprelude has quit [Ping timeout: 260 seconds]
vjdhama has quit [Remote host closed the connection]
<mghaig> can it not be a one-liner?
<jhass> better not
vjdhama has joined #ruby
<Burgestrand> It's not more concise because it's on one line.
<jhass> raise ArgumentError unless distance.is_a? Float; @distance = distance
<apeiros> mghaig: I prefer: raise TypeError, "Distance must be a Float" unless distance.is_a?(Float); @distance = distance
<Burgestrand> More lines is not always worse code! Your code is beautiful, let it fly in all its glory.
<jhass> replace the ; with a newline
<apeiros> mghaig: but I'd question why you have that requirement
krisquigley has quit [Remote host closed the connection]
<apeiros> ^5 jhass (despite different err classes)
<shevy> the whole world is written on one line!
<mghaig> ok thanks so much. i didn't consider the unless. and the type error is probably better for this case
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kendos-Kenlen has joined #ruby
parduse has joined #ruby
mghaig has quit []
<jhass> shevy: World.new ?
<Burgestrand> I built a thing, https://github.com/elabs/serial, and I've been looking at some alternatives that solve the same problem, e.g. ActiveModel::Serializers, JBuilder, RABL. Are there any other popular alternatives that I've missed to have a look at?
casadei has joined #ruby
<Burgestrand> (aside from building a hash and sprinkling if-statements)
<Burgestrand> (I asked the same question in #RoR last week I believe, which gave me RABL, hadn't seen that one before.)
soc42 has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
p0wn3d__ has quit [Ping timeout: 255 seconds]
bricker has joined #ruby
eosinx has joined #ruby
TomyLobo has joined #ruby
nolic has joined #ruby
parduse has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
symm- has joined #ruby
vivcheri has quit [Quit: Page closed]
jamesaxl has joined #ruby
djbkd has joined #ruby
ebragaparah has joined #ruby
workmad3 has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
SylarRuby has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
Vae_DuckZ has quit [Quit: Konversation terminated!]
djbkd has quit [Ping timeout: 264 seconds]
weaksauce has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
malconis_ has joined #ruby
malconis_ has quit [Remote host closed the connection]
<Sou|cutter> Burgestrand: Possibly https://github.com/apotonick/representable
Burgestrand has quit []
Burgestrand has joined #ruby
SylarRuby has quit [Read error: No route to host]
malconis_ has joined #ruby
SylarRuby has joined #ruby
malconis has quit [Read error: Connection reset by peer]
<Burgestrand> Sou|cutter: Thanks! I'm just on my way home now, so I'll have a thorough look tomorrow. :)
<shevy> say you have such a logo http://shevegen.square7.ch/COOKBOOKS_LOGO.png ... does anyone of you know of a simple way to randomly alternate all colours, via ruby? (can use imagemagick/rmagick of course) I want to do so programmatically rather than manually
Burgestrand has quit [Client Quit]
bmurt has quit []
skade has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
startupality has quit [Quit: startupality]
davedev24 has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
davedev24 has joined #ruby
speakingcode has joined #ruby
codecop has quit [Remote host closed the connection]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
nzst has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
p0wn3d__ has joined #ruby
momomomomo has quit [Quit: momomomomo]
ebragapa_ has joined #ruby
baweaver has joined #ruby
EllisTAA has joined #ruby
rezzack has joined #ruby
rbennacer has joined #ruby
soc42 has quit [Remote host closed the connection]
startupality has joined #ruby
ebragaparah has quit [Ping timeout: 250 seconds]
brendan- has joined #ruby
baweaver has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
baweaver has joined #ruby
vjdhama has quit [Remote host closed the connection]
startupality has quit [Client Quit]
vjdhama has joined #ruby
greenarrow has quit [Quit: 500]
workmad3 has quit [Ping timeout: 260 seconds]
j4cknewt has joined #ruby
MTGeni has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
greenarrow has joined #ruby
greenarrow has quit [Max SendQ exceeded]
allcentury has quit [Ping timeout: 265 seconds]
startupality has joined #ruby
tubbo is now known as VladimirPoopin
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
startupality has quit [Client Quit]
pengin has joined #ruby
Technodrome has joined #ruby
arian0n has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
c0m0 has quit [Ping timeout: 252 seconds]
Musashi007 has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
nolic has quit [Quit: Lost terminal]
devoldmx has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
voltalio has joined #ruby
psy_ has joined #ruby
gurix has joined #ruby
allomov has quit [Remote host closed the connection]
psy_ has quit [Max SendQ exceeded]
spcmastertim has quit [Ping timeout: 252 seconds]
tvw has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
Guest40864 is now known as marahin
armyriad has quit [Quit: Leaving]
marahin has quit [Changing host]
marahin has joined #ruby
RobertBirnie has joined #ruby
DoubleMalt has quit [Ping timeout: 265 seconds]
giuseppesolinas_ has quit [Quit: Leaving]
giuseppesolinas has left #ruby ["Leaving"]
giuseppesolinas has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
scoot has quit [Remote host closed the connection]
wpp has joined #ruby
wpp has quit [Client Quit]
Oka has joined #ruby
jdawgaz has joined #ruby
wpp has joined #ruby
armyriad has joined #ruby
banister has quit [Ping timeout: 240 seconds]
sshuff is now known as sshuff|gone
nzst has joined #ruby
pecpec has quit [Quit: Leaving...]
karapetyan has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
karapetyan has joined #ruby
rnga has joined #ruby
pontiki has joined #ruby
andyrs has joined #ruby
last_staff has joined #ruby
ericjphillips has joined #ruby
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jas02 has joined #ruby
bronson has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
drptbl has joined #ruby
scoot has joined #ruby
face has quit []
chipotle has joined #ruby
krz has quit [Ping timeout: 240 seconds]
RegulationD has quit [Remote host closed the connection]
eosinx has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
platzhirsch has left #ruby [#ruby]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
jenrzzz has joined #ruby
djbkd has joined #ruby
mjuszczak has joined #ruby
workmad3 has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
rehat has joined #ruby
blackmes1 has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
blackmesa has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
yfeldblum has joined #ruby
eat_multi has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 264 seconds]
Pupeno has joined #ruby
joast has quit [Quit: Leaving.]
banjara has joined #ruby
blackmesa has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 264 seconds]
pengin has quit [Remote host closed the connection]
yfeldblum has joined #ruby
towski_ has joined #ruby
Rickmasta has quit [Ping timeout: 264 seconds]
pengin has joined #ruby
pheuko has quit [Quit: pheuko]
blackmes1 has quit [Ping timeout: 246 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joast has joined #ruby
ragingcake has quit [Quit: ragingcake]
rbennacer has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 264 seconds]
rwyoung has quit [Quit: Lost terminal]
blackmes1 has joined #ruby
wryfi has joined #ruby
<wryfi> i'm seeing some confusing behavior between bundler and chruby
<wryfi> i am using chruby with a ruby-installed ruby in opt
dionysus69 has quit [Ping timeout: 246 seconds]
casadei has quit [Remote host closed the connection]
<wryfi> chruby sets my $GEM_HOME to $HOME/.gem/ruby/2.2.3
<wryfi> and puts $HOME/.gem/ruby/2.2.3/bin on my $PATH
twistedpixels_ has quit [Ping timeout: 240 seconds]
<wryfi> when i install gems with gem, they get installed in $GEM_HOME
blackmesa has quit [Ping timeout: 240 seconds]
<wryfi> but when i install them with bundler, they end up in a path based on ABI version, $HOME/.gem/ruby/2.2.0
<dfockler> ?ABI
<ruboto> I don't know anything about ABI
<wryfi> which is not put on my path by chruby
<wryfi> can anybody help me figure out what to do to make these things play nice together?
<adaedra> Are you sure it's using the right bundler?
parduse has joined #ruby
<wryfi> adaedra: yes, my first step is gem install bundler, which goes into $GEM_HOME, and is what shows up when i do `which bundle`
hanmac has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
blackmes1 has quit [Ping timeout: 240 seconds]
<adaedra> Does `gem env` looks correct?
asxbr has joined #ruby
<wryfi> yes, gem env looks exactly correct
Pupeno has joined #ruby
<wryfi> and, in fact, things installed via gem go exactly where they're supposed to
asxbr has quit [Client Quit]
<wryfi> it's just the bundler gems that go in the ABI-versioned directory instead
asxbr has joined #ruby
Aswebb__ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
krisquigley has joined #ruby
<wryfi> (and i've done this twice now in clean environments, so i'm probably not completely crazy)
jenrzzz has joined #ruby
<dfockler> do the gems not work when they are installed in the ABI directory?
wpp has quit [Quit: ZZZzzz…]
fedexo has quit [Ping timeout: 240 seconds]
blackmes1 has joined #ruby
allcentury has joined #ruby
Aswebb_ has quit [Ping timeout: 250 seconds]
wpp has joined #ruby
parduse has quit [Ping timeout: 244 seconds]
slayerjain has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
jamesaxl has joined #ruby
imperator has left #ruby ["Leaving"]
jenrzzz has quit [Ping timeout: 260 seconds]
voltalio has joined #ruby
ragingcake has joined #ruby
leafybas_ has quit [Ping timeout: 250 seconds]
renderful has joined #ruby
slayerja_ has quit [Ping timeout: 240 seconds]
weemsledeux has joined #ruby
momomomomo has joined #ruby
nateberkopec has joined #ruby
tomphp has joined #ruby
benlieb has quit [Quit: benlieb]
<wryfi> dfockler: not without manually manipulating my PATH and GEM_PATH
shadoi has joined #ruby
cmisenas has quit [Quit: cmisenas]
havenwood has joined #ruby
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
rbennacer has quit [Remote host closed the connection]
ishahnaz has quit []
<jhass> ah you commented there ;P
gregf has quit [Quit: WeeChat 1.3]
<wryfi> jhass: yeah, and the maintainer pointed his finger at bundler
<jhass> so?
ruurd has quit [Quit: ZZZzzz…]
<jhass> I agree that bundler should respect GEM_HOME unless --path is given
andyrs has joined #ruby
<jhass> if it doesn't, it's a bug
wpp has quit []
<wryfi> even passing it --path, it adds the version component itself
<jhass> sure
ht__ has joined #ruby
<jhass> that's intended there
<jhass> so stuff gets reinstalled when you switch ruby versions
rbennacer has joined #ruby
chthon has quit [Ping timeout: 244 seconds]
malconis has joined #ruby
malconis_ has quit [Ping timeout: 240 seconds]
musl_ has joined #ruby
musl has quit [Ping timeout: 260 seconds]
stan has quit [Ping timeout: 246 seconds]
Swappticon has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.3]
momomomomo_ has joined #ruby
VladimirPoopin is now known as tubbo
Asher has quit [Quit: Leaving.]
codecop has joined #ruby
nateberkopec has quit [Quit: Leaving...]
scoot has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 272 seconds]
momomomomo_ is now known as momomomomo
rodfersou|lunch is now known as rodfersou
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Technodrome has quit [Quit: Technodrome]
slackbotgz has quit [Remote host closed the connection]
bmurt has joined #ruby
krz has joined #ruby
Kit__ has joined #ruby
yqt has quit [Ping timeout: 268 seconds]
SCHAAP137 has joined #ruby
Kit__ has quit [Client Quit]
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
ericjphillips has quit [Quit: Leaving.]
ericjphillips has joined #ruby
iamvery has quit [Ping timeout: 240 seconds]
scoot has joined #ruby
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
Igorshp has quit [Remote host closed the connection]
andyrs has joined #ruby
ruurd has joined #ruby
suchness has quit [Ping timeout: 246 seconds]
ragingcake has quit [Quit: ragingcake]
jenrzzz has joined #ruby
ramfjord has joined #ruby
aldodelgado has joined #ruby
webopsx has joined #ruby
Technodrome has joined #ruby
webopsx has quit [Max SendQ exceeded]
spcmastertim has joined #ruby
PlasmaStar has quit [Ping timeout: 240 seconds]
mjuszczak has quit []
RegulationD has joined #ruby
chrisja has joined #ruby
wldcordeiro has joined #ruby
PlasmaStar has joined #ruby
slayerjain has quit [Quit: Textual IRC Client: www.textualapp.com]
Pupeno has quit [Remote host closed the connection]
willywos has joined #ruby
alveric has quit [Remote host closed the connection]
gregf has joined #ruby
aghalarp has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
Pupeno has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
youngbaks has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
aghalarp has quit [Ping timeout: 240 seconds]
Swappticon has quit [Quit: Textual IRC Client: www.textualapp.com]
casadei has joined #ruby
Azure|dc has joined #ruby
firstdayonthejob has joined #ruby
chipotle has quit [Excess Flood]
wallerdev has joined #ruby
polly_wog has quit [Remote host closed the connection]
benlieb has joined #ruby
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
Azure has quit [Ping timeout: 244 seconds]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 240 seconds]
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
saddad has joined #ruby
petricore has joined #ruby
RegulationD has quit [Remote host closed the connection]
barhum2013 has joined #ruby
siaw has left #ruby [#ruby]
bigmac has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
pen has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
wildlander has joined #ruby
spcmastertim has quit [Ping timeout: 240 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
chipotle has joined #ruby
ericjphillips has left #ruby [#ruby]
allomov has joined #ruby
barhum2013 has quit [Ping timeout: 240 seconds]
UtkarshRay has quit [Ping timeout: 240 seconds]
ericjphillips has joined #ruby
EmeraldExplorer has joined #ruby
<EmeraldExplorer> What looks nicer? do end or {} ?
<centrx> Generally use do end for multi-line blocks and {} for one-line blocks
beauby has quit [Ping timeout: 246 seconds]
<centrx> *same line
treehug88 has joined #ruby
scoot has quit [Remote host closed the connection]
lemur has joined #ruby
spcmastertim has joined #ruby
Luming has quit [Ping timeout: 240 seconds]
<EmeraldExplorer> is "self" automatically assumed ruby when defining methods?
workmad3 has joined #ruby
Luming has joined #ruby
<shevy> self will always be something
deject3d has joined #ruby
DrCode has quit [Remote host closed the connection]
skade has quit [Ping timeout: 250 seconds]
scoot has joined #ruby
barhum2013 has joined #ruby
<EmeraldExplorer> shevy: Is it assumed though? I mean if I did def hi ... it would be the same thing as def self.hi , correct?
<wallerdev> no
<wallerdev> def self.hi defines it on the class
<wallerdev> >> class Cool; def self.hi; puts 'hi'; end end; Cool.hi
<ruboto> wallerdev # => hi ...check link for more (https://eval.in/438479)
<wallerdev> def hi puts it on the object instantiated by that class
sufyan``` has quit [Remote host closed the connection]
baweaver has quit [Disconnected by services]
lemur is now known as baweaver
andyrs has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
lemur has joined #ruby
wallerdev_ has joined #ruby
barhum2013 has quit [Ping timeout: 246 seconds]
rehat has quit []
workmad3 has joined #ruby
bruno- has joined #ruby
<EmeraldExplorer> wallerdev: Oh, I think I see. So is self like static in anyway?
<EmeraldExplorer> BTW im referring to Java
<EmeraldExplorer> ... if you know about that language
iamvery has joined #ruby
<deject3d> no self is not like static
wallerdev has quit [Ping timeout: 265 seconds]
wallerdev_ is now known as wallerdev
<EmeraldExplorer> deject3d: what is the difference?
<deject3d> what is your understanding of static?
* baweaver grabs popcorn
<EmeraldExplorer> deject3d: static is a method of a class, not an object, and can be used from any other class ex: ClassName.method
phutchins has quit [Ping timeout: 260 seconds]
eat_multi has quit [Ping timeout: 240 seconds]
<deject3d> and what about the context of variables?
meatherly has joined #ruby
<deject3d> yes you can use ClassName.method() on a static method named 'method' in your example.. but you know why, right?
polly_wog has joined #ruby
<EmeraldExplorer> deject3d: because it is part of the class...
nateberkopec has joined #ruby
<EmeraldExplorer> deject3d: not an object
siaw has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 244 seconds]
pragmatism has joined #ruby
based_pdev_ has joined #ruby
blaxter has quit [Quit: foo]
<EmeraldExplorer> Also one last question, how do I quickly do many def objectName.methodName s without repeating objectName? I know I have it in my notes somewhere but I can't seem to find it :,(
Jackneill has joined #ruby
<pipework> EmeraldExplorer: You don't *need* the object name if you're in the context of the object, the object's class, or the object's eigenclass.
<pipework> Depending on where the method should go and what kind of object it is.
ruurd has quit [Read error: Connection reset by peer]
ngscheur1 has joined #ruby
barhum2013 has joined #ruby
Xeago has joined #ruby
ruurd has joined #ruby
`based_pdev` has quit [Ping timeout: 246 seconds]
spcmastertim has quit [Ping timeout: 240 seconds]
<deject3d> EmeraldExplorer yeah i wasn't paying attention to the convo, a "def self.whatever" is a lot like a static method in java
ngscheurich has quit [Ping timeout: 256 seconds]
bmurt has quit []
baweaver has quit [Remote host closed the connection]
spcmastertim has joined #ruby
<shevy> what does the name "static" method actually imply?
<shevy> EmeraldExplorer ruby core tends to use module_function()
<deject3d> only one instance exists
meatherly has quit []
<shevy> EmeraldExplorer look at the first example, run it in a .rb file, then you understand it: http://ruby-doc.org/core-2.2.0/Module.html#method-i-module_function
<shevy> for some strange reason, I prefer doing "def self." myself
ngscheur1 has quit [Ping timeout: 246 seconds]
rehat has joined #ruby
sanguisdex has joined #ruby
saddad has quit [Ping timeout: 244 seconds]
meatherly has joined #ruby
voltalio_ has joined #ruby
skweek has joined #ruby
voltalio has quit [Ping timeout: 240 seconds]
agent_meerkat has joined #ruby
<EmeraldExplorer> In ruby is it OK to use semicolons?
<pipework> sure, but most people don't unless they're doing a one-liner that requires it.
<apeiros> pipework: ; for one-liners is cheat :(
<EmeraldExplorer> But it's not like a good practice to include them, right?
Gnomethrower has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> EmeraldExplorer: no
<apeiros> not good practice. leave them away.
<pipework> apeiros: is true
<apeiros> and don't write code which uses ;
<shevy> EmeraldExplorer use them when you need them, which means 98% of the time you don't need them so you don't use them
<pipework> And even when you need them, consider writing better code.
<apeiros> shevy: if it's 2% of the time where you need them you have to revisit your coding style :-p
ngscheur1 has joined #ruby
<apeiros> should be more in the range of 0.002%
tuxero has quit [Ping timeout: 240 seconds]
<shevy> nah, I use it for short methods like
<shevy> p; x; f; n
<pipework> I use semicolons in irb, pry, and ruby -e
<apeiros> I think the only time I use them is for exception subclasses
<EmeraldExplorer> shevy: obfuscation :,(
<apeiros> ah well, pry is a different matter. there I use ; extensively.
<shevy> EmeraldExplorer hey... we have Kernel#p ... and http://apidock.com/ruby/Kernel/y
blackmesa has joined #ruby
<shevy> hmm the latter probably changed
<shevy> from syck to psych
<pipework> I've also rarely used them in procs for default_proc in hashes that were super short.
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
<pipework> But that's not a good reason
lulzmachine has joined #ruby
<shevy> EmeraldExplorer I actually don't use such short methods :)
HAL2328 has joined #ruby
HAL2328_ has joined #ruby
HAL2328_ has quit [Remote host closed the connection]
<shevy> except for p object
yfeldblum has quit [Ping timeout: 240 seconds]
evanjs has quit [Remote host closed the connection]
<pipework> s/object/method/
<pipework> Which is an object, a method object!
jas02 has quit [Ping timeout: 246 seconds]
broconne has joined #ruby
jas02 has joined #ruby
andyrs has joined #ruby
skade has joined #ruby
<shevy> pipemethod
<dfockler> the classic ruby Method object
eat_multi has joined #ruby
Musashi007 has quit [Quit: Musashi007]
* apeiros still sad that UnboundMethod#bind does not accept just any obj as argument
Igorshp has joined #ruby
tkuchiki has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
tuxero has joined #ruby
<dfockler> has to be on the same class huh?
<apeiros> or subclass, yes
sepp2k has quit [Quit: Leaving.]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler> Can't just slap methods onto classes willy nilly
<pipework> Neither willy nor nilly should involved in the decision making process here.
arup_r has joined #ruby
ndrei has joined #ruby
<broconne> I have been trying to solve an issue for a while now.. Googled high and low.. Looked at a lot of different alternatives (including omnibusing a gem w/ ruby just to get around it). But I feel like I must be missing something obvious.. I have a gem I made.. every time I run it.. I get a warning about unresolved specs because multiple versions of gems exist on a system (I think). Is there a way to get around the warning? if I bundle exec, it works fine.. But
<dfockler> broconne: that's what bundler is for
jas02 has quit [Ping timeout: 240 seconds]
spcmastertim has quit [Ping timeout: 240 seconds]
spider-mario has joined #ruby
<broconne> dfockler.. I get that.. I guess. but is there really know way to create a gem and have it just be something people can execute? Or is that why chef has appbundler, omnibus, etc?
nym has joined #ruby
<pipework> broconne: Sure! You just have to use bundler's ruby interface.
Pupeno has quit [Remote host closed the connection]
<pipework> As early as possible in the invocation.
<broconne> I mean, it does execute.. it just spits out a bunch of warnings that more than one gem exists.. kind of just want to shutup the warnings and have it pick one that matches my specs.
<broconne> pipework. what do you mean, just setting it to an exact version like appbundler does?
tkuchiki has quit [Ping timeout: 240 seconds]
<pipework> I don't know what appbundler is
<broconne> its how I guess chef gets around this problem.
Igorshp has quit [Ping timeout: 265 seconds]
<broconne> but it generates an executable with a locked down list of gems.
<dfockler> That's what your Gemfile.lock is for, so you have a set of dependent gems
<broconne> but the Gemfile.lock doesn't get installed w/ a gem right?
bmurt has joined #ruby
<dfockler> no
<broconne> like gem install doesn't generate a Gemfile.lock, right?
<pipework> broconne: You'd make your gem have dependencies in the gemspec.
<dfockler> ^
<broconne> pipework: I do..
<broconne> then I build a gem
jenrzzz has quit [Ping timeout: 264 seconds]
<pipework> broconne: If the gem is the app, the gem needs all the dependencies in the gemspec.
<broconne> then someone else runs the gem that happens to have two versions of a dependency isntalled (I don't care which one gets used). and they get a warning message.
<shevy> broconne normally a gem will just have a .gemspec, Gemfile* variants were introduced by bundler
<broconne> yep.. i have a gemspec
<pipework> broconne: When you say 'run the gem' do you mean that they call an executable that the gem ships with?
<broconne> pipeowrk: yes call the executable
<pipework> broconne: You can tab-complete nicks if your IRC client isn't terrible.
<broconne> and when I do.. I get this:
<broconne> WARN: Unresolved specs during Gem::Specification.reset:
<broconne> ohai (~> 8.0)
<broconne> but about 10 other gems listed
<shevy> how do you get that
<broconne> I run my gem executable
Macaveli has joined #ruby
<broconne> which is generated by rubygems (according to the comment)
<pipework> broconne: 'I run', as in direct invocation that looks like what?
<shevy> not sure that pipework meant that
<pipework> `my_gem_executable`?
<pipework> `bundle exec my_gem_executable`?
<broconne> my_gem_executable
renderful has quit [Remote host closed the connection]
<broconne> without bundle
<broconne> after the gem is insalled with "gem install my_gem"
Juanchito has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
<shevy> this should require a bin/my_gem_executable file
last_staff has quit [Quit: last_staff]
RegulationD has joined #ruby
<broconne> yes. I have my executable in there
<broconne> and rubygems then seems to generate another one for me.
<shevy> one with the shebang line changed I guess
<broconne> that does the load, etc.
tjohnson has quit [Quit: Connection closed for inactivity]
<broconne> mine doesn't have a shebang
<shevy> as far as I know, only the top line is changed, are you sure that this will do the load instead?
jackjackdripper has joined #ruby
<broconne> that is rubygems job I thought.
<broconne> no, it generated a whole new thing
<broconne> then does a load Gem.bin_path at hte bottom
<shevy> it does not know what it should load, that is what the lib/ files should do, not the bin/ files
cnm has joined #ruby
<shevy> huh... who added the Gem.bin_path thing
skade has quit [Quit: Computer has gone to sleep.]
<broconne> gem install I am pretty sure does
<broconne> that is why you specify your bin files in the gemspec
ta has joined #ruby
<shevy> I am pretty sure it does not
jackjackdripper has quit [Client Quit]
bodgix has quit [Ping timeout: 252 seconds]
<shevy> yes, in the .gemspec file you specify what is to be part of your .gem
jackjackdripper has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> but the bin/* files are or should just be commandline invocation variants
jenrzzz has joined #ruby
code_ has quit [Ping timeout: 260 seconds]
<broconne> ok.. so I lied.. I have a shebang in mine.. I do #!/usr/bin/env ruby
<broconne> then some requires
Macaveli has quit [Ping timeout: 268 seconds]
aldodelgado has quit [Quit: aldodelgado]
<broconne> then I start (it uses thor)
<broconne> but
<broconne> the one that gets installed on the ssytem
<broconne> in the path.. is purely generated by rubygems and just references mine.
<shevy> what does it actually "reference" and how?
<broconne> so
<broconne> not mine.. but look at that example
bodgix has joined #ruby
danoo_ has quit [Ping timeout: 256 seconds]
<broconne> where its ays 'this file was geneated by rubygems'
<broconne> that is exactly what I have (but the actual gem is different
pengin has quit [Remote host closed the connection]
`based_pdev` has joined #ruby
rnga has quit []
<shevy> hmm what is your gem and ruby version by the way?
<broconne> its not in the ruby gem repo.
<broconne> its in a a private repo
<shevy> ruby -v; gem -v
MeMoc has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<broconne> ruby -v; gem -v
<broconne> ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
<broconne> 2.4.4
code_ has joined #ruby
aldodelgado has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> very strange... I know that rubygem changes the shebang line, but that it also changes the content of a file....
<broconne> yeah, it generates its own thing.. I think to manage dependent gems, etc?
based_pdev_ has quit [Ping timeout: 255 seconds]
<shevy> don't think so, I have dependencies listed in .gemspec for my own gems and that has never happened to me (save for the shebang change)
Kitsunitchi has joined #ruby
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
<broconne> that link seems to indicate that: RubyGems installs special wrapper versions of executables included with gems.
<pipework> broconne: gem cleanup your_gem
nateberkopec has quit [Quit: Leaving...]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pipework> broconne: Also, that's many years old.
eat_multi has quit [Remote host closed the connection]
<broconne> chef gem cleanup does not resolve the issue
<pipework> chef?
youngbaks has quit [Ping timeout: 246 seconds]
jamesaxl|2 has joined #ruby
<broconne> sorry
<broconne> gem cleanup
<pipework> bundle clean --force
<pipework> Inside your gem then rebuild
jamesaxl|2 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
timonv has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
jamesaxl has joined #ruby
andyrs has joined #ruby
Coldblackice has joined #ruby
jas02 has joined #ruby
Kitsunitchi has left #ruby [#ruby]
karapetyan has joined #ruby
sepp2k has joined #ruby
platzhirsch has joined #ruby
scoot has quit [Remote host closed the connection]
<shevy> broconne the entry at http://2ndscale.com/rtomayko/2009/require-rubygems-antipattern is very old :)
<shevy> "When I use your library, deploy your app, or run your tests I may not want to use rubygems."
<shevy> "When you require 'rubygems' in your code, you remove my ability to make that decision."
<shevy> "I cannot unrequire rubygems, but you can not require it in the first place."
<shevy> :D
stryek has joined #ruby
nateberkopec has joined #ruby
wharr__ has joined #ruby
petricore has quit [Ping timeout: 268 seconds]
<wharr__> have yall used the ruby debugger on sublime with vagrant before?
dionysus69 has quit [Ping timeout: 260 seconds]
JDiPierro has joined #ruby
<apeiros> shevy: well, you still don't require 'rubygems' in your code :-p
arian0n has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
<broconne> shevy: Wasn't suggesting that the content in the blog was good advice.. was just posting to an example of the executable that ruby gems generates.
hobodave has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
<shevy> apeiros I can!!!
<apeiros> sure. but you shouldn't
<shevy> I don't :-)
msb_ has joined #ruby
<shevy> I am always trying to get rid of lines
renderful has joined #ruby
scoot has joined #ruby
codecop has quit [Remote host closed the connection]
drawesome has quit [Disconnected by services]
meatherly has quit [Ping timeout: 240 seconds]
matthew_ has joined #ruby
yqt has joined #ruby
matthew_ is now known as Guest98513
Guest98513 has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
jas02 has quit [Quit: jas02]
jmignault has quit [Ping timeout: 240 seconds]
iamvery has quit [Ping timeout: 252 seconds]
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
tuxero has quit [Quit: tuxero]
swgillespie has joined #ruby
ValicekB has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
bruno- has joined #ruby
iamvery has joined #ruby
jas02 has joined #ruby
krisquigley has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
baweaver has joined #ruby
Torrieri has joined #ruby
leafybasil has joined #ruby
last_staff has joined #ruby
iamvery has quit [Ping timeout: 250 seconds]
danoo_ has joined #ruby
cnm has quit [Quit: KVIrc 4.3.2 Aria http://www.kvirc.net/]
jas02 has quit [Quit: jas02]
<zenspider> shevy: Gem.bin_path is really old.
<zenspider> what's the actual problem?
krisquigley has quit [Ping timeout: 272 seconds]
wallerdev has quit [Quit: wallerdev]
symm- has joined #ruby
elperdut has joined #ruby
<shevy> broconne had some problem
<shevy> Not sure whether he did manage to resolve it
shinnya has quit [Ping timeout: 265 seconds]
startupality has joined #ruby
sship_ has joined #ruby
krz has quit [Quit: WeeChat 1.2]
parduse has joined #ruby
kirun has joined #ruby
<sship_> I'm on Ubuntu. When installing gems, should I use 'gem install xyz' or 'sudo gem install xyz'? I have Ruby installed system-wide. I am not using RVM or anything.
iamvery has joined #ruby
<tubbo> sship_: does `gem install xyz` work?
SumoBoy has joined #ruby
<zenspider> if you're installing the gem to be used system-wide, use sudo. If not, flip a coin
<havenwood> sship_: The default setup with the Ubuntu package manager Ruby is system-wide gems, so sudo.
<sship_> tubbo: I didn't try it in case something goes wrong. Wanted to ask here first.
petricore has joined #ruby
<dfockler> Is there a way to call a specific method in a ruby script from the command line?
<adaedra> ruby -e ?
<dfockler> oh yeah adaedra thanks
fantazo has joined #ruby
<sship_> When I install a gem to be used system-wide...will it conflict with other gems if I decide to use RVM in the future?
<havenwood> dfockler: ruby -ryour_gem_here -e "YourGemHere.method_here"
nfk has joined #ruby
<adaedra> sship_: rvm will have its own gem directory.
<havenwood> sship_: Whether you use RVM or chruby or whatnot they don't care about your system Ruby.
MTGeni has joined #ruby
mary5030 has quit [Remote host closed the connection]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<sship_> So I could have a gem system-wide and I could have the same gem in rvm's gem directory with no confliction, correct?
mary5030 has joined #ruby
hobodave has joined #ruby
<havenwood> sship_: With your system Ruby you can also install gems in the user home directory instead of the system GEM_HOME like `gem install example --user-install` or more set it permanently for the user in a gemrc file.
<havenwood> sship_: Yeah, sure, that's no problem.
scoot has quit []
bmurt has quit []
momomomomo_ has joined #ruby
karapetyan has joined #ruby
<sship_> havenwood: Alright. Thanks!
v0n has quit [Ping timeout: 240 seconds]
last_staff has quit [Quit: last_staff]
symm- has quit [Ping timeout: 252 seconds]
momomomomo has quit [Ping timeout: 265 seconds]
momomomomo_ is now known as momomomomo
wallerdev has joined #ruby
mary5030 has quit [Ping timeout: 265 seconds]
Mattick has joined #ruby
jgt1 has quit [Ping timeout: 240 seconds]
sship_ has quit [Quit: Page closed]
SylarRuby has quit []
chipotle has quit [Read error: Connection reset by peer]
hal_9000_ has quit [Ping timeout: 240 seconds]
hal_9000__ has joined #ruby
chipotle has joined #ruby
tkuchiki has joined #ruby
<zenspider> drbrain: oi. my gem cert expired? does that mean I need to re-publish everything ever published with it? or?
troyready has quit [Quit: Leaving]
znz_jp has quit [Ping timeout: 246 seconds]
<drbrain> this is the shitty unimplemented part of gem certs, "yes"
Igorshp has joined #ruby
<drbrain> but you can't because rubygems doesn't allow re-upload
pen has joined #ruby
<drbrain> alternate solution, make your cert lifetime something ridiculous like 10 years
Soda has quit [Remote host closed the connection]
<drbrain> or make a CA cert that has a ridiculous lifetime, then a child cert with a short lifetime you use for signing
<drbrain> then publish the CA cert
v0n has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
parduse has quit []
freerobby has quit [Quit: Leaving.]
syath has quit [Quit: WeeChat 1.2]
freerobby has joined #ruby
evanjs has joined #ruby
<zenspider> mmmm... you think I understand that shit. :P
wharr__ has quit [Read error: Connection reset by peer]
<drbrain> nobody does
tkuchiki has quit [Ping timeout: 264 seconds]
<drbrain>
Igorshp has quit [Ping timeout: 246 seconds]
<zenspider> well fuck. republishing 90+ gems because of certs pretty much means: stop signing gems
<zenspider> because that isn't worth it
Mattick has quit []
einarj has joined #ruby
<drbrain> convince people that want signed gems to pick up the TUF work since that's secure over the transport instead of inside the gem
Mattick has joined #ruby
<zenspider> gem cert --help doesn't mention anything about expiry
<dfockler> write a gem to help publish the gems
momomomomo has quit [Quit: momomomomo]
Pupeno has joined #ruby
Mattick has quit [Remote host closed the connection]
<zenspider> already did that. still have to do 90 revs
<zenspider> for nothing
allomov has quit [Remote host closed the connection]
<drbrain> if you don't use the strictest install setting rubygems won't check timestamps
agent_meerkat has quit [Ping timeout: 246 seconds]
benlieb has joined #ruby
s2013 has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
hamilto-nyan has joined #ruby
x-light has joined #ruby
<zenspider> how do I test a cert file?
zapata has quit [Ping timeout: 240 seconds]
ht__ has quit [Remote host closed the connection]
<zenspider> looks like it moved the expired one to the side and generated a new one
troyready has joined #ruby
<zenspider> also looks like I dealt with cert shit in june. this is getting stupid
frmendes has joined #ruby
voltalio_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has joined #ruby
wallerdev has quit [Quit: wallerdev]
bruno- has quit [Ping timeout: 264 seconds]
rehat has quit [Remote host closed the connection]
VeryBewitching has joined #ruby
wallerdev has joined #ruby
<dfockler> to be fair, most of us don't have 90+ gems :P
bruno- has joined #ruby
momomomomo has joined #ruby
einarj has quit [Remote host closed the connection]
duggiefresh has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
startupality has quit [Quit: startupality]
x-light has quit [Remote host closed the connection]
<zenspider> dfockler: and? what's your point?
<dfockler> I don't know
parduse has joined #ruby
platzhirsch has left #ruby [#ruby]
pen has quit [Remote host closed the connection]
wallerdev has quit [Client Quit]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> dfockler: then... good job contributing to the signal
pen has joined #ruby
<dfockler> :| sorry
skade has joined #ruby
startupality has joined #ruby
workmad3 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
gustav_ has joined #ruby
* baweaver counts his gems
<baweaver> 20, need more gems...
<shevy> push it, push it real good
allomov has joined #ruby
<gustav_> Does anyone know of a place on the web to discuss and get input on implementation tactics?
swgillespie has joined #ruby
<gustav_> For more open-ended questions than stack overflow allows..
fantazo has quit [Quit: Verlassend]
devoldmx has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
naftilos76 has joined #ruby
zapata has joined #ruby
krisquigley has joined #ruby
naftilos76 has quit [Client Quit]
havenwood has quit [Ping timeout: 250 seconds]
jdawgaz has joined #ruby
havenwood has joined #ruby
duggiefresh has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
Xiti has quit [Quit: Xiti]
devoldmx has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby
pen has quit [Remote host closed the connection]
MTGeni has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pen has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
krisquigley has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
tomphp has joined #ruby
<zenspider> gustav_: some sort of realtime chat forum, perhaps?
drewvanstone has quit [Ping timeout: 240 seconds]
<gustav_> zenspider: sure ;). but web would be nice - more visible etc
<zenspider> gustav_: https://webchat.freenode.net
* baweaver rolls laughing
m8 has joined #ruby
vdamewood has joined #ruby
tangentstorm has quit [Ping timeout: 250 seconds]
<baweaver> There are over 1000 users here y'know
<baweaver> we just don't talk all the time.
pragmatism has joined #ruby
pengin has joined #ruby
<dfockler> So what's the point of a self-signed cert?
bazbing80 has quit [Ping timeout: 272 seconds]
Jackneill has quit [Ping timeout: 265 seconds]
nettoweb has joined #ruby
<shevy> see, I have not even reached that point, I don't even know why I need a cert
andyrs has quit [Quit: I'm leaving now, bye.]
<baweaver> You'd be fine getting a band-aid from a random person claiming medical experience, but probably not with surgery without a validated doctor.
cmisenas has joined #ruby
TomyLobo has quit [Ping timeout: 264 seconds]
<shevy> I don't trust any doctors anyway!
<baweaver> in some more important cases (Devise, CanCanCan, Pundit) you want to verify the integrity of the gem to a stricter level than you would with basic functionality helpers
einarj has joined #ruby
skade has quit [Read error: Connection reset by peer]
einarj has quit [Remote host closed the connection]
<dfockler> It just says the gem code was written by the who the cert says it was written by
Torrieri has quit [Quit: Be back later ...]
<dfockler> s/the who/the person who
<dfockler> or who ever the private key belongs to
Torrieri has joined #ruby
Torrieri has quit [Read error: Connection reset by peer]
hobodave has quit [Quit: Computer has gone to sleep.]
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
nzst has quit [Ping timeout: 260 seconds]
Torrieri has quit [Client Quit]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
renderful has quit [Remote host closed the connection]
Torrieri has joined #ruby
baweaver has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 244 seconds]
Voker57 has quit [Read error: Connection reset by peer]
jimster has joined #ruby
<jimster> will --disable-install-rdoc omit the rdoc gem from rubycore?
n_blownapart has joined #ruby
<zenspider> mmm... don't think so, but not actually sure what you're referring to
<jimster> it's a configure option when building ruby
bazbing80 has joined #ruby
mary5030 has joined #ruby
<adaedra> jimster: apparently not
<jimster> the description reads like it results in skipping rdoc creation, and rdoc gem is included. but I hoped to confirm here.
proq has quit [Remote host closed the connection]
Torrieri has quit [Ping timeout: 250 seconds]
michaeldeol has joined #ruby
<zenspider> jimster: "do not install neither rdoc indexes nor C API documents during install"
baweaver has joined #ruby
siaw has quit [Quit: siaw]
<zenspider> I'm guessing it has no effect on the installation of the gem
<jimster> yea, that's what I was thinking as well
<zenspider> I'll go a step further... I don't think rdoc IS installed as a gem
HAL2328 has quit [Quit: Leaving]
<zenspider> not a real one, at least
<adaedra> jimster: my ruby is installed with that option, and I have rdoc.
<jimster> that makes sense. I can't remove it
axl_ has left #ruby [#ruby]
drewvanstone has joined #ruby
hobodave has joined #ruby
bigmac has joined #ruby
<jimster> thanks guys
patientj has quit [Quit: WeeChat 1.0.1]
otacon- has joined #ruby
workmad3 has joined #ruby
michael_mbp has quit [Excess Flood]
CrazyEddy has quit [Ping timeout: 252 seconds]
skade has joined #ruby
vjdhama has quit [Remote host closed the connection]
benlovell has joined #ruby
jobewan has joined #ruby
wallerdev has quit [Quit: wallerdev]
workmad3 has quit [Ping timeout: 256 seconds]
arup_r has quit [Quit: Leaving]
nofxx has joined #ruby
skade has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
momomomomo has joined #ruby
<nofxx> Some change in load path or something in gem 2.4.8? Can't find my engines anymore...
<nofxx> don't even remeber updating rubygems =/
wallerdev has joined #ruby
allomov has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 250 seconds]
momomomomo has quit [Client Quit]
wallerdev has quit [Client Quit]
zenguy_pc has quit [Read error: Connection reset by peer]
allomov has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
meatherly has joined #ruby
wallerdev has joined #ruby
allomov has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
michael_mbp has quit [Excess Flood]
jordanm has quit [Remote host closed the connection]
jacksonmills has joined #ruby
jordanm has joined #ruby
pusewicz has joined #ruby
Xeago has joined #ruby
<havenwood> nofxx: If you update your Ruby you get the RubyGems it ships with.
JDiPierro has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
CrazyEddy has quit [Changing host]
CrazyEddy has joined #ruby
<zenspider> anyone running Fedora 23? https://github.com/seattlerb/hoe/issues/69
<zenspider> I can't repro this. tenderlove can't repro this... no clue
Musashi007 has joined #ruby
michael_mbp has joined #ruby
baweaver has quit [Remote host closed the connection]
mondayrain has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
p0wn3d__ has quit [Ping timeout: 240 seconds]
nzst has joined #ruby
diegoviola has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
Pupeno_ has joined #ruby
asxbr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
momomomomo has joined #ruby
renderfu_ has joined #ruby
momomomomo has quit [Client Quit]
spcmastertim has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 250 seconds]
pengin has quit []
zenguy_pc has joined #ruby
michael_mbp has quit [Excess Flood]
einarj has joined #ruby
renderfu_ has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
decoponio has quit [Quit: Leaving...]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenn has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
einarj has quit [Remote host closed the connection]
swgillespie has joined #ruby
opensource_ninja has joined #ruby
wallerdev has joined #ruby
deject3d has quit [Quit: Computer has gone to sleep.]
michael_mbp has joined #ruby
<mwlang> Trying to learn a little Ruby here… https://gist.github.com/mwlang/29e7899e5e971985b39d#file-foo-rb-L37-L39 How do I get “foobar” to be accessible to the &block?
<darix> zenspider: maybe ask for filesystem (as it was suspected)
<mwlang> my goal is to have foo X do |Y| where both X and Y are optionally supplied by the developer.
FernandoBasso has joined #ruby
<shevy> mwlang does your code work?
<bricker> zenspider: have him run it with $DEBUG
<bricker> maybe the clean plugin is failing
<mwlang> shevy: breaks on the highlighted lines.
<mwlang> the output.txt is the result of running the code.
<apeiros> mwlang: by dropping |foobar|
<apeiros> you're shadowing the outer variable
skweek has joined #ruby
<apeiros> and your foo method doesn't yield anything, which is why it's nil
solocshaw has joined #ruby
<mwlang> apeiros: well, I was messing around at that point. It’s my intent that when |foobar| is not supplied, I will supply a default.
solocshaw has quit [Remote host closed the connection]
<havenn> zenspider: Fedora 23 all green for me: ................................
solocshaw has joined #ruby
<apeiros> mwlang: that doesn't make much sense to me.
borodin has joined #ruby
<apeiros> mwlang: your foo method is responsible for yielding values
<apeiros> unless foo knows about foobar, it can't supply it
<apeiros> and right now it does not know about foobar.
rodferso1 has joined #ruby
rodfersou has quit [Ping timeout: 240 seconds]
<mwlang> apeiros: let’s assume lines 1 - 6 don’t exist.
<zenspider> havenn: can you comment?
platzhirsch has joined #ruby
<havenn> zenspider: will do
<mwlang> I just want to know how I can detect I called foo with |foobar|
<zenspider> thanks
drewvanstone has quit [Ping timeout: 252 seconds]
<mwlang> vs. just calling “foo”
<apeiros> mwlang: block_given? tells you whether a block was supplied
<apeiros> number of params the block takes would be block.arity. but using that is brittle at best.
<apeiros> (and block.arity of course assumes &block in your method def)
<mwlang> apeiros: hmmm…what makes that brittle?
<zenspider> I'm... not sure what mwlang is asking still
<apeiros> mwlang: thousand and one way you'll go wrong with it
ndrei has quit [Ping timeout: 265 seconds]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
but3k4 has joined #ruby
<shevy> mwlang think of {} blocks are extra argument; you can use instance_eval and class_eval to do fancy stuff until you no longer understand what is going on (add method_missing for the extra-win... ok you already are not sure what is going on there :D)
<apeiros> mwlang: also such kind of behavior is rather unexpected and will almost certainly confuse people using your code.
michael_mbp has quit [Excess Flood]
j4cknewt has quit [Remote host closed the connection]
<shevy> Ruby tries to lure you with its wicked good looks but the cake is a lie.
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<zenspider> mwlang: do you understand what |foobar| is in your code sample?
<mwlang> heh…I confess I’m just trying to understand AA’s DSL better and how the heck they implemented it.
gurix has quit [Quit: gurix]
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<zenspider> I'm still not sure these ppl are answering your actual problem
<mwlang> zenspider: that’s precisely what I’m trying to understand.
<zenspider> mwlang: you're not asking good questions. do you understand the exception that was raised?
<zenspider> bring up irb/pry and try: nil.blah
<mwlang> zenspider: I understand why, yes.
n008f4g_ has quit [Ping timeout: 240 seconds]
michael_mbp has joined #ruby
<zenspider> I'm asking more what, then why, at this point
<zenspider> you got a NoMethodError
nettoweb has joined #ruby
<zenspider> that's important to pay attention to
<mwlang> zenspider: hold on. Let me come back with better questions.
<mwlang> googling block and arity is getting me documentation I was seeking.
but3k4 has quit [Ping timeout: 250 seconds]
<zenspider> I'm not sure it is what you should be looking at at this point
nhhagen has joined #ruby
<mwlang> zenspider: here’s what I’m trying to understand: Active Admin lets you define a column three ways:
<mwlang> column :foo
<mwlang> column :foo do |obj|; obj.do_something; end
<mwlang> column do |obj|; obj.do_something; end
<zenspider> ie don't try to tune an engine until you understand wheels and know how to inflate them
<mwlang> all I want to understand is how that DSL was implemented.
<mwlang> zenspider: ie. take an engine apart in order to understand how it works.
<mwlang> :-)
broconne has quit [Quit: Leaving.]
cmisenas has quit [Ping timeout: 246 seconds]
<zenspider> my point: understand the basics before you get to advanced shit.
<shevy> the method must exist
<zenspider> I don't think you understand the absolute basics of blocks yet
benlieb has quit [Quit: benlieb]
ekinoxx has joined #ruby
jgt1 has joined #ruby
Aswebb__ has quit []
prestorium has quit [Quit: Leaving]
iamvery has joined #ruby
polysics has joined #ruby
baweaver has joined #ruby
<apeiros> mwlang: that one involves zero magic and even less so block arity checking.
dorei has quit []
radgeRayden has joined #ruby
kobain has joined #ruby
nhhagen has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xiti has joined #ruby
freerobby has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
pusewicz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nzst has quit [Ping timeout: 264 seconds]
baweaver has quit [Ping timeout: 255 seconds]
lulzmachine has quit [Quit: Connection closed for inactivity]
dcalan has joined #ruby
duggiefresh has quit []
havenn is now known as havenwood
minimalism has joined #ruby
JDiPierro has joined #ruby
polly_wog has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 272 seconds]
Jardayn has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
spider-mario has quit [Remote host closed the connection]
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
gusTester has left #ruby [#ruby]
DoubleMalt has joined #ruby
karapetyan has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 264 seconds]
beauby has joined #ruby
deol has joined #ruby
rodferso1 has quit [Quit: leaving]
rodfersou has joined #ruby
Rickmasta has joined #ruby
opensource_ninj1 has joined #ruby
victortyau has quit [Quit: Leaving]
workmad3 has joined #ruby
mondayrain has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Ping timeout: 240 seconds]
<mwlang> apeiros and zenspider This is all I was trying to learn: https://gist.github.com/mwlang/29e7899e5e971985b39d
zenguy_pc has joined #ruby
opensource_ninja has quit [Ping timeout: 240 seconds]
<mwlang> sorry my gist took everyone down the wrong track and confusing everyone.
<apeiros> I don't think that's what your AA example does. at all.
<mwlang> the block.arity comment was all I needed to know about.
djbkd has joined #ruby
<mwlang> apeiros: AA is using defaults when they’re not supplied.
tenseiten has quit [Read error: Connection reset by peer]
<mwlang> I just wondered, how the heck?
<apeiros> your example doesn't show anything defaulty
<zenspider> yeah. I suspect you're missing the point
Xeago has joined #ruby
<apeiros> it shows a method yielding a value to a block.
jgt2 has joined #ruby
<zenspider> your code sample is confused how you're dealing with arity
<apeiros> that AA thingy seems to be mostly just: `def column(name=nil); yield(noideawhat) if block_given?; end`
mondayrain has joined #ruby
<apeiros> that is: it allows a first arg to be passed or omitted (arg with default value)
seitensei has joined #ruby
<zenspider> def column name = :default; yield some_obj if block_given?; end
<apeiros> and it allows a block to be passed or omitted (yield if block_given?)
<zenspider> that's all
dcalan has quit [Ping timeout: 250 seconds]
<mwlang> but it also allows variables to be passed into the block to be used.
bigmac has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
<mwlang> and that’s optionally supplied.
ducklobster has quit [Ping timeout: 250 seconds]
<apeiros> then your example missed the point of exemplifying your point
Technodrome has quit [Quit: Technodrome]
jenrzzz_ has joined #ruby
gix has quit [Ping timeout: 240 seconds]
KervyN has quit [Ping timeout: 240 seconds]
ishahnaz has joined #ruby
<mwlang> apeiros: yes, I realize that in hindsight
ishahnaz has quit [Client Quit]
jgt1 has quit [Ping timeout: 250 seconds]
<apeiros> your AA example
<apeiros> not your code
xMopxShell has quit [Ping timeout: 240 seconds]
lupine has left #ruby [#ruby]
lolmaus has quit [Ping timeout: 240 seconds]
<apeiros> and I'm still not convinced block arity is what you want or need.
ekinoxx has quit [Ping timeout: 268 seconds]
lolmaus has joined #ruby
<apeiros> and *even if*, it's horrible code. don't do that. seriously.
workmad3 has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
<mwlang> apeiros: point taken
KervyN has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
xMopxShell has joined #ruby
<zenspider> mwlang: it passes args in both cases, regardless of arity
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<mwlang> for me, this was a thought experiment. My goal was to see if I could make both the arguments and the block arguments (or whatever you call the X and Y of “foo X do |Y|”) optional.
<mwlang> it’s not really something I want to put into production code, but it was a good learning exercise, at least for me.
gix has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
Xeago has quit [Ping timeout: 246 seconds]
<mwlang> zenspider: I see now what you’re saying! d-oh
devoldmx has joined #ruby
dasher00 has quit [Ping timeout: 250 seconds]
siaw has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.3]
bkulbida has quit [Ping timeout: 256 seconds]
jdawgaz has quit [Max SendQ exceeded]
kies^ has quit [Ping timeout: 260 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
znz_jp has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
benlieb has joined #ruby
tkuchiki has joined #ruby
polysics has quit []
<zenspider> Are there any 1.8 folks left? Like, with actual numbers?
<zenspider> drbrain: ^^ ?
ekinoxx has joined #ruby
ekinoxx has quit [Max SendQ exceeded]
benlieb has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
drewvanstone has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
ngscheur1 has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 255 seconds]
MTGeni has joined #ruby
skweek has quit [Quit: Leaving]
drewvanstone has quit [Ping timeout: 244 seconds]
hinbody has quit [Quit: leaving]
pontiki has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hashrocket has quit [Quit: Connection closed for inactivity]
m8 has quit [Quit: Sto andando via]
<darix> zenspider: many of the enterprise distros still support 1.8
<darix> and actually will have to for a few more years
allcentury has joined #ruby
<darix> that reminds me i have to writeup the bug report for rubygems and stdlib
scoot has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
benlovell has joined #ruby
spcmastertim has quit [Remote host closed the connection]
<shevy> the land of the evil
willywos has quit [Ping timeout: 252 seconds]
<drbrain> zenspider: I stopped bugging Evan for numbers
<miah> enterprise distros are stuck with backporting those fixes to ruby sadly. they made their bed, now they have to sleep in it.
banjara1 has joined #ruby
<darix> miah: we would happily upgrade if any newer ruby would have been a drop in replacement :)
<darix> trust me
siaw has left #ruby [#ruby]
allcentury has quit [Ping timeout: 246 seconds]
<miah> upgrade the distro =)
<darix> miah: sure done that.
dasher00 has joined #ruby
<darix> but you know ... rhel/sles have like 10+year lifecycle now
<miah> ya, but the versions with 1.8 are almost EOL
GnuYawk has quit [Remote host closed the connection]
<darix> yeah
<darix> in 4-5years they are ;)
<miah> redhats fault
banjara has quit [Ping timeout: 240 seconds]
<darix> miah: for sles12 we set up the packaging to easily allow multiple ruby versions
<miah> we've just stopped using the system ruby entirely
<miah> cool
benlovell has quit [Ping timeout: 252 seconds]
<darix> miah: if you keep maintaining the non system ruby it is all fine.
<miah> during our packer/ami build we put chruby and our compiled rubies in place. now we're stuck supporting the versions of ruby on our systems, but at least we're not stuck with 1.8.7.
<miah> infrastructure as code to the rescue =)
params has joined #ruby
<params> hello everyone :)
<miah> hi
<params> can you help me with a quick question?
bronson has quit [Remote host closed the connection]
<miah> ask the question
<params> I have a method like: .permit(:city, :country, :zip_code, :apt_number)
<params> I want to pass the args as an array
<params> what's the best way to do that?
<shevy> no you don't have a method like this
<darix> params: why?
<params> i.e. I want something like args = %i(city country zip_code apt_number)
<params> and be able to call .permit(args)
<shevy> use *
<darix> .permit(*args)
<params> ah, does that unzip the array?
<params> that's perfect
<params> that's a lot!
<params> ;D
<params> thanks a lot*
mleung has joined #ruby
jenrzzz has joined #ruby
siaw_ has joined #ruby
scoot has quit [Remote host closed the connection]
tmtwd has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<zenspider> darix: I can always say that linux distros stuck on ruby 1.8 are stuck with older versions of minitest (or whatever). they stuck themselves. They don't get to stop upgrading some things and upgrade all the gems and expect it to work forever
<zenspider> *%w[thanks a lot]
<darix> zenspider: latest minitest doesnt work on 1.8 anymore?:p
<zenspider> it does
<zenspider> but I have a PR I like that'll require me to drop 1.8
<shevy> \o/
<darix> all that discrimination against 1.8!
jenrzzz_ has quit [Ping timeout: 265 seconds]
<darix> zenspider: if it makes you feel better many projects broke compat before you :)
<shevy> 1.8 was cool but it is on life support!
MeMoc has quit [Quit: Connection closed for inactivity]
<miah> 1.8.7 has been EOL for more than a year at this point, its suprising anything still works with it
<havenwood> shevy: Life support is for the living.
Igorshp has joined #ruby
dopamean_ has quit [Ping timeout: 244 seconds]
minimalism has quit [Quit: leaving]
minimalism has joined #ruby
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
petricore has quit [Ping timeout: 264 seconds]
<shevy> we can keep it alive!!!
Igorshp has quit [Ping timeout: 240 seconds]
<havenwood> shevy: We shan't!
dasher00 has quit [Ping timeout: 272 seconds]
mondayrain has quit [Ping timeout: 250 seconds]
<beauby> 1.9.3 has been EOL for almost a year
hobodave has quit [Quit: Computer has gone to sleep.]
<shevy> we can keep that one alive as well
RegulationD has quit [Remote host closed the connection]
<havenwood> Feb 24 isn't too far away now.
<eam> can someone help me with an issue in 1.6
<havenwood> Then we'll be in the era of "semantically versioned" Ruby.
<havenwood> 155 days to go.
CloCkWeRX has joined #ruby
<miah> eam: trolololol
<shevy> he likes to align from top to bottom at the "cp >>" :>
<shevy> eam I wanna try 1.6 to see how it was
jacksonmills has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
CpuID has joined #ruby
<eam> it wasn't great
<darix> try 1.4 for the real kick
ebragapa_ has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
<havenwood> I'm curious about this JIT that IBM is promising for Ruby. :O
polly_wog has joined #ruby
<chrisseaton> did you see the performance results though? 2-3x
cschneid_ has quit [Remote host closed the connection]
<dfockler> Is it built in C?
<havenwood> Aha, interesting.
devgiant has joined #ruby
<chrisseaton> it's in C++ i presume
nofxx has quit [Ping timeout: 252 seconds]
rodferso1 has joined #ruby
<havenwood> darix: Ah, I hadn't seen that. Thanks for the link.
VeryBewitching has quit [Quit: Konversation terminated!]
platzhirsch has left #ruby [#ruby]
<chrisseaton> in my humble opinion they are making the same mistake as every other implementation of Ruby - they are optimising control flow and basic operations like ivars, instead of the core library where Ruby programs really spend their time
nofxx has joined #ruby
<dfockler> what kinds of things make ruby 'slow'?
<darix> chrisseaton: but if you optimize the basics everything will be faster!
<darix> i liked Aaron's talks on optimizing rails, rubygems and bundler^^
drewvanstone has joined #ruby
chrisja has quit [Quit: leaving]
rodfersou has quit [Ping timeout: 246 seconds]
<dfockler> but it doesn't make things that much faster
<shevy> dfockler mutable strings!
<havenwood> darix: Here's a very interesting one if you haven't seen it yet: http://confreaks.tv/videos/rubyconf2014-deoptimizing-ruby
dasher00 has joined #ruby
<dfockler> I'd imagine speeding up object allocation would be more important than 'if' branching or something
kirun has quit [Quit: Client exiting]
snockerton has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
sanjayu has joined #ruby
agent_meerkat has joined #ruby
<chrisseaton> darix: unfortunately in my experience that just isn't true - it's like Amdahl's law - even if you make method calls, ifs, local variables etc infinitely fast, an MRI based implementation would be slow as their statically compiled C core library implementation is slow
JDiPierro has quit [Remote host closed the connection]
<chrisseaton> dfockler: *removing* object allocation is what's key
<darix> chrisseaton: my reply to you was sarcasm. sorry :)
<chrisseaton> ah sorry :)
devgiant has quit [Quit: Leaving]
<dfockler> chrisseaton: reading through your article now :)
EasyCo has joined #ruby
<mwlang> not allocating objects that are ultimately not used speeds up things considerably. https://github.com/rails/rails/pull/21057
circ-user-dLt7c has quit [Remote host closed the connection]
<chrisseaton> mwlang: right, and if the VM can not allocate them for you, even if they look like they're allocated in the source code, that's the silver bullet
ponga has joined #ruby
Pupeno_ has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
Asher has joined #ruby
CloCkWeRX has left #ruby [#ruby]
scoot has joined #ruby
bigmac has quit [Ping timeout: 264 seconds]
<mwlang> chrisseaton: good point. yet another perk of using interpreted languages over compiled ones. You don’t think about garbage collection and you don’t think about heap allocation, either.
devoldmx has quit [Ping timeout: 240 seconds]
meatherly has quit []
nofxx has quit [Ping timeout: 260 seconds]
<pipework> But it's fun to be able to when it matters!
mattprelude has joined #ruby
<pipework> Though I haven't really gotten as intimately familiar with chrisseaton's awesome work as I've been trying to.
devgiant has joined #ruby
nofxx has joined #ruby
devgiant has quit [Remote host closed the connection]
petricore has joined #ruby
otacon- has quit [Ping timeout: 250 seconds]
fersur3 has joined #ruby
<fersur3> Is there a way to set up a "full ruby environment" in $HOME/ ?
maletor has joined #ruby
finisherr has joined #ruby
<shevy> fersur3 just compile ruby there
<finisherr> Does anyone know where I can get a list of all of the options for rvmrc off hand?
s00pcan has quit [Quit: Lost terminal]
<pipework> fersur3: ruby-install
<pipework> chruby and ruby-install
yfeldblum has quit [Ping timeout: 240 seconds]
<pipework> finisherr: rvmrc's are just files that are essentially exec'd if they're trusted.
<pipework> last I used rvm that is
bigmac has joined #ruby
<finisherr> I know there are some options though
<finisherr> like rvm_install_on_use_flag=1
<finisherr> rvm_gemset_create_on_use_flag=1
siaw_ has quit [Ping timeout: 265 seconds]
siaw has joined #ruby
iateadonut has joined #ruby
petricore has quit [Ping timeout: 244 seconds]
arcanez has left #ruby [#ruby]
<finisherr> I’td be great to know what environment variables are accessible to me
jamesaxl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<finisherr> and what they do
<finisherr> having a hard time with the docs
michael_mbp has quit [Excess Flood]
<pipework> finisherr: #rvm is a thing. Why not just use ruby-install?
<finisherr> ahh, i guess I could try that channel
michael_mbp has joined #ruby
<pipework> It's small, does the least amount of work necessary to do the job, and is easy enough to read the whole source in a single sitting.
banjara has joined #ruby
whippythellama has quit [Quit: WeeChat 1.3]
BTRE has quit [Remote host closed the connection]
banjara1 has quit [Ping timeout: 240 seconds]
KnownSyntax_ has joined #ruby
<finisherr> I think there was a want for gemsets
KnownSyntax has quit [Read error: Connection reset by peer]
<finisherr> and lots of folks use rvm already, don’t wanna push folks out of their tools
tangentstorm has joined #ruby
mary5030 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
VeryBewitching has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
polly_wog has quit [Read error: Connection reset by peer]
araujo_ has joined #ruby
SumoBoy has left #ruby [#ruby]
polly_wog has joined #ruby
araujo has quit [Ping timeout: 265 seconds]
BTRE has joined #ruby
freerobby has quit [Quit: Leaving.]
willywos has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
startupality has quit [Quit: startupality]
nzst has joined #ruby
petricore has joined #ruby
phutchins has joined #ruby
ebragaparah has joined #ruby
swgillespie has joined #ruby
jobewan has quit [Quit: Leaving]
jgt2 has quit [Ping timeout: 264 seconds]
Liothen- has joined #ruby
casadei has quit [Remote host closed the connection]
bronson has joined #ruby
nzst has quit [Ping timeout: 240 seconds]
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen- has quit [Client Quit]
dopie has quit [Quit: This computer has gone to sleep]
Liothen has joined #ruby
weemsledeux has joined #ruby
michaeldeol has joined #ruby
Musashi007 has quit [Quit: Musashi007]
dfockler has quit [Remote host closed the connection]
polly_wog has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 250 seconds]
Bish_ is now known as Bish
workmad3 has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quazimodo has joined #ruby
havenwood has quit [Ping timeout: 265 seconds]
Igorshp has joined #ruby
otacon- has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<EasyCo> Hey team, given the scenario where you have the following: Vehicle::Car.new(some_attrs). But you also have a wrapper/factory method which is part of the advertised public API: Vehicle.car(some_attrs). The latter does nothing special, it just proxies the values to Vehicle::Car.new(). Would you write test coverages for both ways of instantiating a car or just
<EasyCo> one of them?
rcvalle has quit [Quit: rcvalle]
Igorshp has quit [Ping timeout: 250 seconds]
<beauby> EasyCo: I'd write a test that ensures the forwarding, and then test the constructor extensively
symbol has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
jimster has quit [Ping timeout: 252 seconds]
Xiti has quit [Quit: Xiti]
finisherr has quit [Quit: finisherr]
pen has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 260 seconds]
apt-get has quit [Ping timeout: 255 seconds]