klmlfl_ has quit [Remote host closed the connection]
djbkd has joined #ruby
<zenspider>
icbm: any ideas on the speed of whittle? sounds like it'll be inheritantly slower than racc
timonv_ has joined #ruby
<icbm>
I haven't used racc yet, but yes, whittle should be slower
codeFiend has quit [Quit: codeFiend]
icebourg has quit []
nickjj has quit [Quit: Leaving]
nickjj has joined #ruby
brocktimus has joined #ruby
snath has joined #ruby
nicolastarzia has quit [Ping timeout: 240 seconds]
<icbm>
For one, it has to generate the parse table at runtime. Secondly, the lexer is a simple "try every terminal regex and pick the longest match" algorithm.
<icbm>
That said, it looked a little simpler to use than racc, so I tried it.
djbkd has quit [Ping timeout: 252 seconds]
deryl is now known as ddd
timonv_ has quit [Ping timeout: 264 seconds]
zorak8 has quit [Ping timeout: 245 seconds]
codeFiend has joined #ruby
<zenspider>
I generally hate all lalr/lr grammar engines... but I have enough investment in racc that I can't leave at this time
<zenspider>
soon? maybe...
rajeshchawla has quit []
yourabi has joined #ruby
shortdudey123 has joined #ruby
yourabi has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
<shortdudey123>
anyone familiar with Psych::Parser?
<icbm>
zenspider: What do you prefer instead? I like LALR the most, but I've mostly forgotten the other types except for recursive-descent.
fgmfgmfgm has joined #ruby
fgmfgmfgm has quit [Client Quit]
<bradland>
shortdudey123: it's best just to ask your question. if someone is familiar they'll respond.
St1gma has quit [Remote host closed the connection]
<shortdudey123>
sure
zorak8 has joined #ruby
josephndenton has joined #ruby
<bradland>
Psych is the core YAML parser for Ruby, so chances are most are familiar.
djbkd has joined #ruby
St1gma has joined #ruby
<shortdudey123>
i am trying to parse yaml "foo: bar" and the tree is showing 2 scalar nodes at equal level, not nested
klmlfl has joined #ruby
<shortdudey123>
however, calling .to_ruby shows the correct nesting
<bradland>
shortdudey123: can you post your code in a gist and link to it here?
<shortdudey123>
how do i determine nesting before moving from the treebuilder to ruby
<bradland>
for the yaml string "foo: bar" ?
<bradland>
i'm not even sure how to answer that
<bradland>
if you could gist some code, that would be really helpful
pkrzywicki has quit [Remote host closed the connection]
DonOtreply has quit [Quit: DonOtreply]
<shortdudey123>
foo and bar are on the same child level, but bar is the value for foo
<bradland>
shortdudey123: any reason you're using Psych directly instead of working through YAML?
<shortdudey123>
i am trying to do duplicate key detection
<zenspider>
ugh
<bradland>
zenspider: is the perfect person to help you with this lol
<shevy>
hehehe
<bradland>
i'm such a novice, i'd YAML.load the whole thing and do it in ruby :P
<shevy>
yes!
bronson has joined #ruby
<bradland>
'cause looking at that parse tree makes me feel a little sick to my stomach
<shortdudey123>
haha have to do it before it hits ruby
<shortdudey123>
lulz
Porpado has quit [Quit: Porpado]
<pipework>
Why don't you modify it as a string in ruby?
<pipework>
Read in the file and do stuff to it.
Deele has quit [Ping timeout: 244 seconds]
<shortdudey123>
i would probably have to write my own YAML parser then
<pipework>
What kind of stuff are you doing?
julieeharshaw has quit [Ping timeout: 264 seconds]
<shortdudey123>
loading the yaml into a tree, then iterating through the tree and seeing if there is a key listed twice
<shortdudey123>
but i am seeing the keys and values on the same level in the tree which doens't work well when i only want to see the keys haha
<bradland>
i am willing to accept at face value that you _must_ do this inside the Psych parser; i will not, however, have anything to do with that effort.
<bradland>
if you need me, i'll be here making snarky remarks about your progress.
julieeharshaw has joined #ruby
<shortdudey123>
i don't have to use Psych, but it looked like it would work
<zenspider>
shortdudey123: seems like a BS requirement. I prefer GIGO as a design decision
<bradland>
ok, i'm intrigued. why do you have to do it within Psych?
<bradland>
as opposed to simply parsing the whole thing and working with ruby objects?
mjuszczak has quit []
bronson has quit [Ping timeout: 245 seconds]
<bradland>
for bonus points, use the term "web scale" in your explanation
sargas has joined #ruby
sargas has quit [Changing host]
sargas has joined #ruby
<pipework>
I'm a fan of redditscale, or slashdotscale.
<bradland>
i'll accept those alternatives
sargas has quit [Client Quit]
DadoCe has quit [Remote host closed the connection]
DadoCe has joined #ruby
<zenspider>
bradland: what happens when you create a hash with the same key multiple times?
<bradland>
this is actually kind of hilarious shortdudey123. i have no fucking clue how Psych knows that one is the key and one is the value when examining these Psych::Nodes::Mapping
fryguy9 has quit [Quit: Leaving.]
<shortdudey123>
bradland: i don't have to do it it psych... it just seemed like a way that could work so that i could have some parsing already setup and i didn't have to write a yaml parser
<bradland>
>> { foo: "bar", foo: "baz" }
<eval-in>
bradland => /tmp/execpad-9721336a281e/source-9721336a281e:2: warning: duplicated key at line 2 ignored: :foo ... (https://eval.in/240934)
<bradland>
zenspider: that ^
<zenspider>
and you think psych will just build up some ruby source and eval it?
<bradland>
and a giant lightbulb goes off over my head
<zenspider>
there yo ugo
marr has quit [Ping timeout: 265 seconds]
<zenspider>
s/ u/u /
<bradland>
stop cluing me in. it's bright in here and it's evening time.
baweaver has joined #ruby
<bradland>
kinda sleepy
<shortdudey123>
hmm when doing { foo: "bar", foo: "baz" } in irb, doens't exception
<bradland>
warning
<bradland>
your warn level is probably too low
<bradland>
er, log level
<shortdudey123>
possibly
<pipework>
-w is awesome
<pipework>
-w is hellish when libraries cause warnings.
<shortdudey123>
adding -W / -w has no change
reinaldob has joined #ruby
<shortdudey123>
oh, that is on 2.,2
<shortdudey123>
i am running 2.1.5
<bradland>
irb or ruby?
<bradland>
irb has no -w
<shortdudey123>
ruby
<zenspider>
pipework: feel free to join /warningfree on github
<aarwine>
2.2 is where it's at
<shortdudey123>
bradland: irb has -w and -W
<shortdudey123>
-w Same as `ruby -w`
<shortdudey123>
-W[level=2] Same as `ruby -W`
<bradland>
heh. doesn't show up in my `man irb` output
<bradland>
i see it in 'irb -h'
<shortdudey123>
thats what we call a feature :p
<bradland>
that is interesting
<bradland>
no warning when irb is invoked with `irb -w`
reinaldob has quit [Ping timeout: 252 seconds]
pwnz0r has joined #ruby
einarj has quit [Remote host closed the connection]
DadoCe has quit [Remote host closed the connection]
parduse has joined #ruby
DadoCe has joined #ruby
mrmargolis has joined #ruby
DadoCe has quit [Remote host closed the connection]
brocktimus has quit [Remote host closed the connection]
<shortdudey123>
interesting
charliesome has joined #ruby
danielcharles has quit [Quit: Lost terminal]
brocktimus has joined #ruby
SilkFox_ has joined #ruby
brandonjjon has joined #ruby
<brandonjjon>
Could anyone provide an example of verifying post data with this library? https://github.com/dwilkie/paypal Not sure how to access the private method and such. Ruby noob.
yfeldblum has quit [Read error: Connection reset by peer]
carvantes has quit [Quit: WeeChat 0.3.7]
yfeldblum has joined #ruby
omosoj has joined #ruby
Xoro has quit [Quit: Leaving]
Xoro has joined #ruby
Spooner has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
maletor has quit [Changing host]
maletor has joined #ruby
mrmargolis has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 272 seconds]
claptor has joined #ruby
bitcycle has quit [Ping timeout: 244 seconds]
<shortdudey123>
hmm... changing to 2.2.0 still silently fails on dupe keys in the yaml parsing :/
SilkFox_ has quit [Ping timeout: 264 seconds]
<shortdudey123>
was hoping it wouldn't with the new dupe key exception
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bradland>
shortdudey123: i get a warn under 2.2
conniemj has quit [Quit: (null)]
blastermaster has joined #ruby
<bradland>
are you certain irb has started under 2.2?
<bradland>
p RUBY_VERSION
<bradland>
in your IRB
baweaver has quit [Remote host closed the connection]
<blastermaster>
how can I parse a website (forum) that has URL like http://blabla.com/page-1 and each thread in a class="threadTitle" ? I need to open each thread and search for a keyword
<bradland>
i hope you stood on your chair and pounded your chest a bit
<jhass>
in hash literals, not hash objects in general
<bradland>
good point
russt has quit [Quit: russt]
pdoherty has quit [Ping timeout: 264 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Senjai has quit [Quit: WeeChat 1.0.1]
metadave has joined #ruby
<sondr3>
hey, silly question, I'm playing around with making a gem and want to iterate over a few files in a templates folder (lib/scaffold) and I have a self.source_root set to that folder so doing copy_file "name", "name" works but anything like dir.foreach or dir.glob I haven't been able to get to work... any ideas?
klmlfl has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
josephndenton has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
ptrrr has quit [Quit: ptrrr]
Xeago has quit [Ping timeout: 255 seconds]
djbkd has quit [Quit: My people need me...]
giuseppesolinas has quit [Quit: Leaving]
codeFiend has joined #ruby
<zenspider>
sondr3: depends on the glob
<zenspider>
Dir.foreach shouldn't tho... you pass it the dir you want to enumerate...
ursooperduper has joined #ruby
giuseppesolinas has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
giuseppesolinas_ has joined #ruby
giuseppesolinas has quit [Client Quit]
klmlfl has quit [Ping timeout: 244 seconds]
<sondr3>
yeah, I give it the directory it should enumerate but it gives me an "scaffold.rb:33:in `open': No such file or directory @ dir_initialize - ../../scaffold (Errno::ENOENT)" error, but if I just use the self.source_root and copy_file with the same "../../scaffold" it works fine
segfalt has quit [Quit: Connection closed for inactivity]
DadoCe has quit [Remote host closed the connection]
skj3gg has quit [Quit: ZZZzzz…]
hrs has joined #ruby
DadoCe has joined #ruby
mleung has quit [Quit: mleung]
<bradland>
shortdudey123: it looks like the Psych::Nodes are always in sequential key/value pairs
<bradland>
so the first of a pair is the key, and the second the value
cpt_yossarian has quit [Quit: And then he took off.]
<bradland>
i'm out for a while, good luck!
<shortdudey123>
yeah, i was noticing that too
metadave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shortdudey123>
thanks for the help :)
cpt_yossarian has joined #ruby
<bradland>
shortdudey123: you bet. i'll leave you with one last bit for your examination: http://pastebin.com/V5KKqmDv
blastermaster has quit [Ping timeout: 255 seconds]
ubaldas has joined #ruby
DadoCe has quit [Ping timeout: 245 seconds]
Hobogrammer has joined #ruby
ubaldas has quit [Client Quit]
Tricon has quit [Ping timeout: 264 seconds]
julieeharshaw has quit [Ping timeout: 264 seconds]
pengin has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
<sondr3>
okay, maybe to clarify, how can I enumerate over files in a gem when trying to install it? It seems right now it just goes ../ down from where I am instead of inside the gems directories (which is what I want)
crueber has joined #ruby
Azure has joined #ruby
Channel6 has joined #ruby
sinkensabe has quit [Ping timeout: 244 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
<sondr3>
zenspider: https://gist.github.com/sondr3/76922596f42203f13bd2. I get it working if I uncomment the self.source_root and instead of using Dir.foreach just do copy_file manually for each file in the folder, but it's pretty cumbersome. Don't really know what makes it go tits up when I change it
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Channel6 has quit [Quit: Leaving]
alkoma has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
sorbo_ has joined #ruby
TgMts has quit [Read error: Connection reset by peer]
cpt_yossarian has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
<sorbo_>
anyone seen the jasmine gem throw “Uncaught ReferenceError: jasmine is not defined” for no discernible reason?
<sorbo_>
I have two projects with seemingly identical Rakefiles, spec_helpers, spec/javascripts/support/jasmine.ymls, &c
<sorbo_>
one works fine, the other throws that error
TgMts has joined #ruby
<zenspider>
sondr3: what is the value of template_dir when it is run?
<zenspider>
and does it actually exist?
gaboesquivel has quit [Remote host closed the connection]
<sondr3>
uh, how would I check that?
<zenspider>
you can `p` it right before the foreach
<sondr3>
ah, right, hang on
coder_neo has quit [Read error: Connection reset by peer]
sevvie has joined #ruby
sevvie_ has joined #ruby
crueber has quit [Quit: Leaving.]
hephaestus_rg has quit [Ping timeout: 244 seconds]
<sondr3>
Okay, I get it to show the right directory by using "File.expand_path("../scaffold", File.dirname(__FILE__))", but then it just gives a "Could not find "config.yml" in any of your source paths. Please invoke Ikebana::Scaffold.source_root(PATH) with the PATH containing your templates. Currently you have no source paths."
hamakn has joined #ruby
hamakn has quit [Remote host closed the connection]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
arup_r you have weird strange kind of questions :-)
lessless has joined #ruby
<shevy>
oh
<ponga>
DLSteve:
<shevy>
I see, you answered a weird question
<ponga>
that's what every assailant says in the court
<DLSteve>
ponga, ?
<ponga>
java isn't bad
<ponga>
it just did not suit you well
sevenseacat has joined #ruby
<ponga>
it hurt me anyway
<ponga>
:P
<DLSteve>
If you have never read it how can you say it is bad?
Photism has quit [Read error: Connection reset by peer]
Photism_ has joined #ruby
<ponga>
actually my first programming exprience was java
<ponga>
perhaps you misread my words
<shevy>
java is bad because it is so verbose
<DLSteve>
Eh, Java is a lot better than some of the other web languages out there. Just stay away from all the "enterprise" frameworks.
<shevy>
it masks its intent behind an outer layer of complexity
bronson has quit [Ping timeout: 245 seconds]
<DLSteve>
Eh, I guess. I program mainly in Objective-C so it actually is not that verbose to me >.>
<ponga>
haha
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
em0ral has quit [Remote host closed the connection]
<DLSteve>
Want to make an empty mutable string in Obj-C? "NSMutableString *output = [NSMutableString stringWithCapacity:13];"
mengu has joined #ruby
mengu has joined #ruby
<ponga>
omg
<ponga>
omg lol
josephndenton has joined #ruby
<shevy>
the [] part is ok
roshanavand has quit [Remote host closed the connection]
<ponga>
but then DLSteve, there are always people who want everything to be handled manually in depth
<shevy>
it's like an argument given to a method to an object here right DLSteve ?
<DLSteve>
shevy, correct. Obj-c does not have built in string functions so it has to use the foundation lib that provides NSString and NSMutableString.
ghostlines has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
<DLSteve>
As a string is just an array of chars you have to manually assign it a length for an empty string or you can run into out of bounds issues later.
<shevy>
yeah that was ok, it seemed better than plain C
<DLSteve>
You can do strings the C way if you want ;)
<DLSteve>
as Obj-C is just a superset of C
josephndenton has quit [Ping timeout: 244 seconds]
kasperti_ has quit []
<DLSteve>
It actually took some thing from small talk, like ruby did. So object actualy pass messages to eachother.
<DLSteve>
And typing is somewhat dynamic.
rbrs has joined #ruby
devoldmx has quit [Remote host closed the connection]
roshanavand has joined #ruby
<DLSteve>
So question, right now I am looking at backend languages. I tried out rails and did not like it as much (to opinionated for me.) and was wondering if anyone had experience with Sinatra?
nfk has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
<shevy>
DLSteve yeah sinatra is ok, quite simple. padrino is built on sinatra so it should be a bit closer towards rails
<DLSteve>
I mainly am looking for simple. Mainly for RESTFUL apis
<DLSteve>
I felt like I was fighting rail with the asset pipeline and how I wanted to do things.
<shevy>
hehehe
max96at|off is now known as max96at
dpy has joined #ruby
TgMts has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
yfeldblum has joined #ruby
jenrzzz has joined #ruby
<sevenseacat>
convention over configuration
<shevy>
cats over mice
<sevenseacat>
indeed.
haxr has quit [Ping timeout: 244 seconds]
charliesome has quit [Ping timeout: 272 seconds]
sinkensabe has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
chipotle has quit [Quit: cheerio]
teddyp1cker has joined #ruby
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sinkensabe has quit [Ping timeout: 264 seconds]
teddyp1cker has quit [Ping timeout: 252 seconds]
TgMts has joined #ruby
mostlybadfly has joined #ruby
dangerousdave has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
TheKruex has quit [Ping timeout: 240 seconds]
deuterium has joined #ruby
dcarmich has joined #ruby
<deuterium>
hi, is the ruby1.9.1 that ships packaged with debian stable (v7, wheezy) considered ruby 2 or ruby 1?
<sevenseacat>
its not ruby 2.
jheg has joined #ruby
<deuterium>
sevenseacat: so, just a late and very stable version of ruby 1?
<sevenseacat>
its ruby 1.9.whatever version the actual package is
<sevenseacat>
its late but possibly unsupported
iamninja has joined #ruby
<deuterium>
sevenseacat: so if a dev requires ruby 2, using debian packages is no option then, i guess
<sevenseacat>
you should have a ruby 2 package, but i wouldnt use packages for ruby anyway
kl has joined #ruby
<deuterium>
sevenseacat: hm.. i haven't found any ruby2 package on debian stable. maybe in testing or unstable, but that again is not suitable to setup stable server environments.
<deuterium>
sevenseacat: so, using rvm is advised?
TgMts has quit [Read error: Connection reset by peer]
<sevenseacat>
i'm amazed that it doesnt have ruby 2
<sevenseacat>
its been out for years
<deuterium>
and installing the whole tool chain through rvm.. i.e. ruby 2, rails, passenger, ..
<deuterium>
sevenseacat: it's debian ;)
<sevenseacat>
i dislike rvm greatly, but then again i know little about setting up production servers
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
coinr00k has joined #ruby
ponga has quit [Ping timeout: 264 seconds]
teddyp1cker has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
russt has joined #ruby
russt has quit [Client Quit]
mengu has quit [Ping timeout: 255 seconds]
josephndenton has joined #ruby
fantazo has quit [Quit: Verlassend]
bMalum has joined #ruby
tier has quit [Remote host closed the connection]
josephndenton has quit [Ping timeout: 264 seconds]
TheKruex has joined #ruby
davasaurous has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
Joufflu has joined #ruby
kapil__ has quit [Quit: Connection closed for inactivity]
felipedvorak has left #ruby ["Leaving"]
haxr has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
TheKruex has quit [Ping timeout: 252 seconds]
SilkFox_ has joined #ruby
beware_cougar has quit [Read error: Connection reset by peer]
Pupeno_ has joined #ruby
agrinb has joined #ruby
SilkFox_ has quit [Ping timeout: 240 seconds]
Pupeno has quit [Ping timeout: 245 seconds]
mjuszczak has joined #ruby
JDiPierro has joined #ruby
Porpado has joined #ruby
nicolastarzia has joined #ruby
davasaurous has quit [Remote host closed the connection]
agrinb has quit [Ping timeout: 244 seconds]
klaas has joined #ruby
iamninja has quit [Quit: ZZZzzz…]
davidhq has joined #ruby
russt has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
rkalfane has joined #ruby
strype has joined #ruby
jzigmund_ has joined #ruby
lsmola__ has joined #ruby
yfeldblum has joined #ruby
jzigmund has quit [Ping timeout: 265 seconds]
arup_r has quit [Read error: Connection reset by peer]
lsmola_ has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
Joufflu has quit [Ping timeout: 244 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 240 seconds]
jbw has quit [Ping timeout: 244 seconds]
gingitsune has quit [Ping timeout: 264 seconds]
TgMts_ has joined #ruby
gingitsune has joined #ruby
einarj has joined #ruby
TgMts has quit [Ping timeout: 244 seconds]
oo_ has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 240 seconds]
Pharaoh2 has joined #ruby
Pharaoh2 has quit [Client Quit]
C1V0 has quit []
Porpado has quit [Quit: Porpado]
kirun has joined #ruby
josephndenton has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DadoCe has joined #ruby
gingitsune has quit [Ping timeout: 245 seconds]
gingitsune has joined #ruby
agjacome_ has joined #ruby
josephndenton has quit [Ping timeout: 264 seconds]
agjacome has quit [Ping timeout: 244 seconds]
Fusl has quit [Max SendQ exceeded]
<epitron>
shevy: I tried padrino for a restful api project... It wasn't very good. It was like the worst of both Sinatra and rails
jeremywrowe has joined #ruby
<epitron>
Too much overhead, no convention
<epitron>
I had to read the padrino code far too often
bMalum has quit [Quit: bMalum]
bigkevmcd has quit [Ping timeout: 264 seconds]
jeremywrowe has quit [Client Quit]
<epitron>
What do the pros use for creating APIs now?
Pharaoh2 has joined #ruby
<epitron>
There must be some state of the art thing by now
jbw has joined #ruby
nicolastarzia has quit [Remote host closed the connection]
jeremywrowe has joined #ruby
bigkevmcd has joined #ruby
leafybasil has joined #ruby
jefus__ has joined #ruby
Fusl has joined #ruby
Pharaoh2 has quit [Client Quit]
Musashi007 has joined #ruby
jbw has quit [Ping timeout: 252 seconds]
danguita has joined #ruby
nyaa has joined #ruby
jefus_ has quit [Ping timeout: 240 seconds]
agrinb has joined #ruby
sevenseacat has quit [Remote host closed the connection]
<nyaa>
Is there a standard or generally considered best way to package a ruby application for distribution? I want a friend to be able to use it regardless of ruby installation.
<epitron>
havenwood: hmmm... what problem does this solve? It doesn't save you having to type out the while request path, since you have to do that in the comments, or you'll have no idea what is going on
<epitron>
Json generation is the other half of the problem
davedev24_ has joined #ruby
enebo has joined #ruby
<epitron>
Having a nice automatic mapping between the URLs and the database... Maybe with some declarative rules that says what fields should be accessible
<Maxino>
bye for now. go looking for a new, impenetrable password
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Maxino>
like hunter3 or so
<havenwood>
epitron: Sinatra-style regexp matching chokes as numbers of routes increase and Rails-style finite automata has initial overhead.
<pontiki>
o/
<pontiki>
happy saturday where it's saturday
mjuszczak has quit []
<havenwood>
pontiki: \o/
<havenwood>
Sat!
<epitron>
havenwood: chokes... Performance wise?
<havenwood>
epitron: Yeah
Maxino has quit [Quit: Leaving]
<epitron>
Ah
<havenwood>
epitron: has to go through every possible match
<waxjar>
sinatra looks up its routes in a list, roda "looks it up" in a tree
<epitron>
I made a thing for that actually
<epitron>
It's called rash - it's part of hashie now
<havenwood>
epitron: ah, nice
<epitron>
I bet there's a way of compiling a stack of regexes into a single automata
luizbafilho has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
metadave has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
leafybasil has quit [Remote host closed the connection]
DonOtreply has quit [Quit: DonOtreply]
JDiPierro has joined #ruby
Techguy305 has joined #ruby
sovreign has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Photism has joined #ruby
Abhijit has quit [Quit: Leaving]
bronson has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
jbw has joined #ruby
ghostlines has joined #ruby
ghostlines has quit [Max SendQ exceeded]
ghostlines has joined #ruby
coinr00k has quit [Quit: Leaving]
coinr00k has joined #ruby
D9 has quit [Read error: Connection reset by peer]
ghostlines has quit [Max SendQ exceeded]
ghostlines has joined #ruby
sinkensabe has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
diegoviola has joined #ruby
tus has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
Pharaoh2 has joined #ruby
lkba_ has joined #ruby
yfeldblum has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
mostlybadfly has joined #ruby
ammar_ has quit [Quit: leaving]
Sawbones_ has quit [Remote host closed the connection]
max96at is now known as max96at|off
nrcpts has joined #ruby
luizbafilho has joined #ruby
Sawbones_ has joined #ruby
dc_ has quit [Remote host closed the connection]
einarj has joined #ruby
naftilos76 has joined #ruby
dc_ has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
klmlfl has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
crueber has joined #ruby
lifenoodles has quit [Ping timeout: 245 seconds]
lifenoodles has joined #ruby
ponga has quit [Quit: Leaving...]
lifenoodles has quit [Ping timeout: 256 seconds]
russt has quit [Quit: russt]
oleo__ has joined #ruby
lifenoodles has joined #ruby
oleo__ has quit [Remote host closed the connection]
cpt_yossarian has joined #ruby
oleo has quit [Ping timeout: 252 seconds]
fedexo has joined #ruby
claw has joined #ruby
TheRinger has joined #ruby
oleo has joined #ruby
claw___ has quit [Ping timeout: 256 seconds]
bigmac has quit [Read error: Connection reset by peer]
leonmaia has joined #ruby
Joufflu has joined #ruby
meschi has quit [Remote host closed the connection]
alekst_ has joined #ruby
livathinos has joined #ruby
jenrzzz has joined #ruby
conniemj has quit [Read error: Connection reset by peer]
conniemj_ has joined #ruby
mleung has joined #ruby
Xeago has quit [Remote host closed the connection]
bigmac has joined #ruby
bigmac is now known as i8igmac
lifenoodles has quit [Ping timeout: 265 seconds]
defrang has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
crueber has quit [Quit: Leaving.]
conniemj_ has quit [Ping timeout: 255 seconds]
lifenoodles has joined #ruby
it0a has quit [Ping timeout: 240 seconds]
nrcpts has quit [Quit: (null)]
bronson has joined #ruby
wallerdev has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
dpy has quit [Ping timeout: 244 seconds]
bluOxigen has joined #ruby
kasperti_ has joined #ruby
apeiros has quit [Ping timeout: 265 seconds]
luizbafilho has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Akuma has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x77686d has joined #ruby
psy__ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
psy__ has quit [Client Quit]
psy_ has quit [Quit: Leaving]
luizbafilho has joined #ruby
bronson has joined #ruby
oetjenj has joined #ruby
ddd has quit [Quit: leaving]
sinkensabe has quit [Remote host closed the connection]
psy_ has joined #ruby
bMalum has joined #ruby
i8igmac has quit [Ping timeout: 256 seconds]
Hijiri has joined #ruby
dpy has joined #ruby
bigmac has joined #ruby
unreal_ is now known as unreal
lessless has joined #ruby
klmlfl has quit [Remote host closed the connection]
xxneolithicxx has joined #ruby
bigmac has quit [Ping timeout: 245 seconds]
slawrence00 has joined #ruby
gingitsune has quit [Ping timeout: 264 seconds]
<xxneolithicxx>
hi all, do you know if theres any existing gems that provide a structure to allow us to maintain a large array of integers as an array of consecutive integer ranges instead to save on memory (not looking to convert an existing array to an array of consecutive integer ranges but rather use a structure that does this dynamically as you add integers to it).
tekk has joined #ruby
pc_magas has joined #ruby
davidhq has joined #ruby
<Cat_1>
So you want to say like...
<pc_magas>
!pastebin
<Cat_1>
1..25?
lemur has joined #ruby
<pc_magas>
Fellows what pastebin do you use here?
<Cat_1>
If you want to supply a large amount of consecutive integer ranges you can just use the .. notation and store the first and last integer and let rails do the rest
<Cat_1>
we use gist
<Cat_1>
gist.github.com
<Cat_1>
hang on xxneolithicxx
<Cat_1>
let me write up a gist for you
<xxneolithicxx>
im going to be adding a large amount of integers to an array (right now its going up to like 4gb of ram) one integer at a time, I want it to add it to an internal array of integer ranges instead as it adds them so its not actually storing all the integers, just the start/end of ranges
<anitchrist>
if I have a script that requires another script (like httparty) whats the best and easiest way to turn it into an app? I tried platypus... but its not doing what I need it to
Timgauthier has joined #ruby
<anitchrist>
for some reason it fails at get.chomp() as well as I can't enter anything into the text window
ixti has joined #ruby
<anitchrist>
should I just start learning another language to make it? if so, which?
bluOxigen has quit [Ping timeout: 264 seconds]
TgMts has quit [Read error: Connection reset by peer]
_ixti_ has quit [Ping timeout: 264 seconds]
lifenoodles has quit [Ping timeout: 264 seconds]
mleung has quit [Quit: mleung]
TgMts has joined #ruby
pdoherty has quit [Ping timeout: 256 seconds]
Timgauthier has quit [Ping timeout: 256 seconds]
lifenoodles has joined #ruby
nateberkopec has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
kl has quit [Ping timeout: 252 seconds]
einarj has joined #ruby
scripore has joined #ruby
bonhoeffer has joined #ruby
TheRinger_ has joined #ruby
kl has joined #ruby
mrmargolis has joined #ruby
conniemj_ has joined #ruby
mquin has quit [Ping timeout: 610 seconds]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Heskie has joined #ruby
arup_r has quit [Quit: Leaving.]
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
<anitchrist>
lemme know, I'm up for learning other languages as well
<anitchrist>
aft, gotta walk the dog
* anitchrist
puts a leash on cerberus
n1lo has quit [Quit: Leaving]
ddd has joined #ruby
<speakingcode>
anitchrist: what do you 'turn it into an app' ?
<speakingcode>
like make it an executable package?
Alina-malina has quit [Read error: Connection reset by peer]
n1lo has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
n1lo has quit [Client Quit]
<speakingcode>
if that's what you mean, when you gem up a package you can specify executables that will get placed into a directory on $PATH so that if one instals the gem, the executables/binaries will be recognized commands in their shell
n1lo has joined #ruby
aoeu has joined #ruby
<aoeu>
Hello
Tricon has joined #ruby
<aoeu>
Do you know if there exists such a thing as a web ORM?
<speakingcode>
and re: depending on another script/package, you just set your dependencies in the gemfile and bundle will fetch them automatically if they aren't already available on the system
elfuego has left #ruby [#ruby]
JDiPierro has joined #ruby
<speakingcode>
aoeu: like an absrtraction of a REST interface?
<speakingcode>
i've not. there's another one i've used but i can't recall its name
<speakingcode>
her looks decent tho
<aoeu>
speakingcode: so you map the API to your objects, and then it works?
<aoeu>
Any downsides?
arya_ching has quit [Ping timeout: 244 seconds]
<speakingcode>
none that i'm aware of. could be issues with felxibility re: things at the network layer but i dunno, loks like a nice library so probably pretty decent
meschi has joined #ruby
DadoCe has quit [Remote host closed the connection]
<speakingcode>
i use REST abstractions of this sort in angular and backbone all the time w/o issue
tier has joined #ruby
LouisRoR has quit []
DadoCe has joined #ruby
xxneolithicxx has left #ruby [#ruby]
Tricon has quit [Ping timeout: 245 seconds]
ixti has quit [Ping timeout: 244 seconds]
alkoma has joined #ruby
LouisRoR has joined #ruby
wallerdev has quit [Quit: wallerdev]
tier has quit [Ping timeout: 244 seconds]
DadoCe has quit [Ping timeout: 244 seconds]
luizbafilho has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LouisRoR has quit [Client Quit]
meschi has quit [Remote host closed the connection]
<anitchrist>
speakingcode, yeah I want to make it an app for OS X, but I'd also like to make it an app for winblows, android and iOS as well
gccostabr has joined #ruby
kl has quit [Ping timeout: 264 seconds]
meschi has joined #ruby
gsd has quit [Read error: Connection reset by peer]
gsd has joined #ruby
<anitchrist>
speakingcode: I don't even know how to make gems yet... :sigh:
Sawbones has joined #ruby
mquin has joined #ruby
TripTastic has left #ruby ["Leaving"]
emmesswhy has joined #ruby
josephndenton has quit [Ping timeout: 265 seconds]
Hobogrammer has joined #ruby
ixti has joined #ruby
luizbafilho has joined #ruby
Alina-malina has joined #ruby
<anitchrist>
I'm gunna cross post into ##programming, just let you all know. I don't want to be reprimanded (kicked) again for it... ::cringes::
JohnBat26 has joined #ruby
LouisRoR has joined #ruby
jenrzzz has joined #ruby
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
rpag has quit [Quit: Leaving]
rpag has joined #ruby
aoeu has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
coinr00k has quit [Remote host closed the connection]
russt has joined #ruby
nathanielchannin has quit [Ping timeout: 265 seconds]
davidhq has joined #ruby
DadoCe has joined #ruby
mata has joined #ruby
sorbo_ has joined #ruby
sorbo_ has quit [Client Quit]
doodlehaus has joined #ruby
mata has quit [Client Quit]
livathinos has quit [Remote host closed the connection]
TgMts has quit [Read error: Connection reset by peer]
jack_rabbit has joined #ruby
jcomito has quit [Ping timeout: 264 seconds]
mata has joined #ruby
mata has quit [Remote host closed the connection]
TgMts has joined #ruby
DadoCe has quit [Ping timeout: 265 seconds]
Spami has quit [Quit: This computer has gone to sleep]
volsus has joined #ruby
Hijiri has quit [Ping timeout: 264 seconds]
gccostabr has quit [Quit: ZZZzzz…]
naftilos76 has quit [Remote host closed the connection]
fenzil has joined #ruby
dain_ has joined #ruby
ferr has joined #ruby
arescorpio has joined #ruby
pandaant has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 244 seconds]
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
LouisRoR1 has joined #ruby
fenzil has quit [Ping timeout: 240 seconds]
jarjar_prime has joined #ruby
LouisRoR has quit [Ping timeout: 264 seconds]
cpt_yossarian has quit [Ping timeout: 264 seconds]
LouisRoR1 has quit [Ping timeout: 255 seconds]
teddyp1cker has joined #ruby
lessless has joined #ruby
mleung has joined #ruby
livathinos has joined #ruby
fenzil has joined #ruby
JBreit has joined #ruby
doodlehaus has quit [Remote host closed the connection]
mleung has quit [Client Quit]
hephaestus_rg has joined #ruby
ixti has joined #ruby
mleung has joined #ruby
livathinos has quit [Ping timeout: 245 seconds]
rbrs has quit [Quit: rbrs]
mleung has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
kiyote23 has quit [Remote host closed the connection]
JDiPierro has joined #ruby
JBreit has left #ruby ["Leaving"]
bonhoeffer has quit [Ping timeout: 264 seconds]
kiyote23 has joined #ruby
bonhoeffer has joined #ruby
wallerdev has joined #ruby
lemur has quit [Remote host closed the connection]
kl has joined #ruby
zorak8 has joined #ruby
lemur has joined #ruby
JDiPierro has quit [Ping timeout: 252 seconds]
kiyote23 has quit [Ping timeout: 244 seconds]
nicolastarzia has joined #ruby
jespada has joined #ruby
socash has joined #ruby
echevemaster has joined #ruby
kl has quit [Ping timeout: 256 seconds]
kiyote23 has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
mleung has joined #ruby
leafybasil has joined #ruby
haxr has quit [Ping timeout: 244 seconds]
nicolastarzia has quit [Ping timeout: 265 seconds]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
linduxed has quit [Ping timeout: 244 seconds]
mleung has quit [Client Quit]
fedexo_ has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
anitchrist well, inside of your gem, you should always have a directory called lib/ - for tests, use test/, for executables use bin/
DadoCe has joined #ruby
<shevy>
and name_of_gem_file.rb at the base, in lib/name_of_gem_file.rb
<shevy>
because that is the file that gets called via: require 'name_of_gem_file'
centrx has joined #ruby
<anitchrist>
what about all the other requires in the script itself, it'll be able to figure that out on its own?
<bradland>
other requires?
<bradland>
a gem is just a package of ruby code, so all the standard rules apply
<shevy>
anitchrist yes, you can put them into that file, or call other files.
pengin has joined #ruby
<bradland>
if you need another lib, you require it like you normally would
<bradland>
your gemspec allows you to add dependencies on other librarys
<shevy>
anitchrist I usually like to call other files from there, like put things into a separate require/ subdirectory; other people like to dump all code into that name_of_gem_file.rb though
davidhq has joined #ruby
<shevy>
anitchrist for external dependencies you need to write the dependencies down
<shevy>
s.add_dependency 'kramdown'
lampd1 has joined #ruby
<shevy>
s.add_dependency 'coderay'
<shevy>
but that is the simple part
<shevy>
the hardest part is the description and the name of the gem :-)
DadoCe has quit [Ping timeout: 244 seconds]
<anitchrist>
lol
<anitchrist>
shevy as always sir you're a wealth of knowledge
<bradland>
are you trying to call a method using a string as the name?
<shevy>
ok this notation is not possible but you can build up the string you want before sending it into #{} anyway
<blizzy>
bradland, yes.
<bradland>
ok, you don’t need to do it that way
<bradland>
you can use Object#public_send()
mbug has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
<shevy>
why not .send
<bradland>
either or
<blizzy>
could you give an example of the format of it?
<bradland>
using public_send ensures you’re not calling private methods
<blizzy>
if the class name is Foo?
<blizzy>
and the function is Bar?
<shevy>
it's a method
Cache_Money has quit [Quit: Cache_Money]
<bradland>
Foo.public_send :bar, baz, qux
<bradland>
Blizzy: in ruby, functions are referred to as methods
<bradland>
and in general, methods should begin with a lowercase letter
<blizzy>
thank you, bradland.
<bradland>
sure thing
<bradland>
in my example, baz and qux are arguments to the bar method
nateberkopec has quit [Quit: Leaving...]
<frogsy>
I was just going to ask about a good guide/tutorial series on Jekyll, not anything technical or specific. I'm already familiar with Sinatra and Rails, just not sure how Jekyll operates. Do you basically just put logic within normal ERB templates and then run a command to render static files from that, or is there more to it?
bronson has quit [Ping timeout: 265 seconds]
<bradland>
frogsy: the jekyll docs are, IMO, exceptional.
<bradland>
they look good, and they actually make sense.
<bradland>
but yes, jekyll converts templates to static files
<bradland>
but just like any tool, it has some expectations
<bradland>
like where you’ll keep your files and such
<bradland>
it also has some tools for building blog sites
<bradland>
jekyll was (IIRC) built for blogs
einarj has joined #ruby
St1gma has joined #ruby
<frogsy>
bradland: interesting, I'll have a read of that. Cheers.
<bradland>
you bet
mary5030 has joined #ruby
mbug has quit [Ping timeout: 244 seconds]
claymore has quit [Quit: Leaving]
it0a has quit [Ping timeout: 244 seconds]
luizbafilho has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mbug has joined #ruby
mary5030 has quit [Remote host closed the connection]
<blizzy>
so, what would be the best way of doing this
mary5030 has joined #ruby
<blizzy>
I have a class named Commands, and the methods of it, some need arguments, some don't. I'm trying to call a method when someone uses the method name in chat
<blizzy>
like, for example, !foo
VBlizzard has joined #ruby
einarj has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
Blizzy
<shevy>
have you used .send
Sawbones has joined #ruby
<shevy>
can you show an example of this here with the IRC bot? you can invoke it through >>
<blizzy>
well, it's not an irc bot, it' for something named Pokemon Showdown.
<blizzy>
the problem is, is that some methods have arguments, some don't.
<bradland>
and how are you receiving chat messages?
StevenNunez has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
<bradland>
in general, you have to be *extremely* careful about proxying any chat messages directly to your API
beneggett has joined #ruby
<bradland>
i would build a chat command parser
<bradland>
it would look for a specific pattern in chat, and it would parse the line, splitting out the method name and the arguments
<bradland>
but i wouldn’t pass that directly to my API, i would use an intermediate lookup, so that I could control what gets passed, and what gets a “command not found” error
yfeldblum has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
<bradland>
so if you defined the commands !foo and !bar, but didn’t define !baz, anyone who put !baz would get a command not found error
bashusr has joined #ruby
DadoCe has joined #ruby
<shevy>
Blizzy have you looked at the example above with .send
bigmac has joined #ruby
<shevy>
put it into a separate method if you want to, you can call it freely through that and assemble the arguments before you send them to a specific method
atmosx has quit [Quit: Let him that would move the world first move himself. - Socrates]
<blizzy>
yeah.
<blizzy>
thanks for the help everyone.
sambao21 has quit [Ping timeout: 264 seconds]
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpt_yossarian has joined #ruby
banister has joined #ruby
pdoherty has joined #ruby
zorak8 has joined #ruby
sambao21 has joined #ruby
ferr has joined #ruby
simon` has joined #ruby
<simon`>
What do you think is the best Ruby template engine at the moment?
<bradland>
best is very subjective when it comes to templating engines.
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
icebourg has joined #ruby
dangerousdave has joined #ruby
<bradland>
some of our devs like haml, others really like slim
<simon`>
Since I haven't used any I would be interested in a short overview of the market ;-)
<bradland>
are you templating HTML, or something other than that?
jarjar_prime has joined #ruby
pdoherty has quit [Ping timeout: 255 seconds]
Sawbones has quit [Remote host closed the connection]
<simon`>
yes, HTML
<simon`>
It's gonna be a Sinatra Website
<bradland>
slim and haml are the two most popular
zorak8 has quit [Ping timeout: 265 seconds]
<bradland>
slim is similar to haml, but drops many of the symbols
<bradland>
which many people find aesthetically pleasing
roshanavand has quit [Ping timeout: 255 seconds]
<sweeper>
slim
<sweeper>
like slim cessna
<bradland>
you can basically pick one by looking at the template examples and choosing the one you like more
kiyote23 has quit [Remote host closed the connection]
sondr3 has joined #ruby
<bradland>
feature wise, i’m not sure someone could convince me of one over the other
<simon`>
bradland: Do you know a good ressource for template examples?
banister has quit [Read error: Connection reset by peer]
DadoCe has quit [Remote host closed the connection]
<bradland>
run through tutorial for both
<bradland>
there are a lot of examples
<bradland>
you can skim it, really
Sawbones has joined #ruby
yfeldblum has joined #ruby
<bradland>
a little ways in you’ll see some example code
<bradland>
the home page for slim has a nice example
athan has joined #ruby
<simon`>
ok, thank you. I will take a look
shock_one has joined #ruby
icebourg has quit []
pwh has quit [Ping timeout: 265 seconds]
Sawbones has quit [Remote host closed the connection]
jarjar_prime has quit [Quit: Sleep time.]
bashusr has quit [Read error: Connection reset by peer]
pwh has joined #ruby
Photism has joined #ruby
dc_ has quit [Remote host closed the connection]
Sawbones has joined #ruby
StevenNunez has quit [Remote host closed the connection]
checkit has joined #ruby
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vin` has joined #ruby
Sawbones has quit [Remote host closed the connection]
<simon`>
bradland: what do you think of erb by the way?
dorei has joined #ruby
<bradland>
i use far more erb than anything else
iamninja has quit [Quit: ZZZzzz…]
<bradland>
because most of my templates aren’t for HTML
Tricon has joined #ruby
havenwood has quit [Remote host closed the connection]
<bradland>
i like it, but haml and slim are built specifically for HTML, so it results in a lot cleaner templates
<bradland>
i get kind of annoyed at some of the indentation rules sometimes though (when I have to use them)
<bradland>
it’s mostly a matter of familiarity though. if i used them more often, it’d be second nature.
<bradland>
erb basically lets you do whatever you want
<simon`>
ok, I see
<bradland>
haml and slim have a lot of conventions, but save you a lot of the <% %> mess associated with erb
bashusr has joined #ruby
<pontiki>
i like haml (and i'd like slim for the same reason) because it removes much of the clutter from writing html
<simon`>
So what other output formats are mostly generated by template engines? PDF, ...?
<pontiki>
and being able to mix in other languages easily is a boost as well
jaequery has joined #ruby
<bradland>
i do more sysadmin type stuff, so i output all kinds of things. configuration files mostly.
<pontiki>
CSS, XML, JSON...
<pontiki>
bradland: which ERB makes good use in
<bradland>
yep
<simon`>
oh I see. Didn't think you would need a template engine for generating json
<pontiki>
clients i'm working for right now seem to want to avoid ERB in any configuration files
<bradland>
i’m so glad i don’t have clients any more
<pontiki>
simon`: have a look at jbuilder
Sawbones has joined #ruby
codecop has quit [Remote host closed the connection]
jaequery has quit [Client Quit]
m8 has quit [Quit: Sto andando via]
kevr has left #ruby ["WeeChat 1.0-dev"]
<bradland>
there’s almost always a better tool than erb
<bradland>
erb is just so flexible
<pontiki>
also when using JSON views to respond to requests in Rails, makes total sense to use ERB there
<bradland>
it’s like string interpolation
<pontiki>
string interpolation that includes string interpolation :D
Sawbones has quit [Remote host closed the connection]
sankaber has joined #ruby
jaequery has joined #ruby
nicolastarzia has joined #ruby
<bradland>
if you’re in control of the specification, you can often just call to_json on your object
bashusr has quit [Read error: Connection reset by peer]
Sawbones has joined #ruby
<pontiki>
often, yes
Xeago has joined #ruby
<pontiki>
presuming you and a single object that containts all the attributes you need to respond with
<pontiki>
good grief
<bradland>
and none of the attributes you don’t want! lol
<pontiki>
presuming you *have* a single object that contains all the attributes you need to respond with
<pontiki>
serializers ftw
fedexo__ has joined #ruby
fedexo_ has quit [Read error: Connection reset by peer]
Sawbones has quit [Remote host closed the connection]
<pontiki>
"they're too complicated"
<pontiki>
*sigh*
Sawbones has joined #ruby
<pontiki>
"i don't want to introduce another model"
<pontiki>
*sigh*
nicolastarzia has quit [Ping timeout: 256 seconds]
sankaber has quit [Read error: Connection reset by peer]
bashusr has joined #ruby
banister has joined #ruby
sankaber has joined #ruby
Heskie has quit []
Heskie has joined #ruby
<shevy>
"my fingers hurt from all the typing"
<shevy>
*sigh*
JDHankle has quit [Quit: awe shucks]
Sawbones has quit [Remote host closed the connection]
<shevy>
oh wait
<shevy>
that was XML
rajeshchawla has joined #ruby
defrang has quit [Quit: defrang]
<pontiki>
you typed out XML by hand??
<bradland>
heh
<bradland>
at one point, that was supposed to be everyone’s future
Sawbones has joined #ruby
<pontiki>
indeed
Tricon_ has joined #ruby
checkit has quit [Quit: (null)]
mary5030 has joined #ruby
<shevy>
all my video collection used to be in XML
<shevy>
<video>
<shevy>
<name>
<simon`>
bradland: Do you know of a tutorial for slim?
<shevy>
<genre>
JDHankle has joined #ruby
<shevy>
hmm and lots more tags there
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]