cmoneylulz has quit [Remote host closed the connection]
<Ox0dea>
The :: "operator" pretty much behaved like PHP's . operator back then.
usershell has joined #ruby
<Ox0dea>
Concatenate all the things, irrespective of "type".
machty has joined #ruby
<zenspider>
the thing that killed me about ruby 1.6, and this was also true for earlier 1.8s... is that they could be untarred and built in 30 seconds flat (on much older hardware, obvs)
patrickanth0ny has quit [Remote host closed the connection]
malcolmva has quit [Quit: Leaving]
j4cknewt has joined #ruby
malcolmva has joined #ruby
zendrix has quit [Ping timeout: 240 seconds]
<bricker>
What's the most efficient way to filter a list of object based on an array of values? For example: ids = [1,3,5]; s=[OpenStruct.new(id: 1), OpenStruct.new(id: 2), OpenStruct.new(id: 3), OpenStruct.new(id: 4), OpenStruct.new(id: 5)]
htmldrum has quit [Ping timeout: 240 seconds]
<bricker>
I could iterate the s array for each element in the "ids" array but that's not very efficient
Musashi007 has quit [Quit: Musashi007]
synthroid has quit []
<bricker>
I could iterate s and check `ids.include?()` every time, could be OK I guess
<zenspider>
s.find_all { |o| ids.include? o.id }
<shevy>
zenspider whoa... I think installing the rdoc stuff of ruby 2.2.2 alone takes me about a full minute at least
<zenspider>
or you could map them to a hash and use values_at I suppose
scripore has quit [Quit: This computer has gone to sleep]
dfockler has joined #ruby
usershell has quit [Ping timeout: 246 seconds]
scripore has joined #ruby
oo_ has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
oo_ has joined #ruby
xkickflip has joined #ruby
dfockler has quit [Ping timeout: 272 seconds]
jxpx777 has quit [Quit: Leaving...]
charliesome has quit [Quit: zzz]
jxpx777 has joined #ruby
Yzguy has quit [Quit: Cya]
bove has quit []
bove has joined #ruby
charliesome has joined #ruby
j4cknewt has quit [Remote host closed the connection]
drewo has joined #ruby
yfeldblum has quit [Quit: Leaving...]
benlakey has quit []
benlakey has joined #ruby
ebbflowgo has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
yfeldblum has joined #ruby
rbowlby has quit [Remote host closed the connection]
Ox0dea has quit [Quit: WeeChat 1.2]
hashrocket has quit []
hashrocket has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
towski__ has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdavid613 has joined #ruby
lancetw has quit []
lancetw has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
<mdavid613>
hey all, I'm using basic Test::Unit and Mocha for unit testing. I have a module utility method that both classes in the module use and I'm trying to stub it for testing purposes and not having any luck. Does anyone have any experience with this?
modern has joined #ruby
sepp2k has joined #ruby
jxpx777 has quit [Quit: Leaving...]
djbkd has quit [Quit: My people need me...]
jonee has quit [Ping timeout: 264 seconds]
<zenspider>
mdavid613: have you written the rest of your test and gotten it to fail (and possibly then to pass) already?
devbug has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
devbug has joined #ruby
theery has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
tkuchiki has joined #ruby
<mdavid613>
zenspider: sorry for the lag here…this is as a result of refactoring. There was essentially a duplicative function in the previous two classes that was pulled out into the module
serivich has joined #ruby
<zenspider>
does the test work without mocks?
theery has joined #ruby
<mdavid613>
no, because the refactored method is an http request handler so it goes out into httpclient and bombs
jxpx777 has joined #ruby
<mdavid613>
I could put in valid auth data and uris and start up a local server and it would work
<zenspider>
because it is using BS requests? or.. ah
<mdavid613>
but I would rather be able to mock the function return
<mdavid613>
the function itself is testable like the previous duplicated versions were
rhm50_ has joined #ruby
Agoldfish has quit [Quit: G'Bye]
<zenspider>
you're better off using something like vcr, doing real requests, and then having vcr record the responses
braincra- has joined #ruby
<mdavid613>
got it, but then it's not unit testing…then it's integration testing at that point
frem has quit [Quit: Connection closed for inactivity]
<mdavid613>
I would think you should be able to mock anything in a dynamic language like Ruby….also, I've been using ruby for maybe a month so I'm not sure
<mdavid613>
but I've been doing dev for a while
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang61 has quit [Quit: WeeChat 1.2]
mistym has joined #ruby
jxpx777 has quit [Client Quit]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
<zenspider>
doesn't really matter what you call it. if you're mocking heavily you wind up having problems because 1) refactorings break for no good reason and 2) you sometimes mock yourself into a corner that can't fail even if you remove the impl.
braincrash has quit [Ping timeout: 244 seconds]
phutchins has quit [Ping timeout: 244 seconds]
hahuang65 has joined #ruby
<zenspider>
doing something like vcr means that 1) you're able to later verify that you're still doing the right thing by toggling it off and 2) you're mocking less directly so refactorings don't break
<zenspider>
it's just a nice middleground.
<zenspider>
but yes, in ruby you can mock just about anything. there's nothing stopping you
<zenspider>
mock or stub... really.
<mdavid613>
ah ok
<zenspider>
"not having any luck" isn't informative. gist us something concrete
<mdavid613>
the question is how? I'm only mocking this one thing
<mdavid613>
I guess I need to find a good concrete example of stubbing
<mdavid613>
I was doing the .any_instance.expects(:symbol).with().returns()
<mdavid613>
and that doesn't work on a module method
<hololeap>
mdavid613: i know it isn't free, but codeschool has a very good course on rails testing that includes mocking and stubbing
<mdavid613>
the only thing I see is Module.mocha.expects(:symbol).with().returns(), but that doesn't seem to work
jpfuentes2 has joined #ruby
<mdavid613>
nice, I may check that out a little later tonight :)
<zenspider>
are you calling the module method directly? or is it via include?
<mdavid613>
in the class call? the module method is defined with self.<method> so I can call directly
jonee has joined #ruby
<mdavid613>
without having to include the module itself
<zenspider>
then you should be mocking it directly
eminencehc has quit [Remote host closed the connection]
<mdavid613>
and I should've tried it first
<zenspider>
there's an infinite number of thigs you didn't try
<zenspider>
:P
<mdavid613>
;)
<zenspider>
things. damnit.
prosodyContext has quit []
<mdavid613>
I also didn't try thigs, so you're correct :)
<mdavid613>
haha
yqt has quit [Ping timeout: 252 seconds]
<zenspider>
just make sure your test can fail
omegamike has joined #ruby
<mdavid613>
definitely, this is my first foray into Ruby as I'm writing an API client to send to people in Ruby
<mdavid613>
just finished the Go client earlier today…loads of fun as well
<mdavid613>
thanks very much sir! :-D
mistermocha has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
Vile` has quit [Ping timeout: 252 seconds]
omegamike has quit [Ping timeout: 246 seconds]
icebourg has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
Stratege_ has joined #ruby
iwaffles has quit [Quit: iwaffles]
sdwrage has quit [Quit: Leaving]
Vile` has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
Stratege has quit [Ping timeout: 264 seconds]
prosodyContext has joined #ruby
michaeldeol has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
mdavid613 has quit [Quit: Leaving.]
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
centrx has joined #ruby
Yiota has joined #ruby
tmtwd has joined #ruby
hahuang65 has joined #ruby
dudedudeman_ has joined #ruby
exadeci has quit []
avahey has joined #ruby
exadeci has joined #ruby
<dudedudeman_>
Good evening everyone
<dudedudeman_>
I'm wanting to use Dir.mkdir to make two folders, but not recursively. how might i go about doing that?
rhm50_ has quit [Quit: Leaving]
<dudedudeman_>
Dir.mkdir(directory_name) unless File.exists?(directory_name), where directory name is specified by a string
mistym has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
usershell has joined #ruby
Ox0dea has joined #ruby
<Ox0dea>
dudedudeman: Call Dir.mkdir twice...?
<zenspider>
mkdir_p doesn't need an existance check
<zenspider>
that's in fileutils
<dudedudeman_>
Ox0dea: i'll be honest, that's the first thing i thought of
<dudedudeman_>
but... is that the best way?
jxpx777 has joined #ruby
<Ox0dea>
Yes.
<dudedudeman_>
interesting. i'll do that.
<Ox0dea>
Array#each would be overkill for just the two.
<dudedudeman_>
i was just sitting here thinking of array#each lol..
drewo has joined #ruby
<dudedudeman_>
the program should make two folders when it runs. i'm just trying to find the best way to do that. which, sounds like just called mkdir twice is best
Lucky_ has joined #ruby
<Ox0dea>
You could use #each if you felt so inclined, and it'd be a good opportunity to learn about Method#to_proc. :)
<Ox0dea>
%w[foo bar baz].each(&Dir.method(:mkdir))
<dudedudeman_>
i would love ot learn about Method#to_proc
<Ox0dea>
`each(&Dir.method(:mkdir))` is a slightly more succinct (and, admittedly, cryptic) way to say `each { |foo| Dir.mkdir foo }`.
<Ox0dea>
Bonus points for not having to name something, though.
christiandsg has joined #ruby
<dudedudeman_>
you have lots of bonus points me thinks
theery has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 244 seconds]
<Ox0dea>
I've spent an arguably unhealthy amount of time with Ruby. :P
Cache_Money has quit [Quit: Cache_Money]
<dudedudeman_>
it shows!
<Ox0dea>
I'll take that as a compliment. ;)
<dudedudeman_>
It's definitely a compliment. so, the method#to_proc here. that is what i'm looking at when i look at each(&Dir.method(:mkdir))?
<Ox0dea>
Aye, &foo tries to convert foo to a Proc.
<zenspider>
dudedudeman_: "is that the best way" ? what is best?
alexclark has joined #ruby
<dudedudeman_>
zenspider: that's true.
<Ox0dea>
dudedudeman_: Symbol#to_proc is what allows you to say `map(&:to_i)`.
<alexclark>
If i want to reopen a subclass(i.e. a rails model) do I need to mention the inheritance as well
<dudedudeman_>
there are certainly about 3 million different ways to skin a cat here. i just know that some ways of skinning the cat are neater than others i guess?
<zenspider>
seems simple enough
<alexclark>
this is kinda what im seeing, but id like to confirm
<zenspider>
what's "neater" ? how do you measure that?
<zenspider>
alexclark: no, you don't
<dudedudeman_>
well, i would wager that neater translates to code that easier read by the person behind me, and also less bloated. all in an effort to remain DRY?
christiandsg has quit [Ping timeout: 265 seconds]
<zenspider>
>> class X; end; class Y < X; end; class Y; end
<zenspider>
DRY just means that there is one place to look for a concept.
<alexclark>
zenspider: ok thanks, maybe im seeing a uniquely rails problem then and im in the wrong channel
<hololeap>
i like to keep my code FLY
<zenspider>
alexclark: it was a ruby question. you're cool
<zenspider>
<<The DRY principle is stated as “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.”>>
<zenspider>
FLY is a whole other issue. :P
<zenspider>
and much harder to measure
<dudedudeman_>
#sofly
Tamal has joined #ruby
<alexclark>
zenspider: does the double inheritance definition have any risks?
baweaver has joined #ruby
<Ox0dea>
alexclark: Yes, you'll get a superclass mismatch if you change the parent.
<alexclark>
Ox0dea: ok thank you!
nateberkopec has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
bronson has quit [Remote host closed the connection]
<dudedudeman_>
Ox0dea: zenspider, thank you for the insights. as always
<dudedudeman_>
lots to learn
<Ox0dea>
Always.
<dudedudeman_>
now that that is working, now I have to figure out how to write 20 files a folder
<dudedudeman_>
lol
<dudedudeman_>
20.times do?
<Ox0dea>
Perhaps. What's the naming scheme?
cmoneylulz has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
axl_ has joined #ruby
<dudedudeman_>
umm, let's go with something not a number?
theery has joined #ruby
lkba has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
<Ox0dea>
But they can be any twenty names?
tjohnson has quit [Quit: Connection closed for inactivity]
<Ox0dea>
You just... need a directory to contain twenty files of no particular significance?
<dudedudeman_>
any names. even random names
<Ox0dea>
Might I inquire as to why? :P
<Coraline>
20.times do |i| ... "file_#{i}" ... end
<dudedudeman_>
the contents of the files is what matters, and i have that sussed out
<dudedudeman_>
(i'm writing random json data to each file_
WildBamboo-Josh has quit [Read error: Connection reset by peer]
devbug has joined #ruby
WildBamboo-Josh has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
jimbeaudoin has quit []
jimbeaudoin has joined #ruby
s00pcan has joined #ruby
ged_ has joined #ruby
ged has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
mdavid613 has joined #ruby
nym has quit [Quit: Connection closed for inactivity]
myztic has quit [Ping timeout: 240 seconds]
craysiii has joined #ruby
Heero has quit []
Heero has joined #ruby
bronson has quit [Remote host closed the connection]
oo__ has joined #ruby
alfajor has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
braincra- has quit [Quit: bye bye]
pico-pete has quit []
christiandsg has joined #ruby
sdothum has joined #ruby
hahuang65 has quit [Ping timeout: 244 seconds]
texasmade has joined #ruby
benlovell has joined #ruby
oo_ has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
braincrash has joined #ruby
tmtwd has joined #ruby
<nofxx>
Got some specs that are green locally and travis fails, all of then like Model.count eq 1 , fixnum, and I receive 1.0 float. Model is not Mongoid. float for db count is new heh
<nofxx>
Model is Mongoid*
Sembei has quit [Read error: No route to host]
MyMind has joined #ruby
benlovell has quit [Ping timeout: 246 seconds]
theery has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #ruby
myztic has joined #ruby
Pisuke has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
MyMind has quit [Read error: Connection reset by peer]
Pisuke has joined #ruby
RegulationD has joined #ruby
Fezzler has joined #ruby
yizr has joined #ruby
omegamike has joined #ruby
Fezzler has quit [Client Quit]
Pisuke has quit [Read error: Connection reset by peer]
Sembei has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sembei has quit [Read error: No route to host]
omegamike has quit [Ping timeout: 256 seconds]
MyMind has joined #ruby
Musashi007 has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
Musashi007 has joined #ruby
bronson has quit [Remote host closed the connection]
michaeldeol has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 265 seconds]
scripore has joined #ruby
Pisuke has joined #ruby
htmldrum has joined #ruby
michaeldeol has quit [Client Quit]
s00pcan has quit [Quit: Lost terminal]
gix has joined #ruby
hahuang65 has joined #ruby
bruno- has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
Sembei has joined #ruby
oo__ has quit [Remote host closed the connection]
nahtnam has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
<dudedudeman_>
what direction should i be looking if i want to take a json file, and then copy it to a new directory, while renaming it and chaging part of it's contents
Sembei has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
<pipework>
rite
<dudedudeman_>
i guess to update a json value, it would take converting to a hash, updating, and then converting back to json?
Pisuke has quit [Read error: No route to host]
tmtwd has quit [Remote host closed the connection]
Pisuke has joined #ruby
ascarter has joined #ruby
whilhelm has joined #ruby
<whilhelm>
why is python so much better then ruby
<pipework>
whilhelm: Drugs, probably.
<whilhelm>
also why is rails so good
saadq has quit [Remote host closed the connection]
<pipework>
whilhelm: Drugs, probably.
<whilhelm>
im looking for a real answer
theery has joined #ruby
<pipework>
whilhelm: Look to drugs, probably
<whilhelm>
why is ruby shit
Pisuke has quit [Read error: No route to host]
prefixed has joined #ruby
<whilhelm>
prefixed: why is rails good
<whilhelm>
*whilhelm keks*
freerobby has joined #ruby
<lannonbr>
explain why you think ruby is bad?
<dudedudeman_>
wat
christiandsg has quit [Remote host closed the connection]
Sembei has joined #ruby
<whilhelm>
i think ruby is fine... i was trying to start a storm
<whilhelm>
BUT IT FAILED
hahuang65 has quit [Ping timeout: 244 seconds]
<whilhelm>
few months ago a guy went on #python and asked why ruby is better, everyone went ape shit
Musashi007 has quit [Ping timeout: 240 seconds]
rejd_ has joined #ruby
<pipework>
I don't get the joke.
<whilhelm>
pipework: what? >joke
tkuchiki has quit [Remote host closed the connection]
<dudedudeman_>
meh
<whilhelm>
i was expecting to get everyone triggered like on #python but nooooooooooooooo
whilhelm has left #ruby [#ruby]
exadeci has quit [Quit: Connection closed for inactivity]
Sembei has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
<Ox0dea>
dudedudeman_: If you didn't want to account for the fragility of modifying a string of JSON with regular expressions, then yes.
Sembei has joined #ruby
<dudedudeman_>
whilhelm: many of us are alseep
latemus has joined #ruby
<latemus>
Hey everyone
<Ox0dea>
latemus: Hello.
<latemus>
\0
<dudedudeman_>
sup latemus
<latemus>
nm
<latemus>
been a while!
<dudedudeman_>
wanna parse my json for me?
<latemus>
lol
<Ox0dea>
dudedudeman_: There's a method for that.
alfajor has joined #ruby
rbowlby has quit [Remote host closed the connection]
<dudedudeman_>
Ox0dea: when i attempt to turn my json in to a hash, so i can change it's value, i get this: JSON::ParserError: 757: unexpected token at
<Ox0dea>
Then you've got yourself some invalid JSON, my friend.
<dudedudeman_>
boooooo
<dudedudeman_>
what have i dont :(
Sembei has quit [Read error: No route to host]
<Ox0dea>
dudedudeman_: Are you using JSON.parse?
* latemus
afk bbl
finisherr has joined #ruby
Feyn has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<philn_>
2 get '/campaigns/:campaign_id', to: 'pages#campaigns', as: 'campaign_id'
<dudedudeman_>
maybe it would help if i fully stated exactly what i am trying to do
<Ox0dea>
dudedudeman_: Sure, but foreach will also give you '.' and '..', which you'd have to explicitly ignore.
<philn_>
how can i access campaign_id in view
<Ox0dea>
dudedudeman_: So, glob is just fine, and it's doing exactly what you want it to; it's just waiting for you to utilize the fruits of its labor. :)
hahuang65 has quit [Ping timeout: 244 seconds]
<dudedudeman_>
i have files in a folder. each of them have the same keys, but different values. i want to update incrementally one of the key values in my json hash in each file
<philn_>
nm i figured it out
<dudedudeman_>
philn_: i'm jealous :P
michael_mbp has joined #ruby
Pisuke has quit [Read error: No route to host]
ChasedSpade has quit [Quit: No reason specified.]
usershell has quit [Ping timeout: 255 seconds]
Sembei has joined #ruby
_vision has joined #ruby
<Ox0dea>
dudedudeman_: Print the value of `item` in your #each loop.
<philn_>
dudedueman_: done be jealous, you'll figure it out
crusty_the_fig has joined #ruby
<dudedudeman_>
hmm
sepp2k has quit [Read error: Connection reset by peer]
jxpx777 has quit [Quit: Leaving...]
<crusty_the_fig>
I need *the* best book for learning Ruby. I'm a beginner.
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
crusty_the_fig: Are you a cookie?
<dudedudeman_>
well, depends on whether or not crusty_the_fig wants to learn rails or ruby
<crusty_the_fig>
What?
<crusty_the_fig>
No, I'm a fig.
iateadonut has joined #ruby
veduardo has quit [Quit: WeeChat 0.4.2]
<Ox0dea>
crusty_the_fig: You want the cookie-cutter answer to a question which doesn't have one.
<texasmade>
Or jump ahead a few courses in the odin project
MyMind has joined #ruby
<texasmade>
the internet is your best resource
<crusty_the_fig>
I just want to learn Ruby, dude.
<crusty_the_fig>
I need the best book for doing so.
alfajor has joined #ruby
<Ox0dea>
crusty_the_fig: Then you're a cookie.
<crusty_the_fig>
I'm a beginner who's interested in programming.
<Ox0dea>
crusty_the_fig: What is a subject you know a lot about?
<crusty_the_fig>
I guess I am. Can you recommend any books?
<dudedudeman_>
crusty_the_fig: so far, what resources have you used?
<crusty_the_fig>
I know the basics of C.
tjbiddle has joined #ruby
<Ox0dea>
crusty_the_fig: Eloquent Ruby, The Well-Grounded Rubyist, and Practical Object-Oriented Design in Ruby are all very good.
<Ox0dea>
crusty_the_fig: But again, what is *the* best book on some subject of your choosing?
<crusty_the_fig>
I know!
<crusty_the_fig>
I'll look up the highest ranked books on Amazon in regards to Ruby!
<crusty_the_fig>
Yeah!
<Ox0dea>
/ignore add crusty_the_fig
<Ox0dea>
Oops.
<pipework>
Metaprogramming ruby is a great book to learn a lot about ruby from.
<nofxx>
Is there a beautiful way for: str && !str.empty? in other words, make "" == nil
theery has quit [Remote host closed the connection]
<Ox0dea>
nofxx: Rails has #blank? for that.
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
<pipework>
nofxx: something if string.present?
Jaood has joined #ruby
CaryInVictoria has quit []
MyMind has quit [Read error: No route to host]
hahuang65 has joined #ruby
Pisuke has joined #ruby
<nofxx>
Ox0dea, jez, how naiverr dumb I. #blank? is defined in nil. That is nice.
<nofxx>
pipework, what's the diff? present x blank?
<crusty_the_fig>
Fuck you fags. I'll just learn C.
<crusty_the_fig>
C is for real men anyway. ;)
tubulife- has joined #ruby
<pipework>
nofxx: professional level documentation
CloCkWeRX has quit [Ping timeout: 240 seconds]
wprice has quit [Quit: wprice]
Pisuke has quit [Read error: No route to host]
Mekkis has joined #ruby
crusty_the_fig has left #ruby [#ruby]
Trynemjoel has quit [Ping timeout: 256 seconds]
Pisuke has joined #ruby
theery has joined #ruby
<nofxx>
pipework, ahh.. as in the antonym. sorry and thanks
<dudedudeman_>
Ox0dea: honest question, how close am i to getting this? i fear that i'm fading mentally for desire of sleep, but i want to make sure i latch on to this
<pipework>
nofxx: No worries, bruv. :D
<pipework>
Very often the source is the best place to look. Professional level documentation, that.
Trynemjoel has joined #ruby
tubulife- has quit [Ping timeout: 244 seconds]
<nofxx>
pipework, hehe, a good explanation would be: present? == !blank?
<Ox0dea>
dudedudeman_: You want `File.read(item)`, but please take some time to understand why.
Pisuke has quit [Read error: No route to host]
crdpink has joined #ruby
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Ping timeout: 255 seconds]
<Ox0dea>
nofxx: That is, in fact, exactly how #present? is defined. :)
Pisuke has joined #ruby
<pipework>
nofxx: I'd just say to look at the source.
<dudedudeman_>
wow. it's because yo uwant each 'item' in the list that i defined
<dudedudeman_>
i'm using list here loosely
<Ox0dea>
dudedudeman_: `item` is an arbitrary name.
<Ox0dea>
Enumerable#each just yields each element in the collection to the provided block.
<dudedudeman_>
so in that last gist, i guess i'm not returning the hash back to a json bit, like you mentioned/
workmad3 has joined #ruby
<Ox0dea>
alfajor: Try an `rbenv rehash`, and if that doesn't fix it, use `rbenv global foo` to set the default Ruby, where `foo` is a version you have installed.
<Ox0dea>
dudedudeman_: Right, modifying the Hash doesn't (and, of course, shouldn't) change anything on your filesystem.
dumdedum has joined #ruby
Jaood has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
mistermocha has joined #ruby
<dudedudeman_>
i mean, are we looking at something as simple as hash.to_json here????
<Ox0dea>
Yes! ^_^
<alfajor>
worked perfectly with 'rbenv global foo', thanks again Ox0dea
<Ox0dea>
alfajor: Sure thing.
<alfajor>
you are true hero <3
<Ox0dea>
dudedudeman_: Still, that'll only give you a String, you'll still need to put it somewhere more permanent than RAM.
<dudedudeman_>
ah, sweet! Except, when i do that, i get my lovely json error :(
arup_r has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
MyMind has quit [Read error: No route to host]
<dudedudeman_>
would i do a file.open and then put that new hash in there?
<Ox0dea>
File.write is a thing.
benlovell has joined #ruby
Pisuke has joined #ruby
hahuang65 has joined #ruby
sleungcy has quit [Quit: Connection closed for inactivity]
dudedudeman_ has quit [Quit: Page closed]
workmad3 has quit [Ping timeout: 250 seconds]
dudedudeman_ has joined #ruby
ReK2 has joined #ruby
<dudedudeman_>
mm. i got disconnected there for a second
<Ox0dea>
You did.
<dudedudeman_>
did i get kicked??
<Ox0dea>
No?
<dudedudeman_>
#banned
<dudedudeman_>
lol
<dudedudeman_>
so if you said anything awesome, i might have missed it :(
<Ox0dea>
I told you about File.write.
<Ox0dea>
It's pretty awesome?
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arooni-mobile has quit [Ping timeout: 246 seconds]
rbowlby_ has joined #ruby
<dudedudeman_>
i'm so freaking determined at this poitn. if i can see how to make this work, i'll have every step of my goals complete. and then i can start regactoring
chinmay_dd has joined #ruby
* dudedudeman_
bangs head on wall, slams a redbull, and flys up in the clouds of code glory
Pisuke has quit [Read error: No route to host]
Trynemjoel has quit [Ping timeout: 240 seconds]
Pisuke has joined #ruby
pepperbreath has left #ruby [#ruby]
Trynemjoel has joined #ruby
tkuchiki has joined #ruby
rbowlby has quit [Ping timeout: 246 seconds]
fullofcaffeine has joined #ruby
pepperbreath has joined #ruby
eggoez has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
icebourg has quit []
Pisuke has quit [Read error: No route to host]
Sembei has joined #ruby
eggoez has joined #ruby
rbowlby_ has quit [Ping timeout: 265 seconds]
rbowlby has joined #ruby
hahuang65 has joined #ruby
<dudedudeman_>
i guess the json hash would need to be an ingeger before add 1 to it..
Sembei has quit [Read error: No route to host]
christiandsg has joined #ruby
RobertBirnie has joined #ruby
dhjondoh has joined #ruby
prefixed has quit [Changing host]
prefixed has joined #ruby
Sembei has joined #ruby
Mendenhall has joined #ruby
SuMo_D has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
christiandsg has quit [Ping timeout: 265 seconds]
MyMind has joined #ruby
eminencehc has quit [Remote host closed the connection]
wildroman2 has joined #ruby
MyMind has quit [Read error: No route to host]
jonee has quit [Ping timeout: 252 seconds]
MyMind has joined #ruby
wildroman2 has quit [Client Quit]
arescorpio has quit [Quit: Leaving.]
aganov has joined #ruby
dudedudeman__ has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
Pisuke has joined #ruby
dudedudeman_ has quit [Ping timeout: 246 seconds]
prefixed has quit [Ping timeout: 265 seconds]
hagabaka has joined #ruby
senayar has joined #ruby
GriffinHeart has joined #ruby
Mendenhall has quit [Ping timeout: 272 seconds]
Sembei has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
Asher has quit [Quit: Leaving.]
usershell has joined #ruby
Lord-Kamina has left #ruby ["Leaving"]
RegulationD has joined #ruby
Asher has joined #ruby
dudedudeman__ has quit [Quit: Page closed]
Sembei has quit [Read error: Connection reset by peer]
<zenspider>
dudedudeman: this is wrong: hash.to_json; file.write("Modified/*.json")
average has quit [Quit: leaving]
MyMind has joined #ruby
<zenspider>
hash.to_json returns a new object. objects don't/can't magically morph into other objects
sharpmachine has quit [Remote host closed the connection]
<zenspider>
you also don't have a local var called file
<agent_white>
baweaver: Universal greeting time or whatever. Basically, you always say "morning" when you hop on IRC.
MyMind has quit [Read error: Connection reset by peer]
<latemus>
batton the hatch!
latemus has quit [Quit: leaving]
allomov has joined #ruby
Pisuke has joined #ruby
<Ox0dea>
*batten
<agent_white>
If I had a dollar for every time someone tried to correct me and posted that link... I'd have a nice pair of shoes.
tagrudev has joined #ruby
<baweaver>
too late, they DC'd
<Ox0dea>
It was for everybody.
<pipework>
agent_white: I'd have a sack of quarters and your shoes. :D
<agent_white>
pipework: Hahah. We can split the lease on the car!
Channel6 has quit [Quit: Leaving]
* agent_white
kicks UGT into the mud
safeforge has joined #ruby
<pipework>
agent_white: We're not sleeping together, agent_white. That's a bit too much commitment for me.
fullofcaffeine has quit [Remote host closed the connection]
<agent_white>
pipework: Just call me in the morning!
<pipework>
agent_white: Alright, "in the morning", I'm dad.
chinmay_dd has quit [Quit: See ya!]
<agent_white>
And I'm last night's regret!
<pipework>
But you can call me "Dad".
Pisuke has quit [Read error: Connection reset by peer]
<Ox0dea>
agent_white: Please defend the superiority of your time zone.
Sembei has joined #ruby
<pipework>
Ox0dea: Oregon is a fucking great state. The defense rests.
<baweaver>
Oh hey
<agent_white>
Ox0dea: Meh.
<baweaver>
I'm flying over it tomorrow
theery has quit [Remote host closed the connection]
* baweaver
thinks that'll be the longest he's spent around Oregon
<baweaver>
</troll>
astrobun_ has joined #ruby
rubie has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
<agent_white>
pipework: Took me a few to actually realize what you said... I probably need sleep. I did chuckle though :)
Sembei has quit [Read error: No route to host]
freeUmo has quit [Ping timeout: 272 seconds]
krz has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
Sembei has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SOLDIERz has joined #ruby
mary5030 has joined #ruby
howdoi_ has joined #ruby
GriffinHeart has quit [Read error: Connection reset by peer]
Sembei has quit [Read error: No route to host]
MyMind has joined #ruby
oo_ has quit [Remote host closed the connection]
marr has joined #ruby
oo_ has joined #ruby
hahuang65 has joined #ruby
mistermocha has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
<flughafen>
morning
Pisuke has joined #ruby
riffraff has joined #ruby
finisherr has quit [Quit: finisherr]
Lloyd has quit []
tjohnson has joined #ruby
Lloyd has joined #ruby
myztic has quit [Quit: Leaving]
rbowlby has quit [Remote host closed the connection]
auzty has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
senayar has quit []
Trynemjoel has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 255 seconds]
codecop has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
mistermocha has quit [Ping timeout: 244 seconds]
Pisuke has joined #ruby
acke has joined #ruby
latemus has joined #ruby
AlphaAtom has joined #ruby
dented42 has joined #ruby
Trynemjoel has joined #ruby
<latemus>
So, the irb, you guys. I have seen programs that seem to use it interactively in a controlled way; perhaps with a DSL? I'm thinking of msfconsole. Am I wrong?
riffraff has quit [Quit: This computer has gone to sleep]
usershell has quit [Ping timeout: 240 seconds]
Pisuke has quit [Read error: No route to host]
AlphaAtom has quit [Client Quit]
Sembei has joined #ruby
GriffinHeart has joined #ruby
<latemus>
Maybe they just used puts statements and decided to emulate the aesthetics of the irb? I asking if there is a way to, i guess embed the irb into a program
<latemus>
and limit it to a set of commands, isn't that a DSL
peter_paule has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
<Antiarc>
You can invoke irb from a console but it's hard to limit it to just a subset of commands
<slash_nick>
Antiarc: how would you limit it... undef_method?
<Antiarc>
Notably it binds to `binding` which will be the current execution scope
<latemus>
Antiarc: i see what you mean there. HAve you seen how msf console behaves?
<Antiarc>
latemus: I haven't
GriffinHeart has quit [Remote host closed the connection]
<Ox0dea>
latemus: msfconsole isn't an irb wrapper.
<Antiarc>
slash_nick: Well, you can't, because you can get to Kernel or Module and from there everything
MyMind has joined #ruby
<Antiarc>
You could write an irb-alike which only accepts commands that are present on a given module or something
<latemus>
0xdea: okok. bet you can see why i wondered?
<Ox0dea>
latemus: Sure, but it's just, well, a console.
<latemus>
Antiarc: Thanks for answering :)
<zenspider>
you can't undef_method your way to safety because you're undeffing the methods that irb and your program are using
hahuang65 has joined #ruby
xkickflip_ has joined #ruby
xkickflip has quit [Ping timeout: 246 seconds]
xkickflip_ is now known as xkickflip
<latemus>
Ox0dea: ha. Yeah, i geos it's a lot like any other. cisco ios also comes to mind, how it's like staged or contextual
<Antiarc>
I wonder how hard it'd be to embed lua in ruby
<latemus>
in it's navigation
setzke has joined #ruby
rejd_ has quit [Quit: Leaving]
eGGsha has joined #ruby
Trynemjoel has quit [Ping timeout: 240 seconds]
<zenspider>
sounds like you want your own parser and interpreter for a very limited language, if that.
MyMind has quit [Read error: Connection reset by peer]
codeitagile has quit []
Pisuke has joined #ruby
<latemus>
Antiarc: funny you montion lua. I'm tring to replace lua with mruby as an embedded scripting language
<Ox0dea>
latemus: Sure, something like that. irb is a REPL, whereas things like msfconsole are more appropriately referred to as CLIs, or even just shells.
<latemus>
in nmap
<Antiarc>
latemus: I don't know about mruby specifically, but one of the really nice things about lua is that you can create completely isolated execution contexts *and* within a given context you can setfenv to create an isolated sub-env
<agent_white>
This is why Ruby needs a defacto sandbox.
<latemus>
Antiarc: Wow. OKay fine, I guess Fyodor had good ceason :)
<Antiarc>
Lua is awesome, it's best-in-class for embedded scripting IMO
hahuang65 has quit [Ping timeout: 246 seconds]
sinkensabe has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<latemus>
s/ceason/reason
<latemus>
/
Pisuke has quit [Read error: No route to host]
baweaver has quit []
jenrzzz has joined #ruby
devbug has quit [Remote host closed the connection]
Sembei has joined #ruby
hahuang65 has joined #ruby
<latemus>
I'm just getting tired of learning more and more and more languages for specific applications... and being enamored of ruby has motivated my to write tools to ruplace the ones usng diverse languages
rodfersou has joined #ruby
<latemus>
before my head explodes and everything turns into.. perl
<agent_white>
Antiarc: Your link, with a combo of using jruby is best bet for a sandbox. It's been awhile since I poked at it, but _why's Freaky Freaky Sandbox was interesting. Also, good idea to checkout this post about the sandbox for Anarchy Code Golf http://shinhoge.blogspot.jp/2014/10/sandbox-of-my-golf-server.html
<Antiarc>
(Disclaimer: I am a huge Lua fanboy - for what it does, I think it's just about unbeatable)
GriffinHeart has joined #ruby
schaerli has joined #ruby
tubulife- has joined #ruby
<Antiarc>
The only really hard concepts in Lua are metatables and the dual nature of tables as lists/dicts but once you know those you know the whole language :)
<Antiarc>
It's kind of bizarre but it makes sense once you get your head around it
<Antiarc>
It's kind of like PHP's "array" type except sane
<latemus>
Antiarc: thats exactly what i was about to ask!
<latemus>
lol
hoey_ has quit []
<ljarvis>
?ot
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
tubulife- has quit [Ping timeout: 265 seconds]
hoey_ has joined #ruby
<latemus>
sorry ljarvis
<latemus>
ljarvis: you're not wrong
MyMind has quit [Read error: No route to host]
<ljarvis>
happy to talk lua in there, I love lua
<latemus>
hehe
jhk has joined #ruby
Pisuke has joined #ruby
tkuchiki has joined #ruby
<latemus>
Do you all use rbenv? Or is that mostly put to use in the rails side of things
<ljarvis>
chruby > *
<Antiarc>
I use rvm because I'm a filthy heretic
<ljarvis>
hah
<Antiarc>
and because it's what I've used since forever
<zenspider>
rbenv here
<latemus>
lolomg
* latemus
just learned of the existance ar chruby from ljarvis
<Antiarc>
gemsets are actually frequently useful for me
<Antiarc>
so it's as good a reason as any for me to stay on rvm
<latemus>
LMAO Antiarc heretic
setzke has quit [Quit: Ex-Chat]
<Ox0dea>
What is the rate of conversion between mickeys and shakes of a lamb's tail?
Pisuke has quit [Read error: No route to host]
* latemus
scans the channel for someone who can answer Ox0dea
<ljarvis>
Ox0dea: they measure different things so that seems unplausible
t_ has quit [Quit: Leaving]
Sembei has joined #ruby
leat2 has quit [Remote host closed the connection]
jhk has quit [Read error: Connection reset by peer]
leat2 has joined #ruby
<zenspider>
Antiarc: export GEM_HOME=some/path
<zenspider>
that's all you need for "gemsets"
<zenspider>
rvm isn't worth the pain
jhk has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
<ljarvis>
amen
stan has joined #ruby
<zenspider>
look at my gem ohmygems. all it does is set GEM_HOME/GEM_PATH
<Antiarc>
Heh, I just haven't had any pain with rvm, I guess
<zenspider>
then you aren't using it or you aren't paying attention
<latemus>
i forsook rvm for rbenv cause i hadnt used rvm in ages whent i fell away from ruby inte darkness for a few years
<Ox0dea>
ljarvis: There are apparently 1.7e53 teaspoons in a cubic light year, so I refute the implausibility of my conversion.
<Antiarc>
I'm definitely using it, but perhaps I'm not paying attention. What kinds of pain does it cause?
t_ has joined #ruby
<latemus>
so i had to re-learn it or learn rbenv, and the rails site commanded me te use rbenv
<ljarvis>
the mere fact that latemus says "re-learn" is a good enough reason to avoid rvm
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<latemus>
lol.
<ljarvis>
I remember having a lot of trouble with it, but it's been a couple of years now since I last used it
<ljarvis>
the original rvm was great
sharpmachine has joined #ruby
jhk has left #ruby [#ruby]
Sembei has quit [Read error: No route to host]
oo_ has quit [Remote host closed the connection]
MyMind has joined #ruby
<latemus>
everyone at a former place of employment avoided ruby so hard, solely because ef the complexities of rvm. i was the only weirdo who stuck up for ruby and refused to embrace perl and python
<latemus>
funny thing is, it was a japanese company, lol
duoi has quit [Remote host closed the connection]
* latemus
curses their ignorant feam
* latemus
(s/feam/fear beams/)
duoi has joined #ruby
MyMind has quit [Read error: No route to host]
<latemus>
but te be fair, i was like a decade younger than the next older guy. can't really blame someone for loving their tools
sharpmachine has quit [Ping timeout: 252 seconds]
Pisuke has joined #ruby
allomov has quit [Remote host closed the connection]
<latemus>
?ot
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
_ht has joined #ruby
<latemus>
just regulating myself.
workmad3 has joined #ruby
Trynemjoel has quit [Ping timeout: 256 seconds]
<zenspider>
I should point out that shikashi uses ruby_parser + sexp_processor + ruby2ruby ... so my point about wanting to write a limited interpreter stands
leat2 has quit [Remote host closed the connection]
<zenspider>
it'd be interesting to see what you can get away with
leat2 has joined #ruby
Trynemjoel has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Sembei has joined #ruby
<latemus>
zenspider: I'ma take a look into that.
<latemus>
thanks!
Pisuke has quit [Read error: Connection reset by peer]
SuMo_D has quit [Remote host closed the connection]
joaomdmoura has quit []
joaomdmoura has joined #ruby
robbyoconnor has joined #ruby
SuMo_D has joined #ruby
t_ has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 240 seconds]
<awk>
Hi, please can someone take a look at https://gist.github.com/anonymous/7ab55a033c659586641d ... I have been able to return the output of the databases on my system, I now need to try find a way to loop through (I can write the query) just not sure how I can take the output displayed and run the query against that, excluding 2 databases.
schaerli has quit [Remote host closed the connection]
SuMo_D has quit [Ping timeout: 240 seconds]
Trynemjoel has quit [Ping timeout: 240 seconds]
<ljarvis>
awk: what have you tried?
oo_ has joined #ruby
Trynemjoel has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
usershell has joined #ruby
Trynemjoel has quit [Ping timeout: 256 seconds]
Trynemjoel has joined #ruby
GeissT has quit [Quit: Bye!]
doctorly has joined #ruby
doctorly has left #ruby [#ruby]
podman has quit [Quit: Connection closed for inactivity]
<awk>
ljarvis: sorry i'm a ruby noob, so i'm struggling to workout the best method.. in bash I would define the connection "connect" and include mysql -u user -p password 'show databases' for example, then, for db in $connect do ... if [ $db != information_schema ] && .... then mysql query (DISTINCT 'table_.....
christiandsg has joined #ruby
riffraff has quit [Quit: Leaving]
<tagrudev>
certainty, ping
<ljarvis>
awk: ok, so in ruby you're looping through the database names. Do you now how to skip a loop?
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roolo_ has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
vondruch has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
jobewan has quit [Ping timeout: 255 seconds]
tno has joined #ruby
<awk>
ljarvis: I know things like 3.times in a while loop.. just not sure how to skip a return from an array
Mendenhall has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
allomov has joined #ruby
<ljarvis>
awk: right, what I think you should do first is write the query to run for all databases
<awk>
ok
<ljarvis>
you should know how to do that because you're looping through the databases, and you've already written the query, yeah?
<zenspider>
Hi! I'm DB Bob! Sounds like you want to make a database dump!
<agent_white>
Bob, what happened to paperclip? :(
Trynemjoel has quit [Ping timeout: 240 seconds]
<awk>
ljarvis: correct
Trynemjoel has joined #ruby
lkba has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 260 seconds]
<awk>
k, let me try a bit harder
eGGsha has joined #ruby
Guest24 is now known as lele
texasmade has quit [Ping timeout: 246 seconds]
lkba has joined #ruby
usershel_ has joined #ruby
usershell has quit [Ping timeout: 250 seconds]
quimrstorres has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
coderkevin has quit [Quit: Connection closed for inactivity]
schaerli has joined #ruby
lxsameer has joined #ruby
fantazo has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Limezacore has quit []
mary5030 has quit [Ping timeout: 244 seconds]
elia has joined #ruby
neanderslob has quit [Remote host closed the connection]
Limezacore has joined #ruby
64MADFGMP has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
64MADFGMP has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
serivich has quit [Ping timeout: 240 seconds]
agent_white has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
agent_white has joined #ruby
alfajor has quit [Quit: Leaving]
amclain has quit [Quit: Leaving]
keen__________30 has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
blaines has quit [Ping timeout: 246 seconds]
linuxboytoo has joined #ruby
keen__________29 has quit [Ping timeout: 255 seconds]
DaniG2k has joined #ruby
Iskarlar has joined #ruby
rubie has joined #ruby
neanderslob has joined #ruby
TinkerTyper has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
linuxboytoo has quit [Ping timeout: 244 seconds]
peter_paule has joined #ruby
sharpmachine has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
usershel_ has quit [Remote host closed the connection]
usershell has joined #ruby
sepp2k has joined #ruby
usershell has quit [Remote host closed the connection]
niik00 has joined #ruby
peter_paule has quit [Ping timeout: 255 seconds]
sharpmachine has quit [Ping timeout: 246 seconds]
<niik00>
Hi guys, got a little question. I'm writing a little gem. The Gemfile is just needed if the dependencies gems have not already been installed ?
dubkoidragon has joined #ruby
anisha has joined #ruby
<Ox0dea>
niik00: Do you intend to publish your gem?
sevenseacat has joined #ruby
<agent_white>
I never include Gemfiles in my gems... we all know ladies love a man of mystery.
senayar has quit [Remote host closed the connection]
<niik00>
Ox0dea: maybe later yeah. If I well understood, the Gemfile is just needed in case another dev need to work on the gem so that he can easily grab the dependencies with the right versions ?
oo_ has quit [Remote host closed the connection]
Mendenhall has quit [Ping timeout: 252 seconds]
<agent_white>
Not just another dev. Anyone. It makes sure they have what is needed to run it. Period.
bluOxigen has quit [Read error: Connection reset by peer]
<adaedra>
mh
senayar has joined #ruby
<adaedra>
in a gem, dependencies are set by the .gemspec
<niik00>
If I just create the gemspec and add dependencies into it, when someone type gem install ..., the dependencies will be downloaded too ?
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<adaedra>
I think you keep the Gemfile and Gemfile.lock in your repository, but don't add it in the files array of the gemspec, so it's not bundled with the gem, as it will use metadata
bruno- has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
lxsameer has joined #ruby
<ljarvis>
niik00: no, not "anyone" is it as you said just the devs
<ljarvis>
gemfiles are for developers not consumers
<ljarvis>
as adaedra mentioned, dependencies should be set in your gemspec
<ljarvis>
and you should commit the Gemfile, but not the lockfile
<agent_white>
woops mah bad. I take back what I said.
<adaedra>
funny, I've been told otherwise here.
<agent_white>
:D
<ljarvis>
adaedra: which part?
<adaedra>
not commiting the lockfile
<ljarvis>
eh, it's a mixed opinion
<ljarvis>
but for a rubygem it shouldn't be there, otherwise it should (i.e for rails apps)
safeforge has quit [Remote host closed the connection]
safeforge has joined #ruby
livathinos has joined #ruby
yfeldblum has joined #ruby
mikecmpbll has joined #ruby
oo_ has joined #ruby
c0def00d has joined #ruby
yfeldblu_ has joined #ruby
ruurd has joined #ruby
senayar has quit [Remote host closed the connection]
ghormoon has quit [Ping timeout: 256 seconds]
schaerli has quit [Remote host closed the connection]
mister_solo has joined #ruby
ScriptGeek has joined #ruby
ghormoon has joined #ruby
mistermocha has joined #ruby
<niik00>
ok thanks guys
david__ has joined #ruby
polyrob has quit [Ping timeout: 264 seconds]
schaerli has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
david__ has quit [Client Quit]
watnall56 has joined #ruby
<awk>
If someone could please look at https://gist.github.com/anonymous/fb6dbc30662008a4525d ... When I run the command from the mysql client it returns the values correctly, when I run that same query and use puts it changes the output. Please could somebody tell me what silly mistake i'm making to return that result?
<mlangenberg>
apeiros: Would creating this @included_by create any issues in a multi threaded env?
<mlangenberg>
yorickpeterse: would like to avoid that :P
<apeiros>
ljarvis: does it change the answer?
hahuang65 has joined #ruby
bascht has joined #ruby
schaerli has joined #ruby
<apeiros>
mlangenberg: *ALL* shared state does
<apeiros>
use a mutex
<ljarvis>
apeiros: the answer is obviously right, but their example uses included already so i would have probably suggested something more tailored
<apeiros>
(and * + caps because if you ask this, then this point needs serious hammering)
Kilo`byte has quit [Ping timeout: 256 seconds]
<apeiros>
well, mlangenberg can use register_class, since that's already present
<ljarvis>
right :)
<apeiros>
but I think it's not too much asked that people still use their brain after getting an answer.
<mlangenberg>
apeiros: Am I right that this only causes threading issues when different threads define new classes simultaneously? As normally classes are loaded and registred once?
<apeiros>
mlangenberg: shared state is an issue when multiple threads write to it
tjohnson has quit [Quit: Connection closed for inactivity]
oo_ has joined #ruby
<mlangenberg>
apeiros: In that case, would it be recomended to put a Mutex around writes to @included_by ?
<apeiros>
yes
<apeiros>
or @fruits in your case
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
also drop that silly ||= there. initialize it in your module body.
<mlangenberg>
heh :)
cajone has joined #ruby
<apeiros>
and given that you have *zero* instance methods, don't use include.
<apeiros>
then you can also drop that stupidly magical self.included/extend trickery.
<ljarvis>
^ so much that
lsmola has quit [Ping timeout: 244 seconds]
<ljarvis>
srsly, extend is good
hahuang65 has quit [Ping timeout: 260 seconds]
cajone has left #ruby [#ruby]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
ok, with "a" mode. yes, that'll use seek, which should be immediate.
<ljarvis>
also, require 'csv'
<apeiros>
and ^, yes. don't generate csv yourself. you *will* do it wrong.
<apeiros>
as simple as the format seems to be.
* ljarvis
has done it wrong
* apeiros
claims he hasn't
<apeiros>
but then again, I'm the kind of guy who goes and reads rfc's :D
<apeiros>
(which of course doesn't mean I understood & implemented what I read correctly, hence "claim")
peter_paule has quit [Quit: WeeChat 1.2]
Trynemjoel has joined #ruby
<SebastianThorn>
i know i should use csv, i use it for reading the in-data, gonna look into writing with it
bnizzle has joined #ruby
ixti has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
RegulationD has joined #ruby
nikhgupta has joined #ruby
arturmartins has quit [Quit: Leaving...]
Pupp3tm4st3r has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
Timba-as has joined #ruby
blackmesa has joined #ruby
Guest75720 has quit [Ping timeout: 244 seconds]
nikhgupt has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
sharpmachine has joined #ruby
bf4 has joined #ruby
bf4 is now known as Guest14379
<yorickpeterse>
yay I get to write an API migration guide
<yorickpeterse>
which means finding out what exactly we all changed in the past 2-3 months
nikhgupta has quit [Ping timeout: 240 seconds]
<yorickpeterse>
and writing down what customers need to do to migrate
Skelz0r has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
tkuchiki has joined #ruby
sharpmachine has quit [Ping timeout: 240 seconds]
schaerli has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
lessless has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
arturmartins has joined #ruby
solars has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
schaerli has joined #ruby
bubbys has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
Trynemjoel has quit [Ping timeout: 240 seconds]
Skelz0r has joined #ruby
Trynemjoel has joined #ruby
solars has joined #ruby
djbkd has quit [Remote host closed the connection]
livathinos has joined #ruby
eGGsha has joined #ruby
xkickflip has quit [Ping timeout: 246 seconds]
xkickflip_ has joined #ruby
Guest14379 has quit [Ping timeout: 246 seconds]
waxjar has quit [Ping timeout: 244 seconds]
sivoais has quit [Ping timeout: 244 seconds]
bigkevmcd has quit [Quit: Outta here...]
sivoais has joined #ruby
waxjar has joined #ruby
bf4_ has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
dtcristo has joined #ruby
schaerli has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
neanderslob has quit [Remote host closed the connection]
bubbys has joined #ruby
<shevy>
sounds exciting
tubulife- has joined #ruby
xkickflip has joined #ruby
xkickflip_ has quit [Ping timeout: 246 seconds]
sivoais has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
dubkoidragon has quit [Ping timeout: 252 seconds]
<darix>
yorickpeterse: i am sure your coworker properly documented everything and it will be only aggregating the documentation and maybe fixing a typo or 2
<sevenseacat>
lol
Limezacore has quit [Quit: Connection closed for inactivity]
sivoais has joined #ruby
tubulife- has quit [Ping timeout: 260 seconds]
<yorickpeterse>
darix: I wrote like 80% of all changes
<yorickpeterse>
if not more
<yorickpeterse>
and actually documented the shit out of everything, just didn't keep a changelog over time
Trynemjoel has quit [Ping timeout: 256 seconds]
GriffinHeart has quit [Remote host closed the connection]
jpinnix______ has quit []
jpinnix______ has joined #ruby
Trynemjoel has joined #ruby
c0def00d has quit [Quit: c0def00d]
arturmartins has quit [Quit: Leaving...]
OrbitalKitten has joined #ruby
auzty has quit [Quit: Leaving]
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mister_s_ has joined #ruby
mistermocha has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
mister_solo has quit [Ping timeout: 256 seconds]
OrbitalKitten has quit [Client Quit]
schaerli has joined #ruby
Juanchito has joined #ruby
Mendenhall has quit [Ping timeout: 265 seconds]
mistermocha has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
AlxAltea has joined #ruby
mlangenberg has quit [Quit: mlangenberg]
ndrei has quit [Ping timeout: 252 seconds]
glowcoil has quit []
glowcoil has joined #ruby
fantazo has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
knowtheory has quit []
knowtheory has joined #ruby
alienaut has joined #ruby
t_ has joined #ruby
troulouliou_div2 has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
<platzhirsch>
How can I check if a string contains unicode symbols with three or more bytes?
schaerli has quit [Remote host closed the connection]
nikhgupt` has joined #ruby
nikhgupt has quit [Ping timeout: 240 seconds]
vdamewood has joined #ruby
cbetta has quit []
cbetta has joined #ruby
schaerli has joined #ruby
stamina has joined #ruby
oo_ has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
sevenseacat has quit [Quit: Me dun like you no more.]
apfeluser has quit [Ping timeout: 256 seconds]
oo_ has joined #ruby
nikhgupt` has quit [Ping timeout: 246 seconds]
symm- has joined #ruby
dhjondoh has quit [Remote host closed the connection]
arup_r has joined #ruby
<darix>
platzhirsch: "somestring".each_codepoint
<darix>
maybe?
cibs has quit [Quit: leaving]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
dhjondoh has joined #ruby
lkba has joined #ruby
<platzhirsch>
darix: yeah :) I'll have a look
<apeiros>
.chars.any? { |c| c.bytesize >= 3 }
<apeiros>
probably slow
<apeiros>
you could do it with a regex. I don't know how that one had to look, though :)
<awk>
When sending a html e-mail, I am getting _everything_ sent on 1 line.. I want each element to print on a new line ?
c355E3B has joined #ruby
anandu has quit [Quit: Leaving]
mjc_ has joined #ruby
<apeiros>
awk: don't send everything on 1 line then
Marsupermammal has joined #ruby
DEA7TH has joined #ruby
blackmesa has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
<ljarvis>
problem solving 101
<ljarvis>
it's broken; don't do it
bruno- has joined #ruby
<apeiros>
naaa, it's broken? just fix it.
shlomo has joined #ruby
livathinos has quit [Ping timeout: 260 seconds]
<apeiros>
awk: in case you didn't get the hint: your question is *waaaaaaaaaaaay* too vague. impossible to tell what you do, what you get and what you expect.
safeforge has joined #ruby
<ljarvis>
right yes my solution wasn't very agile
senayar has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
holsee_ has quit []
holsee_ has joined #ruby
<awk>
apeiros: sorry, https://gist.github.com/anonymous/b2ce214444b05b235545 ... line 30 (outputs) all databases and sizes.. line 31 I setup a variable to mail out and send it out on line 34.. in my mail i'm getting it like this Database name: accounting - Size in (MB): 3.66 [33mDatabase name: batching - Size in (MB): 3.38 [33mDatabase n ... all on one line, trying to find a way to output each result on a new line
bruno- has joined #ruby
Trynemjoel has quit [Ping timeout: 256 seconds]
<apeiros>
you probably shouldn't build the message by hand
<apeiros>
use something like the mail gem
senayar has joined #ruby
* apeiros
wouldn't be surprised if header separator was \r\n
<apeiros>
just f.ex.
dudoom has joined #ruby
jonee has joined #ruby
<awk>
apeiros: let me check that out, thanks
<apeiros>
and $results? you do know that $vars are globals?
<awk>
apeiros: yup I wanted to maybe call it further down
cheeti has joined #ruby
Trynemjoel has joined #ruby
<cheeti>
hi
<apeiros>
and I don't see where you have <table> and/or <tr>…
<cheeti>
#join html
<cheeti>
#/join html
<apeiros>
ah, tr I see, single cell table…
<awk>
I must be doing something silly, let me play a little more
<apeiros>
awk: anyway, relevant for your question is the output you generate. and I don't see that anywhere there.
christiandsg has quit [Remote host closed the connection]
senzate has left #ruby [#ruby]
christiandsg has joined #ruby
charliesome has joined #ruby
Aswebb_ has joined #ruby
workmad3 is now known as wm3|away
<hj2007>
I've tried several solutions on different forums but couldn't get rid of "Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2". Any help please?
vdamewood has quit [Ping timeout: 265 seconds]
<hj2007>
I'm using rbenv
Papierkorb has joined #ruby
<hj2007>
rebenv version returns 2.1.2
g0rx_ has joined #ruby
<busterarm>
local version?
arup_r has joined #ruby
mary5030 has joined #ruby
jmcc has quit []
<busterarm>
rather, what's the output of `rbenv local`
jmcc has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
<hj2007>
busterarm, rbenv local returns 2.1.2 as well
sharpmachine has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
schaerli has quit [Remote host closed the connection]
<busterarm>
that's wild
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
daxroc has quit []
bweston92 has joined #ruby
<ddv>
hj2007: rbenv install 2.1.2
sevenseacat has joined #ruby
Trynemjoel has quit [Ping timeout: 256 seconds]
daxroc has joined #ruby
<hj2007>
ddv: already done that, also did rbenv rehash after that.
<ddv>
oh
TinkerTyper has joined #ruby
<ddv>
that should work
<ddv>
tho
<busterarm>
if you could pastebin the output of rbenv doctor I'd take a look
<hj2007>
ddv, busterarm: I think the issue is this "which bundle" returns "/usr/bin/bundle"
<hj2007>
busterarm: I've tried gem install bundle before, but it doesn't help, I get a wanring as well: You don't have /Users/<user>/.gem/ruby/2.1.0/bin in your PATH, gem executables will not run.
<hj2007>
busterarm: changing PATH and including bin didn;t work
ndrei has joined #ruby
<pingpong>
I basically want it to run on a vagrant box from /var/www so i can access the site in my browser from mysite.dev for instance
<busterarm>
uhhh...January 13th is 17 days away from January 31st...
havenwood has joined #ruby
<busterarm>
OH
d10n-work has joined #ruby
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has quit [Quit: emilkarl]
sgambino has joined #ruby
<busterarm>
hj2007: I'm gonna go back to my expression of "that's wild"
<busterarm>
i mean, if you don't absolutely require 2.1.2, you could just remove that line from the Gemfile, but that doesn't really solve your problem
schaerli has joined #ruby
sandelius has joined #ruby
mary5030 has quit [Remote host closed the connection]
dtcristo has joined #ruby
bmurt has joined #ruby
<hj2007>
busterarm, right, that would just be a ad hoc way, but thanks for the help
<busterarm>
i'm still thinking about it, but something sounds wrong with rbenv there
banister has joined #ruby
<pingpong>
anyone here got vagrant and rails working together on windows 7?
<banister>
yorickpeterse have you heard of the 30% rule
pingpong is now known as pingpong11
<banister>
yorickpeterse (dutch tax thing)
mary5030 has quit [Ping timeout: 255 seconds]
<banister>
or any other dutchies here that've heard of it?
<pingpong11>
you got vagrant working with ruby banister ?
<banister>
pingpong11 wtf r u asking me
bubbys has joined #ruby
<pingpong11>
sorry i thought this room was for help with ruby
<[k->
banister: please do not be rude
jwinder has joined #ruby
<[k->
pingpong11: please do not directly ping someone.
<banister>
[k- i'm not being rude, i just don't like being pinged out of the blue about a topic i haven't indicated i have any knowledge or interest in
<[k->
They will help you automatically if they can
<yorickpeterse>
banister: Yes, what about it?
<[k->
(I think wtf is rude, sorry)
<banister>
[k- well you're wrong, it's not.
alexclark has joined #ruby
<hj2007>
busterarm: Should I try reinstalling it?
vondruch has joined #ruby
<[k->
do you want to argue? if so, head over to #ruby-offtopic
maryb has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
MaryBoom has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
<banister>
yorickpeterse: do you know what it means exaclty? I read about it and keep reading, but i can't make head of tail of what it implies: "From a tax perspective, the salary agreed upon between the employee and employer may be reduced by 30%. In return, the employee should receive a 30% reduction as reimbursement for expenses."
sp1rs has quit [Quit: sp1rs]
<yorickpeterse>
banister: certain foreign employees can get 30% of their salary without taxes applied
<banister>
[k- Christ you sound like a bore, anything, i'm not interested in talking to you anymore
<yorickpeterse>
So IIRC taxes are calculated against 70% of your income, not the full 100%
<davexunit>
shevy: for some context, I'd like to use the gem archives on rubygems.org as the source tarballs to base package recipes on for the GNU Guix package manager.
<shevy>
havenwood lacks coffee again
<pingpong11>
i'm not sure how to change it i think
<havenwood>
shevy: It's so true!
<pingpong11>
i just used the config from railsbox.io
umgrosscol has joined #ruby
Trynemjoel has quit [Ping timeout: 240 seconds]
<havenwood>
shevy: Where am I? Who are you? What's happening!?
rubie has joined #ruby
<busterarm>
havenwood: it's cool. basically hj2007's rbenv is saying it's 2.1.2 but every indication is that it's 2.0.0
<shevy>
davexunit I have no idea what is Guix
<davexunit>
shevy: so far I've been using release tarballs typically from github, in which I build the gem via the gemspec and rakefile.
<havenwood>
busterarm: eek
<davexunit>
shevy: you don't have to. :)
<pingpong11>
has anyone got a tutorial that will get me up and running?
<pingpong11>
that they know will work if i follow it properlY/
<havenwood>
pingpong11: #RubyOnRails is the very best place for Rails questions.
<shevy>
well you can build the gem once you have the .gemspec, not sure which gems require a Rakefile in addition to that
<havenwood>
?rails pingpong11
<ruboto>
pingpong11, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<busterarm>
are there brew recipes for chruby and ruby-install yet? I really want to switch to that "new hotness" but 4 months ago that still wasn't an option
<davexunit>
shevy: the rakefile is needed to run the test suite.
christiandsg has quit [Remote host closed the connection]
<hj2007>
havenwood: so the issue starts with: Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2, while bundle install. Reason might be coz `which bundle` returns /usr/bin/bundle
<dorei>
>> def xxx ; :a ; end ; Object.method(:xxx)
<davexunit>
shevy: usually there's a 'rake spec' or 'rake test' task that DTRT
<shevy>
there are some "meta" gems such as rubygnome2, it has the individual subdirectory for the bindings to glib2 gio etc... each one which then has a Rakefile inside that directory
pengin has joined #ruby
<havenwood>
hj2007: gem install bundler
troulouliou_div2 has joined #ruby
Trynemjoel has joined #ruby
dopie has joined #ruby
<dorei>
so, when i define a method on top level this method is added on Object ?
<havenwood>
hj2007: then: rbenv rehash && gem which bundler
<busterarm>
havenwood: neat.
scripore has joined #ruby
exile-bot-2 has joined #ruby
<dorei>
>> self
<hj2007>
havenwood: already did gem install bundler, I get You don't have /Users/<user>/.gem/ruby/2.1.0/bin in your PATH, gem executables will not run. as warning
<davexunit>
shevy: so if test suites + Rakefiles are commonly included such that anyone can extract the gem and successfully run the test suite, I am satisfied.
<davexunit>
but I'm still not sure if anyone besides me actually does this.
<havenwood>
hj2007: How'd you install 2.1.2?
<davexunit>
and I want to ensure that my packages have as much test coverage as possible
<hj2007>
havenwood: I did as you said, I got /usr/bin/bundler for `which bundler`
<busterarm>
oh...it was pkgsrc that I wanted to use chruby with. nvm
<davexunit>
(I've uncovered a *lot* of circular dependencies this way, btw)
<busterarm>
then I gave up and switched to brew
<hj2007>
havenwood rbenv install 2.1.2
<davexunit>
rspec in particular.
Pupp3tm4st3r has joined #ruby
<davexunit>
and cucumber.
<havenwood>
busterarm: Ahhh, yeah a pkgsrc port would be nice. Maybe I'll look into that.
<busterarm>
havenwood: I'm religiously opposed to shims
<agent_white>
Cucumbers make pickles. Pickles are good on hamburgers. Hamburgers are good. So yes, Cucumber is good.
msgodf has joined #ruby
<havenwood>
busterarm: Down with shims! Down with shims!
<busterarm>
lol, well, i am using brew. necessary evil
<ruurd>
yay shims yay shims
<umgrosscol>
busterarm: What's the opposition to shims?
Cust0sLim3n has quit [Ping timeout: 246 seconds]
rubie has quit [Ping timeout: 265 seconds]
lannonbr has joined #ruby
<havenwood>
shevy: Thanks for the coffee reminder... making a cup before blunder about further. :)
<shevy>
\o/
<umgrosscol>
busterarm: You'd rather maintain a system of symlinks?
<ruurd>
I'm using rvm and if you need to maintain more than one project it's a life saver
<shevy>
does anyone else here happen to use ruby gtk3? I just started looking through the samples
<umgrosscol>
ruurd: Same for rbenv if you're maintaining dev servers for dozens of developers.
blackmesa has quit [Ping timeout: 244 seconds]
<ruurd>
I don't think they are that much different.
mistermocha has joined #ruby
<davexunit>
GNU Guix does a good job of filling the role of rvm/rbenv, which the additional benefit that you can use different versions of *any* package.
lavros has joined #ruby
<davexunit>
that's currently what I'm using it for as I beef up the support for ruby packages
<ruurd>
And I also see a trend to just pull in everything including the kitchen sink into a project.
<umgrosscol>
ruurd: I've used both. They're both much better than maintaining the installs manually from my point of view.
<busterarm>
symlinks get a bad rep
freerobby has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
<ruurd>
Especially because they don't work on what's that idiot os called again?
exile-bot-2 has quit [Ping timeout: 272 seconds]
<shevy>
davexunit sounds like gobolinux :D
<umgrosscol>
busterarm: Symlinks are very useful. I just don't like to have to maintain them myself.
doertedev has joined #ruby
Xeago has joined #ruby
arup_r has quit []
jhack has joined #ruby
mister_solo has joined #ruby
<ruurd>
Let capistrano do that for you :-)
Pupp3tm4st3r has quit [Remote host closed the connection]
<umgrosscol>
ruurd: I've never heard of someone using cap to deploy ruby installations.
jerius has joined #ruby
jonee has quit [Ping timeout: 244 seconds]
<davexunit>
shevy: similar, but guix is more advanced. perhaps you've heard of nix, our project implements the same fundamental ideas and uses some of the same underlying software.
malconis has joined #ruby
<shevy>
yeah
<busterarm>
oooh, I used to maintain packages for GoboLinux
<shevy>
busterarm \o/
rideh has quit [Quit: zap]
<busterarm>
haven't heard mention of it in nearly 10 years
phoo1234567 has joined #ruby
exile-bot-2 has joined #ruby
<davexunit>
I'm working on a rubygems.org package importer for guix, as well as improving our automated ruby gem build system.
exile-bot-2 has quit [Remote host closed the connection]
<davexunit>
which is why I'm here asking about test suites in gem archives ;)
<shevy>
well I approve that you use ruby!
<ruurd>
umgrosscol true used it for rails projects.
<ruurd>
but methinks you could do ruby stuff with it too
<davexunit>
guix is implemented in Scheme, which ruby shares some concepts with.
<umgrosscol>
ruurd: Probably, but that might be like hammering in screws
Kharma has quit []
exile-bot-2 has joined #ruby
serivich has joined #ruby
exile-bot-2 has quit [Read error: Connection reset by peer]
jbw__ has joined #ruby
Kharma has joined #ruby
ruby-lang030 has joined #ruby
exile-bot-2 has joined #ruby
pengin has quit [Remote host closed the connection]
alexclark has joined #ruby
andikr has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
<davexunit>
busterarm: yeah. I post release announcements to HN
<davexunit>
we just released 0.8.3 on wednesday
mistermocha has quit [Ping timeout: 252 seconds]
Pupp3tm4st3r has joined #ruby
<busterarm>
nifty!
<busterarm>
sadly I'm no longer on Linux these days
Fubister has joined #ruby
mistermocha has joined #ruby
schaerli has joined #ruby
duggiefresh has joined #ruby
sdothum has quit [Ping timeout: 272 seconds]
<shevy>
:(
phoo1234567 has quit [Max SendQ exceeded]
phoo1234567 has joined #ruby
<shevy>
havenwood lol matz is supporting competition!
<ljarvis>
matz has always supported competition
exile-bot-2 has quit [Ping timeout: 250 seconds]
exile-bot-2 has joined #ruby
<Fubister>
Hi there, i used to do some scripting for mirc, now I'm trying to create a very basic irc gather script in ruby. http://pastebin.com/bsmuWmSe can you please tell me, what should I use to replace the mirc "set %number x" in order for it to work with ruby?
exile-bot-2 has quit [Remote host closed the connection]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<ljarvis>
what better compliment than to have a language based on the one you created
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang030 has quit [Ping timeout: 246 seconds]
exile-bot-2 has joined #ruby
jbw__ has quit [Ping timeout: 244 seconds]
failshell has joined #ruby
CustosLimen has joined #ruby
sinkensabe has quit [Remote host closed the connection]
banister has joined #ruby
<ruurd>
umgrosscol just use a big enough hammer...
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
usershell has quit [Remote host closed the connection]
<umgrosscol>
ruurd: I agree you could make it work. The results... not as nice looking.
exile-bot-2 has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 244 seconds]
exile-bot-2 has joined #ruby
<umgrosscol>
ruurd: And big hammers don't usually involve an "undo" pathway.
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
<ruurd>
umgrosscol yes that is why screwdrivers can be unscrewdrivers if you screwed up...
weemsledeux has joined #ruby
weemsledeux has quit [Client Quit]
paulcsmith has joined #ruby
RegulationD has joined #ruby
tubulife- has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
busterarm has quit [Changing host]
busterarm has joined #ruby
<umgrosscol>
ruurd: And why I'd probably not try to get capistrano to do deployments of ruby versions.
DEA7TH has joined #ruby
Aswebb_ has quit [Ping timeout: 246 seconds]
Aswebb_ has joined #ruby
hashrocket has joined #ruby
prefixed has joined #ruby
schaerli has quit [Remote host closed the connection]
exile-bot-2 has quit [Ping timeout: 264 seconds]
senayar has quit [Ping timeout: 256 seconds]
exile-bot-2 has joined #ruby
exile-bot-2 has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
exile-bot-2 has joined #ruby
j4cknewt has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
rideh has joined #ruby
banister has joined #ruby
tubulife- has quit [Ping timeout: 240 seconds]
<davexunit>
additionally, pastebin blocks tor users.
exile-bot-2 has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 265 seconds]
exile-bot-2 has joined #ruby
exile-bot-2 has quit [Read error: Connection reset by peer]
Trynemjoel has quit [Ping timeout: 256 seconds]
c0def00d has quit [Quit: c0def00d]
sharpmachine has joined #ruby
Marsupermammal has quit [Ping timeout: 244 seconds]
ndrei has quit [Ping timeout: 252 seconds]
Trynemjoel has joined #ruby
livathinos has joined #ruby
matp has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
Scriptonaut has joined #ruby
sharpmachine has quit [Ping timeout: 244 seconds]
Igorshp has joined #ruby
schaerli has joined #ruby
<Scriptonaut>
Hey guys, I am working on a rubyapp, and I'd like to use active record just like I use it in rails, along with migrations using rake, and all the other stuff (schemas, all the other rake tasks like db:create, db:drop, db:schema:load, etc). How do I do this?
<Scriptonaut>
so far I have the activerecord gem, but I'm trying to figure out the rake and schema parts
<ljarvis>
immutability in ruby isn't worth thinking about
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
rubie has joined #ruby
mlangenberg has joined #ruby
bestie has quit []
bestie has joined #ruby
riotjone_ has quit [Remote host closed the connection]
ruurd has joined #ruby
christiandsg has joined #ruby
sanguisdex has quit [Remote host closed the connection]
<adaedra>
ahah, immutability.
<adaedra>
great joke!
juanca_ has joined #ruby
<Scriptonaut>
I like immutability :D
ixti has quit [Ping timeout: 246 seconds]
mlangenberg has quit [Client Quit]
coderkevin has joined #ruby
<Scriptonaut>
having spent a good deal of time messing with Haskell
ruurd has quit [Read error: Connection reset by peer]
<benjwadams>
^ +1
<adaedra>
I do to, but here it is #ruby
<Scriptonaut>
heh ya
<agent_white>
:( I like pokemon
Luun has joined #ruby
<benjwadams>
Speaking of that, what are Ruby's killer features in people's opinions?
<adaedra>
(like immutability, not work with haskell)
<ljarvis>
benjwadams: mutability
* adaedra
throws a pokéball at agent_white
<Scriptonaut>
benjwadams: by killer do you mean good?
* agent_white
deflects and throws back masterball
<adaedra>
benjwadams: it has a red logo
<benjwadams>
yes
<benjwadams>
non-cosmetic reasons
<Scriptonaut>
One of my favorite aspects of ruby is how convenient everything is
<Scriptonaut>
oh, well nvm then
<Scriptonaut>
I was gonna say how everythign reads like English
<Scriptonaut>
and how there's a method for everything
jschoolcraft has joined #ruby
<adaedra>
agent_white: you would really waste a master-ball for that? shame.
<agent_white>
adaedra: Well... 50/50 chance it works. Unless
rubie has quit [Ping timeout: 265 seconds]
<Scriptonaut>
it's nice not having to implement everything yourself and just get some work done
<benjwadams>
It seems to have pretty poor support in terms of libraries for numeric code, data manipulation, and geospatial support
DaniG2k has joined #ruby
juanca__ has joined #ruby
<benjwadams>
I can't make the argument that having something more DSL like is enough to make me want to use it in a project vs support for the aforementioned features
<agent_white>
adaedra: I'm a high-roller. Master balls are just pennies in mah pawkets.
schaerli has quit [Remote host closed the connection]
<agent_white>
;D
christiandsg has quit [Ping timeout: 265 seconds]
ixti has joined #ruby
juanca_ has quit [Ping timeout: 255 seconds]
yb_drowe has joined #ruby
sanguisdex has joined #ruby
michael_mbp has quit [Excess Flood]
<benjwadams>
I have yet to see something really blow my mind with Ruby. Some of it is english-like, but it's not enough of argument to make me use it. Perl/shell is great for one off scripting and Python for numerics/data manipulation and ruby seems to fall somewhere in between those two nebulously imho
serivichi has joined #ruby
<benjwadams>
this is not an attempt to start a flamewar, but i'm curious to hear what lang proponents have to say
<centrx>
Ruby reduces cognitive overhead and improves development time
<jschoolcraft>
is there a guard equivalent where I can specify the watch and triggered command on the command line? something like guard lib/tasks rake foo:bar ?
casadei_ has joined #ruby
<benjwadams>
centrx: do you have data to back that claim?
<centrx>
benjwadams, In contrast, Perl has a lot of complexities and epicycles to keep track of. Python is less functional (FP) than Ruby
dgutierrez1287 has quit [Remote host closed the connection]
<Scriptonaut>
I would agree, that anecdotally, ruby projects are more fun because I spend more time getting work done than configuring stuff and reading documentation
<centrx>
benjwadams, It's my experience. When you learn Ruby, the programming model is much simpler and more powerful and more expressive than other languages
<Scriptonaut>
also ya centrx, the FP features of ruby are a real win for me
<benjwadams>
Python is less functional, but yet there's more mutable state in ruby according to a number of people here
<Scriptonaut>
also don't forget the metaprogramming
<benjwadams>
i agree that python has a more imperative flavor
[k- has quit [Ping timeout: 252 seconds]
<centrx>
benjwadams, You can program Ruby in such a way that you do everything immutably
<Scriptonaut>
I wish ruby had good pattern matching and a simpler way to curry
<wmoxam>
benjwadams: Ruby is the scripting version of Smalltalk (IMO)
michael_mbp has joined #ruby
msnyon has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
<centrx>
benjwadams, Blocks are very powerful, as an example of functional programming. In order to do the same thing in Python, it requires this backwards way of defining a function into a variable, then passing the fn variable to a map() function for example
<davexunit>
I sorely pattern miss pattern matching
chills42 has joined #ruby
<davexunit>
and proper first class functions
<centrx>
Scriptonaut, What do you mean by pattern matching?
<davexunit>
basically I want Ruby to be Scheme.
Trynemjoel has quit [Ping timeout: 240 seconds]
howdoi_ has quit [Quit: Connection closed for inactivity]
chills42 has quit [Remote host closed the connection]
<Scriptonaut>
an example of it would be like: def my_func ( x, y = param.split )
<Scriptonaut>
then inside the function you'd have access to x and y
<davexunit>
centrx: match and destructure a data structure based on it's "shape".
<Scriptonaut>
I think that's an example of it
Trynemjoel has joined #ruby
<benjwadams>
tbqh i still haven't fully grasped the whole blocks/procs thing
<davexunit>
[x, y, z] could be a pattern that matches an array of 3 elements and binds each element to a variable
theery has joined #ruby
dgutierrez1287 has joined #ruby
<davexunit>
benjwadams: it's over-complicated
<centrx>
Blocks and Procs are like first-class functions
<davexunit>
not really, though.
<centrx>
That's why I said like
<davexunit>
in practice they don't work out the same way
<centrx>
but it's a good way of thinking about them
<centrx>
How so?
agent_white has quit [Read error: Connection reset by peer]
<davexunit>
I can do basic functional things in Ruby, but more advanced things are painful.
banister has quit [Ping timeout: 250 seconds]
<centrx>
davexunit, Have you tried Elixir?
<davexunit>
ruby methods may accept just 1 block
agent_white has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
<dorei>
is there a way to edit a gem's required libs after installing it? maybe by editing it's .gemspec...
<Scriptonaut>
I forget, can blocks accept blocks
<davexunit>
centrx: no, I'm not very interested after looking at some code and stuff on their website.
<davexunit>
Scheme is my language of choice. Clojure is more what I'm after than Elixir
<centrx>
I heard it was like Ruby + Erlang with some magic sauce (elixir)
<ljarvis>
Elixir is awesome
<benjwadams>
I'll get around to lisping someday. I learned some basic Haskell about two years back and it was pretty mind blowing
kies^ has joined #ruby
<benjwadams>
don't write a lot of it, but definitely changes your thinking
<Scriptonaut>
I prefer Haskell over lisps
<Scriptonaut>
or, ML family langs in general
<davexunit>
haskell is cool, too.
<benjwadams>
if i lisped, I'd have to use Emacs :(
<Scriptonaut>
:o oh no
chills42 has joined #ruby
* davexunit
is talking to you in IRC via emacs right now
<Scriptonaut>
haha
bronson has joined #ruby
<davexunit>
emacs is fantastic.
<benjwadams>
though I'm tempted to try the dark side with Evil mode
<Scriptonaut>
emacs has a built in irc client? lol
mistermocha has joined #ruby
<davexunit>
yup
<Scriptonaut>
vim all the way here
<davexunit>
you should learn emacs just for magit
<davexunit>
best git interface ever
SOLDIERz has quit [Ping timeout: 244 seconds]
<Scriptonaut>
hrm
<Scriptonaut>
I still learn new vim things after using it a couple years
theery has quit [Remote host closed the connection]
<Scriptonaut>
super steep learning curve
rubie has joined #ruby
tennis has joined #ruby
<benjwadams>
I guess in the end whether programming langs or tools it boils down to the task at hand and the sensibilities of the user *shrug*
<davexunit>
I've never had a happier hack then when I use emacs to connect to a Scheme REPL and live code things.
<benjwadams>
or if you're unlucky, whatever management is foisting upon you :P
livathinos has quit []
<davexunit>
benjwadams: of course. :)
<Scriptonaut>
benjwadams: true that
<davexunit>
I just want to put my +1 in for emacs, even for ruby stuff it's great.
<davexunit>
ruby-test-mode and other nice things
Cache_Money has joined #ruby
<adaedra>
are we doing editor wars again?
<davexunit>
so don't be afraid to try it sometime :)
<davexunit>
adaedra: I hope not.
Jarboe has joined #ruby
<ljarvis>
yeah, since vim will win
<ljarvis>
</end>
<Scriptonaut>
lol
<davexunit>
thems fightin' words!
<benjwadams>
look what i started :z
<davexunit>
;)
charliesome has joined #ruby
_lexjm has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
jonee has joined #ruby
<busterarm>
Elixir is pretty nice, but I'm mainly interested in seeing where Elm goes
fumihiro has joined #ruby
DaniG2k has quit [Quit: leaving]
sinkensabe has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 264 seconds]
jxf has quit []
jxf has joined #ruby
<davexunit>
busterarm: Elm is very interesting indeed.
<davexunit>
I'm not interested in a new language, but I am interested in functional reactive programming
RobertBirnie has joined #ruby
<davexunit>
which I've implemented in Scheme for use with a game engine
<davexunit>
busterarm: yeah that thing is just awesome
DEA7TH has joined #ruby
alekst_ has joined #ruby
<davexunit>
it really shows why modelling programs with persistent data structures and pure functions really pays off
<davexunit>
I like implementing state as a fold
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
theery has joined #ruby
Trynemjoel has quit [Ping timeout: 256 seconds]
sharpmachine has quit [Ping timeout: 272 seconds]
Trynemjoel has joined #ruby
snockerton has joined #ruby
aryaching has joined #ruby
knrz has joined #ruby
jottr has joined #ruby
safeforge has joined #ruby
Xoro has quit [Read error: Connection reset by peer]
ktchup has joined #ruby
<ktchup>
hey guys, what's the rails channel?
<ljarvis>
#rubyonrails
<busterarm>
#RobyOnRails
<ktchup>
ty
<busterarm>
err #RubyOnRails, even
Trynemjoel has quit [Ping timeout: 240 seconds]
dimasg has quit [Ping timeout: 256 seconds]
Xoro has joined #ruby
mdavid613 has joined #ruby
Trynemjoel has joined #ruby
theery has quit [Remote host closed the connection]
mago0 has joined #ruby
mago0 has quit [Client Quit]
mago0 has joined #ruby
msgodf has quit [Ping timeout: 240 seconds]
ktchup has quit [Client Quit]
Channel6 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<dudedudeman>
so i'm fighting more json this morning. i'm getting the error initialize': A JSON text must at least contain two octets! (JSON::ParserError). This is the code that is leading me to this error: https://gist.github.com/anonymous/0a2b8c540e528b3dc69e
<adaedra>
it means your input is invalid, dudedudeman
<adaedra>
surely empty
<knrz>
dudedudeman puts the item in the loop; the last one puts'd will be the one giving you errors
prestorium has joined #ruby
<ljarvis>
there's only one place this error can occur..
<knrz>
then upload the contents of the last file to gist and link us here
<dudedudeman>
that's on the File.open
<dudedudeman>
?
<ljarvis>
which as, as adaedra says, probably because there's no json
<ljarvis>
dudedudeman: no, the JSON.parse
<ljarvis>
JSON::ParserError is a big of a giveaway
<shevy>
prefixed matz spoke about the history in a video talk. want to watch it?
<ljarvis>
really? of all things, method overloading is the mistake?
<prefixed>
no time. perhaps later
<adaedra>
I smell a troll
CloCkWeRX has quit [Quit: Leaving.]
<shevy>
he is just lazy
<adaedra>
dudedudeman: looks neater, no?
<prefixed>
ljarvis one of them. adaedra no. I just wanted to build an overloaded method and found i couldn't
<dudedudeman>
it looks amazing, adaedra
* prefixed
is annoyed
<ljarvis>
prefixed: meh, it's not *that* popular of a feature
<prefixed>
#rubylife
Trynemjoel has joined #ruby
<adaedra>
well, given arguments have no types, and that you can have optionnal arguments, I don't see what you're missing
<ljarvis>
prefixed: anyway, you can use kwargs to get around it
<prefixed>
ljarvis yes, i am now aware of this
sinkensabe has quit [Remote host closed the connection]
blackmesa has joined #ruby
<lannonbr>
,q
lannonbr has quit [Quit: WeeChat 1.2]
rideh has quit [Quit: zap]
<adaedra>
ok
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lkba has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
lkba has joined #ruby
<prefixed>
i wonder if ruby is faster than python. let's find out
ReK2 has quit [Quit: Konversation terminated!]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
attention, irrelevent results incoming.
mdavid613 has quit [Quit: Leaving.]
senayar has quit []
<shevy>
hehe
<dudedudeman>
hut hut!
* dudedudeman
stands up really straight
<adaedra>
dudedudeman: your code works now?
<dudedudeman>
it does!
<dudedudeman>
i need to figuure out where to put break points so it can't be executed more than once
DaniG2k has quit [Ping timeout: 244 seconds]
decoponio has joined #ruby
<dudedudeman>
like, if it sees a certain folder that it's trying to create already there, then just stop
<ljarvis>
your code doesn't create folders
Trynemjoel has quit [Ping timeout: 256 seconds]
thisdoescompute is now known as kully3xf
<dudedudeman>
that was just one bit of the code i'm working with. i have a line that creates a new folder, unless it's already there
Muhannad has quit [Ping timeout: 255 seconds]
<ljarvis>
I see
towski_ has joined #ruby
<shevy>
dudedudeman you are duding your code up \o/
<dudedudeman>
shevy: i'm trying!
shock_one has joined #ruby
codecop has quit [Remote host closed the connection]
rehat has joined #ruby
Trynemjoel has joined #ruby
Asix3 has joined #ruby
marr has quit [Ping timeout: 264 seconds]
jbw has joined #ruby
_lexjm has quit [Quit: zzz...]
<prefixed>
ruby does not appear to be slower than python
<Asix3>
hello, I'm trying to install sass, but I keep getting an error: ARNING: You don't have /root/.gem/ruby/2.2.0/bin in your PATH
<Asix3>
the command i'm using is: sudo gem install sass
<ljarvis>
Asix3: don't use root
<shevy>
prefixed \o/
<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.
araujo has quit [Quit: Leaving]
theery has joined #ruby
<shevy>
if you are the superuser, why would you use sudo?
<Asix3>
well, if I don't sudo, then I get the same error
<adaedra>
sudo -u shevy command
pandaant has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
<busterarm>
ewwww single user mode?
<prefixed>
that's pretty good. i like to use python and ruby
<shevy>
well that is weird, it should install into /usr/lib/ruby/* or whatever the --prefix your ruby has then
sharpmachine has joined #ruby
<prefixed>
i also like javascript
<ljarvis>
prefixed: this is #ruby, we talk about ruby
<Asix3>
WARNING: You don't have /home/[USER]/.gem/ruby/2.2.0/bin in your PATH
<adaedra>
looks like --user-install, it's not weird, shevy
mlangenberg has quit [Ping timeout: 246 seconds]
<adaedra>
Asix3: add this folder to your $PATH variable
<shevy>
adaedra how do you know that?
<prefixed>
i love u ljarvis
bttf has quit []
<adaedra>
shevy: I happen to use ruby sometimes
bttf has joined #ruby
<shevy>
that is no explanation
<busterarm>
i must be one of the only Mac users who doesn't work out of an admin account...
bishop has joined #ruby
gambl0re has joined #ruby
<Antiarc>
an admin account just has sudoers, right?
bishop is now known as Guest41195
<shevy>
busterarm I estimate around 25% of the people here are mac users
<busterarm>
shevy: interesting stats, that
<ljarvis>
pointless*
<adaedra>
Antiarc: more or less
<adaedra>
shevy: stop making numbers up
<shevy>
adaedra you have no numbers to show?
agent_white has quit [Quit: leaving]
<adaedra>
shevy: on the right side of my keyboard.
<Antiarc>
I'd expect it's quite a lot higher, tbh :)
<shevy>
so no numbers
eminencehc has joined #ruby
slawrence00 has joined #ruby
<busterarm>
Antiarc: in the US. I'm constantly surprised by the number of Ruby devs I meet from the EU who use Windows
<shevy>
Antiarc dunno, some linux users only ... jhass... me ... hmm
juanca__ has quit []
theery has quit [Ping timeout: 244 seconds]
<Antiarc>
I use a Windows desktop and do my development on a headless Linux server, so I'm not sure which camp I fall into :P
<shevy>
the weird camp
<adaedra>
the bad one.
<ljarvis>
well linux, obviously
slawrence00 has quit [Client Quit]
<Guest41195>
I'm running windows ME
<busterarm>
i'd say windows, only because most of the ruby devs I know are using vagrant anyway
railswebdev has joined #ruby
<busterarm>
on mac I mean
<adaedra>
You should be using plan9, of course.
sharpmachine has quit [Ping timeout: 250 seconds]
<adaedra>
Guest41195: press Ctrl-Alt-Del twice.
sharpmachine has joined #ruby
davexunit has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
zuQe8 has joined #ruby
<Guest41195>
haha ;)
<Guest41195>
I think that you have already lost if you start segmenting yourself on OSs
<busterarm>
everyone should use BeOS, let's be real here
<Guest41195>
I doubt if any of you can't work around the technical differences
<shevy>
I settled for ruby. as long as ruby works I am happy
<Guest41195>
specially with ruby
benlovell has quit [Ping timeout: 240 seconds]
<Guest41195>
except old macs
ixti has quit [Quit: WeeChat 1.2]
<Guest41195>
\r nonsense can go die in a hole
fractalis has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fantazo has quit [Quit: Verlassend]
NeverDie has joined #ruby
michaeldeol has joined #ruby
anisha has quit [Quit: Leaving]
mdavid613 has joined #ruby
Ilyas has joined #ruby
<busterarm>
is there a fire in that hole?
yb_drowe has quit [Quit: Zzzzzzz....]
amclain has joined #ruby
<dfockler>
messing with Ruby's IO.pipe and listening to Adele, makes me want to cry
c355E3B has quit []
c355E3B has joined #ruby
shock_one has quit [Remote host closed the connection]
<ljarvis>
that's.. weird
<shevy>
dfockler but which part is stranger
<dudedudeman>
can i turn an array in to regexp?
<shevy>
what are you doing with IO.pipe
<dfockler>
just figuring out how it works
fullofcaffeine has quit [Remote host closed the connection]
yb_drowe has joined #ruby
<shevy>
dudedudeman you could turn it into an array of regexes? array.map {|e| Regexp.new(e) }
<dudedudeman>
ljarvis: for sure, i had one thing that would make the folders, and then skip it if they existed. but i want the entire script i'm running to shut down if it sees the folders already exist
<rob_>
ljarvis: yeah, isnt there a better way? :)
blackmesa has quit [Ping timeout: 244 seconds]
duggiefresh has quit []
<ljarvis>
dudedudeman: if Dir.exists?(dir)
autrilla has quit []
<dudedudeman>
undefined method exists
autrilla has joined #ruby
CorySimmons has quit [Quit: Bye!]
<ljarvis>
rob_: that's better than using .uniq if you want unique values?
<ljarvis>
dudedudeman: lies and slander
RegulationD has quit [Remote host closed the connection]
<dudedudeman>
lol
mikecmpbll has quit [Ping timeout: 246 seconds]
<ljarvis>
dudedudeman: "exists?"
<ljarvis>
with the ?
<rob_>
ljarvis: a glob pattern that only matches files recursively including symlinked ones would be preferable..
<dudedudeman>
yes. it's freaking out on the line above though, where it says directory_name.each do |dir|
Asix3 has quit [Ping timeout: 264 seconds]
phutchins has quit [Read error: Connection reset by peer]
<ljarvis>
dudedudeman: why?
yqt has joined #ruby
<dudedudeman>
wait, nvm. i can't read
phutchins has joined #ruby
<ljarvis>
rob_: glob is great but it's quite limited
shock_one has quit [Remote host closed the connection]
<ljarvis>
rob_: Find.find or Dir.entries might help, you'll probably have to stat the file though, or File.symlink?
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
<rob_>
ljarvis: ok, thanks!
shock_one has joined #ruby
<ljarvis>
dudedudeman: I said Dir.exists?(...) not dir.exists?; dir is a string
zeeraw has joined #ruby
<erichf>
ljarvis, any idea why deb http://repo.mongodb.org/apt/ubuntu <%= `lsb_release -sc` %>/mongodb-org/3.0 multiverse would have a newling after the embedded ruby?
<dudedudeman>
EFF. you did
<ljarvis>
then delete the lines in the else branch
<ljarvis>
because they're silly
<erichf>
newline*
<ljarvis>
(we'll get to that)
zendrix has joined #ruby
<dudedudeman>
ok, there's the no implicit conversion of array to string now
<ljarvis>
erichf: yeah because the output of that command includes a newline (to be shell friendly). Just chomp it `.chomp
<ljarvis>
dudedudeman: well directory_name is an array
<ljarvis>
you surely want dir
timonv has quit [Ping timeout: 264 seconds]
<erichf>
`command`.chomp ?
<dudedudeman>
which, is fixed by .to_s
<ljarvis>
erichf: you got it
<ljarvis>
dudedudeman: no dont do that
<erichf>
k
<dudedudeman>
oh. ok
zeeraw has quit [Client Quit]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stan has quit [Ping timeout: 246 seconds]
<ljarvis>
dudedudeman: think about what you're doing, you need to traverse your array and check each directory
<ljarvis>
dont do anything with the array as a whole except loop through it
topdownjimmy has joined #ruby
<dudedudeman>
at this point, the directories don't even exist yet
<topdownjimmy>
I'm having trouble with getting the scss-lint gem to work on a directory of files rather than a single file
<ljarvis>
rename your array too
<ljarvis>
directory_name does not lend itself well to an array type
<ljarvis>
topdownjimmy: what's the problem/error/code/etc?
<dudedudeman>
DIR_NAMES?
chouhoul_ has joined #ruby
<ljarvis>
that would be better yes
zeeraw has joined #ruby
chouhoulis has quit [Read error: Connection reset by peer]
Guest41195 has quit [Ping timeout: 240 seconds]
c0def00d has joined #ruby
<dudedudeman>
ok
<dudedudeman>
that's done
<ljarvis>
ok what's next?
bohallor has quit [Quit: Konversation terminated!]
<dudedudeman>
well, my if statement is asking if Dir.exists?. however, nothing exists at this point
shock_one has quit [Remote host closed the connection]
<ljarvis>
but you still need that check for when it does, right?
<dudedudeman>
right
Casty has joined #ruby
<ljarvis>
ok so lets focus on the else branch, makes sense?
zeeraw has quit [Client Quit]
<dudedudeman>
roger
shock_one has joined #ruby
<dudedudeman>
(even though i'm getting the array to string conversion error?)
<ljarvis>
well, you need to make sure Dir.exists? checks the dir and not the list of dirs
krz has quit [Ping timeout: 250 seconds]
Igorshp has quit [Remote host closed the connection]
<dudedudeman>
ok
codenihal has joined #ruby
Igorshp has joined #ruby
<dudedudeman>
index?
Igorshp has quit [Remote host closed the connection]
<ljarvis>
pardon?
Muhannad has joined #ruby
<dudedudeman>
i didn't know if i needed to index the array
<ljarvis>
you're already looping through it
<dudedudeman>
i guess i'm unsure of which array method to use here
ta has quit [Ping timeout: 260 seconds]
<eam>
dudedudeman: you don't need one, you're using #each
<eam>
each walks your array taking each element and putting it into the variable |dir|, right?
<dudedudeman>
i don't need one on the if statement?
<eam>
you're just using the wrong variable
<dudedudeman>
ah, ok
<eam>
.exists?(dir)
<dudedudeman>
well, shoot. i had tried that. lol
theery has joined #ruby
<dudedudeman>
obviously i did it wrong
<dudedudeman>
so, ok. it moves to the else block now.
<eam>
dudedudeman: don't worry about making dumb errors when learning a new language, I'm doing the same in a different context as we speak
<dudedudeman>
thanks for the encouragement, eam
<eam>
it's like in the movie gremlins 2, "it's always after 12 midnight somewhere ..."
<eam>
man what a great movie that was
RegulationD has quit [Remote host closed the connection]
<eam>
full of enriching life lessons *sips coffee*
zeeraw has joined #ruby
<dudedudeman>
i need coffee. i was up too late workign on this
jonee has quit [Ping timeout: 260 seconds]
yizr has quit [Ping timeout: 244 seconds]
* adaedra
gives dudedudeman tea
<dudedudeman>
i'll take it
<dudedudeman>
i love tea
<umgrosscol>
dudedudeman: Dir.exists?(dir). Looks like directory_name is an array of path strings. Within the each block, dir is a path string. So the class method Dir.exist? should operate on that.
<dudedudeman>
i don't drink it nearly enough. aside from unsweet iced tea
oo_ has joined #ruby
<eam>
I like how you're far enough south that you feel the need to specify unsweet
kies^ has quit [Ping timeout: 240 seconds]
allcentury has quit [Ping timeout: 240 seconds]
<umgrosscol>
eam: You pretty much have to specify "without lots of sugar" for a lot of things in a most places nowdays.
<eam>
sweet tea is such an odd regional phenomena
pauly_oc has joined #ruby
busterarm has quit [Ping timeout: 246 seconds]
<adaedra>
that's sweet
<dudedudeman>
yep. ha! i grew up in the 'south', but even yet here in texas, i still have to specify
<umgrosscol>
eam: Sugar gets added to most food these days. It's how you get "fat free".
<eam>
umgrosscol: yeah, but anywhere outside the south tea is presumed to be unsweet
<dudedudeman>
i stopped drinking sugary drinks a while ago. give me gallons of unsweet tea with lemon, and you'll rock my world
<umgrosscol>
eam: Not so much anymore.
symm- has joined #ruby
oo_ has quit [Remote host closed the connection]
<eam>
umgrosscol: well, out where I am, admittedly at the edge just before the ocean
<craysiii>
fat free: making you fatter since '72
<umgrosscol>
craysiii: Yeah. I just read "fat free" as "double sugar"
<eam>
fat free chocolate milk, for your health
banister has joined #ruby
c0def00d has quit [Quit: c0def00d]
pengin has joined #ruby
oo_ has joined #ruby
rideh has joined #ruby
<dudedudeman>
i guess i'm not sure if i should be using exit or abort here
tjohnson has joined #ruby
<umgrosscol>
For what?
rubie has quit [Remote host closed the connection]
<dudedudeman>
my little bite of code i'm working on. let me dig up the gist
<umgrosscol>
dudedudeman: DIR_NAMES is an array in that statement.
zeeraw has joined #ruby
<dudedudeman>
yes
shock_one has quit [Remote host closed the connection]
<dudedudeman>
i want to create folders based on what names are in the array.
<pontiki>
hello
<umgrosscol>
Oh I see... nvm. I thought you had a 2d array
chinmay_dd has joined #ruby
<dudedudeman>
ah word
diegoviola has joined #ruby
shock_one has joined #ruby
shock_one has quit [Remote host closed the connection]
<umgrosscol>
dudedudeman: Updated.
<dfockler>
how can I get IO.pipe to read out of a while loop?
<umgrosscol>
You don't have an array of arrays. Just an array with values ["Original", "Modified"]
scripore has quit [Read error: Connection reset by peer]
<umgrosscol>
dfockler: How do you read from an IO object within a loop?
<umgrosscol>
dfockler: Or are you trying to use a while loop to generate the contents an IO object is reading?
<dfockler>
just output it
leat2 has quit [Remote host closed the connection]
<dfockler>
while true
<dfockler>
rd.read
<dfockler>
end
<dfockler>
puts rd.read
<umgrosscol>
IO.pipe shoud give you [read_io, write_io]
<dfockler>
yeah that's what rd is
leat2 has joined #ruby
<umgrosscol>
So you want the first element that IO.pipe returns. That's your reading end.
<eam>
dfockler: buf += rd.read
<eam>
puts buf
<eam>
you're slurping the stream into a variable, then printing it all at once right?
<umgrosscol>
dfockler: Looks like a fine lop to me. It's not going to end even when you close the pipe, so that might be an issue.
<dfockler>
no sorry I'm actually outputting it as soon as it's read
SuMo_D has joined #ruby
<eam>
dfockler: oh, well what you have is fine then, what kind of problems are you seeing?
The_Phoenix has quit [Ping timeout: 252 seconds]
<dfockler>
I'm forking a process to do the reading and then using STDIN to write to it, but the read loop isn't outputting anything
<eam>
is the subprocess outputting anything?
Alayde has joined #ruby
<dfockler>
nope
busterarm has joined #ruby
<umgrosscol>
If you're not specifiying how much you want to read, read is going to block until you hit EOF
<dudedudeman>
umgrosscol: that works great. i guess now what i'm trying to do is get the code to stop/raise() if those folders in that array already exist
SuMo_D has quit [Client Quit]
<banister>
eam "hello".chars.sample
<umgrosscol>
dudedudeman: It just won't do anything if the directories exist. You want to stop the function execution or the whole program?
<dudedudeman>
whole program
<umgrosscol>
dudedudeman: You can just print or return in an else statement.
<dfockler>
umgrosscol: so on each write I need to do EOF so the read won't block?
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<dudedudeman>
because there's more down south of where that code lives that writes files to those folders if they exist
<umgrosscol>
dudedudeman: Seems like a poor design choice.
<dudedudeman>
a lot of my programming is poor design choice lol
Jackneill has joined #ruby
<umgrosscol>
dfockler: read without specifying how many bytes waits for EOF
<eam>
banister: aha, but that's just split "" right? I want to avoid the temp array
<eam>
(still, much nicer syntax)
<dfockler>
umgrosscol: oh ok, I'll try that thanks
<umgrosscol>
I think ^D is EOF if you're typing to stdin
<eam>
dfockler: if the subprocess doesn't output anything then read blocks forever
<dfockler>
ok
<eam>
dfockler: if you want your while loop to, say, have a timeout, you can use IO.select
<umgrosscol>
eam: If read doesn't encounter EOF it blocks forever.
<eam>
umgrosscol: well, not entirely
kies^ has joined #ruby
<umgrosscol>
eam: I guess you could break the pipe, and that might cause it to return.
Ilyas_ has joined #ruby
chills42 has quit [Remote host closed the connection]
devbug has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
umgrosscol: I guess I should say yeah ruby's #read probably does block forever to eof, I'm thinking of the underlying read which returns when the buffer is filled
<dfockler>
Yeah I had to close the write end or else the read would just block
lessless has quit [Ping timeout: 246 seconds]
Ilyas has quit [Ping timeout: 246 seconds]
joelataylor has joined #ruby
<umgrosscol>
eam: Not sure how ruby handles that. JRuby would let you read until you ran out of memory.
Luun has quit [Quit: Luun]
ItSANgo has quit [Quit: Leaving...]
c0m0 has quit [Ping timeout: 244 seconds]
<umgrosscol>
eam: Which is pretty much what I'd want to happen.
podman has quit [Quit: Connection closed for inactivity]
<eam>
umgrosscol: ruby and jruby do the same thing, they both hide the multiple read() calls behind an abstraction
<eindoofus>
is it really true that nearly all programmers are fine being socially isolated? having intermmediate programming skills i find myself being a bit of anomoly that i get very lonely very quickly
<eam>
reading data from a socket always occurs in fixed-buffer bits
chills42 has joined #ruby
Soda has joined #ruby
<Antiarc>
eindoofus: why do you think we hang out on IRC ?:)
<eam>
eindoofus: no, not true at all
<eindoofus>
have you found any outlet beside IRC to fulfill that need?
<umgrosscol>
eindoofus: All people of type X are the same.
<umgrosscol>
eindoofus: Are you of type X? then you must conform to the set of attributes X'
<umgrosscol>
eindoofus: If you don't, you're not X. Simple as type inference. Just reflect on that a bit.
paulcsmith has quit [Quit: Be back later ...]
<eindoofus>
lets not turn my question into a computer program. it's a bit more subjective than that
leafybasil has quit [Remote host closed the connection]
<Antiarc>
Not at all. You're literally stereotyping. :P
<umgrosscol>
eindoofus: Sounds like a social science question. They have some pretty interesting ways of answering those sorts of questions.
<eindoofus>
would say lonliness is more important than most of the variables you can throw into X
wallerdev has joined #ruby
leafybasil has joined #ruby
<umgrosscol>
eindoofus: Especially if you were asking about prevalence or predictors of behavior.
<eindoofus>
umgrosscol, are social scientist programmers? oh no, stereotyping again
<umgrosscol>
eindoofus: I don't see why they couldn't be?
prestorium has joined #ruby
<eindoofus>
lol
DEA7TH has quit [Quit: DEA7TH]
paulcsmith has joined #ruby
<craysiii>
just because you adhere to an interface doesn't mean you're the same type :)
<eindoofus>
true, but your missing the point. puting on my social scientist hat i would say that there is a lower frequency of them than programmers in an irc chat
<Scriptonaut>
I get lonely, I would not want to live alone
<umgrosscol>
craysiii: Shhh... i don't think he got the reflection joke.
paulcsmith has quit [Client Quit]
Muhannad has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
<umgrosscol>
eindoofus: Interesting supposition. How would you go about assessing the validity of it, or the conditions for which the statement were true?
<craysiii>
:X
mikecmpbll has joined #ruby
<dudedudeman>
many big words here
<dfockler>
HOLD IT! OBJECTION!
paulcsmith has joined #ruby
quimrstorres has quit [Remote host closed the connection]
ItSANgo has joined #ruby
fractalis has quit [Ping timeout: 246 seconds]
leafybasil has quit [Ping timeout: 240 seconds]
busterarm has quit [Ping timeout: 240 seconds]
thiagovsk has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
sharpmachine has quit [Remote host closed the connection]
<dfockler>
sweet I got it working! readline did the trick :)
<shevy>
you are a clever person!
RegulationD has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
white_bear has quit [Quit: leaving]
axl_ has quit [Quit: Leaving]
<dfockler>
thanks
failshell has quit [Remote host closed the connection]
Aswebb_ has quit []
Xeago has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mister_solo has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
rideh has quit [Quit: zap]
djbkd has joined #ruby
quimrstorres has joined #ruby
vikaton has joined #ruby
dangerousdave has joined #ruby
<dudedudeman>
thank you everyone for your help. i've learned a lot in the past morning and evening
quimrstorres has quit [Remote host closed the connection]
<ruby-lang148>
Hi all! So I've been attempting to teach myself the beautiful language of Ruby, but I'm afraid the learning is going a lot slower than I had intended. My goal is to get to a point where I can pass the coding challenges by App Academy. Can anyone help?
<craysiii>
he doesn't want to use apache though?
<wmoxam>
oh
<yebyen>
yeah
<yebyen>
i found a nice article (from 2015 even)
<yebyen>
where the only special config you do to apache is set ScriptAlias
<yebyen>
maybe that is what i really want
hobodave has joined #ruby
<wmoxam>
:D
<yebyen>
but, i figured there was a way to do something like that without apache
<yebyen>
rackup config.ru, and bam
<yebyen>
your directory is live on port 4000
<craysiii>
ruby-lang148 if you have a specific question, you should ask it
<dudedudeman>
i do that with puma, yebyen
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zendrix has quit [Remote host closed the connection]
<devbug>
I'm building an API client and want to use method chaining to make it super nice to use, but I have one hangup: I need to pass around my client object. What's the idomatic/best way to do this? I can set an instance variable on all my representations of resources, but that seems icky
<dfockler>
and it's from jeremy evens so you know the docs are going to be on point
<yebyen>
is the path plugin what i'm looking for?
<yebyen>
kind of seems like it so far
<havenwood>
dfockler: No doubt! And zero outstanding issues on the Githubs.
<havenwood>
Monthly release, like clockwork.
<havenwood>
Outstanding code quality.
<havenwood>
Impeccable!
d5sx43 has joined #ruby
elia has joined #ruby
Xeago has joined #ruby
busterarm has joined #ruby
pkrueger has joined #ruby
busterarm is now known as Guest56629
shadoi has joined #ruby
<havenwood>
yebyen: Yeah, the path plugin might be just right for your case.
Guest56629 has quit [Client Quit]
<havenwood>
(reading the backlog)
pauly_oc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lkba has joined #ruby
<havenwood>
yebyen: There's a #roda channel too if you have questions.
jschoolcraft has quit [Quit: peace]
shadoi1 has joined #ruby
<yebyen>
great
<yebyen>
i'm not sure path plugin is what i need
<yebyen>
but i couldn't exactly understand what it's for just from reading the source either
d5sx43 has quit [Client Quit]
shadoi2 has joined #ruby
rubie has joined #ruby
Yiota has joined #ruby
chills42 has quit [Remote host closed the connection]
<yebyen>
maybe it's multi_run
nalley has joined #ruby
shadoi has quit [Ping timeout: 246 seconds]
<yebyen>
i'll ask in #roda
workmad3 has quit [Ping timeout: 244 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
jackjackdripper has quit [Quit: Leaving.]
DLSteve has joined #ruby
jackjackdripper has joined #ruby
jerius has quit [Quit: /quit]
Outlastsheep is now known as zz_Outlastsheep
freerobby has joined #ruby
tennis has quit [Read error: Connection reset by peer]
<craysiii>
maybe serialport needs to be fully qualified, or however you would say it in ruby.
ascarter has joined #ruby
christiandsg has quit [Remote host closed the connection]
yqt has joined #ruby
failshell has joined #ruby
phutchins has quit [Ping timeout: 252 seconds]
lkba_ has joined #ruby
<ivanskie>
looks like it should go to else.. and say "[open] Mode is #{ @mode }. Not trying to open printer as TCPSocket."
<ivanskie>
instead it fails..
<philn_>
can anyone tell me how can i get a session variable array (say I want to size of it, all a listing of the whole thing, not just one element of the array)
<craysiii>
you put local though, so it passes the if and fails at the IP regex
<ivanskie>
yep
<ivanskie>
i think ur right
<craysiii>
but thats not an error, its just a debug statement
<philn_>
i can add and revieve elements fom the array individually
arooni-mobile has joined #ruby
shinnya has joined #ruby
<ivanskie>
yep looks like it indeed fails at e.inspect
<craysiii>
we need to find out why it's not finding SerialPort.
Ilyas_ has quit [Read error: Connection reset by peer]
rbowlby has joined #ruby
Ilyas_ has joined #ruby
<craysiii>
find that out and you find out your answer. i am a ruby noob still so i don't know how much further i can delve without leading you in the wrong direction
lkba has quit [Ping timeout: 265 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<ivanskie>
hm.. i wonder if my ruby is too new
freerobby has joined #ruby
<bmcginty>
ivanskie: just making sure, you're on what, linux? mac?
<ivanskie>
osx yosemite
jhack has joined #ruby
<ivanskie>
this will ultimately somehow either endup on windows 8.1 machine or on it in linux vm..
nitenq has quit [Quit: nitenq]
<craysiii>
by chance do you have ruby-serialport gem?
platosha has joined #ruby
<ivanskie>
i'm trying to write a cheat... we have QuickCheck 800 which is a barcode verifier.. costs stupid money. looks like its 1990s.. and has a proprietary printer setup.. which is also priced at stupid. however its serial output is nicely formatted for a receipt printer.. so the goal is to write a program which will collect data from serial, and at first.. just print it to our receipt printer. then i'll re-format the data eventually..
<ivanskie>
uhm no i don't but i didn't see it being a requirement.
DoubleMalt has joined #ruby
<craysiii>
i didnt either but I also dont see a reference to it in the project, and I don't know where SerialPort is coming from
cloaked1 has joined #ruby
<ivanskie>
looks like that didn't help
<ivanskie>
yes it did.
<craysiii>
it worked?
xkickflip has quit [Quit: xkickflip]
<ivanskie>
yes and no. no more error. and it says its happy.
<craysiii>
whats the no then?
<ivanskie>
but i didn't get anything printed out on the printer. so this is something else i need to work on
<craysiii>
oh
<ivanskie>
i'll have to play around in irb/pry see whats there
<craysiii>
im going to raise an issue on the github page and recommend that ruby-serialport be added to the list of requirements. they might assume that someone dealing with a serial printer would already have it or something
<ivanskie>
awesome
dubkoidragon has joined #ruby
Mendenhall has quit [Ping timeout: 265 seconds]
<ivanskie>
thank you
robbyoconnor has quit [Ping timeout: 246 seconds]
arup_r has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
omegamike has quit [Remote host closed the connection]
<ivanskie>
its not the codes this time.. not yet anyway.. just put the printer into hexdump mode.. it would print anything and everything computer is sending to it.
<ivanskie>
and nothing.
nalley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
omegamike has joined #ruby
<ivanskie>
so app says written text.. but nothing is at the printer end yet..
<ivanskie>
argh
<ivanskie>
too bad i forgot visualbasic lol
s2013 has joined #ruby
fumihiro has quit [Ping timeout: 246 seconds]
<ivanskie>
and don't even want to bother with it. otherwise i think i'd start writing an app there
<craysiii>
why not c#?
rubie has quit [Read error: Connection reset by peer]
<ivanskie>
bah i'd have to learn thast
<ivanskie>
that*
SCHAAP137 has joined #ruby
<craysiii>
pretty similar to VB.net
jottr has quit [Read error: Connection reset by peer]
aryaching_ has quit [Ping timeout: 252 seconds]
cb_ has quit [Read error: Connection reset by peer]
jottr has joined #ruby
natbo has quit [Read error: Connection reset by peer]
icebourg has quit []
<myztic>
shevy: yes
mistermocha has joined #ruby
crdpink has quit [Excess Flood]
cb_ has joined #ruby
crdpink has joined #ruby
livcd has quit [Changing host]
livcd has joined #ruby
DaniG2k has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
prettiestPony11 has quit [Read error: Connection reset by peer]
<Scriptonaut>
hey guys, I wrote my own (well, mostly copied) a rake db:create task. It is giving me the error, PG::ConnectionBad: FATAL: database "my_user_name" does not exist. This is what happens when I do rake db:create. I'm not sure why it's trying to use my username. Anyone know what's going on? I included the database.yml file too: https://gist.github.com/robins35/5dfc68a77b1970ee9c2e
bronson has quit [Remote host closed the connection]
shadoi has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
kawaii has joined #ruby
kawaii has quit [Read error: Connection reset by peer]
danzilio has quit [Quit: My computer has fallen asleep!]
rideh has joined #ruby
Casty has joined #ruby
ascarter has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
but3k4 has joined #ruby
allomov has quit [Remote host closed the connection]
cndiv has joined #ruby
hanmac has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
<Antiarc>
Alternately, a Japanese sword made out of semiprecious gemstone
<cndiv>
Out of the ordinary question. I'm learning, and want to write myself a little program to take notes on what I'm eating, when I woke up, what exercises I did, what pills I've taken, where I was, etc. (I'm in a rebuilding mode in my life.) Has anyone seen something like this before?
rideh has quit [Quit: zap]
freerobby has joined #ruby
<mozzarella>
spreadsheet program? text editor? lol
Lucky_ has joined #ruby
mollymorphic has joined #ruby
<lupine>
cndiv, I store my weight in an sqlite database every day, via ruby
syath has quit [Quit: WeeChat 1.2]
<cndiv>
mozzarella: Like that, but with more reminders. It's 4pm, it's time to take pills ABC, as it's tuesday.
rideh has joined #ruby
cabreraM516 has joined #ruby
<lupine>
anyway, there's a pile of stuff like this (look at quantitative self), but nothing really does it well
Mendenhall has joined #ruby
<lupine>
working out what to track and how to present it is really the hard part
<cndiv>
lupine: That's a great place to start, thank you.
omegamike has quit [Remote host closed the connection]
<lupine>
fitday is a website that does this kind of thing. I can't really recommend it
<lupine>
and they're closed source, obs
jenrzzz has joined #ruby
aryaching has joined #ruby
rideh has quit [Client Quit]
<shevy>
lupine are you on weight watch :)
xkickflip has joined #ruby
cabreraM516 has quit [Client Quit]
<cndiv>
lupine: You seem to know a decent amount, is there a term for this sort of project?
<jhass>
Scriptonaut: you don't specify a DB to connect to, so postgres defaults to your users default DB which is the one with the same name as the user
<lupine>
qself is really the thing
stef204 has joined #ruby
<lupine>
shevy, i've been tracking my weight on and off since 2012
<lupine>
the data are really quite pretty
<jhass>
Scriptonaut: template1 would be a good candidate to connect to
poguez_ has joined #ruby
iamninja has joined #ruby
MissionCritical has joined #ruby
<lupine>
I'm pretty consistently somewhere between normal and overweight by BMI standards
DEA7TH has joined #ruby
bronson has joined #ruby
shadoi has quit [Quit: Leaving.]
saadq has joined #ruby
<shevy>
hmm would it make sense if Range would have a .sample method?
<Ox0dea>
shevy: No, that's what Random.rand is for.
<Scriptonaut>
ya, cannot drop the currently open database
<jhass>
what's unclear about it?
wallerdev has joined #ruby
cabreraM516 has joined #ruby
<Scriptonaut>
I'm not connected to it
phutchins has joined #ruby
<shevy>
cool
<Scriptonaut>
I'm not quite sure what's an open database
<jhass>
the error message says otherwise
seanot has quit []
<jhass>
the one you're connected to
<Scriptonaut>
so why would the solution be to connect to an entirely different db?
<Scriptonaut>
wouldn't it be to find what's connecting to it?
<Scriptonaut>
maybe zombie connections
<Ox0dea>
DON'T DEAD OPEN INSIDE
<jhass>
yes, note DB here means template1, rubybot etc, not postgresql server
<Scriptonaut>
ya. I'm connecting to rubybot
<jhass>
and then try to drop it
nitenq has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hanmac has joined #ruby
cornerma1 has joined #ruby
benlieb has joined #ruby
senayar has quit [Ping timeout: 246 seconds]
cabreraM516 has quit [Ping timeout: 272 seconds]
tejasmanohar has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
<Scriptonaut>
there doesn't appear to be any open connections, at least one's that are from me
<Scriptonaut>
ps aux | grep ruby returns nothing
mistermocha has joined #ruby
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
blackmesa has joined #ruby
shadoi has joined #ruby
saadq has quit [Remote host closed the connection]
cndiv has quit [Quit: Quit]
JoshL has quit []
mhf has quit [Quit: Yikes! Someone hit the wrong switch....]
krz has quit [Ping timeout: 246 seconds]
mhf has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
schmooster has joined #ruby
dudoom has quit [Quit: Konversation terminated!]
freerobby has quit [Quit: Leaving.]
yfeldblum has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 244 seconds]
jeramyRR has joined #ruby
jonee has quit [Ping timeout: 244 seconds]
mjuszczak has quit []
<Scriptonaut>
I did: SELECT * FROM pg_stat_activity, there is no connection to my db
workmad3 has joined #ruby
Soda has joined #ruby
<prefixed>
why is net-ssh's exec() method so heavy?
aryaching has quit [Ping timeout: 240 seconds]
<jhass>
Scriptonaut: so which DB do you connect to to drop it?
shadoi has quit [Quit: Leaving.]
aryaching has joined #ruby
Jarboe has quit []
<Scriptonaut>
jhass, ahh, that could be it
<Scriptonaut>
I connect to it
sshuff is now known as sshuff|gone
ItSANgo has joined #ruby
<jhass>
yeah, which the error message (and me, 3 times) is telling you
<Scriptonaut>
actually no I don't
dfockler has joined #ruby
<Scriptonaut>
Yes, I'm aware that it's reporting that something is connected to it, but I'm not connecting to it in the rake task, it's a single line, all it does is: ActiveRecord::Base.connection.drop_database @config[:database]
<jhass>
and .connection is connection to what...
<Scriptonaut>
so how do you drop it then?
<Scriptonaut>
that's what the activerecord docs say to do
mhf has quit [Ping timeout: 264 seconds]
<jhass>
as said already, you connect to another DB, eg template1 again
<Scriptonaut>
ahhhh
<Scriptonaut>
that's what you meant, alright
lkba_ has quit [Quit: Bye]
jeramyRR has quit [Quit: Peace out!]
benlovell has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
failshell has quit []
Papierkorb has joined #ruby
j4cknewt has quit [Remote host closed the connection]
gambl0re has quit [Remote host closed the connection]
j4cknewt has joined #ruby
Ox0dea has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
aryaching has quit [Ping timeout: 244 seconds]
lkba has joined #ruby
bmurt has quit []
sshuff|gone is now known as sshuff
benlovell has quit [Ping timeout: 252 seconds]
Jarboe has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
jhack has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
stantonnet has quit [Ping timeout: 252 seconds]
rodfersou has quit [Quit: leaving]
pengin has joined #ruby
iceyec has quit [Quit: iceyec]
j4cknewt has quit [Ping timeout: 244 seconds]
jackjackdripper has joined #ruby
noethics_ has joined #ruby
r33th4x0r has joined #ruby
Xeago has quit [Remote host closed the connection]
noethics has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
noethics_ is now known as noethics
msgodf has joined #ruby
iceyec has joined #ruby
antlong has joined #ruby
<antlong>
hello, can anyone point me towards a way of collecting perf metrics inside irb?
linuxboytoo has joined #ruby
postmodern has joined #ruby
jenrzzz has joined #ruby
<r33th4x0r>
antlong: go take a hike. this is a gemstone channel
<antlong>
sadly i dont know enough about ruby to know what that means
<r33th4x0r>
I have my own rock question: I've seen cut rubies at a rock show, and they are about $300 each. Is it worth buying a few?
ldnunes has quit [Quit: Leaving]
FernandoBasso has joined #ruby
<r33th4x0r>
Also like cut quartz is $150 each
<r33th4x0r>
they are about 2-3 cm in diameter
<r33th4x0r>
Reh heh heh
<r33th4x0r>
would've been a groups are developing.
<r33th4x0r>
Last of brucesht, boyer coyer and that at stake thing day
<r33th4x0r>
The worst the sucks ten reader i guess.
<r33th4x0r>
We are! Every fuckin gay!
<r33th4x0r>
Nothing but as watcha prove! It is garbage here are are billions of the Lost pushing paint dry. Lynx game. Colts, Ravens, Mexicans and use you take this good. With the Lost doo dee do nothings ever. notch, and fingers my eye queue one in most people are billions of dollars and have a bad season and football players my eye queue only time time we see 'em in registration during.
<r33th4x0r>
Last of the Rams to the Lost of the butthole
<r33th4x0r>
does it in the sucks ten reincarnation is a lynx game.
<r33th4x0r>
Football. Afternoons. Buck buck cornbucklers. It sucks ten reincarnation is college football. No one of the bubbles form more rapidly...would go brucesht! The worst sportray that mug with watching next to the worse those registrations port ever my eye queue one of brucesht boyer coyer football. No!
<r33th4x0r>
There all is good. When I cover made. It is college football game. Nothings events from Mexico. We do notch, and Latinos what foot ball is one nothing on election or long Saturday an accurate picture this than rears.
<craysiii>
o.o
<r33th4x0r>
It's no lie it's no lie it's who you keep in L.A. They go bored, makes me, it's a vegetable sprayers my eyes it success of the made. Proof. It's a football. When I cover starting some air under it in L.A. The worst sport ever made. When the Jaguars, Cornbuck.
<r33th4x0r>
Juni Jonn Joans Football and pooping. your inner, reader, hold me say oh my lose and fucking voter roadie. When he football. No!
<r33th4x0r>
There. Lowers to votes one than reincarnations of dollars and disparaging something fuckin the worst sport every fuckers, Cowboys, Redskins, Cornbuck cornhuskins, Cornbuckers, Cornbucklers.
<r33th4x0r>
Juni Jonn Joans and use you fill the disparaging on television. Puddle. It's about immigrants from Mexico. We do not ball.
<r33th4x0r>
The world carbonation is college football. No one not believe those registressed by recent give ee. With a jump pump pump pump pu pup motion.
<r33th4x0r>
It's a soccer group of the Super Bowl, events from Mexico. We doo doo doo doo doo doo doo doo.
<r33th4x0r>
you keep your ass, and voter the many valuable spray an accurate picture of dollars and football. Nothing? it success of the worse the butthole
mhf has joined #ruby
<r33th4x0r>
does it increase the cat blight hand, pour left hand distration
<r33th4x0r>
anyway culture teams the cat blight shoo woah! Freeze you keep in his that is thing paint dry. Lowers ram against each other, reader it, damn. You'd better games, and you take the disappointed and other, the immigrants from Mexicans and use your ass, and that mug with you prove! It is college football. No one of the worse those registressed by recent give a soccer group of the Jaguars, Cornhusk.
<r33th4x0r>
Husk Husk Husk, cornbucker game, so many valuable contributions translate to the Rams, see 'em in reincarnations to the same, it's a foot ball! Brucest boyer roadie. Put it would go brucesht boyer coyer boyer moyer boyer football! Brucest boyer royer! Boyer moyer football game. It's a soccer groups are disappointed and voter with they go flat at your right shown on television....trump pum pump
<r33th4x0r>
pum pump pump pump pu pup motion
<r33th4x0r>
anyway culture they lord, what a lot somethinks christians Football players ram against each other, friends alive-eh-eh, fiends alive a bad season and fucking characterization but as watchings ever made so bored, makes me, so boyer coyer!
<r33th4x0r>
Stop lawyyer and fingers
<jhass>
!ban r33th4x0r !T 1d flood
r33th4x0r was banned on #ruby by ChanServ [r33th4x0r!*@*]
r33th4x0r was kicked from #ruby by ChanServ [Banned: flood]
<demophoon>
ty jhass
<jhass>
yw
<apeiros>
oh
<craysiii>
i dont even understand
DaniG2k has quit [Ping timeout: 260 seconds]
<apeiros>
that one again
<jhass>
thanks for notifying
<demophoon>
anytime
<apeiros>
yepp, thanks demophoon
<Antiarc>
It's amazing that IRC is almost 30 years old and people still think that's funny.
Igorshp has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
<apeiros>
I honestly have no idea how damaged one's brain must be to do this.
fullofcaffeine has joined #ruby
Xeago has joined #ruby
omegamike has joined #ruby
<craysiii>
seems like schizophrenic ramblings
rideh has quit [Quit: zap]
<jhass>
prolly markov chain
<Antiarc>
I was gonna guess marvok chain
<Antiarc>
markov*
<craysiii>
lol
<ght>
Question: I have a ActiveSupport::TimeZone object that takes a user's time zone and allows me to pull the current day, month, hour, etc via the .now method.
<ght>
For example, timezone.now.hour currently returns 17, because their timezone is set to Eastern.
rideh has joined #ruby
<ght>
My question is, I need to be able to accurately subtract 24 hours, which with a Date object is easy.
<ght>
Obviously, with a date object, you wouldn't subtract hours, but you'd subtract days, months, etc.
<Antiarc>
Welcome to the horrific world of timezones! :D
<ght>
hah, well, it works fine normally, with .now.hour, .now.minute, etc.
<Antiarc>
ActiveSupport::TimeWithZone may do what you want?
danzilio has joined #ruby
<ght>
That's aall working properly, I simply need to be able to subtract 24 hours as I do with subtracting days ona Date object.
<ght>
uhhh
<Scriptonaut>
anyone know why ActiveRecord::Base.connection.create_database config[:database], options would tell me: PG::ConnectionBad: FATAL: database "rubybot" does not exist
<ght>
17:19 < ght> Question: I have a ActiveSupport::TimeZone object that takes a user's time
<Scriptonaut>
of course it doesn't exist, I'm trying to create it
<Antiarc>
TimeWithZone should behave like a Time object, except it's TZ-aware
<ruboto>
shevy, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<craysiii>
yes. timezones are ridiculous. yesterday i wrote a script to count up from an arbitrary unix time and display H%M%S, it kept jumping minutes apart, even though I was only adding 1.
charliesome has quit [Quit: zzz]
<ght>
ahh, brilliant Antiarc, thank you.
<jhass>
Scriptonaut: because you're trying to connect to it again?
vickleton has quit [Remote host closed the connection]
lxsameer has joined #ruby
acrux2003 has joined #ruby
rideh has quit [Quit: zap]
tennis has quit [Ping timeout: 264 seconds]
Mendenhall has quit [Ping timeout: 244 seconds]
crdpink2 has joined #ruby
jpfuentes2 has joined #ruby
gaboesquivel has joined #ruby
crdpink has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
<Papierkorb>
antlong: You mean you want to acquire that information? If so, use platform specific APIs (Or maybe there's a gem for that?). For linux, it boils down to parsing /proc/ files
<Papierkorb>
That's how tools like top do their work
<Papierkorb>
On windows, there's WINAPI for that, and on Mac I-have-no-idea
<antlong>
sorry, i've never used ruby before. i'm trying to figure out how to print some data about the state of the system, current cpu utilization, how much ram is used, etc.
<Papierkorb>
antlong: platform?
<antlong>
we are using heroku, but i can't easily install a gem, so i'm looking for something in pure ruby
eggoez has quit [Ping timeout: 246 seconds]
eminencehc has joined #ruby
user1138_ has joined #ruby
<Papierkorb>
antlong: for RAM, parse /proc/meminfo
<dfockler>
if I'm using chruby is it possible that C extensions aren't getting rebuilt when I change ruby versions and install gems?
<Papierkorb>
antlong: Yes, that's the official way to do it. No, there's no other API for it from Linux.
crdpink2 has quit [Ping timeout: 246 seconds]
crdpink has joined #ruby
user1138 has quit [Ping timeout: 255 seconds]
omegamike has quit [Remote host closed the connection]
fullofcaffeine has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devdazed has quit [Quit: Computer has gone to sleep.]
acrux2003 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 39.0/20150630154324]]
<antlong>
it was a little surprising, i spent 20 minutes googling and didn't find anything
<Papierkorb>
cheers
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
r_rios has joined #ruby
<antlong>
my use case here is to capture and store performance data while im executing some tests
<Scriptonaut>
does anyone know where the db/schema.rb comes from?
<Scriptonaut>
it seems like this doesn't come from activerecord::migrator.migrate
<Scriptonaut>
I figured it would be generated
<Scriptonaut>
is that a rails only thing?
<Papierkorb>
antlong: for CPU load, you have to read /proc/stat. figure out which column is which again (I forgot), and then read these values every x seconds to know what the CPU load was in that timeframe
sshuff is now known as sshuff|gone
elia has quit [Quit: Computer has gone to sleep.]
<antlong>
am i going about this the right way? is there anything often recommended to capturing web perf stats
<Papierkorb>
antlong: google for these file paths. You should find plenty information on them
fullofcaffeine has quit [Ping timeout: 264 seconds]
<r_rios>
Hello. I installed Ruby on Windows through RubyInstaller, but open is not working for https links. Here's the error: http://pastebin.com/dK3Tcxqa
<antlong>
Papierkorb it is, but im looking to capture perf data through irb
ItSANgo has quit [Quit: Leaving...]
gusrub has joined #ruby
<r_rios>
I'm trying to run a plain Ruby script, so this is not being cause by some weird framework trick
jottr has joined #ruby
Azure has quit [Excess Flood]
<Papierkorb>
antlong: Depends on what kind of information you need. You can of course capture the RAM and CPU load of the rails process(es) from the outside. For more finegrained information, you can have a look at the logs (they show time spent in rendering views and in the database). For the latter, you may like the rack-mini-profiler gem as drop-in solution
<antlong>
i'll check and see if new relic will give me what i need through the cli
Azure has joined #ruby
mary5030 has quit [Remote host closed the connection]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drbrain has quit [Ping timeout: 246 seconds]
duoi has joined #ruby
mistermocha has joined #ruby
A124 has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
Alangoose has joined #ruby
nofxx has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FernandoBasso has quit [Remote host closed the connection]
The_Phoenix has quit [Read error: Connection reset by peer]
drbrain has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
swgillespie has joined #ruby
radgeRayden has joined #ruby
swgillespie has quit [Client Quit]
gaboesquivel has quit [Remote host closed the connection]
patrickanth0ny has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
patrickanth0ny has joined #ruby
decoponio has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
victortyau has quit [Quit: Leaving]
senayar has joined #ruby
hj2007 has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
prefixed has quit [Changing host]
prefixed has joined #ruby
iwaffles has joined #ruby
s2013 has joined #ruby
user1138_ has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 265 seconds]
user1138 has joined #ruby
_ht has quit [Quit: Konversation terminated!]
freerobby has quit [Quit: Leaving.]
Soda has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
lxsameer has joined #ruby
elia has joined #ruby
shadoi has joined #ruby
robbyoconnor has joined #ruby
kies^ has quit [Ping timeout: 244 seconds]
acke has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
mistym has joined #ruby
a346 has quit [Quit: a346]
joelataylor has quit [Ping timeout: 272 seconds]
joelataylor has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r_rios has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
centrx has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]