mattbl has quit [Quit: This computer has gone to sleep]
bubblehead has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
whitedawg has joined #ruby
ryanf has quit [Quit: leaving]
Inoperable is now known as zz_Inoperable
ahokaomaeha is now known as nishidabianya
ndboost has quit [Remote host closed the connection]
nishidabianya is now known as lolcathost
pdamer has quit [Quit: pdamer]
zz_Inoperable is now known as Inoperable
h4mz1d has joined #ruby
PanPan has quit [Ping timeout: 252 seconds]
slag has joined #ruby
PanPan has joined #ruby
noodletraveler has quit [Read error: Connection reset by peer]
noodletraveler has joined #ruby
bradhe has joined #ruby
blf has joined #ruby
thufir_ has quit [Quit: Leaving.]
<blf>
I've been doing a little reading regarding Ruby threads in the PickAxe book. It mentions that Thread#join and Thread#value are considered the safest of the available methods. I'm wondering if Thread#stop and Thread#run are also safe to use?
ndboost has joined #ruby
Michael__ has joined #ruby
brianpWins has joined #ruby
JarJar has quit [Quit: Leaving]
benlieb has joined #ruby
nopolitica has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 240 seconds]
statix_ has joined #ruby
stat1x has quit [Ping timeout: 264 seconds]
mercwith1mouth has quit [Ping timeout: 240 seconds]
jgrevich has quit [Remote host closed the connection]
Pufferfood has quit [Remote host closed the connection]
noodletraveler has quit [Ping timeout: 255 seconds]
nuex has joined #ruby
<nuex>
i'm getting this warning "time_with_zone.rb:325: warning: Time#succ is obsolete; use time + 1". how do i get a backtrace, though?
spaceships has quit [Quit: leaving]
browndawg has joined #ruby
<nuex>
it appears when i run rspec. i've run each spec individually and i can't seem to duplicate the error. I was wondering if I could get a backtrace from a warning so i could locate the problem
<nuex>
any ideas?
workmad3 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ThePicard has quit [Ping timeout: 252 seconds]
__BigO__ has quit [Remote host closed the connection]
banister`sleep has quit [Remote host closed the connection]
ferdev|away is now known as ferdev
skattyadz has quit [Quit: skattyadz]
banister`sleep has joined #ruby
skattyadz has joined #ruby
Catbuntu has joined #ruby
mikekelly has quit [Ping timeout: 252 seconds]
browndawg has quit [Ping timeout: 248 seconds]
mikekelly has joined #ruby
pac1 has joined #ruby
browndawg has joined #ruby
peanuts___ has quit [Quit: Ex-Chat]
Squarepy has joined #ruby
ferdev has quit [Quit: Leaving...]
Squarepy has quit [Changing host]
Squarepy has joined #ruby
Konboi_ has joined #ruby
emergion has joined #ruby
blaxter has joined #ruby
Konboi has quit [Ping timeout: 252 seconds]
niklasb has joined #ruby
marr has quit [Ping timeout: 252 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
banister`sleep has quit [Remote host closed the connection]
banister`sleep has joined #ruby
bluOxigen has joined #ruby
daniel_- has joined #ruby
e-dard has joined #ruby
<e-dard>
Hi, Ruby newbie here. Just playing with Sinatra and looking to use flat files for an example blog project. Code is here: http://dpaste.com/935501/
<e-dard>
I'm getting error because *I think* that the markdown object is not accessible from within the helper block. Is that correct?
<e-dard>
Is it possible to specify that the markdown object is allowed in all scopes or is that not the right way to do it in ruby?
jonahR has quit [Quit: jonahR]
QKO_ has quit [Ping timeout: 248 seconds]
QKO has joined #ruby
<shevy>
e-dard you should test this in irb first
<shevy>
there is #sinatra too btw
techlife has quit [Ping timeout: 245 seconds]
<shevy>
the problem is when you use a framework, you are stuck with its limitations
<shevy>
as your question could always be answered by "if the framework allows it, everything is possible, if it is valid ruby code"
jonahR has joined #ruby
<shevy>
btw
<shevy>
does method m() exist in scope?
dmonjo has quit [Ping timeout: 276 seconds]
kofno has quit [Remote host closed the connection]
tuberculotoxin12 has quit [Quit: tuberculotoxin12]
kofno has joined #ruby
lockweel has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
kennyvb has quit [Ping timeout: 256 seconds]
cctv43 has joined #ruby
error404 has joined #ruby
techlife has joined #ruby
beilabs has quit [Ping timeout: 240 seconds]
sayan has quit [Ping timeout: 248 seconds]
answer_42 has joined #ruby
pskosinski has joined #ruby
punkrawkR^Home has quit [Ping timeout: 248 seconds]
hashmal has joined #ruby
samphippen has joined #ruby
QKO has quit [Ping timeout: 256 seconds]
kennyvb has joined #ruby
dmonjo has joined #ruby
noxoc has joined #ruby
QKO has joined #ruby
arturaz has quit [Ping timeout: 256 seconds]
samphippen has quit [Client Quit]
emergion has quit [Quit: Computer has gone to sleep.]
<nanothief>
e-dard: in a def method, a new context is created an all local variables outside of that context are no longer accessible. Therefore, you can't get to markdown. You have a few choices: make it a constant (ie use ALL CAPS in the variable name), make it a global (ie $markdown), or make a method that returns that object
erry is now known as zombierry
BizarreCake has joined #ruby
<nanothief>
alternatively, instead of using def m(content)..., you could use define_method :m do |content|\nreturn markdown.render(content)\nend. That way of creating methods doesn't open a new context, so markdown should still be accessible
maycon_ has joined #ruby
Elhu has joined #ruby
<nanothief>
s/return//
tacey has joined #ruby
tacey has quit [Max SendQ exceeded]
beilabs has joined #ruby
sayan has joined #ruby
maycon has quit [Ping timeout: 252 seconds]
angusiguess has quit [Ping timeout: 252 seconds]
yacks has quit [Ping timeout: 248 seconds]
gosshedd has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
main has joined #ruby
beliveyourdream has joined #ruby
motto has joined #ruby
timonv has joined #ruby
skcin7 has quit []
beiter has joined #ruby
jgarvey has quit [Quit: Leaving]
pavilionXP has quit [Read error: Connection reset by peer]
sayan has quit [Quit: Leaving]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
m8 has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Read error: Connection reset by peer]
eldariof has joined #ruby
banister`sleep has joined #ruby
DuoSRX has joined #ruby
arya has joined #ruby
strax has joined #ruby
LnL has joined #ruby
mackesque has joined #ruby
wf2f has quit [Read error: Connection reset by peer]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
girija has joined #ruby
arya has quit [Ping timeout: 248 seconds]
erlingur has joined #ruby
mackesque has quit [Client Quit]
Elhu has quit [Quit: Computer has gone to sleep.]
erlingur has left #ruby [#ruby]
arya has joined #ruby
Xeago has quit [Remote host closed the connection]
PanPan has joined #ruby
timhaines has quit [Quit: timhaines]
samphippen has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Guest11043 has quit [Ping timeout: 245 seconds]
robustus has quit [Ping timeout: 276 seconds]
ananthakumaran1 has joined #ruby
PanPan has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
arya has joined #ruby
robustus has joined #ruby
chico_chicote has joined #ruby
ferdev has joined #ruby
ddd has joined #ruby
ferdev has quit [Client Quit]
ddd is now known as Guest16387
entrenador has joined #ruby
pyrac has quit [Quit: pyrac]
beiter has quit [Quit: beiter]
pyrac has joined #ruby
emocakes has quit [Quit: emocakes]
lnl_ has joined #ruby
LnL has quit [Ping timeout: 260 seconds]
arya has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
Catbuntu has quit [Quit: Auf wiedersehen]
ncategory has quit [Ping timeout: 245 seconds]
crackfu has joined #ruby
arya has joined #ruby
kofno has quit [Remote host closed the connection]
PanPan has quit [Remote host closed the connection]
gyre008 has joined #ruby
gosshedd has joined #ruby
jonahR has quit [Quit: jonahR]
icole has joined #ruby
DuoSRX has joined #ruby
alx- has joined #ruby
beilabs has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
skattyadz has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
__BigO__ has joined #ruby
cpruitt has quit [Quit: cpruitt]
icole has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
jonathanwallace has joined #ruby
PanPan has joined #ruby
joofsh has quit [Remote host closed the connection]
PanPan has quit [Remote host closed the connection]
icole has joined #ruby
pdamer has quit [Quit: pdamer]
jjbohn has joined #ruby
dhruvasagar has joined #ruby
mmitchell has joined #ruby
chussenot has joined #ruby
pdamer has joined #ruby
joofsh has joined #ruby
cupakromer has joined #ruby
moshee has quit [Ping timeout: 244 seconds]
banister`sleep has quit [Remote host closed the connection]
moshee has joined #ruby
workmad3 has joined #ruby
<hackeron>
is there a check to see if a object has a value? - for example if an array has a value, or a string has a value, or if the object is nil? -- .empty? comes close, but fails on nil - is there something similar that works on nil also?
Virunga has joined #ruby
tommyvyo has joined #ruby
beilabs has joined #ruby
pmros has joined #ruby
miskander has joined #ruby
<cupakromer>
obj.nil? || obj.empty?
<cupakromer>
In Rails, they patched in obj.blank?
* Zelest
just realized that .nil would be the most amazing TLD for ruby coders. :-D
joofsh has quit [Remote host closed the connection]
<yxhuvud>
well there is defined? There are no inherent difference between a value that has been assigned to nil and one that hasn't been assigned.
<jrajav>
Zelest: You want to send the message that your website's value cannot be represented?
timonv has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
<Zelest>
jrajav, norway states "no!" on every single site.. works for them, doesn't it? ;-)
Slivka has quit [Remote host closed the connection]
S0da has joined #ruby
sam113101 has joined #ruby
sam113101 has quit [Client Quit]
jjbohn has quit [Quit: Leaving...]
sam113101 has joined #ruby
zigomir has joined #ruby
zigomir has quit [Client Quit]
maxmanders has joined #ruby
nanothief has quit [Ping timeout: 240 seconds]
robert_ has joined #ruby
Michael has joined #ruby
otherj has joined #ruby
Michael is now known as Guest45072
PanPan has quit [Ping timeout: 264 seconds]
pmros has quit [Quit: Konversation terminated!]
chrisnicola has joined #ruby
himsin has quit [Ping timeout: 248 seconds]
aspiers has quit [Ping timeout: 264 seconds]
melkor has joined #ruby
banister`sleep has quit [Remote host closed the connection]
jekotia has joined #ruby
<melkor>
I'm saving some data to a file, it will have 25 objects in it and each object has a couple of text fields. What is a good way to store this data in a text file?
banister`sleep has joined #ruby
S0da has quit [Remote host closed the connection]
<chessguy>
csv or maybe yaml
S0da has joined #ruby
tenmilestereo has quit [Quit: Leaving]
bubblehead has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
<melkor>
does ruby have a built in YAML library?
aspiers has joined #ruby
<apeiros_>
it's part of the stdlib
<apeiros_>
also see Marshal and Pstore
tjbiddle has joined #ruby
<Hanmac>
you could use json too :P
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<chessguy>
sure. it would be a little unusually for a file storage serialization mechanism, but it would certainly be fine
timhaines has joined #ruby
pskosinski has joined #ruby
<apeiros_>
chessguy: why unusual? it's not that different from yaml…
<melkor>
YAML looks pretty good.
<apeiros_>
it's even so much not different that yaml is a superset of json… (all json is valid yaml)
zorbyte has quit [Quit: Lost terminal]
colonolGron has joined #ruby
cupakromer has quit []
arya has quit [Ping timeout: 248 seconds]
joofsh has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
angusiguess has quit [Ping timeout: 244 seconds]
NobbZ is now known as NobbZ|away
octoberry has quit [Ping timeout: 256 seconds]
mengu has quit [Quit: This computer has gone to sleep]
dmiller has joined #ruby
arya has joined #ruby
colonolGron has quit [Ping timeout: 255 seconds]
gosshedd has quit [Ping timeout: 255 seconds]
colonolGron has joined #ruby
<melkor>
hmm, with YAML do I have to escape special characters?
sam113101 has quit [Ping timeout: 255 seconds]
sam113101 has joined #ruby
nidhimj22 has joined #ruby
ananthakumaran1 has quit [Ping timeout: 260 seconds]
nidhimj22 has quit [Client Quit]
<Hanmac>
melkor: they should doo it for you
fschuindt has joined #ruby
<Hanmac>
apeiros_ i thought json is a bit more safe, i thought that its only hashs,arrays and strings ... ?
<Xeago>
apeiros_: welcome back!
emmanuelux has joined #ruby
<Xeago>
I am great! At my parents in holland now
<chessguy>
apeiros_: i just meant that yaml is more often used when writing to the file system in my experience
<chessguy>
json os more often used when sending across the network
<Xeago>
Hanmac: that is plain json, I have seen json that is 'typed'
skattyadz has joined #ruby
<Xeago>
asin, it is structured not according to the data, but data format containing the data
<Xeago>
xml'alike
<Xeago>
horrible xD
<apeiros_>
Hanmac: safety of a format doesn't really depend on the format, but on the parsers
<browndawg>
Lets say I have source/css/, source/js/ and so on. I add the above repository as a submodule at source/bootstrap/. I need to include source/bootstrap/lib/bootstrap.scss in source/css/main.css.scss. What's the path I should use? "../bootstrap/lib/bootstrap" doesn't work for some reason.
<browndawg>
Sprockets config issue?
jtharris has joined #ruby
angusiguess has joined #ruby
jankly has quit [Ping timeout: 256 seconds]
Elhu has joined #ruby
<Hanmac>
shevy it happend ... i found a game MORE crazy than little inferno :P
<Trudko>
Guys I would like to ask you to help me with few sorting(i guess simple) issues in Ruby. first I have object array of objects of class Game which have attrbutes team_one_points and team_second_points. I want to find the match with highest number of points of either team_one or team_two. For example - [50,100] [ 110,50], [5,200] would return last object(200 is highest value of all)
<khismetix>
and that the output was generated due to capture
<apeiros_>
havenwood: thx
mmitchell has quit [Remote host closed the connection]
<khismetix>
2013 resolution.. to learn regex
<apeiros_>
khismetix: ri Regexp
fir_ed has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<apeiros_>
by now it has a good bit of information
relix has joined #ruby
daniel_hinojosa has joined #ruby
meoblast001 has joined #ruby
zzing has joined #ruby
h4mz1d has quit [Ping timeout: 255 seconds]
pavilionXP has joined #ruby
<jrajav>
khismetix: You should pick up something or take a class on Formal Automata
pskosinski has quit [Remote host closed the connection]
<khismetix>
very newbie ruby question.. ri Regexp gives me a very brief descripition
swex has quit [Read error: Operation timed out]
<khismetix>
jrajav .. believe it or not I used awk and sed a long time ago
<apeiros_>
what does `ruby -v` show?
<khismetix>
just gone very rusty on regexp
<jrajav>
khismetix: It's a very good field for any programmer or computer scientist to have at least an introduction to, and it leads into regexes very elegantly
<khismetix>
Formal Automata.. interesting
pskosinski has joined #ruby
pac1 has joined #ruby
kiwnix has quit [Quit: Leaving]
joofsh has joined #ruby
<jrajav>
It will also make time/space complexity more approachable
<apeiros_>
doesn't postmodern use a different nick on irc?
jarjar_prime has quit [Quit: Ready? Set? Go!]
<jrabbit>
havenwood: if you keep mentioning it, it mgiht not be for too long
<havenwood>
nope, same nick
ferdev|away is now known as ferdev
tommyvyo has joined #ruby
<havenwood>
apeiros_: just opposite time zone
<apeiros_>
opposite of what?
chrishough has quit [Client Quit]
chrishough has joined #ruby
<havenwood>
apeiros_: opposite of me, west coast usa - i dunno where he actually lives
AxonetBE has left #ruby [#ruby]
jarjar_prime has joined #ruby
<havenwood>
apeiros_: #ronin and #chruby and here
<apeiros_>
havenwood: what's west coast on? UTC-13?
<Trudko>
shevy and what if i have same problem but I have array of games. each have attribute Players which have two attributes player_one_points, player_two points
nanothief has joined #ruby
jpfuentes2 has joined #ruby
matchaw___ has joined #ruby
<havenwood>
apeiros_: Aack, I dunno. I had to google when 23:00 UTC was just a min ago to check when #ruby-implementers meeting would be today!
<havenwood>
apeiros_: I'm curious to listen-in.
ogonec has joined #ruby
<ogonec>
Hello
matchaw_ has quit [Ping timeout: 272 seconds]
<apeiros_>
havenwood: oh, good you mention that
<apeiros_>
I completely forgot
<havenwood>
23:00 UTC == 15:00 PST
h0rr has joined #ruby
CreativeEmbassy has joined #ruby
PanPan_ has joined #ruby
<havenwood>
ogonec: hi
dagnachew has joined #ruby
wallerdev has joined #ruby
<ogonec>
How are you here, guys?
d3vic3_ has joined #ruby
chessguy has quit [Remote host closed the connection]
<havenwood>
ogonec: Saturday :D
<ogonec>
Are here more then 3 guys in active?
nanothief has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Quit: Leaving]
matchaw___ has quit [Client Quit]
xardas has quit [Remote host closed the connection]
matchaw has joined #ruby
d3vic3 has quit [Ping timeout: 244 seconds]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
miskander has quit [Quit: miskander]
dallasm has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
tenmilestereo has joined #ruby
khismetix has quit [Ping timeout: 252 seconds]
niklasb has quit [Ping timeout: 252 seconds]
xardas has joined #ruby
PanPan_ has quit [Ping timeout: 244 seconds]
bradhe has joined #ruby
<havenwood>
ogonec: Active what? I dun understand.
arietis has joined #ruby
bradhe has quit [Remote host closed the connection]
<havenwood>
Hrmm, i'm not sure symbol oom is that big of a deal. When i've tried making tons of symbols it slows down so much that taking all the ram is super time consuming. I guess for a vps server or something very ram limited it would be more dangerous?
<Trudko>
shevy: ou sorryi wasnt clear now i have collection of games and each game have collection playermatches. PLayer match is collection of playerMatch object with attributes player_one_points player_two_points
vlad_starkov has joined #ruby
melkor has quit [Ping timeout: 244 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
<garbagecollect-1>
thank you havenwood
<Trudko>
shevy to give you and idea I am doing little program for bowling league and there you have Games (between teams) which consists of games between players
<havenwood>
garbagecollect-1: It is customary to use a Rack web server with a Rack web framework for web apps in Ruby.
<garbagecollect-1>
so what are the other options if you didn't use rack
<garbagecollect-1>
are there other web frameworks for the ruby language?
<garbagecollect-1>
besides rails
aaronmacy has joined #ruby
<havenwood>
garbagecollect-1: Examples of Rack web servers include unicorn, rainbows! thin, webrick, puma, etc.
<garbagecollect-1>
so ruby on unicorn?
<garbagecollect-1>
ruby on rails
<garbagecollect-1>
ruby on thin
<garbagecollect-1>
ruby on webrick
<garbagecollect-1>
?
<havenwood>
garbagecollect-1: Examples of Rack web frameworks include sinatra, rails, cuba, renee, camping, etc.
<garbagecollect-1>
so ruby on sinatra is not the same thing as ruby on rails
<garbagecollect-1>
but rails is the most popular
<garbagecollect-1>
and everyone uses rack as the underlying?
fschuindt has quit [Read error: Connection reset by peer]
<garbagecollect-1>
oh wait
nyuszika7h has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
jonathanwallace has joined #ruby
<garbagecollect-1>
so unicorn is a rack based web framework
<havenwood>
garbagecollect-1: Why Ruby on Rails is called what it is called is bizarre and unusual. Sinatra is just Sinatra.
<havenwood>
garbagecollect-1: No, unicorn is a Rack based web server.
ananthakumaran1 has quit [Ping timeout: 256 seconds]
<garbagecollect-1>
and the framework for the interaction can be rails or sinatra
<garbagecollect-1>
or something else
mengu has joined #ruby
<havenwood>
garbagecollect-1: The framework is the thing, like Rails that you use to make the web app itself.
DuoSRX has quit [Remote host closed the connection]
<havenwood>
garbagecollect-1: The web server is the thing on the other side of Rack that serves up your content over HTTP.
aaronmacy has quit [Client Quit]
<shevy>
Trudko no real idea... but always try to stay as simple as possible
<garbagecollect-1>
so if your using sinatra your probably not using rails
<apeiros_>
usually not
<apeiros_>
but it is possible
h0rr has quit [Quit: h0rr]
<havenwood>
garbagecollect-1: sometimes you'll see multiple sinatra apps alongside a main rails app, or whatever
<Hanmac>
garbagecollect-1 some of us use ruby for more cooler stuff than web apps
whowantstolivef1 has joined #ruby
<garbagecollect-1>
havenwood: but in general?
<garbagecollect-1>
so rack is a thing that has a web server that could be called webrick or unicorn
<havenwood>
garbagecollect-1: like apeiros_ said, usually not
rippa has quit [Ping timeout: 240 seconds]
<garbagecollect-1>
and that accept httpd requests
<garbagecollect-1>
http
mlr has quit [Ping timeout: 260 seconds]
velCzupa has joined #ruby
<garbagecollect-1>
and then the web framework like rails or sinatra somehow do things with the requests
<havenwood>
garbagecollect-1: Unicorn is a really nice web server, especially for MRI Ruby.
<havenwood>
garbagecollect-1: Puma is a nice option for JRuby or RBX.
<havenwood>
garbagecollect-1: For web frameworks, Sinatra is a very nice option.
maxmanders has quit [Ping timeout: 252 seconds]
velCzupa has quit [Client Quit]
joofsh has quit [Remote host closed the connection]
<havenwood>
garbagecollect-1: There are non-rack options, but rack is by far the most popular.
<garbagecollect-1>
so what does the rack actually do if the web server component is really unicorn or something else
maxmanders has joined #ruby
chrisnicola has joined #ruby
nyuszika7h_ has joined #ruby
<canton7>
it's called "middleware". it sits between the server and your web application
nyuszika7h_ is now known as nyuszika7h
<havenwood>
garbagecollect-1: It is an interface between, yeah what canton7 said!
arietis has joined #ruby
<canton7>
an interface layer, give or take, if you like. so your web app, written to talk to rack, can run on top of any webserver which also talks rack
<apeiros_>
it standardizes the interface between your webserver and your application
CreativeEmbassy has joined #ruby
cableray has joined #ruby
jonathanwallace has quit [Ping timeout: 260 seconds]
<havenwood>
garbagecollect-1: You can use other things like webmachine, but standardizing around Rack is really quite nice.
<canton7>
and you can inject some other funky middleware, using rack. such as loggers, etc
zerba has quit [Remote host closed the connection]
carraroj has joined #ruby
<garbagecollect-1>
so it goes browser -> web server -> rack -> rails
<apeiros_>
ah, yeah, well, that's a great way to get kicked
jpfuentes2 has joined #ruby
<havenwood>
garbagecollect-1: You could try #railsnoob. Sinatra is really nice though.
<garbagecollect-1>
cool
<garbagecollect-1>
how similar are sinatra and rails?
<havenwood>
garbagecollect-1: Rails makes all the decisions for you and provides options to swap out alternatives for those decisions. Sinatra is a DSL that you can build up your own decisions with
dagnachew has quit [Remote host closed the connection]
<garbagecollect-1>
DSL?
<havenwood>
domain specific language
ferdev is now known as ferdev|away
<apeiros_>
havenwood: well, since rails 3, you can go down to the rack level in your apps, so that's not really true
<apeiros_>
Vulix: also try to do better than "doesn't work"
<apeiros_>
since "doesn't work" is a rather useless problem description
<Vulix>
tyvm apeiros_
havenwood has quit [Remote host closed the connection]
<Vulix>
yea I didnt know if it was already known
Takehiro has joined #ruby
<theoros>
assume Cat < Animal. is there any way with rspec to verify that Cat.new will receive .foo but that it will actually call Animal#foo ?
<apeiros_>
doesn't matter
<Vulix>
ok calm down now :)
svnieuw has joined #ruby
<apeiros_>
I am calm, but people telling me to calm down set me up…
<apeiros_>
upset me?
<apeiros_>
englishfail :)
<shock_one>
Vulix, there is a link to the guides git at the buttom. There you can find the latest version.
blaxter has quit [Quit: foo]
<Vulix>
Can I copy\paste error messages in here?
<apeiros_>
Vulix: >3 lines to a pastebin
<apeiros_>
anything else - yes
zz_chrismcg is now known as chrismcg
<Vulix>
good point brb
<shock_one>
apeiros_, pastebin sucks
<apeiros_>
shock_one: "*a* pastebin"
<apeiros_>
and yes, pastebin.org sucks, which is why I wrote gist in the topic
<apeiros_>
.com?
<apeiros_>
it sucks so hard, I don't even know its tld
chrismcg is now known as zz_chrismcg
<Vulix>
If you have done the tutorial, it gets stuck here for me: http://pastebin.com/76RLDqwJ not sure if htat is really helpful, seems to fail at @posts.each
<epitron>
vulix flies in the face of apeiros' hate
* apeiros_
really needs canned answers - was too lazy to write "such as gist.github.com"
<Xeago>
just say, at gists
<Xeago>
or gist it
<Xeago>
or even, to github
<apeiros_>
Xeago: many people don't know what "to gist" means
fedza_ has joined #ruby
<apeiros_>
and I doubt any dictionary lists it as "paste your text on gist.github.com"
niklasb has joined #ruby
<apeiros_>
Vulix: the error tells you that @posts is nil
<apeiros_>
which means that you probably forgot to assign to it in your controller
<shock_one>
Xeago, gist the PostsController index action
<Xeago>
shock_one: I don't have such controller nor such action
<shock_one>
Xeago, tell Vulix to gist it.
<Vulix>
ty ill look into it
<apeiros_>
lol
fedza has quit [Read error: Connection reset by peer]
dagnachew has quit [Remote host closed the connection]
<apeiros_>
help by proxy :)
mengu has quit [Quit: Leaving]
chylli has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 252 seconds]
jpfuentes2 has quit [Ping timeout: 248 seconds]
banister`sleep has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
zzing has quit [Quit: Computer has gone to sleep.]
cupakromer has quit []
redo has joined #ruby
Beoran has quit [Remote host closed the connection]
Beoran_ has quit [Remote host closed the connection]
redo has quit [Client Quit]
chrishough_ has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has joined #ruby
phinfonet has quit [Ping timeout: 244 seconds]
<garbagecollect-1>
anyone have a tutorial on front end programming in rials
chrishough has quit [Ping timeout: 252 seconds]
chrishough_ is now known as chrishough
<Hanmac>
garbagecollect-1 you are in the wrong channel ... try #rubyonrails
dagnachew has joined #ruby
idkazuma has joined #ruby
[[johnonymous]] has joined #ruby
pmros has joined #ruby
svnieuw has left #ruby [#ruby]
adeponte has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
dagnachew has quit [Ping timeout: 255 seconds]
ryez has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
angusiguess has joined #ruby
Vulix has left #ruby [#ruby]
miskander has quit [Quit: miskander]
generalissimo has joined #ruby
nanothief has joined #ruby
uris has joined #ruby
kn330 has quit [Ping timeout: 252 seconds]
khimera has joined #ruby
jrajav has joined #ruby
timols has quit [Quit: timols]
adkron has joined #ruby
adkron_ has joined #ruby
mmitchell has joined #ruby
admin0 has joined #ruby
hakunin has joined #ruby
nanothief has quit [Ping timeout: 252 seconds]
timols has joined #ruby
chrisramon has quit [Quit: chrisramon]
timols has quit [Client Quit]
mmitchell has quit [Ping timeout: 264 seconds]
tylersmith has quit [Quit: tylersmith]
adkron_ has quit [Ping timeout: 257 seconds]
miskander has joined #ruby
chrisramon has joined #ruby
adkron has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
plotter has quit [Remote host closed the connection]
bricker`LA has quit [Ping timeout: 248 seconds]
benlieb has joined #ruby
ryannielson has joined #ruby
arturaz has quit [Ping timeout: 264 seconds]
lethjakman has joined #ruby
Konboi has quit [Remote host closed the connection]
bricker`LA has joined #ruby
IceDragon has quit [Read error: No route to host]
arya has quit [Ping timeout: 248 seconds]
khimera has quit [Quit: khimera]
IceDragon has joined #ruby
arturaz has joined #ruby
e-dard has joined #ruby
<e-dard>
Hi, I'm looking for options for parsing meta-data in files. The files are markdown files to be used as pages on a website. I'm parsing the markdown using redcarpet but I would like to add meta data
arya has joined #ruby
alx- has joined #ruby
<e-dard>
the metadata might be things like: post title, date of post, tags, categories etc. is there anything that will do both the markdown and metadata in the file/string?
thufir_ has joined #ruby
<shock_one>
e-dard, so, it isn't some standart format of metadata? It looks pretty simply, you can parse it by yourself.
<Spooner>
e-dard, It is usual to do that with YAML in the header.
lethjakman has quit [Ping timeout: 256 seconds]
<Spooner>
e-dard, also known as "YAML front matter".
adkron has joined #ruby
ahokaomaeha has joined #ruby
<e-dard>
Spooner: ah cool. Thanks. I'm not familiar with YAML :-) but seems like that's exactly what I was looking for
<e-dard>
Just need to find something that will parse the YAML and then the markdown (or I suppose I could split the file contents at a specific point and send parts to respective parsers)...
<Spooner>
YAML documents are separated by --- so that is easy enough.
<Spooner>
If you are using one of the Ruby web frameworks, however, I'm sure they already have mechanisms for dealing with it (I know nanoc & Jekyll do; assume Sinatra and Rails have something too).
tjbiddle has joined #ruby
<arturaz>
does ruby have any view-first web frameworks?
<e-dard>
Spooner: I'm a Python guy. I'm learning Ruby this weekend and am building a static site generator as a way to get up to speed. :)
Guest16387 has quit [Ping timeout: 245 seconds]
<Spooner>
e-dard, Nanoc and Jekyll already do that well enough ;)
<e-dard>
So trying to do as much as possible myself (I'm using Sinatra)
Xeago has joined #ruby
<e-dard>
Spooner: exactly - then I won't learn anything :)
yxhuvud has quit [Ping timeout: 264 seconds]
<Xeago>
For the first time ever, I could not recover my mac
<Hanmac>
e-dard you can run ruby inside python :P
<Hanmac>
or with python :P
<Xeago>
applications froze, but not the cursor after pressing cmd+I in safari to e-mail the current page's contents
<Xeago>
and form there everything seemed normal
CreativeEmbassy has joined #ruby
<e-dard>
Xeago: Mine kernel panic all the time!
<Xeago>
e-dard: kernel panics would be remote debugable
<Xeago>
for example over firewire or utp
tylersmith has quit [Quit: tylersmith]
Es0teric has joined #ruby
vierja has quit [Ping timeout: 252 seconds]
Jackneill has quit [Ping timeout: 248 seconds]
joofsh has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<Xeago>
that said, I would rather have a kernel panic than this. If you want and are knowledged enough, you can boot OSX manually while debugging without restarting the machine :)
<Xeago>
takes anout 10 minutes of typing, did it frequently at the applestore
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
mercwith1mouth has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 244 seconds]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<Xeago>
believe it or not, the standard shell being faded out at the repair desk in favor of another shell.
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
ddd has joined #ruby
cupakromer has joined #ruby
ddd is now known as Guest16060
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
* Hanmac
is still suprised that Apple let you compile software on an OSX
vierja has joined #ruby
<Xeago>
Hanmac: why?
<e-dard>
Xeago: I also own one of the wonderful iMacs that can't have it's wifi used for long before it stops working until reboot…
<Xeago>
e-dard: pity, I would love to ssh into your machine and have a look xD
<e-dard>
Xeago: if you read through that thread you will see the general outline of the problem, and the solutions proposed (none worked for me)
emmanuelux has quit [Remote host closed the connection]
[[johnonymous]] has quit [Quit: Computer has gone to sleep.]
<Xeago>
it was such a relief for me to pass the intermediate exam (internal at apple), only after that are you allowed to use a shell/terminal during repairs and stuff
<Xeago>
e-dard: what thread? I am probably blind in missing the link
havenwood has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
tommyvyo has joined #ruby
cableray has joined #ruby
jjbohn has quit [Quit: Leaving...]
<Xeago>
had a quite extensive internship
ryanf has joined #ruby
<shock_one>
Xeago, what do they write in ruby?
<Xeago>
helper scripts, some management stuff, but that is not why I idle here
<Xeago>
more shell and perl tho
jjbohn has joined #ruby
chussenot has quit [Quit: chussenot]
Caius has joined #ruby
<shock_one>
Xeago, I suppose, you can't share the exam text?
c0rn has joined #ruby
plotter has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
mercwith1mouth has joined #ruby
jpfuentes2 has joined #ruby
beilabs has joined #ruby
c0rn has quit [Ping timeout: 252 seconds]
skattyadz has joined #ruby
<e-dard>
Is there anything in Ruby std lib for mocking out a file? I'm thinking about something that allows me to create and object that behaves like a file-object
<Xeago>
shock_one: unfortunayely
<Xeago>
it is quite advanced, but it doesn't check basics
Guest45072 has quit [Remote host closed the connection]
<Xeago>
which I am lacking because I am self-thought, mostly from tuto's/blogs
<Xeago>
mostly lacking in unix permissions
c0rn has joined #ruby
<Xeago>
the default unixy stuff genius' get taught is similar to Linux101 exam
<e-dard>
ah it's exactly what I know from Python - StringIO :-D
<shock_one>
They're quite simple not considering special flags — there are 3 groups, each can read, write and execute
<Xeago>
e-dard: just create an object that has a similar interface/methods as the object you mock
<Xeago>
shock_one: I am aware of that, even most special flags
<e-dard>
Xeago: that's typically a very long-winded way of doing something
<Xeago>
e-dard: then what do you want to do?
<shock_one>
Xeago, so, what was the question?
<e-dard>
Xeago: StringIO is exactly what'
<Xeago>
stream string/memory backed?
joofsh has quit [Remote host closed the connection]
<Xeago>
but I can't solve this without help: I have a directory in my homefolder, owned by another group of which I am member. Some daemon process creates files and directories in this folder.
etcetera has joined #ruby
<Xeago>
I can't delete files in directories in the folder (because I don't have groupwrite on directories)
<maddog_>
Now that's interesting. I upgraded the memory of the machine with the problematic script. Now the first run was fine, let's see if a second one works too
<Xeago>
what should I change to get new directories group writeable?
ferdev|away is now known as ferdev
<shock_one>
Xeago, existing directories?
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<maddog_>
Nice, it really seems to be a memory problem -.-
<shock_one>
maddog_, you could write a bug report
vikhyat has quit [Remote host closed the connection]
ccarterc has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
<shock_one>
Xeago, so, you have -rw -r- ---- and new folders should be -rw- rw- ---?
<shock_one>
I messed up a little -rw- r-- --- => -rw- rw- ---
arya has joined #ruby
ccarterc has left #ruby [#ruby]
<shock_one>
It looks impossible to me, unless you're the owner. What is the answer?
tommyvyo has joined #ruby
miskander has quit [Quit: miskander]
chrisramon has quit [Ping timeout: 248 seconds]
answer_42 has quit [Remote host closed the connection]
<zzing>
If I had a game written in ruby, with an AI written in ruby, would it be possible to reload the AI code while the game is still running to allow for quick changes?
<Spooner>
zzing, Yes.
<zzing>
What should I look at when I need this?
Dwarf has joined #ruby
toekutr has joined #ruby
<Spooner>
Though that rather depends how you implement the AI, I suppose. Any state would be lost, of course.
<banister_>
in which case 'interpolated' has a totally different meaning
<Vulix>
I guess im used to programming more procedurally
<garbagecollect-1>
in haml
<garbagecollect-1>
whether you use ( or { doesn't matter does it
<garbagecollect-1>
%span(id='blah')
<garbagecollect-1>
vs %span{;id => blah}
Banistergalaxy has joined #ruby
mmitchell has joined #ruby
<apeiros_>
it does. and the docs tell you the difference.
<apeiros_>
srsly, man up and start reading stuff.
<garbagecollect-1>
what docs?
<Vulix>
im going to fork ruby and make a language called red gemstone
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<apeiros_>
garbagecollect-1: srsly? you need another "let me google that for you" link?
<garbagecollect-1>
dude I'm reading the docs
<garbagecollect-1>
I'm not just asking u guys questions
<apeiros_>
then wtf is it with you and "what docs"…
<garbagecollect-1>
im reading docs that tell me you can do ( or {
<garbagecollect-1>
they don't tell the difference
arya has quit [Ping timeout: 248 seconds]
* apeiros_
rolls his eyes
<apeiros_>
if you say so
<Vulix>
garbage collect copy paste link
<garbagecollect-1>
i closed the window
<garbagecollect-1>
im not lying though
<garbagecollect-1>
proof I'm reading the docs is the fact i even asked the questoin
<apeiros_>
garbagecollect-1: dude, you made it on my "stop bothering with that guy"-list pretty quickly.
<garbagecollect-1>
also how do u link controllers to certain views so the helper method are available
<garbagecollect-1>
whatever
<apeiros_>
exactly
alanp_ has joined #ruby
<garbagecollect-1>
Brackets represent a Ruby hash that is used for specifying the attributes of an element. It is literally evaluated as a Ruby hash, so logic will work in it and local variables may be used. Quote characters within the attribute will be replaced by appropriate escape sequences.
<garbagecollect-1>
what exactly is a "ruby hash"
<garbagecollect-1>
i see that as an object notatino
alanp has quit [Read error: Operation timed out]
<Spooner>
garbagecollect-1, Hash object. aka a dictionary or mapping.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<garbagecollect-1>
oh
<garbagecollect-1>
so logic doesn't work inside (
<Spooner>
That rather depends.
bean has quit [Quit: Computer has gone to sleep.]
jaygen has joined #ruby
codecop has quit [Remote host closed the connection]
<Spooner>
On what you mean by that.
Xeago_ has joined #ruby
Xeago is now known as Guest93788
Guest93788 has quit [Killed (sendak.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
<garbagecollect-1>
in haml
dallasm has joined #ruby
<garbagecollect-1>
%span(blahblahblah)
<garbagecollect-1>
if i say had to do a #{item.something}
arya has joined #ruby
<cmyers>
anyone have any experience with mocha? according to http://gofreerange.com/mocha/docs/, it looks like I should just do "@mymock = mock()" then set expectations, but I get NoMethodError for mock...
<cmyers>
(using mocha 0.13.2, rails 3.2.12)
Takehiro has joined #ruby
tjbiddle has joined #ruby
roadt has quit [Ping timeout: 248 seconds]
pdamer has quit [Quit: pdamer]
arya has quit [Ping timeout: 256 seconds]
Takehiro has quit [Ping timeout: 260 seconds]
nicoulaj has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
S0da has quit [Ping timeout: 256 seconds]
etcetera has quit []
kirun has quit [Quit: Client exiting]
generalissimo has joined #ruby
etcetera has joined #ruby
caleb_io has joined #ruby
kodeart has joined #ruby
Xeago has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
miskander has joined #ruby
sqrel has quit [Read error: Connection reset by peer]
cisco has joined #ruby
Xeago has joined #ruby
Squarepy has quit [Quit: Leaving]
sebastianb has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
spider-mario has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
<Xeago>
apeiros_: you got your new machine yet?!
jimeh has joined #ruby
jimeh has quit [Client Quit]
miskander has quit [Client Quit]
generalissimo has quit [Remote host closed the connection]
generalissimo has joined #ruby
dallasm has quit [Remote host closed the connection]
tylersmith has quit [Quit: tylersmith]
ryez has quit [Ping timeout: 248 seconds]
matchaw_ has quit [Quit: No Ping reply in 180 seconds.]
arya has joined #ruby
matchaw has joined #ruby
bean has joined #ruby
mattbl has joined #ruby
stormetrooper has joined #ruby
caleb_io has quit [Quit: caleb_io]
mityaz has quit [Quit: See ya!]
relix has quit [Quit: relix]
arya has quit [Ping timeout: 252 seconds]
mockra has quit [Remote host closed the connection]
nyuszika7h has quit [Ping timeout: 245 seconds]
<epitron>
garbagecollect-1: you owe these guys a cut of your paycheque
<garbagecollect-1>
yeah i do
ryanf_ has joined #ruby
Umren|2 has quit [Read error: Connection reset by peer]
<garbagecollect-1>
i will pay for all night question answering