<leftylink>
from that, it is possible to infer that `response` in the above is not the same as the result of the curl. the next step then is to figure out what it is instead.
<havenwood>
This is a case of HTTParty partying too hard.
<havenwood>
pwnd_nsfw: The response isn't a String.
<pwnd_nsfw>
:O
<pwnd_nsfw>
my god he's right
<havenwood>
pwnd_nsfw: #to_h :)
BSaboia has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
<pwnd_nsfw>
So, response in that context, in the block, is a ResponseFragment. So, I was using the block incorrectly as well. All remedied though. Thanks for your help leftylink, and as always havenwood
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mataleao has joined #ruby
<mataleao>
Rack::Test::Methods What is that :: notation? What does it mean?
evdubs_ is now known as evdubs
gix has quit [Ping timeout: 265 seconds]
<havenwood>
mataleao: It's syntax for a namespace between constants.
renich has quit [Remote host closed the connection]
renich has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
BSaboia has quit [Remote host closed the connection]
chalkmonster has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
howdoi has quit [Quit: Connection closed for inactivity]
renich has quit [Ping timeout: 256 seconds]
roadie has joined #ruby
ScottFrancis has joined #ruby
ScottFrancis has quit [Quit: Leaving]
roadie has quit [Ping timeout: 272 seconds]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
chalkmonster has joined #ruby
polishdub has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
orbyt_ has joined #ruby
greypack has quit [Quit: All your IRC are belong to ZNC]
alfiemax has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
Dirak has joined #ruby
<Dirak>
Is there a way I can verify that a file is valid ruby?
<Dirak>
I keep making small typos that lead to bugs that take a while to detect via rails console
<leftylink>
I think there was some command line flag to ruby that did that.
<leftylink>
I hope I remembered correctly about that
<havenwood>
Dirak: -c
xorl has joined #ruby
<havenwood>
(For a syntax check only.)
xco has joined #ruby
<havenwood>
It can still miss typos easily enough though.
<havenwood>
ruby -c -e "borked" #>> Syntax OK
x0f_ has joined #ruby
x0f has quit [Ping timeout: 260 seconds]
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apotheon>
havenwood: You don't even need quotation marks.
<havenwood>
Dirak: You'd get more with a linter or better yet type checker.
<havenwood>
apotheon: I use them out of Bashism habbit. (I guess I fear I may myself omit the argument? >.>
<Dirak>
Is it kosher to name variables in Japanese if your codebase is Japanese?
<havenwood>
Dirak: You can name variables in your language of choice.
<apotheon>
havenwood: If you start including special characters or spaces in your Ruby code passed to -e, you should definitely quote it.
<havenwood>
apotheon: I just quote bash args.
<apotheon>
In fact, I'd generally go for 'single quotes' to avoid Bash interpolation.
<havenwood>
apotheon: Funny, I go the opposite direction in quote preference in Bash that I do in Ruby.
<apotheon>
hmm
<apotheon>
dunno what to say
<havenwood>
Default to one, use the other for *reasons*.
<apotheon>
It's bedtime. That's what I should say.
<havenwood>
apotheon: When in Rome.
<apotheon>
G'night!
<havenwood>
Bonum nocte!
nicholaslyang has joined #ruby
Furai has quit [Quit: WeeChat 2.8]
<Dirak>
W00T! Got the rubocop extension working in VSCode
<Dirak>
Now files take 2 seconds to save! :D :D:D:D:D
<leftylink>
however, the worst time is when I need to insert a env var into a ruby thing I'm executing with -e... hmm, no, that's not the worst time...
polishdub has quit [Quit: leaving]
<leftylink>
the worst time is when I'm inserting an env var into JSON I'm pretty sure
<Dirak>
ah at least I get linting. That's pretty nice
alfiemax has quit [Remote host closed the connection]
conta has joined #ruby
roadie has joined #ruby
alfiemax has joined #ruby
duderonomy has quit [Ping timeout: 258 seconds]
rapha has joined #ruby
<rapha>
hi all
<adam12>
rapha: hiya
duderonomy has joined #ruby
<rapha>
is there something like Python's "Spyder" IDE also for Ruby, where you can have plots and graphics directly embedded in your commandline? perhaps something utilitzing pry or so?
<rapha>
hey adam12 :)
<adam12>
rapha: tty-pie but that's limited to pie charts only.
<adam12>
Actually maybe I misunderstand what you're looking for.
<rapha>
hmm
<rapha>
sounds like you're understanding correctly
<rapha>
except that i would be interested in more than pie charts
<rapha>
chiefly x-y-plots and such
<adam12>
rapha: Are you looking for command line or IDE? Looking at Spyder at a glance, it seems to be an IDE?
<adam12>
tty-pie would be for building your own tools.
<rapha>
adam12: yes, Spyder is an IDE. I would much prefer to have something that works on the command line - but for that, the terminal emulator has to support graphics in the first place. And yes, I'd love to have something ready-made. I.e. "require 'csv'; plot CSV.read('data.csv').map{|row| [r['timestamp'], r['sensor_value']}" or whatever and an x-y-plot appears after the command, and then a prompt again.
* rapha
checks out tty-pie
duderonomy has joined #ruby
orbyt_ has joined #ruby
<apotheon>
rapha: If you find something, let us know. I'm curious.
<apotheon>
rapha: Please highlight me if/when you find something, too, if you don't mind. Alas, I don't have any suggestions.
poro has quit [Quit: Leaving]
<rapha>
adam12: tty-pie is really cute tho :)
<apotheon>
rapha: It might be easier to get something that launches a simple GUI window in the X Window System to display the graphics, rather than displaying them directly in the terminal emulator, though.
<apotheon>
(or something that uses something like the WebKit rendering engine)
<rapha>
and i found out that w3m (the web browser) somehow manages to render images into a terminal (or perhaps that only works on a true VT? haven't gotten it to work yet)
<apotheon>
Oh, a Python thing.
<apotheon>
Yeah, w3m can render images. I'm not sure how it does it.
<rapha>
yeah, but a Python _thing_ is better than a Python _IDE_ :P
<apotheon>
I guess you could generate an image and load it in w3m as your renderer.
<leah2>
w3m has a tool that writes on the x11 screen of the terminal emulator
<rapha>
leah2: so basically, they're cheating?
<leah2>
a lot :)
<rapha>
apotheon: that sounds like a feasible idea
<apotheon>
What kind of "tool"?
<leah2>
/usr/lib/w3m/w3mimgdisplay
<apotheon>
I was just thinking of saying something about w3m when you mentioned it, actually.
<rapha>
so there is very active work going on here
DaRock has quit [Ping timeout: 258 seconds]
vondruch has quit [Ping timeout: 240 seconds]
MasterNayru has joined #ruby
conta has quit [Quit: conta]
pizzaiolo has joined #ruby
<rapha>
okay, even with libsixel freshly built. libsixel-ruby won't work because of missing symbols. weird.
<rapha>
apotheon: does it work for you?
hiroaki_ has quit [Ping timeout: 256 seconds]
ChmEarl has joined #ruby
pizzaiolo has left #ruby ["Leaving"]
gray_-_wolf has quit [Quit: WeeChat 2.8]
<adam12>
If you're not opposed to an sdl dependency, there's always `graphics` from zenspider.
<apotheon>
I haven't tried it.
<apotheon>
rapha:
<apotheon>
rapha: Right now, I'm working on some of my vehicles' needs at home.
<rapha>
oh okay
<rapha>
vehicles ... plural
<apotheon>
pickup and motorcycle at the moment
<rapha>
oh cool what kind of motorcycle?
<apotheon>
There's a problem with the wire running from a relay to the starter on the pickup. I'm hoping it's just some buildup in the plug that'll go away with judicious application of some cleaner.
* rapha
is still dreaming about getting a motorcycle license at some point in his life
<apotheon>
This particular motorcycle is a post-apocalyptic wasteland mutant that used to be a 2000 Buell Blast.
* rapha
googles
roadie has joined #ruby
<apotheon>
rapha: Have you ridden before (e.g. a dirt bike or some other thing that doesn't require a license to get away with it)?
<rapha>
oh, that looks like it's a nice roadtrip bike
<apotheon>
It's not a very fast bike, so I wouldn't recommend it for interstate travel.
<rapha>
yes, apotheon, during an offroad fair/convention (weekend thing) some international-dirtbike-rockstar-guy let me teach myself how to ride on his KTM in exchange for me letting him cruise around with my boss's offroad segway. we both had fun :)
<apotheon>
It's pretty nimble, though, and the neutral seating position is good for longer rides. With a decent seat, it can even be somewhat comfortable, but being a single-cylinder (what they often call a "thumper") with a pretty big cylinder it vibrates a bit, so a bad seat can make it unfun after a while.
<apotheon>
rapha: That sounds awesome.
<apotheon>
Cool, you can already ride somewhat. That makes it easier.
<rapha>
"interstate travel" with a motorbike in germany usually means "200km before noon, let's have lunch somewhere, we'll be back by 4pm if we only take the nice backwards roads"
<apotheon>
I recommend taking a class, anyway. I'm actually thinking of taking a class (again) even though I've been riding off and on since the '80s, and took a class at one point around twenty years or so ago.
<rapha>
yes, i think i would mainly need to get used to the shifting and clutching for a few days, then i'd be fine. but atm i don't have the ~1.5k€ for a license.
<apotheon>
I mean "interstate" as in the US federal Interstate Highway system.
<rapha>
oh, okay. well yeah, Autobahns are also uncomfortable without something that puts a shield in front of your nose
<apotheon>
Something like the Blast gets less fun over 65MPH (or something approaching 100KPH, if I recall the ratios properly).
<apotheon>
The other bike I have is more suitable to interstate highway speeds, even without a fairing, but it's presently partially disassembled for work on its carburetors.
<apotheon>
I'm just not dealing with that bike today.
<apotheon>
The gap under the tank, behind the cylinder block, is where there used to be a big airbox for the intake. I replaced that with an air filter assembly bolted directly onto the carburetor. You can see the filter assembly at the top of the gap.
<rapha>
in my late childhood / early youth my uncle used to take me with him on day or multi-day trips ... first on his Transalp, later on a BMW 1200GS ... loved everything about it EXCEPT the autobahn rides. you usually try to quickly get those over with, so, on the GS that meant 110-120mph for an hour straight. you stop feeling your ass at some point.
<rapha>
oh, so you wanted to coax some more oomph out of it?
<apotheon>
somewhat-aerodynamic windshield plus bodywork to protect the rider from wind
<rapha>
ah, okay, what i called "shield". sorry, not well-versed in english vehicle stuff terminology
<apotheon>
I wanted to lighten the bike and give it a little more get-up-and-go, yeah. The carburetor has been rejetted, that exhaust is aftermarket, and a guy I knew ported, polished, and decked the head for me to get better valve flow and compression.
<apotheon>
no problem, re: terminology
vondruch has joined #ruby
<apotheon>
The custom seat and bar-end mirrors currently on it were put there by the previous owner. I definitely plan to replace the seat with a better aftermarket seat. I might replace the mirrors (and the handlebar, for that matter).
<apotheon>
There's other stuff I'm still planning to change, like changing the tail stuff (lights, license plate holder), bolting ammo cans on the sides of the frame for cargo, new lights elsewhere, and so on.
TCZ has joined #ruby
<rapha>
apotheon: this would be my dream bike https://en.wikipedia.org/wiki/Yamaha_XTZ_750 ... there's still quite well-preserved ones to be had nowadays for 1k-3k€ depending on condition
<apotheon>
Chain drives are the most high-maintenance, but their relative lack of flex makes them better for performance than belt, and their lighter weight (and some other friction-related reasons) make chains better for performance than shaft drives.
<rapha>
hmm
<rapha>
never saw a shaft-drive motorbike here
<rapha>
perhaps they're just not popular
<apotheon>
That top box might be good for road trips with a passenger.
<rapha>
most you see standing around are chain
<apotheon>
Yeah, chains are much more common these days.
<apotheon>
They might've always been more common.
<rapha>
i was taught that any passenger has to learn to keep their hands behind themselves.
<rapha>
side boxes + top box is nice, also. especially for camping trips w/ the gf.
<apotheon>
That's the bike that's current down for carburetor work, tentatively named "The Spook". I'm not sure whether I like that name, so it's not final.
<rapha>
not sure if Tom Cruise would approve of the name :)
<apotheon>
Depending on specifics, the rider up front might be the only thing for the 2-up rider to hold onto.
<apotheon>
Not all bikes with a long enough seat for two people have good handholds.
<apotheon>
Tom Cruise and Max Stirner both would have reasons to dislike that name.
<apotheon>
I'm open to alternative suggestions.
<rapha>
in the case of the 1200GS, if you tried to hold on to the rider, you got the bill for that handed to you right there at the next traffic light
<rapha>
almost fell down once
<rapha>
"The goth chiller"? :-P
FastJack has quit [Ping timeout: 246 seconds]
<apotheon>
Anyway, that shaft drive bike is a 1981 XJ650 Maxim with some modifications. The handlebars aren't the final handlebars I'll put on it -- just a placeholder. They're nothing like the stock handlebars, though. The tank is actually from an XJ750 Maxim, which has a rather different look to it than the XJ650; I got the tank panted with the same Anthracite paint color that was available on the 1993
<apotheon>
Toyota Supra.
<apotheon>
I don't think I'll go for "goth chiller", but maybe "Chiller" is worth considering . . .
<apotheon>
hmm
<apotheon>
Thinking of Max Stirner, and the fact it's a (slightly modified) Maxim, makes me wonder if there's something I could do with a variation on "Max" as a name.
FastJack has joined #ruby
<apotheon>
Maximilian
<rapha>
just looks like a bike to chill on from the pic
<apotheon>
Yeah, that's going to really be my road tripper.
<apotheon>
(assuming I ever get it up to snuff)
<rapha>
reminds me of that book
<rapha>
what was the name of that book
<apotheon>
Which book?
<rapha>
ah! "Zen and the Art of Motorcycle Maintenance"
<apotheon>
ahh
<apotheon>
I haven't read it yet, but it's on my shelf.
<apotheon>
I read a fair bit of Taoist stuff, and Zen is what happens when Taoism meets Buddhism then migrates to Japan.
<rapha>
although there was no picture of the bike, but i figure it might have been that XJ650
<apotheon>
. . . so the book's concept definitely appeals to me.
<rapha>
not sure how much of that eastern stuff is still there in that book
<rapha>
it's quite philosophicakl
<rapha>
and even though it might appeal to motorbike riders, i think every _father_ should try to read it
<rapha>
hmm okay seems today is the day where i will have to figure out jruby
<apotheon>
My copy of the book has a painting of a father-and-son sort, with a motorcycle, and it looks like a smaller-engine bike, probably '70s vintage.
<apotheon>
I think the book was written in the '70s, so the Maxim is a bit new for that.
<apotheon>
Ah, it was originally published (in hardcover) in 1974.
<rapha>
giving up on libsixel-ruby for today btw
<rapha>
wow, that old ... 8 years before i was even born
<apotheon>
Oh, this is fun. It looks like my edition was published in 1981 -- the same year as my XJ650's model year.
<rapha>
seems you have found a source to look for a name :)
<apotheon>
maybe so
<apotheon>
I'll probably have to ride it a bit once I get the next set of handlebars on it and the carbs rebuilt before I really settle on a name.
<apotheon>
Hilariously, it's the missus who really started making me feel like I have to name everything with wheels and engines.
FastJack has quit [Ping timeout: 260 seconds]
<apotheon>
I did name a previous motorcycle, also actually an early '80s Maxim. I think it was a 1983 XJ650 Midnight Maxim, or maybe it was 1982.
jenrzzz has joined #ruby
<apotheon>
I called it Taphoskandalon, a portmanteau of the Greek words "taphos" and "skandalon", meaning "death" and "trap", respectively -- because it was a deathtrap.
<rapha>
my first gf had that thing going on too
<rapha>
naming every vehicle
<rapha>
completely forgot about it after moving to the not-so-big citys and becoming a public transport and bicycle kind of person
<apotheon>
The pickup is Grendel. The Blast is Gristle -- which I chose because I was thinking about how to describe the bike, about how it had kind of a "streetfighter" style bike, or like a "muscle bike" stylistically similar to some of the late '60s and early '70s muscle cars.
<apotheon>
. . . but I thought "It's not exactly muscular though. It's all gristle."
<apotheon>
Well . . . I need to go run some errands, including ensuring Grendel is ready for the missus to take to a dental appointment.
<apotheon>
(which includes putting more fuel in it)
<rapha>
sounds like the most fun way to go to the dentist
<rapha>
take care and see you around
<apotheon>
Then maybe I'll go for a ride with Gristle to put some miles on the front tire that just got mounted on it today!
<apotheon>
err, s/today/yesterday/
<apotheon>
sorry, my fingers disagreed with my brain for a moment there
<apotheon>
seeya
<apotheon>
Oh, Grendel is the pickup. Gristle is the mutant motorcycle.
<apotheon>
I know the names are confusingly similar. It's my only regret for those names so far.
<rapha>
:)
roadie has joined #ruby
bmurt has quit [Ping timeout: 260 seconds]
cadeskywalker has joined #ruby
coniptor has quit [Ping timeout: 240 seconds]
evdubs has quit [Quit: Leaving]
drincruz has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
evdubs has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jenrzzz has joined #ruby
TCZ has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicholaslyang has joined #ruby
nicholaslyang has quit [Client Quit]
nicholaslyang has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
nicholaslyang has quit [Client Quit]
dfucci has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
alfiemax has joined #ruby
CrazyEddy has quit [Ping timeout: 258 seconds]
nicholaslyang has joined #ruby
s2013 has joined #ruby
sauvin has quit [Ping timeout: 246 seconds]
CrazyEddy has joined #ruby
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfucci has joined #ruby
<s2013>
hello
Eiam has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
nicholaslyang has joined #ruby
imode has joined #ruby
miskatonic has joined #ruby
teclator has quit [Ping timeout: 264 seconds]
oncall-pokemon has joined #ruby
teclator has joined #ruby
hiroaki_ has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
plutes has quit [Ping timeout: 246 seconds]
gitter1234 has joined #ruby
davispuh has joined #ruby
dfucci has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
plutes has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
dfucci has quit [Ping timeout: 258 seconds]
roadie has joined #ruby
gix has joined #ruby
zapata has quit [Ping timeout: 256 seconds]
zapata has joined #ruby
gix has quit [Disconnected by services]
gix- has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
lektrik has quit [Read error: Connection reset by peer]
lektrik has joined #ruby
rwb has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
roadie has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
roadie has joined #ruby
flak has joined #ruby
Rudd0^ has joined #ruby
apotheon_ has joined #ruby
salvor has joined #ruby
lipoqil_ has joined #ruby
jenrzzz has joined #ruby
extrowerk_ has joined #ruby
trueFireblade has joined #ruby
<trueFireblade>
is there a clean way to substitute multiple characters by a '' or is the best way to chain gsubs?
nebiros_ has joined #ruby
phI||Ip_Alternat has joined #ruby
nebiros has quit [Disconnected by services]
<go|dfish>
trueFireblade: you can use a single gsub with a character class e.g. [abc]
livcd_ has joined #ruby
nebiros_ has quit [Changing host]
nebiros_ has joined #ruby
electrostat_ has joined #ruby
wmoxam_ has joined #ruby
nebiros_ is now known as nebiros
FastJack has joined #ruby
schn31d3r has joined #ruby
<trueFireblade>
go|dfish: how does that work? I tried both "[\\,[]]" and ["\\",",","[","]"] but both don't seem to work as first argument to get the wished result
MasterNayru_ has joined #ruby
nowaker_ has joined #ruby
camilasan_ has joined #ruby
<go|dfish>
trueFireblade: what characters do you want to remove?
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has quit [Ping timeout: 272 seconds]
podman has quit [Ping timeout: 258 seconds]
maxmanders has joined #ruby
Argorok_ has quit [Ping timeout: 258 seconds]
lipoqil has quit [Ping timeout: 272 seconds]
maxmanders has quit [Max SendQ exceeded]
nicholaslyang has joined #ruby
nicholaslyang has quit [Client Quit]
KnownSyntax has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
JayDoubleu has joined #ruby
JayDoubleu has quit [Max SendQ exceeded]
TCZ has joined #ruby
peteretep has quit [Read error: Connection reset by peer]
roadie has joined #ruby
KnownSyntax has quit [Max SendQ exceeded]
ur5us has joined #ruby
bradfordli has quit []
peteretep has joined #ruby
pwnd_nsfw has quit [Quit: Leaving]
nicholaslyang has joined #ruby
alfiemax has joined #ruby
nicholaslyang has quit [Client Quit]
nicholaslyang has joined #ruby
lipoqil has joined #ruby
kashike has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
roadie has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
lipoqil has quit [Ping timeout: 260 seconds]
maxmanders_ has joined #ruby
gitter1234 has quit [Quit: Connection closed for inactivity]
schn31d3r has quit [Ping timeout: 258 seconds]
<trueFireblade>
is there a more efficient way to filter a string array for all strings containing a substring than Array#each which adds the strings matching a regex to a new array?