yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
etcetera has joined #ruby
senayar has quit [Quit: Quitte]
zzing has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 255 seconds]
adeponte has quit [Ping timeout: 256 seconds]
zzing has joined #ruby
havenwood has quit [Remote host closed the connection]
jimeh has quit [Quit: Computer has gone to sleep.]
therod has joined #ruby
etcetera has quit [Client Quit]
james has joined #ruby
james is now known as Guest96036
gabrielrotbart has quit [Remote host closed the connection]
zzing has quit [Ping timeout: 240 seconds]
zzing has joined #ruby
joofsh has joined #ruby
cableray has joined #ruby
bigkm has joined #ruby
blf has quit [Ping timeout: 245 seconds]
inokenty has quit [Quit: Leaving.]
daniel_- has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Remote host closed the connection]
therod has quit [Ping timeout: 245 seconds]
`brendan has quit [Ping timeout: 244 seconds]
blf has joined #ruby
nfk has quit [Quit: yawn]
banisterfiend has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Guest96036 has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
Hecatic has quit [Quit: HecAtic]
nari has joined #ruby
__BigO__ has quit [Remote host closed the connection]
Takehiro has joined #ruby
havenwood has joined #ruby
sailias has joined #ruby
hbpoison has joined #ruby
zzing has quit [Ping timeout: 264 seconds]
Takehiro has quit [Ping timeout: 252 seconds]
kosai03 has joined #ruby
Akuma has joined #ruby
thufir_ has quit [Quit: Leaving.]
chico_chicote has quit [Remote host closed the connection]
kosai03 has left #ruby [#ruby]
justsee has quit [Quit: Leaving...]
idkazuma has quit [Remote host closed the connection]
SilverKey has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 248 seconds]
`brendan has joined #ruby
kaen has joined #ruby
miskander has joined #ruby
juarlex has quit [Read error: Connection reset by peer]
zzing has joined #ruby
juarlex has joined #ruby
miskander has quit [Client Quit]
hbpoison has joined #ruby
eroc has joined #ruby
bubblehead has joined #ruby
Pizza90 has joined #ruby
zzing has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
<Pizza90>
hi all, i have 0 experience in programming, but i heard that ruby is easy to learn so i'd like to try it, i was wondering what can i do with ruby?can someone give me some pratical stuff i could create with ruby?i dont want to learn ruby and then realize that i have to use another language (thing that i am not going to do) because ruby is not powerful enough (oh and i dont want to provoke).
gabrielrotbart has joined #ruby
Guedes has quit [Ping timeout: 256 seconds]
mockra has quit [Remote host closed the connection]
ferdev is now known as ferdev|away
therod has joined #ruby
LouisRoR has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
pavilionXP has quit [Read error: Connection reset by peer]
therod has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
toekutr` has joined #ruby
toekutr has quit [Ping timeout: 260 seconds]
Kuifje has quit [Ping timeout: 256 seconds]
bubblehead has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
generalissimo has joined #ruby
bubblehead has joined #ruby
andrewhl has quit [Quit: Leaving.]
emocakes has quit [Quit: emocakes]
pandawarrior has quit [Quit: Leaving.]
<vabenjamin>
So Dir.glob only gives you file names, not file path
<vabenjamin>
anyway to get full file path?
Edward_ has joined #ruby
mahmoudimus has joined #ruby
inao has joined #ruby
jrajav has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
backjlack has quit [Remote host closed the connection]
blf has quit [Quit: Page closed]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
vyrus001 has joined #ruby
<vyrus001>
how would i reverse the boolian logic of an if that uses a match clause? (i.e. turn if ~= /value/ into if !~= /value/ ?)
mockra has joined #ruby
<banisterfiend>
vyrus001: !~
zzing has quit [Ping timeout: 252 seconds]
philcrissman has joined #ruby
<vyrus001>
banisterfiend: thnx
<garbagecollectio>
why did he do
<garbagecollectio>
what did he do
<X-Jester>
let me tell you how bad i am at arch
<X-Jester>
i'm on my third try in 2 weeks, and i still can't get grub to find my root partition
<X-Jester>
/wrists
etcetera has joined #ruby
mockra has quit [Ping timeout: 244 seconds]
LouisRoR has quit [Ping timeout: 256 seconds]
Mchl has quit [Ping timeout: 256 seconds]
zzing has joined #ruby
verysoftoiletppr has joined #ruby
mpfundstein_ has joined #ruby
pepee has quit [Quit: goto Quit;]
Mchl has joined #ruby
mpfundstein has quit [Ping timeout: 256 seconds]
Takehiro has joined #ruby
quazimodo has joined #ruby
<dcope>
Is it possible to have ruby alongside of rvm?
<quazimodo>
any difference between Array#collect and Enumerable#collect
<quazimodo>
.
zzing has quit [Ping timeout: 252 seconds]
<julian-delphiki>
quazimodo, considering the rdoc for it says "see also Enumberable#collect" i doubt it
Mchl has quit [Read error: Operation timed out]
<quazimodo>
so i guess the c side is gonna be a bit diff
<quazimodo>
cherrs !
zzing has joined #ruby
vyrus001 has left #ruby [#ruby]
Takehiro has quit [Ping timeout: 252 seconds]
<vabenjamin>
Can someone tell me why my recursive file lister is entering an infinite loop? http://pastebin.com/Ck79NDbN
generali_ has joined #ruby
pepee has joined #ruby
postmodern has joined #ruby
generalissimo has quit [Ping timeout: 248 seconds]
taoru_ has joined #ruby
zzing has quit [Remote host closed the connection]
taoru_ has quit [Remote host closed the connection]
taoru has quit [Read error: No route to host]
taoru has joined #ruby
zzing has joined #ruby
kofno has quit [Remote host closed the connection]
Mchl has joined #ruby
thufir_ has joined #ruby
zzing has quit [Ping timeout: 256 seconds]
cableray has quit [Quit: cableray]
aspro has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
<vabenjamin>
So does every class need a constructor in ruby?
fschuindt has joined #ruby
<vabenjamin>
I cant just have a class of mutators and thats it?
<banisterfiend>
vabenjamin: you dont need to define a constructor
<vabenjamin>
hmm keeps throwing an error otherwise
<vabenjamin>
ill keep at it
maletor has quit [Quit: Computer has gone to sleep.]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
jeremywrowe has joined #ruby
stevechiagozie has joined #ruby
zzing has joined #ruby
PanPan has joined #ruby
casheew has quit [Read error: Connection reset by peer]
idkazuma has joined #ruby
Takehiro has joined #ruby
garbagecollectio has quit [Read error: Connection reset by peer]
mrdtt has joined #ruby
casheew has joined #ruby
zodiak has joined #ruby
mrdtt has quit [Client Quit]
garbagecollectio has joined #ruby
PanPan has quit [Ping timeout: 252 seconds]
Takehiro has quit [Ping timeout: 240 seconds]
icole has joined #ruby
<quazimodo>
why dorsnt slice have a ! itchanges the data structure
yacks has joined #ruby
BRMatt has quit [Ping timeout: 248 seconds]
gatopan has joined #ruby
tylersmith has quit [Quit: tylersmith]
cableray has joined #ruby
slestak has joined #ruby
slestak has left #ruby [#ruby]
krz has joined #ruby
kja has joined #ruby
bricker`LA has quit [Ping timeout: 248 seconds]
mrdtt has joined #ruby
pavilionXP has joined #ruby
etcetera has quit []
mrdtt has quit [Client Quit]
mockra has joined #ruby
apeiros has joined #ruby
PanPan has joined #ruby
zzing has quit [Ping timeout: 248 seconds]
v0n has quit [Quit: WeeChat 0.4.1-dev]
pkrnj has joined #ruby
jarray52 has joined #ruby
philcrissman has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 240 seconds]
zzing has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
bradleyprice has joined #ruby
<jarray52>
I'm getting an error message, "It seems your ruby installation is missing psych (for YAML output)." However, I have installed libyaml and tried reinstalling ruby. Any suggetions?
PanPan has quit [Remote host closed the connection]
zzing has quit [Ping timeout: 244 seconds]
zchrykng has left #ruby [#ruby]
pavilionXP has quit [Ping timeout: 248 seconds]
zzing has joined #ruby
graeme has joined #ruby
falsebr has joined #ruby
Takehiro has joined #ruby
falsebr has quit [Quit: Saindo]
baroquebobcat has quit [Quit: baroquebobcat]
benlieb has joined #ruby
<epochwolf>
vabenjamin: look at File.absolute_path
<puppeh>
what do you use for opening sessions within the same window? tmux or the iTerm2 "split pane functionality"?
JohnBat26 has joined #ruby
Morkel has joined #ruby
Guest6870 has quit [Remote host closed the connection]
thinkclay has quit [Quit: Leaving.]
PanPan has joined #ruby
yshh has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 248 seconds]
yshh has joined #ruby
sexbomb has quit [Remote host closed the connection]
beilabs has joined #ruby
filipe has joined #ruby
stkowski has quit [Quit: stkowski]
megha has joined #ruby
apeiros_ has joined #ruby
nidhimj22 has joined #ruby
nidhimj22 has quit [Client Quit]
PanPan has quit [Ping timeout: 252 seconds]
wmoxam has quit [Ping timeout: 244 seconds]
nomenkun has quit [Remote host closed the connection]
arya_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
aganov has joined #ruby
matchaw_ has joined #ruby
matchaw___ has quit [Ping timeout: 248 seconds]
Morkel_ has joined #ruby
arturaz has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
baroquebobcat has joined #ruby
dr_bob has joined #ruby
yshh_ has joined #ruby
yshh has quit [Read error: Operation timed out]
puppeh has quit [Remote host closed the connection]
puppeh has joined #ruby
<charliesome>
puppeh: split pane
bigkevmcd has joined #ruby
JonnieCache has quit [Ping timeout: 252 seconds]
chrishough has joined #ruby
chrishough has quit [Client Quit]
JonnieCache has joined #ruby
pepee has quit [Quit: goto Quit;]
ahokaomaeha has joined #ruby
puppeh has quit [Remote host closed the connection]
Jagan has joined #ruby
Jagan is now known as Guest98760
<dmonjo>
when we have object.method1.method2.method3 and method1,2,3 are all iterators the flow is go into method1 execute on all elements then move to object2 or go method1 elemente1 method2 element2 method3 element3 than move to the next element and execute all the methods sequentially again
<Guest98760>
hi
<Guest98760>
I am install rails 3, few days before some issues in my system.
agarie has quit [Remote host closed the connection]
<Guest98760>
very slow for processing system, i cant connect wireless network. how to solve this problem?
ToTo has joined #ruby
nfk has joined #ruby
Guest98760 has quit [Quit: Page closed]
jprovazn has joined #ruby
Elhu has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
Elhu has quit [Client Quit]
noxoc has joined #ruby
mahmoudimus has joined #ruby
wallerdev has quit [Quit: wallerdev]
arya_ has joined #ruby
benlieb has quit [Quit: benlieb]
mahmoudimus has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
eldariof has joined #ruby
chendo_ has quit [Ping timeout: 252 seconds]
ToTo has quit [Ping timeout: 245 seconds]
buibex has quit [Remote host closed the connection]
chendo_ has joined #ruby
marr has joined #ruby
buibex has joined #ruby
CraHan is now known as CraHan|out
razibog has joined #ruby
chendo_ has quit [Client Quit]
tjbiddle has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
blacktulip has joined #ruby
apeiros_ has quit [Remote host closed the connection]
whitedawg has quit [Quit: Leaving.]
monkegjinni has joined #ruby
puppeh has joined #ruby
Littlex has joined #ruby
apeiros_ has joined #ruby
hamed_r has joined #ruby
CraHan|out is now known as CraHan
CraHan is now known as CraHan|out
CraHan|out is now known as CraHan
wallerdev has joined #ruby
bricker`LA has joined #ruby
shock_one has quit [Read error: Operation timed out]
Slivka has joined #ruby
buibex has quit [Remote host closed the connection]
mengu_ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
elico has joined #ruby
m8 has joined #ruby
lkba has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
<wf2f>
hey guys i have to think of some work commitments which get reviewed at the end of the year for discussions about pay rise, what do you think would be some good commitments to put down? eg. get proficient at a particular language. software engineer here
zigomir has joined #ruby
mockra has joined #ruby
wallerdev has quit [Quit: wallerdev]
noop has quit [Ping timeout: 256 seconds]
<vabenjamin>
I am developing a data mining library that will incorporate some machine learning algorithms and natural language processing tools. Mainly, ive been programming in java for 6 years and need a project to get myself into ruby, so this is it. Code may look ugly while I navigate the language, but functionality is there. Take a look at https://github.com/vabenjamin/BrilliantRuby if you are interested, I will be maintaining the project for a while
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
hbpoison has joined #ruby
ferdev|away is now known as ferdev
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
_br_ has quit [Excess Flood]
Littlex has left #ruby [#ruby]
dmonjo has quit [Remote host closed the connection]
PanPan has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
CraHan is now known as CraHan|out
alup has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
CraHan|out is now known as CraHan
_br_ has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
jimeh has joined #ruby
PanPan has quit [Ping timeout: 264 seconds]
arya_ has quit [Ping timeout: 248 seconds]
Takehiro has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
noxoc has quit [Quit: noxoc]
storme|away has quit [Quit: Leaving]
mpfundstein has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
stormetrooper has joined #ruby
arya_ has joined #ruby
nomenkun has joined #ruby
jgrevich has quit [Remote host closed the connection]
yacks has joined #ruby
noop has joined #ruby
_md has joined #ruby
ferdev is now known as ferdev|away
workmad3 has joined #ruby
chichou has joined #ruby
Xeago has joined #ruby
obs has joined #ruby
mpfundstein has quit [Remote host closed the connection]
ferdev|away is now known as ferdev
mpfundstein has joined #ruby
Raydiation has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
vabenjamin has left #ruby [#ruby]
francisfish has joined #ruby
atno has joined #ruby
nari has quit [Ping timeout: 245 seconds]
nomenkun has joined #ruby
SilverKey has quit [Quit: Cheerio.]
inao has quit [Quit: Leaving...]
yacks has quit [Read error: Connection reset by peer]
agarie has joined #ruby
inao has joined #ruby
pseudonymous has joined #ruby
Raydiation has left #ruby [#ruby]
<pseudonymous>
I'm trying to match multiple lines starting from some line until the next occurrence that would match. Essentially the txt file has a bunch of blocks where certain lines start like "item \d+ key ".. Any tips ? I've been trying over and over using rubular.com but apparently I have no idea how to do this
hackeron has quit [Remote host closed the connection]
sayan has joined #ruby
mpfundstein has quit [Remote host closed the connection]
skogis has quit [Ping timeout: 240 seconds]
inao has quit [Client Quit]
hackeron has joined #ruby
mpfundstein has joined #ruby
haxrbyte has joined #ruby
skogis has joined #ruby
niklasb has joined #ruby
Hanmac has joined #ruby
mpfundstein has quit [Client Quit]
mpfundstein has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
ephemerian has joined #ruby
<Hanmac>
when OpenSource Software easier to install is, than clickibunti closed software, than something is very wrong :P
Es0teric has quit [Quit: Computer has gone to sleep.]
haxrbyte_ has joined #ruby
xpen has joined #ruby
Hecatic has quit [Read error: Connection reset by peer]
Hecatic has joined #ruby
s3m73x has joined #ruby
Hecatic has quit [Client Quit]
ozgura has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 256 seconds]
yacks has joined #ruby
noxoc has joined #ruby
Vainoharhainen has joined #ruby
ferdev has quit [Quit: Leaving...]
charliesome has quit [Read error: Operation timed out]
charliesome has joined #ruby
cha1tanya has joined #ruby
eka has joined #ruby
chussenot has joined #ruby
spider-mario has joined #ruby
niklasb has quit [Ping timeout: 256 seconds]
<pseudonymous>
Hanmac: generally, speaking open source is quite easy to install - unless you run Windows, in which case it's your own fault :)
mpfundstein has quit [Remote host closed the connection]
khismetix has joined #ruby
vikhyat has quit [Remote host closed the connection]
frey has quit [Quit: Leaving]
agarie has quit [Remote host closed the connection]
vikhyat has joined #ruby
<Hanmac>
pseudonymous i need to install the license server for PHPStrom in my firma .. because of some "FanBoy" ... the problem: there is NO documentation ... nothing that helps to install the server ... i am currently working > 2h and it still says eigher key in config is missing or key in config has wrong value, but there is NO documentation that says what IS the right value ... for something where you need to pay for i would suspect better w
adambeynon has joined #ruby
buscon has joined #ruby
matthewrobbins has joined #ruby
matthewrobbins has quit [Client Quit]
therod has joined #ruby
mockra has joined #ruby
<Hanmac>
PS: its from the same makers than RubyMine ... you could think how good its builded
<pseudonymous>
Well, I like their IDE's, the 54% price hike for EU customers, not so much. And yea, considering the money you're throwing at them, it should be a bit easier to install it. Why don't you call it a break and send them a mail ? I'm sure they'll respond
arya has joined #ruby
timmow has joined #ruby
Elhu has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
segv- has joined #ruby
XtremeWiz has joined #ruby
Edward_ has quit [Ping timeout: 252 seconds]
<Hanmac>
hm i could try it later ... but its still shitty
icole has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 260 seconds]
erdos has joined #ruby
icole has joined #ruby
SteveO_ has joined #ruby
<SteveO_>
?
Asher has quit [Quit: Leaving.]
<SteveO_>
anyone.up?
SteveO_ has quit [Client Quit]
backjlack has joined #ruby
vikhyat has quit [Ping timeout: 248 seconds]
<Hanmac>
Steve0_ what is your problem?
<Xeago>
he left already
arturaz has quit [Remote host closed the connection]
vikhyat has joined #ruby
apoch632 has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
ferdev has joined #ruby
ozgura has joined #ruby
nomenkun has joined #ruby
Asher has joined #ruby
buibex has joined #ruby
<pseudonymous>
http://pastebin.com/SySkSD5Q Anyone have the faintest of clues where to begin ? I basically want to parse this file and extract each "item \d+ key" line and the following lines which are indented further
<pseudonymous>
per match, that is..
<Hanmac>
uh bad that i does not see this webclient
workmad3 has quit [Ping timeout: 255 seconds]
arya has quit [Ping timeout: 256 seconds]
abdulqabiz has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
abdulqabiz has joined #ruby
haxrbyte has joined #ruby
arya has joined #ruby
brianpWins has quit [Quit: brianpWins]
nari has joined #ruby
slainer68 has joined #ruby
vikhyat has quit [Remote host closed the connection]
haxrbyte_ has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
yshh_ has quit [Remote host closed the connection]
yshh has joined #ruby
lkba has quit [Read error: Connection reset by peer]
yshh has quit [Remote host closed the connection]
buibex has quit [Remote host closed the connection]
m3pow has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
m3pow has joined #ruby
Mchl has joined #ruby
samphippen has joined #ruby
yacks has quit [Read error: Operation timed out]
verysoftoiletppr has quit []
Edward_ has joined #ruby
buibex has joined #ruby
dankest has joined #ruby
seich- has quit [Ping timeout: 276 seconds]
gosshedd has joined #ruby
daniel_- has joined #ruby
mercwith1mouth has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
skattyadz has joined #ruby
icole has joined #ruby
pskosinski has joined #ruby
erdos has quit []
Asher has quit [Quit: Leaving.]
segv- has quit [Ping timeout: 264 seconds]
PanPan has joined #ruby
yacks has joined #ruby
<pseudonymous>
Ok, general cry of annoyance here. Is there any good resources on multi-line regex matches ? I'm stumbling around and this is getting to be really *censored* annoying
segv- has joined #ruby
m3pow has quit [Remote host closed the connection]
m3pow has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
dankest has quit [Quit: Leaving...]
Matip has joined #ruby
Xeago has quit [Remote host closed the connection]
arya has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
m3pow has quit [Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201185534]]
m3pow has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
zz_chrismcg is now known as chrismcg
Mattix has quit [Ping timeout: 244 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
toekutr has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
arya has joined #ruby
wargasm1 has quit [Ping timeout: 252 seconds]
jarray52 has quit [Quit: Leaving.]
haxrbyte has quit [Ping timeout: 255 seconds]
timonv has joined #ruby
mockra has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
timonv_ has quit [Ping timeout: 255 seconds]
backjlack has quit [Remote host closed the connection]
mityaz has joined #ruby
seich- has joined #ruby
hamed_r has quit [Quit: Leaving]
vikhyat has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
emocakes has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
Zelest has quit [Ping timeout: 264 seconds]
samphippen has joined #ruby
areeeee has joined #ruby
<areeeee>
with ror how can i make a variable in the view?
<banisterfiend>
areeeee: first, type /part #ruby
<banisterfiend>
areeeee: and then /j #rubyonrails
<XtremeWiz>
type /join instead. :p
<pskosinski>
instead: No such channel
Zelest has joined #ruby
<XtremeWiz>
pskosinski: type "/join" instead
<pskosinski>
I know, kidding. ;)
<XtremeWiz>
never mind, /j works on webchat. :P
mpfundstein_ has joined #ruby
tommyvyo has joined #ruby
khismetix has joined #ruby
mpfundstein_ has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 276 seconds]
areeeee has quit [Quit: Page closed]
dankest has joined #ruby
perun_ has quit [Ping timeout: 272 seconds]
angusiguess has joined #ruby
ahokaomaeha has quit [Ping timeout: 252 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
RailWolf has quit [Ping timeout: 248 seconds]
taoru has quit [Remote host closed the connection]
Vainoharhainen has quit [Ping timeout: 240 seconds]
pandawarrior has joined #ruby
mockra has joined #ruby
zoonfafer has joined #ruby
_JamieD_ has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
<apeiros_>
Flex: it'd help if you had example data. also you don't want puts. use e.g. p
<Xeago>
apeiros_: remind of the difference between the two, please
<apeiros_>
Xeago: puts uses to_s, p uses inspect
* Xeago
is done with my internship documentation btw
<apeiros_>
and to_s for any non-scalar is not a good idea
<apeiros_>
cool :)
<Xeago>
hmm, indeed
<Xeago>
yea, went to bed at 7'ish this morning till 8:30
<apeiros_>
at least in 1.9 they "fixed" Array#to_s so it's more obvious you're doing something wrong
<Xeago>
and finished abut an hour ago
<apeiros_>
seems they fixed Hash#to_s too. good.
dr_bob has joined #ruby
<apeiros_>
Flex: btw., you can just do `json = Zlib::GzipReader.open(filename) { |gz| JSON.parse(gz.read) } `
mockra has quit [Ping timeout: 260 seconds]
<apeiros_>
that hash assignment as it is now is pointless (it gets reassigned anyway). so at least json=nil, so you don't waste time & space for an unnecessary object
vlad_starkov has joined #ruby
arturas_ has joined #ruby
wf2f has quit []
xpen has quit [Remote host closed the connection]
gommo has joined #ruby
Flex has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 255 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
* apeiros_
loves people who ask a question, then don't reply to follow ups, and leave without a word in the end…
Konboi has quit [Remote host closed the connection]
Patteh has quit [Changing host]
Patteh has joined #ruby
<apeiros_>
I *really* need that bot. should add an automatic warning system about such people.
aaronmcadam has joined #ruby
Takehiro has joined #ruby
samphippen has joined #ruby
jpfuentes2 has joined #ruby
Flex has joined #ruby
<Flex>
thx apeiros_
<Flex>
have made the change
<Flex>
its still only returning FixedNums and not Strings from the json, any ideas?
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
XtremeWiz has left #ruby [#ruby]
<apeiros_>
as said, show examples.
<apeiros_>
shooting in the blue is an exercise in futility
aqabiz has joined #ruby
Bry8Star has joined #ruby
buibex has quit [Remote host closed the connection]
khismetix has quit [Quit: Computer has gone to sleep.]
abdulqabiz has quit [Ping timeout: 248 seconds]
gommo has quit [Read error: Connection reset by peer]
aqabiz is now known as abdulqabiz
daniel_- has joined #ruby
gommo has joined #ruby
angusiguess has joined #ruby
skum is now known as Vainoharhainen
Vainoharhainen has quit [Changing host]
Vainoharhainen has joined #ruby
Edward_ has quit [Ping timeout: 252 seconds]
arya has quit [Read error: Connection reset by peer]
s1n4 has joined #ruby
arya has joined #ruby
krz has quit [Quit: krz]
elaptics`away is now known as elaptics
Xeago has quit [Remote host closed the connection]
sandGorgon has quit [Ping timeout: 256 seconds]
pseudonymous_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
pseudonymous has quit [Ping timeout: 256 seconds]
kionzenc has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
vlad_starkov has joined #ruby
carloslopes has joined #ruby
s1n4 has quit [Quit: leaving]
AlSquire has joined #ruby
chrismcg has left #ruby [#ruby]
divout has quit [Remote host closed the connection]
pseudonymous__ has joined #ruby
pseudonymous_ has quit [Ping timeout: 248 seconds]
Banistergalaxy has joined #ruby
Guest is now known as calmyournerves
gommo has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
gommo has joined #ruby
browndawg has quit [Quit: Leaving.]
gommo has quit [Remote host closed the connection]
ThePicard has quit [Ping timeout: 252 seconds]
Virunga has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
sandGorgon has joined #ruby
khimera has joined #ruby
angusiguess has quit [Ping timeout: 255 seconds]
beiter has quit [Quit: beiter]
_JamieD_ has quit [Quit: _JamieD_]
walterheck has quit [Quit: http://olindata.com - Open Source Training and Consulting]
atyz has joined #ruby
_JamieD_ has joined #ruby
daniel_-_ has joined #ruby
daniel_-_ has quit [Client Quit]
Virunga has joined #ruby
rmartin has joined #ruby
apoch632 has quit [Quit: Leaving.]
<shevy>
anyone uses Readline a lot?
<shevy>
for some reason, I always seem to forget how to use it easily, when it comes to tab-completion
daniel_- has quit [Ping timeout: 255 seconds]
nkr has joined #ruby
adkron has joined #ruby
adkron_ has joined #ruby
Udom0 has joined #ruby
`p has quit [Remote host closed the connection]
arya has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
arya has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby
Mon_Ouie has joined #ruby
uzzer has joined #ruby
hbpoison has joined #ruby
<Qwak>
shevy : sure, when i need to read some .txt file
`p has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
<uzzer>
hello, don't you know is it possible to use Net::HTTP.start without making all the stuff in { } ?
<uzzer>
I am trying to manipulate with HTTP session in different parts of test code and cannot get the idea why session is so limited to one code block in ruby
<shevy>
Qwak yeah, this is easy, File.readlines(), but I actually meant the Readline module, require 'readline', then: user_input = Readline.readline()
<shevy>
for tab completion, one has to use a proc. I can not easily use that thing :(
<shevy>
only ncurses is worse, must be superhuman people understanding that API
himsin has joined #ruby
hybris has joined #ruby
<shevy>
tom221 have you tried .call on your proc?
<shevy>
tom221 also it seems you did not pass in a block at all in the last example, either try instrument { myProc.call }, or use the & thing to turn things around... def instrument(&i)
mpfundstein_ has quit [Remote host closed the connection]
My_Hearing has joined #ruby
uzzer has left #ruby [#ruby]
<samuelj>
Hey - does anyone have any experience with fnordmetric? I'm having a bit of trouble getting started.
samphippen has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 245 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
<tom221>
I can only conclude that blocks and procs aren't interchangable, which results in code like in line 14, which is verbose.
justsee has quit [Quit: Leaving...]
Virunga has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 256 seconds]
skattyadz has quit [Quit: skattyadz]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<shevy>
tom221, yeah I dont think they are equivalent
angusiguess has joined #ruby
<shevy>
you can use a block only once, but you can reuse a proc
<csmrfx>
proc = block bound to an identifier...
vikhyat has quit [Remote host closed the connection]
m3pow has quit [Read error: Connection reset by peer]
<csmrfx>
#block to proc
<csmrfx>
blk = { ... }; &blk.call
PanPan has quit [Remote host closed the connection]
chichou has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
sandGorgon has quit [Ping timeout: 260 seconds]
mark_locklear has joined #ruby
noop_ has joined #ruby
robustus has joined #ruby
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
Lubinski has joined #ruby
Virunga has joined #ruby
vikhyat has joined #ruby
arya has joined #ruby
khismetix has joined #ruby
<Matip>
why is there a Socket class with some methods to work with UDP but the UDPSocket class is so basic?
<Matip>
are we supposed to use Socket instead of UDPSocket?
Lubinski has left #ruby [#ruby]
spider-mario has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 248 seconds]
Virunga has quit [Ping timeout: 240 seconds]
kionzenc has quit [Quit: Leaving...]
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
haxrbyte has joined #ruby
rado has joined #ruby
blaxter has quit [Quit: foo]
uuuuuuuuu has joined #ruby
uuuuuuuuu is now known as Aguy
arya_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Aguy>
Anyone here very good at sockets and proxies i in ruby
Virunga has joined #ruby
arya has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
forced_request has joined #ruby
ejnahc has quit [Ping timeout: 252 seconds]
<dawkirst>
hi there, I'm trying to understand something fundamental: if I am in a dir called baz, with dirs foo and bar, and I go irb -r foo/bar, bar.rb should be required, right?
ffranz has joined #ruby
ejnahc has joined #ruby
<apeiros_>
no
<apeiros_>
the working directory is not part of $LOAD_PATH
<apeiros_>
irb -I. -rfoo/bar
<Matip>
Aguy, I asked something about UDP sockets 2 minutes ago. what're you doing?
<apeiros_>
@ dawkirst
<Aguy>
I am making a proxy
<Aguy>
But I need help with irc support
<Matip>
what for? I was doing a proxy too lol
angusiguess has quit [Ping timeout: 248 seconds]
chussenot has quit [Quit: chussenot]
<Aguy>
Do you know i2p and tor?
<Matip>
I know tor
<Aguy>
Im making a p2p proxy with a custom naming system
<Matip>
over TCP?
<dawkirst>
apeiros_, still doesn't seem to work, and I have a feeling it has something to do with rvm
sayan has quit [Read error: Connection reset by peer]
<Aguy>
Yes
<apeiros_>
dawkirst: "doesn't seem to work" is a useless problem description
<Matip>
ok
<dawkirst>
apeiros_, my bad, hang on
subbyyy has joined #ruby
bubblehead has joined #ruby
<Aguy>
I can't seem to get this code to work: http://pastebin.com/LxCWs0y8 it's supposed to do this: ircclient->proxy->ircserver->proxy->ircclient
<Aguy>
Its supposed to take everything from the irc client, send it to the server and back
monkegjinni has quit [Remote host closed the connection]
<dawkirst>
apeiros_, I first stumbled across the issue while using pry. Guys in #pry are talking about it now. Didn't know about 'binding.pry' though, that is awesome.
nari has quit [Ping timeout: 248 seconds]
_bart has joined #ruby
<Matip>
check the example there, it's pretty useful ^
<dawkirst>
apeiros_, so just to clarify, same issue with both irb and pry. So I'm thinking it's maybe a rvm issue?
<dawkirst>
apeiros_, output in comments of that gist
<Aguy>
Can someone edit the code, Im really clueless
<Matip>
check the example in the link I pasted
Xeago has joined #ruby
<Aguy>
okay
<dawkirst>
apeiros_, rvm info and gem env point to the same dir though
<Matip>
hoelzro, do you happen to know how to read any amount of bytes from a UDP socket? I haven't found any way to do so other than .recv, which requires a limit
<Aguy>
I've read all that before.
<hoelzro>
Matip: reading "any amount of bytes" isn't really how UDP works
<samuelj>
Can anyone spare a few minutes to help me out with fnordmetric?
<apeiros_>
dawkirst: it might even be that require won't work without a suffix, not sure (load would work, but that's not exposed via flags, you'd have to do it within the irb session)
<hoelzro>
Aguy: sounds like you should fix it
<Matip>
I'm using UDPSocket, but I'm not sure if we're suppose to use it directly
<Matip>
because it only has a couple of methods
<Aguy>
I have tried but it will not work. Im on linux
<Matip>
I found some examples on the Internet that uses Socket instead
khismetix has joined #ruby
<hoelzro>
Matip: what about Socket#recvfrom?
<dawkirst>
apeiros_, both alternative yield the same error (whether I omit the suffix or not)
<Matip>
hoelzro|away, I found it! just in case you need it someday... in UDPSocket you have .recvmsg which doesn't require a limit <del>and is not documented, it seems</del>
banisterfiend has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<tobiasvl>
the IRC protocol...
samphippen has quit [Quit: Computer has gone to sleep.]
athst_ has joined #ruby
<Aguy>
Oh yes
<Flex>
but have a problem that the data being written to the csv is being over written within the loop, so I only end up with a header one row of data, how can I not over write the data and not show the headers each time?
cupakromer has joined #ruby
grizlo42 has joined #ruby
<Aguy>
THe code should be doing exactly that though. It should be taking all the packets from the irc and sending them to the server
filipe has quit [Remote host closed the connection]
grizlo42 has quit [Client Quit]
banisterfiend has joined #ruby
spyderman4g63 has joined #ruby
chussenot has joined #ruby
<Matip>
the problem is that for a connection to a IRC server to be open, you have to follow its rules
<Matip>
which requires, for example, that you pong back when it pings you
<Matip>
and I don't see that code in the gist you pasted
arya_ has quit [Ping timeout: 248 seconds]
<Aguy>
It should just be forwarding all the packest
<Aguy>
packets*
filipe has joined #ruby
<maetthew>
I have a Ruby app with a YML configuration files. Anyone got ideas on how I can make it load either "development" or "production"? I've tried to google but can only come up with Rails answers which I don't use
athst has quit [Ping timeout: 240 seconds]
athst_ is now known as athst
buibex has quit [Remote host closed the connection]
`p has joined #ruby
_nitti has joined #ruby
elico has quit [Ping timeout: 256 seconds]
<Matip>
and btw, socks.puts whois <-- what is whois? what does it have?
<filipe>
maetthew: are you using any particular framework, or are you just loading some yml files yourself?
<maetthew>
filipe: just loading them myself
erlingur has joined #ruby
<Aguy>
whois equals the url request like "CONNECT irc.freenode.net HTTP /1.0"
<filipe>
In that case the choice is all yours, you have a few different options depending on the complexity of your app and what you want to do with it
<Hanmac>
maetthew you leave the file descriptor open ...
jerius has joined #ruby
maz-dev_ has joined #ruby
erlingur has left #ruby [#ruby]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
elico has joined #ruby
<filipe>
easiest way is probably reading an "environment" key from ENV, that acts a switch, either loading different suffixed files (i.e: config_dev.yml, config_prod.yml)
maz-dev has quit [Ping timeout: 245 seconds]
<filipe>
or reading different keys in the yml file, which is OK if you don't need a lot of different configuration parameters
hotovson has joined #ruby
<Hanmac>
rking someday you should make issue tickets for my github projects too :P
<Aguy>
Matip: whois is the request sent from the ircclient: "CONNECT irc.freenode.net HTTP /1.0" http://pastebin.com/5ajBuP7B
_JamieD_ has quit [Quit: _JamieD_]
subbyyy has quit [Ping timeout: 244 seconds]
ferdev|away is now known as ferdev
<rking>
Hanmac: You ever use 'ghi'? It's just convenient enough that adding Issues is almost fun. ☺
ffranz has quit [Quit: Leaving]
<maetthew>
thanks felipe, think I will load different suffixed files
<Hanmac>
rking, no i didnt hear about it, have you seen my repositories on github?
PanPan has joined #ruby
<rking>
Hanmac: Hrm. I have in the past, yep.
miskander has quit [Quit: miskander]
elico has quit [Ping timeout: 252 seconds]
MattTelnet has joined #ruby
<Hanmac>
you should look again, they are respawning into activity again
elico has joined #ruby
pavilionXP has joined #ruby
<MattTelnet>
Hello there!
punkrawkR has quit [Read error: Connection reset by peer]
<Aguy>
Thats what the irc client sends the the proxy
<Aguy>
to the*
<Matip>
socks = TCPSocket.open(irchost, ircport)
<Matip>
socks.puts whois
<Matip>
you can't send it to the server
m3pow has joined #ruby
<rking>
Hanmac: You should make a convenient script using libarchive-ruby
monkegjinni has joined #ruby
<Aguy>
Okay, but still it doesnt work
<Matip>
not in that way at least
marcgg has joined #ruby
<Hanmac>
rking what is an "convenient script" ?
<Aguy>
all I need to to is take the clients package and send them to the server
<Aguy>
packets*
<horofox>
I want to initialize something as soon as something inside of a module is initialized, like: Module::Class.new initializes a constant X because of Module.
<rking>
Hanmac: The things it needs are: 0) Extracts every type of archive. 1) Guard against impolite archives. 2) The ability to delete the archive after extracting. 3) A way to 'cd' into that dir after extracting.
inokenty has left #ruby [#ruby]
<rking>
I have an edit to zu sitting around that I haven't finished that does those things, but it should probably be libarchive-backed rather than use system() so much.
miskander has joined #ruby
inokenty has joined #ruby
<Aguy>
Matip:
<Aguy>
Im getting this
<Aguy>
* Looking up irc.cmpct.info
<Aguy>
* Looking up 127.0.0.1
<Aguy>
* Connecting to 127.0.0.1 (127.0.0.1:4545)
<Aguy>
:cessna.i.r.cx NOTICE * :*** Looking up your hostname...
pseudonymous__ has quit [Read error: Connection reset by peer]
atno has quit [Read error: Connection reset by peer]
<Hanmac>
rking one of the interesting facts my gem can do: it can iterate through the entries of a archive an yields the internal FileStats and the context of the files inside the archive
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
miskander has quit [Quit: miskander]
<Aguy>
Matip: I beleive line 4 should bt TCPServer
<Aguy>
not Socket
wchun has quit [Ping timeout: 246 seconds]
<Aguy>
irc.rb:13:in `gets': Transport endpoint is not connected (Errno::ENOTCONN)
mrhobbles_ has joined #ruby
pavilionXP has joined #ruby
mrhobbles_ has quit [Client Quit]
mrhobbles_ has joined #ruby
mrhobbles_ has quit [Client Quit]
breakingthings has joined #ruby
<Matip>
it works fine for me
andredieb has quit [Ping timeout: 246 seconds]
<Aguy>
DO you connect to it from your irc client
<Matip>
and line 4 is blank :P
cctv43 has joined #ruby
<Aguy>
Line 6
xemu has joined #ruby
MissionCritical has quit [Ping timeout: 246 seconds]
<Aguy>
Matip: Did you connect to it via irc client
pepee has joined #ruby
<Matip>
no, but I read the output using netcat
<Takehiro>
hey anyone knows what `def save!(*)` that * means...?
dhruvasagar has quit [Ping timeout: 260 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
andredieb has joined #ruby
andredieb has quit [Changing host]
andredieb has joined #ruby
<Aguy>
Im trying to connect from a irc client
jeremywrowe has joined #ruby
<Aguy>
Im getting this:
<Aguy>
* Looking up irc.freenode.net
<Aguy>
* Looking up 127.0.0.1
<Aguy>
* Connecting to 127.0.0.1 (127.0.0.1:4545)
<Aguy>
nil
<Aguy>
Proxy traversal failed.
mattbl has joined #ruby
srchelp has joined #ruby
Mattix has joined #ruby
<srchelp>
hello there, I am searching for some way to avoid waiting for response from server while server executes long running operations
<srchelp>
I use sinatra library for handling requests and responses
Mattix has quit [Client Quit]
mattbl has quit [Client Quit]
Hanmac has joined #ruby
Mattix has joined #ruby
<srchelp>
scenario is following
<Mattix>
Ok, here I am.... through an IRC proxy
_nitti has quit [Ping timeout: 260 seconds]
Mattix is now known as Guest36847
<Aguy>
:O
<Aguy>
Le codes?
jgarvey has joined #ruby
pavilionXP has quit [Ping timeout: 260 seconds]
Guest36847 is now known as thisismyproxy
<srchelp>
client sends request to server, server starts some script, this script creates a file and when file is created it should be published to user
<Hanmac>
but beware! hashes with default_proc are NOT dumpable
pavilionXP has quit [Read error: Operation timed out]
<apeiros_>
e.g. h = Hash.new { |hash, key| hash[key] = [] }; h[:x] << 1
nomenkun has quit [Remote host closed the connection]
Guest39138 is now known as EvanR
EvanR has quit [Changing host]
EvanR has joined #ruby
<apeiros_>
Hanmac: I know. I often have the situation where I want a default_proc while building the hash and strip it after
<pepee>
an error: ERROR: Could not find a valid gem 'rdiscount' (>= 0) in any repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::EMFILE: Too many open files - socket(2) (http://rubygems.org/latest_specs.4.8.gz)
<apeiros_>
and now I can
<pepee>
*an error I get everytime I try to install gems
<apeiros_>
in 1.8 I had to use `hash = {}.replace(hash)` to strip the default proc
pskosinski has joined #ruby
hybris has quit [Read error: Connection reset by peer]
<Hanmac>
pepee it seesm that windows has problems with ruby gem ... its a +1 for Linux
<ctp>
howdy. another regex question :) i just wanna remove the surroounding brackets in a string if they exist. str.gsub!(/^\(|\)$/"")) is my way now but its ugly. any other ways to express that?
<shevy>
regexes are always ugly
Flex has quit [Read error: Connection reset by peer]
<peb7268>
Another question, with Laravel and all the new PHP stuff out there, Namespaces, composer ect.. Would it really be a huge benefit to learn ruby and rails?
<ctp>
i just wanna cut the first "(" and the last ")" in a string :(
<kraljev3>
not rails, rails suck
<kraljev3>
but ruby, go for it
<srchelp>
hi guys,
<srchelp>
what is a difference between instance method and new ?
<kraljev3>
ctp, use combination of two chomps and reverse
<ctp>
kraljev3: doesnt work, if there's a whitespace after the )
<ctp>
"(foo bar) ".chomp!(')') -> nil
<_br_>
peb7268: Asking this question is like asking if someone likes oranges or apples better.
<kraljev3>
'(foo bar)'.strip[1..-1]
Cooler_ has joined #ruby
chussenot has joined #ruby
<peb7268>
ya I realize that _br_
jerikl has joined #ruby
atal421 has joined #ruby
<srchelp>
how can I initialize Singleton object?
<peb7268>
I heard there are a lot of ex PHP ppl that are ruby converts too and I was looking for what they think its advantages are
xavii has joined #ruby
<kraljev3>
just cleaner syntax
<kraljev3>
more consistent function names
<kraljev3>
chaining, etc
<kraljev3>
otherwise, not much
mafolz has quit [Remote host closed the connection]
<kraljev3>
it is nonsense to argue about the tools, in the meantime you'd have the project already finished
teod has quit [Quit: Leaving]
<kraljev3>
I am a 6 year PHP user
axrfnu has joined #ruby
<kraljev3>
and I find that after one year of ruby, i am less productive
carloslopes has joined #ruby
xavii has quit [Client Quit]
<rking>
kraljev3: Using Rails?
<kraljev3>
using rack
ckrailo has joined #ruby
<axrfnu>
hey all. ruby newbie here. is there something similar to the help() function of python in irb? that is, a function that shows all methods a class implements?
<kraljev3>
ctp, does this work for you: '(foo bar)'.strip[1...-1]
<rking>
axrfnu: Then run 'pry' instead of 'irb' (in every case), and then you can do like: ls SomeClass
<_br_>
peb7268: Having learned many languages, Ruby stuck with me because its more natural to think in that PHP. PHP is very undisciplined in certain things (such as e.g. naming as pointed out). That said I strong think that the choice should no be based on what is cooler at the moment but rather what makes you more productive and is more maintainable in the long run. Here again speaking from experience, PHP doesn't fare well.
<ctp>
kraljev3: seems so, but what does it exactely?
<_br_>
axrfnu: All classes have a #methods function which lists all the possible methods it supports. There is a more nicer REPL which is called PRY which you should check out.
<kraljev3>
strip removes outer whitespace
`p has quit [Remote host closed the connection]
<peb7268>
hmm good information guys
sepp2k1 has joined #ruby
<rking>
ctp: Your line above, "(foo bar)".gsub(/\((.+)\)/, '\1'), works fine.
<kraljev3>
the [1...-1] takes everything from 2nd to second-last char
sepp2k has quit [Ping timeout: 264 seconds]
<peb7268>
I did see there are great tools like watcher and rspec that seem to make tasks like TDD very quick to get started with. Capybara is awesome too
zerba has quit [Remote host closed the connection]
<kraljev3>
but guess in this example regex would be more appropriate
<srchelp>
axrfnu: you may try: SomeClass.instance_methods - SomeClass.methods
alx- has joined #ruby
hmarr has joined #ruby
<hoelzro>
there's always something like '(foo bar)'.gsub(/^[(]|[)]$/, '')
<rking>
srchelp: Do you know why pry outputs for ls SomeClass
<peb7268>
I'm the lead guy on the team and trying to find the best tools for the job to get work done.
<rking>
hoelzro: Hehe
<hoelzro>
better than chomp + reverse, imo ;)
<srchelp>
rking: just a feature of interpreter
<rking>
hoelzro: Almost anything in the world would be.
icole has quit [Remote host closed the connection]
<peb7268>
We have some preexisting assets in ruby and core products. Im trying to figure out if its worth the time to learn instead of the more advanced php concepts or if my time would be better spent elsewhere. I know ruby is growing quick.
<peb7268>
Thanks for the input and advice guys.
veleno has quit [Quit: veleno]
<rking>
peb7268: PHP is totally goofy.
<_br_>
peb7268: Well forcing a PHP team to go ruby is certainly not a good idea and wise versa.
<kraljev3>
it is incosistant with function naming, param ordering
<rking>
Did he mean "we have some preexisting assets in PHP" ?
bradleyprice has joined #ruby
<peb7268>
no
<kraljev3>
but if you are used to that, then there is no production penalty
<peb7268>
The previous lead at my company wrote the main products in ruby and a few in php
<srchelp>
The ls command is essentially a unified wrapper to a number of Ruby's introspection mechanisms, including (but not limited to) the following methods: methods, instance_variables, constants, local_variables, instance_methods, class_variables and all the various permutations thereof <=== https://github.com/pry/pry/wiki/State-navigation
<_br_>
rking: Well, given people who actually understand PHP and who use only a sane subset of what is possible I think you can build fine stuff with it. Unfortuantely in the hands of inexperienced dev's php can bite you in the ...
<kraljev3>
that handles your special case ' ( foo bar ) '
<rking>
str.sub! /^\s*\(\s*(.+)\s*\)\s*$/, '\1'
<kraljev3>
yours is more performat i guess, but mine is clearer, i'd say
<_br_>
rking: That being said I am really scared of how the core php team handes issues. Just recently there was a arithmetic/string bug the guys stubmed accross. Crazy stuff.
hmarr has quit [Ping timeout: 252 seconds]
<kraljev3>
now to the subject of PHP, PHP has gained bad reputation because there are many incopentent coders, who started with PHP
<_br_>
The introduction of goto parameter in 5.4.3 wasn't really helping either to clean up the mess.
<kraljev3>
yes, and many bugs are closed with "this is not a bug"
<kraljev3>
even though it is clear that the behaviour is not elegant or correct
<peb7268>
I agree with everything you guys said
<peb7268>
Thats good stuff.
Guest41988 has quit [Quit: Computer has gone to sleep.]
<peb7268>
I guess it would benefit me to learn both.
<_br_>
kraljev3: It just grew to quickly, instead of leaving stuff out and being strict these guys just globbed things on it and kept moving. But for an early web language that is fine, languages should die anyway at some point.
<kraljev3>
guess they want to maintain backward compatibility too badly
<kraljev3>
they should go on a clearing spree
<peb7268>
I do hear that learning ruby and rails also helps with the getting in the whole OOP expressive mindset way of doing things
<_br_>
The biggest issue I have with the php guys is that rasmus (the guy who invented the thing) is really a ******* when it comes to bugs and bug reports.
<_br_>
you bet, they should do something like the python guys with python3
<kraljev3>
i agree, br, totally
hmarr has joined #ruby
<peb7268>
the whole language that I've seen up to this point seems very natural and expressive indeed. The biggest issue I have at the moment is the radical shift in dealing with certain things in 1.8 and 1.9
Nisstyre-laptop has joined #ruby
<_br_>
peb7268: abandon 1.8. Seriously.
<peb7268>
having done some c and fair amount of JS before I really appreciate the cleanness and the usefulness I'm seeing in ruby
<peb7268>
I am. I don't use it. I use 1.9.3 in RVM
<kraljev3>
peb, that is ok, i guess, leave legacy scripts to 1.8, make new apps with 1.9
<_br_>
Newest 2.0 rc shows also some very nice speed improvements
<peb7268>
well.. I say use loosely. Im learning it.
beiter has quit [Quit: beiter]
<kraljev3>
when is 2.0 going to be out?
<_br_>
kraljev3: Well they are in feature freeze since quite some time now
paolooo has joined #ruby
Nisstyre-laptop has quit [Read error: Connection reset by peer]
gosshedd has quit [Read error: Operation timed out]
<kraljev3>
i am waiting for new initializers
<kraljev3>
def func(@inst_var)
Nisstyre-laptop has joined #ruby
HardFu has joined #ruby
<HardFu>
what's the ruby way to always round number up to 10
<HardFu>
so 123 => 130
<kraljev3>
10.round
<HardFu>
13 => 20
<HardFu>
aha
chussenot has quit [Quit: chussenot]
mlr has joined #ruby
<kraljev3>
no, wait
<kraljev3>
(123/10).round*10
the_mentat has quit [Quit: Computer has gone to sleep.]
<kraljev3>
123.round(-1)
<kraljev3>
even better i guess
<banisterfiend>
kraljev3: 2.0 is coming out next week
<HardFu>
nop
<HardFu>
123.round(-1) makes 120
<HardFu>
I need 123 => 130
<kraljev3>
so, always rounding up
<kraljev3>
?
<HardFu>
yes
<HardFu>
let's say I have an array of numbers
<kraljev3>
(123/10).ceil*10
statix_ has quit [Ping timeout: 276 seconds]
<HardFu>
[15.0, 25.0, 29.0, 75.0]
<kraljev3>
combine that with .map!
<HardFu>
I need median, rounded up to 10
<HardFu>
so the sum is 144, and median is 36
<HardFu>
I need 40 :)
mahmoudimus has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
CraHan is now known as CraHan|out
<kraljev3>
ruby has no median function
<HardFu>
I got it solved, just wondering there is a better way
<peb7268>
Hey guys, noob questions, can someone tell me what I'm doing wrong with my switch? The code at the top works but I tried to duplicate it at the bottom and it gives me the wrong result. http://pastebin.com/uC0wRzbi
moshee has quit [Ping timeout: 276 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
beliveyourdream has joined #ruby
Elhu has quit [Ping timeout: 248 seconds]
chrishough has joined #ruby
<hoelzro>
peb7268: what's "the wrong result"?
<peb7268>
I get you must be ancient every time ha
dmiller has joined #ruby
<Spooner>
peb7268, Better to use when 0..10, when age 11..19
<peb7268>
ah ranges.. cool
<Spooner>
I mean when 0..10, when 11..19
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<Spooner>
As it is, you are pretty much just using an if/elsif which is wasting the case a bit ;)
Elhu has joined #ruby
miskander has quit [Quit: miskander]
atyz has joined #ruby
<peb7268>
ya.. the exercise was to learn a case
<peb7268>
so I was trying to translate the if else above into a case
dhruvasagar has joined #ruby
<peb7268>
the presenter of the tut just changed to another example
<kraljev3>
will ruby 2.0 break the gems?
etcetera has quit [Read error: Operation timed out]
<peb7268>
That worked Spooner. Thanks
DaltonUS has quit [Quit: DaltonUS]
<peb7268>
.. includes the top bound but … excludes it right?
<kraljev3>
i have switched to ruby, because i had nightmares of php code corrupting my data
etcetera has joined #ruby
<apeiros_>
Spooner: not a string
<kraljev3>
due to some won't fix bug
icole has joined #ruby
<apeiros_>
not a bug either
<Spooner>
Oh yes, good point.
cam` has joined #ruby
<apeiros_>
just ordinary limited float precision
noop has quit [Ping timeout: 255 seconds]
noop_ has quit [Ping timeout: 256 seconds]
zerba has joined #ruby
<apeiros_>
but yes, that's the origin of the bug in php
davetherat has quit [Remote host closed the connection]
<apeiros_>
since php thought it was great to first figure whether two strings look like numbers, if so convert them, then compare numbers, and fail due to float precision
<Spooner>
And if we had an int that big, it would be a Bignum, not a float.
<kraljev3>
that is bad design to conver too big intergers to floating point
<apeiros_>
kraljev3: it's even worse design to convert *strings* to floats
jtharris has quit [Quit: WeeChat 0.4.0]
<kraljev3>
nvm, I just love that ruby doesn't convert anything by default
<apeiros_>
I mean, it leads to such awesome things like '0xff' == '255' #=> true
<kraljev3>
:)
<apeiros_>
anyway, in php & javascript, you usually don't want to use ==, you want ===
<kraljev3>
haha, that is really funny
athst has quit [Quit: athst]
<apeiros_>
I rarely have seen a case where == was the right choice and === was not. the other way round exist plenty (where == is wrong and === is right)
joofsh has quit [Remote host closed the connection]
b1rkh0ff has quit [Read error: Connection reset by peer]
<kraljev3>
I would like that in ruby 0 and '' would be false-y
icole has quit [Ping timeout: 255 seconds]
<apeiros_>
totally not
Nisstyre-laptop has quit [Quit: Leaving]
<Spooner>
kraljev3, But they logically aren't in Ruby.
Nisstyre-laptop has joined #ruby
<Spooner>
That is just consistency with the way it is usually done. Not actually sensible.
<kraljev3>
in C and C++, 0 and '' are falsey, when branching
<kraljev3>
i don't mean any automatic conversion
<kraljev3>
just when using if
<banisterfiend>
kraljev3: '' is not falsey
<Spooner>
That is automatic conversion.
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<kraljev3>
'' is just ending null byte, which is falsey
<Spooner>
Yeah, it is Python/php/javascript that makes '' falsey.
<banisterfiend>
kraljev3: prove it :)
<kraljev3>
char a="";
<kraljev3>
char b="not empty"
<kraljev3>
if (*a) {}
<kraljev3>
if (*b) {}
<banisterfiend>
kraljev3: *a is not the same as 'a'
<V8Energy>
I just tried using rest-client gem (after basic auth and net::http failed) and I am still getting the same error 401 unauthorized. here is the line i use in IRB: RestClient.get 'http://admin:password@localhost:80/index.html', {:accept => :json}. it works fine in my browser when i paste this into the address bar: http://admin:password@localhost:80/index.html any ideas why it doesn't work?
slainer68 has quit [Remote host closed the connection]
jeremywrowe has quit [Quit: jeremywrowe]
<hoelzro>
I'm sure there's another service out there that will return it in a more parseable format
karnowski has joined #ruby
rado has joined #ruby
<Aguy>
Yes i know that
<Aguy>
But I NEED IT IN RUBY
sayan has quit [Ping timeout: 248 seconds]
<JonnieCache>
youre gonna have so many problems with different OSs and different networks and routers and firewalls and so on that its often best to just make a http request to a site that echoes your ip back to you
paolooo has quit [Quit: Page closed]
<JonnieCache>
thats actually what most apps do in practice
<apeiros_>
Aguy: maybe you should read links people give you in reply
<JonnieCache>
i reccommend ip.appspot.com because it returns just the IP in plaintext
<apeiros_>
because that link kraljev3 pasted contains pure ruby solutions
browndawg has joined #ruby
<JonnieCache>
best to have a fallback or two in case one goes down
<hoelzro>
Aguy: so make an HTTP request to that site?
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<apeiros_>
JonnieCache: it's possible to determine the external IP address without a connection
browndawg has left #ruby [#ruby]
* apeiros_
can't find his implementation of doing that, though
<JonnieCache>
apeiros_: reliably? without spending a week debugging it on every kind of network?
<JonnieCache>
lifes too short man
hoelzro is now known as hoelzro|away
<apeiros_>
JonnieCache: you talk about reliability and suggest connecting to an external service at the same time? srsly? :)
jpfuentes2 has joined #ruby
<Aguy>
screw it. i'll figure it out.
<apeiros_>
and yes, as I understood it, it should be reliable.
Eiam has joined #ruby
Eiam has quit [Changing host]
Eiam has joined #ruby
<Xeago>
I usually send a traceroute to the server, and that issues a traceroute as well
<JonnieCache>
apeiros_: i mean reliably as in getting the right ip
<Xeago>
and from that point you can establish some facts about the knowledge
<JonnieCache>
apeiros_: my solution, the failure mode is that you get no ip. with yours, the failure mode is that you get the wrong ip
<Xeago>
err, network*
<kraljev3>
if you are using linux, you can also make command line call:
<kraljev3>
ifconfig
<kraljev3>
otherwise, i posted a link for you
<Xeago>
kraljev3: not every linux has ifconfig et al tools installed :)
<apeiros_>
JonnieCache: you *assume* that that's the failure mode.
<apeiros_>
pretty bold to just claim it was.
<kraljev3>
xeago, you are damn right
<JonnieCache>
ok what is this method than that can reliably determine external ip without connecting out, with no prior knowledge of network topology?
<kraljev3>
i think i posted a link
__BigO__ has quit [Remote host closed the connection]
pavilionXP has joined #ruby
<kraljev3>
doing exactly that
<Xeago>
JonnieCache: I refuse to believe such method exists :)
<JonnieCache>
Xeago: apeiros apparently has one :)
<Xeago>
:O
karnowski has quit [*.net *.split]
mlr has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
timols has quit [*.net *.split]
mistermocha has quit [*.net *.split]
ejnahc has quit [*.net *.split]
casheew has quit [*.net *.split]
_bart has quit [*.net *.split]
atno has quit [*.net *.split]
Coolhand has quit [*.net *.split]
qubit has quit [*.net *.split]
jimeh has quit [*.net *.split]
companion has quit [*.net *.split]
therod has quit [*.net *.split]
nate_h has quit [*.net *.split]
multi_io has quit [*.net *.split]
patricksroberts_ has quit [*.net *.split]
altivec has quit [*.net *.split]
Guest70723 has quit [*.net *.split]
pdtpatrick has quit [*.net *.split]
rwz has quit [*.net *.split]
hiroyuki has quit [*.net *.split]
ninegrid has quit [*.net *.split]
Jalada has quit [*.net *.split]
mfridh has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
TDJACR has quit [*.net *.split]
{^_^}_______ has quit [*.net *.split]
mtfk has quit [*.net *.split]
diegok has quit [*.net *.split]
<breakingthings>
SWEET NETSPLITS BRO
joeycarmello has joined #ruby
TDJACR has joined #ruby
<Xeago>
you might have a service on the router, the request won't really go out of the local network
horofox has joined #ruby
<apeiros_>
JonnieCache: we're talking about the machine's IP, not your NAT or whatever's IP, yes?
<Xeago>
apeiros_: whatever appears to be your IP on the other end imo
krz has joined #ruby
<JonnieCache>
we're talking about external, internet facing ip. so yeah, the NAT ip in that case
mockra has joined #ruby
<JonnieCache>
but yeah obv you can determine the machine's external ip easily.
<apeiros_>
Xeago: well, actually Aguy's question is ambiguous - "my ip"
<apeiros_>
JonnieCache: sadly it's not that easy. but it works without a connection.
<JonnieCache>
yeah its not easy but its a damn sight easier than the internet facing one
<Xeago>
no, I am licensed 3 IP's in the 84.25.something section :)
__BigO__ has joined #ruby
<apeiros_>
but yes, if you want to know the IP visible to a service, the only reliable way is to actually ask that service.
<Xeago>
and those are 'mine'
abdulqabiz has quit [Quit: abdulqabiz]
<apeiros_>
asking just some external service may not be reliable either.
<apeiros_>
it's not guaranteed to take the same route.
<Xeago>
just traceroute the whole ipv4 public space that is known to respond to pings
<Xeago>
(I actually do that sometimes..)
_nitti has joined #ruby
<Xeago>
<3 nmap
bubblehead has quit [Remote host closed the connection]
* Xeago
is bored and has a headache, stupid graduation :\
karnowski has joined #ruby
jimeh has joined #ruby
qubit has joined #ruby
mtfk has joined #ruby
mistermocha has joined #ruby
altivec has joined #ruby
hiroyuki has joined #ruby
timols has joined #ruby
Guest70723 has joined #ruby
therod has joined #ruby
nate_h has joined #ruby
flagg0204 has joined #ruby
ejnahc has joined #ruby
ninegrid has joined #ruby
{^_^}_______ has joined #ruby
Coolhand has joined #ruby
patricksroberts_ has joined #ruby
casheew has joined #ruby
multi_io has joined #ruby
mlr has joined #ruby
<apeiros_>
:-/
atno has joined #ruby
diegok has joined #ruby
companion has joined #ruby
Jalada has joined #ruby
pdtpatrick has joined #ruby
NimeshNeema has joined #ruby
rwz has joined #ruby
mfridh has joined #ruby
aloshkarev has quit [Quit: aloshkarev]
mlr has left #ruby [#ruby]
<apeiros_>
IRC has a headache too…
<Xeago>
just a tiny bit in me wants it to not be finished
budmang has quit [Excess Flood]
<Xeago>
so I don't have to think about what to do xD
mlr has joined #ruby
<peb7268>
wow haha
<apeiros_>
Xeago: train HOTS
<peb7268>
I stepped out a min to watch some ruby tuts. I missed the continuation of the conversation above.. Hilarious.
chimkan has quit [Ping timeout: 248 seconds]
<Xeago>
apeiros_: I'd rather train WoL
mlr has left #ruby [#ruby]
<apeiros_>
there, you now don't need to think anymore :-)
<peb7268>
Especially the "a patchy" comment lol
ananthakumaran has quit [Quit: Leaving.]
<Xeago>
that said, PING!
jtharris has joined #ruby
Catbuntu has joined #ruby
<apeiros_>
not at home :)
<Xeago>
you told me you were going to fix paperwork some days ago
mlr has joined #ruby
<apeiros_>
yes, then I got sick
pavilionXP has quit [Ping timeout: 252 seconds]
<apeiros_>
and then I went to holidays
<apeiros_>
life sucks
<apeiros_>
partially at least
ephemerian has quit [Quit: Leaving.]
budmang has joined #ruby
Proshot has joined #ruby
<apeiros_>
peb7268: the suggested solution is funny too, with the patch, "01234" == "1234" # => true, but "09223372036854775808" == "9223372036854775808" => false
Catbuntu is now known as armiel
<Xeago>
hmm, seems you were sick more intensely than I thought, can we make a deal? :P
skattyadz has joined #ruby
<apeiros_>
we play WoL until I got my machine?
<apeiros_>
that is… for probably another 2 weeks?
mistermocha has quit [Ping timeout: 256 seconds]
<apeiros_>
and then HOTS :)
<Xeago>
is it already known when you'll get it, or is it still after paperwork?
<apeiros_>
still after paperwork
<Xeago>
was thinking of "no sc2 until you have caught up on boring crap to do?"
<apeiros_>
never
<Xeago>
hmm okay, reasonable
<Xeago>
tss
<shevy>
hehe
codekoala has quit [Ping timeout: 256 seconds]
<shevy>
ruby hackers who play games, can not code at the same time!!!
<shevy>
down with the games
<Xeago>
shevy!
sayan has joined #ruby
<Xeago>
we need another practice partner
sayan has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
<Xeago>
and banisterfiend is slacking big time
<shevy>
hmm my gaming days are kind of over... depends on the game though. I play online chess with two reallife friends casually
TomJ_ has joined #ruby
vikhyat has quit [Remote host closed the connection]
bubblehead has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
<aedorn>
shevy: Gaming days are never over. You must be simply taking an extended break.
Edward__ has joined #ruby
<shevy>
Xeago I found out that the local technical university is using ruby on rails for the student-pages
nkr has joined #ruby
<_br_>
shevy: Not even the occasional Nethack?
<shevy>
Xeago not sure how much you can see https://tiss.tuwien.ac.at/ but it is quite nice to use "internally" for students after login. I filed an issue to improve something there, that's how I found out that they used RoR
<shevy>
_br_ hmm no... I used to play MUDs back in 1997-2001 perhaps, and I remember some other guy playing nethack a lot, but I did not like it much
<apeiros_>
in other words: it's broken, but hey it won't break often, so lets leave it broken
TomJ__ has joined #ruby
TomJ__ has joined #ruby
TomJ__ has quit [Changing host]
vikhyat has joined #ruby
<shevy>
aedorn depends... I found the idea behind assassin's creed good... but most of these games seem so very similar to one another, just more more more graphics
<apeiros_>
wasn't there a language which would execute in a random fashion?
<shevy>
that's php for you!
<Xeago>
shevy: the urls are internationalized tho, yuck! xD
TomJ has quit [Read error: Connection reset by peer]
TomJ__ is now known as TomJ
<apeiros_>
indeed
<shevy>
Xeago haha
<_br_>
shevy: yeah thats fun too... I think we are all just to serious these days ^^
<Xeago>
shevy: I loved assassins creed revelations thingy
<aedorn>
shevy: You need to go indie then! You're right, though, many games are carbon copies today. Which is why I got a degree in art and design, did years of 3D modeling and animation, then decided to program instead.
otherj has joined #ruby
<_br_>
Minecraft.
<shevy>
_br_ a lot of competition these days with games. I think people only buy blockbuster games, with awesome graphics
<Xeago>
I also loved auzzie gamers' lets-play of that
<shevy>
save for those new indie games, but I have no experience with them
br4ndon has joined #ruby
otherj has left #ruby [#ruby]
mattbl has joined #ruby
<Xeago>
also, that new artful messup-ypur-mind game is cool
<Xeago>
very cool
<_br_>
shevy: forget graphics, go for awesome gameplay. e.g. Minecraft.
<Xeago>
_br_: gameplay?
<shevy>
Xeago the idea is cool, little assassin going around and stabbing at things. graphics was nice too. fighting scenes semi-realistic. what I disliked though was, that guy could almost fly through the air and had never any problem with stamina... what the heck
<_br_>
hehe or the lack thereof :)
<aedorn>
Faster Than Light is annoyingly addicting, also.
<shevy>
_br_ yeah, I really like the old games
hbpoison has joined #ruby
<shevy>
they should preserve those old games
<shevy>
for new generation of people
DrCode has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
<shevy>
a bit like what scummvm does ... but much larger, for ALL games out there
<V8Energy>
hellllp! I just tried using rest-client gem (after basic auth and net::http failed) and I am still getting the same error 401 unauthorized. here is the line i use in IRB: RestClient.get 'http://admin:password@localhost:80/index.html', {:accept => :json}. it works fine in my browser when i paste this into the address bar: http://admin:password@localhost:80/index.html any ideas why it doesn't work?
TomJ_ has quit [Ping timeout: 244 seconds]
<Xeago>
shevy: who cares about stamina if what makes you wonder gets you killed?
miskander has joined #ruby
skattyadz has quit [Quit: skattyadz]
T|ASK has joined #ruby
Aristata has joined #ruby
<Xeago>
damnit,c an\t fnd the game
<Aristata>
Does anyone here know how I can get back "CT" for a time zone rather than "CST" (daylight savings) ?
velCzupa has joined #ruby
<_br_>
These days you see so many cool emscriptem compiles anyway of old games..
<Xeago>
antichamber!
velCzupa has quit [Read error: Connection reset by peer]
Flock_of_Smeagol has joined #ruby
<shevy>
Xeago I dunno... I am fine if realism is ignored sometimes... but I so often get the feeling that it gets always ignored
velCzupa has joined #ruby
Es0teric has joined #ruby
<shevy>
just look at movies with cgi effects, so many look sooooo unrealistic and really *bad*
<devyn>
Mattix: I missed what this is about, and now I'm curious. Mind showing me?
<Mattix>
in fact I'm sure that if I do str = "#{..." and the puts str, it works
<Mattix>
I'll check that ^
<shevy>
Mattix yeah fair point, you use only one thread
<shevy>
I have seen this with two threads, not with one thread
<shevy>
kraljev3 I am not sure
DrCode has quit [Remote host closed the connection]
<shevy>
kraljev3 I think the identity of an object is not allowed to change
ananthakumaran has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<shevy>
kraljev3 so if you have a string object: var = "hi there", then you could reassign it: var = var.to_i but you could not do a type coercion of the same object: var.to_i!
<_br_>
Wonder if we ever get around the GIL problem in Ruby anyway.
<Mattix>
same result! wtf!?!!?
DrCode has joined #ruby
pavilionXP has joined #ruby
<shevy>
Mattix can you use the full code please
<shevy>
in your pastie you did not use Thread.new
<shevy>
or rather, the full but smallest way for others to reproduce
<Spooner>
_br_ it isn't a problem in anything but CRuby.
<Mattix>
ok, one sec. I'll try to isolate the error
noxoc has quit [Quit: noxoc]
<shevy>
\o/
ferdev has quit [Quit: Leaving...]
<shevy>
_br_ I actually like superhuman like movies, Iron Man was nice, and so were many others. I just hate it when they fill in action scenes with heavy (and awful) cgi
miskander has quit [Quit: miskander]
<_br_>
Spooner: Hehe only CRuby, good one :)
<Mattix>
isolated it works... I'll have to check all my code again... u.u
<_br_>
shevy: Yeah agree on that, actually the Avengers one was pretty nice, but Transformers unfortunately abysmal.
browndawg has joined #ruby
<V8Energy>
_br_: nope. still getting 401 unautherized
<shevy>
_br_ one of the worst cgi I ever saw as in "independence day" ... they just literally copied the planes like 600 times!
peb7268 has left #ruby [#ruby]
<shevy>
Mattix did you find another heisenbug :P
<aedorn>
shevy: Give it 10 years. They'll remake it and copy them 6,000 times.
samphippen has quit [Quit: Computer has gone to sleep.]
ctp has quit [Quit: Leaving...]
T|ASK has left #ruby [#ruby]
<shevy>
lol
pepee has quit [Quit: goto Quit;]
miskander has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
<_br_>
shevy: at least the great destruction scene with the whitehouse was partially in minature...
miskander has quit [Client Quit]
<_br_>
V8Energy: Can you debug on the other end what gets sent to the HTTP server?
hbpoison has joined #ruby
<Mattix>
ahhhh, I see!!
kodeart has joined #ruby
philcrissman has joined #ruby
lmg_ has joined #ruby
tommyvyo has joined #ruby
<Mattix>
no, never mind
_nitti has quit [Remote host closed the connection]
havenwood has joined #ruby
hmarr has quit [Read error: Operation timed out]
miskander has joined #ruby
_nitti has joined #ruby
Efysys has joined #ruby
<Efysys>
ciao
etcetera has quit []
Flock_of_Smeagol has left #ruby ["Leaving"]
<Efysys>
list
<jsaak>
the pain: "Ruby on Rails is an object-oriented programming language inspired by Perl and Smalltalk."
<Mattix>
how do you print a string escaping all non-ascii chars?
miskander has quit [Client Quit]
<havenwood>
I'm curious if IronRuby is competitively fast without mono, native .exe?
PanPan has joined #ruby
baroquebobcat has joined #ruby
<lmg_>
Hi, bit of a noob question here; I'm learning ruby by playing with ruby warrior (https://github.com/ryanb/ruby-warrior) but I'm having trouble with symbols. I don't understand why in the following code: https://gist.github.com/LMG/4979349 @direction is defined to null on the first call of play_turn. Can't we assign symbols to instance variables?
<lmg_>
Although, it's a singleton so it shouldn't change anything, should it?
carraroj has quit [Quit: Konversation terminated!]
miskander has joined #ruby
cupakromer has quit []
<Mattix>
shevy, I found it! in the real code host was "something\r" (with \r), that was the problem
noxoc has joined #ruby
<devyn>
lmg_: that isn't a singleton, the way you've created that
<devyn>
not an intuitive one anyway
<Mattix>
so when you print it separately you don't see the \r, as puts adds an \n at the end
<_br_>
What a pity small and fun 'frameworks' don't seem to get so much love. Where are the people creating "Camping" and other fun hacks. That ugly rails beast musn't always be!
etcetera has joined #ruby
<havenwood>
Building IronRuby with Mono was a royal pain, too.
<v0n>
hi
<devyn>
lmg_: I would make that a module instead of a class, and add in 'extend self'
<havenwood>
_br_: Sinatra ftw.
<v0n>
is "raise" a function or a Ruby special keyword
<v0n>
?
<devyn>
v0n: a method
<v0n>
ok. So it's ok to write raise("foo")
<havenwood>
v0n: In Pry you can do see docs for raise with: ? raise
<havenwood>
v0n: Or the actual source of the method with: show-source raise
<lmg_>
devyn, Well, I mostly meant that I *think* it's only instanciated once. I don't think I can change it to a module though, It's used by rubywarrior.
<havenwood>
<3 Pry gem
<v0n>
havenwood: ok
<shevy>
Mattix aha, quite simple... I could have figured it was a \r
velCzupa has quit [Read error: Connection reset by peer]
BRMatt has quit [Quit: Leaving]
Nisstyre-laptop has quit [Quit: Leaving]
<havenwood>
v0n: fail is aliased to raise, but i seldom see it used!
<_br_>
havenwood: right? agree with that... and its only approx. 1k lines, not 80+k!
velCzupa has joined #ruby
<devyn>
lmg_: okay, that's fine then. better to make it a regular class anyway
<devyn>
:p
_nitti has quit [Remote host closed the connection]
<Mattix>
shevy, of course I didn't put it explicitly. it was part of an http request I was capturing
<devyn>
so yeah, just do what I said with initialize and you're good
<havenwood>
_br_: The almost-sinatra gem is pretty fun with almost-rack. Almost Sinatra implemented in 7 lines camping-style: https://github.com/rkh/almost-sinatra
jgrevich_ has joined #ruby
jeremywrowe has joined #ruby
<shevy>
why is it called almost
<lmg_>
devyn, I did, and it works fine. I'm left wondering why health wasn't a problem. Probably something to do with it being excepted to be 0 and default initialization values, I guess.
<creationix>
jeremywrowe, I'm on a fresh install of ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
jrendell has joined #ruby
<jeremywrowe>
creationix: 1.9.3-p327 os x
bradleyprice has quit [Ping timeout: 248 seconds]
bubblehead has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
heftig has quit [Quit: Quitting]
mark_locklear has quit [Ping timeout: 248 seconds]
benlieb has quit [Quit: benlieb]
swex_ has joined #ruby
swex has quit [Ping timeout: 255 seconds]
mikepack has quit [Remote host closed the connection]
jrendell is now known as jrendell_
jrendell_ is now known as jrendell
nomenkun has joined #ruby
jlwestsr has joined #ruby
recycle has quit [Remote host closed the connection]
the_mentat has quit [Quit: Computer has gone to sleep.]
jrendell has quit [Quit: jrendell]
ferdev has joined #ruby
mikepack has joined #ruby
swex_ has quit [Read error: Operation timed out]
ozgura has joined #ruby
heftig has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
mklappstuhl has quit [Ping timeout: 264 seconds]
Umren has quit [Read error: Connection reset by peer]
Slivka has joined #ruby
swex has joined #ruby
the_mentat has joined #ruby
jrendell has joined #ruby
DanKnox has joined #ruby
james___ has quit [Quit: Computer has gone to sleep.]
budmang_ has joined #ruby
budmang has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
apeiros_ has joined #ruby
krz has quit [Quit: krz]
albakry has joined #ruby
albakry has quit [Changing host]
albakry has joined #ruby
albakry has quit [Client Quit]
agarie has joined #ruby
albakry has joined #ruby
albakry has joined #ruby
albakry has quit [Changing host]
etcetera has quit []
akemrir has quit [Quit: WeeChat 0.4.0]
<Dwarf>
Good evening, is there a way to remove both \r\n from the end of a string? Both chop and chomp don't seem to do that
<V8Energy>
_br_: I will try using Wireshark
<Dwarf>
Oh wait
<Dwarf>
I read wrong
<Dwarf>
Again....
phaidros has left #ruby [#ruby]
stormetrooper has quit [Ping timeout: 256 seconds]
invisime has joined #ruby
etcetera has joined #ruby
chrishough has quit [Ping timeout: 252 seconds]
dankest has quit [Quit: Leaving...]
sayan has quit [Ping timeout: 248 seconds]
stevechiagozie has joined #ruby
nomenkun has quit [Remote host closed the connection]
twshelton has joined #ruby
chrishough has joined #ruby
mklappstuhl has joined #ruby
ctp_ has joined #ruby
softbit has joined #ruby
shevy has quit [Ping timeout: 240 seconds]
Takehiro has quit [Ping timeout: 256 seconds]
pettsson has joined #ruby
verysoftoiletppr has quit []
albakry has quit [Quit: Leaving]
bradhe has joined #ruby
Matriks has joined #ruby
ctp has quit [Ping timeout: 252 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
justsee has joined #ruby
shock_one has quit [Remote host closed the connection]
yebyen has joined #ruby
<yebyen>
can anyone tell me if RDBI/rdbi is still the successor to ruby-dbi? It seems that it hasn't been updated since 2010. Ruby/DBI it seems is even older.
Squarepy has joined #ruby
slainer68 has joined #ruby
velCzupa has quit [Remote host closed the connection]
Squarepy has quit [Changing host]
Squarepy has joined #ruby
Aristata has quit [Quit: Leaving.]
rippa has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
razibog has joined #ruby
Banistergalaxy has quit [Ping timeout: 255 seconds]
tjbiddle has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
bricker`1A has joined #ruby
kenneth has joined #ruby
<kenneth>
hey, what do you guys think of this for password hashing: PBKDF2 with a random four-byte salt and 2048 iterations
shevy has joined #ruby
benlieb has joined #ruby
bricker`LA has quit [Ping timeout: 260 seconds]
sayan has joined #ruby
bricker`1A is now known as bricker`LA
pepee has joined #ruby
wchun has joined #ruby
breakingthings has quit []
Littlex has joined #ruby
<pcarrier>
hey!
<pcarrier>
I'd like to have nested modules in my gem's API, but with one of the parent modules being empty
ephemerian has joined #ruby
<pcarrier>
best generic example I can think of would be MyApp::Views::Foo, but I don't particularly want to define anything in MyApp::Views
<pcarrier>
and I'd like to be able to load Views separately
<apeiros_>
?
<pcarrier>
what's the best practice there? always write module MyApp; module Views; module Foo; [...]; end; end;end?
<apeiros_>
so you want MyApp::Views::Foo but you don't want MyApp::Views::Foo?
<pcarrier>
apeiros_: I'd like to be able to require a specific component without pulling everything
<apeiros_>
`module MyApp; module Views; module Foo` is generally best practice IMO
<apeiros_>
except with rails, since rails stupid broken autoloading fracks up otherwise.
<pcarrier>
apeiros_: not what I said. I'd like "Views" to be the equivalent of a java package, an empty container for modules/classes
<pcarrier>
apeiros_: nah, no rails
<pcarrier>
apeiros_: ok ok, thanks a lot
<apeiros_>
pcarrier: nothing stops you from having an otherwise empty module
marr has joined #ruby
<pcarrier>
apeiros_: the nesting is a bit frustrating
<pcarrier>
apeiros_: yeah, sure
<apeiros_>
copy & paste…
<pcarrier>
apeiros_: the nesting is frustrating because of the indentation :)
<apeiros_>
don't tell me - you're one of the "80 cols max!" fraction?
<pcarrier>
apeiros_: it'd be nice to be able to declare module A::B::C; end without initializing A or B.
<apeiros_>
well, since A could be either a class or a module, that's not possible
<pcarrier>
apeiros_: no, I'm one of the "hey I can keep track of my nesting by estimating spaces and it's not painful"
tjbiddle has quit [Quit: tjbiddle]
<apeiros_>
o0
benlieb has quit [Quit: benlieb]
<pcarrier>
apeiros_: specially since I tend to do a lot of data manipulation, and have 3-4 levels blocks
<pcarrier>
apeiros_: and more... Exception `NoMethodError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:71 - undefined method `seek' for #<Zlib::GzipReader:0x2c85198>
<pcarrier>
pepee: well, reinstall? :D
blaxter has quit [Quit: foo]
fir_ed has joined #ruby
Takehiro has joined #ruby
<pepee>
I installed it on a win xp sp3 vm, I tried 3 versions of ruby, and it's been the same for the 3. I can't run irb too
<pepee>
1.8.7, 1.9.2 and 1.9.3
<pcarrier>
pepee: did you manually set a ruby-related env variable, maybe?
mercwith1mouth has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 248 seconds]
vabenjamin has joined #ruby
Spooner has quit [Read error: Connection reset by peer]
caleb_io has quit [Quit: caleb_io]
<chrishough>
has anyone here had a "happy" experience with JIRA?
Spooner has joined #ruby
<vabenjamin>
anyone want to build a data mining gem with me
<vabenjamin>
ive already started
dustint has quit [Ping timeout: 256 seconds]
dustint has joined #ruby
Camel` has quit [Quit: Auf wiedersehen]
<oz>
chrishough: happy? I've used it once while working for a (huge) french service company. It was boring, and ugly.
mityaz has quit [Quit: See ya!]
<oz>
but it works!
<chrishough>
oz: I am trying to find someone that loves it :(
<chrishough>
lol
<chrishough>
oz: thank you, I agree with you
Jackneill has quit [Ping timeout: 244 seconds]
* oz
wishes chrishough luck :)
<chrishough>
thank you oz
adkron_ has joined #ruby
adkron__ has joined #ruby
<vabenjamin>
so why did everyone here pick ruby over python
cantonic has joined #ruby
twshelton has joined #ruby
<pepee>
pcarrier, apeiros_ finally, I got it, it was something i already suspected... I didn't have the null driver
<shadowshell>
vabenjamin: i was a python zealot before i got into ruby. was quite productive in django at the time and used python mostly for that. i was at a point with python where i was really starting to grasp the metaprogramming concepts.
gatopan has joined #ruby
softbit has joined #ruby
<shadowshell>
vabenjamin: then i scored a project working on an existing rails application which forced me to learn ruby
<shadowshell>
vabenjamin: wasn't happy about it at first
<vabenjamin>
Hm I have had 6 years with Java and am moving myy work to a higher level language to save me time. I choose to learn Ruby over using Python skills I already know, but I'm second-guessing that decision. Not sure yet
niklasb has joined #ruby
<shadowshell>
vabenjamin: mind was blown, loved ruby meta model
icole has quit [Read error: Connection reset by peer]
<vabenjamin>
I do a lot of data mining work, seems to be a lot of that stuff in Python already but I actually dont mind writing it in Ruby if no ones done it before. I just cant find any other scientific programmers using this language
vikhyat has quit [Remote host closed the connection]
<shadowshell>
vabenjamin: it taught me not to be a zealot and since then i have picked up erlang, scala and a bit of haskell
warreng has left #ruby [#ruby]
<shevy>
vabenjamin and how is python better than ruby or vice versa
<Dwarf>
Evening, how would I check if this was in a string: "VERSION"
<Dwarf>
:|
<shevy>
Dwarf string.include? 'VERSION'
<Dwarf>
There's \x01 chars surrounding it
<shadowshell>
vabenjamin: best tool for the job right...so i must say with high level languages and math python is pretty well covered. there are allot of great scientific libs for python. not as many for ruby.
<shevy>
then regex it must be Dwarf
<Dwarf>
Noooooooooooooooooooooooooooo
<shevy>
well
<Dwarf>
I tried .include? '\x01VERSION\x01'
<Dwarf>
No luck
adkron__ has quit [Ping timeout: 264 seconds]
adkron_ has quit [Ping timeout: 264 seconds]
<shevy>
via ""
icole has joined #ruby
<shevy>
'' wont be evaluated in this way
<Dwarf>
Oh
<shevy>
x = "\x01VERSION\x01"; x.include? "\001VERSION\001" # => true
<Dwarf>
I'm so stupid at times
<Dwarf>
That did seem to work
<shevy>
that's ok, have a beer, you will get cleverer that way
chussenot has joined #ruby
<Dwarf>
Beeeeeer
<Dwarf>
Thanks mate
gommo has joined #ruby
<yann2>
how can I tell passenger-install-apache2-module to take a different version of ruby?
spider-mario has quit [Remote host closed the connection]
<shevy>
dcope I think you used a short character class here
<apeiros_>
and yes, "asdf".gsub(/[d]/, '*') # => "as*f"
<dcope>
weird, restarting irb fixed it
<shevy>
normally I see stuff like [a-z]
<dcope>
wtf
<shevy>
"asdf".gsub(/[a-z]/, '*') # => "****"
dankest has joined #ruby
<shevy>
Xeago I used to play warcraft 3, in the end I always built mass towers, even though it meant loss against good players, the reactions from the other players were so hilarious
<vabenjamin>
so say im breaking up a paragraph and counting the frequency of each word in it, am I better off using two parallel arrays to store words and frequencies, or a hash?
emmanuelux has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
<apeiros_>
vabenjamin: what would you gain from two arrays?
<shevy>
vabenjamin that is easy
emmanuelux has joined #ruby
<vabenjamin>
I'm a bit confused on how to update the frequency each word appears as I traverse through the paragraph
<vabenjamin>
if I store data in a hash as opposed to two arrays
Neomex has joined #ruby
<apeiros_>
o0
<apeiros_>
how do you update it with the two arrays?
<vabenjamin>
apeiros_ did you mean return count on line 8
<apeiros_>
vabenjamin: return is optional in ruby
spider-mario has joined #ruby
<apeiros_>
ruby automatically returns the last evaluated value
adeponte has quit [Ping timeout: 276 seconds]
<vabenjamin>
This has been my biggest difficulty in ruby, all of this secret syntax stuff
<apeiros_>
usually only people coding their first couple of weeks/months keep using the return statement
<apeiros_>
vabenjamin: it's not really secret. but syntax is rarely self-evident :)
<vabenjamin>
also coming from a language where I have to explicitely say everything I want to do
<apeiros_>
ruby has *very* little syntax (parser side looks different - that little syntax is rather complex there)
Takehiro has joined #ruby
<apeiros_>
and that's one thing I very much enjoy about ruby. it makes it all the more discoverable.
gatopan has quit [Ping timeout: 245 seconds]
mattbl has joined #ruby
<kenneth>
hey anybody familiar with the pbkdf2 gem? i'm curious because it does not seem to build native extensions, is it a ruby implementation of the algorithm? (which would be quite a bit slower than the C implementation)
<vabenjamin>
Hash.new(0) what's the 0 for? Just starting it off as null?
werdnativ has quit [Quit: FAMOUS_LAST_WORDS is nil]
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<apeiros_>
vabenjamin: if you're a fan of one-liners, you could even write it as:
<apeiros_>
vabenjamin: each_with_object is a method
<apeiros_>
vabenjamin: it works like each, but with 3 differences: it takes an argument, it yields that argument as 2nd block argument on every iteration, it returns that argument at the end
mattbl has quit [Quit: This computer has gone to sleep]
flyinprogramer has joined #ruby
<apeiros_>
so each_with_object is basically: `def each_with_object(obj); each do |element| yield(element, obj) end; obj; end`
<flyinprogramer>
any idea how "system" calls in rake tasks are executed in the shell the rake task is run in; as opposed to "system" calls in scripts are not ?
mikepack has quit [Remote host closed the connection]
<vabenjamin>
Hm
DaltonUS has joined #ruby
<flyinprogramer>
example; putting `rvm list` in a ruby script file; and doing: ruby test_script; will yield rvm complaining about not being a function; and suggests executing in a login shell
<vabenjamin>
so the debate Im having is do I want to keep my code looking more procedural, or take advantage of what Ruby lets me do
mikepack has joined #ruby
carlyle has quit [Remote host closed the connection]
<vabenjamin>
as this code will be geared towards other people interested in text mining, and i want them to be able to extend it easily if need be
<flyinprogramer>
whereas - doing `rvm list` in a rake task totally works; no problem
cantonic has quit [Quit: cantonic]
end_guy has joined #ruby
angusiguess has quit [Ping timeout: 255 seconds]
icole has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
Mattix has joined #ruby
ffranz has joined #ruby
<apeiros_>
vabenjamin: you want to learn ruby, take advantage of what ruby lets you do
<apeiros_>
vabenjamin: you want people to use your code, take advantage of what ruby lets you do
icole has joined #ruby
<apeiros_>
general rules about code readability still apply. as I said above, I for one prefer the multiline solution over the one-liner.
workmad3 has joined #ruby
<vabenjamin>
it seems you just gave me contradictory statements? or did I read that wrong
<vabenjamin>
I feel the multiline is more readable (Im assuming that's why you prefer it too), but you suggest using the one-liner conventions?
<apeiros_>
taking advantage of what ruby lets you do != write obscure code ;-)
kevinfagan has quit [Quit: Leaving...]
`p has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
<vabenjamin>
hehe true
<Xeago>
kenneth: https://github.com/pbhogan/scrypt is that suitable for your use? while also likely homebrewn, it does use a c extension and is thus more suitable for analysis
<apeiros_>
you can write ruby in a very perlish way, that is, code which looks similar before and after RSA encryption…
<Xeago>
apeiros_: what do you want know about PKI, as it is quite big
ner0x has quit [Quit: Leaving]
haxrbyte has quit [Ping timeout: 252 seconds]
<Xeago>
(from key generation, to establishing relationships, to operating keyservers)
haxrbyte has joined #ruby
<apeiros_>
Xeago: nothing. just want to know whether you know PKI theory :)
GreenPlastik has quit [Remote host closed the connection]
devyn has joined #ruby
gregor3005 has joined #ruby
<apeiros_>
so I know whether I should poke you that one day I start with one of my ideas (which is probably: never)
<Xeago>
I am not exhaustive like you are for ruby tho :)
codecop has quit [Remote host closed the connection]
<apeiros_>
vabenjamin: since any sane language implements IEEE754
<vabenjamin>
Ok. I'm trying to get a sense of what limitations Ill meet as I implement some of this stuff
<apeiros_>
vabenjamin: ruby does provide classes like BigDecimal, which have arbitrary precision. or Rational, which has infinite precision for rational numbers.
Elhu has joined #ruby
`p has joined #ruby
Dreamer3 has quit [Ping timeout: 248 seconds]
ravigehlot has joined #ruby
the_mentat has joined #ruby
<vabenjamin>
ok so doing statistical work shouldnt be a problem
kn330 has joined #ruby
<apeiros_>
also ruby's integers seamlessly overflow from Fixnum (~2**61) to Bignum (only limited by your memory)
<vabenjamin>
well I will be in this IRC channel for the next few months so you will have plenty of time to tell me all about it :) jk jk tyvm for all of the help though
ffranz has joined #ruby
<gregor3005>
ok, the example work when close the socket after sending, but how can i use this and let the socket be open
gabrielrotbart has joined #ruby
<apeiros_>
gregor3005: flush the socket
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
twshelton has quit [Quit: Computer has gone to sleep.]
<apeiros_>
also `while chunk = client.read(SIZE)` will block until EOF is hit
<vabenjamin>
I am going to be implementing the ID3 classification algorithm sometime in the next week or two, but I am sure it will be slow and crappy because I dont really know my way around Ruby, but it will be something to start with
<apeiros_>
(or more data is being sent)
<vabenjamin>
not sure if any of you ever need that sort of stuff
PanPan_ has joined #ruby
Dreamer3 has joined #ruby
<gregor3005>
apeiros_: flush did no help
<vabenjamin>
you could always use jruby and hook up with the WEKA library too but w/e
<apeiros_>
vabenjamin: feel free to paste your code. sometimes I enjoy refactoring foreign code.
<gregor3005>
apeiros_: maybe i should send EOF after the file?
<vabenjamin>
tyvm
<apeiros_>
gregor3005: closing the socket sends an EOF
invisime has quit [Quit: Leaving.]
<apeiros_>
can't have a cake and eat it too…
kirun has quit [Quit: Client exiting]
<gregor3005>
but i need the socket be open to do other jobs
<vabenjamin>
project is open source'd on github so I dont have a problem dumping my work here and asking for help haha
<apeiros_>
either you tell the other side how much it has to read (so it can stop), or you send an EOF
justsee has quit [Quit: Leaving...]
_nitti has joined #ruby
arya has quit [Ping timeout: 264 seconds]
DrShoggoth has joined #ruby
<Xeago>
I despise my school for failing to teach basic networking/network programming
PanPan_ has quit [Ping timeout: 252 seconds]
devyn has quit [Read error: Operation timed out]
lmg_ has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
twshelton has joined #ruby
<bean>
Teach yourself then!
<bean>
:p
arya has joined #ruby
Dreamer3 has quit [Ping timeout: 252 seconds]
hbpoison has quit [Ping timeout: 252 seconds]
pdamer has quit [Quit: pdamer]
TomJ has quit [Quit: TomJ]
wf2f has quit []
devyn has joined #ruby
cloaked1 has joined #ruby
mockra has joined #ruby
banjara has joined #ruby
caleb_io has joined #ruby
gyre007 has quit [Remote host closed the connection]
jrajav has joined #ruby
dallasm has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
Badabing|2 has joined #ruby
<gregor3005>
now i refactor the network example and send first the filesize and then the files. what is better, send the filesize or emulate eof?
Mon_Ouie has quit [Ping timeout: 248 seconds]
<Badabing|2>
Hey guys, i'm somewhat new to programming/Ruby and am wondering why irb isn't letting me a Class's methods on an object I created
banisterfiend has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
<Badabing|2>
I was doing the virtual dragon pet exercise from the Learning to Program book
beilabs has quit [Disconnected by services]
<Badabing|2>
anyone?
hydrozen has joined #ruby
beilabs_ has joined #ruby
<vabenjamin>
badabing can you paste your code on pastie.com
<Badabing|2>
when i go into irb and #> load 'dragon.rb' everything runs just fine
pothibo has quit [Quit: pothibo]
jtharris has quit [Read error: Operation timed out]
<Badabing|2>
however if I remove the bit that exit's the program, and then try calling the methods i created on the object that gets created at the beginning, it won't work
<Badabing|2>
basically it creates an orange tree that grows and creates fruit
niklasb has quit [Read error: Operation timed out]
<Badabing|2>
The .rb file creates/initializes the object and calls a few of the methods on it that i've defined, but then when I just try to manually call one from irb, it won't work
<cloaked1>
anyone here know datamapper well enough to help with a question? The DM guys are asleep or something.
<vabenjamin>
this file looks fine
<vabenjamin>
how are you trying to call them in irb
Matip has quit [Client Quit]
haxrbyte_ has joined #ruby
<Badabing|2>
so first I #> load 'orangetree.rb'
<Badabing|2>
it runs a few of the methods fine
<Badabing|2>
then I just type directly into irb #> tree.count_the_oranges
jonahR has joined #ruby
<Badabing|2>
which should call the count_the_oranges method on the tree object that was created just as it did in the .rb file
haxrbyte has quit [Read error: Connection reset by peer]
<Badabing|2>
but i get a NameError: undefined local variable or method 'tree' for main:Object from (irb): 2
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<vabenjamin>
im wondering if the file closes after it finishes running the methods you specified
<cloaked1>
Meh, I'll just ask. http://pastebin.com/KZQRha8P <- if id already exists isn't datamapper smart enough to do an update with the new attribs? My reading of the docs seems to indicate "yes" but I'm getting errors that the id already exists and no update is getting attempted. or do I need to updated explicitly?
<vabenjamin>
im relatively new to ruby myself, from java
dustint_ has quit [Ping timeout: 240 seconds]
ahokaomaeha has joined #ruby
<apeiros_>
Badabing|2: didn't read the full thing
Mattix has quit [Ping timeout: 256 seconds]
<apeiros_>
but you said you load the file and "using it doesn't work"
kristofers has quit []
beliveyourdream has quit [Read error: Connection reset by peer]
<apeiros_>
by "doesn't work", do you mean it says "NameError: undefined local variable or method `pet' for main:Object" ?
<Badabing|2>
let me clarify
<Badabing|2>
first, I updated the code sample to a different one that is a little more clear
<Badabing|2>
when it runs, a tree object is initialized, and a few of the defined methods run on it
_nitti has quit [Remote host closed the connection]
<Badabing|2>
at the very end of the .rb file is where i call the methods
the_mentat has quit [Quit: Computer has gone to sleep.]
<fuzai>
Hi is there anything like php's addslashes in ruby that will automatically escape anything that would be considered a special character for a regex?
<Badabing|2>
however once that finishes running, and it is still in irb, i tried typing tree.count_the_oranges and nothing ran
bwlang has left #ruby [#ruby]
<Badabing|2>
errr, sorry, rather i got that error
<apeiros_>
you could have just said "yes" to my question :-p
<Badabing|2>
yes
<Badabing|2>
:)
<apeiros_>
lower_cased variables are local variables
<apeiros_>
local variables are not shared across lexical scopes. a file defines a lexical scope.
<Spooner>
fuzai: : Regexp.escape(string)
<apeiros_>
you can use e.g. a constant: `Tree = OrangeTree.new`
<fuzai>
thank you :)
<apeiros_>
constants are shared. constants start with an uppercase letter.
Targen has quit [Ping timeout: 256 seconds]
<Badabing|2>
so if I just change all instances of the 'tree' variable to be 'Tree' I should be able to continue calling methods on it within irb?
<apeiros_>
Badabing|2: also for future reference, when getting help - describe your problem. "it doesn't work" is not a description of your problem.
<apeiros_>
Badabing|2: yes
<Badabing|2>
ok cool
<Badabing|2>
i'll try that now, thanks.
jimeh has quit [Quit: Computer has gone to sleep.]
abrausch has joined #ruby
philcrissman has quit [Remote host closed the connection]
jimeh has joined #ruby
jimeh has quit [Client Quit]
blacktulip has quit [Remote host closed the connection]
arya has quit [Ping timeout: 252 seconds]
<Badabing|2>
awesome--totally worked
idkazuma has joined #ruby
fedza has joined #ruby
<Badabing|2>
apeiros: in terms of including files then, would the local variables only be considered within the lexical scope of the .rb file they resided in?
<apeiros_>
Badabing|2: careful, include has a different meaning in ruby
<apeiros_>
you require or load a file
<Spooner>
Badabing|2: @tree_height should be a local, since it is only calculated when you ask for #height (and consider elsif or a case statement in there ;) ).
<Badabing|2>
sorry, meant require
<apeiros_>
Badabing|2: and yes, local variables are local to single files
zorbyte has quit [Quit: Lost terminal]
<apeiros_>
there are more things defining lexical scopes, too
<apeiros_>
e.g. def, class, module
__BigO__ has quit [Remote host closed the connection]
<Badabing|2>
gotcha
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
<apeiros_>
all those define a new lexical scope. lvars outside of it can't be accessed inside them, lvars inside of them can't be accessed outside of them
<Badabing|2>
Ok, then what is the difference between an instance variable (what @tree_height currently is) and a local variable?
colonolGron has quit [Read error: Connection reset by peer]
<apeiros_>
a local variable is lexically scoped
colonolGron has joined #ruby
<apeiros_>
an instance variable is scoped by its relationship to an object
<kenneth>
Xeago: thanks for the scrypt gem link
<Badabing|2>
oooooooooOOOOOooooh
chrishough has quit [Quit: chrishough]
<Spooner>
Badabing|2 : @tree_height is stored in the object itself. A local will disappear when the scope (#height in this case) ends.
<Badabing|2>
ok, that makes total sense
<apeiros_>
i.e., @ivars belong to one object
<apeiros_>
and any method executed in the context of that object has access to the same set of @ivars
<Spooner>
No reason to preserve @tree_height, since it is the result of a calculation.
<Badabing|2>
right
<Badabing|2>
ok, that makes perfect sense
arya has joined #ruby
nicoulaj has quit [Remote host closed the connection]
<Badabing|2>
thanks for the explanation
<Spooner>
Also, it is much more usual to use: puts "The tree is #@tree_height inches high." # But I suppose that is personal choice to a degree.
<Badabing|2>
So that was actually my next question
<Badabing|2>
I did that, and it outputted #> "The tree is #@tree_height inches high."
<Spooner>
Well, if it was tree_height, it would have to be #{tree_height} (you can only omit the {} with @ivars).
[rust] has joined #ruby
<Spooner>
Did you change from ' to " ?
dallasm has left #ruby [#ruby]
yfeldblum has joined #ruby
<Badabing|2>
sorry, i just used " here
berserkr has joined #ruby
<Badabing|2>
they are all ' in the code
<Badabing|2>
was indicating what it outputted
<Spooner>
Yeah, #{} interpolation is specific to using "". '' is raw.
Banistergalaxy has quit [Remote host closed the connection]
<apeiros_>
in '', only \\ and \' are special
<apeiros_>
anything else is verbatim
<apeiros_>
oh, and ' of course (since it terminates the string)
<Badabing|2>
Sorry, i'm not following. Since I used single quotes, why did the interpolation with #@tree_height not work then?
<Spooner>
You need to use double-quotes to get interpolation.
<Badabing|2>
ah
<Badabing|2>
I see
<Badabing|2>
let me try that
<Badabing|2>
oh awesome
Morkel has quit [Quit: Morkel]
<Badabing|2>
i was trying 50 million things to get the interpolation to work before and it was driving me nuts
Elhu has quit [Quit: Computer has gone to sleep.]
<Badabing|2>
Thanks for helping on that
Volta has joined #ruby
<Badabing|2>
Ruby seems so forgiving in some ways, and then there are still little details I need to remember like that
abrausch has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Banistergalaxy has joined #ruby
philcrissman has joined #ruby
asdfqwer has quit [Read error: Operation timed out]
monkegjinni has quit [Remote host closed the connection]
Volta has quit [Client Quit]
Volta has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
octoberry has joined #ruby
gregor3005 has left #ruby [#ruby]
alanp has quit [Ping timeout: 240 seconds]
Volta has quit [Client Quit]
bradleyp_ has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
jrendell has quit [Ping timeout: 256 seconds]
therod has joined #ruby
alanp_ is now known as alanp
joshman_ has quit [Ping timeout: 255 seconds]
enebo has quit [Quit: enebo]
daniel_- has quit [Ping timeout: 252 seconds]
pyrac has joined #ruby
gatopan has joined #ruby
daniel_- has joined #ruby
banisterfiend has joined #ruby
softbit has quit [Remote host closed the connection]
<eindoofus>
Hi, does anyone use Aptana in here as there IDE? I'm wondering if the behavior I'm experiencing is normal
<`p>
thats one of the few defcon videos i never watched just because of the name it didn't interest me but i'm watching it now since you recommended it Xeago
<eindoofus>
their*
workmad3 has quit [Ping timeout: 255 seconds]
<vabenjamin>
Eindoofus I do
<vabenjamin>
its the same IDE as Eclipse tbh
<eindoofus>
hi vabenjamin, when I type "File." I expect it to come up with a list of the methods from the Ruby File class but the intellisense doesn't come up with the relevant methods.
<eindoofus>
Is this normal?
jgarvey has quit [Quit: Leaving]
PanPan has joined #ruby
hbpoison has joined #ruby
<vabenjamin>
Eindoofus I'm trying to figure it out myself tbh, it's hit and miss
bean has quit [Quit: Computer has gone to sleep.]
<vabenjamin>
sometimes i t works =\
<eindoofus>
vabenjamin, that's strange. it seems to be working now. lol
<vabenjamin>
lol
<vabenjamin>
thats been myy experience as well
mengu has joined #ruby
ner0x has joined #ruby
skcin7 has quit []
mmitchell has quit [Read error: Operation timed out]
chrishough has joined #ruby
dankest has joined #ruby
PanPan has quit [Ping timeout: 248 seconds]
piotr__ has joined #ruby
jerius has quit [Ping timeout: 244 seconds]
piotr_ has quit [Ping timeout: 256 seconds]
Volta has joined #ruby
adkron has quit [Quit: leaving]
hydrozen has quit [Quit: Computer has gone to sleep.]
philcrissman has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
dmiller1 has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
piotr__ has quit [Read error: Operation timed out]
dmiller1 has joined #ruby
Volta has quit [Client Quit]
jerikl has joined #ruby
d2dchat has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<vabenjamin>
Anyone here ever use Amazon mechanical turk?
sedai has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
Banistergalaxy has joined #ruby
havenwood has quit [Ping timeout: 260 seconds]
dmiller1 has quit [Ping timeout: 256 seconds]
jjang has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
havenwood has joined #ruby
tahnok has joined #ruby
spider-mario has quit [Remote host closed the connection]
Volta has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
dmiller1 has joined #ruby
mercwith1mouth has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
pettsson has quit [Quit: Lämnar]
Volta has quit [Client Quit]
gyre007 has joined #ruby
xardas has quit [Ping timeout: 255 seconds]
anonymuse has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
apeiros_ has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 260 seconds]
neurone-1337 has quit [Ping timeout: 255 seconds]
rheoli has joined #ruby
R_Macy has quit [Ping timeout: 272 seconds]
joel has joined #ruby
<shevy>
awww
<shevy>
you guys need to use simple editors
<shevy>
like bluefish!
<joel>
questions about .shuffle, I'm doing a card game, and I'd like to be able to reproduce a given shuffle, so more than one person can play the same game, thoughts on how to do this?
<shevy>
joel what do you mean with reproduce exactly? you could always store the array, and the changed sets
<eindoofus>
Is there a ruby ide that includes documentation with the intellisense when viewing methods?
<shevy>
and then on a functionality, like "replay last game", give back the change of that array
danneu has quit [Ping timeout: 252 seconds]
<joel>
shevy: two people on opposite ends of the world should be able to type in a game number and I should be able to shuffle the deck from a fixed state to the hand each person had.
<shevy>
well, you store the state, like what cards they have
<joel>
the example there just tosses a syntax error here
<joel>
so no idea what it actually does.
rburton- has joined #ruby
daniel_-_ has joined #ruby
daniel_- has quit [Read error: Connection reset by peer]
<shevy>
might be you are on ruby version less than 1.9.x
arya has joined #ruby
<joel>
hm shit I am
maletor has joined #ruby
_nitti has joined #ruby
stevechiagozie has joined #ruby
kpshek has quit []
<shevy>
hmm I just checked
<shevy>
on 1.8.x, .shuffle() accepts no arguments
<shevy>
all those slight differences between versions :\
<joel>
yeah, that's a seed to be a reproducible shuffle, excellent.
zoonfafer has quit [Ping timeout: 248 seconds]
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
techhelp has quit [Quit: This computer has gone to sleep]
<shevy>
hmm but this is on 1.9.x only or? what would you do on 1.8.x?
<kx>
hey. is there a ruby gem that let's you use logic programming like in prolog? I saw ruby-prolog gem, but it's 4 years old and tested only with 1.8.7
mele- has quit [Ping timeout: 264 seconds]
ryanneufeld has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
octoberry has quit [Ping timeout: 256 seconds]
adeponte has joined #ruby
atyz has quit [Quit: Leaving...]
joofsh has quit [Remote host closed the connection]