<neal__>
I've had a question up on Stack Overflow for about two three weeks now and have not received a response. Would you mind taking a look at the issue and see if you could help?
<itcharlie>
Hello. I am in search of Ruby / Rails open source projects that need contributors. Is there a site that has a list of Ruby projects looking for contributors?
DanKnox is now known as DanKnox_away
mneorr has quit [Ping timeout: 248 seconds]
<Nilium>
Not likely.
<Nilium>
You're better off just asking yourself what you want to do and doing it.
felixjet has joined #ruby
<Nilium>
Basically, find a problem.
felixjet_ has quit [Ping timeout: 264 seconds]
user____ has joined #ruby
[1]Woodsman has joined #ruby
zzak_ has joined #ruby
zzak_ has quit [Client Quit]
user____ has quit [Remote host closed the connection]
user____ has joined #ruby
burlyscudd has joined #ruby
zzak has quit [Quit: leaving]
zzak has joined #ruby
user____ has quit [Client Quit]
zzak has quit [Client Quit]
Solnse has quit [Ping timeout: 240 seconds]
zzak has joined #ruby
noname_ has joined #ruby
Woodsman has quit [Ping timeout: 256 seconds]
ravster has quit [Quit: Leaving.]
sepp2k1 has quit [Quit: Leaving.]
noname_ has quit [Remote host closed the connection]
[1]Woodsman is now known as Woodsman
<itcharlie>
Thanks Nilium.
moos3 has joined #ruby
rodacato has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 256 seconds]
wsterling has joined #ruby
DonRichie has quit [Quit: Verlassend]
RichardBaker has quit [Quit: RichardBaker]
yshh has quit [Remote host closed the connection]
<havenwood>
itcharlie: I'd certainly be happy to have a contribution to any of my projects: https://github.com/havenwood
cj3kim has quit [Remote host closed the connection]
sambao21 has joined #ruby
adeponte has quit [Remote host closed the connection]
<havenwood>
itcharlie: There are status-accepted RubyGems issues, but RubyGems isn't the easiest to contribute to.
burlyscudd has quit [Ping timeout: 256 seconds]
<havenwood>
itcharlie: Open Github Issues often welcome a Pull Request.
scarolan has quit [Quit: leaving]
freeayu has joined #ruby
greenleaf108 has joined #ruby
greenleaf108 has quit [Client Quit]
<itcharlie>
Thanks havenwood will take a look
<havenwood>
itcharlie: Any areas you are particularly interested in?
i_s has quit [Remote host closed the connection]
<itcharlie>
small bug fixes are a good start. I need some practice.
felixjet_ has joined #ruby
<Nilium>
I'd welcome patches to my stuff, but most of it is implemented in C, so it's probably terrifying.
hadees has quit [Quit: hadees]
<havenwood>
itcharlie: you can usually find bugs in just-released gems, the RubyGems Twitter feed is great for that
itcharlie has quit [Read error: Connection reset by peer]
tbrock has quit [Quit: Computer has gone to sleep.]
wsterling has quit [Ping timeout: 256 seconds]
scarolan has joined #ruby
<havenwood>
itcharlie: people even get their gem homepage wrong in the gemspec, tec
<havenwood>
etc*
<Nilium>
Weirdest one I've done is getting the rdoc title wrong.
scarolan has quit [Client Quit]
rodacato has joined #ruby
<Nilium>
Mostly because I just grab another gemspec of mine and rehash it.
<havenwood>
itcharlie: It is new and hasn't been popularized, but neat idea.
Zeeraw has joined #ruby
thibauts has joined #ruby
<itcharlie>
taking a look
nisstyre has joined #ruby
crashfocus has joined #ruby
zzak has quit [Quit: leaving]
henn has joined #ruby
henn has joined #ruby
henn has quit [Changing host]
zzak has joined #ruby
atno has joined #ruby
<crashfocus>
Hey, so I just finish learning the essentials and a bit more of Ruby
Woodsman has quit [Ping timeout: 276 seconds]
<itcharlie>
thanks havenwood
<crashfocus>
what should I do with it?
dankest has quit [Remote host closed the connection]
<ehc>
When a class is inherited Foo < Bar is there a way to call a method in Bar at that point in time which knows the child will be Foo?
babykosh has joined #ruby
<Nilium>
What are essentials? O_o
<havenwood>
crashfocus: Make a gem or two!
<Nilium>
ehc: You'd want to implement Class::included in the superclass.
<crashfocus>
haven wood, what gems should I make?
<Nilium>
crashfocus: What do you want to do?
staafl has joined #ruby
thibauts has quit [Ping timeout: 248 seconds]
<crashfocus>
That's the thing, I don't know…. I learned to code because I know it's necessary
<crashfocus>
thing is, I don't know what to do with it
<Nilium>
Sorry, not Class::included, Class::inherited
[1]Woodsman has joined #ruby
<Nilium>
Brainfart there.
<Nilium>
crashfocus: Want to make games? Commandline tools? Think of something you want to do.
<crashfocus>
Things to improve my workflow
felixjet has joined #ruby
<crashfocus>
I love applications like GeekTool
Kruppe has joined #ruby
felixjet_ has quit [Ping timeout: 276 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Nilium>
Well, find a weakness in your workflow and improve it.
<crashfocus>
Fair enough
<Nilium>
Granted, you might look at the problem and go "there's a better tool than Ruby for this"
<Nilium>
So don't try to force weird things.
<crashfocus>
What do you mean?
<havenwood>
Or do. :O
<Nilium>
Well, I do, but I also do bad things.
<havenwood>
ditto
<havenwood>
very bad things
<Nilium>
All of my work on getting GL working with Ruby is basically a compilation of "bad things you shouldn't do"
<havenwood>
tsk tsk
Es0teric has joined #ruby
<crashfocus>
Should I be scared?
thibauts has joined #ruby
Soopaman has joined #ruby
<Nilium>
Probably not.
<havenwood>
crashfocus: no :P
<crashfocus>
:D
<Nilium>
I haven't worn anyone else's skin in a few months. I think I kicked the habit.
<havenwood>
Sometimes my skin doesn't seem my own, but nope not wearing anyone elses.
[1]Woodsman has quit [Ping timeout: 276 seconds]
[2]Woodsman has joined #ruby
jonkri has quit [Quit: jonkri]
tobyo1 has quit [Ping timeout: 248 seconds]
<Nilium>
But yeah, if you ever want to make games, I'm working on making that .. more doable than before.
<ehc>
Nilium: inherited did the trick! Many thanks!!! :)
<Nilium>
The "before" was pretty shitty.
<Boohbah>
Nilium: libgosu?
<Nilium>
One of the things I meant by pretty shitty.
<Boohbah>
what are other shitty ruby game libs?
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
Soopaman has quit [Ping timeout: 248 seconds]
thibauts has quit [Ping timeout: 268 seconds]
Woodsman has joined #ruby
emergion has joined #ruby
cj3kim has quit [Remote host closed the connection]
<Nilium>
ruby-opengl/opengl/ruby-opengl2, no offense to the people sort of maintaining those for whatever reason. opengl3 is also kind of bizarre since it looks like it was written by someone who really, really likes Java.
thibauts_ has joined #ruby
joast has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
[2]Woodsman has quit [Ping timeout: 276 seconds]
intuxicated has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
<r0bgleeson>
no offense but your library is shitty
tkuchiki has joined #ruby
<Nilium>
There are also too many SDL bindings to say which one isn't bad, so I just operate under the assumption that they're all bad.
<Boohbah>
Nilium: i would never trust somebody who really likes java
Villadelfia has quit [Quit: Computer has gone to sleep.]
<Nilium>
r0bgleeson: No, no, I don't mean offense to the people who currently maintain it. The original author should feel bad, though.
<Nilium>
They should feel really bad.
intuxicated has joined #ruby
<Nilium>
Boohbah: I don't think the code for opengl3 itself is bad, but it's overcomplicated as heck.
superscott[8] has quit [Quit: superscott[8]]
thibauts_ has quit [Remote host closed the connection]
<Nilium>
I really have no idea why an OpenGL gem would have a factory class anywhere in it, but it does, or did.
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Nilium>
I think it might actually be frowned on to care about keeping your code nice and small so it fits in about 80 columns.
nari has quit [Ping timeout: 240 seconds]
<Nilium>
In Java, that is, just in case anyone who joined gets the wrong idea.
thibauts has quit [Ping timeout: 268 seconds]
blitz has quit [Quit: This computer has gone to sleep]
<zendeavor>
when your editor has to softwrap the code so you can see more than 1 file at a time is broken
<zendeavor>
the code is broken*
<zendeavor>
good thing every java programmer has autocompletion
<zendeavor>
i hope no one ever tried to use notepad.exe
kofno has joined #ruby
<Nilium>
When I was still a CS major, I saw people editing code in Word.
<Nilium>
I'll just assume that made everyone wince so hard that it probably incapacitated them for 5 minutes.
orionstein is now known as orionstein_away
i_s has quit [Ping timeout: 248 seconds]
Arya_ has quit [Ping timeout: 256 seconds]
rodacato has quit [Remote host closed the connection]
<zendeavor>
sorry i'm rewriting chruby to be less retarded
jonathanwallace has quit [Quit: WeeChat 0.4.0]
dubz has left #ruby [#ruby]
<zendeavor>
"just stick another if [[ "$(cat file)" == *text* ]] in it"
finges_ is now known as finges
finges has quit [Quit: WeeChat 0.4.1]
finges has joined #ruby
mercwithamouth has joined #ruby
jonathanwallace has joined #ruby
ffio_ has quit [Quit: WeeChat 0.4.1]
freerobby has joined #ruby
<zendeavor>
because `case' was too hard.
Arya_ has joined #ruby
guest71 has joined #ruby
thibauts has joined #ruby
guest71 has quit [Remote host closed the connection]
chxane has quit [Ping timeout: 268 seconds]
twoism has joined #ruby
dormiens has joined #ruby
invsblduck has quit [Changing host]
invsblduck has joined #ruby
sevenseacat has joined #ruby
jp- has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
codesoda has quit [Remote host closed the connection]
lebek has joined #ruby
hogeo has joined #ruby
guest260 has joined #ruby
mneorr has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
thibauts has quit [Remote host closed the connection]
yshh has joined #ruby
thibauts has joined #ruby
mary5030 has joined #ruby
<havenwood>
zendeavor: I'm glad you're reviewing chruby cause a lot of your changes looked really nice, more eyes the better, and settling on zsh/bash compatibly best-practice ain't easy.
<r0bgleeson>
zendeavor: go submit a pull request or write something better, but dont bitch about someone who has made more contributions to open source than you ever will
m00dy has joined #ruby
guest260 has quit [Read error: Connection reset by peer]
k610 has quit [Ping timeout: 276 seconds]
guest70 has joined #ruby
<zendeavor>
r0bgleeson: busy on it fella.
Mars` has quit [Ping timeout: 264 seconds]
<zendeavor>
sorry i messed up.
<havenwood>
patch ALL THE THINGS \o/
choobie has joined #ruby
choobie has joined #ruby
choobie has quit [Changing host]
<r0bgleeson>
im sorry but im offended by that, post modern is a stand up guy that spends most of his time contributing to open source, im sure case wasn't "too hard", he's not an idiot
iliketurtles has joined #ruby
<havenwood>
r0bgleeson: no doubt
<zendeavor>
that's fine, i love what he's done with this project
lebek is now known as plebek
<Nilium>
I doubt he needs you to defend his reputation or what have you because someone criticized his code.
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
freerobby has quit [Quit: Leaving.]
<r0bgleeson>
Nilium: he's not here to defend it, so I will. Don't like it? I don't give a shit.
<zendeavor>
but really, what exists currently is an awful mess
RichardBaker has joined #ruby
<zendeavor>
and i'm taking steps to remedy that
<Nilium>
I'm just saying, it's not a worthwhile effort. You don't need to be the dude's knight in shining armor.
<zendeavor>
don't like what i have to say? don't give a shit.
opus has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
zendeavor: Awful mess is relative. :O
thibauts has quit [Ping timeout: 240 seconds]
<r0bgleeson>
zendeavor: put your money where your mouth is and "remedy" it, til then you're just talking crap.
<Nilium>
What he says is irrelevant if he doesn't submit a patch, and if he does and it's accepted, well, you'll look the fool.
<Nilium>
He _said_ he's working on that. O-o
burlyscudd has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
<r0bgleeson>
sounds like a big design change
<r0bgleeson>
switch to case
<r0bgleeson>
should be amazing
baroquebobcat has quit [Quit: baroquebobcat]
<zendeavor>
i know right
<Nilium>
I can't tell if you're sarcastic or insane. O_o
<r0bgleeson>
Nilium: sarcastic.
<zendeavor>
stop your crying
<Nilium>
Either one is.. highly bizarre.
<r0bgleeson>
zendeavor is saying chruby is an absolute mess, and (so far) his only quote is the use of if instead of case.
nari has joined #ruby
<zendeavor>
this is, in fact, nearly a complete rewrite of the entire bash/zsh codebase
<r0bgleeson>
so make that patch, im sure chruby will be a totally different tool with your contribution?
m00dy has quit [Ping timeout: 268 seconds]
<Nilium>
It's like you're criticizing zendeavor for trying to improve the code in a small way and he's criticizing the code because he's looking at it and going "hey I'll improve this"
<Nilium>
Ok, now I'm convinced r0bgleeson is nuts.
<r0bgleeson>
im criticizing zendeavor for being an asshole, pretty much
<Nilium>
By being an asshole?
<r0bgleeson>
yes
<sevenseacat>
lol
<Nilium>
Pot kettle much?
<zendeavor>
i'm sure you never submitted a patch for a doc typo, or a poor variable name
<r0bgleeson>
zendeavor: sure i have
<zendeavor>
then shove it
<r0bgleeson>
but i didnt equate that to the project being a pile of shit
<zendeavor>
i'm certain that drastically changed the project you submitted that too, also
<jp->
i thought i had left the office and was sitting at my desk at home...
<Nilium>
I think you need to just take a break, r0b, 'cause you're acting really strangely here and digging yourself a hole
vikhyat has joined #ruby
<r0bgleeson>
i never claimed it was
<havenwood>
Nilium: he's not nuts at all, just not pleased with an awesome open source contributor being unduly criticized
<zendeavor>
i have every right to call it an awful mess -- it doesn't even adhere to its own contribution guidelines
<havenwood>
but yeah, zendeavor did submit a really nice patch to chruby - broken apart into chunks I'm sure it will add value
<Nilium>
So, in other words, money already where the mouth is
<zendeavor>
it doesn't even need to be in chunks. it's not helpful without the complete change
<r0bgleeson>
zendeavor: what guidelines does it break?
<zendeavor>
i just messed up a bit, unaware that there was a build system in place that i needed to pay mind to
<havenwood>
zendeavor: sure, but its got to not break tests and some of the changes are quite arguable - nice to have in chunks to be pullable
burlyscudd has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
<zendeavor>
the merge is clean
mercwithamouth has quit [Ping timeout: 276 seconds]
rodacato has joined #ruby
<Nilium>
At any rate, zendeavor was probably unnecessarily sarcastic -- which is a symptom of the internet, and r0bgleeson is overreacting and being an asshole -- also a symptom.
<zendeavor>
fair enough presumption
<havenwood>
you guys are all awesome, i'll drink to that :P
mklappstuhl has joined #ruby
<havenwood>
open source ftw
<r0bgleeson>
Nilium: yeah, to be honest I was offended by what he said because the person who wrote chruby dedicates himself to open source everyday, a cheap shot like that isn't fair and i wasn't going to let it go
<zendeavor>
no sense in getting panties in a wad because someone you'll never know has an ill tone
<Nilium>
Fair enough, I get your point of view on that and I don't think you meant anything bad by it, I just think the response was a little over the top
<r0bgleeson>
yes,it may have been
<havenwood>
chruby was lovingly crafted and style improvements will certainly be seriously considered
<zendeavor>
indeed
<Nilium>
So anyone, everyone just be excellent and whatnot.
<Nilium>
Except to people who really like JAva.
<zendeavor>
it wasn't a slight on the author anyway; i know better than to expect someone can write clean shell
<havenwood>
especially since what that means seams to be quite the moving target
<zendeavor>
thankfully i've got a grasp on it from prolonged exposure
chxane has joined #ruby
<Nilium>
I wrote a relational DB that uses the filesystem in bash. That was not a sane project.
<ehc>
I want to set a @var on a class but I'm doing it from another class. Which method should I use? klass.class_variable_set? I'm getting an error with it
<zendeavor>
Nilium: ouch
rovalent has joined #ruby
<Nilium>
I eventually rewrote it in ruby.
scarolan has quit [Quit: leaving]
<Nilium>
It's still pretty terrible.
Domon_ has joined #ruby
scarolan has joined #ruby
heftig has quit [Quit: Quitting]
thibauts has joined #ruby
rovalent has quit [Client Quit]
<zendeavor>
well at least ruby has some facilities for the task
<zendeavor>
or is at least a capable programming language.
staafl has quit [Ping timeout: 276 seconds]
chxane has quit [Read error: Operation timed out]
mansi_ has quit [Ping timeout: 264 seconds]
fuleo2 has quit [Remote host closed the connection]
fuleo has joined #ruby
guest70 has quit [Remote host closed the connection]
joast has joined #ruby
<r0bgleeson>
ehc: The method you are looking for instance_variable_set.
<ehc>
r0bgleeson: thanks, and specifically I needed :@var_name
<r0bgleeson>
cool
NealJ has joined #ruby
thibauts has quit [Remote host closed the connection]
thibauts has joined #ruby
Soopaman has joined #ruby
k-man has joined #ruby
<duper>
Kelet: excellent. thank you muchly.
<duper>
apeiros: I was looking at IPAddr from stdlib but it wasn't quite the holistic solution I was looking for.
cj3kim has joined #ruby
<duper>
Can anyone recommend rubygems that generates and scan for social media meta tags for HTML5?
thibauts has quit [Ping timeout: 248 seconds]
<duper>
Also, should I use String#encode to scan .rb files for UTF-8 chars so I don't get errors from the lack of # encoding: utf-8 or would another method be better?
DanKnox_away is now known as DanKnox
Chris-_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<duper>
just want to scan my own code and gems i have installed for utf-8 chars and display the filenames/line numbers
dhruvasagar has joined #ruby
nfk has quit [Quit: yawn]
Soopaman has quit [Ping timeout: 264 seconds]
<r0bgleeson>
duper: that usually isn't a problem, if you need to change the source encoding you'll know at runtime.
Soliah has quit [Ping timeout: 256 seconds]
<r0bgleeson>
File.read/String#encode isn't going to give you anything that trying to require it would?
i_s has joined #ruby
<duper>
r0bgleeson: ah, File.read gives the same error as running a script with utf-8 in it?
adeponte has joined #ruby
<r0bgleeson>
no
<r0bgleeson>
File.read doesn't parse your code
<r0bgleeson>
what are you trying to solve?
<duper>
i know that much
smathieu has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
<r0bgleeson>
usually you'd just require the code, see an error, and change the encoding
freerobby has joined #ruby
<duper>
is there a String method or some other method in the Ruby standard library that will detect a non-ASCII/non-UTF7/non-whatever-causes-errors without an encoding directive header comment
<r0bgleeson>
ascii_only?
<duper>
i want to find the exact location of the UTF-8 chars.. file.. line number and row (if possible)
<duper>
yeah, that's why i'd like a destructive operation to remoev it from the String's representing the line's
dhruvasagar has quit [Ping timeout: 264 seconds]
<duper>
(why i was thinking String#encode!)
chxane has joined #ruby
<r0bgleeson>
what are you encoding to?
radic_ has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
<duper>
either a representative ASCII equivalent or empty space
freerobby has quit [Ping timeout: 276 seconds]
arusso has joined #ruby
saarinen has quit [Quit: saarinen]
<r0bgleeson>
if you want to know if it could be UTF-8 or not, use ascii_only?
GeissT has quit [Ping timeout: 268 seconds]
<duper>
do you think it would be faster to s =
<r0bgleeson>
s = ?
saarinen has joined #ruby
<duper>
err.. s = ''; s << c # for each char that's not utf-8
<r0bgleeson>
how big is the string?
cj3kim_ has quit [Remote host closed the connection]
<duper>
or use each_char.with_index{|i| old[i]=' '} # like u were sayn b4
RichardBaker has quit [Ping timeout: 256 seconds]
sarkis has quit [Ping timeout: 276 seconds]
<r0bgleeson>
uhh i mean it'll work but i dont think it'll perform well, and the index won't be the line, it'll be a column in a line, so there's that.
<duper>
<= 80 chars but there are probably hundreds of thousands of them
twoism has quit [Ping timeout: 276 seconds]
<r0bgleeson>
well, that's not terrible, 80 iterations at a time, you could batch process
radic__ has quit [Ping timeout: 260 seconds]
brunoro__ has joined #ruby
Arya_ has joined #ruby
<r0bgleeson>
but this is all assuming there isn't a better solution
<duper>
maybe i'll just write it in C
<duper>
isn't there a way to write ruby methods in C
babykosh has quit [Quit: babykosh]
<duper>
i'll just use ctype.h isascii()
<r0bgleeson>
there is.. but, ruby isnt that terrible
<r0bgleeson>
we can iterate chars in strings
adeponte has quit [Remote host closed the connection]
<r0bgleeson>
and maybe its super fast
<r0bgleeson>
im just guessing its not
dhruvasagar has joined #ruby
<r0bgleeson>
you could filter/eliminate the strings you need to parse at all by calling ascii_only? first.
chxane has quit [Read error: Connection reset by peer]
<r0bgleeson>
so select the strings you actually care about.
<r0bgleeson>
now you've reduced it some more
<r0bgleeson>
and batch process if you need to do it faster
<bnagy>
isn't getting rid of all non-ascii a terrible idea?
<bnagy>
like, everyone's test cases are going to start failing
<r0bgleeson>
he just wants the line number and position of them
<r0bgleeson>
i think
iliketurtles has quit [Quit: zzzzz…..]
<duper>
String#each_byte is what i need
<bnagy>
no it's not
<r0bgleeson>
yes, it could work
<duper>
no?
<bnagy>
because that's bytewise
<r0bgleeson>
you could check if the byte is within a range i guess
<bnagy>
you want codepoints
<r0bgleeson>
ah no
<r0bgleeson>
it wont
<r0bgleeson>
bnagy is right
<duper>
oh, i see what you're saying
Spooner has quit [Quit: Leaving]
<bnagy>
just before you go on, you know that non-ascii string literals are completely fine, right?
<duper>
yah
<bnagy>
the magic encoding stuff is only for variables and things that uses utf-8
<duper>
you just change the encoding
<duper>
# encoding: utf-8
<r0bgleeson>
what do you plan to do with the line numbers?
<bnagy>
so if you're looking for stuff that might break things you should exclude literals
<r0bgleeson>
i guess i still dont understand what youre trying to do. are you sanitizing other people's code, and detecting if they need a source encoding?
<bnagy>
you don't need to have magic encoding just to be able to chuck oddly encoded strings around
<duper>
r0bgleeson: i'm going to keep a list of locations so i can go back and remove them if it's not possible on the fly
<duper>
depending on if it's more efficient to rewrite the same file or create a new one
<r0bgleeson>
i have a feeling code could break doing that
plebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<r0bgleeson>
why dont you just set the source encoding?
<r0bgleeson>
is there a reason it has to be removed
<duper>
r0bgleeson: is there a parser i can use to check if it's inside a string literal?
<r0bgleeson>
there are ruby parsers
<r0bgleeson>
but, ive never used them
<bnagy>
well the runtime is a pretty good one :)
<postmodern>
zendeavor, sorry i didn't accept your patch, but it changed too much and broke the tests (test/setup to be exact)
<zendeavor>
it's fair, i've no qualm with you
<zendeavor>
my issue is with shell being shitty because shell.
<duper>
r0bgleeson: the problem i have is that sometimes i'll install gems that cause runtime errors because of the encoding
<postmodern>
zendeavor, you should break it into multiple pull requests, each one getting more aggressive
<r0bgleeson>
duper: isnt that a bug in the gems?
<duper>
err.. require-time or whatever u want to call it
pyritical11 has quit [Ping timeout: 248 seconds]
<postmodern>
zendeavor, also yes, the shell is a _horrible_ programming environemnt :(
<r0bgleeson>
it sounds like you are doing some really crazy stuff
<duper>
r0bgleeson: no, because i've edited them manually and fixed it
<zendeavor>
i will, once i can make test
<bnagy>
duper: that makes no sense, sorry
<postmodern>
zendeavor, you make to install shunit2 for the tests, your package manager should have it
<zendeavor>
i can't even make test with your version =\
<r0bgleeson>
duper: if you submit a pull request its fixed for everyone
kaspergrubbe has joined #ruby
<zendeavor>
i have it
<postmodern>
zendeavor, paste the full error message
<duper>
r0bgleeson: even if the project is dead?
<r0bgleeson>
is this a common problem for you?
ewnd9 has joined #ruby
<duper>
oh wow
<zendeavor>
the breakage in test/setup was my own mistake that i couldn't see for a while, because bash just spits a random line that it thinks doesn't parse
<duper>
apparently IronRuby doesn't have this problem
<r0bgleeson>
duper: does the error happen at runtime of actual methods, or like at require?
robustus has quit [Ping timeout: 264 seconds]
<duper>
it's using the CLI to allocate Unicode strings for everything regardless of the script's encoding (explicit or otherwise)
<r0bgleeson>
i can only think of abandoned 1.8 gems running into that
lusory has quit [Quit: leaving]
<duper>
r0bgleeson: i run require when loading modules at runtime so i'm not sure how you'd define that
<r0bgleeson>
does ironruby have a 1.9 mode?
robustus has joined #ruby
<bnagy>
is ironruby not long dead?
jonathanwallace has quit [Ping timeout: 248 seconds]
<bnagy>
like.. years
<sevenseacat>
i thought it was
<duper>
r0bgleeson: i don't know
<zendeavor>
postmodern: http://ix.io/6Ss it's probably something dumb i haven't configured yet or something
<r0bgleeson>
sweet, it does
<r0bgleeson>
duper: it does, yeah, but i dont know if you're in 1.9 mode or not
<duper>
if it works, i don't care
<r0bgleeson>
its not dead, but, its not that alive anymore
<pzuraq>
is there a way to delete a key from a hash while assigning the key to another variable?
<pzuraq>
similar to popping a value from a stack
<zendeavor>
i have a new kernel, and need to reboot. that'll also fix the dumb PATH that has gotten appended to itself multiple times, so i'm gonna take a moment to do that postmodern
pyritical11 has joined #ruby
<duper>
r0bgleeson: you could be onto something with the version'ing, i bet the gems that are doing this haven't been updated for the newer interpreters
<r0bgleeson>
i would guess so
lusory has joined #ruby
<r0bgleeson>
but man, your idea to fix it was something else :P
<duper>
r0bgleeson: whatever works, i don't care
<bnagy>
pzuraq: not afaik, delete returns the value, not the key
<bnagy>
cause you already have the key to be able to delete it
<pzuraq>
ok, thats what I meant
<pzuraq>
awesome :D
<r0bgleeson>
i think it would have been pretty error prone
<duper>
i'm at the point where i wouldn't mind completely removing the offending gems from the require's
<r0bgleeson>
whats the code anyway?
<duper>
since they're not mission-critical
<duper>
r0bgleeson: an IRC bot
<duper>
that I should have used RVM with :/
<r0bgleeson>
ah
<r0bgleeson>
what IRC framework?
<duper>
it doesn't really use one
<duper>
i wrote it all from scratch
<r0bgleeson>
gotcha
<duper>
(the IRC protocol stuff anyway)
marcdel has joined #ruby
<r0bgleeson>
yeah there's been a few frameworks for IRC
baroquebobcat has joined #ruby
Arya_ has quit [Ping timeout: 256 seconds]
<duper>
what happened was i stopped using it for a few years, and now I'm on a different OS with a different interpreter and gems are crapping out all over the place.
pipework has joined #ruby
guest71 has joined #ruby
<duper>
r0bgleeson: i've seen them, but there's a lot of non-RFC compliant raw IRC commands I need to support
<r0bgleeson>
but i know he has supported servers that behaved differently before
baroquebobcat has quit [Client Quit]
ffio has joined #ruby
Arya_ has joined #ruby
<r0bgleeson>
there's a lot of new gems you could probably use
<r0bgleeson>
celluloid is another one that might be useful
<dominikh>
stressing the "differently". if it's braindead, it won't work. you can, however, send whatever custom command and react to whatever custom response you want
blotchy has joined #ruby
rickruby has joined #ruby
<dominikh>
the only trouble is if it's changing how stuff from the RFCs works. for minor differences we can add special handling, for big breaks (thinking justintv etc here) you won't have luck with cinch in particular
ixti has quit [Quit: WeeChat 0.4.1]
<duper>
r0bgleeson: run /quote STATS m :services.
<duper>
and you'll see what i mean
adeponte has joined #ruby
<duper>
ircd's nowadays load a lot of third-party modules
mklappstuhl has quit [Ping timeout: 268 seconds]
Gooder` has joined #ruby
<duper>
and there's also the problem of nickserv/chanserv having diff commands or commands with the same name that behave differently
<zendeavor>
postmodern: there's no ruby even in test/rubies in the first place
i_s has joined #ruby
<duper>
dominikh: IRC has never been known for following RFC's
<dominikh>
duper: I am well aware of that.
thibauts has joined #ruby
<postmodern>
zendeavor, ok what does ./test/setup print
burlyscudd has joined #ruby
<duper>
i do like the cinch syntax, though maybe i'll modify it since it looks like i have to scratch a lot of my old code and start over anyway :(
<dominikh>
duper: but if they are minor offenses, like not including all required information in a ban list, one can handle that (especially if the IRCd tells you who it is). but then there are implementations that look like IRC but aren't (justintv, which doesn't even support WHOIS iirc)
<zendeavor>
tries to download a ruby that can't be found; we have glibc 2.17 on arch, the available download is libc-2.15
<blotchy>
does anyone know why the same program running ruby 1.9 would use more memory than a 1.8 version?
<duper>
one more Unicode question though.. is there something that will determine which codepage is being used?
pyritical11 has quit [Ping timeout: 256 seconds]
<blotchy>
according to ps on Linux?
<postmodern>
zendeavor, ah ha, so we use RVM's pre-built rubies
Arya_ has quit [Ping timeout: 276 seconds]
<postmodern>
zendeavor, you will want to talk to mpapis in #rvm, and have him build a ruby for your arch
Vivekananda has quit [Ping timeout: 268 seconds]
goleldar has quit [Ping timeout: 264 seconds]
<zendeavor>
i can ruby-build one just to satisfy the need.
<postmodern>
zendeavor, that ugly code that detect your system is copied from RVM as well
<duper>
blotchy: the interpreter might have more features enabled and therefore a larger binary.. (or it could be a space-time trade-off.. i.e. it's bigger but runs faster)
Gooder has quit [Ping timeout: 240 seconds]
<zendeavor>
postmodern: verbatim?
tkuchiki has quit [Remote host closed the connection]
<blotchy>
yea, looks to be about 10X the size -- and i just suspect i'm missing a simple explanation
<postmodern>
zendeavor, almost, I had to rename the variables, rvm prepends everything with __
<blotchy>
thanks duper
Zeeraw has quit [Quit: Computer has gone to sleep.]
<zendeavor>
i *just* did this before my reboot too
<duper>
i tried downgrading the interpreter but i don't know what gem versions i was originally using..
<postmodern>
zendeavor, 'test/' not 'tests/' my mistake
<r0bgleeson>
duper: use bundler =p
tkuchiki has joined #ruby
<r0bgleeson>
there's a lot of new gems since two years ago
<duper>
dominikh: :morgan.freenode.net 372 a``` :- Please read (the 372 numeric denotes a MOTD message line)
<r0bgleeson>
id probably just rewrite it
<zendeavor>
nah i fixed that the first time. it barfs on relative paths.
<zendeavor>
i've just given it an absolute path instead
<dominikh>
duper: yeah I know the MOTD…
<duper>
dominikh: it used RFC-compliant numerics, just at unexpected times
<dominikh>
ah
<duper>
dominikh: it would make the client think it was connected when it wasn't (to keep non-malware people out i believe)
<dominikh>
duper: makes sense.
<dominikh>
but then that's a botnet :)
thibauts has joined #ruby
chxane has joined #ruby
kevinykchan has joined #ruby
<duper>
dominikh: *nod* and i still want to connect;)
<dominikh>
hehe
<dominikh>
well, get hacking then ;)
<dominikh>
fwiw, receiving a MOTD really shouldn't make a client believe it's connected :P
<duper>
r0bgleeson: will bundler only fix all this or do i need rvm as well?
* duper
gets hella confused when more than one version of the ruby interpreter is installed.
eridu has joined #ruby
<r0bgleeson>
duper: no, bundler won't fix this, but once you have your dependencies right you can lock them down and it will add a 'Gemfile.lock' file which records the dependencies your application is using.
<r0bgleeson>
you still need to fix your script
blotchy has left #ruby ["Leaving"]
thibauts has quit [Ping timeout: 256 seconds]
<eridu>
is there any way to cleanly detect when the remote end of a socket has closed its read channel?
<r0bgleeson>
RVM/rbenv/chruby/ruby-build/ruby-install (all the ruby build tools) will get you multiple rubies but it sounds like you just need 1.8 to get that script working
<zendeavor>
postmodern: okay, got the tests running for your version so back to work i go
jonathanwallace has joined #ruby
<eridu>
...is that not an appropriate question? Is this channel only for the ruby implementation?
<r0bgleeson>
eridu: its appropiate, i just dont know
<duper>
eridu: sniff for icmp port unreach messages, but egress filtering would prevent that
<postmodern>
zendeavor, awesome! also i recommend submitting suggestions to the style guidelines
ehc has quit [Quit: ehc]
<postmodern>
zendeavor, not really clear when $() vs. `` is preferred
<eridu>
duper: no, that's not it -- I have a ruby program writing to netcat; how do I tell when the netcat process dies
ffio_ has joined #ruby
<eridu>
is the only way to tell when I try to write something and get an exception?
<postmodern>
zendeavor, also we currently do not need to support POSIX sh, so using bash/zsh features is ok
ffio has quit [Ping timeout: 256 seconds]
<r0bgleeson>
eridu: do you have IO objects?
<r0bgleeson>
you can use IO.select if so, but you said a remote socket.
<eridu>
r0bgleeson: yes, I have TCPSockets
<r0bgleeson>
on the other end.
Gooder`` has joined #ruby
<zendeavor>
i'm abusing bash/zsh features.
sambao21 has joined #ruby
<duper>
eridu: Process#waitpid maybe
<zendeavor>
and $() is posix and supported by both shells, and is always preferred over `` as it can be nested cleanly
<eridu>
I'm new to ruby but I'm fairly certain that's unrelated
<r0bgleeson>
eridu: you could use IO.select to see if your socket is writable, but to be honest i dont know if it covers that case.. if youre talking to a netcat process how do you have TCPSocket's?
<zendeavor>
i did read the style guidelines, and edited my changes to adhere to them as well postmodern but maybe i've missed something
<zendeavor>
and i have a bone to pick with you about the function keyword.
Soopaman has joined #ruby
<eridu>
r0bgleeson: oh, sorry -- netcat is listening on a TCP socket, so I'm connected to a netcat process over TCP.
<eridu>
r0bgleeson: I'm writing an example program.
<postmodern>
zendeavor, i already fixed the function thing with the tests
<r0bgleeson>
oh,i see
<r0bgleeson>
i would suggest IO.select
<postmodern>
zendeavor, if you have suggestions on improving the style, make a PR and we'll consider it
<r0bgleeson>
can you simulate an error like that?
<bnagy>
just handle it like you'd handle any other peer, no?
<postmodern>
zendeavor, *improving the style guidelines
<dominikh>
eridu: without writing to it you won't know if the remote end went away
<bnagy>
like, pretty much the only reliable way I know to know when a remote TCP peer has died is when a send fails
ffio_ has quit [Quit: WeeChat 0.4.1]
Gooder` has quit [Ping timeout: 240 seconds]
<duper>
dominikh: Why not use a begin-rescue clause to catch the SocketException?
wallerdev has joined #ruby
<eridu>
I'm afraid that's what I have to do I suppose
<zendeavor>
postmodern: a pr containing what? revised style, explained in the pr message?
<eridu>
oh well, this isn't terribly important
<eridu>
thanks everyone! best of luck.
eridu has quit [Quit: Leaving]
<r0bgleeson>
what happens when you do that in C? -1 is returned?
<dominikh>
duper: he'll still need to write to it or there's no exception to catch.
anonymuse has joined #ruby
<postmodern>
zendeavor, well if there's something about my style that conflicts with the wider shell scripting style, make a PR changing both the code and the CONTRIBUTING.md file, explaining why my style is the wrong way
<bnagy>
r0bgleeson: one of the Es
<postmodern>
zendeavor, like im not sure if I'm supposed to use read or VAR=$(cat ...)
sambao21 has quit [Quit: Computer has gone to sleep.]
<r0bgleeson>
bnagy: an errno code is returned?
<bnagy>
yeah they're still all visible in the ruby Socket constants
jonathanwallace has quit [Ping timeout: 264 seconds]
<duper>
dominikh: i get that part
mneorr has joined #ruby
<r0bgleeson>
bnagy: cool, thanks
<bnagy>
huh, they're not where I was expecting though
<r0bgleeson>
Errno::* I think?
<duper>
isn't there an ioctl that retrieves socket info like that
<zendeavor>
postmodern: this might be easier to go over briefly in /query whenever you have some spare time; i don't feel like i can convey the points clearly without your feedback
renderful has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<r0bgleeson>
I've always used SystemCallError anytime I have to catch any kind of Errno.
<duper>
or a Socket#getsockopt argument?
<zendeavor>
i have to restart this cleanup from scratch anyway, more or less, if i intend to break it into manageable chunks
<r0bgleeson>
you can check if a FD is writable with select()
<r0bgleeson>
ive never really used ioctl for anything
<duper>
r0bgleeson: wouldn't anything be preferable to an Exception? don't know about in Ruby, but in other langs the control flow diversion they cause is extremely inefficient
<bnagy>
yeah but you won'y know for sure until you try and write
mneorr has quit [Ping timeout: 264 seconds]
<r0bgleeson>
duper: i really dislike exceptions, or trying to handle them
<r0bgleeson>
i dont think its about cost for me
GeissT has joined #ruby
Pandee has quit [Ping timeout: 268 seconds]
<bnagy>
r0bgleeson: basically, unless I am mad, there is no possible way to know if a peer is still there without trying to send to it
kofno has quit [Remote host closed the connection]
<r0bgleeson>
bnagy: yeah i think thats right
<bnagy>
there are ways to know if _they_ have explicitly closed
<r0bgleeson>
with select()?
baroquebobcat has quit [Client Quit]
<bnagy>
so there's really no way any sound code can not handle an error on send() or write() etc
jlebrech has quit [Ping timeout: 264 seconds]
<r0bgleeson>
yeah
<dominikh>
either the other end cleanly closes the connection and you'll know about it, or it doesn't and writing fails. that's your two options
<r0bgleeson>
i dont think there's much docs on sockets&ruby though
<bnagy>
ruby Socket is basically a wafer thin paintjob on the OS sockets
<r0bgleeson>
yeah, but failure recovery, never seen that in the docs
<dominikh>
lacking ruby documentation, now that's shocking :P
<r0bgleeson>
haha its getting better for 2.0.0, much better than the days of 1.8
<r0bgleeson>
most classes have overviews now
<duper>
#define FIONSPACE _IOR('f', 118, int) /* get space in send queue */
<duper>
would that work?
<havenwood>
r0bgleeson: we need more zzaks
<havenwood>
r0bgleeson: good documentation is awesome
<r0bgleeson>
yeah, ive always tried to write good docs
<r0bgleeson>
i think it helps a lot when you're trying to design an API as well, at least with YARD it did.
thibauts has joined #ruby
<havenwood>
mm
<dominikh>
yeah, Rob here came up with DDD before some other pseudo celebrity used the same term ;)
<duper>
If the read direction of the socket has shutdown, then
<duper>
the filter also sets EV_EOF in flags, and returns the
<duper>
socket error (if any) in fflags.
<duper>
kevent()
<r0bgleeson>
dominikh: hahaha i remember that
<duper>
probably would need a wrapper for that
<havenwood>
DDD?
<dominikh>
documentation driven development
<havenwood>
aha
<dominikh>
as in, write docs first, then implement the API
mklappst_ has quit [Remote host closed the connection]
<r0bgleeson>
because in YARD there's metatags to describe so much of your code/API, you really have to think about it
<r0bgleeson>
if you write the docs first, but i rarely did, i just refactored crap that didnt make sense
enaqx has joined #ruby
enaqx has left #ruby [#ruby]
adeponte has quit [Remote host closed the connection]
deeepblue has quit [Remote host closed the connection]
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<duper>
EPOLLRDHUP (since Linux 2.6.17)
<duper>
Stream socket peer closed connection, or shut down writing half
<duper>
of connection.
<duper>
epoll_ctl()
nanoxd has joined #ruby
<dominikh>
those are all clean closes, and I'm sure that's already being relayed to Ruby
<r0bgleeson>
duper: look at Errno.constants
<dominikh>
they're vastly irrelevant for "the other end crashed and burned and is gone"
<r0bgleeson>
there's a lot of them
fridim_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<r0bgleeson>
i wonder what Errno looks like on windows
thibauts has quit [Ping timeout: 264 seconds]
cha1tanya has joined #ruby
<duper>
what value does the CROSS_COMPILING constant hold? it's nil in my MRI irb
alvaro_o has quit [Quit: Ex-Chat]
<bnagy>
r0bgleeson: much the same, except you usually call some variant of GetLastError if you care
<r0bgleeson>
bnagy: is Errno.constants empty?
mvangala_ has joined #ruby
<bnagy>
nope
<r0bgleeson>
ah
adeponte has joined #ruby
<bnagy>
they would have mapped the OS stuff to the 'normal' ruby code
<r0bgleeson>
i thought the values available depended on platform
thibauts has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
<bnagy>
I'm sure they do
<bnagy>
but you can always map something to EINTR etc
<r0bgleeson>
ah true
<r0bgleeson>
i guess thats just how it has to work
Voodoofish430 has quit [Quit: Leaving.]
Guest90544 has quit [Read error: Connection reset by peer]
<r0bgleeson>
otherwise code would break on windows all the time
<bnagy>
there are some socket opts that are not available on windows
tris has quit [Ping timeout: 245 seconds]
<r0bgleeson>
why is jruby the best choice for windows?
<bnagy>
IMHO?
io_syl has quit [Quit: io_syl]
kobain_ has joined #ruby
<r0bgleeson>
yeah
<bnagy>
you get a consustent runtime, the JVM is great, you get proper profiling tools
kobain has quit [Ping timeout: 256 seconds]
jonathanwallace has joined #ruby
zomgbie has quit [Read error: Connection reset by peer]
<duper>
r0bgleeson: the JIT i think
<bnagy>
and you're not subject to mingw screwup and crappy ports of OS libs
zomgbie has joined #ruby
<r0bgleeson>
yeah i dont mean speed or anything, just developer pains and tooling
<bnagy>
plus you get 32/64 support without horror and a very good FFI
<r0bgleeson>
it sounds like jruby would be your choice on any platform then
<bnagy>
it actually is
<bnagy>
:)
<r0bgleeson>
ah, yeah
<r0bgleeson>
my brothers found it easier to get started with jruby + ide
sarkis has joined #ruby
<r0bgleeson>
(on Windows)
<r0bgleeson>
otherwise the concept of executing stuff at the command line was really alien
<bnagy>
but things like jvisualvm are awesomes
thibauts has quit [Ping timeout: 240 seconds]
ILoveYou has quit [Ping timeout: 276 seconds]
<bnagy>
on *nix I can use things like valgrind if things get really hairy
<r0bgleeson>
yeah, problem with jruby is that everything i write never works on it
<bnagy>
on windows, tracking leaks is just.. :(
<r0bgleeson>
so im not that motivated to use it
cfouts1 has joined #ruby
<r0bgleeson>
(and it doesnt work because of JVM limitations, probably never going to be "fixed")
<bnagy>
what kind of stuff? I thought the only really weak spot was C extensions
<r0bgleeson>
fork
<r0bgleeson>
IPC stuff
<bnagy>
oh, right
<bnagy>
yeah don't fork()
<r0bgleeson>
the IPC stuff actually works
cfouts1 has left #ruby [#ruby]
<r0bgleeson>
you could probably use it as a channel for threaded communication on jruby but i dont know how thread safe it is
smathieu_ has joined #ruby
<bnagy>
this is why I like stuff like Go that has explicitly gone with messaging even for intra-process comms
<bnagy>
all the shared memory stuff is icky
jonathanwallace has quit [Ping timeout: 256 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
<dominikh>
Go still has plenty of shared memory, though
<duper>
You can extend IronRuby with C++/CLI (well, any .NET assembly)
<bnagy>
duper: yeah except it's dead
<duper>
what are your opinions of rubinius?
<bnagy>
so it's not a viable platform
<duper>
bnagy: what's dead?
<bnagy>
ironruby
MrRacoon_ has quit [Read error: Connection reset by peer]
s00pcan has quit [Remote host closed the connection]
MrRacoon has joined #ruby
<r0bgleeson>
it was dropped by Microsoft
<duper>
it was?
<r0bgleeson>
yeah
<r0bgleeson>
long time ago
<bnagy>
well the let the guys go, was only two people from memory
<r0bgleeson>
dynamic language on that platform (official) is JS.
<r0bgleeson>
bnagy: i thought it was kind of, "we're going with JS"
<bnagy>
dominikh: are there areas of Go that aren't unsafe where you're supposed to use shared memory explicitly as a programmer?
<duper>
r0bgleeson: but the DLR was updated in 2010 while IronRuby was updated in 2011
<dominikh>
bnagy: there are a lot of problems that are easier, cleaner and faster to implement with locking than with channels.
thibauts has joined #ruby
<duper>
and what's JS? JScript?
<bnagy>
dominikh: can you point me at some code?
<r0bgleeson>
javascript
<r0bgleeson>
the new metro UI is developed with HTML5 & JS.
<bnagy>
I'm learning Go whenever I get some spare time, as I guess you noticed
<duper>
J# ?
<dominikh>
bnagy: you could grep the standard library for "Mutex", for one. but the simplest example that doesn't really work well with channels: globally shared map used to implement a cache.
smathieu_ has quit [Ping timeout: 276 seconds]
<r0bgleeson>
i dont know what runtime they're using
xcv has quit [Remote host closed the connection]
dukedave has quit [Ping timeout: 240 seconds]
<duper>
r0bgleeson: Metro uses C# and VC++ too
i_s has quit [Remote host closed the connection]
gazarsgo has joined #ruby
burlyscudd has joined #ruby
<r0bgleeson>
im just saying i think microsoft were playing with dynamic languages (ironruby, ironpython, JS), and it seems like they didn't have much interest in anything but JS.
<duper>
r0bgleeson: was there a press release about ironruby going? cause ironscheme was updated recently
<r0bgleeson>
there was "press" about it i guess
<r0bgleeson>
on ruby blogs
<duper>
you're saying the Metro JavaScript runs on the DLR?
n_blownapart has joined #ruby
<duper>
I thought that was the one from the native mshtml.dll or whatever (same as IE)
<r0bgleeson>
"In April, we wrote about IronRuby hitting 1.0 and Microsoft's "3 years with Ruby [paying] off." It's sad, then, to read today that program manager Jimmy Schementi is leaving Microsoft citing a rapidly decreasing interest in dynamic languages (other than JavaScript) at the software giant."
<r0bgleeson>
i dont know what runtime metro uses for JS
<duper>
i heard about that guy leaving, but don't remember reading anything definitive frmo microsoft about abandoning the DLR
<r0bgleeson>
i probably wouldnt invest much in ironruby
<bnagy>
dominikh: how much of a hit would it be moving from a single process global shared cache to pushing it to a memcached and using channels?
<r0bgleeson>
where is this DLR stuff coming from
<r0bgleeson>
i never mentioned it
<duper>
that sucks, cuz that's the only other option i had aside from bundler
<bnagy>
CLR
<dominikh>
bnagy: I don't think with memcached you'd need any channels? :)
burlyscudd has quit [Ping timeout: 240 seconds]
<r0bgleeson>
no one knows what will happen to .NET/CLR, its a guess, metro might live beside it
<duper>
r0bgleeson: DLR is what IronRuby runs on (and other projects that have been updated in 2013)
<r0bgleeson>
oh
thesheff17 has quit [Ping timeout: 256 seconds]
<r0bgleeson>
well i dont know
<r0bgleeson>
maybe JS use it?
<duper>
i don't think so
<r0bgleeson>
microsoft more or less dropped ironruby/python
tris has joined #ruby
<duper>
you can't access .NET objects from JavaScript
ilyam has joined #ruby
<duper>
IronPython 2.7.4 Beta 1 Released
<duper>
Wednesday, July 03, 2013 | From IronPython
<duper>
that's what i don't understand
<bnagy>
oh wow, DLR is a real thing, I just thought it was a typo. TIL.
<duper>
same thing with ironscheme
<r0bgleeson>
bnagy: i inferred dynamic language runtime eventually
<duper>
anyway, what do you guys think about Rubinius? I'll ask about the DLR on M$ TechNet
<bnagy>
I like the idea
<r0bgleeson>
i like rubinius
wmoxam has quit [Ping timeout: 268 seconds]
<bnagy>
but I don't know enough to comment, other than that
<duper>
r0bgleeson: any particular reasons?
thibauts has joined #ruby
<r0bgleeson>
duper: accessible and hackable, I think, it's a github project that manages development through pull requests, _a lot_ of the code is written in ruby, so you don't need to know C or C++ to extend or hack on parts of the language or tooling.
jarin has joined #ruby
<duper>
Rubinius also
<duper>
provides C-API compatibility for native C extensions.
<duper>
is that any diff than writing C extensions for MRI?
<bnagy>
you'd think?
<bnagy>
like MRI has a GIL which makes it a lot easier
fredjean has joined #ruby
<r0bgleeson>
in terms of APIs, I don't think it has everything from MRI's C API, and I've seen issues/bugs before where some of Rubinius's C APIs for MRI were really slow unless you used an alternative, but once you did it was fast again.
<r0bgleeson>
ive installed C-ext gems fine on rubinius though
tris has joined #ruby
thibauts has quit [Ping timeout: 264 seconds]
<duper>
does JRuby crap out on encoding issues too?:)
Mars` has joined #ruby
wargasm has quit [Ping timeout: 246 seconds]
renderful has joined #ruby
thesheff17 has joined #ruby
<r0bgleeson>
duper: just run your code in 1.8
Gooder``` has joined #ruby
<r0bgleeson>
it probably doesnt even work on 1.9
<r0bgleeson>
your code is 2 years old
emergion has joined #ruby
thibauts has joined #ruby
<duper>
actually i think i'm going to go with JRuby now since bnagy brought up GIL .. I run a lot of threads
<duper>
or maybe rubinius
<r0bgleeson>
cinch uses threads too ;)
ananthakumaran has joined #ruby
<duper>
r0bgleeson: the prob is i don't know the gem versions 1.8 needs .. i just need to start using bundler and rvm.. (big mistake.. learning from it now)
Domon_ has quit [Read error: Connection reset by peer]
Domon_ has joined #ruby
<duper>
i quit using python for a similar reason (python code i wrote on 2.4 wouldn't run on 3.0)
Arya_ has quit [Ping timeout: 276 seconds]
<dominikh>
r0bgleeson: the problem is that people blindly mix concurrency and parallelism when they're talking about things like threads
bluOxigen has joined #ruby
Gooder`` has quit [Ping timeout: 256 seconds]
saarinen has quit [Quit: saarinen]
wsterling has joined #ruby
thibauts has quit [Ping timeout: 248 seconds]
<r0bgleeson>
dominikh: yeah, sure, MRI is concurrent but rbx/jruby dont have a GIL anymore.
<duper>
dominikh: well, what should I do? write a C extension that calls clone() or thread_create() or something ?
<dominikh>
r0bgleeson: right.
<duper>
vfork would take up way too much resources
<dominikh>
duper: no, we're just lamenting the "I'm going to use JRuby because I run a lot of threads", because that second part itself isn't justification. saying you need them to run in parallel, that's justification ;)
Arya_ has joined #ruby
thibauts has joined #ruby
<dominikh>
threads as a mean of concurrency are still working well in MRI/YARV; it's only parallelism that craps out
krawchyk has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 264 seconds]
<duper>
sorry, i don't follow..
<r0bgleeson>
your threads will pass control to each other, in other words, but not run in parallel (some exceptions to that)
<r0bgleeson>
on MRI
ilyam has quit [Quit: ilyam]
<duper>
u mean like green threads?
<r0bgleeson>
exactly
<r0bgleeson>
but they're native now
<duper>
java used to have those, too.
<dominikh>
not necessarily green threads, no.
<r0bgleeson>
(on 1.9)
brennanMKE has quit [Remote host closed the connection]
<dominikh>
pthreads with a GIL are still threads, they're still concurrent :)
<r0bgleeson>
yeah
<r0bgleeson>
but 1.8 was green threads
<duper>
native as in kernel threads or a userland scheduler library?
<r0bgleeson>
1.8 = userland, 1.9 = kernel
<k-man>
my dashing dashboard is giving me theses exceptions but I can't work out why. when i try and emulate it in irb, it runs fine: https://gist.github.com/jasonblewis/6086065
thibauts has quit [Ping timeout: 240 seconds]
brunoro__ has quit [Ping timeout: 240 seconds]
<duper>
what about Fibers?
<r0bgleeson>
theyre concurrent as well
<r0bgleeson>
but you schedule them
<r0bgleeson>
ruby schedules the threads
<dominikh>
aka, threads are scheduled preemtively, fibers are scheduled cooperatively
<dominikh>
*preemptively
dukedave has joined #ruby
pkrnj has quit [Ping timeout: 240 seconds]
joonty has quit [Ping timeout: 248 seconds]
lnormous has quit [Ping timeout: 264 seconds]
pkrnj has joined #ruby
joonty has joined #ruby
<k-man>
actually, it does occur in irb
DanKnox is now known as DanKnox_away
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kofno has joined #ruby
nanoxd has joined #ruby
<k-man>
actually it seems to be an intermittent error
<r0bgleeson>
thanks for keeping us posted
<r0bgleeson>
it's probably a service acting up?
pkrnj has quit [Client Quit]
ntus1017 has joined #ruby
thibauts has joined #ruby
sleetdrop has joined #ruby
n_blownapart has quit [Remote host closed the connection]
<r0bgleeson>
why would it connect on boot though?
narcan has joined #ruby
<r0bgleeson>
dominikh: what sort of thing have you coded in Go?
nkts has joined #ruby
<dominikh>
r0bgleeson: this and that, really. working on an XMPP client library currently
thibauts has quit [Ping timeout: 248 seconds]
nadirvardar has quit [Ping timeout: 240 seconds]
amacgregor has joined #ruby
xcv has joined #ruby
<r0bgleeson>
dominikh: what for?
<dominikh>
r0bgleeson: shits and giggles? Also I want to replace bitlbee with a custom solution
amacgregor__ has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
<k-man>
in my dashing dashboard thing, i have a number of ruby files, each of which connects to the database using the TinyTDS::Client.new method (see https://gist.github.com/jasonblewis/6086206 ) i'd like to centralise the paramaters for creating that connection to one file. how can i do that?
blackmesa has joined #ruby
adeponte has joined #ruby
pzuraq has quit [Ping timeout: 264 seconds]
Kruppe has quit [Remote host closed the connection]
<r0bgleeson>
k-man: yaml file
smathieu_ has quit [Ping timeout: 276 seconds]
saarinen has quit [Ping timeout: 256 seconds]
rshetty has joined #ruby
i_s has joined #ruby
Arya_ has quit [Ping timeout: 240 seconds]
<k-man>
r0bgleeson, ok, i'll investigate that thanks
burlyscudd has joined #ruby
mansi has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
renderful has quit [Remote host closed the connection]
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
thibauts has joined #ruby
DanKnox_away is now known as DanKnox
Arya_ has joined #ruby
burlyscudd has quit [Ping timeout: 256 seconds]
i_s has quit [Ping timeout: 264 seconds]
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
anonymuse has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
sleetdrop has quit [Quit: Computer has gone to sleep.]
apeiros has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
renderful has joined #ruby
v0n has quit [Ping timeout: 276 seconds]
ntus1017 has quit [Remote host closed the connection]
renderful has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
mansi has joined #ruby
chimkan has joined #ruby
rippa has joined #ruby
<k-man>
so i can get the paramaters out of tye yml file, and i end up with a hash (i think) - how do i pass the hash as paramaters to TinyTds::Client.new ?
<r0bgleeson>
Client.new accepts a hash as its argument
corehook has joined #ruby
<r0bgleeson>
so just pass the parsed YAML directly to Client.new
<k-man>
config = YAML.load_file('lib/connection.yml') ; client = TinyTds::Client.new(config["connection"]) something like this? i nested the paramaters in the connection section of the yml filke
<k-man>
file
mansi has quit [Ping timeout: 264 seconds]
orangerobot has joined #ruby
thibauts has quit [Ping timeout: 260 seconds]
chimkan has quit [Ping timeout: 264 seconds]
<r0bgleeson>
yeah like that
renderful has joined #ruby
thibauts has joined #ruby
<orangerobot>
how can i perform operations on a result of a regexp match? for instance, when I do a regex match and want to operate on the match like this: "$1.capitalize" i get the following error message: undefined method `capitalize' for nil:NilClass.. but the funny thing is that, when I try to do "p $2", i can see the output
<orangerobot>
so there's stuff in that variable but I can't use it
<bnagy>
is the first bit supposed to skip # comments?
burlyscudd has joined #ruby
<bnagy>
duper: I honestly have no idea what you're talking about anymore
anildigital__awa is now known as anildigital
<bnagy>
first you talk about MRI VM opcodes then you start pasting links to bugs and exploits and trampolines, none of which have anything to do with it
Soopaman has quit [Quit: Leaving.]
<duper>
i'm asking about executing Ruby VM instructions using a ruby interpreter, similar to embedding ASM in C with __asm__
madumo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy>
rubinius uses its own VM
<bnagy>
it's not the same as the 'normal' ruby
Myrth has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<bnagy>
so yeah, at some point they have to have a compiler
adeponte has quit [Remote host closed the connection]
Artheist has quit [Remote host closed the connection]
<bnagy>
as to whether you can somehow make the MRI ( or another ) VM run opcodes directly, I thought you could, via VM, but I don't know
burlyscudd has quit [Ping timeout: 246 seconds]
<bnagy>
because it would have no practical value
<bnagy>
but none of that has anything to do with any of the links you have been posting, which is where I became confused
<bnagy>
orangerobot: is the first bit supposed to skip # comments?
<orangerobot>
bnagy: yes
<orangerobot>
it worked
<orangerobot>
i didn't want to interrupt your conversation
<bnagy>
orangerobot: ok, I would start with FIle.open("blah").each_line {|line| next if line =~/^#/; ...
saarinen has joined #ruby
<duper>
bnagy: at the very least it could be used to optimize the size of VM opcodes generated by ruby statements
<bnagy>
and move on from there
rohit_ has joined #ruby
<duper>
you know, to benchmark memory consumption and such
<orangerobot>
bnagy: thanks.. now onto the supposed 'nastiness' of my code.. isn't the fact that ruby lends itself to be used functionally like that one of its strengths? chaining lots of filters and selects and maps is supposed to shorten code
<bnagy>
orangerobot: yeah, sure, that's not what I don't like
<duper>
probably wouldn't hurt for low-level debugging purposes either
<bnagy>
I don't like reading a 'big' file into memory and then splitting, it's just wasteful
<orangerobot>
bnagy: what's your suggestion?
<bnagy>
and I don't like chaining when it makes much more sense to do it all in one block
osvico has quit [Ping timeout: 240 seconds]
<orangerobot>
does 'each_line' load only one line of text to memory at a time?
narcan has joined #ruby
<bnagy>
the thing above ( with each_line ) will process line by line from a filehandle, it's more memory efficient
<orangerobot>
o
<bnagy>
the next moves onto the next line if it starts with #
<bnagy>
then you just need to write the actual parsing bit
<orangerobot>
wow that's some useful advice, i didn't know that
<orangerobot>
about each_line
io_syl has joined #ruby
<orangerobot>
thanks bnagy
<bnagy>
the last bit _looks_ like it would be nicer with just a,b = line.split("\t")
io_syl has quit [Read error: Connection reset by peer]
axeman- has quit [Remote host closed the connection]
<orangerobot>
that puts the first match into a and the second match into b I assume?
<bnagy>
well it's not using regexp, it's just splitting on a token
<Nilium>
Not actually specific to Java, thankfully.
<cool_>
<Nilium >i am using nested forms which are movie and rentals in when i click movie i got rental from having borrowed and reeturned fields when i save it is working fine
amacgregor_ has joined #ruby
<Nilium>
There are no words, there is only Zuul.
<cool_>
but when i use show edit destroy on rentals it show error
<Nilium>
Cool_: Believe it or not, we aren't capable of peering into your code or mind and so what you're saying mostly amounts to "I'm a crazy person"
<cool_>
Nilium:like movie id nill
arya__ has joined #ruby
amacgregor__ has quit [Ping timeout: 240 seconds]
<sevenseacat>
sounds logical.
<Nilium>
Seriously, you do sound like the sort of crazy people who stand on the corner of an intersection here and shout gibberish.
amacgregor has quit [Read error: Connection reset by peer]
<cool_>
Nilium>i am sking for the solution or any relevent suggestion nothing more than that
<Nilium>
Solution or suggestion for what?
<sevenseacat>
solution to what? you havent posed a problem
<Nilium>
You haven't said anything comprehensible
narcan has joined #ruby
tatsuya_o has joined #ruby
marcgg has joined #ruby
Arya_ has quit [Ping timeout: 276 seconds]
BrianJ has quit [Quit: Computer has gone to sleep.]
marcgg_ has joined #ruby
juo100 has joined #ruby
mansi has joined #ruby
adeponte has quit [Remote host closed the connection]
LucidDreamZzZz has joined #ruby
marcgg has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 264 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
Guest65856 is now known as zai
Spami has quit [Quit: This computer has gone to sleep]
timonv has joined #ruby
blaxter_ has joined #ruby
eaWPq4nU has quit [Ping timeout: 240 seconds]
AkashicLegend has joined #ruby
mansi has quit [Ping timeout: 276 seconds]
rshetty has joined #ruby
mikecmpbll has joined #ruby
freerobby has joined #ruby
k610 has joined #ruby
bamdad has joined #ruby
DaniG2k has joined #ruby
Companion is now known as companion
tacos1de has joined #ruby
freerobby has quit [Ping timeout: 248 seconds]
hanmac has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
kiela_ is now known as kiela
himsin has joined #ruby
ChristianS has quit [Excess Flood]
companion is now known as Companion
ChristianS has joined #ruby
avril14th has joined #ruby
chihhsin has joined #ruby
chihhsin has quit [Client Quit]
shaunbaker has joined #ruby
elaptics`away is now known as elaptics
Columcille has quit [Quit: leaving]
shaunbak_ has joined #ruby
Columcille has joined #ruby
nomenkun has joined #ruby
Arya_ has joined #ruby
<cool_>
i need to use nested forms the second form is having show edit and destroy methods
arya__ has quit [Ping timeout: 264 seconds]
obs has joined #ruby
AkashicLegend has quit [Quit: AkashicLegend]
<avril14th>
Cool_: try #rubyonrails channel
<avril14th>
Hello, I feel I'm making a mistake
lkba has quit [Ping timeout: 246 seconds]
<avril14th>
I'm overriding a class comparison operator
Gooder` has joined #ruby
<avril14th>
and so I go like
shaunbaker has quit [Ping timeout: 264 seconds]
mklappstuhl has quit [Remote host closed the connection]
<avril14th>
def operator(val); val.kind_of? Numeric : self > val.to_c.real : super end
<avril14th>
my point is that I want to be sure that ">" operator exists
<avril14th>
but I don0t want to caompare to anything
<avril14th>
so I test the Numeric
<avril14th>
and to the to_c.real trick which I feel is awkward
<avril14th>
to get either a real / fixnum
<hanmac>
avril14th: i would do respond_to?(:to_c)
dash_ has quit [Quit: dash_]
<avril14th>
hanmac: then anything defining the operator would respond
<avril14th>
which may not make sense
<avril14th>
but I agree the writing is much better
Gooder has quit [Ping timeout: 284 seconds]
bobdobbs has quit [Ping timeout: 240 seconds]
smathieu_ has joined #ruby
spidergears has quit [Ping timeout: 264 seconds]
Zai00 has joined #ruby
niceguyjames has joined #ruby
Xeago has joined #ruby
Spami has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
smathieu_ has quit [Ping timeout: 268 seconds]
dangerousdave has quit [Ping timeout: 248 seconds]
QKO has quit [Ping timeout: 264 seconds]
burlyscudd has joined #ruby
QKO has joined #ruby
sayan has quit [Quit: Leaving]
twoism has quit [Ping timeout: 268 seconds]
dangerousdave has joined #ruby
burlyscudd has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 276 seconds]
Zeeraw has joined #ruby
klaut has joined #ruby
mneorr has joined #ruby
chihhsin has joined #ruby
dhruvasagar has joined #ruby
yacks has joined #ruby
LnL has quit [Write error: Broken pipe]
himsin has quit [Quit: himsin]
noop has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Arya_ has quit [Ping timeout: 268 seconds]
nikeita has joined #ruby
pkh has quit [Ping timeout: 276 seconds]
jlebrech has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
LnL has joined #ruby
Arya_ has joined #ruby
rdark has joined #ruby
atno has quit [Quit: Leaving]
timonv has quit [Remote host closed the connection]
<avril14th>
Hello, I get the max of an array by doing array.each_with_index.max[0], is there a way to supply the measure for max? something like array.each_with_index.max_by{ |i| i% 2 }[0]
<avril14th>
?
BizarreCake has quit [Remote host closed the connection]
<avril14th>
sorry, I meant I get the index of the max, by doing array.each_with_index.max[0]
hogeo has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
nari has quit [Ping timeout: 264 seconds]
Arya_ has quit [Ping timeout: 260 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
ghr has joined #ruby
ybart has quit [Quit: ybart]
relix has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
LnL has quit [Quit: LnL]
Evixion has joined #ruby
zhouxing has quit [Quit: 暂离]
Gate has quit [Ping timeout: 246 seconds]
Morrolan has quit [Read error: Operation timed out]
endomorphism has joined #ruby
Gate has joined #ruby
ntus1017 has quit [Remote host closed the connection]
Gate has quit [Changing host]
Gate has joined #ruby
anildigital is now known as anildigital_away
<endomorphism>
I'm learning RSpec and TDD now, and wonder whether I should write examples that cover a lot of functionality or that cover small portions of functionality. For example, suppose I am trying to write Roman numeral converter. Should I start with complicated example like "it converts MMXIII" or I should begin with something simpler?
Nakilon has joined #ruby
chrismcg has joined #ruby
blaxter_ has quit [Remote host closed the connection]
chrismcg has left #ruby [#ruby]
xcv has quit [Remote host closed the connection]
YaNakilon has quit [Ping timeout: 246 seconds]
blaxter_ has joined #ruby
noop has joined #ruby
Villadelfia has quit [Quit: Computer has gone to sleep.]
hanmac has joined #ruby
mneorr has quit [Remote host closed the connection]
Gate has quit [Ping timeout: 264 seconds]
burlyscudd has joined #ruby
Gate has joined #ruby
Gate has joined #ruby
Gate has quit [Changing host]
poikon has joined #ruby
tvw has joined #ruby
k611 has joined #ruby
Guest17266 is now known as jtperreault
burlyscudd has quit [Ping timeout: 240 seconds]
ybart has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
k612 has quit [Ping timeout: 256 seconds]
Domon_ has quit [Remote host closed the connection]
intuxicated has quit [Remote host closed the connection]
onr has joined #ruby
mneorr has quit [Remote host closed the connection]
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
Skaflem has joined #ruby
smathieu_ has joined #ruby
viszu has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Ping timeout: 264 seconds]
<whowantstolivefo>
hanmac: catch my bug also :)
<Xeago>
whowantstolivefo: mind using gists to store multiple files?
hogeo has quit [Remote host closed the connection]
<matti>
Xeago: Its too hard man!
<matti>
:>
hanmac has quit [Quit: Leaving.]
atno has quit [Remote host closed the connection]
<whowantstolivefo>
Xeago: i didnt understand, you mean i must collapse in one gist of my gists ?
smathieu_ has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
Arya_ has joined #ruby
Morrolan has joined #ruby
kung has joined #ruby
ILoveYou has joined #ruby
silmawien has joined #ruby
spectre| has quit [Quit: Leaving.]
freerobby has quit [Ping timeout: 240 seconds]
amacgregor has joined #ruby
allanm has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
dawkirst has quit [Ping timeout: 248 seconds]
Muz has quit [Ping timeout: 256 seconds]
Gate has quit [Ping timeout: 268 seconds]
Gate has joined #ruby
goshakkk has joined #ruby
mikecmpbll has joined #ruby
kung has quit [Ping timeout: 264 seconds]
BizarreCake has joined #ruby
<Spooner>
whowantstolivefo, You can clone a gist and treat it like any other repository. Easier when you are managing multiple files than just using separate gists.
zomgbie has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby
kaspergrubbe has joined #ruby
Muz has joined #ruby
nayfun has joined #ruby
dawkirst has joined #ruby
blackmes1 has joined #ruby
smlgs has quit [Remote host closed the connection]
blackmesa has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
k611 has quit [Ping timeout: 264 seconds]
pranny has quit [Quit: Leaving.]
<whowantstolivefo>
Spooner: okay im figure it out
dash_ has quit [Quit: dash_]
<whowantstolivefo>
but im still stuck on my issue
swordsmanz has quit [Ping timeout: 264 seconds]
kung has joined #ruby
nikeita has quit [Quit: sleep]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
juo100 has quit [Quit: juo100]
mikecmpbll has quit [Ping timeout: 268 seconds]
amacgregor has quit [Ping timeout: 276 seconds]
k610 has joined #ruby
burlyscudd has joined #ruby
k611 has joined #ruby
himsin has quit [Quit: himsin]
mikecmpbll has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
mupkoo has joined #ruby
k610 has quit [Ping timeout: 240 seconds]
k610 has joined #ruby
burlyscudd has quit [Ping timeout: 260 seconds]
ldnunes has joined #ruby
k611 has quit [Ping timeout: 240 seconds]
Spooner has quit [Remote host closed the connection]
sailias has joined #ruby
emergion has joined #ruby
geekbri has joined #ruby
senayar has joined #ruby
sayan has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
rshetty has joined #ruby
dhruvasagar has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
xcthulhu has joined #ruby
Judge has joined #ruby
himsin has joined #ruby
kofno has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
obs_ has quit [Remote host closed the connection]
Astralum has joined #ruby
obs has joined #ruby
obs_ has joined #ruby
maroloccio has joined #ruby
obs has quit [Remote host closed the connection]
Spooner has joined #ruby
blackmes1 has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
greenhyper has joined #ruby
UmkaDK has joined #ruby
<UmkaDK>
Hi everyone!
osvico has joined #ruby
<greenhyper>
Hello all
thesheff17 has joined #ruby
<UmkaDK>
Guys, I'm trying to track down an issue in a ruby project (runs via foreman on locomotivecms) where a client is unable to upload files over a certain size. Anyone has any idea as to what might cause that?
smathieu_ has joined #ruby
<UmkaDK>
There is no file limits imposed anywhere in the code base, and my local copy of the code runs fine: I can upload files of any size.
jp- has quit [Ping timeout: 276 seconds]
blaxter_ has quit [Quit: foo]
yshh has joined #ruby
_JamieD_ has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
bamdad has quit [Quit: bamdad]
jonathanwallace has joined #ruby
mupkoo has quit [Remote host closed the connection]
blaxter_ has joined #ruby
mansi has quit [Ping timeout: 268 seconds]
smathieu_ has quit [Ping timeout: 276 seconds]
Arya_ has quit [Ping timeout: 240 seconds]
senayar_ has joined #ruby
freerobby has joined #ruby
Paradox has quit [Ping timeout: 240 seconds]
LMolr has joined #ruby
oceanbreeze has joined #ruby
fridim_ has joined #ruby
enebo has joined #ruby
sulphur has quit [Quit: Wychodzi]
senayar has quit [Ping timeout: 260 seconds]
eka has joined #ruby
yshh has quit [Ping timeout: 264 seconds]
Arya_ has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
Gate has quit [Ping timeout: 268 seconds]
enebo has quit [Client Quit]
breakingthings has joined #ruby
Gate has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
niceguyjames has joined #ruby
vindictive27 has joined #ruby
vindictive27 has quit [Client Quit]
razi has joined #ruby
himsin has quit [Quit: himsin]
himsin has joined #ruby
himsin has quit [Client Quit]
krawchyk has joined #ruby
asobrasil has joined #ruby
<greenhyper>
Anyone free to help explain some syntax to a newbie? I just started studying Ruby a week ago. I've been working through the Lynda.com lessons as well as the CodeAcademy lessons but would appreciate being able to ask someone a few questions.
<bnagy>
just ask
Paradox has joined #ruby
k610 has quit [Ping timeout: 246 seconds]
<greenhyper>
OK.. well. Could someone walk me through exactly what this while loops does?
<greenhyper>
i = 0
<greenhyper>
while i < tree.count
<greenhyper>
current_tree = tree[i]
<bnagy>
ok, please don't paste code in channel
<bnagy>
use gist or pastie or whatever
emergion has quit [Quit: Computer has gone to sleep.]
<greenhyper>
OK, I'm sorry, it was pretty short, and I wasn't really thinking.
<greenhyper>
It's for looping through items in an array.
knightblader has quit [Quit: WeeChat 0.4.1]
niceguyjames has quit [Quit: Computer has gone to sleep.]
<greenhyper>
I just don't 100% understand what each part of the syntax is doing.
<bnagy>
we don't do it that way
mikecmpbll has quit [Quit: Computer has gone to sleep.]
<bnagy>
but even if we did, that has no effect on anything, it's basically a nop
<bnagy>
assigns things to a block-local variable
juo100 has joined #ruby
<bnagy>
ruby idiom is collection.each {|item| # do something with item}
ldnunes has joined #ruby
osvico has quit [Ping timeout: 276 seconds]
`MArceLL` has joined #ruby
<greenhyper>
OK, that was the example solution provided on a website. Can you show me how you might otherwise use a while loop to loop through the items in an array?
sleetdrop has quit [Ping timeout: 240 seconds]
roger_rabbit has quit [Ping timeout: 256 seconds]
wmoxam has joined #ruby
<Kelet>
greenhyper, What he's saying is, you're not actually doing anything worthful in the while loop - but this was an academic thing so I suppose that's fine but
<Kelet>
In Ruby, you generally don't use while loops for looping through items in an array.
<greenhyper>
That's fine, but since I'm at the learning stage, I think the goal is just to show that I understand how I COULD do that while a while loop.
jp- has joined #ruby
<greenhyper>
with a while*
<Kelet>
You wouldn't, but ok
<Kelet>
:)
<onr>
greenhyper: you're learning ruby?
<greenhyper>
And I don't fully understand their solution's syntax
<greenhyper>
Trying to.
senayar_ has quit [Remote host closed the connection]
xcthulhu has quit [Quit: xcthulhu]
<Kelet>
First of all, line 4 should be indented one over. It's not required, but it clarifies scope
<Kelet>
This is an example that actually declares the array, prints it instead of doing nothing, and shows the idiomatic way of doing it below the while loop
<greenhyper>
Thank you very much
mikecmpbll has joined #ruby
<greenhyper>
Am I understanding the function of i in this example properly?
onr has left #ruby ["Leaving"]
mmitchell has joined #ruby
<Kelet>
But yes, assuming your array is [20, 40, 80, 30], you want to have i = 0 in the first loop of the while
Gate has quit [Ping timeout: 268 seconds]
<Kelet>
i = 1 in the second loop of the while, i = 2 in the third loop of the while, and i = 3 in the fourth loop of the while
<greenhyper>
Right
<Kelet>
So you initialize it to 0, and increase it by 1 each time the loop is executed
Gate has joined #ruby
<Kelet>
You can see in the idiomatic way, such bookkeeping is unnecessary
<greenhyper>
While it's looping, when i is 0 it sees 20 in the array, then?
<Kelet>
numbers[0] is 20, numbers[1] is 40
<Kelet>
etc
<greenhyper>
Right
<greenhyper>
OK
<greenhyper>
That helps
<Kelet>
if i = 0, numbers[i] is 20
<greenhyper>
I wasn't sure what "0" was
<Kelet>
if i = 1, numbers[i] is 40
<Kelet>
etc
<greenhyper>
Knowing it's the array position helps
<Kelet>
Yep, and in Ruby you start with 0 as the 1st element
<DaniG2k>
if i = 1 ?
<greenhyper>
Then 40
<greenhyper>
Cool
UmkaDK has left #ruby ["Leaving..."]
<greenhyper>
So for this part:
burlyscudd has joined #ruby
sam19113 has joined #ruby
<greenhyper>
while i < numbers.count
<DaniG2k>
if i = 1 is wrong @_@
<DaniG2k>
i.equal?(1)
<Kelet>
It checks each time the loop is executed, so eventually i will be = to (and thus not less than) numbers.count and the loop will stop executed
<DaniG2k>
i == 1
<DaniG2k>
i.eql?(1)
<DaniG2k>
are all ok
v0n has joined #ruby
pipework has quit [Remote host closed the connection]
<greenhyper>
I see. I'm actually still having difficulty understand why its less than
<greenhyper>
Removing the variables for a second it would look like
<Kelet>
If i is 0, and numbers.count is 4, then the boolean evaluates to true, and it executes, printing 20
i_s has joined #ruby
<Mon_Ouie>
Since you start from 0, imagine your array size is 3. If it were "less than equal" i would go through the following values: 0, 1, 2, 3.
devoldmx3 has joined #ruby
<greenhyper>
OH
<greenhyper>
Wow I was totally not understand the logic of how .count works
kung has quit [Quit: Bye!]
<greenhyper>
Major brain fart
<Kelet>
You have 4 elements, numbers[0] through numbers[3]
<Kelet>
Yep, the starting at index 0 vs what methods like count and length return throws some people off
<Kelet>
IT's just how much languages work, and it's convenient for a lot of math
<greenhyper>
So as long as i is less than 4 it will look at it - because although the array has 4 positions, it counts 0-3
devoldmx has quit [Ping timeout: 256 seconds]
<greenhyper>
Oh man
<Kelet>
Yep, and an array with 500 positions will have elements 0-499
<greenhyper>
That has been making me burst capillaries and cry all night.
<greenhyper>
I just couldn't wrap my mind around why that was working
<bnagy>
which is pretty much why we don't do it that way
<Kelet>
<= would go one further than we have, which is bad
<greenhyper>
Would that cause an infinite loop?
burlyscudd has quit [Ping timeout: 256 seconds]
<Kelet>
No, it would just go one over
<Kelet>
which would return nil
<greenhyper>
Yeah, I think the reason why they want to see me do this is just to show that I understand the internal logic of the syntax
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<greenhyper>
So for the next line- puts numbers[i]
<Kelet>
In Java it would make your program stop with an ArrayOutOfBounds exception :) different languages handle it different ways. By default, Ruby just gives you a nil though.
<greenhyper>
Puts will print the output
<greenhyper>
numbers is the name of the array
Companion is now known as companion
<greenhyper>
What does putting [i] next to numbers do to the output?
<Kelet>
It prints that specific element
<Kelet>
When i is 0, it would print numbers[0], which is the element '0th' element so to speak
<Kelet>
well, the 1st element :)
<greenhyper>
Ohh OK. It's like when you put array_name[4] it gives you the value of the thing in the 5th positiong
<Kelet>
but it starts at 0, so numbers[0] represents the first element of numbers
<greenhyper>
Got it
yano has joined #ruby
<greenhyper>
Thank you for this, by the way
<Kelet>
yes, because you have to take into account that at numbers[0], you have the first element
lxsameer has joined #ruby
<Kelet>
at numbers[9999] you would have the 10,000th element
<lxsameer>
is it possible to define a environment variable inside Gemfile or run bundle to use one ?
nmco has joined #ruby
<greenhyper>
I realize this all super super basic but sometimes I really need someone to explain, in plain language, in order to get something to stick. I really appreciate you taking the time to babysteps with me.
<Xeago>
greenhyper: there is a method on Array called .[]
<Xeago>
that method accepts one argument, the index of the array
<Xeago>
and returns that one item
<Xeago>
ruby adds syntactic sugar so we don't have to [1,2,3].[](2)
<Mon_Ouie>
well, it can accept more than one argument or other kinds of arguments if you want to get into the details
<Xeago>
but instead we can specify the argument within the square brackets and leave the dot out
<Kelet>
# is a comment by the way, anything after a # isn't ran by Ruby, it's so you can document code or put notes or whatever
<Xeago>
Mon_Ouie: shush!
<Mon_Ouie>
(ranges, or [index, size])
Trynemjoel has quit [Ping timeout: 245 seconds]
<greenhyper>
I see
<Kelet>
Hence why pastie has grayed it out so to speak
<greenhyper>
If you'll bear with me then, let me just go through this one more time to make sure I have it.
i_s has quit [Ping timeout: 268 seconds]
<greenhyper>
I declare an array. For some really silly reason I want to iterate through all the elements in my array using a while loops. First, I define my array ( numbers = [10, 20, 30] )
cool_ has quit [Quit: Page closed]
predator217 has quit [Ping timeout: 256 seconds]
<Kelet>
Yep, and an array can contain any type of data you want, even mixed data. For example mixed_data = [10, 20, 'hello', 3.14]
<greenhyper>
Then, I set a variable to test the number of elements in my array against. I start with 0 because arrays (and others) all start with position 0 ( i = 0)
niceguyjames has joined #ruby
tkuchiki has joined #ruby
<Kelet>
Yep, and i is shorthand for index, it's common in programming to abbreviate it
henn has quit [Quit: Leaving]
corehook_ has joined #ruby
<greenhyper>
while my base variable is less than the total number of positions in my array, I want to print the value of each element in the array. ( while i < numbers.count ~ puts numbers[i] )
<greenhyper>
To continue iterating upward through the positions, I add 1 to the base variable. ( i += 1 )
<Kelet>
Yep, and you could do any number of things in that loop. For example, you could calculate the square of each number or do a bunch of complex things.
<Kelet>
Seems like you have a good understanding of the code then
<greenhyper>
Then my loop will start over
<Kelet>
I would probably call it an index variable and not a base variable, but those are semantics
<greenhyper>
OK, index variable
<Kelet>
Yep, it would start over with a new, increased value of 1
<Kelet>
and then eventually, the condition in the while loop will not be true
<greenhyper>
I'd prefer to use the normal terms
<Kelet>
and it will stop executing the loop
<greenhyper>
I really appreciate this. I can't even tell you.
krz has joined #ruby
xcthulhu has joined #ruby
Trynemjoel has joined #ruby
corehook has quit [Ping timeout: 260 seconds]
lebek has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
wmoxam has quit [Ping timeout: 268 seconds]
<greenhyper>
I don't suppose you have time for one or two more, do you Kelet?
DaniG2k has quit [Quit: Leaving.]
<Kelet>
If you quickly post the code I'll try to explain it
freeayu has quit [Ping timeout: 256 seconds]
bamdad has quit [Quit: bamdad]
<Kelet>
I would say the best thing you could do is get a copy of ruby if you haven't already, copy the code, and puts EVERYTHING.
<Kelet>
by printing all of the variables, you can get a better understanding of the behavior of the script
<greenhyper>
I've been experimenting a lot with irb
companion is now known as Companion
<Kelet>
good
bamdad has joined #ruby
<greenhyper>
I run into difficulty when I don't totally understand what function or affect a variable is having
spidergears has quit [Ping timeout: 240 seconds]
<greenhyper>
Like how it wasn't clicking over that i was the index variable and was being matched against the number of positions in the array
mansi has joined #ruby
<Kelet>
OK so what are you having trouble with this piece of code at?
PigDude has joined #ruby
nezumi has quit [Ping timeout: 268 seconds]
corehook_ has quit [Ping timeout: 256 seconds]
<greenhyper>
Are base and exponent arguments for pow?
v0n has quit [Ping timeout: 248 seconds]
<Kelet>
Yes, so you'd call pow by doing pow(2, 3) for example, to calculate 2^3
<Kelet>
You could print the result by doing
<Kelet>
puts pow(2, 3)
<greenhyper>
What is the significance of starting result and i on 1
<Kelet>
i did not need to start at 1, actually
<Kelet>
that is a choice they made
<greenhyper>
In the case of i, is to ensure that the exponent will be an integer?
<Mon_Ouie>
They are two different things. The "i" part is a loop, kind of like the like the one in your previous example.
<Kelet>
you could start i at 0 and use < if you wanted to
<Kelet>
result starting at 1 is important however
lxsameer has quit [Quit: Leaving]
<Kelet>
If result starts at 1, the underlying calculations for pow(2,3) would be result = 1 * 2 * 2 * 2
<Kelet>
If result started at 0, the underlying calculations for pow(2,3) would be result = 0 * 2 * 2 * 2
<Kelet>
which obviously creates a problem
jlast has joined #ruby
mmitchell has quit [Remote host closed the connection]
moos3 has joined #ruby
<greenhyper>
I see, that makes sense
mmitchell has joined #ruby
<greenhyper>
result needs to be 1 so it doesn't change the outcome
<PigDude>
how do I define a method for defining methods?
<Kelet>
yes, because 1 * anything = anything
freeayu has joined #ruby
<Mon_Ouie>
PigDude: You can just define a regular method and inside that method use something like define_method
<PigDude>
rather, where do I need to define a function so that a class can call it at runtime? i.e. class Foo ; do_something ; end
<Kelet>
the i thing is just to ensure the loop runs exponent amount of times
<PigDude>
Mon_Ouie, I tried that but I get a weird error, let me send my code
<Kelet>
So if you have 2^3, the loop will run 3 times, resulting in 2*2*2
<Mon_Ouie>
Inside of the class body, self = Foo
<Kelet>
If you have 3^10, the loop will run 10 times, resulting in 3*3*3*3*3*3*3*3*3*3
<Mon_Ouie>
So you just need it to be a class method on Foo (or alternatively, an instance method on Module or Class)
<Kelet>
You could do i =0, and then i < exponent for your check
<Kelet>
i = 1, and then i <= exponent is the same thing
<Kelet>
since you're not actually using i
<greenhyper>
I see
<PigDude>
Mon_Ouie, here's what I've got: http://www.bpaste.net/show/OJ7rysMYvTlsDpN7Sw57/ I get this error: :in `singleton class': undefined method `request_method' for #<Class:Gci::LansaIntegrator>
<Kelet>
greenhyper, A more idiomatic way of doing this loop would be
<Kelet>
exponent.times do
<Kelet>
which is analogous to something like
<Kelet>
10.times do
<Kelet>
(just using a variable instead)
<Kelet>
but your learning program seems to like while loops :)
<greenhyper>
This is just for the loop-learning portion
mansi has quit [Ping timeout: 268 seconds]
<PigDude>
Mon_Ouie, so where do I need to define `request_method`?
<Kelet>
A function (also called a method) returns whatever is executed last, hence 'result' at the end is the same as 'return result'
<Mon_Ouie>
PigDude: The problem is you are calling the method *before* you are defining it
<PigDude>
Mon_Ouie, I put it at the top of the module and got the same result
<PigDude>
Mon_Ouie, at the top of the class << self, and also at the top of the class LansaIntegrator
<Mon_Ouie>
Oh, and you're not calling them in the right place either, right
<PigDude>
right, I'm just trying to get an API like this to work, and I figure I've got some things out of order
<Mon_Ouie>
The calls to request_method have to be inside class Foo, not inside class << self
<Kelet>
greenhyper, To map it out for you, assuming you call pow(2,3), the first loop would execute result = 1 * 2, the second loop would execute result = 2 * 2, the third loop would execute result = 4 * 2
freerobby has joined #ruby
<Kelet>
greenhyper, And result would end up being 8, which is indeed 2^3
<Mon_Ouie>
Because you want to call Foo.request_method, so self has to be request_method
ldnunes has quit [Read error: Connection reset by peer]
<PigDude>
ah
kreeves has joined #ruby
<PigDude>
ok, let me try this out
<Mon_Ouie>
Inside class << self, self becomes Foo's singleton class
<greenhyper>
I'm still stuck on where in this loop does it understand the number of the exponent? Is it because i is iterating the loop until it reaches the value of exponent?
adambeynon has joined #ruby
ldnunes has joined #ruby
anonymuse has joined #ruby
<greenhyper>
Ohh OK
<PigDude>
Mon_Ouie, I still get that request_method is undefined when I move its definition and all four calls to the top of `class LansaIntegrator`
predator117 has joined #ruby
<Kelet>
2^5 is 2*2*2*2*2. That means, you have a loop that executes a number of times equal to your exponent.
<Mon_Ouie>
No, the definition is at the right place
aqil has joined #ruby
<PigDude>
I got that error before I moved it also
<Kelet>
Which is what the code is doing. It's looping a number of times equal to your exponent.
<PigDude>
when I only moved the calls to the class
<Mon_Ouie>
Can you show that code then?
<greenhyper>
So i is manipulating how many times the loop is repeated based on whether it is less than or equal to the value of exponent... and then result is growing in value times the base each iteration. OK.
<greenhyper>
Thank you so much. I'm starting to catch on.
<Kelet>
greenhyper, Yes, like I said you could also start i = 0 and then use < instead of <=
fernandoaleman has joined #ruby
<Mon_Ouie>
The method still has to be defined before it can be used
<PigDude>
where do I need to define it
<greenhyper>
Cool
<Kelet>
greenhyper, That is arbitrary, as long as it executes 'exponent' number of times
tbrock has joined #ruby
fernandoaleman has left #ruby [#ruby]
<Mon_Ouie>
For example you could move the calls after closing the class << self block
<PigDude>
Mon_Ouie, pretty much anywhere I put it, I get a message that it is undefined
<greenhyper>
What is the difference between i <= 1 and i <= 0 in this case?
<Black_Dolphin>
Can anyone help me with Notepad++ for rails project please?
<greenhyper>
Or does it have to be i < 0
<PigDude>
putting it there I get that it is undefined. the only place I get that it is defined is if I put it in global scope
<Kelet>
there is no i <= 1 or i <= 0 or i < 0 in your code
<greenhyper>
Oh whoops
<PigDude>
ugh why did I give away that dumb ruby metaprogramming book ... a few years and i've forgotten the few rules it teaches
<Kelet>
Alright, if we start i at 1, and our exponent is 3, then we need to run i at 1, 2, 3 to run the loop 3 times.
timonv has quit [Remote host closed the connection]
ldnunes has quit [Read error: Connection reset by peer]
<greenhyper>
I mean
<Kelet>
If we start at 0, and our exponent is 3, we need to run i at 0, 1, 2 to run the loop 3 times
dpritchett has joined #ruby
freerobby has quit [Ping timeout: 267 seconds]
<Kelet>
Thus, if i starts at 1, we need to use <=
<PigDude>
back in a couple
<Kelet>
and if i starts at 0, we need to use <
yalue has joined #ruby
<Mon_Ouie>
PigDude: To be able to call a method, it needs to (1) have been defined at the moment when you call it and (2) be defined on the object's class or its singleton class
cjs226 has quit [Ping timeout: 240 seconds]
jonjo has joined #ruby
<greenhyper>
Oh I see - it has to be <= because it also has to count 1
<jonjo>
Could not find sqlite3-1.3.7 in any of the sources, bundle install does not fix this
<Mon_Ouie>
You want to call the method on Foo. So you need to define #request_method in its singleton class (which means inside class << self; …; end or as def self.request_method)
<greenhyper>
But if it's 0 it can be set to <, because it won't be counting 0, and starting at 1 instead
amacgregor has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhruvasagar has joined #ruby
k0rupted_ has joined #ruby
<greenhyper>
Amazing help, thank you Kelet and everyone else who chimed in.
<Mon_Ouie>
And you have to do that before the call, which should be in a place where self = Foo (so most likely somewhere inside the class Foo; …; end, after the definition of request_method, but also not inside the class << self block, where self = Foo.singleton_class)
<Kelet>
greenhyper, Observe, that one of them prints out 1, 2, 3, and the other prints out 0, 1, 2
krz has quit [Quit: krz]
predator117 has joined #ruby
<Kelet>
greenhyper, But in both cases, it prints 3 things
<Kelet>
greenhyper, And in the context of your code, it is only important that your loop executes however many times
<Kelet>
Not what the value of i is
p0wn3d has joined #ruby
<Kelet>
i is just used to ensure the loop executes that many times.
<greenhyper>
Got it
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
predator117 has quit [Client Quit]
<Kelet>
So when calculating 2^3, the value of i will either be 1, 2, 3 or 0, 1, 2 during the 3 loop executions, but this does not matter.
<Kelet>
The important part is that 3 loop executions happened
<Kelet>
so you can multiply 2 by itself 3 times
LnL has left #ruby [#ruby]
<Mon_Ouie>
(If you multiplied 2 by itself 3 times you'd get 2 * 2 * 2 * 2 though :p)
<Kelet>
True enough
<Kelet>
oops
<Kelet>
The algorithm truly works by doing 1 * 2 * 2 * 2
<greenhyper>
Haha
<Kelet>
Since the default value of result is 1
silmawien has quit [Quit: WeeChat 0.3.7]
k610 has joined #ruby
<Kelet>
I was more or less trying to simplify what it did to explain it easier but in doing so, created a mistake
<Kelet>
it happens
mattias1 has joined #ruby
jonathanwallace has quit [Ping timeout: 276 seconds]
<Mon_Ouie>
Notice that this also allows it to work for exponent = 0 without having to special case it
wallerdev has joined #ruby
amacgregor has quit [Ping timeout: 261 seconds]
<Kelet>
Actually, it is best described as (((1 * 2) * 2) * 2) not that it matters due to basic multiplication laws
mattias1 has quit [Client Quit]
silmawien has joined #ruby
denver has joined #ruby
wmoxam has joined #ruby
interactionjaxsn has joined #ruby
timonv has joined #ruby
rshetty has quit [Quit: Sleeping]
k611 has joined #ruby
k610 has quit [Ping timeout: 268 seconds]
realDAB has joined #ruby
LMolr has quit [Quit: Leaving]
nikeita has joined #ruby
pipework has joined #ruby
nathancahill has joined #ruby
silmawien has quit [Quit: WeeChat 0.3.7]
silmawien has joined #ruby
narcan has joined #ruby
jerius has joined #ruby
devoldmx has joined #ruby
Ortuna has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
<PigDude>
Mon_Ouie, thanks, I got it
Gate has quit [Ping timeout: 256 seconds]
alup has quit [Quit: Leaving]
predator117 has joined #ruby
huoxito has joined #ruby
Gate has joined #ruby
Gate has joined #ruby
Gate has quit [Changing host]
devoldmx3 has joined #ruby
atno has joined #ruby
ldnunes has joined #ruby
postmodern has quit [Quit: Leaving]
v0n has joined #ruby
passion_for_web has joined #ruby
blueOxigen has quit [Ping timeout: 260 seconds]
devoldmx has quit [Ping timeout: 264 seconds]
ntus1017 has joined #ruby
binaryplease has joined #ruby
cha1tanya has quit [Ping timeout: 268 seconds]
<passion_for_web>
Hi Everyone, I want to create an FTP server to upload files to Amazon S3....which one is a better approach using gem aws-sdk or using Happening
ldnunes has quit [Read error: Connection reset by peer]
aqil has quit [Ping timeout: 256 seconds]
Ortuna has quit [Quit: IRC Leave]
ldnunes has joined #ruby
sambao21 has joined #ruby
predator117 has quit [Read error: Connection reset by peer]
failshell has joined #ruby
anderson has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 248 seconds]
predator117 has joined #ruby
v0n has quit [Ping timeout: 276 seconds]
tomzx_mac has joined #ruby
k611 has quit [Ping timeout: 246 seconds]
k610 has joined #ruby
lebek has joined #ruby
r0bgleeson has joined #ruby
johnnyfuchs has joined #ruby
baordog has joined #ruby
cmarques has joined #ruby
lebek has quit [Client Quit]
passion_for_web has quit [Quit: Page closed]
ananthakumaran has quit [Quit: Leaving.]
anderson has joined #ruby
brbcoding has joined #ruby
Kricir has joined #ruby
devoldmx3 has quit [Remote host closed the connection]
ehc has joined #ruby
aqil has joined #ruby
noop has quit [Ping timeout: 246 seconds]
v0n has joined #ruby
chihhsin has quit [Quit: leaving]
hamakn has quit [Remote host closed the connection]
allanm has joined #ruby
chihhsin has joined #ruby
hamakn has joined #ruby
burlyscudd has joined #ruby
realDAB has quit [Quit: realDAB]
BillCriswell has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
jonkri has joined #ruby
ndrei has joined #ruby
vikhyat has joined #ruby
blaxter_ has quit [Quit: foo]
vlad_starkov has quit [Remote host closed the connection]
devoldmx has joined #ruby
mwmnj has joined #ruby
blaxter_ has joined #ruby
enebo has joined #ruby
pentameter has joined #ruby
cjs226 has joined #ruby
Kricir has quit [Remote host closed the connection]
DaniG2k has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
brujoand has joined #ruby
hamakn has quit [Ping timeout: 256 seconds]
<brujoand>
hey guys, I have three problems, and I'm hoping somebody can help me withe one of them. I'm new to Qt, I'm new to Ruby, and I can't get this QDialog to get focus. Anyone want to try and point me in the right direction? https://github.com/Brujordet/bugger/blob/master/views/dialog.rb
freerobby has joined #ruby
sam19113 has quit [Ping timeout: 276 seconds]
thatRD has quit [Quit: thatRD]
fbernier has joined #ruby
hashpuppy has joined #ruby
brandon__ has quit [Ping timeout: 246 seconds]
zomgbie has quit [Ping timeout: 240 seconds]
rickruby has quit [Remote host closed the connection]
Evixion has quit [Read error: Connection reset by peer]
tbrock has joined #ruby
_bart has joined #ruby
whitenoise has joined #ruby
mansi has joined #ruby
Tricon has joined #ruby
ybart_ has joined #ruby
ybart has quit [Ping timeout: 261 seconds]
ybart_ is now known as ybart
JZTech101 has joined #ruby
devoldmx3 has joined #ruby
blaxter_ has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
blaxter_ has joined #ruby
atyz has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
kobain has joined #ruby
Neomex has joined #ruby
relix has joined #ruby
anildigital_away is now known as anildigital
Tricon has quit [Client Quit]
<PigDude>
wc
PigDude has left #ruby [#ruby]
ndrei has joined #ruby
<whitenoise>
any familiar with carrierwave using fog?
<whitenoise>
s/any/anybody
devoldmx has quit [Ping timeout: 268 seconds]
anildigital is now known as anildigital_away
mansi has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
anildigital_away is now known as anildigital
Kricir has joined #ruby
aqil has quit [Ping timeout: 246 seconds]
bricker`LA has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
jonathanwallace has joined #ruby
GeissT has joined #ruby
dukedave has joined #ruby
GeissT has quit [Client Quit]
GeissT has joined #ruby
m00dy has joined #ruby
tomzx_mac has quit [Ping timeout: 255 seconds]
GeissT_ has quit [Ping timeout: 260 seconds]
AndChat| has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
blackmes1 has joined #ruby
brennanMKE has joined #ruby
senayar has joined #ruby
scarolan has quit [Ping timeout: 240 seconds]
rodacato has joined #ruby
lnormous has joined #ruby
scarolan has joined #ruby
vikhyat has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
rickruby has joined #ruby
rodacato has quit [Remote host closed the connection]
rlb3 has quit [Remote host closed the connection]
AkashicLegend has joined #ruby
rodacato has joined #ruby
trepidaciousMBR has quit [Ping timeout: 268 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bamdad has quit [Quit: bamdad]
asteve has joined #ruby
platzhirsch has joined #ruby
sam19113 has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
moos3 has quit [Read error: No route to host]
vikhyat has joined #ruby
vlad_starkov has joined #ruby
bamdad has joined #ruby
dash_ has joined #ruby
bamdad has quit [Client Quit]
moos3 has joined #ruby
<platzhirsch>
Does anyone use the for element in collection syntax?
sambao21 has quit [Quit: Computer has gone to sleep.]
<platzhirsch>
I am opening the module in many places, somehow it only detects a portion of it
<burlyscudd>
platzhirsch: idk what you mean by "opening"
<platzhirsch>
burlyscudd: with opening I mean that I have different classes defined in different files and in each I am beginning with module Metrics ... end
dukedave has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
nmco has quit [Quit: nmco]
<burlyscudd>
platzhirsch: you'll still need to make sure that the file where you defined the constant gets loaded at the same time/by the same process that loads your other module files
<burlyscudd>
platzhirsch: you may be confusing yourself a bit by loading multiple files that all declare different pieces of the same namespace
tommyvyo has joined #ruby
failshell has quit [Remote host closed the connection]
rshetty has joined #ruby
mikecmpbll has joined #ruby
<platzhirsch>
burlyscudd: Definitely. But if I want to put a class into the Metrics namespace it's okay to write module Metrics class ... end end ?
<burlyscudd>
platzhirsch: if you look at how gems are constructed, they usually have one top-level file that loads all the components of a module via require. frequently people put top-level constants in that file. because the requires to the other files all happen from there, all the code in those files can reference the constant assuming that that file is loaded by whatever calling code uses the gem.
tbrock has quit [Quit: Computer has gone to sleep.]
S0da has joined #ruby
<burlyscudd>
platzhirsch: yes that's OK — your issue is needing to have a structure that lets all the stuff be loaded at the same time
failshell has joined #ruby
banghouse2 has joined #ruby
s00pcan has joined #ruby
<platzhirsch>
burlyscudd: ah now I get it :)
banghouse2 is now known as banghouse
<platzhirsch>
I was confused because the file loading is done by Rails, but of course I am trying to access code at class initialization time where the constant is not loaded yet
Neomex has quit [Quit: Neomex]
<burlyscudd>
platzhirsch: the construction of gems is instructive here. When RubyGems (the program) installs a gem, it looks at the gemspec file for a directory it is supposed to add to the interpreter's $LOAD_PATH array. by convention that is the gem's lib directory. That's why you have a file called "foo.rb" in the lib dir of a gem called "foo" — it is that file that is getting loaded/executed when you say 'require "foo"'. This acts as a bootstrap fil
ndrei has quit [Quit: Lost terminal]
<platzhirsch>
darn, I wanted to remove some redundancy by creating class properties through a module constant, but the module is defined a bit deeper in the file hierarchy
<burlyscudd>
platzhirsch: Rails is cool, but it does so much that it can be a confusing way to learn how Ruby operates, which is actually pretty simple and easy when you remove Rails from the equation
<platzhirsch>
Although I started with pure Ruby, I haven't faced some modeling issues before designing an application which is a bit bigger then my average Ruby scripts :)
brujoand has left #ruby [#ruby]
nmco has joined #ruby
S0da has quit [Ping timeout: 276 seconds]
acrussell has joined #ruby
S0da has joined #ruby
Kricir has quit [Remote host closed the connection]
ffranz has joined #ruby
rshetty has quit [Ping timeout: 248 seconds]
Gowin has joined #ruby
Judge has quit [Remote host closed the connection]
<platzhirsch>
tricky, I don't know yet how to resolve this, I could move the identifier into another place, although I like the current place
vlad_starkov has quit [Remote host closed the connection]
apeiros has joined #ruby
mary5030 has joined #ruby
timonv has quit [Remote host closed the connection]
ndrei has joined #ruby
realDAB has joined #ruby
theRoUS has quit [Ping timeout: 240 seconds]
rshetty has joined #ruby
lebek has joined #ruby
alex__c2022 has joined #ruby
iBot_23 is now known as james_woods
Gowin has quit [Quit: Gowin]
<lnormous>
I'm testing a module in my grape API, and in grape I can call error!("foo",status), and that error gets returned to the user, without any more code being executed. I have created a dummy class to test the module, but can't get it to stop execution at that method call
DonRichie has joined #ruby
vikhyat has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
Xuerian has quit [Quit: No Ping reply in 180 seconds.]
Xuerian has joined #ruby
<lnormous>
what can I put in the dummy class to halt code execution at that point?
ffio has quit [Ping timeout: 246 seconds]
St_Marx has quit [Ping timeout: 240 seconds]
acrussell has left #ruby [#ruby]
terrellt has joined #ruby
kpwz has quit [Ping timeout: 240 seconds]
<canton7>
an exception?
St_Marx has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
tbrock has joined #ruby
Tricon has quit [Quit: Bye!]
nathancahill has quit [Quit: nathancahill]
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
_maes_ has joined #ruby
freeayu has quit [Remote host closed the connection]
senayar_ has joined #ruby
Kricir has joined #ruby
<lnormous>
canton7: Yeah, I could do that - was hoping there might be an easier solution
timonv has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<lnormous>
The code works fine, just having issues with the tests
denver has quit [Ping timeout: 248 seconds]
mansi_ has quit [Read error: Connection reset by peer]
helvete has joined #ruby
mary5030 has joined #ruby
ananthakumaran has joined #ruby
mansi has joined #ruby
wallerdev has joined #ruby
mikepack has joined #ruby
Skaflem has quit [Quit: Leaving]
senayar has quit [Ping timeout: 246 seconds]
S0da has quit [Remote host closed the connection]
denver has joined #ruby
mwmnj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
includex has joined #ruby
kaspergrubbe has joined #ruby
vlad_starkov has joined #ruby
ssqq has joined #ruby
nmco has quit [Read error: Connection reset by peer]
nikeita has quit [Quit: sleep]
ldnunes has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
nmco has joined #ruby
Xuerian has quit [Quit: No Ping reply in 180 seconds.]
hashpuppy has quit [Ping timeout: 264 seconds]
aganov has quit [Quit: aganov]
nikeita has joined #ruby
_maes_ has quit [Ping timeout: 264 seconds]
ffio has joined #ruby
Kricir has quit [Remote host closed the connection]
zachrab_ has joined #ruby
ldnunes has joined #ruby
zachrab_ has quit [Client Quit]
Kricir has joined #ruby
mengu has quit [Quit: Leaving]
tbrock has quit [Quit: Computer has gone to sleep.]
senayar_ has quit [Read error: Connection reset by peer]
senayar has joined #ruby
<queso>
I'm trying to modify some basic Foundation style choices so I'm trying to learn Sass and Compass. Sass compiles from sass files to css files. Compass is a tool to help with sass? I'm trying to understand the relationship.
ryannielson has quit [Quit: ryannielson]
<burlyscudd>
queso: Compass is a framework — comes w/ helpers for generating stubs from specific grid systems (Blueprint was one for awhile, I think Bootstrap and Foundation too)
rodacato has quit [Remote host closed the connection]
Solnse has joined #ruby
<burlyscudd>
queso: Compass just gives you nice defaults and helper functions and stuff that can be useful
rodacato has joined #ruby
<mwmnj>
Any heroku users interested in beta testing an addon I am working on?
vikhyat has quit [Read error: Connection reset by peer]
<lnormous>
mwmnj: what's the addon?
ssvo has joined #ruby
<mwmnj>
It simplified the process of adding sms/voice functions to your heroku app
Appineer has joined #ruby
lemonsparrow_ has joined #ruby
<queso>
burlyscudd: Okay, thank you. Are you familiar with Foundation?
<burlyscudd>
queso: not yet, no — about to convert a project from Bootstrap to that tho. Have used all the techs involved afaik
Kricir has quit [Remote host closed the connection]
vikhyat has joined #ruby
<lnormous>
mwmnj: sorry, wouldn't really have any use for that
<queso>
burlyscudd: How do I take a vanilla clone of the Foundation source and then "compile" it? I'm a Python developer using Foundation in a project and I want to modify some basic design choices made by the framework, so I know very little about Ruby. But I have ruby installed and along with sass and compass. Should I use the zurb-foundation gem and not touch the source?
S0da has joined #ruby
elux has joined #ruby
sambao21 has joined #ruby
<burlyscudd>
queso: no idea — would have to go read the docs myself
<queso>
burlyscudd: Okay, thanks for your help.
AndChat| has quit [Ping timeout: 246 seconds]
<lemonsparrow_>
hi
<platzhirsch>
burlyscudd: I found the problem with the module loading. It wasn't loaded because the module's name is Metrics, but the file name is metric.rb because it contains the class Metric ... maybe I should create a seperate file for the module only code
lemonsparrow_ is now known as lemonsparrow
JZTech102 has joined #ruby
JZTech101 has quit [Disconnected by services]
JZTech102 has quit [Read error: Connection reset by peer]
Jabberwock has joined #ruby
JZTech101 has joined #ruby
<Jabberwock>
Hi all. Would someone please tell me in which version was RBConfig introduced and Config deprecated?
ebanoid has joined #ruby
S0da has quit [Ping timeout: 256 seconds]
brunoro__ has joined #ruby
lemonsparrow has quit [Quit: Page closed]
anonymuse has quit [Remote host closed the connection]
<Jabberwock>
Was it 1.9.2?
hasrb has joined #ruby
mark_locklear has quit [Ping timeout: 268 seconds]
Xuerian has joined #ruby
<r0bgleeson>
Jabberwock: one of the 1.9's, im not sure which
Nisstyre-laptop has quit [Ping timeout: 265 seconds]
bradhe has quit [Remote host closed the connection]
sarkis has joined #ruby
ehc has quit [Quit: ehc]
shaunbak_ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
joonty has quit [Quit: WeeChat 0.4.1]
asuka has quit [Ping timeout: 264 seconds]
anonymuse has joined #ruby
PhatBaja has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
tbrock has joined #ruby
matti has quit [Quit: Oh dear...]
PhatBaja has joined #ruby
crazymykl has joined #ruby
filipe has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
rshetty has quit [Quit: Sleeping]
ndrei has joined #ruby
jack has joined #ruby
<jack>
hi
jack is now known as Guest38015
arturaz has quit [Ping timeout: 268 seconds]
mityaz has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
binaryplease has quit [Quit: WeeChat 0.4.1]
rshetty has joined #ruby
Kricir has joined #ruby
m8 has joined #ruby
Pandee has joined #ruby
burlyscudd has quit [Quit: Leaving.]
nbouscal has joined #ruby
timonv has quit [Remote host closed the connection]
blaxter_ has quit [Quit: foo]
ndrei has quit [Read error: Connection reset by peer]
codecop has joined #ruby
ndrei has joined #ruby
Guest38015 is now known as jacksparrow
AlSquire has quit [Ping timeout: 276 seconds]
jacksparrow is now known as javasparrow
javasparrow has quit [Quit: Page closed]
zomgbie has quit [Ping timeout: 276 seconds]
Ry0_ has joined #ruby
matchaw_ has quit [Ping timeout: 264 seconds]
toddWork_ has quit [Ping timeout: 240 seconds]
swordsmanz has joined #ruby
mwmnj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Voodoofish430 has joined #ruby
sayan has joined #ruby
epta is now known as what_is_going_on
tvw has quit []
codecop has quit [Remote host closed the connection]
what_is_going_on is now known as ghc_multi_7
toddWork_ has joined #ruby
ghc_multi_7 is now known as epta
DaniG2k has quit [Quit: Leaving.]
xcthulhu has quit [Quit: xcthulhu]
Kricir has quit [Remote host closed the connection]
Arya_ has quit []
xcthulhu has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rfizzle has joined #ruby
berkes has joined #ruby
rshetty has quit [Quit: Sleeping]
Vivekananda has joined #ruby
<rfizzle>
Passenger kills rufus scheduled tasks. Anyone know how to fix?
mansi has quit [Remote host closed the connection]
obs has quit [Remote host closed the connection]
Arya_ has joined #ruby
PhatBaja has quit [Quit: Leaving.]
juo100 has quit [Quit: juo100]
enebo has quit [Quit: enebo]
ndrei has quit [Ping timeout: 246 seconds]
Paradox has quit [Ping timeout: 245 seconds]
dagobah has quit [Remote host closed the connection]
Kricir has joined #ruby
waxjar has quit [Ping timeout: 268 seconds]
viszu has quit [Quit: Leaving.]
waxjar has joined #ruby
redderhs has joined #ruby
realDAB has quit [Quit: realDAB]
<redderhs>
Hi, the link in this message is in regards to an Open Source Computing to further the developments of hardware for the mobile industry. It's time for Linux to be the #1 Consumer Operating System, Ubuntu Edge movement! http://pastebin.com/j57Dc29E We can all make a difference for as little as One Dollar! Thank You for your time.
rdark has quit [Quit: leaving]
relix has joined #ruby
matchaw has joined #ruby
hamakn has joined #ruby
bigoldrock has joined #ruby
Zai00 has quit [Quit: Zai00]
devoldmx3 has quit [Read error: Connection reset by peer]
redderhs has left #ruby [#ruby]
Eiam has joined #ruby
vlad_starkov has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
mmitchell has quit [Remote host closed the connection]
hamakn has joined #ruby
Es0teric has joined #ruby
ybart has quit [Quit: ybart]
mmitchell has joined #ruby
senayar has quit [Remote host closed the connection]
sambao21 has joined #ruby
jalcine has quit [Excess Flood]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
platforms has quit [Remote host closed the connection]
Nakilon has quit [Ping timeout: 246 seconds]
YaNakilon has joined #ruby
devoldmx has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
dukedave has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
platzhirsch has left #ruby [#ruby]
mmitchell has quit [Ping timeout: 264 seconds]
eldariof has joined #ruby
ghr has joined #ruby
ehc has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
sqd has joined #ruby
asuka has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has quit [Remote host closed the connection]
rshetty has joined #ruby
ghr has quit [Ping timeout: 276 seconds]
spidergears has joined #ruby
sam19113 has quit [Quit: sam19113]
Paradox has joined #ruby
sam19113 has joined #ruby
relix has joined #ruby
ryannielson has joined #ruby
_bart has quit [Ping timeout: 265 seconds]
Gate has quit [Ping timeout: 240 seconds]
nmco has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
nmco has joined #ruby
queso has left #ruby [#ruby]
Gate has joined #ruby
nikeita has quit [Quit: sleep]
senayar has joined #ruby
d45h has joined #ruby
mrsolo has joined #ruby
atno has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
Desert_eagle is now known as fly-away
zeade has joined #ruby
brunoro__ has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
dukedave has quit [Ping timeout: 264 seconds]
Ry0_ has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 264 seconds]
mark_locklear has joined #ruby
rodacato has joined #ruby
dash_ has quit [Ping timeout: 268 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Ry0_ has joined #ruby
rodacato has quit [Remote host closed the connection]
moted has joined #ruby
Lewix has quit [Remote host closed the connection]
rodacato has joined #ruby
jlast has joined #ruby
masterasia has joined #ruby
mary5030 has quit [Remote host closed the connection]
alex__c2022 has quit [Quit: alex__c2022]
BrianJ has quit [Quit: Computer has gone to sleep.]
madumo has joined #ruby
rodacato has quit [Remote host closed the connection]
ebanoid has quit [Quit: brbomgwtfbbq]
AlSquire has joined #ruby
marcdel has joined #ruby
rodacato has joined #ruby
nomenkun has quit [Remote host closed the connection]
spidergears has quit [Ping timeout: 246 seconds]
zmike has joined #ruby
tubbo has left #ruby [#ruby]
kevinykchan has joined #ruby
madumo has quit [Quit: madumo]
madumo has joined #ruby
amacgregor has quit [Ping timeout: 268 seconds]
Ry0__ has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
optimusprimem has quit [Ping timeout: 245 seconds]
klaut has quit [Remote host closed the connection]
sleetdrop has joined #ruby
Ry0_ has quit [Ping timeout: 264 seconds]
fmcgeough has joined #ruby
sam19113 has quit [Quit: sam19113]
berkes has quit [Quit: Ex-Chat]
berkes has joined #ruby
smathieu_ has joined #ruby
sam19113 has joined #ruby
Mars` has joined #ruby
slash_ni1k is now known as slash_nick
whowantstolivefo has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
platforms has joined #ruby
vlad_sta_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
i_s has joined #ruby
Nisstyre-laptop has joined #ruby
smathieu_ has quit [Ping timeout: 264 seconds]
vlad_sta_ has quit [Write error: Broken pipe]
spider-mario has joined #ruby
leonardo__ has joined #ruby
leonardo__ has quit [Client Quit]
nkts has quit [Quit: -]
burlyscudd has joined #ruby
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
YaNakilon has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
kristiandelay has joined #ruby
jalcine has joined #ruby
bricker`LA has quit [Ping timeout: 256 seconds]
burlyscudd has quit [Ping timeout: 268 seconds]
DanKnox_away is now known as DanKnox
<MarcWeber>
I need a simple caching solution for Windows. I thought about sqlite. Which is the way to install sqlite on Windows?
<MarcWeber>
get devkit, get sqlite .dll and headers, thus download binaries and source !?, then use gem install sqlite3 --platform=sqlite3 --add-paths-to-sqlite?
jibi has joined #ruby
jalcine has quit [Excess Flood]
<MarcWeber>
Is there a simpler solution?
AkashicLegend has joined #ruby
<MarcWeber>
I mean if there is a ruby devskit, why can't you install it as "ruby gem" ?
elaptics is now known as elaptics`away
ehc has quit [Quit: ehc]
mmitchell has joined #ruby
Zai00 has joined #ruby
apeiros has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
jalcine has joined #ruby
intuxicated has joined #ruby
berkes has quit [Ping timeout: 268 seconds]
intuxicated has quit [Changing host]
intuxicated has joined #ruby
mansi has joined #ruby
devoldmx has joined #ruby
denver has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
JZTech102 has joined #ruby
gyre007 has quit [Ping timeout: 246 seconds]
dankest has joined #ruby
JZTech101 has quit [Disconnected by services]
dominikh has quit [Quit: WeeChat 0.4.0-dev]
dominikh1 has joined #ruby
JZTech102 has quit [Read error: Connection reset by peer]
Gate has quit [Ping timeout: 276 seconds]
Gate_ has joined #ruby
JZTech101 has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
tylersmith has joined #ruby
rshetty has quit [Quit: Sleeping]
Kricir has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
blitz has joined #ruby
zeade has quit [Quit: Leaving.]
interactionjaxsn has quit [Ping timeout: 240 seconds]
k610 has quit [Quit: Leaving]
zeade has joined #ruby
krz has quit [Quit: krz]
tylersmi_ has joined #ruby
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
smathieu_ has joined #ruby
mary5030 has joined #ruby
sarkis has quit [Ping timeout: 246 seconds]
tylersmith has quit [Read error: Connection reset by peer]
mmitchel_ has joined #ruby
Ry0__ has quit [Remote host closed the connection]
realDAB has joined #ruby
nikeita has joined #ruby
sam19113 has quit [Quit: sam19113]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
resure has quit [Quit: ...]
resure has joined #ruby
Zai00 has quit [Quit: Zai00]
nikeita has quit [Client Quit]
resure is now known as Guest75908
sam19113 has joined #ruby
sam19113 has quit [Client Quit]
Guest75908 has quit [Client Quit]
sr78ger has joined #ruby
berkes has joined #ruby
<pontiki>
the utter silence you hear is because hardly anyone uses windows here....
tkuchiki has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 264 seconds]
viszu has joined #ruby
<MarcWeber>
pontiki: I'm preferring Windows, too
mary5030 has joined #ruby
resure_ has joined #ruby
resure_ has quit [Changing host]
resure_ has joined #ruby
<MarcWeber>
Still there are cases where you have to use Windows ..
sam113101 is now known as sam113101_afk
<pontiki>
of course
<pontiki>
i'm just saying ...
<pontiki>
well,
<pontiki>
IDK, i guess
resure_ is now known as resure
hanmac has joined #ruby
<terrellt>
I use windows.
<terrellt>
With a vagrant VM so I can get some damn work done.
<hanmac>
we are sorry for you ;P
kirun has joined #ruby
<masterasia>
MarcWeber: I've dealt with this
<masterasia>
it'll probably give you some bs about gem native extensions
<masterasia>
Or missing .so files
<masterasia>
Install the sqlite3 gem
<masterasia>
Think you'll have to move some libs around
itcharlie has joined #ruby
vlad_starkov has joined #ruby
sam113101_afk is now known as sam113101
includex has quit [Quit: Leaving...]
jibi has quit [Ping timeout: 240 seconds]
mahmoudimus has joined #ruby
fcanela has joined #ruby
sarkis has joined #ruby
saarinen has joined #ruby
codecop has joined #ruby
xcthulhu has quit [Quit: xcthulhu]
dankest has quit [Read error: Connection reset by peer]
sr78ger has quit [Quit: Qui]
Todd has joined #ruby
digitalcake has joined #ruby
dankest has joined #ruby
<digitalcake>
what does this do? class << NoResponse = Object.new
fridim_ has quit [Ping timeout: 260 seconds]
Todd has quit [Remote host closed the connection]
blackmes1 has joined #ruby
resure has quit [Quit: ...]
brunoro__ has joined #ruby
enebo has joined #ruby
beneggett has joined #ruby
<MarcWeber>
digitalcake: class << self extends class level stuff. Thus this will add class level stuff to NoResponse or the like
<MarcWeber>
Needless to say that python just ships with sqlite.dll ..
<zendeavor>
batteries included.
resure has joined #ruby
<pontiki>
MarcWeber -> #python
<digitalcake>
Thanks MarcWeber, I guess I still need to learn about class meta
cha1tanya has joined #ruby
greenhyper has quit [Ping timeout: 250 seconds]
kpwz has joined #ruby
amacgregor has joined #ruby
spidergears has joined #ruby
maniacal has joined #ruby
superscott[8] has joined #ruby
mansi has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
mikitaka has joined #ruby
realDAB has quit [Quit: realDAB]
jerius_ has joined #ruby
ravster has joined #ruby
will_b has joined #ruby
<mikitaka>
quick q, when using <<identifier how can I print a variable or execute a method within the multi line string <<eos?
jlebrech has quit [Quit: Ex-Chat]
berkes has quit [Read error: Connection reset by peer]
jerius has quit [Ping timeout: 240 seconds]
berkes_ has joined #ruby
spectre| has joined #ruby
marcdel has joined #ruby
rodacato has quit [Remote host closed the connection]
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
jprovazn has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
Xeago has joined #ruby
<pontiki>
use interpolation: #{variable} or #{method}
cj3kim has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Remote host closed the connection]
chjunior has joined #ruby
<mikitaka>
thx pontiki :D
ravster has quit [Remote host closed the connection]
berkes_ is now known as berkes
sleetdrop has quit [Quit: Computer has gone to sleep.]
berkes has quit [Remote host closed the connection]
f1gjam has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
<f1gjam>
hey guys, I have a question. I want to be able to make hash's based on a array list contents
<digitalcake>
ok so I think I found what it is, it looks like its a anonymous (singleton)
<f1gjam>
so for example, i get the array list generated from a rest call, which creates a array list of [a, b, c] etc… then I want to use those values to create a = hash.new, b = hash.new etc...
ewnd9 has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
vlad_starkov has joined #ruby
<pontiki>
f1gjam: look at the #each method
maxmanders has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
Norsken has joined #ruby
haxrbyte has joined #ruby
bradsmith has quit [Remote host closed the connection]
<f1gjam>
pontiki: i did this Parallel.each(roles.keys, :in_threads => 4) do |role_name|
<f1gjam>
role_name = Hash.new(#{role_name})
qubit has joined #ruby
<f1gjam>
don't i need to do #{role_name} =
<pontiki>
no
<pontiki>
what is Parallel?
nadirvardar has joined #ruby
ehc has joined #ruby
<pontiki>
and where does roles come from?
vlad_starkov has quit [Remote host closed the connection]
dominikh1 is now known as dominikh
<f1gjam>
it parallelises loops
<f1gjam>
roles is a array created from a returned rest call
interactionjaxsn has joined #ruby
ehc has quit [Client Quit]
burlyscudd has quit [Ping timeout: 246 seconds]
<f1gjam>
i guess i need to work out instance variables
<pontiki>
if roles is an array, it doesn't have keys
<pontiki>
keys go with hashes
ehc has joined #ruby
razi has quit [Ping timeout: 268 seconds]
maxmanders has quit [Ping timeout: 248 seconds]
Kricir has joined #ruby
<f1gjam>
what I am doing is, take the values of the array
x1337807x has joined #ruby
<f1gjam>
as the name of the variable which is a hash
senayar has quit [Remote host closed the connection]
<f1gjam>
array = [a, b ,c ]
<pontiki>
stop
nadirvardar has quit [Max SendQ exceeded]
<f1gjam>
a = hash.new
<pontiki>
you may think you're doing that
senayar has joined #ruby
<pontiki>
but that's not the code you just presented
<f1gjam>
sure
mercwithamouth has joined #ruby
<f1gjam>
thats what I am asking how to do
<qubit>
I've got a script which is reading from stdin, I want to put in a SIGINT/SIGTERM handler so it will finish processing and then exit. In the signal handler I have it closing $stdin so it wont accept any more data. But when I try to read the remaining data from the stream, I just get a "closed stream (IOError)" message. (Sample code: http://dpaste.com/1318583/). Is there any way of grabbing this buffered data from the object?
jonahR has joined #ruby
nadirvardar has joined #ruby
<pontiki>
f1gjam: what are a, b, and c?
<pontiki>
strings? symbols?
<f1gjam>
strings
PhatBaja has joined #ruby
xcthulhu has joined #ruby
mwmnj has joined #ruby
Gate_ has quit [Ping timeout: 276 seconds]
thibauts has left #ruby [#ruby]
Gate has joined #ruby
Gate has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<pontiki>
there is probably a way to make local variables like that, but i can't think of it
bradsmith has joined #ruby
<pontiki>
if you just run them through eval, you lose them because they're local to the eval block
PhatBaja1 has joined #ruby
PhatBaja1 has quit [Client Quit]
PhatBaja has quit [Read error: Connection reset by peer]
<pontiki>
you could make global or instance variables
PhatBaja has joined #ruby
shevy2 has joined #ruby
petru_ is now known as petru
shevy2 is now known as shevy
petru has quit [Changing host]
petru has joined #ruby
<shevy>
hey
xpirator has joined #ruby
<shevy>
ruby-2.0.0p247
vlad_starkov has joined #ruby
<shevy>
num2int.c: In function 'print_num2ull':
<shevy>
num2int.c:94:21: error: expected ')' before 'PRI_LL_PREFIX'
<pontiki>
are you trying to concatenate those things?
benweint has joined #ruby
m00dy has quit [Ping timeout: 268 seconds]
trepidaciousMBR has joined #ruby
<pontiki>
and why is NUM2ULL a constant?
s2013 has joined #ruby
kevinykchan has quit [Write error: Connection reset by peer]
<s2013>
has anyone read the book practical oo design in ruby
<shevy>
pontiki no, that is the official ruby-2.0.0p247 source
rickruby has quit [Remote host closed the connection]
<pontiki>
not yet, it's on my todo
AkashicLegend has quit [Quit: AkashicLegend]
<pontiki>
oh, that's C, not ruby
<wuest>
I've heard nothing but very good things, s2013.
<pontiki>
sorry
<shevy>
yeah
nari has quit [Ping timeout: 264 seconds]
jerius_ has quit [Ping timeout: 276 seconds]
nadirvardar has quit [Ping timeout: 263 seconds]
<shevy>
the ruby core team no longer knows C :(
<s2013>
wuest, cool i ordered it and it just came. but i dont know if its for a beginner or more advanced
<s2013>
im somewhere between beginner and intermediate
<pontiki>
s2013: i've heard nothing but goodness
jerius has joined #ruby
<wuest>
You are never too [un]skilled to learn something from a well-written text.
ayonix has joined #ruby
<pontiki>
wuest++
<s2013>
cool. im excited.
<s2013>
i read through the well grounded rubyist which was a great book
<onewheelskyward>
shevy I didn't have that problem compiling p247.
geggam_ is now known as geggam
Rix has quit [Ping timeout: 240 seconds]
<wuest>
I just compiled p247 via rvm this morning. Is there an issue with it?
<s2013>
the book is surprisingly short
* wuest
just connected to this bnc, lacks context
<shevy>
onewheelskyward yeah, I think there may be some setting or other library causing that, I remember I used to be able to compile p247 on another machine too
lorn has joined #ruby
<wuest>
s2013: Programming Pearls is another good one (not ruby, but the lessons apply everywhere)
<shevy>
right now I am stuck on glibc 2.17 and gcc 4.8
<onewheelskyward>
shevy ah I was going to ask which compiler.
<s2013>
oh ok
Gate has quit [Ping timeout: 240 seconds]
Gate has joined #ruby
Gate has joined #ruby
Gate has quit [Changing host]
alvaro_o has joined #ruby
Xeago has quit [Remote host closed the connection]
<shevy>
anyone knows if it is possible to search all ruby projects / remote gems for specific keywords?
<shevy>
for instance "give me all ruby projects that have the tag: shell"
Xeago has joined #ruby
<pontiki>
other than throwing that at google, no clude
<pontiki>
clue*
<wuest>
Yeah, google is our cpan shell afaik
devoldmx3 has joined #ruby
Ry0_ has joined #ruby
<onewheelskyward>
remote gems? Don't know. Local gems, easy.
<shevy>
hehe
devoldmx27 has joined #ruby
<shevy>
always the google :D
io_syl has joined #ruby
rodacato has joined #ruby
<onewheelskyward>
google all the things
lebek has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
lsmola has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
devoldmx3 has quit [Ping timeout: 264 seconds]
devoldmx27 has quit [Read error: Connection reset by peer]
alex__c2022 has quit [Quit: alex__c2022]
rickruby has joined #ruby
Ry0__ has joined #ruby
<shevy>
anyone working on a cool ruby project lately?
<bricker>
Which of the two lines in the "full_path" method is a) is better? I know they're basically the same, more looking for opinion or which is more semantic
tjbiddle has joined #ruby
Ry0_ has quit [Ping timeout: 240 seconds]
<bricker>
er
<tjbiddle>
I'm using a gem that's writing to stderr. Is there a way I can suppress that? (I'm writing a CLI tool and it's cluttering output)
<tjbiddle>
bricker: Hm. Tried the ActiveSupport approach to no avail. Copied the silence_stream function and then wrapped the gem I was calling in silence_stream(STDERR) do (Another block for stdout - then the gem call) end.
<hanmac>
the bug is an 1.9.3+ and was fixed yesterday, good that i find it (but come on ... how except for me would test that?)
<hanmac>
tjbiddle: #rubyonrails ?
<tjbiddle>
Hanmac: No. This is a CLI ruby app - bricker just suggested I look at ActiveSupport as an example.
Kricir has quit [Remote host closed the connection]
<wuest>
Unless it's a windows thing; I don't know what windows's black hole is.
<onewheelskyward>
c:\
<onewheelskyward>
:D
<hanmac>
use $stderr.reopen(File::NULL, "w")
<tjbiddle>
wuest: 'NUL:'
forrest has joined #ruby
<tjbiddle>
Hanmac: Ah, that'd cover both?
burlyscudd has joined #ruby
rhys_ has joined #ruby
<wuest>
I forgot about File::NULL
<tjbiddle>
What's the original $stderr, so that I can set it back to what it was? (Or can I just std_temp = $stderr)?
<wuest>
You cannot use std_temp = $stderr
axl_ has joined #ruby
<hanmac>
you can use $stderr.dup
aces1up has quit []
rhys has quit [Ping timeout: 264 seconds]
rickruby has quit [Remote host closed the connection]
<tjbiddle>
Hm, is $stderr accessible so that I can write back $stderr = std_temp (after having std_temp = $stderr.dup)
devoldmx has joined #ruby
<wuest>
tjbiddle: no. If you do std_tmp = $stderr, then reopen, both std_tmp and $stderr will point to devnull. You need to dup $stderr to get what you want.
Ry0__ has quit [Remote host closed the connection]
<tjbiddle>
onewheelskyward: Thanks - I'll check into that.
<tjbiddle>
Thanks everyone - I'm going to bolt to lunch before my coworkers give me crap for making them wait :p I'll report back after. Much appreciated!
<wuest>
Good luck, tjbiddle
rhys_ has quit [Ping timeout: 246 seconds]
devoldmx3 has joined #ruby
akashj87 has joined #ruby
hashpuppy has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
mary5030_ has joined #ruby
ehc has quit [Quit: ehc]
ehc has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 276 seconds]
hashpuppy has quit [Client Quit]
duper has joined #ruby
digitalcake has quit [Quit: Leaving.]
benweint has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby
Mars has joined #ruby
BizarreCake has quit [Ping timeout: 246 seconds]
Mars is now known as Guest87546
vlad_starkov has quit [Ping timeout: 246 seconds]
rippa has quit [Ping timeout: 248 seconds]
i_s has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Mars` has quit [Ping timeout: 248 seconds]
rodacato_ has quit [Remote host closed the connection]
apes has joined #ruby
rhys_ has joined #ruby
enebo has quit [Ping timeout: 264 seconds]
JaTochNietDan has quit [Ping timeout: 264 seconds]
johnnyfuchs has quit [Remote host closed the connection]
itcharlie has joined #ruby
viszu has joined #ruby
akashj87_ has joined #ruby
danbeck has joined #ruby
staafl has quit [Read error: Connection reset by peer]
opus has joined #ruby
staafl has joined #ruby
jprovazn has quit [Quit: Odcházím]
<shevy>
onewheelskyward quite the opposite, I always update to the very latest and greatest! :)
v0n has quit [Ping timeout: 268 seconds]
jonkri has quit [Quit: jonkri]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maxmanders has quit [Quit: Computer has gone to sleep.]
i_s has quit [Ping timeout: 240 seconds]
akashj87 has quit [Ping timeout: 246 seconds]
akashj87 has joined #ruby
sailias has quit [Ping timeout: 256 seconds]
burlyscudd has quit [Ping timeout: 246 seconds]
Kricir has joined #ruby
sayan has quit [Quit: Leaving]
chkumar has joined #ruby
sayan has joined #ruby
spundun has joined #ruby
spundun has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
Astral_ has joined #ruby
yfeldblum has joined #ruby
<spundun>
I think this is more of an RoR question. But I'm not getting any response in that channel. So trying my luck here. ActionControllers(a class) and it's derivatives can access a hash(something called a HashWithIndifferentAccess) called params in ror. I am trying to figure out if params is a local variable, global variable, class variable or something else. How do I go about figuring this out in Ruby?
brunoro__ has quit [Ping timeout: 264 seconds]
Astral_ has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
<spundun>
the name params seems to suggest the "local variable" scope. But I am able to use it without ever initializing, so I'm confused as to how can it be a local variable.
<spundun>
I'm able to use it within that class "class PostsController < ApplicationController"
akashj87 has quit [Ping timeout: 246 seconds]
<spundun>
Am I making sense? am I asking the question in the right way? Can I ask it in a different way so that I would get a response?
lnormous has quit [Ping timeout: 256 seconds]
sarkis has quit [Ping timeout: 246 seconds]
i_s has joined #ruby
v0n has joined #ruby
huttan has quit [Remote host closed the connection]
<AzizLight>
tjbiddle: Thanks a lot for the help ;)
<tjbiddle>
AzizLight: Np :)
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
viszu has quit [Quit: Leaving.]
nbouscal has joined #ruby
Kricir has joined #ruby
<spundun>
tjbiddle: back from lunch.
<tjbiddle>
spundun: To answer your question from previously - You can call `params` in any method of your controller. It's a hash, so you can call things like `params[:id]` and it will return whatever id was set to.
mary5030_ has quit [Remote host closed the connection]
<spundun>
thanks, that's what I had observed, so it's nice to get a confirmation on that.
<tjbiddle>
As to how it's actually implemented - Not sure off the top of my head, I'd need to look - I would assume it's something in ApplicationController::Base as an attr_accessor
goshakkk has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
<spundun>
oh ok,
<spundun>
so it *is* an instance variable being accessed through an attribute accessor
<tjbiddle>
spundun: Yeah - it's a neat feature. As an FYI I generally like to `puts params` when I'm dealing with any data with it from the start - helps to debug things a lot faster. For example if you're doing a post on a form you'll end up seeing things like params = { :user => { :data1 => 'test', :data2 => 'test2' } } and may throw you off as the info you want is actually a hash in a hash.
<tjbiddle>
spundun: I'm guessing that it is - You'd need to look at the rails code to verify that.
mahmoudimus has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
tgunr has quit [Quit: Nity nite]
<tjbiddle>
Everything is inheriting from ActionController::Base and you can call it like a method - So I'm under that assumption.
<spundun>
is there any introspection feature that could tell me exactly what params is? I tried to render params.inspect , that only rendered a big hash
<wuest>
tjbiddle: sorry, was AFK. I don't, what do you need to know?
xcthulhu has quit [Quit: xcthulhu]
<spundun>
tjbiddle: ok
realDAB has quit [Quit: realDAB]
<tjbiddle>
spundun: Looks like it's not that simple
bionoid has quit [Remote host closed the connection]
freerobby has joined #ruby
ehaliewicz has joined #ruby
smathieu_ has joined #ruby
Senjai has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
cliffstah has joined #ruby
mansi has quit [Read error: Connection reset by peer]
ayonix has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
saarinen has joined #ruby
ayonix has joined #ruby
ayonix has quit [Remote host closed the connection]
Senjai is now known as richardcw
ebanoid has quit [Quit: brbomgwtfbbq]
bionoid has joined #ruby
timonv has joined #ruby
Vert has joined #ruby
<spundun>
tjbiddle: Finally! "render text: self.method(:params).source_location" gave me the output "["/Users/spundun/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_controller/metal/strong_parameters.rb", 509]"
rdg has quit [Quit: [quit]]
realDAB has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
p0wn3d has quit [Remote host closed the connection]
realDAB has quit [Client Quit]
ndrei has quit [Ping timeout: 248 seconds]
TIJ has quit [Ping timeout: 256 seconds]
cj3kim has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
postmodern has joined #ruby
nadirvardar has quit [Ping timeout: 276 seconds]
_maes_ has joined #ruby
<reactormonk>
how do I clear an array?
mwmnj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
jonkri has joined #ruby
nadirvardar has joined #ruby
spectre| has quit [Quit: Leaving.]
<spundun>
a=[] ?
<spundun>
reactormonk:
senayar has joined #ruby
<spundun>
try it, not sure if it'll work though
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
<pontiki>
array.clear
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
d45h has quit [Quit: d45h]
superscott[8] has quit [Quit: superscott[8]]
mansi_ has quit [Read error: Connection reset by peer]
senayar_ has quit [Ping timeout: 246 seconds]
Spooner has quit [Read error: Connection reset by peer]
Spooner_ has joined #ruby
senayar_ has joined #ruby
mansi has joined #ruby
vikhyat has quit [Read error: Connection reset by peer]
breakingthings has quit [Quit: breakingthings]
AkashicLegend has quit [Quit: AkashicLegend]
failshell has quit [Remote host closed the connection]
AzizLight has quit [Ping timeout: 256 seconds]
vikhyat has joined #ruby
undert_ has quit [Read error: Operation timed out]
bier has quit [Read error: Operation timed out]
ping-pong has quit [Read error: Operation timed out]
epta has quit [Read error: Operation timed out]
undert has joined #ruby
cisco has joined #ruby
patronus_ has joined #ruby
workmad3 has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
yellow5 has quit [Ping timeout: 256 seconds]
ged has quit [Read error: Connection reset by peer]
patronus has quit [Read error: Operation timed out]
Davey has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 276 seconds]
ged_ has joined #ruby
yellow5 has joined #ruby
epta has joined #ruby
emptymag00 has joined #ruby
tehlers has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<pontiki>
hum... --verbose generally isn't *that* verbose, just the sort of info i think someone might want to see that something is operating, and not just sitting around
<riceandbeans>
tjbiddle: in *BSD yes, in GNU/Linux it works fine
dpritchett has quit [Quit: Leaving]
<pontiki>
--debug i tend to put a bit more, but still not all that much, just the things i would need to help figure out when something goes wrong
Dany has joined #ruby
<tjbiddle>
riceandbeans: Interesting. You said you compiled your own ruby, right? Same result with whatever is from your package manager?
urielable has joined #ruby
Xiti has quit [Quit: Leaving]
Xiti has joined #ruby
<tjbiddle>
pontiki: Just have something like message('info', "message here") or message('debug', 'message here') and your message function just prints out dependent upon whether the flag was selected?
Dany has left #ruby [#ruby]
khismetix has joined #ruby
<pontiki>
i use logger, so yeah
<pontiki>
one thing i use a lot in debug messages is caller
<pontiki>
so i get nice location info
BlakeRG has joined #ruby
heftig has joined #ruby
cj3kim has joined #ruby
Guest87546 is now known as Mars`
<pontiki>
so --verbose sets the level to Logger::INFO and --debug set the level to Logger::DEBUG
nisstyre has quit [Quit: Leaving]
<pontiki>
otherwise the level is set to Logger::WARN
mary5030 has quit [Remote host closed the connection]
NealJ has quit [Quit: :c]
Pengoo has quit [Read error: Connection reset by peer]
ffranz has quit [Quit: Leaving]
<pontiki>
i pass in the logger to the lib, setting it in the bin
<pontiki>
so i can use the lib with or without a logger
<pontiki>
or so i can pass in Rails.logger, for example
<tjbiddle>
pontiki: Ah, cool. So when instantiating the app I'd create a logger object and then set the level to whatever is specified. So if I set it to Logger::Debug all messages will be shown, but if I only set it to warn then only warn, error, and fatal will show?
xjunior has quit [Ping timeout: 256 seconds]
<pontiki>
yup yup
<tjbiddle>
pontiki: Awesome :) Thanks!
havenwood has quit [Remote host closed the connection]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
JZTech101 has joined #ruby
elux has quit [Quit: Leaving...]
Ry0_ has quit [Remote host closed the connection]
mansi has joined #ruby
ayonix_ has quit [Quit: No Ping reply in 180 seconds.]
havenwood has joined #ruby
ayonix has joined #ruby
<pontiki>
nw
bluOxigen has quit [Ping timeout: 264 seconds]
gazarsgo has quit [Quit: gazarsgo]
digitalcake1 has quit [Quit: Leaving.]
xcv has quit [Remote host closed the connection]
fcanela has quit [Ping timeout: 256 seconds]
forrest has quit [Quit: Leaving]
x1337807x has joined #ruby
timonv has quit [Remote host closed the connection]
jonathanwallace1 has joined #ruby
nkts has joined #ruby
mansi has quit [Ping timeout: 276 seconds]
m8 has quit [Quit: Sto andando via]
decoponio has quit [Read error: Connection reset by peer]
pkrnj has joined #ruby
mmitchell has quit [Ping timeout: 260 seconds]
decoponio has joined #ruby
opus has joined #ruby
<riceandbeans>
tjbiddle: it wasn't available in the *BSD package managers I had the issues with
x1337807x has quit [Client Quit]
pontiki has quit [Quit: off to cook dinner]
joshmyers has joined #ruby
asobrasil has left #ruby [#ruby]
brennanMKE has quit [Remote host closed the connection]
trepidaciousMBR has quit [Quit: trepidaciousMBR]
<joshmyers>
hey guys, I know prob not the exact right room but
<joshmyers>
anyone know how can I center an image in haml for a sinatra app? %img(src="link) ?
guiocavalcanti has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
wsterling has quit [Remote host closed the connection]
<apeiros>
joshmyers: you use css and probably google
riceandbeans has quit [Quit: riceandbeans]
mahmoudi_ has joined #ruby
baordog has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Ping timeout: 264 seconds]
fuhgeddaboudit has quit [Ping timeout: 246 seconds]
mwmnj has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
mklappstuhl has joined #ruby
mwmnj has quit [Client Quit]
devoldmx3 has joined #ruby
devoldmx27 has joined #ruby
guiocavalcanti has quit [Ping timeout: 276 seconds]
devoldmx has quit [Ping timeout: 256 seconds]
senayar_ has quit [Remote host closed the connection]
danbeck has quit [Quit: danbeck]
<_br_>
Anyone have an idea how to turn an array into a DataMapper::Collection ?
<_br_>
I ask because I want to leverage the nifty dm-pager and it requires a DataMapper::Collection I think.
theRoUS has quit [Ping timeout: 246 seconds]
devoldmx3 has quit [Ping timeout: 248 seconds]
marcdel has joined #ruby
bobdobbs has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
fcanela has joined #ruby
rhys_ has quit [Quit: Leaving]
realDAB has quit [Quit: realDAB]
chrstphrhrt has joined #ruby
<_br_>
Never mind, thanks.
mahmoudimus has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
goodmanio has joined #ruby
JaTochNietDan has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
cnrk has joined #ruby
spundun has quit [Remote host closed the connection]
mahmoudi_ has quit [Ping timeout: 240 seconds]
jonathanwallace1 has quit [Ping timeout: 240 seconds]