bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
alfiemax has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
d3bug has joined #ruby
ur5us has joined #ruby
Intelo has quit [Ping timeout: 256 seconds]
Fridtjof has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
Arkantos has joined #ruby
drincruz has joined #ruby
<apotheon>
I had the misfortune of stumbling across a "jumpstar labs" tutorial about the Sequel gem.
<apotheon>
It's . . . stupid.
<apotheon>
It seems maliciously stupid.
braincrash has quit [Quit: bye bye]
<havenwood>
apotheon: No HTTPS, check.
drincruz has quit [Ping timeout: 260 seconds]
<apotheon>
s/jumpstar/jumpstart/
<apotheon>
havenwood: Oh, that too.
<apotheon>
I meant the tutorial itself.
<havenwood>
apotheon: I doubt it's in bad faith.
<apotheon>
There's this facile "here's your require" and "this is how you use raw SQL with a couple of methods", then there's the facile "here are some more Rubyish methods that essentially map one-to-one to SQL" . . .
<apotheon>
. . . then there's this:
<apotheon>
heading: Full ActiveRecord-style ORM
<apotheon>
the entire section: If you’re going to use the ActiveRecord-style mappers, maybe you should just use ActiveRecord.
<apotheon>
end of tutorial
<apotheon>
I thought "It might be nice to look at someone's example code. I haven't touched Sequel in four years or so."
<apotheon>
nope, not there
<apotheon>
I mean . . .
<apotheon>
That's just miserable.
<apotheon>
I guess it's probably not in bad faith, per se, but . . . wow.
braincrash has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
<apotheon>
havenwood: I *just now* realized that Sequel and Roda were evidently created by the same person.
<apotheon>
I saw the name "Jeremy Evans" on some Roda-related stuff and thought "Wait. I know that name."
<havenwood>
apotheon: Sequel is maintained by Jeremy Evans and Roda was created and is maintained by him. He's also a Ruby core committer.
<apotheon>
Yep. I've seen his name around a bit, for those reasons (and others, I think). I just hadn't noticed Jeremy Evans was responsible for Roda until now.
<havenwood>
apotheon: Ah, nice.
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apotheon>
Given my warm fuzzies about Sequel in the past, it (perhaps a little irrationally) makes me feel a tiny big more inclined to use Roda for a project I'm contemplating.
<apotheon>
I'm now officially on the horns of a dilemma.
<apotheon>
I was thinking "I mean, Roda seems cool and all, but really I expect I'll just use Rails."
greypack has joined #ruby
caterfxo has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
aphprentice__ has quit [Quit: Connection closed for inactivity]
jingjinghack has joined #ruby
mozzarella has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 256 seconds]
mozzarella has joined #ruby
mozzarella has quit [Remote host closed the connection]
dinfuehr has quit [Ping timeout: 265 seconds]
gix has quit [Disconnected by services]
mozzarella has joined #ruby
dinfuehr has joined #ruby
caterfxo has quit [Ping timeout: 240 seconds]
buckworst has quit [Quit: WeeChat 2.7.1]
xco has joined #ruby
ritalinona has quit [Max SendQ exceeded]
ritalinona has joined #ruby
polishdub has quit [Quit: leaving]
caterfxo has joined #ruby
caterfxo has quit [Client Quit]
caterfxo has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
Sauvin has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brool has quit [Ping timeout: 240 seconds]
markopasha has joined #ruby
<pyrmont>
apotheon: I still like Sinatra if all you want is a lightweight framework that sits on top of Rack.
alfiemax has quit [Remote host closed the connection]
burningserenity has quit [Ping timeout: 258 seconds]
conta has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
burningserenity has joined #ruby
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
pandakekok9 has quit [Quit: leaving]
jmcgnh has quit [Read error: Connection reset by peer]
consti has joined #ruby
conta has quit [Quit: conta]
banisterfiend has joined #ruby
lucasb has joined #ruby
jmcgnh has joined #ruby
duderonomy has joined #ruby
bvdw has quit [Quit: bvdw]
bvdw has joined #ruby
pupsikov has joined #ruby
chalkmonster has joined #ruby
consti has quit [Quit: consti]
impermanence has joined #ruby
ExoUNX has joined #ruby
ua has quit [Ping timeout: 246 seconds]
ExoUNX has quit [Ping timeout: 240 seconds]
impermanence has quit [Remote host closed the connection]
nofxx_ has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
akem_ has joined #ruby
ua has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Junaos has quit [Ping timeout: 264 seconds]
nchamber- has joined #ruby
nchambers has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
Junaos has joined #ruby
cranq has quit [Ping timeout: 264 seconds]
shansen has quit [Ping timeout: 264 seconds]
<apotheon>
pyrmont: I like Sinatra, too. I've written several web applications using it.
shansen_ has joined #ruby
jetchisel has quit [Ping timeout: 264 seconds]
akem has quit [Ping timeout: 264 seconds]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
cranq has joined #ruby
jetchisel has joined #ruby
<apotheon>
pyrmont: I'm looking at creating an ecommerce web application that integrates with a POD API to create kind of a collection of sub-shops, basically. On one hand, I like simpler frameworks (I know, Sinatra's not exactly a "framework", but what's the parent set for "framework" and "web application DSL" subsets?). On the other hand, I just wanna build the thing and not reinvent any wheels in this
<apotheon>
case.
cockadopolous has quit [Quit: leaving]
<apotheon>
pyrmont: Perhaps amusingly, I feel like I might take the opposite of the usual route -- start by building it in Rails, then eventually rewrite it using something like Roda or Sinatra (that is, move from "big, Enterprise thing" to "small, somewhat bespoke thing").
<adam12>
Rails is obviously a super complete package. If Sequel was more of a first-class citizen on it I might say it would be the better option.
<adam12>
I've been using Roda full time for ~ 3 years now. It's great but there's definitely rough edges. And tbh, I miss having a global list of routes.
dhollinger has quit [Ping timeout: 260 seconds]
<pyrmont>
apotheon: Yeah, that app sounds complex enough that something like Sinatra might be 'too simple' as it were.
chalkmonster has quit [Quit: WeeChat 2.7.1]
<apotheon>
too simple to feel like I want to put in the extra work in this case, anyway
NODE has quit [Quit: changing servers]
NODE has joined #ruby
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
conta has joined #ruby
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
dhollinger has joined #ruby
OverClocked has quit [Ping timeout: 250 seconds]
titanbiscuit has quit [Ping timeout: 250 seconds]
titanbiscuit has joined #ruby
ldepandis has quit [Read error: Connection reset by peer]
meinside has quit [Quit: Connection closed for inactivity]
roadie has joined #ruby
cschneid has quit [Ping timeout: 258 seconds]
cschneid has joined #ruby
Arkantos has joined #ruby
vdl has quit [Quit: WeeChat 2.3]
vdl has joined #ruby
TorpedoSkyline has joined #ruby
TorpedoSkyline has quit [Client Quit]
burningserenity has quit [Ping timeout: 240 seconds]
cthu| has joined #ruby
TCZ has joined #ruby
DTZUZU2 has quit [Ping timeout: 250 seconds]
DTZUZU2 has joined #ruby
brool has joined #ruby
burningserenity has joined #ruby
ChmEarl has joined #ruby
banisterfiend has joined #ruby
dylanf has joined #ruby
<dylanf>
Hi all :waves:
<dylanf>
I'm trying to do Something Clever that I'm convinced is within the realm of Ruby's possibilities, but can't quite figure it out. Is there a way to get the parent class of a calling method?
<dylanf>
Eg. right now I've got a method in one class that calls a method in another class. From the inside of that latter method, I can get the _name_ of the calling method pretty easily with `caller` or `caller_locations`.
<dylanf>
But I can't for the life of me figure out how to get that calling method's parent, except maybe by just inferring it from the filename.
postmodern has joined #ruby
<adam12>
dylanf: Maybe through binding_of_caller
Emmanuel_Chanel has joined #ruby
conta has quit [Quit: conta]
<adam12>
dylanf: Tho it might be a slow path so I'd be wary about where you put it.
<dylanf>
Hmm. Yeah, I'd rather avoid pulling in dependencies for this. Might just not bother.
sergioro has joined #ruby
yelloB has joined #ruby
yelloB has quit [Remote host closed the connection]
wildtrees has joined #ruby
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
conta has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
<havenwood>
dylanf: By parent do you mean its class?
wildtrees has quit [Remote host closed the connection]
conta1 has joined #ruby
conta has quit [Ping timeout: 264 seconds]
conta1 is now known as conta
<havenwood>
dylanf: How about?: method(__callee__).owner
<havenwood>
Ah, parent class as in ancestry. Gotcha.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
method(__callee__).owner.ancestors
<havenwood>
Maybe I'm misunderstanding the question. I should just not check IRC until *after* first cup of coffee. :P
conta has quit [Ping timeout: 256 seconds]
troulouliou_div2 has joined #ruby
caterfxo has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
troulouliou_div2 has quit [Ping timeout: 240 seconds]
<ruby[bot]>
t0th_-: 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
<havenwood>
t0th_-: make: g++: Command not found
<havenwood>
t0th_-: What distro are you on?
<havenwood>
t0th_-: You need to install build tools.
<adam12>
Ruby on CentOS 8 has been a pleasant surprise. `yum module enable ruby:2.6 && yum install ruby`
jinie has quit [Ping timeout: 240 seconds]
jinie has joined #ruby
ExoUNX has joined #ruby
t0th_- has quit [Remote host closed the connection]
TomyWork has quit [Quit: Leaving]
xco has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
Azure has joined #ruby
consti has joined #ruby
<dylanf>
havenwood: no worries :) I ended up just changing the calling method signature to pass in `binding`.
consti has quit [Client Quit]
<dylanf>
havenwood: thanks though :D
chalkmonster has quit [Quit: WeeChat 2.7.1]
ExoUNX has quit [Ping timeout: 256 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Sauvin has quit [Read error: Connection reset by peer]
kevinburke has joined #ruby
chalkmonster has joined #ruby
sagax has quit [Read error: Connection reset by peer]
wildtrees has joined #ruby
cliluw has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
alfiemax has joined #ruby
wildtrees has quit [Remote host closed the connection]
cliluw has quit [Quit: Leaving]
rmnull has quit [Quit: WeeChat 2.7.1]
cliluw has joined #ruby
duderonomy has quit [Remote host closed the connection]
duderonomy has joined #ruby
alfiemax has quit [Remote host closed the connection]
sergioro has quit [Quit: leaving]
sergioro has joined #ruby
d3bug has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
TzilTzal has quit [Quit: Leaving.]
ChmEarl has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
rippa has joined #ruby
GodFather has joined #ruby
dasher00 has joined #ruby
vondruch has quit [Ping timeout: 250 seconds]
chalkmonster has joined #ruby
wildtrees has joined #ruby
<sergioro>
Hi, i'm using "ENV['EUID']==0" to check if a ruby script is run by root. This only works if export EUID in bash session. How to check if a script is run by root, without using environment variables?
Scriptonaut has joined #ruby
wildtrees has quit [Remote host closed the connection]
<dylanf>
sergioro: it's not a _great_ way but you could `system("whoami")` or something. I suspect env vars are the right way to go, but that you don't want EUID. Try USER instead.
<xco>
havenwood will you help me fix the emoji issue with the terminal-table gem?
<havenwood>
xco: They don't implement it themselves.
<sergioro>
dylanf and havenwood: thanks, Process.euid worked for me.
<havenwood>
sergioro: you're welcome
jmcgnh has quit [Ping timeout: 250 seconds]
chalkmonster has joined #ruby
<havenwood>
xco: I'd first check if it works in the 2.0 release candidate.
<xco>
havenwood but how would i do that?
jmcgnh has joined #ruby
<havenwood>
xco: You can either git clone, git branch, gem build, gem install or use the specific_install plugin for RubyGems: https://github.com/rdp/specific_install
cschneid has joined #ruby
<xco>
oh so using specific_install i can redirect my gem to use a modified version of terminal-table?
cschneid_ has quit [Ping timeout: 250 seconds]
brendan- has quit [Ping timeout: 240 seconds]
<xco>
i thought i should be directing my gem to use a specific version of unicode-display_width
<havenwood>
xco: I meant to use it to check if the problem is resolved in 2.0.0-rc2.
<havenwood>
xco: This gem's `emoji: true` option makes them all size 2.
<havenwood>
xco: Which I'd have expected to work, so unclear why it's not offsetting. Seems like a terminal issue. I've seen odd spacing with emoji in terminals before.
<havenwood>
xco: We should check if it's broken on all terminals or just yours.
<xco>
should i prepare code for you to check on your machine?
<havenwood>
xco: Perfect.
<xco>
sec
<havenwood>
We can try in a few terminals with a few fonts and sanity check.
<havenwood>
xco: I suspect it's displaying two wide but only indenting one wide.
seydar has joined #ruby
<seydar>
is there a community consensus on an alternative to (n)curses?
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
_whitelogger has joined #ruby
_whitelogger has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
russt has quit [Quit: That's all, folks!]
russt has joined #ruby
arcaos has joined #ruby
russt has quit [Client Quit]
russt has joined #ruby
<howdoi>
When was the last you checked if two arrays were equal in your production code?
brendan- has quit [Ping timeout: 240 seconds]
brendan- has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
cschneid_ has joined #ruby
<leftylink>
ah, it's too bad adventofcode.com doesn't count as production code, because that was a time when I clearly checked whether two arrays were equsl
<leftylink>
I will not be enumerating all the days in which I did that, but at the very least, in day 22, I did.
<phaul>
what are the pitfalls of comparing arrays for equality?
<leftylink>
well, at least we've moved on from the spaceship operator.
<havenwood>
howdoi: I'm on parental leave so I have no production code, but it's common to compare Arrays.
<leftylink>
2020-01-14 19:43:33 < howdoi> when was the last time you used the space ship operator in production code?
<leftylink>
(referring to that)
<phaul>
rings a bell :)
<leftylink>
one of the things you learn about leftylink after being in the same channel for a while: leftylink holds grudges
<howdoi>
leftylink: no, I haven't :D
<havenwood>
howdoi: Twoquals is properly in common useage.
<howdoi>
I am build a case
<howdoi>
from equals, to compare to spaceship
<howdoi>
leftylink: never forgets me :D [happy to have such a friend]
* leftylink
nods
<havenwood>
howdoi: The spaceship operator is used much less frequently than twoquals. The former is used when you're defining your own class that's comparable. The latter is used frequently and not just when defining your own class.