<lethjakmans_lap>
I have that working, I'm wanting to name the fields in eachcsv
<lethjakmans_lap>
so I can call them with a name rather than a number
<shevy>
a name rather than a number?
jackdanger has joined #ruby
<shevy>
you can name the variable in |foo| however you want to
<shevy>
%w( a b c ) .map{|y| y+"x"} # => ["ax", "bx", "cx"]
<rking>
shevy: What If I want to name it "|`sudo rm -rf ~shevy`"
<rking>
Caen i du tht?
atmosx_ has joined #ruby
thone_ has joined #ruby
<the_jeebster1>
are there any ruby libraries that can search docs, pdfs, etc. for keyword arguments?
<lethjakmans_lap>
I know, I want to name eachcsv[0] so I can call it with eachcsv[:firstName]
mklappstuhl has joined #ruby
Cadwallion has joined #ruby
<lethjakmans_lap>
and eachcsv[1] could be eachcsv[:lastName]
<shevy>
rking no idea, only stupid people have this idea
tbrock has quit [Quit: Computer has gone to sleep.]
<shevy>
lethjakmans_lap when you use a pastie, always provide the error in that pastie, that makes help much easier
<rking>
shevy: Nm then.
<lethjakmans_lap>
I'm working on another problem
<shevy>
rking I am just short on time right now, wanna help lethjakmans_lap before I have to sleep :)
thone has quit [Ping timeout: 252 seconds]
<the_jeebster1>
or are there any standard practices for opening docs, pdfs, etc. searching for keywords and creating objects based on those keyword arguments. just not too familiar with process intensity of ruby scripts working with binary files
<rking>
shevy: I was only giving you a hard time. I had no valuable thing to add.
jlast_ has quit [Read error: Operation timed out]
mercwithamouth has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
NuclearLucifer has quit [Ping timeout: 260 seconds]
<shevy>
the_jeebster1 search for keywords within a .pdf file?
<the_jeebster1>
I'm writing a script for someone that wants to pass in some keywords and I'd take the array of string arguments, search for each one in a binary file, if I find an instance, create an object
Drewch has joined #ruby
<the_jeebster1>
just wondering if that's actually feasible and scalable in ruby
<the_jeebster1>
for pdf and word docs mostly. I'm sure I'll have to standardize the text in the files before I search anyways
<JohnTeddy>
I'm not using the variable name that rspec wants
<JohnTeddy>
that makes a lot of sense
<JohnTeddy>
heh
emmanuelux has quit [Ping timeout: 245 seconds]
<JohnTeddy>
sweet, it works
<JohnTeddy>
Thanks havenn
davidcelis has quit [Quit: K-Lined.]
mengu has quit [Read error: Connection reset by peer]
artnez has quit [Client Quit]
mmitchell has quit [Ping timeout: 245 seconds]
nwertman has joined #ruby
artnez has joined #ruby
dakine has left #ruby ["Leaving"]
the_jeebster1 has quit [Quit: Leaving.]
iamjarvo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
maletor has joined #ruby
araujo has quit [Quit: Leaving]
havenn has joined #ruby
LouisGB has joined #ruby
statarb3 has quit [Quit: Leaving]
dmiller has joined #ruby
havenn has quit [Ping timeout: 255 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
aleiphoenix has joined #ruby
guy1` has quit [Remote host closed the connection]
guy1` has joined #ruby
J-_-L has joined #ruby
slainer68 has joined #ruby
jjang has quit [Read error: Connection reset by peer]
jjang has joined #ruby
kennyvb has quit [Ping timeout: 255 seconds]
<Drewch>
Is there a way to make ruby fail loudly? It seems that I run my script and it will just have no output if it fails. Where as if I run in irb then it will fail with the errors
c0smic has left #ruby [#ruby]
<Drewch>
But it keeps running when I run it with ruby <script.rb>, even though it has failed
nwertman has quit [Ping timeout: 265 seconds]
cousine has quit [Remote host closed the connection]
v0n has joined #ruby
carlyle has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
nyrb has quit [Read error: Connection reset by peer]
ner0x has joined #ruby
nyrb has joined #ruby
Bootstrapper has quit [Remote host closed the connection]
kennyvb has joined #ruby
Liothen has quit [Read error: Connection reset by peer]
seeingidog__ has quit [Read error: Connection reset by peer]
bwlang has left #ruby [#ruby]
etcetera has joined #ruby
seeingidog__ has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
austinbv has quit [Quit: WeeChat 0.3.8]
jjang has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 246 seconds]
ixx has quit [Ping timeout: 246 seconds]
nat2610 has quit [Quit: Leaving.]
passbe has quit [Ping timeout: 246 seconds]
dankest has quit [Quit: Leaving...]
passbe has joined #ruby
ixx has joined #ruby
jlast has joined #ruby
guy1` has quit [Remote host closed the connection]
BoomCow has quit [Quit: This computer has gone to sleep]
pac1 has joined #ruby
wallerdev has quit [Quit: wallerdev]
mascool has quit [Ping timeout: 256 seconds]
pipopopo has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
Guest69898 is now known as ixx
ksaw123 has joined #ruby
bradhe has joined #ruby
<ksaw123>
hey guys. I need some help. I am getting a in "attr_accessor" nil is not a symbol error on line 2. My code is here : http://pastie.org/5409752
SuperrMann has quit [Quit: Computer has gone to sleep.]
<Lover>
Welckom www.maghrebchat.ma chta and chat voice :) /server irc.maghrebchat.ma
<Lover>
Welckom www.maghrebchat.ma chta and chat voice :) /server irc.maghrebchat.ma
<Lover>
Welckom www.maghrebchat.ma chta and chat voice :) /server irc.maghrebchat.ma
Lover has quit [Killed (idoru (Spam is off topic on freenode.))]
chrishunt has joined #ruby
medik has quit [Quit: medik has no reason]
tbrock has quit [Quit: Computer has gone to sleep.]
AlbireoX has joined #ruby
AlbireoX has quit [Remote host closed the connection]
rh1n0 has joined #ruby
brianpWins has joined #ruby
ryanlecompte has joined #ruby
<_numbers>
how can i recursively merge two hashes?
rh1n0 has quit [Client Quit]
davidcelis has joined #ruby
<postmodern>
_numbers, there's gems that do that
krisfremen has quit [Ping timeout: 260 seconds]
ping-pong has quit [Ping timeout: 245 seconds]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
bradhe has joined #ruby
stephenetyler has joined #ruby
<ksaw123>
line 54 error Car.minparked == answer from main Car.get_minutes_parked() code: http://pastie.org/5409818 I feel like I am fat fingering this entire thing
bigmcq77 has joined #ruby
guy1` has quit [Remote host closed the connection]
guy1` has joined #ruby
jrajav has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
ping-pong has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
uris has joined #ruby
krz has joined #ruby
bricker_ has quit [Ping timeout: 264 seconds]
BoomCow has joined #ruby
stephenetyler has quit [Quit: Page closed]
mahmoudimus has joined #ruby
mahmoudimus has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
Chryson has joined #ruby
Dreamer3 has joined #ruby
mikepack has joined #ruby
adeponte has quit [Remote host closed the connection]
starship has joined #ruby
etcetera has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 255 seconds]
v0n has quit [Quit: Leaving]
xaq has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
blazes816 has quit [Quit: blazes816]
uris has quit [Quit: Leaving]
bigmac has joined #ruby
ZubKonst_ has joined #ruby
pencilcheck has joined #ruby
ZubKonst has quit [Ping timeout: 245 seconds]
<krz>
if i got the following: [4.769021739130435,4.610054347826087,4.5040760869565215,4.239130434782608,3.8152173913043477,3.65625,3.603260869565217,3.232336956521739,2.861413043478261,2.331521739130435,1.377717391304348]. total sum is 39.00000000000001. whats the best way to turn all these values into a whole number but still have the total sum as 39?
<jrajav>
You want to discard most of the precision of your numbers, and then rely on that precision for a computation?
wallerdev has joined #ruby
<krz>
jrajav: thats one way to look at it. i guess
wallerdev has quit [Client Quit]
starship has quit [Quit: WeeChat 0.3.9.2]
joeycarmello has quit [Remote host closed the connection]
<jrajav>
Or are you trying to find the right application of rounding to each number to make the resulting integers sum to roughly the same number as the floats do?
<jrajav>
Because that's a much less silly but also much tougher problem :P
<krz>
i was also thinking of distributing the remainders evenly across each value in the array
starship has joined #ruby
joeycarmello has joined #ruby
<jrajav>
I could do it very slowly and inelegantly by first taking the float sum, rounding it to the nearest integer, then take the difference between that and the floor sum and change that many of the numbers to do ceiling instead
<krz>
so if my return result is 33. 39-33=6 (remainder). i add 1 to the top 6 elements
<jrajav>
(IS there really a better way though?)
<jrajav>
Well yeah that's basically what I just said :P
<jrajav>
That's a difference, not a remainder
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
<krz>
jrajav: how would you suggest i distribute the difference? through an each loop?
mahmoudimus has joined #ruby
ksaw123 has quit [Quit: irc2go]
tjbiddle has joined #ruby
Emmanuel_Chanel has joined #ruby
BoomCow has quit [Quit: Leaving]
chimkan has joined #ruby
afgeneralist has quit [Ping timeout: 256 seconds]
krisfremen has joined #ruby
krzkrzkrz has joined #ruby
<Dreamer3>
is there a way for me to introspect the module a class is inside inside a method?
<jrajav>
krz: You could do that, sure, but then you'd have to keep track of the index
jwang has joined #ruby
<krzkrzkrz>
each_with_index
krz has quit [Ping timeout: 260 seconds]
krzkrzkrz is now known as krz
<jrajav>
krz: You could also do something like arr[0..diff].each { |x| x + 1 }.concat(arr.drop(diff+1))
<jrajav>
Where arr is your array and diff is the difference
<lotus2015>
I pasted some output to gist for reference
cantonic_ has joined #ruby
thinkdevcode has quit [Read error: No route to host]
thinkdevcode has joined #ruby
chimkan has quit [Quit: chimkan]
J-_-L has quit [Ping timeout: 252 seconds]
danneu has joined #ruby
wchun has joined #ruby
kil0byte has quit [Ping timeout: 240 seconds]
wchun_ has quit [Client Quit]
<rking>
lotus2015: What did you do just prior to that?
benlieb has quit [Client Quit]
<rking>
mkmf.rb is a file that any given gem can define
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
<rking>
It makes Makefiles for the native (usually C) extensions.
kil0byte has joined #ruby
<rking>
lotus2015: And BTW good that you tried 'locate', but in this case it'd probably deceive you, because the mkmf.rb in question probably only got downloaded minutes ago, so it won't be in the locatedb yet.
<rking>
Try running that same command again after your daily cron fires. ☺
hyperboreean has quit [Read error: Operation timed out]
thinkdevcode has quit [Read error: No route to host]
morf has joined #ruby
hamed_r has joined #ruby
thinkdevcode has joined #ruby
nemesit has joined #ruby
afgeneralist has quit [Ping timeout: 276 seconds]
Morkel has joined #ruby
hyperboreean has joined #ruby
tchebb has quit [Quit: Leaving.]
tchebb has joined #ruby
slamice_ has joined #ruby
eldariof has joined #ruby
slamice has quit [Ping timeout: 240 seconds]
slamice_ is now known as slamice
aganov has joined #ruby
pyx has joined #ruby
zommi has joined #ruby
kbeddingfield has joined #ruby
dekroning has joined #ruby
tjbiddle_ has joined #ruby
tjbiddle_ has quit [Client Quit]
answer_42 has joined #ruby
punkrawkR^Home has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
guy1` is now known as guy__
tchebb has quit [Read error: Connection reset by peer]
guy__ is now known as guy___
workmad3 has joined #ruby
tchebb has joined #ruby
jds_ has joined #ruby
cezar has joined #ruby
tchebb has quit [Client Quit]
tjbiddle has quit [Ping timeout: 240 seconds]
elsifaka has joined #ruby
parzorep has joined #ruby
dhruvasagar has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
kil0byte has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
kil0byte_ has quit [Ping timeout: 256 seconds]
margle has joined #ruby
cary has joined #ruby
nonotza_ has joined #ruby
FredLe has joined #ruby
cary has quit [Client Quit]
BoomCow has quit [Quit: This computer has gone to sleep]
nonotza has quit [Ping timeout: 245 seconds]
nonotza_ is now known as nonotza
answer_42 has quit [Ping timeout: 276 seconds]
JohnBat26 has quit [Remote host closed the connection]
marienz has joined #ruby
oivoodoo has quit [Remote host closed the connection]
oivoodoo has joined #ruby
slamice_ has joined #ruby
slamice has quit [Ping timeout: 240 seconds]
slamice_ is now known as slamice
qwerxy has joined #ruby
filipe has joined #ruby
elliottcable is now known as TuckChesta
JohnBat26 has joined #ruby
TuckChesta is now known as tuck
matrixise has joined #ruby
arya has quit [Ping timeout: 244 seconds]
xpen has joined #ruby
hoelzro|away is now known as hoelzro
Coretracker has joined #ruby
tomsthumb has joined #ruby
piotr has joined #ruby
arya has joined #ruby
mkillebrew has quit [Ping timeout: 268 seconds]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
mkillebrew has joined #ruby
guns has quit [Quit: guns]
kil0byte_ has joined #ruby
topek has quit [Quit: Leaving.]
topek has joined #ruby
telling_ is now known as telling
telling has quit [Changing host]
telling has joined #ruby
topek has quit [Client Quit]
kil0byte has quit [Ping timeout: 240 seconds]
topek has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
segmond has left #ruby ["Leaving"]
thinkdevcode has joined #ruby
hakunin has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
kil0byte has joined #ruby
xpen has quit [Ping timeout: 268 seconds]
BoomCow has joined #ruby
pyx has quit [Quit: WeeChat 0.3.9.2]
bradhe has quit [Remote host closed the connection]
dertyp has joined #ruby
kil0byte_ has quit [Ping timeout: 260 seconds]
thinkdevcode has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
seeingidog__ has joined #ruby
hsbt is now known as hsbt_away
seeingidog__ has quit [Read error: Operation timed out]
hsbt_away is now known as hsbt
nemesit has quit [Read error: Connection reset by peer]
qwerxy has quit [Quit: offski]
gcds has joined #ruby
codeFiend has joined #ruby
codeFiend has quit [Remote host closed the connection]
codeFiend has joined #ruby
prezioso has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<gcds>
Hello, I have a little complicated situation and maybe someone could suggest something about it.. I have many classes and attributes in these classes which intercept ruby reserved words for e.g. class names like "Class","Signal" and attributes: "class" what you would recommend for this situation? Now I just changed names like clazz and SSignal but this thing will use many people and I think it would be strange if you have to type clazz isn
<gcds>
simple users
casheew has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
casheew has joined #ruby
shtirlic has joined #ruby
Elhu has joined #ruby
blacktulip has joined #ruby
k610 has joined #ruby
mklappstuhl has joined #ruby
casheew has quit [Read error: Connection reset by peer]
k610 has quit [Client Quit]
casheew has joined #ruby
staafl has joined #ruby
<gcds>
anyone?
slamice has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
casheew has quit [Read error: Connection reset by peer]
chendo has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
slamice has joined #ruby
<hoelzro>
gcds: when you intercept these terms from a user, what do you do with them?
<hoelzro>
what's the high level view of what you're trying to do?
<gcds>
hoelzro: attribute retuns normal instance variable
Virunga has joined #ruby
k610 has joined #ruby
u89 has joined #ruby
chendo_ has joined #ruby
hsbt is now known as hsbt_away
etcetera has quit [Quit: Computer has gone to sleep.]
casheew has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
AllStruck has quit [Changing host]
AllStruck has joined #ruby
<gcds>
I dont know what to do about class name Signal its used by ruby i could rename it like SSignal but it would be odd for user
<apeiros_>
use namespaces
<gcds>
if I wrap it inside module would it workout?
<apeiros_>
YourStuff::Signal
<gcds>
apeiros_: and what about reserved word attributes?
<apeiros_>
?
Xeago has joined #ruby
<gcds>
apeiros_: currently now is class variable which interference self.class
kil0byte_ has joined #ruby
casheew has joined #ruby
<apeiros_>
what?
BoomCow has quit [Ping timeout: 248 seconds]
<gcds>
apeiros_: I mean i have variable "class" which interference with self.class
<apeiros_>
you can't name an lvar 'class'
u89 has quit [Remote host closed the connection]
<apeiros_>
and all other types of variables won't have a problem. @class works fine.
nemesit has joined #ruby
<apeiros_>
I don't understand your problem
fudanchii has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
<gcds>
apeiros_: if I call instance_variable_get("@class") it does return that I need but if call somewhere self.class it returns @class value
Xeago has quit [Remote host closed the connection]
dedis has quit [Remote host closed the connection]
tobinharris has joined #ruby
<apeiros_>
then use another name
<apeiros_>
thesaurus is your friend
<gcds>
apeiros_: the problem is that i dont make this names it comes from definition which I implement in ruby
<apeiros_>
you implement it. you can translate.
nomenkun has joined #ruby
<gcds>
I thinking about gsub "class" to "clazz" and then back "clazz" to "class"
<apeiros_>
…
<gcds>
apeiros_: what?
nomenkun_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<apeiros_>
so obviously you already know that you can translate, but instead of going for a proper name you use some misspelling - well, your choice, I guess…
arya has quit [Ping timeout: 244 seconds]
pavilionXP has quit [Ping timeout: 240 seconds]
casheew has joined #ruby
ryanf has quit [Quit: leaving]
<gcds>
oh ok thanks for suggest :)
jds_ has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
locriani has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
locriani_ has quit [Read error: Connection reset by peer]
shtirli__ has joined #ruby
<apeiros_>
and depending on your problem, you can "namespace" that too
<apeiros_>
.attributes[:class]
atno|AFK is now known as atno
<apeiros_>
i.e., use a hash.
matrixise has quit [Ping timeout: 240 seconds]
nomenkun has quit [Ping timeout: 260 seconds]
jimeh has joined #ruby
clj_newb has joined #ruby
Shamgar has quit [Ping timeout: 246 seconds]
shtirlic has quit [Ping timeout: 252 seconds]
casheew has joined #ruby
slamice has quit [Quit: slamice]
jgrevich_ has joined #ruby
Shamgar has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
jprovazn has joined #ruby
tuck is now known as elliottcable
<witchdoc>
hi all
ephemerian has joined #ruby
xnm has quit [Quit: WeeChat 0.3.8]
supersid has joined #ruby
casheew has joined #ruby
fantazo has quit [Remote host closed the connection]
arya has joined #ruby
casheew has quit [Read error: Connection reset by peer]
mvangala_ has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
<gcds>
supersid: you use IO.read for file operation?
sn0wb1rd_ has joined #ruby
statarb3 has quit [Quit: Leaving]
casheew has joined #ruby
<supersid>
gcds: No Im trying to use IO.read_nonblock. However read doesn't work either. Its seems to work only with gets.
casheew has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
swex_ has joined #ruby
swex has quit [Read error: Operation timed out]
FailDrain has joined #ruby
Ivo has quit [Read error: Connection reset by peer]
<FailDrain>
Having seveer issues trying to program a filled pixel circle could anyone tell me what I need to do , to achieve an fast filled pixel circle in c++-> http://pastebin.com/3N8tC3GH
u89 has joined #ruby
casheew has joined #ruby
u89 has quit [Read error: Connection reset by peer]
ghanima has quit [Quit: Leaving.]
robotmay has joined #ruby
arya has quit [Ping timeout: 244 seconds]
u89 has joined #ruby
atno has quit [Read error: Connection timed out]
dertyp has quit [Quit: Leaving...]
arturaz has joined #ruby
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
chococrois has quit [Quit: Leaving.]
atno has joined #ruby
jgrevich has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Client Quit]
rdark has joined #ruby
pcarrier has joined #ruby
bradhe has joined #ruby
seeingidog__ has joined #ruby
clocKwize has quit [Quit: Leaving]
maxmanders has quit [Read error: Operation timed out]
clocKwize has joined #ruby
maxmanders has joined #ruby
sn0wb1rd_ has quit [Quit: changing servers]
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 246 seconds]
dertyp has joined #ruby
hmmmmm has joined #ruby
elliottcable is now known as elliotcabk
seeingidog__ has quit [Ping timeout: 260 seconds]
<hmmmmm>
hi
kbeddingfield has quit [Remote host closed the connection]
slainer68 has joined #ruby
hmmmmm is now known as aboy
adambeynon has joined #ruby
cdt has joined #ruby
tvw has joined #ruby
cdt_ has joined #ruby
aboy has left #ruby [#ruby]
u89 has quit [Ping timeout: 252 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
u89 has joined #ruby
LucidDreamZzZ has joined #ruby
chussenot has joined #ruby
kil0byte_ has quit [Ping timeout: 265 seconds]
sn0wb1rd_ has joined #ruby
cdt has quit [Ping timeout: 245 seconds]
hsbt_away is now known as hsbt
d34th4ck3r has quit [Quit: Konversation terminated!]
elliotcabk is now known as elliottcable
dhruvasagar has quit [Read error: Operation timed out]
<lethjakmans_lap>
hey, I'm trying to output to a csv, but I don't want to use a block. is there any way to just open the file and output to it?
dhruvasagar has joined #ruby
xnm has quit [Ping timeout: 264 seconds]
maus has quit [Quit: leaving]
maus has joined #ruby
shtirli__ has quit [Ping timeout: 264 seconds]
k610 has quit [Ping timeout: 260 seconds]
fumduq has quit [Ping timeout: 244 seconds]
nasso has quit [Quit: No Ping reply in 180 seconds.]
tobinharris has joined #ruby
jds_ has quit [Ping timeout: 252 seconds]
k610 has joined #ruby
nasso has joined #ruby
nonotza has quit [Quit: nonotza]
kbeddingfield has quit [Remote host closed the connection]
polymar has joined #ruby
cardoni has quit [Quit: cardoni]
ikaros has joined #ruby
shiin has quit [Ping timeout: 244 seconds]
nasso has quit [Client Quit]
<timmow>
I'm iterating through an array and building another array, so map seems like a good choice, but is there a way of adding more than one element to the array?
<timmow>
['a','b'].map { |x| [x, x]}.flatten
<Paradox>
ʕ•ᴥ• ʔ
shtirlic has joined #ruby
<apeiros_>
timmow: flat_map
<timmow>
seems to work, I'm wondering if there is a more elegant solution
vlad_starkov has quit [Remote host closed the connection]
Goles has joined #ruby
bradhe has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
seeingidog__ has joined #ruby
kbeddingfield has joined #ruby
Goles_ has joined #ruby
seeingidog__ has quit [Read error: Operation timed out]
Goles__ has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
Goles has quit [Ping timeout: 240 seconds]
kbeddingfield has quit [Ping timeout: 260 seconds]
Goles has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
Goles_ has quit [Ping timeout: 248 seconds]
rohit has joined #ruby
Goles__ has quit [Ping timeout: 240 seconds]
Goles has quit [Read error: Connection reset by peer]
kil0byte has joined #ruby
Axsuul has quit [Ping timeout: 252 seconds]
lethjakmans_lap has quit [Remote host closed the connection]
gcds has joined #ruby
kil0byte_ has quit [Ping timeout: 255 seconds]
rohit has quit [Read error: Connection reset by peer]
nemesit has joined #ruby
ToTo has quit [Ping timeout: 240 seconds]
parzorep has quit [Quit: parzorep]
<slainer68>
Hi. In RDOC, String#sum it is written it's basically the sum of the value of each char mod 2**n-1. "1" has value 49. So "111" should be 49 * 3 = 147. So "111".sum(8) should be 147 mod 128 = 19, but "111".sum(8) returns 147. Where's my misunderstanding ?
<JonnieCache>
oh my good gosh why do i only know about VIPS now
richardjapenga has quit [Ping timeout: 240 seconds]
phrame has joined #ruby
zigidias_ has joined #ruby
Armand has joined #ruby
richardjapenga has joined #ruby
redbull has quit [Ping timeout: 244 seconds]
dubios_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
yosafbridge` has joined #ruby
Cork- has joined #ruby
Armand is now known as Guest64954
arya has joined #ruby
J-_-L has joined #ruby
nomenkun has joined #ruby
tk__ has quit [*.net *.split]
Grieg has quit [*.net *.split]
Hanmac has quit [*.net *.split]
jrajav has quit [*.net *.split]
marienz has quit [*.net *.split]
invisime1 has quit [*.net *.split]
freeayu has quit [*.net *.split]
voodoofish has quit [*.net *.split]
fasta has quit [*.net *.split]
weeb1e has quit [*.net *.split]
zaiste has quit [*.net *.split]
theoros has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
Nowaker has quit [*.net *.split]
irving has quit [*.net *.split]
joppe_ has quit [*.net *.split]
kkh has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
tekacs has quit [*.net *.split]
FDj_ has quit [*.net *.split]
Koshian__ has quit [*.net *.split]
zooz has quit [*.net *.split]
Cork has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
issyl0 has quit [*.net *.split]
kapowaz has quit [*.net *.split]
zigidias has quit [*.net *.split]
emdub has quit [*.net *.split]
KRF has quit [*.net *.split]
acies has quit [*.net *.split]
randym has quit [*.net *.split]
thomas has quit [*.net *.split]
ericwood has quit [*.net *.split]
wunz has quit [*.net *.split]
faen has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
psino has quit [*.net *.split]
UdontKnow has quit [*.net *.split]
stderr- has quit [*.net *.split]
dubios has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
inimino has quit [*.net *.split]
sunhay has quit [*.net *.split]
estan has quit [*.net *.split]
dubios_ is now known as dubios
goraxe has quit [Write error: Connection reset by peer]
tekmaster has joined #ruby
tekmaster is now known as tekacs
dubios has quit [Changing host]
dubios has joined #ruby
Liothen has quit [Write error: Connection reset by peer]
goraxe has joined #ruby
enroxorz-work is now known as TheSisko
TheSisko has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Spaceghostc2c has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
thorncp has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
chussenot has quit [Quit: chussenot]
Imapickle has joined #ruby
NimeshNeema has joined #ruby
faen has joined #ruby
havenn has quit [Remote host closed the connection]
maddog_ has quit [Ping timeout: 240 seconds]
maddog__ has joined #ruby
gyre007 has quit [Ping timeout: 240 seconds]
nyuszika7h has joined #ruby
FailDrain has quit [Ping timeout: 240 seconds]
havenn has joined #ruby
dhruvasagar has joined #ruby
skipper has joined #ruby
skipper is now known as Guest47589
acies has joined #ruby
niklasb has joined #ruby
chussenot has joined #ruby
voodoofish has joined #ruby
randym has joined #ruby
Koshian__ has joined #ruby
ToTo has joined #ruby
supersid has quit [Quit: Page closed]
marienz has joined #ruby
Hanmac has joined #ruby
zooz has joined #ruby
kkh has joined #ruby
Elhu has joined #ruby
inimino has joined #ruby
havenn has quit [Ping timeout: 276 seconds]
iPhoneMRZ has joined #ruby
gurps_ has joined #ruby
Guest47589 has quit [Ping timeout: 245 seconds]
dr_Poggs has joined #ruby
BadLarry has quit [Ping timeout: 246 seconds]
erichmenge has quit [Ping timeout: 246 seconds]
gurps has quit [Ping timeout: 246 seconds]
Spaceghostc2c has quit [Ping timeout: 246 seconds]
drPoggs has quit [Ping timeout: 246 seconds]
DrShoggoth has quit [Ping timeout: 246 seconds]
moted has quit [Ping timeout: 246 seconds]
Seich has quit [Ping timeout: 246 seconds]
moted has joined #ruby
biju has joined #ruby
EyesIsMine has quit [Ping timeout: 246 seconds]
quest88_ is now known as quest88
prakriti has joined #ruby
mikecmpbll has joined #ruby
erichmenge has joined #ruby
EyesIsServer has joined #ruby
<biju>
newb q: I have a text file with some content and a yaml header, I know u can get the metatdata using YAML.load_file, but howto get the content without the yaml header? please help tyvm
reinaldob has quit [Remote host closed the connection]
Spaceghostc2c has joined #ruby
BadLarry has joined #ruby
seich- has joined #ruby
havenn has joined #ruby
biju is now known as tabbot
havenn has quit [Remote host closed the connection]
sspiff has quit [Remote host closed the connection]
joofsh has joined #ruby
straind has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
nonotza has quit [Ping timeout: 265 seconds]
SuperrMann has quit [Quit: Computer has gone to sleep.]
jrist-afk is now known as jrist
NimeshNeema is now known as NimeshNeema_
NimeshNeema_ has quit [Excess Flood]
fgro has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
<fgro>
in good ruby manner, how would "invert" a string "200x500" to "500x200" ?
<Uranio>
sorry, was here yesterday where I was tlaking about a encoding problem?
<Uranio>
why are #ruby and #ruby-lang two channels?
clocKwize has quit [Read error: Connection reset by peer]
<bnagy>
that is an excellent question
<bnagy>
basically, #ruby-lang is for people that have the IQ and stamina to register with freenode and #ruby is for students with homework problems
<Xeago>
I registered with freenode, but #ruby is more fun
jlast has joined #ruby
<Xeago>
and imo a bit more active
<bnagy>
:>
<bnagy>
a lot more active
carlyle has quit [Remote host closed the connection]
srji has quit [Ping timeout: 244 seconds]
phantasm66 has joined #ruby
d34th4ck3r has joined #ruby
<shevy>
hehehe
<shevy>
I have a crappy ISP, so I get a new dynamic IP every few hours where I disconnect. I am too lazy to auto-authenticate with freenode, so I always end up having to do so, if I want to talk on #ruby-lang these days
seeingidog__ has joined #ruby
<shevy>
since that was too much hassle for me, I stopped going there after they forced people to be registered in order to speak freely
ananthakumaran has joined #ruby
erichmenge has quit [Quit: Arrivederci!]
booginga has joined #ruby
erichmenge has joined #ruby
<workmad3>
shevy: man, you're lazy
kkh has quit [Changing host]
kkh has joined #ruby
<bnagy>
shevy: you could learn how to use a computer?
<workmad3>
shevy: and not even the normal pro-active lazy... just plain lazy :P
<shevy>
bnagy: I am a minimalist
Guest92676 has joined #ruby
<shevy>
workmad3: yeah :)
<bnagy>
I bet you a car I disc more than you :P
srji has joined #ruby
guy__ has quit [Remote host closed the connection]
<jrajav>
Not having a car doesn't make you not a minimalist
guy__ has joined #ruby
GoGoGarrett has joined #ruby
<jrajav>
What if you live a good distance from work and there isn't practical public transportation
<bnagy>
rrrr parse...logic....
schaary|afk is now known as schaary
<bnagy>
ok so I don't have a car, I disc more than shevy
<bnagy>
the car was just the bet
<jrajav>
disc == discard?
<bnagy>
disconnect
Ivo has quit [Quit: WeeChat 0.3.9.2]
<jrajav>
Not sure what disconnecting has to do with minimalism
<workmad3>
jrajav: nothing, unless you're shevy
<bnagy>
yeah, like... run screen
<bnagy>
anyone that's too minimal for screen is probably not on irc at all
frem has joined #ruby
RantriX has quit [Remote host closed the connection]
segv_ has joined #ruby
<jrajav>
There's a difference between minimalism and purposefully restricting yourself to a certain set of tools with a large tradeoff in productivity
<jrajav>
Minimalism acknowledges utility
tobinharris has quit [Quit: tobinharris]
<Uranio>
"kupfer" is minimalist but use many system resources
<workmad3>
bnagy: I nohup my server processes :P
<Uranio>
to make the diference exposed by jrajav betwen <jrajav | There's a difference between minimalism and purposefully restricting yourself to a certain set of tools>
guy__ has quit [Remote host closed the connection]
<bnagy>
yes... good point... now is DEFINITELY the time I need to have dinner
guy__ has joined #ruby
morf has quit [Quit: eof]
nemesit has quit [Quit: Leaving...]
answer_42 has quit [Quit: WeeChat 0.3.9.1]
nateberkopec has joined #ruby
<Xeago>
how do I turn an array of ascii numbers into a string? pack "C*"?
GoGoGarrett has quit [Remote host closed the connection]
<jrajav>
If it's always ASCII it won't matter which you use out of those two
seme has joined #ruby
stopbit has joined #ruby
seme is now known as Guest26077
carlyle has joined #ruby
allanm has joined #ruby
atmosx has joined #ruby
Guest7055 has quit [Ping timeout: 252 seconds]
wchun has quit [Client Quit]
margle has quit [Quit: Computer has gone to sleep.]
tobinharris has joined #ruby
v0n has joined #ruby
itchyouch has joined #ruby
samphippen has joined #ruby
gyre007 has joined #ruby
<atmosx>
a begin/rescuee/end section is taken as "different scope" ? I mean if after the 'begin' I create a list, can this list be read-en inteh end of the function?
* atmosx
tests
<shevy>
jrajav there are some channels on freenode where you must be registered in order to connect
<shevy>
so if you are not registered, and reconnect, you must manually rejoin those channels again
<jrajav>
Yes indeed
<atmosx>
no it cannot.
reinaldo_ has joined #ruby
<Xeago>
tbh, that is all handled by my client
<jrajav>
If you don't have auto-auth, you're either lazy or bad at choosing IRC clients
<shevy>
Xeago what do you use as client?
<Xeago>
err
<Xeago>
limechat
<shevy>
most IRC clients, especially those irssi like ones, suck immensely
<Xeago>
with sasl authentication
<shevy>
awwww
<shevy>
mac only :(
<jrajav>
It's been years since I used a CLI client, but you could try out weechat
<Xeago>
the client waits till it is authenticated to join stuff
<Xeago>
shevy, jrajav I've heard good stuff about weechat
<jrajav>
Yeah, it served me well
<jrajav>
Easy to configure and extend, too
<Xeago>
I coded something similar in MSL when I was using mIRC, like 14 years ago
_nitti has joined #ruby
<shevy>
hehe
<shevy>
good old mIRC
<shevy>
:)
samphippen has quit [Read error: Connection reset by peer]
mybrainis404 has joined #ruby
gyre007 has quit [Ping timeout: 246 seconds]
wchun has joined #ruby
reinaldob has quit [Ping timeout: 256 seconds]
daniel_- has joined #ruby
mpereira has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
* JonnieCache
slaps shevy about with a wet fish
<shevy>
yeah
<shevy>
and things
<shevy>
like this
mpereira has joined #ruby
<JonnieCache>
those were the days. efnet, color control codes and wet fish
SegFaultAX has quit [Ping timeout: 240 seconds]
<shevy>
a trout!
<JonnieCache>
that was it
<shevy>
also old school browser games
<shevy>
where you coordinated guild activity via IRC... today's browser games seem completely unfit for that (or are so big that they have "integrated" chat anyway)
reinaldo_ has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
nwertman has joined #ruby
samphippen has joined #ruby
kapowaz_ is now known as kapowaz
hakunin has joined #ruby
SegFaultAX has joined #ruby
zommi has quit [Quit: Leaving.]
nomenkun_ has joined #ruby
reinaldo_ has joined #ruby
samphippen has quit [Client Quit]
kirun has joined #ruby
reinaldob has quit [Ping timeout: 260 seconds]
nomenkun has quit [Ping timeout: 240 seconds]
cakehero has joined #ruby
bradhe has joined #ruby
<atmosx>
Xeago: I use weechat and textual
<atmosx>
both are good, weechat is way better than irssi
<atmosx>
Xeago: SASL auth is good, what's the prob? :-)
<Xeago>
not having a problem, shevy had :)
nwertman has quit [Ping timeout: 255 seconds]
xscc has joined #ruby
Guest21979 has quit [Ping timeout: 246 seconds]
redbull__ has joined #ruby
zaki has quit [Read error: Operation timed out]
_nitti has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 240 seconds]
Guest26077 has quit [Ping timeout: 248 seconds]
_nitti has joined #ruby
rdark has quit [Ping timeout: 255 seconds]
seme_ has joined #ruby
xscc has quit [Client Quit]
Guest63674 has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
redbull_ has quit [Ping timeout: 240 seconds]
u89 has joined #ruby
thorncp has quit [Ping timeout: 240 seconds]
thorncp_ has joined #ruby
freeayu__ has quit [Remote host closed the connection]
danneu has joined #ruby
_bart has quit [Read error: Connection reset by peer]
allanm has quit [Read error: No buffer space available]
sj26 has quit [Ping timeout: 245 seconds]
allanm has joined #ruby
tagrudev has quit [Quit: my people need me]
allanm has quit [Read error: Connection reset by peer]
_bart has joined #ruby
SuperrMann has joined #ruby
allanm has joined #ruby
samphippen has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
IRLConor_ has quit [Quit: leaving]
IRLConor has joined #ruby
sj26 has joined #ruby
polymar_ has joined #ruby
polymar_ has quit [Remote host closed the connection]
rakl has joined #ruby
daniel_- has quit [Read error: Operation timed out]
baroquebobcat has joined #ruby
chussenot has quit [Quit: chussenot]
seme_ has quit [Quit: leaving]
polymar has quit [Ping timeout: 245 seconds]
hsbt_away is now known as hsbt
chussenot has joined #ruby
rdark has joined #ruby
baroquebobcat has quit [Client Quit]
banisterfiend has joined #ruby
reinaldo_ has quit [Remote host closed the connection]
<atmosx>
weechat can use either nickserve or sasl, the thing that I'm usually connected via TOR
schaary has quit [Quit: Leaving.]
mculp has joined #ruby
<Xeago>
can't you proxy it over tor?
eldariof has quit [Read error: Operation timed out]
<atmosx>
and in order to connect via tor you need sasl
atno is now known as atno|AFK
tommyvyo has joined #ruby
<atmosx>
Xeago: sure, if my ISP wasn't *that* lame. I have an internet problem connection at home. Now I'm at the library. I took also a USB stick for irc/ssh/www
<mculp>
hey guys i was thinking of writing a voting app… I think I'll call it VoteIt… how would i store the votes in ruby
dr_bob has quit [Quit: Leaving.]
<atmosx>
mculp: sqlite3
<atmosx>
mculp: why would you do that anyway? Small project or… ebcause e-voting is not considered sercure. You can't go back and re-count
<atmosx>
safely...
<atmosx>
It's way too easy to manipulate the voting
<atmosx>
procedure
<shevy>
mculp def vote(how = '+'); case how; when '+'; @vote +=1; when '-'; @vote -= 1; end
reinaldo_ has joined #ruby
daniel_- has joined #ruby
<shevy>
atmosx, eh? he can ensure that his own code works or? :-)
<atmosx>
shevy: why do you set 'how' to '+' in the def row?
reinaldob has quit [Ping timeout: 265 seconds]
d34th4ck3r has quit [Ping timeout: 252 seconds]
<workmad3>
shevy: how about @vote = @vote.send(how, 1) ;)
iamjarvo has quit [Quit: Computer has gone to sleep.]
<generalissimo>
mculp: can i come work for your company when you do?
<atmosx>
1 and 0 might be enough
<shevy>
workmad3: nah, too verbose with .send
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<shevy>
big_fat_ballot.vote '+'
<shevy>
well
<shevy>
big_fat_ballot.vote :+
<atmosx>
generalissimo: I'll hire you.
<shevy>
nah that looks ugly
<lectrick>
anyone have a shorter fizzbuzz in ruby? (1..100).map{|n| [f=(n%3).zero?,b=(n%5).zero?].any? ? "#{'Fizz' if f}#{'Buzz' if b}" : n}
kolz has joined #ruby
<workmad3>
shevy: it's the same way as your method
<atmosx>
generalissimo: we'll do a social network app, like facebook but better!
<atmosx>
lol
<workmad3>
shevy: for calling at least
<shevy>
workmad3 more CHARACTERS!!!!
zemanel has joined #ruby
mtree has quit [Ping timeout: 245 seconds]
<shevy>
you are a java man!!!
<workmad3>
shevy: and fewer characters in implementation :P
jrajav has joined #ruby
<workmad3>
shevy: because it doesn't need the case statement :P
wheeler has joined #ruby
<shevy>
case is so beautiful
jrajav has quit [Remote host closed the connection]
jbpros has quit [Quit: May the Cuke be with you!]
_huoxito has quit [Quit: Leaving]
<generalissimo>
mculp: you can lay me off 6 months into it when you realize that startups lose money sometimes
daybreaker has joined #ruby
seeingidog__ has joined #ruby
jbpros has joined #ruby
<shevy>
who works at a startup here?
mtree has joined #ruby
<generalissimo>
it's cool to tell inside jokes in a giant public channel, right?
rmc3 has quit [Ping timeout: 240 seconds]
rmc3 has joined #ruby
<grzywacz>
shevy, #define startup ;)
<atmosx>
I'm not.
topek has quit [Quit: Leaving.]
dr_bob has joined #ruby
<atmosx>
a 2-year old company is a startup.
allanm has quit [Read error: Connection reset by peer]
<atmosx>
if you're 3-year old, you're not.
<atmosx>
easy
allanm has joined #ruby
<atmosx>
I'm too bored… to study again Mg2+ cations
<workmad3>
atmosx: how about if the company went for 2 years doing consultancy work, then pivoted into being a startup and doing their own product dev?
<atmosx>
workmad3: that'd be a startup.
mjolk has joined #ruby
mjolk_ has joined #ruby
<shevy>
atmosx what is "magnesia milk"
<generalissimo>
shevy: i did... now i'm my own startup
<workmad3>
atmosx: how about if they did consultancy for 3 years before pivoting? :)
reinaldo_ has quit [Remote host closed the connection]
<atmosx>
shevy: yeah, could be.
<wheeler>
if you use the word "pivoted," you're a startup
<JonnieCache>
wheeler: ++
<JonnieCache>
lol
<workmad3>
:D
<shevy>
atmosx it's Mg(OH)2
<atmosx>
workmad3: again, startup. The pivoting point is 0-ing the previous experience.
atno|AFK is now known as anto
GeekOnCoffee has quit [Read error: Connection reset by peer]
<mculp>
M NIGHT SMALYLAJHLALYJALHLALMYLANANANA -- generalissimo used to work for a startup named VoteIt
mjolk_ has quit [Remote host closed the connection]
<JonnieCache>
if you have square glasses and wear a fucking blazer and sneakers then you are a startup
<atmosx>
shevy: nah, I have to read about… what his role in enzymes, learn a couple of structures Mg2+ takes place on...
anto is now known as atno
<atmosx>
it's a fucking mess, for biochem
<workmad3>
atmosx: how about if I was a startup consultancy, went for 3 years, and after that pirouetted and restarted consultancy?
<atmosx>
workmad3: that's fraud.
<mculp>
I'm hiring @ Vote IT
<mculp>
plz PM me
<grzywacz>
are there any standard for formatting deeply nested hashes (or data structures in general)?
<grzywacz>
*s
<workmad3>
atmosx: bah :P
<generalissimo>
what if you wear hoodies to work and forget to brush the cheetos out of your beard?
<atmosx>
:-P
<generalissimo>
is that a startup?
<shevy>
grzywacz: the only standard I can think of is to murder people in reallife if they use deeply nested arrays & hashes
jbpros has quit [Ping timeout: 252 seconds]
<mculp>
besides generalissimo ne1 else want to work @ Vote IT
<workmad3>
generalissimo: no, that's just normal coders
<kalleth>
i work in an office the same size as a shipping container near edgware road in central london
<kalleth>
does that count as a startup
<shevy>
kalleth: YES
<wheeler>
Vote IT sounds like a tech consultancy
<workmad3>
kalleth: is it an actual shipping container?
<kalleth>
unfortunately not
<grzywacz>
shevy, that's for a test case, shouldn't be too bad :)
<kalleth>
would be cool if it was though
<shevy>
lol
<kalleth>
except for, you know, insulation
casheew has quit [Quit: leaving]
<mculp>
no i tihnk we just need to add enunciation
<JonnieCache>
kalleth: do you have free beer and a disregard for revenue?
<shevy>
who would want to code in a container that _is_ actually shipped around the world?
<mculp>
Vote IT
<kalleth>
no free beer, and we're profitable
<mculp>
tell them what you are voting for
<workmad3>
kalleth: sounds non-startup then
<kalleth>
just a digital media agency
<grzywacz>
kalleth, "I work in a MAERSK-branded office!"
<grzywacz>
;-)
<kalleth>
so we're not actually a startup
<JonnieCache>
not a startup then :)
banisterfiend has quit [Read error: Connection reset by peer]
<atmosx>
kalleth: that's pathetic. What's your revenue?
realniko has quit [Ping timeout: 245 seconds]
<kalleth>
atmosx: like i'm going t tell an IRC channel that ;p
<shevy>
and no free beer, so you are an evil company :(
realniko has joined #ruby
<kalleth>
i'm just an employee
daniel_- has quit [Ping timeout: 252 seconds]
<kalleth>
also, we have no tests
<atmosx>
kalleth: well you never know.
<shevy>
kalleth: lie to us!
* kalleth
watches the channel twitch
<atmosx>
I mean, Inever know :-P
<workmad3>
startups don't make money... startups haven't figured out how to make money yet
<JonnieCache>
what kind of startup actually makes money jesus some people
<kalleth>
shevy: okay, we have full CI on all our projects with 100% code coverage
<kalleth>
:D
<kalleth>
how's that
<workmad3>
once they figure that out, they're no longer a startup :P
<JonnieCache>
you should be *spending* other peoples money
* atmosx
is tracing kalleth in order to find his real identity and sell it on Silk Road for $$$
<mculp>
Vote it Is Also a Startup is ne1 interested PM ME
<kalleth>
i have no drugs
<slainer68>
hi. if b is not defined, why you can't write : a = b if b = true (one line), but if b = true; a = b; end; works ?
<kalleth>
sorry
<shevy>
JonnieCache isn't that like... fraud?
<atmosx>
what is a CI ?
<atmosx>
champions league?
<JonnieCache>
no thats venture capitalism
<kalleth>
..
<workmad3>
shevy: no, it's called 'investment' :P
<kalleth>
C i
<kalleth>
CI
<kalleth>
oh god
<generalissimo>
and here i am buying my own beer and writing my own paychecks like a sucker
<shevy>
lol
Glottis has joined #ruby
<atmosx>
shevy: yeah, business idiots use abbreviations like ROI (return on invest), etc. Makes them feel smart.
mtree has quit [Ping timeout: 260 seconds]
<mculp>
generalissimo I need a vote algorithm then I have beer for u
<kalleth>
ROI is a standard acronym used for pretty much everything and actually has a valid meaning
<atmosx>
generalissimo: see? there you go! :-P
<workmad3>
generalissimo: yeah, you should be getting a rich billionaire convinced that you're the next big facebook so that they'll buy your beer for the next 6 months :P
<generalissimo>
i keep getting hits from angellist from people who want to hire me at 50k with 2% equity... in SF
<generalissimo>
lol
<generalissimo>
can you rent a dumpster on 50k a year in SF?
aganov has quit [Remote host closed the connection]
richardjapenga has quit [Quit: Leaving]
<shevy>
hmmm
<shevy>
notice that his girlfriend called and he is off of IRC
<shevy>
what does this tell us about you all!!!
gyre007 has joined #ruby
<JonnieCache>
kalleth: something is weird on freenode today
dertyp has quit [Quit: Leaving...]
rumba has joined #ruby
<shevy>
yeah
<shevy>
they all act like drunks
<rumba>
does anyone have experience with Savon, please? i have this piece of code http://pastebin.com/eAVsZy04 which doesn't authenticate to the remote server. i've tried both basic and digest (line 7) and it's still not working, while the Python Suds library works fine. i don't understand what the difference is...
k610 has quit [Ping timeout: 255 seconds]
hsbt is now known as hsbt_away
Rym has joined #ruby
lethjak__ has joined #ruby
<lethjak__>
hey, in ruby is there any way to append to a file rather than overwriting it?
nopoliti1a has joined #ruby
soyapi has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
invisime has quit [Ping timeout: 240 seconds]
invisime has joined #ruby
allanm has quit [Read error: Connection reset by peer]
ryanlecompte has quit [Remote host closed the connection]
Bootstrapper has joined #ruby
allanm has joined #ruby
zooz has quit [Quit: Leaving IRC]
ryanlecompte has joined #ruby
hsbt_away is now known as hsbt
CamonZ has quit [Ping timeout: 252 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
jasond has joined #ruby
icooba has quit [Ping timeout: 240 seconds]
shevy has quit [Ping timeout: 245 seconds]
johnmilton has joined #ruby
CaptainJet has joined #ruby
beiter has quit [Read error: Connection reset by peer]
rhys has joined #ruby
ryanlecompte has quit [Ping timeout: 252 seconds]
ltsstar has quit [Ping timeout: 264 seconds]
<Xeago>
how do I pad strings when printed in ruby?
<rhys>
what is #{stuff} in ruby? I thought it was like the bash subshell. if I do 'echo $(cat file)' it first puts the output of cat file into $() and then re-evaluates the line.
<workmad3>
rhys: "this is #{string interpolation}"
<rhys>
workmad3, thanks. i'll google that now.
zigomir has joined #ruby
zigomir has quit [Remote host closed the connection]
<Xeago>
workmad3: thanks
Elhu has quit [Quit: Computer has gone to sleep.]
schaary has joined #ruby
heftig has joined #ruby
<sweet_kid>
lethjak__: use "a" option in File.open()
wheeler has joined #ruby
cousine_ has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
hoelzro is now known as hoelzro|away
<lethjak__>
thanks sweet_kid! :)
quest88 has quit [Quit: quest88]
allanm has quit [Read error: No buffer space available]
Glottis has quit [Ping timeout: 245 seconds]
allanm has joined #ruby
davidcelis has joined #ruby
jrajav has joined #ruby
Elhu has joined #ruby
samphippen has joined #ruby
shevy has joined #ruby
_nitti_ has joined #ruby
_nitti__ has joined #ruby
Trioke has joined #ruby
mmitchell has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 252 seconds]
zigomir has joined #ruby
dr_bob has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
blazes816 has joined #ruby
_nitti_ has quit [Ping timeout: 255 seconds]
etcetera has quit [Quit: Computer has gone to sleep.]
schaary has quit [Quit: Leaving.]
icooba has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
_nitti has joined #ruby
FailDrain has quit [Quit: Leaving]
F1skr has joined #ruby
zigomir has quit [Ping timeout: 242 seconds]
vlad_starkov has joined #ruby
reset has quit [Quit: Leaving...]
_nitti__ has quit [Ping timeout: 260 seconds]
rakl has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
margle has joined #ruby
ryanlecompte has joined #ruby
BoomCow has joined #ruby
etcetera has joined #ruby
beilabs has joined #ruby
schaary has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
dr_bob has joined #ruby
dr_bob has quit [Client Quit]
mikepack has joined #ruby
nwertman has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
<Xeago>
how would I make 2 dimensional array of 2 loose arrays
baroquebobcat_ has joined #ruby
<Xeago>
the items in the 2 arrays are keys and the value gets computed from those keys
allanm has quit [Read error: Connection reset by peer]
_nitti_ has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
allanm has joined #ruby
bradhe has joined #ruby
baroquebobcat has quit [Ping timeout: 256 seconds]
baroquebobcat_ is now known as baroquebobcat
grzywacz has quit [Ping timeout: 240 seconds]
ianbrandt has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
jplaza_ has joined #ruby
nwertman has quit [Ping timeout: 255 seconds]
areil has quit [Remote host closed the connection]
_nitti has joined #ruby
jplaza_ has quit [Client Quit]
seeingidog__ has quit [Quit: Leaving.]
alvaro_o has joined #ruby
ryannielson has joined #ruby
pcarrier has quit []
nopoliti1a has quit [Quit: leaving]
bradhe has quit [Ping timeout: 252 seconds]
JohnBat26 has joined #ruby
swarley has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
_nitti_ has quit [Ping timeout: 276 seconds]
oivoodoo has quit [Remote host closed the connection]
<Xeago>
I guess that would be more like nested hashes
Elhu has quit [Quit: Computer has gone to sleep.]
<matti>
:>
wheeler has left #ruby ["Audi 5000"]
guy__ has quit [Ping timeout: 252 seconds]
clj_newb has quit [Ping timeout: 265 seconds]
margle has quit [Quit: Computer has gone to sleep.]
ebouchut has quit [Quit: ebouchut]
BrianJ has quit [Quit: BrianJ]
adeponte has joined #ruby
alexwh has joined #ruby
chussenot has quit [Quit: chussenot]
maletor has joined #ruby
chussenot has joined #ruby
the_jeebster has joined #ruby
Elhu has joined #ruby
jekotia has joined #ruby
hsbt is now known as hsbt_away
nat2610 has joined #ruby
_nitti_ has joined #ruby
brianpWins has joined #ruby
ninegrid has joined #ruby
tobinharris has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
d2dchat has quit [Remote host closed the connection]
_nitti__ has joined #ruby
_nitti__ has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
<Xeago>
how would I match words that have an l in the second or third position
volta has quit [Remote host closed the connection]
<Xeago>
E.g. Hello and All
_nitti has joined #ruby
wallerdev has joined #ruby
<Xeago>
^.[l.][l.]
<Xeago>
does not work..
polysics has joined #ruby
<polysics>
anyone familiar with the Ruby internals can tell me what exactly File.rename does?
<polysics>
it's a s if it's touching the file twice, causing some issues with filesystem polling
tjbiddle has joined #ruby
afgeneralist has joined #ruby
_nitti_ has quit [Ping timeout: 252 seconds]
<davidcelis>
Xeago: /^.{1-2}l/
<davidcelis>
er sorry, /^.{1,2}l/
<davidcelis>
not a hyphen
<davidcelis>
Xeago: http://rubular.com/ is a good site to play with regexes in real time
<banisterfiend>
davidcelis: sup
timmow has quit [Ping timeout: 252 seconds]
redbull__ has quit [Read error: Connection reset by peer]
<davidcelis>
hi
redbull__ has joined #ruby
ThaDick has quit [Quit: zzzZZZ ...]
<polysics>
might it be that File.rename, don't know, closes the handle too late?
<polysics>
this is a very weird issue here
Nisstyre has quit [Remote host closed the connection]
sepp2k has quit [Read error: No buffer space available]
<Xeago>
how to use ack with a regex?
theoros_ is now known as theoros
<Xeago>
and also read from stdin
sepp2k has joined #ruby
cantonic_ has joined #ruby
jekotia has quit [Quit: irc.quakenet.net]
Elhu has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
soyapi has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Read error: Operation timed out]
alexim has joined #ruby
bwlang has joined #ruby
Nisstyre has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
fantazo has quit [Remote host closed the connection]
kil0byte has quit [Remote host closed the connection]
Rym has quit [Read error: Connection reset by peer]
hakunin has quit [Remote host closed the connection]
qwerxy has quit [Ping timeout: 260 seconds]
qwerxy has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
vandemar has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
rdark has quit [Quit: leaving]
workmad3 has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
<shevy>
Xeago use ruby!
schaary has quit [Quit: Leaving.]
<jrajav>
Xeago: Isn't that precisely what sed is for?
<jrajav>
awk, but with regexes?
<Xeago>
no idea
<Xeago>
btw ack!=awk
<Xeago>
no idea what awk is
mascool has joined #ruby
<jrajav>
no idea what ack is
<jrajav>
Sooooo
<jrajav>
Awkward
<jrajav>
(See what I did there?)
eldariof has joined #ruby
<Xeago>
ack is 'better than grep' :) yea :)
<jrajav>
Doesn't sound like it could be that much better without a manpage
Slivka has quit [Remote host closed the connection]
<shevy>
micsha all constants in ruby, first character, must be upcased, as waxjar wrote
<micsha>
I'm just asking if that is convention or if the Ruby interpreter will actually not understand what's going on?
<shevy>
you could do this in theory too
<shevy>
module FOO
<shevy>
but people prefer this:
<shevy>
module Foo
<shevy>
you see?
headius has joined #ruby
<micsha>
yeah
<shevy>
F is upcased in both situations
<waxjar>
it's required micsha
<shevy>
what will not work is this
<shevy>
module foo
<JohnTeddy>
https://gist.github.com/4127389 ... I am trying to write a 'titleize' method.. initially I just capitalized the first word of the title, and all words bigger than 4 characters... though that's buggy. So I made an array with every preposition, coordinating conjunction, and article.. how can I change the gsub method so instead of using the '5' character limit... it just does an isinarray? check.. if it's in there.. .downcase
<micsha>
huh... I learned something today.
<shevy>
micsha, it is more than a convention, the ruby parser actually works that way
jrist-afk is now known as jrist
<waxjar>
ruby will think you're calling a variable called foo or a method called foo
<JohnTeddy>
shevy: yea, I had to get all the words in the english language that are prepositions/articles/coordinating conjunctions
<waxjar>
ah, ok. include is used to mix a module into another module or class
<waxjar>
not to load files
<shevy>
micsha as the name of a module must start with upcased character, (Foo) never works. where from does the ( come
<JohnTeddy>
thanks heftig
<shevy>
[code]include Ex25[/code]
<micsha>
following the learn ruby the hard way tutorial
<waxjar>
to load files you use require 'filename' or load 'filename.rb'
<shevy>
micsha: that could explain it. as far as I know the author who wrote it left ruby in a ragequitting fashion
BrianJ has joined #ruby
<micsha>
I was trying to seperate my code from sentance, upon further review that may have made things more confusing
<heftig>
JohnTeddy: not the most performant option, though
<micsha>
hahah, great.
<micsha>
so, now I have to look up this backstory
<shevy>
micsha, just notice the difference - require 'filename', it is using '' you see? include does not use '', it uses just: include NameOfModule
<shevy>
so if your module is inside foo.rb, and is also named Foo, then you could do: require 'foo.rb'; include Foo but also require 'foo'; include Foo, but never require foo; include 'Foo'
<micsha>
oh, ok, but as long as i have Ex25.rb and not ex25.rb it should be ok?
<shevy>
hehehe the filename does not matter
<shevy>
the name of your module matters!
<micsha>
hmm
xorigin has joined #ruby
<waxjar>
micsha, with include 'ex25.rb', are you trying to load the code in that file?
<micsha>
gimme a second, I have to read this through again.
<shevy>
if you want to you can call your filename 'i_hate_ruby.rb' and inside put: module Ex25; end
Guest5820 is now known as sts
xorigin has left #ruby [#ruby]
<micsha>
waxjar: yes, I'm trying to load the code in the file into irb.
Beoran__ has joined #ruby
carlyle_ has joined #ruby
<micsha>
ooooh! I get it!
clj_newb has joined #ruby
Beoran_ has quit [Read error: Operation timed out]
<waxjar>
Ruby uses require 'filename' (to require once) or load 'filename.ext' (to load a file a second, third, etc time)
<micsha>
I have to require the file and then I have to tell irb, all of the code in the required file to be included in the code, right?
kbeddingfield has quit [Remote host closed the connection]
<shevy>
micsha, yeah
<shevy>
well
nanderoo has quit [Quit: Leaving.]
<shevy>
require alone works for that
<shevy>
include is used if you want to include a module into your class, for instance
<micsha>
ok, so why even have include, then?
<shevy>
you can avoid scoping via Foo:: in that case
<shevy>
all methods will be pulled into your class
<shevy>
module Foo; def test; puts 'testing'; end; end; class Bar; include Foo; end
stephenjudkins has quit [Quit: stephenjudkins]
<shevy>
Bar.new.test # => "testing"
<micsha>
ooh.
<micsha>
that's the feature where you can break open classes and add to them with modules and such, then, huh?
<micsha>
or am I missing the point on that one.
<_bart>
Hi, I'm using Geocoder, but when I do this, I get NaN: item.shop.distance_to([params[:lat], params[:lng]])
<waxjar>
yep, mixins they're called
<micsha>
huh... that's kinda neat.
<_bart>
ah nevermind, mistyped
bradhe has quit [Remote host closed the connection]
<micsha>
mixins == modules?
<micsha>
kind of? not really?
<reactormonk>
micsha, require is for files, include is for namespaces
<reactormonk>
micsha, exactly the same.
<waxjar>
essentially, yes. modules can be used as mixing (when you include them into another Module or Class, people call them mixins)
<waxjar>
*mixins
fantazo has joined #ruby
statarb3 has quit [Quit: Leaving]
v0n has joined #ruby
<micsha>
oh! so, I can have one file pull code from another file and use it's code, but I'd have to go Requiredfile.method, where if I included it I could just have the new namespace and call it as if it where in the current namespace?
<swarley>
That's like saying, Foo.const_get(:Bar).method(:baz).call (just much prettier)
Guest92676 has quit [Quit: Guest92676]
yshh has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
<Beoran__>
class Foo ; def self.bar ; return "bar" ; end ; Const = 7 ; end ; puts Foo::bar ; puts Foo::Const
dekroning has joined #ruby
<Beoran__>
will print bar 7
davidcelis has joined #ruby
dedis has quit [Remote host closed the connection]
jphpsf has joined #ruby
alexshenoy has joined #ruby
u89 has quit [Read error: Connection reset by peer]
seeingidog__ has joined #ruby
v0n has joined #ruby
<Beoran__>
so to be short if you see Foo::Bar (second is upper case, then it's equivalent to .const_get(:Bar) and if it's lowercase like Foo::bar it's equivalent to .method(:bar)
vlad_starkov has quit [Remote host closed the connection]
<Beoran__>
So that's why I call :: the lookup operator, not the namespace one.
sailias has quit [Quit: Leaving.]
<micsha>
sorry, I had to take care of something.
F1skr has quit [Quit: WeeChat 0.3.9.2]
banisterfiend has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
<Beoran__>
no problem
danneu has joined #ruby
<banisterfiend>
Beoran__: have you been to brugges?
<Beoran__>
the special case that is if you do :: without anything in front of it, it means the ytop-level scope, which is the "main" scope
<Beoran__>
banisterfiend, yes
<Beoran__>
why you ask?
tommyvyo has quit [Quit: Computer has gone to sleep.]
dangerousdave has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
jlwestsr has joined #ruby
swarley has quit [Read error: Connection reset by peer]
emanu has joined #ruby
<micsha>
Beoran: thanks for the explination, I don't think I'm far enough along just yet to understand it but it makes a little more sense now.
<shevy>
npx hah that reminds me... some scientist once said that a problem needs to be looked at from all sides / multiple angles
F1skr has joined #ruby
vlad_starkov has joined #ruby
<micsha>
so, the :: is how you traverse namespaces within files. Is this correct?
<micsha>
or namespaces within namespaces, rather.
nwertman has quit [Ping timeout: 260 seconds]
BigO has quit [Remote host closed the connection]
<shevy>
micsha you use :: for scoping
diegoviola has quit [Ping timeout: 256 seconds]
<shevy>
Foo::Bla::Ble.new
<shevy>
module Foo; module Bla; class Ble
parzorep has joined #ruby
anachronistic has quit [Quit: anachronistic]
<shevy>
you see?
parzorep has quit [Client Quit]
<shevy>
you could not have many other ways
<shevy>
what would you wanna use... Foo.Bla.Ble.new perhaps
fms has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy>
FooBlaBle - not possible to distinguish
<shevy>
with module FooBlaBle
<shevy>
or PHP style... via ... what did they use? \ or something
yshh has joined #ruby
<micsha>
oh, ok, thanks shevy.
<waxjar>
php uses -> and :: i believe
<micsha>
not sure, shevy, I've never written php.
<micsha>
which I'm to understand is probably a good thing.
alexshenoy has quit [Quit: alexshenoy]
emanu has quit [Ping timeout: 276 seconds]
cardoni has quit [Quit: cardoni]
jackiechan0 has joined #ruby
g0rd0n has joined #ruby
<g0rd0n>
i installed ruby 1.9.1 but gem still complainsi don't have ruby 1.9 for installing a package... how do i tell gem to actually use ruby 1.9?
<shevy>
micsha, I used to write PHP, but I abandoned it for the better looking girl
<shevy>
her name was ruby
<micsha>
haha
<shevy>
g0rd0n do you use debian
nomenkun has joined #ruby
<shevy>
second information you should provide is - how exactly did you install ruby
dinkytoy has quit [Ping timeout: 245 seconds]
<waxjar>
php got the job done i guess but it taught me so much bad conventions
<g0rd0n>
shevy: yes
<shevy>
third information, afterwards, would be the precise error you get in that gem g0rd0n
<micsha>
shevy: Probably for the best. That thing is, apparently, an abomination.
vlad_starkov has quit [Ping timeout: 244 seconds]
<g0rd0n>
shevy: i did apt-get install ruby1.9
<shevy>
I suspected it was debian - the world is a small place after all :-)
<shevy>
yup
<shevy>
debian hates ruby
<g0rd0n>
i know
fms is now known as ebobby
<g0rd0n>
makes me hate ruby too :(
<shevy>
hehe
elux has joined #ruby
<shevy>
there is nothing wrong with ruby as such
<shevy>
but I compile from source, so I dont get issues that debian users have
undersc0re97 has quit [Remote host closed the connection]
<shevy>
g0rd0n, I suspect that apt-get install ruby1.9 does not give you the .h header files
<shevy>
since debian policy is to cripple everything
<g0rd0n>
shevy: i guess i could install ruby1.9-dev
<shevy>
micsha, yeah but php is more widespread :\
<g0rd0n>
oops i meand shevy
<shevy>
g0rd0n, yeah. then you should be able to compile extensions natively that use ruby-c
<shevy>
g0rd0n, problem is still, debian modified gem, and as such some gems may not work properly
<shevy>
g0rd0n, Hanmac here uses ubuntu and knows a lot
BigO has joined #ruby
<shevy>
he will know what to do
<havenn>
g0rd0n: Using ruby-build with chruby is my fav method to install and manage Ruby on Ubuntu. RVM is a really popular alternative.
joeycarmello has joined #ruby
<micsha>
g0rd0n, you should probably get the current ruby build from the site, there are some bugfixes in there that are kind of nice.
nemesit has joined #ruby
dakine has joined #ruby
<havenn>
g0rd0n: chruby is like 80 lines of code for managing the annoying env variables that need to be set, and ruby-build takes some of the pain away from common builds.
<g0rd0n>
i guess the problem is i still ahve tuby 1.8.7 on the system, if i do ruby -v i get 1.8.7
BigO has quit [Disconnected by services]
Xeago has quit [Remote host closed the connection]
<g0rd0n>
so i guess i should switch the interpreter somehow
<Beoran__>
unforunately, debian's (and hence all other debian based distros like ububtu) 's packaging of ruby isn't very useful. You're almost forced to build ruby yourself.
itchyouch_ has joined #ruby
<micsha>
which isn't really all that hard.
BigO_ has joined #ruby
<Beoran__>
g0rd0n, that's why thre is rvm the ruby version manager and other alternatives to it
<shevy>
g0rd0n, the source URLs are ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2 and ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.bz2
<micsha>
no, you have to pulls some files out of /usr/local/bin I think
<micsha>
I mean, yeah, you rm -rf the install directory but you also have to go through the makefile and find out where it moves files to and rm those as well but it's not that bad, it's a smallish makefile
kbeddingfield has joined #ruby
<shevy>
g0rd0n, all of which you would never need if debian would give you a simple choice to never cripple packages. but their mandatory policy is "we are a server OS, and people should not compile because they are idiots anyway, so we don't provide .h files for them in an easy way"
<micsha>
it's not like building named or anything.
<shevy>
and the best thing is... the different distributions name their dev-packages differently, for no reason at all
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
h4mz1d has joined #ruby
itchyouch has quit [Ping timeout: 240 seconds]
itchyouch_ is now known as itchyouch
<micsha>
you're all touching on a bunch of reasons I don't prefer linux.
<shevy>
micsha, or you compile into a standalone directory
<havenn>
shevy: I may have dreamt it, but I swear Debian was going to update to a modern Ruby and RubyGems in an upcoming distro - should come downstream to Ubuntu!
itchyouch has quit [Client Quit]
<shevy>
linux is ok-ish, it's just that the distributions fight one another
<micsha>
I haven't done that, but I don't see why you couldn't
ryanlecompte has quit [Remote host closed the connection]
ryanlecompte has joined #ruby
<micsha>
yeah, and they don't have much uniformity across the different distrobutions, it's kind of irritating.
<micsha>
I stick to *BSD if I can.
<shevy>
havenn, yeah. well it is possible to have a good environment in default debian or ubuntu just as well, Hanmac is an example for that... just that 80% of the people who use debian will never know how to do that
<shevy>
Hanmac uses only debian-ruby stuff! (or ubuntu... almost the same thing for me)
<micsha>
really quick question
<micsha>
puts("stuff")
<micsha>
or
<micsha>
puts "stuff"
<havenn>
micsha: The latter.
<micsha>
why?
<havenn>
micsha: Less cruft.
<micsha>
is it more common to see the puts "stuff" rather than puts("stuff")?
<shevy>
micsha, both will work but most people will prefer the one without parens
<havenn>
More readable. I usually prefer no parens unless it breaks the interpreter. :P
joeycarmello has quit [Remote host closed the connection]
<shevy>
micsha, yeah
<micsha>
k, sticking to puts "stuff" from now on.
answer_42 has quit [Remote host closed the connection]
<shevy>
micsha, especially for puts
<havenn>
micsha: Much more common to see without parens.
kbeddingfield has quit [Ping timeout: 245 seconds]
<micsha>
k, thanks again.
<shevy>
with method invocations, it's 50-50
skaczor has quit [Remote host closed the connection]
<shevy>
some people like to do object.foo('bla'), some prefer object.foo 'bla'
<shevy>
or foo('bla') vs foo 'bla'
<shevy>
even if defines...
Trioke has quit [Ping timeout: 260 seconds]
<shevy>
def foo bla
<shevy>
vs
<havenn>
micsha: To use no parens at all is sometimes known as "Seattle Style" since many of their libs use no parens. There are different opinions but nobody uses them for #puts.
<shevy>
def foo(bla)
MasterIdler has joined #ruby
<shevy>
the difficulty of choice :-)
tchebb_ has joined #ruby
joeycarmello has joined #ruby
workmad3 has quit [Read error: Operation timed out]
<micsha>
as a C programmer I kind of like them around most things.
ryanf has joined #ruby
<micsha>
puts is the only thing I've been on the fence about.
<shevy>
micsha, you can do this: alias e puts
Russell^^ has quit [Quit: Russell^^]
<shevy>
e 'hello world'
<JohnTeddy>
https://gist.github.com/4128078 ... instead of doing x[0..99] how can I make 99 the end of the string or infinity?
<JohnTeddy>
actually I guess I can do x.length
<micsha>
I actually don't like useing that feature.
<micsha>
i've seen it with p "stuff"
<micsha>
I see that as not enough
<micsha>
I can see cutting things down.
<shevy>
p is different though, I think it calls the method .inspect on the object
<shevy>
puts calls .to_s
<micsha>
I mean, I don't love writing printf("%d", int_var); a whole bunch of times but, just p isn't enough.
medik has joined #ruby
medik has quit [Excess Flood]
<shevy>
ruby has sprintf too! :) or the shorter variant...
medik has joined #ruby
xclite has quit [Remote host closed the connection]
<shevy>
'%3s' % '1' # => ' 1'
<micsha>
printf() and sprintf() i think, yeah.
tchebb_ has quit [Client Quit]
seeingidog__ has quit [Quit: Leaving.]
<havenn>
JohnTeddy: #each is the way to do it, but if you wanted to go to inifinity: (1..Float::INFINITY).each { |n| puts n }
<micsha>
when I found that out, I printf'd all the things.
<shevy>
x = "hi there"; '%15s' % x # => " hi there"
iamjarvo has joined #ruby
hsbt_away is now known as hsbt
booginga has quit [Quit: This computer has gone to sleep]
zemanel has quit [Quit: Remote hottie closed the connection]
stephenjudkins has joined #ruby
<micsha>
there's a guy here that has a huge white beard, I asked him if he was a unix admin, he looked at me, rather befuddled and asked me what that was.
<JohnTeddy>
https://gist.github.com/4128078 .. my translate method currently fails for 'stupid', it turns it into tupiday, when it should be upidstay. What is a good way to have this method repeat the cycle I have until a vowel is included in the first character?
theoldroadhog has quit [Quit: Leaving.]
chococrois has joined #ruby
<havenn>
JohnTeddy: For your vowels, it would be nice to do: %w[ a e i o u]
chococrois has quit [Max SendQ exceeded]
<havenn>
%w[ a e i o u ] **
<JohnTeddy>
havenn: Do you have a ruby docs link on what that is?
bradhe has quit [Remote host closed the connection]
chococrois has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
chococrois has quit [Max SendQ exceeded]
senj has joined #ruby
eroc has joined #ruby
<JohnTeddy>
havenn: How does that help with my multiple consonant in the beginning of a word problem? Or is that just an alternative to the way I have my array variable now?
<havenn>
JohnTeddy: Doesn't help with your problem, sry - just an aside.
chococrois has joined #ruby
mib_mib has quit [Ping timeout: 245 seconds]
chococrois has quit [Max SendQ exceeded]
trey_ has joined #ruby
trey_ has quit [Remote host closed the connection]
Xeago has joined #ruby
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
jrajav has joined #ruby
invisime has quit [Quit: Leaving.]
rouss has joined #ruby
itchyouch has joined #ruby
cardoni has joined #ruby
rouss is now known as Guest30495
chococrois has joined #ruby
cakehero has joined #ruby
chococrois has quit [Max SendQ exceeded]
thinkdevcode has quit [Remote host closed the connection]
neersighted has joined #ruby
v0n has quit [Ping timeout: 244 seconds]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
tchebb_ has joined #ruby
banseljaj is now known as imami|afk
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
theRoUS has quit [Read error: Operation timed out]
robustus has quit [Ping timeout: 255 seconds]
jaygen_ has quit [Remote host closed the connection]
chococrois has joined #ruby
nicoulaj has quit [Remote host closed the connection]
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
atno|SoA is now known as atno
g-ram has quit [Quit: Computer has gone to sleep.]
<seanstickle>
lethjak__: wow, there is all sorts of stuff wrong there.
<JohnTeddy>
Thanks banisterfiend
chococrois has joined #ruby
<lethjak__>
like what?
<seanstickle>
What makes you think that writingCSV[5] has a prepended "0" ?
<lethjak__>
seanstickle: I'm grabbing the first two, it's in the file
<seanstickle>
Provide an example of the file.
<lethjak__>
it exists for everything that isn't double digit
piotr_ has quit [Ping timeout: 248 seconds]
<lethjak__>
I'm using the csv parser
<lethjak__>
01 - CABINET PARTS
arya has joined #ruby
<seanstickle>
Wait, so $product_series has the number in it?
<seanstickle>
How about this … pastie.org your code
<seanstickle>
So we don't have to guess
gyre007 has joined #ruby
Sharcho has quit [Quit: Leaving]
chococrois has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
chococrois has joined #ruby
avelldiroll has joined #ruby
chococrois has quit [Max SendQ exceeded]
bigmac_ has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
<JohnTeddy>
https://gist.github.com/4128264 .. can someone comment on my code. It works.. I'm just learning.. would experienced ruby coders think the way that is written is absurd/bad?
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
bigmac has quit [Ping timeout: 240 seconds]
ffranz has quit [Quit: Leaving]
<lethjak__>
I fixed it, I cast it to a int, added the 0 with "%02d" % and cast it back to a string