RobL
2.5K posts

RobL
@braindeaf
Senior Software Engineer (Ruby/Rails - 15 Years). Looking for new remote opportunities.
Brighton, UK Beigetreten Ağustos 2008
61 Folgt278 Follower

@catalinmpit However, never lose sight of who you are outside of the roles of giving to other people. You get to my mum's age and wonder where your life went after your children grow up and your friends die. When is it your turn?
English

@catalinmpit Theory is great, perfection is a noble pursuit but in the end we need to ship something that works in the time that we have.
English

Just reflecting that I have been using Ruby for 20 years now. Wow. Anyway...just published this gem simple today Ouroboros.
"...Ouroboros is an experimental implementation of an infinite circular Array. An Array eating it's own tail..."
rubygems.org/gems/ouroboros
#ruby #rails
English

@schwad_rb We use AI for inspiration and help with speeding up problem solving..kind like Google with batteries. I've heard code reviews in other companies where "AI wrote it" has been uttered as justification for the way a piece of code is written...which is a solid NO from me
English

@dhh I am sure that is true for you. But it is not for everyone but societal expectations to have children contributes to the many millions of unwanted children and the damaged adults they become. Embrace joy in people and help others, personal freedom from children is not a bad thing
English

@KevinMonk I ditched 7,000 emails this evening. A sorry weight on my existence is lifted.
English

@KevinMonk I am skeptical about AI because I think I don't want to think decades of learning is edundant. However, I took a stab at making a Sinatra based GMail email cleaner because at 98% capacity I am too stingy to pay an extra £2 a month for email. Most of this took about 15 minutes.

English


We should get Cuomo to speak at a con
Nate Berkopec@nateberkopec
Rivers Cuomo has a better looking Github contribution graph than I do.
English

Excited to see @joemasilotti's new book, "Hotwire Native for Rails Developers," is out in beta. Perfect timing, as I'm working on something I might try turning into a Hotwire Native app! :) pragprog.com/titles/jmnativ…
English

@MichaelDChaney Thank you for the detailed explanation it was very helpful. The documentation is certainly misleading then. I think I have to do a write-up of this to make sure I understand and present the problem I was actually trying to solve.
English

I was in the wrong place, anyway, as that was for lazy evaluation. Here's the code:
#L4870" target="_blank" rel="nofollow noopener">github.com/ruby/ruby/blob…
This is the secret sauce:
#L977" target="_blank" rel="nofollow noopener">github.com/ruby/ruby/blob…
Basically, it hashes each key and then uses ar_find_entry to see if that key's already in the hash.
Here's the simple explanation. Hashes store the keys in order of entry now. So "uniq" creates an empty hash:
hash = rb_obj_hide(rb_hash_new());
and adds the array items one at a time to this hash:
rb_block_call(obj, id_each, 0, 0, func, hash);
basically as "val => val". It's either going to use "uniq_func" if there's no block given or "uniq_iter" if there's a block.
Those each call "rb_hash_add_new_element" with the value or the block return value as the hash key.
If the value is already in there as a key, it's not overwritten.
At the end, it grabs the values from this hash:
ret = rb_hash_values(hash);
clears the hash, then returns the values.
To make it simple - it doesn't use "eql?". Instead, it uses the built-in hashing to do the comparison.
English

@MichaelDChaney Sadly I'm not a C programmer, so I can only take a guess at what this is doing. Is my assumption correct that it isn't actually calling eql? I guess I am grossly underestimating the simplicity of this.
English

@braindeaf #L2639" target="_blank" rel="nofollow noopener">github.com/ruby/ruby/blob…
QME

@13Zombo13 Well, if you find that you can't bear to hold onto any Original Series 1 then I have a massive amount of gaps in mine.
English

Just added a new Ruby gem for funsies. faker-gpk because I love faker, and I love Garbage Pail Kids.
rubygems.org/gems/faker-gpk
#ruby #rails
English

You don't realise how important this is until it affects people you love
Mandate to provide ground level HRT information to all women with symptoms of menopause.
chng.it/QpY2NKxkyQ via @UKChange
English

@catalinmpit A medium where you can suspend the concerns and troubles of daily life and sink into the world of Michael Corleone's rise to power but before we get past the wedding remember you're going to die one day and your pets need a financial safety net + Walkers only use British potatoes
English





