ken_barber has quit [Remote host closed the connection]
FifthWall has quit [Quit: Zzzzzzzzzzzzz]
<Cache_Money>
seanstickle: thanks
dmiller has quit [Remote host closed the connection]
bbloom has joined #ruby
bbloom has left #ruby [#ruby]
emmanuelux has joined #ruby
Spaceghost|cloud has joined #ruby
qos has quit [Ping timeout: 255 seconds]
replore has joined #ruby
replore has quit [Read error: Connection reset by peer]
sailias has quit []
<Cache_Money>
seanstickle: I have a 4x4 grid of letters and I'm trying to wrtie a script that looks at all of the possible combinations (a tile can only be used once) that create a legitimate word (ie in the /usr/share/dict/words file)
<Cache_Money>
any advice or things I should consider?
n_blownapart has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
n_blownapart has quit [Remote host closed the connection]
jearvondharrie1 has joined #ruby
specialGuest has quit [Ping timeout: 244 seconds]
jearvondharrie has quit [Ping timeout: 244 seconds]
seanyo has joined #ruby
<David_Miller>
why is it fact that its a grid important?
ph^ has joined #ruby
Monie has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 245 seconds]
ph^ has quit [Ping timeout: 246 seconds]
<matti>
ITS A GRID!!!
<matti>
:)
Agis__ has quit [Quit: Agis__]
<Cache_Money>
David_Miller: that's the setup of the game
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
banisterfiend` has quit [Remote host closed the connection]
<David_Miller>
so they could be in row of 12 and it would still be the same
<David_Miller>
16
niklasb has quit [Ping timeout: 276 seconds]
yasushi has joined #ruby
dakine has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
yasushi has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
aristidesfl has quit [Ping timeout: 248 seconds]
<Cache_Money>
David_Miller: You can only spell words using letters from adjacent tiles
ZachBeta has joined #ruby
lusory has quit [Ping timeout: 240 seconds]
jz has joined #ruby
sailias has joined #ruby
jz is now known as Guest66077
hipertracker has quit [Ping timeout: 265 seconds]
aristidesfl has joined #ruby
replore has joined #ruby
aknagi has quit [Quit: Leaving]
<elico>
If anyone want to help me think loud i will be more then happy.
tk___ has joined #ruby
nw has quit [Ping timeout: 246 seconds]
nw has joined #ruby
dju has quit [Ping timeout: 246 seconds]
<elico>
i'm trying to build efficient domain names on Tokyo Cabinet BTree DB
<elico>
domain names DB..
replore has quit [Ping timeout: 276 seconds]
BrokenCog has quit [Ping timeout: 252 seconds]
<billyoc>
elico: I'd *love* to help you think out loud. Let's begin: I installed execjs and 'rails server' is still complaining about execjs unavailable. This is a brand new maching I just installed rails on. So, what do we think about that? :)
<elico>
hmm what Distro?
<elico>
how did you installed execjs?
<billyoc>
gem install execjs
<billyoc>
parabola GNU/Linux
Takehiro has joined #ruby
t47425 has quit [Remote host closed the connection]
<elico>
i must say this is the first time i'm hearing about parabola linu
<elico>
linux
<seanstickle>
It's not quite as nice as Elliptical Linux
t24102 has joined #ruby
<billyoc>
but it's better than rhomboid linux
<seanstickle>
Ah, see, you flunked conic sections right there
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
dju has joined #ruby
<elico>
i like Square Linux
<elico>
"sudo ..."
yubiwasabi2 has joined #ruby
Progster has joined #ruby
<elico>
So my problem is that i want to somehow implement the BDB in a way i can benefit from the BTREE and the domain name structure
Takehiro has quit [Ping timeout: 252 seconds]
psyl0n has joined #ruby
<elico>
and what about the execjs? rails dont like it or just ruby?
DefV has quit [Ping timeout: 272 seconds]
pipopopo has quit [Ping timeout: 244 seconds]
DefV has joined #ruby
<billyoc>
oh, hell, it's *execjs* that's complaining about no js runtime!
<billyoc>
Like I said, this is a brand new box, I haven't started from scratch like this in a while.
sailias has joined #ruby
<elico>
well it's arch linux based so... dont be supprised
dpk has quit [Quit: Asleep at the keyboard.]
<elico>
it uses js runtime to run the js.. it make the same for me
pipopopo has joined #ruby
<elico>
what js runtime do you have?
rudyl313 has joined #ruby
<elico>
since it's based on arch you can compile\install nodejs
<elico>
or install therubyracer gem
ttilley has quit [Quit: ttilley]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<billyoc>
elico: gotcha
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
jearvondharrie2 has joined #ruby
<elico>
billyoc: so about my "problem"
<elico>
do you have some background with db?bdb?
replore has joined #ruby
jearvondharrie1 has quit [Ping timeout: 244 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
replore has quit [Ping timeout: 276 seconds]
Markvilla has quit [Quit: Computer has gone to sleep.]
<elico>
billyoc: ?
jasonkuhrt has quit [Quit: Leaving...]
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
<billyoc>
elico: Thanks, I just needed nodejs. I'm more of a TokyoCabinet man, but I've used bdb.
justsee has quit [Quit: Leaving...]
<billyoc>
Well, I used Berkeley DB for years, but with C.
dmiller has quit [Ping timeout: 255 seconds]
<billyoc>
It makes me sick to see that Oracle logo all over it now. :-|
<seanstickle>
Like a sickness
<seanstickle>
That spreads across so many database products
<billyoc>
Right? You can't even use mysql anymore, because they're starting to hide code now. I'm working with PostgreSQL now.
<billyoc>
The Diaspora project.
<billyoc>
elico: what's going wrong with your bdb?
tiripamwe has quit [Ping timeout: 272 seconds]
dpk has joined #ruby
<seanstickle>
I am using Percona instead.
<seanstickle>
But looking towards Postgres
jgrevich_ has joined #ruby
<elico>
actually i am not using bdb but tokyo cabind bdb stands for Btree db
<elico>
it's nothing wrong... but i want to implement something and my mind is blocked
jgrevich has quit [Ping timeout: 245 seconds]
jgrevich_ is now known as jgrevich
<billyoc>
elico: wow, you let me go off like that and didn't stop me? lol
<elico>
Ha HA
<elico>
i dont like oracle like you
<elico>
i dont like their way of taking code out of anyone hands...
Banistergalaxy has quit [Ping timeout: 248 seconds]
<elico>
any way my scenario is: i have a domain names list .. a black list.
<elico>
it's a black list and the rules are;
nari_ has joined #ruby
Banistergalaxy has joined #ruby
<elico>
one domain name in the db will block all subdomains and if there is a domain name and domain + subdomains it's an exact match wins only
banisterfiend` has joined #ruby
<elico>
for now i store it in the db in a reverse order to maintain the btree
<elico>
so tokyo cabiet has the option to search for a range but i have no idea on how to do a lookup for "com.google%"
Banistergalaxy has quit [Ping timeout: 268 seconds]
uris has joined #ruby
dimday has joined #ruby
<elico>
maybe they have prefix thing
replore has quit [Ping timeout: 255 seconds]
dimday has quit [Client Quit]
dimday has joined #ruby
dimday has quit [Client Quit]
dimday has joined #ruby
dimday has quit [Client Quit]
<atno>
morning
<elico>
atno: morning
<elico>
>>require "tokyocabinet"
<al2o3cr>
-e:1:in `eval': cannot load such file -- tokyocabinet (LoadError), from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<elico>
no tokyo cabinet for the bot...
<elico>
but it seem that Tokyo cabinet has a nice function for that
<elico>
fwmkeys
banisterfiend` has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
ryanf has quit [Ping timeout: 264 seconds]
<elico>
billyoc: PING
<Cache_Money>
How would I go about removing words from an array that contained non-ASCII characters (ie the spanish tilde, etc)? Here's the error message: http://imagebin.org/226817
<al2o3cr>
-e:1:in `eval': No such file or directory - /etc/shadow (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<al2o3cr>
-e:1:in `eval': No such file or directory - /etc/master.passwd (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
havenn has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
<seanstickle>
>> Process.kill("HUP", Process.pid)
<seanstickle>
>> "test"
<al2o3cr>
(String) "test"
<FifthWall>
>> 10.times { puts "Hello, I am the bot!" }
<al2o3cr>
(Fixnum) 10, Console: Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!, Hello, I am the bot!
dpk has quit [Quit: Asleep at the keyboard.]
<davidcelis>
>> Process.pid
<al2o3cr>
(Fixnum) 7258
<davidcelis>
>> Process.pid
<al2o3cr>
(Fixnum) 7265
<seanstickle>
>> def foo; "hello"; end; foo
<al2o3cr>
(String) "hello"
<davidcelis>
new process each time bro
<seanstickle>
True
<dominikh>
and don't bother with a fork bomb, he has it limited :(
<al2o3cr>
-e:1:in `eval': Permission denied - test (Errno::EACCES), from (eval):1:in `open', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<al2o3cr>
(String) "# Generated by dhcpcd from eth0\n# /etc/resolv.conf.head can replace this line\ndomain int.westgroup.com\nnameserver 163.231.22.17\nnameserver 163.231.22.2\n# /etc/resolv.conf.tail can replace this line\n"
<seanstickle>
>> Dir["/etc/password"]
<al2o3cr>
(Array) []
<seanstickle>
>> Dir["/etc/passwd"]
<al2o3cr>
(Array) ["/etc/passwd"]
<dominikh>
it's a chroot fyi ;)
<seanstickle>
Ah
<dominikh>
at least that's what etc being in the cwd tells me
<dominikh>
I don't know the bot any more than you do
<seanstickle>
Right, right.
<seanstickle>
Well, maybe we should just kick it then
<dominikh>
hehe
<seanstickle>
Bots are sort of non-welcome
<FifthWall>
test >> "test"
<elico>
seanstickle: it is suppose to run here...
<seanstickle>
Supposed to run here?
replore_ has quit [Remote host closed the connection]
<dominikh>
this is #ruby, not #ruby-lang, who cares :>
<seanstickle>
Tell me more.
<seanstickle>
I care. A little bit.
<elico>
i dont know who runs it but it helps to check and demonstrate stuff
TheLZA has joined #ruby
TheLZA has quit [Client Quit]
<elico>
and here i was thinking ruby and ruby-lang was the same
<seanstickle>
Alright, fair enough
mr-rich has joined #ruby
<elico>
seanstickle: if you have seen it's code you will die.. it's funny
mikepack has quit [Remote host closed the connection]
cj3kim has left #ruby ["Leaving"]
<Cache_Money>
I have an array of one letter strings and an array of words (strings). Trying to test whether each word can be spelled using letters in array. Need some advice http://pastebin.com/fnyk740K
<bnagy>
Cache_Money: yeah you still didn't include the array you're testing with, but like I said, dup the input array
<Cache_Money>
bnagy: duplicating the array fixed the problem. Although I'm still worried that iterating over each word in the dictionary will take some time with the code I have now
<Cache_Money>
bnagy: oops. I was using arr = %(h e l l o w o r l d)
savage- has quit [Remote host closed the connection]
savage- has joined #ruby
<bnagy>
well this is actually a pretty well studied area for algorithms
<bnagy>
scrabble and such
<bnagy>
so there's plenty of literature if you want to go looking for it
ananthakumaran has joined #ruby
verto is now known as verto|off
mercwith1mouth has quit [Ping timeout: 244 seconds]
dev_ryan70 has joined #ruby
null- has joined #ruby
LBRapid has joined #ruby
dev_ryan70 has quit [Ping timeout: 276 seconds]
chaplain is now known as christmas
christmas is now known as chaplain
hernerdies has quit [Ping timeout: 250 seconds]
chaplain is now known as christmas
christmas is now known as Guest4069
Beoran__ has quit [Ping timeout: 252 seconds]
null- has left #ruby [#ruby]
Takehiro has joined #ruby
Guest4069 is now known as chaplain
billyoc has quit [Quit: unicode me]
LBRapid has quit [Quit: LBRapid]
Takehiro has quit [Ping timeout: 245 seconds]
perry has quit [Ping timeout: 246 seconds]
perryh has joined #ruby
tr4656 has quit [Ping timeout: 246 seconds]
thorncp has quit [Ping timeout: 246 seconds]
thorncp has joined #ruby
tr4656 has joined #ruby
billyoc has joined #ruby
uris has quit [Quit: leaving]
areil has joined #ruby
Beoran__ has joined #ruby
catery has joined #ruby
<catery>
So why do i want to setup rails with nginx vs unicorn vs lighthy vs whatever else i don't understand
fearoffish has quit [Ping timeout: 252 seconds]
iToast has joined #ruby
<davidcelis>
#rubyonrails
<iToast>
davidcelis, How did you know
<iToast>
I wanted that chnnel
<iToast>
e.e
<davidcelis>
i was talking to catery
<davidcelis>
but you're welcome too
<catery>
#rubyonrails requires giving email addr
<catery>
not doing that
fearoffish has joined #ruby
<davidcelis>
sux2bu
<iToast>
catery, ...?
<davidcelis>
that's where rails is
<davidcelis>
why even connect to FreeNode if you're not willing to register a nick
<catery>
not giving away my email addr so i can get spam in my inbox
<davidcelis>
they're a pretty trusted server
<davidcelis>
lol yeah bro, freenode's gonna spam the fuck out of you
<davidcelis>
glwt
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
noyb has joined #ruby
<TheMoonMaster>
Freenode spams me, so hard.
<TheMoonMaster>
Not really. But I find it funny that someone would think that.
mercwith1mouth has joined #ruby
Takehiro has joined #ruby
fyolnish has joined #ruby
mwilson_ is now known as shadda_
mohits has quit [Remote host closed the connection]
shadda_ is now known as mwilson`
jorge has joined #ruby
jenrzzz has joined #ruby
billyoc has quit [Read error: Connection reset by peer]
jgrevich has quit [Quit: jgrevich]
Hanmac1 is now known as Hanmac
sambio has quit [Quit: Saliendo]
pingfloyd has quit [Quit: pingfloyd]
Takehiro has quit [Remote host closed the connection]
banisterfiend has joined #ruby
c0rn_ has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
digitalcakestudi has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
Cache_Money has quit [Ping timeout: 244 seconds]
jearvondharrie2 has quit [Ping timeout: 244 seconds]
dev_ryan70 has joined #ruby
c0rn_ has quit []
Synthead has joined #ruby
Synthead has quit [Remote host closed the connection]
Bosma has quit [Ping timeout: 264 seconds]
dev_ryan70 has quit [Ping timeout: 276 seconds]
phanousit has joined #ruby
banisterfiend has quit [Remote host closed the connection]
ringotwo has joined #ruby
und3f has joined #ruby
xbayrockx has joined #ruby
banisterfiend has joined #ruby
phanousit has quit [Ping timeout: 260 seconds]
Takehiro has joined #ruby
yxhuvud has joined #ruby
t87427 has quit [Remote host closed the connection]
t32738 has joined #ruby
Cache_Money has joined #ruby
LBRapid has joined #ruby
catery has quit [Quit: Page closed]
yubiwasabi2 has quit [Quit: Computer has gone to sleep.]
ringotwo has quit [Remote host closed the connection]
answer_42 has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
mariooo-sleep is now known as mariooo
nricciar has quit [Ping timeout: 252 seconds]
nricciar has joined #ruby
Cache_Money has quit [Ping timeout: 248 seconds]
mercwith1mouth has quit [Ping timeout: 264 seconds]
jorge has quit [Remote host closed the connection]
LBRapid has quit [Quit: LBRapid]
carrythe1ero is now known as carrythezero
diegoviola has quit [Ping timeout: 260 seconds]
justsee has quit [Quit: Leaving...]
<mdelcx>
im sending a multipart post with rest-client, and I'm having trouble getting the redirect url that comes back from the inital response
<mdelcx>
im sending a multipart post with rest-client, and I'm having trouble getting the redirect url that comes back from the inital response
cdepue has joined #ruby
ringotwo has joined #ruby
ringotwo has quit [Remote host closed the connection]
<notwen>
how could I take Dir['plugins/*.rb'].each {|p| puts p.gsub(/(plugins\/|\.rb)/, '').to_s} and make it actually turn the output to a string? to_s isn't doing anything
mohits has joined #ruby
Banistergalaxy has joined #ruby
itnomad has quit [Quit: Leaving]
<Hanmac>
notwen the output is allready a string
<notwen>
Hanmac, even when it doesn't have "'s around the output?
banisterfiend has quit [Ping timeout: 244 seconds]
<davidcelis>
puts doesn't show the outer quotes
deryl has quit [Quit: deryl]
fyolnish has quit [Remote host closed the connection]
fyolnish has joined #ruby
fyolnish has quit [Ping timeout: 252 seconds]
dev_ryan70 has joined #ruby
thaz has joined #ruby
OODavo has joined #ruby
<OODavo>
I've written a tool fairly similar to Rake, which registers Procs as "commands" (basically tasks). I'm trying to have each command executed in a unique method scope, so that commands don't encroach on each other (some methods are defined inside the commands' blocks).
<OODavo>
To achieve this, I'm trying to evaluate the commands' blocks inside an anonymous module (Module.new do). However, methods defined in one command's block seem still to be accessible from other commands. Do methods just not work that way, or is there another evaluation technique I should be using?
dev_ryan70 has quit [Ping timeout: 246 seconds]
<OODavo>
I also tried defining a custom class that runs a block with instance_eval, under the assumption that any methods in that block would be defined on the eigenclass. Doesn't seem to work either, though.
<OODavo>
I suspect in the eigenclass case that happened because the methods are just "def method" rather than "def self.method", but I don't understand why that would be an issue when using Module.new instead.
<Banistergalaxy>
Noob
<Banistergalaxy>
;)
qwebirc47241 has quit [Quit: Page closed]
Takehiro has quit [Remote host closed the connection]
Guest5516 has joined #ruby
Essobi has quit [Ping timeout: 246 seconds]
Progster has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
Essobi has joined #ruby
<OODavo>
As far as I can tell from Metaprogramming Ruby and Stack Overflow, instance_eval sets the current class to the object's eigenclass and therefore a regular def /should/ put a method on that eigenclass. So why doesn't it? :/
<banisterfiend>
OODavo: can you show how your'e using it?
<banisterfiend>
OODavo: it works here, see:
<banisterfiend>
>> o = Object.new; o.instance_eval { def pig; "piggywig"; end }; o.pig
<al2o3cr>
(String) "piggywig"
<bnagy>
mmmm pork
Banistergalaxy has quit [Ping timeout: 246 seconds]
shadoi has quit [Quit: Leaving.]
Guest66077 has quit [Quit: Guest66077]
Takehiro has joined #ruby
jorum has joined #ruby
<banisterfiend>
bnagy: sup nags
t32738 has quit [Remote host closed the connection]
<OODavo>
I'd expect that in the second block, a_method() would be undefined and produce a NoMethodError. It doesn't, though.
<banisterfiend>
OODavo: you want: Scope.new(&a)
<banisterfiend>
not, Scope.new { a.call }
<banisterfiend>
OODavo: this would work too, but isn't very nice: Scope.new { instance_eval(&a) }
<OODavo>
Ah. That does produce the right result.
<OODavo>
Trouble is, in the real code, it's Scope.new { a.call with_an_argument }
<banisterfiend>
OODavo: then use this: Scope.new { instance_exec(with_an_argument, &a) }
devnull_ has quit [Remote host closed the connection]
<banisterfiend>
OODavo: or redefine your Scope#intialize method so it takes argumetns as well as a block
<banisterfiend>
and change tis implementation to use: instance_exec(*args, &block)
hekin has joined #ruby
<OODavo>
Right. Thanks.
khakimov has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
replore has joined #ruby
Axsuul has quit [Read error: Connection reset by peer]
matrixise has quit [Ping timeout: 276 seconds]
Axsuul has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
iToast has quit [Quit: Leaving]
Takehiro has joined #ruby
mucker has joined #ruby
timonv has joined #ruby
ph^ has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
und3f has quit [Quit: Leaving.]
stuartrexking has joined #ruby
und3f has joined #ruby
pradeepto has quit [Ping timeout: 246 seconds]
jorge has joined #ruby
und3f has quit [Client Quit]
und3f has joined #ruby
pradeepto has joined #ruby
und3f has quit [Client Quit]
tr4656 has quit [Ping timeout: 246 seconds]
und3f has joined #ruby
crankycoder has quit [Ping timeout: 246 seconds]
crankycoder has joined #ruby
und3f has quit [Client Quit]
und3f has joined #ruby
zii has left #ruby ["WeeChat 0.3.7"]
replore has quit [Remote host closed the connection]
tr4656 has joined #ruby
nim_ has quit [Ping timeout: 255 seconds]
jorge has quit [Ping timeout: 252 seconds]
fantazo has joined #ruby
tr4656 has quit [Ping timeout: 246 seconds]
thone_ has joined #ruby
timonv has quit [Ping timeout: 244 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
nukenn has joined #ruby
<nukenn>
how can I make my script to update with the latest file in github ?
vandemar has quit [Ping timeout: 246 seconds]
thone has quit [Ping timeout: 245 seconds]
vandemar has joined #ruby
tr4656 has joined #ruby
<nukenn>
can anyone hear me ? do I have voice permissions in this channel ?
* nukenn
hello ?
<banisterfiend>
nukenn: no, i cant see anything you're typing. Must be some kind of bug, you should send an email to freenode
<nukenn>
banisterfiend: lol
<nukenn>
here I wrote a script and Im gonna host it on github . I wanna add a update function to the script so users can update it automatically trough githun . any help ?
<nukenn>
github *
stuartrexking has quit [Quit: Leaving...]
yxhuvud has quit [Ping timeout: 252 seconds]
* nukenn
ummm anyone
tr4656 has quit [Ping timeout: 246 seconds]
<OODavo>
Have your function download the head revision of the script off Github?
<OODavo>
Alternatively, have the users clone the actual git repo and then just make your function do a git pull.
Essobi has quit [Ping timeout: 246 seconds]
thaz has quit [Quit: thaz]
mc0e has quit [Ping timeout: 276 seconds]
<nukenn>
OODavo: no thats the problem . I dont no how to write that function download the latest version
tr4656 has joined #ruby
dev_ryan70 has joined #ruby
<OODavo>
If the script doesn't need to be platform-independent, just shell out to wget for that purpose.
Takehiro has quit [Remote host closed the connection]
<bnagy>
nukenn: if it's a ruby script then you should make it a gem and publish it
<nukenn>
OODavo: how to check if the versions are grater or less ?
<bnagy>
that's what they're for
nim_ has joined #ruby
<bnagy>
nobody is going to want to use your own weird revision control system based on shelling out to git pull
<nukenn>
bnagy: what do u mean make a gem and release ?
<bnagy>
google tiem!
Takehiro has joined #ruby
<nukenn>
bnagy: but normal ruby scripts has --update right ? Im just asking how are they doing it . because u need to check the version of the script that u has then the remote version if its grater or less then update and replace with the files that u has
baphled has quit [Ping timeout: 246 seconds]
justinmcp has joined #ruby
atno has quit [Quit: Leaving...]
dev_ryan70 has quit [Ping timeout: 246 seconds]
<bnagy>
the gem infrastructure handles updates for the vast majority of ruby code that people release
<bnagy>
and it's independant of where the source is hosted
tr4656 has quit [Ping timeout: 246 seconds]
<bnagy>
but you need to package your code as a gem, and there are some steps involved
<nukenn>
its a very simple script . Im not sure , isn it too much to make a gem outof it ?
<bnagy>
if you expect anyone to use it and you expect to update it, probably not, no
bradhe has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 240 seconds]
tr4656 has joined #ruby
Essobi has joined #ruby
ryanf has quit [Quit: leaving]
mrdodo has joined #ruby
rudyl313 has quit [Quit: Page closed]
atno has joined #ruby
t8438 has quit [Remote host closed the connection]
t19774 has joined #ruby
mwilson` has quit [Excess Flood]
mwilson` has joined #ruby
Banistergalaxy has joined #ruby
s1n4 has joined #ruby
noyb has quit [Ping timeout: 245 seconds]
arturaz has joined #ruby
dangerousdave has joined #ruby
freeayu has quit [Ping timeout: 264 seconds]
cdepue has quit [Remote host closed the connection]
hekin has quit [Quit: hekin]
chimay has joined #ruby
justinmcp has quit [Remote host closed the connection]
s1n4 has quit [Quit: leaving]
brianpWins has quit [Quit: brianpWins]
atno has quit [Read error: Connection reset by peer]
lkba has quit [Quit: Bye]
atno has joined #ruby
brianpWins has joined #ruby
elico has quit [Quit: elico]
graspee has joined #ruby
Xeago__ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
mohits has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
jamaa has joined #ruby
ly_gs has joined #ruby
<jamaa>
hi, is there a way to access last evaluated result in ruby like in irb '_' ? Let's say I want to add some 'puts' at the end of existing methods, and I want to return whatever value it was supposed return before me adding puts. is the a way to do it ?
BrianJ has quit [Quit: Computer has gone to sleep.]
replore_ has joined #ruby
yasushi has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<Hanmac>
jamaa nope
<OODavo>
jamaa: Well, puts evaluates to a result (nil), so it would replace the previous _ value anyway.
<OODavo>
Object#tap might be what you're after.
c0rn_ has joined #ruby
<jamaa>
OODavo: my intention is to add some printing for a debugging but without affecting the result value which is nil for puts
ronnieBoy has quit [Quit: Leaving...]
<banisterfiend>
jamaa: what u trying to do exactly
<banisterfiend>
jamaa: ah, u can do this: meth1.meth2.meth3.tap(&:display).meth4
Banistergalaxy has quit [Ping timeout: 252 seconds]
<jamaa>
banisterfiend: lets say I have some method that returns value, but I want to debug it and for debugging I add puts at the end of the method. now instead of whatever result this method was going to return i'm going to get nil cause of puts, so I ask if there is something like _ in irb, so I can add last_val = _, puts xxxxx, return last_val
<OODavo>
Definitely use Object#tap for this.
<banisterfiend>
jamaa: as OODavo says, use tap
<banisterfiend>
OODavo: or use p
<banisterfiend>
jamaa: using 'p' will return the object too
<OODavo>
some.big.complicated.expression.tap &:display == some.big.complicated.expression, except that it runs the tap code as well.
<banisterfiend>
jamaa: p 5 #=> 5
<jamaa>
will read about tap, thanks for hint. but would be nice to have something like _ in the lang itself
punkrawkR has joined #ruby
replore_ has quit [Remote host closed the connection]
<banisterfiend>
jamaa: also, look into using a better debugger than 'puts' :)
chimay has quit [Remote host closed the connection]
<jamaa>
banisterfiend: actually I using rubymine which has great debugger, I was just wondering if there is such thing in language so gave puts for debugging as an example
<banisterfiend>
ah ok
<OODavo>
Object#tap works in pretty much all circumstances where you'd want _, I think.
<banisterfiend>
jamaa: you could implement _ pretty easily i think
replore_ has joined #ruby
<jamaa>
banisterfiend: maybe after i finish reading eliquent ruby, cause for now I have no idea how to implement _ :)
<banisterfiend`>
matti: i would have described it as just aggressive
<banisterfiend`>
nothing that passive about it ;)
<matti>
banisterfiend`: I was trying to be polite p
Virunga has quit [Remote host closed the connection]
<matti>
Takehiro: Anyhow, I am not sure how to do it yet, but I am motivated :)
<matti>
Takehiro: Even my Sensei (at the Japanese school) is encouraging me to try :)
<Takehiro>
:D
Virunga has joined #ruby
<matti>
And I do like sound of cicadas in summer ;p
<matti>
;p
<Hanmac>
matti you could try to tavel prefore you learn the language :P it could be a motivation-boost :P
<matti>
Hanmac: I never have enough money to buy ticket.
<Hanmac>
i dont have too :(
<matti>
Hanmac: I bought one a year ago, but then Tsunami stroke.
<matti>
Hanmac: And I lost my ticket / chance.
<matti>
Hanmac: Only got very little refunded which set back my plans a little :)
omry has joined #ruby
ph^ has joined #ruby
berserkr has quit [Quit: Leaving.]
und3f has quit [Ping timeout: 244 seconds]
und3f has joined #ruby
<albel727>
looks like yet another new age kind of sect to me.
<albel727>
hmm, no, not really new age. the one of those "corporation of successful people" types. oh well.
<matti>
albel727: Rakuten?
<albel727>
yeah
ph^ has quit [Ping timeout: 246 seconds]
edwardj has quit [Remote host closed the connection]
<matti>
albel727: I am not sure how companies in Japan look like, but from what I was told and what I've seen, most resembles Rakuten.
Virunga has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<matti>
albel727: I was not really able to find "startup like" mentality. I might be wrong, though.
<albel727>
well, it's not like I can reliably tell what it really is just by looking at its site, either.
<matti>
:)
<albel727>
what tickles me off most, is its supposed internationality. japanese are bad with that.
t37780 has quit [Remote host closed the connection]
<matti>
albel727: s/bad/not used to/ -- is what I've noticed.
t23063 has joined #ruby
<albel727>
that's the same thing, for all intents and purposes.
Virunga has joined #ruby
<matti>
albel727: Although, every single Japanese person in London I've met so far, was super-open about things like that. Which is what really impresses me.
<matti>
Takehiro would have to comment ;d
und3f has quit [Ping timeout: 252 seconds]
<Takehiro>
whats the things like that ? :O
<albel727>
japanese person in london <- that's the problem. travelling japanese (and I don't really mean plain tourism), are wholly different beasts.
<matti>
Ah.
<matti>
Takehiro: Being open for other cultures etc etc.
<Takehiro>
oh, most of the people arent open minded for those things :P
<matti>
;p
justinmcp has joined #ruby
<Takehiro>
been improving these days, but still nah :p
<matti>
Darn ;p
<matti>
So, my chances are slim.
<matti>
;d
radic has quit [Read error: Connection reset by peer]
<albel727>
they are. unless it's some very VERY unusual japanese company, you'll be better off working somewhere else.
<matti>
It so funny.
<matti>
Getting a job as English teacher seems to be easier.
<albel727>
yeah
<matti>
Trying to get a job as an Engineer seems to be next-to-impossible.
johnjohnson has joined #ruby
radic has joined #ruby
emmanuelux has joined #ruby
<albel727>
it's only logical. japanese goverment is all for keeping workplaces for japanese. so they only open up for those kind of jobs, where a japanese can't reasonably handle.
<matti>
albel727: True. And fair.
yasushi has quit [Remote host closed the connection]
<matti>
albel727: But I've few people telling me that there is shortage of skills in Engineering as well.
<banisterfiend`>
matti: software engineering?
<banisterfiend`>
or a real kind?
<matti>
banisterfiend`: Systems, Software ...
<matti>
banisterfiend`: Haha
<matti>
banisterfiend`: I see what you did there.
<matti>
d;
<banisterfiend`>
hehe
<banisterfiend`>
most "software engineers" are woefully underqualified compared to their civil/electrical engineer counterparts
<Hanmac>
albel727 so jobs with "R" are the only jobs for outsiders?
<matti>
banisterfiend`: I am not even a CS person ;] I was studying Physics ;d
* matti
is such a nerd ;/
thaz has joined #ruby
<banisterfiend`>
matti: cool
<banisterfiend`>
matti: how far did u take it?
<matti>
banisterfiend`: I decided to stop after getting BSc.
<banisterfiend`>
ah ok
<matti>
banisterfiend`: Getting a job that pay bills being a Physicist was ...
<banisterfiend`>
do you still remember some of the math?
tommyvyo has joined #ruby
<matti>
banisterfiend`: When I realised that, I quit and went with something else.
<matti>
banisterfiend`: I am studying now CS.
<matti>
banisterfiend`: But more for fun.
<banisterfiend`>
matti: well, u can do alright as a physicist. My friend who studied physics now works for meteorology department
<Hanmac>
matti you know that there are virtual particles that appears and disappears in the void? i read that they manage to turn them into "real" particles ...
<matti>
Although, not sure how this is going to end. Tuition is so expensive in the UK right now. I may not be able to afford to finish.
<matti>
banisterfiend`: :)
<banisterfiend`>
matti: you should have studied in amsterdam where education is very cheap
<matti>
Hanmac: Quantum Physics (or whichever branch concerns itself with virtual particles and multi-verse theories) is full of things like that.
<banisterfiend`>
matti: my brother did a masters in law in amsterdam university for next to nothing
dev_ryan70 has joined #ruby
answer_42 has quit [Remote host closed the connection]
<matti>
banisterfiend`: Well, when I was younger it was a little different story / time.
<matti>
banisterfiend`: I was born in Poland.
<Hanmac>
matti: that makes the startrek replcator "possible" :D ... the only problem is the enery source :(
<matti>
banisterfiend`: And back then it was not even close to a "country of wholesale possibilities".
<matti>
Hanmac: It is always about engergy ;]
<banisterfiend`>
matti: maybe you can transfer to a university and get your current courses cross credited
<matti>
Hanmac: FTL speed -- all about energy too ;d
mrck has joined #ruby
<matti>
banisterfiend`: Maybe. But I don't know German / Duch.
<banisterfiend`>
matti: you dont need to i think, their courses are in english iirc
<banisterfiend`>
at least it was at masters level, not sure about undergrad
<matti>
banisterfiend`: Plus, I would not move to Netherlands at this point in time.
* Hanmac
thinks about a engine that steal enery from the void itself
savage- has quit [Remote host closed the connection]
<matti>
Hanmac: There are energy sources apparently successful at doing that.
hagihala has joined #ruby
<matti>
Hanmac: Alsmost like the zero-point energy we know form science ficiton series.
<Hanmac>
yeah ... now we need to make them "real" :P
<matti>
Hanmac: And people even keep inventing coils wired using some pattern common in the Universe claiming that they are more efficient.
<matti>
Hanmac: None of which was proven by science yet ;d
<matti>
banisterfiend`: I see no reason to get MSc. It seem redundant.
<Hanmac>
matti question about turning matter into energy ... exist a way to convert matter into pure energy without using anti-matter?
<matti>
banisterfiend`: I was thinkning about getting onto a PhD programme, but when I learned how much of a cut-throat business this is, and that I would have to move out to a shack in under the London Bridge.
<banisterfiend`>
matti: well, it can give you an opportunity to specialize
<matti>
banisterfiend`: I decided that its not worth the effort / money.
paolooo has joined #ruby
eldariof has joined #ruby
<matti>
Hanmac: Define "pure energy" ;d
<matti>
banisterfiend`: MSc in the UK now its ~9k.
<matti>
banisterfiend`: No way I can afford that.
<banisterfiend`>
matti: get the fuck out of the UK
<Hanmac>
like heat or radiaton ... or something that can be used for electic energy
<matti>
banisterfiend`: I am trying :) UK -> Japan
<banisterfiend`>
matti: continental europe is cheap as chips and unless you're at cambridge/oxford, it's likely the continental university will be much higher ranked
hagihala has left #ruby ["Leaving..."]
* Hanmac
is trying saxony -> somewhere else
<matti>
banisterfiend`: I also cannot do a full time curse.
<matti>
banisterfiend`: There is only me. I would have to work.
specialGuest has quit [Ping timeout: 244 seconds]
bapa has quit [Read error: Connection reset by peer]
bapa has joined #ruby
<banisterfiend`>
matti: you could do it part time
yshh has joined #ruby
<matti>
Not sure.
tommyvyo has quit [Quit: Computer has gone to sleep.]
Virunga is now known as LennyLinux
yshh has quit [Client Quit]
jarek has joined #ruby
yasushi has joined #ruby
fantazo has quit [Remote host closed the connection]
dekroning has quit [Remote host closed the connection]
paolooo has quit [Quit: Page closed]
hoelzro|away is now known as hoelzro
Xeago has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
jorum has quit [Quit: Leaving...]
yshh has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
s1n4 has quit [Quit: leaving]
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
<al2o3cr>
-e:1:in `eval': undefined method `define_method' for main:Object (NoMethodError), from (eval):1:in `each', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<banisterfiend`>
vectorshelve: you could also do: define_method(a) { puts __method__ }
<vectorshelve>
banisterfiend`: ok.. Mon_Ouie it seems to give me the above error
<Cache_Money>
I already have an array of all the words in the English language, loop over those and see if it's possible to spell that world given the 16 input letters. But this approach doesn't take into account where the tile is on the board
sonkei has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
yasushi has joined #ruby
specialGuest1 has quit [Read error: Connection reset by peer]
gfontenot has quit []
<matti>
Cache_Money: Why so complex?
yasushi has quit [Read error: Connection reset by peer]
yasushi_ has joined #ruby
<Cache_Money>
matti: which part?
<matti>
Cache_Money: Can't you just check the word after somebody finishes sliding?
Xeago has quit [Remote host closed the connection]
<matti>
They are cedent data structures designed to stre strings.
<matti>
That allow for quick lookup.
dpk has joined #ruby
<Cache_Money>
mattI: I want to identify the word so I can use it before my turn is over.
otters has quit [Ping timeout: 240 seconds]
<Cache_Money>
matti: Here's how I'm going to use it: Once my turns start I input all the letters in their corresponding location. Hit the pause button, run this script, it spits out the words (with values from highest to lowest), then I resume the game
s1n4 has quit [Read error: Connection reset by peer]
<shevy>
upasna \o/ I like simple problems
<upasna>
:D
VictorMartins has quit [Quit: VictorMartins]
<Hanmac>
vectorshelve:
<Hanmac>
>> a = b = 3; p a , b
<al2o3cr>
(Array) [3, 3], Console: 3, 3
cool has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
<Hanmac>
someone allready told you that ... and i knew the exact time!
ananthakumaran1 has quit [Quit: Leaving.]
<vectorshelve>
Hanmac: I know that concept mate but I was more interested wrt to the context of the app
<vectorshelve>
Hanmac: def update @state = @new_state end def state=(value) @new_state = value end
uris has joined #ruby
amskah has quit [Quit: Leaving]
<Hanmac>
you need to init BOTH @state AND @new_state otherwise the update or the state method will fail or so something bad
digitalcakestudi has quit [Read error: Connection reset by peer]
<vectorshelve>
Hanmac: ok... could you be a lil more precise.. so that I get that fundamental correct.. we have specified attr_reader :state so only read is possible.. so how were we able to instantiate it inside initialize /
<vectorshelve>
Hanmac: using @state = @new_state = state
areil has quit [Remote host closed the connection]
adeponte has joined #ruby
<Hanmac>
i think you need to understand how instance_variables work ...
flak has joined #ruby
flak is now known as Guest27575
digitalcakestudi has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
mbk has joined #ruby
shadoi has joined #ruby
ringotwo has quit [Remote host closed the connection]
burgestrand has quit [Ping timeout: 240 seconds]
<vectorshelve>
Hanmac: could me make it a lil clear further
<vectorshelve>
Hanmac: I am kinda stuck up with it.. thats why.. just help me with it boss please..
eldariof has quit [Ping timeout: 248 seconds]
<Hanmac>
if you are to lazy to read then i cant help you ... (i belive that you can read)
<vectorshelve>
Hanmac: def initialize(name = "World") @name = name irb(main) end
karakedi has joined #ruby
mahmoudimus has joined #ruby
t10618 has quit [Remote host closed the connection]
<vectorshelve>
Hanmac: here we do multiple assignments as well as attr_accessor
t43108 has joined #ruby
<Hanmac>
you didnt look at the sample i give to you
kn330 has quit [Ping timeout: 260 seconds]
RubyPanther has quit [Quit: self.exit(:stage=>:left)]
Neil_ has quit [Remote host closed the connection]
kn330 has joined #ruby
<Hanmac>
in short: you dont need attr_accessor when you want instance variables inside the instance itself ... attr is only for accessing them from the OUTSIDE
recycle has joined #ruby
<vectorshelve>
Hanmac: ok..
recycle has quit [Remote host closed the connection]
kiyoura has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
mbk has quit [Ping timeout: 244 seconds]
schaerli has quit [Remote host closed the connection]
Guest27575 is now known as rippa
<vectorshelve>
any suggestions on designing a good oop design for this game ?
adeponte has quit [Remote host closed the connection]
Virunga has joined #ruby
<Hanmac>
to few information ... what kind of cards? do they need extra objects? etc
<Hanmac>
but i dont want to help you with this
<vectorshelve>
Hanmac: no kind of like assume there is a deck of cards(class)
<vectorshelve>
Hanmac: deck contains collection of cards
<vectorshelve>
Hanmac: two player objects and game class
heisenmink has joined #ruby
berkes has quit [Ping timeout: 244 seconds]
<vectorshelve>
Hanmac: so cards are equally alloted to each player
<vectorshelve>
Hanmac: now they start putting out card one by one and if the card matches then he gets the other card as well.. so once the game is over the player having max cards wins
<Hanmac>
you still not answer my question
fastred has joined #ruby
<vectorshelve>
Hanmac: simple cards.. may be an attribute with a value.. and we compare these values for cards to see of the match card.value == "king"
fastred has quit [Client Quit]
<vectorshelve>
Hanmac: like above.
mbk has joined #ruby
<vectorshelve>
Hanmac: so game class initializes players.. players will have cards allocated equally b/w them.. player has a set of cards.. now we need a class (strategy pattern) which takes two players as parametres
<Hanmac>
exact this is the reason i dont want to help you ... you dont answer questions, you dont respond to suggestions like matti post, and when you dont get what you want you are getting even more annoyable
<vectorshelve>
when did matti post a suggestion now ?
Paradox has joined #ruby
<vectorshelve>
Hanmac: so what next with the design ?
perun_ has joined #ruby
deryl has quit [Quit: deryl]
<Hanmac>
(17:53:01) matti: >> a = 1 ; c = b = a ; p a, b, c
mc0e has quit [Ping timeout: 252 seconds]
gfontenot has quit []
<vectorshelve>
Hanmac: I am being honest... I missed that comment since he didnt ping me directly..
Marshac has quit [Ping timeout: 245 seconds]
<shevy>
vectorshelve you really should respond to people who talk to you man
<vectorshelve>
shevy: I am honest shevy I didnt see that comment :(
Nisstyre_ has joined #ruby
<vectorshelve>
shevy: or else why would I not respond when I know that someone is taking time out to help me .. Sorry matti
<shevy>
vectorshelve no, not that comment alone, I mean before I asked whether you tried a.to_sym for instance and you never answered :D
elico has joined #ruby
khakimov has joined #ruby
<shevy>
do you see only lines where your name is used on IRC?
<vectorshelve>
shevy: I did reply back.. saying that line threw error
Nisstyre_ has quit [Remote host closed the connection]
<vectorshelve>
shevy: mostly.. since I use earphone.. I get a voice when someone pings me
Nisstyre_ has joined #ruby
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
<Hanmac>
shevy and even worse: when he dont get an respond, he ask the same message again
elico has quit [Read error: Connection reset by peer]
<vectorshelve>
Hanmac: I got logged out couple of times mate.. I didnt want to miss any reply
elico has joined #ruby
<shevy>
vectorshelve ahhh hehe. what IRC client do you use?
<vectorshelve>
shevy: web browser
<Hanmac>
wrong. there wasnt a logout since the two messages
jorge has joined #ruby
Morkel has quit [Read error: Connection reset by peer]
havenn has joined #ruby
A124 has quit [Quit: Leaving.]
chimay has quit [Quit: WeeChat 0.3.9-rc1]
<vectorshelve>
Hanmac: there wasnt.. I dint know why when I actually got logged out when my connection was out and I tried relogin it said nick already in use.. and I tried couple of times to get in
* atmosx
is listening to Sting - I Was Brought To My Senses, from the album The Best Of 25 Years CD2 [5:49 mins] [320 kbps MPEG audio file] [14.01 MB] [played missing value times]
Virunga has joined #ruby
QKO has quit [Changing host]
QKO has joined #ruby
Virunga is now known as LennyLinux
wallerdev has joined #ruby
ringotwo has joined #ruby
zz_Kiall is now known as Kiall
<atmosx>
I wrote my first 5+ lines function without making a single mistake (applaud plz).
* atmosx
yeeha
_Vile has quit [Ping timeout: 256 seconds]
mrck has joined #ruby
<matti>
Well, Who was...
ringotwo has quit [Remote host closed the connection]
JStoker has quit [Excess Flood]
jbw has quit [Ping timeout: 246 seconds]
cantonic has quit [Quit: cantonic]
t14181 has quit [Remote host closed the connection]
t56506 has joined #ruby
cantonic has joined #ruby
seanstickle has quit [Quit: seanstickle]
jgrevich has quit [Ping timeout: 276 seconds]
adeponte has joined #ruby
yoklov has quit [Quit: computer sleeping]
Russell^^ has quit [Quit: Russell^^]
uokesita has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
adeponte has quit [Ping timeout: 244 seconds]
mrdodo has quit [Remote host closed the connection]
t0rc has quit [Quit: WeeChat 0.3.8]
jbw has joined #ruby
zii has joined #ruby
<zii>
How do I make ruby think a string is binary/
<Paradox>
i have a 2 dimensional hash that doesn't show anything when i run keys on it
<Paradox>
yet the keys return values
<hoelzro>
zii: what are you trying to do?
<hoelzro>
Paradox: do you have some example code we could look at?
<Paradox>
hoelzro, not really, i'm working with massive data
<Paradox>
but basically
<Paradox>
im iterating over a log
<Paradox>
each log entry is a hash inside an array
<Paradox>
so i use each to go over it
<Paradox>
i take the author property
<Hanmac>
zii what is your input and what your wanted output?
ben_alman has quit [Excess Flood]
<Paradox>
and stick that as the first dimensional key in my new hash
<Paradox>
then the other values and stick them as the second dimensional keys
<Paradox>
i can't get a key listing of the first dimensions
yoklov has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
<zii>
Hanmac, hoelzro, Downloading a JPEG, doing stuff to it, slicing.
<zii>
Through %x{curl
<matti>
No, no.
cakehero has quit [Quit: Computer has gone to sleep.]
<matti>
Get bindings to curl.
johnjohnson has joined #ruby
<zii>
No.
<matti>
Yes.
<matti>
;]
<zii>
Why?
JStoker has joined #ruby
<zii>
That won't solve anything.
cakehero has joined #ruby
<matti>
:>
allsystemsarego has quit [Quit: Leaving]
<zii>
And is too much to do for a little script.
<Hanmac>
zii you could open the file in binary mode
<Paradox>
hoelzro, basically, i am creating the hash with myhash = Hash.new(Hash.new(0))
<Paradox>
so the default value is a hash
<Hanmac>
Paradox that does not work :(
<Paradox>
Hanmac, damnit
<Paradox>
guess ill use an OpenStruct
<hoelzro>
Paradox: you can do Hash.new { Hash.new(0) }, though
<Paradox>
hah
<Mon_Ouie>
That solves one of the two problems in the code
wargasm has quit [Ping timeout: 252 seconds]
<Mon_Ouie>
The other problem is doing h[k] doesn't actually add the key to the hash, it just returns a value for it
<Mon_Ouie>
You need { |h, k| h[k] = Hash.new(0) }
<zii>
Hanmac, What happens with a string when it's read from a stream that has been set as "rb"
<atmosx>
BullShark: don't you have an RPM or something that comes with CENTOS?
<upasna>
I've a C background
<atmosx>
upasna: yeah, i figure it out, good luck with ruby
<upasna>
thanks atmosx :)
c0rn_ has quit [Ping timeout: 240 seconds]
<atmosx>
BullShark: I think the problem is your paths
<atmosx>
not the bundler
<BullShark>
atmosx -> according to the guide, Now let’s install Ruby Enterprise Edition. The enterprise version of Ruby is still free, but it uses older, more stable components of Ruby, it’s also focused towards memory conservation (although it still compares to Java’s memory appetite). I would strongly recommend not using any other version/distribution of Ruby since I found many compatibility errors that caused me to have to start all
<BullShark>
over again many times!
Criztian has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<atmosx>
I see
<atmosx>
makes sense
<atmosx>
but imho the ruby that comes with centos
<atmosx>
is stable enough, which is surely 1.8 as in all distributions even bleeding edge like Gentoo, have 1.8 still in base-system
jonathanwallace has joined #ruby
<atmosx>
following your distributions ruby, you won't have to mess with paths etc.
c0rn_ has joined #ruby
gfontenot has quit []
<Hanmac>
my ubuntu version has 1.9.3 as default ruby
CarlB_the_great has quit [Remote host closed the connection]
<BullShark>
atmosx -> so you are saying it is a fault of ruby enterprise?
<atmosx>
BullShark: indirectly, probably. If the bundler is up-to-date and doesn't work it's becuase it cannot read the gems
justinmcp has joined #ruby
Bosox20051 has joined #ruby
noyb has joined #ruby
zz_Kiall is now known as Kiall
Xeago has joined #ruby
vitor-br has quit [Quit: Saindo]
c0rn_ has quit [Ping timeout: 252 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
twinturbo has quit [Ping timeout: 244 seconds]
c0rn_ has joined #ruby
mengu has quit [Remote host closed the connection]
pettsson has quit [Remote host closed the connection]
zarubin has quit [Remote host closed the connection]
vfuse has quit [Ping timeout: 244 seconds]
zarubin has joined #ruby
rakl has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
jorge has quit [Remote host closed the connection]
t56506 has quit [Remote host closed the connection]
cdepue has quit [Remote host closed the connection]
Spooner_ has joined #ruby
jorge has quit [Remote host closed the connection]
Spooner has quit [Ping timeout: 252 seconds]
kaushik_ has quit [Ping timeout: 246 seconds]
becom33 has joined #ruby
weeb1e_ has quit [Quit: No Ping reply in 180 seconds.]
weeb1e has joined #ruby
jorge has joined #ruby
rakl has quit [Quit: sleeping]
jorge has quit [Remote host closed the connection]
richardcreme has quit [Remote host closed the connection]
noyb has quit [Ping timeout: 252 seconds]
richardcreme has joined #ruby
t48661 has quit [Remote host closed the connection]
jorge has joined #ruby
<mdelcx>
blazes816: thanks :)
t57457 has joined #ruby
<canton7>
mdelcx, swift_upload.rb, line 5 or so: swiftfile_host looks constant? if so, make it a constant
stepnem has quit [Ping timeout: 244 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
kirun has quit [Quit: Client exiting]
<mdelcx>
my thought was that this would make it obvious that these can be overridden
<mdelcx>
i guess that would be the case regardless
cad_ has joined #ruby
chimkan has quit [Quit: chimkan]
josh^ has joined #ruby
<canton7>
yeah, I wasn't sure. would be nice to see some docs :)
<mdelcx>
yeah for sure, that's my next move
<mdelcx>
real repc and docs
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
SCommette has joined #ruby
noyb has joined #ruby
ciopte7 has quit [Quit: ciopte7]
SCommette has quit [Client Quit]
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
SCommette has joined #ruby
<becom33>
can anyone explain me how can I add a update function into a script ?
<blazes816>
def update; end
<becom33>
I cant seems to find any tutorials
<blazes816>
what do you want it to do? update what?
jorge has quit [Remote host closed the connection]
jorge has joined #ruby
<becom33>
blazes816, no no . I mean a method I can make project update . I have a simple project . which has like 5 ruby files . this is a demo project . Im gonna upload it to github . so I was thinking maby there is a way I can put a --update to the script to update from github if there is a latest version of it released
jorge has quit [Remote host closed the connection]
bier has quit [Ping timeout: 246 seconds]
<blazes816>
ah, got it. so it depends on how your project installs
<blazes816>
if it's just from the github repo, you can make the --update flag call "git pull" in the install dir
jorge has joined #ruby
yasushi has joined #ruby
<becom33>
blazes816, but how can I check if Im having the latest version ?
<blazes816>
for that you could shell out to git/github by running/parsing git status. but probably you want a place you can make an http call and get the current version and/or version history.
<mdelcx>
if all you care about is getting the latest code, you don't need to worry about the version
<blazes816>
example.com/current_fooburger_version
<blazes816>
returns the current version e.g. "1.0.0"
<canton7>
the main question is: do you want to rely on git? :P
chimkan has joined #ruby
<mdelcx>
why wouldn't you?
<blazes816>
for the installation handling it may not be the best option
<blazes816>
if it's simple (sounds like this is), could work out great
<mdelcx>
thats what I was thinking
<becom33>
canton7, what do u suggest for a update function
specialGuest has quit [Ping timeout: 244 seconds]
yasushi has quit [Ping timeout: 246 seconds]
<canton7>
becom33, it really depends on what you want to do. is this something which is installed as a gem, or instance? or something which is installed by cloning a github repo?
<canton7>
s/or instance/for instance
<becom33>
canton7, its a simple project be can be used cloning from github repo
seanwash has joined #ruby
<blazes816>
options[:update] && `git pull`
<canton7>
if that's how people *have* to install it, so the dir the script's in is always a git repo, just a git fetch && git reset --hard @{u} would be fine
<ggreer>
I never noticed that the jekyll guy is also the grit guy
<cad_>
I am trying to deploy a redmine instance to openshift. I am following this sample project. But getting config/locales/pt-BR.yml): found unknown escape character while parsing a quoted scalar at line 994 column 35 (Psych::SyntaxError) error without hope.
<hackeye>
hi.. absolute ruby newbie here.. is there an equivalent of the linux shell's "sh -x" functionality in ruby? basically i wanna see line-by-line execution of code
seanwash has quit [Client Quit]
thnee has quit [Remote host closed the connection]
mrdodo has joined #ruby
<fowl>
line-by-line evaluation won't show you problems when your method.calls.are.chained.and { inlined }
<fowl>
the answer is no
<kiyoura>
use your eyes plus the manual imo
TheNullByte has quit [Quit: TheNullByte]
larissa has joined #ruby
thnee has joined #ruby
<hackeye>
kiyoura: thanks for the very informative answer which i knew nothing abt
<kiyoura>
try it!
larissa has quit [Client Quit]
larissa has joined #ruby
TheNullByte has joined #ruby
SCommette has joined #ruby
mrdodo has quit [Ping timeout: 252 seconds]
<hackeye>
and u should try to get a life rather than lurking in irc channels giving useless answers coz u have nothing better to do
<canton7>
hey hey, less of the anger
<wvms>
you'll upset the kids
larissa has quit [Client Quit]
<canton7>
also, ruby-debug
jorge has quit [Remote host closed the connection]
larissa has joined #ruby
larissa has quit [Client Quit]
larissa has joined #ruby
<hackeye>
thanks canton.. just thought there may be a simple switch or something.. i was looking at ruby-debug now
jenrzzz has quit [Ping timeout: 244 seconds]
larissa has quit [Read error: Connection reset by peer]
larissa has joined #ruby
minijupe has joined #ruby
<fowl>
lol
<hackeye>
as for the anger, how do you think a self-proclaimed newbie should react if he gets such an answer to what is basically a yes or no question?
<fowl>
hackeron: with a grain of salt. its irc
larissa has quit [Client Quit]
<kiyoura>
lol
larissa has joined #ruby
<canton7>
people joke around. there was nothing malicious
* kiyoura
still thinks that wasn't that bad advice, i've learned plenty from doing just that.
<fowl>
hackeye: &
<fowl>
**
cdepue has joined #ruby
larissa has quit [Client Quit]
<hackeye>
kiyoura: and you think i'm coding blind, and i don't know abt. man pages or google?
aarwine has quit [Remote host closed the connection]
<canton7>
you did the asking nicely and saying thanks bits right. the not-getting-wound-up-when-someone-doesn't-answer-your-exact-question could do with some work :P
<hackeye>
so i just jump straight into the closest channel i find and ask away?
<kiyoura>
hackeye, with that sort of question, and the usual visits to this channel. presumably, yes.
larissa has joined #ruby
* hackeye
thinks getting a life wasn't bad advice either
<kiyoura>
i like irc'ing from work :p, but that's off topic!
<fowl>
:ROLLEYES:
<hackeye>
anyway, for the others.. thanks for the pointers
hackeye has left #ruby [#ruby]
guns has quit [Quit: guns]
seanwash has joined #ruby
cdepue has quit [Ping timeout: 260 seconds]
blazes816 has quit [Read error: Connection reset by peer]
gfontenot has joined #ruby
blazes816 has joined #ruby
darkf_ has joined #ruby
proshot is now known as statarb3
tommyvyo has quit [Quit: Computer has gone to sleep.]
kn330 has quit [Ping timeout: 246 seconds]
jjang has joined #ruby
joephelius has quit [Ping timeout: 252 seconds]
kn330 has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
darkf has quit [Ping timeout: 246 seconds]
darkf_ is now known as darkf
joephelius has joined #ruby
nari_ has quit [Ping timeout: 272 seconds]
cdepue has joined #ruby
xbayrockx has quit []
SCommette has quit [Quit: SCommette]
chimkan___ has joined #ruby
chimkan has quit [Ping timeout: 244 seconds]
chimkan___ is now known as chimkan
statarb3 has quit [Quit: Leaving]
luckyruby has quit [Ping timeout: 272 seconds]
deryl has joined #ruby
Takehiro has quit [Remote host closed the connection]
jenrzzz has joined #ruby
luckyruby has joined #ruby
havenn has joined #ruby
t29180 has quit [Remote host closed the connection]
t36717 has joined #ruby
havenn has quit [Remote host closed the connection]
verto|off is now known as verto
banisterfiend` has quit [Remote host closed the connection]