<hxegon>
skweek: first thing, get a list of m4a files. That gist has basically what you need, except it lists mp3s
baweaver has quit [Remote host closed the connection]
arooni has quit [Quit: Leaving]
<hxegon>
exercise*
arooni has joined #ruby
arooni has quit [Max SendQ exceeded]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arooni has joined #ruby
<hxegon>
skweek: if you want Dir['**/*.mp3'] explained in a bit more detail, just ask
<skweek>
no its straight foward
tkuchiki has joined #ruby
<hxegon>
skweek: ok, so now you have a list of m4as, are you using a conversion library or feeding the files to the command line using backticks?
rgrmatt has joined #ruby
<hxegon>
skweek: I mean feeding it to the ffmpeg command line tool or something
<skweek>
i don't want to convert the files, just remove the already converted ones and leave the non-converted ones
duckpuppy has quit [Ping timeout: 268 seconds]
<skweek>
say i've started converting m4as, have some but not compelted need to move the converted m4as and leave the non converted m4as
pullcheezy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon>
skweek: aaah, so you now need another list of mp3 files to compare the m4a list too
gambl0re has joined #ruby
<skweek>
yes
firstdayonthejob has quit [Ping timeout: 264 seconds]
crdpink2 has joined #ruby
<hxegon>
skweek: so now, what is the best way to compare? you just need to find any file (without the extension) that appears in both lists.
crdpink has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
mistermocha has quit [Remote host closed the connection]
<skweek>
i'm not sure how to think about it, well I would think about it like if ruby -e "p Dir['**/*.mp3']" and ruby -e "p Dir['**/*.m4a']" are equal remove ruby -e "p Dir['**/*.m4a']"
<skweek>
I guess this is a bit more involved than I thought it would be... or atleast the time its taken has been greater than the time I have available to dedicate to
<Ox0dea>
Busy, busy.
mndoci has quit [Remote host closed the connection]
baweaver has joined #ruby
dfockler has quit [Ping timeout: 240 seconds]
mndoci has joined #ruby
benlieb has quit [Quit: benlieb]
babblebre has joined #ruby
graydot has quit [Quit: graydot]
mistermocha has quit [Ping timeout: 260 seconds]
graydot has joined #ruby
swgillespie has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<Ox0dea>
skweek: The "clever" bit is to just "rename" all of the .mp3s to .m4a, and do a set union with the actual .m4as; the elements that appear in both are the ones you want deleted.
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
<skweek>
I think that might not do what I want, in folder /two/files/ thare are *.mp3 and *.m4a, does this remove the files in the array that are in /two/files ?
rgtk has joined #ruby
<eam>
skweek: try it and see!
to_json has joined #ruby
to_json has joined #ruby
jdawgaz has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
<Ox0dea>
skweek: I deliberately wrote it so that you could run it without screwing yourself.
djellemah has quit [Ping timeout: 240 seconds]
<Ox0dea>
It does a dry run; uncomment the last line to burn 'em.
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
makufiru has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgrmatt has quit [Remote host closed the connection]
rgrmatt has joined #ruby
macdaddy has joined #ruby
jdawgaz has quit [Client Quit]
rgtk has quit [Read error: No route to host]
bricker has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
tkuchiki has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
baweaver: It was a single-route to-do app: entries.delete_at(param.to_i) || entries = [false] + entries + [param]
rgtk has quit [Read error: No route to host]
<Ox0dea>
It's shit since entries can't begin with a digit.
<Ox0dea>
But that was the only problem with it.
<baweaver>
been in LA on vacation, got back last night at around midnight
cmaxwe has joined #ruby
<skweek>
I see, cool
<baweaver>
makes work rather hellish to stay awake for.
dopamean_ has quit [Ping timeout: 268 seconds]
rgtk has joined #ruby
<Ox0dea>
It is known.
<Ox0dea>
skweek: Do you see?
<skweek>
thanks
<skweek>
yes
<Ox0dea>
skweek: I mustache you a question.
<shevy>
baweaver this is why beavers shouldn't party, they just don't wanna go back to that dam work!
<Ox0dea>
> dam work
safe has joined #ruby
<baweaver>
Well I try not to birch about it
rgtk has quit [Read error: Connection reset by peer]
<Coraline>
No sense in chasing your tail
<eam>
wood you look at these puns
cmaxwe has quit [Client Quit]
rgtk has joined #ruby
<baweaver>
Decided to spruce things up a bit
<Coraline>
Branching out a bit?
blue_deref has quit [Quit: bbn]
<baweaver>
I know you were pining for it
<shevy>
lol
<baweaver>
Though I'll leaf it at that.
<Coraline>
Are you needling me?
tkuchiki has quit [Ping timeout: 240 seconds]
<Coraline>
There's only so much of that that I cone take
<baweaver>
Your bark is worse than your bite ;)
rgtk has quit [Read error: No route to host]
<Coraline>
That's the root of the problem for sure.
rgtk has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
<baweaver>
It's gotten a bit syruptitious, I agree
dorei has quit []
<Coraline>
That's what yew think!
<baweaver>
(surreptitious)
tcrypt has quit [Remote host closed the connection]
northfurr has joined #ruby
<Coraline>
(got it)
<Ox0dea>
(I missed the opportunity to use "Castor down".)
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
ElSif has joined #ruby
<Ox0dea>
(> mfw OOC in #ruby)
<baweaver>
well that's all I have. Can't find a good one for Oak or Elm or Maple
<Coraline>
That was fun
<eam>
pretty poplar subject
rgtk has quit [Read error: No route to host]
<Coraline>
I normally reserve my punning for tenderlove
* baweaver
high fives eam
<eam>
hard to keep going without branching out though
<baweaver>
Coraline: I normally reply to his on Twitter.
rgrmatt has quit [Remote host closed the connection]
<shevy>
oh dear
rgtk has joined #ruby
<shevy>
oh ... perhaps deer ... well I am not quite awake
<baweaver>
shevy: way to buck the system
chibs has quit [Ping timeout: 240 seconds]
<eam>
going against the grain
<Ox0dea>
tenderlove: If you're about, could you say why `%d[1 3.14 2ri]` is terrible?
mbfff has joined #ruby
<tenderlove>
is it???
troyready has quit [Read error: Connection reset by peer]
<Ox0dea>
I think not.
<baweaver>
was about to say, need more cats for summoning rituals
symm- has quit [Ping timeout: 255 seconds]
<tenderlove>
I tried it, but I got a syntax error
rgtk has quit [Read error: No route to host]
<Ox0dea>
tenderlove: Right, I'm considering a proposal.
<mbfff>
Question: I am writing a ruby gem and have a couple of questions regarding the standard way to structure classes. 1) I am modeling an API and my module name is that of the service. Then my main class is the object that the API returns a majority of the time.
rgtk has joined #ruby
<Ox0dea>
tenderlove: I tried piggy-backing off your %i code, but I don't know how to incorporate parse_numeric() pursuant to Virtue #1.
* baweaver
does not see a question mark
<mbfff>
The API also allows users to search for those objects. Should I create a Util class to allow for search/find methods?
rgtk has quit [Read error: No route to host]
jdawgaz has joined #ruby
<mbfff>
Service::Object.search or Service:Utils.search with results the object or array of ojbects.
Rinzlit has quit [Ping timeout: 244 seconds]
<Ox0dea>
mbfff: That'd be a Utils module, surely?
rgtk has joined #ruby
<Ox0dea>
Why not just `Service.search`?
<tenderlove>
I'm not sure which production does floats / reals
northfurr has quit [Quit: northfurr]
<tenderlove>
presumably you can just copy the %i code, but change symble_list to be a list of numbers
<mbfff>
The guide I have been following always encased classes in a module.
<eam>
you could special case those numeric constants!
radgeRayden has joined #ruby
rgtk has quit [Read error: No route to host]
riotjones has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
mikeharris22 has quit [Ping timeout: 240 seconds]
Rinzlit has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
rgtk_ has joined #ruby
<odigity>
I just studied the Dir, IO, File, and File::Stat classes while taking notes. Then I discovered the pathname package in stdlib. Is it worth my time to learn that now, or are the core libraries good enough for most tasks?
Rollabunna has quit [Ping timeout: 268 seconds]
duckpuppy has joined #ruby
bruno- has joined #ruby
rgtk_ has quit [Read error: Connection reset by peer]
<Ox0dea>
odigity: Do you mean the core classes?
<odigity>
yes
<eam>
odigity: the former are for interacting with files (opening, reading, writing, etc)
<eam>
the latter is for manipulating file names as strings
<odigity>
eam, but the File class already has lots of those types of methods (dirname, basename, extname, absolute_path, expand_path...)
northfurr has joined #ruby
<Ox0dea>
odigity: You want Pathname for platform-independence.
<Ox0dea>
It'll use the appropriate separator in #join, for instance.
<odigity>
Ox0dea, File class is not platform-independent? it seems to have platform-specific separator constants and all that jazz
<eam>
well, so should File.join, no?
<Ox0dea>
Yes, I suppose so.
<odigity>
that's my point. seems like a lot of redundancy. even within each class. File has absolute_path, expand_path, realdirpath, realpath... all seem to do about the same thing
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<odigity>
I'm trying to build up a cheat sheet for quick reference with simple answers for best tool in different cases, and it's hard to determine that.
<eam>
why does Pathname exist, actually?
<Ox0dea>
It seems largely vestigial, I agree.
<odigity>
eam, now we're getting to the heart of the matter :)
* havenwood
grabs a pitchfork
<odigity>
if it's vestigial, that's good to know so I can focus my attention on the right answers
<eam>
the module name is even redundant
<eam>
and it also says the same thing twice
bruno- has quit [Ping timeout: 240 seconds]
dstarh has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
<Ox0dea>
'Tis a silly class; let's not import it.
<odigity>
:)
<havenwood>
"All functionality from File, FileTest, and some from Dir and FileUtils is included, in an unsurprising way. It is essentially a facade for all of these, and more."
rgtk has joined #ruby
<odigity>
havenwood, so maybe we have it backwards? Pathname is a newer attempt to clean up the overall I/O API surface area of the core?
<eam>
a Pathname isn't just syntactic manipulation of a filename in the abstract - it appears to stat() an actual file on your local filesystem as well
<eam>
you usually wouldn't want that
davedev2_ has quit []
kayloos has joined #ruby
<eam>
odigity: the underlying unix interfaces are pretty careful to separate the two concerns
rgtk has quit [Read error: No route to host]
rgrmatt has quit [Remote host closed the connection]
<eam>
an actual filesystem syscall is going to be several orders of magnitude slower than syntactic manipulation of a path string
rgtk has joined #ruby
baweaver has quit [Remote host closed the connection]
<odigity>
eam, that seems at odds with the comments I just read, one sec
<odigity>
"It does not represent the file itself. A Pathname can be relative or absolute. It’s not until you try to reference the file that it even matters whether the file exists or not.
<odigity>
Pathname is immutable. It has no method for destructive update."
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: Connection reset by peer]
<odigity>
it does have an .exist? method that obviously must check the FS, but it seems like the intent is to give you the ability to manipulate names independent of the FS until you're ready to resolve to a file
<eam>
that's saying it's only modified inside new()
shadoi has quit [Quit: Leaving.]
al2o3-cr has joined #ruby
chihhsin has quit [Quit: leaving]
kalusn has quit [Ping timeout: 246 seconds]
Rollabunna has joined #ruby
rgtk has joined #ruby
<eam>
odigity: it does things like tell you the size of the file, and what kind of file it is (directory, etc)
<eam>
that can only be done with a syscall
chihhsin has joined #ruby
<odigity>
eam, well, in most cases if I'm working with a filename, it's because I plan to use it. so that's not such a downside. and I kind of like the idea of wrapping paths as first-class objects.
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
that's probably the spirit behind the module. I maintain the separation of concerns is a mistake :)
<odigity>
now if both String and Pathname had a .to_path method, we'd be in normalization heaven...
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
No, I'm sure that title goes to Factor's.
<odigity>
it's pretty damn big. it's kind of insane and scary, actually. I bet the maintainers wish they could go back and not accept some things for inclusion
rgrmatt has quit [Remote host closed the connection]
rgtk has quit [Read error: Connection reset by peer]
<eam>
odigity: Pathname lazy-evals fields like #size - so it does modify itself
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminence_ has quit [Remote host closed the connection]
<odigity>
Ox0dea, clearly they're abusing the notion of "standard" and should be thrown out of this survey as a fraudulent outlier :)
<odigity>
eam, the docs lied to us again!
<eam>
in fact, it doesn't just lazy eval, it appears to return current stat() data every access
<Ox0dea>
odigity: Well, but, it ships with the distribution?
<odigity>
I kind of wish the openssl docs would lie to me. Anything is better than the silent treatment...
mattwildig has quit [Remote host closed the connection]
<odigity>
eam, that's a little disturbing. remind me to cache the result myself....
_blizzy_ has quit [Quit: Leaving]
<eam>
just use File.stat :)
rgtk has quit [Read error: Connection reset by peer]
<eam>
you'll have parity with the entire rest of unix
rgtk has joined #ruby
<odigity>
Ox0dea, if Factor includes a reddit module in their "standard" library, then I have to question the definition of "standard". Just like I question the definition of "canon" when applied to the Star Wars prequels. I know that's technically correct language, but I simply don't accept it. :)
eminencehc has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
odigity: In that case, I am interested in learning your definition of "standard library".
rgtk has quit [Read error: Connection reset by peer]
<odigity>
Ox0dea, I don't have a good one. it's one of those "I know it when I see it", things. for now, let's define it as "that which the language maintainers call standard, unless it includes a reddit module", with the caveat that it will need revision in the future
<eam>
uh oh, based on 1.8.7?
<Ox0dea>
Myeah.
<eam>
so this isn't standard!
tkuchiki has joined #ruby
<odigity>
tell the ISO to get their hands off my ruby
<eam>
when people tell me not to use => I'm just gonna point at the ISO standard
rgtk has quit [Read error: Connection reset by peer]
tno has quit [Quit: Ex-Chat]
tkuchiki has quit [Remote host closed the connection]
blackmes1 has joined #ruby
<odigity>
I thought we're encouraged to use => for the widest compatibility, at least in our gems. (I don't, but I know it's encouraged)
rgtk has joined #ruby
<Ox0dea>
odigity: 1.8.7 is kill.
jordanloky has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
I use it so I can pretend I'm writing perl
<odigity>
good
<odigity>
I'm on 2.2.3, but I have no one to answer to, so I have that luxury.
<eam>
and because, if I'm going to be completely honest, I find foo: :bar rather hard to read
mordocai has joined #ruby
<Ox0dea>
`=>` is shit, and almost entirely responsible for why we can't have `>` and `<` as unary operators.
tkuchiki has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<odigity>
eam, that's the one use case I dislike. but I'm not about to start sticking => in place there.
<eam>
fat comma 4 lyfe
<odigity>
Ox0dea, => is still important for literal hashes with non-symbol keys, which are common -- like http headers.
rgtk has quit [Read error: Connection reset by peer]
<Ox0dea>
odigity: Most HTTP libraries are agnostic in that regard.
rgtk has joined #ruby
<Ox0dea>
But I take your point.
<odigity>
Ox0dea, most HTTP libraries do not document their behavior in that regard. I just spent several days last week reading up on and trying out rest-client and httparty. It was frustrating.
arescorpio has joined #ruby
<odigity>
I'm thinking of trying curb, next.
<Ox0dea>
I've only just noticed you use two spaces.
<Ox0dea>
We can't be friends.
<odigity>
Ox0dea, this isn't the first time someone got upset with me about that.
rgtk has quit [Read error: Connection reset by peer]
<Ox0dea>
You're an angel if it's the last.
<odigity>
I also line up my code into columns based on naturally emergent token patterns. I like visual order.
<VeryBewitching>
Ox0dea: When I was taught typing, formally, we were taught to use two spaces after a sentence.
<Ox0dea>
VeryBewitching: I know the cause.
<Ox0dea>
I broke those particular shackles long ago.
rgtk has joined #ruby
chihhsin has quit [Quit: leaving]
<odigity>
VeryBewitching, I was taught the same, but that's not why I still do it. I do it because I agree with it. I disagree with "punctuation goes in the quote", so I don't do that.
<Ox0dea>
Terminal punctuation serves just fine as the separator.
<eam>
similarly, I'm using cursive right now with an OCR to IRC program
<odigity>
eam, I am impressed
chihhsin has joined #ruby
ReallyNotReally has joined #ruby
<Ox0dea>
odigity: Punctuation goes outside the quote, lest you risk misquoting.
<odigity>
odigity, sometimes I'll need to sign someone else's name on a check for convenience (with their consent), and I get stuck, because I can't remember any cursive other than my own name
rgtk has quit [Read error: No route to host]
<VeryBewitching>
eam: I don't even think I could write cursive characters anymore. It's been about twenty years.
<odigity>
ok, back to work
<Ox0dea>
Fucking minuscule Ms.
<eam>
in fact I cannot either. I can barely print. My hand cramps when I have to fill out a form
<odigity>
me too
Lucky__ has joined #ruby
<ReallyNotReally>
Hi everyone. I’m just learning Ruby and it’s really great so far
lessless has joined #ruby
rgtk has joined #ruby
<eam>
my teachers said I would never be able to get a good job without cursive
tkuchiki has quit [Ping timeout: 265 seconds]
<Ox0dea>
ReallyNotReally: Really?
<odigity>
ReallyNotReally, I can't tell if you're serious or not.
<havenwood>
odigity: Curb is nice. Maybe give HTTP.rb and Typhoeus a look as well.
PhantomSpank_ has quit [Quit: Leaving]
* Ox0dea
brings up a few packets of troll food just in case.
sanjayu has joined #ruby
to_json has quit [Quit: Leaving.]
davedev24 has joined #ruby
<ReallyNotReally>
lol. I figured it would be better than some goofy shit that sounds like I’m 12…wait a min...
<odigity>
havenwood, I checked out Typhoeus, seems about as active as curb and roughly equivalent, but with a focus on parallelism, which I don't need right now, and curb is easier to type. :) don't know HTTP.rb
<havenwood>
ReallyNotReally: Ruby was made for programmer happiness. Is it not making you happy?
<ReallyNotReally>
making me happy? Well not really experienced enough yet to say that. Still in undergrad
davedev24 has quit [Client Quit]
rgtk has joined #ruby
<odigity>
havenwood, cool, I'll check it out. also, why are there so many damn http gems?
<Ox0dea>
odigity: It's 2015.
zipace has quit [Ping timeout: 265 seconds]
<odigity>
I had to stop using rest-client because I couldn't make it not follow a redirect. I managed to prevent it in httparty, but it took some work.
<havenwood>
ReallyNotReally: Are any of the languages you've come across so far great?
rgtk has quit [Read error: No route to host]
speakingcode has joined #ruby
<ReallyNotReally>
havenwood, Ruby is so far :)
<odigity>
Ox0dea, sure, but usually gems thrive or die depending on their relative superiority to alternatives + momentum. I would have figured that by now only 2-3 would still be active, having succeded in the evolutionary battleground -- not ten.
<Ox0dea>
ReallyNotReally: What's your favorite feature?
<havenwood>
ReallyNotReally: "I’m just learning Ruby and it’s really great so far"
<odigity>
maintaining a gem is work. why do the work if your gem isn't better than others in at least a niche if not overall?
<ReallyNotReally>
havenwood: i guess blocks, but maybe its programmer freedom to choose is its best feature ala Perl
<odigity>
I'm a big fan of curated selection. gimme good choices, but not more than makes sense. CostCo/Sam's Club have great buying depts that do this, which is why you choose from 3-5 microwaves, not 30. it's a time saver because they do a lot of filtering work for you.
<shevy>
odigity it sorta depends a lot of the gem itself and the scope of the project. For instance, I think the prawn gem is fairly nice and I think that it would be best if people support it, if they have to do something related to ruby + pdf; but for many small gems, I feel that the differences to other existing gems that do something fairly similar, is very often just minor, often just a difference in style
rgtk has quit [Read error: No route to host]
<shevy>
let's be honest - a lot of the gems on rubygems.org are quite old
<odigity>
You want an ORM? Rails, Sequel, DataMapper. different experiences, all well supported, pick one of three -- not ten.
rgtk has joined #ruby
eminencehc has quit [Remote host closed the connection]
rbowlby has quit []
jschoolcraft has quit [Quit: peace]
<shevy>
yeah the ruby web world got a lot of manpower working away at things
<Ox0dea>
Curse you, DHH!
Yzguy has quit [Quit: Zzz...]
rgtk has quit [Read error: No route to host]
<odigity>
You want an app server? thin for evented, puma for threads, unicorn for neither. easy-peasey
<shevy>
I knew of only two pdf things in ruby; one was prawn, the other one was fpdf, which was based on the php fpdf, and the style was ugly; https://rubygems.org/gems/fpdf/versions/1.53 last release 2008
rgtk has joined #ruby
dopamean_ has joined #ruby
<odigity>
You want a web framework? sinatra at the bottom, rails at the top, padrino in the middle, grape for rest APIs, and 2-3 others with traction designed around novel alternate models. all well-differentiated, so the space can handle 5-6 contentders in that case.
<havenwood>
ReallyNotReally: <3 Glad you're having fun learning!
<Ox0dea>
Prawn, ChunkyPNG, Kiba; there are plenty of gems which are plainly the best at what they do.
druonysus has quit [Quit: Konversation terminated!]
<odigity>
Ox0dea, yes, exactly. I love those cases -- so much research time saved.
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
<shevy>
if we could fund more projects like prawn!
<havenwood>
ReallyNotReally: This is a good place for code review if you have any questions as you proceed.
<Ox0dea>
odigity: Rack is at the bottom there, mind.
<odigity>
But not when it comes to http libs, for some damn unknown reason.
<odigity>
Ox0dea, good point.
RobertBirnie has joined #ruby
rgtk has quit [Read error: No route to host]
<havenwood>
ReallyNotReally: I've also learned a lot trying to answer questions here.
northfurr has quit [Quit: northfurr]
<ReallyNotReally>
havenwood: Thanks. I think I want to learn enough Ruby to do technical interviews. Things are so much easier to do in this language
rgtk has joined #ruby
<Ox0dea>
ReallyNotReally: How do I create a well and truly immutable String in Ruby? :P
jackjackdripper has quit [Quit: Leaving.]
rgtk has quit [Read error: No route to host]
<Ox0dea>
Spoiler: some things are impossible to do in this language.
rgtk has joined #ruby
<havenwood>
Ox0dea: Suggest nicely it not be mutated and wish for the best.
<Ox0dea>
havenwood: There is certainly some wisdom to that.
<odigity>
I think the ruby community needs to stage an intervention. Invite maintainers from rest-client, faraday, httparty, excon, multipart-post, httpclient, curb, typhoeous, http.rb, and httpi to a panel at a conference, and open with: "WTF?"
<ReallyNotReally>
Ox0dea: isn’t that when you would use frozen?
<odigity>
I've never seen such an indecisive toolbox category.
<Ox0dea>
ReallyNotReally: Sure, but it's possible to unfreeze things.
rgtk has quit [Read error: No route to host]
<odigity>
(end rant)
EllisTAA has joined #ruby
radgeRayden_ has joined #ruby
rgtk has joined #ruby
radgeRayden has quit [Ping timeout: 255 seconds]
<ReallyNotReally>
so which book is liked more? Pickaxe or Well Grounded
rgtk has quit [Read error: No route to host]
<Ox0dea>
odigity: The criticism is valid, but I can only invite you to meditate on Gandhi in these trying times: "Be the change you wish to see in the world."
machan has quit [Ping timeout: 260 seconds]
<havenwood>
ReallyNotReally: I'd think Well-Grounded would make for a better read rather than reference. Be sure to get the second edition.
gambl0re has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
colegatron has quit [Ping timeout: 252 seconds]
<ReallyNotReally>
havenwood: I was thinking the same thing. Seems like something I will use. I really haven’t understood OO in Ruby yet..feels complicated
houhoulis has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<havenwood>
odigity: rest-client and httparty are Net::HTTP wrappers, curb and typhoeus are libcurl, excon and httpclient are pure ruby, and faraday and httpi are adapters to other clients
<drbrain>
mechanize is a wrapper of a Net::HTTP wrapper
rgtk has quit [Read error: No route to host]
pontiki has joined #ruby
<havenwood>
wrapper wrapping inception
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
RegulationD has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skweek has quit [Read error: Connection reset by peer]
rgtk has quit [Read error: No route to host]
stannard has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ReallyNotReally has left #ruby [#ruby]
rgtk has joined #ruby
mattwildig has joined #ruby
skweek has joined #ruby
pontiki has quit [Remote host closed the connection]
musou has quit [Quit: Connection closed for inactivity]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
cmoney has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
rgtk has quit [Read error: No route to host]
druonysus has quit [Ping timeout: 240 seconds]
stannard has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
JDiPierro has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
Rinzlit has quit [Ping timeout: 265 seconds]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
skweek has quit [Remote host closed the connection]
colegatron has joined #ruby
rgtk has quit [Read error: No route to host]
skweek has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
chibs has joined #ruby
towski__ has quit [Remote host closed the connection]
rgtk has joined #ruby
Bloomer has joined #ruby
nertzy has joined #ruby
Fire-Dragon-DoL has quit []
cmoney has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
bruno- has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
tkuchiki has joined #ruby
pontiki has joined #ruby
rgtk has joined #ruby
kp666 has quit [Quit: Leaving]
zenguy_pc has quit [Ping timeout: 272 seconds]
<pontiki>
hi
<havenwood>
pontiki: hey
Rinzlit has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
thisguy123 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<odigity>
havenwood, I knew some but not all of that, thanks. I like the idea of trying curb next because curl is the gold standard; seems like a promising approach, plus speed is nice (though rarely a priority for me)
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
<odigity>
BTW-I highly recommend looking through pathname, for those who caught the earlier convo. It's pretty damn awesome.
bruno- has quit [Ping timeout: 246 seconds]
rgtk has joined #ruby
<odigity>
Reading it is giving me the kind of joy I usually get from a great gem -- rarely experience that with the stdlib.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
pontiki has quit [Quit: have to lay down]
<odigity>
I think it was a python programmer who said "stdlib is where packages go to die". It's quite true.
<odigity>
The opposite of decoupling.
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
skweek has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
skweek has joined #ruby
rgtk has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
opensource_ninja has quit [Quit: opensource_ninja]
rgtk has joined #ruby
<Rickmasta>
Whenever I remove the commenting from lines 13,14,15, and 20. It tells me that things are included in the array that are not actuall included.
rbennacer has quit [Remote host closed the connection]
minimalism has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
hxegon has joined #ruby
rgtk has joined #ruby
kayloos has quit [Remote host closed the connection]
<hxegon>
back
rgtk has quit [Read error: Connection reset by peer]
<hxegon>
Ox0dea: Very nice. with some tweaking I might actually prefer that to the bash version
rgtk has joined #ruby
<Ox0dea>
Rickmasta: The problem is you're doing mutation all over the place and it's gotten away from you.
<Ox0dea>
hxegon: Ooh, could I see the Bash version?
s00pcan has joined #ruby
<hxegon>
Ox0dea: sure, give me a sec
<Ox0dea>
I like the "anonymity" of my approach.
<Ox0dea>
Naming things is hard.
gener1c has quit [Ping timeout: 244 seconds]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
machan has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
<Ox0dea>
Rickmasta?
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<Ox0dea>
The mutants have taken him; he will be missed.
mattwildig has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
favadi has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
favadi has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
rgtk has quit [Read error: No route to host]
favadi has joined #ruby
juanpablo__ has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
<Rickmasta>
Ox0dea: I'm sorry about that.
<Ox0dea>
Rickmasta: No worries.
jobewan has joined #ruby
<Rickmasta>
but when I don't include those statements, I get the correct answer.
Eiam_ has joined #ruby
<Rickmasta>
Well, kind of. The question asked for unique substrings. My answer was 55, and the correct answer was 53 because two substrings were repeated.
duckpuppy has quit [Ping timeout: 260 seconds]
<Ox0dea>
Rickmasta: For which input, if you don't mind?
<Rickmasta>
kincenvizh
devbug has joined #ruby
RegulationD has joined #ruby
joufflu has quit [Read error: Connection reset by peer]
rgtk has quit [Ping timeout: 260 seconds]
<hxegon>
Ox0dea: haven't tested this out, and not honoring the letter of the challenge, but... rm -f **/*.m4a && ls **/*.mp3 | cut -d'.' -f1 | xargs -n 1 ffmpeg -i {}.mp3 -c:a libfaac -vn {}.m4a
<Ox0dea>
Rickmasta: You are *printing* the correct substrings, but the task was to collect them, yeah?
<hxegon>
Ox0dea: I mean he said he was converting nested mp3 files to m4a, so why not do the whole thing right?
<Rickmasta>
Nah. The tast was to find the number of unique substrings.
<Ox0dea>
hxegon: You're removing all the .m4a files right at the start...
chibs has quit [Ping timeout: 264 seconds]
<Ox0dea>
hxegon: Oh... well, yeah, that's one way to go about it, I guess.
<Rickmasta>
So I used an array to collect the substrings that I found and compare each new substring with the array to see if it was already counted.
<Ox0dea>
Rickmasta: Right, only that didn't go so well, and it's because the `temp` on Line 10 isn't always what you think it is.
<Rickmasta>
in kincenvizh "i" and "n" appear twice.
<Ox0dea>
Rickmasta: You know that #slice! is destructive, I trust?
<hxegon>
Ox0dea: not that you couldn't do that nicely in ruby... Dir['**/*.mp3'].each { |f| `ffmpeg...
<Rickmasta>
what do you mean Ox0dea?
cmoney has quit [Remote host closed the connection]
<Ox0dea>
Rickmasta: #slice! (the "bang" version of #slice) modifies the string in-place.
<Rickmasta>
yeah I know
duckpuppy has joined #ruby
<Rickmasta>
thats why outside of the first loop, it slices once.
<Ox0dea>
Rickmasta: But it's *inside* the first loop.
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 244 seconds]
<Rickmasta>
it doesn't run on the first loop though, because if the if statement around it.
<bigmac_>
so, the math portion, does not add up, with abc when its depth is 1, so i want to increase
<Rickmasta>
temp is added to the collection right after the puts statement. I don't get why the array has empty strings and there aren't any in the puts statement.
<bigmac_>
until the math adds up for both repeated_permutation
<shevy>
bougyman it's quite weird in general, a dude I went to school up until 18 years of age, is now working at puppet labs (so thus also ruby; actually he resides in Belfast)
<shevy>
and spam mails I got, from europe about ruby, also was from UK, that time rails-based :D
platzhirsch has joined #ruby
<norc>
Shouldn't you be doing something productive, shevy?
<norc>
:-)
bruno- has joined #ruby
<yorickpeterse>
look who's talking
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
baweaver has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
karapetyan has joined #ruby
<bougyman>
shevy: there's a big demand for infrastructure devs atm.
<bougyman>
chef, puppet, ansible, salt.
<bougyman>
if you know any of those 4 it's instantly $100k/year+
leafyba__ has joined #ruby
<yorickpeterse>
I'm very good with salt
<bougyman>
or $100/hr consulting
<yorickpeterse>
Though I'm not a chef
<norc>
yorickpeterse: I didn't like your soup.
<yorickpeterse>
ᕕ(ᐛ)ᕗ
<shevy>
norc oh but I am, just thinking on which gem to work next
lacrymology has quit [Read error: Connection reset by peer]
neanderslob has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
futilegames has joined #ruby
<bougyman>
shevy: know anyone that works at amazon?
tkuchiki has quit [Remote host closed the connection]
<bougyman>
They sent me a job offer yesterday, after a 4 month long interview process.
<shevy>
nope not really
<bougyman>
I was hoping it would be a crap offer so I could just piss on it.
baweaver has quit [Ping timeout: 246 seconds]
<bougyman>
but it's so good I have to consider it.
<shevy>
hehe
<bougyman>
I'd hate to go back to an office 5 days a week.
<shevy>
!!!
<yorickpeterse>
working in PJs > office
<shevy>
!!!!!
<bougyman>
but running their linux engineering team would be pretty fucking sweet to have on my resume.
leafybas_ has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
<norc>
shevy: How do you work a gem?
sdfgsdfg has joined #ruby
leafyba__ has quit [Remote host closed the connection]
kstuart has joined #ruby
leafybas_ has joined #ruby
Xeago has quit [Remote host closed the connection]
futilegames has left #ruby [#ruby]
_blizzy_ has joined #ruby
Xeago has joined #ruby
[ace]_ has quit [Ping timeout: 244 seconds]
[ace] has joined #ruby
<Ox0dea>
shevy: Your fancy-talk confused the reader.
Feyn has quit [Quit: Leaving]
moeabdol1 has joined #ruby
chriscoffee has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
bruno- has joined #ruby
relix has joined #ruby
blue_deref has joined #ruby
dikaio has quit [Quit: ........]
<shevy>
norc I make some changes, then publish the new variant
<norc>
Random gems or ones you use?
kab has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<shevy>
primarily my own gems; for other gems, I don't know... the coding style they use is often very different from my style. I was considering forking https://github.com/jordansissel/fpm though, I needed something like that... but I don't know yet
<adaedra>
That's because you're using sudo to install gems.
mostlybadfly has joined #ruby
<adaedra>
?sudo
<ruboto>
I don't know anything about sudo
<adaedra>
meh.
nixmaniack has joined #ruby
nixmaniack has joined #ruby
<adaedra>
?root
<ruboto>
general advice in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
Xeago has quit [Remote host closed the connection]
cwong_on_irc has quit [Quit: Leaving.]
<ChargedLight>
adaedra, thank you
mattwildig has quit [Remote host closed the connection]
<bougyman>
ChargedLight: type 'which ruby'
<bougyman>
then 'sudo which ruby'
<bougyman>
they're different, i'm guessing?
<ChargedLight>
indeed
<ChargedLight>
thank you guys
s00pcan has joined #ruby
arup_r has joined #ruby
arup_r is now known as Guest98110
_blizzy_ has quit [Quit: Leaving]
<Ox0dea>
~ $ gem search | grep -c [A-Z]
<Ox0dea>
1925
<Ox0dea>
Are they all in the wrong?
jondot has joined #ruby
Guest98110 is now known as arup_r
jondot has quit [Client Quit]
Xeago has joined #ruby
emilkarl has joined #ruby
mattwildig has joined #ruby
<Ox0dea>
For example, SYNner is a pretty great name for a SYN flood package.
<ChargedLight>
Ok, another problem: when i type "cap" from the root of my project, i'm getting this - kristof@kristof-note:~/Work/my-project$ cap
<ChargedLight>
bash: /usr/bin/cap: No such file or directory
<ChargedLight>
I've also made a huge mistake by installing capistrano like "sudo apt-get install capistrano"
<ChargedLight>
i think it's related to this
<Ox0dea>
ChargedLight: Definitely.
<Ox0dea>
ChargedLight: Ubuntu?
<ChargedLight>
yes
<ChargedLight>
i've already removed capistrano that wa installed with apt-get
<ChargedLight>
but error still present
<Ox0dea>
ChargedLight: Well, there are things that didn't expect you to do that.
<ChargedLight>
Ox0dea, how can i fix that now?
<Ox0dea>
ChargedLight: $DEITY knows, mate. You'll have to wait for a kinder soul to wander on by.
<Ox0dea>
Ubuntu + rvm = pain, and I'm only a masochist for me.
jondot has joined #ruby
<ChargedLight>
Ox0dea, what is $DEITY ?
<Ox0dea>
ChargedLight: A variable whose contents are best left unspecified.
<Ox0dea>
That pretty much feels like shoving RubyInstaller down Windows users' throats, but there it is.
zenguy_pc has quit [Ping timeout: 268 seconds]
<bougyman>
ubuntu + rvm isn't any pain at all.
s00pcan has joined #ruby
<bougyman>
just never use sudo.
chrissonar has joined #ruby
<ChargedLight>
Ox0dea, if i uninstall rvm and ruby and reinstall it from scratch, will it silve my problem?
<Ox0dea>
?try ChargedLight
<ruboto>
ChargedLight, Why don't you try it and see for yourself?
<bougyman>
ChargedLight: there's no need for that.
<bougyman>
rvm current
<bougyman>
what does that tell you?
<shevy>
"cap" is part of the capistrano gem and resides in bin/cap at the level of where capistrano is installed; i just did a "gem install capistrano" and "cap --help" works fine
<bougyman>
you can paste this stuff by rvm current|curl -F'sprunge=<-' sprunge.us
<ChargedLight>
kristof@kristof-note:~/Work$ rvm current
<ChargedLight>
ruby-2.2.1
<bougyman>
though current isn't too long, some of the other one's i'm going to ask for are.
<ChargedLight>
bash: /usr/bin/cap: No such file or directory
s00pcan has joined #ruby
<Ox0dea>
All my midkeks.
<Ox0dea>
Well, 80% of them.
jgt has joined #ruby
<bougyman>
ChargedLight: does Work/ have a .ruby-version and .ruby-gemset ?
<bougyman>
and a Gemfile ?
<bougyman>
"Work" is a weird name for a project.
auzty has quit [Quit: Leaving]
pathrocle has joined #ruby
<ChargedLight>
kristof@kristof-note:~/Work/project-web$ cap
<ChargedLight>
bash: /usr/bin/cap: No such file or directory - project-web has Gemfile. I've made a mistake by trying to install capistrano as "sudo apt-get install capistrano" before. It was installed under /usr/bin/cap - then i removed it via sudo ap-get remove capistrano and installed it with gem install. But ubuntu still links to the /usr/bin/cap instead of right place
blackmes1 has quit [Ping timeout: 260 seconds]
platzhirsch has left #ruby [#ruby]
gheegh has joined #ruby
zylogz80 has quit [Ping timeout: 264 seconds]
TPBallbag has joined #ruby
<ChargedLight>
bougyman, so maybe it will be faster and easier to completely reinstall rvm and ruby>
<Ox0dea>
> ubuntu + rvm isn't any pain at all.
Zai00 has joined #ruby
ruurd has quit [Max SendQ exceeded]
zenguy_pc has joined #ruby
<shevy>
ChargedLight why does it try to look at /usr/bin
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
ChargedLight: which -a cap
ruurd has joined #ruby
<shevy>
the normal command for when a binary is not found is e. g. this:
<shevy>
bash: not-existing-command: command not found
<shevy>
so you must use something that attempts to use a hard path
<ChargedLight>
kristof@kristof-note:~/Work/project-web$ which -a cap
<shevy>
we still generated an epic line thanks to Ox0dea, which I shall add to my IRC collection: <ChargedLight> it's great that i'm generating loolz for you, but it sould be nice to get some help or advice
Xeago has joined #ruby
mloy has quit [Ping timeout: 244 seconds]
<ChargedLight>
you are welcome
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nixmaniack has joined #ruby
nixmaniack has joined #ruby
<ChargedLight>
it's a pleasure to know that there are people who can become happy because of other people who are newbie or know less
nixmaniack has quit [Client Quit]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lessless has joined #ruby
<Ox0dea>
ChargedLight: How very metacircular.
<ChargedLight>
you can add this to your list of epic lines
<shevy>
ChargedLight are you saying that your problem is "real"?
<Ox0dea>
ChargedLight: That you derive pleasured from my deriving pleasure from your pain is confusing the shit outta me.
sgambino has joined #ruby
<Ox0dea>
> πdeepτme
<Ox0dea>
*derived pleasure
j416 has quit [Ping timeout: 240 seconds]
ruurd has quit [Quit: ZZZzzz…]
BrunoSaboia has quit [Quit: Leaving]
<Ox0dea>
ChargedLight: How did you come to install Capistrano with apt-get?
<ChargedLight>
heroin
<Ox0dea>
Whale, everything should've gone just fine, then.
<ChargedLight>
bad dealer
<Ox0dea>
You should endeavor to acquire a higher quality of such.
Olipro has quit [Ping timeout: 240 seconds]
<Ox0dea>
ChargedLight: Perturbations?
Ilyes512 has quit [Read error: Connection reset by peer]
<shevy>
norc are you ChargedLight
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mon_Ouie has quit [Ping timeout: 255 seconds]
_stu_ has joined #ruby
j416 has joined #ruby
Ilyes512 has joined #ruby
<Ox0dea>
ChargedLight: For seriouslies, though, that `grep` invocation really would tell you where all the string "/usr/bin/cap" occurs on your system, and that could significantly narrow the search space of possible solutions.
<Ox0dea>
You might consider sinking its stderr to reduce the noise, but there shouldn't be unduly many matches.
Ilyes512 has quit [Client Quit]
<ddv>
ChargedLight: what is the problem, sir?
<ddv>
why are you using sudo?
rikkipitt has quit [Quit: Leaving...]
<ChargedLight>
ddv, problem was, that i installed capistrano with "apt-get install capistrano" (yes, i am dumb) first. It installed it into /usr/bin/cap. After that i've removed this package and reinstalled it corrently via gem install. But if i try to launch "cap" command the system is trying to find capistrano in /usr/bin/cap instead of correct place. I am currently reinstalling rvm and ruby
subscope has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
subscope has quit [Client Quit]
ruurd has joined #ruby
Coldblackice has quit [Ping timeout: 265 seconds]
kalusn has quit [Remote host closed the connection]
<Ox0dea>
ChargedLight: It turns out you probably just needed to say `rvm reset` or some such.
<arne_>
thought it might be a bug, so i better come here, and tell you guys
<arne_>
well, character 0 does not exist, or in my c-understanding it would have to be a terminating character, but since that is not the case in rubies, i would've expected to return nil
<arne_>
great, i gonna use this, so i gonna come back and be mad and yell at you guys, if this changes
<norc>
shevy: Not sure I understand what you mean.
<ChargedLight>
reinstalling rvm and ruby helped, if anyone still ineterested
<adaedra>
arne_: don't yell too much, some people are sleeping in here.
<arne_>
actually that saves me about 3 lines of code!
<arne_>
4 even
Olipro has joined #ruby
<Ox0dea>
arne_: Put everything on one line like a champ, yeah?
<shevy>
4 lines saved?
bruno- has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
<Ox0dea>
arne_: With properly placed parentheses and `and`s, you can even do it without using any semicola.
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- is now known as Guest91786
<shevy>
he could omit the parens
<Ox0dea>
Not always.
baweaver has joined #ruby
Ilyes512 has joined #ruby
jondot has joined #ruby
<arne_>
yeah i know a string is atleast 8 bytes, so when im slicing at 8..x, it will never be nil, always be some kind of string, so i can unpack it, and even if that fails, it will be nil
kalusn has joined #ruby
<arne_>
it's beauty!
Zai00 has quit [Quit: Zai00]
Bloomer has joined #ruby
joonty has quit [Quit: joonty]
<arne_>
what do you guys think of crystal?
sdothum has joined #ruby
<arne_>
not the drug, the language.
<norc>
Shame. Could have told some fancy stories.
<arne_>
hookers are the greatest
<adaedra>
norc, it's time to cook!
umgrosscol has joined #ruby
<Ox0dea>
arne_: It trades fun for speed (not the drug, the performance), and that's usually a worthwhile trade-off.
<arne_>
where does the fun go :(?
frudo has left #ruby [#ruby]
<Ox0dea>
Into the transistors. :<
<Ox0dea>
Our faces lined up...
Guest91786 has quit [Ping timeout: 268 seconds]
baweaver has quit [Ping timeout: 246 seconds]
<arne_>
well, it really looks just like ruby, so why would it be less fun?
<jmonreal>
good day
zipace has quit [Quit: Leaving]
<arne_>
are talking about the requirement to compile?
<arne_>
jmonreal, howdy
<jmonreal>
arne_: everything fine, how about you?
favadi has joined #ruby
<jmonreal>
I have a question regarding parsing json and then assigning values
<arne_>
im coding ruby so im happpppppppppy
<norc>
shevy: If its any consolation I started reading the damn book. Starting to understand more and more about Ruby. :)
<norc>
jmonreal: Go ahead and ask away. If you have a gist to share that could help.
<arne_>
Ox0dea, tell me, i need to know!!!!!!!!!
<jmonreal>
is there a pretty way to assign a value of the JSON to a variable only if the key of the JSON has a non-empty value
diegoaguilar has joined #ruby
<jmonreal>
thannks norc
<arne_>
jmonreal, yes.
<jmonreal>
arne_: how would it be?
andykingking has quit [Quit: Leaving.]
ruurd_ has joined #ruby
<norc>
jmonreal: JSON is a serialization format.
Ilyes512 has quit [Read error: Connection reset by peer]
[ace]_ has joined #ruby
pabs_ has joined #ruby
<Ox0dea>
> now kith
Olipro has quit [Ping timeout: 240 seconds]
[ace] has quit [Ping timeout: 240 seconds]
pabs has quit [Ping timeout: 240 seconds]
hackeron has quit [Ping timeout: 240 seconds]
spectra has quit [Ping timeout: 240 seconds]
_joes__ has quit [Read error: Connection reset by peer]
rtl_ has quit [Ping timeout: 240 seconds]
rtl has joined #ruby
ruurd has quit [Ping timeout: 240 seconds]
arup_r has quit [Ping timeout: 240 seconds]
lsmola has quit [Ping timeout: 240 seconds]
noodle has quit [Ping timeout: 240 seconds]
uri_ has joined #ruby
<arne_>
>> JSON.parse({:herp=>:derp}.to_json)
<ruboto>
arne_ # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/462253)
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Ox0dea>
arne_: Ruby just lets you use the full breadth of your imagination, at least more so than any other extant language of which I'm aware.
<jmonreal>
sometimes this array is empty
Alina-malina has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<jmonreal>
ruboto: ok sorry about that
<Ox0dea>
jmonreal: Every time you say "a code", $DEITY kills a kitten.
Alina-malina has quit [Read error: Connection reset by peer]
<Ox0dea>
Why do you hate baby cats?
<jmonreal>
Ox0dea: jajaja
norc has quit [Ping timeout: 246 seconds]
<jmonreal>
ok
<jmonreal>
what am I supposed to say?
<arne_>
them codes.
<Papierkorb>
all of them?
<jmonreal>
jajaja
<jmonreal>
did you guys see the line of code?
<Ox0dea>
?guys jmonreal
<ruboto>
jmonreal, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<jmonreal>
ruboto: thanks ruboto
<arne_>
:D IRC overdose
symm- has joined #ruby
<jmonreal>
folks then
spectra has joined #ruby
platzhirsch has joined #ruby
<Ox0dea>
?ruboto jmonreal
<ruboto>
jmonreal, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
DEA7TH has joined #ruby
noodle has joined #ruby
<jmonreal>
what can I do to first check if the array has elements, before trying to get the first element wich is none
dhollinger has quit [Ping timeout: 255 seconds]
Ilyes512 has joined #ruby
<Ox0dea>
jmonreal: You could ask it for its size.
<Ox0dea>
But Array also responds to #empty?, so you should probably use that.
<Papierkorb>
jmonreal: ask it. no, really, there's Array#empty?
<jmonreal>
but as if (array is empty) then ...
<Ox0dea>
jmonreal: Just like that.
<jmonreal>
or there is something to do in the same line
<arne_>
>> Array, are you empty?
<ruboto>
arne_ # => /tmp/execpad-6b70c1b42107/source-6b70c1b42107:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/462256)
synthroid has joined #ruby
<Ox0dea>
>> pardon me array but would you be so kind as to tell me if @you_are_empty
<catphish>
when receiving a UDP datagram, i currently use UDPSocket#recvfrom, this returns the remote address and data, but is there a way to get the local address?
ESpiney has joined #ruby
Guest53 has joined #ruby
<catphish>
actually i'm not sure the kernel provides this at all
<Ox0dea>
catphish: Shouldn't your instance of UDPSocket know that about itself?
codecop has quit [Remote host closed the connection]
<catphish>
Ox0dea: the UDPSocket instance is bound to 0.0.0.0, so it doesn't know what addresses packets might arrive to
tkuchiki has quit [Remote host closed the connection]
<Ox0dea>
catphish: Oh, right.
<catphish>
i suspect this is more of a standard linux question that a ruby specific one
<Ox0dea>
Yeah.
Guest53_ has joined #ruby
<Ox0dea>
I'm sure the information is accessible, but probably not directly via Ruby's Socket class.
<Papierkorb>
that are three completely different pieces of code Oo
<arne_>
well relevant is only the last :D
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Papierkorb>
why?
bruno-_ has joined #ruby
subscope has joined #ruby
chriscoffee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
arne_: accessing a key doesn't assign a value -- it's a read only operation
<eam>
arne_: do you come from perl, perchance?
<arne_>
no, from c
<Ox0dea>
arne_: Simply put, `nil` is a "thing"; it is the single instance of the NilClass class. It has just as much right to be considered defined as any other Ruby value.
<eam>
in perl, accessing the key will auto-vivify the key
zenguy_pc has quit [Ping timeout: 264 seconds]
<ddv>
vivify?
<Ox0dea>
ddv: Bring to life.
<eam>
but in ruby, {} is the same as a {} which has had a ["key"] dereferenced -- it does not change the datastructure
<ddv>
nice
<arne_>
i understnad that nil is a value, i just find it weird, that accessing non-defined variables throws exceptions, while accessing non-existent key in a array/hash doesn't
<eam>
ddv: in perl you have to be careful to test exists($hash{key})
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has joined #ruby
<eam>
because if ($hash{key}) is just like saying $hash{key} = undef
hackeron has quit [Ping timeout: 260 seconds]
<Papierkorb>
in perl you have to be careful not to accidently implement a brainfuck interpret with an example code
<eam>
arne_: yeah - there are alternate hash accessors which will raise if you want
RegulationD has quit [Ping timeout: 246 seconds]
<eam>
>> {}.fetch "key"
<ruboto>
eam # => key not found: "key" (KeyError) ...check link for more (https://eval.in/462281)
<Ox0dea>
Papierkorb: I have something to show you.
<eam>
this isn't a language thing so much as a how the methods on Hash were implemented thing
<Ox0dea>
Though I suppose you already know about what I'm talking.
<eam>
(and on Array)
<eam>
>> [].fetch 2
<ruboto>
eam # => index 2 outside of array bounds: 0...0 (IndexError) ...check link for more (https://eval.in/462282)
<shevy>
snoopy uses the perl programming language
<Papierkorb>
Ox0dea: the WAT video? The 31C3 talk about perl by that italian guy?
<Ox0dea>
Papierkorb: My non-alphanumeric brainfuck interpreter in Ruby. :P
<eam>
arne_: the default [] is more loose I assume to allow techniques which extend the Array/Hash without too much boilerplate
6A4AAZCMN has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
<Ox0dea>
With *no* boilerplate.
<eam>
well, it does take some typing right
<Ox0dea>
if thing = hash[key]; ... thing ...; end
kiddorails has joined #ruby
<Papierkorb>
is code like ^ generally 'accepted' in the community?
bruno-_ has joined #ruby
<Ox0dea>
Am I being shunned?
<Papierkorb>
no, no idea, I'm just asking
favadi has joined #ruby
<Ox0dea>
Papierkorb: Doesn't it feel good in all the right places to write code like that?
<Papierkorb>
stuff like (self.foo ||= {})[bar] = baz isn't so great. in fact, it did something I did not expect
<Ox0dea>
Yeah, that's gross.
riotjones has quit [Ping timeout: 265 seconds]
<Ox0dea>
But utilizing the language's most basic assignment semantics shouldn't be a crime.
<Papierkorb>
Ox0dea: if it gets the job done, and is readable with no weird side effects, sure, why not?
<Ox0dea>
Papierkorb: You've answered your own question, methinks. :)
sdfgsdfg has quit [Ping timeout: 250 seconds]
<Ox0dea>
Wait, no, you were looking for a box to fit into, yeah?
6A4AAZCMN has quit [Remote host closed the connection]
<Papierkorb>
Well, that's my opinion, but they don't always match the guidelines of the community. Sometimes I just don't care about them as for some I think the reasoning is stupid.
dhjondoh has quit [Quit: dhjondoh]
<Papierkorb>
Sometimes, I see why some things are discouraged, and try to avoid it.
<darix>
Papierkorb: (self.foo ||= {})[bar] = baz - that is but ugly. make it 2 lines
<darix>
tbh
<arne_>
is ruby powerful enough to let me tell it, that every variable is defined?
davedev24 has joined #ruby
<arne_>
(excpect for just catching the exception)
<Papierkorb>
arne_: defined?(the_variable)
<darix>
arne_: what problem are you trying to solve actually?
<arne_>
curiousity
diegoaguilar has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 240 seconds]
Ballkenende has quit [Disconnected by services]
jgt has quit [Read error: Connection reset by peer]
<Papierkorb>
darix: already done it, also because it was buggy as hell and did not do what I expected it to do. But, this code I ran through Opal (Ruby -> JS), so maybe their compiler messed something up. No idea
TPBallba_ has joined #ruby
<Ox0dea>
arne_: You can use #method_missing to "capture" just about anything.
<arne_>
cool.
<Papierkorb>
also #const_missing hehe
bruno-_ has joined #ruby
<arne_>
ohyeah i totally forgot the main object
<arne_>
crazy how matz do that.
sankaber has quit [Remote host closed the connection]
ElSif has quit [Ping timeout: 272 seconds]
roshanavand has quit [Remote host closed the connection]
sameerynho has quit [Remote host closed the connection]
bruno- has joined #ruby
bruno- is now known as Guest6249
tjohnson has joined #ruby
DexterLB has joined #ruby
devoldmx has joined #ruby
Xeago has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
Guest56831 has quit [Ping timeout: 268 seconds]
pabs_ is now known as pabs
polishdub has joined #ruby
Guest6249 has quit [Ping timeout: 250 seconds]
patdohere has joined #ruby
roshanavand has joined #ruby
Xzanron has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
Kruppe- has joined #ruby
Kruppe has quit [Read error: Connection reset by peer]
bruno-_ has joined #ruby
radgeRayden has joined #ruby
Ox0dea has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 244 seconds]
bnizzle has quit [Read error: Connection reset by peer]
kies^ has joined #ruby
Xeago has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
patdohere has quit [Client Quit]
moeabdol1 has joined #ruby
musou has joined #ruby
joufflu has quit [Read error: Connection reset by peer]
danman has quit [Read error: Connection reset by peer]
bruno-_ has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
arne_ has quit [Quit: Leaving]
bruno-_ has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 240 seconds]
Zai00 has quit [Quit: Zai00]
krz has joined #ruby
treehug88 has joined #ruby
jgt has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
Rinzlit_ has joined #ruby
Xeago has joined #ruby
leafyba__ has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 264 seconds]
leafybas_ has joined #ruby
baweaver has joined #ruby
patdohere has joined #ruby
bruno-_ has joined #ruby
_blizzy_ has joined #ruby
zquad has joined #ruby
Rinzlit has quit [Ping timeout: 255 seconds]
jgt has joined #ruby
danman has joined #ruby
centrx has joined #ruby
chrissonar has quit [Remote host closed the connection]
arthurix_ has joined #ruby
juanpablo__ has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
bruno-_ has quit [Ping timeout: 255 seconds]
tmtwd has quit [Ping timeout: 265 seconds]
bruno-_ has joined #ruby
Xeago has quit [Remote host closed the connection]
m3_del has joined #ruby
m3_del has quit [Remote host closed the connection]
m3_del has joined #ruby
arthurix has quit [Ping timeout: 272 seconds]
juanpablo__ has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
AlexRussia has joined #ruby
bruno-_ has quit [Ping timeout: 264 seconds]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has joined #ruby
bruno-_ has joined #ruby
mark4 has quit [Remote host closed the connection]
momomomomo has joined #ruby
Peg-leg has joined #ruby
dopamean_ has joined #ruby
m3_del has quit [Ping timeout: 246 seconds]
patdohere has joined #ruby
mark4 has joined #ruby
vigintas has joined #ruby
mordocai has joined #ruby
patdohere has quit [Max SendQ exceeded]
monthy has joined #ruby
kstuart has joined #ruby
bruno-_ has quit [Ping timeout: 264 seconds]
acke has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
bruno-_ has joined #ruby
dhollinger has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
_stu_ has quit [Quit: _stu_]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nertzy has joined #ruby
jessemcgilallen has joined #ruby
patdohere has joined #ruby
speakingcode has joined #ruby
Xeago has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 272 seconds]
bruno-_ has quit [Ping timeout: 246 seconds]
dorei has joined #ruby
hotpancakes has joined #ruby
ruby-lang019 has joined #ruby
idefine has joined #ruby
patdohere has quit [Client Quit]
bruno-_ has joined #ruby
macdaddy has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
moeabdol1 has quit [Ping timeout: 246 seconds]
dhollinger has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 246 seconds]
subscope has joined #ruby
bruno-_ has joined #ruby
ibouvousaime has quit [Ping timeout: 272 seconds]
xet7 has joined #ruby
<ruby-lang019>
Hello Everyone , I have a question related to coding one facter value, I have coded something like this https://gist.github.com/nicks85/821fb9c652ae6fcb323d, But i am not getting it right ? can someone please help me ?
slawrence00 has joined #ruby
jas02 has quit [Quit: jas02]
jgt has quit [Read error: Connection reset by peer]
chibs has joined #ruby
jgt has joined #ruby
Trynemjoel has quit [Quit: Quitting]
pullphinger has quit [Remote host closed the connection]
pullphinger has joined #ruby
bruno-_ has quit [Ping timeout: 246 seconds]
peteykun has joined #ruby
bruno-_ has joined #ruby
arne_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<arne_>
hi, it's me again. is there a cool way to do [uid].pack("L").first
Trynemjoel has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arne_>
>> [232323].pack("V").first
<ruboto>
arne_ # => undefined method `first' for "\x83\x8B\x03\x00":String (NoMethodError) ...check link for more (https://eval.in/462347)
vigintas has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
vigintas has joined #ruby
<arne_>
nevermind, forget what i was saying
<arne_>
i was talking about unpack
<eam>
yeah pack returns a string :)
russellx has joined #ruby
evanjs has quit [Remote host closed the connection]
macdaddy has joined #ruby
vigintas1 has joined #ruby
nfk|laptop has quit [Quit: yawn]
platzhirsch has left #ruby [#ruby]
moeabdol1 has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
vigintas1 is now known as vigintas
<eam>
I don't see why String doesn't implement #first, though
idefine_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
bruno-_ has quit [Ping timeout: 272 seconds]
bruno-_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
synthroid has quit [Remote host closed the connection]
<ljarvis>
first what?
dh64 has quit [Quit: Konversation terminated!]
Renich has joined #ruby
rgb-one has joined #ruby
treehug88 has quit [Ping timeout: 255 seconds]
idefine_ has quit [Client Quit]
bruno-_ has quit [Ping timeout: 250 seconds]
monthy has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]
inteq has joined #ruby
bruno-_ has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
arthurix has joined #ruby
hahuang65 has quit [Ping timeout: 252 seconds]
neanderslob has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
eminencehc has joined #ruby
roshanavand has joined #ruby
mndoci has joined #ruby
patdohere has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 255 seconds]
bruno-_ has quit [Ping timeout: 250 seconds]
<yorickpeterse>
first everything
arthurix_ has quit [Ping timeout: 272 seconds]
patdohere has quit [Client Quit]
<ljarvis>
the obvious choice
ChargedLight has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
Balllkenende is now known as Feellicks
jaequery has quit [Client Quit]
momomomomo has joined #ruby
ibouvousaime has joined #ruby
<rgb-one>
How easy is it to retrieve data from a csv file?
<skullcrasher>
hey there, I have a rest api that send me an object that has a attribute, which itself is an array of json objects
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
kp666 has joined #ruby
<skullcrasher>
so how do you do it in ruby, that I can have a model for the whole request, that maps the array of json objects, to objects of another model class?
<skullcrasher>
I thought more it could work somehow like relations for AR but not backed by database and keys
lipoqil has quit [Quit: Connection closed for inactivity]
symbol has joined #ruby
Feellicks is now known as Balllkenende
<adaedra>
Silly bot.
emilkarl has quit [Quit: emilkarl]
mistermocha has joined #ruby
eminencehc has quit [Remote host closed the connection]
<adaedra>
skullcrasher: rails?
<ljarvis>
yeah who created such a monstrosity
<skullcrasher>
yes also
<adaedra>
?rails
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<skullcrasher>
just thought it's a normal ruby thing
baroquebobcat_ has joined #ruby
yardenbar has joined #ruby
hotpancakes has joined #ruby
synthroid has joined #ruby
<adaedra>
Well, that's how ActiveRecord processes your input.
dnomyar has joined #ruby
<eam>
ljarvis: first element, same as [0]
polysics has quit []
<ljarvis>
eam: i guess, though what [0] has been ambiguous across versions
<eam>
sure, but what argument does that present? That [] should go away?
zenguy_pc has quit [Ping timeout: 255 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Read error: No route to host]
freerobby1 has joined #ruby
<eam>
if [0] and [-1] exist, probably #first and #last ought to
<ljarvis>
no, no argument really just stating
chriscoffee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
riotjones has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
mistermocha has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Ping timeout: 260 seconds]
baroquebobcat_ is now known as baroquebobcat
ruurd has joined #ruby
rgtk has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
bMalum_ has joined #ruby
Zai00 has quit [Quit: Zai00]
makufiru has joined #ruby
ChargedLight has joined #ruby
bMalum has quit [Ping timeout: 272 seconds]
bMalum_ is now known as bMalum
nertzy has quit [Quit: This computer has gone to sleep]
fedexo has joined #ruby
arne_ has quit [Ping timeout: 240 seconds]
cornerma1 has joined #ruby
riotjones has quit [Ping timeout: 272 seconds]
evanjs has joined #ruby
baweaver has joined #ruby
ruurd has quit [Ping timeout: 252 seconds]
cornerman has quit [Ping timeout: 265 seconds]
emilkarl has joined #ruby
hotpancakes has joined #ruby
Zai00 has joined #ruby
eminence_ has joined #ruby
yardenbar has quit [Ping timeout: 260 seconds]
charany1 has joined #ruby
<adaedra>
mpc stop
<adaedra>
wait, this is not my shell
eminencehc has quit [Ping timeout: 272 seconds]
cornerma1 has quit [Ping timeout: 244 seconds]
cornerman has joined #ruby
Balllkenende has quit [Remote host closed the connection]
<charany1>
hi , I am getting unexpected tIdentifier error :https://gist.github.com/charany1/d0ac1846b9f757bf5fcd
patdohere has joined #ruby
purplexed- has joined #ruby
<charany1>
please help me in figuring out what's wrong with this ?
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chibs has joined #ruby
hotpancakes has joined #ruby
pandaant has quit [Quit: Lost terminal]
skullcrasher has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
mozzarella has quit [Quit: WeeChat 1.2]
evanjs has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mattwildig has quit [Remote host closed the connection]
mistermocha has joined #ruby
JDiPierro has joined #ruby
<axisys>
soahccc: sorry I was away ...
shortdudey123 has quit [Max SendQ exceeded]
diegoaguilar has joined #ruby
<axisys>
soahccc: so I am calling rvc from bash and without quote it starts a background process when sees the '&' outside quote
baweaver has quit [Remote host closed the connection]
shortdudey123 has joined #ruby
<soahccc>
axisys: then you have to escape accordingly to the environment
freerobby has joined #ruby
spider-mario has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
Moblin has joined #ruby
Ebok has joined #ruby
Channel6 has joined #ruby
<Ebok>
Hey, quick question. If I have a string and I need to split it into every third character and keep the remainder in the last array instance, how is the best route to to this?
Moblin has left #ruby [#ruby]
riotjones has joined #ruby
cjbischof_ has quit [Ping timeout: 260 seconds]
<Ebok>
example: string = "Hello" string.scan(/.../) gives me ["Hel"] rather then what I need: ["Hel","lo"]
symm- has joined #ruby
hotpancakes has joined #ruby
hahuang65 has joined #ruby
<soahccc>
Ebok: one way (no idea if it is the best) scan(/.{1,3}/)
zotherstupidguy has quit [Quit: WeeChat 1.3]
<Ebok>
Hm.
zenguy_pc has quit [Ping timeout: 264 seconds]
erbesharat has joined #ruby
<axisys>
soahccc: rvc foo:"secret&me"@vcenter.com does not send the quote to rvc .. it is just bash needs it
evanjs has quit [Remote host closed the connection]
<axisys>
soahccc: URI.parse(%{"foo:secret&me@vcenter.com"}) fails too
solars has joined #ruby
spew has quit [Ping timeout: 240 seconds]
<soahccc>
axisys: well the quotes there are not needed since %{} already is a string but I guess without protocol it's actually not working as inspected
based_pdev_ has joined #ruby
<soahccc>
*expected
atomical_ has quit [Ping timeout: 255 seconds]
<axisys>
soahccc: I guess I can modofy line 73
<axisys>
uri = RVC::URIParser.parse str .. change it to something better ?
cjbischof_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Coldblackice has joined #ruby
phillips1012 has quit [Ping timeout: 250 seconds]
<axisys>
so need to try like this? http://user%40example.com:pass%21word@example.com/path/to/input.avi
kstuart has quit [Ping timeout: 240 seconds]
mozzarella has joined #ruby
FDostoyevsky has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
jacksonmills has joined #ruby
lukaszes has quit [Client Quit]
`based_pdev` has joined #ruby
charany1 has quit [Ping timeout: 268 seconds]
bruno-_ has quit [Ping timeout: 250 seconds]
charany1 has joined #ruby
baweaver has quit [Remote host closed the connection]
bruno- has joined #ruby
<soahccc>
axisys: yeah you have to encode the special characters. at least according to the specification. No idea if the end product will be able to work with it
bruno- is now known as Guest46316
roshanavand has joined #ruby
vF3hNGxc47h8 has joined #ruby
<axisys>
soahccc: but password is unknown..
<soahccc>
unknown?
ibouvousaime has quit [Ping timeout: 244 seconds]
snockerton has joined #ruby
<axisys>
how do I know if there is odd character and then encode it?
bb010g has joined #ruby
based_pdev_ has quit [Ping timeout: 255 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<axisys>
or are you saying take the password word and encode it before using it?
<soahccc>
axisys: well you either know the password (you need to pass it at some point right?) or you url encode the unknown password
<banister>
anyone here speak french?
<axisys>
soahccc: yes $_pass in bash has the password
<banister>
what does 'bah pour se voir' mean?
<axisys>
banister: translate.google.com
rakm has joined #ruby
<banister>
axisys no shit, it doesn't work in this case, it's clearly some form of french slang
<riceandbeans>
if I have a method, def foo (bar, baz, foobar='test'), and I want to check if specifically foobar is set to NOT be 'test' can I not specify it on passing it in like so?
<riceandbeans>
foo (bar, baz, foobar='testtest')
<Ox0dea>
riceandbeans: It's not entirely clear what you're asking.
bruno-_ has quit [Ping timeout: 246 seconds]
<riceandbeans>
ok
<dorei>
hello
<riceandbeans>
I have a method with required variables and variables with default values
<adaedra>
soahccc: well, it doesn't seems too bad. I'm sure most people working for Ikea don't speak swedish, for example.
<Ox0dea>
riceandbeans: You want argument guards or something?
<dorei>
is there a way to find out which methods at an object were defined via attr_reader / attr_writer ?
<riceandbeans>
I want to be able to specify a specific variable being passed in as something, but the number of arguments passed may vary
momomomomo has joined #ruby
<riceandbeans>
I may end up just writing a separate method to do the exact same thing for the most part if I can't get it thought
<eam>
riceandbeans: you can always set defaults in your own code, outside the method signature
bruno-_ has joined #ruby
<Ox0dea>
dorei: A neat trick for determining that a method was created via #attr_accessor is to grab hold of the getter and setter as Method objects and compare their #source_location.
acke has joined #ruby
erbesharat has quit [Remote host closed the connection]
<Ox0dea>
dorei: I suppose you could probably finagle that approach into finding the constituent parts.
siemprefresco has joined #ruby
<dorei>
let me check that
decoponyo has joined #ruby
<eam>
def whatevs(*args); arbitrary_logic_on args; end
TheHodge has quit [Quit: Connection closed for inactivity]
<Ox0dea>
riceandbeans: It depends on where in the argument list you'd like the required argument to appear.
arup_r has quit [Quit: Leaving]
<riceandbeans>
I don't care, I just want it to work
<riceandbeans>
it could be first, last, middle, really don't care where it is if it works
<Ox0dea>
dorei: Yeah. :< I trust the method_source gem would be overkill for your purposes?
decoponyo has quit [Quit: Leaving...]
baweaver has joined #ruby
rdark has quit [Quit: leaving]
towski_ has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
gusTester has left #ruby [#ruby]
bruno-_ has quit [Ping timeout: 250 seconds]
bruno-_ has joined #ruby
autojack has joined #ruby
[Butch] has joined #ruby
<dorei>
Ox0dea: at SO they suggest overriding attr_reader
guardian has quit [Ping timeout: 250 seconds]
<autojack>
I am struggling with gem dependencies. I am trying to install a specific version of gem foo. when I do, it fails because something tries to install net-ssh 3.0.1, which requires ruby 2.0.0. yet 'gem dependency -r foo -v myversion' shows that it depends on a handful of things, valid versions of which are already installed.
<autojack>
how do I figure out what is trying to install net-ssh?
<autojack>
-V and --debug on gem install, annoyingly, do not tell me.
eminencehc has joined #ruby
mistermo_ has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
mattwildig has joined #ruby
jackjackdripper has joined #ruby
Ox0dea has quit [Ping timeout: 250 seconds]
eminencehc has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 272 seconds]
_djbkd has joined #ruby
vdamewood has joined #ruby
eminencehc has joined #ruby
bruno-_ has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
tigarcia has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
tigarcia has joined #ruby
axl_ has quit [Ping timeout: 255 seconds]
adac has joined #ruby
ibouvousaime has quit [Ping timeout: 244 seconds]
<worstcase>
Ox0dea, sorry was just looking into the docs as you wrote. yeah sounds about right. thanks!
ibouvousaime has joined #ruby
QORRiE has quit [Remote host closed the connection]
mozzarella has joined #ruby
kadoppe has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
eminencehc has joined #ruby
jgt has joined #ruby
balazs has joined #ruby
axl_ has joined #ruby
kadoppe has joined #ruby
axl__ has quit [Ping timeout: 252 seconds]
elaptics is now known as elaptics`away
bruno-_ has quit [Ping timeout: 260 seconds]
bruno-_ has joined #ruby
balazs has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
jordanloky has joined #ruby
roxtrong_ has joined #ruby
roxtrongo has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
rodfersou has quit [Quit: leaving]
roshanavand has quit [Remote host closed the connection]
tigarcia has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 260 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghostbox has quit [Remote host closed the connection]
Tempesta has quit [Read error: Connection reset by peer]
dravine has joined #ruby
sepp2k has quit [Quit: Leaving.]
Tempesta has joined #ruby
YourKicks has joined #ruby
Zai00 has joined #ruby
dravine_ has joined #ruby
prestorium has quit [Quit: Leaving]
mcantor has quit [Ping timeout: 250 seconds]
dravine has quit [Ping timeout: 260 seconds]
dravine_ is now known as dravine
<hxegon>
>> def ransom_text text; acc, chars = [], text.split(''); acc << chars.shift(rand(5)).join until chars.empty?; acc.map(&:capitalize).join; end; ransom_text 'The quick brown fox jumps over the lazy dog.'
<ruboto>
hxegon # => "THE qUick bRown foX jUMps Over the Lazy dOG." (https://eval.in/462496)
worstcase has quit [Quit: Verlassend]
Channel6 has quit [Ping timeout: 272 seconds]
dopamean_ has quit [Ping timeout: 264 seconds]
<hxegon>
this whole acc business is killing me
juanpablo__ has joined #ruby
Channel6 has joined #ruby
Ulfalizer2 has quit [Quit: zz]
User458764 has joined #ruby
acke has quit [Remote host closed the connection]
mleung has joined #ruby
User458764 has quit [Client Quit]
hotpancakes has quit [Remote host closed the connection]
<hxegon>
Ox0dea: depends on how you thing of quantom mechanics, unless this is a whoosh moment.
mattwildig has joined #ruby
dfockler has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
eminencehc has quit [Remote host closed the connection]
eminencehc has joined #ruby
stamina has quit [Ping timeout: 240 seconds]
unsymbol has quit [Ping timeout: 265 seconds]
riotjones has quit [Ping timeout: 260 seconds]
mistermo_ has quit [Ping timeout: 246 seconds]
<Ox0dea>
hxegon: The vast majority of our assumptions regarding randomness have turned up misplaced; doesn't Occam suggest that we ought to just extrapolate all the way out?
Spami_ has quit [Ping timeout: 264 seconds]
<Ox0dea>
> Any sufficiently advanced disorganization is indistinguishable from randomness... until you set about organizing it.
mozzarella has quit [Quit: WeeChat 1.2]
timonv has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
<Ebok>
Hm, I'm working with sort_by, and I'm curious. array.sort_by{|str| str.length} gives the smallest to the largest, is there a simple change that would provide the same array but largest to smallest?
<hxegon>
Ebok: just do .reverse on the result
Channel6 has quit [Quit: Leaving]
<Ebok>
nope, that still fucks it up
<Ebok>
I need it to do what I asked.
<Ebok>
I guess I'll do it differently if that's not possible
mistermocha has quit [Remote host closed the connection]
mozzarella has joined #ruby
<hxegon>
Ebok: hmm... you can't just do array.sort_by(&:length).reverse ?
<shevy>
code that is of dubious nature - middle pile
<shevy>
code that was written by hanmac or Ox0dea - last pile
<Ox0dea>
^
to_json has joined #ruby
to_json has joined #ruby
<Ebok>
xD
momomomomo has quit [Ping timeout: 260 seconds]
<Ebok>
>_>; that's true
<Ebok>
also Ox0dea pm
axsuul has joined #ruby
kinduff has joined #ruby
neanderslob_ has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
rgrmatt has quit [Ping timeout: 250 seconds]
axl_ has quit [Quit: axl_]
neanderslob has joined #ruby
freerobby has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
tigarcia has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
mattwildig has quit [Remote host closed the connection]
baweaver has joined #ruby
freerobby has quit [Quit: Leaving.]
symbol_ has quit [Ping timeout: 240 seconds]
andykingking has quit [Read error: Connection timed out]
bMalum has quit [Quit: bMalum]
andykingking has joined #ruby
freerobby has joined #ruby
pedahzur has joined #ruby
eminencehc has joined #ruby
Axy has joined #ruby
nfk has joined #ruby
<pedahzur>
Do Ruby networking libraries (such as open-uri and 'net') honor $HTTP_PROXY and $NO_PROXY rules automatically, or does the application using those libraries have to invoke something to make sure their requests go over the defined proxy?
adac has quit [Ping timeout: 260 seconds]
spider-mario has quit [Remote host closed the connection]
Mia has quit [Ping timeout: 265 seconds]
<Ox0dea>
pedahzur: Yes to the former, no the latter.
<pedahzur>
Ox0dea: Thanks!
<Ox0dea>
pedahzur: You were referring to the environment variables, yeah?
<pedahzur>
Ox0dea: yes.
yfeldblum has quit [Ping timeout: 246 seconds]
<pedahzur>
Ox0dea: I'm trying to troubleshoot a Berkshelf problem, and I wanted to make sure it was honoring proxy rules. It's throwing a 404 exception, but not telling *what* URL it's failing to load, even in debug mode. :)
<Ox0dea>
pedahzur: Debug-printing to the rescue. :P
andykingking has quit [Ping timeout: 264 seconds]
<pedahzur>
Ox0dea: Explain?
_stu_ has quit [Quit: _stu_]
solocshaw has joined #ruby
uber has joined #ruby
andykingking has joined #ruby
Axy has quit [Ping timeout: 265 seconds]
kinduff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
<Ox0dea>
pedahzur: Wherever seems most fitting, print the URL you're about to request before actually requesting it.
bruno-_ has joined #ruby
<pedahzur>
Ox0dea: Ah. I'll have to dig into the berkshelf code for that. :)
uber has quit [Changing host]
uber has joined #ruby
spew has joined #ruby
sepp2k1 has joined #ruby
Xeago has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 260 seconds]
<Ox0dea>
pedahzur: Oh, I see. Well, this is Ruby; you're free to redefine just about anything you please just about any time.
Xeago has joined #ruby
<pedahzur>
heh, this is true.
<Ox0dea>
pedahzur: Have you considered watching from the outside instead with some tracing library?
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
vinleod has joined #ruby
<Ox0dea>
And, well, there's the TracePoint API if you'd prefer to do it from within Ruby, but that could get hairy.
Xeago has quit [Read error: Connection reset by peer]
<pedahzur>
Ox0dea: No. Relatively new to Ruby, so much of this is new to me.
relix has joined #ruby
Xeago has joined #ruby
vdamewood has quit [Ping timeout: 240 seconds]
<pedahzur>
There are 55 files in berks to dig through...not sure I want to do this. :)
bruno-_ has quit [Ping timeout: 255 seconds]
bruno-_ has joined #ruby
axl_ has joined #ruby
to_json has quit [Quit: Leaving.]
<Ox0dea>
pedahzur: Well, I'm outta here for a while, but maybe I'll be in the mood for some code archaeology when I get back. :P
<Joshua__>
but im working on a simple log in program, in the command line, just to kinda let my current skills sink in. I keep encountering a syntax issue.
karapetyan has joined #ruby
juanpablo__ has joined #ruby
bruno-_ has joined #ruby
JDiPierro has quit [Remote host closed the connection]
umgrosscol has quit [Remote host closed the connection]
<Joshua__>
hxegon: thank you
bruno-_ has joined #ruby
mistermo_ has joined #ruby
solars has quit [Ping timeout: 250 seconds]
<darix>
shevy: llvm based. should rubinius be similar maybe?
hahuang65 has quit [Ping timeout: 260 seconds]
haxrbyte_ has quit [Remote host closed the connection]
Musashi007 has joined #ruby
<hxegon>
Joshua__: what is the syntax issue?
haxrbyte has joined #ruby
riotjones has quit [Ping timeout: 255 seconds]
<Joshua__>
Okay now the issue is that
<Joshua__>
even if my username or password is equal to the username or password i made, it isnt recognizing it
edj979 has joined #ruby
<Joshua__>
how do make ruby find if a string is the same as another?
<edj979>
Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development Extracted source (around line #392): 390 391 392 393 394 395 def check_pending!(connection = Base.connection) raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?(connection) end def load_schema_if_pending! I tried that and it showed the same thing again. I already
<hxegon>
edj979: I just told you, ask on #rubyonrails
<edj979>
Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development Extracted source (around line #392): 390 391 392 393 394 395 def check_pending!(connection = Base.connection) raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?(connection) end def load_schema_if_pending! I tried that and it showed the same thing again. I already
<edj979>
oh
<edj979>
sorry
edj979 has left #ruby [#ruby]
bender_unit has joined #ruby
<shevy>
darix no idea, I wish creating new programming languages would be much simpler though
<hxegon>
edj979: its ok. Also, mass pasting stuff is not good irc etiquette. use gists or something
edj979 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<edj979>
When i tried to join it it said i couldn't send messages on that channel. Do you know what thats about?
rbennacer has quit [Remote host closed the connection]
<edj979>
I've spent all day trying to fix this error but im clueless
<edj979>
i just started reading it yea
kobain has joined #ruby
bMalum has quit [Quit: bMalum]
bruno-_ has joined #ruby
kobain has quit [Max SendQ exceeded]
zenguy_pc has joined #ruby
EllisTAA has joined #ruby
polishdub has quit [Quit: Leaving]
baweaver has joined #ruby
<EllisTAA>
i’m trying to write a 6 degrees of separation algorithm but for some reason i don’t think it’s working. when i’m iterating over an array of [a,b,c] if a hits a conditional statement that includes a break will it break out of that code and then start working on b or will it break out of the entire iteration over the array? https://gist.github.com/ellismarte/2c17adc195dfc84eac01#file-6degreesofbacon-rb-L25
<hxegon>
dem nested if statements
acke has joined #ruby
<EllisTAA>
i know : \
<hxegon>
EllisTAA: this would be way easier if you named stuff a bit better and extracted functions
<pedahzur>
According to the docs, Net::HTTPNotFound has a parent of Net::HTTPClientError which ha a parent of Net::HTTPResponse which seems to indicate error.body() should work, but it also fails.
Xeago has quit [Ping timeout: 264 seconds]
Eiam_ has joined #ruby
tigarcia has quit [Remote host closed the connection]
zenguy_pc has quit [Ping timeout: 272 seconds]
idefine has joined #ruby
radgeRayden has quit [Ping timeout: 240 seconds]
bruno-_ has quit [Ping timeout: 255 seconds]
bruno-_ has joined #ruby
Rollabunna has joined #ruby
Balllkenende has quit [Read error: Connection reset by peer]
Voker57 has quit [Read error: Connection reset by peer]
raposa has left #ruby [#ruby]
axl_ has quit [Quit: axl_]
arthurix_ has joined #ruby
bruno-_ has quit [Ping timeout: 268 seconds]
Rollabunna has quit [Ping timeout: 265 seconds]
axl_ has joined #ruby
bruno-_ has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
radgeRayden has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
acke has quit [Ping timeout: 272 seconds]
rgb-one has joined #ruby
kstuart has joined #ruby
<rgb-one>
Hello
<hxegon>
EllisTAA: looking now
<hxegon>
rgb-one: hi!
radgeRayden_ has quit [Ping timeout: 250 seconds]
<EllisTAA>
hxegon: i’m trying to break apart the method .. kinda hard
cjbischof_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon>
EllisTAA: thats a sign :D
<EllisTAA>
lol
arthurix has quit [Ping timeout: 264 seconds]
SCHAAP137 has joined #ruby
karapetyan has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 244 seconds]
<rgb-one>
What is the name of the ruby file hash (md5, sha1, etc.) library?
hahuang65 has joined #ruby
kinduff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon>
EllisTAA: is this a runtime error, or a logical error?
tigarcia has joined #ruby
<hxegon>
EllisTAA: nvm, remembered your question
<EllisTAA>
hxegon: logic
Zai00 has quit [Quit: Zai00]
dnomyar has quit [Ping timeout: 244 seconds]
bruno-_ has joined #ruby
<rgb-one>
digest
kinduff has joined #ruby
momomomomo has joined #ruby
kinduff has quit [Max SendQ exceeded]
kstuart has quit [Ping timeout: 264 seconds]
rgb-one has left #ruby [#ruby]
Zai00 has joined #ruby
wilsonc91 has joined #ruby
wilsonc91 has quit [Max SendQ exceeded]
bruno-_ has quit [Ping timeout: 244 seconds]
Limix has joined #ruby
wilsonc91 has joined #ruby
malconis_ has quit [Remote host closed the connection]
leafybas_ has joined #ruby
wilsonc91 has quit [Max SendQ exceeded]
bruno- has joined #ruby
malconis has joined #ruby
kaneis has joined #ruby
bruno- is now known as Guest6185
atomical has joined #ruby
<hxegon>
EllisTAA: this is... hard to cut through. your mutating stuff, there is recursion. what are kind of data are you operating on? Could you explicit use of return be screwing with this? etc...
wilsonc91 has joined #ruby
<EllisTAA>
hxegon: maybe. any ideas on how i could approach this in a better way?
wilsonc91 has quit [Max SendQ exceeded]
Zai00 has quit [Quit: Zai00]
jgpawletko has joined #ruby
wilsonc91 has joined #ruby
Guest6185 has quit [Ping timeout: 240 seconds]
wilsonc91 has quit [Max SendQ exceeded]
Balllkenende has quit []
<hxegon>
EllisTAA: honestly, I think you might be better starting over... It would probably take me longer to pick through this and make suggestions than help you rewrite it.
<EllisTAA>
hxegon: for sure. but how would i approach it diffeerentlY?
bruno- has joined #ruby
bruno- is now known as Guest23202
dopamean_ has quit [Ping timeout: 264 seconds]
wilsonc91 has joined #ruby
jessemcgilallen has joined #ruby
Musashi007 has joined #ruby
Joshua__ has quit [Ping timeout: 246 seconds]
<hxegon>
EllisTAA: well for starters it's one huge method. We would start by breaking it down.
wilsonc91 has quit [Max SendQ exceeded]
jgpawletko has quit [Client Quit]
<EllisTAA>
hxegon: the problem with that is that i then need to pass methods a ton of variables … you think that’s fine?
wilsonc91 has joined #ruby
<hxegon>
EllisTAA: what data do you need to pass it?
kaneis has quit [Quit: WeeChat 1.3]
<EllisTAA>
a list of groups searched, members searched, degree of separation, the person we are trying to find
raposa has joined #ruby
<hxegon>
EllisTAA: is groups searched stuff that is necessary for recursion, or stuff that you pass in initially?
Guest23202 has quit [Ping timeout: 264 seconds]
<EllisTAA>
hxegon: if i don’t pass it in then i could end up searching the same group which would result in a function that doesn’t work
Wsewolod has joined #ruby
bruno-_ has joined #ruby
charany1 has quit [Ping timeout: 264 seconds]
chouhoulis has joined #ruby
CloCkWeRX has joined #ruby
stannard has quit [Remote host closed the connection]
CloCkWeRX has left #ruby [#ruby]
<hxegon>
EllisTAA: would you ever pass in a value outside of that method definition?
radgeRayden_ has joined #ruby
Motoservo has joined #ruby
symm-_ is now known as symm-
baroquebobcat has joined #ruby
mistermocha has quit [Remote host closed the connection]
radgeRayden has quit [Ping timeout: 252 seconds]
BSaboia has quit [Quit: Leaving]
bruno-_ has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
<hxegon>
EllisTAA: nevermind, you'll see what I mean in a bit. We need to make a prototype method that is easier to work with. How about one that operates on a hash like this: { title: 'footloose', cast: [:KevinBacon, ... ] }
<EllisTAA>
hxegon: sorry my arm hurts i gotta take a break from coding.
bruno-_ has joined #ruby
<hxegon>
EllisTAA: ok, see ya
mistermocha has quit [Read error: Connection reset by peer]
kalusn has quit [Remote host closed the connection]
mistermocha has joined #ruby
diegoviola has joined #ruby
baroquebobcat has quit [Ping timeout: 240 seconds]
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 268 seconds]
Motoservo has quit [Read error: Connection reset by peer]
edj979 has quit [Quit: Page closed]
bruno-_ has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Ping timeout: 260 seconds]
bruno-_ has quit [Ping timeout: 240 seconds]
<pedahzur>
lagweezle: Thanks.
<lagweezle>
o7
linduxed has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
<pedahzur>
It's actually Berkshelf that uses the open-uri, and I've narrowed it down to a test case that shows open() is causing the issue. I may have to push this upstream. :(
symm- has quit [Ping timeout: 240 seconds]
bruno-_ has joined #ruby
zylogz80 has joined #ruby
htmldrum has joined #ruby
A124 has quit [Quit: '']
babblebre has quit [Quit: Connection closed for inactivity]
momomomomo has quit [Quit: momomomomo]
juanpablo__ has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
bruno-_ has quit [Ping timeout: 272 seconds]
mag42c has quit [Quit: mag42c]
jpfuentes2 has joined #ruby
bruno-_ has joined #ruby
CloCkWeRX has joined #ruby
jessemcgilallen has quit [Ping timeout: 250 seconds]
sandals has joined #ruby
twistedpixels_ is now known as twistedpixels
<pedahzur>
darix: Interesting. That gist doesn't seem to work as it should. A 404 raises Net::HTTPServerException not a Mechanize::ResponseCodeError. Is that expected?
juanpablo__ has quit [Ping timeout: 240 seconds]
babblebre has joined #ruby
<lagweezle>
pedahzur: Out of curiosity, is this an HTTP URL that redirects to an HTTPS URL?
<pedahzur>
lagweezle: No, it's an https URL.
jpfuentes2 has quit [Ping timeout: 246 seconds]
ruby-lang358 has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
SuMo_D has joined #ruby
* lagweezle
ahs.
<ruby-lang358>
hi lads, silly question: what's the difference between class Kernel; ... statements ... ; end and class << Kernel; ...statements... ; end ??
dhollinger has joined #ruby
trosborn has joined #ruby
<havenwood>
ruby-lang358: The latter could alternatively be written: class Kernel; class << self; ... end end
Musashi007 has quit [Quit: Musashi007]
<ruby-lang358>
so the latter modifies the object representing the class Kernel, while the former the actual class Kernel?
<havenwood>
ruby-lang358: `class Kernel; class << self; def example; end end end` could alternately be written as `class Kernel; def self.example; end end end`.
roxtrong_ has quit [Read error: Connection reset by peer]
dopamean_ has joined #ruby
<havenwood>
ruby-lang358: Do you know about class methods or module functions?
<ruby-lang358>
I'm trying to understand this matter as I'm new to Ruby. I understand that def self.foo is a static method, while def foo is a instance method
rodfersou has quit [Quit: leaving]
<ruby-lang358>
at least in class Bla; def foo; end
Spami_ has quit [Quit: This computer has gone to sleep]
firstdayonthejob has quit [Ping timeout: 244 seconds]
<ruby-lang358>
so class Bla; class << self; looks to me as a shortcut to define static methods/vars?