Olipro has quit [Read error: Connection reset by peer]
[[thufir]] has quit [Max SendQ exceeded]
eoinkelly has joined #ruby
[[thufir]] has joined #ruby
caju has joined #ruby
Olipro has joined #ruby
quoin has joined #ruby
RenderRob has joined #ruby
ryandeussing has joined #ruby
qnix has joined #ruby
<qnix>
Any good ruby books for people who have been programmers for a while
ryandeus_ has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
<qnix>
maybe books that dive into advanced concepts
<qnix>
I just finished reading eloquent ruby, need something else
yfeldblum has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
thesheff17 has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
drPoggs has quit [Ping timeout: 260 seconds]
Hanmac1 has joined #ruby
optimusprimem has quit [Remote host closed the connection]
dpathakj has quit [Quit: dpathakj]
marcdel has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
eee19 has joined #ruby
dpathakj has joined #ruby
viszu has joined #ruby
dpathakj has left #ruby [#ruby]
dankest has quit [Quit: Peace]
nitish has joined #ruby
nitish has joined #ruby
zarubin has quit [Ping timeout: 240 seconds]
cody-- has quit [Quit: Computer has gone to sleep.]
nfk has quit [Quit: yawn]
defaultro_ has joined #ruby
drPoggs has joined #ruby
caju has quit [Remote host closed the connection]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
defaultro has quit [Ping timeout: 264 seconds]
defaultro_ is now known as defaultro
jbrechtel has joined #ruby
cody-- has joined #ruby
<obs>
qnix, this is very complete: Ruby cookbook of O'Reilly, here you can see the table of content http://pastebin.com/2YaA31c0
yasu_ is now known as yasu
obs has quit [Quit: Konversation terminated!]
gtrak has quit [Remote host closed the connection]
|jemc| has joined #ruby
<qnix>
I know most of the things It'll talk about but there are things that I haven't read in eloquent ruby
<qnix>
thanks
<pontiki>
qnix: what is it you're looking for?
znode has joined #ruby
i8igmac has joined #ruby
jbrechtel has quit [Ping timeout: 245 seconds]
<qnix>
Some advanced ruby books that don't talk about the basics at all and just dives in some advanced subjects
<pontiki>
the best book i've read recently was Metaprogramming Ruby
<qnix>
this is a very vague description I know.
<qnix>
pontiki: thanks, I'll check that one out
<aliljet>
pontiki: why was that the best?
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
and then sandi metz's book is p.awesome
marcdel has joined #ruby
<pontiki>
aliljet: it does an excellent job of explaining how ruby's object model works
<aliljet>
pontiki: would you say it's the all around best ruby programming book?
jamesaanderson has joined #ruby
<aliljet>
(I'm secretly on the prowl for a strong ruby book to sit next to me.)
<pontiki>
no, i don't think there is a single one
<aliljet>
yep, that's what I kind of thought
marcdel has quit [Client Quit]
quoin has quit [Quit: This computer has gone to sleep]
<qnix>
I've just started to learn ruby and comming from c,cpp,python I'm extremely amazed of the power and freedom of ruby. after reading for 10 minutes about it, I fell in love
nitish has quit [Remote host closed the connection]
__username__ has joined #ruby
<pontiki>
my list, so to speak, and it is by no means definitive: Eloquent Ruby, Programming Ruby (2.0 version), Metaprogramming Ruby, Practical OO Design in Ruby, Rails in Action (for rails 4), The RSpec Book
<qnix>
I don't know why I didn't learn it before.
<pontiki>
the last is quite dated now, should have an update
s_e has left #ruby ["Leaving"]
<pontiki>
and, of course, the online api docs
<aliljet>
pontiki: thanks, man, they are now on the list :)
<aliljet>
(to evaluate that is. :) )
Zeeraw has quit [Remote host closed the connection]
alastor__ has joined #ruby
<disgrntld>
Hello, I have a nested form in rails that generates a params with nested hashes. I'm augmenting those nested hashes in a very imperative way currently (http://pastie.org/8287714). I'd like to see a more functional solution to learn more about ruby.
jbomo has quit [Ping timeout: 256 seconds]
znode has quit [Remote host closed the connection]
dankest has joined #ruby
<alastor__>
how would I go about extending (as in partial class) a class if, on running .class method on it, i get something like this: Foo::Bar::Baz ?
<pontiki>
disgrntld: ask over in #rubyonrails
znode has joined #ruby
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
(it's okay to ask here, just more rails-ish stuff there)
nanoxd has joined #ruby
<disgrntld>
I thought about it, but it seemed more related to ruby functional programming, than rails-specific. I will if you still think so, though
<pontiki>
fair enough
<pontiki>
are you always going to add the same key/value pair to each hash in that structure?
<pontiki>
or will it sometimes be different?
znode_ has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
<disgrntld>
yea, but I did forget to add that not all nested hashes should be modified, just local_image_attributes and remote_image_attributes
<pontiki>
chars6: the error appears to indicate that open-uri would not follow a redirection for the url. try putting in the https version instead of the http version
<pontiki>
also, is there any particular reason you're running that sudo?
fourq_ has quit [Ping timeout: 268 seconds]
<chars6>
no, i don't think without sudo worked. i'll try without
pkrnj has joined #ruby
<pontiki>
that probably won't fix the redirect error; it's really a separate concern
<hadees>
I can't seem to get BigDecimal to round correctly, I want to use :banker mode aka BigDecimal::ROUND_HALF_EVEN but BigDecimal('31.5').round(1, BigDecimal::ROUND_HALF_EVEN).to_i and BigDecimal('32.5').round(1, BigDecimal::ROUND_HALF_EVEN).to_i
<hadees>
are the same
Nisstyre has quit [Quit: Leaving]
iliketur_ has joined #ruby
rickmasta has quit [Quit: Leaving...]
<hadees>
rounding wise I mean, it always rounds down
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
freeayu has joined #ruby
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rickmasta has joined #ruby
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
St_Marx has quit [Quit: Ex-Chat]
jamesaanderson has joined #ruby
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
haxrbyte has quit [Remote host closed the connection]
iliketur_ has joined #ruby
haxrbyte has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
huoxito has quit [Quit: Leaving]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
Rym has quit [Ping timeout: 260 seconds]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ner0x has quit [Quit: Leaving]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
cads has quit [Ping timeout: 256 seconds]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
__username__ has quit [Ping timeout: 246 seconds]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
optimusprimem has quit [Read error: Connection reset by peer]
iliketur_ has quit [Max SendQ exceeded]
rcosta has quit [Remote host closed the connection]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
snovak has joined #ruby
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
iliketur_ has quit [Max SendQ exceeded]
DanKnox_away is now known as DanKnox
cburyta has joined #ruby
pwh has quit [Quit: pwh]
cburyta has quit [Remote host closed the connection]
iliketur_ has joined #ruby
lucazi has joined #ruby
znode has quit [Ping timeout: 268 seconds]
fourq_ has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 268 seconds]
jbrechtel has joined #ruby
pwh has joined #ruby
V8Energy has joined #ruby
<V8Energy>
is green_shoes currently the best GUI kit solution for ruby?
<jrobeson>
V8Energy, that seems unlikely. considering that it still deps on gtk 2.
<V8Energy>
jrobeson: what would you recommend?
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jrobeson>
i'm not sure.. but i'd go with more direct native bindings
<jrobeson>
like qt, or gtk3 directlly (if it exists)
<V8Energy>
I see..
<V8Energy>
thanks
<jrobeson>
i just stick with web applications.. because i know it will work everywhere :)
shellox has joined #ruby
<shellox>
hi
<V8Energy>
jrobeson: web applications are limiting. for example I want to create a movie library application. I want it to scan my computer for movies and when I double click on a certain movie it will open the file with the default media player
<shellox>
what's the easiest way to create a tar.gz on linux, without piping it to the system?
<jrobeson>
V8Energy, well even something like adium on mac uses a webkit based widget for acdtually display
<jrobeson>
so.. basically a minimal qt wrapper around a qt-webkit frame
<jrobeson>
so you still code most of the gui the same as a web app.. but it's still fully native
<jrobeson>
in that you can do file operations or whatever
hiroyuki has quit [Read error: No route to host]
<jrobeson>
anyways.. you might actually like qt :)
<jrobeson>
a lot of people do
<jrobeson>
if there are decent ruby bindings anyways
jamesaanderson has joined #ruby
hiroyuki has joined #ruby
<jrobeson>
i'm only most familiar with the python ones being up to date
IcyDragon has quit [Quit: Space~~~]
<jrobeson>
V8Energy, if i were to compare the amount of people who do GUI apps in ruby vs python.. it's like 1 to 50 :
heftig has joined #ruby
<V8Energy>
are u advising to switch to python? :)
<jrobeson>
i'm not advising anything
<jrobeson>
but if you don't find the ruby bindings for popular gui toolkits like qt or gtk up to snuff, then you should take a look elsewhere
zhtx has joined #ruby
<jrobeson>
that is.. unless you wanna spend more time hacking the bindings than actually building your app
pkrnj has quit [Quit: Computer has gone to sleep.]
kung has quit [Read error: Connection reset by peer]
kung has joined #ruby
quoin has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
DanKnox is now known as DanKnox_away
Targen has joined #ruby
eoinkelly has quit [Ping timeout: 245 seconds]
eoinkelly_ has joined #ruby
<disgrntld>
hello, how do I determine if an identifier is a method? I tried `a.class` where a is `def a; {foo: true}; end` and it just says Hash
tomzx_mac has quit [Read error: Operation timed out]
Fuzai_ has joined #ruby
sprites has joined #ruby
Fuzai has quit [Ping timeout: 240 seconds]
sprites has quit [Client Quit]
<pontiki>
a method won't have any class
Alina-malina has quit [Ping timeout: 245 seconds]
<pontiki>
the .class only acts on the return value of method a
<disgrntld>
ahh
<pontiki>
actually, it's an interesting question....
<pontiki>
i think your only option there might be to check with .responds_to?
<pontiki>
.respond_to?
Vivekananda has quit [Quit: Ex-Chat]
<disgrntld>
I tried a.respond_to?(:call)
<disgrntld>
it was false
<disgrntld>
the reason I ask is because I'm trying to figure out what's going on with this http://pastie.org/8287914
<disgrntld>
I guess once 'a' is declared as a local_variable it takes precedence over a method with the same name?
freeayu has quit [Quit: This computer has gone to sleep]
<pontiki>
yes
<disgrntld>
ok, cool
Alina-malina has joined #ruby
defaultro has quit [Ping timeout: 240 seconds]
<disgrntld>
btw, your solution to my nested hash modification worked great
duracrisis has quit [Ping timeout: 245 seconds]
<pontiki>
um, if you do a.respond_to?(:x) -- you are again checking if the return value of a responds to :x
<pontiki>
you need to check whether the class that contains the method a responds to a
<disgrntld>
ohhhh
<pontiki>
self.respond_to?(:a)
<disgrntld>
cool
<pontiki>
or self.class.respond_to?(:a)
<pontiki>
first case a is an instance method, second case, a is a class method
pkrnj has joined #ruby
freeayu has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
vedic1 has joined #ruby
<vedic1>
Hi, I am new to ruby. I am trying to install redmine but getting error while running this command: "sudo bundle install --without development test" . I am using ruby 1.9.x and postgres 9.1 on ubuntu 12.04 64bit
<vedic1>
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
<pontiki>
do you have build-essential package installed from apt-get?
<vedic1>
pontiki: no.
<vedic1>
pontiki: installing it now
<pontiki>
you may need some other packages, too
snovak has joined #ruby
<vedic1>
pontiki: ok, now I am getting error: An error occurred while installing pg (0.16.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.16.0'` succeeds before bundling.
<vedic1>
I have postgresql installed. I have configured database.yaml for redmine
byprdct has joined #ruby
<pontiki>
might need the -dev package
<vedic1>
I see
nari_ has joined #ruby
quoin has quit [Quit: This computer has gone to sleep]
jbrechtel has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 268 seconds]
pweems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
<pontiki>
i think it's libpq-dev
dankest has joined #ruby
<xybre>
I've been using Moneta in my latest gem, but it doesn't seem to do all the basics like cache-busting/forced-resyncing and connection-readiness, does anyone know of a better strategy for dealing with this situations than jsut directly accessing the backend data store objects?
intuxicated has joined #ruby
intuxicated has quit [Changing host]
intuxicated has joined #ruby
a13x212 has joined #ruby
jbrechtel has quit [Ping timeout: 240 seconds]
justsee has quit [Ping timeout: 240 seconds]
decoponio has joined #ruby
eoinkelly has joined #ruby
ananthakumaran has joined #ruby
eoinkelly_ has quit [Ping timeout: 256 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antulik-afk is now known as antulik
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<vedic1>
pontiki: ok, I have resolved that. Now getting another error: An error occurred while installing rmagick (2.13.2), and Bundler cannot continue. Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.
mansi has quit [Remote host closed the connection]
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
kobain has quit []
<xybre>
a13x212: try doing `line.strip ==`...
<xybre>
a13x212: Since you're trying to match exactly, any white space would cause it to fail.
<a13x212>
awesome thanks xybre
mansi has quit [Ping timeout: 240 seconds]
justsee has joined #ruby
browndawg has joined #ruby
ryandeussing has joined #ruby
lyanchih has joined #ruby
lyanchih has quit [Client Quit]
byprdct has quit [Ping timeout: 246 seconds]
nitish has quit [Read error: Connection reset by peer]
nitish has joined #ruby
lyanchih has joined #ruby
ryandeussing has quit [Ping timeout: 245 seconds]
lyanchih has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
lyanchih has joined #ruby
<pontiki>
vedic1: are you missing Magic-config?
Dreamer3 has quit [Ping timeout: 245 seconds]
fomatin has joined #ruby
musl has quit [Quit: WeeChat 0.4.1]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
quoin has joined #ruby
browndawg has quit [Quit: Leaving.]
freeayu has quit [Ping timeout: 256 seconds]
<vedic1>
pontiki: I have installed imagemagick via apt-get. I can see MagicCore.pc in /usr/lib/pkgconfig and I have set the path PKG_CONFIG_PATH to /usr/lib/pkgconfig (also checked it with echo). But same error
osvico has quit [Ping timeout: 268 seconds]
fomatin has quit [Quit: Computer has gone to sleep.]
amacgregor__ has quit [Read error: Connection reset by peer]
tyfighter has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
eka has quit [Quit: Computer has gone to sleep.]
hogeo has quit [Ping timeout: 260 seconds]
<jrobeson>
vedic1, for rmagick do you need imagemagick-dev also?
hogeo has joined #ruby
shouya1 has quit [Quit: Leaving.]
amacgregor has joined #ruby
mumblerit has quit [Remote host closed the connection]
bleubear_ has quit [Remote host closed the connection]
mumblerit has joined #ruby
mumblerit is now known as Guest63386
<vedic1>
jrobeson: I did this: apt-get install libmagickwand-dev and all is well
<jrobeson>
i'm not familiar with libmagickwand :(
jbrechtel has joined #ruby
Guest63386 is now known as mumblerit
Bosox20051 has quit [Ping timeout: 248 seconds]
jbrechtel has quit [Ping timeout: 240 seconds]
jbomo has quit [Ping timeout: 260 seconds]
jonahR has joined #ruby
jonahR has quit [Client Quit]
lyanchih has quit [Quit: lyanchih]
dangerousdave has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
noop is now known as noopq
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
hogeo_ has joined #ruby
mansi has joined #ruby
hogeo has quit [Ping timeout: 264 seconds]
hormonel has joined #ruby
<hormonel>
hy
<hormonel>
i have a problem
<hormonel>
i make a small ruby program
mrsolo has joined #ruby
<hormonel>
maked
<hormonel>
i ran it
<hormonel>
and it's apear a black window that disapear rapidly
<Hanmac>
use a better OS ? ;P or add a "gets" at the end of the code
<hormonel>
simply 'gets'? no other thing?
mansi has joined #ruby
<Hanmac>
no i mean gets without the '' ... it means that the program waits for user input and does not close the console window
<xybre>
hormonel: open cmd.exe and run the ruby script from the command line there
<xybre>
That will show you the output/errors/etc
mrsolo has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
<hormonel>
i have a syntax error expecting tidentifier ":"
<jrobeson>
then your code is broken and you must fix it.
<hormonel>
well i cant find what's wrong
<xybre>
You should look at the line number
<hormonel>
dont give me any line number
<hormonel>
the second sentence from the error paste a part of the code
<hormonel>
puts 'wellcome ' + name + 'enjoy and stay here!'
<hormonel>
but i cant reach whats wrong
<hormonel>
seems correct to me
eldariof has joined #ruby
<Hanmac>
hormonel: it smells that your code is from <1.8 and does not work anymore
<xybre>
try `put "Welcome #{name}, enjoy your stay here!"`
<hormonel>
ah that was
<Hanmac>
hormonel: some where in the code you have a case *** when ***: *** end
jonahR has joined #ruby
jonahR has quit [Client Quit]
jonahR has joined #ruby
<xybre>
I was around for 1.8 but I have no idea what the hell that does.
<hormonel>
xybre i've got another error
marcdel has joined #ruby
marcdel has quit [Client Quit]
axeman- has joined #ruby
<hormonel>
in '<main>' : undefined method 'put' for main: object <nomethoderror>
<xybre>
Coding is 90% errors 9% doing the wrong thing and 1% "ITS ALIIIIIIIVE"
<Hanmac>
hormonel: he made an error, its puts
<hormonel>
Hanmac i've thinked at that too
<xybre>
Ah, yeah, typos. I'm so good at typos.
antulik is now known as antulik-afk
diavolul has joined #ruby
<diavolul>
so i've must learn from official website where they work whit 2.0
freerobby1 has quit [Quit: Leaving.]
<diavolul>
it's me hormonel
hormonel has quit [Ping timeout: 264 seconds]
DanKnox_away is now known as DanKnox
nerocrux has joined #ruby
txdv has joined #ruby
noopq has quit [Ping timeout: 245 seconds]
DaZ has quit [Ping timeout: 245 seconds]
<Hanmac>
diavolul: i think you use an case when with its old syntax the : is not supported anymore, but you can use ;
tyfighter has quit [Quit: tyfighter]
sevenseacat has joined #ruby
DanKnox is now known as DanKnox_away
DaZ has joined #ruby
Lewis has joined #ruby
Lewis is now known as Lewix
snovak has joined #ruby
threesome has joined #ruby
jbrechtel has joined #ruby
platzhirsch has joined #ruby
noopq has joined #ruby
brain_shim has quit [Ping timeout: 264 seconds]
<platzhirsch>
Obviously if I do puts `tail -f log.txt` the script will hang, because due to follow it does not terminate. There are other ways to watch files, but from the executing a system call perspective, any idea how you can fetch a part of these streamed values?
hormonel has joined #ruby
diavolul has quit [Ping timeout: 264 seconds]
<xybre>
platzhirsch: with grep?
<platzhirsch>
xybre: no, you could just run `tail log.txt` to achieve termination
snovak has quit [Ping timeout: 256 seconds]
axeman- has quit [Remote host closed the connection]
<xybre>
You said "fetch a part", which could mean anything, so I assumed you meant filtering it based on a pattern.
lkba has quit [Ping timeout: 248 seconds]
<xybre>
platzhirsch: I happen to have written a pure ruby log reader a few months ago: https://gist.github.com/acook/4561129 But since I don't know what you're trying to do, its difficult to tell if its what you're looking for.
<platzhirsch>
xybre: ah yes, my bad. I mean, if you run system('tail -f log,txt') for instance, the content of log.txt is printed to the standard output
jbrechtel has quit [Ping timeout: 245 seconds]
<xybre>
Well, "-f" means "follow".
<platzhirsch>
that's fine
<platzhirsch>
I just wondered, if you could run the tail -f command (which spawns a process), and store the streamed content somewhere so you can output it yourself
<xybre>
My log reader also "follows" while letting you process each line as it comes in.
<platzhirsch>
because with system('tail -f log.txt') your script will go into blocking
<platzhirsch>
xybre: it's just that I don't want to read a log file, I want to know how to achieve this with any kind of command that I could run on the system shell
lyanchih has joined #ruby
<platzhirsch>
I mean there is even a file-tail gem
crunch-choco has joined #ruby
<xybre>
You're actually asking for IPC, whic his a different problem. You can capture the output of a run command and store it it for later retrieval, but if the process never exists, you need to wrap the output and pull it back incrementally, for that you can use a unix socket or pipes.
brain_shim has joined #ruby
<xybre>
s/exists/exits
brain_shim has quit [Max SendQ exceeded]
hogeo_ has quit [Remote host closed the connection]
zarubin has quit [Read error: Operation timed out]
diavolul has joined #ruby
io_syl_ has joined #ruby
hormonel has quit [Ping timeout: 245 seconds]
io_syl has quit [Ping timeout: 240 seconds]
axeman- has quit [Ping timeout: 240 seconds]
axeman- has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
brisbin has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
blackmesa has joined #ruby
jonahR has quit [Quit: jonahR]
brisbin has joined #ruby
wallerdev has quit [Quit: wallerdev]
eoinkelly has left #ruby [#ruby]
nfk has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
wudofyr has quit [Remote host closed the connection]
blackmesa has joined #ruby
wudofyr has joined #ruby
mansi has joined #ruby
hiyosi has quit [Quit: WeeChat 0.4.1]
hiyosi has joined #ruby
hamed_r has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
Apocalypse has quit [Quit: Input/Output Error]
hiyosi has quit [Quit: WeeChat 0.4.1]
V8Energy has quit [Ping timeout: 264 seconds]
hiyosi has joined #ruby
tgyhuji has joined #ruby
brain_shim has quit [Read error: Operation timed out]
weems has quit [Ping timeout: 246 seconds]
tgyhuji has quit [Remote host closed the connection]
Kelet has joined #ruby
diavolul has quit [Ping timeout: 246 seconds]
Apocalypse has joined #ruby
cellx has joined #ruby
brain_shim has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
marcdel has joined #ruby
ping-pong has quit [Read error: Operation timed out]
io_syl_ has quit [Quit: io_syl_]
hakunin has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
workmad3 has joined #ruby
claymore has joined #ruby
carraroj has joined #ruby
Cyrus has joined #ruby
ryandeussing has joined #ruby
<platzhirsch>
*snore*
workmad3 has quit [Read error: Operation timed out]
ryandeussing has quit [Read error: Operation timed out]
snovak has joined #ruby
timonv has joined #ruby
yfeldblum has joined #ruby
kilophoton has joined #ruby
jbrechtel has joined #ruby
ping-pong has joined #ruby
mneorr has joined #ruby
snovak has quit [Ping timeout: 245 seconds]
S0da has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kilophoton has quit [Ping timeout: 264 seconds]
jbrechtel has quit [Ping timeout: 264 seconds]
lewis has joined #ruby
Nanuq has quit [Quit: Lost terminal]
DaZ has quit [Read error: Operation timed out]
crunch-choco has quit [Remote host closed the connection]
jmimi has joined #ruby
jmimi has left #ruby [#ruby]
gildo has joined #ruby
relix has joined #ruby
DaZ has joined #ruby
dangerousdave has joined #ruby
yxhuvud has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
yxhuvud2 has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
mike4_ has quit [Ping timeout: 240 seconds]
_5kg has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
<platzhirsch>
What's up in the Ruby mine?
mansi has quit [Ping timeout: 264 seconds]
<Hanmac>
platzhirsch: i am quoting jokes; "Buster and Babs: Buster and Babs Bunny...No relation! Noah: Let's hope not! It's a children's show! "
<platzhirsch>
Hanmac: is there ruby-jokes gem ?
<Hanmac>
not that i know ;P
<platzhirsch>
then you should write one
<platzhirsch>
which injects the jokes into stdout, stderr and several loggers so it can be secretly added for fun to a project
dangerousdave has quit [Quit: Leaving...]
<Hanmac>
platzhirsch: isnt there a fortune gem that uses the fortune programm?
chairabanta has joined #ruby
workmad3 has joined #ruby
<jrobeson>
there is a ruby-jokes repository
eldariof has quit [Remote host closed the connection]
<jrobeson>
but it's not really about jokes :(
carraroj has quit [Ping timeout: 264 seconds]
dangerousdave has joined #ruby
<jrobeson>
close_enough
<jrobeson>
By calculating the Damerau-Levenshtein distance between existing methods and what you actually typed, we infer the intended method from method calls with small typographical errors (an edit distance of < 3).
strax has joined #ruby
eldariof has joined #ruby
iliketur_ has joined #ruby
mengu has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
sevenseacat has quit [Quit: Leaving.]
dash_ has joined #ruby
iliketur_ has quit [Ping timeout: 264 seconds]
masteesw has joined #ruby
zarubin has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
snovak has joined #ruby
alem0lars has quit [Read error: Operation timed out]
BRMatt has joined #ruby
shevy has joined #ruby
alyi has joined #ruby
colonolGron has joined #ruby
jbrechtel has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
zai has joined #ruby
stack has quit [Ping timeout: 245 seconds]
<zai>
I'm doing evil things in ruby ... passing variable definitions to "each" blocks. Can someone explain why I'm getting "Fixnum" instead of "Array" in the second block?: http://pastebin.com/ghEswY2w (I know that it's not proper style, just curious.)
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
stack has joined #ruby
dash_ has quit [Quit: dash_]
Dave is now known as Guest65555
justsee has joined #ruby
<xybre>
zai: looks like the values are being expanded, you can see the first value from each sub-array is being assigned to your row variable.
jbrechtel has quit [Ping timeout: 245 seconds]
ismlages has joined #ruby
<zai>
xybre: yeah, it's giving the first elements of each array. i tried setting the variable to 1 or 2, in order to get 2nd or 3rd element, but always getting the first. not really sure what ruby is doing there internally and why it works with each_with_index
corpuscle has quit [Quit: WeeChat 0.4.1]
razi has joined #ruby
sayan has joined #ruby
<xybre>
zai: the array splitting is a feature, the rest of the elements are being split up into the different variables. https://gist.github.com/acook/6403617
viszu has joined #ruby
alem0lars has joined #ruby
freeayu has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<platzhirsch>
I hate to use methods with a question mark inside the conditional operator
<xybre>
I avoid the ternary operator for the most part, either using real if/then or pure booleans &&/||. Occassionally, it makes sense over those other options, but rarely.
<platzhirsch>
xybre: great :)
quazimodo has quit [Ping timeout: 245 seconds]
<platzhirsch>
lewis: try is syntactic sugar in Rails, isn't it?
Spami has quit [Quit: This computer has gone to sleep]
<lewis>
platzhirsch: yes but might not be what you're looking for
<shevy>
platzhirsch yeah, the ternay operator looks ugly
<shevy>
it's strange that in ruby, the rest of the code can look beautiful, then certain things like the ternary operator or ->() just does not fit in at all
mansi has quit [Ping timeout: 264 seconds]
punkrawkR has joined #ruby
<xybre>
Well, the ternary is from perl and some other languages (C?).
<zai>
xybre: oh, I see! Thanks a lot! (and sorry for the delay)
altamic has joined #ruby
altamic has left #ruby [#ruby]
nerocrux has joined #ruby
<xybre>
shevy: What other languages use that -> syntax for lambdas/functions other than coffeescript?
<Hanmac>
:P "o.nil?? ?a:?b"
<shevy>
xybre no idea, the other languages bore me usually too much to look into them further
senayar has joined #ruby
<shevy>
once you use feature x/y/z from a language, you expect equivalent features in other languages
ericmathison has quit [Ping timeout: 264 seconds]
axeman- has quit [Remote host closed the connection]
nerocrux has quit [Remote host closed the connection]
nerocrux has joined #ruby
<xybre>
Yeah, but languages are different, and thats kind of a good thing. There's a lot of things I do in Ruby that I wouldn't even care to try in other languages, and vice versa.
diegoviola has joined #ruby
Neomex has joined #ruby
<Hanmac>
in C i often do "#if 0" ;P
swordsmanz has quit [Read error: Connection reset by peer]
colonolGron has quit [Ping timeout: 256 seconds]
swordsmanz has joined #ruby
hoyang has joined #ruby
<xybre>
I use Ruby more than anything, and I use bash/zsh to do heavy lifting too, and I've used Haskell, Clojure, Icon, Rexx, BASIC, and others. I'd like to have some combinations of those features, but often I realize that they're mostly purpose built to that environment.
Guest65555 has quit [Quit: Leaving...]
<Hanmac>
xybre: my first language was QBasic on an 386er with Win3.1 ;P
ryandeussing has joined #ruby
<xybre>
Eh, I used Applesoft BASIC on an Apple ][e.
nerocrux has quit [Ping timeout: 264 seconds]
<xybre>
Then GW BASIC, and a little Q BASIC, around the same time as REXX because REXX was built into PC-DOS.
<xybre>
But that was.. A long time ago.
<Hanmac>
long time ago when internet was shipped via sounds ;P
alyi has quit [Remote host closed the connection]
<taion809>
mmm delicious baud
lkba has joined #ruby
BizarreCake has joined #ruby
<xybre>
Yeah, the internet didn't exist when I first typed LIST.
lewis has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
lewis has joined #ruby
lewis is now known as Lewis
Lewis is now known as Lewix
iliketur_ has quit [Ping timeout: 246 seconds]
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
_serial_ has joined #ruby
relix has joined #ruby
quazimod1 has joined #ruby
braoru has joined #ruby
_serial_ has quit [Client Quit]
jbrechtel has joined #ruby
ndrei has joined #ruby
jbrechtel has quit [Ping timeout: 268 seconds]
<xybre>
freakcult: ??
<freakcult>
1
<freakcult>
hi
<freakcult>
how can i test a Model in cucumber?
<freakcult>
shouldn't i test it?
<freakcult>
this way i mean
<freakcult>
i been on youtube, now i know that TDD is a big deal, i like the idea and i wanna adhere to it, been reading the books of cucumber and rspec taking me a lot of time, i wanna get started
<freakcult>
i wanna start my TDD era by creating a basic model class and test it
<freakcult>
coz thats the most basic thing in an application, and its even application agnoastic if it will be a web app or an api or desktop/mobile app
<freakcult>
@xybre any help?
<freakcult>
who got the goodies???
<freakcult>
i need a few pointers
<shellox>
ah i should fix my fucking font :(
senayar has quit [Remote host closed the connection]
nerocrux has joined #ruby
jbpros has joined #ruby
<shevy>
freakcult you know you can use ruby without TDD
<xybre>
freakcult: Don't use Cucumber for model testing, period. I'd recommend not using it all, and using plain Capybara+Rspec for web browser testing.
carraroj has joined #ruby
jbpros has quit [Client Quit]
mansi has joined #ruby
senayar has joined #ruby
<freakcult>
@shevy i love ruby without TDD
<xybre>
freakcult: use plain Rspec or Minitest
<freakcult>
@shevy some would say thats the prblem
<shevy>
freakcult show me who would say so
<freakcult>
@xybre just rspec sounds nice
<shevy>
xybre why does he use @ :(
<shevy>
hey @@xybre how do you do
<freakcult>
the thing is i just wanna know how to do cucumber, then say no thats not for me
<xybre>
shevy: probably used to twitter/fb?
<shevy>
you became a class variable
<shevy>
hmmm ... you can IRC through fb???
<shevy>
what devilish scheme is that
Nanuq has joined #ruby
<freakcult>
its the internet's at (@)
<xybre>
freakcult: then go to the homepage and read the docs, but Cucumber doesn't have anything to do with TDD
<freakcult>
@email.com
carraroj has quit [Ping timeout: 246 seconds]
<shevy>
yeah freakcult but people on IRC rarely use it, just look at the others ;P
<freakcult>
ok, what do u think cucumber is designed to do?
<shevy>
well
<shevy>
google tells me
<xybre>
freakcult: waste everyone's time and resource so that consulting firms can make more money.
obs has quit [Quit: Konversation terminated!]
mansi has quit [Ping timeout: 246 seconds]
gyre007 has joined #ruby
<shevy>
"Cucumber - Making BDD fun"
<shevy>
so when you write TDD "<freakcult> i wanna start my TDD era" I wonder if you really meant TDD :P
<shevy>
or is it all the same
<freakcult>
xybre i find the consiperacy theory intreting nevertheless i wanna explore.. coz now we have cucumber and steak, meaning the hype is ON :D so we better get our story straight before telling the new guys not to use it for x,y,z
kiela has quit [Remote host closed the connection]
<diegoviola>
i like the simplicity of minitest, not sure i like cucumber
<xybre>
The hype is over, everyone was using it like 3 years ago, but it was a big cargo cult. Now people have gotten smart and stopped using it.
d33tah has joined #ruby
<xybre>
Cucumber is one in a long line of systems designed to let non-programmers write code or executable specifications.
<d33tah>
can I override Integer addition in Ruby? if so, how?
<d33tah>
(only for experimentation purposes)
<xybre>
d33tah: override integer addition?
<d33tah>
like Integer.+
quazimod1 has quit [Ping timeout: 245 seconds]
<xybre>
d33tah: Sure. class Integer; def + value; puts "lulz, no addition 4 u"; end
<d33tah>
hm, and if I wanted to inject it into the current Integer class, so that all other operations work correctly?
<freakcult>
@d33tah pryrepl.org and start playin
gyre007 has quit [Ping timeout: 246 seconds]
<d33tah>
I already have irb, just no idea how to achieve what I want
<shevy>
d33tah ruby classes should be open at runtime
<xybre>
d33tah: There's no "current", classes are effectively in the global scope (but may be namespaced), and ingegers themselves may be singletons (for Fixnums this is true)
<shevy>
so if you modify class Integer like xybre showed you, it affects everything further henceforthwith
<shevy>
(related to an Integer that is)
<d33tah>
but won't it remove the remaining methods?
nerocrux has quit [Remote host closed the connection]
<shevy>
remove a method?
<Hanmac>
you can also overwrite the +@ method ;P
<shevy>
if you change one method, how can you "remove the remaining methods" d33tah?
<d33tah>
that's what I want
<xybre>
d33tah: Reopening classes doesn't remove anything, they are append only :)
<d33tah>
ah
<d33tah>
okay, i'll try it out
<xybre>
d33tah: It will overwrite things, and you can *intentionally* remove methods, but it won't happen by just reopening a class.
<xybre>
Hanmac: +@ is the binary operator
<xybre>
iirc
<d33tah>
irb(main):023:0> class Integer; def + value; return 5; end; end
<d33tah>
=> nil
<d33tah>
=> 4
<d33tah>
irb(main):024:0> 2+2
<xybre>
Careful, paste too much and Freenode will disconnect you :)
<Hanmac>
xybre: no, -@ is the difference between -5 and - 5
<d33tah>
i know, that's it's why just two lines
<xybre>
4 lines here
<xybre>
Hanmac: Yes :)
<d33tah>
right. i'm a bit sleepy.
<d33tah>
anyway, it didn't work - it's still four, not 5.
<xybre>
d33tah: class Fixnum; def + value; return 5; end; end
<d33tah>
nice!
<d33tah>
i like it :)
<xybre>
2.class #=> Fixnum, not Integer
<d33tah>
thats's something I couldn't do in Python
rockets has joined #ruby
<xybre>
d33tah: No? Huh. Well, Ruby is similar, but pretty different. Python is a little more "functional" and Ruby is more "object-oriented".
<xybre>
The above is an artifact of the smalltalkish OO Ruby has.
<shevy>
python is too silly to understand self
jbrechtel has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
ewnd9 has quit [Read error: Operation timed out]
gildo has quit [Ping timeout: 268 seconds]
zastern has quit [Ping timeout: 268 seconds]
maasdesigner has joined #ruby
<maasdesigner>
hi i use radiantcms built with ruby, when i type bundle exec rake db:bootstrap i get the following here and my gemfile in gist https://gist.github.com/maasdesigner/6404043
jbrechtel has quit [Remote host closed the connection]
<maasdesigner>
#radiantcms is silent maybe i've hanged there 2-3 weeks :)
<xybre>
Ouch :/
nerocrux has joined #ruby
dhruvasagar has joined #ruby
banisterfiend has joined #ruby
<taion809>
anyone have a little time to step through a project with me? it's a little sinatra application to execute jobs based on a post request. it works fine but as i just started learning ruby i'm quite sure it is not idiomatic :D
hamed_r has quit [Quit: Ex-Chat]
<xybre>
maasdesigner: Google every error yo uencounter, it'll help a lot
freakcult has quit [Ping timeout: 245 seconds]
<maasdesigner>
actually. i am looking for a CMS work with. i am designer and i've got some online ruby and rails courses and also readed a book from Chris Pine, i spend my 1 month with RefineryCMS but i left it because of it is complicated and too many stuck for me
<xybre>
maasdesigner: What do you intend to do with it?
<maasdesigner>
i dont know what to do now, i am confused, i finished courses about ruby and readed many tutorials, i first made my personal pages in ror
sevenseacat has joined #ruby
hmca has quit [Remote host closed the connection]
<maasdesigner>
i want to develop back end front end side
<maasdesigner>
and of course learn step by step
<xybre>
Railscasts and ppepcode have loads of great tutorials
<banisterfiend>
maasdesigner learn rails or sinatra
<xybre>
For more Ruby stuff, there's always Why's Poignat Guide, tryRuby, etc.
freakcult has joined #ruby
<xybre>
It's almost 6am, I better crash. Been coding or reading about code since I woke up 18 hours ago. @_@
<maasdesigner>
xybre: banisterfiend i finished whys poignant guide, chris pine book, some part of Russ Olsen of eloquent ruby, ruby koans
duracrisis has quit [Ping timeout: 264 seconds]
<maasdesigner>
i have intermediate information of Rails and i made my first web site and upload heroku
<banisterfiend>
maasdesigner books aren't that important -- you have to write code :D
DrCode has quit [Remote host closed the connection]
<xybre>
maasdesigner: Start a project, come up with an idea, then build a little site, or a little plain Ruby app (without Rails), maybe a useful command line script, and then build some more web-related things. But you need to have a goal to know what to learn.
<maasdesigner>
yes banisterfiend thats what i am saying also
<xybre>
And go on GitHub and look at source code, clone the repos down, break the tests and figure out how code works. Use Pry to get inside objects and explore them from the inside out.
mansi has quit [Remote host closed the connection]
noopq has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
Rym has joined #ruby
quoin has quit [Ping timeout: 256 seconds]
pskosinski has joined #ruby
quoin has joined #ruby
<banisterfiend>
xybre +1 on Pry, best thing since sliced strings
jbomo has joined #ruby
ahegyi has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
znode has joined #ruby
<taion809>
are there any mentoring programs in ruby? perhaps in a similar vein to phpmentoring.org?
eka has joined #ruby
<Morrolan>
ThoughtBot has a program like this, I believe?
<maasdesigner>
so people, without learn ruby good, starting framework is bad ? also look for admin panel panes ?
<taion809>
Morrolan: thanks i'll give it a look
fourq_ has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
pyrac has joined #ruby
thesheff17 has quit [Read error: Operation timed out]
carraroj has joined #ruby
dash_ has joined #ruby
<taion809>
ah no bueno looks like a paid service
<Morrolan>
Oh, yes. It's probably quite hard to get an experienced dev to mentor you for free. :P
Deele has quit [Ping timeout: 240 seconds]
<taion809>
looks like i'll just have to make a wildly successful project to attract contributors then :p
vedic1 has quit [Quit: Leaving.]
blackmesa has joined #ruby
<Morrolan>
Something which people are interested in will probably work, too. :)
Neomex has quit [Quit: Neomex]
<Morrolan>
And hey, for day-to-day questions there's always IRC. :P
noopq has joined #ruby
<taion809>
yeah it'll all work it, it will just be messy for a bit as it usually goes
<taion809>
work out*
maasdesigner has quit [Quit: whowantstolivefo]
AndChat| has quit [Read error: Connection reset by peer]
Deele has joined #ruby
relix has joined #ruby
intuxicated_ has joined #ruby
johnjohnson has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
znode has quit [Remote host closed the connection]
cody-- has joined #ruby
okinomo has joined #ruby
obs has joined #ruby
nari_ has quit [Ping timeout: 256 seconds]
Xaitec has joined #ruby
freakcult has quit [Quit: leaving]
lukec has joined #ruby
gr33n7007h has joined #ruby
vedic has joined #ruby
okinomo has quit [Quit: Lost terminal]
mansi has joined #ruby
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
user_ has joined #ruby
user_ has quit [Client Quit]
okinomo has joined #ruby
gyzmodo has joined #ruby
mansi has joined #ruby
girija has joined #ruby
browndawg has joined #ruby
shellox has quit [Ping timeout: 260 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
Xaitec has quit [Remote host closed the connection]
alyi has joined #ruby
nkuttler has joined #ruby
mansi has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
<nkuttler>
i've just install inotify and the notifications are only shown in the terminal. do i need to set something up so that it uses my desktop notification system?
snath has joined #ruby
browndawg has quit [Ping timeout: 256 seconds]
DrCode has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
fridim_ has joined #ruby
mansi has quit [Remote host closed the connection]
ryandeussing has quit [Remote host closed the connection]
crunch-choco has joined #ruby
mansi has joined #ruby
DrCode has joined #ruby
BRMatt has quit [Read error: Operation timed out]
carraroj has quit [Quit: Konversation terminated!]
girija has quit [Ping timeout: 245 seconds]
spider-mario has quit [Remote host closed the connection]
chairabanta has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
chairabanta has quit [Client Quit]
crunch-choco has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.1]
snath has quit [Ping timeout: 256 seconds]
okinomo has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
Banistergalaxy has joined #ruby
cantonic has quit [Quit: cantonic]
snovak has joined #ruby
chairabanta has joined #ruby
wchun has joined #ruby
snath has joined #ruby
Kabaka_ has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
freeayu__ has quit [Read error: Connection reset by peer]
snovak has quit [Ping timeout: 240 seconds]
lusory has quit [Ping timeout: 245 seconds]
browndawg has joined #ruby
bklane has joined #ruby
devoldmx3 has quit [Remote host closed the connection]
JDHankle has joined #ruby
jamesaanderson has joined #ruby
tspike_ has joined #ruby
nanoxd has joined #ruby
JDHankle has quit [Read error: Operation timed out]
tspike has quit [Ping timeout: 245 seconds]
jamesaanderson has quit [Client Quit]
altamic has joined #ruby
altamic has quit [Client Quit]
tspike_ has quit [Ping timeout: 264 seconds]
tspike has joined #ruby
postmodern has quit [Quit: Leaving]
<pontiki>
you have to deliver the messages to whatever desktop notification system you're using
SHyx0rmZ has joined #ruby
jamesaanderson has joined #ruby
tspike_ has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
aryaching has joined #ruby
Kabaka_ has joined #ruby
carraroj has joined #ruby
tspike has quit [Ping timeout: 256 seconds]
dagnachew has joined #ruby
maasdesigner has joined #ruby
jongilbraith has joined #ruby
Desert_eagle has quit [Ping timeout: 245 seconds]
hiroyuki has joined #ruby
dagnachew has quit [Read error: Connection reset by peer]
tspike_ has quit [Ping timeout: 264 seconds]
polaco has joined #ruby
d2dchat_ has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
r4nd0m1 has joined #ruby
viszu has quit [Quit: Leaving.]
d2dchat_ has joined #ruby
Desert_eagle has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
<polaco>
hello guys. Python deals with system installation vs project installation with virtualenv. It is some sort of symbolic links and environment vars hacking. Now I am starting with ruby and want to avoid systems installations, I want to contain dependencies on inside the project. What should I use?
freerobby has joined #ruby
<polaco>
is there native support for that or should I look into something like virtualenv
<apeiros>
polaco: bundler is often used for that
telling has joined #ruby
<apeiros>
also some ruby managers like rvm support gemsets, which are similar
<apeiros>
(in purpose, I mean)
<polaco>
interesting. I want to just install ruby on the system level and the rest on project level
<maasdesigner>
i have ruby version 1.9 but this code dont work require_relative "cart"
lyanchih has joined #ruby
<polaco>
apeiros: thx for the response, i ll take a look
<apeiros>
maasdesigner: "don't work" doesn't work as a problem description
<apeiros>
maasdesigner: also I'm reluctant to help people who leave in the midst of getting help
aryaching has quit [Read error: Connection reset by peer]
BeyonceRocks was kicked from #ruby by apeiros [spam is not accepted]
<maasdesigner>
Hanmac: how i must fix this? also this code doesnt work require 'cart' require 'item'
lusory has joined #ruby
Trudko has joined #ruby
duracrisis has quit [Ping timeout: 268 seconds]
carraroj has joined #ruby
carraroj has quit [Client Quit]
carraroj has joined #ruby
<Trudko>
hi guys out of couriousity is there better way how to write this? http://pastie.org/8288854 I am iterating over collection summing up the points and then dividing total number of points by number of matches(unless size of matches is 0 ) to get average
vlad_starkov has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
<Morrolan>
maasdesigner: Install ruby 1.9.3 or higher. You can probably install it via your OS' package manager.
wallerdev has joined #ruby
<maasdesigner>
Morrolan: i have ruby 1.9.3 via rvm
<Morrolan>
Yet require_relative complains that it's an undefined method?
airlok has joined #ruby
codecop has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axeman- has quit [Remote host closed the connection]
<apeiros>
Morrolan: that's quite the point. he only said "don't work". which is why I don't work.
noopq has quit [Ping timeout: 264 seconds]
BRMatt has joined #ruby
<airlok>
hey all, I'm working on a pretty CPU-intensive task in Ruby, so I'd like to use threads... However, using threads like this still doesn't bring CPU usage beyond 25%. Any idea why? https://gist.github.com/airlok/f9946a7fbad7fafcf5c4
i8igmac has quit [Read error: Connection reset by peer]
bigmac has joined #ruby
bigmac is now known as i8igmac
dagnachew has quit [Read error: Connection reset by peer]
adamholt has joined #ruby
jbrechtel has joined #ruby
fomatin has joined #ruby
wallerdev has quit [Quit: wallerdev]
sevenseacat has quit [Quit: Leaving.]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dreamer3 has joined #ruby
yoshie902a has quit [Ping timeout: 245 seconds]
Matriks has quit [Remote host closed the connection]
fourq__ has quit [Quit: leaving]
lyanchih has quit [Quit: lyanchih]
Alpha64 has joined #ruby
Alpha64 has left #ruby ["Leaving"]
cody-- has quit [Quit: Computer has gone to sleep.]
ewnd9 has quit [Ping timeout: 268 seconds]
<polaco>
talking about CLI interpreters: ipython is to python what ____ is to irb
<polaco>
thats a bizarre way of asking: is there and advanced rib?
modernbob has joined #ruby
<polaco>
*irb
<Hanmac>
polaco: there is pry
<polaco>
*an advanced irb (gotta turn off those corrections)
jamesaanderson has joined #ruby
<waxjar>
and there's cute lil ripl
<polaco>
pry and ripl
<polaco>
i ll take a look
<polaco>
thx!
gildo has quit [Read error: Operation timed out]
<pontiki>
ipython:python :: irb:ruby
browndawg has joined #ruby
sethetter has quit [Quit: Lost terminal]
adamholt has quit [Ping timeout: 246 seconds]
Iszak has quit [Quit: Computer has gone to sleep.]
modernbob has quit [Quit: Leaving]
maletor has joined #ruby
modernbob has joined #ruby
tkuchiki has quit [Remote host closed the connection]
modernbob has quit [Changing host]
modernbob has joined #ruby
lessless has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
tkuchiki has joined #ruby
taion809 is now known as zzz_taion809
<polaco>
pontiki: well, ruby is not a REPL
Iszak has joined #ruby
<polaco>
python with no args turns into a REPL
<polaco>
can this line be simplified? machines.each do |name, data| file.write("#{data[:ip]} #{name}\n") end
<polaco>
(its a /etc/hosts generator for my vagrant file)
<C0deMaver1ck>
looks pretty simple to me, except I use {} for one liners
<polaco>
humm, interesting
<polaco>
i am learning puppet
St_Marx has joined #ruby
iliketur_ has joined #ruby
<polaco>
and ruby also
<polaco>
vagrant and stuff
<C0deMaver1ck>
stop while you still can
<C0deMaver1ck>
learn chef instead
<C0deMaver1ck>
I work at a place where we cry everyday because of puppet
<polaco>
i can't, our whole environment is puppet controlled
gildo has joined #ruby
adamholt has joined #ruby
<C0deMaver1ck>
then I cry for you also
<polaco>
lol
<polaco>
its not that bad
<Hanmac>
yeah i see the strings on your fingers ;P
<C0deMaver1ck>
we once tried mondrian out on a server
<polaco>
but if you have sysops all over the place writing puppet classes with no development expertise
<polaco>
well then you got a problem
<C0deMaver1ck>
puppet ran and said "wtf, mondrian"
dhruvasagar has quit [Ping timeout: 264 seconds]
<C0deMaver1ck>
puppet uninstalled mondrian
girija has joined #ruby
<C0deMaver1ck>
reinstalled mysql with an empty db and said "fuck you"
<polaco>
oO
<polaco>
well thats unusual, but you should test first :)
<polaco>
puppet apply --noop
<polaco>
its a start
<polaco>
but i understand puppet testing is hard
<lessless>
hi folks!need an advice on how to assign values of the hash like { "external_foo" => "1", "external_bar" => "2"} to the corresponding parameters of the structure truct.new("Smthng", :bar, :foo) ?
<C0deMaver1ck>
my other coworker is the one who has to deal with it alot until we hire a designated sysadmin and devops person
<polaco>
Hanmac: strings?
axeman- has joined #ruby
<C0deMaver1ck>
which, btw if anybody would like to be a devops or sysadmin we're hiring :p
Neomex has quit [Quit: Neomex]
<Hanmac>
polaco: its a pun about "puppet controlled" ;P
maletor has quit [Quit: Computer has gone to sleep.]
<polaco>
Hanmac: haahhahahaah good one
chairabanta is now known as chairabanta|away
* C0deMaver1ck
finally gets the joke
* C0deMaver1ck
laughs
<polaco>
C0deMaver1ck: well i have the profile :)
cHarNe2 has quit [Quit: leaving]
<polaco>
but i am from Brazil
chairabanta|away is now known as chairabanta
optimusprimem has quit [Excess Flood]
atyz has quit [Read error: Connection reset by peer]
iliketur_ has quit [Ping timeout: 264 seconds]
<polaco>
my question about the one liner is because i come from a python background, so i expected a more declarative way
atyz has joined #ruby
<polaco>
wanted to check if theres one
<polaco>
but I am learning ruby part studying part as I go
<polaco>
can i do something like this? machines.each { |name, <:ip from data>| file.write "#{ip} #{name}\n" }
<C0deMaver1ck>
heh, I love sublime to death
<C0deMaver1ck>
finally got the rest of my team using it
<polaco>
replacing <:ip from data> with something that works
<C0deMaver1ck>
hmm
<C0deMaver1ck>
that would be nice
mgorbach has joined #ruby
St_Marx has quit [Remote host closed the connection]
mgorbach has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
yano has joined #ruby
* C0deMaver1ck
starts typing stuff in irb
dhruvasagar has joined #ruby
<polaco>
col
<polaco>
cool
<polaco>
wow, entered #bitcoin and received 2 PMs asking if I am selling
mgorbach has joined #ruby
<Hanmac>
polaco: oO i am totaly suprised because i found this and it works: machines.each { |name, :ip| file.write "#{ip} #{name}\n" } .... but my ruby may be newer than yours
* polaco
feeling like a drug dealer with addicts around
<C0deMaver1ck>
I don't hang out in #bitcoin anymore
<C0deMaver1ck>
it's a terrible place
<C0deMaver1ck>
if you want a better experience join #bitcoin-otc
<polaco>
wow, nice tip
<polaco>
Hanmac: wow, didn't try
<polaco>
interesting
<C0deMaver1ck>
Hanmac: totally didn't expect that to work
<C0deMaver1ck>
that's awesome
havenwood has joined #ruby
snovak has joined #ruby
jibi has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
<polaco>
well, thats actually strange to work
<polaco>
isn't ip getting duplicated?
<polaco>
(mine didn't work, but I am on ruby 1.8, i think)
<Hanmac>
sorry my bad its "ip:"
tkuchiki has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
<Hanmac>
>> [["host",{:ip =>"123"}]].each {|n,ip:| p n,ip}
<polaco>
cannot afford to just install things on the run. Some years developing reached me that the time you gain doing that is nothing compared to the one you lose fixing it
<polaco>
*teched me
<polaco>
**teached me
julian-delphiki has quit [Ping timeout: 240 seconds]
jongilbraith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<polaco>
Hanmac: thats an option that I usually like :) but the point is having multiple system installations. It can get messy
<havenwood>
polaco: What OS/distro are you on?
<polaco>
which is the "standardiest", if there is one
* C0deMaver1ck
thinks ubuntu 12.04 lts
<polaco>
maces X, but i develop for CEnto6.4 environments
<polaco>
omfg this autocorrect
<polaco>
macos X
xpirator has quit [Quit: Connection closed for inactivity]
<C0deMaver1ck>
lol
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<C0deMaver1ck>
polaco: you ever see butterfly labs stuff?
<polaco>
it is strangely turned off but it keeps "correcting" me
<polaco>
nope
<polaco>
what is it?
<C0deMaver1ck>
ASIC miners
kstephens has joined #ruby
<polaco>
a firmed of mine introduced me to bitcoins
<polaco>
he runs a bit coin exchange here in Brazil
<polaco>
i understand the mining concept but i definitely won't mine hehe
justsee has quit [Ping timeout: 268 seconds]
<C0deMaver1ck>
I only mention it because I ordered a miner from them, and it ships in a few days
<polaco>
but, i got interested in knowing if this little guy can be used for that: http://www.parallella.org/
gemmy has joined #ruby
<polaco>
C0deMaver1ck: wow, cool
wallerdev has joined #ruby
<C0deMaver1ck>
ou interesting
<polaco>
this parallella board can have 64 clustered cores with shared memory in the size of a wallet
<polaco>
(ARM processor)
<polaco>
fucking cool
<polaco>
that as a project that i am following
<polaco>
i want all of them
<polaco>
ALL of them
<polaco>
hahahah
<polaco>
a parallella tower
<C0deMaver1ck>
lol
JDHankle has joined #ruby
helvete has joined #ruby
companion is now known as Companion
<polaco>
but the idea is massive
<polaco>
its the start of the affordable home super computing
<polaco>
BUT we have issues, languages nowadays are still poorly on excessive paralelism
* polaco
considers erlang and functional programming
<C0deMaver1ck>
here's looking at you Ruby with your GIL
<polaco>
yeah
<polaco>
: '(
<polaco>
well theres jruby...
optimusprimem has quit [Read error: Connection reset by peer]
<polaco>
never tried
<polaco>
but used
<C0deMaver1ck>
I use JRuby for concurrent things
Fire-Dragon-DoL has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
<polaco>
my general perception is that is really slow
<C0deMaver1ck>
but I wish MRI would do away with the GIL
<polaco>
unfornately
<C0deMaver1ck>
polaco: on the contrary, it's way faster for most things
<havenwood>
polaco: That JRuby is slow?
* Hanmac
ignores jRuby because i write massive C(++) extensions
<polaco>
well i am comparing to native Java
<polaco>
sorry, don't want to flame
ndrei has quit [Ping timeout: 264 seconds]
chairabanta is now known as chairabanta|away
<polaco>
but anyway, concurrency and threading is a fucking hard problem to solve
* C0deMaver1ck
starts a rant on how the GIL doesn't even provide thread safety
atyz has quit [Ping timeout: 256 seconds]
<polaco>
Java can die but the JVM is a great project
<havenwood>
polaco: If you want native Java performance you could use Mirah. But really JRuby is quite fast and write a Java/Mirah/Clojure whatever extension if you need to optimize one part.
JimmyNeutron has joined #ruby
dtcrshr has joined #ruby
dtcrshr has quit [Changing host]
dtcrshr has joined #ruby
ryandeussing has quit [Remote host closed the connection]
KevinSjoberg has joined #ruby
<polaco>
interesting
ndrei has joined #ruby
<polaco>
well i am starting into ruby so a lot of new info
<polaco>
:)
<C0deMaver1ck>
is Jython a thing?
<polaco>
Jython is nice, but its development is slow
<polaco>
they are still on 2.4
<C0deMaver1ck>
ick
ryandeussing has joined #ruby
<polaco>
python 3 is on "just a dream" status
mansi has quit [Remote host closed the connection]
Andrevan has joined #ruby
Andrevan has quit [Changing host]
Andrevan has joined #ruby
mansi has joined #ruby
<polaco>
interesting
<Hanmac>
there is also an ruby interpreter in python ;P
<polaco>
the parallella board has the size of a credit card
zarubin has joined #ruby
<C0deMaver1ck>
wat
<havenwood>
Topaz is fast too!
fourq_ has quit [Ping timeout: 264 seconds]
echevemaster has quit [Read error: Operation timed out]
<atmosx>
platzhirsch: per second? wow, that's fast.
<atmosx>
You write code or blogposts?
<platzhirsch>
hehe
<atmosx>
heh anyway, I'm off to get something to eat, I'm kinda starving...
<platzhirsch>
don't starve!
adamholt has joined #ruby
noop has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 246 seconds]
claymore has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
bluOxigen has joined #ruby
wallerdev has joined #ruby
scarolan has quit [Read error: Operation timed out]
Jake232 has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
Asher has quit [Ping timeout: 256 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
<platzhirsch>
Anyway, let's turn the
dkamioka has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
snath has joined #ruby
bluOxigen has joined #ruby
tituomin has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
modernbob has joined #ruby
modernbob has joined #ruby
modernbob has quit [Changing host]
scarolan has joined #ruby
dagnachew has joined #ruby
<vedic>
I am new to ruby and trying to setup redmine. I have setup thin to run as a service. But when I run thin, I am getting this error in thin.log file: /home/testuser/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/thin/backends/tcp_server.rb:16:in `connect': cannot load such file -- thin/connection (LoadError)
hiroyuki has quit [Remote host closed the connection]
hiroyuki has joined #ruby
banisterfiend has joined #ruby
dankest has joined #ruby
dangerousdave has joined #ruby
hiroyuki has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
weems has quit [Ping timeout: 264 seconds]
cads has joined #ruby
snovak has joined #ruby
dash_ has quit [Ping timeout: 240 seconds]
rdxc has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
Ripp__ has joined #ruby
dash_ has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
rdg has joined #ruby
pkrnj has quit [Ping timeout: 240 seconds]
<aliljet>
is there anyway to have ruby spit back all of available variables to me? I see the instance_variables option, but what about global variables, local variables, class variables, etc?
* Hanmac
giggles because some global_variables does not exist as objects ;P
antulik-afk is now known as antulik
<aliljet>
haha :)
<aliljet>
cool, thanks man
thillux has joined #ruby
nanoxd has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
arietis has joined #ruby
saarinen has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 268 seconds]
Banistergalaxy has joined #ruby
DanKnox_away is now known as DanKnox
Senjai has quit [Ping timeout: 245 seconds]
kiri has quit [Ping timeout: 264 seconds]
fsck3r has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
fuhgeddaboudit has joined #ruby
banisterfiend has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
cody-- has joined #ruby
saarinen has quit [Quit: saarinen]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
[rust] has joined #ruby
rdg has quit [Quit: ttfn]
fsck3r has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<shevy>
huh
vedic has quit [Quit: Leaving.]
kiri has joined #ruby
<shevy>
there are things in ruby that do not exist as objects?
dagnachew has quit [Quit: Leaving]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
jamesaanderson has joined #ruby
<apeiros>
shevy: sure. code. variables.
<Hanmac>
shevy look at rb_define_virtual_variable and rb_define_hooked_variable and rb_define_readonly_variable ... the first one does not store an object
<aliljet>
okay, so my question is probably not too complex, but I've got an objecet full of data that I'm trying to decipher. Is there any way I can just print out the object's description without the values?
<shevy>
cool
<shevy>
that is the first time I have heard of a "virtual variable"
<apeiros>
aliljet: Object#instance_variables
workmad3 has joined #ruby
ndrei has joined #ruby
<Hanmac>
shevy: for sample $KCODE is maybe a virtual variable
<shevy>
hmm
<waxjar>
just returns nil for me :/ what was it supposed to do?
<shevy>
it looks like a global variable to me
<shevy>
(irb):1: warning: variable $KCODE is no longer effective
<shevy>
haha
<shevy>
waxjar, the japanese hackers used it a lot
<shevy>
it always looked like a hack
<Hanmac>
the "$~" regexmatcher variables are virtual
<shevy>
oh... that explains their confusing behaviour
atmosx has quit [Quit: Lost in trance]
<apeiros>
waxjar: $KCODE was the predecessor to handling encoding in ruby
<shevy>
how comes you know all those things, are you a ruby C hacker now Hanmac
<waxjar>
ah, nice
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit [Remote host closed the connection]
<Hanmac>
shevy i dont know anything but i know how to get the infomation ... i used grep on the ruby code itself
<shevy>
hehe
<aliljet>
apeiros: my brain was melting. that was obvious. thanks. I can work my way through an object's tree of other objects by inspecting away. :)
Davey has joined #ruby
arietis has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
<Hanmac>
"$-a" for sample is a read only variable because its what is set when starting ruby
the_mentat has quit [Ping timeout: 264 seconds]
stonevil has joined #ruby
<Hanmac>
"$-W" and some other can be changed, so they are hooked, not virtual
the_mentat has joined #ruby
<Hanmac>
the only bad thing: you cant define virtual, hooked or readonly variables in ruby itself :/
dross has joined #ruby
Alaude has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
stonevil has quit [Remote host closed the connection]
<Alaude>
So quiet...
antulik is now known as antulik-afk
fsck3r has quit [Quit: Leaving...]
skulls has quit [Ping timeout: 240 seconds]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dtcrshr has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 245 seconds]
nanoxd has joined #ruby
threesome has quit [Quit: Leaving]
zarubin has quit [Ping timeout: 246 seconds]
fsck3r has joined #ruby
Astralum has joined #ruby
codecop has quit [Remote host closed the connection]
relix has joined #ruby
mansi has joined #ruby
Al_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Davey has joined #ruby
freerobby has joined #ruby
mansi has joined #ruby
gnuweb has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
caju has quit [Remote host closed the connection]
<gnuweb>
sudo ruby-switch --set ruby1.8
<gnuweb>
update-alternatives: error: alternative /usr/bin/gem1.8 for gem not registered; not setting
<gnuweb>
Can anyone please help me with that error?
<gnuweb>
I am trying to install gitorious
<gnuweb>
on debian
fourq_ has joined #ruby
pyx has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
pyx has quit [Client Quit]
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
<pontiki>
you might need to ask some gitorious folk for help there...
iliketur_ has joined #ruby
<pontiki>
especially as ruby 1.8 is completely depricated and out of support
<gnuweb>
thanks pontiki, it needs to run with ruby 1.8, im just having trouble switching on debian
<gnuweb>
i see
<Hanmac>
gnuweb gem1.8 is shipped extra and not installed with ruby1.8
iliketur_ has quit [Client Quit]
snovak has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
<gnuweb>
thanks Hanmac how can I install it?
fomatin has joined #ruby
<gnuweb>
gem install gem1.8?\
<Hanmac>
apt-get ?
<jexmex>
anybody want to help a ruby newbie setup radiant cms so I can play around with it? I installed gem, then tried "radiant --database mysql ./ (to install into base of dir I was in). I than ran bundle update
<jexmex>
but I get error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
<jexmex>
not sure what step to do next to fix
mneorr_ has quit [Remote host closed the connection]
<Hanmac>
jexmex: it smells for me that you miss "build-essential" (or something similar)
<MrZYX>
dig up the real error message, this one just says something went wrong
mneorr has joined #ruby
snovak has quit [Ping timeout: 245 seconds]
<jexmex>
Hanmac, radiant build-essential did something
<jexmex>
still waiting, will see
<jexmex>
I assume I need to edit a file to enter mysql credentials
Companion is now known as companion
Davey has quit [Read error: No route to host]
<Hanmac>
jexmex, hm no i thought you are on something like debian, you need to install it via your paket manager
<jexmex>
my vps is centos 6
colonolGron has quit [Quit: Lost terminal]
<jexmex>
just trying to play around with something new
<jexmex>
full time job is php and I just want something more
<jexmex>
ruby seems so different in getting setup than php
<Hanmac>
centos ... arg
freerobby has joined #ruby
<jexmex>
heh
<jexmex>
I can reinstall with a different os]
<jexmex>
I just ordered this vps as a testing around thing
<jexmex>
is there a problem with using centos?
<Hanmac>
jexmex ... you need gcc and make for building extensions ... (and look if there is a ruby-dev package, to install with yum)
JDHankle has quit [Remote host closed the connection]
zigomir_ has quit [Ping timeout: 240 seconds]
crunch-choco has quit [Quit: leaving]
pskosinski has quit [Quit: Til rivido Idisti!]
mansi has quit [Remote host closed the connection]
pskosinski has joined #ruby
<jexmex>
have not moved from create config/initializers/radiant_config.rb in a bit
<jexmex>
not sure if that is normal
jbrechtel has joined #ruby
mansi has joined #ruby
colonolGron has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
[rust] has quit [Quit: Leaving]
<Hanmac>
i may not have a problem with centos in general, but most of the time it feels either outdated or crippled ... (for sample in a minimal install that we used for our VMs the important "man" command was missing)
mansi has quit [Ping timeout: 240 seconds]
<jexmex>
well I had the option of several distro's, I went with centos because that is the distro all the servers I usually work on run
<jexmex>
light weight, seems the reason usually
<jexmex>
still new to a lot of linux server admin, I run linux desktop and have little issues, but server is different
<Morrolan>
I'd assume the reason it's used on servers is that it's "stable".
<Hanmac>
"stable" in the meaning of "old as stone"
<jexmex>
haha
<Morrolan>
Yea. In the same way Debian stable is stable. :)
<Rylai>
debian: where "testing" is stable, "unstable" is even more stable, and "stable" is still in the ages of dinosaurs
bluOxigen has quit [Ping timeout: 260 seconds]
<Morrolan>
Hehe.
<Hanmac>
hm yeah but its 1000% easier on debian to install unstable stuff
<jexmex>
dotvps has several options for distro's, ubuntu server, debian, centos. fendora, scientific, suse
<Morrolan>
If you can pick Debian testing or unstable, then that might be a nice mix of stability and not-too-outdated software.
<jexmex>
still concerned its stuck on create config/initializers/radiant_config.rb
<jexmex>
not sure its ever gonna finish
banisterfiend has quit [Quit: Computer has gone to sleep.]
<Morrolan>
How's CPU and memory usage?
<Hanmac>
jexmex: stil the "Failed to build gem native extension." error?
<jexmex>
no error showing on output
<jexmex>
I can try to open another ssh to check mem and cpu usage
<apeiros>
MrZYX: well, I guess that means that was either a rather stupid human or a rather intelligent bot
gyzmodo has quit []
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
ahegyi has quit [Ping timeout: 240 seconds]
statarb3 has joined #ruby
ndrei_ has quit [Ping timeout: 264 seconds]
weems has joined #ruby
popl has joined #ruby
<xybre>
I actually know a guy who talks like that online. It's because he doesn't "respond" to whats said so much as load it into his mental VM and then will randomly output the VM's state. This might have nothing to do with the conversation directly. I got used to it, but it confuses the hell out of other people.
cody-- has quit [Quit: Computer has gone to sleep.]
JDHankle has quit [Remote host closed the connection]
<MrZYX>
juken: printf "..\n" -> puts "...", no need to assign => error if you won't do anything with it, also StandardError is a bit too broad IMO, def is an implicit begin, so you can save it if it's the first line in a method
stack has joined #ruby
<MrZYX>
#count takes a block to count the number of times the block returns true
<juken>
MrZYX: thanks for the input. I used printf as it puts wasn't printing clean with the threading
<MrZYX>
hm, interesting
<juken>
MrZYX: I read it was a race condition issue in puts
kirun has quit [Quit: Client exiting]
<MrZYX>
look into File.readlines
zarubin has joined #ruby
<juken>
MrZYX: I was going to use File.readlines, but then I'd have to chomp each line to get rid of \n
<juken>
I tried with and without and it didn't look like there was a difference in performance
s0ber has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
<s2013>
whats the diff between collect and map?
statarb3 is now known as Proshot
<MrZYX>
juken: hm, try "\n" as second argument to readlines
ereslibre has quit [Remote host closed the connection]
aalmenar has quit [Remote host closed the connection]
<MrZYX>
s2013: they're synonym
<MrZYX>
use the one that reads nicer in the current context or just generally stick to the one you like the most
s0ber has joined #ruby
nowthatsamatt has joined #ruby
<s2013>
oh ok. im used to using map but im reading existing code and its using collect so i got a bit confused. thanks
snovak has joined #ruby
<MrZYX>
juken: there's a little trick if all you're going to do in a block is calling a method on the yielded element, so you can write your last line as threads.each(&:join)
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
foobArrr has quit [Quit: bye]
Banistergalaxy has quit [Ping timeout: 264 seconds]
<juken>
MrZYX: Just looked into using readlines(variable, "\n").each but it's still pulling the \n
foobArrr has joined #ruby
moeSeth_ has joined #ruby
<MrZYX>
well, then just domains = File.read(domains_wordlist).split("\n")
fourq_ has quit [Read error: Connection reset by peer]
<MrZYX>
no need to build another array from the array split gives you ;)
fridim_ has quit [Ping timeout: 245 seconds]
<juken>
MrZYX: I saw that advice elsewhere too, love it :)
snovak has quit [Ping timeout: 240 seconds]
DanKnox is now known as DanKnox_away
Banistergalaxy has joined #ruby
havenwood has joined #ruby
knigitz has quit []
aaronlipinski has left #ruby [#ruby]
Matriks has quit [Remote host closed the connection]
mansi has joined #ruby
allsystemsarego has quit [Quit: Leaving]
JDHankle has joined #ruby
JDHankle has quit [Remote host closed the connection]
Speed has joined #ruby
aef has joined #ruby
knigitz has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
kilophoton has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
gyre007 has joined #ruby
freerobby has quit [Quit: Leaving.]
mzdravkov has joined #ruby
ItSANgo has quit [Quit: Leaving...]
ndrei has joined #ruby
snearch has joined #ruby
mzdravkov has left #ruby [#ruby]
mansi has joined #ruby
Tricon has joined #ruby
DanKnox_away is now known as DanKnox
guns has joined #ruby
mansi has quit [Ping timeout: 268 seconds]
dash_ has quit [Quit: dash_]
banisterfiend has joined #ruby
Proshot has quit [Quit: Leaving]
jibi has quit [Quit: .]
polaco is now known as polaco_zZz
workmad3 has quit [Ping timeout: 256 seconds]
Al_ has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
Al_ has joined #ruby
fridim_ has joined #ruby
<shock_one>
Hi. I have a hash like this params[:q][:reporter_id_eq]. How to set the reporter_id_eq even if :q isn't present without conditionals? Is there something like mkdir -p ?
<shevy>
shock_one you could set a default value for your hash to return if a key is not existing
<shevy>
shock_one but other than that, how do you want to obtain data from a hash when the given key would not exist in it?
tyfighter has quit [Quit: tyfighter]
<pontiki>
shock_one: this sounds utterly dangerous
<shock_one>
shevy: create an empty hash if it doesn't exist. I'm not sure if it's safe to make a default value for Rails params.
<pontiki>
you don't *set* params
<pontiki>
assuming this is in your controller?
<shock_one>
Check out what I've tried {reporter_id_eq: current_user.id}.merge! params[:q].to_hash
<shock_one>
pontiki: I do :)
<pontiki>
then you are doing it wrong
<pontiki>
params is a method that takes up from POST data
<pontiki>
if you want to do manipulation of that, make a new hash
relix has joined #ruby
jongilbraith has joined #ruby
<shock_one>
pontiki: I was writing why you're wrong and in the middle realized that it's me who is stupid :)
jongilbraith has quit [Client Quit]
Tricon has quit [Quit: Leaving...]
<pontiki>
shock_one: in the above example, you're not modifying params there, just using it in a merge, that's fine (and the way to do it, really)
rcosta_ has joined #ruby
pkrnj has joined #ruby
ItSANgo has joined #ruby
<shock_one>
pontiki: I've found a way without messing up with params. Thank you.
<pontiki>
nod
amarsahinovic has quit [Read error: Operation timed out]
binw has quit [Read error: Connection reset by peer]
Tricon has joined #ruby
relix has quit [Client Quit]
rcosta has quit [Ping timeout: 245 seconds]
nanoxd has quit [Ping timeout: 264 seconds]
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
binw has joined #ruby
<gr33n7007h>
What is the `||=` operator do?
hashpuppy has quit [Quit: Computer has gone to sleep.]
lessless has quit [Remote host closed the connection]
<xybre>
Ohh, that explains why PHP sucks so much. ;)
<pontiki>
well, no; php is a c-like language
<pontiki>
looking at php's object stuff though, it doesn't remind me anything of C++
<s2013>
and c++ is heavily influenced by c
<s2013>
so i guess c is the grand daddy
<pontiki>
c++ is an entension of c
<pontiki>
plain c programs will compile in c++
<s2013>
i learned c++ in school. for our final porject we had to make some game, good times.
DonRichie has quit [Quit: Verlassend]
<pontiki>
though most implementations actually run c++ through a translator into c, so...
justsee has quit [Ping timeout: 245 seconds]
<s2013>
i c
ereslibre has joined #ruby
aalmenar has joined #ruby
aalmenar has joined #ruby
<xybre>
I'm kind of sick of everything in programming being called "objects". Some bytes in memory is called an "object" in C, in visual flow languages every little box you see is an "object" even though they're often just functions..
<xybre>
I'm saying the word "object" is just really overused to the point that its pretty much lost meaning.
<s2013>
wow they are all new
<Nilium>
The word "object" is kind of a giant catch-all to begin with, even outside of programming.
<pontiki>
xybre: i think the problem may be that each language sort of has their own concept of what objects are
<Nilium>
That people use it to mean different things in different environments shouldn't really be an issue.
<pontiki>
and comparing languages and trying to find common ideas can be hard
<Nilium>
Unless you for some reason think that all languages should agree to have the same meaning for all words, in which case you should probably be taking issue with things like 'class' and 'constructor' and 'initializer' and 'variable' and 'instance'
ixti has quit [Ping timeout: 264 seconds]
<pontiki>
right, exactly
<Nilium>
Basically what I'm saying is that your being sick of things being called object is stupid.
<pontiki>
i don't expect that at all, no more than i expect people to all have the same language
<xybre>
Nilium: its an issue because often people directly compare languages, like Java "objects" and think that makes them object oriented.
<Nilium>
Then don't directly compare languages.
<pontiki>
oh, let them have their fun
<pontiki>
anyway, i have to go prep supper
ereslibre has quit [Remote host closed the connection]
aalmenar has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
<xybre>
It creates a barrier to communication because you have the same lexicon, but different definitions.
freerobby has joined #ruby
<Nilium>
You're going after a symptom, not the cause.
<Nilium>
You could see every language stop using object and they'd still be compared, except then you'd have people saying Ruby's things are like Java's objects are like C++'s blobs
<Nilium>
You've got a problem with the wrong thing, basically.
<xybre>
Right, but since they're different words, its intuitive that they're different things.
<Nilium>
The actual problem, the one you seem to be trying to get at, is that people are stupid.
<Nilium>
And that problem can't be fixed.
<xybre>
No, I have a problem with direct comparisons too, they jsut become the most glaring when the language is the same but the concepts are completely different.
<xybre>
Well.
<xybre>
Yes.
<Nilium>
To me, it's intuitive that objects in C, Java, Ruby, and so on are different things. Why isn't this intuitive to you?
<xybre>
But dammit I'll try!
<Nilium>
Are you one of the stupid people?
<sam113101>
guys
<sam113101>
how do I pass an argument to a rake test?
<sam113101>
it doesn't work ;_;
<Nilium>
By sacrificing a small child to satan.
<xybre>
Its not about me, its about having converations with other people who *don't* realize that words can have more than one meaning.
<Nilium>
Then tell them that.
keeeh has quit [Ping timeout: 264 seconds]
<Nilium>
And if they don't listen, stop talking to them.
<Nilium>
And then quit facebook.
<xybre>
sam113101: Use environment variables, or don't use rake.
brain_shim has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
<xybre>
I'd love to just cut off 98% of the human race, but its not really practical.
<jrobeson>
you should volunteer to to be the first
<jrobeson>
please
freerobby has quit [Ping timeout: 264 seconds]
<jrobeson>
do us all favor
<jrobeson>
btw.. i say that to everybody who says a phrase like that
<xybre>
jrobeson: that we should all stop using rake? I agree.
<Nilium>
It makes sense. By saying 98% of the human race is beneath you, you're basically putting yourself in a position as an elite smartypants who can fuck right off.
<jrobeson>
yep
<jrobeson>
you're subject to the same cognitive biases the rest of us are
<xybre>
Nilium: That was sort of the point I was making about your "stupid people" comment.
Zeeraw has joined #ruby
<Nilium>
I like people. I just don't continue a conversation if it degrades.
<Nilium>
That doesn't mean cutting off the person for life.
justsee has joined #ruby
justsee has joined #ruby
<jrobeson>
when it comes to defining objects.. it's like.. are you encapsulating related functionality in some sort of container..
<xybre>
jrobeson: Like a function?
<jrobeson>
in java.. and javascript, and ruby, and php, and python.. the answer is yes
<jrobeson>
you can write object oriented C
<Nilium>
Or in C you could say an object is any arbitrary data.
Zai00 has quit [Ping timeout: 240 seconds]
<jrobeson>
like GObject does
mansi has quit [Ping timeout: 240 seconds]
<Nilium>
It mostly comes down to what the definition is for the situation.
<jrobeson>
it's a container for grouped data
fsck3r has joined #ruby
<jrobeson>
i think that definition is common across them all
<xybre>
It's not always used for data.
gstamp has joined #ruby
<Nilium>
When?
kilophoton has quit [Ping timeout: 264 seconds]
<xybre>
Max does it
<Nilium>
When and how?
<sam113101>
xybre: it doesn't even work
kilophoton has joined #ruby
addisaden has quit [Quit: Leaving.]
<xybre>
Most "objects" never contain data in Max, they are basic funtions that take parameters and provide output when the parameters are triggered.
fsck3r has quit [Client Quit]
<Nilium>
Are the functions not data?
<xybre>
Difficult to even call the mfunctions, more like operations.
Guest7784 has quit [Ping timeout: 245 seconds]
pskosinski has quit [Ping timeout: 246 seconds]
<xybre>
Please define data.
<xybre>
sam113101: Bummer.
<Nilium>
Well, we're talking about what you consider data, so define data.
obs is now known as frobs
<Nilium>
How is a bundle of functions distinct from data?
<xybre>
Thn everything, anything is a valid "object", including that which is and is not, could or could not be. Hence, nearly meaningless.
<Nilium>
Are you an object?
<Nilium>
It might be easier to say what isn't an object.
<banisterfiend>
what wankery is going on here :P
<Nilium>
banisterfiend: I'm poking xybre 'til he finally explodes.
keeeh has joined #ruby
<xybre>
banisterfiend: Boredom, mostly.
<Nilium>
He thinks programming languages shouldn't use the term 'object'
<Nilium>
Because it confuses the people who like to compare Ruby and Java.
eee19 has quit [Remote host closed the connection]
<atno>
oh boy...
* xybre
yawns
<jrobeson>
i don't see how ruby and java are uncomparable..
<jrobeson>
their objects both have the same basic properties
<xybre>
See?
<Alaude>
One is a gem, the other a coffee
<jrobeson>
one being far more malleable than the other
<jrobeson>
i don't have a problem with such comparisons
<Nilium>
Alaude: And a place.
<jrobeson>
i think it makes conversations easier.. not harder
duggiefresh has joined #ruby
<shevy>
java is super verbose, ruby is java speaking only the bare minimum
<jrobeson>
the whole is simply to provide a base point of reference..
<Nilium>
I learned recently that I rather like Scala.
<jrobeson>
which is why everybody tends to use the same examples for objects in all similiar languages
<jrobeson>
like cars < vehicles, or dog < animal or whatever
<Nilium>
I hate those exampels.
<Nilium>
*examples
<jrobeson>
they work though.. the whole is classification
kilophoton has quit [Ping timeout: 264 seconds]
<jrobeson>
the whole point*
HavokOC has quit [Ping timeout: 264 seconds]
micah` has quit [Ping timeout: 264 seconds]
<shevy>
jrobeson I find myself not often needing to subclass much at all
micah` has joined #ruby
<Nilium>
Yeah, but they also sort of inadvertently teach some people to over-use inheritance and so on.
<jrobeson>
sure.. one should use composition where possible
<xybre>
shevy: every thing you make is a subclass :)
<jrobeson>
or the link
tommylommykins has quit [Ping timeout: 264 seconds]
<jrobeson>
like*
Tricon has quit [Quit: Leaving...]
<Nilium>
I remember back when I first learned about inheritance.
jonahR has joined #ruby
tommylommykins has joined #ruby
<Nilium>
Everything inherited from something. It was hilarious.
<shevy>
xybre yeah but only from class Object, it's like a standard header for everything in ruby to refer to
<Nilium>
And then I look at my code now and there's really almost no explicit inheritance anywhere (ignoring that things implicitly inherit from stuff like Object or Any or what have you, depending on the language).
Deele has quit [Ping timeout: 240 seconds]
<banisterfiend>
Object has nothing in ruby, it's an empty class
jameswatling has joined #ruby
<banisterfiend>
in core ruby
<xybre>
shevy: Check out the ancestor heirachy of a new class
shellox has joined #ruby
<waxjar>
it does include Kernel, Module and BasicObject, no?
<zzz_taion809>
ok, so i have an application interpreting a series of configuration files to execute build commands in a "before, build, after" situation like before: "echo something" build "git pull" after: "echo something else". Is it better to keep this in something like YAML and parsing/executing or would I be better off with a DSL?
zzz_taion809 is now known as taion809
<xybre>
Object inhereits from Kernel (mixin) and BasicObject (superclass)
jameswatling has quit [Remote host closed the connection]
<banisterfiend>
xybre ya but Object itself is a wasteland (it has nothing)
<Nilium>
What he said.
blackmesa has quit [Ping timeout: 240 seconds]
<Nilium>
You could probably remove Kernel as well, I'd think.
Guest72959 has joined #ruby
<banisterfiend>
Kernel has everything
<xybre>
zz_dbRenaud: What about Chef/puppet? What are you trying to do?
<banisterfiend>
#inspect #to_s, #object_id, etc
blackmesa has joined #ruby
<jrobeson>
#insect yourself.. before you #wreck yourself..
<waxjar>
lol
<Nilium>
I'm now slightly tempted to see about removing Kernel, but I'll have to ignore it in favor of being lazy.
<shevy>
insects?
<banisterfiend>
Nilium how would you remove Kernel anyway?
<xybre>
taion809: There's a lot of DSLs that do much of that setup-type stuff, as chef and puppet do, have you looked into them yet?
justsee has quit [Ping timeout: 256 seconds]
nari_ has joined #ruby
PerlPuma has quit [Quit: self.exit(:stage=>:left)]
<taion809>
xybre: not yet, i don't know of any very small applications that for this sort of thing so I'll have to look into it more
<taion809>
err "that do this sort of thing"
<xybre>
taion809: If you provide a use case, we might be able to point you to something more specific
* Nilium
ponders getting coffee
<Nilium>
Slept for four hours, so I probably should
PerlPuma has joined #ruby
<popl>
or sleep
zarubin has quit [Ping timeout: 264 seconds]
<Nilium>
It's 4pm, I don't want to make my sleep cycle even weirder
<taion809>
xybre: should accept an http request and execute a build script
fsck3r has quit [Client Quit]
m_3 has quit [Remote host closed the connection]
<Nilium>
My hope is that by the time it gets to midnight, the willpower to stay awake that I get from obsessive-compulsive coding won't be enough to stop me from passing out.
<Nilium>
'Cause I really need to stop doing all my work from 11pm to 8am.
<xybre>
heh, my code mostly gets written between those hours too.
<xybre>
taion809: HTTP? For an internal API?
<taion809>
it's basically just a tiny orchestration application
aspiers_ has joined #ruby
<taion809>
this isn't to solve any real problem, i just needed to rebuild a docker image after a github commit (and learn ruby in the process ;) ) which works but is not working in any good "ruby way"
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ixti has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
snovak has joined #ruby
kilophoton has joined #ruby
brain_shim has quit [Ping timeout: 256 seconds]
kilophoton has quit [Client Quit]
<taion809>
xybre: yeah but if I did that it'd help me learn sinatra and the puppet api better but wouldn't do much to improve my ruby knowledge :) It feels the answer to my question is "probably"
predator117 has quit [Ping timeout: 241 seconds]
snovak has quit [Ping timeout: 246 seconds]
optimusprimem has joined #ruby
m8 has quit [Quit: Sto andando via]
ckampfe has joined #ruby
shock_one has quit [Remote host closed the connection]
lukec has joined #ruby
<xybre>
taion809: Well, socket programming and http parsing are non-trivial in most languages, so I recommend using *something* to buffer that, and sinatra is about as close as you can get to just using Ruby to do that. You can build your own setup/package system though, I'd recommend using a DSL in that case, since in my experience, you find yourself parsing a lot of YAML and redesigning your specification a lot of
<xybre>
you end up doing anything fancy.
keeeh has quit [Ping timeout: 256 seconds]
predator117 has joined #ruby
<taion809>
xybre: that's what I thought, i'm using sinatra right now to handle the http requests so i'll look into building a dsl for the build process next then