mrsolo has quit [Quit: This computer has gone to sleep]
lfox has quit []
zarubin has joined #ruby
nari has quit [Ping timeout: 240 seconds]
SHyx0rmZ has joined #ruby
BillCriswell has joined #ruby
snovak has joined #ruby
aryaching has joined #ruby
dodosan has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
nowthatsamatt has joined #ruby
tylersmith has joined #ruby
yekta has quit [Quit: yekta]
jdolitsky1 has quit [Quit: Leaving.]
Guest27591 has quit [Ping timeout: 250 seconds]
duggiefresh has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 256 seconds]
quoin has joined #ruby
baroquebobcat has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
milardovich has quit [Quit: Leaving]
Rym has joined #ruby
ericmathison has joined #ruby
lukec has quit [Quit: lukec]
kaspergrubbe has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
ssvo has quit [Ping timeout: 264 seconds]
ehc has quit [Quit: ehc]
DrCode has quit [Remote host closed the connection]
Rym has quit [Read error: Connection reset by peer]
pwh has joined #ruby
azcodex has quit [Quit: azcodex]
chrisja has quit [Quit: leaving]
Rym has joined #ruby
T_T has quit [Remote host closed the connection]
thinkclay has quit [Read error: Connection reset by peer]
thinkclay1 has joined #ruby
ibiwan has quit []
DanKnox is now known as DanKnox_away
mansi has quit [Ping timeout: 276 seconds]
kaspergrubbe has quit [Ping timeout: 245 seconds]
Davey has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
quoin has quit [Ping timeout: 256 seconds]
nfk has quit [Quit: yawn]
ccbn_ has quit [Quit: Page closed]
hogeo has joined #ruby
Ox6abe has joined #ruby
Ziarkaen has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
MrZYX is now known as MrZYX|off
thinkclay1 has quit [Client Quit]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
mlpinit has joined #ruby
risoli has joined #ruby
thepumpkin has quit [Remote host closed the connection]
taternuts has joined #ruby
<risoli>
how long it takes to learn ruby?
<risoli>
i already know some php and js
<taternuts>
quicker than you learned those probably, just like every new language you learn
mlpinit has quit [Remote host closed the connection]
<existensil>
probably not very long. javascript in particular should help understanding of passing blocks since they are similar to anonymous functions
mlpinit has joined #ruby
mrsolo has joined #ruby
<existensil>
its objects all the way down in ruby which made more sense to me coming from PHP/Java/JavaScript
<Eiam>
hmm about 2 years ago
freerobby has quit [Quit: Leaving.]
<Eiam>
I'd never written a line of ruby (but lots of JS & python). I was working on a production rails app in a month (doing stupid things, definitely)
<Eiam>
I started going off on my own after about a year...
<Eiam>
(still doing stupid things)
<Eiam>
but at least I do it alone@
<Eiam>
!
<havenwood>
i started two years ago
<Eiam>
havenwood: damn now I feel behind
<Eiam>
but I only get to write code maybe 30% or less of my day
brunoro has quit [Quit: WeeChat 0.3.8]
<Eiam>
since its only a small part of my job
<existensil>
yeah, i was a full time java dev a little more than 2 years ago and learned ruby in my free time to help my GF who got a job doing ruby. Ended up leaving my job for a ruby job like 3 months later and was writing features for a rails app within a couple days of starting.
<havenwood>
<3 Ruby
julweber_ has quit [Remote host closed the connection]
<Eiam>
never been a full time dev
<existensil>
but, I don't know that ruby was any easier to learn than others... it was just more fun so i was more motivated
<risoli>
oh more fun?
<Eiam>
ruby is more fun
<Eiam>
for sure
<Eiam>
apeiros may think I hate Ruby but I love ruby =)
<existensil>
yes, its an extremely fun, flexible, declarative language
<Eiam>
certainly more than python, although python is OK too!
<existensil>
with a vibrant community and a whole host of great gems you can use to solve lots of the boring stuff :-)
DonRichie has quit [Ping timeout: 260 seconds]
DrCode has joined #ruby
rupee has quit [Quit: Leaving]
DonRichie has joined #ruby
<risoli>
only thing that scares me is writing DSL
ixti has quit [Read error: Connection reset by peer]
<risoli>
is it called metaprogramming?
ixti has joined #ruby
<existensil>
it can be... depends how the DSL is implemented. yes, often metaprogramming is used.
aeontech has joined #ruby
gregorg has quit [Ping timeout: 268 seconds]
<risoli>
macros, etc. feels like i need to memorize pages of language specs
jibi has quit [Ping timeout: 246 seconds]
<existensil>
once you get the concepts behind how modules/macros/etc work you won't have to memorize anything
<existensil>
it will just start to make sense
Ziarkaen has quit [Remote host closed the connection]
<risoli>
existensil: oh i'm glad
Collin has quit [Ping timeout: 264 seconds]
<existensil>
you shouldn't be creating lots of custom DSLs right away with ruby anyways... those make sense when building a library or in certain other places, but for every-day coding you don't need to do any meta programming in ruby
ukd1_ has joined #ruby
ukd1_ has quit [Remote host closed the connection]
<risoli>
i see
<risoli>
lastly, is "learn ruby the hard way" book good enough to start Ruby, or you recommend another book?
snath has quit [Ping timeout: 245 seconds]
<existensil>
there are lots of good books. why's poigant guide is one i'm partial too
ukd1_ has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
spap has quit [Read error: Connection reset by peer]
<existensil>
but my favorite way to learn is find a problem and break out the docs and the google
<existensil>
especially if you already understand core programming concepts
<existensil>
you can pic up the ruby specific stuff as you go
ukd1 has quit [Ping timeout: 268 seconds]
Davey has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]
slothbear has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
Davey has quit [Client Quit]
mlpinit has quit [Remote host closed the connection]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
Ripp__ has quit []
axl_ has joined #ruby
ukd1_ has quit [Ping timeout: 276 seconds]
gregorg has joined #ruby
ukd1 has joined #ruby
Ripp__ has joined #ruby
dodosan has joined #ruby
jonathancutrell has joined #ruby
randomautomator has quit [Ping timeout: 245 seconds]
randomdrake has quit [Quit: randomdrake]
slothbear has quit [Quit: Page closed]
brianpWins has quit [Quit: brianpWins]
<havenwood>
risoli: Learn Ruby the Hard Way by and large isn't idiomatic Ruby, so I'd not recommend that one in particular.
saarinen has joined #ruby
duggiefresh has joined #ruby
srji has joined #ruby
<havenwood>
risoli: Learn to Program by Chris Pine if you're new to programming. If you're coming from another language, The Ruby Programming Language.
<risoli>
havenwood: oh
<havenwood>
risoli: Do check out _why's Poignant Guide, and make sure to listen to the soundtrack while you read it. :D
<risoli>
havenwood: no i have been programming for years. never wrote a single line of Ruby though
Alina-malina has quit [Ping timeout: 248 seconds]
stevechiagozie has joined #ruby
Kabaka has quit [Ping timeout: 240 seconds]
<havenwood>
The Ruby Programming Language is great then, jumps right in.
vlad_starkov has quit [Remote host closed the connection]
Columcille has joined #ruby
brianpWins has quit [Ping timeout: 256 seconds]
dkamioka has joined #ruby
quoin has joined #ruby
wallerdev has quit [Quit: wallerdev]
kunday has quit [Remote host closed the connection]
|jemc| has joined #ruby
BSaboia has quit [Ping timeout: 268 seconds]
aeontech has quit [Quit: aeontech]
postmodern has quit [Quit: Leaving]
brianpWins has joined #ruby
saarinen has joined #ruby
aeontech has joined #ruby
saarinen has quit [Client Quit]
baroquebobcat has joined #ruby
maletor has joined #ruby
axl_ has joined #ruby
saarinen has joined #ruby
Xiti` has joined #ruby
plotter has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<plotter>
I'm a little dumbfounded. What I call such a program as this. I want to write a program in ruby that I run a server program on a remote internet facing server, and a client on a local system behind NAT so that when a request comes in through to the server it would be forwarded to the client
axl_ has quit [Client Quit]
io_syl has joined #ruby
<plotter>
ie a webhost ran behind the NAT but the outside internet facing server handles all the requests as if an intermediary
Xiti has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
aryaching_ has joined #ruby
zarubin has quit [Ping timeout: 245 seconds]
quoin has quit [Ping timeout: 245 seconds]
<r0bglees0n>
a gateway/proxy
<xybre>
plotter: yeah thats like a tunneling proxy. Make it open source.
alvaro_o has quit [Quit: Ex-Chat]
Guest43005 has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
aryaching has quit [Ping timeout: 260 seconds]
rafacv has joined #ruby
mrsolo has joined #ruby
<plotter>
thats the word i was looking for
<plotter>
tunneling proxy
<plotter>
:d thanks my brain was frozen
ssvo has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
zets has quit [Ping timeout: 276 seconds]
spap has quit []
cooldman224 has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
workmad3 has quit [Quit: leaving]
jojosiao has quit [Quit: Page closed]
workmad3 has joined #ruby
a7d7p has left #ruby [#ruby]
werdnativ has quit [Quit: werdnativ]
t1 has quit [Quit: Verlassend]
Stygia has joined #ruby
<jezen>
I’m confused; If I do this: puts Jekyll::Converters::Markdown::RedcarpetParser.convert(post.content)
<jezen>
I get: error: undefined method `convert' for Jekyll::Converters::Markdown::RedcarpetParser:Class.
<jezen>
why did it add ‘:Class’ on the end?
<MrZYX>
you're calling the method on a class
<MrZYX>
and all classes have the type Class
<jezen>
do I have to instantiate it first?
<MrZYX>
apparently
YaNakilon has quit [Ping timeout: 245 seconds]
<jezen>
right
<jezen>
thanks
<MrZYX>
the docs say convert is an instance method
colonolGron has joined #ruby
leex has joined #ruby
<okinomo>
I'm doing some simple calculation in my controller like so - @progresshours = @hours * 10 . Is this ok? Or should calculations be in the model?
<okinomo>
I wrote it this way because then I call @progresshours in the view to render the answer
<jezen>
MrZYX: I don’t understand what config parameter I’m meant to pass in when instantiating
<shevy>
avril14th I do not think it can be a typo, the error would be different if there is a typo, a parse error would be the case if there was a typo/syntax error. if it would be my project, I would go into google/api_client directory and ensure that a file called client_secrets.rb is there, and then I would go into ruby SITE_DIR path and see if it was installed. I dont use bundler though, I do not trus tit
<shevy>
*trust it
<jezen>
I’m trying to create an instance with rc = Jekyll::Converters::Markdown::RedcarpetParser.new
<MrZYX>
okinomo: #rubyonrails
<jezen>
and I get back Command failed: error: wrong number of arguments (0 for 1)
<avril14th>
shevy: the file is there, I can access it and open it
<shevy>
jezen it wants one argument
<jezen>
tried .new(), .new('')
<MrZYX>
jezen: you're probably not supposed to instantiate that on your own, but I don't know jekyll
<shevy>
the second would pass an empty string object, the first would pass no argument jezen
<MrZYX>
read the source
camilasan has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 256 seconds]
<okinomo>
MrZYX: Woops! Sorry, didn't realize i was in wrong channel
<shevy>
doesn't jekyll have proper documentation? :P
camilasan has joined #ruby
jprovazn has joined #ruby
<jezen>
shevy: There’s not a lot of documentation for writing generators
cj3kim has quit [Ping timeout: 245 seconds]
camilasan has quit [Read error: Connection reset by peer]
akemrir has quit [Read error: Operation timed out]
newbiehacker has joined #ruby
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
postmodern has joined #ruby
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
kizzx2 has quit [Client Quit]
snovak has quit [Ping timeout: 245 seconds]
Michael has joined #ruby
camilasan has quit [Ping timeout: 245 seconds]
Michael is now known as Guest25441
<leex>
Ok, I think I encountered a bug in rubys PTY implementation, here is my example code: http://pastebin.com/65Td16Av which works fine with 1.9.3p429 (2013-05-15 revision 40747). In 1.9.3 it spawns a urxvt and writes to the slave, but when using ruby 2.0.0p195 (2013-05-14 revision 40734) it fails. can someone confirm this behavior?
jezen has quit [Remote host closed the connection]
colonolGron has quit [Ping timeout: 264 seconds]
jezen has joined #ruby
<jmaister>
Who needs documentation. Isn't all ruby code self explanatory?
camilasan has joined #ruby
ssvo has joined #ruby
BSaboia has joined #ruby
dodosan has quit [Remote host closed the connection]
jezen_ has joined #ruby
jezen has quit [Read error: Connection reset by peer]
<ayaz>
Eh
jachymko[afk] is now known as jachymko
__GG has joined #ruby
relix has joined #ruby
sakshi has joined #ruby
ssvo has quit [Ping timeout: 276 seconds]
beilabs_ has quit [Ping timeout: 245 seconds]
sakshi has left #ruby ["Konversation terminated!"]
MissionCritical has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
tvw has joined #ruby
blackmesa has joined #ruby
Xaitec_______ has joined #ruby
Xaitec_______ has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 248 seconds]
schaerli has joined #ruby
postmodern has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
Guest25441 has quit [Remote host closed the connection]
Mission-Critical has joined #ruby
headius has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Banistergalaxy has joined #ruby
beilabs_ has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
Macaveli has joined #ruby
<shevy>
jmaister sadly no :(
niklasb has joined #ruby
nomenkun has joined #ruby
persand has joined #ruby
ewnd9 has quit [Read error: No route to host]
AndChat| has quit [Ping timeout: 264 seconds]
ewnd9 has joined #ruby
eloquent_mute has quit [Ping timeout: 276 seconds]
postmodern has quit [Quit: Leaving]
jan1337z has quit [Changing host]
jan1337z has joined #ruby
clocKwize has quit [Quit: clocKwize]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
skaflem has joined #ruby
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
clocKwize has joined #ruby
kizzx2 has joined #ruby
mansi has joined #ruby
Mission-Critical is now known as MissionCritical
wildroman has joined #ruby
dangerousdave has quit [Quit: Leaving...]
mansi has quit [Ping timeout: 264 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
fgo has quit [Remote host closed the connection]
Macaveli has quit [Read error: Connection reset by peer]
oliver_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
vlad_starkov has joined #ruby
apeiros has joined #ruby
jbpros has quit [Quit: jbpros]
lucazi has joined #ruby
Macaveli has quit [Client Quit]
Splourian has quit [Quit: Leaving]
dross has quit [Ping timeout: 245 seconds]
okinomo has quit [Ping timeout: 260 seconds]
ThePicard has quit [Ping timeout: 264 seconds]
jlebrech has joined #ruby
dross has joined #ruby
camilasan has quit [Remote host closed the connection]
thinkclay has joined #ruby
nhhagen_ has joined #ruby
cj3kim has joined #ruby
ThePicard has joined #ruby
camilasan has joined #ruby
camilasan has quit [Remote host closed the connection]
Macaveli has joined #ruby
colonolGron has joined #ruby
GeissT has joined #ruby
eloquent_mute has joined #ruby
oliver_ has joined #ruby
lkba has joined #ruby
nhhagen_ has quit [Ping timeout: 260 seconds]
cj3kim has quit [Ping timeout: 256 seconds]
<quazimodo>
esquish me
oliver_ has quit [Remote host closed the connection]
<C0C0>
leex: I can confirm the bug
buibex has joined #ruby
Michael has joined #ruby
Michael is now known as Guest39332
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
YaNakilon has quit [Ping timeout: 264 seconds]
jachymko is now known as jachymko[afk]
stevechiagozie has joined #ruby
jezen_ has quit [Remote host closed the connection]
stevechiagozie has quit [Client Quit]
jezen has joined #ruby
Domon__ has quit [Remote host closed the connection]
__GG has quit [Quit: Leaving.]
Domon has joined #ruby
thinkclay has quit [Quit: Leaving.]
thinkclay has joined #ruby
jachymko[afk] is now known as jachymko
thinkclay has quit [Client Quit]
gr33n7007h has joined #ruby
YaNakilon has joined #ruby
slummer87 has joined #ruby
jezen has quit [Ping timeout: 264 seconds]
Domon has quit [Ping timeout: 240 seconds]
colonolGron has quit [Quit: Lost terminal]
headius has quit [Quit: headius]
BSaboia has quit [Ping timeout: 268 seconds]
tacos1de has joined #ruby
pyrac has quit [Quit: pyrac]
ssvo has joined #ruby
threeturn has quit [Quit: threeturn]
kizzx2 has quit [Quit: Leaving.]
KobraKao has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
zeel has joined #ruby
iamjarvo has joined #ruby
fgo has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
youcallme has joined #ruby
ttt has quit [Remote host closed the connection]
KobraKao has quit [Ping timeout: 256 seconds]
ssvo has quit [Ping timeout: 256 seconds]
greengriminal has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
wildroman has quit [Remote host closed the connection]
fgo_ has joined #ruby
fgo has quit [Read error: Connection reset by peer]
oliver_ has joined #ruby
dodosan has joined #ruby
rickruby has joined #ruby
rcosta has quit [Remote host closed the connection]
camilasan has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ldnunes has joined #ruby
tkuchiki has joined #ruby
slummer87 has quit [Remote host closed the connection]
Guedes has left #ruby ["Saindo"]
blackmesa has joined #ruby
arturaz has joined #ruby
dodosan has quit [Ping timeout: 268 seconds]
freerobby has joined #ruby
atmosx has joined #ruby
browndawg has quit [Quit: Leaving.]
justsee has quit [Ping timeout: 260 seconds]
jezen has joined #ruby
jibi has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 248 seconds]
zorg24 has quit [Ping timeout: 264 seconds]
greengriminal has quit [Quit: Leaving]
osvico has joined #ruby
jezen_ has joined #ruby
snovak has joined #ruby
headius has joined #ruby
kayloos has joined #ruby
IceyEC has joined #ruby
jezen has quit [Ping timeout: 245 seconds]
nari has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
mansi has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
lockwheel has joined #ruby
pyrac has joined #ruby
<lockwheel>
hi can someone reset my password ?
rcosta has joined #ruby
<lockwheel>
please ?
<tobiasvl>
lockwheel: what password?
zorg24 has joined #ruby
akemrir has joined #ruby
jachymko is now known as jachymko[afk]
jachymko[afk] is now known as jachymko
jachymko is now known as jachymko[afk]
headius has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 264 seconds]
<lockwheel>
i have register freenode nick but I lost it
jbpros has joined #ruby
mlpinit has joined #ruby
Hmmmmmm has joined #ruby
<jrobeson>
lockwheel, this isn't the place for that
<jrobeson>
ask nickserv if you set an email address
<lockwheel>
jrobeson can you tell me a place ?
<jrobeson>
you can google/search for the correct command
<jrobeson>
if you did set an email address
<jrobeson>
if you didn't.. then you'll have to beg people on #freenode
<jrobeson>
but don't bug them if you did
wildroman has joined #ruby
<lockwheel>
i did man how could I ask them
radic_ has quit [Ping timeout: 245 seconds]
<lockwheel>
than you btw
<Hmmmmmm>
Question: does anybody here regret the fact they learned OOP the ruby way?
<lockwheel>
*thank
gr33n7007h has quit [Ping timeout: 260 seconds]
<shevy>
Hmmmmmm depends on what you mean with OOP exactly
freerobby has quit [Quit: Leaving.]
ananthakumaran has quit [Quit: Leaving.]
banisterfiend has joined #ruby
<shevy>
Hmmmmmm in ruby there is this problem of an arbitrary distinction between class and modules where modules are crippled classes. functionality should be freely modifiable, any behaviour of a class should be copyable to another class in any amount of detail, be it full (through "subclassing") or minor (in form of "modules" and subsequent include-functionality)
DarthGandalf has quit [Ping timeout: 245 seconds]
lockwheel is now known as lockweel
zarubin has joined #ruby
<Hmmmmmm>
Thanks for the response, my question also was about: does ruby force you to learn oop like it is meant to be
<shevy>
that also depends on how you use ruby
<shevy>
you can use it without ever having to write class Foo; end or module Bar; end
<Hmmmmmm>
instead of making it work some way, making it work the right way. thinking about being a pro @ laziness and also POLA
<shevy>
?
<C0C0>
Hmmmmmm: OOP is "not meant to be"
<shevy>
there is no "right" way, there are just better ways
<Hmmmmmm>
ever heard about the 'term' lazy programming?
<Hmmmmmm>
ye sure
<Hmmmmmm>
my bad
oliver_ has quit [Ping timeout: 256 seconds]
<shevy>
I am lazy all the time
<Hmmmmmm>
but does it 'force' you to use the right way
<C0C0>
Programming is about building solid software
<shevy>
the best code is the one that does not have to be written
<shevy>
Hmmmmmm every language forces you to adjust to it
<atmosx>
shevy: nice quote.
<C0C0>
the right way is "wahtever is maintainable & fast to write"
<Hmmmmmm>
ofcourse, but i was keeping POLA in mind
jachymko[afk] is now known as jachymko
<atmosx>
C0C0: fast to write != maintainable
<C0C0>
what is maintainable heavily depends on your language
<shevy>
either by syntax errors or satisfying the parsers, then of course there are different ways to layout your project, files, code and so on
<C0C0>
atmosx: thats not necessary true
<shevy>
yeah
<shevy>
ruby is rather clean, you can be very terse if you want to
<atmosx>
C0C0: it is, in the long run it always is.
<shevy>
I think haskell is also terse
fgo_ has quit [Remote host closed the connection]
<C0C0>
atmosx: hmmm In practice maybe, but I don't see a reason for that being true generally
<atmosx>
C0C0: Actually, either you write 'clean code' so that everybody understand and you document only the necessary parts or you have to document the shit out of every method.
<shevy>
Hmmmmmm in general, writing classes in ruby is the best way if you want to reuse code
TomRone has quit [Ping timeout: 245 seconds]
<atmosx>
C0C0: I thin it's a bit reversed. I'ts generally true but there might be some exceptions
DarthGandalf has joined #ruby
<atmosx>
s/thin/think
<shevy>
class Compile # this is my class to compile something... Compile.new(:gcc) or 'gcc' would compile the latest gcc for me for instance
dangerousdave has joined #ruby
<shevy>
I could also do def compile(i) instead but it's not so easy to arrange it all without a class or module
varfoo has quit [Ping timeout: 245 seconds]
speakingcode-wor has quit [Ping timeout: 245 seconds]
<shevy>
so class Compile here also functions as an organized namespace
<C0C0>
atmosx: well I can read into a decently written but undocumented 10k lines ruby projekt in a few days, but If I try that with a C program of similar capabilities (e.G. 4-10 times more code).. no chance
<shevy>
(actually, it resides in a module too...)
ItSANgo has quit [Read error: Connection reset by peer]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
<C0C0>
writing ruby is both faster as well as easier to maintain to me
Kabaka has quit [Ping timeout: 240 seconds]
varfoo has joined #ruby
threeturn has joined #ruby
visof has quit [Ping timeout: 256 seconds]
ItSANgo_ has joined #ruby
<shevy>
atmosx I try to write tutorials for my larger project, that way I hope it can help new users, and also remind me about certain design decisions
speakingcode-wor has joined #ruby
TomRone has joined #ruby
<Hmmmmmm>
nice nice, some answers i can do something with.. instead of the standard "pro talk" being held @ youtube
<atmosx>
C0C0: you can't but Linus Torvalds probably can.
<C0C0>
now imagine crystal gets usable and we get a ruby like language with proper static typing..
<shevy>
atmosx hehe
<C0C0>
atmosx: see maintainability is a question of who does it
<atmosx>
C0C0: So even this is subjective. To avoid this sort of subjectivity we add comments, right?
<shevy>
atmosx perhaps because Linus throws away code he does not want :D
<atmosx>
C0C0: or we choose to adjust to 'general guidelines' of a group of programmers, right?
<C0C0>
hmm? never seen really helpfull comments tbh
pranny1 has quit [Quit: Leaving.]
<shevy>
oh... crystal was that language that is similar to ruby syntax right?
<C0C0>
shevy: yeah
<atmosx>
shevy: he's a prick a dick or whatever you want but the guy is *really good* :-P with C
<shevy>
does it have any documentation though? ruby is pretty awful with documentation
<atmosx>
a bunch of other languages probably
<C0C0>
shevy: well the compiler is written in ruby so its a lot esier to get into :P
<C0C0>
also its just about 10K lines
<shevy>
I like more competition to ruby
<Hmmmmmm>
Another question, does it seriously pay of to do OOP the way its intended (POLA) like in JS? Or is it just a little bonus on top of everything?
cj3kim has joined #ruby
newUser1234 has joined #ruby
<shevy>
Hmmmmmm is the js OOP any good?
DonRichie has joined #ruby
wildroman has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
radic_ has joined #ruby
<shevy>
it reminds me of class Struct in ruby
<C0C0>
shevy: its terrible
dash_ has quit [Ping timeout: 264 seconds]
<shevy>
hehe
<atmosx>
shevy: doesn't need to. Ruby (most of the times) if english… then if you start writting l33t code like some_list.map(&:foo) then go figure.
<atmosx>
err is English
<shevy>
I like the idea behind prototypic languages like Io
<C0C0>
Hmmmmmm: doing OOP is good if your problem maps nicely to OOP solutions
<shevy>
atmosx yeah
kayloos has quit [Remote host closed the connection]
threeturn has quit [Read error: Connection reset by peer]
osvico has quit [Ping timeout: 245 seconds]
<Hmmmmmm>
when just keeping the thought process of pola which is working absolutely GREAT in JS (actualy its the only way to do it 'good')
<C0C0>
atmosx: what is wrong with some_list.map(&:foo)
dash_ has joined #ruby
<C0C0>
(well except for the name foo and some_list obviously)
<atmosx>
the guy uses attr_writer/reader … I wonder, I'm always using just attr_accessor: … isn't it the same?
threeturn has joined #ruby
<C0C0>
I think it is
Inoperable has quit [Remote host closed the connection]
<C0C0>
but maybe sometimes you want to have no writter...
oliver_ has joined #ruby
<C0C0>
using both at the same time is rather pointless
cj3kim has quit [Ping timeout: 240 seconds]
ewnd9 has joined #ruby
lucazi is now known as lucazi_away
newUser1234 has quit [Ping timeout: 248 seconds]
JulsFelic has joined #ruby
jibi has joined #ruby
failshell has joined #ruby
<shevy>
atmosx yes
<shevy>
I think he does not know it probably
<atmosx>
see even apparently adanced users make silly mistakes heh.
<atmosx>
s/users/programmers
<C0C0>
atmosx: its not a misstake is it?
newbiehacker has quit [Remote host closed the connection]
<C0C0>
its just doing something in a quirky way
<Hmmmmmm>
Another question I get asked alot: is ruby an unsafe language as in, keeping the POLA paradigm in mind is a pain in the ass.. so you'll end up not using it everywhere (when done it significantly reduces errors/bugs/loopholes)
<shevy>
atmosx yeah, ruby has a long and big learning curve actually
<Xeago>
what is POLA?
<Xeago>
shevy: really?
<leex>
Xeago: had to look it up, too ...
<Xeago>
I say ruby has a very quick short learning curve
mansi has joined #ruby
<shevy>
Xeago sure! just imagine how long it takes to learn everything ruby has to offer
<Xeago>
but a high ceiling
oliver_ has quit [Remote host closed the connection]
<Hmmmmmm>
Principle Of Least Authority
<Xeago>
shevy: but not a steep curve
<Xeago>
just a high ceiling
oliver_ has joined #ruby
eloquent_mute has quit [Ping timeout: 260 seconds]
<Hmmmmmm>
yeye that's what i think, that way its the same as JS
DonRichie has quit [Quit: Verlassend]
browndawg has joined #ruby
<Xeago>
js with its global variables was different for me
JulsFelic has quit [Ping timeout: 250 seconds]
<Hmmmmmm>
just dont use em xD
mark_locklear has joined #ruby
<leex>
Hmmmmmm: what do you need principle of least privilege in you OOP?
<leex>
Hmmmmmm: what do you need principle of least privilege in your OOP for?*
<Hmmmmmm>
in order to write secure applications
<Hmmmmmm>
you NEED it
mansi has quit [Remote host closed the connection]
<Hmmmmmm>
otherwise you end up writing security code
<C0C0>
Hmmmmmm: I don't thinkl thats how security works...
goshakkk has joined #ruby
<Xeago>
Hmmmmmm: define secure
<Hmmmmmm>
when it can be embedded in the thinking of the program
<leex>
Hmmmmmm: I agree with C0C0
rdxc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mansi has joined #ruby
<Xeago>
the skills of the attacker and which security properties you desire
<Hmmmmmm>
ofcourse
nari has joined #ruby
<leex>
Hmmmmmm: I guess you need ADA
vlad_starkov has quit [Remote host closed the connection]
<Xeago>
ADA?
<Hmmmmmm>
but I always keep the highest skill in mind
Guest67332 has quit [Ping timeout: 245 seconds]
<Hmmmmmm>
as far as I myself can go
fgo has joined #ruby
<C0C0>
Hmmmmmm: well If I got code exec in your program all that is irrelevant
<Xeago>
let me rephrase, attack surface
<Xeago>
Hmmmmmm: not personal skill
<Xeago>
you should assume attackers are pretty much infinitely more powerful than you are
<Hmmmmmm>
thats why i said
<Hmmmmmm>
as fair as i can go myseld
<Hmmmmmm>
self
<Xeago>
as I said, that is why you should worry about the attacksurface instead
<Xeago>
instead of skill
akemrir has quit [Quit: WeeChat 0.4.1]
<Xeago>
so please define those 3 things, define your view of secure, attack surface and the desired security properties
<C0C0>
Xeago: thanks :)
<Xeago>
C0C0: what?
<Hmmmmmm>
so about attack surface
<leex>
Hmmmmmm: you are right, you don't want to expose your private methods to any attacker, that's a valid point. never thought about it
<C0C0>
Xeago: for asking the right questions
mephux has joined #ruby
<Hmmmmmm>
therse should be as close to none as possible (ofcourse)
<Hmmmmmm>
and keeping POLA in mind
<Xeago>
Hmmmmmm: please start with your view of secure
<Hmmmmmm>
you ensure you do it the 'right' way, as in most secure without alot of time loss / maintainabilty
<Xeago>
what defines secure for you
<Hmmmmmm>
my view of secure is, it would be impossible for a person to come up with something to hack it
<Xeago>
>.<
<Hmmmmmm>
only brute force should be able to
monkegjinni has quit [Remote host closed the connection]
tonni has quit [Ping timeout: 256 seconds]
mansi has quit [Ping timeout: 245 seconds]
<Xeago>
that is quite a blunt view
ssvo has joined #ruby
<Xeago>
in any case
<Xeago>
ruby is not your language because it is not deterministic
<C0C0>
Hmmmmmm: do you acctually have any idea what your talking about?
<leex>
Hmmmmmm: what is your scenario?
<Xeago>
if that is how you define secure, go read up on crypto101 it introduces the concept of attacker scenario's
<Xeago>
You don't have an idea of what you want, so fix that first. Coursera has a very good course for this
<Xeago>
You can read up the first 3 weeks in about half a day
<leex>
Hmmmmmm: what kind of software would you like to build? (or do you just want to troll us?)
<Hmmmmmm>
Ok, let me type a little list:
lucazi_away is now known as lucazi
<Xeago>
you can't just throw around generalities like you did when defining these 3 things, you have to be very specific because attackers gain an advantage from even the smallest things
asterite has joined #ruby
iamjarvo has quit [Remote host closed the connection]
<Hmmmmmm>
Interrupting my list typing, but ofcourse Xaego ur right, so it means keeping those advantages as small as possible
<Hmmmmmm>
without the need of (perhaps even one) security module
cody-- has joined #ruby
iamjarvo has joined #ruby
tonni has joined #ruby
Inoperable has joined #ruby
<Xeago>
I really encourage you to define the 3 properties, concretely
MrZYX is now known as MrZYX|off
ssvo has quit [Ping timeout: 248 seconds]
<Xeago>
currently we just have some buzzwords flying around with the desire to make things secure
<Hmmmmmm>
No, my question wasnt answered yet. Instead alot of other question came along, so again: is ruby a language which pays of to use the POLA paradigm
<Hmmmmmm>
just want an answer, no other questions xD
anonymuse has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<C0C0>
Hmmmmmm: the principle of least authority always pays of, independently of your programming language
<C0C0>
I'd be quite supprised if there is a programminglanguage where OOP principle of least authority has ANY influence whatsoever on security
browndawg has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Quit: Leaving...]
<C0C0>
using the principle of least authority when efining your user roles... thats where security comes from
<C0C0>
defining
Macaveli has quit [Quit: Computer has gone to sleep.]
camilasan has quit [Remote host closed the connection]
breakingthings has joined #ruby
ravster has joined #ruby
jp- has joined #ruby
persand has quit [Quit: persand]
<Hmmmmmm>
C0C0, ur right. so my other question is, will pola make ruby more verbose? instead of making it more elegant (widely accepted norms), like i,e JS
<C0C0>
no
<Xeago>
Hmmmmmm: that quistion is very fluffy - both yes and no are correct answers
rdxc has joined #ruby
<C0C0>
Xeago: choose MU
<C0C0>
:P
Niall has quit [Ping timeout: 264 seconds]
<Xeago>
MU?
<C0C0>
a new convention of using #to_h to convert objects to Hashes.[26]
<C0C0>
oops
optimusprimem has quit [Ping timeout: 245 seconds]
<Xeago>
(please stop with all these abbreviations, makes it very hard to skim the channel)
kaldrenon has joined #ruby
<C0C0>
MU is not a abbreviation
<Xeago>
I assumed it was, sorry
jonathanwallace has joined #ruby
<Hmmmmmm>
how is it answerable by saying yes or no, there have to be 'standards' on how ruby code looks / maintains / performs the best
<Xeago>
"s ruby a language which pays of to use the POLA paradigm?" that question
JumpMast3r has quit [Quit: JumpMast3r]
pygospa has joined #ruby
blindrage has joined #ruby
<leex>
Xeago: :D
optimusprimem has joined #ruby
<Xeago>
leex: I saw that you had a question too
<Xeago>
mind restating it, again?
<blindrage>
long story short, i have a config that some perl scripts use that's in the format 'server localhost\nport someport\n...' . Chosen because it's super simple and easy to use with perl's Simple::Config . I need to parse this using ruby for a facter item but i don't really know what tools are at my disposal
Macaveli has joined #ruby
bigkevmcd has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 264 seconds]
<blindrage>
is there a library somewhere that can turn this into a hash or do i need to do that? also where's the best place to browse ruby libraries... like what cpan is to perl
<Xeago>
blindrage: doesn't that look like just space seperated key-values split by line?
<blindrage>
crap i guess the latter would be gem huh...ignore that blind moment
<blindrage>
it is, but i'd rather not reinvent the wheel
geekbri has joined #ruby
jezen_ has quit [Remote host closed the connection]
<Xeago>
blindrage: I am a newb, wouldn't know if it would exist
jachymko is now known as jachymko[afk]
banisterfiend has joined #ruby
<blindrage>
i can do it if need be, but if there's something someone knows that can turn it into a hash that would be great =)
<leex>
Xeago: I am trying to get PTY to work with ruby 2.0, if I run this code (http://pastebin.com/65Td16Av) in 1.9.3 it works fine, but when I execute it with 2.0 something goes wrong and no terminal is spawned and I get an error: 5:in `write': Input/output error - /dev/pts/27 (Errno::EIO)
<C0C0>
blindrage: how about "File.read("config").lines.reduce({}){|hash, line| key,val = *line.strip.split; h[key] = val; h }
ananthakumaran has joined #ruby
bigkevmcd has joined #ruby
camilasan has joined #ruby
<Xeago>
leex: sorry I have no idea
<Xeago>
apeiros, Banistergalaxy!
greengriminal has joined #ruby
<Xeago>
handing over the reigns\ here
<leex>
Xeago: me neither ;)
krawchyk has joined #ruby
snovak has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<Hmmmmmm>
Well, no answers I can actualy do something with. Might the saying be correct? 'Ruby programmers tend to answer politically correct answers' when talking about something that isnt code, but a way of thinking...
<Hmmmmmm>
dont think so, still funny
siwica has joined #ruby
zorg24 has joined #ruby
<Hmmmmmm>
sry for the 'waste of time', cheers and happy programming ;)
Hmmmmmm has quit [Quit: Page closed]
<blindrage>
C0C0: i don't know the syntax of ruby too well, but that looks 'simple' enough =)
<blindrage>
facter is the only time i've had to use ruby =\
tk_ has joined #ruby
Aryasam has joined #ruby
browndawg has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
<C0C0>
blindrage: blindrage well sorry theres a type there
yacks has joined #ruby
<C0C0>
should be hash[key]
<C0C0>
hash[key]=val; hash}
<blindrage>
'sall good, i'm debugging it now
<C0C0>
instead of h[key]=val; h}
<C0C0>
but then it shoudl work
<apeiros>
Xeago: what?
snovak has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
camilasan has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 264 seconds]
rcosta has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Operation timed out]
<blindrage>
what's the best practice on string formatting? i could google but while i'm here my mind says strings are immutable. if that's true is it good to use a formatter like C#'s string.Format("{0}",variable); syntax?
<blindrage>
hmmm, ok. just trying not to do awful ruby things since i'm new to the practice. thanks!
<clocKwize>
blindrage: I came from c# too (many moons ago now)
<C0C0>
blindrage: well thats perfectly fine, I'm glad to help :)
<apeiros>
PTY - no real knowledge about that. also "doesn't work" isn't a useful problem description. sorry, can't help here as I'm short on time.
<blindrage>
clocKwize: how do you like the community vs c#? i'm super green so for my job i use all sorts of languages ...
<C0C0>
(as long as you ask reasonable questions that is)
zarubin has quit [Quit: Leaving]
<leex>
apeiros: did you run it? it gives a rather specific error message...
<blindrage>
i do some sysadmin so i write perl scripts. my main job is xquery which is a loosely typed functional language. I write tests in C# specflow (gherkin), and i write some automation stuff for Puppet in ruby
youcallme has quit [Remote host closed the connection]
snovak has joined #ruby
adambeynon has joined #ruby
youcallme has joined #ruby
interactionjaxsn has joined #ruby
kayloos has quit [Remote host closed the connection]
eloquent_mute has quit [Ping timeout: 240 seconds]
siwica has quit [Quit: siwica]
<triptec>
in php I would do something like "foreach (array)$possible_string as $item) if there might be a risk that $possible_string isn't an array, is there something similar in ruby?
mansi has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
eloquent_mute has joined #ruby
d33tah is now known as d33tah1
d33tah1 is now known as deetah
pyrac has quit [Quit: pyrac]
thelamest has quit [Quit: sorry for modespam]
Bry8Star{T2 has joined #ruby
pyrac has joined #ruby
jdeeburke has joined #ruby
codecop has quit [Remote host closed the connection]
deception has joined #ruby
lukec has quit [Quit: lukec]
deception has quit [Client Quit]
deception has joined #ruby
ehc has joined #ruby
schaerli has quit [Remote host closed the connection]
burlyscudd has joined #ruby
thelamest has joined #ruby
monkegjinni has joined #ruby
coderhs has quit [Quit: Leaving]
brbcoding has quit [Ping timeout: 276 seconds]
kindjal has joined #ruby
banisterfiend has joined #ruby
youcallm_ has joined #ruby
DrCode has quit [Remote host closed the connection]
sailias has joined #ruby
browndawg has joined #ruby
blackmesa has quit [Remote host closed the connection]
jezen has joined #ruby
kindjal has quit [Client Quit]
s0ber has quit [Read error: Connection reset by peer]
eloquent_mute has quit [Quit: eloquent_mute]
s0ber has joined #ruby
blackmesa has joined #ruby
monkegjinni has quit [Remote host closed the connection]
pjb_ has joined #ruby
x0nic has quit [Ping timeout: 260 seconds]
paul_k has quit [Ping timeout: 260 seconds]
parzo has joined #ruby
micah` has quit [Ping timeout: 260 seconds]
youcallme has quit [Ping timeout: 260 seconds]
<pjb_>
is this thing on?
JohnE has joined #ruby
okinomo has quit [Ping timeout: 276 seconds]
thelamest has quit [Ping timeout: 260 seconds]
linux_noob_666 has quit [Ping timeout: 260 seconds]
Gacha has quit [Ping timeout: 260 seconds]
machuga has quit [Ping timeout: 260 seconds]
zoee has quit [Quit: zoee]
<MrZYX>
pjb_: no
pyrac has quit [Ping timeout: 260 seconds]
DrCode has joined #ruby
<pjb_>
didn't think so.
micah` has joined #ruby
Bira has joined #ruby
mmm has quit [Ping timeout: 252 seconds]
lukec has joined #ruby
Gacha has joined #ruby
dkamioka has quit [Remote host closed the connection]
mmm has joined #ruby
pjb_ has left #ruby [#ruby]
peregrine81 has quit [Ping timeout: 256 seconds]
kpshek has joined #ruby
cascalheira has joined #ruby
shaunbaker has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 268 seconds]
__GG has joined #ruby
BillCriswell has joined #ruby
paul_k has joined #ruby
x0nic has joined #ruby
hatoishi has joined #ruby
peregrine81 has joined #ruby
hatoishi has left #ruby [#ruby]
okinomo has joined #ruby
linux_noob_666 has joined #ruby
machuga has joined #ruby
jibi has joined #ruby
kuzushi has joined #ruby
JohnE has quit [Ping timeout: 245 seconds]
thelamest has joined #ruby
yaymukund has quit [Ping timeout: 276 seconds]
kobain has joined #ruby
Tricon has joined #ruby
cucumbrman has quit [Remote host closed the connection]
<lotherk>
can't find it in the documentation, maybe someone in here can tell me if sequel's .where returns nil or something else if it does not find anything?
phantasm66 has joined #ruby
cucumbrman has joined #ruby
<clocKwize>
doesn't it return a ResultSet, which will be .empty? and have a count of 0
<clocKwize>
.first will be nil
<lotherk>
ah, okay!
<clocKwize>
why don't you try it
<clocKwize>
its 1 line of code
blackratdog has quit [Read error: Connection reset by peer]
<lotherk>
not able in the moment
ffranz has joined #ruby
<sevenseacat>
try things? bah
<lotherk>
just making some thoughts
dkamioka has joined #ruby
<sevenseacat>
easier to just ask
<lotherk>
sevenseacat: you're dope man.
<lotherk>
sevenseacat: i can not try in the moment that's why I'm asking.
Kneferilis has joined #ruby
<lotherk>
and I am reading the documentation but it was not clear to me
MrThePlague has joined #ruby
<lotherk>
so I'm asking.
MrThePlague has quit [Changing host]
MrThePlague has joined #ruby
<lotherk>
if you don't want to answer me, why not just stfu?
browndawg has quit [Quit: Leaving.]
<sevenseacat>
sorry, i couldnt hear you over the sound of my writing code.
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lotherk>
what a joke, I'll laugh later on.
pwh has quit [Quit: pwh]
rins has joined #ruby
mary5030 has joined #ruby
okinomo has quit [Quit: Lost terminal]
nowthatsamatt has joined #ruby
rhys_ has joined #ruby
aagdbl has quit [Ping timeout: 256 seconds]
enebo has joined #ruby
mary5030 has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
bean has joined #ruby
apfelbox has joined #ruby
theRoUS has quit [Client Quit]
Ziarkaen has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
RDash[AW] is now known as RDash
kilophoton has joined #ruby
ssvo has quit [Ping timeout: 245 seconds]
shaunbak_ has joined #ruby
tagrudev has quit [Remote host closed the connection]
Xeon06 has joined #ruby
<Xeon06>
Hey guys. I'm having trouble looking this up, can anyone tell me more about the :foo syntax? It's kind of like a string literal but internalized or something?
aeontech has joined #ruby
proxie has joined #ruby
quoin has quit [Remote host closed the connection]
azcodex- has quit [Read error: Connection reset by peer]
<MrZYX>
pretty much, it'll always have the same object id and won't get garbage collected
elux has joined #ruby
<Buuyo>
Xeon06: they're called symbols. the koans actually give you a pretty cood feel for them btw. :)
dhruvasagar has quit [Remote host closed the connection]
<canton7>
it's a symbol. There's only ever one instance of a given symbol, ever. This makes comparisons uber-cheap, but creation a little more expensive. They're often used as hash keys, enum values, that sort of thing
<Xeago>
Xeon06: pretty much nailed it
<taion809>
if the hash is gc'd are the symbols also cleaned up as well?
<canton7>
no
<Xeon06>
Ahh sounds good. Thanks guys.
<canton7>
symbols aren't associated with any hash
pen has joined #ruby
<taion809>
alrighty
kindjal has joined #ruby
dhruvasagar has joined #ruby
bleeber has joined #ruby
axl_ has joined #ruby
<canton7>
basically: don't create them automatically. Only create them by hand
oliver_ has quit [Ping timeout: 256 seconds]
pentameter has joined #ruby
oliver_ has joined #ruby
pirelenito_ has joined #ruby
<taion809>
canton7: i thought so, just wanted to confirm, thanks.
visof has quit [Read error: Operation timed out]
<canton7>
coolies
<oliver_>
Xeon06: one thing that helped me was to do :foo.object_id
<oliver_>
Xeon06: and something like "test".object_id
d2dchat has quit [Remote host closed the connection]
<oliver_>
a couple of times
kenneth has joined #ruby
mayday_jay has joined #ruby
parzo has quit [Ping timeout: 276 seconds]
pirelenito has quit [Ping timeout: 268 seconds]
pirelenito_ is now known as pirelenito
<Xeon06>
oliver_: right, always the same "instance" for symbols
VTLob has joined #ruby
<oliver_>
yeah
awarner has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
huoxito has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
<oliver_>
not sure if that helps clear anything up though :P
niklasb has joined #ruby
parzo has joined #ruby
<Xeon06>
oliver_: yep, it confirms what I thought. I never knew what it was called though
cj3kim has joined #ruby
<Xeon06>
Thanks :)
iamjarvo_ has joined #ruby
<oliver_>
=D
lessless has joined #ruby
pushpak has joined #ruby
awarner has joined #ruby
iamjarvo has quit [Ping timeout: 268 seconds]
monkegjinni has joined #ruby
nikeita has quit [Quit: bye bye]
TheMoonMaster has quit [Excess Flood]
cj3kim has quit [Ping timeout: 268 seconds]
Es0teric has joined #ruby
havenwood has quit [Remote host closed the connection]
colonolGron has quit [Quit: Lost terminal]
TheMoonMaster has joined #ruby
havenwood has joined #ruby
dallasm has quit []
kenneth has quit [Ping timeout: 264 seconds]
kenneth has joined #ruby
pirelenito has quit [Read error: Connection timed out]
Es0teric has quit [Client Quit]
okinomo has quit [Quit: Lost terminal]
siwica has joined #ruby
Xeon06 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0.1/20130814063812]]
rcosta has quit [Remote host closed the connection]
burlyscudd has quit [Quit: Leaving.]
<siwica>
I've just compiled and installed Ruby 2.0.0 from Source on Ubuntu 13.04. However running "ruby -v" still gives ruby 1.9.3p194. How can I make ruby point to the latest version on my system?
rcosta has joined #ruby
<snkcld>
siwica, what does which `which ruby` say
noopq has quit [Ping timeout: 248 seconds]
spap has joined #ruby
<siwica>
snkcld: /usr/local/bin/ruby
<snkcld>
when you compiled from source, did you do a `make install` ?
<havenwood>
siwica: Sets the env vars correctly to any Ruby you've built, just point it. ^
pjb1 has joined #ruby
<havenwood>
siwica: The usual Ubuntu way for apt installs is to just use update-alternatives.
gr33n7007h has joined #ruby
hogeo has quit [Remote host closed the connection]
<siwica>
havenwood: Unfortunately apt doesnt seem to have Ruby 2.0.0 yet
<Xeago>
than compile from source
GeissT has quit [Quit: MillBroChat AdIRC User]
<havenwood>
siwica: Yeah, if you're compiling yourself chruby is nice. :)
relix has joined #ruby
aeontech has quit [Quit: aeontech]
<sevenseacat>
chruby is win
<siwica>
ok, I am just in the process of trying chruby :)
Spami has joined #ruby
<havenwood>
siwica: The chruby way is to put Rubies in ~/.rubies/ or /opt/rubies/ for autodetection. But you can put them anywhere and just add the dir to RUBIES.
<yaymukund>
chruby doesn't use shims? interesting... hmm
<Xeago>
yaymukund: rbenv does
<siwica>
havenwood: ok, thanks! I just installed it, now need to figure out how it works
<Xeago>
chruby manages your path
burlyscudd has joined #ruby
tonni has quit [Remote host closed the connection]
<ghr>
Anyone used Elastic Beanstalk? I have a Ruby script that I want to run (it polls SQS queue, parses data and then saves to SimpleDB) but not sure how it would work. Elastic Beanstalk uses passenger, so I guess I just want to load the script in a rackup file?
Alina-malina has quit [Read error: Connection reset by peer]
<yaymukund>
interesting, not sure what that means. with rbenv, if I call ruby, it calls a shim that checks for .ruby-version and uses the appropriate ruby
Alina-malina has joined #ruby
<siwica>
havenwood: no configuration even needed in my case. 'ruby -v' now gives "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]"
<siwica>
thanks!
<havenwood>
siwica: Yay! No prob. ;)
rcosta has quit [Remote host closed the connection]
seo_ has joined #ruby
seo_ has quit [Read error: Connection reset by peer]
justsee has quit [Ping timeout: 264 seconds]
baordog has joined #ruby
wildroman has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
Bira has quit [Remote host closed the connection]
aeontech has quit [Client Quit]
emanon_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
lucazi has quit [Quit: lucazi]
fourq_ has quit [Quit: Connection closed for inactivity]
buibex has quit [Remote host closed the connection]
pjb1 has left #ruby [#ruby]
<mikecmpbll>
i don't think i get what chruby is for, is the idea that you can use multiple versions like rvm?
<Xeago>
yaymukund: yes that is correct
<yaymukund>
not sure if that's much better than a shim
* mikecmpbll
feeling stupid
pjb1 has joined #ruby
<Xeago>
yaymukund: I don't have a preference between the 2
<Xeago>
but on some systems
<Xeago>
where one deosn't have bash or zsh, this won't work
<Xeago>
whereas rbenv works
wildroman has joined #ruby
baroquebobcat has joined #ruby
wildroman has quit [Remote host closed the connection]
<Xeago>
(rvm won't work either)
<sevenseacat>
mikecmpbll: yes.
<yaymukund>
mikecmpbll: that's right.
<yaymukund>
Xeago: ahh, okay. yeah, I dunno. well, interesting approach. I didn't even know preexec_functions was a thing in ZSH!
<mikecmpbll>
ah okay, thanks chaps. does anyone do this in production? i've never bothered with any of those ruby managers in production. always compiled from source.
wildroman has joined #ruby
<havenwood>
mikecmpbll: Yeah, you can switch between multiple versions of Ruby. Just that chruby is about 100 lines-of-code, a good unix citizen, simple and does one thing really, really well.
<Xeago>
mikecmpbll: I use rbenv in production
<havenwood>
mikecmpbll: Yeah, common to use chruby in productino.
sambao21 has quit [Quit: Computer has gone to sleep.]
<Xeago>
just makes it more declarative for me which version is being run
<mikecmpbll>
hmpf.
<havenwood>
yaymukund: Instead of making a shim for every executable, chruby actually sets the env vars correctly.
blindrage has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<Xeago>
havenwood: that is a big plus
freerobby has quit [Quit: Leaving.]
<yaymukund>
havenwood: oh I see, that is nice.
<havenwood>
Xeago: Yeah, no need to re-shim, ever!
<waxjar_>
chruby's great
justsee has joined #ruby
anonymuse has quit [Ping timeout: 245 seconds]
Cyrus has quit [Quit: Cyrus.sleep()]
<havenwood>
mikecmpbll: RVM has a good relationship with chruby, there is actually even chruby support built into RVM if you want to use Mini-RVM (which installs Ruby then uses chruby to select them.)
browndawg has joined #ruby
<havenwood>
mikecmpbll: More popular to install Rubies with ruby-install, ruby-build, or compiling yourself than the MRVM way though - partially because MRVM hijacks RUBIES.
camilasan has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
starfox21 has joined #ruby
<havenwood>
Xeago: ruby-install is flexible, extremely lightweight, has tests, and can install any Ruby version (just tell it the type or Ruby, and version, and it goes and finds it).
theRoUS has quit [Quit: Leaving]
nx000bsd has quit [Ping timeout: 240 seconds]
<gregj>
is there something like 'bash -x' for ruby ?
<gregj>
I want to see every line of code as it executes basically
tatsuya_o has quit [Remote host closed the connection]
havenwood has joined #ruby
kaldrenon has joined #ruby
dodosan has joined #ruby
yacks has quit [Ping timeout: 256 seconds]
DanKnox_away is now known as DanKnox
yxhuvud has joined #ruby
darrik has joined #ruby
macmartine has joined #ruby
skaflem has quit [Quit: Leaving]
kindjal has joined #ruby
rupee has joined #ruby
KobraKao has quit [Ping timeout: 260 seconds]
schaerli has joined #ruby
obs has quit [Quit: Konversation terminated!]
havenwood has quit [Ping timeout: 256 seconds]
dodosan has quit [Ping timeout: 240 seconds]
cody-- has quit [Quit: Computer has gone to sleep.]
KobraKao has joined #ruby
BostonMA1776 has joined #ruby
crus has quit [Read error: Connection reset by peer]
rupee has quit [Client Quit]
razi has joined #ruby
KobraKao has quit [Client Quit]
kpshek has quit []
EricArchitrave has joined #ruby
jdeeburke has quit [Quit: Leaving.]
cmarques_ has quit [Remote host closed the connection]
cody-- has joined #ruby
alekst has quit [Quit: Computer has gone to sleep.]
codecop has joined #ruby
schaerli has quit [Remote host closed the connection]
oliver_ has joined #ruby
knigitz has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
Tuxist has joined #ruby
kayloos has joined #ruby
Collin has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
wildroman has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
ssvo_ has joined #ruby
JohnBat26 has joined #ruby
brak_dr0neb0mber has left #ruby ["asdfasdf"]
newUser1_ has joined #ruby
c0rn has joined #ruby
vlad_starkov has joined #ruby
hanmac has joined #ruby
badquanta has joined #ruby
lotherk has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
Yakko has joined #ruby
jdeeburke has joined #ruby
ssvo_ has quit [Ping timeout: 264 seconds]
jdeeburke has quit [Max SendQ exceeded]
jdeeburke has joined #ruby
tvw has quit []
lotherk has joined #ruby
sayan has joined #ruby
apfelbox has joined #ruby
tungd has quit [Quit: Lost terminal]
vlad_starkov has quit [Ping timeout: 260 seconds]
kidoz has quit [Quit: Ухожу я от вас]
schaerli has joined #ruby
kindjal has quit [Quit: Computer has gone to sleep.]
wildroman has joined #ruby
dhruvasagar has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
Catbuntu has quit [Quit: Leaving]
alekst has joined #ruby
oliver_ has quit [Remote host closed the connection]
spap has joined #ruby
apfelbox has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
premera has joined #ruby
ehc has quit [Quit: ehc]
mmitchel_ has joined #ruby
ehc has joined #ruby
<premera>
when I run on linux "rails s -p 80 -d", there are some messages printed on the console before the process goes into background, where is standard out after rails goes into background ?
<hanmac>
premera: #rubyonrails
<premera>
thx
sayan has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Quit: Leaving.]
visof has quit [Ping timeout: 276 seconds]
Monie has joined #ruby
jaimef has quit [Excess Flood]
iliketurtles has quit [Quit: zzzzz…..]
seoNinjaWarrior has joined #ruby
<seoNinjaWarrior>
hello. is there anyone i could hire for a few minutes to explain how ruby thead queues work? I've been researching this for hours now and I just don't get it and it's only like 5 lines of code
kraljev2 has quit [Read error: Connection reset by peer]
kraljev2 has joined #ruby
<seoNinjaWarrior>
I think if i could Skype with someone on the phone for a few minutes and pay for their time I'd have it down
sayan has joined #ruby
freerobby has joined #ruby
nomenkun has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
Zai00 has quit [Quit: Zai00]
lotherk has quit [Ping timeout: 264 seconds]
<dorei>
why dont you just post your question jere?
kpshek has quit []
iliketurtles has joined #ruby
<seoNinjaWarrior>
ok, i'll try
iliketurtles has quit [Max SendQ exceeded]
<seoNinjaWarrior>
i'm not sure i understand it well enough to ask a well formed questioned
Bira has joined #ruby
iliketurtles has joined #ruby
tkuchiki has joined #ruby
saarinen has quit [Quit: saarinen]
rdark has quit [Quit: leaving]
<seoNinjaWarrior>
so if you add rock = rock_queue.pop(true); rock.bounce
<seoNinjaWarrior>
aerrr
<seoNinjaWarrior>
i was trying to edit and i hit enter by mistake
jaimef has joined #ruby
ssvo_ has joined #ruby
Pent has left #ruby [#ruby]
vlad_starkov has joined #ruby
chris___ has quit [Ping timeout: 250 seconds]
Yakko has quit [Remote host closed the connection]
twoism has quit [Read error: Connection reset by peer]
<apeiros>
oh, and sizzle vs. sizzle! - bugs out
saarinen has joined #ruby
<seoNinjaWarrior>
yeah i didn't actually test this, i should have :/
<seoNinjaWarrior>
so no !
<seoNinjaWarrior>
lol
swordsmanz has quit [Ping timeout: 264 seconds]
girija has quit [Ping timeout: 245 seconds]
<apeiros>
I can't reproduce what you claim
<apeiros>
prints "I'm sizzling, eat me" once, then raises an exception as expected
ananthakumaran has quit [Quit: Leaving.]
<seoNinjaWarrior>
ok one second :/
twoism_ has quit [Ping timeout: 256 seconds]
<apeiros>
seoNinjaWarrior: btw., ruby convention would be ChunkyBacon, not Chunky_bacon
<seoNinjaWarrior>
oh so for classes no snake case
<apeiros>
(CamelCased constants, snaked_cased other variables)
<seoNinjaWarrior>
thanks :)
quoin has quit [Ping timeout: 246 seconds]
rupee has joined #ruby
<apeiros>
yeah, constants actually. though there are many who use SCREAMING_CONSTANTS and special case constants which reference modules/classes
tatsuya_o has joined #ruby
Ziarkaen has quit [Read error: Connection reset by peer]
<seoNinjaWarrior>
ok I see!!!! TY TY TY apeiros, attempting it to formulate a question for someone else helped out tremendously, lol
<setient>
hi how is everyone
interactionjaxsn has quit [Remote host closed the connection]
<apeiros>
seoNinjaWarrior: not uncommon ;-)
<setient>
i had a question about deploying a new rails app. more like which version of rails should we use (3.2.14 or 4.0) and should we use rvm, the ruby that comes with the system (is there something newer than rvm)
jibi has joined #ruby
interactionjaxsn has joined #ruby
<seoNinjaWarrior>
plus i got gist hub and correct constants naming convention :)
jefflyne3 has quit [Ping timeout: 256 seconds]
indstry has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<apeiros>
seoNinjaWarrior: I think pry can gist directly. never used it myself, though. but Banistergalaxy surely will show you how :)
ananthakumaran has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<seoNinjaWarrior>
i have 50 threads running all creating database calls
<xybre>
setient: use RVM or similar, the system ruby is almost certainly out of date and probably different on different systems.
<seoNinjaWarrior>
i'm going to que those calls and then run them one at a time
interactionjaxsn has quit [Ping timeout: 240 seconds]
blackmesa has quit [Quit: WeeChat 0.4.1]
<xybre>
setient: 4.0 has been out for a little while now and all the new gems and development energy is going into 4.0 so you probably should use that.
<seoNinjaWarrior>
errr i'm confused, never mind me, i'll formulate a better question and come back
<xybre>
setient: for a second opinion, ask in the #rubyonrails channel :)
cads2 has joined #ruby
DonRichie has joined #ruby
carraroj has joined #ruby
solrize has quit [Ping timeout: 260 seconds]
alvaro_o has joined #ruby
interactionjaxsn has joined #ruby
rrichardsr3 has joined #ruby
rafacv has joined #ruby
nomenkun has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
tatsuya_o has quit [Remote host closed the connection]
Catbuntu has joined #ruby
<seoNinjaWarrior>
if i have a set of 50 threads constantly sending queires to the database, i can't have them hit the database as they update because bad things happen (everything crashes). So if I create a que for database queries and process them, that should fix the issue. Question is how to process that que? This is a job that will take days to complete so I want the que to be processed as they get added. Should I create another thread for processing the database
<seoNinjaWarrior>
que? Or is there a better way to do this?
BillCriswell has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<apeiros>
queue, not que
bluOxigen has joined #ruby
<seoNinjaWarrior>
queue*
<seoNinjaWarrior>
thanks
<apeiros>
more vowels for the win
kindjal has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
tonni has quit [Remote host closed the connection]
g0bl1n has joined #ruby
<seoNinjaWarrior>
other than the typo, did the question make sense?
end_guy has joined #ruby
<seoNinjaWarrior>
misspelling* not typo
<setient>
thanks xybre
<xybre>
Queue is a funny word. But yeah. Either make your queries more efficient, or you could use Resque/Sidekiq to queue up large queires. Or the better solution would be to set up master/slave database replication and run queries on the slaves.
d2dchat has quit [Remote host closed the connection]
razi has quit [Quit: Leaving.]
<seoNinjaWarrior>
i'm just gathering info on domains i might want to purchase from go daddy auctions so i don't wan a get too elaborate, just something simple and quick
ephemerian has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<seoNinjaWarrior>
ok thanks i think i got this
<seoNinjaWarrior>
you guys are awesome
carraroj has quit [Read error: Connection reset by peer]
alekst has quit [Quit: Computer has gone to sleep.]
solrize has joined #ruby
Jonki has joined #ruby
dodosan has joined #ruby
noopq has quit [Ping timeout: 256 seconds]
sailias has quit [Quit: Leaving.]
<geggam>
so... i have ri installed but when i attempt to use it i get no love
tkuchiki has quit [Remote host closed the connection]
<apeiros>
might be because that's not ri's purpose…
<apeiros>
then you have to ask on #debian what the docs package is for ruby
<xybre>
geggam: ri gives you info on *methods* not classes
<apeiros>
xybre: wrong
<xybre>
Well, the same thing happens here
<apeiros>
ri very well gives you information on both, classes and methods
vlad_starkov has quit [Read error: Connection reset by peer]
<xybre>
With RVM Ruby 2.0
<apeiros>
xybre: rvm docs generate
Monie has joined #ruby
<geggam>
also installed every doc with ruby attached apeiros
<geggam>
package
apfelbox has joined #ruby
<apeiros>
geggam: well, obviously the one you'd need is missing
<geggam>
so im curious... i would thing string would be part of the default ri ?
wildroman has quit [Remote host closed the connection]
* xybre
runs it
<apeiros>
and since apt packages stuff like whatever the fuck it pleases, I'd consider that an apt problem.
<geggam>
i would agree .... so running ri string is the correct way ?
end_guy has quit [Ping timeout: 240 seconds]
noopq has joined #ruby
jdolitsky1 has quit [Quit: Leaving.]
<apeiros>
`ri String`, yes
<apeiros>
`ri string` no
<apeiros>
case matters
DonRichie has quit [Quit: Verlassend]
<apeiros>
but you pasted ri String before so I guess that's what you did.
<xybre>
Well, in all fairness I always just use pry for documentation, plus apidock and rubydocs.
Spami__ has joined #ruby
oliver_ has joined #ruby
<apeiros>
xybre: you're a ruby padawan :-p
<geggam>
i am getting close... its wierd ri is installed and looking in directories that do not exist
<xybre>
apeiros: Using pry to look at the source code is better than ri docs anyway :p
tatsuya_o has joined #ruby
<apeiros>
xybre: only if you're already in pry
clocKwize has joined #ruby
<apeiros>
and even then, I had pry mess up my console
cascalheira has quit [Quit: Leaving...]
<xybre>
I'm pretty much always in pry
<apeiros>
I doubt it's pry's fault, but still
HelloHello has quit [Quit: Leaving]
<xybre>
Yeah, if you kill pry in some situations it'll leave thigns in a weird state
jdolitsky1 has joined #ruby
<xybre>
Running reset or resetting your console fixes it.
<geggam>
im doing a silly class for work and the class wants me to run ri... its really annoying that i can find documentation faster with google
apfelbox has quit [Ping timeout: 264 seconds]
kirun has joined #ruby
pwh has joined #ruby
<Morrolan>
Just pretend you ran it, and if it asks for what it showed, answer by looking at web-based docs. ;D
<apeiros>
geggam: you can't find documentation faster with google.
zeade has quit [Quit: Leaving.]
<geggam>
interesting... how do you know my experiences ?
zeade has joined #ruby
* geggam
looks for cameras
timonv has joined #ruby
<Morrolan>
apeiros: Well, if `ri` doesn't work for him (for whatever reasons) then that is the case. :P
<apeiros>
geggam: physics
alekst has joined #ruby
<apeiros>
geggam: you can't potentially beat `ri String` with google
<apeiros>
not even if you click the "I'm feeling lucky" button and actually get lucky.
<geggam>
i can if it doesnt work :)
<apeiros>
geggam: that's a broken premise
azcodex has quit [Read error: Connection reset by peer]
<r0bglees0n>
ri is a waste of time
<apeiros>
and then it's "I can google faster than use a broken installation".
Astralum has joined #ruby
<geggam>
correct apeiros
<geggam>
broken by design or broken by operator error is what im figuring out now
<geggam>
i generally blame operators
<apeiros>
and wow, yeah, sure. but no! you can't! if your browser is broken and your wifi doesn't work and you're on a 3600 baud internet connection and whatever else could go wrong!
<apeiros>
I can make arbitrary broken premises too…
<Morrolan>
MrZYX: Call pest control, there's another hornet nest. After editors, ruby version managers and Rails we also have doc tools. :D
burlyscudd has joined #ruby
dkamioka has joined #ruby
<MrZYX>
hm
<MrZYX>
I had the slight hope yard is universally accepted by now
* Morrolan
snickers
<apeiros>
*shrug*, yri if you please. fine with that.
<apeiros>
still better than googling, getting docs for another version of ruby and be all "wtf?"
<r0bglees0n>
how about
<r0bglees0n>
? String
<r0bglees0n>
if you want offline documentation
<r0bglees0n>
using (y)ri to try learn ruby will be a bad experience
zorg24 has joined #ruby
<apeiros>
r0bglees0n: I disagree. worked fine for me.
<Morrolan>
I prefer HTML documentation over the CLI-based docs when it comes to reading a lot.
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<r0bglees0n>
maybe it's a good way to avoid reading blog posts etc
<apeiros>
Morrolan: sure. as long as you don't google it.
<dorei>
does each thread has its own copy of $1, $2, etc ?
<r0bglees0n>
dorei: ye
<apeiros>
dorei: I think newer rubies do that
<apeiros>
I think it even goes beyond that. they are even stack-frame local I think.
<r0bglees0n>
i think the rubinius site has a piece on that
julweber has joined #ruby
echevemaster has joined #ruby
shaunbaker has quit [Remote host closed the connection]
nomenkun has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
* geggam
still has a robotics 36k in the shrink wrapped package if anyone is interested apeiros
ntus1017 has quit [Remote host closed the connection]
pyx has joined #ruby
pyx has quit [Changing host]
pyx has joined #ruby
fourq_ has joined #ruby
pyx has quit [Client Quit]
<whatacollapse>
beneggett: this one is cool thx
alexju has quit [Read error: Connection reset by peer]
<ravster>
academic question - Is array.pop more efficient than array.shift?
alexju has joined #ruby
<xybre>
beneggett: Thats a good link :)
RichardBaker has joined #ruby
apfelbox has quit [Read error: Operation timed out]
Catbuntu has quit [Quit: Leaving]
eregon_ has quit [Ping timeout: 245 seconds]
yekta has quit [Quit: yekta]
cj3kim has joined #ruby
starfox21 has quit [Quit: starfox21]
<ravster>
I see in the docs that shift moves everything down by one, but am unsure if that is just an index re-numbering or it actually moves things around.
<xybre>
ravster: looking at the srouce code, I'm thinking "pop"
<canton7>
yeah, it's the same operation as pop, but at the other end
sayan has quit [Read error: Connection reset by peer]
<ravster>
oh wow, yeah. pop seems better to use.
<canton7>
push is to pop as unshift is to shift
jdeeburke has left #ruby [#ruby]
<ravster>
thanks xybre
eregon has joined #ruby
<canton7>
really depends what end you want to take the element off
<xybre>
They're both C functions, but `pop` is much simpler in C. I'm not sure which is going to be more efficient when compiled down, but I'm still 99% sure `pop` is going to be faster.
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dancardamore has quit []
cj3kim has quit [Ping timeout: 240 seconds]
<Guest64450>
i got it thx
Adawerk_ has quit [Quit: Leaving]
saarinen has joined #ruby
BostonMA1776 has quit [Quit: Leaving]
ssvo_ has joined #ruby
zarul has quit [Quit: Leaving]
rupee has quit [Quit: Leaving]
Adawerk has joined #ruby
MrThePla_ has joined #ruby
chriskk has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
zarul has joined #ruby
<mogglefrange>
Is there some kind of centralized location that lists ruby gems for interacting with "fun" web services? I'm looking around on rubygems and ruby-toolbox, and all I've found that isn't a social network api client is an imdb client.
MrThePlague has quit [Ping timeout: 245 seconds]
jlast_ has quit [Remote host closed the connection]
alexju has quit [Read error: Connection reset by peer]
alexju has joined #ruby
sam113101 is now known as sam113101_afk
chriskk has joined #ruby
ssvo_ has quit [Ping timeout: 260 seconds]
oliver_ has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
seoNinjaWarrior has joined #ruby
jefflyne3 has quit [Ping timeout: 264 seconds]
<interactionjaxsn>
someone wrote a gem for at&t's voice recognition software (used by watson). that plus an NLP gem plus wolfram equals poor man's jarvis/watson
<interactionjaxsn>
could be fun
nisstyre has joined #ruby
Gacha has quit [Ping timeout: 245 seconds]
<interactionjaxsn>
mogglefrange: http://www.programmableweb.com/apis lists a bunch of api's. find one you think is fun and then google for '#{api_name} gem' and if one is available...
<atmosx>
or find an api and write a gem fo rit.
<interactionjaxsn>
this ^
pencilcheck has joined #ruby
burlyscudd has quit [Quit: Leaving.]
schaerli has quit [Remote host closed the connection]
zarubin has quit [Ping timeout: 240 seconds]
ukd1 has joined #ruby
agr has left #ruby [#ruby]
chairabanta has joined #ruby
wildroman has quit [Remote host closed the connection]
lunarjar has quit [Ping timeout: 240 seconds]
<chairabanta>
Hi, what is the simplest way to delete the first line in a file?
<apeiros>
disgrntld: a) different hash values to begin with, b) technical reasons
ileosigmoidostom has joined #ruby
<MTXsCript01>
ÊÇÑÊ´Õ
<waxjar_>
it's the same reasoning as 'foo' and 5 not being equal according to eql?
<apeiros>
MTXsCript01: um, use utf-8 in your irc client's encoding?
volty has joined #ruby
Spami__ has left #ruby ["Leaving"]
<brisbin>
waxjar_: a better analogy might be "the same reason 'five' and 5 are not equal"
clocKwize has quit [Quit: clocKwize]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<brisbin>
why you would want 'foo' and :foo to be equal in any way escapes me
<disgrntld>
ok, maybe I should've asked why 'foo' == :foo is false, _that's_ a value check, right?
jlast has joined #ruby
<waxjar_>
Symbols and Strings are entirely different sort of objects
<volty>
because one is a string and the other is a symbol
<|jemc|>
disgrntld: when I have functions which must be able to accept symbols or strings and treat them as equal, I just call #to_s on the argument and only deal with strings internally
<brisbin>
i don't know why you think those two things are equal in value
MTXsCript01 has left #ruby [#ruby]
MTXsCript01 has joined #ruby
<disgrntld>
ok, the different sort of objects makes it more clear fo rme
<atmosx>
these mp3s do not have length (in time) tag
<atmosx>
ffmpeg might really be the only choise
<atmosx>
choice
relix has joined #ruby
<disgrntld>
really, brisbin? you can't see how I would consider those the same value?
<|jemc|>
and calling #to_s on an object that is already a string just returns the original string, so it's safe to do
<disgrntld>
er, might consider*
<volty>
disgrntld: let's say in C you have a var foo (could contain whatever, string or number) and a string "foo"
MTXsCript01 has quit []
<brisbin>
disgrntld: they're different classes. how can two values of different classes be equal. it's like saying 'five' == 5 should be true
MTXsCript01 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<volty>
ops, the equivalent (almost!) of ruby's symbols in c are the enums
<disgrntld>
brisbin but like |jemc| says, `'foo'.to_s == :foo.to_s` is true
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
<brisbin>
just because f a == f b does not imply f == b
<brisbin>
er, a == b*
shredding has quit [Quit: shredding]
<brisbin>
especially with to_s
<disgrntld>
sure, but I guess I just think about it more like a weak typing convenience
<brisbin>
i could write all kinds of nonsensical equalities if i call to_s on both sides
MTXsCript01 has quit [Client Quit]
<|jemc|>
my point wasn't that they are equal; I'm saying its easy enough for your code to consider them equal if it suits your purposes
<disgrntld>
I mean, I see your point, and I understand now, just trying to explain my confusion
<volty>
disgrntld: do not confuse, think about it as an enum in C, and think of to_s as a macro that gives you the itteral string
<|jemc|>
heck, you could overwrite #== if you need to
<disgrntld>
yea, I didn't mean to imply you thought that, |jemc|
<atmosx>
Whar's the best way of appending lines at an xml in ruby? They go at a specific place not at the end of the file
<brisbin>
sure. as long as you agree it was a confused standpoint
<apeiros>
atmosx: use nokogiri
<disgrntld>
absolutely
<brisbin>
and i could say, i don't see how an unconfused person could want those to be equal :)
sailias has quit [Quit: Leaving.]
<disgrntld>
well, thanks for bearing with me guys, I got it now
<atmosx>
apeiros: yes, that's smart choice. Didn't think of it!
<volty>
ok // i need succ and prec methods on an array, is there something standard?
<apeiros>
atmosx: `on /how\b.*\bxml\b.*\?/ do |msg| msg.reply "use nokogiri" end`
nomenkun has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<volty>
automatizing is much much nicer
<atmosx>
volty: prec = ?
mansi_ has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 260 seconds]
<volty>
preceding and successive element
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<brisbin>
volty: i don't think so. depending on context shift/pop may work
<brisbin>
but those are descructive
<volty>
now i have an index that i increment / decrement (with wrap)
colonolGron has joined #ruby
ssvo_ has joined #ruby
<volty>
no no, i have to cycle on the existing elements (but no loop)
<brisbin>
that sounds like each/map
<volty>
no way - cannot be implemented that way
kaldrenon has quit [Remote host closed the connection]
<volty>
never mind, i'll put it in a module - in a way or another
IceyEC has quit [Quit: IceyEC]
mansi has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
<volty>
btw - I never thought I could ever need prec, succ, el++ or similar in ruby
<brisbin>
yes, i'd be interested to see this use-case
<atmosx>
volty: arrays support a method called 'next'
<atmosx>
I'm pretty sure there is something like prev
<atmosx>
or previous or anything
tjad has joined #ruby
mikepack has quit [Remote host closed the connection]
mogglefrange has quit [Quit: Lost terminal]
<volty>
no next in array, next is a keyword (loops)
ssvo_ has quit [Ping timeout: 245 seconds]
rupee has joined #ruby
chrisja has quit [Ping timeout: 245 seconds]
tabolario has joined #ruby
tabolario has quit [Max SendQ exceeded]
<volty>
it is an array with time interval values that command when the next element is to be fetched - said oversimplifying
mikepack has joined #ruby
<apeiros>
and you need previous because?
<volty>
apeiros: who if not you :) // just in case
<volty>
i do not need it now
mary5030 has joined #ruby
freerobby has quit [Quit: Leaving.]
<apeiros>
you can always write an external iterator
<volty>
i mean: if I put it in a module - just for the sake of extending the behavior of that single array
<apeiros>
all you need to store is the array and the current index
jlast_ has quit [Remote host closed the connection]
<canton7>
we don't have set_xxx and get_xxx methods in ruby
<canton7>
that's java
alexju has quit [Remote host closed the connection]
<Collin>
Is there a reason Ruby developers seem to not like tabs, or is it just a cult thing?
Bosox20051 has joined #ruby
<apeiros>
it's a convention thing
<volty>
meanwhile the array could change and have to restart it and <maybe other> that's why i want to move that clobber (of handling the index) elsewhere
alexju has joined #ruby
<Collin>
I can sort of understand it in C/C++, because you sometimes split a single statement accross multiple lines, but not in other languages
<volty>
canton7: it's ruby, qtruby
<canton7>
ouchy, in that case
Bosox20051 has quit [Remote host closed the connection]
<canton7>
bad library writers
<volty>
jump on man! :)
<volty>
i'm grateful to Richard Dale for his qtruby
kaspergrubbe has joined #ruby
forced_request has joined #ruby
Davey has joined #ruby
<volty>
(to all the others too, e.g. smoke - of course)
<volty>
apeiros said "interesting use of case/when" -> more cases are to come
interactionjaxsn has quit [Remote host closed the connection]
apfelbox has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
interactionjaxsn has joined #ruby
breakingthings has quit []
phantasm66 has quit [Quit: *sleeeep….]
<codelitt>
MrZYX: No. It's saved in the DB. it responds to @short_url.url (which is one of the attributes for that class)
<codelitt>
MrZYX: it just won't respond to @short_url.id
<MrZYX>
codelitt: sure it does, you just set it when you create the url
<MrZYX>
*object
RORgasm__ is now known as RORgasm
<MrZYX>
does it have the .id after a .reload then?
<MrZYX>
also consider asking #rubyonrails, more AR experts there
apfelbox has quit [Ping timeout: 264 seconds]
<apeiros>
codelitt: note that "it does not respond" is quite NOT the same as "it returns nil"
<codelitt>
MrZYX: It's not after a reload no. It's in a sinatra app so I thought it would be better asked here. but I guess it does use activerecord so maybe
mmitchell has quit [Remote host closed the connection]
<apeiros>
codelitt: and if .id returns nil, it means it's NOT saved to the db
<codelitt>
apeiros: You're right. it responds. It just returns nil
<apeiros>
having an object != object stored to db
<apeiros>
reasons for it not being persisted: validation failure e.g.
justsee has quit [Ping timeout: 260 seconds]
interactionjaxsn has quit [Ping timeout: 264 seconds]
volty has quit [Quit: Konversation terminated!]
zets has joined #ruby
kirun has quit [Quit: Client exiting]
nhhagen_ has joined #ruby
<codelitt>
apeiros: I can see the record. It is definitely saved to the db. I'm staring at the record in the sql database right now
jerius has quit [Ping timeout: 268 seconds]
xiphiasx_ has quit [Changing host]
xiphiasx_ has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
<codelitt>
apeiros: that's why i'm so confused
zarubin has joined #ruby
<apeiros>
codelitt: a) you stored that value at another time
<apeiros>
b) you did weird stuff to your id column
<apeiros>
anyway, #rubyonrails is indeed probably better suited
bekti has joined #ruby
bekti has left #ruby [#ruby]
itcharlie has left #ruby [#ruby]
threeturn has quit [Quit: threeturn]
lkba has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]