vlad_sta_ has quit [Remote host closed the connection]
neurone-1337 has quit [Ping timeout: 248 seconds]
bhaarat has quit [Quit: bhaarat]
__alpaca has joined #ruby
aytch_ has joined #ruby
zastern has quit [Remote host closed the connection]
_cheney3 has joined #ruby
brotatos has joined #ruby
aeontech has joined #ruby
huoxito has quit [Ping timeout: 258 seconds]
freerobby has quit [Quit: Leaving.]
Mattix has quit [Ping timeout: 246 seconds]
__alpaca has quit [Ping timeout: 258 seconds]
akashj87 has joined #ruby
rippa has joined #ruby
hiyakashi has joined #ruby
michaelmartinez has joined #ruby
bean__ has joined #ruby
bubblehe_ has quit [Remote host closed the connection]
jduan1981 has joined #ruby
girija has joined #ruby
mrdtt has joined #ruby
nbaksalyar has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
nbaksalyar has joined #ruby
huoxito has joined #ruby
sambao21 has joined #ruby
skyjumper has left #ruby [#ruby]
Mattix has joined #ruby
Cyrus_ has joined #ruby
rickruby has joined #ruby
<Cyrus_>
how do you set and return a scripts return value as param to ruby's exit function?
rickruby has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
neurone-1337 has joined #ruby
wesside has joined #ruby
cyberarm has quit [Quit: Bye]
mootpointer has joined #ruby
<Cyrus_>
I need to write a script that will take in a text file and if a line contains the word "attach" and that line does not start with > then I need to return 1 otherwise return 0 and I should be able to get this return value by running the script then doing echo $?
chriskk has joined #ruby
<lufi>
is there a way to view the info of a gem in a terminal?
mercwithamouth has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
rickruby has joined #ruby
love_color_text has joined #ruby
cha1tanya has joined #ruby
threesome has quit [Ping timeout: 252 seconds]
breakingthings has quit []
neurone-1337 has quit [Ping timeout: 240 seconds]
DementedInsanity has joined #ruby
rickruby has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
mixel has quit [Quit: mixel]
jimg has joined #ruby
stevechiagozie has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
stevechiagozie has quit [Remote host closed the connection]
girija has quit [Ping timeout: 258 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
mootpointer has quit [Quit: Computer has gone to sleep.]
charliesome_ has joined #ruby
Cyrus_ has quit [Quit: Page closed]
tspike has quit [Quit: leaving]
shammancer has quit [Quit: Leaving.]
plains has quit [Ping timeout: 258 seconds]
rickruby has joined #ruby
rickruby has quit [Remote host closed the connection]
shammancer has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<s2013>
basically what i want to do run a ruby program that while its running, any user that tries to access certain websites would be redirected
niklasb has quit [Ping timeout: 256 seconds]
newUser1234 has quit [Remote host closed the connection]
rickruby has joined #ruby
SCommette has joined #ruby
Tobarja has left #ruby ["PING 1367037752"]
seich| is now known as Seich
mattbl has quit [Quit: This computer has gone to sleep]
freerobby has quit [Quit: Leaving.]
mercwithamouth has joined #ruby
freerobby has joined #ruby
rickruby has quit [Remote host closed the connection]
splittingred has quit [Quit: splittingred]
bean__ has quit [Quit: Computer has gone to sleep.]
niklasb has joined #ruby
Ontolog has joined #ruby
rickruby has joined #ruby
rakl has joined #ruby
aeontech has quit [Quit: aeontech]
rickruby has quit [Remote host closed the connection]
<s2013>
anyone up?
chrishunt has joined #ruby
cw has quit [Quit: Leaving]
niceguy1234 has quit [Ping timeout: 255 seconds]
mattbl has joined #ruby
hiyakashi has quit [Quit: お前は知りすぎた]
<epicurus>
s2013: you can edit files yes
huoxito has quit [Quit: Leaving]
mahmoudimus has joined #ruby
<s2013>
k here is what im trying to do. not sure if its possible with ruby
ananthakumaran has joined #ruby
<s2013>
basically whenever the ruby script is running in the background, any user that is trying to use that computer, everytime they go to some specific sites, they get forwarded
<s2013>
does that make sense?
<epicurus>
a site filter?
<s2013>
sort of yeah
<s2013>
a very, very basic one
<s2013>
the idea is that a company can add sites they want to filter and then the ruby script pulls those urls and filters them that is it
ariedler has quit [Remote host closed the connection]
BizarreCake has joined #ruby
freerobby has quit [Quit: Leaving.]
<s2013>
i can do the web stuff with rails fairly easy but not sure how to do system/socket stuff in ruby to be hoenst
<TTilus>
s2013: do you already know how are gonna do the actual forwarding?
<s2013>
what do you mean?
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
love_color_text has quit [Read error: Connection reset by peer]
<TTilus>
you have a webserver (apache?) running and serving up stuff, right?
<TTilus>
and you wanna switch between serving and forwarding?
<s2013>
for now its just my computer
<s2013>
so using regular browsers
<TTilus>
depending on the script running or not?
mercwithamouth has quit [Ping timeout: 252 seconds]
<s2013>
what do you mean depending on the script running?
chriskk has quit [Ping timeout: 252 seconds]
<s2013>
do i have to setup some proxy server?
<TTilus>
i dont know
<TTilus>
you need to elaborate the case more
<s2013>
well im just building a very simple prototype. the idea is a company can install a filter
<s2013>
for now they can just run a ruby script
<TTilus>
usecase is?
<s2013>
and anytime anyone using that computer, everytime they try to go to some flagged url, they get forwarded to a company policy
<s2013>
so lets say nsfw stuff or youtube or whatever
<s2013>
and company can add urls from a web app
chandankumar has joined #ruby
<s2013>
i thought one way to do that was edit the host file
<s2013>
but i dont think thats the most efficient way
<TTilus>
ah, you want to provide a broken internet experience for given computers :)
<s2013>
yeah
anderson has joined #ruby
<TTilus>
there are whole range of sw doing right that
<s2013>
yeah im sure there are tons. im just building a prototype for a competition
<TTilus>
they are addons/policies for proxies
rickruby has joined #ruby
charliesome_ is now known as charliesome
<s2013>
is this something that can be built in ruby in fairly short amount of time? just a very basic one
<TTilus>
it is a proxy you want to create
<s2013>
do i need to setup a proxy server? or can i create one locally? i just need to demo it no one is going to test it
<s2013>
we had another programmer but he fell sick so im the only one on the team and im a newb
rickruby has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
<TTilus>
if you only need to demo, you can configure the demoing browser to use localhost:8080 as proxy and have your proxy software listen to it
<s2013>
8080 is the default port right
kenneth has joined #ruby
SCommette has quit [Quit: SCommette]
niklasb has quit [Ping timeout: 256 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
<TTilus>
there is no such thing as default proxy port
<TTilus>
but 8080 is pretty common for http proxy
<TTilus>
and just google for http proxy in ruby
<s2013>
yeah thats what i meant
<TTilus>
i bet there are a ton of them
nbaksalyar has quit [Remote host closed the connection]
nbaksalyar has joined #ruby
<TTilus>
pick one of them as the basis for your app, just check that the license suites your purpose (or get permission/licens from author)
mumblerit has joined #ruby
axxT has quit [Read error: Connection reset by peer]
__alpaca has joined #ruby
etank has quit [Ping timeout: 264 seconds]
emergion has joined #ruby
<s2013>
yeah
<s2013>
and i was thinking of maybe parsing a json file to grab the urls
<TTilus>
...and pick one that does the closest what you want, and most importantly has small and understandable codebase
<s2013>
do i create a proxy manually? im confused as to how that works though
<TTilus>
you dont want to end up with app thet you dont understand yourself, it prolly does not actually do what you want :)
johnnyfuchs has quit [Remote host closed the connection]
__alpaca has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<s2013>
so i can try to read and understand that code and replicate it to build a simple http proxy right?
emergion has quit [Client Quit]
<s2013>
and then i need to listen to what goes through the proxy?
<TTilus>
yes
<s2013>
ok.. i got the proxy part down.. but how do i check what happens in that proxy?
jimg has quit [Remote host closed the connection]
lunchtime has quit [Read error: Connection reset by peer]
<TTilus>
you parse the incoming http request, actually already the first line of it contains the url, and if you find flagged stuff, you respond with redirection to policy url and otherwise just proxy as usual
tomzx_mac has quit [Quit: return 0;]
<s2013>
would the best be to list the sites in a text file and for every incoming http request loop through the file and check if the site is flagged?
<TTilus>
and of course in flagged case you dont proxy at all
tomzx_mac has joined #ruby
<TTilus>
thats gonna kill your performance
<s2013>
so whats the best way you think?
<s2013>
is it Net::HTTP:Get = incoming request?
r0bglees0n has quit [Read error: Connection reset by peer]
nari has joined #ruby
brotatos has quit [Quit: WeeChat 0.4.1-dev]
browndawg has joined #ruby
icecandy has quit [Remote host closed the connection]
<s2013>
alright any ways thanks for the help im about to pass out
s2013 has quit []
r0bgleeson has joined #ruby
bubblehead has joined #ruby
<TTilus>
thats outgoing
<TTilus>
id use sockets directly
keyvan has quit [Read error: Connection reset by peer]
bubblehead has quit [Read error: Operation timed out]
<TTilus>
and also, while debugging, pry is your friend
<TTilus>
require "pry"
love_color_text has joined #ruby
<TTilus>
and then binding.pry to launch repl within your app
<TTilus>
use those as "breakpoints"
angusiguess has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
michaelmartinez has quit [Quit: michaelmartinez]
allure has quit [Quit: Saindo]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<TTilus>
hmm, i guess you could use Net::HTTP::* stuff to parse requests also
sayan has joined #ruby
Heero has quit [Ping timeout: 252 seconds]
casheew has quit [Read error: Connection reset by peer]
mumblerit has quit [Ping timeout: 258 seconds]
casheew has joined #ruby
nari has quit [Ping timeout: 252 seconds]
luckyruby has quit [Remote host closed the connection]
AgentWillyWonka has joined #ruby
malfunction has joined #ruby
mumblerit has joined #ruby
jimg has joined #ruby
Cultofme_ has quit [Remote host closed the connection]
lunchtime has joined #ruby
rickruby has joined #ruby
epicurus has left #ruby ["Leaving"]
jimg has quit [Ping timeout: 256 seconds]
r0bby_ has joined #ruby
rickruby has quit [Remote host closed the connection]
cod3r has joined #ruby
rickruby has joined #ruby
cod3r has quit [Ping timeout: 245 seconds]
lunchtime has quit [Remote host closed the connection]
lufi has quit [Excess Flood]
Palantir has joined #ruby
lufi has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
<Palantir>
I'm trying to use Process.daemon in 1.9.3. It works fine in IRB. Process.daemon drops me back to shell as expected, but if I make a simple ruby script and run it as ./daemonize.rb I get undefined method 'daemon' for Process:Module (NoMethodError) any ideas?
wallerdev has quit [Quit: wallerdev]
rickmasta has quit [Quit: Leaving...]
agarie has quit [Quit: Leaving...]
mumblerit has quit [Ping timeout: 258 seconds]
nbaksalyar has quit [Remote host closed the connection]
nbaksalyar has joined #ruby
mercwithamouth has joined #ruby
browndawg has quit [Ping timeout: 258 seconds]
mattbl has joined #ruby
tommyvyo has joined #ruby
cod3r has joined #ruby
neurone-1337 has joined #ruby
browndawg has joined #ruby
__alpaca has joined #ruby
symme7ry has quit [Ping timeout: 268 seconds]
jimg has joined #ruby
mmitchell has joined #ruby
RORgasm has joined #ruby
icecandy has joined #ruby
<Palantir>
nm, old install of rbenv has me in 1.8
cha1tanya has quit [Quit: Leaving]
pkill has joined #ruby
neurone-1337 has quit [Read error: Operation timed out]
jimg has quit [Remote host closed the connection]
k610 has joined #ruby
kimteq has quit [Remote host closed the connection]
chandankumar has quit [Ping timeout: 260 seconds]
RORgasm has quit [Ping timeout: 245 seconds]
mmitchell has quit [Ping timeout: 268 seconds]
blacktulip has joined #ruby
Gooder has joined #ruby
k610 has quit [Ping timeout: 256 seconds]
mengu has joined #ruby
r0bby_ has quit [Read error: Connection reset by peer]
r0bby_ has joined #ruby
__alpaca has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
lufi has quit [Excess Flood]
araujo has quit [Quit: Leaving]
lunchtime has joined #ruby
lufi has joined #ruby
etank has joined #ruby
lunchtime has quit [Read error: Connection reset by peer]
lunchtime has joined #ruby
lunchtime has quit [Read error: Connection reset by peer]
mumblerit has joined #ruby
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
sayan has quit [Read error: Connection reset by peer]
love_color_text has quit [Ping timeout: 248 seconds]
love_color_text has joined #ruby
tommyvyo has quit [Quit:]
r0bby_ has quit [Ping timeout: 256 seconds]
malfunction has quit [Ping timeout: 246 seconds]
jduan1981 has quit [Read error: Connection reset by peer]
arietis has joined #ruby
jduan1981 has joined #ruby
Cultofmetatron has joined #ruby
L8D has quit [Ping timeout: 255 seconds]
L8D has joined #ruby
Gabri has joined #ruby
Cultofmetatron has quit [Ping timeout: 252 seconds]
bubblehead has joined #ruby
qualiabyte has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
lunchtime has joined #ruby
francisfish has joined #ruby
malfunction has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
SAUCYSALAMANDER has joined #ruby
<SAUCYSALAMANDER>
Hi, creating an app
<SAUCYSALAMANDER>
I need a list of all US major cities
<SAUCYSALAMANDER>
any ideas on where to procure?
<SAUCYSALAMANDER>
Something I can read into my sql db
<incomplete>
If I create a gem that uses a GPL'd binary, would the gem need to be avaliable under the GPL?
kornnflake has joined #ruby
brianpWins has joined #ruby
haxrbyte has joined #ruby
mumblerit has quit [Ping timeout: 258 seconds]
mahmoudimus has joined #ruby
tomzx_mac has quit [Ping timeout: 256 seconds]
__alpaca has quit [Remote host closed the connection]
bubbajones has joined #ruby
<incomplete>
Anyone?
<aedornm>
incomplete: generally yes, but you can do multiple licenses
tjbiddle has quit [Quit: tjbiddle]
<incomplete>
aedornm: thanks, that's good to know
lunchtime has quit [Read error: Connection reset by peer]
<aedornm>
There's a disgusting amount of "compatibility" issues with licensing, so you have to be fairly careful. If you do choose multi-licensing, you need to make sure that GPL and the other license(s) are compatible.
<Boohbah>
incomplete: not if you aren't modifying or distributing the GPL-licensed code
<incomplete>
Could I put the gem under MIT, and point out that the binary is GPL
<aedornm>
Alternatively, you can just not distribute the GPL portion, and just refer people to the project source/binary to install and accept the license themselves.
yashshah has quit [Read error: Operation timed out]
etank has quit [Ping timeout: 268 seconds]
<Boohbah>
yeah, do that
<incomplete>
Boohbah: Point out the GPL binary, or just not include it?
haxrbyte has quit [Remote host closed the connection]
rsahae has joined #ruby
<Boohbah>
don't include it
etank has joined #ruby
<Boohbah>
and why do you say it depends on a GPL binary? GPL source is freely available
<incomplete>
It's a java binary, I don't know how to use source
<aedornm>
If you aren't selling the software, the chances of someone slapping you with a C&D is pretty small.
Morkel has quit [Quit: Morkel]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
bradhe has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
RantriX has joined #ruby
bradhe has joined #ruby
<RantriX>
hello
<RantriX>
does anyone know how to make sublime underline def/end?
kimteq has quit [Remote host closed the connection]
mumblerit has joined #ruby
tomsthumb has quit [Quit: Leaving.]
Cultofmetatron has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 248 seconds]
brunoro has joined #ruby
cantonic has joined #ruby
tommylommykins has quit [Read error: Operation timed out]
tundrax has joined #ruby
yashshah has joined #ruby
ChristianS has left #ruby ["Ciao"]
tundrax has quit [Remote host closed the connection]
io_syl has joined #ruby
chorkpop has joined #ruby
Palantir has quit [Ping timeout: 260 seconds]
chorkpop has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
brunoro has quit [Ping timeout: 268 seconds]
tommylommykins has joined #ruby
pkill has quit [Quit: Lost terminal]
tjbiddle has joined #ruby
L8D has joined #ruby
nari has quit [Quit: Ex-Chat]
mumblerit has quit [Ping timeout: 258 seconds]
yashshah has quit [Ping timeout: 256 seconds]
KCA_ has joined #ruby
RORgasm has quit [Ping timeout: 258 seconds]
francisfish has joined #ruby
rsahae has quit [Quit: rsahae]
divout has joined #ruby
tundrax has joined #ruby
zigomir has joined #ruby
KCA_ has quit [Remote host closed the connection]
snuglepuss has quit [Quit: Leaving]
JohnBat26 has joined #ruby
vlad_starkov has joined #ruby
emergion has joined #ruby
tomsthumb has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Iszak has joined #ruby
Iszak has quit [Remote host closed the connection]
bluOxigen has joined #ruby
LnL has quit [Quit: LnL]
vlad_starkov has quit [Ping timeout: 240 seconds]
Neomex has joined #ruby
symme7ry has quit [Ping timeout: 264 seconds]
Iszak has joined #ruby
L8D has quit [Ping timeout: 264 seconds]
raycloud__ has quit [Quit: Leaving]
Iszak has left #ruby [#ruby]
adman65 has joined #ruby
<adman65>
can I have a gem who's executable's are different than the gem name?
kobain has quit []
CooLD has left #ruby [#ruby]
CooLD has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
txdv has quit [Read error: Connection reset by peer]
txdv has joined #ruby
Drakevr has quit [Read error: Connection reset by peer]
emergion has quit [Client Quit]
Astral_ has quit [Ping timeout: 264 seconds]
keyvan has quit [Remote host closed the connection]
tesuki has joined #ruby
gommo has joined #ruby
gommo has quit [Read error: Connection reset by peer]
gommo has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Spooner>
adman65, Yes.
<Spooner>
You set the executable name (or names) in the gemspec.
<adman65>
Spooner: ya was my mistake. Thanks.
passerine has joined #ruby
_veer has quit [Ping timeout: 258 seconds]
slainer68 has joined #ruby
browndawg has joined #ruby
jnoob22_ has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
browndawg1 has quit [Ping timeout: 258 seconds]
tundrax has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
jnoob22 has quit [Ping timeout: 258 seconds]
ananthakumaran has joined #ruby
kornnflake has quit [Remote host closed the connection]
eka has joined #ruby
tundrax has joined #ruby
kornnflake has joined #ruby
kornnflake has quit [Remote host closed the connection]
kornnflake has joined #ruby
kornnflake has quit [Remote host closed the connection]
kornnflake has joined #ruby
gommo has quit [Remote host closed the connection]
noxoc has joined #ruby
haxrbyte has joined #ruby
__alpaca has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
jnoob22 has joined #ruby
spider-mario has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
tundrax has quit [Remote host closed the connection]
bijumon has joined #ruby
<bijumon>
hi anyone here who can help me with a regexp problem?
jnoob22_ has quit [Ping timeout: 256 seconds]
horrror has joined #ruby
nveselinov has quit [Quit: Leaving]
<bijumon>
I'm trying to match yaml headers in a markdown file, headers are enclosed in "---", /---(.|\n)*---/ matches most documents, but if I include another "---" in the content, it matches upto that
nveselinov has joined #ruby
<bijumon>
how I can match content upto only the second
<bijumon>
"---"
<bijumon>
i.e. --- foo:bar\ntags: [foo, bar, baz]\n--- mary had a little lamb\n --- wtf: scottish-whore ---
<charliesome>
bijumon: instead of using * use *?
<charliesome>
*? is non-greedy
<bijumon>
charliesome: omg lwtf, u monsta u rock :D tyvm
<MrZYX>
also if you add the m modifier the dot will match newlines too
noxoc has quit [Quit: noxoc]
<MrZYX>
/---.*?---/m
__alpaca has joined #ruby
<Spooner>
I was just going to say: /^---.*?(?=---)/m - then you don't eat the next document.
RantriX has quit [Remote host closed the connection]
<bijumon>
MrZYX: cool , ty :)
droppedonmyhead has quit [Quit: droppedonmyhead]
<bijumon>
MrZYX: u dont gotta group it like /---(.*?)---/
<bijumon>
MrZYX: ?
droppedonmyhead has joined #ruby
<MrZYX>
only if you want to catch the content
lkba has joined #ruby
<Spooner>
bijumon, That still would mess up. You need a lookahead (?=)
<bijumon>
Spooner: .sub would only match the first document right?
<bijumon>
MrZYX: i was trying to seperate the yaml header from the content so i can to_html it
<Spooner>
bijumon, document.scan(/^---(.*?)(?=---)/m) will give you the split contents. Equally, though, you could just do doc.split("---")
akashj87 has joined #ruby
<Spooner>
Well, .split("---", 3)[1..-1] to be absolutely correct.
<bijumon>
Spooner: dayum, i dont even know how to read that
lewix_ has joined #ruby
<Spooner>
bijumon, Actually, better is: .split("\n---", 2)
<Spooner>
Always a better way ;)
_veer has quit [Ping timeout: 256 seconds]
<Spooner>
bijumon: yaml, html = contents.split("\n---", 2)
lewix has quit [Read error: Connection reset by peer]
<bijumon>
Spooner: yea, i just did that, works like a charm
<bijumon>
Spooner: ty ty
andrewh has quit [Ping timeout: 240 seconds]
_veer has joined #ruby
johchri has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
pietr0 has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Remote host closed the connection]
andrewh has joined #ruby
<Spooner>
Same thing with regexp: yaml, html = contents.match(/\A(.*?)\n---(.*)\z/m).captures (which is needlessly more complex).
Astralum has joined #ruby
pietr0 has joined #ruby
<bijumon>
Spooner: mhmm, y,c = cnt.split("\n---", 2) is just beautiful son, /bows
<Spooner>
The 2 means to have, at maximum, 2 sections, so it doesn't matter about any --- in the document itself.
<bijumon>
Spooner: exactly, i have a few docs with other yaml headers in code explain sections, it works, yes it does, hallelujah!
yacks has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
_veer has quit [Ping timeout: 258 seconds]
yashshah has joined #ruby
_veer has joined #ruby
Gabri has quit [Remote host closed the connection]
tundrax has joined #ruby
aaronmcadam has joined #ruby
tundrax has quit [Remote host closed the connection]
_veer has quit [Ping timeout: 258 seconds]
aaronmcada has joined #ruby
marr has joined #ruby
aaronmcadam has quit [Ping timeout: 258 seconds]
jimg has joined #ruby
adman65 has quit [Quit: adman65]
emergion has joined #ruby
LennyLinux has joined #ruby
tundrax has joined #ruby
adman65 has joined #ruby
brianpWins has quit [Quit: brianpWins]
johchri has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nbaksalyar has left #ruby [#ruby]
RORgasm has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
kca has joined #ruby
kca has left #ruby [#ruby]
danslo has joined #ruby
kca has joined #ruby
RORgasm has quit [Ping timeout: 240 seconds]
maveonair has quit [Ping timeout: 268 seconds]
blacktul_ has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
jimg has quit [Remote host closed the connection]
blacktulip has quit [Ping timeout: 258 seconds]
Xabarus has quit [Remote host closed the connection]
skoovdebo has joined #ruby
<skoovdebo>
Hi, I am a super beginner here
hogeo_ has joined #ruby
<skoovdebo>
try to install ruby on mac
<skoovdebo>
got some error
<skoovdebo>
if someone could help me
<skoovdebo>
Ta/ Thanks
jimg has joined #ruby
<skoovdebo>
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
jimg has quit [Remote host closed the connection]
m8 has joined #ruby
<skoovdebo>
I have prob installed an old version of ruby and somehow went wrong /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
<AndChat|>
Skoovdebo install via rvm not home brew
hogeo has quit [Ping timeout: 248 seconds]
<LennyLinux>
skoovdebo: try to ask help on #machomebrew
tundrax has quit [Remote host closed the connection]
F1skr has joined #ruby
LnL has joined #ruby
mklappst_ has joined #ruby
<shevy>
skoovdebo there is no "ruby" binary at target /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
noxoc has joined #ruby
<skoovdebo>
shevy : So agh what am I gonna do ? :O thanks
kca has quit [Ping timeout: 252 seconds]
codenapper has quit [Quit: codenapper]
<shevy>
skoovdebo not sure, you are using apple + brew
<shevy>
skoovdebo I use linux and compile ruby from source and I use the gobolinux scheme
<shevy>
for me, I only have to change the symlink at /Programs/Ruby/Current to point at the version I want to use, which is 1.8.7 right now
adambeynon has joined #ruby
<shevy>
I also have 2.0.0 there but I hate encoding too much so I dont use that
averiso has joined #ruby
<shevy>
skoovdebo try to find out where all your ruby binaries are first
<shevy>
find / -name ruby
<shevy>
although if you are sure you want to stick with brew, you must ask the brew guys how to solve that :P
nveselinov has quit [Quit: Leaving]
nveselinov has joined #ruby
io_syl has joined #ruby
io_syl has quit [Client Quit]
LnL has quit [Quit: LnL]
emergion has quit [Quit: Computer has gone to sleep.]
gungor has joined #ruby
celinedior has joined #ruby
neurone-1337 has joined #ruby
malfunction has quit [Ping timeout: 257 seconds]
johchri has joined #ruby
emergion has joined #ruby
pac1 has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<skoovdebo>
shevy run find / -name ruby
<skoovdebo>
seems not finding it
<skoovdebo>
shevy find ….. Permission denied
<shevy>
eh?
neurone-1337 has quit [Ping timeout: 255 seconds]
<shevy>
you are a slave of your computer, not the master? ;)
<shevy>
permission denied is like taking the key away from a kid!
<shevy>
anyway, on most linux systems there is usually only one ruby binary at /usr/bin/ruby
<skoovdebo>
shevy basically i run find / -name ruby
<skoovdebo>
shevy it doesn't find it
<shevy>
probably hidden from you if you are not the superuser
<shevy>
no idea about apple, sorry
sepp2k has joined #ruby
workmad3 has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<skoovdebo>
shevy I run sudo find /-name ruby
<AndChat|>
Skoovdebo I told you to use rvm
<skoovdebo>
shevy seems find a lot of ´path
<AndChat|>
Skoovdebo don't ignore me bitch
<skoovdebo>
AndChat| if I know how to make rvm work I would love to do that
<AndChat|>
Skoovdebo Google? Is easy
<AndChat|>
Lots of guides online
<skoovdebo>
AndChat| I followed a guide, and went wrong…therefore I am here to ask
<AndChat|>
But you didn't try rvm, which is the recommended way
dawkirst has quit [Remote host closed the connection]
Nisstyre has quit [Read error: Connection reset by peer]
ChristianS has joined #ruby
aaronmcada has quit [Ping timeout: 258 seconds]
Faris has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
adman65 has quit [Quit: adman65]
tundrax has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
akashj87 has joined #ruby
mixel has joined #ruby
b0oh has joined #ruby
behemot has joined #ruby
xardas has joined #ruby
beiter has joined #ruby
vlad_starkov has joined #ruby
<skoovdebo>
AndChat| shevy I have successfully installed rvm
<skoovdebo>
AndChat| shevy but when I run rvm requirement I still got the same error
<skoovdebo>
AndChat| shevy rvm requirements
<skoovdebo>
Installing requirements for osx, might require sudo password.
<skoovdebo>
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
divout has quit [Quit: Leaving.]
<skoovdebo>
AndChat| shevy as you can see /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
<skoovdebo>
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
vlad_starkov has quit [Ping timeout: 258 seconds]
Astral_ has joined #ruby
LnL has joined #ruby
<MrZYX>
skoovdebo: isn't that error telling you what to do?
elaptics`away is now known as elaptics
swex_ has joined #ruby
kofno has joined #ruby
Astralum has quit [Ping timeout: 245 seconds]
ToApolytoXaos has joined #ruby
swex has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
Neomex has quit [Quit: Neomex]
<skoovdebo>
MrZYX I think so, but when I run brew doctor it tells me /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
<skoovdebo>
MrZYX which I do not know how to deal with that
tesuki has quit [Read error: Connection reset by peer]
tesuki has joined #ruby
<MrZYX>
did you google it?
Astral__ has joined #ruby
<MrZYX>
I get 1660 results if I google for the error, even quoted
backjlack has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
nickchow has joined #ruby
Astral_ has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
LnL has quit [Ping timeout: 258 seconds]
mklappst_ has quit [Remote host closed the connection]
tenmilestereo has joined #ruby
<shevy>
skoovdebo why do you tell me about rvm? I never told you to use rvm, AndChat| told you. please only speak to him about rvm, I hate rvm and never recommend it
<skoovdebo>
shevy ok sorry, people have strong attitude here, may I say hehe :D
<shevy>
skoovdebo, yeah, it depends. but I am not AndChat| :)
<shevy>
I only recommend people to use the source straight, if you want 1.8.x, the source tarball is: ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.bz2
teddyp1cker has left #ruby ["Konversation terminated!"]
io_syl has joined #ruby
<skoovdebo>
shevy oh yeah I know, just thought I should not ignore any of you … lol
<shevy>
skoovdebo MrZYX is cool though
<AndChat|>
Shevy is also still on 1.8.7, so not sure you wanna take his advice... :)
<shevy>
yes
mattbl has joined #ruby
<shevy>
it works perfect
<shevy>
no stupid encoding shit
<shevy>
but it's slower
<shevy>
so you have to take the good with the bad :(
Clecio has joined #ruby
<shevy>
2.x has a few cool things
tommyvyo has quit [Quit:]
<shevy>
BasicObject, io-console ... hmm
<AndChat|>
You're like 4 years behind everyone else...
<AndChat|>
;)
pagios has joined #ruby
<pagios>
hi
<shevy>
there was some new __CONSTANT_NAME__ but I forgot... it's not __FILE__ it's not __LINE__ hmmmm
<shevy>
not __method__ either
<shevy>
I suppose __ENCODING__ is new too
<ChristianS>
anyone using rubinius?
<pagios>
i would like to develop a script to read the bandwidth uplink/downlink on a specific interface , is there a way to do it in ruby?
MrZYX is now known as MrZYX|off
<shevy>
pagios dunno, in pure ruby? no binding to a C library? you could always use system() or `` if it's an existing binary that gives you that data
<pagios>
i cant find a proper command to use in a script actually
<shevy>
if a shell script can be used, ruby can be used as well
<pagios>
iftop is very hard to get output from
<shevy>
I dont even have iftop :)
backjlack has joined #ruby
lewix_ has quit [Remote host closed the connection]
Proshot has joined #ruby
<shevy>
pagios you could perhaps try: result = `iftop` or result = `iftop 2>&1`
<pagios>
iftop is an ncurses based software
<pagios>
so output isgarbage
<pagios>
i was wondering if ruby provides some api for that
tesuki has quit [Remote host closed the connection]
<shevy>
aha
<shevy>
there are ruby-ncurses bindings but I always found these very awful
<pagios>
yes tried them they are aweful
LnL has joined #ruby
<shevy>
hehe
<shevy>
I once wanted to write a nethack-like game in it
LnL7 has joined #ruby
malfunction has joined #ruby
LnL has quit [Ping timeout: 258 seconds]
Faris has quit [Ping timeout: 276 seconds]
rdg has joined #ruby
xardas has quit [Ping timeout: 240 seconds]
mklappst_ has joined #ruby
mneorr has joined #ruby
divout has joined #ruby
pavilionXP has joined #ruby
kofno has quit [Remote host closed the connection]
bhaarat has joined #ruby
AndChat| has quit [Ping timeout: 258 seconds]
pavilionXP has quit [Client Quit]
rdg has quit [Quit: Rdg]
sepp2k has quit [Remote host closed the connection]
RORgasm has joined #ruby
MrZYX|off is now known as MrZYX
sambao21 has joined #ruby
mklappst_ has quit [Remote host closed the connection]
nickchow has quit [Quit: Leaving...]
yacks has quit [Read error: Connection reset by peer]
arietis has joined #ruby
niklasb has joined #ruby
RORgasm has quit [Ping timeout: 276 seconds]
arietis has quit [Remote host closed the connection]
chandankumar has joined #ruby
nickchow has joined #ruby
KellyLSB has quit [Ping timeout: 256 seconds]
MrZYX is now known as MrZYX|off
mattbl has quit [Quit: This computer has gone to sleep]
danslo has quit [Ping timeout: 252 seconds]
bhaarat has quit [Quit: bhaarat]
ttt has joined #ruby
danslo has joined #ruby
casheew has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
casheew has joined #ruby
browndawg has quit [Ping timeout: 258 seconds]
ttt_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
error404_ is now known as error404
threesome has joined #ruby
MrZYX|off is now known as MrZYX
CooLD has quit [Quit: áá]
vlad_starkov has quit [Ping timeout: 258 seconds]
browndawg has joined #ruby
casheew has joined #ruby
nickchow has quit [Quit: Leaving...]
adambeynon has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
yacks has joined #ruby
bhaarat has joined #ruby
Xeago has quit [Remote host closed the connection]
__alpaca has quit [Remote host closed the connection]
nickchow has joined #ruby
ramblex has joined #ruby
kirun has joined #ruby
averiso has quit [Quit: Computer has gone to sleep.]
kn330 has joined #ruby
akashj87_ has joined #ruby
Divinite has joined #ruby
b0oh has quit [Quit: Leaving.]
<Divinite>
Quack!
peta_ has joined #ruby
Divinite has quit [Read error: Connection reset by peer]
malfunction has left #ruby [#ruby]
Clecio has quit [Ping timeout: 258 seconds]
akashj87 has quit [Ping timeout: 260 seconds]
Divinite has joined #ruby
<Divinite>
Quack!
<Divinite>
Quack!
Divinite is now known as Divinite
<Divinite>
I just heard, I must be extremely ignorant of my fellow Rubyists, but @why_ (Whytheluckystiff) is back?!? :O
dayepa1 has quit [Quit: dayepa1]
tds has joined #ruby
NewB__ has joined #ruby
lewix has joined #ruby
tds has quit [Client Quit]
kofno has joined #ruby
mattbl has joined #ruby
lewix has quit [Ping timeout: 258 seconds]
nickchow has quit [Read error: Connection reset by peer]
kofno has quit [Remote host closed the connection]
wallerdev has joined #ruby
tvw has joined #ruby
girija has joined #ruby
mneorr has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
facepalm has joined #ruby
NewB__ has left #ruby [#ruby]
jovy88 has quit [Read error: Connection reset by peer]
jbpros has joined #ruby
jovy88 has joined #ruby
ttt_ has quit [Remote host closed the connection]
<facepalm>
hello I trying to write a script that will match * at begining and ending of a line aand replace with <h1> tags this is my code https://gist.github.com/anonymous/ab1375cd976d7a7e7d9f but I think there is an easier more efficent way to do this. anyone mind taking a look please?
<canton7>
means the same as 'one second', 'give me a minute', etc
<facepalm>
oh I see thank you
gungor has quit [Remote host closed the connection]
tundrax has quit [Remote host closed the connection]
mmitchell has joined #ruby
LennyLinux has quit [Ping timeout: 256 seconds]
mmitchell has quit [Remote host closed the connection]
akashj87_ has quit [Quit: Leaving]
akashj87 has joined #ruby
rickruby has joined #ruby
gungor has joined #ruby
Volatile has joined #ruby
atno has quit [Remote host closed the connection]
generali_ has joined #ruby
atno has joined #ruby
atno has quit [Remote host closed the connection]
atno has joined #ruby
<Volatile>
Hi. I do something analoguos to "return self.class.new(some,parameters)" in a method. It seems like this messes with the instance variables of the class from which I'm returning the value. Is that even possible, or do I misinterpret things heavily?
bhaarat has joined #ruby
s2013 has joined #ruby
<MrZYX>
I think you misinterpret things
rickruby has quit [Ping timeout: 268 seconds]
shiva__ has joined #ruby
<Volatile>
I sure hope I do, but I don't see how. The only thing the method does is return a new instance of the class, and after that, the old instance is changed.
Xeago has joined #ruby
<facepalm>
gives me NoMethodError for length do I need to predefine that somewhere first canton?
simpleirc has joined #ruby
<simpleirc>
hi dudes
LennyLinux has joined #ruby
<Volatile>
...oh. copy-by-reference, no?
postmodern has quit [Remote host closed the connection]
simpleirc has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
<MrZYX>
ah some, parameters is actually @some, @parameters ?
atno has joined #ruby
atno has quit [Read error: Connection reset by peer]
<canton7>
facepalm, more like it. I had an old $1 mucking about in my scope when I was tsting before
Palantir has joined #ruby
atno has quit [Remote host closed the connection]
atno has joined #ruby
<Divinite>
canton7: Mind having a chat?
<canton7>
Divinite, sure. Might disappear for a minute to grab some lunch
jsvgoncalves has joined #ruby
<Divinite>
canton7: I think you commented on the HN thread about "Why the lucky stiff"?
cantonic has quit [Quit: cantonic]
<Divinite>
Back about 110ish days in time.
<facepalm>
it works great ty I just have to get rid of the leading white spaces between tag and text. appreciate it
ttt has quit [Remote host closed the connection]
gungor has quit [Remote host closed the connection]
horrror has quit [Quit: horrror]
vlad_sta_ has joined #ruby
rismoney has quit [Read error: Connection reset by peer]
<canton7>
Divinite, got a link? I don't recall commenting on HN ever...
mneorr has quit [Remote host closed the connection]
Palantir has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
vlad_starkov has quit [Ping timeout: 276 seconds]
mneorr has quit [Remote host closed the connection]
marktheunissen has joined #ruby
<Divinite>
canton7: It must've been my imagination.
<marktheunissen>
hi all, what is the ruby alternative for the Grunt task runner?
<marktheunissen>
is it Rake files?
<marktheunissen>
I want to run some concatenation, jshint, minification, etc. on my static files
<Divinite>
canton7: But have you read the printer spool output?
<marktheunissen>
for a static site generator
<canton7>
Divinite, remind me?
peta_ has quit [Quit: peta_]
<MrZYX>
marktheunissen: on request or on file change?
subbyyy has joined #ruby
<marktheunissen>
MrZYX: preferably both actually
<marktheunissen>
MrZYX: like Grunt...
* MrZYX
doesn't know grunt
<MrZYX>
I'd say have a look at guard
<marktheunissen>
ah ok
<marktheunissen>
MrZYX: thanks, i will look right now
danslo has quit [Quit: danslo]
kuzushi__ has joined #ruby
<Divinite>
canton7: I apologise, my internet allows for nothing but SSH to a kind person's server.
freeayu has quit [Read error: Connection reset by peer]
codecop has quit [Quit: Išeinu]
<canton7>
Divinite, aah fair enough. lynx / another terminal browser is your friend1
<canton7>
s/1/!
jetblack_ has quit [Quit: leaving]
emergion has quit [Quit: Computer has gone to sleep.]
<Divinite>
canton7: Indeed, but this is rather strange.
<Divinite>
Try a google search of: "Why the lucky stiff is back" in a keyboard environment.
<Divinite>
I have read all the printer spool output
<Divinite>
Studied it, even.
ttt has joined #ruby
<Divinite>
All it did was make me shed a tear.
<facepalm>
canton how how I get the leading white spaces out of between the <h1> text </h1> I have tried variations of \s in the regex
kuzushi_ has quit [Ping timeout: 260 seconds]
MisterPostIT has joined #ruby
ARCADIVS has quit [Quit: WeeChat 0.3.8]
pagios has quit [Remote host closed the connection]
ttt has quit [Remote host closed the connection]
mklappst_ has joined #ruby
ZachBeta has joined #ruby
kbouwser has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
mklappst_ has quit [Remote host closed the connection]
sambao21 has joined #ruby
platzhirsch1 has joined #ruby
<platzhirsch1>
What again is the convnetion for methods, offering method_name and method_name! ?
<MrZYX>
the one with the bang modifies the receiver, the one without returns a modified copy
sambao21 has quit [Client Quit]
anhnhoktvn has joined #ruby
<MrZYX>
also in most cases the version with the bang only returns self if it actually changed something, nil otherwise. Though I think that's more an implementation detail in core rather than a convention
bhaarat has quit [Quit: bhaarat]
justsee has joined #ruby
decentrality has quit [Quit: decentrality]
<platzhirsch1>
MrZYX: ok, but that's a helpful orientation
baba has joined #ruby
jsvgoncalves has quit [Ping timeout: 252 seconds]
cod3r has quit [Ping timeout: 258 seconds]
mikepack has joined #ruby
anhnhoktvn has quit [Quit: Leaving.]
sambao21 has joined #ruby
danslo has joined #ruby
anhnhoktvn has joined #ruby
mikepack has quit [Remote host closed the connection]
RORgasm has joined #ruby
cantonic has joined #ruby
IceDragon has joined #ruby
RORgasm has quit [Ping timeout: 258 seconds]
ariedler has joined #ruby
RomainT has joined #ruby
hiyakashi has joined #ruby
quebre has joined #ruby
<quebre>
hello
<quebre>
i have chain of bad problems today with these ruby gems
<quebre>
is it ok to ask here?
<quebre>
/usr/local/lib/site_ruby/1.8/rubygems/core_ext/kernel_gem.rb:47:in `gem': undefined method `to_spec' for #<Gem::Dependency:0x7f2794963c88> (NoMethodError)
<quebre>
when im trying to do "bundle install"
sam113101 has quit [Quit: WeeChat 0.4.0]
sam113101 has joined #ruby
predator217 has quit [Ping timeout: 258 seconds]
<MrZYX>
you need either an older bundler or (better) a newer rubygems
<MrZYX>
also support for 1.8 will end shortly, consider updating to 1.9/2.0
predator117 has joined #ruby
<quebre>
i see, how can i update to 2.0 when im on wheezy/sid debian ?
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<MrZYX>
the easiest way would be rvm/rbenv/chruby
chrishunt has quit [Read error: Connection reset by peer]
<quebre>
i have deleted /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb - i thought it will solve my problem
jbpros has quit [Quit: jbpros]
<MrZYX>
lol, no
<quebre>
and that's how i ended up having that error i pasted at beginning..
<MrZYX>
shoud've made it worse
gungor has joined #ruby
jbpros has joined #ruby
<MrZYX>
deleting stuff to make it work, a new perspective every day!
<quebre>
yeah my bad... im wondering how to fix it now
<quebre>
:(
<MrZYX>
reinstall ruby
anhnhoktvn has left #ruby [#ruby]
<quebre>
The following packages will be REINSTALLED: ruby
<quebre>
ok
<quebre>
lets hope that helps ;P
<MrZYX>
best through rvm or rbenv as mentioned
<MrZYX>
it won't
<MrZYX>
you compiled from source
<MrZYX>
and it's using that ruby atm
<MrZYX>
(I can see it from the path being /usr/local)
<quebre>
so how do i do that rvm update ? ...
<quebre>
or reinstall
<MrZYX>
google rvm
<MrZYX>
(and don't ran it as root, just in case...)
<quebre>
ok
rippa has joined #ruby
jbpros has quit [Client Quit]
<quebre>
so, rvm updates ruby, right ?
<MrZYX>
installs and manages rather, but in effect yes
<MrZYX>
it allows for arbitrary versions to coexist and dynamically switch between them
mneorr has joined #ruby
<quebre>
Examples:
<quebre>
$ rvm upgrade 1.9.2-p136 1.9.2-p180
<quebre>
so what's the latest version ?
<quebre>
i want to have latest if i'm forced to make upgrade ;p
<MrZYX>
2.0-p0
<quebre>
ok
chrishunt has joined #ruby
<quebre>
and how do i check what version i have now ?
<MrZYX>
really, do the following and stop worrying about your system ruby: create user for redmine with a home directory, switch to it, install RVM under it, install ruby through RVM, extract the redmine source inside the home directory, run rvm rvmrc create 2.0.0@redmine, follow the redmine install guide
tundrax has quit [Ping timeout: 276 seconds]
<quebre>
ok let me try
swarley_ has joined #ruby
tenmilestereo[aw has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
SCommette has quit [Quit: SCommette]
Neomex has joined #ruby
Neomex has quit [Client Quit]
sepp2k has joined #ruby
tenmilestereo has quit [Ping timeout: 258 seconds]
anhnhoktvn has joined #ruby
vlad_sta_ has quit [Ping timeout: 245 seconds]
jsvgoncalves has joined #ruby
jsvgoncalves has quit [Excess Flood]
flowsnake has left #ruby ["Leaving"]
vlad_starkov has joined #ruby
akashj87_ has joined #ruby
idkazuma has quit [Remote host closed the connection]
<dfdf>
MrXYZ: I'm SO impressed.. And I was a true script hater.. Converted.. Thanx..
vlad_starkov has joined #ruby
mneorr has quit [Remote host closed the connection]
predator117 has joined #ruby
<quebre>
MrZYX: i did this: "curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled" as the rvm site says to do, does that mean i have ruby installed now ?
<shevy>
when I put this into a .rb file and require that file
inline has quit [Quit: • IRcap • 8.71 •]
<shevy>
is there a way to automatically do include Foo, when this is required?
workmad3 has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<shevy>
because if not, I will probably have to get rid of the "module Foo" part
mercwithamouth has joined #ruby
mmitchell has joined #ruby
inline has joined #ruby
emmanuelux has joined #ruby
arubin has joined #ruby
Mattix has joined #ruby
Matip has joined #ruby
mmitchell has quit [Remote host closed the connection]
<MrZYX>
shevy: how automatically? also in which scope, main or the one you run require?
<MrZYX>
like you could just do module Foo; ...; end; include Foo inside the .rb to include it into the main scope
primer^ has quit [Quit: Computer has gone to sleep.]
<MrZYX>
not that I would see any advantage over defining it in the main scope directly...
<shevy>
hmm
<shevy>
gimme a moment to think
dfdf has quit [Remote host closed the connection]
ZachBeta has quit [Read error: No route to host]
Mattix has quit [Ping timeout: 240 seconds]
peta_ has joined #ruby
ZachBeta has joined #ruby
inline has quit []
Vivekananda has quit [Read error: Connection reset by peer]
<shevy>
alright, perhaps it is easier if I describe what or why I needed that
<shevy>
I found that I often use a method, in many different .rb files, which is like this: "def cliner; puts '=' * 80; end" ok? so basically just a method that outputs a line, visually. the real cliner method is a bit more complex, uses colours, different token + length, also uses "yield if block_given?" and so on
<shevy>
so my idea was... "hey, let's turn this into a gem, called cliner gem"
beiter has quit [Quit: beiter]
<shevy>
in the past, I always defined that method in a class that was responsible for giving output to the user
<shevy>
not putting cliner() into a module feels rather dirty
<shevy>
but I also dont want to do this:
<shevy>
require 'cliner'
<shevy>
class Bla
<shevy>
include Cliner
<shevy>
:\
akashj87_ has quit [Ping timeout: 248 seconds]
<shevy>
I don't really know what I want perhaps...
<shevy>
I think I'll just not use a module
<MrZYX>
how about module Cliner; def cliner; ...; end; end; class Kernel; include Cliner; end ?
GeissT_ has quit [Quit: MillBroChat AdIRC User]
<MrZYX>
the kernel patch maybe as cliner/autoload.rb ?
<shevy>
aha
<shevy>
oh
<shevy>
I think that could work
<MrZYX>
so it's up to the user where to include it
<shevy>
yeah
girija has joined #ruby
<MrZYX>
and just a convenience loader as a core_ext
<shevy>
that would be perfectly fine, I guess
<shevy>
I'll try that, thanks MrZYX
danslo has quit [Quit: danslo]
<MrZYX>
shevy: I'd also make it a module function
danslo has joined #ruby
Targen has joined #ruby
<MrZYX>
if not being able to split into a bunch of private methods is no issue
<quebre>
MrZYX: when i run redmine using passenger it says on the site: Redmine requires Bundler. Please install it with `gem install bundler`. - but i have it installed already, maybe Passenger looks for wrong ruby or something like that ?
<MrZYX>
does it need to coexist with other ruby apps running under passenger?
inline has joined #ruby
horofox_ has joined #ruby
<quebre>
MrZYX: yes, i have chili project that also uses passenger..
mercwithamouth has quit [Ping timeout: 256 seconds]
<MrZYX>
google for reverse proxy apache unicorn should bring up some good results too
<quebre>
ok
inline has quit [Client Quit]
inline has joined #ruby
Vivekananda has joined #ruby
mneorr has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
tvw has quit []
ZachBeta has quit [Quit: Computer has gone to sleep.]
roflmaus has joined #ruby
mercwithamouth has joined #ruby
symme7ry has joined #ruby
Faris has joined #ruby
kimteq has joined #ruby
fmcgeough has joined #ruby
<hesco>
I'm seeing errors running: vagrant plugin install vagrant-rackspace; https://gist.github.com/hesco/5471100 -- I also used gem to uninstall nokogiri and libxml-ruby. Then I reinstalled them, w/o issues, then tried again to install the plugin for vagrant, only to encounter the same issues as before. The missing header file exists and is in my PATH, as indicated in the logs pasted at the git site above. I've had only small expose to ruby and
SCommette has joined #ruby
rakl has joined #ruby
bhaarat has joined #ruby
<hashpuppy>
is there a difference between: raise StandardError, "foo" and raise StandardError.new "foo"
rickruby has quit [Remote host closed the connection]
jduan1981 has joined #ruby
justsee has quit [Ping timeout: 252 seconds]
bigkevmcd has quit [Remote host closed the connection]
Ontolog has joined #ruby
luisbebop has joined #ruby
platzhirsch1 has left #ruby [#ruby]
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
My_Hearing has joined #ruby
adamjleonard has joined #ruby
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
Glacer232 has joined #ruby
kil0byte has quit [Remote host closed the connection]
<hesco>
I have an rvm installation of ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]. I have a dependency which is asking that I install a bunch of ruby-1.8 packages using apt-get (Debian Squeeze). I've translated that to ruby-1.9.1 (available in my APT repos). My question is this: Will pulling that code from the debian install break things which are (mostly) working under the rvm install of ruby?
tjbiddle has quit [Quit: tjbiddle]
tommyvyo has joined #ruby
DonRichie has joined #ruby
DonRichie has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
DonRichie has joined #ruby
tomsthumb has joined #ruby
luisbebop has quit [Quit: Leaving...]
huoxito has joined #ruby
DonRichie has quit [Read error: Connection reset by peer]
IceDragon has quit [Remote host closed the connection]
DonRichie has joined #ruby
SCommette has quit [Quit: SCommette]
inline has quit []
rickruby has joined #ruby
symme7ry has quit [Ping timeout: 256 seconds]
rickruby has quit [Remote host closed the connection]
<peta_>
awesome … I'm writing my first rspec tests and suddenly everything started to make sense … just awesome
bhaarat has quit [Quit: bhaarat]
Davey has joined #ruby
jduan1981 has quit [Quit: jduan1981]
IceDragon has joined #ruby
RORgasm has joined #ruby
<marwinism>
peta_: that is the best feeling ever!
tomsthumb has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
hamakn has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
centipedefarmer has joined #ruby
nomenkun has quit [Remote host closed the connection]
Bry8Star has quit [Ping timeout: 276 seconds]
RORgasm has quit [Ping timeout: 245 seconds]
__alpaca has quit [Remote host closed the connection]
<shevy>
MrZYX when did you start to use ruby by the way?
whowantstolivef1 has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
__alpaca has joined #ruby
<MrZYX>
about two years ago I think
angusiguess has quit [Ping timeout: 268 seconds]
Cultofmetatron has joined #ruby
hogeo has joined #ruby
<spike|spiegel>
peta_: just wait for that feeling wear off into frustation :)
vlad_starkov has joined #ruby
rickmasta has joined #ruby
whowantstolivefo has quit [Ping timeout: 240 seconds]
<spike|spiegel>
facepalm: what are you really trying to acheive?
hogeo_ has quit [Ping timeout: 256 seconds]
chrishunt has quit [Quit: ZzZzZz...]
<MrZYX>
facepalm: add some \s* outside the groups
chrishunt has joined #ruby
<facepalm>
it replaces single * with h1 tags and ** with h2 tags
<peta_>
spike|spiegel: To be honest, I'm still very sceptical to ruby … so once it becomes more annoyance than joy, I'm back in my old and well known hood
jimg has joined #ruby
<facepalm>
yeah ZXY I tried that but the spaces remain
<MrZYX>
what exactly did you try?
mixel has quit [Quit: mixel]
<facepalm>
text = text.gsub(/^(\*+)(.*)\s*\1$/)
<MrZYX>
try making the group non-greedy
<MrZYX>
(.*?)
aryko has joined #ruby
roflmaus has quit []
tomsthumb has joined #ruby
mmitchell has joined #ruby
<facepalm>
got it ty sir
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
rking has quit [Ping timeout: 248 seconds]
mmitchell has quit [Read error: No route to host]
jamesfung14 has joined #ruby
mmitchell has joined #ruby
RomainT1 has joined #ruby
jimg has quit [Ping timeout: 258 seconds]
RomainT has quit [Read error: Connection reset by peer]
gungor has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
hiyakash_ has joined #ruby
anderson has quit [Ping timeout: 258 seconds]
ZachBeta has joined #ruby
hiyakashi has quit [Ping timeout: 258 seconds]
Bry8Star has joined #ruby
rippa has joined #ruby
chandankumar has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 246 seconds]
symme7ry has joined #ruby
horrror has joined #ruby
horrror has quit [Client Quit]
rking has joined #ruby
tomsthumb has quit [Quit: Leaving.]
celinedior has quit [Quit: celinedior]
wesside has joined #ruby
francisfish has quit [Remote host closed the connection]
nateberkopec has joined #ruby
chandankumar has joined #ruby
xavier23 has joined #ruby
averiso has joined #ruby
gungor has joined #ruby
<xavier23>
Anybody know……. way to format numbers in ruby? Like 3,456,234 instead of 3456234
nateberkopec has quit [Client Quit]
<xavier23>
Answer to own question: number_with_delimiter in RoR
wting has quit [Quit: leaving]
bsaboia_ has quit [Remote host closed the connection]
wting has joined #ruby
dawkirst has joined #ruby
djwonk has joined #ruby
dawkirst has quit [Client Quit]
wting has quit [Client Quit]
dawkirst has joined #ruby
brennanMKE has joined #ruby
dawkirst has quit [Remote host closed the connection]
aryko has quit [Remote host closed the connection]
rsahae has joined #ruby
MisterPostIT has quit [Ping timeout: 264 seconds]
bhaarat has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
<dawkirst>
Cross-post from #sinatra: dawkirst Hi, I'm struggling to wrap my head around something (I'm quite new to programming and Ruby): I have a function that, because of a lot of external API calls, takes longer than 30 seconds to run. Heroku times out. How can I trigger this function in a route, but then still return a view before 30 seconds?
mixel has joined #ruby
mixel has quit [Client Quit]
chrishough has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
rsahae has quit [Quit: rsahae]
_bugg_ has joined #ruby
mixel has joined #ruby
foofoobar has joined #ruby
_bugg_ is now known as [Erotic]
adamjleonard has quit [Quit: Leaving...]
Dreamer3 has joined #ruby
<Dreamer3>
is Object special in that instance methods are also callable on the class? i've never seen this before
wting has quit [Quit: leaving]
sambao21 has joined #ruby
Asher1 has quit [Quit: Leaving.]
dawkirst has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has joined #ruby
Asher has joined #ruby
symme7ry has quit [Ping timeout: 264 seconds]
dawkirst has joined #ruby
predator117 has quit [Quit: leaving]
predator117 has joined #ruby
tomsthumb has joined #ruby
[Erotic] is now known as uncleBob
wting has joined #ruby
uncleBob is now known as _KGBot_
francisfish has quit [Remote host closed the connection]
tomsthumb has quit [Client Quit]
jovy88 has quit [Read error: Connection reset by peer]
teddyp1cker has joined #ruby
jovy88 has joined #ruby
_KGBot_ is now known as dfdf
chrishunt has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
rickruby has joined #ruby
teddyp1cker has joined #ruby
dfdf is now known as W00F
rickruby has quit [Remote host closed the connection]
<dawkirst>
Hi, I'm struggling to wrap my head around something (I'm quite new to programming and Ruby): I have a function that, because of a lot of external API calls, takes longer than 30 seconds to run. Heroku times out. How can I trigger this function in a route, but then still return a view before 30 seconds?
<theoros>
MrZYX: yes but it isn't really each_cons, i need each_cons but each element + the next one
Faris has quit [Ping timeout: 240 seconds]
tomsthumb has joined #ruby
<theoros>
MrZYX: where "the next one" means in terms of each_slice
rickruby has joined #ruby
rickruby has quit [Remote host closed the connection]
<hashpuppy>
stupid question, but is there a way to have those two dependencies automatically required, since they are within the same module? http://pastebin.com/mcY2w3PX
<hashpuppy>
not sure if that is too rails specific
rickruby has quit [Remote host closed the connection]
<_KGBot_>
Rennex: it's called #0pWTF.. Welcome #ABORT..
<Rennex>
go home _KGBot_, you are drunk
<_KGBot_>
not even..
<MrZYX>
sepp2k: there?
<marwinism>
_KGBot_ is just another annoying drop out from Troll Academy
<_KGBot_>
Yep..
rclements has quit [Ping timeout: 272 seconds]
jovy88 has quit [Read error: Connection reset by peer]
chandankumar has quit [Ping timeout: 268 seconds]
jovy88 has joined #ruby
slyv has joined #ruby
kimteq has quit [Remote host closed the connection]
ksmth has quit []
marcdel has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<facepalm>
I almost have this nightmare finished then I will be able to relax
rickruby has joined #ruby
whowantstolivefo has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
<staafl>
hey folks, I want to write a script that loops through different encodings and shows how a code point looks like when interpreted through each encoding
whowantstolivefo has quit [Read error: Connection reset by peer]
whowantstolivefo has joined #ruby
whowantstolivef2 has quit [Ping timeout: 258 seconds]
rickruby has quit [Remote host closed the connection]
snearch has joined #ruby
Palantir has quit [Ping timeout: 256 seconds]
dawkirst has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
jwingfi has joined #ruby
codecop has joined #ruby
<staafl>
any ideas
rclements has joined #ruby
elaptics is now known as elaptics`away
facepalm has quit [Ping timeout: 245 seconds]
johravx has joined #ruby
vlad_starkov has quit [Ping timeout: 255 seconds]
heftig has quit [Quit: Quitting]
<atmosx>
what is a code pnt?
johravx has quit [Read error: Connection reset by peer]
<hashpuppy>
i have lib/sources/source_a/class_a.rb. and have module Sources::SourceA; class A; end; end;. problem with this is that module Sources; end; is not defined. i will have to do module Sources; module SourceA; class A; end; end; end, which is ugly. should i just require sources? usually sources requires all of it's submodules, though
<MrZYX>
whatever that means
Ontolog has quit [Remote host closed the connection]
psyprus has joined #ruby
tomzx_mac has joined #ruby
javiolo has quit [Remote host closed the connection]
_KGBot_ was kicked from #ruby by Mon_Ouie [Insults aren't welcome here.]
<facepalm>
the <ul>needs to be inserted on its own line followed by new line then all the <li> tags then an ending </ul> on its own line
<Mon_Ouie>
(well, that happened a while ago now though; he might not even be here anymore)
<Morrolan>
facepalm: Are you parsing wiki markdown into HTML or something along those lines?
chrishough has quit [Ping timeout: 268 seconds]
<facepalm>
its a text file that I am adding the tags to based on certain matches
<facepalm>
like this all works Morrolan except for the starting and ending ul tags
danneu has joined #ruby
jbpros has joined #ruby
<Rennex>
facepalm: er, like text = "<ul>\n#{text}\n</ul>"
<Rennex>
?
brianpWins has joined #ruby
danneu has left #ruby [#ruby]
mahmoudimus has joined #ruby
robottinosino has joined #ruby
_veer has joined #ruby
mixel has joined #ruby
keymone has joined #ruby
<facepalm>
no Rennex just above and below my li tags
<facepalm>
I have a block of li tags and I have to get the starting ul tag above it and below
girija has quit [Ping timeout: 245 seconds]
Xeago_ has joined #ruby
sepp2k has quit [Remote host closed the connection]
<Rennex>
facepalm: ah. how about text.sub(/(<li>.*</li>)/, "<ul>\n\\1\n</ul>\n")
AgentWillyWonka has joined #ruby
keymone has quit [Ping timeout: 245 seconds]
<Rennex>
if you only have one block of li's
jamesfung14 has joined #ruby
ArchRogem has quit [Quit: ArchRogem]
Xeago has quit [Ping timeout: 248 seconds]
<facepalm>
thats close
<MrZYX>
lacks a m I guess
<MrZYX>
/../m
<MrZYX>
so . matches newlines too
mercwithamouth has quit [Ping timeout: 255 seconds]
tracekill has joined #ruby
<facepalm>
it surrounds just my first li with the ul tags
<MrZYX>
facepalm: read what I wrote
robottinosino has quit [Quit: WeeChat 0.4.0]
<facepalm>
instead of the whole block
<tracekill>
Is there a reason I can't pipe rake failures in Linux? I'm using rbenv, does that redirect output through some stream other than stdout/err?
<tracekill>
Or rake output at all really.
staafl has quit [Ping timeout: 245 seconds]
tomsthumb has quit [Quit: Leaving.]
_cheney3 has quit [Read error: Connection reset by peer]
<facepalm>
wow cool. ZYX what exactly does that m do? accept make me extremely happy right now haha
<Rennex>
MrZYX: ah, yep
sambao21 has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
<Rennex>
"multiline", makes "." also match newlines
<Rennex>
(which MrZYX already said apparently :)
mneorr has quit [Remote host closed the connection]
cheese1756 has quit [Excess Flood]
bradhe has joined #ruby
skattyadz has joined #ruby
s2013 has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
<spike|spiegel>
facepalm: please, for the sake of sanity, use a real html parse and remove empty/whitespce only text nodes / strip text nodes.
<MrZYX>
spike|spiegel: he parses the other way around ;)
cheese1756 has joined #ruby
mklappst_ has joined #ruby
tds has joined #ruby
tylersmith has joined #ruby
vlad_starkov has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
neurone-1337 has joined #ruby
russfrank has quit [Changing host]
russfrank has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
spcshpop` has joined #ruby
s2013 has joined #ruby
Cooler_ has quit [Ping timeout: 248 seconds]
foofoobar has quit [Quit: Computer has gone to sleep.]
<Morrolan>
MrZYX: Sadly the exercise explicitly states not to use eval. :P
<LennyLinux>
ahahha
<facepalm>
it says you cant use it
<MrZYX>
oh, hmm
<Spooner>
Use instance_eval then ;)
<MrZYX>
or class_eval
<Morrolan>
Haha.
<MrZYX>
or module_eval
<Morrolan>
send(:eval)?
<facepalm>
he would rather we became emo and started cutting ourselfs doing it the long way
<MrZYX>
write it to a tmpfile and do `ruby #{tmpfile}` xD
<Spooner>
I'm amused how many students I see blatantly paying for people to do their work on odesk/elance, when they could just come to #ruby ;)
<MrZYX>
and call it recursion
kristofers has joined #ruby
<MrZYX>
facepalm: the easiest way to solve this properly is to use a stack (array)
<facepalm>
he has a test script that you have to run it through so those sneaky things like that prob would fail.
<facepalm>
thats the problem with this class is you learn basic concepts of a new language almost every week
LnL has quit [Ping timeout: 248 seconds]
nateberkopec has joined #ruby
kristofers has quit [Client Quit]
<facepalm>
instead of really learning a entire language and all its abilities
<facepalm>
Ive had to do Assembly C C++ Ruby Haskell Java and a few others in just these couples months
<Morrolan>
Being able (or having to) learn the basics of all kinds of programming languages was a thing which I liked a lot, actually.
subbyyy has quit [Ping timeout: 276 seconds]
staafl has joined #ruby
LnL has joined #ruby
<facepalm>
I like it too but it makes things difficult when you dont know a whole lot about each language. for example I have never written a stack array in ruby
decentrality has joined #ruby
JohnBat26 has quit [Ping timeout: 245 seconds]
ZachBeta_ has joined #ruby
<MrZYX>
actually forget that, it was for polish notation
RORgasm_ has joined #ruby
ZachBeta has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
momomomomo has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
IceyEC has joined #ruby
skattyadz has quit [Read error: Connection reset by peer]
bhaarat has quit [Quit: bhaarat]
johnnyfuchs has joined #ruby
RORgasm_ has quit [Ping timeout: 245 seconds]
ZephiroMX has quit [Quit: Leaving...]
__alpaca has joined #ruby
Yakko has joined #ruby
mattbl has quit [Quit: Leaving]
slainer68 has joined #ruby
__alpaca has quit [Ping timeout: 256 seconds]
divout has quit [Remote host closed the connection]
LnL has quit [Quit: LnL]
mklappst_ has quit [Remote host closed the connection]
Asher has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
sambao21 has joined #ruby
Spooner has quit [Quit: Leaving]
lkba has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Remote host closed the connection]
<MrZYX>
facepalm: alright, 9 lines, beat it :P
IceyEC has quit [Quit: IceyEC]
<facepalm>
you finished it already?
<Morrolan>
MrZYX: Yikes.
<MrZYX>
yup
* Morrolan
looks at his construct
subbyyy has joined #ruby
<MrZYX>
I think so, I mean I don't have the tests
<facepalm>
um...im still trying to figure out how to create the stack arrays lol
<yxhuvud>
not only shell script, it is unit tested as well.Havn't seen that before.
<facepalm>
then zip them and call ./test_regexercise
heftig has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
tylersmith has quit [Quit: tylersmith]
<facepalm>
when it errors for the markup one look at it and it will show you the error in it and see if you can tell what problem is
mootpointer has quit [Ping timeout: 276 seconds]
adambeynon has joined #ruby
<facepalm>
it passes all the tests but it says there is a difference between the two files and I cant see what it is lol
tundrax has joined #ruby
mootpointer has joined #ruby
horofox_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<facepalm>
the script submits the assignment and sends an email to him too. pretty sweet
psyprus has quit [Ping timeout: 258 seconds]
casheew has joined #ruby
mengu has joined #ruby
Umren has quit [Ping timeout: 264 seconds]
bhaarat has joined #ruby
<MrZYX>
hmkay 10 lines
<MrZYX>
:P
ner0x has joined #ruby
mroth has joined #ruby
codenapper has joined #ruby
bhaarat has quit [Client Quit]
lkba has joined #ruby
tundrax has quit [Remote host closed the connection]
_KGBot_ is now known as dfdf
jovy88 has quit [Read error: Connection reset by peer]
<facepalm>
did yours pass?
foofoobar has joined #ruby
<MrZYX>
I only manually checked the testcases but all worked, yeah
jovy88 has joined #ruby
<facepalm>
all I have so far is def myCalc (n) return if n =~ (/\d+/) puts n
<MrZYX>
that won't pass the last test :P
<MrZYX>
sorry, I'm demotivating
brianpWins has quit [Quit: brianpWins]
bhaarat has joined #ruby
<facepalm>
I want to know how you did it in 10lines lol
<MrZYX>
you can once you solved it ;)
psyprus has joined #ruby
<facepalm>
I doubt I will solve it lol
<facepalm>
what approach did you use if you said not to go with the stack array now
<MrZYX>
a bunch of gsubs
<facepalm>
another student from my class asked for help on stack overflow lol and basically posted his solution
<facepalm>
but I want to figure it out on my own
<Morrolan>
How much time do you have left, you said? :P
<facepalm>
8 hours
LnL has joined #ruby
bhaarat has quit [Client Quit]
<facepalm>
and my markup.rb file doesn't pass his script lol it passes all the tests but there is something catching it and I cant figure out what it is. probably an empty space or something so it doesnt match his file
<MrZYX>
pipe your output in a file and diff it with the expected output: diff expected.html my.html
Evixion` is now known as Evixion
rclements has quit [Ping timeout: 258 seconds]
<facepalm>
that script does it that for you and shows you a side by side of what yours looks like and what it should look like
<MrZYX>
maybe try colordiff
<MrZYX>
I think it highlights space diffs
<facepalm>
looking at the 2 I cant see any difference is the problem they look exactly the same. and the error is highlighted in red
<MrZYX>
text = text.sub(/(<li>.*<\/li>)/m, "<ul>\n\\1\n</ul>\n") should be text = text.sub(/(<li>.*<\/li>)/m, "<ul>\n\\1\n</ul>") I guess
<peta_>
Can I somehow write a before/after config hook on a per-context/describe basis?
mercwithamouth has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
<MrZYX>
"config hook"? Do you mean before(:all)/after(:all) ?
kofno has quit [Remote host closed the connection]
brennanMKE has quit [Remote host closed the connection]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
sambao21 has quit [Quit: Computer has gone to sleep.]
brennanMKE has joined #ruby
momomomomo has quit [Quit: momomomomo]
vlad_starkov has quit [Ping timeout: 255 seconds]
sambao21 has joined #ruby
<rickmasta>
cweek uses the monday-sunday week formation. I want to make my own method for DateTime that'll be similar to cweek, but uses the Sunday-saturday formation. How would I go about doing that?
IcyDragon has joined #ruby
brennanMKE has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
psyprus has quit [Ping timeout: 258 seconds]
lxsameer has joined #ruby
<lxsameer>
which one do you recommand ? rbenv or rvm ?
hogeo has quit [Ping timeout: 256 seconds]
<spike|spiegel>
none
<lxsameer>
spike|spiegel: then what do you suggest for such functionality ?
<spike|spiegel>
if you need it.. you are doing it wrong<TM>
<lxsameer>
spike|spiegel: thats not true,
psyprus has joined #ruby
neurone-1337 has joined #ruby
<ramblex>
facepalm, handle the base case (i.e. just a number) and then you can start adding recursive calls which reduce to the base case
freeayu has joined #ruby
snearch has quit [Quit: Verlassend]
<facepalm>
my base case is /\d+/ correct?
<MrZYX>
/^-?\d+/
<ramblex>
it can be to start with but eventually it'll need to handle floating point numbers I guess
RantriX has joined #ruby
<RantriX>
hello
Heero has quit [Ping timeout: 252 seconds]
dfdf has quit [Remote host closed the connection]
cheese1756 has quit [Excess Flood]
cheese1756_ has joined #ruby
<RantriX>
in a grid array, what's the best way to generate the surrounding cells of a point?
sepp2k has quit [Remote host closed the connection]
kofno has joined #ruby
<RomainT1>
I have an application split into many Ruby apps (with DaemonKit talking to each other via RabbitMQ). I would like to share some Mongoid models between them. How could I do so?
psyprus has quit [Ping timeout: 258 seconds]
<RomainT1>
I had 2 leads: using a git submodule for these models, or a gem.
<lxsameer>
what do you guys use to create a sandbox environment ?
greenarrow has quit [Quit: IRC is just multiplayer notepad.]
greenarrow has joined #ruby
<lxsameer>
spike|spiegel: hmmm, are you familiar with python virtualenv ?
<spike|spiegel>
yea
<lxsameer>
spike|spiegel: i nead something like that
dustmason has joined #ruby
<lxsameer>
spike|spiegel: i want to have a clean env for each of my projects
<spike|spiegel>
lxsameer: are you building a heroku?
<lxsameer>
spike|spiegel: no
<lxsameer>
spike|spiegel: also each of my apps use different versions of some gems like rails
<spike|spiegel>
lxsameer: well set GEM_HOME for each project seperately
<lxsameer>
spike|spiegel: hmm what about ruby version it self?
v0n has joined #ruby
<spike|spiegel>
again, if you need different ruby versions, something is not right.
<ramblex>
facepalm, looks like it's headed in the roughly right direction ;)
<lxsameer>
spike|spiegel: why ? Is it a bad idea to test your software agains older or newr version ?
<spike|spiegel>
you can always use you know ruby1.8 ruby1.9 etc binaries instead of 'ruby' symlink on most systems
<lxsameer>
spike|spiegel: yeah that's right
ayonix has joined #ruby
mneorr has quit [Remote host closed the connection]
jonahR has joined #ruby
<spike|spiegel>
these rvm guy(s) don't know what they are doing... distributing random patches which can and have crashed the interpreter in the past.
chessguy has quit [Remote host closed the connection]
<lxsameer>
spike|spiegel: i don't like rvm, it just make thing harder than before
atno has quit [Read error: No route to host]
atno has joined #ruby
<facepalm>
I wonder if you could just negate the base case and make one recusive call at the end of the if statement and put conditions inbetween..wouldnt that keep the function calling itself until it satisfies the base case? instead of recursively calling the function in elseifs
jesly has quit [Quit: Leaving.]
jnoob22 has joined #ruby
<facepalm>
seems it would get closer to that 10 liner too lol
michaelmartinez has joined #ruby
<spike|spiegel>
lxsameer: bundler does a decent job of restricting the load path.. not a big fan of it though
<ayonix>
can anyone tell me why a command works in `#{cmd}` but does not in Process.spawn(cmd)?
<lxsameer>
spike|spiegel: hmmm i'm a newbie in ruby but i found rubygems and bundler interesting, also i remember that some of the guys here does not like bundler , and i'm wonder why?
miskander has joined #ruby
RantriX has quit [Remote host closed the connection]
<spike|spiegel>
lxsameer: if you are talking rails .. you anyway have to use it.. might as well get along
danslo has joined #ruby
r0bby_ has quit [Max SendQ exceeded]
<lxsameer>
spike|spiegel: yeah , but can you tell me why don't you like bundler ? what is wronge with it ?
r0bby_ has joined #ruby
s2013 has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
johnnyfuchs has quit [Remote host closed the connection]
PragCypher has quit [Quit: Leaving]
kofno has quit [Remote host closed the connection]
<MrZYX>
lxsameer: pure "I didn't write it, therefore it's ugly"-ism I guess ;)
<ramblex>
ayonix, in what way is it not working? Does the command not get run? Process.spawn returns immediately with the process id, backticks are blocking
<baordog>
what's the best way to look for a keyword, and then match some data next to it. Like a have a bunch of data like weather = "sunny and stuff" and I want the regex to lok for weather, and grab the stuff in the quotes
subbyyy has quit [Ping timeout: 240 seconds]
<ayonix>
ramblex: i know that. i wanted to call something like `mplayer $(youtube-dl -g '<url here>')`
<ayonix>
and if i call it like that it works. If I call it within Process.spawn it seems that the url doesn't get resolved correctly
mumblerit has joined #ruby
<ayonix>
so mplayer doesn't find the file/stream
v0n has quit [Ping timeout: 252 seconds]
kil0byte has joined #ruby
brianpWins has quit [Remote host closed the connection]
brianpWins has joined #ruby
<lxsameer>
spike|spiegel: hmmm by reading some parts of that link this question is raising that "are you saying that rails is not that good?" (i'm not a fan)
mediko has quit [Ping timeout: 248 seconds]
mediko has joined #ruby
psyprus has joined #ruby
jbpros has quit [Quit: jbpros]
jovy88 has quit [Read error: Connection reset by peer]