<Maher4Ever>
Do I need to call rb_gc_register_address on a ruby object if it's stored inside a struct which is wrapped in a ruby object (with Data_Wrap_Struct ) to prevent it from being GCed?
<Maher4Ever>
Say something like struct MyObject { VALUE obj; }, do I need to call rb_gc_register_address on the 'obj' member?
qko has quit [Ping timeout: 260 seconds]
tfitts has joined #ruby
strnx has quit [Excess Flood]
bradhe has joined #ruby
perryh_away is now known as perryh
bradhe has quit [Remote host closed the connection]
<wrapids>
I have a method def method() newvar = {} end. Is this some sort of no no that I'm unaware of?
otters has joined #ruby
<wrapids>
When calling this method, my program halts execution and does not throw any errors. It just sits there.
Stalkr_ has quit [Quit: Leaving...]
<wrapids>
Hrm... apparently calling def method() end causes this problem as well
mpereira has joined #ruby
brianpWins has joined #ruby
<wrapids>
Oh. Hm. Apparently my program is not throwing errors when the method cannot be found.
justsee has joined #ruby
brianpWins has quit [Client Quit]
wagle has joined #ruby
bradhe has quit [Remote host closed the connection]
mxweas has quit [Ping timeout: 260 seconds]
wagle has quit [Read error: Connection reset by peer]
mxweas has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
subbyyy has quit [Quit: Leaving.]
<jumpingcloud>
hey i'm trying to make a script that sshes into a server and then ssh's from that server.
<jumpingcloud>
can someone point me in the right direction? I'm trying to use 'greenletters' but i dont know if this is the right tool.
strnx has joined #ruby
TorpedoSkyline has joined #ruby
htroyack has quit []
khakimov has quit [Quit: Computer has gone to sleep.]
sdwrage has quit [Quit: geekli.st/programmer]
<RubyPanther>
Maher4Ever: you normally have a mark function (the second arg to Data_Wrap_Struct) that then calls rb_gc_mark
<RubyPanther>
I've never used rb_gc_register_address I think it is for when you've created a Ruby-compatible VALUE outside of the interpreter and want to use it as a Ruby object
strnx has quit [Excess Flood]
<Maher4Ever>
RubyPanther: Thanks. I just looked at the source and all that rb_global_variable does is calling rb_gc_register_address, so I need to mark ruby object as you said to prevent them from getting GCed.
jumpingcloud has quit [Quit: Leaving]
<Maher4Ever>
rb_gc_register_address can be used when you have an fixed memory adress, so it can't be used with stack-vars. At least that's what I know now
jumpingcloud has joined #ruby
justsee has quit [Quit: Leaving...]
ramblex has quit [Quit: ramblex]
niklasb has quit [Quit: WeeChat 0.3.8]
sebicas has joined #ruby
mascool has joined #ruby
zodiac1111 has joined #ruby
mneorr has quit [Quit: Leaving.]
balki_ is now known as balki
cakehero has joined #ruby
zastaph has quit []
subbyyy has joined #ruby
subbyyy has quit [Client Quit]
strife25 has quit [Quit: Computer has gone to sleep.]
strife25 has joined #ruby
darren has joined #ruby
strife25 has quit [Client Quit]
strife25 has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
kylemcgill has joined #ruby
AndChat332169 has joined #ruby
L-----D has joined #ruby
AndChat332169 has quit [Client Quit]
kylemcgill has quit [Remote host closed the connection]
kylemcgill has joined #ruby
maletor has joined #ruby
strife25 has quit [Client Quit]
ghanima has joined #ruby
sebicas has left #ruby [#ruby]
mahmoudimus has joined #ruby
AndChat332169 has joined #ruby
Skola has joined #ruby
bricker88 has joined #ruby
bricker88 has quit [K-Lined]
AndChat332169 has quit [Ping timeout: 240 seconds]
heftig has joined #ruby
ghanima has quit [Ping timeout: 260 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
beakerman has joined #ruby
ashp has joined #ruby
<ashp>
If anyone has a spare moment, I'm experimenting with a bit of a nested hash and I ran into a problem: http://pastebin.com/RYLZSdvL
<ashp>
I get an error along the lines of /home/apenney/ruby/facter/lib/facter/util/ip.rb:101:in `[]': can't convert Symbol into Integer (TypeError)
fridim_ has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
<ashp>
I'm not sure a nested hash is the best data structure for this but I was hoping I could iterate over the :methods under a specific kernel type (so for linux over :ipconfig and :ip) and check to find which is the appropriate one to use on a system
strnx has joined #ruby
<ashp>
but I don't think I can just do blah = hash[:kernel][:methods] and then do blah.each do |blah| and then further poke into the hash with blah[:exec]
Skola has quit [Quit: Skola]
banisterfiend has quit [Read error: Connection reset by peer]
zodiac1111 has quit [Ping timeout: 252 seconds]
cakehero has joined #ruby
sdwrage has joined #ruby
L-----D has left #ruby ["Leaving"]
fridim_ has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Remote host closed the connection]
cloud|windoze has quit [Read error: Connection reset by peer]
crates has quit [Read error: Connection reset by peer]
nerdy has joined #ruby
crates has joined #ruby
Draco_ has quit [Remote host closed the connection]
blazes816 has quit [Quit: Leaving]
tommyvyo has joined #ruby
linoj has quit [Quit: linoj]
nopolitica has quit [Quit: Leaving.]
wrapids has quit [Ping timeout: 248 seconds]
dev_ryan70 has joined #ruby
dev_ryan70 has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
justsee has quit [Quit: Leaving...]
zodiac1111 has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
iamjarvo has joined #ruby
zodiac1111 has joined #ruby
carporto has joined #ruby
subbyyy has joined #ruby
<carporto>
hello there
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
carporto has left #ruby [#ruby]
rbanffy has quit [Quit: Ex-Chat]
Goles has joined #ruby
xiphiasx_ has quit [Read error: Connection reset by peer]
Goles has quit [Ping timeout: 255 seconds]
xiphiasx_ has joined #ruby
mockra has joined #ruby
kylemcgill has joined #ruby
charlies_ has joined #ruby
zodiac1111 has quit [Quit: 离开]
fixl has joined #ruby
strnx has quit [Excess Flood]
Progster has joined #ruby
minijupe has quit [Quit: minijupe]
n_blownapart has joined #ruby
ghanima has quit [Quit: Leaving]
n_blownapart has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
strnx has joined #ruby
xiphiasx_ has quit [Read error: Connection reset by peer]
mucker has joined #ruby
CaptainKnots has quit [Excess Flood]
philips_ has quit [Excess Flood]
adurity has joined #ruby
cisco has joined #ruby
charlies_ has quit [Ping timeout: 255 seconds]
philips_ has joined #ruby
Progster has quit [Ping timeout: 260 seconds]
xiphiasx_ has joined #ruby
bglusman has quit [Ping timeout: 252 seconds]
zeromodulus has quit [Remote host closed the connection]
dross has quit [Ping timeout: 248 seconds]
zeromodulus has joined #ruby
ananthakumaran has joined #ruby
nari has joined #ruby
adurity has quit [Remote host closed the connection]
adurity has joined #ruby
adurity has quit [Remote host closed the connection]
zeromodulus has quit [Ping timeout: 260 seconds]
adurity has joined #ruby
wrapids has joined #ruby
philips_ has quit [Excess Flood]
nwest has quit [Quit: Computer has gone to sleep.]
philips_ has joined #ruby
Bosma has quit [Ping timeout: 255 seconds]
Bosma has joined #ruby
sdwrage has joined #ruby
charlies_ has joined #ruby
lupine_85 has quit [Changing host]
lupine_85 has joined #ruby
hadees has quit [Quit: hadees]
Erdon has joined #ruby
oposomme has quit [Quit: Leaving...]
Draco_ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
mikeycgto has quit [Remote host closed the connection]
charlies_ is now known as charliesome
maletor has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
Maher4Ever has quit [Ping timeout: 240 seconds]
Maher4Ever has joined #ruby
jblack has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
zeromodulus has joined #ruby
MatthewGA has quit [Quit: Leaving]
Banistergalaxy has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 240 seconds]
wagle has joined #ruby
yoklov has quit [Quit: bye!]
mucker has quit [Ping timeout: 245 seconds]
Draco___ has joined #ruby
<cj3kim>
Hi. I'm using couchbase with rails. I want to know how to retrieve all key/value pairs with Ruby code. I'm asking because the couchbase ruby api did not cover it.
Draco_ has quit [Ping timeout: 240 seconds]
williamcotton_ has joined #ruby
davidpk has joined #ruby
williamcotton has quit [Ping timeout: 240 seconds]
williamcotton_ is now known as williamcotton
brianpWins has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
beakerman has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
cearls has joined #ruby
Banistergalaxy has joined #ruby
beakerman has joined #ruby
nerdy has quit [Quit: Computer has gone to sleep.]
mucker has joined #ruby
ananthakumaran has quit [*.net *.split]
nari has quit [*.net *.split]
kylemcgill has quit [*.net *.split]
mockra has quit [*.net *.split]
iamjarvo has quit [*.net *.split]
tommyvyo has quit [*.net *.split]
cakehero has quit [*.net *.split]
andrewhl has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
otters has quit [*.net *.split]
tfitts has quit [*.net *.split]
kevinbond has quit [*.net *.split]
IrishGringo has quit [*.net *.split]
amacgregor_osx has quit [*.net *.split]
hunglin has quit [*.net *.split]
pygospa has quit [*.net *.split]
AlbireoX`Laptop has quit [*.net *.split]
mfridh has quit [*.net *.split]
thomas has quit [*.net *.split]
ged has quit [*.net *.split]
asuka_ has quit [*.net *.split]
foolover has quit [*.net *.split]
musl has quit [*.net *.split]
jmcphers has quit [*.net *.split]
danheberden has quit [*.net *.split]
s0ber has quit [*.net *.split]
ij has quit [*.net *.split]
nahhh has quit [*.net *.split]
pradeepto has quit [*.net *.split]
thomasfedb has quit [*.net *.split]
pipopopo has quit [*.net *.split]
choffstein has quit [*.net *.split]
vitor-br has quit [*.net *.split]
TomJ has quit [*.net *.split]
tomeo has quit [*.net *.split]
thatRD has quit [*.net *.split]
_bart has quit [*.net *.split]
moeSeth has quit [*.net *.split]
manizzle has quit [*.net *.split]
Nisstyre has quit [*.net *.split]
ryanRT has quit [*.net *.split]
busybox42 has quit [*.net *.split]
canton7 has quit [*.net *.split]
ping-pong has quit [*.net *.split]
SeySayux has quit [*.net *.split]
G has quit [*.net *.split]
sspiff has quit [*.net *.split]
_br_ has quit [*.net *.split]
Shrink has quit [*.net *.split]
blast_hardcheese has quit [*.net *.split]
foolove has quit [*.net *.split]
chson has quit [*.net *.split]
icy` has quit [*.net *.split]
strcrzy has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
dnyy has quit [*.net *.split]
randym has quit [*.net *.split]
mroth has quit [*.net *.split]
[diecast] has quit [*.net *.split]
relix has quit [*.net *.split]
Azure has quit [*.net *.split]
babinho has quit [*.net *.split]
croz has quit [*.net *.split]
lolmaus has quit [*.net *.split]
etank has quit [*.net *.split]
CodeVision has quit [*.net *.split]
ohcibi has quit [*.net *.split]
Bonkers has quit [*.net *.split]
crodas has quit [*.net *.split]
derrida has quit [*.net *.split]
gentz has quit [*.net *.split]
fugit has quit [*.net *.split]
alta has quit [*.net *.split]
stroem has quit [*.net *.split]
dominikh has quit [*.net *.split]
mattp_ has quit [*.net *.split]
imami|afk has quit [*.net *.split]
ggreer has quit [*.net *.split]
tessi has quit [*.net *.split]
ksk has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
ub|k has quit [*.net *.split]
brianpWins has quit [*.net *.split]
Bosma has quit [*.net *.split]
strnx has quit [*.net *.split]
uris has quit [*.net *.split]
TheShadowFog has quit [*.net *.split]
vandemar has quit [*.net *.split]
luckman212 has quit [*.net *.split]
liluo has quit [*.net *.split]
clocKwize has quit [*.net *.split]
deadSnowman has quit [*.net *.split]
chriskk has quit [*.net *.split]
blumbri has quit [*.net *.split]
pvh has quit [*.net *.split]
aef has quit [*.net *.split]
kuranai|off has quit [*.net *.split]
jlwestsr has quit [*.net *.split]
mwilson_ has quit [*.net *.split]
zaiste has quit [*.net *.split]
schwap has quit [*.net *.split]
oddmunds has quit [*.net *.split]
Guest18939 has quit [*.net *.split]
undyingrage has quit [*.net *.split]
gregorg has quit [*.net *.split]
nullsign_ has quit [*.net *.split]
kichawa has quit [*.net *.split]
lobak_ has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
c0rn has quit [*.net *.split]
faulkner has quit [*.net *.split]
jhchabran has quit [*.net *.split]
Cork has quit [*.net *.split]
klipeto has quit [*.net *.split]
dekz has quit [*.net *.split]
undert has quit [*.net *.split]
hoelzro|away has quit [*.net *.split]
elliottcable has quit [*.net *.split]
rails has quit [*.net *.split]
sapht has quit [*.net *.split]
fowl has quit [*.net *.split]
eko has quit [*.net *.split]
gogiel has quit [*.net *.split]
linduxed has quit [*.net *.split]
Gate has quit [*.net *.split]
Taranis has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
stockholm has quit [*.net *.split]
anekos has quit [*.net *.split]
politoed_ has quit [*.net *.split]
barefoot has quit [*.net *.split]
rtl_ has quit [*.net *.split]
doktrin has quit [*.net *.split]
dubios has quit [*.net *.split]
ePirat has quit [*.net *.split]
ccooke has quit [*.net *.split]
dawtcawm has quit [*.net *.split]
fcoury has quit [*.net *.split]
denysonique has quit [*.net *.split]
notbrent has quit [*.net *.split]
`heliar has quit [*.net *.split]
brjannc has quit [*.net *.split]
alup has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
axiak has quit [*.net *.split]
wunz has quit [*.net *.split]
joelio has quit [*.net *.split]
xybre has quit [*.net *.split]
sj26 has quit [*.net *.split]
drizz has quit [*.net *.split]
__class__ has quit [*.net *.split]
yy has quit [*.net *.split]
Scub has quit [*.net *.split]
r126l has quit [*.net *.split]
Sigma00 has quit [*.net *.split]
kalleth has quit [*.net *.split]
conceal_rs_ has quit [*.net *.split]
jarednorman has quit [*.net *.split]
lectrick has quit [*.net *.split]
Aaton_off has quit [*.net *.split]
epitron has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
rlomax has quit [*.net *.split]
any-key has quit [*.net *.split]
cid404 has quit [*.net *.split]
nw has quit [*.net *.split]
maletor has quit [*.net *.split]
n_blownapart has quit [*.net *.split]
harcher has quit [*.net *.split]
Bosox20051 has quit [*.net *.split]
BeLucid_ has quit [*.net *.split]
AlbireoX has quit [*.net *.split]
adamkittelson has quit [*.net *.split]
shadoi has quit [*.net *.split]
Xethron has quit [*.net *.split]
shevy has quit [*.net *.split]
nzfish has quit [*.net *.split]
passbe has quit [*.net *.split]
darkc0met has quit [*.net *.split]
Paradox has quit [*.net *.split]
lusory has quit [*.net *.split]
ozzloy_ has quit [*.net *.split]
dv_ has quit [*.net *.split]
jcooley has quit [*.net *.split]
yonggu_ has quit [*.net *.split]
noyb has quit [*.net *.split]
_marvin has quit [*.net *.split]
yellow5 has quit [*.net *.split]
piggybox has quit [*.net *.split]
jhunter has quit [*.net *.split]
denstark has quit [*.net *.split]
jeedey has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
mvangala has quit [*.net *.split]
moted has quit [*.net *.split]
{^_^} has quit [*.net *.split]
jodell has quit [*.net *.split]
libertyprime has quit [*.net *.split]
neersighted has quit [*.net *.split]
fumbe has quit [*.net *.split]
itz has quit [*.net *.split]
xorspark has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
johnduhart has quit [*.net *.split]
Eiam has quit [*.net *.split]
tomku has quit [*.net *.split]
welterde has quit [*.net *.split]
altivec has quit [*.net *.split]
nuba has quit [*.net *.split]
taec has quit [*.net *.split]
nick_h has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
wagle has quit [*.net *.split]
jblack has quit [*.net *.split]
charliesome has quit [*.net *.split]
sdwrage has quit [*.net *.split]
Asher has quit [*.net *.split]
Axsuul has quit [*.net *.split]
bluOxigen has quit [*.net *.split]
werdnativ has quit [*.net *.split]
bier has quit [*.net *.split]
abdulkarim has quit [*.net *.split]
swistak35 has quit [*.net *.split]
manizzle_ has quit [*.net *.split]
tightwork has quit [*.net *.split]
Aenigma has quit [*.net *.split]
BrokenCog has quit [*.net *.split]
joshman_ has quit [*.net *.split]
JStoker has quit [*.net *.split]
Bofu2U has quit [*.net *.split]
drupin has quit [*.net *.split]
xbayrockx has quit [*.net *.split]
Quadlex has quit [*.net *.split]
ashp has quit [*.net *.split]
EPIK has quit [*.net *.split]
Guest68799 has quit [*.net *.split]
Poapfel has quit [*.net *.split]
jrist-afk has quit [*.net *.split]
sejo has quit [*.net *.split]
regedare1 has quit [*.net *.split]
ddv has quit [*.net *.split]
perryh has quit [*.net *.split]
grillo has quit [*.net *.split]
SirFunk has quit [*.net *.split]
xclite has quit [*.net *.split]
kartouch has quit [*.net *.split]
drPoggs has quit [*.net *.split]
ttilley has quit [*.net *.split]
Illiux has quit [*.net *.split]
ekaleido has quit [*.net *.split]
monokrome has quit [*.net *.split]
tekacs has quit [*.net *.split]
ezra has quit [*.net *.split]
theoros has quit [*.net *.split]
vaicine has quit [*.net *.split]
alexhanh has quit [*.net *.split]
dju has quit [*.net *.split]
cearls has quit [*.net *.split]
williamcotton has quit [*.net *.split]
fixl has quit [*.net *.split]
khakimov has quit [*.net *.split]
mxweas has quit [*.net *.split]
qko_ has quit [*.net *.split]
Rizzle has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
`brendan has quit [*.net *.split]
baphled has quit [*.net *.split]
friskd has quit [*.net *.split]
TheHypnotist-- has quit [*.net *.split]
jbw has quit [*.net *.split]
thone has quit [*.net *.split]
pk1001100011 has quit [*.net *.split]
x0F has quit [*.net *.split]
jeekl has quit [*.net *.split]
Ethan has quit [*.net *.split]
nacengineer has quit [*.net *.split]
ForSpareParts has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
cespare has quit [*.net *.split]
TheTFEF has quit [*.net *.split]
zrail has quit [*.net *.split]
skinny_m has quit [*.net *.split]
cynosure has quit [*.net *.split]
Caius has quit [*.net *.split]
yeltzooo7 has quit [*.net *.split]
Jelco has quit [*.net *.split]
ElderFain has quit [*.net *.split]
DefV has quit [*.net *.split]
vjt has quit [*.net *.split]
Kiall has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
Koshian has quit [*.net *.split]
marienz has quit [*.net *.split]
elspeth has quit [*.net *.split]
klaas has quit [*.net *.split]
uxp has quit [*.net *.split]
cout has quit [*.net *.split]
xargoon has quit [*.net *.split]
Drakevr has quit [*.net *.split]
pavelz_ has quit [*.net *.split]
joschi has quit [*.net *.split]
phreax has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
greyEAX has quit [*.net *.split]
kstephens has quit [*.net *.split]
rudle has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
patronus_ has quit [*.net *.split]
octarine has quit [*.net *.split]
iaj_ has quit [*.net *.split]
Whoop has quit [*.net *.split]
tris has quit [*.net *.split]
Tasser has quit [*.net *.split]
classix has quit [*.net *.split]
Mchl has quit [*.net *.split]
hackeron has quit [*.net *.split]
psino has quit [*.net *.split]
oddraisin has quit [*.net *.split]
RichGuk has quit [*.net *.split]
preller has quit [*.net *.split]
vDubG has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
companion has quit [*.net *.split]
snapcase has quit [*.net *.split]
TomRone has quit [*.net *.split]
jrbing has quit [*.net *.split]
naquad has quit [*.net *.split]
emdub has quit [*.net *.split]
zagabar has quit [*.net *.split]
Jb_ has quit [*.net *.split]
jbpros has quit [*.net *.split]
tomaw has quit [*.net *.split]
Bish has quit [*.net *.split]
telling has quit [*.net *.split]
yugui has quit [*.net *.split]
jasond has quit [*.net *.split]
KillerFox has quit [*.net *.split]
xsdg has quit [*.net *.split]
kloeri has quit [*.net *.split]
shaman42_ has quit [*.net *.split]
wang has quit [*.net *.split]
ixx has quit [*.net *.split]
mikalv has quit [*.net *.split]
AwesomeGarethMan has quit [*.net *.split]
er1c_ has quit [*.net *.split]
benwoody has quit [*.net *.split]
iosctr has quit [*.net *.split]
parus has quit [*.net *.split]
fred has quit [*.net *.split]
madhatter has quit [*.net *.split]
Shamgar has quit [*.net *.split]
AnswerGuy has quit [*.net *.split]
felipe has quit [*.net *.split]
Maher4Ever has quit [*.net *.split]
philips_ has quit [*.net *.split]
adurity has quit [*.net *.split]
noganex has quit [*.net *.split]
deryl has quit [*.net *.split]
mpereira has quit [*.net *.split]
wallerdev has quit [*.net *.split]
emmanuelux has quit [*.net *.split]
Derander has quit [*.net *.split]
CaptainJet has quit [*.net *.split]
akem has quit [*.net *.split]
Beoran__ has quit [*.net *.split]
weeb1e_ has quit [*.net *.split]
Ste11a has quit [*.net *.split]
stat1x has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
Boohbah has quit [*.net *.split]
johnernaut has quit [*.net *.split]
nimred has quit [*.net *.split]
neonlex has quit [*.net *.split]
rakm has quit [*.net *.split]
spanx has quit [*.net *.split]
Freijo has quit [*.net *.split]
matled has quit [*.net *.split]
MetaCosm has quit [*.net *.split]
dkannan has quit [*.net *.split]
davidboy has quit [*.net *.split]
patricksroberts has quit [*.net *.split]
snail has quit [*.net *.split]
folivora has quit [*.net *.split]
drmegahertz has quit [*.net *.split]
soulcake has quit [*.net *.split]
beandip has quit [*.net *.split]
mlue has quit [*.net *.split]
jshsu has quit [*.net *.split]
KarlHungus has quit [*.net *.split]
FlyingFoX has quit [*.net *.split]
__main__ has quit [*.net *.split]
lantins has quit [*.net *.split]
phrame has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
eighty4 has quit [*.net *.split]
joukokar has quit [*.net *.split]
ByteCrunch has quit [*.net *.split]
groundnuty has quit [*.net *.split]
end3r- has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
Kabaka has quit [Excess Flood]
Kabaka has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
NimeshNeema has joined #ruby
greyEAX has joined #ruby
kstephens has joined #ruby
benwoody has joined #ruby
rudle has joined #ruby
patronus_ has joined #ruby
Y_Ichiro has joined #ruby
octarine has joined #ruby
Whoop has joined #ruby
iaj_ has joined #ruby
Tasser has joined #ruby
tris has joined #ruby
jrbing has joined #ruby
Mchl has joined #ruby
hackeron has joined #ruby
psino has joined #ruby
RichGuk has joined #ruby
oddraisin has joined #ruby
cjk101010 has joined #ruby
preller has joined #ruby
vDubG has joined #ruby
snapcase has joined #ruby
companion has joined #ruby
TomRone has joined #ruby
zagabar has joined #ruby
naquad has joined #ruby
emdub has joined #ruby
Jb_ has joined #ruby
jbpros has joined #ruby
tomaw has joined #ruby
iosctr has joined #ruby
telling has joined #ruby
yugui has joined #ruby
jasond has joined #ruby
Bish has joined #ruby
kloeri has joined #ruby
KillerFox has joined #ruby
xsdg has joined #ruby
shaman42_ has joined #ruby
wang has joined #ruby
ixx has joined #ruby
mikalv has joined #ruby
AwesomeGarethMan has joined #ruby
er1c_ has joined #ruby
parus has joined #ruby
fred has joined #ruby
madhatter has joined #ruby
Shamgar has joined #ruby
AnswerGuy has joined #ruby
felipe has joined #ruby
Kabaka has quit [Excess Flood]
anekos has joined #ruby
barefoot has joined #ruby
politoed_ has joined #ruby
dubios has joined #ruby
ePirat has joined #ruby
doktrin has joined #ruby
dawtcawm has joined #ruby
ccooke has joined #ruby
notbrent has joined #ruby
rtl_ has joined #ruby
fcoury has joined #ruby
yy has joined #ruby
xybre has joined #ruby
sj26 has joined #ruby
Sigma00 has joined #ruby
axiak has joined #ruby
jarednorman has joined #ruby
joelio has joined #ruby
kalleth has joined #ruby
lectrick has joined #ruby
r126l has joined #ruby
wunz has joined #ruby
__class__ has joined #ruby
brjannc has joined #ruby
samuelkadolph has joined #ruby
Scub has joined #ruby
alup has joined #ruby
rlomax has joined #ruby
drizz has joined #ruby
conceal_rs_ has joined #ruby
`heliar has joined #ruby
Aaton_off has joined #ruby
epitron has joined #ruby
WanderingGlitch has joined #ruby
nw has joined #ruby
any-key has joined #ruby
cid404 has joined #ruby
EPIK has joined #ruby
sdwrage has joined #ruby
bluOxigen has joined #ruby
manizzle_ has joined #ruby
werdnativ has joined #ruby
Bofu2U has joined #ruby
swistak35 has joined #ruby
abdulkarim has joined #ruby
charliesome has joined #ruby
blast_hardcheese has joined #ruby
Guest68799 has joined #ruby
jblack has joined #ruby
Banistergalaxy has joined #ruby
drupin has joined #ruby
bier has joined #ruby
Axsuul has joined #ruby
Poapfel has joined #ruby
xbayrockx has joined #ruby
regedare1 has joined #ruby
Quadlex has joined #ruby
Asher has joined #ruby
BrokenCog has joined #ruby
sejo has joined #ruby
joshman_ has joined #ruby
tightwork has joined #ruby
jrist-afk has joined #ruby
ashp has joined #ruby
Aenigma has joined #ruby
ddv has joined #ruby
perryh has joined #ruby
ttilley has joined #ruby
alexhanh has joined #ruby
xclite has joined #ruby
vaicine has joined #ruby
kartouch has joined #ruby
Illiux has joined #ruby
ezra has joined #ruby
grillo has joined #ruby
dju has joined #ruby
ekaleido has joined #ruby
tekacs has joined #ruby
SirFunk has joined #ruby
theoros has joined #ruby
drPoggs has joined #ruby
classix has joined #ruby
manizzle has joined #ruby
nari has joined #ruby
kylemcgill has joined #ruby
ananthakumaran has joined #ruby
mockra has joined #ruby
tommyvyo has joined #ruby
cakehero has joined #ruby
andrewhl has joined #ruby
banisterfiend has joined #ruby
otters has joined #ruby
IrishGringo has joined #ruby
kevinbond has joined #ruby
tfitts has joined #ruby
AlbireoX`Laptop has joined #ruby
amacgregor_osx has joined #ruby
pygospa has joined #ruby
mfridh has joined #ruby
thomas has joined #ruby
ged has joined #ruby
ij has joined #ruby
asuka_ has joined #ruby
foolover has joined #ruby
musl has joined #ruby
jmcphers has joined #ruby
danheberden has joined #ruby
s0ber has joined #ruby
nahhh has joined #ruby
Kiall has joined #ruby
pradeepto has joined #ruby
thomasfedb has joined #ruby
pipopopo has joined #ruby
Kabaka has joined #ruby
brianpWins has joined #ruby
Bosma has joined #ruby
strnx has joined #ruby
TheShadowFog has joined #ruby
uris has joined #ruby
vandemar has joined #ruby
luckman212 has joined #ruby
liluo has joined #ruby
clocKwize has joined #ruby
deadSnowman has joined #ruby
chriskk has joined #ruby
kuranai|off has joined #ruby
pvh has joined #ruby
aef has joined #ruby
mwilson_ has joined #ruby
blumbri has joined #ruby
jlwestsr has joined #ruby
zaiste has joined #ruby
oddmunds has joined #ruby
Guest18939 has joined #ruby
undyingrage has joined #ruby
kichawa has joined #ruby
gregorg has joined #ruby
nullsign_ has joined #ruby
schwap has joined #ruby
lobak_ has joined #ruby
jmeeuwen has joined #ruby
flagg0204 has joined #ruby
faulkner has joined #ruby
c0rn has joined #ruby
jhchabran has joined #ruby
klipeto has joined #ruby
Cork has joined #ruby
dekz has joined #ruby
undert has joined #ruby
hoelzro|away has joined #ruby
elliottcable has joined #ruby
rails has joined #ruby
sapht has joined #ruby
eko has joined #ruby
gogiel has joined #ruby
fowl has joined #ruby
Gate has joined #ruby
Taranis has joined #ruby
linduxed has joined #ruby
Apocalypse has joined #ruby
stockholm has joined #ruby
cearls has joined #ruby
williamcotton has joined #ruby
fixl has joined #ruby
mxweas has joined #ruby
qko_ has joined #ruby
TheMoonMaster has joined #ruby
Rizzle has joined #ruby
`brendan has joined #ruby
baphled has joined #ruby
friskd has joined #ruby
TheHypnotist-- has joined #ruby
jbw has joined #ruby
thone has joined #ruby
pk1001100011 has joined #ruby
x0F has joined #ruby
jeekl has joined #ruby
nacengineer has joined #ruby
Ethan has joined #ruby
ForSpareParts has joined #ruby
zrail has joined #ruby
cespare has joined #ruby
TheTFEF has joined #ruby
skinny_m has joined #ruby
cynosure has joined #ruby
Caius has joined #ruby
yeltzooo7 has joined #ruby
Jelco has joined #ruby
Maher4Ever has joined #ruby
philips_ has joined #ruby
adurity has joined #ruby
noganex has joined #ruby
wallerdev has joined #ruby
Derander has joined #ruby
CaptainJet has joined #ruby
akem has joined #ruby
mpereira has joined #ruby
Beoran__ has joined #ruby
Ste11a has joined #ruby
weeb1e_ has joined #ruby
folivora has joined #ruby
stat1x has joined #ruby
SeanTAllen has joined #ruby
mlue has joined #ruby
snail has joined #ruby
Boohbah has joined #ruby
neonlex has joined #ruby
johnernaut has joined #ruby
nimred has joined #ruby
rakm has joined #ruby
spanx has joined #ruby
Freijo has joined #ruby
dkannan has joined #ruby
matled has joined #ruby
MetaCosm has joined #ruby
patricksroberts has joined #ruby
davidboy has joined #ruby
drmegahertz has joined #ruby
soulcake has joined #ruby
beandip has joined #ruby
jshsu has joined #ruby
KarlHungus has joined #ruby
FlyingFoX has joined #ruby
__main__ has joined #ruby
lantins has joined #ruby
phrame has joined #ruby
zz_chrismcg has joined #ruby
groundnuty has joined #ruby
joukokar has joined #ruby
eighty4 has joined #ruby
ByteCrunch has joined #ruby
end3r- has joined #ruby
Sp4rKy has joined #ruby
maletor has joined #ruby
n_blownapart has joined #ruby
Bosox20051 has joined #ruby
harcher has joined #ruby
BeLucid_ has joined #ruby
AlbireoX has joined #ruby
adamkittelson has joined #ruby
shadoi has joined #ruby
Xethron has joined #ruby
shevy has joined #ruby
darkc0met has joined #ruby
nzfish has joined #ruby
Paradox has joined #ruby
passbe has joined #ruby
lusory has joined #ruby
ozzloy_ has joined #ruby
jcooley has joined #ruby
dv_ has joined #ruby
yonggu_ has joined #ruby
noyb has joined #ruby
_marvin has joined #ruby
yellow5 has joined #ruby
jhunter has joined #ruby
denstark has joined #ruby
jeedey has joined #ruby
Kwpolska has joined #ruby
mvangala has joined #ruby
moted has joined #ruby
{^_^} has joined #ruby
jodell has joined #ruby
itz has joined #ruby
libertyprime has joined #ruby
neersighted has joined #ruby
xorspark has joined #ruby
fumbe has joined #ruby
yosafbridge has joined #ruby
johnduhart has joined #ruby
Eiam has joined #ruby
altivec has joined #ruby
tomku has joined #ruby
welterde has joined #ruby
nuba has joined #ruby
taec has joined #ruby
nick_h has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
ElderFain has joined #ruby
vjt has joined #ruby
DefV has joined #ruby
Koshian has joined #ruby
gianlucadv has joined #ruby
marienz has joined #ruby
elspeth has joined #ruby
uxp has joined #ruby
klaas has joined #ruby
cout has joined #ruby
xargoon has joined #ruby
Drakevr has joined #ruby
phreax has joined #ruby
joschi has joined #ruby
pavelz_ has joined #ruby
choffstein has joined #ruby
tomeo has joined #ruby
vitor-br has joined #ruby
thatRD has joined #ruby
TomJ has joined #ruby
moeSeth has joined #ruby
_bart has joined #ruby
18WABKY9O has joined #ruby
Nisstyre has joined #ruby
ryanRT has joined #ruby
busybox42 has joined #ruby
canton7 has joined #ruby
ping-pong has joined #ruby
G has joined #ruby
SeySayux has joined #ruby
sspiff has joined #ruby
_br_ has joined #ruby
Shrink has joined #ruby
foolove has joined #ruby
chson has joined #ruby
strcrzy has joined #ruby
Dreamer3 has joined #ruby
icy` has joined #ruby
nyuszika7h has joined #ruby
dnyy has joined #ruby
randym has joined #ruby
mroth has joined #ruby
[diecast] has joined #ruby
relix has joined #ruby
Azure has joined #ruby
babinho has joined #ruby
croz has joined #ruby
lolmaus has joined #ruby
etank has joined #ruby
CodeVision has joined #ruby
derrida has joined #ruby
Bonkers has joined #ruby
crodas has joined #ruby
fugit has joined #ruby
ohcibi has joined #ruby
gentz has joined #ruby
alta has joined #ruby
stroem has joined #ruby
mattp_ has joined #ruby
dominikh has joined #ruby
imami|afk has joined #ruby
ggreer has joined #ruby
tessi has joined #ruby
ksk has joined #ruby
SecretAgent has joined #ruby
ub|k has joined #ruby
lkba has joined #ruby
savage- has joined #ruby
Kiall is now known as Guest67996
cisco has quit [Quit: Leaving.]
Banistergalaxy has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
strnx has quit [Max SendQ exceeded]
darren has quit [Remote host closed the connection]
perryh is now known as perryh_away
perryh_away is now known as perryh
blast_hardcheese has quit [Changing host]
blast_hardcheese has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
choffstein has quit [Remote host closed the connection]
blast_hardcheese has quit [Excess Flood]
blast_hardcheese has joined #ruby
blast_hardcheese has quit [Changing host]
blast_hardcheese has joined #ruby
beakerman has quit [Remote host closed the connection]
MissionCritical has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
perryh is now known as perryh_away
<wrapids>
if variable #will return false if the variable is nil correct?
<CaptainJet>
yes
robbyoconnor has joined #ruby
<wrapids>
Hrm. It seems that split treats x="" as nil, while if test does not
denysonique has joined #ruby
cj3kim has joined #ruby
<CaptainJet>
use !!variable then
<wrapids>
CaptainJet, What exactly does that do?
<CaptainJet>
the first ! turns it into the opposite boolean
<CaptainJet>
and the second one reverts it back to it's real boolean
<CaptainJet>
so !!true is still true
<CaptainJet>
!!nil is false
<wrapids>
But "" is not a boolean
Kabaka has quit [Quit: be back in < 5 minutes]
ElderFain has quit [Read error: Connection reset by peer]
<CaptainJet>
try it out
Bosox20051 has quit [Remote host closed the connection]
<wrapids>
I think I'm just going to use regex for this...
<CaptainJet>
no the problem lies in the fact that the first split returns nil
<CaptainJet>
split will return nil if it doesn't split
<CaptainJet>
well i mean
<CaptainJet>
when you [1] it
<CaptainJet>
and it doesn't split
<wrapids>
oho right
<wrapids>
CaptainJet, I have a series of four split cases like this all based off of each other a bit
<CaptainJet>
if you tried that method with "hello:world"
tk__ has joined #ruby
<CaptainJet>
it would probably work
greasegum has quit [Ping timeout: 260 seconds]
<wrapids>
http://pastie.org/4298803 <- it does work, only on the ideal strings. I'm havingi a lot of trouble with stringis that it doesn't
<wrapids>
Oops sec
<wrapids>
that's incorrect, I started to play around with it and missed a cleanup spot
<wrapids>
Now it's accurate
strnx has joined #ruby
<wrapids>
I think the cases may be specific enough that I can do it with regex instead of split
<CaptainJet>
probably
<CaptainJet>
just watch out for those pesky nils
<wrapids>
Yeah...
<wrapids>
I figure my best bet would be to try to grab them independantly of each other from the string so that nothing depends on a possibly il value. That way if it's not an ideal string it will just not get anything, rather than try to grab data from a nil object.
<wrapids>
Would you say that's the best idea for this?
<CaptainJet>
i would say the best idea is keep unsuitable strings away from the method :P
<wrapids>
CaptainJet, I cannot
<CaptainJet>
That sounds inconvenient
<wrapids>
CaptainJet, I guess a regex could test the whole string for?
<CaptainJet>
you'd probably run into the same issue
<CaptainJet>
You could potentially wrap the whole thing in a begin/rescue block but
<wrapids>
Well, if regex can gaurentee that the pattern is there in this case ":x! #y :z, r is y v
<CaptainJet>
that's the easy way out
<wrapids>
where each x y z r v could be n characters in length
<CaptainJet>
yes you could just check that at the beginning and work with the results afterwards if they're suitable
<wrapids>
As long as it made sure those identifiers were there
monokrome has joined #ruby
monokrome has quit [Excess Flood]
zeromodulus has quit [Remote host closed the connection]
mrdodo has quit [Remote host closed the connection]
<wrapids>
I think ignoring split may be better in this case or I may lose information
<wrapids>
Actually I most likely will
<wrapids>
I could have the string :x! #y :z r is v is y is v : ! x : is
<wrapids>
I think I can do it with one split and 2 regex
mjb2k has joined #ruby
<wrapids>
actually, im not too familiar with regex, so I'd like to know if it can be used for this before I get to reading. Can regex be used to grab text between x character and y character?
<mjb2k>
yes
monokrome has joined #ruby
<CaptainJet>
of course
monokrome has quit [Excess Flood]
tewecske has joined #ruby
<wrapids>
Or well, x stringi an y string I suppose. But I imagine that's the same case.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Tasser>
Hanmac, hmm, yep, ruby is the meta package
hadees has joined #ruby
mascool has quit [Ping timeout: 244 seconds]
Erdon has quit [Ping timeout: 260 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Banistergalaxy has quit [Ping timeout: 264 seconds]
tomb_ has joined #ruby
WirIrrenUmher has joined #ruby
hadees has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
ttilley is now known as ttilley_off
punkrawkR has joined #ruby
<kylemcgill>
Tasser: if you have just installed it try doing a rehash, or directly calling it eg: /usr/local/bin/irb or something
<kylemcgill>
alt, you could `whereis irb; which irb` and see if it returns anything
<kylemcgill>
might be installed under root or something dump
<kylemcgill>
idk
monokrome has joined #ruby
monokrome has quit [Excess Flood]
tomb_ has quit [Quit: Computer has gone to sleep.]
cousine has joined #ruby
tomb_ has joined #ruby
cousine has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
blacktulip has quit [Remote host closed the connection]
mobilegamelabs has joined #ruby
blacktulip has joined #ruby
danielvdotcom is now known as danielvdot
danielvdot is now known as danielvdotcom
etehtsea has joined #ruby
kidoz has joined #ruby
WirIrrenUmher has quit [Quit: Leaving.]
adurity has quit [Quit: Leaving...]
mneorr has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
strnx has quit [Excess Flood]
danielvdotcom has quit [Quit: danielvdotcom]
danielvdotcom has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
fridim_ has joined #ruby
danielvdotcom is now known as danielvdotco
danielvdotco is now known as danielvdotcom
Spooner has joined #ruby
hmans has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
nari has joined #ruby
SolarisBoy has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
m_3 has quit [Remote host closed the connection]
manizzle_ has quit [Read error: No route to host]
manizzle has quit [Read error: Connection reset by peer]
18WABKY9O has quit [Read error: No route to host]
saschagehlich has quit [Quit: saschagehlich]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mneorr has quit [Quit: Leaving.]
zastaph has quit [Ping timeout: 264 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
m_3 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
strnx has joined #ruby
zastaph has joined #ruby
ramblex has joined #ruby
emmanuelux has joined #ruby
emmanuelux has quit [Read error: Connection reset by peer]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
arkiver has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
yugui_zzz is now known as yugui
mneorr has joined #ruby
Foxandxss has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mneorr1 has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
pygospa has quit [Read error: Operation timed out]
hmans has quit [Quit: Leaving...]
mneorr has joined #ruby
mneorr1 has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
pygospa has joined #ruby
rushed has joined #ruby
nai has quit [Remote host closed the connection]
Foxandxss has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
luckyruby has joined #ruby
lenny1 has joined #ruby
codezombie has quit [Quit: Leaving...]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<lenny1>
To me, it seems "obj.instance_eval { ... }" and "class << obj { ... }" are quite similar, i.e. the latter is merely syntactic sugar. Am I missing some crucial aspect of this?
ViperMaul has joined #ruby
<banisterfiend>
lenny1: i dont know what u mean by: class << obj { }
<banisterfiend>
that's not valid syntax ;)
<banisterfiend>
lenny1: i assume u mean: class << obj; end ?
<bnagy>
ok? Like I said the description you linked to makes no sense to me
<zeen>
new to rails.. when running rake on command line on my production it throws an db error because it's using the wrong environment. how do i make rake command line use production environment?
<Hanmac>
zeen: goto #rubyonrails
<macer1>
why no sense?
<zeen>
ah ok, i wasn't sure if rake was a ror thing. and stupidly the first thing i said was "new to rails" double oops :)
<fowl>
nothing makes sense to bnagy since he started doing bongs
Paradox has quit [Remote host closed the connection]
arkiver has joined #ruby
Ethan has quit [Ping timeout: 252 seconds]
vitor-br has quit [Quit: Saindo]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
KindOne has quit [Ping timeout: 240 seconds]
Ethan has joined #ruby
cloud|windoze has joined #ruby
deryl has joined #ruby
Freddie has joined #ruby
Markvilla has joined #ruby
punkrawkR has quit [Ping timeout: 264 seconds]
<macer1>
bnagy: how is "short" in there?
<macer1>
or can it be just int?
dangerousdave has quit [Quit: Leaving...]
yugui is now known as yugui_zzz
<bnagy>
shorts are usually 16 bits
cloud|windoze has quit [Quit: Leaving.]
luckyruby has quit [Remote host closed the connection]
<macer1>
int16?
<bnagy>
well, they disagree (the wiki and the pack string)
<bnagy>
so you'll have to work out which one is correct :)
<bnagy>
first thing is to make sure your struct is the correct length
<bnagy>
like i should be 20 bytes (apparently) if both strings are 'empty'
bier has quit [Ping timeout: 245 seconds]
Paradox has joined #ruby
beakerman has joined #ruby
<nobdraisentone>
How is it right to load and reload files in irb? I used to load with `require' but it seems wierd because I need to reopen irb to rerequire
<macer1>
bnagy: that's a good idea to test the length :)
<macer1>
I didn't think about it
davidpk has quit [Quit: Computer has gone to sleep.]
tiripamwe has joined #ruby
<macer1>
packet.to_binary_s.length ?
punkrawkR has joined #ruby
<Mon_Ouie>
nobdraisentone: Use #load
Freddie has quit [Ping timeout: 248 seconds]
punkrawkR is now known as Freddie
strife25 has joined #ruby
Markvilla has quit [Quit: Markvilla]
lxsameer has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
davidpk has joined #ruby
<nobdraisentone>
Ok
jbw has quit [Ping timeout: 252 seconds]
<nobdraisentone>
How can I group array elements with specific predicate?
<bnagy>
also check the same site for the docs on Enumerable
prtksxna has joined #ruby
<nobdraisentone>
I start from Array page and found nothing
<bnagy>
aka 'most awesome module evar'
sailias has joined #ruby
yugui_zzz is now known as yugui
<Hanmac>
Comparable is cool too, but not so cool then Enumerable :P
<iamjarvo>
bnagy how goes it?
<bnagy>
excellent, thanks
adeponte has quit [Read error: Connection reset by peer]
<bnagy>
been cooking curry, about to eat it
adeponte has joined #ruby
<iamjarvo>
nice
adeponte has quit [Read error: Connection reset by peer]
<iamjarvo>
red chicken curry?
adeponte has joined #ruby
<bnagy>
no, it's a northern curry, it is chicken though, but black chicken
ph^ has quit [Remote host closed the connection]
<bnagy>
gaeng jin som gai dam
<iamjarvo>
sweet
workmad3 has quit [Ping timeout: 248 seconds]
jastix has joined #ruby
shevy has quit [Ping timeout: 264 seconds]
Gavilan has joined #ruby
Muon has joined #ruby
<Muon>
hello
<Muon>
does Ruby have any form of interval timer?
jbw has joined #ruby
<Muon>
I can't seem to find anything short of creating a new thread and sleeping for the relevant interval
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
pskosinski has joined #ruby
baphled has joined #ruby
pskosinski has quit [Client Quit]
wvms has quit [Quit: wvms]
pskosinski has joined #ruby
<heftig>
Muon: if you want an event loop, look at eventmachine
<Muon>
heftig: I just want my program to run a function every 2 minutes, not full-blown event loop
<heftig>
then do the thread + sleep stuff
<Muon>
okay
<Muon>
thanks
darkc0met has joined #ruby
twinturbo has joined #ruby
yugui is now known as yugui_zzz
Draco_ has joined #ruby
Kisten has joined #ruby
shevy has joined #ruby
minijupe has joined #ruby
minijupe has quit [Client Quit]
VegetableSpoon has joined #ruby
Maher4Ever has quit [Ping timeout: 248 seconds]
Muon has left #ruby ["PLANE SHIFT!"]
cakehero has quit [Quit: Computer has gone to sleep.]
chichou has quit [Remote host closed the connection]
Draco___ has joined #ruby
beakerman has quit [Remote host closed the connection]
<pskosinski>
It looks like a bracket is not closed but all are closed.
Progster has joined #ruby
<canton7>
works fine from here, if I paste it into irb
vDubG has quit [Ping timeout: 265 seconds]
<canton7>
also, point of style: don't put a space between a function and its brackets -- it's ambiguous
<pskosinski>
Huh, so no idea why it can not work.
<pskosinski>
ca to not work * ? My English is poor
<pskosinski>
can *
<the-newsman>
is require ("modules1.rb") correct ?
<pskosinski>
Yes, parentheses are optional, afair
strife25 has quit [Quit: Computer has gone to sleep.]
<pskosinski>
I would write: require "modules1.rb"
<pskosinski>
But it shouldn't matter
<the-newsman>
man
<the-newsman>
i got the problem :)
<the-newsman>
u cannt belive it
VegetableSpoon has quit [Quit: Leaving]
vDubG has joined #ruby
KindTwo has joined #ruby
mockra has quit [Remote host closed the connection]
zastaph has joined #ruby
zastaph has left #ruby [#ruby]
Draco_ has joined #ruby
n_blownapart has joined #ruby
n_blownapart has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
Draco___ has quit [Ping timeout: 248 seconds]
rudle has quit [Ping timeout: 265 seconds]
KindTwo has quit [Changing host]
KindTwo has joined #ruby
KindTwo is now known as KindOne
rudle has joined #ruby
mahmoudimus has joined #ruby
cakehero has joined #ruby
heftig has quit [Ping timeout: 250 seconds]
beakerman has joined #ruby
<Hanmac>
the-newsman what was the problem?
yy is now known as awayy
timonv has quit [Remote host closed the connection]
tk__ has quit [Quit: ばいばい]
GeekOnCoffee has quit [Read error: Connection reset by peer]
Eldariof-ru has joined #ruby
GeekOnCoffee has joined #ruby
headius has joined #ruby
heftig has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
nicoulaj has joined #ruby
fridim_ has joined #ruby
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
verto|off is now known as verto
phpricardo has joined #ruby
phpricardo has left #ruby [#ruby]
workmad3 has joined #ruby
Beoran__ has quit [Ping timeout: 248 seconds]
nyuszika7h has joined #ruby
verto is now known as verto|off
mockra has joined #ruby
seanstickle has joined #ruby
baphled has quit [Ping timeout: 264 seconds]
Guest66781 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<n_blownapart>
hi I'm just learning git/heroku and somehow my gemfile picked up a "g" : jgquery=rails . I went back to the master branch, opened the Gemfile and Gemfile.lock, fixed it, ran bundle install "elsewhere," (not sure about this step) added, pushed, and still get this error: https://gist.github.com/b52d21095be6879812f8 thanks!
Draco___ has joined #ruby
Russell^^ has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
<n_blownapart>
^^ correction jgquery-rails
mockra has quit [Remote host closed the connection]
Draco_ has quit [Ping timeout: 264 seconds]
redgetan has joined #ruby
<pskosinski>
Hanmac: The problem was bad editor. ^^
<pskosinski>
Or maybe more bad course/book that doesn't explain what editor you should be using and why…
mockra has joined #ruby
baphled has joined #ruby
choffstein has quit [Remote host closed the connection]
ixti has joined #ruby
tchebb has quit [Read error: Connection reset by peer]
tchebb1 has joined #ruby
NorrinRadd has joined #ruby
<samuelkadolph>
n_blownapart: Your Gemfile.lock doesn't match your Gemfile
Beoran__ has joined #ruby
<samuelkadolph>
n_blownapart: Run bundle install and then commit the Gemfile.lock
<burgestrand>
n_blownapart: Also, you should never edit your Gemfile.lock manually unless you really know what you are doing. Use the bundler commands to up- and downgrade gems
Masulloi has joined #ruby
NorrinRadd has quit [Client Quit]
Norrin is now known as NorrinRadd
Masulloi has quit [Client Quit]
itz has quit [Quit: leaving]
<n_blownapart>
thanks so much...one sec.
<n_blownapart>
I screwed it up -- when I run bundle I get "there was an error in your gemfile Bunler cannot continue.
<n_blownapart>
bundler
<n_blownapart>
when I look at my Gemfile.lock file, there are two little lines under the parentheses in jquery-rails(2.0.2). this is on SublimeText2
<macer1>
bnagy: hi again
vDubG has quit [Ping timeout: 240 seconds]
minijupe has joined #ruby
<macer1>
My packet building is working but I can't send it correctly to tcp socket :/ do I need some to_binary?
<n_blownapart>
burgestrand: ^^
Ugo182 has joined #ruby
<Ugo182>
!list
<burgestrand>
n_blownapart: just checkout the Gemfile.lock from your git history before you edited it by hand
<n_blownapart>
thanks , but how do I do that?
<Ugo182>
hallo
<burgestrand>
n_blownapart: you find the commit where you changed it (you can view the history of the file with "git log -- Gemfile.lock"). Once you’ve found the SHA1-hash where you changed it by hand, do "git checkout SHA1^1 -- Gemfile.lock", substituting SHA1 for the actual SHA1-hash.
davidpk has quit [Quit: Computer has gone to sleep.]
<Ugo182>
!list
savage- has joined #ruby
Ugo182 has left #ruby [#ruby]
kevinbond has joined #ruby
<n_blownapart>
burgestrand: hmmmm, thanks I'll take a look
<burgestrand>
Once you’ve done that you have the Gemfile.lock checked out since before you edited by and. You’ll most likely want to just commit it after that.
tchebb1 has quit [Read error: Connection reset by peer]
tchebb has joined #ruby
vDubG has joined #ruby
leynos has quit [Quit: Off to dreams of Laserdiscs and Neo-Geos]
<burgestrand>
n_blownapart: it tells me you’ve never had Gemfile.lock stored in git before you changed it. Is that true?
<burgestrand>
(either that, or you never changed Gemfile.lock since the creation of your project).
fridim_ has quit [Ping timeout: 246 seconds]
kirun has quit [Ping timeout: 272 seconds]
chichou has joined #ruby
<n_blownapart>
burgestrand: I'm a beginner. I don't understand the whole picture of git quite yet. I just happened to see jgquery-rails in the Gemfile out of the corner of my eye, and it looked wrong, so I began to fiddle with it.
<burgestrand>
n_blownapart: if it said jgquery-rails in the first place, you’ve already fiddled with it beforehand. Is this your project or somebody elses?
<n_blownapart>
burgestrand: its the michael hartl tutorial for ror. I don't think I touched it...
NorrinRadd is now known as Norrin
<burgestrand>
n_blownapart: I’m not familiar with it. Does this mean you yourself did the "git init" of this project, probably quite recently?
<n_blownapart>
burgestrand: yes, I did the init a few days ago.
bluenemo has quit [Remote host closed the connection]
<n_blownapart>
burgestrand: do you know what those little lines mean under the parentheses in jquery-rails(2.0.0) ?
<burgestrand>
n_blownapart: you should probably be alright if you download the Gemfile.lock again and just replace your current Gemfile.lock with that one.
<burgestrand>
From wherever you got the tutorial files from.
<burgestrand>
n_blownapart: I don’t even know what you mean :)
<burgestrand>
n_blownapart: after you’ve done that, you should be able to do the "bundle install" thing.
wallerdev has joined #ruby
<n_blownapart>
thanks burgestrand . well, in my editor the jquery-rails listed in Gemfile.lock has these tiny little lines after a save....no other gems have that in their parentheses.
shadoi has quit [Quit: Leaving.]
<n_blownapart>
burgestrand: ^^ that is sublimeText2
<burgestrand>
I don’t know what a tiny little line is.
<n_blownapart>
burgestrand: underscores
<burgestrand>
n_blownapart: still don’t understand.
<n_blownapart>
burgestrand: directly under the parentheses in jquery-rails(2.0.0)....it looks wrong.
<n_blownapart>
burgestrand: as if it is telling me it doesn't like something.
codezombie has joined #ruby
<ryanf>
is your cursor on one of the parentheses by any chance?
<n_blownapart>
ryanf: no its after a save..they stay there like it is indicating an error.
adurity has joined #ruby
WirIrrenUmher has joined #ruby
zemanel has joined #ruby
minijupe has quit [Quit: minijupe]
ttilley_off is now known as ttilley
linoj has quit [Quit: linoj]
<n_blownapart>
thanks ...gotta get coffee. burgestrand ryanf
<burgestrand>
\o.
Harzilein has joined #ruby
<amacgregor_osx>
anyone has used the classifier gem ? I'm having a weird issue with the lsi classifer
tommyvyo has joined #ruby
<Paradox>
n_blownapart, gem install coffee
<n_blownapart>
burgestrand: pax (I used to be varreli last year. now napolean blownapart. I remember how helpful you were then. thanks!
<amacgregor_osx>
I get the following eerro ArgumentError: comparison of Float with Float failed
eph3meral has joined #ruby
<Paradox>
amacgregor_osx, obviously the comparison failed
<Paradox>
as for why
<Paradox>
smarter men than I may know
<burgestrand>
n_blownapart: ah yes, I do remember you
<n_blownapart>
Paradox: yes !
<n_blownapart>
burgestrand: really enjoying ruby/programming again after some hard times.
lkba has quit [Quit: Bye]
<burgestrand>
amacgregor_osx: if you show us an error, show us all of it. Paste the information on pastie, for example. There is lots of information in an error and you are hiding it from us.
<Harzilein>
hi
<burgestrand>
Harzilein: you can’t, as far as I know.
<burgestrand>
amacgregor_osx: I don’t understand the math behind it, but the error is most likely due to sorting a list of floats where one of the numbers is Infinity.
<Harzilein>
burgestrand: well, i imagine there is some table where i can look up all global variables from, so i could do globals[:":"] instead of $:. then maybe there is another way to access that label to allow me to check for aliases
<Harzilein>
s/that label/that table/
<burgestrand>
Harzilein: ah yes, have a look at the global_variables method.
<burgestrand>
It returns a list of symbols corresponding to each global.
Draco___ has quit [Ping timeout: 260 seconds]
<amacgregor_osx>
burgestrand: sounds logic, now have to figure out how to fix it
<burgestrand>
You can iterate through that and look things up in either direction.
redgetan has left #ruby ["Leaving"]
jgrevich has joined #ruby
Hien has quit [Quit: leaving]
<burgestrand>
Harzilein: not sure if there’s another way, but you can eval those symbols to get the value of the respective global.
tchebb has quit [Read error: Connection reset by peer]
mneorr has quit [Quit: Leaving.]
GoGoGarrett has joined #ruby
mneorr has joined #ruby
savage- has quit [Remote host closed the connection]
yoklov has joined #ruby
tchebb has joined #ruby
Maher4Ever has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
NoICE has joined #ruby
whitedawg has joined #ruby
linoj has joined #ruby
<nobdraisentone>
How can I implement some method in Enumerables?
<nobdraisentone>
I define it like that:
<nobdraisentone>
class Enumerables def palindrome? ; self == self.reverse ; end
<nobdraisentone>
end
<nobdraisentone>
But it's not work
<nobdraisentone>
> [1,2,3,2,1].palindrome?
<nobdraisentone>
NoMethodError: private method `palindrome?' called for [1, 2, 3, 2, 1]:Array from (irb):69 from :0
twinturbo has quit [Quit: twinturbo]
<Harzilein>
burgestrand: thanks, that worked. i used this: globals={} ; global_variables.each{|var| v=eval(var) ; id=v.object_id ; globals[id] ||= [] ; globals[id] << var}
<burgestrand>
nobdraisentone: it is because even if you add a method to a module, everything that has included that module won’t get the updated version.
<Harzilein>
burgestrand: now i need to make this (and turning it back into a lookup table by variable name) a bit more rubyish
mockra has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<nobdraisentone>
burgestrand: well, how it can be fixed?
headius has quit [Quit: headius]
<Hanmac>
nobdraisentone its "module Enumerable"
<burgestrand>
nobdraisentone: no idea. I’ve never needed to.
ryanf has quit [Quit: broken pipes |||]
<nobdraisentone>
Hanmac: thanks, exactly
tchebb has quit [Quit: Leaving.]
<Harzilein>
burgestrand: or i'll stop immediately because i can answer my question now: globals={} ; global_variables.each{|var| v=eval(var) ; id=v.object_id ; globals[id] ||= [] ; globals[id] << var} ; global_aliases={} ; globals.each{|k,v| v.each{|vname| global_aliases[vname]=v-[vname]}} ; global_aliases["$:"]
<Harzilein>
burgestrand: thanks :)
<burgestrand>
:)
tchebb has joined #ruby
mascool has joined #ruby
linoj has quit [Quit: linoj]
hunglin has quit [Quit: Leaving.]
headius has joined #ruby
rushed has quit [Quit: rushed]
zeromodulus has joined #ruby
ryanf has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
linoj has joined #ruby
<Hanmac>
nobdraisetone: i think to_enum(:zip,a.reverse_each).all?{|x,y|x==y} is better for bigger enumerable ...
bluOxigen has joined #ruby
linoj has quit [Client Quit]
<NoICE>
Hi guys. Anyone experienced with eventmachine?
<heftig>
Hanmac: that won't magically make #zip lazy
kidoz has quit [Quit: Ухожу я от вас]
<Harzilein>
NoICE: we won't know if we are knowledgeable enough to answer it until you ask it. i think there is also an eventmachine channel.
minijupe has joined #ruby
<Hanmac>
heftig do you have a better idea?
<heftig>
no
<heftig>
just pointing out that your to_enum is rather useless
<Hanmac>
it is not
<NoICE>
Harzilein: I'm just preparing sample scenario. Will post shortly.
minijupe has quit [Client Quit]
<heftig>
Hanmac: it's basically identical to zip(a.reverse_each).all?{|x,y|x==y}
<heftig>
just worse, because it makes more method calls
atmosx has joined #ruby
<atmosx>
hi
<heftig>
the only use it has would be passing the result of the to_enum around, because then the call to #zip would be delayed until the enumeration is actually started
<Hanmac>
heftig your from creates an big array ... my form does not
<heftig>
but you're just calling .all? on it immediately
<heftig>
Hanmac: just because it's hidden behind the enumerator doesn't mean the big array doesn't exist
<heftig>
as I said, to_enum doesn't magically make #zip lazy
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<NoICE>
Harzilein: thanks for directing me to EM channel, didn't know it exists. But maybe some of you guys got into this issue too, so I'll post it here too :) https://gist.github.com/3160481
<NoICE>
(look for comments at the bottom)
wargasm has joined #ruby
adurity has quit [Remote host closed the connection]
sepp2k has joined #ruby
sepp2k1 has quit [Quit: Leaving.]
tiripamwe has quit [Ping timeout: 255 seconds]
atmosx has quit [Ping timeout: 260 seconds]
<tommylommykins>
hmm
dangerousdave has joined #ruby
<tommylommykins>
from the gist of what I've read
<tommylommykins>
the only way to make rdebug work with 1.9.3 is to recompile it myself?
adurity has joined #ruby
seanstickle has quit [Quit: seanstickle]
workmad3 has joined #ruby
baphled has quit [Ping timeout: 245 seconds]
<Azure>
I have a hash that has nested hashes, which (the structure of the hash) gets reused many times.
<Azure>
What would be the best way to implement that in a struct?
CaptainJet has joined #ruby
ryanf has quit [Quit: broken pipes |||]
tomb_ has quit [Read error: Operation timed out]
baphled has joined #ruby
akem has quit [Ping timeout: 248 seconds]
WirIrrenUmher has quit [Ping timeout: 248 seconds]
tomb_ has joined #ruby
cleric has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
<cleric>
if User was a class and i used User.first, what would that return?
<macer1>
I need to convert 'asdasd' to hex byte string like \xaf\x10\x00\xdd
<macer1>
any ideas?
snearch has joined #ruby
lkba has joined #ruby
mjb2k has joined #ruby
<Hanmac>
cleric it depends on you. classes does not have a first method until you define it
workmad3 has quit [Ping timeout: 255 seconds]
pskosinski has quit [Remote host closed the connection]
adamkittelson has joined #ruby
<burgestrand>
macer1: … how do you get 'asdasd' to be \xAF\x10\x00\xDD?
<macer1>
"like"
<burgestrand>
There is no like.
zeromodulus has quit [Remote host closed the connection]
<burgestrand>
Stop like. :(
<macer1>
:(
<CaptainJet>
:9
<macer1>
ok how convert string to hex ._.
<Hanmac>
to_i(16) ?
<macer1>
"asdasd".to_i(16) => 10
<burgestrand>
macer1: "Hello".unpack("H*")
<macer1>
now split by two and add \x
<macer1>
:P
kevinbond has quit [Quit: kevinbond]
baphled has quit [Ping timeout: 252 seconds]
tiripamwe has joined #ruby
<NoICE>
tommylommykins: if that previous msg was for me: I've updated the gist with returned error message.. note that I'm using now EM aware resolver, but the message is the same either way https://gist.github.com/3160481
Rochefort has joined #ruby
Hien has joined #ruby
<NoICE>
I got a suggestion on #eventmachine that I should try out RC version of eventmachine.. so I'll know something more
<wrapids>
why don't regex work in irb?
adurity has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<NoICE>
I should've kept that app on threads :/
<macer1>
how to get two chars at a time?
<burgestrand>
macer1: doing that you get the same string. Or do you literally want "\\x48\\x64" etc?
<macer1>
yes
<burgestrand>
wrapids: it does.
<macer1>
\x
<macer1>
I am using bindata and I need to send string as hex :S
<wrapids>
burgestrand, On my box string[/regex/, 1] seemingly destroys both string and what I try set it as.
<wrapids>
string = "asdf" -> line = string[/a(.*?)f/, 1] -> results of both "line" and "string" are nothing. Not '' or "" or nil. Just does nothing.
<tommylommykins>
ah, /me was asking a separate question
<burgestrand>
macer1: do the same thing, pick the string out, iterate with each_character, group with each_slice, add it together and put a '\x' as a prefix, join :)
<burgestrand>
wrapids: what would that do?
<burgestrand>
wrapids: $line is never set anywhere
<wrapids>
In irb it will print it
<burgestrand>
wrapids: it’ll be nil
<wrapids>
In my example it is in fact set
<wrapids>
p line = does not set it while printing it?
ph^ has quit [Remote host closed the connection]
shadoi has quit [Client Quit]
<burgestrand>
Not for me, no.
<wrapids>
In my irb a simple line = this, line will print lin
<wrapids>
line*
schaerli has quit [Ping timeout: 264 seconds]
<NoICE>
bye
NoICE has left #ruby [#ruby]
<wrapids>
but it appears that regex do not work in my irb, even attempting your mehod
<burgestrand>
wrapids: your IRB is probably broken, or you are doing strange things.
<macer1>
how to add a prefix
<macer1>
"\x#{a}" => fail
<burgestrand>
macer1: "\\x"
tomeo has quit [Remote host closed the connection]
<icy`>
tightwork, and you have libxml2 installed on your system right?
<shevy>
macer1: canton7 solved your problem
<shevy>
macer1: try to give him a harder problem next time
<macer1>
more problems? ok!
<macer1>
I have a lot!
<tightwork>
icy`: yeah, on ubuntu 12 LTS; just did apt-get install libxml2 for safe measure and says already newest version
<WirIrrenUmher>
can someone recommend a good ruby book for people who already have programming experience?
workmad3 has quit [Ping timeout: 240 seconds]
<shevy>
this usually does not install the -dev header files tightwork
<shevy>
tightwork: try to find out the name of the .h files in debian... libxml2-dev or something like that
<shevy>
WirIrrenUmher: heyyyy german nick q:)
<macer1>
packfmt = '>bih%sshiibBB' % encuserlen I need to convert it from python :(
<macer1>
I tried all day...
<tightwork>
shevy: package is libxml2-dev; already newest version from apt-get
<icy`>
tightwork, idk what else to say... examine that apps.xml file again, if what you posted was just a snippet of the real thing
<macer1>
I mean
<shevy>
WirIrrenUmher: work through this http://pine.fm/LearnToProgram/?Chapter=00 - ignore the title, it really is an introduction to ruby. it is a bit basic, but there are things you learn. once you worked through, you should start writing a script in ruby on your own, or look for "learn ruby the hard way"
<macer1>
unpacking
<macer1>
unpack format
<WirIrrenUmher>
shevy: thanks
<shevy>
tightwork: ok
<shevy>
my libxml is at 2.8.0
<macer1>
ok maybe another way
pskosinski has joined #ruby
<macer1>
"\x01\x00\x00\x00\x1d\x00\x08\x00\x6d\x00\x61\x00\x63\x00\x65\x00\x72\x00\x62\x00\x6f\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" => this is actually packet that python is sending
<macer1>
I am sending same from ruby
<macer1>
but server doesn't understand
IrishGringo has joined #ruby
<macer1>
:/
<macer1>
No idea why
lkba has joined #ruby
<macer1>
doing this all day
TheShadowFog has joined #ruby
strife25 has joined #ruby
<tightwork>
shevy: apt-cache search libxml2 showing me 2.7.8 :-/
Rochefort has joined #ruby
Rochefort has quit [Remote host closed the connection]
rowaway1 has joined #ruby
werdnativ has joined #ruby
<rowaway1>
hello
<shevy>
tightwork: yeah. debian lags behind :)
<shevy>
I think it is only for people who don't want to have any extra work
<shevy>
libxml2 source code is ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
<shevy>
but usually debian hates people who compile things on their own.
Spooner has joined #ruby
<nobdraisentone>
How can I get array of some Class defined attr_accessors?
<icy`>
where s is what you posted above , "\x01\x00\x00\x00\x1d\x00\x08\x00\x6d\x00\x61\x00\x63\x00\x65\x00\x72\x00\x62\x00\x6f\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
<macer1>
yes yes...full support for ruby 1.9 encodings
<macer1>
of course
kennyvb has joined #ruby
NoICE has left #ruby [#ruby]
workmad3 has quit [Read error: Operation timed out]
<macer1>
well it is ruby fail
<macer1>
it can't split a utf16 string
<macer1>
if the encoding of *all* script isn't utf16
hanp has joined #ruby
<macer1>
I need to workaround this by encoding every single char into hex form
<macer1>
"hello" -> utf16 -> bytes -> string
<Hanmac>
macer1why not like this? "hello".encode("UTF-16BE").split("".encode("UTF-16BE"))
<hanp>
I sometimes override addActionListener in Swing. Is there a way that I can pass to this overriden method an ActionListener object *or* a block and still have JRuby coerce that block ?
<macer1>
=> ["h", "e", "l", "l", "o"]
<macer1>
emm
<macer1>
no...
<macer1>
ah
<macer1>
you mean that
<macer1>
but it is a gem
<macer1>
that must work with *all* encodings
<macer1>
not hardcode a single one
savage- has joined #ruby
<macer1>
stdlib should encode the split arg with the string encoding
amacgregor_osx has quit [Read error: Operation timed out]
<Hanmac>
string.split("".encode(string.encoding))
<macer1>
awesome
<macer1>
now add this to stdlib
<macer1>
and add upstream
<Mon_Ouie>
We already have better
<Mon_Ouie>
String#each_char
<Hanmac>
make a change request :P
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<Hanmac>
and each_codepoint :P
<macer1>
ehh so I need to fork a gem just to have the fckin encoding correct
<macer1>
it's codebase haven't been updated from 2010 so I don't think author is accepting pull's
<macer1>
it is no sense, I just need to hex the string
<macer1>
"hello".encode("UTF-16BE").force_encoding("binary") => ok
noyb has quit [Quit: Leaving.]
stephenjudkins_ has joined #ruby
<macer1>
ehh
<macer1>
fckin gem
<macer1>
and it's crappy encoding
<macer1>
it is broking encoding
<macer1>
I need to encode it from ascii-8bit to utf-16be and then to binary...
heftig has quit [Read error: Operation timed out]
[[thufir]] has joined #ruby
Foxandxss has quit [Quit: Saliendo]
<Hanmac>
you are the one, that uses an outdated gem :P
stephenjudkins has quit [Ping timeout: 255 seconds]
stephenjudkins_ is now known as stephenjudkins
verto|off is now known as verto
itnomad has quit [Quit: Leaving]
<macer1>
wat?
<macer1>
so what is the alternative for bindata?
<macer1>
bnagy if I remember correctly pointed me to bindata
abdulkarim has quit [Excess Flood]
abdulkarim has joined #ruby
friskd has joined #ruby
friskd has quit [Client Quit]
<macer1>
ehh I will try to make my own Bindata::String version
<macer1>
it is possible without gem modifying i think
GoGoGarrett has quit [Remote host closed the connection]
jdar has quit [Quit: jdar]
<hanp>
Java methods that take an interface type can be passed either an object implementing that interface or a block, can I get similar behavior for (in Ruby) overriden Java methods ?
mockra has joined #ruby
ePirat_ has quit [Ping timeout: 245 seconds]
mockra has quit [Remote host closed the connection]
perryh_away is now known as perryh
heftig has joined #ruby
Tomasso has joined #ruby
<Hanmac>
hanp: i think you should look at #jruby ... or what do you mean?
<hanp>
Hanmac: damnit :), I thought I was on #jruby, sorry
jjbohn is now known as jjbohn|afk
thone has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
hanp has left #ruby [#ruby]
jdar has joined #ruby
<jdar>
I'm trying to detect "»" in a string. keep getting "incompatible encoding regexp" when i try an ascii-based regex
<jdar>
is there a better way?
thone_ has quit [Ping timeout: 264 seconds]
<stephenjudkins>
jdar: insert `# coding: utf-8` at the top of the source file
sdwrage has quit [Quit: geekli.st/programmer]
<macer1>
encoding*
<jdar>
thanks! sounds like magic.
<stephenjudkins>
macer1: thanks
<stephenjudkins>
jdar: it is pretty nasty.
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
andrewhl has quit [Remote host closed the connection]
<shevy>
if I have a file called "foo.rb" sitting in /tmp, what is the best way to obtain the absolute path to it?
darren has joined #ruby
blumbri has quit [Remote host closed the connection]
<CaptainJet>
is the foo.rb file the file that is run?
nocturne7 has joined #ruby
<jdar>
huzzah!
nocturne7 has left #ruby ["Leaving"]
lamba has joined #ruby
<jdar>
shevy: you might explore the underutilized Pathname class and the method 'realpath'. but if CaptainJet is right, probably just easier to use File.expand_path and __FILE__
sdwrage has joined #ruby
<lamba>
do you have to be root to run a rakefile ? I'm trying to run it as a normal user. google isn't giving me much searching for the error.
<Mon_Ouie>
The magic comment about encoding works with both coding and encoding
sridatta has joined #ruby
<jdar>
Mon_Ouie: good to know!
<jdar>
lamba: does your user have privileges? `ls -l rakefile`
<Mon_Ouie>
It looks like your installation has a problem if you're not allowed to read the content of your gems
<macer1>
lamba: use rvm
<lamba>
Mon_Ouie: ok. this is from after straight yum install rubygem-rake.
pcleddy has joined #ruby
savage- has quit [Remote host closed the connection]
<jdar>
lamba: is puppet running as a user 'puppet' or anything?
emmanuelux has joined #ruby
<lamba>
on the server yea, but this rake file should just be doing a git pull. which this user has rights to do.
<lamba>
ill try changing it to do an ls just to check
ringotwo has joined #ruby
<lamba>
nah, its nothingt o do with the ssh or puppet. even "sh ls" fails
hunglin has quit [Quit: Leaving.]
Bosma has joined #ruby
hunglin has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
balki_ has joined #ruby
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
<Maher4Ever>
Hey, I have an extention gem and I would like it to only compile on machines that have ruby > 1.9 installed. How can I achieve that with extconf.rb? The only thing I can think of is have_const('HAVE_RUBY_ENCODING_H')
balki has quit [Ping timeout: 240 seconds]
<lamba>
ok. fixed with setting 644 on the rubygem. dunno why yum didnt set that right. Oh well
Vert has quit [Ping timeout: 252 seconds]
<burgestrand>
Maher4Ever: you could check the ruby version and abort compilation during precompilation. As far as checking it during extconf goes, isn’t it enough to just check RUBY_VERSION and abort if it’s not correct?
drupin is now known as zz_drupin
pcleddy has left #ruby [#ruby]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
jimeh has joined #ruby
<Maher4Ever>
burgestrand: That's indeed possible. I almost forgot that extconf.rb was just a plain ruby script :). Thanks
<burgestrand>
:)
shellox_ has joined #ruby
workmad3 has joined #ruby
afd__ has quit [Ping timeout: 260 seconds]
<macer1>
bnagy: ping
hunglin has quit [Quit: Leaving.]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
cleric has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120717110313]]
maletor has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
emmanuelux has quit [Ping timeout: 252 seconds]
baphled has joined #ruby
<Hanmac>
Maher4Ever you could check the ruby version in the gem spec too
cantonic has quit [Quit: cantonic]
vDubG has quit [Ping timeout: 240 seconds]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
GoGoGarrett has quit [Remote host closed the connection]
rowaway1___ has quit [Quit: rowaway1___]
Vert has joined #ruby
krz has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Russell^^ has quit [Quit: Russell^^]
velikasha has joined #ruby
Nisstyre has joined #ruby
Z_Mass has quit [Quit: Leaving]
nicoulaj has quit [Remote host closed the connection]
jbohn has joined #ruby
mikepack has joined #ruby
strife25 has joined #ruby
malcolmva has joined #ruby
jjbohn has quit [Ping timeout: 260 seconds]
snapcase has quit [Ping timeout: 265 seconds]
kirun_ has quit [Quit: Client exiting]
kevinbond has quit [Quit: kevinbond]
rowaway1 has joined #ruby
bakineggs has joined #ruby
Criztian has quit [Remote host closed the connection]
justsee is now known as justsee|away
Draco_ has joined #ruby
hrs_ has quit [Read error: Connection reset by peer]
hrs__ has joined #ruby
TorpedoSkyline has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
baroquebobcat has quit [Quit: baroquebobcat]
<Maher4Ever>
Does anyone know if there is a way in rubygems to change a line in one of the files before the gem gets built. I see that rubygems provide a hook for post_build, but I can't seem to find one for pre_build.
fridim_ has quit [Ping timeout: 246 seconds]
<Maher4Ever>
I could of course do it in the extconf.rb, but that would mean the changes I want to do would be run on each machine that installs the gem! I don't think that this is the optimal solution
jimeh has joined #ruby
<canton7>
build your gem using a rake task instead maybe?
strife25 has quit [Ping timeout: 260 seconds]
nopolitica has joined #ruby
strife25 has joined #ruby
<Maher4Ever>
canton7: Great suggestion! It seems the best way to go. thanks :)
<canton7>
i've seen people fully define their gemspec inside a rakefile before - never seen the point until now
hrs__ has quit [Quit: Computer has gone to sleep.]
jbohn has quit [Quit: Leaving...]
<bakineggs>
If I have a file predict.rb that has the contents "def predict(foo, bar, baz); do stuff; end", how could I make a class SavedPredictionModel such that I can call SavedPredictionModel.new('predict.rb') and the created object will have the predict method from predict.rb as an instance method?
stephenjudkins_ has joined #ruby
<bakineggs>
I was hoping something along the lines of "class SavedPredictionModel; def initialize(path); require path; end end" would work (it didn't). I've been toying around with different things, but can't figure anything out.
<bakineggs>
oh, actually, i just figured it out
deryl has quit [Quit: deryl]
monokrome has joined #ruby
<bakineggs>
eval File.read path
monokrome has quit [Excess Flood]
zeen has quit [Ping timeout: 255 seconds]
ramblex has quit [Quit: ramblex]
fayimora has joined #ruby
<shevy>
ewww eval
wallerdev has quit [Ping timeout: 248 seconds]
manizzle has quit [Remote host closed the connection]
<shevy>
canton7 dunno, I always found Rakefiles ugly so far :(
stephenjudkins has quit [Ping timeout: 255 seconds]
stephenjudkins_ is now known as stephenjudkins
jdar has quit [Quit: jdar]
baroquebobcat has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<canton7>
shevy, they are dead handy though
monokrome has joined #ruby
monokrome has quit [Excess Flood]
abra has quit [Ping timeout: 276 seconds]
<macer1>
ehh
<macer1>
anyone using bindata?
abra has joined #ruby
bradhe has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
wallerdev has joined #ruby
<canton7>
I was trying to find that extension the other day -- cheers!
strife25 has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
velikasha has left #ruby [#ruby]
g_rotbart has joined #ruby
mneorr has joined #ruby
strife25 has joined #ruby
ukd1 has joined #ruby
ph^ has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 255 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mascool has quit [Ping timeout: 240 seconds]
ukd1 has quit [Quit: leaving]
ukd1 has joined #ruby
thecreators has joined #ruby
baroquebobcat has quit [Client Quit]
halan has joined #ruby
mahmoudimus has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
td123 has quit [Quit: WeeChat 0.3.8]
adeponte has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mxweas_ has joined #ruby
kevinbond has joined #ruby
jjang has joined #ruby
thecreators has quit [Quit: thecreators]
hunglin has joined #ruby
mneorr has quit [Quit: Leaving.]
stephenjudkins has quit [Quit: stephenjudkins]
rippa has quit [Ping timeout: 260 seconds]
abra has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
GoGoGarrett has joined #ruby
abra has joined #ruby
bosphorus has joined #ruby
mascool has joined #ruby
nari has quit [Ping timeout: 264 seconds]
etehtsea has quit []
mxweas_ has quit [Quit: Computer has gone to sleep.]