apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
qko_ has joined #ruby
<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]
Ontolog has joined #ruby
morsik has left #ruby [#ruby]
Ontolog has left #ruby [#ruby]
fantazo has joined #ruby
justsee has joined #ruby
mxweas has joined #ruby
seanstickle has joined #ruby
k_89 has quit [Ping timeout: 256 seconds]
sailias has joined #ruby
greasegum has joined #ruby
justsee has quit [Quit: Leaving...]
sdwrage has joined #ruby
sdwrage has quit [Client Quit]
stephenjudkins has quit [Quit: stephenjudkins]
cuppsy has quit [Ping timeout: 276 seconds]
otters has quit [Ping timeout: 240 seconds]
weasels has joined #ruby
mucker has quit [Ping timeout: 246 seconds]
mpereira has quit [Ping timeout: 264 seconds]
fearoffish has joined #ruby
bradhe has joined #ruby
fearoffish has quit [Client Quit]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Markvilla has joined #ruby
kirun has quit [Quit: Client exiting]
sdwrage has joined #ruby
wrapids has joined #ruby
weasels has quit [Quit: WeeChat 0.3.8]
<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]
sdwrage has left #ruby [#ruby]
ghanima has joined #ruby
banisterfiend has joined #ruby
Draco_ has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Draco___ has quit [Ping timeout: 260 seconds]
mascool has quit [Ping timeout: 240 seconds]
deryl has quit [Quit: deryl]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
deryl has joined #ruby
MatthewGA has joined #ruby
<mengu> hi all. i'm conducting a survey on ruby orm usage, please take minute and answer http://www.surveymonkey.com/s/35TDSSJ if you are instered in
nwest_ has joined #ruby
awayy is now known as yy
tommyvyo has joined #ruby
adurity has quit [Remote host closed the connection]
zemanel has joined #ruby
zemanel has quit [Client Quit]
Gab0 has quit [Remote host closed the connection]
andrewhl has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
nwest_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
vandemar has quit [Quit: leaving]
nwest_ has joined #ruby
cakehero has joined #ruby
zodiac1111 has joined #ruby
vandemar has joined #ruby
nwest_ has quit [Client Quit]
nwest has joined #ruby
Markvilla has quit [Quit: Markvilla]
zodiac1111 has quit [Ping timeout: 248 seconds]
ghanima has quit [Ping timeout: 260 seconds]
TheShadowFog has joined #ruby
mengu has quit [Remote host closed the connection]
uris has quit [Quit: leaving]
uris has joined #ruby
mrdodo has joined #ruby
td123 has joined #ruby
harcher has quit [Quit: leaving]
lupine_85 has quit [Excess Flood]
cloud|windoze has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
lupine_85 has joined #ruby
jumpingcloud has quit [Quit: Leaving]
zz_drupin is now known as drupin
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
kylemcgill has quit [Remote host closed the connection]
justsee has joined #ruby
ghanima has joined #ruby
kylemcgill has joined #ruby
pu22l3r has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
bglusman has joined #ruby
yugui_zzz is now known as yugui
sailias has quit [Ping timeout: 260 seconds]
kylemcgill has quit [Remote host closed the connection]
harcher has joined #ruby
philips_ has quit [Excess Flood]
verto is now known as verto|off
khakimov has joined #ruby
philips_ has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
noganex has quit [Ping timeout: 248 seconds]
noganex has joined #ruby
r0bby is now known as robbyoconnor
zodiac1111 has joined #ruby
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]
<CaptainJet> p !!""
<wrapids> did
prtksxna has joined #ruby
<wrapids> moment
<CaptainJet> you should get true
yugui is now known as yugui_zzz
piggybox has joined #ruby
<wrapids> Oh
<banisterfiend> piggybox: nice name
<wrapids> Hrm.
<wrapids> That makes sense
<wrapids> !!!test?
JStoker has joined #ruby
cearls has quit [Quit: cearls]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<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
Kabaka has joined #ruby
<drupin> https://gist.github.com/3158635 cannot install bundler
<wrapids> Hrm...
<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.
<CaptainJet> here you can try
<CaptainJet> http://rubular.com/
<CaptainJet> i usually use that when i work with regex
<wrapids> What is the second field / field / field then string
<wrapids> For modifiers such as global?
mahlon has joined #ruby
Hanmac1 is now known as Hanmac
<CaptainJet> the second field is for regex options
<wrapids> Oh wow, that's surprisingly easier with regex.
<wrapids> this's*
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<wrapids> I'm getting some unexpected results, my regex is working fine in rubular, but no in irb. Let me make it a little more pc and I'll post it
perryh_away is now known as perryh
<wrapids> In rubular that expresion matches :x!
andrewhl has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<CaptainJet> does it work regularly?
<wrapids> CaptainJet, Regularly?
<CaptainJet> in your real code
<wrapids> Haven't tried that particular one in any yet
<wrapids> Well, something very similar
<CaptainJet> that would work as long as x doesn't have a "!" in it
savage- has quit [Remote host closed the connection]
<wrapids> perhaps the ,1 is the issue?
<wrapids> CaptainJet, x will never have a shebang in it
<wrapids> it is limited to -_[A-Za-z0-0]
<wrapids> I'm curious about why it's destroying line
<wrapids> It's not niling it, it's not changing it. It's just making it not work
nari has quit [Ping timeout: 255 seconds]
<wrapids> An irb issue?
<CaptainJet> [/regexp/] returns an array
<CaptainJet> what you're seeing printed out is the whole array
<CaptainJet> [":", "x", "!"]
<wrapids> How would lin1 = line[//] modify line?
adamkittelson has quit [Remote host closed the connection]
<wrapids> Correct, where , 1] would give me thid middle value I desire
<CaptainJet> wait
<CaptainJet> sorry i'm rusty
<CaptainJet> with regexp
<wrapids> CaptainJet, You're correct about the array.
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<CaptainJet> you may want to use .match
monokrome has joined #ruby
<CaptainJet> instead of [/regex/]
monokrome has quit [Excess Flood]
<wrapids> CaptainJet, I'll take a look at it, gotta run for the moment
<wrapids> Thank you for the help I'll be around
<CaptainJet> I may be gone when you get back actually
<CaptainJet> It's pretty late, I should really sleep
CaptainJet has quit []
savage- has joined #ruby
subbyyy has quit [Quit: Leaving.]
mjb2k has quit [Quit: Leaving.]
dangerousdave has joined #ruby
rippa has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
uris has quit [Quit: leaving]
mockra has quit [Remote host closed the connection]
mucker has quit [Read error: Connection reset by peer]
yakko has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
flak has joined #ruby
rippa has quit [Read error: Connection reset by peer]
flak is now known as Guest91676
mrdodo has joined #ruby
Jackneill has joined #ruby
Jackneill is now known as Guest66781
<shevy> i = 'foobar.yml'; i = i[0, i.index('.')] if i.include? '.'
<shevy> hmm I suppose there is no nicer way to slice up to the first '.' character found?
oposomme has joined #ruby
k_89 has joined #ruby
codezombie has joined #ruby
omry has quit [Read error: Operation timed out]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Draco___ has quit [Ping timeout: 260 seconds]
Guest91676 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Draco_ has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
rippa has joined #ruby
<Hanmac> shevy are you mean this? File.basename("foobar.yml",".yml")
strife25 has joined #ruby
choffstein has joined #ruby
<shevy> hmm that's actually longer
arkiver has joined #ruby
<Hanmac> shevy:or "foobar.yml"[/(\w+)[^.]/]
<Hanmac> but this may not 100% currect
<cj3kim> hi
<cj3kim> anyone use couchbase for their rails app here?
<Hanmac> no one uses rails there :P
<Hanmac> you are looking for #rubyonrails
choffstein has quit [Ping timeout: 264 seconds]
n_blownapart has quit [Remote host closed the connection]
Bosma has quit [Ping timeout: 248 seconds]
savage- has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
AlbireoX`Laptop has quit [Remote host closed the connection]
yy is now known as awayy
monokrome has joined #ruby
monokrome has quit [Excess Flood]
spinagon has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
spinagon has quit [Client Quit]
oposomme is now known as oposomme|away
spinagon has joined #ruby
DarthGandalf has quit [Quit: Bye]
DarthGandalf has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
rippa has quit [Ping timeout: 252 seconds]
dont_bother has quit [Quit: Leaving]
friskd has quit [Ping timeout: 252 seconds]
sdwrage has left #ruby [#ruby]
wallerdev has quit [Quit: wallerdev]
<wrapids> Doesn't look like I can use #{} in a regex, any methods of slipping a variable in there?
kylemcgill has quit [Ping timeout: 255 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
perryh is now known as perryh_away
<Mon_Ouie> Sure you can
<Mon_Ouie> /foo#{"bar"}/ #=> /foobar/
<wrapids> Ah, just my IDE not highlighting it correctly?
<wrapids> Ah cool
<wrapids> My IDE doesn't recognize it lilke it does in "", but I"m glad that it does
<Mon_Ouie> Although, you should be careful about escaping whatever you interpolate when needed
strife25 has quit [Quit: Computer has gone to sleep.]
spinagon has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
bradhe has quit [Remote host closed the connection]
Draco_ has quit [Remote host closed the connection]
justsee has joined #ruby
bradhe has joined #ruby
tiripamwe has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
arkiver has quit [Quit: Leaving]
yugui_zzz is now known as yugui
bradhe has quit [Ping timeout: 248 seconds]
<Paradox> Mon_Ouie, does that trick work with %r regexes?
mahmoudimus has quit [Quit: Computer has gone to sleep.]
strife25 has joined #ruby
mascool has joined #ruby
mahmoudimus has joined #ruby
Ionic` has quit [Ping timeout: 260 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
prtksxna has quit [Remote host closed the connection]
mrdodo has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
crates has quit [Remote host closed the connection]
<Mon_Ouie> I think so, you could just try it
crates has joined #ruby
<Mon_Ouie> (Yep, it does)
<Paradox> one thing i've been meaning to ask you
<Paradox> if i swap my system readline config to vi mode
<Paradox> will coolline update as well?
<Mon_Ouie> No, Coolline uses its own key bindings and doesn't support vi input mode
RudyValencia has joined #ruby
<Mon_Ouie> I wanted to add that feature, but it seems checking when the user presses escape is rather uneasy in a terminal (it's ambiguous)
shadoi has quit [Quit: Leaving.]
<Paradox> damn
<Paradox> i dislike emacs keybindings
<Paradox> but ah well
shadoi has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
jarred has quit [Quit: jarred]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
drmegahertz has quit [Ping timeout: 248 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
drmegahertz has joined #ruby
LowKey has joined #ruby
justsee is now known as justsee|away
igotnolegs has quit [Quit: Computer has gone to sleep.]
kylemcgill has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
robbyoconnor has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
groundnuty has quit [Ping timeout: 248 seconds]
mahdigad has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
robbyoconnor has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mahdigad has left #ruby [#ruby]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mahdigad has joined #ruby
sepp2k has joined #ruby
<banisterfiend> Mon_Ouie: btw, is it true that suppositories is the preferred way for french to take medication?
mahdigad is now known as bleh
<Mon_Ouie> I heard that too on TV
tomb_ has joined #ruby
bleh has left #ruby [#ruby]
WirIrrenUmher has joined #ruby
<banisterfiend> Mon_Ouie: what was teh reason, did you find out? or do they just enjoy the feeling?
<rking> Mon_Ouie: You mean you're being a wimp about it. =P
<rking> (Simple solution: Just don't worry about Alt+_ keys. It's all Escape over here. Better solution: use that libtermkey lib I linked to)
<rking> And am relinking-to: http://www.leonerd.org.uk/code/libtermkey/
zastaph has joined #ruby
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
napolean_blownap has joined #ruby
napolean_blownap has left #ruby [#ruby]
<Mon_Ouie> banisterfiend: I think it's just because for some reason medicine gets prescribed that way
<banisterfiend> Mon_Ouie: not the same for belgian french?
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<Mon_Ouie> I don't think so
mucker has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
justsee|away is now known as justsee
awayy is now known as yy
ananthakumaran has quit [Ping timeout: 255 seconds]
ananthakumaran has joined #ruby
kevinbond has quit [Quit: kevinbond]
strnx has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monkegjinni has joined #ruby
billiamii has quit [Read error: Connection reset by peer]
omryy has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
kuranai|off is now known as kuranai
banisterfiend has quit [Ping timeout: 255 seconds]
nadirvardar has joined #ruby
atmosx has joined #ruby
strnx has joined #ruby
nobdraisentone has joined #ruby
<nobdraisentone> What gem `irb' is part of?
jeff_sebring has joined #ruby
banisterfiend has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<atmosx> nobdraisentone: none, it's part of the standard ruby install
<atmosx> nobdraisentone: if you have ruby on your system, you must have irb too.
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
ananthakumaran has quit [Quit: Leaving.]
nai has joined #ruby
ananthakumaran has joined #ruby
WirIrrenUmher has quit [Ping timeout: 248 seconds]
SolarisBoy has joined #ruby
etrnl has quit [Read error: Connection reset by peer]
nadirvardar has quit [Quit: Computer has gone to sleep.]
jeff_sebring has quit [Quit: Leaving]
blacktulip has joined #ruby
danielvdotcom has joined #ruby
yugui is now known as yugui_zzz
saschagehlich has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<Tasser> atmosx, nope, not if debian
monokrome has joined #ruby
monokrome has quit [Excess Flood]
zastaph has quit [Ping timeout: 240 seconds]
danielvdotcom has left #ruby [#ruby]
danielvdotcom has joined #ruby
<Hanmac> Tasser ... even on older irb is part of ruby
<Mon_Ouie> It is supposed to be there, though
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zastaph has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
justsee is now known as justsee|away
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]
tiripamwe has quit [Ping timeout: 260 seconds]
jastix has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Vert has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mneorr1 has quit [Quit: Leaving.]
mobilegamelabs has quit [Quit: #ratingexchange A channel to exchange 5-star ratings/comments. http://www.MGGGGG.com/angry-polygon #1 Download Mac Game! http://itunes.apple.com/app/angry-polygon-hd/id536799429?mt=12 http://youtu.be/Tu-mSpFmx7g http://www.MGGGGG.com/ap Angry Pol]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mobilegamelabs has joined #ruby
tiripamwe has joined #ruby
danielvdotcom has quit [Quit: danielvdotcom]
danielvdotcom has joined #ruby
_adeponte has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
_adeponte has quit [Read error: Connection reset by peer]
TomJ has quit [Quit: TomJ]
Stalkr_ has joined #ruby
ixti has joined #ruby
Hien has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
binaryplease has joined #ruby
Gavilan has quit [Ping timeout: 260 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
binaryplease has quit [Quit: WeeChat 0.3.8]
greasegum has joined #ruby
binaryplease has joined #ruby
zastaph has quit [Ping timeout: 252 seconds]
pk1001100011 has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
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 ?
bluOxigen has quit [Ping timeout: 245 seconds]
<lenny1> banisterfiend: oops, right. typo!
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<banisterfiend> lenny1: well they're quite different actually
<banisterfiend> lenny1: the only similarity between them is the behaviour of 'def'
<lenny1> banisterfiend: alright. Can you give an example where they differ?
<banisterfiend> aside from that, they have nothing in common really. obj.instance_eval { self } <------- self is obj
<banisterfiend> lenny1: sure, just execute 'self' in them
Rizzle has quit [Ping timeout: 252 seconds]
<banisterfiend> lenny1: in the case of obj.instance_eval, 'self' is obj
<banisterfiend> lenny1: in the case of class << obj; self; end 'self' is obj.singleton_class
<banisterfiend> lenny1: also, try setting an ivar in there
<banisterfiend> the ivar for class << obj; is set on the singleton class, but in the case of obj.instance_eval it's set on obj itself
kirun has joined #ruby
blacktulip has quit [Remote host closed the connection]
<lenny1> banisterfiend: oh, you're absolutely right. Just tried it out myself. Thank you very much for the clarification
<banisterfiend> lenny1: let me get u a link
<banisterfiend> lenny1: this explains everything: http://yugui.jp/articles/846
blacktulip has joined #ruby
<lenny1> banisterfiend: looks great! I'll write through it carefully
yugui is now known as yugui_zzz
<drupin> https://gist.github.com/3158635 cannot install bundler
<drupin> rking: u there
* Hanmac says "fuga" :P
danielvdotcom has quit [Quit: danielvdotcom]
danielvdotcom has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
danielvdotcom has quit [Client Quit]
nopolitica has joined #ruby
danielvdotcom has joined #ruby
timonv has joined #ruby
mucker has quit [Ping timeout: 252 seconds]
chichou has joined #ruby
arietis has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
chichou has quit [Remote host closed the connection]
schaerli has joined #ruby
workmad3 has joined #ruby
werdnativ has quit [Quit: werdnativ]
zastaph has joined #ruby
danielvdotcom has quit [Quit: danielvdotcom]
danielvdotcom has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
danielvdotcom has quit [Client Quit]
thatRD has quit [Ping timeout: 246 seconds]
mneorr1 has quit [Quit: Leaving.]
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
thatRD has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
jeff_sebring has joined #ruby
niklasb has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
blacktulip has quit [Ping timeout: 252 seconds]
blacktulip has joined #ruby
zastaph has quit [Ping timeout: 260 seconds]
lenny1 has quit [Quit: WeeChat 0.3.8]
ph^ has joined #ruby
mneorr has joined #ruby
jonathanwallace has joined #ruby
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
binaryplease has quit [Ping timeout: 248 seconds]
k_89 has quit [Ping timeout: 240 seconds]
Vert has quit [Ping timeout: 252 seconds]
linoj has joined #ruby
thecreators has joined #ruby
zastaph has joined #ruby
jastix has quit [Ping timeout: 248 seconds]
kylemcgill has quit [Remote host closed the connection]
<shevy> cool
<shevy> a japanese who can write in english :-)
tiripamwe has quit [Ping timeout: 261 seconds]
S1kx has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
uris has joined #ruby
akem has quit [Ping timeout: 248 seconds]
jeff_sebring has quit [Quit: Leaving]
chichou has joined #ruby
lxsameer has joined #ruby
yugui_zzz is now known as yugui
dagnachewa has joined #ruby
mobilegamelabs has quit [Quit: Angry Birds 2 - http://www.MGGGGG.com/ap (short enough? :D)]
pygospa has quit [Quit: leaving]
pygospa has joined #ruby
ZachBeta has joined #ruby
andrewhl has joined #ruby
dagnachewa has quit [Quit: Leaving]
mobilegamelabs has joined #ruby
zastaph has quit [Ping timeout: 252 seconds]
thone_ has joined #ruby
sepp2k1 has joined #ruby
greasegum has quit [Ping timeout: 248 seconds]
reuf has joined #ruby
thone has quit [Ping timeout: 252 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
<nobdraisentone> Is there some elem? method for arrays?
macer1 has joined #ruby
<macer1> hi
macer1 has quit [Changing host]
macer1 has joined #ruby
<bnagy> nobdraisentone: maybe you want include?
<macer1> I have a problem with converting python pack to ruby pack... encuserlen = str(len(enc_user)); packfmt = '>bih%sshiibBB' % encuserlen
choffstein has joined #ruby
<macer1> as I see ruby has diffrent types for pack
<macer1> here's a full function, can someone help me convert it to ruby? https://gist.github.com/ee89e3452ef87716f32e
<bnagy> macer1: I'd suggest http://bindata.rubyforge.org/
<bnagy> parsing binary with pack is for the birds
<macer1> haha!
<macer1> looks awesome!
<macer1> this is what I am trying to pack: http://wiki.vg/Protocol#Login_Request_.280x01.29
<bnagy> I can't make any sense of that description
<bnagy> says 20 bytes, but 3 int and 3 bytes is only 15
<macer1> and packet id
akem has joined #ruby
akem has joined #ruby
tchebb has quit [Ping timeout: 260 seconds]
<bnagy> oic, that's an int? Still one short :/
<bnagy> they should describe structs in RFC format or C struct format :S
<macer1> anyway struct.pack([..] len(username), username, [..])
<macer1> why is it packing length of string
<macer1> it is protocol thing
the-newsman has joined #ruby
<macer1> or normal?
tchebb has joined #ruby
<bnagy> ah that makes more sense, but I didn't see that in the wiki
<bnagy> it's normal to have a length field before a variable length field like a string
<macer1> any string is at least 2 bytes long
<the-newsman> bnagy
<bnagy> TLV (type length value) etc
<macer1> in minceraft
<macer1> protocol
<the-newsman> bnagy how can i run .rb from irb prompt ?
cakehero has joined #ruby
<bnagy> the-newsman: so, it's not considered good behaviour to a) highlight someone just because they're talking or b) crosspost
<the-newsman> bnagy do not bother urself then
<tightwork> does nokogiri assume that all xml files will use <root> ?
fridim_ has quit [Ping timeout: 246 seconds]
<macer1> how was ignore syntax?
<macer1> nick@*!* ?
<nobdraisentone> How can I check all array elements with specific predicate?
<bnagy> select, probably
<nobdraisentone> I wanna true/false returned
<Mon_Ouie> Use one of the following methods: any?, all?, none?, one?
<bnagy> ary.all? {|e| e=~/^a/}
<nobdraisentone> Thanks
<Hanmac> or if you want more confusion: ary.each_with_object(/^a/).any?(:=~)
<Hanmac> Sorry: ary.each_with_object(/^a/).any?(&:=~)
<bnagy> you have a sickness, Hanmac
<macer1> bnagy: is the < from the python pack important there?
<macer1> >*
<bnagy> macer1: I have NFI about python, and I wouldn't do this kind of thing with pack in ruby
zastaph has joined #ruby
<macer1> hah ok, I will try it another way
binaryplease has joined #ruby
<bnagy> srsly, make bindata definitions for your protocol elements
<bnagy> it will make your final code a million times easier to read and work with
<bnagy> if they had written the descriptions better you could probably autogenerate 90% of the code
<macer1> yeah I am trying
<bnagy> I've done that with dozens of structures at once before
binaryplease has quit [Read error: Operation timed out]
ZachBeta has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
<macer1> bnagy: I am sure it will not work, but here is what I am starting from
ph^ has quit [Remote host closed the connection]
zeen has joined #ruby
manizzle has joined #ruby
<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
hunglin has joined #ruby
<the-newsman> how can i run such code from shell ==>> http://pastebin.com/j1q6tpu9 ?
<macer1> ...
<the-newsman> macer1 hello
<bnagy> macer1: ok I can (finally) see how they get their sizes, at least
<macer1> :)
<bnagy> there are two magic bytes per string (terminators or something?)
<macer1> I said that eariler :S
<macer1> any string is at least 2 bytes
<macer1> that was written somewhere
<fowl> <3 u ruby
<macer1> also why the f strings in ruby are not utf8
<the-newsman> macer1 plz help
<macer1> do I need to add something?
<bnagy> #encoding: utf-8 as the first comment
<Mon_Ouie> They're just not encoded in UTF-8 by default, they can have any (well, almost) encoding you want
<Mon_Ouie> See also String#encode to convert a string and String#force_encoding to set the encoding
<bnagy> macer1: anyway, your int8s I think should be just ints (4 bytes)
<bnagy> and I would probably define a new type for the minecraft wacky string terminator or whatever
<bnagy> then you can just assign struct.username="Fred" without worrying about it
Guest4263 has joined #ruby
<macer1> isnt the terminator only when string is null
<bnagy> so in the struct it would be string :username // bullshitterminator :term1
<bnagy> dunno
<bnagy> I'm not actually too interested in learning a badly documented protocol for a game I don't play
<macer1> :P
Spooner has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
<macer1> bnagy: there's no type "int"
<macer1> what do you mean by just int?
<bnagy> int32
Guest4263 has left #ruby [#ruby]
strnx has quit [Excess Flood]
<macer1> ok
<macer1> I am not sure if it is better to look at the wiki or look at the python code..
k_89 has joined #ruby
saschagehlich has joined #ruby
ph^ has joined #ruby
wvms has quit [Quit: wvms]
TheShadowFog has quit [Read error: Connection reset by peer]
<macer1> bnagy: can you look? https://gist.github.com/525f72cedec4cd33238f
arkiver has quit [Quit: Leaving]
<macer1> something is wrong
<macer1> of course :P
zastaph has quit [Ping timeout: 255 seconds]
<nobdraisentone> How can I do something for array of two arrays and do another for array of two strings?
wvms has joined #ruby
<bnagy> macer1: sorry man, I'm not invested enough in this to do much more than I've done :)
<macer1> ok
<bnagy> I've never used bindata btw
<bnagy> I have my own lib which was written before bindata came out and I am too lazy to change
<Hanmac> nobdraisentone: case arr[0]; when String; ... when Array; ... end
<macer1> :>
<bnagy> I think you'd be better off doing .each {|e| if e.respond_to? :each #recuse on e else #handle e end }
<bnagy> *recurse
<bnagy> but whatever
<bnagy> macer1: wireshark or something might be a good idea btw
<macer1> :|
<macer1> is it important if the 0 will be byte or int?
<macer1> in protocol
<macer1> or it will be packaged same
<bnagy> yes, definitely
<bnagy> like int32 0 is \x00\x00\x00\x00
<bnagy> byte is \x00
<macer1> :)
<macer1> hiibBB => short,int,int,signed char,signed char
darkc0met has quit [Ping timeout: 264 seconds]
strnx has joined #ruby
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> group_By
bier has joined #ruby
<nobdraisentone> O, it's should be in enumerable
<nobdraisentone> Thanks
<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]
<the-newsman> shevy
leynos has joined #ruby
Draco_ has quit [Ping timeout: 260 seconds]
Kisten has left #ruby [#ruby]
mockra has joined #ruby
mobilegamelabs has quit [Quit: Angry Birds 2 - http://www.MGGGGG.com/ap (short enough? :D) #ratingexchange (App Store)]
<pskosinski> I have module: http://pastebin.com/xDW3L5qh and script: http://pastebin.com/dSqGUxbM And I get erros on the first line of script: modules3.rb:1: syntax error, unexpected $undefined, expecting '}'
<pskosinski> Why?
<pskosinski> error *
<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]
jdar has joined #ruby
ryanf has joined #ruby
kirun_ has joined #ruby
<n_blownapart> https://gist.github.com/49594f5fe5cc8e2f1be8 burgestrand this is all I get
Markvilla has joined #ruby
Freddie has quit [Disconnected by services]
<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.
<Harzilein> when i have a symbol like :":", how can i look up the long alias of $: with it?
<Harzilein> burgestrand: :/
<burgestrand> Now that you changed your question I actually have no idea what you mean, Harzilein :p
n_blownapart has quit [Remote host closed the connection]
<amacgregor_osx> burgestrand: of course
<amacgregor_osx> http://pastie.org/4301271
brianpWins has joined #ruby
<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
<macer1> burgestrand: so what?
arkiver has quit [Quit: Leaving]
sepp2k has quit [Remote host closed the connection]
<burgestrand> macer1: "\x48\x65\x6c\x6c\x6f" is a string, written in "hex", which is just "Hello"
<macer1> YES
<macer1> and I need that string
ph^ has joined #ruby
<macer1> from hello
<burgestrand> macer1: Hello is that string. :/
<macer1> it doesn't work that way for me
Rochefort has quit [Remote host closed the connection]
<macer1> I need to see that \x\x
iamjarvo has quit [Client Quit]
<macer1> "Hello".made_magic => "\x48\x65\x6c\x6c\x6f"
<wrapids> http://pastie.org/4301653 <- burgestrand
<wrapids> And I've been reading that as "burgerstand"
shadoi has joined #ruby
pskosinski has joined #ruby
<macer1> "\x01\x00\x00\x00\x1D\x00\x00\x00\x03hello\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" => fail
<macer1> well this is my packet
<burgestrand> wrapids: I know. Many do.
<wrapids> burgestrand, does $line work for you?
<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]
<macer1> string = "Hello".bytes.map {|a| "\\x#{a.to_s(16)}"}.to_s ?
<macer1> -.-
cakehero has quit [Quit: Leaving...]
baphled has joined #ruby
<burgestrand> macer1: :)
shadoi has joined #ruby
<macer1> good?
shadoi has quit [Client Quit]
<macer1> => "[\"\\\\x48\", \"\\\\x65\", \"\\\\x6c\", \"\\\\x6c\", \"\\\\x6f\"]" dafaq so many escape's?
pskosinski has quit [Remote host closed the connection]
mascool has quit [Ping timeout: 244 seconds]
<macer1> oh ok, replace to_s with join
<burgestrand> macer1: it was written for 1.8, use joi
<burgestrand> …n
<macer1> def to_hex; self.bytes.map {|a| "\\x#{a.to_s(16)}"}.join; end
<macer1> hmm
<macer1> \\ = fail
<macer1> I need only one
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
ashp has left #ruby [#ruby]
Foxandxs has joined #ruby
<macer1> ehh
<macer1> impossible
<macer1> I am porting some python pack's to ruby/bindata
<macer1> nearly there, just strings
jastix has quit [Quit: Leaving]
Bosma has joined #ruby
<macer1> also it looks like python is adding \x00 after each char...
<macer1> which is of course correct, but I don't know how to do all this shit in ruby
<tightwork> I am trying to parse xml with nokogiri. Why does this not work when using xpath? http://dpaste.com/773920/
<drupin> gem install bundler
<drupin> -bash: /usr/bin/gem: /usr/bin/ruby.exe: bad interpreter: Permission denied
fayimora has joined #ruby
prtksxna has quit [Remote host closed the connection]
<macer1> eee
<macer1> drupin: windows or linux?
<drupin> cygwin on windows32
<macer1> drupin: >"windows"< here's your problem
<macer1> also chmod +x ruby.exe?
<drupin> i am using the windows ruby
<macer1> is chmod in cygwin?
<macer1> if yes chmod +x the ruby.exe
<drupin> chmod?
<macer1> yeah
AlbireoX`Laptop has joined #ruby
<drupin> what command
whitedawg has quit [Quit: Leaving.]
<macer1> the command is CHMOD
lkba has quit [Ping timeout: 248 seconds]
danielvdotcom has joined #ruby
<drupin> CHMOD +x ruby.exe in the bin folder
ananthakumaran has quit [Quit: Leaving.]
<shevy> hehe
<drupin> what
<shevy> good old UNIX days
<shevy> chmod file touch mkdir
<drupin> how
khakimov has joined #ruby
adelcampo has joined #ruby
<shevy> and the good old rm -rf /opt/foo[PRESS TAB COMPLETE HERE, THEN SPACE] /
<tightwork> GD
workmad3 has joined #ruby
<shevy> btw you can try to start IRB drupin
<shevy> IRB.exe
<drupin> ??
<shevy> do you know irb yet?
<shevy> it is "interactive ruby"
<drupin> nope
<shevy> you can type ruby commands in it, then press enter
<Hanmac> ... i still dont get it ... why is array == array.reverse the fastest way to check for palimdrome?
<shevy> to install a gem from within irb, you can do: system "gem install bundler"
<GeekOnCoffee> Hanmac: what's the practical purpose for checking for a palindrome?
<shevy> Hanmac: a palindrome must be the alter-ego
<shevy> OTTO is one, ANNA is one
<GeekOnCoffee> other than in school, I've never had to do it
<shevy> ANAN can not be one
<shevy> OTOT can not be one
<drupin> gem install bundler
<drupin> -bash: /usr/bin/gem: /usr/bin/ruby.exe: bad interpreter: Permission denied
<icy`> cygwin stuff is probably .bat , no?
<drupin> shevy: i get this erroe
<shevy> GeekOnCoffee: binding sites on DNA for transcription factors work as palindromes, due to the information contained in the nucleotides
<Hanmac> GeekOnCoffee: nobdraisentone wants it, and i looked for faster code
<drupin> yes
<shevy> GeekOnCoffee: the picture to the right explains this quickly http://en.wikipedia.org/wiki/Palindromic_sequence
<shevy> drupin: did you start irb
mjb2k has quit [Quit: Leaving.]
<drupin> yes but its on command promt
verto|off is now known as verto
danielvdotcom has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<drupin> i want to do on cygwin
<shevy> very odd
<drupin> now
<shevy> I use ruby on win 7 just fine
<drupin> gem?
<shevy> sure
<shevy> gems work fine too for me there
<icy`> i had ruby 1.9.3 p194 or something through cygwin at work
cakehero has joined #ruby
<shevy> I don't think I could use an OS that would not give me ruby
<GeekOnCoffee> for palindromes, you might be able to loop through each element comparing it to the length-index element… but not sure that'd be faster
<drupin> shevy: now... irb
<icy`> ruby's .reverse is not terribly slow
<tightwork> i think i have exhausted all the nokogiri xml examples on the internet
<shevy> hmm
verto is now known as verto|off
<shevy> perhaps you could write a method that works like .reverse, but stops at once when it found a wrong match
<icy`> i thought the == does that by itself
<icy`> it checks each part of the word, as soon as it finds mismatch it stops
<shevy> well, if you have 3 billion nucleotides, then finding all palindromes within that data can take some time
itnomad has joined #ruby
adelcampo has quit [Quit: adelcampo]
* icy` hides
<icy`> cant get google's define: command to work in some browsers =/ open-uri , or links..
<tightwork> anyone use nokogiri to parse xml?
thecreators has quit [Quit: thecreators]
Foxandxs has quit [Remote host closed the connection]
yoklov has quit [Quit: computer sleeping]
Foxandxs has joined #ruby
<GeekOnCoffee> tightwork: I have
<Hanmac> icy` yeah reverse is slow, but other methods i try are slower
<shevy> hehe
<tightwork> GeekOnCoffee: could you please tell me what I am doing wrong here: http://dpaste.com/773920/ I just want to select the name element
Foxandxs has quit [Client Quit]
<GeekOnCoffee> ("//name")
Foxandxss has joined #ruby
<GeekOnCoffee> try ("//application/name")
<icy`> tightwork, nx = Nokogiri::XML(File.open 'apps.xml'); nx.xpath('//name').text
<tightwork> GeekOnCoffee: nothing
<macer1> if i have [1,2,3,4,5,6] how to get [12,34,56]
<macer1> split by 2...
<macer1> thx
<heftig> if you use to_s i'm going to slap you
WirIrrenUmher has joined #ruby
mjb2k has joined #ruby
<macer1> heftig: me?
<heftig> yes
<macer1> why :S
* heftig wields a large trout
zeromodulus has joined #ruby
Nisstyre has quit [Quit: Leaving]
<tightwork> icy`: still nothing.. just blank line
<canton7> I think he's worried you'll do something like [1, 2, 3, 4, 5, 6].each_slice(2).map{ |a,b| (a.to_s + b.to_s).to_i } :P
<shevy> array.to_s
<shevy> :)
<icy`> tightwork, actually yea that does surprise me; looking at yours, it's basically same thing
<heftig> canton7: indeed
<shevy> hmmm
<shevy> "#{}" calls to_s too, doesn't it?
<Hanmac> hm i think thsi is better: .map{ |a,b| "#{a}#{b}".to_i }
<heftig> shevy: effectively
<canton7> { |a,b| a*10 + b } is so much better though
tiripamwe has quit [Ping timeout: 245 seconds]
<shevy> indeed
<canton7> (unless that's not strictly what you want)
<tightwork> icy`: nx.xpath('/').text returns me the whole doc so at least nokogiri is 'working' Is xpath part of nokogiri?
<macer1> ehh
<icy`> yes
<macer1> even copy-pasting packet from python and sending it with socket doesn't work @_@
<shevy> [1,2,3,4,5,6].each_slice(2).map { |a,b| a*10 + b } # => [12, 34, 56]
<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?
<tightwork> can i cry?
<macer1> oh
<macer1> how to convert like "hello" to
<icy`> i wouldnt know how to test it
<icy`> s.unpack('>bihshiibBB') => ["1", 486539264, "0", 8, "d", 1660969216, 1912628480, "0", "0", "0"]
<macer1> "h\x00e\x00[etc]"
<icy`> i just took out the %s in your pack format
<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> icy`:
<icy`> macer1, i'm not very good at that -- just check http://www.ruby-doc.org/core-1.9.3/String.html , pack and unpack
<macer1> well I nearly have it, I will post the ruby version in a sec but
<macer1> I need to made the \x00 after each char
<macer1> in string
rowaway1 has quit [Quit: illustrator]
ringotwo has joined #ruby
rowaway1 has joined #ruby
<macer1> https://gist.github.com/048d061b4ebf876fe855 here it is in it's curren state
<macer1> the s in python pack is emm null terminated char*[] I think
<shevy> whoa
<shevy> using arrays rather than hashes, means the code is 30% faster?
rowaway1 has left #ruby [#ruby]
<macer1> shevy: :O
<nobdraisentone> `class A ; mmm a ; mmm b ; end'. How can I get [a,b] from class A?
ringotwo has quit [Remote host closed the connection]
<nobdraisentone> `class A ; mmm :a ; mmm :b ; end'. How can I get [a,b] from class A? *
<Hanmac> A.instance_methods(false)
jarred has joined #ruby
zeromodulus has quit [Remote host closed the connection]
niklasb has quit [Read error: Operation timed out]
khakimov has quit [Quit: Computer has gone to sleep.]
strife25 has quit [Ping timeout: 255 seconds]
rowaway1_ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
adamkittelson has joined #ruby
mutewinter has joined #ruby
mjb2k has quit [Quit: Leaving.]
GoGoGarrett has joined #ruby
<tightwork> ugh its like chewing glass
dotemacs has joined #ruby
<shevy> lol
<shevy> I like the sound of that
k_89 has quit [Quit: Leaving]
cantonic has joined #ruby
<icy`> macer1, i'm not sure. %w(h e l l o).pack('ax' * 5) => "h\x00e\x00l\x00l\x00o\x00"
<shevy> whoa...
<shevy> xchat works
shevy has left #ruby ["WeeChat 0.3.8"]
<icy`> where 5 is length of string . going to do something else now ;P
shevy has joined #ruby
<shevy> yippie! back on xchat again... now things are much better
maletor has joined #ruby
* icy` nods
<macer1> https://gist.github.com/4edde3fee92ec7892841 <= what I am trying to port
<macer1> every string is prefixed with number of chars
<macer1> ehh, why string doesn't have to_a :P
<samuelkadolph> They used to
<samuelkadolph> But it's doesn't work with UTF8
mascool has joined #ruby
rowaway1___ has joined #ruby
<samuelkadolph> it*
<shevy> hmmm
<shevy> to_a on string does not seem to be that useful
rowaway1_ has quit [Ping timeout: 240 seconds]
<shevy> "abc".to_a # => ["abc"]
<macer1> I have undef method...
<shevy> good work!
<macer1> D:
baroquebobcat has joined #ruby
Bosma has quit [Quit: leaving]
vlad_starkov has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
vlad_starkov has joined #ruby
<icy`> not sure how to split 'hello'.encode('utf-16BE') into array
deryl has quit [Quit: deryl]
<icy`> Encoding::CompatibilityError: incompatible encoding regexp match (US-ASCII regexp with UTF-16BE string)
deryl has joined #ruby
<macer1> same problem here
<macer1> :(
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
baroquebobcat has quit [Client Quit]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
niklasb has joined #ruby
subbyyy has joined #ruby
mutewinter has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
imami|afk is now known as banseljaj
<macer1> icy`: have you solved that?
bglusman has joined #ruby
<nobdraisentone> I have some class definition: http://pastebin.com/Q0s58Y0F
<nobdraisentone> irb(main):220:0> f = SomeOtherClass.new
<nobdraisentone> => #<SomeOtherClass:0x7f6fbf99e900 @bar_history=[nil]>
<nobdraisentone> Where is @foo_history?
igotnolegs has joined #ruby
<icy`> it's some regex thing which i dont know
<icy`> like 'hello'.split(//u) but not just u
<macer1> same for ''
<macer1> bad ruby
<WirIrrenUmher> what does the asterisk in "def initialize(*argv)" do? i cant find any documentation on it via google
<icy`> not sure how to get UTF-16BE instead of just UTF-8
<macer1> oh
<macer1> *random genius idea*
<macer1> maybe first string is utf8
<macer1> split it
<macer1> pack it
<macer1> and then convert to utf16
<samuelkadolph> WirIrrenUmher: Accepts any number of arguments and argv will be an array of them
<WirIrrenUmher> samuelkadolph: okay thanks
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<macer1> hah, ok, that part is working
<icy`> macer1, that has strange result
workmad3 has joined #ruby
<macer1> works for me...
<icy`> "\u0000h\u0000e\u0000l\u0000l\u0000o"
<macer1> in mcstring
<macer1> def set(a); ar = a.split(//); self.data =ar.pack('ax' * ar.length); end
<macer1> no wait
<macer1> ....
<macer1> well after adding force encoding still works
fridim_ has joined #ruby
the-newsman has quit [Ping timeout: 252 seconds]
strife25 has joined #ruby
baroquebobcat has joined #ruby
<macer1> no let's compare it again with python packet :)
<macer1> because emm it don't work
<WirIrrenUmher> if i use "send" in a class, which method will it send to? just the first method in the class?!
TorpedoSkyline has joined #ruby
<WirIrrenUmher> ah, just got it... never mind
strnx has quit [Excess Flood]
Criztian has joined #ruby
snearch has quit [Quit: Verlassend]
vlad_starkov has quit [Read error: Connection reset by peer]
<icy`> macer1, idk. best i can come up with is def mc_s msg; msg.encode('utf-8').split(//u).pack('xa'*msg.size) ; end; p mc_s 'hello'
<macer1> ok that works
<macer1> that part, works...
vlad_starkov has joined #ruby
<icy`> hard to google UTF-16BE stuff for ruby o.O
burgestrand has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<macer1> of course the ruby one don't works
<macer1> hmm where x05 come from...
vlad_starkov has joined #ruby
workmad3 has quit [Read error: Operation timed out]
* icy` shrugs
<icy`> on to other things
jlwestsr has quit [Quit: Ex-Chat]
vlad_starkov has quit [Read error: Connection reset by peer]
<icy`> gl
vlad_starkov has joined #ruby
<macer1> D:
<shevy> WirIrrenUmher it'll try to find a method whose name you give to .send as argument. if that method does not exist, some error will happen
adeponte has quit [Remote host closed the connection]
<WirIrrenUmher> shevy: thanks
<shevy> class Foo; def test; puts 'testing...';end;end; foo = Foo.new; foo.send :test # testing...
Progster has quit []
yoklov has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
nari has quit [Ping timeout: 252 seconds]
akem has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
akem has quit [Client Quit]
burgestrand has joined #ruby
s0ber_ has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
akem has joined #ruby
bluOxigen has quit [Ping timeout: 255 seconds]
s0ber has quit [Read error: Operation timed out]
s0ber_ is now known as s0ber
headius has quit [Quit: headius]
vlad_starkov has quit [Read error: Connection reset by peer]
baphled has joined #ruby
vlad_starkov has joined #ruby
td123 has joined #ruby
psylinse has joined #ruby
Eldariof-ru has quit []
bglusman has quit [Ping timeout: 240 seconds]
banseljaj is now known as imami|afk
lkba has quit [Ping timeout: 255 seconds]
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
<macer1> hah, interesting! 'h'.force_encoding 'utf-16be' returns hex value
<macer1> so if I encode each char
<macer1> and add \x00 beetween them
<macer1> it will work
niklasb has joined #ruby
psylinse has quit [Quit: psylinse]
lkba has joined #ruby
psylinse has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> That's because "h" isn't valid UTF-16 — if you want to convert, you should use String#convert, not #froce_ecnoding
<heftig> you mean #encode
<Mon_Ouie> Oh, right
BrokenCog has quit [Ping timeout: 245 seconds]
bosphorus has joined #ruby
iamjarvo has joined #ruby
eph3meral has quit [Quit: Leaving]
NoICE has joined #ruby
<macer1> s.split(//).map {|a| ["\x00".force_encoding('utf-16be'),a.force_encoding('utf-16be')] }.flatten
<macer1> :))
<macer1> where s = "hello"
<macer1> this is what I wanted
yoklov has quit [Quit: computer sleeping]
<NoICE> ah, I see some ruby encoding magic :)
<macer1> :D
<NoICE> I once was in situation in which I had to put UTF-16BE string in between UTF-8 encoded SOAP request :D
<NoICE> I was once ..*
Banistergalaxy has quit [Ping timeout: 245 seconds]
user__ has joined #ruby
danielvdotcom has joined #ruby
seanstickle has joined #ruby
akem has quit [Read error: Connection reset by peer]
<NoICE> … and then read them ofcourse.
<macer1> => ["\x00", "\x68", "\x00", "\x65", "\x00", "\x6C", "\x00", "\x6C", "\x00", "\x6F"]
<macer1> ok
<macer1> now I must
<macer1> join this shit
<macer1> without breaking format -_-
strnx has joined #ruby
<macer1> join breaks it...
<Mon_Ouie> macer1: Again, all you want is s.encode("UTF-16BE")
timonv has joined #ruby
<macer1> haha
<macer1> that will break split
<macer1> -.-
kevinbond has joined #ruby
<macer1> oh maybe not
<Mon_Ouie> I mean instead of that whole split, map, flatten, join
<macer1> but
<macer1> I need to add \x00
fayimora has quit [Ping timeout: 252 seconds]
<Mon_Ouie> The bytes will be there — otherwise it wouldn't be UTF-16BE
<Mon_Ouie> "hello".encode("UTF-16BE").getbyte 2 #=> 0
<macer1> emm
<macer1> "\x01\x00\x00\x00\x1D\x00\x05\x00\x05\x00h\x00e\x00l\x00l\x00o\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
<macer1> it is clear text
kylemcgill has joined #ruby
<macer1> h e l l o
danielvdotcom has left #ruby [#ruby]
<macer1> and it doesnt work
workmad3 has joined #ruby
<Mon_Ouie> So your data are already UTF-16BE?
<macer1> ekhm no
prometheus has joined #ruby
<macer1> my ruby encoding is utf8
<macer1> #self.data = a.encode("utf-16be"); self.data = "\x00\x68\x00\x65\x00\x6c\x00\x6c\x00\x6f"
<macer1> ok so the commented one doesnt work
<macer1> where a = "hello"
<Mon_Ouie> That's irrelevant, what matters is the actual encoding of self.data's content — not what String#encoding will return
<macer1> sooo
<macer1> what I can do?
<Mon_Ouie> In both your examples, the string *will* have the same binary representation
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<macer1> so WTF it's not working
Vert has joined #ruby
<macer1> I am trying all day to make it fckin work
<Mon_Ouie> You're probably using it wrong — are you using something like String#[] or each_char or whatever when you're dealing with that string?
<Mon_Ouie> All those operations are at character level, not byte level.
awayy is now known as yy
<macer1> No, I am not using [] or each_char
<macer1> bytes are same
<macer1> chars are not
<Mon_Ouie> Well, that's because #encoding is not the same
chichou_ has joined #ruby
<Mon_Ouie> chars == each_char
Jackneill has quit [Quit: Jackneill]
<macer1> soo...
<macer1> em
<macer1> so how to made it work >.>
<Mon_Ouie> AFAICT, the second one is the wrong one
<Mon_Ouie> Make *what* work?
<macer1> haha, no
<macer1> the second oen works
<macer1> the first is not :)
chichou has quit [Ping timeout: 255 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> In what way does the first not work?
mockra has joined #ruby
<Mon_Ouie> The second one indicates characters wrong, since "hello" is a 5 character string
ph^ has joined #ruby
<macer1> in way that server doesnt understand it
<macer1> because in data
<macer1> there is \x00h
<Mon_Ouie> IO objects have an encoding too
<macer1> oh
<macer1> socket encoding?
<Mon_Ouie> If you want they data you send through a socket to be in a certain encoding, you should set that socket's external_encoding
hrs_ has joined #ruby
<Mon_Ouie> Erm, I may mean internal_encoding, I always confuse those
<Mon_Ouie> No, I did mean external_encoding :)
<macer1> there isn't any of them :S
<macer1> in tcpsocket
<Mon_Ouie> Sure there is, TCPSocket is a subclass of IO
<macer1> ah, it's a function ok
user__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
<macer1> but it's not working anyway ;)
<macer1> I set it to utf16-be
<macer1> wait, but external_encoding only returns it
<macer1> how to set it?
akem has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<macer1> ehh I don't think I want to send *all data* as utf16
jjbohn has joined #ruby
<Mon_Ouie> Then I guess you'd have to send everything use the binary "encoding" (which would just pass around any data with checking)
<Mon_Ouie> without*
<macer1> ehh
<macer1> it is more bindata problem
<macer1> lib/bindata/base_primitive.rb:115:in `split': incompatible encoding regexp match (US-ASCII regexp with UTF-16BE string) (Encoding::CompatibilityError)
<macer1> I made it as it in faq
<macer1> :|
sdwrage has joined #ruby
ePirat_ has joined #ruby
<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" => magic => "\x00\x68\x00\x65\x00\x6c\x00\x6c\x00\x6f"
hubub has joined #ruby
WirIrrenUmher has quit [Ping timeout: 248 seconds]
ryanf has joined #ruby
<macer1> how to do the magic??
<Mon_Ouie> Use the binary encoding
<macer1> where
<macer1> encode("binary")?
amacgregor_osx has joined #ruby
<Mon_Ouie> No, force_encoding — it really means the absence of encoding, and just treats bytes and characters the same
<macer1> force encoding...
<macer1> binary?
<macer1> better but I still have h e l l o
<macer1> and not the \x68
td123 has quit [Ping timeout: 256 seconds]
<hanp> anyone ?
<macer1> lolololol it works
<Mon_Ouie> I'd ask that on a jruby channel
<macer1> hahahahaha
<macer1> all day
hunglin has joined #ruby
<macer1> trying to do this simple shit encoding
<macer1> ...
khakimov has joined #ruby
td123 has joined #ruby
tchebb has quit [Ping timeout: 264 seconds]
<macer1> it's nearly working now
<macer1> the encoding is somewhere lost when I am using vars
<Harzilein> is there an easy to use api for a ruby parser for stuff like "list all classes in this boring ruby source file"?
<Harzilein> (preferably: list all method definitions of a specific class)
mockra has quit [Remote host closed the connection]
<Mon_Ouie> You could use Ripper.sexp(…) and just search for class and def nodes
clocKwize has quit [Read error: Connection reset by peer]
clocKwize has joined #ruby
ryanf has quit [Quit: broken pipes |||]
<macer1> a.encode("UTF-16BE").force_encoding("binary") => fail
stephenjudkins has joined #ruby
<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`
andrewhl_ has joined #ruby
<lamba> 600, owned by the user
baphled has quit [Ping timeout: 260 seconds]
<Mon_Ouie> lamba: What error do you get?
<jdar> lambda: sudo chmod a+r rakefile
<macer1> shevy "/tmp/#{filename}"
monokrome has joined #ruby
Z_Mass has joined #ruby
monokrome has quit [Excess Flood]
mengu has joined #ruby
<macer1> ruby 1.8
<macer1> fail
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<lamba> that bad ? :-) its fedora 16
<macer1> ohh fedora fail
<macer1> even ubuntu 12.04 have ruby 1.9
<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.]
shellox_ has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
<Maher4Ever> Hanmac: I didn't know that. I'll check it out. Thanks :)
timonv has quit [Remote host closed the connection]
shellox has joined #ruby
vDubG has joined #ruby
bosphorus has quit [Remote host closed the connection]
jjbohn|afk is now known as jjbohn
tewecske has quit [Quit: Leaving.]
afd__ has joined #ruby
GoGoGarrett has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
workmad3 has quit [Read error: Operation timed out]
kylemcgill has quit [Remote host closed the connection]
nari has joined #ruby
kylemcgill has joined #ruby
nopolitica has quit [Read error: Connection reset by peer]
justsee|away is now known as justsee
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Spooner has quit [Ping timeout: 248 seconds]
jimeh has quit [Quit: bye]
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
<shevy> ewww
<shevy> that sounds awful
wvms has joined #ruby
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.]
hrs_ has joined #ruby
mjb2k has joined #ruby
mjb2k has left #ruby [#ruby]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
bosphorus has quit [Read error: No route to host]
Markvilla has quit [Quit: Markvilla]
tchebb has joined #ruby
bosphorus has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
sdwrage has quit [Quit: geekli.st/programmer]
baroquebobcat has quit [Quit: baroquebobcat]