quintasan_ has quit [Quit: No Ping reply in 180 seconds.]
<Tasi>
hy guys! I have a question. I was ruby programmer few years ago, but I don't follow the features of the new versions recently. I see, the Ruby introduce the RBS as a file format for type declarations. My question is the following: Can I write my ruby code and the type declarations togeather in common file?
quintasan has joined #ruby
<leah2>
afaiu no
<adam12>
Tasi: https://github.com/AaronC81/sord might work, but you're not writing RBS signatures directly at that point, but rather YARD doctags.
<Tasi>
adam12, woow, sounds good
axisys has joined #ruby
taupiqueur has quit [Quit: taupiqueur]
<wand>
adam12 and mooff, thanks for the links. I'll look at queue objects and reactors
<axisys>
how do I change this 'Foo' => 'true', in my rb file to make sure it is true only when stage.equal? not 'beta' ?
<adam12>
wand: I thought you were using threads when I suggested Queue. I still think a proper Queue should be used but mooff was right that it wont' work across processes. There's probably a million solutions to this, but one option is Rinda.
<axisys>
if not stage.equal? 'beta' 'Foo' => 'true' will work?
<adam12>
axisys: Can you show more code? Your question isn't clear IMHO.
TomyWork has quit [Remote host closed the connection]
<axisys>
actually is it possible to make it like "FOO" => if stage != 'beta' "true" else "false" end ? I know my syntax is wrong
<axisys>
adam12: i really like yours like C style, but seems like they want the style I am showing to be consistent to their code style
roadie` has joined #ruby
trillp has quit [Quit: WeeChat 3.3]
<axisys>
not sure what is the correct syntax for I am showing
mixfix41 has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 252 seconds]
legit has quit [Quit: WeeChat 2.8]
<axisys>
actually is it possible to make it like "FOO" => if stage != 'beta' "true," else "false," I need a comma at the end
legit has joined #ruby
<axisys>
I suppose that would be like this for your C style syntax "FOO" => stage.equal?("beta")? "true,": "false," ?
<axisys>
adam12: ^
<axisys>
so I think this should work with ternary stage.equal?("beta") ? "false": "true", with comma at the end. but I still like to convert it to if .. syntax
<weaksauce>
what's the rest of the context?
gproto23 has quit [Remote host closed the connection]
<adam12>
axisys: I'd have to see more code than just the one line you pasted to make any suggestions.
o|||||o has joined #ruby
trillp has joined #ruby
<leftylink>
sure there are two ways to use if/else there, I just prefer ternary when it's on one line. but don't let me tell you what to do
<leftylink>
pandabot: rb {'FOO' => if true then 'true' else 'false' end, 'BAR' => if true; 'true' else 'false' end}
<o|||||o>
can someone help me understand why these two lines are not outputting the same results? https://paste.ee/p/3vdz9
<weaksauce>
say you had 1000 sales one of which is 100 dollars and the rest are 1 penny why do you think that the price should be 1000*100.01 when it's actually 1*100 + 0.01*1000
<o|||||o>
thanks, weaksauce i need to revisit basic arithmetic lol
<weaksauce>
np
<weaksauce>
yeah it's best to think about the extreme cases when something doesn't seem right
justAstache has quit [Read error: Connection reset by peer]
justAstache has joined #ruby
bit4bit has joined #ruby
oxfuxxx has joined #ruby
osXnut has joined #ruby
mixfix41 has joined #ruby
_ht has joined #ruby
o|||||o has quit [Remote host closed the connection]
o|||||o has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
bit4bit has quit [Remote host closed the connection]