<racketerer>
hi. If i have a module that contains a class (wich contains a Constant), how do i bet overwrite the constant with a custom value without making a mess. (assuming i dont want to alter the file containing the module code)
hays has joined #ruby
_whitelogger has joined #ruby
Helenah has quit [Read error: Connection reset by peer]
Helenah has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
dviola has quit [Quit: WeeChat 2.7]
mossplix has joined #ruby
noodle has quit [Ping timeout: 265 seconds]
mossplix has quit [Ping timeout: 265 seconds]
zlogan has quit [Remote host closed the connection]
zlogan has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has quit [Quit: Connection closed for inactivity]
fig-le-deunch has quit [Quit: Konversation terminated!]
chalkmonster has quit [Quit: WeeChat 2.7]
cthu| has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldepandis has joined #ruby
schne1der has joined #ruby
imadper has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
sdu has quit [Remote host closed the connection]
noodle has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
noodle has joined #ruby
schne1der has quit [Ping timeout: 260 seconds]
sarink has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarink_ has joined #ruby
Helenah has quit [Ping timeout: 265 seconds]
sarink has quit [Read error: Connection reset by peer]
cnsvc has quit [Remote host closed the connection]
cnsvc has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has joined #ruby
Ai9zO5AP_ has quit [Quit: WeeChat 2.5]
sevvie has quit [Remote host closed the connection]
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MrCrackPot has joined #ruby
alfiemax has joined #ruby
brool has quit [Ping timeout: 272 seconds]
xco has joined #ruby
xco has quit [Client Quit]
alfiemax has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
infinityfye has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
Guest33331 has joined #ruby
schne1der has joined #ruby
Helenah has joined #ruby
clemens3 has quit [Quit: WeeChat 2.1]
lunarkitty has quit [Ping timeout: 245 seconds]
lunarkitty has joined #ruby
sarink_ has quit [Remote host closed the connection]
pandakekok9 has joined #ruby
conta has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
sdu has joined #ruby
Guest33331 is now known as alex``
TzilTzal has joined #ruby
<TzilTzal>
Hi
<TzilTzal>
Is there a way to test rail apps without an actual database? how are unit tests written usually in this case?
ur5us has joined #ruby
pandakekok9 has quit [Ping timeout: 240 seconds]
sarink has joined #ruby
lineus has quit [Remote host closed the connection]
lineus has joined #ruby
sarink has quit [Remote host closed the connection]
sarink has joined #ruby
pandakekok9 has joined #ruby
vondruch has joined #ruby
loveablelobster has joined #ruby
loveablelobster has left #ruby [#ruby]
ldepandis has joined #ruby
conta has quit [Quit: conta]
mikecmpbll has joined #ruby
ellcs has joined #ruby
dionysus69 has joined #ruby
sarink has quit [Remote host closed the connection]
racketerer has quit [Remote host closed the connection]
racketerer has joined #ruby
mossplix has quit [Remote host closed the connection]
chalkmonster has joined #ruby
conta has joined #ruby
conta has quit [Client Quit]
fercell has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
pandakekok9 has quit [Ping timeout: 240 seconds]
pandakekok9 has joined #ruby
<racketerer>
@fig-le-deunch is there a way to do that without to warnings?
<racketerer>
(and thank you for the suggestion btw?)
infinityfye_ has joined #ruby
phaul_ has joined #ruby
mossplix has joined #ruby
chalkmonster has joined #ruby
infinityfye has quit [Ping timeout: 265 seconds]
mossplix has quit [Ping timeout: 265 seconds]
zlogan has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
zlogan has joined #ruby
clemens3 has joined #ruby
infinityfye_ has quit [Quit: Leaving]
infinityfye has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 260 seconds]
turbo_choo has quit [Ping timeout: 260 seconds]
m_antis[away] has joined #ruby
schne1der has joined #ruby
<ljarvis>
TzilTzal: unit tests shouldn't hit the database (imo), but it's not easy to separate these into tests that don't require a database connection unfortunately
<ljarvis>
racketerer: constants are named as such for a reason ;)
m_antis[away] has quit [Quit: m_antis[away]]
<ljarvis>
&>> class Foo; BAR = "bar"; end; Foo.send(:remove_const, :BAR); Foo.const_set(:BAR, "baz"); Foo::BAR
<ljarvis>
you shouldn't do that, but that's how you do it without warnings
infinityfye_ has joined #ruby
infinityfye has quit [Ping timeout: 265 seconds]
ellcs1 has joined #ruby
<racketerer>
well, the problem is i didnt create the the module. but i dont want to touch it, in case the code changes in a future update so that stuff doesnt break. hence the "workaround"
<racketerer>
will give this a shot in a bit, thank you
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shah^ has joined #ruby
jcalla has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 260 seconds]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
<lmat>
adam12: I have a small development on the intractible problem :-)
chalkmonster has quit [Quit: WeeChat 2.7]
<lmat>
rm -r tmp/cache/assets/sprockets/v3.0; then run the tests and keep an eye on that cache, the cache populates quickly at first, then slower and slower. I'm eager to see if it will finish.
conta1 has quit [Ping timeout: 265 seconds]
<lmat>
adam12: I thought we were looking at an infinite loop, but now I'm starting to think it's maybe a really bad performance problem?
mossplix has quit [Ping timeout: 265 seconds]
phaul_ has joined #ruby
antizeus has joined #ruby
bsdbandit-01 has joined #ruby
chalkmonster has joined #ruby
duderonomy has joined #ruby
snuz has joined #ruby
drincruz has joined #ruby
<lmat>
Apparently performance problems in the asset pipeline are par for the course? "The process is inherently slow. For example, compiling Sass file to CSS requires reading the file in, which involves expensive hard disk reads." Aww, you have to read from disk? That's so sad.
Helenah has quit [Read error: Connection reset by peer]
<adam12>
lmat: Sometimes. The Ruby version of Sass was slow. Sprockets was not super slow but it wasn't that fast either.
ldepandis has joined #ruby
<adam12>
lmat: I'd still be shocked if that was your problem tho, tbh.
Helenah has joined #ruby
wallace_mu has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lmat>
hm, okay
brool has joined #ruby
<lmat>
adam12: the test finished
chalkmonster has quit [Quit: WeeChat 2.7]
TzilTzal has quit [Quit: Leaving.]
<adam12>
lmat: So no infinite loop? Weird.
Fernando-Basso has quit [Quit: Leaving]
<lmat>
adam12: Yup, not quite infinite ^_^
<lmat>
Having a populated cache doesn't help.
<lmat>
adam12: What do you think could slow down asset_path?
<adam12>
lmat: Is this on Docker?
<lmat>
adam12: yes.
<adam12>
lmat: Docker
<adam12>
lmat: ;)
<lmat>
adam12: I've never noticed docker going noticeably slower than the host system...
<lmat>
adam12: Host is arch linux, guest is ubuntu I think (the default ruby image).
<adam12>
lmat: Shouldnt' be the issue then, because Linux supports bind mounts so there's no CIFS/NFS in between.
<lmat>
adam12: Exactly. Shared kernel and everything.
<adam12>
lmat: I'm not sure tbh. I've never seen asset_path slow enough to care about. Sprockets/Sass-ruby can be slow, but I've only noticed it on 10,000 lines of CSS.
<lmat>
du app/assets -sh; says 19M...
<adam12>
lmat: My usual suspects are anything inside the Gemfile. Anything that might adjust asset pipeline somehow.
<adam12>
lmat: I don't follow them close enough to know.
<adam12>
lmat: Inside the container, do you have the node binary? `which node`
ellcs1 has joined #ruby
<lmat>
yes.
duderonomy has joined #ruby
mossplix has joined #ruby
<lmat>
which node npm; returns reasonable result.
<lmat>
node is at v10.18.1
markopasha has quit [Read error: Connection reset by peer]
vondruch_ has joined #ruby
<lmat>
adam12: I'm not sure that I *don't* have 10,000 lines of CSS to process...
<adam12>
lmat: Well you have bootstrap / et all
<adam12>
lmat: Shot in the dark, but maybe try swapping sass-rails in your gemfile for sassc-rails
<lmat>
Does it compile all .css, or only .sass or so?
<lmat>
sure!
<adam12>
lmat: Version might change so leave it off.
<adam12>
lmat: It will take .css files and concat them if there's a Sass directive to include.
<lmat>
okay.
troulouliou_div2 has joined #ruby
<lmat>
sassc 2.2.1 is what it's chosen I think.
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
akemhp_ is now known as akem
<lmat>
adam12: That fixed it.
* lmat
breaks down crying
<lmat>
Finished in 8 seconds.
<adam12>
Trippy.
<lmat>
in sassc, "c" means "compiled"? or "C" the language?
<adam12>
lmat: Yeah. It's bindings against libsass
<lmat>
sass-rails is in ruby, sassc-rails is in C?
<adam12>
lmat: The original Sass was written in Ruby. It was known for performance problems at a certain stage (ala 10,000 lines of CSS)
* lmat
cries more uglier
<adam12>
lmat: They rewrote it in C and called it libsass. Then sassc-rails are just bindings over it.
<lmat>
Regarding "The process is inherently slow. For example, compiling Sass file to CSS requires reading the file in, which involves expensive hard disk reads."
<lmat>
I was instantly thinking of some C++ I've written. I've never had performance problems there :-) I haven't written terribly intensive programs, but I do have an application that reads the entire hebrew bible (in XML), gathers statistics like word count, etc. Nothing I did ever took more than... hundredth of a second?
<adam12>
It sounds like boilerplate SO answer prelude.
<lmat>
adam12: ^_^
<lmat>
Oh yeah, I wrote a generals bot... http://generals.io that sometimes took up to a tenth of a millisecond to perform a bunch of A* searches and AI simulations and such ^_^
<lmat>
I mean a tenth of a second.
<lmat>
adam12: I'm very hopeful that sassc will be my silver bullet. I'll continue working on that today.
<adam12>
lmat: Good luck!
<lmat>
adam12: Where do I send the cheque? ^_^
<adam12>
lmat: O_O
ttoocs has quit [Ping timeout: 265 seconds]
wallace_mu has quit []
antizeus has quit [Ping timeout: 268 seconds]
Helenah has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
vondruch has quit [Quit: vondruch]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
mossplix has quit [Remote host closed the connection]
Jonopoly has quit [Quit: WeeChat 2.5]
sarink has joined #ruby
mossplix has joined #ruby
DaRock has quit [Ping timeout: 272 seconds]
Fernando-Basso has joined #ruby
sdu has quit [Remote host closed the connection]
Fernando-Basso has quit [Excess Flood]
Fernando-Basso has joined #ruby
wallace_mu has joined #ruby
fercell has quit [Quit: WeeChat 2.7]
Fernando-Basso has quit [Read error: Connection reset by peer]
chalkmonster has joined #ruby
cisco has joined #ruby
alfiemax has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
davidw has joined #ruby
davidw has quit [Changing host]
davidw has joined #ruby
ellcs1 has quit [Ping timeout: 265 seconds]
ellcs1 has joined #ruby
phaul_ has quit [Ping timeout: 265 seconds]
cthu| has joined #ruby
phaul_ has joined #ruby
SeepingN has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
royal_screwup21 has joined #ruby
ldepandis has joined #ruby
<brool>
to me
drincruz has quit [Quit: WeeChat 2.6]
royal_screwup21 has quit [Remote host closed the connection]
<al2o3-cr>
to you
tdy has joined #ruby
<phaul_>
hi, anybody has the link to the obfuscated contest codes? The one that has the spiral quine?
fishOutOfWater has joined #ruby
fishOutOfWater has quit [Remote host closed the connection]
howdoi has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink>
probably looking for TRICK will get it
<al2o3-cr>
phaul_: you planning on making a quine of your own?
alfiemax_ has joined #ruby
<phaul_>
no, I just wanted to make my college amazed. He was ;)
<phaul_>
I mean colleague
alfiemax has quit [Ping timeout: 272 seconds]
<al2o3-cr>
ah, yeah, i don't think mame is human tbh ;P
<phaul_>
highly unlikely :)
<al2o3-cr>
phaul_: i wouldn't be so sure ;)
bok has joined #ruby
<al2o3-cr>
it's great to see this again ;)
mikecmpbll has quit [Quit: inabit. zz.]
davispuh has joined #ruby
AndyAndyBoBandy has joined #ruby
voker57 has quit [Remote host closed the connection]
racketerer has quit [Ping timeout: 260 seconds]
<AndyAndyBoBandy>
Hello! I'm not a ruby dev, but use some ruby cli tools, and am wondering if there's a gem management tool for 'apps' (things you want to run, rather than import) that puts each one with its gem dependencies in an isolated gem-house. And for bonus points symlinks to ~/.local/bin or similar. Like the tool for python 'pipx' -- thanks for any help!
voker57 has joined #ruby
<havenwood>
AndyAndyBoBandy: Folk often build gems locally. You can install into "gemsets" or that sort of thing but RubyGems supports just installing them alongside your regular gems and it *just work*.
<AndyAndyBoBandy>
havenwood: thanks. gemsets is an RVM-specific thing?
<havenwood>
AndyAndyBoBandy: It is, but it's really unnecessary these days. There are alternative tools like gem_home, but I find no need for them: https://github.com/postmodern/gem_home#readme
alfiemax has joined #ruby
<AndyAndyBoBandy>
I don't have any "regular gems" I just like the organization of each installed ruby app isolated, since there's no guarantee different gems won't have conflicting requirements
<havenwood>
AndyAndyBoBandy: You can just install your custom gems, either locally or run your own gem server, and they won't conflict. Ruby's dependency resolving works well and many versions of the same gem can be installed side by side without conflict.
clemens3 has quit [Quit: WeeChat 2.1]
<havenwood>
AndyAndyBoBandy: For example, at work we have a gem server so you can install our custom gems or ones from RubyGems transparently without caring.
<havenwood>
AndyAndyBoBandy: RubyGems has the capability built in and it works well.
ellcs1 has quit [Quit: Leaving.]
ellcs1 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
<havenwood>
AndyAndyBoBandy: I'd recommend trying just installing your gems without any special setup and not worrying about it further.
<AndyAndyBoBandy>
Thank you, ok
<havenwood>
AndyAndyBoBandy: If you want to install them somewhere distinct, you certainly can.
ellcs1 has quit [Client Quit]
<havenwood>
But I don't bother
ellcs1 has joined #ruby
<ellcs1>
as
<havenwood>
No prob, any time
ellcs1 has quit [Client Quit]
alfiemax_ has quit [Ping timeout: 268 seconds]
cisco has quit [Ping timeout: 265 seconds]
<al2o3-cr>
havenwood: is pry being maintained anymore?
<havenwood>
al2o3-cr: kyrylo maintains it these days.
<havenwood>
al2o3-cr: i did a PR for 2.7 to ruby-doc, and kyrylo merged it
ellcs1 has joined #ruby
<havenwood>
al2o3-cr: he's not moving super fast but did merge stuff for 2.7. I think he needs to cut a release.
mossplix has quit [Remote host closed the connection]
<al2o3-cr>
why have i never knew about 'specific_install'
* al2o3-cr
hangs head in shame
<pothibo>
Hello :) We're having a memory issue in one of our code path, and I'm trying to locate it. I did a ObjectSpace.dump_all() call and I'm currently trying to load, in the same instance, the object at one of the address using Object._id2ref() but for some reason all the address I'm using are out of range. Is there soemthing I need to do to those
<pothibo>
address to make them work with id2ref?
ewanchic has joined #ruby
MrCrackPot has quit [Quit: Leaving]
sarink has joined #ruby
alfiemax has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
phaul_ has quit [Ping timeout: 265 seconds]
<al2o3-cr>
pothibo: i wouldn't rely on ObjectSpace#dump_all
wildtrees has joined #ruby
MrCrackPot has joined #ruby
<al2o3-cr>
but anyway, passing memory reported by ObjectSpace#dump_all to Object._id2ref requies bit shifting right by 1
MrCrackPot has quit [Remote host closed the connection]
<al2o3-cr>
*ObjectSpace._id2ref
alfiemax has joined #ruby
xco has joined #ruby
<al2o3-cr>
uh, something must of changed
Ai9zO5AP has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
sarink has quit [Remote host closed the connection]
sarink has joined #ruby
mossplix has joined #ruby
sarink has quit [Ping timeout: 240 seconds]
AndyAndyBoBandy has quit [Quit: HUMAN DESTROYED]
robscomputer has joined #ruby
mikecmpbll has joined #ruby
<pothibo>
al2o3-cr: I did try that and it didn't work :( I guess this is an arcane part of the code that isn't really used by ruby dev
<hramrach>
hello
<hramrach>
how do you debug #9 test_autoload.rb:54:in `<top (required)>': wrong argument type Class (expected Array) [ruby-core:21696]
<ewanchic>
Hey, good day! So, I've got some general questions. 1st, I'm wondering if I should use github for my sourcecode, gitlab, or something else completely. Since MS purchased github, I see there is a small movement to migrate to gitlab. What do you all believe?
<SegFaultAX>
TIL about the proposed deprecation of object_id
<adam12>
havenwood: With Github Actions supporting self-hosted runners I might actually switch back from GH.
<adam12>
havenwood: s/GH/GL/
<cvz>
So I have a hash looking like {:name => "testname", :value => "testval"} and when I print it it looks like this. However when I pass it to another function and print it th ere, it looks like this {"name" => "testname", "value" => "testval"} what makes that happen?
<adam12>
cvz: Possibly a few different things. First off, you're 100% sure it's a Hash and not something from ActiveSupport?
<SegFaultAX>
Something calling #stringify_keys (or similar) on your hash, perhaps.
heth has quit [Read error: Connection reset by peer]
<SegFaultAX>
Yea or a HashWithIndifferentAccess or whatever it's called.
<cvz>
adam12: I am generating it myself in a unit test. test_val = {:name => "testname", :value => "testval"}
<adam12>
cvz: And the method you're calling, you're looking at the object immediately inside it?
pothibo has quit [Remote host closed the connection]
<cvz>
Its possible that I am not. It is a Sidekiq thing, after declaring it I run "worker.perform_async test_val"
spacesuitdiver has joined #ruby
<adam12>
cvz: Ah. Sidekiq marshalls to JSON I believe when going from app -> worker
<cvz>
and I output the variable directly at the top of the perform action, but I guess its possible its been somewhere else before it gets there
<SegFaultAX>
Oh. Then it's probably the round trip across serialization
<adam12>
cvz: When marshalled back, symbols come back as strings.
<cvz>
ah I see. Okay so I have to come up with some other way to test this then
<adam12>
cvz: Just create test_val with string keys.
<cvz>
In the function I am testing, it gets symbols from the live system
<adam12>
cvz: The sidekiq job gets symbols?
lxsameer has joined #ruby
conta1 has quit [Quit: conta1]
mossplix has joined #ruby
<cvz>
I am getting a list of Workers from Sidekiq::Statistic, and the output looks like this
<ruby[bot]>
cvz: 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
<cvz>
So the function parses that output and gets some of the values, so in my test, since I have no workers, I figured I could supply a dummy output for it to parse
<ewanchic>
Does anyone use RSS anymore? Is it still useful for Ruby gems? is so, what would I use it for?
<ewanchic>
oh..I guess I'm seeing that Rubygems.org autogenerated the atom for me. I feel foolish. I guess I don't need to worry about this then.
<al2o3-cr>
ewanchic: don't feel foolish, it's a valid question. :)
<al2o3-cr>
SegFaultAX: good bags.
<al2o3-cr>
why is this not evaluatin in pry: %w(a b c) * ?,
<al2o3-cr>
*evaluating
<leftylink>
weird.
ellcs1 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
mossplix has quit [Remote host closed the connection]
<adam12>
ewanchic: RSS for blog? If it's Ruby related it's probably easier to get on one of the planet sites like rubyland.news.
<adam12>
ewanchic: (with RSS support vs not having it)
<adam12>
evdubs: For me, RSS kinda died with Google Reader but I still use RSS a lot with IFTTT
<adam12>
err, ^ ewanchic
<al2o3-cr>
&>> require 'json'; require 'objspace'; JSON.parse(ObjectSpace.dump(self), symbolize_names: 0).then { |h| case h; in address:; address.hex end }
<rubydoc>
# => 94361142467960 stderr: -e:4: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby! (https://carc.in/#/r/8i9v)
fphilipe has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has joined #ruby
<ewanchic>
adam12: I'm trying to start off on a good foot with a new Gem I've been developing; to make it public. Under the 'Links' section for the gem (Rubygems.org) there is a link for RSS. Just wondering if I needed to keep up on this or not. But, it appears when I push a gem up, the .atom file is autogenerated for me. So maybe I don't need to worry about this at all. However, I did not know anything about rubyland.news. Thank you!
fphilipe_ has quit [Ping timeout: 265 seconds]
<adam12>
ewanchic: Ah nope. That's handled by Rubygems. You can add more Links through Gem metadata if you want, but Rubygems handles some for you.
<adam12>
ewanchic: I like Rubyflow too, if you're looking for news sites.
<ewanchic>
adam12: Really? I didn't know I could add more links. That's cool. I will definitely look into that.
timmow_ has joined #ruby
<hramrach>
nevermind, I did not initialize a variable so it was NULL instead of Qnil
<hramrach>
and I did get nice segfault when running outside of the ruby testsuite
<ewanchic>
adam12: I'm debating on whether to use gitlab/github. Maybe I should use both (maybe thats overkill). My mind was a bit swiss-cheesed last night. It's getting better, but I just need to start and do a little everyday.
<ewanchic>
adam12: so the custom links would help with that.
dan64 has joined #ruby
cisco has joined #ruby
<adam12>
ewanchic: Github is king of OSS right now (good or bad). I hardly ever look at OSS on Gitlab outside of a few niche pieces. I don't find Gitlab spent too much time on discoverability.
cisco is now known as Guest96095
<adam12>
ewanchic: I use Gitlab for personal projects because I could bring my own CI runners.
<hramrach>
also if either provides git mirroring you can get a backup for free
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
<adam12>
Gitlab supports easy Github mirroring. It will also interact with the Github API for CI results if you're using Gitlab's CI.
<ewanchic>
Mirroring is another cool thing I didn't know they had. This would be for public use, both ways. I have my own personal server that I run a copy of gitlab from, so I'm covered for the personal stuff.
shah^ has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo28 is now known as alexherbo2
shah^ has joined #ruby
alex`` has joined #ruby
Guest96095 has quit [Ping timeout: 240 seconds]
cisco has joined #ruby
cisco is now known as Guest32082
s3nd1v0g1us has joined #ruby
ur5us has joined #ruby
brool has quit [Quit: WeeChat 2.7]
mossplix has quit [Remote host closed the connection]
Guest32082 has quit [Ping timeout: 265 seconds]
rat_melter has joined #ruby
schne1der has quit [Ping timeout: 240 seconds]
rat_melter has left #ruby ["WeeChat 2.7"]
markopasha has joined #ruby
e21 has joined #ruby
falconfox has joined #ruby
wald0 has joined #ruby
cisco_ has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
im0nde has joined #ruby
wald0 has joined #ruby
im0nde_ has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
sarink has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 268 seconds]
markopasha has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
cd has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
cisco_ has quit [Ping timeout: 265 seconds]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
cisco_ has joined #ruby
wald0 has joined #ruby
e21 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wald0 has quit [Read error: Connection reset by peer]
cisco_ has quit [Ping timeout: 240 seconds]
wald0 has joined #ruby
wald0 has quit [Client Quit]
e21 has joined #ruby
greengriminal has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ratah has quit []
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sarink has joined #ruby
sarink has quit [Remote host closed the connection]
sarink has joined #ruby
sarink has quit [Remote host closed the connection]
fig-le-deunch has quit [Quit: Konversation terminated!]
Helenah has joined #ruby
fig-le-deunch has joined #ruby
Guest13850 has quit [Ping timeout: 265 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
spacesuitdiver has joined #ruby
wallace_mu has quit [Ping timeout: 265 seconds]
sarink has quit [Remote host closed the connection]
sarink has joined #ruby
<howdoi>
where in production did you last use `<=>` ?
gnufr33d0m has joined #ruby
<leftylink>
I see that the responses from "2020-01-14 19:43:33 < howdoi> when was the last time you used the space ship operator in production code?" were not good enough... I will see if I can contribute a response as well and if it can be helpful
<howdoi>
leftylink: wow! ok, so I had asked it here, I was wondering were it was, do you have logs handy? [I recall few folks has suggested about Date/Time related use cases]
<leftylink>
the /topic has logs handy.
<havenwood>
howdoi: You define it in your own class when you include Comparable.
tryhard211 has joined #ruby
mossplix_ has joined #ruby
<havenwood>
howdoi: I use it whenever a custom class can be compared via >, >=, <, <=, ==, !=, and friends.
<howdoi>
havenwood: but very less of occurrences in production code, right?
<adam12>
tbf, I don't think I saw the first time it was asked.
<havenwood>
howdoi: I use it in production code.
<adam12>
howdoi: It's implemented in a lot of places you're using it and not aware of it.
<havenwood>
howdoi: It doesn't come up often if you're not writing your own classes.
<leftylink>
as for where I last used it, I had a Struct (let's pretend I called it Widget), I needed an array of Widgets sorted
<howdoi>
adam12: curious to collect few of them or to derive a pattern
tryhard21 has quit [Ping timeout: 260 seconds]
<adam12>
howdoi: But unless you're going out of your way to sort/collect specific classes of your own creation, you likely wouldn't see it.
<havenwood>
howdoi: You don't use it directly, but you define it fairly often.
nowhere_man has joined #ruby
<havenwood>
(If you make your own classes and instances are comparable.)
<howdoi>
nods, if we were to categorize a set of problems where this is applicable, we can say it for ________
<havenwood>
howdoi: making your own class where instances of that class are compared.
<havenwood>
is this homework?
<phaul>
as a non production case, that's merely a code foo, I would like to point out the rather cryptic a = 1; b = 2; [:equal, :greater, :less][a <=> b] trick
<howdoi>
generic monads?
<adam12>
howdoi: Only once that I'm aware of in the last few years. And I used it directly (not implemented).
<howdoi>
havenwood: no part of research for a language spec
<leftylink>
is it relevant to mention the analogous concept in other languages, or must this only be restricted to Ruby... if other languages are also relevant to the discussion, the analogous for a different language is https://doc.rust-lang.org/std/cmp/trait.Ord.html
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
twobitsprite has joined #ruby
<howdoi>
leftylink: cool, C# has something similar too
<havenwood>
howdoi: That's ^ where RubyGems defined #<=> for Gem versions.
<howdoi>
phaul: cool!
<howdoi>
havenwood: thanks!
<howdoi>
:-)
<howdoi>
looks, like many langs have it, but there is no particular name or a solid name for this pattern
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
shah^ has joined #ruby
wildtrees has joined #ruby
<phaul>
pattern in many OO languages are undesrstood as mixin. You define one method and the mixin included defines a bunch of convinience methods for you
<phaul>
hence the name mixin, as you mix it into to the including class
wildtrees has quit [Max SendQ exceeded]
<havenwood>
The three-way comparison operator is in a fair number of langs as a spaceship.
<havenwood>
twobitsprite: $_ is "The last input line of string by gets or readline. Thread and scope local."
Exuma has joined #ruby
<havenwood>
twobitsprite: Ruby adopted a lot of Perlisms.
<Eiam>
x = _ is one of my most used things in pry lol
turbo_choo has joined #ruby
<havenwood>
phaul: #!> stack level too deep (SystemStackError)
<Eiam>
"yeah, whatever that was, hold onto it please!"
<phaul>
oh. then I messed it up. something along those lines :)
<twobitsprite>
havenwood: right, which is why I'm wonding how much they're like perlisms... i.e, can I do something like: while gets; s/foo/bar/; puts; end ?
<howdoi>
havenwood: ah ha
<twobitsprite>
or do I have to explicitly do $_.gsub(...)?
VlanX has joined #ruby
Helenah has quit [Read error: Connection reset by peer]