Nicmavr has quit [Read error: Connection reset by peer]
foxxx0 has joined #ruby
Nicmavr has joined #ruby
LiftLeft2 has quit [Ping timeout: 240 seconds]
deadnull has joined #ruby
za1b1tsu_ has quit [Read error: Connection reset by peer]
za1b1tsu_ has joined #ruby
Beams has joined #ruby
alem0lars has joined #ruby
LiftLeft2 has joined #ruby
Alina-malina has quit [Ping timeout: 244 seconds]
DTZUZO has joined #ruby
deadnull has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
deadnull has joined #ruby
nopolitica has quit [Quit: WeeChat 2.2]
despai has joined #ruby
tdy has joined #ruby
despai has quit [Ping timeout: 240 seconds]
za1b1tsu_ has quit [Ping timeout: 250 seconds]
za1b1tsu_ has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
bijan_ has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
Beams has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby
Beams has joined #ruby
gregf_ has joined #ruby
deadnull has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Beams has quit [Quit: .]
despai has joined #ruby
tristanp has joined #ruby
Beams has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
Beams has quit [Client Quit]
deadnull has joined #ruby
deadnull has quit [Client Quit]
c0mrad3 has quit [Quit: Connection closed for inactivity]
roshanavand has joined #ruby
lxsameer has quit [Quit: WeeChat 2.1]
alem0lars has quit [Ping timeout: 252 seconds]
graphene has quit [Remote host closed the connection]
clorisu has joined #ruby
<clorisu>
Hi, could anybody let me know why line 35 is running when the expression at line 16 should prevent it? https://pastebin.com/RtpPkCBC
<ruby[bot]>
clorisu: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<elomatreb>
clorisu: Nothing in line 16 can prevent the expression in the lower lines from running, are you getting output that you don't expect?
<clorisu>
elomatreb: im getting that the orange tree is now 21 years old. shouldnt the conditional of if @yearspassed <20 being true preven this and run the else?
<elomatreb>
You're not outputting the age of the tree anywhere, only the height
za1b1tsu_ has quit [Ping timeout: 245 seconds]
<clorisu>
elomatreb: im outputting it into `
<clorisu>
line 18 no?
<elomatreb>
In line 18 you're adding one to it, and in line 19 you're outputting @height
Beams has joined #ruby
alex`` has quit [Quit: WeeChat 2.2]
jinie has joined #ruby
bijan_ has quit []
bijan_ has joined #ruby
AJA4350 has joined #ruby
snickers has quit [Ping timeout: 240 seconds]
<clorisu>
yes elomatreb , but shouldnt that if not run again once yearspassed is over 20?
pwillard has joined #ruby
sonOfRa has quit [Remote host closed the connection]
sonOfRa has joined #ruby
ramfjord has joined #ruby
vondruch has quit [Quit: vondruch]
bmurt has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
bmurt has quit [Read error: Connection reset by peer]
<apeiros>
_Fremen_: do `git status` after running it and see.
amelliaa has joined #ruby
<_Fremen_>
apeiros: no repository
<_Fremen_>
so it is ok I guess
<apeiros>
…
<apeiros>
I have no idea where you ran that command
<apeiros>
but you're supposed to run it in the tests directory (parent would be ok too)
tristanp has joined #ruby
fmcgeough has joined #ruby
tristanp has quit [Ping timeout: 250 seconds]
amelliaa has quit [Quit: -]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
KeyJoo has quit [Ping timeout: 252 seconds]
despai has quit [Quit: ...]
_Fremen_ has quit [Quit: Leaving]
arekushi has joined #ruby
arekushi is now known as alexis
alexis is now known as Guest18202
aufi has quit [Ping timeout: 240 seconds]
bak1an has quit [Read error: Connection reset by peer]
bak1an has joined #ruby
despai has joined #ruby
bijan_ has joined #ruby
tycoon177 has joined #ruby
bijan_ has quit [Ping timeout: 260 seconds]
despai has quit [Quit: ...]
ule has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
mfunkmann has joined #ruby
<mfunkmann>
Hey folks. I am working with Ruby 2.5 - Is there a short und beautiful alternative to using hash.merge? Like ... an operator or something to merge to hashes? Something like hash1 + hash2 ?
thejs has joined #ruby
bijan_ has joined #ruby
anubhav996 has joined #ruby
<havenwood>
mfunkmann: Nope
mostlybadfly has quit [Quit: Connection closed for inactivity]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu_ has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
knight33 has joined #ruby
discopatrick has joined #ruby
bijan_ has quit [Ping timeout: 250 seconds]
KeyJoo has joined #ruby
bijan_ has joined #ruby
vondruch has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
orbyt_ has joined #ruby
bijan_ has joined #ruby
IanMalcolm has joined #ruby
raz has joined #ruby
<raz>
question: the return value from str.force_encoding('UTF-8') and str.force_encoding('UTF-8').dup should behave completely identical, right?
<raz>
i think i've run into a ruby bug :(
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bhaak>
depends on the content of str
knight33 has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
<raz>
hmmm. why would the content differ after being dup'ed?
<raz>
(or the encoding...)
<raz>
i'm indeed running into encoding errors *unless* i add the trailing .dup
teclator has quit [Disconnected by services]
bijan_ has joined #ruby
mostlybadfly has joined #ruby
<bhaak>
I might have though of String.new
mikhael_k33hl has joined #ruby
KeyJoo has quit [Ping timeout: 250 seconds]
alex`` has joined #ruby
<mikhael_k33hl>
al2o3-cr: hey man, how you doin?
[Butch] has joined #ruby
IanMalcolm has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tjbp has quit [Remote host closed the connection]
tjbp has joined #ruby
<apeiros>
raz: apart from one additionally creating a copy of the string - yes
<apeiros>
note that in both cases, str is modified
<ineb>
str.dup.force_encoding('UTF-8') would leave str untouched
<apeiros>
other exceptional cases: if str was extended. dup doesn't copy that.
<apeiros>
buuuut seriously, if you want help, provide useful info :-p
<apeiros>
reproducible example would be the best.
bijan_ has quit [Ping timeout: 250 seconds]
GodFather has quit [Read error: Connection reset by peer]
despai has joined #ruby
aufi has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 240 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bijan_ has joined #ruby
Rootsudo has joined #ruby
vondruch has quit [Client Quit]
GodFather has joined #ruby
eddof13 has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
<raz>
it's unfortunately hard to reproduce out of context. rails app with ActiveModelSerializer here
nowhere_man has joined #ruby
<raz>
i'm just sticking with my workaround for now
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ArahaelPi has quit [Read error: No route to host]
<Eiam>
dump the content prior to dupe, call dupe on it, look at it after
za1b1tsu_ has quit [Ping timeout: 240 seconds]
<Eiam>
if it doesn't reproduce without rails layered on top, its probably Rails and not Ruby
<Eiam>
as I recall dupe is shallow by default
cliluw has quit [Ping timeout: 245 seconds]
<raz>
yep i've done that. dumped it all sorts of ways. the string object looks identical before/after dup. i'm guessing rails/AMS somehow attaches/guesses the encoding in a way that gets stripped by the dup
za1b1tsu_ has joined #ruby
anubhav996 has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
bijan_ has joined #ruby
<dionysus69>
is it possible to iterate over an array but execute each in separate thread? I have sleep n in the each loop but I don't want to execute them in sequence on after another, I want to execute them concurrently, they are thread safe operations so is it possible to turn GLI off for that?
<dionysus69>
GIL*
bijan_ has quit [Ping timeout: 252 seconds]
conta2 has joined #ruby
tdy has joined #ruby
mikhael_k33hl has quit [Quit: Page closed]
tdy has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ArahaelPi has joined #ruby
bijan_ has joined #ruby
<Eiam>
uhmmm
ivanskie has joined #ruby
<Eiam>
you could check out jruby
bijan_ has quit [Ping timeout: 252 seconds]
IanMalcolm has joined #ruby
<Eiam>
you can't "disable" the GIL and I'm not sure you'd just want to anyway. Even if your threads were actually put on n distinct cores, I question that you'd get a reliable result
<havenwood>
you can disable it with fiddle, but...
<Eiam>
jruby does not have a GIL and will let you spin up n distinct actual threads in parallel.
<Eiam>
havenwood: okay sure its code "anything" is possible
darkhanb has joined #ruby
<Eiam>
I could fly for a few seconds too, or some might say, fall with grace
<bhaak>
raz: if it's within the context of Rails, are you really sure it's a String? it could also be Rails' HtmlSafeBuffer or whatever it's called
dbz has joined #ruby
<bhaak>
SafeBuffer
bijan_ has joined #ruby
tdy has joined #ruby
qoreQ has joined #ruby
mroutis_ has quit [Ping timeout: 246 seconds]
dbz has quit [Ping timeout: 252 seconds]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 245 seconds]
dbz has joined #ruby
<Eiam>
with Rails, one never knows whats actually Ruby anymore at all
akaiiro has quit [Ping timeout: 245 seconds]
bijan_ has joined #ruby
graphene has quit [Remote host closed the connection]
conta2 has quit [Quit: conta2]
graphene has joined #ruby
chouhoulis has quit [Remote host closed the connection]
bijan__ has joined #ruby
armyriad has quit [Quit: Leaving]
bijan__ has quit [Read error: Connection reset by peer]
bijan_ has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
<miah>
sometimes DSL's can obscure the actual programming language they run on
graphene has quit [Remote host closed the connection]
memo1 has joined #ruby
<memo1>
hi, if i share my code using git with other machines, but the wrappers is different on every one of them, how i manage to admin the eviroment variables to keep the code clean?
graphene has joined #ruby
dviola has joined #ruby
mostlybadfly has joined #ruby
graphene has quit [Remote host closed the connection]
r29v has joined #ruby
graphene has joined #ruby
<miah>
memo1: not really a ruby issue, but i'd look into some sort of configuration management solution like chef, ansible, puppet, etc
conta2 has joined #ruby
ramfjord has joined #ruby
savolla has quit [Ping timeout: 240 seconds]
dbz_ has joined #ruby
dbz has quit [Ping timeout: 240 seconds]
Rapture has joined #ruby
conta2 has quit [Quit: conta2]
graphene has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
herbmillerjr has quit [Remote host closed the connection]
discopatrick has quit [Quit: Connection closed for inactivity]
<WA9ACE>
It's definitely a conscious effort to check it since I don't have a Tweetbot equivalent for Mastodon yet
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
bmurt has joined #ruby
thejs has quit [Ping timeout: 246 seconds]
tdy has joined #ruby
mikecmpbll has joined #ruby
paraxial has quit [Ping timeout: 252 seconds]
ellcs has joined #ruby
spiette has quit [Ping timeout: 272 seconds]
psmolen has quit [Read error: Connection reset by peer]
<ivanskie>
hi
<ivanskie>
anyone here using aws-sdk?
spiette has joined #ruby
KeyJoo has joined #ruby
paraxial has joined #ruby
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
wildermind has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
<apeiros>
WA9ACE: same issue here :D
<ule>
ivanskie: sure, whats up?
<ivanskie>
is it just me or is it slow?
<ule>
ivanskie: which region are you connecting to? No problems here
<ivanskie>
i wrote a little dirty proof of concept dashboard with sinatra and aws-sdk.. each beanstalk app > each environment > get instance ids > for each instance describeInstance..
Nicmavr has quit [Read error: Connection reset by peer]
<ivanskie>
22 seconds
Nicmavr has joined #ruby
<ivanskie>
needs to be refactored.
despai has quit [Quit: ...]
<ule>
ivanskie: looks like you're calling "eb.describe_environments" 2 times inside your before block
<ivanskie>
lol oops. should just be envs.
<ivanskie>
12 seconds
<ivanskie>
there's a lot to refactor.
<ivanskie>
also instead of getting an array of instance-ids and then doing describe_instances and passing the array, im doing that request per each instance id. which is dumb
ellcs has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Read error: Connection reset by peer]
bijan_ has quit [Remote host closed the connection]
lenqbit has joined #ruby
<zenspider>
man... trying to get spring working on this client's app... it CHEWS through battery like it's nothing
<zenspider>
ruby process taking almost a whole CPU
<zenspider>
I can't even configure it to fall back to polling sucessfully.. ugh. ruby tooling has just gotten FAR too complex and buggy
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
rm bin/spring
<zenspider>
pretty much
tdy has joined #ruby
<apeiros>
spring caused too many problems for me early on, so '--no-spring' is standard for me.
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
maybe it's gotten better. but then again, your story indicates otherwise.
<zenspider>
I'm really only using it to try to drive a test to generate a PDF to see WTF asciidoctor-pdf is fucking up now. It's entirely convoluted but I don't need some BS process killing my battery in the process
<zenspider>
it's pretty terrible IMHO
LiftLeft2 is now known as LiftLeft
ellcs has quit [Ping timeout: 240 seconds]
<WA9ACE>
apeiros I agree. `--no-spring` is mandatory when generating a new rails app
bijan_ has joined #ruby
hfp_work has quit [Quit: bye]
hfp has quit [Quit: bye]
bijan__ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
alex`` has joined #ruby
justache has joined #ruby
bijan__ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
ur5us has joined #ruby
<zenspider>
anyone have experience with asciidoc + pdf?
ur5us has quit [Read error: Connection reset by peer]
leitz has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
r29v has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]