havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<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> but instead of remove just print
<Ox0dea> >> [1,2,3,4] & [2,3] # skweek
<ruboto> Ox0dea # => [2, 3] (https://eval.in/461831)
<Ox0dea> Do you understand what Array#& is doing there?
<hxegon> >> File.basename('something/rad_tunes.mp4')
<ruboto> hxegon # => "rad_tunes.mp4" (https://eval.in/461832)
<hxegon> nope
<skweek> no
<Ox0dea> >> [1,2,3,4] & [2,3,5] # skweek: How about now?
<ruboto> Ox0dea # => [2, 3] (https://eval.in/461833)
DEA7TH has quit [Quit: DEA7TH]
patdohere has joined #ruby
<skweek> may I guess, [1,2,3,4] is an array of the numbers 1,2,3,4 and [2,3] is an array being compared to [1,2,3,4]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<hxegon> skweek: yes, and it returns the elements they have in common, being [2, 3]
Xeago has quit [Ping timeout: 260 seconds]
tkuchiki has quit [Remote host closed the connection]
<skweek> ruby -e "p Dir['**/*.m4a']" & ruby -e "p Dir['**/*.mp3']"
chibs has joined #ruby
notnoyyyyy has quit [Ping timeout: 246 seconds]
elaptics is now known as elaptics`away
<Ox0dea> skweek: I only used `ruby -e` in the demonstration for convenience; you should be putting your code in a .rb file and executing it that way.
mozzarella has quit [Quit: WeeChat 1.2]
<hxegon> Is there a File method like basename that precedes the full path? I'd rather not suggest a regex
<eam> dirname
<skweek> i'm kinda of confused, something that looks like inserted into an array.. compared... File.basename('Dir[**/*.m4a*]')
<hxegon> or do a bunch of split('/')[0..-1]bullsh
rgrmatt has quit [Remote host closed the connection]
<Ox0dea> skweek: File.basename expects a String, not an array of them.
<skweek> ok
<hxegon> skweek: have you used map yet?
<skweek> i've read about it
<hxegon> skweek: one sec
kies^ has joined #ruby
rgrmatt has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.4-dev]
m3_del has quit [Remote host closed the connection]
<hxegon> thanks eam
mistermocha has joined #ruby
Renich has quit [Ping timeout: 260 seconds]
chibs has quit [Quit: leaving]
<hxegon> >> foo = 'test/file.m4a'; File.dirname(foo) + File.basename(foo)
<ruboto> hxegon # => "testfile.m4a" (https://eval.in/461834)
chibs has joined #ruby
<hxegon> skweek: pay no attention to that
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Renich has joined #ruby
<hxegon> >> foo = 'test/file.m4a'; File.dirname(foo) + '/' + File.basename(foo).split('.')[0]
<ruboto> hxegon # => "test/file" (https://eval.in/461835)
mattwildig has quit [Remote host closed the connection]
<hxegon> skweek: there we go.
_djbkd has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby
<hxegon> skweek: use this with map on the arrays from Dir[...]
finisherr has quit [Quit: finisherr]
mpistone has quit []
mattwildig has joined #ruby
momomomomo has quit [Ping timeout: 252 seconds]
jhack has joined #ruby
mattwildig has quit [Remote host closed the connection]
millerti has joined #ruby
momomomomo has joined #ruby
sankaber has quit [Client Quit]
trosborn has quit [Quit: trosborn]
<hxegon> I'm suprised there isn't File.basepath or something
jobewan has quit [Ping timeout: 250 seconds]
stannard has quit [Remote host closed the connection]
Rinzlit has quit [Ping timeout: 255 seconds]
_djbkd has joined #ruby
dikaio has joined #ruby
<eam> hxegon: isn't that what dirname is?
dhollinger has quit [Ping timeout: 240 seconds]
<hxegon> eam: dirname would just returns test/
Jackneill has quit [Ping timeout: 250 seconds]
whippythellama has quit [Quit: WeeChat 1.3]
baweaver has joined #ruby
<hxegon> >> File.dirname('one/two/three.txt')
mattwildig has joined #ruby
<ruboto> hxegon # => "one/two" (https://eval.in/461850)
druonysus has joined #ruby
pullcheezy has joined #ruby
bb010g has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
qhartman has joined #ruby
JammyHammy has quit [Read error: Connection reset by peer]
<hxegon> >> foo = 'foo/bar/baz.mp3'; File.dirname(foo) + '/' + File.basename(foo, '.*') # this is better skweek
<ruboto> hxegon # => "foo/bar/baz" (https://eval.in/461853)
jaequery_ has joined #ruby
cdg has quit [Remote host closed the connection]
<skweek> ok
baweaver has quit [Remote host closed the connection]
Rinzlit has joined #ruby
jaequery has quit [Ping timeout: 240 seconds]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
momomomomo has quit [Quit: momomomomo]
rgrmatt has quit [Remote host closed the connection]
rgrmatt has joined #ruby
rgrmatt has quit [Read error: Connection reset by peer]
rgrmatt has joined #ruby
atomical has joined #ruby
jaequery has joined #ruby
Ox0dea has joined #ruby
jaequery_ has quit [Read error: No route to host]
Renich has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
mistermocha has joined #ruby
rgrmatt has quit [Remote host closed the connection]
rgrmatt has joined #ruby
<Ox0dea> skweek: Time for a fish, then?
jhack has quit [Quit: jhack]
BigDiesel has quit [Quit: Textual IRC Client: www.textualapp.com]
zenguy_pc has quit [Ping timeout: 244 seconds]
hxegon has quit [Ping timeout: 264 seconds]
<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]
rgtk has joined #ruby
<Ox0dea> It's really quite easy if you know your tool(s), but that's true of most anything.
lemur has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
mndoci has quit [Ping timeout: 244 seconds]
duckpuppy has joined #ruby
dhollinger has quit [Ping timeout: 250 seconds]
rgtk has quit [Read error: Connection reset by peer]
minimalism has quit [Quit: leaving]
PhantomSpank_ has joined #ruby
<skweek> :)
<Ox0dea> Bothering about with #dirname and #basename is overkill here, given that you know your inputs will differ only in their extension.
<eam> a poor worker blames their tools but no worker ever thanks them
rgtk has joined #ruby
<eam> wait, what part of the file was hxegon looking for?
<skweek> I've got a bunch of books on ruby on my book shelve, I should spend more time with them
<eam> if not the filename nor the basename?
<eam> skweek: take them out to a nice coffee shop
<eam> books enjoy that
<Ox0dea> skweek: Do you understand what's going on in that solution?
rgtk has quit [Read error: No route to host]
yqt has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
<skweek> no, I guess that .map { |f| f.sub /mp3$/, 'm4a' } is what trips me up
zenguy_pc has joined #ruby
<Ox0dea> skweek: #map "transforms" each element of a collection however you specify.
symm-_ has quit [Quit: Leaving...]
<eam> >> [1,2,3].map {|n| n + n}
<ruboto> eam # => [2, 4, 6] (https://eval.in/461859)
rgtk has quit [Read error: No route to host]
symm- has joined #ruby
<skweek> does f iterate through the the map and replace mp3 and m4a?
<eam> >> %w{skweek Ox0dea eam}.map {|s| s + "are doing ruby!"}
<ruboto> eam # => ["skweekare doing ruby!", "Ox0deaare doing ruby!", "eamare doing ruby!"] (https://eval.in/461860)
rgtk has joined #ruby
<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.
<eam> oops, dropped a space
<Ox0dea> >> ?\x20 # Here ya go.
<ruboto> Ox0dea # => " " (https://eval.in/461861)
djellemah_ has joined #ruby
<Ox0dea> *set intersection
rgtk has quit [Read error: No route to host]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lemur> file_names.group_by { |f| f.split('.')[0] }
duckpuppy has quit [Ping timeout: 268 seconds]
<Ox0dea> lemur: Brittle.
<eam> >> "this example foo".sub /foo$/, "bar"
<ruboto> eam # => "this example bar" (https://eval.in/461862)
rgtk has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<lemur> file_names.group_by { |f| f.split('.')[0..-1].join('.') }.select { |g| g.size > 1 }
<lemur> -2
lemur is now known as baweaver
<baweaver> hm
<baweaver> must have had both computers on again.
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.
rgtk has quit [Read error: No route to host]
sankaber has joined #ruby
<tenderlove> ^^^ basically that
rgtk has joined #ruby
taylorrf has quit []
<mbfff> Can I just to Service.search and Then make a separate class for the objects that are returned by search?
<Ox0dea> tenderlove: Sure, I've got all that in place, but there you've got the convenience of dispatching to list_append().
<mbfff> just create*
rgtk has quit [Read error: Connection reset by peer]
scottymeuk has quit [Ping timeout: 240 seconds]
<Ox0dea> Er, rb_str_intern(), rather.
rgrmatt has joined #ruby
chibs has joined #ruby
<Ox0dea> I'm sure I'm mistaken, but I don't see how to dispatch to parse_numeric() so conveniently.
rgtk has joined #ruby
<Ox0dea> Scratch that; I am certainly not mistaken about not seeing that.
<Ox0dea> The trouble, in short, is that parse_numeric() is (extremely) impure.
<tenderlove> ahhh, I see
<tenderlove> parse numeric eats input
<Ox0dea> Does that mean it can't be used in a production rule?
rgtk has quit [Read error: No route to host]
devoldmx has joined #ruby
rgtk_ has joined #ruby
joufflu has joined #ruby
scottymeuk has joined #ruby
<tenderlove> tbh, I'm not sure.....
rgtk_ has quit [Read error: No route to host]
<tenderlove> I would guess that the parsed number is one of the magic $ variables inside the production
rgtk has joined #ruby
<tenderlove> and tBLAH is just the token name
<tenderlove> IOW you probably just need that ZARRAY
<tenderlove> and append to it the right $var
juanpablo__ has joined #ruby
DLSteve has joined #ruby
<tenderlove> but I'm *really* guessing
<tenderlove> gtg, dinner time!
<Ox0dea> Huh, I'll give it a shot.
<Ox0dea> tenderlove: Thanks for dropping in.
rgtk has quit [Read error: No route to host]
itgold has quit [Ping timeout: 246 seconds]
<eam> there aren't any sequences which parse to NaN / Infinity, are there?
<Ox0dea> mbfff: Yes: https://eval.in/461864
rgtk has joined #ruby
<Ox0dea> eam: "Sequences"?
<eam> character sequences
cwong_on_irc has quit [Quit: Leaving.]
<eam> you have to calculate it - you can't define a literal
<eam> %d[NaN]
riotjones has joined #ruby
rgtk has quit [Read error: No route to host]
chibs has quit [Ping timeout: 252 seconds]
mikeharris22 has joined #ruby
rgtk has joined #ruby
<Ox0dea> Well, shit. Why you gotta go pokin' holes in it before it's even a thing?
<eam> it's my nature
juanpablo__ has quit [Ping timeout: 255 seconds]
<Ox0dea> So... what to do about that?
rgtk has quit [Read error: No route to host]
Rollabunna has joined #ruby
<Ox0dea> >> Numeric === Float::NAN
<ruboto> Ox0dea # => true (https://eval.in/461866)
mbfff has quit [Ping timeout: 246 seconds]
rgtk has joined #ruby
<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
<eam> you'll need both for different use cases
rgtk has joined #ruby
<havenwood> odigity: FileUtils in the stdlib is along the lines of the former: http://ruby-doc.org/stdlib/libdoc/fileutils/rdoc/FileUtils.html
<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?
<havenwood> odigity: FileUtils has useful stuff. For some fun look at Shell: http://ruby-doc.org/stdlib/libdoc/shell/rdoc/Shell.html
rgtk has quit [Read error: No route to host]
opensource_ninja has quit [Quit: opensource_ninja]
<odigity> havenwood, cool, I'll hit that up after I finish reading File
<eam> I'm reading through Pathname and it appears to conflate a bunch of file operations in inappropriate ways
<odigity> eam, example?
rgtk has joined #ruby
<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...
rgtk has quit [Read error: No route to host]
<Ox0dea> eam: *conflation of concerns
<odigity> I figured that's what eam meant
rgrmatt has joined #ruby
<Ox0dea> You can't tell me what to do.
<Ox0dea> 2.3.0 $ find -type f -print0 | wc -l --files0-from=- | tail -1
rgtk has joined #ruby
<Ox0dea> 232362 total
<Ox0dea> That's... a lot.
<eam> Ox0dea: indeed :)
<eam> lack of separation
<Ox0dea> Biggest standard library evar?
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
mack25 has joined #ruby
jhack has joined #ruby
<Ox0dea> Factor's stdlib has a reddit module: https://github.com/slavapestov/factor/tree/master/extra/reddit
rgtk has joined #ruby
jhack has left #ruby [#ruby]
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]
<Ox0dea> (I see where you're coming from, mind.)
<eam> well ruby isn't standardized so
<odigity> Pathname was added in 1.9 according to this: http://www.sitepoint.com/rubys-pathname-api/
opensource_ninja has joined #ruby
<Ox0dea> eam: But there's an ISO spec.
rgtk has joined #ruby
<eam> is there?
<Ox0dea> There is.
<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?
<havenwood> ReallyNotReally: Be nice.
blackmes1 has quit [Ping timeout: 240 seconds]
rgtk has quit [Read error: No route to host]
SCHAAP137 has quit [Ping timeout: 260 seconds]
<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?
rgtk has joined #ruby
<Ox0dea> odigity: Nepotism, if nothing else.
<havenwood> ReallyNotReally: http://ruby-community.com/pages/user_rules
<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> Look at the curve of those columns: https://www.ruby-toolbox.com/categories/http_clients
yaewa has joined #ruby
<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]
zenguy_pc has joined #ruby
rgtk has joined #ruby
zenguy_pc has quit [Max SendQ exceeded]
rbennacer has joined #ruby
rgtk has quit [Read error: No route to host]
<Rickmasta> Hey guys, I have the following code: http://pastie.org/private/yinn6xh0jua4p6hqb5dq
zenguy_pc has joined #ruby
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]
rgtk has joined #ruby
<Ox0dea> hxegon: FileUtils.rm Dir['**/*.m4a'] & Dir['**/*.mp3'].map { |f| f.sub /mp3$/, 'm4a' }
<Ox0dea> That's what we ended up with.
swgillespie has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
JDiPierro has quit [Remote host closed the connection]
gambl0re has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
rgtk has joined #ruby
_djbkd has quit [Remote host closed the connection]
yaewa has quit [Quit: Leaving...]
nertzy has quit [Quit: This computer has gone to sleep]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rakm has joined #ruby
rgtk_ has joined #ruby
I has joined #ruby
I is now known as Guest56831
cacam9621 has joined #ruby
rbennacer has joined #ruby
rgtk_ has quit [Read error: Connection reset by peer]
bigmac_ has joined #ruby
<Ox0dea> Rickmasta: #include? isn't lying to you: https://eval.in/461868
Cantaberry has joined #ruby
rgtk_ has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
rgtk has quit [Ping timeout: 260 seconds]
cmoney has joined #ruby
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
mozzarella has joined #ruby
rgtk has joined #ruby
s00pcan has quit [Ping timeout: 255 seconds]
rgtk has quit [Read error: No route to host]
terminalrecluse has joined #ruby
<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.
riotjones has joined #ruby
<Rickmasta> If I'm not mistaken that one is correct barring the "n" and the "i" that it counts twice.
<Ox0dea> Rickmasta: Well, sure, but look at all these empty strings you're collecting.
<Ox0dea> You don't have any duplicates (other than those empties), but you're also missing quite a few.
prereflect has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Eiam_ has quit [Read error: Connection reset by peer]
duckpuppy has quit [Ping timeout: 265 seconds]
<bigmac_> im trying to create a dual repeated_permutation hash '1111'=>'a'
<Ox0dea> Rickmasta: Would you like to see how I solved it?
<bigmac_> [0,1].repeated_permutation(4).map(&:join)
<bigmac_> ("a".."z").repeated_permutation(1).map(&:join)
<bigmac_> ("a".."z").repeated_permutation(2).map(&:join)
<bigmac_> kinda tricky to explain... i have started a rubyforums thread
<Ox0dea> bigmac_: Too much how.
Eiam_ has joined #ruby
riotjones has quit [Ping timeout: 272 seconds]
chibs has joined #ruby
EllisTAA has joined #ruby
<bigmac_> not a accurate example above
joufflu has joined #ruby
<bigmac_> ("a","b","c").repeated_permutation(1).map(&:join)
<bigmac_> [0,1].repeated_permutation(4).map(&:join)
mozzarella has quit [Quit: WeeChat 1.2]
<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
<bigmac_> ("a","b","c").repeated_permutation(1).map(&:join)
rbennacer has quit [Remote host closed the connection]
<bigmac_> ("a","b","c").repeated_permutation(2).map(&:join)
<bigmac_> ("a","b","c").repeated_permutation(3).map(&:join)
<Rickmasta> mind explaining, Ox0dea?
<Ox0dea> >> foo = 'x'; foo.slice!(0); foo # Rickmasta
<ruboto> Ox0dea # => "" (https://eval.in/461876)
<bigmac_> until the size is equal to 0,1**4 (depth)
<Ox0dea> bigmac_: Stop.
<bigmac_> ,-)
<bigmac_> can i share my forums post
<hxegon> bigmac_: this is a do-ocracy
<axisys> what is ?: means in regex ? I am reading this URI_PARSER regex which suppose to extract fields from [username[:password]@]hostname
<Ox0dea> axisys: Group, but don't capture.
diegoaguilar has joined #ruby
<Ox0dea> >> s = 'abc123'; [s =~ /(\d+)/, $1, s =~ /(?:\d+)/, $1] # axisys
<ruboto> Ox0dea # => [3, "123", 3, nil] (https://eval.in/461877)
krz has joined #ruby
d5sx43 has joined #ruby
mattwildig has joined #ruby
<axisys> Ox0dea: thanks
<Ox0dea> axisys: Sure thing.
<Rickmasta> Ox0dea: yeah but that's why I'm not doing "foo = foo.slice!(0)"
<Ox0dea> Rickmasta: Aha, but therein lies the rub!
<Ox0dea> The modification is being made in-place; it's *mutating* the receiver.
Guest97 has joined #ruby
devoldmx has quit [Remote host closed the connection]
<Rickmasta> isn't foo.slice!(0) the same as foo = foo.slice(0)?
mozzarella has joined #ruby
<Ox0dea> Rickmasta: Not if the string is empty.
<Ox0dea> Most bang methods return nil if they could've but didn't make a change.
<axisys> Ox0dea: URI_REGEX should catch the password correctly if there is no '@' in it .. right?
Oatmeal has quit [Ping timeout: 250 seconds]
graydot has quit [Quit: graydot]
devoldmx has joined #ruby
bluOxigen has joined #ruby
AMERICAN_PSYCHO has joined #ruby
<Ox0dea> axisys: URI_REGEX is purposely not capturing anything.
pathrocle has quit [Remote host closed the connection]
<Ox0dea> If you meant "match", yes, that pattern matches any number of non-@ characters, including zero.
<axisys> Ox0dea: it is at a later def .. right
PlasmaStar has quit [Max SendQ exceeded]
<axisys> Ox0dea: thanks
<Ox0dea> axisys: Happy to help.
PlasmaStar has joined #ruby
arescorpio has quit [Quit: Leaving.]
idefine has joined #ruby
KlineAcc has joined #ruby
Radar_ is now known as Radar
<KlineAcc> is it possible to develop in a vm?
d5sx43 has quit []
ss_much has quit [Quit: Connection closed for inactivity]
<KlineAcc> i would like to develop in a virtual machine
<Ox0dea> Why?
<KlineAcc> is this a good idea and is it possible?
<KlineAcc> if so what is a good distribution?\
hxegon has quit [Quit: leaving]
moeabdol has quit [Ping timeout: 268 seconds]
futilegames has joined #ruby
bricker has joined #ruby
mattwildig has quit [Remote host closed the connection]
RegulationD has joined #ruby
braincra- has quit [Quit: bye bye]
<Ox0dea> Rickmasta: https://eval.in/461888
<Ox0dea> Come, abandon your mutative ways and see the light of functional programming.
<axisys> Ox0dea: what is x for in %r{ .. }x ?
<Rickmasta> I was worried that I would see your program and then know how to do it and not figure it out myself.
Oatmeal has joined #ruby
<Rickmasta> But I see your program and mostly have no idea what's going on. haha
<Ox0dea> axisys: It permits the regular expression to span multiple lines, but of course whitespace then becomes insignificant.
<Ox0dea> Rickmasta: Excellent. :P
<Ox0dea> #map is your friend every time.
<Ox0dea> String#[] is really just #slice in disguise.
notnoyyyyy has joined #ruby
<axisys> Ox0dea: ok
<Ox0dea> axisys: It does help with the legibility of complex expressions, don't you think?
postmodern has quit [Quit: Leaving]
braincrash has joined #ruby
<Rickmasta> I get it.
prereflect has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmes1 has joined #ruby
<axisys> Ox0dea: big time.. yep
<Ox0dea> axisys: You just have to be mindful to say \s if you do in fact want to match a space.
<Ox0dea> That's bitten me before.
bricker has quit [Ping timeout: 255 seconds]
<axisys> hopefully no user will have a space in their password :-)
wprice has joined #ruby
<Ox0dea> I'd do it. :P
<Ox0dea> My Unix password is the Konami code.
tlaxkit has quit [Quit: ¡Hasta luego!]
<Ox0dea> As in, I input my password with the Arrow keys...
<axisys> Ox0dea: so you saying URI_REGEX needs improvement?
baweaver has joined #ruby
<Ox0dea> axisys: When did I say that...?
<axisys> Ox0dea: sorry I misread
<Ox0dea> axisys: /[^@]*/ matches spaces just fine.
<axisys> Ox0dea: right right.. doh
gix has quit [Ping timeout: 240 seconds]
kp666 has joined #ruby
danman has quit [Ping timeout: 252 seconds]
blackmes1 has quit [Ping timeout: 260 seconds]
<Ox0dea> >> [/ /x.match(' '), /\s/x.match(' ')] # axisys
<ruboto> Ox0dea # => [#<MatchData "">, #<MatchData " ">] (https://eval.in/461902)
ducklobster has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
darkf has joined #ruby
_djbkd has joined #ruby
gix has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Rickmasta> I still can't figure out what is going on in this program. lol
<ducklobster> hi all, i'm vaguely familiar with the to_proc shorthand (&:method) but having some trouble passing a parameter
<ducklobster> [1, 2, 3].map(&:to_s(16))
<ducklobster> how do i pass an argument to the short handed proc?
swgillespie has joined #ruby
<Ox0dea> Rickmasta: So, for a string of length 3, the substrings (as start->length) are 0->1, 0->2, 0->3, 1->1, 1->2, 2->1.
hakunin has left #ruby [#ruby]
<Ox0dea> Do you see a pattern? Try writing it out for a string of length 4 if not.
sankaber has joined #ruby
<Ox0dea> ducklobster: You can't. :<
sankaber has quit [Remote host closed the connection]
KlineAcc has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Ropeney has joined #ruby
danman has joined #ruby
<Ox0dea> And then pretend it's not real.
<Rickmasta> yup I get your program. I also understand why it's better and simpler
sankaber has joined #ruby
<Rickmasta> but I was just trying to finish my own anyway just for the sake of it.
<ducklobster> Ox0dea: thanks!
<ducklobster> why pretend its not real btw?
graydot has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<Ox0dea> ducklobster: You've got a point. Symbol#to_proc really ought to be able to do arguments, huh?
<Ox0dea> >> s = 'foo'; [s.slice!(0), s] # Rickmasta
<ruboto> Ox0dea # => ["f", "oo"] (https://eval.in/461906)
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
<Ox0dea> #slice returns what it removed, and then the original receiver is missing those parts; they've been sliced away.
<Ox0dea> *#slice!
<Rickmasta> s = ["f","oo"]
<Rickmasta> ?
* baweaver still doesn't like no-parens
* baweaver thinks it prevents aforementioned useful arg passing
<Rickmasta> blah I meant to type more than that. haha
<Rickmasta> s returns ["f","oo"]?
<Ox0dea> Rickmasta: What's happening is that you're mutating a String that's already in the collection.
finges_ has quit [Quit: WeeChat 0.4.2]
* baweaver also tends to use an obscene amount of lambdas
unclouded has joined #ruby
duncannz has joined #ruby
<Ox0dea> So that when you get to the part of your loop that "generates" that String (ostensibly for the first time), it's actually already in there.
cmoney has joined #ruby
<Ox0dea> Rickmasta: I'm only using Arrays to show you more than one value with ruboto.
* baweaver enjoys the third person
mack25 has quit [Ping timeout: 264 seconds]
<Rickmasta> ok, I'm gonna start from scratch.
<Ox0dea> Rickmasta: Not completely! :P
<Ox0dea> You cannot shield your eyes forever.
cmoney has quit [Remote host closed the connection]
<Ox0dea> The functional bug is inside you now. <3
purplexed- has joined #ruby
machan has quit [Ping timeout: 250 seconds]
sanjayu has quit [Ping timeout: 255 seconds]
graydot has quit [Quit: graydot]
makufiru has quit [Quit: Connection closed for inactivity]
cmoney has joined #ruby
patdohere has joined #ruby
<Ox0dea> Woohoo!
<Rickmasta> wooh!
* baweaver wishes to convey a sense of woo
<Ox0dea> And there was much rejoicing.
<Rickmasta> but I still don't understand why slice didn't work? lol
shinenelson has joined #ruby
* baweaver blows party whistle
yfeldblum has joined #ruby
xaxisx_ has joined #ruby
zenguy_pc has quit [Ping timeout: 246 seconds]
<Ox0dea> Rickmasta: It's #slice! (note the bang) that was giving you trouble.
<Ox0dea> In one place you were using the return value, elsewhere you were using the mutated receiver.
<Ox0dea> As previously demonstrated, those are hardly the same thing.
<Rickmasta> I guess I need to read up more on the bang.
n40391 has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<n40391> best vm Ubuntu dev environment?
Meow-J has joined #ruby
lkba_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xaxisx_ has quit [Quit: Leaving]
lkba has quit [Ping timeout: 264 seconds]
graydot has joined #ruby
bigmac_ has quit [Ping timeout: 240 seconds]
jaequery has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
purplexed- has quit [Ping timeout: 272 seconds]
v4n has joined #ruby
graydot has quit [Ping timeout: 264 seconds]
zenguy_pc has joined #ruby
mistermocha has joined #ruby
m3_del has joined #ruby
skade has joined #ruby
patdohere has joined #ruby
tcrypt has joined #ruby
mndoci has joined #ruby
patdohere has quit [Client Quit]
mndoci has quit [Remote host closed the connection]
Guest97 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
abkabkabk has joined #ruby
patdohere has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
<abkabkabk> http://imgur.com/HLAfj64 :: We borg now son!
avahey has joined #ruby
m3_del has quit [Remote host closed the connection]
sanjayu has joined #ruby
m3_del has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
n40391 has quit [Ping timeout: 268 seconds]
tmtwd has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> !kick abkabkabk Desprez Opening
abkabkabk was kicked from #ruby by ruboto [Desprez Opening]
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
skade has quit [Ping timeout: 244 seconds]
<Ox0dea> havenwood: That is the most esoteric and erudite kick reason I've ever seen.
DexterLB has quit [Read error: Connection reset by peer]
<Ox0dea> It works so well, though.
blackmes1 has joined #ruby
<baweaver> you will be assimilated/upgraded/exterminated
rickyrickyrice has joined #ruby
rickyrickyrice is now known as genco
juanpablo__ has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
blackmes1 has quit [Ping timeout: 250 seconds]
eminencehc has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
zotherstupidguy has joined #ruby
juanpablo__ has quit [Ping timeout: 272 seconds]
charany1 has joined #ruby
vbatts|work has joined #ruby
theRoUS has quit [Ping timeout: 272 seconds]
cmoney has quit [Remote host closed the connection]
patdohere has joined #ruby
theRoUS has joined #ruby
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m3_del has quit [Remote host closed the connection]
<charany1> hi , I am getting upexpepected end-of-input error with my code : https://gist.github.com/charany1/f761c0f92dc894fa8fe8
<charany1> I have checked that there is a matching end for all do's
moei has joined #ruby
stupidystupid has joined #ruby
<charany1> can you please help me figure what's wrong with my code.
eminencehc has quit [Remote host closed the connection]
graydot has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
phillips1012 has quit [Ping timeout: 272 seconds]
stupidystupid has left #ruby [#ruby]
zenguy_pc has joined #ruby
<Ox0dea> charany1: `else if` is spelt `elsif` in Ruby.
zenguy_pc has quit [Max SendQ exceeded]
stupidystupid has joined #ruby
<charany1> Ox0dea : thanks a lot ,I've used C and elif in python ,it solved.
zenguy_pc has joined #ruby
chibs has quit [Ping timeout: 252 seconds]
<Ox0dea> charany1: Sure thing. It is a little weird.
KlineAcc has joined #ruby
KlineAcc has quit [Client Quit]
<diprotic> but think of all that time we're saving without that pesky e
zenguy_pc has quit [Max SendQ exceeded]
zenguy_pc has joined #ruby
benlieb has joined #ruby
stupidystupid has quit [Quit: Textual IRC Client: www.textualapp.com]
genco has quit []
skade has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Ping timeout: 265 seconds]
riotjones has joined #ruby
mozzarella has quit [Quit: WeeChat 1.2]
Blaguvest has quit [Remote host closed the connection]
phillips1012 has joined #ruby
mozzarella has joined #ruby
riotjones has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has quit [Ping timeout: 246 seconds]
forgot has joined #ruby
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
diprotic is now known as monoprotic
tjbiddle has joined #ruby
djellemah_ is now known as djellemah
osvimer has joined #ruby
osvimer has quit [Client Quit]
patdohere has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
Ox0dea has quit [Ping timeout: 250 seconds]
jobewan has joined #ruby
tkuchiki has joined #ruby
mattwildig has joined #ruby
cwong_on_irc has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
RegulationD has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 240 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Eiam_ has joined #ruby
mattwildig has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Ping timeout: 240 seconds]
arooni has quit [Ping timeout: 246 seconds]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
dikaio has quit [Quit: ........]
jas02 has joined #ruby
tjbiddle has joined #ruby
Xeago has joined #ruby
zenguy_pc has joined #ruby
dhjondoh has joined #ruby
blackmes1 has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
Eiam_ has quit [Ping timeout: 272 seconds]
shinnya has quit [Ping timeout: 272 seconds]
haxrbyte_ has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
Xeago has quit [Ping timeout: 252 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
blackmes1 has quit [Ping timeout: 260 seconds]
mikeharris22 has joined #ruby
Puffball has quit [Ping timeout: 240 seconds]
v4n has quit [Quit: WeeChat 1.3]
Puffball has joined #ruby
mikeharris22 has quit [Ping timeout: 246 seconds]
graydot has quit [Quit: graydot]
AMERICAN_PSYCHO has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
ta has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
sanjayu has quit [Remote host closed the connection]
chibs has joined #ruby
aganov has joined #ruby
dionysus69 has joined #ruby
idefine has joined #ruby
timonv has joined #ruby
chibs has quit [Ping timeout: 252 seconds]
oozzal has joined #ruby
claw has quit [Ping timeout: 260 seconds]
<Ulfalizer> how do /usr/lib/ruby/2.1.0/gems and /var/lib/gems/2.1.0 differ in purpose?
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oozzal has left #ruby [#ruby]
idefine has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
claw has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
Xzanron has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
mordocai has quit [Quit: sleep]
mostlybadfly has quit [Quit: Connection closed for inactivity]
oozzal has joined #ruby
patdohere has joined #ruby
houhoulis has quit [Remote host closed the connection]
dagda1 has joined #ruby
idefine has joined #ruby
chibs has joined #ruby
auzty has joined #ruby
dagda1 has quit [Client Quit]
skade has joined #ruby
oozzal has quit [Remote host closed the connection]
bruno- has joined #ruby
idefine has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
houhoulis has joined #ruby
krz has joined #ruby
moeabdol has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
boshhead_ is now known as boshhead
tjbiddle has quit [Quit: tjbiddle]
tjbiddle has joined #ruby
juanpablo__ has joined #ruby
dikaio has joined #ruby
baweaver has quit [Remote host closed the connection]
Ox0dea has joined #ruby
<Ox0dea> >> require 'prime'; 1.prime? # zenspider
<ruboto> Ox0dea # => false (https://eval.in/461946)
RegulationD has joined #ruby
chibs has quit [Ping timeout: 250 seconds]
ruurd has joined #ruby
juanpablo__ has quit [Ping timeout: 260 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
mozzarella has quit [Quit: WeeChat 1.2]
blackmes1 has joined #ruby
mozzarella has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kstuart has joined #ruby
patdohere has joined #ruby
patdohere has quit [Client Quit]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
patdohere has joined #ruby
firstdayonthejob has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
_djbkd has quit [Quit: My people need me...]
yfeldblum has joined #ruby
tkuchiki has joined #ruby
moeabdol has quit [Quit: WeeChat 1.3]
ruurd has joined #ruby
devoldmx_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
<certainty> havenwood: good one :)
nickjj has quit [Ping timeout: 255 seconds]
djbkd_ has joined #ruby
ta has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
ta has quit [Remote host closed the connection]
ta has joined #ruby
stan has joined #ruby
TomyLobo has joined #ruby
jondot has joined #ruby
<al2o3-cr> How can I get the full string from the command line with spaces in without quoting?
chibs has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patdohere has joined #ruby
moeabdol has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
lsmola has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
swgillespie has quit [Client Quit]
karapetyan has joined #ruby
yeticry has joined #ruby
tcrypt has quit []
pi______ has joined #ruby
AnoHito_ has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
Feyn has joined #ruby
safe has quit [Read error: Connection reset by peer]
karapetyan has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 240 seconds]
AnoHito has quit [Ping timeout: 264 seconds]
<Ox0dea> al2o3-cr: You're aware that you won't be able to get to it before shell expansion does?
rgtk has joined #ruby
<al2o3-cr> hmm, thats what i thought
<al2o3-cr> It'll have to be quoted then, ok cheers
gigetoo has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Remote host closed the connection]
bMalum has joined #ruby
bigkevmcd has joined #ruby
krz has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
symm- has joined #ruby
lsmola has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby
acke has joined #ruby
kalusn has joined #ruby
ruurd has joined #ruby
mattwildig has joined #ruby
devbug has quit [Read error: Connection reset by peer]
rgtk has quit [Remote host closed the connection]
psy_ has joined #ruby
kalusn has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 260 seconds]
mattwildig has quit [Ping timeout: 246 seconds]
zenguy_pc has quit [Ping timeout: 255 seconds]
kerunaru has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
notnoyyyyy has quit [Ping timeout: 250 seconds]
trosborn has joined #ruby
blackmes1 has joined #ruby
pullcheezy has quit [Ping timeout: 244 seconds]
notnoyyyyy has joined #ruby
adac has joined #ruby
roxtrongo has quit [Remote host closed the connection]
j416 has quit [Quit: o/]
j416 has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
lsmola has joined #ruby
minimalism has quit [Quit: leaving]
Glenny has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Mon_Ouie has joined #ruby
charany1 has quit [Quit: Leaving]
Glenny has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
Glenny has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marr has joined #ruby
Timba-as has joined #ruby
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colegatron has quit [Ping timeout: 268 seconds]
jondot has joined #ruby
ruurd has joined #ruby
Hounddog has joined #ruby
ibouvousaime has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
subscope has joined #ruby
trosborn has quit [Quit: trosborn]
kimegede has joined #ruby
benlieb has quit [Quit: benlieb]
colegatron has joined #ruby
lipoqil has joined #ruby
dionysus69 has joined #ruby
gigetoo has joined #ruby
trosborn has joined #ruby
djbkd_ has quit [Remote host closed the connection]
dionysus69 has quit [Read error: Connection reset by peer]
<adaedra> Moin
chibs has quit [Ping timeout: 264 seconds]
machan has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
juanpablo__ has joined #ruby
phillips1012 has quit [Ping timeout: 250 seconds]
shredding has joined #ruby
nfk|laptop has joined #ruby
bruno- has joined #ruby
pi______ has left #ruby [#ruby]
juanpablo__ has quit [Ping timeout: 265 seconds]
elaptics`away is now known as elaptics
bruno- has quit [Ping timeout: 240 seconds]
psy_ has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
Xeago has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
psy_ has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> moin
<blubjr> hi apeiros
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ox0dea has joined #ruby
<Ox0dea> >> '0xff'.oct
<ruboto> Ox0dea # => 255 (https://eval.in/462000)
SCHAAP137 has joined #ruby
Xeago has quit [Remote host closed the connection]
subscope has joined #ruby
kalusn has joined #ruby
shinnya has joined #ruby
kalz has quit [Ping timeout: 246 seconds]
kalzz has quit [Ping timeout: 264 seconds]
<apeiros> o0
<apeiros> I really dislike how invalid input is treated by some core methods
Xeago has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
danman has quit [Read error: Connection reset by peer]
<Ox0dea> *0o
<apeiros> OO
<Ox0dea> Are you making fun of me?
ruurd has joined #ruby
solars has joined #ruby
<apeiros> -.-
<Ox0dea> > return rb_str_to_inum(str, -8, FALSE);
<Ox0dea> Seems like that should just be changed to `TRUE`?
<apeiros> no. why do you think I do?
Alina-malina has joined #ruby
<Ox0dea> Because I can't have the leading 0 I want. :<
phillips1012 has joined #ruby
machan has quit [Ping timeout: 240 seconds]
danman has joined #ruby
<apeiros> huh? no, o0 is like small-eye/big-eye aka raised eyebrow
<Ox0dea> Yes, I know, but swapping them would've been more pertinent to the octal discussion.
<apeiros> lol
mark4 has joined #ruby
<apeiros> and people say *I* was a pedant!
riffraff has joined #ruby
Xeago has quit [Remote host closed the connection]
pi______ has joined #ruby
ibouvousaime has quit [Ping timeout: 250 seconds]
stamina has joined #ruby
pi______ has left #ruby [#ruby]
karapetyan has joined #ruby
ibouvousaime has joined #ruby
<yorickpeterse> morning
<blubjr> hi yorickpeterse
roxtrongo has joined #ruby
skade has joined #ruby
kalzz has joined #ruby
Xeago has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
roxtrongo has quit [Ping timeout: 265 seconds]
nettoweb has joined #ruby
kalz has joined #ruby
bonemind has joined #ruby
houhoulis has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 240 seconds]
notnoyyyyy has quit [Quit: He who laughs last, thinks slowest]
jgt has joined #ruby
kalz has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
kalzz has quit [Ping timeout: 268 seconds]
<apeiros> moin yorick
<blubjr> hi apeiros
skade has quit [Quit: Computer has gone to sleep.]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
crdpink2 has quit [Ping timeout: 240 seconds]
blackmes1 has joined #ruby
crdpink2 has joined #ruby
nickjj has joined #ruby
crdpink2 has quit [Client Quit]
trosborn has quit [Quit: trosborn]
crdpink2 has joined #ruby
<apeiros> hi blubjr
ruurd has joined #ruby
consumerism has joined #ruby
ruurd has quit [Client Quit]
emilkarl has joined #ruby
Peg-leg has joined #ruby
ruurd has joined #ruby
yfeldblum has joined #ruby
blackmes1 has quit [Ping timeout: 250 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has quit [Client Quit]
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
solars has quit [Ping timeout: 255 seconds]
kalzz has joined #ruby
lkba_ has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
kalz has joined #ruby
haxrbyte_ has joined #ruby
kstuart has quit [Quit: WeeChat 1.3]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has joined #ruby
lukaszes has joined #ruby
haxrbyte has quit [Ping timeout: 250 seconds]
sinkensabe has joined #ruby
nfk|laptop has quit [Ping timeout: 240 seconds]
jxs_ has joined #ruby
Glenny has quit [Quit: Konversation terminated!]
nfk|laptop has joined #ruby
joonty has quit [Quit: joonty]
duncannz has quit [Ping timeout: 268 seconds]
jxs_ has quit [Remote host closed the connection]
subscope has joined #ruby
rdark has joined #ruby
rdark has joined #ruby
krz has quit [Read error: Connection reset by peer]
joonty has joined #ruby
krz has joined #ruby
frudo has joined #ruby
Gi0 has quit [Ping timeout: 246 seconds]
<frudo> hi..
<ruboto> frudo, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8f054727fdb7b02e55a9
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<frudo> ohh.
baweaver has joined #ruby
BSaboia has joined #ruby
mattwildig has joined #ruby
krisquigley has joined #ruby
consumerism has quit [Quit: WeeChat 1.3]
skade has joined #ruby
leafybas_ has joined #ruby
mattwildig has quit [Ping timeout: 265 seconds]
rodfersou has joined #ruby
<frudo> how can we solve this error.
zenguy_pc has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 272 seconds]
<apeiros> not sure. try reinstalling libmysqlclient & mysql2 gem
norc has joined #ruby
startupality has quit [Quit: startupality]
blueOxigen has joined #ruby
skade has quit [Client Quit]
<frudo> ok
troulouliou_div2 has joined #ruby
leafybas_ has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 260 seconds]
leafybas_ has joined #ruby
solars has joined #ruby
machan has joined #ruby
sinkensabe has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 250 seconds]
Voker57 has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
subscope has joined #ruby
tvw has joined #ruby
blackmes1 has joined #ruby
tkuchiki has joined #ruby
sameerynho has joined #ruby
Alina-malina has quit [Ping timeout: 250 seconds]
<bougyman> man I don't know why it's so hard to find people who know chef and want to work in england.
anaeem1 has joined #ruby
sinkensabe has joined #ruby
anaeem1 has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 246 seconds]
<ljarvis> oO
<ljarvis> it is?
zenguy_pc has joined #ruby
<ljarvis> i mean, you can't blame them for the last part
shredding has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
timonv has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
krz has quit [Ping timeout: 244 seconds]
blaxter has joined #ruby
Bloomer has quit [Remote host closed the connection]
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haxrbyte_ has quit [Remote host closed the connection]
BrunoSaboia has joined #ruby
dhjondoh has quit [Ping timeout: 260 seconds]
ldnunes has joined #ruby
machan has quit [Ping timeout: 255 seconds]
akem has joined #ruby
solars has quit [Ping timeout: 240 seconds]
solars has joined #ruby
chthon has joined #ruby
juanpablo__ has joined #ruby
dhjondoh has joined #ruby
timonv has joined #ruby
juanpablo__ has quit [Ping timeout: 264 seconds]
Luming has quit [Ping timeout: 265 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
troulouliou_div2 has quit [Quit: Leaving]
Luming has joined #ruby
FernandoBasso has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
lipoqil has quit [Quit: Connection closed for inactivity]
rodfersou has quit [Quit: leaving]
foooobear has joined #ruby
ruurd has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cacam9621> hi
lukaszes has joined #ruby
<bougyman> ljarvis: well it's just a contracting gig.
<bougyman> 2-3 months
<bougyman> and they're paying like $100/hour plus expenses.
machan has joined #ruby
<Ox0dea> >> $__=$$/$$;_=$__+$__;__=$__+_;$_=_+_;@_=$__+$_;$-_=_**@_;$___=_*$-_;@__=$-_+$___;''<<$___+_*$_<<@__+@_<<@__+@_*@_<<$-_+__*$_<<$-_<<@__+__<<@__+$__<<@__+__<<@__+$__<<@__+__*$_+$__<<$-_+@_*@_<<$-_+($-_-_*@_)<<$-_+_*__*__<<$-_+$_*$_+$__<<$-_+_*(_+@_)
<ruboto> Ox0dea # => "Hey, cacam9621." (https://eval.in/462130)
machan has quit [Client Quit]
solars has quit [Ping timeout: 255 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
emilkarl has quit [Quit: emilkarl]
trosborn has joined #ruby
rodfersou has joined #ruby
chthon has quit [Quit: Ex-Chat]
prestorium has joined #ruby
ctp_ has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
DoubleMalt has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
<norc> Ox0dea: What is $$? Is that the current PID?
<Ox0dea> >> require 'English'; [$$, $PID, $PROCESS_ID] # norc: Sure is.
<ruboto> Ox0dea # => [24152, 24152, 24152] (https://eval.in/462146)
<norc> Ox0dea: Figures. Suddenly the whole snippet becomes obvious and trivial. :p
<Ox0dea> norc: Math is magic.
<Ox0dea> norc: Try this one on for size. https://eval.in/459020
futilegames has quit [Quit: futilegames]
platzhirsch has quit [Quit: Leaving.]
RegulationD has joined #ruby
mattwildig has joined #ruby
cornerma1 has joined #ruby
Jardayn has joined #ruby
<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
chthon has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
<Ox0dea> Those comments are the end of method definitions look so stupid.
<Ox0dea> *at the end
tkuchiki_ has joined #ruby
<shevy> I dunno, it sorta depends
<Ox0dea> Which means it's inherently inconsistent.
nfk|laptop has quit [Ping timeout: 246 seconds]
juanpablo__ has joined #ruby
kab has left #ruby ["Leaving"]
<shevy> I am experimenting with things such as:
<shevy> def foo?
<shevy> end; alias foo foo? # === foo
jgt has quit [Read error: Connection reset by peer]
jgt has joined #ruby
roxtrongo has joined #ruby
Peg-leg has quit [Quit: Leaving.]
<shevy> I think matz has some trailing comment in ruby cgi.rb ... lemme try to find it
juanpablo__ has quit [Ping timeout: 240 seconds]
<shevy> hmmm
<shevy> not sure who actually added those # comments there... but let me gist cgi/html.rb
<shevy> https://gist.github.com/shevegen/a1f8c235a05bd58cb27b#file-html-rb-L64 - though to be honest, I assume it was the dude who commented ruby-cgi actually, so not matz
AugustoCesar has joined #ruby
<Ulfalizer> what's the best mailing list to ask about cross-compilation and rbconfig.rb-related stuff?
AugustoCesar has quit [Client Quit]
<Ulfalizer> i mostly want to verify that i've understood the intended purpose of some variables
<shevy> I think you must ask the ruby forum, which acts as interface: https://www.ruby-forum.com/forum
<Ulfalizer> ok, thanks
tkuchiki_ has quit [Remote host closed the connection]
jdawgaz has joined #ruby
<Ulfalizer> was thinking it might be a bit meta for a general ruby mailing list where people mostly ask about the language itself
idefine has joined #ruby
civil_ has joined #ruby
bruce_lee has joined #ruby
<shevy> well the pool of people who will know a lot about both cross-compilation and rbconfig is fairly small
<shevy> you can try to ask hanmac here perhaps, he wrote a lot of C++ code and ruby-bindings to that code
<bougyman> fpm looks like a good idea. one that i've seen implemented thousands of times.
<bougyman> suse's buildservice seems to be the one that's gotten the most people using
<Ox0dea> Quick, everybody use pacman!
<bougyman> i'd like to see how hard it is to add .xbps to fpm
<adaedra> '< . . .
<bougyman> that could be a good weekend project for me if I ever get a free weekend.
<Ox0dea> Weekends are expensive. :<
<bougyman> this weekend i'm roadtripping all of england and next weekend is rubyconf
jordanloky has joined #ruby
nfk|laptop has joined #ruby
idefine has quit [Ping timeout: 250 seconds]
flyinprogrammer has left #ruby ["undefined"]
favadi has joined #ruby
civil_ has quit [Ping timeout: 252 seconds]
ChargedLight has joined #ruby
kimegede has quit [Quit: Linkinus - http://linkinus.com]
<ChargedLight> Hello. I have the following problem (i am using rvm and 2.2.1 is the only ruby that i have installed)
<ChargedLight> kristof@kristof-note:~/Work$ ruby -v
<ChargedLight> ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
<ChargedLight> kristof@kristof-note:~/Work$ sudo gem install capistrano
<ChargedLight> net-ssh requires Ruby version >= 2.0.
<ChargedLight> ERROR: Error installing capistrano:
blueOxigen has quit [Ping timeout: 255 seconds]
jgt has quit [Ping timeout: 240 seconds]
<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.
<ChargedLight> looks like i'm fucked
<Ox0dea> >> "#$DEITY"
<ruboto> Ox0dea # => "" (https://eval.in/462177)
<Ox0dea> Seems so. :P
kstuart has quit [Remote host closed the connection]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dravine has quit [Quit: zzz]
<shevy> ChargedLight you are not fucked in principle, you only need to decide what to pick
<Ox0dea> > fucked in principle
<Ox0dea> I love it.
<shevy> mixing apt-get for ruby stuff while using non-ubuntu stuff isn't a great combination
subscope has joined #ruby
<ChargedLight> yeah, using ubuntu and linux in general for ~3 months
<shevy> Ox0dea is an archster
<Ox0dea> ChargedLight: http://i.imgur.com/Ufbr5ej.gif
s00pcan has quit [Ping timeout: 240 seconds]
<shevy> Ox0dea you are still so sceptical!
inteq has quit [Quit: Leaving]
<Ox0dea> ChargedLight: In any case, there's always the fine people at Brightbox trying to save folks like you from themselves: https://www.brightbox.com/docs/ruby/ubuntu/
<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.
<bougyman> ok, and 'which gem'
<ChargedLight> /home/kristof/.rvm/rubies/ruby-2.2.1/bin/gem
trosborn has quit [Quit: trosborn]
<bougyman> and 'which cap'?
s00pcan has quit [Remote host closed the connection]
<Ox0dea> /usr/bin/cap
<ChargedLight> kristof@kristof-note:~/Work$ which cap
<ChargedLight> /home/kristof/.rvm/gems/ruby-2.2.1/bin/cap
<Ox0dea> It's fixed!
<ChargedLight> no
<ChargedLight> kristof@kristof-note:~/Work$ which cap
<ChargedLight> /home/kristof/.rvm/gems/ruby-2.2.1/bin/cap
<ChargedLight> kristof@kristof-note:~/Work$ cap
<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
<ChargedLight> /home/kristof/.rvm/gems/ruby-2.2.1/bin/cap
<ChargedLight> well, fuck
<Ox0dea> ChargedLight: And, just for giggles, `env cap`?
idefine has joined #ruby
subscope has joined #ruby
<ChargedLight> kristof@kristof-note:~/Work/project-web$ env cap
<ChargedLight> Stage not set, please call something such as `cap production deploy`, where production is a stage you have defined.
<Ox0dea> Whale, color me flabbergasted.
<Ox0dea> ChargedLight: As shevy says, something is invoking `/usr/bin/cap` explicitly.
<ChargedLight> yes, i understand it, but how to figure out what?
syath has joined #ruby
<ChargedLight> and how to fix it
<ChargedLight> it's great that i'm generating loolz for you, but it sould be nice to get some help or advice
<Ox0dea> > You'll have to wait for a kinder soul to wander on by.
<Ox0dea> I'm trying to be that kinder soul, dick.
<Ox0dea> ChargedLight: sudo grep -R '/usr/bin/cap' /
Xeago has quit [Remote host closed the connection]
<Ox0dea> It's gotta be in there somewhere, right?
<shevy> ChargedLight if it were my system, the first thing I would do is to get rid of the debian ruby
zipace has joined #ruby
mehwork has left #ruby [#ruby]
idefine has quit [Ping timeout: 250 seconds]
nizmow has quit [Ping timeout: 240 seconds]
NightMonkey has quit [Ping timeout: 240 seconds]
<ChargedLight> kristof@kristof-note:~/Work$ sudo grep -R '/usr/bin/cap' /
<ChargedLight> [sudo] password for kristof:
<ChargedLight> /var/log/auth.log:Nov 3 14:59:27 kristof-note sudo: kristof : TTY=pts/16 ; PWD=/home/kristof/Work/project-web ; USER=root ; COMMAND=/bin/rm -rf /usr/bin/cap
<ChargedLight> /var/log/auth.log:Nov 3 15:30:32 kristof-note sudo: kristof : TTY=pts/16 ; PWD=/home/kristof/Work ; USER=root ; COMMAND=/bin/grep -R /usr/bin/cap /
<ChargedLight> grep: /var/run/wpa_supplicant/wlan0: No such device or address
<ChargedLight> grep: /var/run/acpid.socket: No such device or address
<ChargedLight> grep: /var/run/postgresql/.s.PGSQL.5432: No such device or address
<ChargedLight> grep: /var/run/avahi-daemon/socket: No such device or address
millerti has joined #ruby
<shevy> ?
<Ox0dea> Ubuntu user.
<shevy> no
<yorickpeterse> explains everything
<shevy> something is fishy
ByronJohnson has quit [Ping timeout: 240 seconds]
<yorickpeterse> ChargedLight: stop pasting non Ruby stuff in here
<bougyman> ChargedLight: what the heck are you doing with the sudo stuff still.
<bougyman> you don't need any sudo to use rvm and cap.
yfeldblum has quit [Ping timeout: 246 seconds]
<shevy> how can "sudo grep -R '/usr/bin/cap' /" include "COMMAND=/bin/rm -rf /usr/bin/cap"
TPBallbag is now known as Ballkenende
hyperdrive has quit [Ping timeout: 240 seconds]
<yorickpeterse> lol
<Ox0dea> shevy: Process execution is an orchestrated endeavor.
solars has joined #ruby
Mon_Ouie has joined #ruby
ByronJohnson has joined #ruby
Ilyes512 has joined #ruby
<shevy> heheeh
NightMonkey has joined #ruby
Ilyes512 has joined #ruby
nixmaniack has quit [Remote host closed the connection]
<Ox0dea> It's kinda like how asking ObjectSpace for the number of Strings equal to "foo" changes the answer you would otherwise have gotten.
havenwood has quit [Ping timeout: 240 seconds]
fold1 has quit [Ping timeout: 240 seconds]
hyperdrive has joined #ruby
<ChargedLight> bougyman, if i delete rvm and ruby and reisntall it, will it help me or not?
tesuji has joined #ruby
nizmow has joined #ruby
alexblom has quit [Ping timeout: 240 seconds]
j0bk has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
havenwood has joined #ruby
j0bk has joined #ruby
<shevy> Ox0dea well you were right when you used http://i.imgur.com/Ufbr5ej.gif
rikkipitt has joined #ruby
<Ox0dea> So it seems.
alexblom has joined #ruby
vigintas has joined #ruby
<Ox0dea> ChargedLight: Yeah.
<bougyman> ChargedLight: prehaps
<shevy> now I am the sceptical one :(
<shevy> Ox0dea I blame you
<Ox0dea> I blame me too.
<Ox0dea> But I'm not sorry.
<Ox0dea> <3
<TomyLobo> being sceptical is a good thing
<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.
andykingking has joined #ruby
jobewan has joined #ruby
akem has quit [Quit: Bye]
arne_ has joined #ruby
<arne_> >> "x"
<ruboto> arne_ # => "x" (https://eval.in/462246)
<shevy> Ox0dea he no longer talks to you
<arne_> >> "x"[1]
<ruboto> arne_ # => nil (https://eval.in/462247)
<arne_> >> "x"[1..2]
<ruboto> arne_ # => "" (https://eval.in/462248)
<arne_> is this epected behaviour?
<Ox0dea> arne_: It is. Just a second.
<adaedra> arne_: what did you expect?
<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
<Ox0dea> arne_: This is a nice, concise explanation: http://stackoverflow.com/a/3568281
<Ox0dea> It's for arrays, but the principle remains.
<norc> shevy: you are such a hateful person.
<shevy> arne_ [1] you probably understand, as for the Range, http://ruby-doc.org/core-2.2.0/String.html#method-i-5B-5D the two return values are a string or nil
<arne_> so im slicing the SUBSPACE
<Ox0dea> arne_: Aye, that's a good way to look at it.
<gregf_> >> "arne_"[-1] * 10
vigintas has quit [Ping timeout: 240 seconds]
<ruboto> gregf_ # => "__________" (https://eval.in/462250)
<Ox0dea> gregf_: How very informative.
<shevy> norc not at all, only sceptical :)
<norc> shevy: about?
<shevy> norc real problems!
<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)
leat1 has quit [Quit: leat1]
<arne_> >> require 'json';JSON.parse({:herp=>:derp}.to_json)
arup_r has joined #ruby
<ruboto> arne_ # => {"herp"=>"derp"} (https://eval.in/462254)
leat has joined #ruby
lsmola has joined #ruby
moeabdol1 has quit [Ping timeout: 244 seconds]
<arne_> wow, didn't know that.
but3k4 has joined #ruby
hackeron has joined #ruby
<Ox0dea> That wasn't particularly illuminating.
guardianW has joined #ruby
arup_r is now known as Guest42931
_joes__ has joined #ruby
<arne_> Ox0dea, please tell me, what do you meant by saying trading fun for XTC
<Ox0dea> arne_: Is that what I said?
<arne_> kinda.
<Ox0dea> Yeah, kinda.
guardianW has left #ruby [#ruby]
<arne_> jmonreal, when having json, you usually have a string, i don't know what you mean by saying "assing something to it"
<jmonreal> norc: I know. I am trying to "fix" a code I am working on. Look at this: http://pastebin.com/17FhgWcD
<ruboto> jmonreal, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/ae4ca85d8eb1bbcb16b8
<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
<ruboto> Ox0dea # => nil (https://eval.in/462257)
<Ox0dea> I see. Thank you, array.
joonty has joined #ruby
bruno-_ has joined #ruby
<arne_> clever.
<Ox0dea> No, you.
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo__ has joined #ruby
<arne_> Ox0dea, and what do you think about rubinius?
<Ox0dea> arne_: It's neat.
<jmonreal> did not got it, but I'll keep looking, thanks folks
symm-_ has joined #ruby
platzhirsch has quit [Read error: Connection reset by peer]
ruurd_ has quit [Read error: No route to host]
favadi has joined #ruby
<Ox0dea> jmonreal: Sorry, we got a little carried away there.
platzhirsch has joined #ruby
<arne_> jmonreal, if you have any kind of hash or array, you can just check it's empty
<arne_> >> x={:test=>3}; x.keys.empty?
<ruboto> arne_ # => false (https://eval.in/462258)
symm- has quit [Ping timeout: 244 seconds]
<arne_> >> x=[]; x.keys.empty?
<ruboto> arne_ # => undefined method `keys' for []:Array (NoMethodError) ...check link for more (https://eval.in/462259)
<arne_> >> x=[]; x.empty?
<ruboto> arne_ # => true (https://eval.in/462260)
<arne_> sorry.
<Ox0dea> My sides.
dhjondoh has joined #ruby
<arne_> jmonreal, are you sure your json-input is always filled? because the json parser usually doesn't f up
<jmonreal> so something like this: a = x.empty ? 0 : x[key]
<Ox0dea> jmonreal: Looks okay, yeah.
favadi has quit [Client Quit]
Ilyes512 has quit [Quit: Textual IRC Client: www.textualapp.com]
<arne_> jmonreal, you can also ask it, if it has a "key" key
<Ox0dea> jmonreal: You could use Array#fetch with a fallback if you want to keep it in one expression.
<Papierkorb> jmonreal: or, if the value of x[key] will not be nil nor false intentionally, just: a = x[key] || 0
bruno-_ has quit [Ping timeout: 260 seconds]
radgeRayden_ has quit [Quit: Leaving]
<arne_> >> x = []; x[:arnold]=:schwarzenegger; x.includes? :arnold
<ruboto> arne_ # => no implicit conversion of Symbol into Integer (TypeError) ...check link for more (https://eval.in/462261)
<jmonreal> ok
<jmonreal> thanks folk
favadi has joined #ruby
bruno-_ has joined #ruby
ruurd has joined #ruby
atomical has joined #ruby
<arne_> >> x={:arny=>:schwarz};x.includes? :arny
catphish has joined #ruby
<ruboto> arne_ # => undefined method `includes?' for {:arny=>:schwarz}:Hash (NoMethodError) ...check link for more (https://eval.in/462262)
<arne_> uh?
<Papierkorb> arne_: -s
<arne_> >> x={:arny=>:schwarz};x.include? :arny
<ruboto> arne_ # => true (https://eval.in/462263)
juanpablo__ has quit [Ping timeout: 268 seconds]
<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.
subscope has joined #ruby
<Ox0dea> jmonreal: This is just for laughs: https://eval.in/462264
cacam9621 has quit [Read error: Connection reset by peer]
dstarh has joined #ruby
<Ox0dea> Do not let the palindromic ID trick you into thinking it's a good idea.
bruno-_ has quit [Ping timeout: 264 seconds]
Hounddog has quit [Remote host closed the connection]
p0wn3d__ has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno-_ has joined #ruby
<catphish> that's a complicated bit of hash reading
<Ox0dea> His idea.
Guest53 has quit [Ping timeout: 272 seconds]
<catphish> is there any reason this is a bad idea?
<catphish> having taken the time to understand it, it looks pretty sane
tkuchiki has joined #ruby
<Ox0dea> catphish: It's more expensive than it needs to be in the service of keeping it a single expression chain.
roshanavand has joined #ruby
<arne_> >> [][0..1000]
<ruboto> arne_ # => [] (https://eval.in/462265)
<catphish> i see
<arne_> >> [1][0..1000]
<ruboto> arne_ # => [1] (https://eval.in/462266)
<catphish> Ox0dea: i suppose i'd always prefer to branch it with some if statements
sandals has joined #ruby
Quandl has joined #ruby
<Ox0dea> catphish: Well, a ternary would be fine here, but yeah.
Quandl is now known as YIota
<arne_> so i can cut the subspace between the last element and the last+1 element, but not the one before 0 and -1? isn't that inconsistend?
symm-_ has quit [Quit: Leaving...]
bruno-_ has quit [Ping timeout: 250 seconds]
<catphish> i actually have a piece of code *nearly* identical to that, except if no disk IO stat is present, it simply doesn't graph it
<Ox0dea> arne_: In both of your examples, elements 0 and -1 are the same dude; there is no subspace between them.
bruno-_ has joined #ruby
sandals is now known as pdev_champion
<arne_> yeah but if there is a space where is no element between the last and last+1 element
<arne_> there should be one inbetween -1 and 0
<arne_> sure -1 references the last element, but still, i feel like this is weird
<Ox0dea> arne_: You're not wrong, technically; it's just that Ruby's slices don't wrap.
<Ox0dea> You can't say `foo[-2..0]` and get what you might want.
mag42c has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
bruno-_ has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno-_ has joined #ruby
aufi has quit [Ping timeout: 250 seconds]
<jmonreal> Ox0dea: how can I check for values returned by JSON.parse? I believe I can not do it with @variable[key1][key2].emtpy
<arne_> jmonreal, yeah you will have to check for the existence of key1 and key2
jobewan has quit [Ping timeout: 268 seconds]
cwong_on_irc has joined #ruby
mattwildig has quit [Remote host closed the connection]
bluOxigen has joined #ruby
mattwildig has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<arne_> there is no "cool" way to do it, but to change the format you're getting your information from
Xeago has quit [Remote host closed the connection]
<Ox0dea> arne_: Since when did `rescue nil` become "uncool"?
bluOxigen has left #ruby [#ruby]
<jmonreal> arne_: how would I check for keys?
<arne_> well, that would imply json parse fails, wouldn't it?
<Ox0dea> No, just that the data are missing.
blackoperat has joined #ruby
<arne_> jmonreal, JSON.parse(json_string).has_key?("io_rate")
moeabdol1 has joined #ruby
<jmonreal> arne_: but the keys exist
<arne_> then, what does not exist?
atomical has quit [Ping timeout: 255 seconds]
<Ox0dea> The values at the keys can be `nil`.
bruno-_ has quit [Ping timeout: 260 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jmonreal> arne_: when doing this unless stats["blkio_stats"]["io_service_bytes_recursive"] I get exception
<jmonreal> or unless stats["blkio_stats"]["io_service_bytes_recursive"].empty
<Ox0dea> jmonreal: Well, #empty isn't a method on Array.
<jmonreal> and stats its the output of JSON.parse
Guest42931 is now known as arup_r
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arne_> jmonreal, 1. the method is called empty? with question-mark
bruno- has joined #ruby
atomical has joined #ruby
platzhirsch has quit [Quit: Leaving.]
<arne_> and yeah it would still throw an exception of one of those does not exist
platzhirsch has joined #ruby
bruno- is now known as Guest80937
<Ox0dea> >> defined?(nil) # arne_
<ruboto> Ox0dea # => "nil" (https://eval.in/462269)
lukaszes has joined #ruby
<Ox0dea> >> defined?(actually_nonexistent_thing)
<ruboto> Ox0dea # => nil (https://eval.in/462270)
<Ox0dea> The difference is subtle.
shredding has joined #ruby
<jmonreal> arne_: nop, without question mark
<arne_> >> defined?(defined?)
<ruboto> arne_ # => /tmp/execpad-8557946929f6/source-8557946929f6:2: syntax error, unexpected ')' (https://eval.in/462271)
atomical_ has joined #ruby
<Ox0dea> arne_: `defined?` is a keyword.
<arne_> i see.
<Ox0dea> It's magical.
<arne_> hoped it to be a method
<Ox0dea> Alas, it can't be.
rippa has joined #ruby
<Ox0dea> >> Array.instance_methods.grep(/emp/) # jmonreal
<ruboto> Ox0dea # => [:empty?] (https://eval.in/462273)
leafyba__ has joined #ruby
<arne_> >> jmonreal_head=[];jmonreal_head.empty?
<ruboto> arne_ # => true (https://eval.in/462274)
<jmonreal> not catching up with you folks
<Ox0dea> jmonreal: Ruby methods can end with question marks.
<Ox0dea> Most of the ones that "answer a question" do so.
<arne_> >> Array.new.empty?
<ruboto> arne_ # => true (https://eval.in/462275)
tkuchiki has joined #ruby
<jmonreal> Ox0dea: that worked arne_
<jmonreal> thanks to you both
<arne_> :) you're welcome
JDiPierro has joined #ruby
<Ox0dea> jmonreal: Happy to help.
Guest80937 has quit [Ping timeout: 246 seconds]
roshanavand has quit [Remote host closed the connection]
<jmonreal> and could I check if a variable has a value or not
atomical has quit [Ping timeout: 255 seconds]
bruno-_ has joined #ruby
<arne_> jmonreal, with defined?
<Ox0dea> jmonreal: Did you follow along back there and arrive at the proper conclusion that `nil` is a value?
<arne_> without object in front of it
<jmonreal> like variable.defined?
<arne_> no like defined?(variable)
lipoqil has joined #ruby
<arne_> since you cannot ask a variable that does not exists, if it exists
leafybas_ has quit [Ping timeout: 246 seconds]
<jmonreal> I see nil is also a value
<jmonreal> ok thanks
<jmonreal> thanks arne_
_blizzy_ has joined #ruby
<arne_> but i actually wonder, why isn't every variable defined and nil?
mattwildig has quit [Remote host closed the connection]
<arne_> would that cause problems besides being a pain in the ass to debug?
<Ox0dea> Hm?
<arne_> well if i do >> variable_that_does not exist, it would throw an exception
roshanavand has joined #ruby
<Ox0dea> As it ought.
<arne_> why isn't every variable = nil
<arne_> defined or not
<Ox0dea> Because it's sometimes useful to be able to determine whether or not some identifier is actually bound to anything.
<arne_> it's useful but not inuitive, imho
<Ox0dea> #dealwithit
<arne_> but it would be possible to design a language like that, right?
skcin7 has joined #ruby
<arne_> i mean, it wouldn't render something impossible to code
cdg has joined #ruby
<Ox0dea> arne_: I mean, yeah; global, instance, and class variables are all implicitly defined in this language.
<arne_> would it?
<Ox0dea> >> [$foo, @bar]
<ruboto> Ox0dea # => [nil, nil] (https://eval.in/462276)
mndoci has joined #ruby
<Papierkorb> arne_: why isn't it intuitive? that would create so much more bugs
bruno-_ has quit [Ping timeout: 250 seconds]
rodfersou is now known as rodfersou|lunch
<Ox0dea> Erm, sorry; class variables are not implicitly defined.
sankaber has joined #ruby
<arne_> [][5] is also not defined, yet it is nil
<Ox0dea> arne_: No, it's just `nil`.
bruno-_ has joined #ruby
<arne_> yeah i know that what i said was not correct, but it does not a throw an exception, while it doesn't exist
<Papierkorb> arne_: that creates an empty array and then you fetch the 6th element out of it, which is OOB and by def. is thus 'nil'
jgpawletko has joined #ruby
<arne_> and using variable_that_is_not_defined, is nothing else, than accessing it in a hash which doesn't include the key, isn't it?
<Papierkorb> arne_: it does exist. you just created an anonymous variable
gregf_ has quit [Ping timeout: 260 seconds]
pandaant has joined #ruby
<Ox0dea> arne_: It "has a presence" in ObjectSpace, as it were.
jdawgaz has joined #ruby
<Ox0dea> >> foo = []; foo[4] = 2; foo # Maybe this helps?
<ruboto> Ox0dea # => [nil, nil, nil, nil, 2] (https://eval.in/462277)
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
jdawgaz has quit [Client Quit]
mndoci has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
RegulationD has joined #ruby
polysics has joined #ruby
<arne_> not really since
hackeron_ has joined #ruby
<arne_> >> x={}["peter"];x;
<ruboto> arne_ # => nil (https://eval.in/462278)
bruno-_ has quit [Ping timeout: 260 seconds]
<arne_> >> x={};x["peter"];x;
<ruboto> arne_ # => {} (https://eval.in/462279)
<arne_> >> x={};x["peter"]=3;x;
<ruboto> arne_ # => {"peter"=>3} (https://eval.in/462280)
<Ox0dea> You left me at the station.
<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]
houhoulis has joined #ruby
momomomomo has joined #ruby
<Papierkorb> Also don't forget about Kernel .
sankaber has joined #ruby
jgt has joined #ruby
whippythellama has joined #ruby
xaxisx has quit [Quit: xaxisx]
FernandoBasso has quit [Quit: Leaving]
xaxisx has joined #ruby
zenguy_pc has joined #ruby
Meow-J has joined #ruby
chouhoulis has joined #ruby
KervyN has quit [Quit: Au revoir -www.kervyn.de]
bruno-_ has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Remote host closed the connection]
KervyN has joined #ruby
bruno-_ has joined #ruby
chouhoulis has joined #ruby
momomomomo has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
gregf_ has joined #ruby
vondruch_ has quit [Ping timeout: 240 seconds]
ta has quit [Remote host closed the connection]
colegatron has quit [Ping timeout: 240 seconds]
vbatts|work has left #ruby ["found the other side of the rainbow"]
momomomomo has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
babblebre has joined #ruby
Olipro has joined #ruby
gregf_ has quit [Client Quit]
fold1 has joined #ruby
pdev_champion has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno-_ has joined #ruby
spew has joined #ruby
TPBallbag is now known as Balllkenende
gregf_ has joined #ruby
mattwildig has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
bruno-_ has quit [Ping timeout: 244 seconds]
momomomomo has quit [Ping timeout: 250 seconds]
__chris has joined #ruby
momomomomo has joined #ruby
bruno-_ has joined #ruby
diegoviola has joined #ruby
evanjs has joined #ruby
Guest97 has joined #ruby
lukaszes has joined #ruby
ta has joined #ruby
catphish has left #ruby ["Leaving"]
kiddorails has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
kp666 has quit [Remote host closed the connection]
sandals has joined #ruby
bruno-_ has joined #ruby
Xeago has joined #ruby
roshanavand has joined #ruby
marr has quit [Ping timeout: 272 seconds]
blueOxigen has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
chriscoffee has joined #ruby
ElSif has joined #ruby
colegatron has joined #ruby
tmtwd has joined #ruby
mugurel has joined #ruby
Guest97 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
bruno-_ has quit [Ping timeout: 250 seconds]
mikeharris22 has joined #ruby
mary5030 has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
jobewan has joined #ruby
bruno-_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mikeharris22 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
Eleeleth has quit [Ping timeout: 240 seconds]
sfr^ has quit [Excess Flood]
Eleeleth has joined #ruby
johnhamelink has quit [Ping timeout: 240 seconds]
sfr^ has joined #ruby
tagrudev has quit [Remote host closed the connection]
stannard has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
yardenbar has quit [Ping timeout: 250 seconds]
akitada has quit [Ping timeout: 240 seconds]
colstrom has quit [Ping timeout: 240 seconds]
bruno-_ has quit [Ping timeout: 240 seconds]
lessless has quit [Ping timeout: 240 seconds]
brendan- has quit [Ping timeout: 240 seconds]
mugurel_ has joined #ruby
akitada has joined #ruby
colstrom has joined #ruby
romero has quit [Ping timeout: 260 seconds]
bruno-_ has joined #ruby
RegulationD has joined #ruby
romero has joined #ruby
freeze has joined #ruby
ta has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
romero is now known as Guest99131
sfr^ has quit [Changing host]
sfr^ has joined #ruby
moeabdol1 has quit [Ping timeout: 264 seconds]
mugurel has quit [Quit: Ex-Chat]
johnhamelink has joined #ruby
Zai00 has joined #ruby
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
rbennacer has joined #ruby
bruno-_ has quit [Ping timeout: 244 seconds]
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?
aufi has joined #ruby
<ljarvis> super easy!
<ljarvis> &ri csv
<`derpy> No results
<ljarvis> &ri CSV
Peg-leg has quit [Quit: Leaving.]
sepp2k has joined #ruby
<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 ?
Balllkenende has joined #ruby
Balllkenende is now known as JanPeter
JanPeter has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<adaedra> Your l.33 is weird
chriscoffee has joined #ruby
<adaedra> >> (1..3).cover?2
<ruboto> adaedra # => true (https://eval.in/462367)
nettoweb has joined #ruby
<adaedra> uh, didn't know.
atomical_ has quit [Ping timeout: 255 seconds]
RobertBirnie has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
rodfersou|lunch is now known as rodfersou
BSaboia has quit [Ping timeout: 244 seconds]
SCHAAP137 has quit [Remote host closed the connection]
relix has joined #ruby
Peg-leg has joined #ruby
Xeago has quit [Remote host closed the connection]
atomical has joined #ruby
<charany1> adaedra : can you please help me with this error ? https://gist.github.com/charany1/d0ac1846b9f757bf5fcd
Fire-Dragon-DoL has joined #ruby
Peg-leg has quit [Client Quit]
arne_ has joined #ruby
<jhass> charany1: still, put a space after exclude?
<adaedra> that's what I was looking at and don't see anything.
jamesaxl has joined #ruby
<jhass> charany1: also parens for the .include? at least
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
foooobear has quit [Quit: (null)]
<jhass> >> def a?(a); end; a?1 && a?2
<ruboto> jhass # => /tmp/execpad-b13e6a75fa43/source-b13e6a75fa43:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/462373)
hxegon has joined #ruby
<jhass> >> def a?(a); end; a? 1 && a? 2 # parses but is not what you want
<ruboto> jhass # => /tmp/execpad-0b4918368f35/source-0b4918368f35:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/462376)
<jhass> or doesn't even parse actually, hm
<adaedra> yeah, put parenthesis
mark4 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :QUIT :Leaving."]
<jhass> >> def a?(a); end; a?(1) && a?(2) # anyway, format it like this
<ruboto> jhass # => nil (https://eval.in/462377)
<adaedra> never too many parenthesis.
cwong_on_irc has joined #ruby
snockerton has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polishdub has quit [Quit: Leaving]
mattwildig has quit [Remote host closed the connection]
s2013 has joined #ruby
momomomomo has quit [Quit: momomomomo]
diegoviola has quit [Quit: WeeChat 1.3]
arne_ has quit [Quit: Leaving]
DexterLB has quit [Read error: Connection reset by peer]
<kith> >> puts "hello world!"
<ruboto> kith # => hello world! ...check link for more (https://eval.in/462391)
<charany1> jhass : thanks , it solved !
bruno- has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
bruno- is now known as Guest59363
emilkarl has quit [Quit: emilkarl]
hotpancakes has quit [Read error: Connection reset by peer]
s2013 has quit [Client Quit]
symm- has joined #ruby
moeabdol1 has quit [Ping timeout: 240 seconds]
ReK2 has joined #ruby
ReK2 has joined #ruby
eminence_ has quit [Remote host closed the connection]
ahegyi has joined #ruby
DexterLB has joined #ruby
mistermocha has joined #ruby
Guest59363 has quit [Ping timeout: 260 seconds]
moeabdol1 has joined #ruby
bruno-_ has joined #ruby
arthurix_ has joined #ruby
aufi has quit [Quit: Konversation terminated!]
simplyianm has joined #ruby
chriscoffee has quit [Read error: Connection reset by peer]
lsmola has quit [Ping timeout: 246 seconds]
Guest53_ has quit [Read error: Connection reset by peer]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has quit [Ping timeout: 272 seconds]
<banister> anyone here speak french?
bruno-_ has quit [Ping timeout: 255 seconds]
arthurix has quit [Ping timeout: 260 seconds]
Lucky has joined #ruby
bruno-_ has joined #ruby
Rollabunna has quit [Remote host closed the connection]
hotpancakes has joined #ruby
juanpablo__ has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
rehat_ has joined #ruby
bonemind has quit [Quit: WeeChat 1.0]
Guest53_ has joined #ruby
dopie has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> our offtopic channel has a french hangman
bruno-_ has quit [Ping timeout: 240 seconds]
seitensei has joined #ruby
seitensei has joined #ruby
bruno-_ has joined #ruby
juanpablo__ has quit [Ping timeout: 240 seconds]
<adaedra> banister: yes
<banister> adaedra can i message you?
crystalmaiden has joined #ruby
benlieb has joined #ruby
<adaedra> yes
patdohere has joined #ruby
hotpancakes has quit [Remote host closed the connection]
benlieb has quit [Client Quit]
ruby-lang019 has quit [Quit: Page closed]
BSaboia has joined #ruby
s2013 has joined #ruby
atomical_ has joined #ruby
rgtk has quit [Remote host closed the connection]
yardenbar has joined #ruby
kp666 has quit [Ping timeout: 240 seconds]
to_json has quit [Quit: Leaving.]
balazs has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
darix has quit [Quit: brb]
Timba-as has quit [Quit: Lingo: www.lingoirc.com]
duoi has quit [Excess Flood]
duoi has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
solars has quit [Ping timeout: 250 seconds]
duoi has quit [Changing host]
duoi has joined #ruby
_djbkd has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
chibs has quit [Ping timeout: 240 seconds]
balazs is now known as Guest47719
marr has joined #ruby
vigintas has quit [Ping timeout: 260 seconds]
shredding has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
_blizzy_ has quit [Quit: Leaving]
yardenbar has quit [Ping timeout: 252 seconds]
darix has joined #ruby
solocshaw has joined #ruby
polishdub has joined #ruby
towski_ has joined #ruby
hotpancakes has joined #ruby
rakm has joined #ruby
null_ref has joined #ruby
joonty has quit [Quit: joonty]
JanPeter has joined #ruby
stan has quit [Ping timeout: 240 seconds]
Trynemjoel has quit [Ping timeout: 250 seconds]
secret has joined #ruby
secret has quit [Excess Flood]
mp_ has joined #ruby
JanPeter_ has joined #ruby
Trynemjoel has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
subscope has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest47719 has quit [Remote host closed the connection]
mp_ has left #ruby [#ruby]
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rakm has quit [Client Quit]
moeabdol1 has quit [Ping timeout: 260 seconds]
JanPeter has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
JanPeter_ is now known as JanPeter
aleaf_ has joined #ruby
blackmes1 has joined #ruby
<aleaf_> ?
aleaf_ has quit [Client Quit]
<adaedra> ok
SCHAAP137 has joined #ruby
synthroid has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
JDiPierro has joined #ruby
jaequery has joined #ruby
eminencehc has joined #ruby
_djbkd has quit [Quit: My people need me...]
moeabdol1 has joined #ruby
rgb-one has left #ruby [#ruby]
fedexo has quit [Ping timeout: 246 seconds]
kalusn has quit [Remote host closed the connection]
zotherstupidguy has joined #ruby
arthurix_ has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
rbennacer has quit [Remote host closed the connection]
Guest53_ has quit [Ping timeout: 250 seconds]
JDiPierro has quit [Ping timeout: 240 seconds]
eminencehc has quit [Remote host closed the connection]
skullcrasher has quit [Ping timeout: 268 seconds]
jsrn has quit [Ping timeout: 246 seconds]
karapetyan has quit [Remote host closed the connection]
mattwildig has joined #ruby
karapetyan has joined #ruby
eminencehc has joined #ruby
jsrn has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nertzy has joined #ruby
ghostbox has joined #ruby
nettoweb has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
moeabdol1 has quit [Quit: WeeChat 1.3]
diegoviola has joined #ruby
adac has quit [Ping timeout: 260 seconds]
eminencehc has quit [Ping timeout: 246 seconds]
leafyba__ has joined #ruby
evanjs has quit [Remote host closed the connection]
rbennacer has joined #ruby
karapetyan has joined #ruby
bricker has joined #ruby
leafybas_ has quit [Ping timeout: 244 seconds]
benlieb has joined #ruby
blackmes1 has quit [Ping timeout: 250 seconds]
blackoperat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Alina-malina has joined #ruby
s2013 has joined #ruby
leafyba__ has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
synthroid has joined #ruby
s2013 has quit [Client Quit]
dionysus69 has joined #ruby
mdih has joined #ruby
Xeago has joined #ruby
go|dfish has quit [Ping timeout: 268 seconds]
s2013 has joined #ruby
eminencehc has joined #ruby
InternetFriend has joined #ruby
roshanavand has quit [Remote host closed the connection]
riffraff has quit [Quit: This computer has gone to sleep]
cjbischof_ has joined #ruby
skullcrasher has joined #ruby
sebstrax has quit [Quit: Connection closed for inactivity]
[Butch] has joined #ruby
evanjs has joined #ruby
blackoperat has joined #ruby
freerobby1 has quit [Quit: Leaving.]
zotherstupidguy has quit [Read error: Connection reset by peer]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has quit [Read error: Connection reset by peer]
chthon has quit [Ping timeout: 244 seconds]
mjuszczak has joined #ruby
mjuszczak has quit [Client Quit]
roshanavand has joined #ruby
hotpancakes has quit [Remote host closed the connection]
shadoi has joined #ruby
Alina-malina has quit [Ping timeout: 255 seconds]
qwertme has joined #ruby
jgt has quit [Ping timeout: 240 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
Synthead has quit [Remote host closed the connection]
Synthmead has quit [Remote host closed the connection]
JanPeter has quit [Remote host closed the connection]
skullcrasher has quit [Ping timeout: 272 seconds]
go|dfish has joined #ruby
evanjs has quit [Remote host closed the connection]
mrtomme has quit [Ping timeout: 260 seconds]
jpfuentes2 has joined #ruby
mrtomme has joined #ruby
umgrosscol has quit [Remote host closed the connection]
Ulfalizer2 has joined #ruby
bruno- has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
bruno- is now known as Guest64621
diegoaguilar has quit [Ping timeout: 240 seconds]
<Ulfalizer2> does ruby-forum.com really mirror ruby-talk? i can't see any of the recent postings when i check the archive for ruby-talk.
<Ulfalizer2> i.e., the archive for the mailing list
RobertBirnie has joined #ruby
zotherstupidguy has joined #ruby
last_staff has joined #ruby
blackoperat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
balazs has joined #ruby
leat has quit [Ping timeout: 268 seconds]
Guest64621 has quit [Ping timeout: 272 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
balazs has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
<axisys> rvc foo:secret@vcenter.com works but rvc foo:"secret&me"@vcenter.com ignores password.. any suggestion of a workaround.. URI parser is here https://github.com/vmware/rvc/blob/master/lib/rvc/uri_parser.rb
<axisys> not sure why it ignore if sees '&' in password
devoldmx has joined #ruby
<axisys> no one in #rvc channel rlane@vmware.com bounces and post an issue in github and no response
<hxegon> If I'm trying to use a single file from a new BSD licensed repo, do I have to add new BSD in a comment to the file or something?
<axisys> figure rvc (ruby vsphere console) is written in ruby so ask here
ChargedLight has quit [Ping timeout: 268 seconds]
rakm has joined #ruby
firstdayonthejob has joined #ruby
<soahccc> axisys: does it work without quotes? https://gist.github.com/2called-chaos/c64d56f974b0f5500c91
acke has joined #ruby
bender_unit has joined #ruby
simplyianm has quit [Remote host closed the connection]
alex88 has joined #ruby
<alex88> hi guys, someone uses activeadmin? I've customized a user edit form but it uses POST and it should be PATCH, someone had the same issue?
AnoHito_ has quit [Read error: Connection reset by peer]
<hxegon> alex88: are you using activeadmin outside of rails?
AnoHito_ has joined #ruby
<alex88> nope, inside of it
devoldmx has quit [Ping timeout: 272 seconds]
<hxegon> alex88: #rubyonrails would probably be more able to help you
<alex88> oh ok
<alex88> thanks
balazs has joined #ruby
Lucky has quit [Disconnected by services]
<hxegon> alex88: no prob, have a nice day
<alex88> you too
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
<dorei> >> "Hello".scan(/.../)
<ruboto> dorei # => ["Hel"] (https://eval.in/462462)
peteykun has quit [Quit: Leaving]
<axisys> soahccc: anyway to add a debug to see what rvc sees?
mistermocha has quit [Ping timeout: 246 seconds]
<Ebok> I'm going to need to look up that syntax to understand it. lol. /./ I get, what is {3,1} translate too?
<soahccc> axisys: I don't know rvc but the fact that they maintain an own URL parser is kinda weird
riotjones has quit [Ping timeout: 260 seconds]
Kruppe- has quit [Quit: ZNC - http://znc.in]
<Zarthus> does it need to be a regex, Ebok?
<Ebok> Nope
s2013 has joined #ruby
<Zarthus> "Hello World!".length.times do |i|; puts "Hello World"[i..i+2]; end could work
<Zarthus> the remainder is i+2 .. string.length
<axisys> soahccc: ^ may be add a debug in there?
Kruppe has joined #ruby
jgt has joined #ruby
mndoci has quit [Remote host closed the connection]
<Ebok> Thanks Zarthus, I think I'll stick with the regex for now though
<dorei> >> "hello".chars.each_slice(3).map(&:join).last
<ruboto> dorei # => "lo" (https://eval.in/462463)
<axisys> can you suggest a better uri handling and I can send them a rquest for fix?
leat has joined #ruby
<hxegon> Ebok: you could also try String.reverse.split('') to get an array of chars and Array#pop
swgillespie has joined #ruby
tigarcia has joined #ruby
<soahccc> axisys: I guess they have a reason or they are stupid since ruby has a quite functional URI parser which can parse it as shown in my gist
s2013 has quit [Max SendQ exceeded]
Bloomer has quit [Remote host closed the connection]
<hxegon> Ebok: err, don't reverse. just use Array.shift which is like pop, but takes from the beggining
<axisys> my problem is rvc foo:secret&me@vcenter.com will not work from bash
mistermocha has joined #ruby
<Ebok> Yeah.
baweaver has joined #ruby
<Ebok> The regex does what I need it to do /.{1,3}/ though so would using an count variable to shovel it into an array during an each iteration.
<axisys> soahccc: this ignores password as well rvc "foo:secret&me@vcenter.com"
roshanavand has joined #ruby
<hxegon> Ebok: foo = "12345".split('') ; until foo.length == 0; p foo.shift 3; end
<Ebok> cool
kalusn has joined #ruby
makufiru has quit [Quit: Connection closed for inactivity]
<hxegon> foo = "12345".split('') ; until foo.length == 0; p foo.shift(3).join(''); end # for sure a better way to do this
woti has joined #ruby
<hxegon> >> foo = "12345".split('') ; until foo.length == 0; p foo.shift(3).join(''); end # for sure a better way to do this
<ruboto> hxegon # => "123" ...check link for more (https://eval.in/462464)
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 ?
woti has quit [Client Quit]
<axisys> str is the argument for rvc
woti has joined #ruby
mattwildig has joined #ruby
<axisys> uri = URI.parse ?
<soahccc> >> [URI.parse(%{protocol://foo:secret&me@vcenter.com}).userinfo, URI.parse(%{foo:secret&me@vcenter.com}).userinfo]
<ruboto> soahccc # => uninitialized constant URI (NameError) ...check link for more (https://eval.in/462465)
atomical has joined #ruby
<soahccc> >> require "uri" ; [URI.parse(%{protocol://foo:secret&me@vcenter.com}).userinfo, URI.parse(%{foo:secret&me@vcenter.com}).userinfo]
<ruboto> soahccc # => ["foo:secret&me", nil] (https://eval.in/462466)
roshanavand has quit [Ping timeout: 240 seconds]
<axisys> soahccc: hey.. that looks good.. now I need to split them
<soahccc> axisys: I guess you can try to debug and see what the parse actually returns there (print it to console or something)
krz has quit [Quit: WeeChat 1.2]
hahuang65 has quit [Quit: WeeChat 1.3]
eminencehc has quit [Remote host closed the connection]
<soahccc> axisys: maybe the parser can parse it but whatever works with it has problems?
`based_pdev` has quit [Ping timeout: 244 seconds]
<axisys> soahccc: how do I debug it?
<axisys> embed pry ?
<soahccc> That's a possibility or just print the result to console (puts) and exit
zenguy_pc has joined #ruby
<axisys> soahccc: ok
renderfu_ has joined #ruby
neanderslob_ has joined #ruby
woti has quit [Client Quit]
evanjs has joined #ruby
blackmes1 has joined #ruby
craysiii has joined #ruby
neanderslob has quit [Ping timeout: 268 seconds]
bluOxigen has joined #ruby
minimalism has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<Ebok> honestly I was hoping there was a string.slice(3) type method tbh
<Ebok> <_<
blackoperat has joined #ruby
bruno- has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
<soahccc> Ebok: what are you trying to do anyway? :)
Spami_ has joined #ruby
bruno- is now known as Guest45470
<Ebok> Oh, I was wondering how to manually put in commas in a string integer without using any other gem.
russellx has quit [Quit: russellx]
<axisys> soahccc: bin/rvc is https://gist.github.com/asifiqbal/31f23e4643bc8686a138 .. it calls /var/lib/gems/1.9.1/gems/rvc-1.8.0/bin/rvc .. how do I tell it to call /var/lib/gems/1.9.1/gems/rvc-1.8.0/bin/rvc2 ?
<Ebok> So I needed to count from the back, and reversed everything >_>
cjbischof_ has joined #ruby
eminencehc has joined #ruby
<axisys> soahccc: i dont want to modify the /var/lib/gems/1.9.1/gems/rvc-1.8.0/bin/rvc since lot of people using it
secret has joined #ruby
gusTester1 has joined #ruby
mndoci has joined #ruby
hahuang65 has joined #ruby
blueOxigen has quit [Ping timeout: 268 seconds]
juanpablo__ has joined #ruby
danman_ has joined #ruby
eminencehc has quit [Remote host closed the connection]
Spami has quit [Ping timeout: 260 seconds]
danman has quit [Ping timeout: 265 seconds]
danman_ is now known as danman
Guest45470 has quit [Ping timeout: 252 seconds]
gusTester1 has left #ruby [#ruby]
dnomyar has quit [Ping timeout: 240 seconds]
eminence_ has joined #ruby
mndoci has quit [Remote host closed the connection]
bruno-_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
blaxter has quit [Quit: foo]
<soahccc> axisys: Hmm no idea, call it directly without this wrapper? I would test/modify it in a test environment
juanpablo__ has quit [Ping timeout: 252 seconds]
xaxisx has left #ruby [#ruby]
mwlang has joined #ruby
<axisys> soahccc: ok puts str before uri = RVC::URIParser.parse str andI get bad uri
mistermocha has joined #ruby
nfk|laptop has joined #ruby
<axisys> so I think RVC::URIParser.parse is breaking it
mcantor has joined #ruby
<mcantor> Why do I have a directory .rbenv/versions/2.2.3/lib/ruby/gems/2.2.0? I'm using ruby 2.2.3, but the gem dir is 2.2.0
bruno-_ has quit [Ping timeout: 250 seconds]
bruno-_ has joined #ruby
<soahccc> mcantor: it's the C api version or something like that
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has joined #ruby
maikowblue has joined #ruby
nfk|laptop has quit [Client Quit]
<mcantor> soahccc: where can I read more about this?
<soahccc> axisys: I think maybe there is something else wrong? That works here http://files.sven.bmonkeys.net/images/Desktopa.rb_2015-11-03_19-48-25.png
<darix> ruby -r rbconfig -e 'puts RbConfig::CONFIG["ruby_version"]'
mistermocha has quit [Ping timeout: 260 seconds]
Rollabunna has joined #ruby
mistermocha has joined #ruby
jordanloky has quit [Ping timeout: 264 seconds]
FDostoyevsky has joined #ruby
griffindy has joined #ruby
qwertme has joined #ruby
<mcantor> soahccc: TIL. thanks!
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 265 seconds]
bruno-_ has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
umgrosscol has joined #ruby
snockerton has quit [Quit: Leaving.]
mistermocha has joined #ruby
<axisys> soahccc: does this password work? T#b]zYs&Ap4I
Rollabunna has quit [Ping timeout: 255 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soahccc> axisys: nope: lib/ruby/2.1.0/uri/generic.rb:440:in `check_password': bad component(expected user component): T#b]zYs&Ap4I (URI::InvalidComponentError)
<axisys> soahccc: there we go!
symbol_ has joined #ruby
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno-_ has quit [Ping timeout: 260 seconds]
bruno-_ has joined #ruby
lukaszes has joined #ruby
symbol has quit [Ping timeout: 240 seconds]
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
ibouvousaime has joined #ruby
Guest46316 has quit [Ping timeout: 260 seconds]
beauby has joined #ruby
bruno-_ has joined #ruby
Ox0dea has joined #ruby
<Ox0dea> >> require 'uri'; URI.escape '#%<>^`' # axisys
<ruboto> Ox0dea # => "%23%25%3C%3E%5E%60" (https://eval.in/462477)
druonysus has joined #ruby
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
acke has quit [Remote host closed the connection]
<axisys> Ox0dea: cool.. let me give that a try
malconis has quit [Read error: Connection reset by peer]
malconis_ has joined #ruby
<soahccc> axisys: you can also urlencode with bash but oh my :D
moeabdol has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
ta has joined #ruby
ta has quit [Remote host closed the connection]
<axisys> soahccc: wow!
ta has joined #ruby
<soahccc> banister: "bah" seem to be a sign of hesitation like in "err, nope" and the rest is "to see"... no idea :D
<Ox0dea> Would anyone like to see a magic trick?
<adaedra> No.
<Ox0dea> You lie.
bruno-_ has quit [Ping timeout: 268 seconds]
<adaedra> Ok, first, get out of my mind, mate.
<Ox0dea> And secondly?
bruno-_ has joined #ruby
atomical_ has joined #ruby
<adaedra> Secondly, there was only one point.
<Ox0dea> The math checks out.
phillips1012 has joined #ruby
yqt has joined #ruby
gusTester has joined #ruby
<adaedra> soahccc: so close, yet so far away.
rakm has quit [Quit: Textual IRC Client: www.textualapp.com]
seitensei has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 255 seconds]
<soahccc> adaedra: yeah I know embarrassing... I work for a french company and can't speak a work french :D
<Ox0dea> >> srand File.read($0).size;Object.const_get(Object.constants.sample)[/.{18}$/]
<ruboto> Ox0dea # => "Yukihiro Matsumoto" (https://eval.in/462482)
<Ox0dea> Wat?!
<Ox0dea> I.respond_to?(:even?) # => false
Xeago has joined #ruby
<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
Guest79 has joined #ruby
<Ox0dea> riceandbeans: def foo *args, required: 'bar' ...
dnomyar has joined #ruby
<riceandbeans> ....what?
ss_much has joined #ruby
mattwildig has quit [Remote host closed the connection]
uri_ has quit [Ping timeout: 240 seconds]
evanjs has quit [Quit: Leaving...]
decoponio has quit [Ping timeout: 265 seconds]
bruno-_ has quit [Ping timeout: 255 seconds]
bruno-_ has joined #ruby
<riceandbeans> how do I have pry tell me the ruby version?
<riceandbeans> windows is weird and doesn't recognize ruby with the pathing and it's using an embedded ruby from chef
timonv has joined #ruby
rbennacer has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<atmosx> pry
Guest79 has quit [Client Quit]
<Ox0dea> dorei: https://eval.in/462487
freerobby has quit [Quit: Leaving.]
<atmosx> riceandbeans: RUBY_VERSION
diegoaguilar has quit [Ping timeout: 260 seconds]
<riceandbeans> ruby 2.0.0p645 (2015-04-13) [i386-mingw32]
<riceandbeans> I don't think I can do the required: thing in 2.0
leventix_ has joined #ruby
<Ox0dea> riceandbeans: You can; they're called keyword arguments.
nertzy has quit [Quit: This computer has gone to sleep]
wlch has joined #ruby
<riceandbeans> and I don't do () +
<riceandbeans> I do def foo *args, required: 'bar' ?
bruno-_ has quit [Ping timeout: 250 seconds]
<riceandbeans> and that just means the last argument specified is the required one?
<Ox0dea> Somebody needs to read a book.
<Ox0dea> Put the parameter list in parentheses if you want, dude.
<riceandbeans> is there any difference?
haxrbyte_ has joined #ruby
bruno-_ has joined #ruby
diegoaguilar has joined #ruby
gusTester has left #ruby [#ruby]
eminence_ has quit [Remote host closed the connection]
<soahccc> riceandbeans: I only know of one example where parentheses actually make a functional difference and that is calling "super"
eminencehc has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
dopamean_ has quit [Ping timeout: 250 seconds]
balazs has quit [Remote host closed the connection]
dopamean_ has joined #ruby
cdg has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 240 seconds]
bruno-_ has joined #ruby
eminencehc has quit [Remote host closed the connection]
_stu_ has joined #ruby
<dorei> Ox0dea: nice trick :) unfortunately it only works with attr_accessor :(
blackoperat has quit [Quit: Textual IRC Client: www.textualapp.com]
gusTester has joined #ruby
<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]
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
leventix_ has quit [Quit: Textual IRC Client: www.textualapp.com]
wlch has quit [Quit: Leaving]
worstcase has joined #ruby
<worstcase> hi there, any ideas how i could "flip" a array like that: https://gist.github.com/b1nary/6e9416eeaf1e59e3b9e6
leventix has joined #ruby
snockerton has quit [Quit: Leaving.]
mattwildig has quit [Ping timeout: 252 seconds]
Ox0dea has joined #ruby
<Ox0dea> worstcase: You want #transpose.
<ytti> [7] pry(main)> (1..9).to_a.each_slice(3).to_a
<ytti> => [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
timonv has quit [Quit: WeeChat 1.3]
charany1 has quit [Ping timeout: 240 seconds]
<Ox0dea> Eww.
<Ox0dea> ytti: Why assume worstcase has sequential elements?
timonv has joined #ruby
charany1 has joined #ruby
baweaver has quit [Remote host closed the connection]
TheHodge has joined #ruby
QORRiE has joined #ruby
towski_ has joined #ruby
QORRiE has quit [Changing host]
QORRiE has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
bricker has quit [Ping timeout: 260 seconds]
<ytti> Ox0dea, i'm not sure what you mean
axl__ has joined #ruby
swgillespie has joined #ruby
mozzarella has quit [Quit: WeeChat 1.2]
<Ox0dea> ytti: Oh, never mind; your suggestion doesn't even do what worstcase was asking for.
<Ox0dea> >> [1,8,6,7,5,3,0,9,1].each_slice(3).to_a.transpose # worstcase
<ruboto> Ox0dea # => [[1, 7, 0], [8, 5, 9], [6, 3, 1]] (https://eval.in/462495)
<ytti> oh right
bruno-_ has joined #ruby
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]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Ox0dea> >> srand File.read($0).size;Object.const_get(Object.constants.sample)[/.{18}$/]
<ruboto> Ox0dea # => "Yukihiro Matsumoto" (https://eval.in/462498)
juanpablo__ has quit [Ping timeout: 240 seconds]
YourKicks has quit [Ping timeout: 272 seconds]
<Ox0dea> Isn't it great?
vigintas has joined #ruby
dopamean_ has joined #ruby
<adaedra> Having fun here?
<Ox0dea> That plain-as-day 18 is unfortunate, but the program's length had to be exact.
<Ox0dea> adaedra: It's sort of like a quine but not at all really.
<Ox0dea> Still, parameterizing the randomness on the file size is silly and wonderful.
beauby has quit [Ping timeout: 250 seconds]
ldnunes has quit [Quit: Leaving]
<shevy> what the
acke has joined #ruby
<shevy> >> srand File.read($0).size;Object.const_get(Object.constants.sample)[/.{18}$/]
<ruboto> shevy # => "Yukihiro Matsumoto" (https://eval.in/462499)
<Ox0dea> Holy shit! It's deterministic!
<hxegon> 'random' output
riotjones has joined #ruby
<Ox0dea> hxegon: Hue hue.
mistermo_ has joined #ruby
<hxegon> well if its good enough for RSA
eminencehc has joined #ruby
<Ox0dea> hxegon: Did you mean the universe?
hotpancakes has joined #ruby
mooru has joined #ruby
<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 ?
<Ox0dea> Come on, hxegon.
<Ox0dea> Ebok: Negate the length.
<Ebok> nope.
unsymbol has joined #ruby
<Ebok> O.o
<Ebok> negate?
<Ox0dea> >> %w[a bb ccc].sort_by { |s| -s.length }
<ruboto> Ox0dea # => ["ccc", "bb", "a"] (https://eval.in/462516)
andykingking has joined #ruby
<Ebok> Wow
<Ox0dea> Honestly.
<hxegon> Ox0dea: I didn't know you could do that.
<Ebok> lol
<Ebok> xD
<Ebok> That's new
<Ebok> xD
skcin7 has joined #ruby
cjbischof_ has joined #ruby
<Ebok> I love it whenever Ox0 answers me >_> everysingle time I learn something
<Ebok> <3
<hxegon> ^^
<shevy> Ox only shows reallife code
Spami_ has joined #ruby
dhollinger has joined #ruby
sandals has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
colegatron has quit [Ping timeout: 265 seconds]
<eam> hm, sort_by says it does a Schwartzian transform, so wouldn't sort { |a,b| b <=> a } be faster?
<eam> I wonder
synthroid has quit [Remote host closed the connection]
lkba has joined #ruby
ahegyi has quit [Ping timeout: 240 seconds]
trosborn has joined #ruby
zenguy_pc has joined #ruby
mooru has quit [Quit: Textual IRC Client: www.textualapp.com]
tvw has quit [Ping timeout: 246 seconds]
trosborn has quit [Client Quit]
<eam> nope!
pwnd_nsfw has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
<shevy> dutiful testing
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> looks like #length is a lot more expensive than I would've thought
chibs has quit [Ping timeout: 244 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
Musashi007 has joined #ruby
diegoaguilar has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
rgrmatt has joined #ruby
momomomomo_ has joined #ruby
to_json has quit [Quit: Leaving.]
eL_bAmba has joined #ruby
ghostbox has joined #ruby
symm-_ has joined #ruby
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
Musashi007 has quit [Client Quit]
FernandoBasso has joined #ruby
mcantor has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
mcantor has quit [Client Quit]
<shevy> it costs 3 bucks!
EdwardIII has quit [Ping timeout: 250 seconds]
andykingking has quit [Read error: Connection timed out]
andykingking has joined #ruby
sandals is now known as pdev_champ
eminencehc has quit [Remote host closed the connection]
eminencehc has joined #ruby
colegatron has joined #ruby
beauby has joined #ruby
baweaver has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
chouhoulis has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
mistermocha has joined #ruby
EdwardIII has joined #ruby
chibs has joined #ruby
<Ox0dea> eam: Your predicate there doesn't sort them by length.
rgrmatt has quit [Remote host closed the connection]
pathOs has joined #ruby
JanPeter has joined #ruby
rgrmatt has joined #ruby
hahuang65 has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
diegoaguilar has joined #ruby
syath has quit [Quit: WeeChat 1.2]
bruno- has joined #ruby
JanPeter has quit [Client Quit]
Coldblackice has quit [Read error: Connection reset by peer]
bruno- is now known as Guest72810
kstuart has joined #ruby
lemur has joined #ruby
treehug88 has joined #ruby
codecop has joined #ruby
eminencehc has quit [Remote host closed the connection]
cdg has joined #ruby
trosborn has joined #ruby
Coldblackice has joined #ruby
<Ox0dea> I realize now it was just a demonstration of the principle.
VeryBewitching has joined #ruby
tvw has quit [Read error: Connection reset by peer]
skweek has joined #ruby
<Ox0dea> { b - a } is ~15% faster than { b <= > a }.
zquad has quit [Quit: Leaving.]
Guest72810 has quit [Ping timeout: 260 seconds]
<Ox0dea> All that matters is the sign.
p0wn3d__ has quit [Ping timeout: 246 seconds]
lemur has quit [Ping timeout: 246 seconds]
<Ox0dea> *<=>
<Ebok> what is a good way to test the efficiency of the code like that?
kstuart has quit [Ping timeout: 268 seconds]
<Ox0dea> Ebok: require 'benchmark-ips'
autojack has left #ruby [#ruby]
<Ebok> cool
eL_bAmba has quit [Quit: Saliendo]
BSaboia has quit [Ping timeout: 255 seconds]
andykingking has quit [Read error: Connection timed out]
<Ox0dea> Ebok: It's pretty great: https://eval.in/462534
andykingking has joined #ruby
agentmeerkat has quit [Quit: Lost terminal]
<Ebok> That goes into my cool useful code for later pile
baweaver has quit [Remote host closed the connection]
<Ox0dea> Instead of running some block `n` times and determining how long it took, you calculate how many times it can run in a given time frame.
arthurix_ has joined #ruby
<Ox0dea> Ebok: Do you own a private island?
<Ebok> Nope >_>
<Ebok> Why?
<Ox0dea> Well, where are you gonna put that pile?
<Ox0dea> This is #ruby, after all.
<Ebok> lol
bricker has joined #ruby
rgrmatt has quit [Remote host closed the connection]
<Ebok> I'm keeping it in the Ox0dea conversations log
<Ebok> :P
<Ox0dea> <3
PaulCapestany has quit [Quit: .]
rgrmatt has joined #ruby
bender_unit has joined #ruby
PaulCapestany has joined #ruby
dfockler has quit [Ping timeout: 268 seconds]
mg^ has joined #ruby
griffindy has quit [Quit: Textual IRC Client: www.textualapp.com]
arthurix has quit [Ping timeout: 250 seconds]
podman has joined #ruby
<shevy> there are different piles
<shevy> code that is useful - one pile
<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
<pedahzur> Ox0dea: OK. Seems Berks now uses https://github.com/nahi/httpclient Not sure if that supports $PROXY variables.
<Ox0dea> I bet it does.
<Ox0dea> Give it a look-see.
<pedahzur> From an initial grep, it seems it does.
Xeago has quit [Ping timeout: 252 seconds]
fschuindt has joined #ruby
<fschuindt> How can I pass two parameters to a method, being a string and a block?
ibouvousaime has quit [Read error: Connection reset by peer]
momomomomo has quit [Ping timeout: 244 seconds]
bruno-_ has quit [Ping timeout: 260 seconds]
lukaszes has joined #ruby
<Ox0dea> fschuindt: def foo arg, &block; ...; end
Ox0dea has quit [Quit: WeeChat 1.4-dev]
cpup has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
Musashi007 has joined #ruby
bruno- has joined #ruby
acke has quit [Remote host closed the connection]
Ropeney has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
bruno- is now known as Guest18578
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has joined #ruby
codecop has quit [Remote host closed the connection]
vinleod has quit [Ping timeout: 240 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpup has joined #ruby
jpfuentes2 has joined #ruby
petricore has joined #ruby
Guest18578 has quit [Ping timeout: 240 seconds]
bruno-_ has joined #ruby
druonysus has quit [Remote host closed the connection]
tvw has joined #ruby
pietr0_ has joined #ruby
BSaboia has joined #ruby
chouhoulis has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pietr0 has quit [Ping timeout: 265 seconds]
pietr0_ is now known as pietr0
jpfuentes2 has quit [Ping timeout: 250 seconds]
last_staff has quit [Quit: last_staff]
andykingking has quit [Ping timeout: 260 seconds]
leventix has quit [Ping timeout: 272 seconds]
mattwildig has joined #ruby
arthurix has joined #ruby
bruno-_ has quit [Ping timeout: 268 seconds]
bruno-_ has joined #ruby
mondongo has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mondongo has left #ruby [#ruby]
mozzarella has quit [Quit: WeeChat 1.2]
ghostbox has quit [Remote host closed the connection]
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<axisys> soahccc: that was a long meeting .. so I used the urlencoded password and now do no get bad uri but incorrect user name or password
<axisys> $ urlencode 'T#b]zXs&Ap4I'
<axisys> T%23b%5DzXs%26Ap4I
chouhoulis has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Ping timeout: 260 seconds]
moeabdol has quit [Ping timeout: 240 seconds]
<axisys> rvc foo:T%23b%5DzXs%26Ap4I@vcenter.com
AndyBotwin has joined #ruby
Joshua__ has joined #ruby
<axisys> Failed to connect to vcenter.com: InvalidLogin: Cannot complete login due to an incorrect user name or password
arthurix_ has quit [Ping timeout: 272 seconds]
<Joshua__> Hello i need help with a problem
<Joshua__> I'm very new to ruby programming and im currently doing codecademy
karapetyan has quit [Remote host closed the connection]
Balllkenende has joined #ruby
bruno-_ has quit [Ping timeout: 268 seconds]
<axisys> soahccc: that error message is from line 85
kinduff has joined #ruby
<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]
_stu_ has joined #ruby
__chris has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dikaio has joined #ruby
SCHAAP137 has joined #ruby
tigarcia has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno-_ has quit [Ping timeout: 246 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
pathOs has quit [Ping timeout: 240 seconds]
juanpablo__ has quit [Ping timeout: 264 seconds]
trosborn has quit [Quit: trosborn]
<baweaver> Joshua__: error helps too
bruno-_ has joined #ruby
<baweaver> also, use two space indentation instead of tabs
<baweaver> no need to indent any of those blocks like that.
devoldmx has joined #ruby
karapetyan has quit [Remote host closed the connection]
lukaszes has joined #ruby
diegoaguilar has quit [Ping timeout: 246 seconds]
mozzarella has joined #ruby
<baweaver> probably that you need 'while do'
kinduff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> now we can have rusy, the updated variant for ruby
bruno-_ has quit [Ping timeout: 265 seconds]
rbennacer has joined #ruby
cdg has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
cdg has joined #ruby
bruno- is now known as Guest83648
<hxegon> Joshua__: I'm just going to make some comments on that gist real quick...
SCHAAP137 has quit [Ping timeout: 260 seconds]
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
vdamewood has joined #ruby
momomomomo has quit [Ping timeout: 252 seconds]
tigarcia has joined #ruby
Guest83648 has quit [Ping timeout: 268 seconds]
Icey has quit [Ping timeout: 255 seconds]
bruno-_ has joined #ruby
arescorpio has joined #ruby
diegoaguilar has joined #ruby
imperator has joined #ruby
riotjones has joined #ruby
<imperator> rubygems 2.5.0 has been released
momomomomo has joined #ruby
bruno-_ has quit [Ping timeout: 264 seconds]
<Joshua__> thank you
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
baroquebobcat has quit [Quit: baroquebobcat]
bruno-_ has quit [Ping timeout: 240 seconds]
spew has quit [Quit: leaving]
<edj979> joshua try varName == varName2
mistermo_ has quit [Ping timeout: 252 seconds]
bruno-_ has joined #ruby
<hxegon> >> 'one' == 'one' # Joshua__
<ruboto> hxegon # => true (https://eval.in/462564)
opensource_ninja has joined #ruby
ESpiney has quit [Quit: Leaving]
<edj979> can anyone tell me what i did wrong?
baweaver has quit [Remote host closed the connection]
zenguy_pc has quit [Ping timeout: 244 seconds]
AndyBotwin has quit [Quit: Leaving]
fschuindt has quit [Quit: WeeChat 1.3]
bruno-_ has quit [Ping timeout: 244 seconds]
pdev_champ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon> edj979: you asked a rails question on #ruby instead of #rubyonrails
matcouto has joined #ruby
bruno-_ has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
<eam> >> '​one' == 'one' # hxegon
<ruboto> eam # => false (https://eval.in/462570)
Musashi007 has quit [Quit: Musashi007]
matcouto has quit [Client Quit]
<edj979> is anyone here?
<hxegon> eam: ok? yes.
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<edj979> do you know how to fix this?
<edj979> xv
imperator has left #ruby ["Leaving"]
<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]
<shevy> you must register there
<edj979> how?
<shevy> on #ruby it's free for all
<shevy> don't abandon us :(
<edj979> i have no idea what im doing lol
bruno-_ has quit [Ping timeout: 265 seconds]
jgpawletko has quit [Quit: jgpawletko]
<shevy> I would not know how to do it with webchat either; if you use a traditional client then this would help https://freenode.net/faq.shtml#userregistration
<shevy> OR
<shevy> you stay with us instead :>
bruno-_ has joined #ruby
ghostbox has joined #ruby
mleung has quit [Ping timeout: 252 seconds]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
pietr0 has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
<adaedra> That's the same way with webchat.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghostbox has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pietr0 has joined #ruby
rodfersou has joined #ruby
momomomomo has quit [Quit: momomomomo]
bender_unit has quit [Quit: Textual IRC Client: www.textualapp.com]
<hxegon> you have to register with NickServ
<hxegon> edj979: ^
Xeago has joined #ruby
<edj979> nickserv???
<edj979> how do i talk to nickserv?
bruno-_ has quit [Ping timeout: 246 seconds]
<adaedra> Did you read the page shevy linked?
<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
raposa has joined #ruby
bruno-_ has quit [Ping timeout: 246 seconds]
<EllisTAA> hxegon: k let me try that
<pedahzur> How do you get the body from a 404 messages when using open-uri in Ruby 2? This would suggest error.io.readlines http://stackoverflow.com/questions/13020597/getting-the-contents-of-a-404-error-page-response-ruby but that doesn't work in Ruby 2.
bruno-_ has joined #ruby
mondongo has joined #ruby
yfeldblum has joined #ruby
_stu_ has quit [Quit: _stu_]
mondongo has quit [Client Quit]
radgeRayden_ has joined #ruby
jpfuentes2 has joined #ruby
<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]
chouhoulis has joined #ruby
jpfuentes2 has quit [Ping timeout: 240 seconds]
kinduff has joined #ruby
Balllkenende has joined #ruby
<EllisTAA> hxegon: i improved the names https://gist.github.com/ellismarte/2c17adc195dfc84eac01
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…]
jacksonmills has quit [Quit: Leaving]
Motoservo has joined #ruby
baroquebobcat has joined #ruby
bruno-_ has joined #ruby
<pedahzur> I'm trying to print out the contents of a 404 message (Ruby2). If I catch the error and print "error.data.response" I get "#<Net::HTTPNotFound:0x007f90320965b8>" According to http://ruby-doc.org/stdlib-2.0.0/libdoc/net/http/rdoc/Net/HTTPResponse.html (which is a parent class of this) I should be able to then do puts error.data.response.body However, when I do that, I get this: https://gist.github.com/jkugler/69e307f68a8b9a86a4d8 How
<pedahzur> do I get the response body?
kaneis has joined #ruby
kaneis has quit [Client Quit]
kaneis has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
SCHAAP137 has quit [Quit: Leaving]
<pedahzur> Hmm, doing error.data.response.inspect gives me "#<Net::HTTPNotFound 404 Not found readbody=false>" Why would readbody be false?
bruno-_ has quit [Ping timeout: 244 seconds]
<shevy> perhaps because there was no body
bruno-_ has joined #ruby
kaneis has quit [Client Quit]
JuanDaugherty has quit [Quit: Hibernate, reboot, etc.]
SenpaiSilver has quit [Read error: Connection reset by peer]
<darix> pedahzur: mechanize
kaneis has joined #ruby
pedahzur has quit [Read error: No route to host]
SenpaiSilver has joined #ruby
pedahzur has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
idefine has quit [Remote host closed the connection]
rgtk has joined #ruby
zenguy_pc has joined #ruby
baweaver has quit [Remote host closed the connection]
Motoservo has joined #ruby
bruno-_ has quit [Ping timeout: 250 seconds]
<mg^> Damn, I suck at RSpec. The mental transition from simple unit tests to what RSpec does is hard.
<pedahzur> Sorry, my connection blipped. Did I miss anything? :0
bruno-_ has joined #ruby
mordocai has quit [Quit: going home]
Motoservo has quit [Read error: Connection reset by peer]
danman has quit [Quit: danman]
<lagweezle> pedahzur: shevy suggested that it is perhaps because there was no body. darix said 'mechanize' and linked to https://gist.github.com/anonymous/7ce480f68bda301733a0
crdpink2 has quit [Ping timeout: 246 seconds]
crdpink2 has joined #ruby
Motoservo has joined #ruby
Motoservo has quit [Client Quit]
dhollinger has quit [Quit: Leaving]
kirun has quit [Quit: Client exiting]
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?
inteq has quit [Quit: Leaving]