<NinoScript>
I think I have a better way to describe what I want to do
<NinoScript>
def a(first, second:, third:'default') p method(__method__).parameters end; a 1, second:2
<NinoScript>
that prints: [[:req, :first], [:keyreq, :second], [:key, :third]]
<NinoScript>
I’d like to modify that, and add required arguments dynamically
<NinoScript>
does it make sense if I say it like that? (english is not my native language, so it’s kinda hard to express myself)
crudson has quit [Quit: Leaving.]
mykoweb has quit [Remote host closed the connection]
marr has quit [Ping timeout: 258 seconds]
mykoweb has joined #ruby-lang
nofxx has quit [Remote host closed the connection]
mykoweb has quit [Ping timeout: 252 seconds]
symm- has quit [Ping timeout: 255 seconds]
elia has quit [Quit: Computer has gone to sleep.]
arrubin has joined #ruby-lang
toastynerd has joined #ruby-lang
dik_dak has quit [Quit: Leaving]
kitak_ has joined #ruby-lang
pixelhandler has quit [Quit: pixelhandler]
<NinoScript>
in Ruby 2.1.1, is there a better way than `method(__method__).parameters.each {|type, name| p eval(name.to_s)}` to get all arguments as an array/hash?
D9 has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
<havenwood>
NinoScript: i'm not quite sure i understand what you're getting at, but maybe a **arg?
<NinoScript>
havenwood: **arg will just get the “extra arguments”, you’re cheating here: [first, hash]
<NinoScript>
havenwood: I’m playing with metaprogramming, so I’m trying not to know the names of the arguments
<havenwood>
NinoScript: i just put the Array in there to show the return results, didn't know that was required
nathanstitt has joined #ruby-lang
<havenwood>
NinoScript: ah, i think i misunderstood what you wanted
hybristic has quit [Remote host closed the connection]
<havenwood>
NinoScript: ah, okay just reread and i get what you're asking
<NinoScript>
:)
Wardrop has quit [Quit: Wardrop]
<havenwood>
NinoScript: an aside, but i was playing a while back with getting a method to report the arity range for arguments it will accept: https://gist.github.com/havenwood/9163507
toastynerd has quit [Remote host closed the connection]
<havenwood>
NinoScript: also uses #parameters
willmarshall has joined #ruby-lang
<NinoScript>
havenwood: the closest I could get to what I wanted was with this:
<NinoScript>
def arguments(m, b) method(m).parameters.map {|type, name| {type:type, name:name, value:b.eval(name.to_s)}} end
mikecmpbll has quit [Quit: ciao.]
<NinoScript>
and then I use it like this: arguments __method__, binding
thomasxie has joined #ruby-lang
cnivolle_ has joined #ruby-lang
willmarshall has quit [Ping timeout: 276 seconds]
alexju has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 252 seconds]
<NinoScript>
havenwood: metaprogramming is hard, but fun
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
<ljarvis>
if you cook onions in the batter and wrap the sausage in bacon, it increases the awesome
<maloik>
I'm going to stop reading this
<maloik>
can't handle the deliciousness
<ljarvis>
another funny name: spotted dick
<Nilium>
I'm going to sleep early so breakfast time comes sooner and I can make my scrambled eggs and spam
<Nilium>
Also people who don't like spam are wrong and I hope a colossal pillar of wasp eggs crushes them to death.
<elia>
yorickpeterse, I'll watch the TDD show, sounds like fun (it's a show!), 'course TDD-cult is the problem (it's a cult on programming techniques!) ;)
thmzlt has quit [Ping timeout: 252 seconds]
minivan has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
dennus has quit []
dennus has joined #ruby-lang
<yorickpeterse>
ljarvis: heh, we only have boring stuff like "hutspot"
<yorickpeterse>
it's mashed potatoes + some other things
<Nilium>
Guys, TDD is 100% dead, this vlogger with like a million subscribers said so therefore he must be right.
sepp2k has quit [Quit: Leaving.]
<mikecmpbll>
'tis.
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
banister has joined #ruby-lang
sssczy has quit [Ping timeout: 240 seconds]
Cakey has quit [Ping timeout: 255 seconds]
knu has joined #ruby-lang
symm- has quit [Ping timeout: 255 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
dennus has quit []
bruno- has joined #ruby-lang
MartynKeigher2 has quit [Read error: Connection reset by peer]
[spoiler] has joined #ruby-lang
agrinb has joined #ruby-lang
robmiller has joined #ruby-lang
agrinb has quit [Ping timeout: 276 seconds]
timmmaaaayyy has quit [Read error: Connection reset by peer]
<maloik>
Nilium: I don't get how spam can be nicer than a proper piece of "normal" ham
<Nilium>
It's not, it's just not bad either.
havenwood has quit [Remote host closed the connection]
<maloik>
I've never had it, I don't think you can easily get it over here... but to me it looks like opening a can of cat food
VictorBjelkholm has joined #ruby-lang
havenwood has joined #ruby-lang
<Nilium>
Opening anything canned looks like opening a can of cat food.
timmmaaaayyy has joined #ruby-lang
<Nilium>
Y'know, seeing as they're canned things.
<maloik>
fair enough... I guess that's why I don't buy canned goods, except for something like canned pineapple, tomatoes from time to time, ..
minivan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<[spoiler]>
I love canned pineapple compote!
<ljarvis>
spam is really not that good
<ljarvis>
it's okay, and it lasts like a thousand years so you can leave it in the cupboard, we used to take it camping, incase something stopped us from being able to cook real food
<yorickpeterse>
have you not watched Bear Grills?
<yorickpeterse>
(yes I know it's Grylls)
<yorickpeterse>
You're supposed to eat poop while camping
<yorickpeterse>
lots of it
<ljarvis>
I only do that if I don't have spam
MartynKeigher has joined #ruby-lang
* yorickpeterse
never had spam
<yorickpeterse>
well
<yorickpeterse>
the food thing
<yorickpeterse>
plenty of spam in my Gmail
<ljarvis>
the food is about as pleasant
<Nilium>
It tastes fine.
<ljarvis>
Call me a cynic, but I like my meat real
<Nilium>
What is the difference between real meat and spam?
<ljarvis>
one is real and one is spam
<ljarvis>
c'mon keep up
<surrounder>
lol
<Nilium>
Spam's meat, so what's the difference between real meat and meat?
alexju has joined #ruby-lang
<yorickpeterse>
one is edible
<yorickpeterse>
the other one will potentially set you down a few thousand bucks
<ljarvis>
spam is filled with potato starch and salt
<yorickpeterse>
* set back
<ljarvis>
if the meat percentage of meat is not 100%, it is not meat
<Nilium>
True, real meat needs to be cooked, so I guess it's not edible by default
<ljarvis>
no
<Nilium>
Ok, so if you put meat in a dish, it ceases being meat?
<Nilium>
So spam's meat then.
<ljarvis>
it becomes meat + something
<Nilium>
Is meat loaf meat? I mean, it sort of seems like a given, since it's got meat in the name, but maybe it isn't and we've been lied to? Maybe hamburger isn't meat. It doesn't have meat in the name...
<Nilium>
So spam is, in fact, meat.
<ljarvis>
spam has meat in it
<ljarvis>
like hamburgers does
<Nilium>
It just contains preservatives and whatnot.
<Nilium>
So you don't like hamburgers?
BucOder has joined #ruby-lang
<maloik>
okay hold on now
<maloik>
I think tons of people "like hamburgers" in the sense that they can crave junk food every once in a while
<ljarvis>
I like freshly cooked hamburgers, not burgers that have been pre-cooked and let in a can for years with preservatives
<maloik>
but a hamburger isnt necessarily terrible meat, quite the opposite
<Nilium>
If you say you don't like hamburgers, I will hit you with a fish
BucOder has quit [Client Quit]
alexju has quit [Ping timeout: 276 seconds]
<ljarvis>
if you cook a hamburger and then stuff it in a can, fill it with preservatives and give it to me some time later, it is no longer a hamburger
<maloik>
there's a difference between saying "I can eat mcdonalds and sometimes crave it" vs "i think mcdonalds is real nice"
<maloik>
s/mcdonalds/spam as you like
<Nilium>
Spam's not terrible meat either. It's just meat. The issue is taste, which not everyone likes, same as not everyone likes to eat caviar or not everyone likes to eat walnuts (they're wrong).
<Nilium>
Not really, since McDonalds is probably provably worse foryou
<ljarvis>
my issue is that I like fresh meat
<ljarvis>
I have no doubt spam is better than mcdonalds
<ljarvis>
by like 10000%
minivan has joined #ruby-lang
<ljarvis>
I'm saying, like mcdonalds, spam doesn't even come close to real fresh meat on my plate
timmmaaaayyy has quit [Ping timeout: 250 seconds]
<Nilium>
Well, I also take issue with "fresh meat"
<Nilium>
I think the best way to put it is just, "I don't like the way Spam tastes."
<ljarvis>
s/better/healthier/
<Nilium>
Definitely.
<toretore>
bigmacs are made from 100% pure beef
<ljarvis>
LOL
<[spoiler]>
"<Nilium> Spam's meat, so what's the difference between real meat and meat?" Sadly, we don't get real meat emailed to us :(
<Nilium>
toretore: That's a good one.
<Nilium>
And I'm sure taco bell is made from real beef and not flavored styrofoam
<toretore>
http://en.wikipedia.org/wiki/Big_Mac "It consists of two 1.6 oz (45.4 g) 100 per cent beef patties, American cheese, "special sauce" (a variant of Thousand Island dressing), iceberg lettuce, pickles, and onions, served in a three-part sesame seed bun."
<maloik>
it's on the internet so it must be true
<[spoiler]>
toretore: *coughs importantly* not everything on the internet is true
<yorickpeterse>
His typing style also changed, even when it appears to be semi serious
* yorickpeterse
is a part-time detective
<ljarvis>
that was 22 days ago
<ljarvis>
the good old days
<oddmunds>
"X Failed - The Travis CI build failed" <-- maybe this drove him over the edge
<ddv>
someone just hacked his github account
<Nilium>
Maybe he just did a lot of drugs and is going to come out of it soon and wonder what the holy fuck possessed him
stamina has joined #ruby-lang
<ljarvis>
he's been doing a lot of drugs for years
<Nilium>
And then convert to extreme, hardcore fundamentalist christianity because he doesn't know what the hell
<Nilium>
*lot more
BucOder has joined #ruby-lang
<Nilium>
I don't know the guy, I have to assume he's reasonably sane on a normal day
<yorickpeterse>
ddv: No, he wouldn't come here under the same nick from the same home network he usually connected from
<yorickpeterse>
He used to be a pretty cool guy
<ljarvis>
I vote banister goes and bangs down his door
workmad3 has joined #ruby-lang
<yorickpeterse>
banister already said "lol not my job"
<yorickpeterse>
can't blame him
<ljarvis>
nope he's right
<yorickpeterse>
brb lunch
<Nilium>
I stay off in my little unpopulated area of Ruby stuff where I do GL crap and nobody comes near because it's not web dev
<ljarvis>
yorickpeterse: is it toad in the spam?
workmad3_ has quit [Ping timeout: 255 seconds]
<Nilium>
Call the cops on him and say there's a disturbance in his brain and it's leaking out into the real world?
<ljarvis>
so I have to debug an html email that displays fine in all clients except iPhone mail.app, where's it's absolutely fucked
<ljarvis>
and I have no idea how to debug this
kyb3r_ has quit [Read error: Connection reset by peer]
<workmad3>
Nilium: one of these days, I'll join over there in GL land... just seem to always have web dev stuff to do though :(
<Nilium>
You debug it by telling them to use plaintext
<Nilium>
For shame, you web dev people, for shame.
* Nilium
says while simultaneously crashing something so hard it drags down half the window manager
ryotarai has quit [Ping timeout: 245 seconds]
<Nilium>
But only half!
<workmad3>
Nilium: so you have half a screen of stuff still... useful! :D
ryotarai has joined #ruby-lang
<oddmunds>
johnny stopped his destruction and is now creating
<Nilium>
I meant it as a joke, but I have at times managed to do weird things that caused a handful of windows from different processes to stop compositing correctly.
yann_ck has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Nilium>
It actually worried me for a while 'cause I thought it might be the GPU frying itself.
rahul_j has quit [Quit: rahul_j]
BucOder has quit [Quit: Computer has gone to sleep.]
valeri_uF0 has joined #ruby-lang
amerine_ has joined #ruby-lang
miqui_ has joined #ruby-lang
mahlon_ has joined #ruby-lang
PaulePan1er has joined #ruby-lang
snk_ has joined #ruby-lang
ec_ has joined #ruby-lang
wmoxam_ has joined #ruby-lang
Muz_ has joined #ruby-lang
<Nilium>
I have to admit that, as insanity goes, r0bgleeson's is very boring..
<imperator>
i read the manual and nod my head and move on
<imperator>
banisterfiend, oh, it's from a railscast? ok
toastynerd has joined #ruby-lang
<banisterfiend>
imperator typo*
<imperator>
yep
cnivolle_ has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby-lang
sarkyniin has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
Squarepy has quit [Remote host closed the connection]
dknox_bbib is now known as dknox
dennus has joined #ruby-lang
amsi has joined #ruby-lang
ratmav has joined #ruby-lang
SilkFox has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
toastynerd has joined #ruby-lang
jeff_r has joined #ruby-lang
saarinen has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
BucOder has quit [Quit: Computer has gone to sleep.]
jeff_r has quit [Remote host closed the connection]
imperator has quit [Ping timeout: 265 seconds]
djbkd has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
toastynerd has quit []
toastynerd has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
Coincidental has joined #ruby-lang
Squarepy has joined #ruby-lang
ari-__-e is now known as ari-_-e
workmad3 has quit [Ping timeout: 255 seconds]
thang_ has quit [Ping timeout: 252 seconds]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
Cakey has joined #ruby-lang
jeff_r has joined #ruby-lang
gregf_ has quit [Ping timeout: 252 seconds]
arrubin has joined #ruby-lang
<yorickpeterse>
banisterfiend: Secondlife still exists?
<banisterfiend>
yorickpeterse yap
<yorickpeterse>
why the fuck do you play Secondlife?
mykoweb has joined #ruby-lang
<banisterfiend>
yorickpeterse i dont really, but i ordered an oculus rift dk2, so it might make SL interesting again
<hybristic>
there is a port of the original Zelda available for the Rift
<yorickpeterse>
banisterfiend: hahaha
ratmav has quit [Quit: Leaving]
cnivolle has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
mehlah has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
VTLob has joined #ruby-lang
toastyne_ has joined #ruby-lang
guns has quit [Quit: guns]
mykoweb has quit [Remote host closed the connection]
dennus has quit []
mykoweb has joined #ruby-lang
thang_ has joined #ruby-lang
digs has joined #ruby-lang
digs is now known as Guest82324
toastyne_ has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mykoweb has quit [Ping timeout: 240 seconds]
jsullivandigs has quit [Ping timeout: 240 seconds]
sferik has joined #ruby-lang
toastynerd has joined #ruby-lang
Cakey has quit [Ping timeout: 250 seconds]
mehlah has quit [Quit: Leaving...]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeff_r has quit []
djbkd has quit [Remote host closed the connection]
enebo has joined #ruby-lang
djbkd has joined #ruby-lang
Xzyx987X has joined #ruby-lang
mahlon__ has joined #ruby-lang
mahlon_ has quit [Ping timeout: 258 seconds]
mikecmpbll has quit [Ping timeout: 258 seconds]
ryotarai has quit [Ping timeout: 258 seconds]
ryotarai_ has joined #ruby-lang
ryotarai_ is now known as ryotarai
Xzyx987X_ has quit [Ping timeout: 258 seconds]
saarinen has quit [Quit: saarinen]
mahlon__ is now known as mahlon
mikecmpbll has joined #ruby-lang
bjh13 has quit [Ping timeout: 258 seconds]
|jemc| has quit [Quit: WeeChat 0.4.2]
ascarter has quit [Ping timeout: 258 seconds]
kitak_ has quit [Remote host closed the connection]
bjh13 has joined #ruby-lang
Missphoenix has quit [Quit: Leaving]
Miphix has joined #ruby-lang
Bwild has quit [Ping timeout: 258 seconds]
|jemc| has joined #ruby-lang
ascarter has joined #ruby-lang
Bwild has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
metus_violarium has joined #ruby-lang
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
btiefert has quit [Ping timeout: 258 seconds]
sepp2k has joined #ruby-lang
<metus_violarium>
Hello. Does somebody know, is it normal to use inversion of control in ruby?
ascarter has joined #ruby-lang
btiefert has joined #ruby-lang
omosoj has joined #ruby-lang
loincloth has joined #ruby-lang
mechanize has joined #ruby-lang
saarinen has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
D9 has joined #ruby-lang
BucOder has joined #ruby-lang
momomomomo has joined #ruby-lang
<wallerdev>
metus_violarium: for what purpose?
<wallerdev>
just modularity?
<metus_violarium>
yes
<metus_violarium>
one object should have another
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<metus_violarium>
I pass it outside or I create it in constructor
<metus_violarium>
what is the ruby-way?
<avdi>
metus_violarium: what you're describing sounds like simple dependency injection, not IoC. And I can't speak for the ruby way, but it's certainly my way :-)
<wallerdev>
theres nothing really special about either of those ways in ruby
<toretore>
yes, +1 for less coupling
<metus_violarium>
Hmm, thanks. It's easer to test.
relix has joined #ruby-lang
<metus_violarium>
And what do you do in such cases? Do you write unit-tests (with mocking) and integration test? or only integration tests? or only unit-tests?
<toretore>
duck typing is also your friend with dependency injection. "give me an object, and i'll call foo and bar in these circumstances"
AncientAmateur has joined #ruby-lang
<avdi>
metus_violarium: yes ;-)
<wallerdev>
yeah dependency injection isnt a big deal since theres no interfaces in ruby haha
<wallerdev>
just call what you want
<metus_violarium>
but it's better to test and to change code
MartynKeigher2 has joined #ruby-lang
<metus_violarium>
I guess
<metus_violarium>
In the fact, I'm PHP programmer but now I'm writting a gem :D
kukyakya has quit [Remote host closed the connection]
Coincidental has quit [Remote host closed the connection]
<centrx>
PHP is an abomination.
<metus_violarium>
And one more question please, do you use cucumber in integration tests?
<metus_violarium>
in functional. I mean
<whitequark>
hell no
<centrx>
cucumber is silly
<metus_violarium>
because I've seen a lot of gems which used it
<centrx>
The tests are written in English and then parsed with regex
<centrx>
metus_violarium, Most people use rspec or minitest
gregf has joined #ruby-lang
gregf is now known as Guest62010
<avdi>
cucumber has a very specific purpose: sharing vocabulary with non-programming stakeholders. If you don't need (or want) to do that, you don't need cucumber.
Coincidental has joined #ruby-lang
<centrx>
metus_violarium, The idea behind cucumber is that the customer/client can "write" the test, in English
<metus_violarium>
But it sounds convinient to write a text, to think about it, and after that write actual tests
<metus_violarium>
doesn't it?
<centrx>
metus_violarium, If that is how you best develop, sure, but the English sentences you think about don't need to be written into your code
<[spoiler]>
metus_violarium, idk. engsome English constructs don't always translate to code very well
agarie has joined #ruby-lang
mechanize has quit []
<metus_violarium>
and so, who uses cucumber?))
<avdi>
One fun middle ground, of sorts, is rspec-given by Jim Weirich. I'm using it in an app I'm developing. It gives RSpec (or minitest) a nice Given/When/Then structure but the steps themselves are written in Ruby.
<[spoiler]>
metus_violarium, Idk. avoid cucumber if you can. if you must, use it.I tried it once, didn't fancy it
<[spoiler]>
rspec is nice
<avdi>
metus_violarium: generally cucumber is a team decision. Consultants may use it to make sure they understand their clients' requirements, or a development department may use it to communicate with QA.
<avdi>
metus_violarium: if you're just developing a gem it doesn't make a lot of sense
<metus_violarium>
I tried too, and found it pain in neck, but I thought, something wrong with me
<toretore>
start with the basics
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore>
then move on to more complex things when you need them
<avdi>
I've worked with a QA guy who *loved* it as a way to describe the way the site *should* work when he discovered bugs. He'd write almost-gherkin descriptions of the behavior and we'd just massage it a tiny bit to be a running test. It was great for communication.
<avdi>
yeah, what toretore said.
chouhoul_ has joined #ruby-lang
<metus_violarium>
Im trying to write a gem, which will allow to walk through the dates in months in correct order: if first week day is Sunday, or Monday. Should days be printed in vertical or horizontal way. And group some collections by this days. Probably, something like that exists.
nertzy2 has quit [Ping timeout: 265 seconds]
<avdi>
probably, but it sounds like a fun exercise all the same.
fragamus has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
<metus_violarium>
So, are all of you Rails developers?)
toastynerd has quit [Remote host closed the connection]
<centrx>
metus_violarium, no, and some people even have a strong aversion to Rails
retro_ has joined #ruby-lang
<metus_violarium>
centrx: like you?)
<centrx>
I like Rails
relix has joined #ruby-lang
chouhoulis has quit [Ping timeout: 264 seconds]
<toretore>
rails is like cucumber: big and complex, and sometimes you don't need big and complex
|jemc| has quit [Quit: WeeChat 0.4.2]
|jemc| has joined #ruby-lang
<metus_violarium>
So, thank you a lot for advices
Silex has quit [Quit: WeeChat 0.4.3]
sepp2k has quit [Ping timeout: 255 seconds]
sepp2k1 has joined #ruby-lang
saarinen has quit [Quit: saarinen]
Silex has joined #ruby-lang
sferik has quit [Read error: Connection reset by peer]
<[spoiler]>
I don't have an aversion for Rails, but whenever I use it I can't help but think that it's overkill for my little project. I tend to avoid Rails for that reason. @cc metus_violarium, centrx, toretore
<metus_violarium>
And what do you prefer?
<[spoiler]>
metus_violarium, I use sinatra, if the thing is simple.
<[spoiler]>
However, I usually use ActiveRecord, regardless whether it's a rails app or a sinatra app; ActiveRecord is a godsend
jgpawletko has joined #ruby-lang
<[spoiler]>
I'd argue it's Rails' best feature :D
<centrx>
Yes that is another thing
<centrx>
You can use ActiveRecord or ActiveSupport without the rest of Rails
<centrx>
Both are useful for many different kinds of projects
imperator has joined #ruby-lang
retro_ is now known as retro|cz
AncientA_ has joined #ruby-lang
<metus_violarium>
But if you need activerecord, mailers, i18n and so on, maybe, it's better just to use Rails?
<[spoiler]>
metus_violarium, so far I had to send emails from my Ruby app only once
<[spoiler]>
I avoid sending automated emails; they annoy me and I'm sure they annoy plenty of other people (even if there's unsubscribe mechanisms)
jonathanmarvens has quit [Remote host closed the connection]
<centrx>
metus_violarium, Rails is a complete framework that has many useful, quality components.
AncientAmateur has quit [Ping timeout: 240 seconds]
<centrx>
metus_violarium, In many cases the alternative is to do a lot of research to find the right components elsewhere, and then glue them together
<centrx>
metus_violarium, Or to already be familiar with the ruby ecosystem
<[spoiler]>
Yeah, Rails is definitely nice, but more often than not, I probably don't use about 80% of Rails
<centrx>
metus_violarium, So it is very easy and reliable to choose Rails for a project to minimize design decisions and reduce code requirements
<metus_violarium>
and which test framework most developers a prefer?
postmodern has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcesariox has joined #ruby-lang
chouhoul_ has quit [Ping timeout: 276 seconds]
frzng has joined #ruby-lang
chouhoulis has joined #ruby-lang
nertzy has joined #ruby-lang
BucOder has quit [Quit: Computer has gone to sleep.]
<centrx>
metus_violarium, rspec and minitest are the two main ones
<centrx>
metus_violarium, minitest is more straightforward. rspec has more features
chouhoulis has quit [Remote host closed the connection]
tomkadwill has joined #ruby-lang
chouhoulis has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
jonathanmarvens has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
Fushi has quit [Quit: Connection closed for inactivity]
wallerdev has quit [Quit: wallerdev]
fragamus has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
omosoj has quit [Ping timeout: 240 seconds]
jgpawletko has quit [Quit: jgpawletko]
imperator has quit [Ping timeout: 250 seconds]
SilkFox has quit [Read error: Connection reset by peer]
saarinen has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BucOder has joined #ruby-lang
AncientA_ has quit [Remote host closed the connection]
hybristic has quit [Remote host closed the connection]
_ht has quit [Remote host closed the connection]
Burgestrand has joined #ruby-lang
spcshpopr8r has joined #ruby-lang
toastynerd has joined #ruby-lang
AncientAmateur has joined #ruby-lang
<spcshpopr8r>
I am experimenting with savon version 3, trying to provide "basic auth" configuration when instantiating a Savon.client, I understand according to the documentation http://savonrb.com/version3/http-configuration.html that this should be done with an adapter, I've read the spec, but I'm not sure how to create such an adapter, please help
sferik has joined #ruby-lang
saarinen has quit [Quit: saarinen]
skade has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
sferik has quit [Client Quit]
sferik has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
sferik has quit [Client Quit]
arBmind has joined #ruby-lang
enmand_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yalue has quit [Quit: Leaving]
sferik has joined #ruby-lang
relix has joined #ruby-lang
imperator has joined #ruby-lang
luiz_lha has quit [Read error: Connection reset by peer]
luiz_lha has joined #ruby-lang
luiz_lha has quit [Read error: Connection reset by peer]
Squarepy has quit [Quit: Leaving]
saarinen has joined #ruby-lang
wallerdev has joined #ruby-lang
saarinen has quit [Client Quit]
skade has quit [Ping timeout: 276 seconds]
elia has joined #ruby-lang
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
BucOder has quit [Quit: Computer has gone to sleep.]
loincloth has quit [Remote host closed the connection]
Coincidental has quit [Read error: Connection reset by peer]
omosoj has joined #ruby-lang
Coincidental has joined #ruby-lang
mehlah has joined #ruby-lang
saarinen has joined #ruby-lang
loincloth has joined #ruby-lang
shinnya has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
MartynKeigher2 has quit [Ping timeout: 245 seconds]
elia has joined #ruby-lang
sferik has joined #ruby-lang
sferik has quit [Client Quit]
kyb3r_ has joined #ruby-lang
BucOder has joined #ruby-lang
loincloth has quit []
miwood has quit []
ascarter has joined #ruby-lang
ascarter has quit [Read error: Connection reset by peer]
agarie has quit [Read error: Connection reset by peer]
ascarter has joined #ruby-lang
agrinb has joined #ruby-lang
<eam>
.sq deploying range-server
sarkyniin has quit [Quit: Quitte]
<eam>
er
<eam>
mischan
<bougyman>
there has to be a better way to do this:
<mus1cb0x>
i think the performance of ruby/rails has seemed to hurt its reputation over the past several years unfortunately. glad to see it improving!
<centrx>
I think speed is equivalent now with e.g. Python
<centrx>
Some things better some things worse
<mus1cb0x>
that's great!
<drbrain>
lots of GC improvements in 2.0 and 2.1, too
<mus1cb0x>
that's also very good news
<mus1cb0x>
and i saw there's a minimal framework option with sinatra now. that's a good companion to rails 'full feature'
<mus1cb0x>
:)
<havenwood>
mus1cb0x: there are some nice ones in addition to Sinatra, like NYNY, Hobbit, Cuba, Ramaze, Camping and Scorched - and that's just for Rack
dknox-bbib is now known as dknox
bjh13 has quit [Quit: leaving]
<mus1cb0x>
of those i've only heard of camping. lots changed in the time past :)
<havenwood>
mus1cb0x: oh, and one of the newest, Lotus
<xybre>
mus1cb0x: Sinatra doesn't comapre to Rails, maybe Padrino does, but Sinatra is a very different thing. Rails is slow, thats true.
<havenwood>
mus1cb0x: or something not even on Rack :O if you want a bleeding edge actor-based framework on a Ruby port of Erlang's webmachine, lattice: https://github.com/celluloid/lattice#readme
<xybre>
Yeah I hear Lotus was pretty neat.
<mus1cb0x>
erlang and webmachine are badass. checking out lattice now
workmad3 has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
apeiros has joined #ruby-lang
<mus1cb0x>
yea seems cool. that's the problem for me, they all seem cool in various ways so it becomes impossible for me to decide on an alternative to rails and use it
<mus1cb0x>
i don't know if it'll stick around, get traction, etc
<mus1cb0x>
and at least with rails there's always the plan b of the time investment, marketability
<xybre>
Don't worry about it, just build stuff.
<mus1cb0x>
tons of rails jobs
<havenwood>
mus1cb0x: tons of sinatra jobs too now
<ericwood>
what xybre said
<mus1cb0x>
well yea, i do. i was speaking in terms of the question of whether to leave rails for a different framework or not
<mus1cb0x>
havenwood: oh yea?
<ericwood>
if you want to play with something new, sure
<ericwood>
you can learn a lot from seeing other methodologies
<ericwood>
but don't do it to optimize marketability or whatever
<ericwood>
just build shit™
<xybre>
You should abolsutely build something in not-rails.
<ericwood>
agreed
<mus1cb0x>
i did. i stopped using rails in 07 and just started using pure ruby
<xybre>
And then build something fresh in Rails, jsut for the hell of it.
<mus1cb0x>
built a ton of stuff through 08
<mus1cb0x>
then i started learning C which has been awesome
<xybre>
A year of ruby from 6 years ago? The landscape is very different.
<ericwood>
rails has changed a bunch since then, probably be cool to dig back into it again!
<mus1cb0x>
yea seems to be
<mus1cb0x>
yea it'll be interesting to see how it's changed
<ericwood>
engines, asset pipeline, less suckiness
<ericwood>
:D
herpless has quit [Quit: Connection closed for inactivity]
<mus1cb0x>
my primary goal is to rapid build web apps now that i can do low level (C) and client (apple ios) to link in
<ericwood>
I'd just do rails, then, you'll have a ton to dig into
<mus1cb0x>
i don't really care if rails is slow as i figure hardware is cheap, and if i exceed hardware that means i've attained success
allomov has joined #ruby-lang
<ericwood>
yeah don't worry about that so much just yet...
<ericwood>
there's a lot you can do to make rails scale out
<ericwood>
not that it's some perfect scalable solution but it can be a workhorse if needed
<mus1cb0x>
so the 'good enough' trophy
<mus1cb0x>
(which carries much value)
yfeldblu_ has joined #ruby-lang
<ericwood>
haha yeah
<mus1cb0x>
it can use pgsql correct?
<mus1cb0x>
my db toolbox includes sqlite and pgsql
<xybre>
You can deploy Rails apps for free/cheap, worry about scale later.
<xybre>
Yeah Postgres works great with ActiveRecord.
nathanstitt has quit [Quit: I growing sleepy]
<mus1cb0x>
i'm setting up a freebsd box now i need for some static serving. is nginx, which i use for static serving, also good for rails serving?
danijoo has quit [Read error: Connection reset by peer]
<drbrain>
mus1cb0x: I think people use it to front puma/unicorn these days
<drbrain>
(I'm not big on rails, so I may be wrong)
<mus1cb0x>
unicorn? hah i have been gone a long time
danijoo has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
<mus1cb0x>
what's the background of the unicorn thing? i remember it was ponies or something before that
arooni-mobile has quit [Ping timeout: 252 seconds]
cstrahan has joined #ruby-lang
AKASkip has quit [Ping timeout: 250 seconds]
musl has quit [Quit: WeeChat 0.4.3]
musl has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
mykoweb has joined #ruby-lang
fezziwig has joined #ruby-lang
<robmiller>
random question: when writing about binary data it's common/universal to denote octal as e.g. \0173 and hex as e.g. \x7D. but what do people assume decimal to be? i've seen e.g. \123 but that doesn't seem universal like the others
ledestin has quit [Ping timeout: 240 seconds]
__butch__ has quit [Quit: Leaving.]
mykoweb has quit [Ping timeout: 245 seconds]
<robmiller>
obviously for a single value you might well just write e.g. 123. but for a string of them, \123\124\125 seems to work nicely
<eam>
robmiller: such escapes are generally representing the char C datatype so decimal doesn't make much sense
<zenspider>
rawr
<eam>
(in a string)
<eam>
with \xFF, you have exactly one byte
<zenspider>
robmiller: just pick one and stick to it?
<zenspider>
bringing up multiple representations for the same data just gets confusing
dik_dak has quit [Quit: Leaving]
<robmiller>
hmm. i'm trying to talk about character encodings for relative beginners, and decimal seems the obvious representation to pick for ease of understanding
sferik has joined #ruby-lang
<robmiller>
since i think an table showing decimal to character mappings in ASCII is about as simple as character encodings can ever be, conceptually
mykoweb has joined #ruby-lang
<robmiller>
(i might be wrong, though)
agrinb has joined #ruby-lang
<robmiller>
so i need to convey how the string "abc" in ASCII is actually, under the hood, three bytes represented in decimal as 97, 98, 99, but without being quite so verbose. i'd hoped i could say "\97\98\99" but perhaps not
<eam>
robmiller: you could avoid the string literal escape syntax entirely
<eam>
97.chr
<eam>
may more clearly illustrate the transformation of type
<workmad3>
robmiller: the 'simplest' character encoding would be the case-insensitive 'a = 1, b = 2, c = 3, ...' encoding ;)
<robmiller>
workmad3: ok ok, the simplest encoding that you're likely to encounter in the wild :P
ledestin has joined #ruby-lang
<workmad3>
robmiller: if you just needed to get people's head around the idea that you can use numbers to represent letters, I'd start with that ;)
skade has joined #ruby-lang
<robmiller>
yes that's a good point. i'm trying to talk about it in the abstract before diving into the ruby-specific stuff, so perhaps i could just outline a character encoding even simpler than ASCII to start off with
bantic has quit [Quit: bantic]
<workmad3>
robmiller: then, in the wild, you could probably argue that the GSM encoding used for SMS messaging is 'simpler' as it has fewer control characters and the like in it :)
<workmad3>
robmiller: but yeah, in practice, get people used to the idea that you can shift the representation around
nofxx has quit [Remote host closed the connection]
<robmiller>
thanks all, that's very helpful
<workmad3>
robmiller: then give them a string like '2117' and ask them to decode it maybe ;)
<workmad3>
robmiller: which brings you to the point of fixed-width encodings :)
<robmiller>
writing about subjects like this is a recipe for patronising those who know about it while still sailing miles over the heads of those who don't
engel has quit [Quit: Leaving]
<workmad3>
robmiller: yeah... that's why I'd suggest throwing stuff to the audience/participants to get them thinking
<workmad3>
robmiller: and also so you can gauge how well they've grabbed an idea
jonathanmarvens has joined #ruby-lang
<zenspider>
I'd just show what each thingy is, instead of obfuscating it via representation
<robmiller>
unfortunately this is pure writing, no audience, so i have no such luxury!
<workmad3>
robmiller: drats :D
<zenspider>
I was able to show you over IRC. that's writing.
<zenspider>
so I just got pinged into rewriting/replacing Struct with something a little less magical and more usable. Two ideas are: remove Enumerable (to_a shouldn't exist on struct), allow it to subclass other structs. Any other ideas?
toastynerd has quit [Remote host closed the connection]
<robmiller>
zenspider: yes definitely, i agree entirely re: obfuscation. my worry that i was obfuscating was why i asked, and it looks like i am! so i'll rework
<workmad3>
zenspider: it would be kinda nice, IMO, if you could include a module that provided the initializer based on attr_reader/writer/accessor macros that you'd declared
<workmad3>
zenspider: rather than inherit from 'Struct.new(:foo, :bar)'
<zenspider>
like: include Structable(:foo, :bar) ?
<zenspider>
I could get behind that too
yfeldblum has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<workmad3>
zenspider: I was thinking more 'class MyStruct; attr_accessor :foo, :bar; include Structable' and it picks up the :foo and :bar accessors
<wallerdev>
what would that do for initialize
<zenspider>
tho in my case, I'd be pretty happy with class MyThing < Struct.new(SuperStruct, :foo, :bar)
arrubin has quit []
<zenspider>
workmad3: problem is you're including something higher in the inheritence chain, so I'm not sure if it'd see the attrs
<workmad3>
zenspider: but I guess 'include Structable(:foo, :bar)' would be an easier implementation :)
michaeldeol has joined #ruby-lang
<zenspider>
yeah. cleaner for sure
<zenspider>
I'll play
<zenspider>
gotta wade through the struct tests first. they're... special.
andrewvos has joined #ruby-lang
andrewvos has left #ruby-lang ["WeeChat 0.4.0"]
yfeldblum has quit [Remote host closed the connection]