<apeiros_>
mahoney: sorry, github is reeeeeeally slow for me today :(
rkc_ has joined #ruby
akhet2 is now known as akhet
akhet has quit [Changing host]
akhet has joined #ruby
busybox42 has joined #ruby
rkc_ has left #ruby [#ruby]
<apeiros_>
mahoney: with the construct you have, you can't
<apeiros_>
you indeed want class_eval
<mahoney>
kojul: That is one way, but I'm trying to emulate a global variable that exists inside the instance_eval. I'm using the C API, so I can use things there too.
<apeiros_>
and define_method in this case
mercwithamouth has quit [Ping timeout: 252 seconds]
tommyvyo has joined #ruby
<mahoney>
apeiros_: How will class_eval be different?
busybox42 has quit [Client Quit]
<apeiros_>
mahoney: it allows you to reference local variables
spider-mario has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
<mahoney>
apeiros_: Which local variables?
<apeiros_>
class_a = self; ClassB.class_eval do define_method :outer_self do class_a; end; end
jgrevich has quit [Quit: jgrevich]
tris has joined #ruby
chrisramon has quit [Quit: chrisramon]
* apeiros_
off, gn8
mark__ has joined #ruby
mark__ is now known as lucidity
danman has joined #ruby
agarie has joined #ruby
danman has quit [Client Quit]
<nmeum>
how do I convert a escaped(?) word with a german umlaut like deliziösen into a correct word again?
<nmeum>
(CGI.unescape_html isn't working)
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
spaceships has joined #ruby
sepp2k has quit [Remote host closed the connection]
spaceships has quit [Client Quit]
rburton- has joined #ruby
spaceships has joined #ruby
xcv has quit [Remote host closed the connection]
busybox42 has joined #ruby
brianpWins has joined #ruby
mele- has joined #ruby
luckyruby has quit [Remote host closed the connection]
newUser1234 has quit [Remote host closed the connection]
<ninjanoise>
I've yet another question.. :)
* ninjanoise
prepares for shevy's sigh
ner0x has quit [Quit: Leaving]
bubblehead has joined #ruby
v__ has quit [Quit: Leaving]
v__ has joined #ruby
hbpoison has joined #ruby
<ninjanoise>
storing a string in a variable like so, works just fine for me with gsub str.gsub( /#{var}/, 'foo' ) but when I change it to gsub!(/#{vars[1]}.*?$/, '') to match to the end of the line it doesn't work..
mikewintermute has quit [Quit: mikewintermute]
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
xcv has joined #ruby
v__ has quit [Max SendQ exceeded]
ner0x has joined #ruby
v__ has joined #ruby
v__ has quit [Max SendQ exceeded]
v__ has joined #ruby
v__ has quit [Read error: Connection reset by peer]
shevy has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
<ninjanoise>
**^%$ Thanks again Spooner :) it's the new line that's throwing it off so you fixed it by letting me keep digging haha
Nahra has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
v__ has joined #ruby
mikewintermute has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
guns has joined #ruby
awestroke has quit [Read error: Operation timed out]
sambio has quit []
reset has joined #ruby
ninjanoise has quit [Remote host closed the connection]
shevy has joined #ruby
kojul has quit [Quit: kojul]
freerobby has quit [Quit: Leaving.]
sayan has joined #ruby
<shevy>
Spooner just curious in general. also I will have to learn python for a course & exam
<shevy>
at least it is python 3
f0ster has quit [Remote host closed the connection]
jimeh has quit [Quit: Computer has gone to sleep.]
hasimo-t has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
Opettaja has quit [Quit: WeeChat 0.4.0]
bradleyprice has joined #ruby
jimeh has joined #ruby
<Spooner>
I'm using Python 2.7 with most of the P3 features added via __future__.
tvw has quit [Ping timeout: 258 seconds]
sailias has joined #ruby
sambio has joined #ruby
<Spooner>
shevy So it should work in 2.7 & 3. Wish we had that in Ruby, but it wouldn't work without the Python module system.
senayar has quit [Quit: Quitte]
tcopp has joined #ruby
Nahra has joined #ruby
j^2 has quit [Ping timeout: 245 seconds]
pkrnj has quit [Ping timeout: 248 seconds]
ph^ has joined #ruby
lsoa has joined #ruby
ArchBeOS has joined #ruby
gtuckerkellogg has joined #ruby
banisterfiend is now known as banister`sleep
pac1 has quit [Ping timeout: 256 seconds]
tmiller has joined #ruby
Spooner has quit [Quit: Leaving]
ph^ has quit [Ping timeout: 256 seconds]
tay1 has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
icole has joined #ruby
pen has quit [Remote host closed the connection]
guns has quit [Quit: guns]
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
kojul has joined #ruby
ArchBeOS has quit [Ping timeout: 248 seconds]
Nisstyre-laptop has joined #ruby
havenwood has quit [Remote host closed the connection]
chessguy has joined #ruby
matayam has joined #ruby
hiyakashi has joined #ruby
ilyam has joined #ruby
pkrnj has joined #ruby
Targen has joined #ruby
ericmathison has joined #ruby
ericmathison has quit [Client Quit]
slainer68 has joined #ruby
andersbr has joined #ruby
nonotza has quit [Ping timeout: 256 seconds]
marcdel has joined #ruby
nonotza has joined #ruby
tmiller has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 264 seconds]
aytch is now known as MS_Powershell
icole has joined #ruby
MS_Powershell is now known as aytch
Targen has joined #ruby
tmiller has joined #ruby
freerobby has joined #ruby
slainer68 has quit [Ping timeout: 245 seconds]
tomzx_mac has quit [Ping timeout: 252 seconds]
kojul has quit [Quit: kojul]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
gtuckerkellogg has quit [Ping timeout: 258 seconds]
browndawg has joined #ruby
havenwood has joined #ruby
freeayu has quit [Ping timeout: 255 seconds]
nari has joined #ruby
newUser1234 has quit [Remote host closed the connection]
tmiller has quit [Remote host closed the connection]
v__ has quit [Ping timeout: 256 seconds]
noesis has quit [Quit: Lost terminal]
cephalopod has joined #ruby
sailias has quit [Read error: Connection reset by peer]
sailias has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
huoxito has joined #ruby
sailias has joined #ruby
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby
ananthakumaran has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
pcarrier_ has quit []
cephalopod has quit [Ping timeout: 252 seconds]
matayam has quit [Remote host closed the connection]
luckyruby has joined #ruby
averiso has joined #ruby
kofno has joined #ruby
ph^ has joined #ruby
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
Inside has joined #ruby
<Inside>
Ruby. Why in the world is !0 'false'
sayan has quit [Ping timeout: 258 seconds]
freeayu has joined #ruby
averiso has quit [Quit: Computer has gone to sleep.]
<ericmathison>
Inside: In ruby the only values that evaluate to fale are false and nil.
<ericmathison>
so 0 evaluates to true
<ericmathison>
!0 evaluates to false therefore
kofno has quit [Ping timeout: 258 seconds]
postmodern has quit [Quit: Leaving]
v__ has joined #ruby
newUser1234 has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
<Inside>
ruby, y u no like every other language on the planet
hbpoison has joined #ruby
<bnagy>
if you want to test for nonzero, test for nonzero
<bnagy>
using 0 as false only makes sense in C
v__ has quit [Ping timeout: 256 seconds]
chussenot has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
chussenot has quit [Client Quit]
freeayu has quit [Ping timeout: 246 seconds]
<ericmathison>
Inside: Have you found there to be significant advantages to the ways other languages treat booleans? Personally, I've found it to be very easy to grok conditionals when I know that there are only two values which evaluate to false.
<Inside>
well in many other language it's seen sort of... pedestrian to be doing ==0 when testing for conditions,
dhruvasagar has quit [Ping timeout: 256 seconds]
<ericmathison>
i see
Beoran_ has joined #ruby
marcdel has quit []
synthetix has joined #ruby
<bnagy>
because heaven forbid you write code that expresses what you mean
<bnagy>
.zero? .nonzero?
<bnagy>
dfone
dhruvasagar has joined #ruby
X-Jester has joined #ruby
<bnagy>
blame lisp, if you really find it offensive
adkron_ has quit [Ping timeout: 276 seconds]
<Inside>
darn yoouuu lisp
marcdel has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Beoran has quit [Ping timeout: 264 seconds]
freeayu has joined #ruby
aapzak has quit [Ping timeout: 264 seconds]
pitzips has joined #ruby
aapzak has joined #ruby
danman has joined #ruby
nonotza has quit [Quit: nonotza]
A1241 has quit [Quit: Leaving.]
kuzushi has joined #ruby
ritek has joined #ruby
amh345 has joined #ruby
<amh345>
hi guys, i need to decompress a file serverside. and once the file is decompressed- upload those files to an amazon s3 file server. is there a decent approach for this?
nari has quit [Ping timeout: 248 seconds]
slainer68 has joined #ruby
nari has joined #ruby
<amh345>
i remember before i tried to write a method that waited until a file was fully written before emailing.. but it rarely worked properly. so im a littler uneasy about this waiting for xyz type thing.
Guest10804 has quit [Quit: leaving]
Ohga has quit [Read error: Connection reset by peer]
pitzips has quit [Quit: Leaving]
swounding60 has quit [Ping timeout: 258 seconds]
aeontech has joined #ruby
swounding60 has joined #ruby
TorpedoSkyline has joined #ruby
icole has joined #ruby
<V8Energy>
please someone advise me on how to create a standalone GUI applicaton in ruby, with modern looking and well supported GUI toolkit, and so i can package to a windows executable. I've considered using TideSDK but it's freaking 80mbs when packaged.
<ritek>
V8Energy: have you tried using Qt?
<bnagy>
HAHAHAHAH
<ritek>
V8Energy: you can use One-Click Ruby Application Builder for the standalone stuff, iirc
slainer68 has quit [Ping timeout: 258 seconds]
yacks has joined #ruby
nonotza has joined #ruby
averiso has joined #ruby
<Inside>
lol bnagy
<Inside>
what was that for?
nonotza has quit [Client Quit]
browndawg has quit [Ping timeout: 252 seconds]
amh345 has quit [Read error: Connection reset by peer]
nonotza has joined #ruby
TorpedoSkyline has quit [Ping timeout: 252 seconds]
soulcake has quit [Ping timeout: 252 seconds]
amh345 has joined #ruby
amh345 has joined #ruby
amh345 has quit [Changing host]
aedornm has joined #ruby
reppard has joined #ruby
amh345 has quit [Client Quit]
<bnagy>
Qt being modern looking and well supported on Windows
<reppard>
good evening everyone
end_guy has quit [Ping timeout: 276 seconds]
wyan has quit [Ping timeout: 252 seconds]
77CAARF97 has quit [Ping timeout: 252 seconds]
TorpedoSkyline has joined #ruby
daaaan has quit [Ping timeout: 252 seconds]
reppard has quit [Client Quit]
daaaan has joined #ruby
germanstudent has quit [Ping timeout: 248 seconds]
A124 has joined #ruby
mootpointer has joined #ruby
calmyournerves has joined #ruby
Villadelfia_ has quit [Ping timeout: 245 seconds]
wyan has joined #ruby
SeySayux has quit [Ping timeout: 256 seconds]
soulcake has joined #ruby
mootpointer has quit [Client Quit]
ddsss has joined #ruby
synthetix has quit [Remote host closed the connection]
adkron_ has joined #ruby
Villadelfia has joined #ruby
yshh has quit [Remote host closed the connection]
SeySayux has joined #ruby
gstudent2 has joined #ruby
yshh has joined #ruby
tmiller has joined #ruby
ph^ has joined #ruby
kofno has joined #ruby
tmiller has quit [Ping timeout: 256 seconds]
<ddsss>
If I wanna remove all gems - can I just remove ~/.gem ?
ph^ has quit [Ping timeout: 245 seconds]
kofno has quit [Ping timeout: 260 seconds]
radic has joined #ruby
xpen has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 256 seconds]
radic_ has quit [Ping timeout: 245 seconds]
<dinoex>
ddsss, normally gems are installed into some distribution dependent dir as well.
<dinoex>
e.g. /usr/local/lib/ruby/gems/1.9/gems
hasimo-t has joined #ruby
<ddsss>
aha. gem environment tells me there are gems under gobal '/usr/lib/ruby/gems/2.0.0' and local username/.gem directories
newUser1234 has quit [Remote host closed the connection]
tcopp has quit [Ping timeout: 260 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
yashshah has joined #ruby
nari has quit [Ping timeout: 256 seconds]
chrisdambrosio_ has joined #ruby
chris730 has joined #ruby
bubblehead has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
luckyruby has joined #ruby
lewis_ has joined #ruby
bitwiser has joined #ruby
amaya_the has quit [Ping timeout: 260 seconds]
hasimo-t has quit [Remote host closed the connection]
lewis has quit [Ping timeout: 245 seconds]
danman has quit [Quit: danman]
swounding60 has quit [Ping timeout: 248 seconds]
sayan has joined #ruby
swounding60 has joined #ruby
jurassic_ has quit [Quit: jurassic_]
emergion has quit [Quit: Computer has gone to sleep.]
sayan has quit [Read error: Connection reset by peer]
jurassic_ has joined #ruby
yashshah has quit [Ping timeout: 252 seconds]
xpen has joined #ruby
yshh has quit [Remote host closed the connection]
wargasm1 has quit [Read error: Connection reset by peer]
DrCode has quit [Ping timeout: 276 seconds]
wargasm has joined #ruby
xcv has quit [Remote host closed the connection]
jurassic_ has quit [Quit: jurassic_]
IceDragon has quit [Quit: Space~~~]
xcv has joined #ruby
toekutr has quit [Remote host closed the connection]
V8Energy has quit [Ping timeout: 276 seconds]
RantriX has joined #ruby
<RantriX>
hi
<RantriX>
i was wondering if someone could help me with a simple question
<RantriX>
im' looking for a method kinda like the each method
<RantriX>
but you can pass in an initial variable without having ot declare it outside
<RantriX>
so for example
<RantriX>
summing up an array
<RantriX>
you don't have to declare: result = 0
<RantriX>
outside of the each iterator
<RantriX>
i know you can use inject with |sum, x|
charliesome_ has joined #ruby
<RantriX>
but how do you do that and also initializing the sum to a variable?
josefrichter_ has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
charliesome_ is now known as charliesome
<RantriX>
any help would be great
<RantriX>
for example initalizing the sum to 5 instead of 0
<RantriX>
as the result
sayan has joined #ruby
danman has joined #ruby
<RantriX>
so basically kinda looking for the a method similar to the "for" method in C
<RantriX>
please help friends =]
sambao21 has joined #ruby
ph^ has joined #ruby
kofno has joined #ruby
yannis has joined #ruby
Inside has quit [Ping timeout: 252 seconds]
huoxito has quit [Quit: Leaving]
vagmi has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
ph^ has quit [Ping timeout: 258 seconds]
jurassic_ has joined #ruby
danman has quit [Quit: danman]
xcv has quit [Remote host closed the connection]
bitwiser has quit [Quit: bitwiser]
freeayu has quit [Ping timeout: 256 seconds]
chessguy has quit [Remote host closed the connection]
forrest has joined #ruby
Banistergalaxy has quit [Ping timeout: 258 seconds]
ArchBeOS has joined #ruby
xpen has quit [Remote host closed the connection]
xpen has joined #ruby
lewis_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
<lewix>
RantriX: you you could do foo.each {|i;x| x="whatever" blah}
<lewix>
I believe
<RantriX>
can you please explain the |i;x| part?
<lewix>
RantriX: to initialize the sum to zero with inject
<lewix>
you could do inject(5) {}
browndawg has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<banister`sleep>
i dont think i've ever seen the ;x syntax in the wild
Eldariof28-ru has quit [Ping timeout: 255 seconds]
andersbr has joined #ruby
yshh has joined #ruby
Spaceghost|cloud has joined #ruby
eldariof has quit []
Sicp has joined #ruby
hbpoison has quit [Ping timeout: 248 seconds]
angusiguess has quit [Ping timeout: 260 seconds]
verysoftoiletppr has joined #ruby
lewis has quit [Remote host closed the connection]
wmoxam has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
hemanth has joined #ruby
nveselinov has quit [Ping timeout: 245 seconds]
arturaz has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 264 seconds]
Czupa has joined #ruby
<Sicp>
I've got a problem that's sort of unrelated to this channel but I'm using Ruby to solve it, so that's the common ground that I'm relying on to ask it here
<Sicp>
but what I need right now is to be able to parse and upon parsing, insert into a DB where "Matta F1" is the Chapter, "Nasab YASOU3" would be the Grouping and the lines underneath that would be the content belong to "Nasab YASOU3"
<Sicp>
how on earth am I going to differentiate between those
kofno has joined #ruby
alesguzik has left #ruby ["leaving"]
Virunga has quit [Remote host closed the connection]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
answer_42 has quit [Quit: WeeChat 0.4.0]
hbpoison has joined #ruby
skattyadz has quit [Quit: skattyadz]
Virunga has joined #ruby
tish has quit [Quit: Leaving.]
Faris6 has quit [Quit: Faris6]
Virunga has quit [Remote host closed the connection]
vagmi has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
browndawg has quit [Ping timeout: 260 seconds]
<canton7>
Sicp, Matta F1 is the first line, so that's easy (assuming it's consistent across chapters). The section headings don't have a number in the cell to the left of them
<Sicp>
I was able to figure out (when printing #{row}) that it's actually an array that has 3 elements; the number, the content and nil
dsferreira has joined #ruby
<Sicp>
so for the first row read, you'd have nil, TITLE, nil
<Sicp>
so yea, like you said
<Sicp>
the code will be tricky though
<Sicp>
works
solidoodlesuppor has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
<eval-in>
Sicp => /tmp/execpad-f44717ab332a/source-f44717ab332a:2:in `<main>': undefined local variable or method `foo' for main:Object (NameError) (http://eval.in/13557)
yashshah has quit [Ping timeout: 245 seconds]
<Sicp>
yea, how do I check if it isn't nil, with that notation
<Sicp>
>> !(foo.nil?)
<eval-in>
Sicp => /tmp/execpad-4c609269b663/source-4c609269b663:2:in `<main>': undefined local variable or method `foo' for main:Object (NameError) (http://eval.in/13558)
<Sicp>
>> foo.notnil?
<eval-in>
Sicp => /tmp/execpad-a11b48662c55/source-a11b48662c55:2:in `<main>': undefined local variable or method `foo' for main:Object (NameError) (http://eval.in/13559)
finishingmove has quit [Ping timeout: 248 seconds]
Guest26006 has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<canton7>
yeah, there are quite a few complications with coming up with a 'pre' function
<Sicp>
can't figure out how to get the first element after I've gathered all the titles that I need (Chapter title - Subtitle 1 - Subtitle 2) in the first sheet
<Sicp>
I put them in "sections", but then I would have to access sections' elements in a .each or a 1.times to get the first element...
<canton7>
hmm? it's not clear what your data structure is
<Sicp>
sections[0] gives me the first letter of each of sections' elements
Czupa has quit [Remote host closed the connection]
<Sicp>
I don't even know what the data structure is..I just put them inside sections and I ..dont know what sections is
<canton7>
pastie the output of `p sections`?
<Sicp>
gives me back the elements in " "
<canton7>
hmm?
yashshah_ has joined #ruby
<Sicp>
the elements are pasted as "Chapter Title" "Subheading 1" and "Subheading 2"
<Sicp>
that's what p sections gave
<Sicp>
I want the first one, but doing sections[0] gives me back the first letter, 'C' of the first element
refd has quit [Read error: Connection timed out]
<canton7>
it shouldn't, so you're doing something wrong. that's why I want to see the exact data you're handling
<Sicp>
I try to say "sections = []" before that line but I don't get a different output
<canton7>
that won't change anything. instead of saying "sections is this value", you're saying "sections is an empty array.... scratch that, it's now this value"
<Sicp>
ahhh
<Sicp>
right, right
<canton7>
put 'sections = []' on line 2, then replace line 6 with 'sections << row[1]'
<Sicp>
that's injecting
<Sicp>
I remember that
<canton7>
it's an alias to #push - i.e. stick the given value at the end of the array
crimezone20xx has quit [Ping timeout: 246 seconds]
<Sicp>
got it
<Sicp>
that did it
stevechiagozie has quit [Quit: Computer has gone to sleep.]
fantazo has joined #ruby
reppardTelnet has joined #ruby
reppard has joined #ruby
hemanth has quit [Quit: This computer has gone to sleep]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<reppard>
anyone know of a decent irc client written in ruby?
<reppard>
thinking this might be a cool project to start if there isn't one
<canton7>
quite a few frameworks and a thousand and one bots
<canton7>
not sure about clients
<reppard>
yeah i've seen the bot frameworks
<reppard>
i'm playing around right now, connected via telnet just to get a feel for the RFC interface
girija has quit [Ping timeout: 256 seconds]
<reppardTelnet>
Seems to work...though a bit messy =)
<reppard>
it seems like it would be pretty straight forward using the Socket library
<canton7>
it does get more complex as you go deeper
Hanmac has quit [Ping timeout: 255 seconds]
<canton7>
but it's not too bad
<reppard>
yeah i've hit a few road blocks spiking out connections in irb
<reppard>
trying to think how one would handle multiple channels and shit
angusiguess has quit [Ping timeout: 245 seconds]
atno has quit [Read error: Connection reset by peer]
akashj87 has quit [Ping timeout: 245 seconds]
<reppard>
i've never written a ruby program with a "main loop" but it seems like it would be necessary
statarb3 has joined #ruby
refd has quit [Read error: Connection timed out]
atno has joined #ruby
<reppard>
could maybe write a plugin to sync up with tmux
tommyvyo has joined #ruby
reppardTelnet has quit [Ping timeout: 256 seconds]
refd has joined #ruby
skattyadz has quit [Quit: skattyadz]
akashj87 has joined #ruby
tk_ has quit [Quit: ばいばい]
timonv has joined #ruby
Faris6 has quit [Ping timeout: 260 seconds]
stevechiagozie has joined #ruby
dhruvasagar has joined #ruby
Spooner has quit [Remote host closed the connection]
khismetix has joined #ruby
pothibo has joined #ruby
Hanmac has joined #ruby
skattyadz has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
yshh has quit [Remote host closed the connection]
nveselinov has joined #ruby
Spooner has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
refd has quit [Max SendQ exceeded]
Virunga has joined #ruby
refd has joined #ruby
khismetix has quit [Ping timeout: 248 seconds]
tjbiddle has joined #ruby
Faris6 has joined #ruby
shock_one has joined #ruby
workmad3 has joined #ruby
nobitanobi has quit [Ping timeout: 258 seconds]
khismetix has joined #ruby
ehellman has quit []
xeviox|afk is now known as xeviox
xeviox has left #ruby ["Leaving"]
nomenkun has joined #ruby
jpfuentes2 has joined #ruby
goganchic has joined #ruby
reppard has quit [Ping timeout: 256 seconds]
angusiguess has joined #ruby
wchun has joined #ruby
refd has quit [Read error: Connection timed out]
Cohomology has joined #ruby
Davey has joined #ruby
reppard has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
workmad3 has quit [Ping timeout: 264 seconds]
binaryplease has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
reppard has quit [Ping timeout: 256 seconds]
jgrau has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
markalanevans has joined #ruby
Morkel has joined #ruby
colonolGron has quit [Ping timeout: 264 seconds]
<Cohomology>
I don't understand. print doesn't print in the terminal. Why? gets doesn't work in the while loop. It works in irb, but not in the terminal. I want to interrupt the execution of a program for a while, supply it some data, and then continue.
<V8Energy>
ritek: yeah i've heard of ocra, but now i need a decent gui dev tool that works well with ocra. some gui kits take forever to open up after being packaged in ocra, and other gui toolkits are ugly, or have bad documentation
<banister`sleep>
V8Energy: ruby is not really good for this
<V8Energy>
:(
<banister`sleep>
you could try shoes i guess
<banister`sleep>
but i dont know how stable that is
<V8Energy>
shoes is bugged, green shoes take forever to open with ocra, and shoes4 require jvm to be installed
<V8Energy>
so ruby is mainly useful for rails, right?
ph^ has joined #ruby
markalanevans has quit [Client Quit]
<banister`sleep>
V8Energy: requiring the jvm to be installed i dont think is an unreasonable request
<banister`sleep>
most people probably already have it installed
girija has joined #ruby
<banister`sleep>
V8Energy: i would probably use jruby i guess
angusiguess has quit [Ping timeout: 260 seconds]
statarb3 has quit [Ping timeout: 258 seconds]
ph^ has quit [Read error: No route to host]
ph^ has joined #ruby
<V8Energy>
dang it
<V8Energy>
but jruby won't let me use sqlite
<V8Energy>
so complicated
kofno has quit [Remote host closed the connection]
<banister`sleep>
V8Energy: are you sure? im pretty damn sure jruby would let you interact with it
<banister`sleep>
there's bound to be libraries that let you access it
<banister`sleep>
why wouldn't there be?
kofno has joined #ruby
<V8Energy>
after installing jruby, i cannot do gem install sqlite3
<V8Energy>
it complains
<V8Energy>
so i had to remove jruby since i can't live without sqlite
<Hanmac>
V8Energy you are wrong i use ruby for window gui
<hoelzro>
doesn't the sqlite3 gem rely on C extensions?
jgrevich has joined #ruby
<V8Energy>
Hanmac: what do you use to create gui?
<hoelzro>
so no wonder it doesn't work on jruby
<Hanmac>
V8Energy my own wxWidgets gem
hbpoison has joined #ruby
<V8Energy>
wxWidgets gui looks so outdated
<V8Energy>
I was trying hard to find a way to create a HTML5/CSS3 based gui, i looked into boweline but it's not supoorted in windows and it hasn't be updated in years
<Hanmac>
V8Energy what is your problem with it? wxWidgets is designed to look native ... gtk can styled with CSS
<V8Energy>
hmm
<V8Energy>
does it package well with ocra? and when opening it, does it open quick?
<V8Energy>
Hanmac: but then it means the user has to install GTK?
kofno has quit [Ping timeout: 258 seconds]
sterNiX has quit [Quit: Lagging Off]
<Hanmac>
V8Energy yeah, same for wx
<V8Energy>
shoot.
<V8Energy>
shoes doesn't requir ethe user to install anything
<Sicp>
came up when the code below the main loop was introduced
JohnBat26 has joined #ruby
madb055 has quit [Ping timeout: 256 seconds]
Guest76236 has joined #ruby
<Sicp>
it looks fine to me..
<MrZYX>
that is an sql error?
arturaz has quit [Remote host closed the connection]
<Sicp>
oh sorry, yea
<dioxirane>
hello guys.. I've just installed ruby 1.93.p392 and I'm trying to build the sources of a program that requires ruby.h and libruby-static.a . I've some troubles in linking the static library, so the configure script interrupts because it's unable to locate the library. I've explicitely used --with-ruby-lib=-L/usr/lib/ but strangely this not work. Locate libruby-static.a give me that it's instaled under /usr/lib/ path.
<Sicp>
I don't get what it's trying to tell me though, the insertChapterTitle was working just now before adding the lines below it; I tried to remove again but still
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 19.0.2/20130307023931]]
kofno has quit [Remote host closed the connection]
alexwh has joined #ruby
<MrZYX>
Sicp: use the interpolation the sqlite gem provides you: db.execute("INSERT INTO bla (foo, bar) VALUES (?, ?)", "val for foo", "val for bar")
<MrZYX>
it'll add the quotes you're missing currently
<Sicp>
I was, but while debugging this I resorted to what you see in the paste
<Hanmac>
dioxirane what programm? did you installed that ruby yourself or do you use system package for that?
<dioxirane>
Hanmac: I install ruby from myself with ./configure --prefix=/usr --enable-shared && make && make test && make install
mockra has quit [Remote host closed the connection]
gyre008 has quit [Remote host closed the connection]
maligree_ has joined #ruby
lewis_ has quit [Remote host closed the connection]
maligree_ is now known as maligree
lewis has joined #ruby
sayan has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
sambao21 has joined #ruby
dioxirane has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Read error: Connection reset by peer]
swex_ has joined #ruby
verysoftoiletppr has quit []
banister`sleep has joined #ruby
KellyLSB has joined #ruby
swex has quit [Ping timeout: 258 seconds]
mikewintermute has quit [Ping timeout: 255 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
threesome has joined #ruby
m_3 has joined #ruby
Hanmac has quit [Ping timeout: 256 seconds]
<Sicp>
found a Ruby WAT
<Sicp>
listen up
<Sicp>
ch_ID = db.execute("SELECT ch_ID FROM Chapters WHERE ch_TITLE = '#{chapterTitle}'") <-- this returns 1
<Sicp>
ch_ID.class returns Array
Hanmac has joined #ruby
<Sicp>
puts ch_ID prints "1" without []
<canton7>
are you using ruby 1.8?
<Sicp>
chapterID = ch_ID[0].to_s; prints [1]
<Sicp>
what, the fuck
<Sicp>
1.9.3
Mon_Ouie has joined #ruby
<Sicp>
puts "{ch_ID}" prints [[1]]
<Sicp>
what the FUCK man!
realDAB has quit [Quit: realDAB]
verysoftoiletppr has joined #ruby
<canton7>
that looks about right
<canton7>
try `p ch_ID`
<Sicp>
[[1]]
<canton7>
note that 'puts' does some stuff to make the object suitable for printing
<canton7>
while 'p' shows you exactly what's there
<Sicp>
I want to use it in the SQL, I am going to have to do "puts #{ch_ID}", I don't want a [[1]]
<canton7>
(near enough)
Rioji has joined #ruby
<canton7>
ok, so ch_ID is [[1]], not "1"
<lewis>
Sicp: try to_str
<Sicp>
to_s you mean?
sayan has joined #ruby
<MrZYX>
ch_ID = db.execute(...).first.first
sayan has quit [Read error: Connection reset by peer]
<canton7>
I suspect your database driver's returning a 2d array because: first array is an array of results, and second is an array of selected columns
<MrZYX>
first row first column
<v2px>
.oO( .firstest )
<Sicp>
what?...
<lewis>
Sicp: no i mean to_str
<Sicp>
that didn't solve it either, I still get [[1]]
<canton7>
so "SELECT ch_ID, another_column FROM..." would give [[1, 'other_value], [2, 'another vaole']]
<lewis>
puts call to_str first then to_s I believe
<Sicp>
so I want the first of the first array
<canton7>
so if you know there will only be one row, select that row: db.execute(...)[0]
<Sicp>
I see
<canton7>
then if you want the first column in that result, grab it with db.execute(..)[0][0]
Guest___ has joined #ruby
<MrZYX>
Sicp: there's also Database#get_first_row
reppard has joined #ruby
<MrZYX>
and get_first_value even
tmiller has quit [Remote host closed the connection]
<canton7>
I suspect your database driver probably has a way of grabbing individual rows, or returning a hash per row instead of an array per row, etc
<MrZYX>
Sicp: also read the implementation of get_first_value
nobitanobi has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
akashj87 has quit [Ping timeout: 256 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
toekutr has joined #ruby
lkba has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
khismetix has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
tish has joined #ruby
Guest___ has quit [Ping timeout: 252 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
mattbl has joined #ruby
mikewintermute has joined #ruby
mattbl has quit [Client Quit]
josefrichter has quit [Quit: josefrichter]
apoch632 has joined #ruby
maxmanders has joined #ruby
<lewis>
Sicp: whatever I said about puts is nonsense. please ignore it
<Sicp>
alright
whitedawg has joined #ruby
<lewis>
to_str is implicitly called when you try to call a method that is not a string, Sicp
altivec has joined #ruby
chussenot has joined #ruby
chussenot has quit [Client Quit]
lewis is now known as lewix
sambao21 has quit [Quit: Computer has gone to sleep.]
<Hanmac>
lewix hm wrong, its to_s wich is called
hashbangchris has joined #ruby
Loaft has quit [Ping timeout: 276 seconds]
threesome has quit [Ping timeout: 248 seconds]
Tricon has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
decoponio has quit [Quit: Leaving...]
Loaft has joined #ruby
chrisramon has quit [Quit: chrisramon]
apoch632 has left #ruby [#ruby]
Davey has joined #ruby
josefrichter_ has joined #ruby
chrisramon has joined #ruby
nveselinov has quit [Ping timeout: 245 seconds]
tmiller has joined #ruby
lewix has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
lunarjar has quit [Ping timeout: 276 seconds]
khismetix has joined #ruby
threesome has joined #ruby
Rioji_ has joined #ruby
jetblack_ has quit [Quit: leaving]
Rioji has quit [Ping timeout: 264 seconds]
tmiller has quit [Ping timeout: 248 seconds]
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
lewix has joined #ruby
<lewix>
Hanmac: what?
averiso has quit [Quit: Computer has gone to sleep.]
nveselinov has joined #ruby
chrisramon has quit [Quit: chrisramon]
brianpWins has joined #ruby
<Hanmac>
lewix to_str and to_s are different
hashbangchris has quit [Quit: mt]
<lewix>
Hanmac: did you also read when I corrected myself afterwards
<lewix>
Hanmac: 11:01 lewis: Sicp: whatever I said about puts is nonsense. please ignore it; 11:02 lewis: to_str is implicitly called when you try to call a method that is not a string, Sicp
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
chrisramon has joined #ruby
chrisramon has quit [Client Quit]
Rioji_ is now known as Rioji
ananthakumaran has quit [Quit: Leaving.]
angusiguess has quit [Ping timeout: 256 seconds]
<lewix>
Hanmac: thanks though
thinkclay has joined #ruby
khismetix has quit [Read error: Connection reset by peer]
alexim has joined #ruby
danman has joined #ruby
khismetix has joined #ruby
sambio has quit [Ping timeout: 256 seconds]
skattyadz has quit [Quit: skattyadz]
shock_one has quit [Remote host closed the connection]
maletor has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
verysoftoiletppr has quit []
lunarjar has joined #ruby
willob has joined #ruby
swex_ has quit [Read error: Connection reset by peer]
danman has quit [Quit: danman]
LennyLinux has quit [Remote host closed the connection]
pkrnj has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
bluOxigen has joined #ruby
Nisstyre has quit [Ping timeout: 264 seconds]
sandGorgon has joined #ruby
maletor has quit [Ping timeout: 245 seconds]
yannis has quit [Quit: yannis]
maxmanders has quit [Ping timeout: 256 seconds]
_bart has joined #ruby
allfro has joined #ruby
IceDragon has joined #ruby
<allfro>
hi all
<allfro>
im new to ruby and i am trying to debug an issue that i'm facing with a built-in type
<allfro>
i was wondering if there is anyway to see the reference count of an object in ruby
<IceDragon>
welcome :D
tealmage has quit [Remote host closed the connection]
maxmanders has joined #ruby
maxmanders has quit [Max SendQ exceeded]
alv-r- has joined #ruby
<hoelzro>
allfro: well, what's the issue?
maxmanders has joined #ruby
<hoelzro>
the reference count would be tricky (but not impossible) to determine
<allfro>
hoelzro: i'm not entirely sure really
<allfro>
but i have a huge Hash
jetblack has quit [Ping timeout: 260 seconds]
<allfro>
full of class objects
<allfro>
and for some reason
<allfro>
when i do fetch(key, nil) for a key that exists
<allfro>
i get nil back
whitedawg has quit [Ping timeout: 256 seconds]
<allfro>
but when i do fetch('mykey', nil) i get the value back
hmarr has joined #ruby
<allfro>
i'm just hypothesizing here, but im guessing that the object in variable key is losing it's reference count somehow
<allfro>
and when it makes its way into hash.c's rb_hash_fetch
<allfro>
it get's corrupted or lost in some way?
<allfro>
not sure if that makes sense
alexim has quit [Quit: bye]
<allfro>
again, im no ruby expert
<allfro>
but im running into ruby troubles :)
<allfro>
btw, this is only for ruby 1.9.x and not 1.8.x
<allfro>
im not trying to blame ruby either... i just need a way to debug this issue
|christian| has joined #ruby
<allfro>
and i thought that this might be something to look at?
<IceDragon>
allfro, the object's #hash could be changing
<IceDragon>
>.>
<canton7>
got a pastie that reproduces the issue?
solidoodlesuppor has quit [Remote host closed the connection]
<IceDragon>
try Hash#rehash and then try again
<allfro>
canton7: not exactly... this is the metasploit project
<canton7>
occam's razor: are you certain that the value of `key` is 'mykey'
<allfro>
canton7: yes
<allfro>
i do a puts on self
<allfro>
and a puts on key
<allfro>
and i see the key in self
<neredsenvy>
Is there a way i could rewrite the line from 5 - 10 https://gist.github.com/anonymous/09241583ba35b4c7f998 using select or something similar ? character is an array or character objects and only 1 will ever have boolean attribute main set to true
<canton7>
puts does implicit conversion. p might be better
<IceDragon>
try this p key.hash == mykey.hash
<IceDragon>
>.>
<reppard>
im trying to open a connection with socket and send a message back to the remote_address
<canton7>
allfro, they will have different object_ids, but should have the same hash
maligree has quit [Quit: I've had it.]
whitedawg has quit [Client Quit]
<allfro>
hmmm
rocket has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
sepp2k has quit [Quit: Leaving.]
Faris7 has quit [Read error: Connection reset by peer]
allfro has quit [Ping timeout: 245 seconds]
|christian| has quit [Quit: Leaving]
phasma has joined #ruby
allfro has joined #ruby
beilabs has joined #ruby
<allfro>
canton7: so i just did this mykey==='mykey' and that's true
<allfro>
mykey == 'mykey' => true
<allfro>
mykey.class and 'mykey'.class both equal String
tgunr has quit [Quit: Nity nite]
<allfro>
but mykey.hash != 'mykey'.hash
<allfro>
go figure
<IceDragon>
:(
<IceDragon>
hash is broken then
<canton7>
not sure on that one I'm afraid
<MrZYX>
String === mykey ?
<canton7>
my instinct suspects weird UTF-8 stuff
<canton7>
(to put it generally)
<canton7>
as in, the byte sequences aren't identical
<phasma>
hi, guys. i am wanting to install ruby within a chroot to work alongside nginx. i was thinking of just setting the configure to install into my chroot dir (in short, is this likely to work?)
<dinoex>
no.
<Hanmac>
allfro compare the encoding
<allfro>
Hanmac: both UTF-8
<dinoex>
the path while configure are supposed to be valid at runtime
LennyLinux has quit [Ping timeout: 258 seconds]
<phasma>
damn, ok... thanks
LennyLinux has joined #ruby
punchfac_ has joined #ruby
<dinoex>
you ma yhave success with setting DESTDIR=
danman has quit [Quit: danman]
punchfacechamp has quit [Ping timeout: 248 seconds]
jurassic_ has joined #ruby
<allfro>
anyway to force the encoding to a particular type?
<dinoex>
string.force_encoding( "utf-8" )
<dinoex>
string.encode!( "utf-8" )
<dinoex>
first does not cnahe any bytes in the string-
Spooner has quit [Remote host closed the connection]
newUser1234 has joined #ruby
axxT has quit [Quit: Teleport +1]
m8 has quit [Ping timeout: 245 seconds]
Spooner has joined #ruby
mengu_ has quit [Read error: Operation timed out]
havenwood has joined #ruby
tmiller has quit [Ping timeout: 256 seconds]
Nisstyre-laptop has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
zph has joined #ruby
etcetera has joined #ruby
DonRichie has quit [Read error: Connection reset by peer]
DonRichie has joined #ruby
DonRichie has quit [Read error: Connection reset by peer]
DonRichie has joined #ruby
khismetix has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
DonRichie has quit [Read error: Connection reset by peer]
DonRichie has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
sambao21 has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
andersbr has joined #ruby
alvr has joined #ruby
alv-r- has quit [Quit: Konversation terminated!]
emergion has quit [Quit: Computer has gone to sleep.]
<TTilus>
_bart: second one has weird class name
alvr has quit [Client Quit]
davidcramer has joined #ruby
motto has quit [Quit: Sto andando via]
<davidcramer>
can someone explain what this means: oMethodError: undefined method `unpack' for ["sysadmin"]:Array
<_bart>
TTilus: yes that's a typo, my bad
Morkel has quit [Quit: Morkel]
<davidcramer>
fwiw what im doing is: if u['groups'].include?('#{new_resource.search_group}')
m8 has joined #ruby
Sicp has joined #ruby
<TTilus>
_bart: on first the first one scopes are available only in association proxy vs. other ones being available everywhere for identity appearenves
<TTilus>
s/ve/ces/
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<TTilus>
_bart: on meta level that really genuinely is activerecord/arel question
<_bart>
TTilus: ah that makes sense
<_bart>
TTilus: I'll go with the scopes version
tenmilestereo has quit [Quit: Leaving]
sambao21 has joined #ruby
etcetera has quit []
jdunck has joined #ruby
sambao21 has quit [Client Quit]
AlStanforth has quit [Remote host closed the connection]
dmiller has joined #ruby
RyanD has quit [Read error: Connection reset by peer]
khismetix has quit [Quit: Computer has gone to sleep.]
<yoshie902a>
If figure I should be able to download everything in binary right? however, it looked like I could also download a zip file with gettextfile. Is one faster for text vs binary? is there some other reason?
razibog has quit [Ping timeout: 248 seconds]
hattusili_III has joined #ruby
havenwood has quit [Remote host closed the connection]