xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
Swyper: If you use a Gemfile, your dependencies must be in it. I don't see sqlite3 listed.
<Swyper>
ahh I see
NODE has quit []
<adam12>
Swyper: I'm not sure if this was always true but lately I've noticed it more. `bundle exec` or `bundler/setup` will manipulate $LOAD_PATH and I'm not sure the default gem path will be there.
Benett has quit [Remote host closed the connection]
<Swyper>
adding sqlite3 and singleton to my Gemfile fixed that error
<Swyper>
thank you adam12
cd has joined #ruby
<adam12>
Swyper: Probably remove singleton. It's built into Ruby.
<tankf33der>
i can easily repeat this when my laptop without connection to power supply :)
alfiemax has quit [Remote host closed the connection]
rmnull has joined #ruby
alfiemax has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 250 seconds]
zacts has quit [Quit: WeeChat 2.7.1]
ellcs has joined #ruby
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
markopasha has joined #ruby
donofrio has quit [Remote host closed the connection]
ur5us has joined #ruby
helpa has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
helpa has joined #ruby
chalkmonster has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jingjinghack has quit [Ping timeout: 256 seconds]
jingjinghack has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
chalkmonster has quit [Quit: WeeChat 2.8]
rmnull has quit [Quit: WeeChat 2.8]
postmodern has quit [Quit: Leaving]
rmnull has joined #ruby
schne1der has joined #ruby
nofxx_ has joined #ruby
tdy has joined #ruby
nofxx__ has quit [Ping timeout: 264 seconds]
rmnull has quit [Quit: WeeChat 2.8]
d3bug has quit [Quit: Connection closed for inactivity]
xco has joined #ruby
sergioro has quit [Quit: leaving]
akem has joined #ruby
akem has quit [Max SendQ exceeded]
akem has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.8]
dionysus69 has joined #ruby
al2o3-cr has joined #ruby
<siery>
morning, can someone tell me why the `each` loop turns out destructive in this example? The second `puts "STATUS:\#{Prog.get_file_log}"` returns an empty array..
<leitz>
I was having a pretty good "work anger session" these past couple of days. I was hired for my experience, and then my experience is ignored for pretty much everything.
<leitz>
Talked (via FB chat) to a friend of mine yesterday afternoon. His family suffered an unthinkable loss last year, and the isolation has kept them in the house where the loss occured.
<leitz>
Today is the anniversary.
<leitz>
I guess my life isn't so bad, after all.
<xco>
damn
<xco>
hard times
<xco>
it'll help if you shift focus to things you can control directly though
<apotheon>
havenwood: If by "vertism" you mean the classification as introvert or extravert, it's about as valid as biological taxonomy and nationality, I suppose -- just a convenient way to group things together to think about them for specific purposes, often abused and misapplied.
<apotheon>
leitz: Sorry to hear it. That's rough.
<apotheon>
(all of it, including the experience thing)
<apotheon>
"first-world problems", as they say, but . . .
<apotheon>
still problems
<havenwood>
apotheon: Yeah, I'm skeptical about the {in,ex}trovertism classifications, but muddy things are muddy.
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
<apotheon>
There are times it's a useful abstraction, such as when I'm working on figuring out communication problems.
<apotheon>
. . . kinda like how MVC is a useful abstraction sometimes, but useless for a simple console based countdown timer utility I wrote in C last night.
akem has joined #ruby
akem has quit [Max SendQ exceeded]
akem has joined #ruby
<havenwood>
apotheon: How I feel personally, in Ruby 3 terms: module Vertism; COIN = %w[in ex]; def COIN.flip = COIN.sample; module_function def whatami = COIN.flip end; puts Vertism.whatami + 'trovert'
<apotheon>
har
<havenwood>
I feel bad for not freezing my constant and I should use alias.
* havenwood
tries to resist refactoring joke code.
kinduff has quit [Read error: Connection reset by peer]
<apotheon>
Write a whole new, cool, generally useful utility program instead.
kinduff has joined #ruby
<havenwood>
apotheon: I have one of those open in my editor, but it's inexplicably blowing up with a syntax error inside a module_eval.
<leitz>
I'm actually pretty convinced on the intro/extro vert thing, it's how the energy transfer goes.
<apotheon>
I think part of the problem people have with the introvert/extravert thing is of course the fact that people are more complex than that, and we're kind mashing square pegs into round holes, but another part of it is that the usual definition is overly simplistic.
<apotheon>
It's not so much that extraverts are energized by being around people and introverts are drained by it, though there's some heuristic tendency along those lines.
<leitz>
Seems like it works, for me.
<apotheon>
I think it's more that extraverts are energized by the social aspects of interaction, and introverts are energized by the examination of ideas that fit their interests.
<leitz>
I assume there's a lot more to it. However, when talking, we tend to be general.
<leitz>
I'm seriously drained by social interaction.
<apotheon>
That's why, for instance, people think I'm an extravert when I'm having an interesting discussion about programming languages, but think I'm an introvert when I get frustrated that people always seem inclined to interpret everything I say through the lens of a bad acid trip.
<leitz>
The more cues there are, the more trained i feel.
<apotheon>
When I can just focus on the *idea*, and explore it with someone, I'm fine. When I have to observe cultural traditions of mutual validation for half an hour, it kills my ability to function.
anujmore has joined #ruby
<leitz>
Hmm...interesting point. Discussing topics of interest might bypass the normal attention to social convention.
<apotheon>
Intellectual extraverts, by that theory of operation, can use social interactions as a way to develop innovative technical solutions for problems in their areas of expertise with great facility, while non-intellectual and non-introspective introverts might be able to babble for hours about a favorite pop music star but collapse under socialization pressure when the mentioned introvert brings up
<apotheon>
the reason they were supposed to have a discussion in the first place.
<apotheon>
I find that evident introverts can often trace problems with social interaction back to a difficulty dealing with the heuristic, indefinable protocols of extraverted communication norms.
<apotheon>
. . . or "the secret language of extraverts", as I sometimes call it.
<apotheon>
(not actually secret, just specified in ever-shifting protocols)
<leitz>
I guess the question that comes to mind is, "nature or nurture"? Is introversion just a step on the autism (or whatever) spectrum?
<apotheon>
One of the key advantages of humans over most other species on earth is superior pattern-matching facility, but (broadly speaking) there seems to be a couple of major approaches to it that could be described as intro- or extraverted: pattern recognition (extraverted) and pattern discerning (introverted).
mikecmpb_ has joined #ruby
<leitz>
I assume extraverts can think as deeply as introverts seem to.
mikecmpbll has quit [Read error: No route to host]
<apotheon>
I think brain structure probably has something to do with it, but to some degree brain structure is affected by both "nurture" and "nature", so . . . there's that.
<leitz>
rue.
<leitz>
True.
<apotheon>
It's all very fuzzy around the edges. The concept of "human" is actually a complex system with emergent properties that we label for the sake of convenience.
Bounga has joined #ruby
<leitz>
I'm not sure those properties are emergent, as much as there's little we truly understand, and culture is a diverse influencer.
<apotheon>
There's nothing that says, to me, extraverts and introverts are any more or less intelligent overall, but in which side one might find oneself there will tend to be strong proclivities toward applying that intelligence differently, and as such I think there's a stereotypical assumptionthat someone showing introverted tendencies is "more intelligent" just because of a leaning toward outwardly
<apotheon>
"nerdy" pursuits.
miskatonic has joined #ruby
mikecmpbll has joined #ruby
<leitz>
True. Which is cool, when extraverts with intelligence apply it to bringing diverse groups together. I've found that fascinating to observe, even though I have little talent in it.
mikecmpb_ has quit [Ping timeout: 264 seconds]
<apotheon>
I'm curious about how trending chemical arrangements and interactions in myriad multi-relationship co-dependency ultimately giving rise to something like a personality trait (ignoring for the moment the ghost in the machine) isn't describable as emergence.
naught-fowl has joined #ruby
<leitz>
Is emergence even a thing, in human behavior? Yes, people will have new thought processes based on getting through this pandemic, but it will likely be similar to how an earlier generation had their habits changed during the depression.
<apotheon>
Both will likely have paved the way for a significant increase in authoritarian control by the time this is over.
<leitz>
If something transformative comes around, and is signficantly different than anything ever before, then maybe it's emergent. Otherwise, it just seems like an aspect that was already there, but unused.
troulouliou_div2 has quit [Quit: Leaving]
<apotheon>
erm
<leitz>
Yeah, can recall a lot of laws being taken OFF the books...
<apotheon>
I think you're using a different definition of "emergent" than me.
<leitz>
apotheon, quite likely.
<leitz>
I looked it up on wikipedia, so it's fresh in my mind.
<apotheon>
"emergence occurs when an entity is observed to have properties its parts do not have on their own"
<apotheon>
pretty rough, but roughly useful
<apotheon>
A thing doesn't have to be *new*, just not a quality of the parts that, taken together, give rise to it.
<apotheon>
In other words, a property emerges from the interactions between parts of the whole, rather than being inherent in the parts.
<apotheon>
. . . like bugs that wouldn't exist in a piece of software that didn't need to do *both* of the things that, together, interact in a buggy way.
<leitz>
My thought is that much of human behavior has already emerged, at some point in the past. New software is new, human behavior is boringly the same.
en10n has joined #ruby
banisterfiend has joined #ruby
<apotheon>
Yeah, you're still not thinking of the same thing as me.
<banisterfiend>
anyone have a regular expression for parsing ipv4 subnets?
<banisterfiend>
including short-hand syntax, like 192.168/16
<apotheon>
alas, no, not off the top of my head
<leitz>
Oh good grief, who does actual computer stuff here?!?!
<apotheon>
I wrote C last night.
<leitz>
banisterfiend, there's a gem somewhere, I used it some time back.
<banisterfiend>
apotheon: cool what did you write, i mainly do C++/C these days too
<banisterfiend>
leitz: nice, any idea what it's called?
alfiemax has joined #ruby
<apotheon>
banisterfiend: I wrote a console-based countdown timer, just for fun.
<apotheon>
Yesterday, someone said something like "Do you know a command line countdown timer, preferably with a beep at the end, that I could use?"
<leitz>
banisterfiend, a former co-worker felt a 1,000+ character regex beat using modular code. :(
<apotheon>
No, I did not, but I briefly described off the top of my head how I'd write it in C (in part because he said he didn't really want to use a shell script), then I went ahead and wrote it.
<leitz>
Back in a bit.
<banisterfiend>
leitz: doesn't work for me
<banisterfiend>
that only supports 192.168.0.0/16 syntax
<banisterfiend>
i need 192.168/16
<leitz>
banisterfiend, most folks don't write 192.168/16 syntax. Is there a reason for doing so?
<banisterfiend>
apotheon: i only use C when i hvae to :) Such as writing kernel extensions and device drivers
<apotheon>
C programming is my favorite video game.
<banisterfiend>
leitz: they do in the firewall world :)
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<banisterfiend>
and it's for defining firewall rules
<leitz>
banisterfiend, are they using CIDR?
<banisterfiend>
leitz: of course, that's what this is homie
eindoofus has joined #ruby
<en10n>
Hello. I'm trying to write a block that utilizes sort_by to reorder an array of currency values [2.04, 3.02, 4.03, 5.01].
<en10n>
I'd like it to be ordered by the amount of cents (low to high). Running into a bit of a wall because the methods I had in mind weren't available for floats.
<eindoofus>
naught-fowl, i thought you can only claim if you're laid off or furloughed
<eindoofus>
either way it doesn't seem like a good time to lose a job if you can hold onto one
<naught-fowl>
I'm putting together a proposal for my boss to furlough me and let me work under the table for 50% that way I'll get 40% of my salary in unemployment plus the extra $600/wk
<anujmore>
@en10n: x.sort_by { |m| m - m.floor } not good enough?
<naught-fowl>
everybody wins
<banisterfiend>
naught-fowl: i thought you wre a serious career oriented family man now ;)
<eindoofus>
should i be concerned that rubydoc.info is down. it seems like an important site. beginning to learn ruby because of my job
vlouvet has joined #ruby
<en10n>
anujmore: This is exactly what I was looking for. Thank you.
<banisterfiend>
naught-fowl: congrats on the bb btw
fluxAeon has joined #ruby
<naught-fowl>
banisterfiend: thanks, I don't recommend it at all
<banisterfiend>
lol
<naught-fowl>
when people talk about what a blessing kids are, they're fucking lying they're trying to make you as miserable as they are. I would never do that to someone
<banisterfiend>
careful, this channel has publicly available logs and your kid might google your IRC nickname once they turn 18 ;)
<banisterfiend>
naught-fowl: can you write me an ipv4 cidr regex
<banisterfiend>
i'll adopt your kid
<eindoofus>
naught-fowl, that's a bit shortsighted. every age range is different. i grew up without much of a family here in america so i'm biased
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
<havenwood>
banisterfiend: That's ^ now valid syntax.
<banisterfiend>
i don't undsan it
<banisterfiend>
understand it
<naught-fowl>
thats offensive
<havenwood>
banisterfiend: The `=>` is righthand assignment. The `meth =` is endless method.
<havenwood>
naught-fowl: 1 + 1 => two
<banisterfiend>
ugh
<banisterfiend>
thankgod i don't write ruby anymore
<banisterfiend>
C++20 is shaping up to have a lot of the ruby conveniences i like, but without the revolting syntax
<banisterfiend>
C++20*
<banisterfiend>
naught-fowl: have you seen C++20 ranges?
<havenwood>
I like entangling things by name rather than position, in general.
<havenwood>
But I don't mind `_1` if it's going to be `n` or some other one-letter variable otherwise.
<banisterfiend>
they should have just went with 'it'
<naught-fowl>
banisterfiend: I'll probably never use that
<havenwood>
banisterfiend: Probably.
<havenwood>
banisterfiend: I argued for `itself`.
<banisterfiend>
naught-fowl: one thing i hate about the STL is the lack of composability and the requirement of begin(x) and end(x), c++20 ranges fix all of that
<havenwood>
this
<banisterfiend>
havenwood: i thought 'itself' was already accepted as an identify method
<banisterfiend>
identity*
<banisterfiend>
6.itself => 6
<havenwood>
banisterfiend: Yeah, it is now.
<havenwood>
banisterfiend: Some odd cases with it, like:
<havenwood>
When a thing seems to not be itself...
<banisterfiend>
-2 ** 2 should be 4 no?
<banisterfiend>
or does ** bind more tightly than - ?
<naught-fowl>
so -2 ** 2 is parsed as -(2**2)?
<havenwood>
Yeah, ** binds tighter than unary -.
<banisterfiend>
-2.itself ** 2 = 4 makes sense, IMO -2 ** 2 is the one that's weird
<naught-fowl>
clearly operators were a mistake
<banisterfiend>
naught-fowl: you mostly code in C++ at work?
<naught-fowl>
no I do devops so I mostly write in ruby, python, groovy for jenkins, bash etc. I hardly ever write code for real. I guess we have a project in go too
<banisterfiend>
naught-fowl: do you mess much with iproute2 and firewalling?
<banisterfiend>
and ipv6 ?
<banisterfiend>
iproute2 is just incredible
<naught-fowl>
no, I don't go lower than whatever AWS offers
<banisterfiend>
i play a lot with routing policies and cgroups
<banisterfiend>
hopefully starting some BPF stuff soon too
kristian_on_linu has joined #ruby
<naught-fowl>
Swyper: expect(Play.find_by_title('All My Sons').year).to eq(1947) ## here find_by_title is used as a class method of Play, but its defined as an instance method
troulouliou_dev has quit [Remote host closed the connection]
<Swyper>
oo
<Swyper>
hm
troulouliou_dev has joined #ruby
<naught-fowl>
banisterfiend: glad I don't have to do futz with that stuff, I'm not a network engineer so its mostly over my head
<phaul>
Swyper: you also created a subject that you are not using, that would be an instance the way it's created
<Swyper>
so I should be using :list_of_plays.find_by_title('All My Sons').year ?
<phaul>
lose the colon, it's not a symbol. list_of_plays.find_by...
<phaul>
it's actully a method that subject defines by that name (that you give as a symbol)
ur5us has joined #ruby
reber_ has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
Swyper has joined #ruby
<banisterfiend>
naught-fowl: it's pretty fun, you can do some crazy stuff, like split tunneling
<Swyper>
I randomly keep getting disconnected
leitz has quit [Quit: Leaving]
<Swyper>
ArgumentError:
<Swyper>
wrong number of arguments (given 0, expected 1)
<Swyper>
hmm
dviola has joined #ruby
<Swyper>
whats the simple way to define a class method?
<eindoofus>
as a newb, is it wrong for me to be troubled by rubydoc.info being down? this seems like a critical site?
<Swyper>
write def self.method name ... end ?
<eindoofus>
grrr
<eindoofus>
anyone!?
<eindoofus>
i'm about to make a bot to spam this question all day
Xiti` is now known as Xiti
<Swyper>
expect(Play.new.find_by_title('All My Sons').year).to eq(1947)
<Swyper>
is this syntax wrong?
<Swyper>
for an rspec test
<eindoofus>
i'm transitioning from a patient/rational "well, maybe it's not important or no one knows attitude" to a "why the FUCK can't someone remotely answer my god damn question" attitude
<eindoofus>
your g'damn doc site is down rubyists!
<eindoofus>
or am i wrong? please explain. i'm new to this and never encountered such a black hole in another language
naught-fowl has quit [Remote host closed the connection]
<phaul>
Swyper: you call new on Play without arguments but initialize expects options
<havenwood>
eindoofus: The site you linked isn't an official Ruby site and we don't provide support here. The reason I imagine nobody responded is that nobody here is affiliated with that site and can't help bring it back up.
<Swyper>
phaul: so I guess the fix would be making a no argument constructor ?
<havenwood>
eindoofus: Reach out to the maintainers.
<phaul>
Swyper: or pass it the arguments when you call new