<avdi>
Ox0dea: unfortunately, this is (as far as I know) the most idiomatic way to do it. It's a an ongoing annoyance to me. I should probably submit a patch of some kind.
FernandoBasso has quit [Quit: May the force be with you.]
Yzguy has joined #ruby
<Ox0dea>
avdi: That it's broadly applicable (Float, Complex, and Rational are also methods, for instance) is appealing, but its being the anomalous case where exceptions for control flow is The Right Thing grates a little.
failshell has quit [Ping timeout: 245 seconds]
ChasedSpade has quit [Quit: No reason specified.]
ChasedSpade has joined #ruby
<avdi>
Indeed.
<ght>
Indeed, sir.
<baweaver>
handy that there's a major version coming up where changes like this may be more applicable.
lessless has joined #ruby
Yzguy has quit [Client Quit]
IrishGringo has joined #ruby
<baweaver>
though that magic comment sounds kinda spooky.
<baweaver>
(compat mode for non-immutable strings run through 3.x parsers)
frankS2 has joined #ruby
pietr0 has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
bricker has quit [Ping timeout: 240 seconds]
dagda1 has joined #ruby
zenguy_pc has quit [Ping timeout: 252 seconds]
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
sargas has joined #ruby
northfurr has quit [Client Quit]
chouhoul_ has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
<shevy>
hmm the first one has no speed comparison or?
freerobby has quit [Quit: Leaving.]
sdfgsdfg has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
<ght>
Just in case your'e talking to me, from the first link:
sdfgsdfg has joined #ruby
<ght>
"However, one might argue that it’s like comparing apples and oranges. It would be more fair to compare Ruby with another language of similar nature. A great candidate for such confrontation is Python. It’s a dynamically-typed, interpreted language, just as Ruby. In the distant, ancient times of Ruby 1.8, the faster of two languages was Python. The difference wasn’t nearly as huge as with C++, but it was there. However, the Release of version 1.9 o
<ght>
I"m sure that was cut off, but basically it says what you said, taht Ruby was slow back in 1.8, slower than Python, but has been speeding up with each release.
sdfgsdfg has quit [Client Quit]
iamninja has quit [Ping timeout: 252 seconds]
<shevy>
this jeremy evans is weird... "It needs to be painful to use libraries that don't support frozen string literals"
sdfgsdfg has joined #ruby
<shevy>
"No library should be mutating a string they don't own as a side effect"
<shevy>
this is no longer ruby then or?
<shevy>
ght sorry, I am sometimes talking to myself :) the first one, the speed comparison question was indeed meant to you, he seems to only draw some connections to "if site xyz is using ruby then it can not be bad", in that speed subsection of his blog
<shevy>
debian alioth used to have good speed comparisons
rbennacer has quit [Remote host closed the connection]
wprice has joined #ruby
user1138_ has joined #ruby
user1138 has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
clinton has joined #ruby
clinton has quit [Client Quit]
IrishGringo has joined #ruby
inteq has joined #ruby
rbennacer has joined #ruby
<Ox0dea>
What's the cleanest way to make `exec "ruby #$0"` not go forever?
dorei has quit []
Asher has joined #ruby
<Ox0dea>
Ideally without introducing any variables.
<ght>
So we just landed our first cross-platform mobile app client, and considering all the work we do in ruby and RoR, I was considering using RubyMotion for the app development.
<ght>
Any of you guys work with RubyMotion much for cross-platform app dev? The app isn't very complicated.
<pipework>
Ox0dea: Acquire pid, write pid to file with timestamp, kill after n times have passed
<ght>
Anyone here have any general thoughts or feedback on RubyMotion? Any professional experience utilizing it?
greencoder has joined #ruby
<greencoder>
Is there any way to shorten this line of code: @theme_name = @theme_name.split.map(&:capitalize).join(' ')!
<pipework>
Neither. I don't support their model.
<greencoder>
oops ignore the ! at the end
ruby-lang867 has joined #ruby
<ght>
pipework: Thank you for the feedback, care to elaborate?
<ght>
You don't support their model? What do you mean?
chipotle has quit [Ping timeout: 244 seconds]
<ght>
On one hand, it looks nice on the surface, on the other I notice the community isn't massive, which is a little disconcerting, we like a large, active community when possible.
<pipework>
ght: The last time I looked, I had to pay to develop with it.
<ght>
Which is why Rails was attractive.
<ght>
pipework: You do, yes.
<ght>
So that's the issue?
<pipework>
It's why I didn't look any further into it.
<pipework>
I don't know how fantastic it is.
<ght>
I see, thank you.
clarkenciel has quit [Ping timeout: 240 seconds]
<shevy>
Ox0dea I still haven't understood the discussion between mutable versus non-mutable
<ght>
Ox0dea: Do you have or does anyone you know have experience with RubyMotion/
<ght>
?
<Ox0dea>
I'm afraid I don't.
<ght>
No worries, thank you.
<Ox0dea>
Sure thing.
Porfa has quit [Quit: Porfa]
<Ox0dea>
Ruby is unlikely to become a popular choice for app development any time soon. :/
<ght>
Sure.
<greencoder>
Ox0dea: I meant is there a way that I don't have to repeat the @theme_name twice in the expression?
<greencoder>
I know Ruby has the ! operator but I don't think I can use it in this case
<Ox0dea>
greencoder: Note well the difference between the ! operator and "bang methods".
<pipework>
greencoder: gsun!
<pipework>
gsub!
<Ox0dea>
greencoder: You can't turn a String into an Array and back again without reassignment, no.
<pipework>
If you don't mind modifying the string in place.
txdv_ has joined #ruby
christiandsg has quit [Remote host closed the connection]
<greencoder>
Ox0dea: Yeah, and alright thanks for the tip!
<Ox0dea>
No worries.
txdv has quit [Ping timeout: 250 seconds]
msnyon has joined #ruby
<Ox0dea>
greencoder: Are you not allowed to use regular expressions? :P
christiandsg has joined #ruby
<greencoder>
Ox0dea: Nah I can use it lol. I was just wondering if there was a way around reassignment. I'm prob gonna go with that method you showed me, thanks a lot
Spami_ has joined #ruby
<Ox0dea>
Fantastique.
<Ox0dea>
Note well that upcasing the first letter isn't quite the same as #capitalize, but I suspect the difference to be irrelevant for your purpose here.
yqt has quit [Ping timeout: 255 seconds]
<pipework>
#titleize from Activesupport?
rbennacer has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
<Ox0dea>
greencoder: For what it's worth, you *can* change the class of an object in-place with Fiddle, but then the data at that memory location becomes gibberish.
<Ox0dea>
Unless you use Fiddle to modify the memory as well. :)
<Ox0dea>
But that's devious and likely to get a few kittens killed.
zenguy_pc has quit [Ping timeout: 250 seconds]
dopie has joined #ruby
<greencoder>
I shall stray away from that path then
christiandsg has quit [Remote host closed the connection]
<al2o3-cr>
heh
<al2o3-cr>
cocker
<pipework>
spaniel?
<al2o3-cr>
maybe
Ropeney has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
<al2o3-cr>
Ox0dea: jeez
Meeh has quit [Read error: Connection reset by peer]
<al2o3-cr>
Ox0dea: You might want to that to some use!
Motoservo has quit [Quit: Motoservo]
Meeh has joined #ruby
<Ox0dea>
I'm gonna need a translator.
<al2o3-cr>
Ox0dea: you read very clear
netz has joined #ruby
<netz>
hallo o/
<Ox0dea>
\o
<netz>
anyone care to point me at a good regex guide/tech spec/etc in pdf format I can load on my android and read on break at work?
<al2o3-cr>
?code netz
<ruboto>
netz, We can't help you without your code, please post it to https://gist.github.com
<netz>
no code yet. I don't really know regex but I get the feeling I need it for a project I'm cooking in my head.
darwingr has joined #ruby
<netz>
are regex's more or less the same in every language, aside from the language specific syntax?
<al2o3-cr>
netz: similar
<bougyman>
sometimes similar
christiandsg has quit [Ping timeout: 265 seconds]
<pipework>
netz: Ruby's regex isn't standard and doesn't support everything.
<netz>
so what scripting language would you suggest that is standard and supports most everything?
<bougyman>
loaded question
<bougyman>
pcre is used in a ton of things.
eggoez has joined #ruby
yatish27 has joined #ruby
<netz>
I found a site txt2re.com or the like that can generate them for you based on a text sample, but I'd rather learn how to actually do it
<bougyman>
Which is the exported perl compatible regular expressions.
<netz>
ooo nifty, I've always wanted a reason to learn perl :)
<bougyman>
there's a book called Mastering Regular Expressions that's worth a read if you really want to learn regex.
grenierm has joined #ruby
<bougyman>
tons of online resources, too, of course.
<ght>
At some point I need to sit down and memorize regex.
<pontiki>
really good book, bougyman
<bougyman>
regex isn't something to memorize.
<al2o3-cr>
^true
amystephen has quit [Quit: amystephen]
Torrieri has joined #ruby
Torrieri has joined #ruby
<netz>
true to what, something to not memorize?
<al2o3-cr>
ask Mr 110111101010
<Ox0dea>
Hey, that's me!
<pontiki>
most regexp syntax can certainly be memorized; must like any other language syntax
<bougyman>
the more I learned regular expressions, the less I found myself using them in code.
<pontiki>
but the more advanced uses i still look up
<bougyman>
memorizing the syntax, sure.
<Ox0dea>
pontiki: How many \p{} groups do you know? :)
<netz>
I get the feeling this project is going to need lots of regular expresions :P
<pontiki>
almost none
<bougyman>
netz: theyn you're probably doing it wrong.
<bougyman>
pontiki: do you know all the [[:alpha:]] variants of character classes?
<pontiki>
nope
<Ox0dea>
bougyman: They're basically all the ones from ctype.h, no?
modern has joined #ruby
modern has joined #ruby
<pipework>
I'm fond of removing regular expressions from codebases unless they make heavy use of Regexp.union
<pontiki>
i know alpha, alnum, punct, space, digit off the top
<al2o3-cr>
^yeah
<netz>
basic idea is a bit of reverse engineering (how the hell do you spell that... never get it right) automation. I have say a binary foo; and i have partial source code to that binary, so I'd disassemble foo and compare it to the disassembly of the object files, hopefully in a semi-automated fashion
<pontiki>
but when i go look at the regexp in the URI module i am deeply humbled
yfeldblum has quit [Ping timeout: 244 seconds]
riotjones has joined #ruby
<pipework>
pontiki: It's a lot easier to be humble when you're intimidated as fuck.
<pipework>
amirite
<pontiki>
idk; i don't feel intimidated by them...
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman>
when I see a big bad regex I just run it through a little awk I have that turns it into pretty /x mode.
<bougyman>
then I comment it.
<al2o3-cr>
`resolv` as got the best ipv4/6 regex
<pipework>
pontiki: You are a sturdier chum than I.
<pontiki>
pipework: YEARS of perl
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pipework>
pontiki: Regular expressions just feel like two-way puzzles. "How does it work? What the fuck is it really for?"
Cache_Money has joined #ruby
northfurr has quit [Quit: northfurr]
<pontiki>
they are sorta that; write only code
hmsimha__ has quit [Ping timeout: 265 seconds]
<bougyman>
what is it for? to confuse anyone who comes after you.
clarkenciel has joined #ruby
<pontiki>
in ruby, i find i use them hardly at all
<pontiki>
or i find i use really really simple ones in conjunction with better ruby methods
<bougyman>
if you really want job security, use a lot of /(?<var>fo+)/ =~ 'foobar'; p var
<bougyman>
"foo"
<pipework>
pontiki: I make larger more complex ones by using lots of Regexp.union and comments.
Motoservo has joined #ruby
riotjones has quit [Ping timeout: 244 seconds]
<bougyman>
it is nice to combine snippets with union when a monster is needed/warranted.
<pontiki>
i will explore union more; i haven't really looked at it at all
<pipework>
pontiki: I've been thinking that I should name my gems with a random uuid generated from an offline-only machine and then register domains with that uuid.
<pipework>
No more caring about if the gem name is taken.
Mojo_Nixon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies has quit [Ping timeout: 260 seconds]
<pontiki>
you might be mistaken for a russion cracker
<baweaver>
it's bad form to straight tell them to google their error messages
h4ckurate has quit [Quit: h4ckurate]
<baweaver>
even though that's pretty well what I'm doing and clicking the first link that looks relevant.
khebbie has joined #ruby
jas02 has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
<Radar>
<helpa>If you're going to tell someone to "Just google it" or "RTFM", tell them what terms to use on Google exactly, or link them to the place in the documentation.
<Radar>
^ It's why helpa has that rule.
chinmay_dd has joined #ruby
<Radar>
baweaver is doing the right thing :+1:
ruurd has joined #ruby
<baweaver>
Someone's been cheating on IRC with Slack.
aibo has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chinmay_dd has quit [Read error: Connection reset by peer]
<Radar>
Sure have,.
Macaveli has joined #ruby
darkf__ is now known as darkf
dented42_ has joined #ruby
<baweaver>
ah, TIL that Model.joins(:other).where(other: {name: 'foo'}) and Model.joins(:other).where('other.name = ?', 'foo') do different things
<miah>
sadly :/
<baweaver>
(don't feel like authing to rails right now)
<heyrhett>
apeiros: I just made this. http://githero.com/ If you write up the feature as an issue, I'd love to add it and help promote it
aspiers has joined #ruby
m3ow1504_x_io has joined #ruby
<apeiros>
ah, I thought you were looking for something to do yourself
<heyrhett>
I might do it myself :)
m3ow1504_x_io has quit [Max SendQ exceeded]
m3ow1504_x_io has joined #ruby
<heyrhett>
do you think issue 26 is a 4 hour issue? mind if I add it?
m3ow1504_x has quit [Ping timeout: 244 seconds]
<apeiros>
yes, I think it's quite probably solvable in 4h
<heyrhett>
ok, added apeiros !
zenguy_pc has quit [Ping timeout: 246 seconds]
oo_ has quit [Read error: Connection reset by peer]
m3ow1504_xx has joined #ruby
oo_ has joined #ruby
leafybasil has joined #ruby
wldcordeiro has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
m3ow1504_x_io has quit [Ping timeout: 260 seconds]
ruurd has quit [Quit: ZZZzzz…]
dfockler has joined #ruby
c0m0 has joined #ruby
[k- has joined #ruby
skade has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti>
Hi
zenguy_pc has joined #ruby
<bankair>
Salut, Georges
<adaedra>
Salut
djbkd_ has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 252 seconds]
<GeorgesLeYeti>
Salut bankair & adaedra
decoponio has joined #ruby
<bankair>
Guys, did someone give a try to dynamoid ? Is it painful to use ?
einarj has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 252 seconds]
livathinos has joined #ruby
<GeorgesLeYeti>
I'm using a websocket appliction where i'm suppose to send a 16'000 bits chunk audio file but in the other hand i'm receiving these audio files every 10 sec into a folder. But my problem is when i send the last chunk of these 10 sec audio file, the chunk size is bellow 16kbit and this mean to this websocket the end of file.
AlexAltea has joined #ruby
warmonk has joined #ruby
iateadonut has joined #ruby
postmodern has quit [Quit: Leaving]
<GeorgesLeYeti>
So I thougt about diffrente possibilities: 1st keep the last chunk and concat him with the next audio file. 2nd fill the last chunk with blank until it made 16kbit (don't find yet how to do this). 3rd (find this one ugly) Close the websocket and reopen it avec each 10 sec file.
UtkarshRay has quit [Remote host closed the connection]
rdark has quit [Read error: Connection reset by peer]
UtkarshRay has joined #ruby
msnyon has joined #ruby
devoldmx has joined #ruby
dumdedum has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
krz has quit [Read error: Connection reset by peer]
leat has joined #ruby
harryk has joined #ruby
<[k->
?ot Ox0dea
<ruboto>
Ox0dea, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<harryk>
hello
<apeiros>
hi harryk
warmonk has quit [Quit: Leaving]
dagda1 has joined #ruby
oo_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
Macaveli has quit [Read error: Connection reset by peer]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
oo_ has joined #ruby
Iskarlar has joined #ruby
rdark has joined #ruby
iamninja has joined #ruby
Guest80 has joined #ruby
bruno- has joined #ruby
pawnbox has joined #ruby
towski_ has joined #ruby
dagda1 has quit [Ping timeout: 260 seconds]
mutuma has joined #ruby
mutuma is now known as Pathfinder
roolo has joined #ruby
paradoja has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
arup_r has joined #ruby
stamina has joined #ruby
krz has joined #ruby
khebbie has quit [Remote host closed the connection]
<Ox0dea>
KINGSABRI: You know you can use CGI#header to access cookies, yes?
<Ox0dea>
You initially mentioned that you were having trouble properly parsing query parameters.
<Ox0dea>
Does PHP still make the kitchen sink available via $_QUERY? :P
<adaedra>
Maybe if you ask it in hebrew
<Ox0dea>
::
pawnbox has quit [Remote host closed the connection]
khebbie has joined #ruby
rodfersou has joined #ruby
<KINGSABRI>
Ox0dea: the cookies get sent by javascript to another server
pawnbox has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<KINGSABRI>
the server gets this cookies and store it in a text file
<Ox0dea>
KINGSABRI: You're trying to do PHP in Ruby.
<Ox0dea>
You should stop.
<KINGSABRI>
No no
<Ox0dea>
It's 2015.
alex88 has joined #ruby
<scepticulous>
^^
<KINGSABRI>
the main issue is exploiting xss and inject javascript to send the cookies to another server
<Ox0dea>
This guy.
<KINGSABRI>
the server has the cgi script
<alex88>
hi guys, the system command does some escaping in this case? https://gist.github.com/alex88/e52d93f6c6d55c256f80 since running it from command line it works fine, running it from ruby I get the error above
<KINGSABRI>
forget about php ,, I just tried php for PoC
Cust0sLim3n has quit [Ping timeout: 272 seconds]
<alex88>
maybe ..."-ldflags", "-w -X github.com/rancherio/rancher-compose/version.VERSION #{version}".. will still make the whole argument stick to the ldflags parameter?
<adaedra>
alex88: remove the single quotes from the system line?
workmad3 has joined #ruby
<alex88>
adaedra: what? won't make it -w the only parameter to ldflags?
<Ox0dea>
Yeah, the quotes need to remain.
<alex88>
Ox0dea: since with "-ldflags", "-w -X github.com/rancherio/rancher-compose/version.VERSION #{version}" it works, but I'm not sure system will make it a ldflags argument or it just concat the strings
eightfold has joined #ruby
mikecmpbll has joined #ruby
<adaedra>
er
<adaedra>
if you use the system with multiple arguments, it won't do shell interpretation, so giving arguments raw
jonee has quit [Ping timeout: 240 seconds]
arup_r_ has joined #ruby
<alex88>
oh wait, I've tried another thing: with ..."-ldflags", "-w -X github.com/rancherio/rancher-compose/version.VERSION #{version}"... in ruby it works
<alex88>
which from homebrew's output it seems to run "go build -ldflags -w -X github.com/rancherio/rancher-compose/version.VERSION 0.2.6 -o bin/rancher-compose "
<Ox0dea>
That's unlikely to be what you want?
<alex88>
but if I run that command exactly as it is in command line, I get a go exception
<Ox0dea>
Right, that was to be expected.
livathinos has quit [Ping timeout: 252 seconds]
<alex88>
Ox0dea: ok, so system sets the "-w.. etc" thing as an argument of "-ldflags"
<alex88>
as if I type -ldflags="-w...etc" in the terminal?
<adaedra>
alex88: the shell will remove the quotes an make it one argument, keeping the spaces. System will give the arguments directly, without further modification.
banister has joined #ruby
<alex88>
adaedra: ok, so it just concats the arguments?
<Ox0dea>
alex88: Ah! No '=' for -ldflags.
arup_r has quit [Ping timeout: 265 seconds]
<Ox0dea>
Just "-ldflags 'foo bar'"
christiandsg has joined #ruby
<adaedra>
alex88: no. It keeps arguments as an array and gives them directly to the called process.
<eightfold>
hello. i have installed jekyll via ruby gems like this: gem install jekyll --user-install
<alex88>
oh ok, so the 'foo bar' is a one argument of -ldflags for the shell
Zai00 has quit [Quit: Zai00]
<eightfold>
how should i update it correctly?
<Ox0dea>
Right.
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alex88>
Ox0dea: ok thanks, so it's what I wanted
<alex88>
thanks adaedra
<eightfold>
i’m so burned by failed ruby/gem installations
<Ox0dea>
alex88: Yep, should do.
<Ox0dea>
You're forgiven for assuming that a "long arg" would need the equal sign. :)
<Ox0dea>
Then again, that's probably why the Go team chose to prefix it with a single hyphen.
anisha has quit [Ping timeout: 256 seconds]
anker has quit [Quit: Lost terminal]
eiGHttt has quit [Quit: eiGHttt]
Cust0sLim3n has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
Iskarlar has joined #ruby
sdothum has joined #ruby
einarj has joined #ruby
ferhaty has joined #ruby
jonee has joined #ruby
rikkipitt has quit [Quit: Leaving...]
lulzmachine has joined #ruby
troulouliou_div2 has joined #ruby
anisha has joined #ruby
arup_r_ has quit [Remote host closed the connection]
JoshuaPaling has joined #ruby
Kallis has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has joined #ruby
unsymbol_ has quit [Quit: cheerio]
unsymbol has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
AlexRussia_ has quit [Quit: WeeChat 1.3-dev]
leafybasil has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
leat has quit [Remote host closed the connection]
hs366 has quit [Read error: Connection reset by peer]
leat has joined #ruby
pranny has joined #ruby
bruno- has joined #ruby
arup_r has joined #ruby
catoblepa has quit [Ping timeout: 272 seconds]
catoblepa has joined #ruby
catoblepa has quit [Changing host]
catoblepa has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
livathinos has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
penso has joined #ruby
pranny has quit [Remote host closed the connection]
Iskarlar has joined #ruby
astrobunny has quit [Remote host closed the connection]
Zai00 has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<penso>
I can't figure out why I can't require something working on its own
axsuul has joined #ruby
ios_--- has quit [Quit: Leaving]
benlovell has joined #ruby
rushed has quit [Remote host closed the connection]
rushed has joined #ruby
krz has quit [Read error: Connection reset by peer]
dagda1 has quit [Read error: Connection reset by peer]
dagda1 has joined #ruby
rushed has quit [Ping timeout: 272 seconds]
rushed_ has joined #ruby
leat has quit [Quit: leat]
rushed_ has quit [Client Quit]
skade has joined #ruby
krz has joined #ruby
benlovell has quit [Ping timeout: 244 seconds]
JaReAx has joined #ruby
yashinbasement has joined #ruby
jimms has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
m3ow1504_xx has quit [Remote host closed the connection]
loveablelobster has joined #ruby
atomical has joined #ruby
Pathfinder has quit [Quit: Pathfinder]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loveablelobster has quit [Client Quit]
Ropeney has joined #ruby
banister has joined #ruby
dagda1 has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
radgeRayden has quit [Ping timeout: 260 seconds]
dagda1 has joined #ruby
cek has joined #ruby
<cek>
Don't quite get what's going on with ActiveSupport overloaded objects.
<cek>
take 1.day, for ex., it's of Fixnum class, but when trying to see included_mods in metaclass, it's empty!!
<oz>
penso: something is messing w/ require, try not changing "$:" and use require_relative instead.
<cek>
but what the heck overloaded #inspect method then? It's clearly not a simple Fixnum class anymore...
Iskarlar has joined #ruby
bruno-_ has joined #ruby
<cek>
5.days.instance_exec { class << self; puts self ; end } => #<Class:#<ActiveSupport::Duration:0x00000007bc04d8>>
dagda1 has quit [Read error: Connection reset by peer]
bruno- has quit [Read error: Connection reset by peer]
pawnbox_ has joined #ruby
<cek>
5.days.class => Fixnum well, this is weird
devoldmx has quit [Ping timeout: 260 seconds]
paradoja has joined #ruby
benlovell has joined #ruby
penso has quit [Quit: leaving]
marcoecc has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
<oz>
cek: `5.days.class` is a ActiveSupport::Duration, not a Fixnum.
ldnunes has joined #ruby
<oz>
or maybe it depends on ActiveSupport versions? I'm not a Rails expert. Maybe on a RoR chan, you'd get good answers. :)
<adaedra>
?rails
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<cek>
yes, why it showed Fixnum then
roolo has joined #ruby
<[k->
dig the source
<[k->
find activesupport::duration
pawnbox_ has quit [Ping timeout: 244 seconds]
dfockler has quit [Ping timeout: 244 seconds]
but3k4 has joined #ruby
Meow-J has joined #ruby
pawnbox_ has joined #ruby
yashinbasement has quit [Quit: Leaving]
<arup_r>
What is the sweet way to get [1] from "[1]"
<arup_r>
?
cek has left #ruby [#ruby]
Gnomethrower has quit [Max SendQ exceeded]
<arup_r>
or from [1,2,3] from "[1,2,3 ]"
roolo has quit [Ping timeout: 246 seconds]
snath has joined #ruby
<jhass>
arup_r: JSON.parse
<jhass>
now don't tell this isn't json
snath has left #ruby [#ruby]
dagda1 has joined #ruby
<[k->
isnt json able to execute code
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
JSON.load is
<jhass>
iirc
adzuci has quit [Ping timeout: 264 seconds]
thang has quit [Ping timeout: 256 seconds]
iamninja has quit [Ping timeout: 260 seconds]
Iskarlar has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Gnomethrower has joined #ruby
Gnomethrower has joined #ruby
_blizzy_ has joined #ruby
skade has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has joined #ruby
pranny has joined #ruby
failshell has joined #ruby
Gnomethrower has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
charliesome has joined #ruby
allcentury has joined #ruby
dgutierrez1287 has joined #ruby
krz has quit [Quit: WeeChat 1.2]
abuzze has quit []
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cysioland has left #ruby ["Leaving"]
bhorn1|away is now known as bhorn1
abuzze has joined #ruby
<arup_r>
jhass: I said Rails will do it :/
banister has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
whatever, I noticed you crossposted without telling so, so I'm gonna ignore you now
pawnbox has joined #ruby
<[k->
jhass is like our crossposter crusader!
bruno-_ has quit [Ping timeout: 260 seconds]
ht__ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<arup_r>
jhass: Sorry to say you.. you are wrong.. I didn't crospost
pawnbox_ has quit [Ping timeout: 240 seconds]
<arup_r>
Please be responsible while you are accusing me... :/
<jhass>
changing the wording / removing context of your question doesn't change the fact
abuzze has quit []
<arup_r>
I will never ask what I asked here in Rails
DroidBurgundy has joined #ruby
<arup_r>
jhass: it does..
<jhass>
you did, you just removed a bunch of useful context
IceyEC has joined #ruby
<arup_r>
jhass: Again I am telling.. please be responsible...
<arup_r>
it is not Rails What is the sweet way to get [1] from "[1]"
<arup_r>
it is Ruby..
<jhass>
alright, let's play the game
<jhass>
so where does "[1]" come from?
skade has joined #ruby
pranny has quit [Remote host closed the connection]
<arup_r>
I got confirmed from that channel I can't get the array as I am expecting... So the story is end there
workmad3 has quit [Ping timeout: 250 seconds]
<arup_r>
That means I have to do it by myself
<arup_r>
and I was looking for good way to do it
<jhass>
I see, so much for "wrong" accusations
abuzze has joined #ruby
banister has quit [Read error: Connection reset by peer]
<arup_r>
jhass: pls.
<jhass>
answer my question then?
<arup_r>
It is not a crosspost.
<jhass>
answer my question then?
<arup_r>
That's it ... I didn't ask What is the sweet way to get [1] from "[1]" in both channel
tkuchiki has joined #ruby
<jhass>
answer my question then?
<arup_r>
that proved I am not crossposting..
<jhass>
I can do this all day, it's two keypresses
<arup_r>
I wouldn't answer you
<maloik>
arup_r: he's asking where "[1]" came from
<TomyWork>
guess what this translates to in a heredoc: sed -ri 's#/usr/bin/ruby$#\01.8#' /usr/bin/puppet
<TomyWork>
the \01 becomes the character with ascii code octal 1
<jhass>
yup
<arup_r>
maloik: I did say that... and that is why he mentioned I am crossposting
<maloik>
well at this point you're just blowing your chances to get help because you're not giving us any kind of helpful info to help you solve your own problem
Zai00 has quit [Quit: Zai00]
<arup_r>
17:34 arup_r jhass: I said Rails will do it :/
<jhass>
maloik: fyi, in #RubyOnRails: "From iOS app when sending a PUT request, I am getting array params as "judge_ids"=>"[1]". Can I handle it in Rails, so that I can receive the like `"judge_ids"=>[1],`.. ?"
<arup_r>
s/said/thought
Yzguy has joined #ruby
Zai00 has joined #ruby
<maloik>
jhass: yep I spotted that
<arup_r>
jhass: After that there was too many discussions... and finally confirmed I can get by Rails internal
<maloik>
that's where I was going with this... the actual answer to the problem is "get your iOS to send the params correctly"
rideh has joined #ruby
DoubleMalt has joined #ruby
<jhass>
^ and thus the actual question is the same, you just stripped all useful context here
Zai00 has quit [Client Quit]
<maloik>
yep
<arup_r>
maloik: nah... you are just supporting him with No reason. My question was very straight... I didn't mention any Rails.. I just asked it
bumbar_ has quit [Quit: Leaving]
<maloik>
LOL :D
<jhass>
?xy arup_r
<ruboto>
arup_r, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<jhass>
that's what would've happened if you didn't post the more specific question in #RubyOnRails
lessless has joined #ruby
<arup_r>
jhass: I know how to get out the answer.. So.. I know it.. I didn't ask them .. that..
<jhass>
the underlying problem is the same, if you can't see that's just a sad for a programmer
<arup_r>
jhass: No.. What I am expecting can't be done from there end..
<kyrylo>
arup_r, couldn't you just eval?
<arup_r>
nah.. that is dangerous!
<arup_r>
:)
<kyrylo>
how's eval('[1]') dangerous? :P
<mikecmpbll>
arup_r: why don't you want to pass the array params in the proper way?
<arup_r>
jhass: mike replied perfectly "and by the way, understand that request parameters are always strings, rails will do a lot of stuff to them though."
<arup_r>
and that is the answer
<mikecmpbll>
k
<arup_r>
so Rails does this when I am using the `form` helper.
<mikecmpbll>
arup_r: no, it does it irrespective of the form
<arup_r>
but while request is coming from iOS app .. or some other soource.. It can't be done as I am expecting..
<mikecmpbll>
arup_r: i didn't say anything about forms in that sentence :) i even provided you an example of how to format parameters to get arrays on rails side
pawnbox_ has joined #ruby
<maloik>
>> JSON.parse('[1]')
<ruboto>
maloik # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/422053)
<arup_r>
mikecmpbll: why the iOS guys is saying then it can't be done..
<arup_r>
No idea.. they show me the code something like NLs.. ** I don't understand OvjectiveC :)
<arup_r>
jhass: nah.. don't ignore mr
Ox0dea has quit [Read error: No route to host]
<arup_r>
I want to be in your friend list.. man!
Nahra has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
bq has left #ruby [#ruby]
<[k->
you appear deserving of an ignore currently
<arup_r>
scroll back to where
stardiviner has quit [Ping timeout: 240 seconds]
<arup_r>
[k-: ok..
<jhass>
that's it
codecop has quit [Remote host closed the connection]
<jhass>
completely unwilling to make any effort on its own
lele has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
choke has quit [Client Quit]
<[k->
[19:39:16] <jhass> arup_r: JSON.parse
<[k->
40 mins ago
IrishGringo has joined #ruby
<jhass>
it's so sad, isn't it
Voker57 has joined #ruby
<[k->
before the entire cross post thing happened
<maloik>
somewhat surprised they're still here in the first place ;)
tkuchiki has joined #ruby
<arup_r>
[k-: I didn't say that is not a solution.. just crosspost stuff I didn't like..
joonty has quit [Quit: joonty]
<arup_r>
anyway.. leave it
<[k->
what. you wanted something like YAML.parse?
ecnalyr has quit [Ping timeout: 264 seconds]
<arup_r>
mikecmpbll: I asked that also.. They didn't understand it seems.. Let me show this what you said.
<arup_r>
[k-: No. JSONS.parse is correct
<mikecmpbll>
ok
<arup_r>
[k-: Why are you thinking me I am a stupid...? Did I say that?
<arup_r>
Did I say JSON.parse is wrong
* [k-
sighs
<mikecmpbll>
arup_r: stop arguing and stay on task.
<arup_r>
humm.. going back...
christiandsg has joined #ruby
tkuchiki has quit [Remote host closed the connection]
bruno- has joined #ruby
sarkyniin has joined #ruby
<allcentury>
Hi all - I have a really shitty part of our code that uses sleep a few times as the API we're talking to is flaky. Now though, those sleep invocations are slowing down our test suite. I tried to stub it out using: Kernel.stub(:sleep) { puts "stubbed" } without success. Is this possible?
<mikecmpbll>
allcentury: fix the bad code? ;d
paulcsmith has joined #ruby
paulcsmith has quit [Client Quit]
Kallis has quit [Read error: Connection reset by peer]
fgo has joined #ruby
<allcentury>
mikecmpbll: Yah, I want to but the higher ups aren't listening to me right now
amystephen has joined #ruby
[k- has quit [Read error: No route to host]
<jhass>
allcentury: if everything else fails extract the sleep to def this_api_is_awfully_shitty; end; and stub that out :P
christiandsg has quit [Ping timeout: 265 seconds]
[k- has joined #ruby
<allcentury>
ah yah, good idea
<allcentury>
code like this is embarassing to look at
<mikecmpbll>
but if the sleep is necessary won't the tests fail? ;o
khebbie has quit [Ping timeout: 245 seconds]
<jhass>
allcentury: but to explain, Kernel.stub(:sleep) stubs out Kernel.sleep, which is a copy if Kernel#sleep, have a look at module_function for the underlying reason
<jhass>
mikecmpbll: I guess it's necessary to not DoS the API
<mikecmpbll>
if you can dos the api without threaded requests that's some really terrible api :p
<allcentury>
it is - can confirm, some terrible api
<mikecmpbll>
\o/
big|bad|wolf has joined #ruby
stardiviner has joined #ruby
big|bad|wolf has quit [Max SendQ exceeded]
big|bad|wolf has joined #ruby
big|bad|wolf has quit [Max SendQ exceeded]
big|bad|wolf has joined #ruby
khebbie has joined #ruby
rbennacer has joined #ruby
big|bad|wolf has quit [Client Quit]
devdazed has joined #ruby
y0da has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
kyrylo has left #ruby ["Konversation terminated!"]
yatish27 has joined #ruby
<maloik>
sounds like yorickpeterse is having a ball
<maloik>
:D
<yorickpeterse>
(╯°□°)╯︵ ┻━┻
Quandl has joined #ruby
<yorickpeterse>
it sometimes really feel like I'm fighting a bunch of toddlers
<yorickpeterse>
You give them a nice framework, well tested, all that shit
<yorickpeterse>
Then along comes one and just messes it up
<yorickpeterse>
at least the intentions were good
<yorickpeterse>
But fuck me, write some darn tests
<maloik>
I can't see that emoji, but I'm guessing it was a tableflip
Guest32 has joined #ruby
<yorickpeterse>
yes
<yorickpeterse>
get a better font
<maloik>
we've been over this :D
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
<yorickpeterse>
and clearly you haven't learned ;P
hinbody has joined #ruby
dudfvhj has joined #ruby
<maloik>
I never will, at least not until I set up my workstation from scratch or change my irssi box
yatish27 has quit [Remote host closed the connection]
<maloik>
actually that time might come sooner than expected but still
dudfvhj has quit [Client Quit]
rideh has joined #ruby
dopamean_ has joined #ruby
[k-_ has joined #ruby
dented42_ has quit [Ping timeout: 240 seconds]
<yorickpeterse>
ok well step 1 of refactoring this class, now to fix all the tests and add a bunch more
<yorickpeterse>
ughh
cyberarm has quit [Read error: Connection reset by peer]
houhoulis has joined #ruby
Yzguy has quit [Ping timeout: 240 seconds]
<yorickpeterse>
also a typical pattern: there's method A, which does something
<yorickpeterse>
then comes along method B, which basically does what A does but sets an extra field
KINGSABRI has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
<yorickpeterse>
instead of just mixing the two (which is preferred actually in this case)
<yorickpeterse>
better to add new code and write no tests than to update existing code/tests, right?
voltalio has joined #ruby
symm- has joined #ruby
anaeem1 has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
<yorickpeterse>
@group.companies.each_with_index do |company, index| company.id.should == index + 1 end
<yorickpeterse>
that's an....interesting way of testing IDs
acosonic has joined #ruby
devoldmx has joined #ruby
<acosonic>
hi, I'm trying to use svn with redmine on windows. Does anyone know which SVN client will work well with ruby, or how to configure SVN to be visible by Rails?
<maloik>
I don't think the code you write has to be aware of what version control you use, acosonic ?
<maloik>
what you do in ruby/rails is writing simple text files, there's not much to it
<acosonic>
maloik, Redmine uses SVN to parse svn commit messages
nzst has joined #ruby
<acosonic>
maloik, and display them under repositories tab
<maloik>
fair enough, but that has nothing to do with ruby or rails I believe
<maloik>
unless I'm missing something obvious about svn... I only use git so yea
freerobby has quit [Quit: Leaving.]
yatish27 has joined #ruby
<mikecmpbll>
lol
<maloik>
acosonic: what I'm trying to say is, it probably doesn't matter for ruby/rails, but if you're unsure because of windows/redmine then you're best off checking in the svn channels
bruno- has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paradoja has quit [Ping timeout: 256 seconds]
bweston92 has quit [Read error: Connection reset by peer]
<jhass>
I'd just use git svn :P
<jhass>
and work from there
<acosonic>
you don't understand, ruby calls git.exe or svn.exe to check for svn/git logs
<acosonic>
nevermind
dgutierrez1287 has quit [Remote host closed the connection]
pranny has joined #ruby
inteq has quit [Quit: Leaving]
Zai00 has joined #ruby
hashrocket has joined #ruby
Gribo has joined #ruby
failshell has joined #ruby
JDiPierro has joined #ruby
<[k-_>
i feel hurt that you regard us as stupid
<[k-_>
s/stupid/unable to understand/
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
Guest80 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<maloik>
I still fail to see how this is linked to ruby specifically :D
Zai00 has joined #ruby
<maloik>
sounds like there's only some redmine <-> svn stuff going on there
<[k-_>
indeed
voltalio has joined #ruby
<maloik>
but good that you figured it out
dojobo has joined #ruby
Cust0sLim3n has quit [Ping timeout: 264 seconds]
pranny has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 255 seconds]
heyrhett has quit [Ping timeout: 265 seconds]
catoblepa has quit [Ping timeout: 260 seconds]
catoblepa has joined #ruby
jhack32 has joined #ruby
Cust0sLim3n has joined #ruby
jtdoncas_ has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
sacarlson has joined #ruby
roolo has joined #ruby
acke has quit [Remote host closed the connection]
Guest76476 has quit [Changing host]
Guest76476 has joined #ruby
Guest76476 is now known as daynaskully
<sacarlson>
I just upgraded postgresql from 9.3 to 9.4 but it seems the rails app still tries to use 9.3. what gem or other do I need to perform to upgrade ruby rails to start using the new postgress?
<sacarlson>
I tried #rails but there is no such IRC
<havenwood>
sacarlson: #rubyonrails
<maloik>
the proper channel is #rubyonrails
<sacarlson>
a very good
DLSteve has joined #ruby
DLSteve has quit [Client Quit]
<acosonic>
sacarlson, did you install app with bundler?
dhjondoh has joined #ruby
<acosonic>
sacarlson, try bundle update in your app root
roolo has quit [Ping timeout: 260 seconds]
<jhass>
acosonic: it moved to #RubyOnRails
<apeiros>
o0
<jhass>
sacarlson: ignore that last advice, running bundle update blindly is a really bad idea
<sacarlson>
oh yes I did install with bundler
skade has quit [Quit: Computer has gone to sleep.]
Guest80 has joined #ruby
ckinniburgh has joined #ruby
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
DoubleMalt has quit [Ping timeout: 240 seconds]
dseitz has joined #ruby
malconis has joined #ruby
dhjondoh has quit [Client Quit]
Gribo has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
whippythellama has joined #ruby
DefV_ has quit [Ping timeout: 265 seconds]
skade has joined #ruby
DefV has joined #ruby
Ropeney has joined #ruby
ferhaty has quit [Read error: Connection reset by peer]
TvL2386 has quit [Remote host closed the connection]
lseactuary has joined #ruby
<apeiros>
also bundle & gems have nothing to do with the db that is used…
dopamean_ has quit [Ping timeout: 264 seconds]
<lseactuary>
hello. i have scalding jobs that i run in the REPL but its getting annoying as i want to be able to quickly graph the data and have 'dashboard' type view. im wondering how easy it is to convert sclading REPL code into a ruby app?
ferhaty has joined #ruby
jhack32 has quit [Ping timeout: 265 seconds]
Zai00 has quit [Quit: Zai00]
<apeiros>
put the code in a file, chmod 0755, run it?
devdazed has joined #ruby
JDiPierro has quit [Remote host closed the connection]
sankaber has joined #ruby
Norrin has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
blue_deref2 has joined #ruby
Zai00 has joined #ruby
<lseactuary>
apeiros was that to me?
blue_deref2 has left #ruby [#ruby]
<apeiros>
lseactuary: yes
user1138_ has quit [Ping timeout: 246 seconds]
marguerite has joined #ruby
jgpawletko has joined #ruby
victortyau has joined #ruby
DoubleMalt has joined #ruby
<lseactuary>
apeiros i have working scalding REPL code that pulls data from sources and outputs a CSV/TSV file
<marguerite>
hello, anyone can help me with this nokogiri problem about searching through table element ? http://paste.opensuse.org/27252343
Akuma has joined #ruby
<lseactuary>
the problem is i have to keep adjusting the date, the account etc and run it. i think its better to have some sort of dashboar where people just type the account and the data is there.
<lseactuary>
wondering how easy it is to go from scalding raw data to something nice like that
nonnatus has joined #ruby
platzhirsch has joined #ruby
<apeiros>
lseactuary: I don't think you will be able to get a satisfying answer to that kind of question here.
<lseactuary>
where do you recommend i look?
<apeiros>
you ask the person you want to build that thing.
hotpancakes has joined #ruby
khebbie has quit [Remote host closed the connection]
<apeiros>
and if it's you - well, start with it and see. how easy it is for you depends on a couple dozen factors. your familiarity with the tools for a starter.
whiteline has quit [Remote host closed the connection]
<apeiros>
it's not really possible to give you any meaningful estimate.
hotpancakes has quit [Remote host closed the connection]
Akuma has quit [Client Quit]
<lseactuary>
but is ruby the right tool/
gregf_ has quit [Quit: Lost terminal]
<lseactuary>
is there something where i can link data sources and then adjust a template rather than build from scratch?
<apeiros>
are you talking about a web application?
<lseactuary>
ye
<apeiros>
relevant. you know.
sdfgsdfg has quit [Remote host closed the connection]
<apeiros>
I don't know of such a thing, but you may try in #rubyonrails
Porfa has joined #ruby
<lseactuary>
oki
bigbadbear has joined #ruby
dagda1 has quit [Ping timeout: 244 seconds]
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
mary5030 has joined #ruby
dagda1 has joined #ruby
paradoja has joined #ruby
bweston92 has joined #ruby
Coldblackice_ has quit [Ping timeout: 256 seconds]
dan4352 has quit [Ping timeout: 256 seconds]
christiandsg has joined #ruby
kies has quit [Ping timeout: 244 seconds]
mary5030 has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
oo_ has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
Guest73964 has quit [Quit: This computer has gone to sleep]
ecnalyr has joined #ruby
paradoja has quit [Ping timeout: 244 seconds]
momomomomo has quit [Quit: momomomomo]
felltir has joined #ruby
saddad has quit [Ping timeout: 265 seconds]
nofxx has joined #ruby
amargherio has joined #ruby
jher has joined #ruby
jtdoncas_ has quit [Ping timeout: 255 seconds]
casadei has joined #ruby
oo_ has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cats has quit [Quit: Meow.]
cats has joined #ruby
Guest73964 has joined #ruby
skade has joined #ruby
jher has quit [Client Quit]
jher has joined #ruby
roolo has joined #ruby
chouhoul_ has joined #ruby
jtdoncas_ has joined #ruby
swills has joined #ruby
Zai00 has joined #ruby
jher has quit [Client Quit]
jhack has joined #ruby
jhack has joined #ruby
Iskarlar has joined #ruby
yanguang_ has joined #ruby
rehat has joined #ruby
alex88 has quit [Remote host closed the connection]
<atzorvas>
for my question before, creek is ultra fast, and it returns also cell names which is pretty handy to not add any overhead. just a wrapper function to get cell(col_letter, rownum) and it will be perfect shortly :)
chouhoulis has quit [Ping timeout: 255 seconds]
yanguang_ has quit [Client Quit]
robh71 has joined #ruby
<atzorvas>
("ultra fast" under consideration, I still have to test this in my main program)
Silox| has joined #ruby
<[k->
so many rows questions @.@
roolo has quit [Ping timeout: 246 seconds]
andybernard has joined #ruby
<atzorvas>
:p
anker has joined #ruby
dgutierrez1287 has joined #ruby
rideh has quit [Quit: zap]
robh71 has quit [Client Quit]
jcoe has joined #ruby
sevenseacat has quit [Quit: .]
<[k->
i declare today statistics day?
<atzorvas>
easily
pranny has joined #ruby
michael_mbp has quit [Excess Flood]
riotjones has quit [Remote host closed the connection]
<adaedra>
[k-: I am disappoint. You could have used "in a row".
<adaedra>
+ed
clarkenciel has joined #ruby
bigmac_ has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
<[k->
s/@.@/in a row @.@/
<shevy>
+special ed
dgutierrez1287 has quit [Ping timeout: 256 seconds]
AlexAltea has quit [Ping timeout: 240 seconds]
Baprath has joined #ruby
michael_mbp has joined #ruby
dstarh has joined #ruby
rideh has joined #ruby
<nzst>
no
skade has quit [Quit: Computer has gone to sleep.]
arup_r has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
grenierm has joined #ruby
Cache_Money has joined #ruby
davidhanson has joined #ruby
<adaedra>
no?
gabord has joined #ruby
jhack has quit [Ping timeout: 244 seconds]
<gabord>
Hi, how does "bundle install" work?
<adaedra>
magic
<gabord>
Does it read "Gemfile" or other things, and then
<gabord>
(I have a specific question :)
<gabord>
installs the packages, or
paulcsmith has joined #ruby
pranny has quit [Ping timeout: 245 seconds]
<gabord>
the packages it needs to install lies somewhere else?
<atzorvas>
gabord: (note) it's better to not break your questions to several lines
umgrosscol has quit [Remote host closed the connection]
<gabord>
atzorvas: Alright, next time..
<adaedra>
It reads Gemfile and Gemfile.local, resolves the dependencies, and install the gems, either in the system or a given folder according to arguments.
<sarkyniin>
specifically, I want the minimum version to be 1.9.3
<sarkyniin>
so I can't use .to_f
<sarkyniin>
because it would remove the .3 and I wouldn't be able to compare anyway
<adaedra>
sarkyniin: gem? bundler?
<sarkyniin>
adaedra: you can only specify one version of ruby
<sarkyniin>
when using bundler
blue_deref has joined #ruby
<sarkyniin>
there's no "superior to"
<nofxx>
just as curiosity, how to get the name of a var ?
<adaedra>
sarkyniin: wut
chouhoulis has joined #ruby
<kamsky>
Hi guys, I have the following string, which seems to be formed by hex characters: "c340a001-1073", and I have to somehow split it in two sub hex strings (first chunk before the dash, second chunk after the dash), and then somehow iterate through both, increasing 1 by 1 the values
<sarkyniin>
adaedra: anyway, I found out comparing strings work
<[k->
nofxx, whaaaaaa
chouhoul_ has quit [Read error: Connection reset by peer]
<sarkyniin>
in this particular case
chouhoulis has quit [Remote host closed the connection]
<nofxx>
[k-, introspection crazyness
<kamsky>
The idea is to generate a list with all hte possible values left within that number of characters
chouhoulis has joined #ruby
whiteline has joined #ruby
<[k->
nofxx, binding.local_variables or some sort?
<adaedra>
sarkyniin: I'm pretty sure bundler has a way of giving a /minimal/ ruby. Otherwise, the `gem` lib has methods to compare versions.
<nofxx>
kamsky, you mean until fff-fffff ?
bricker has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cats has quit [Quit: Meow.]
UtkarshRay has quit [Read error: Connection reset by peer]
<kamsky>
nofxx: so, the first chunk is 8 characters, so until ffffffff, and then the second one 4, so until ffff, and combine them, so I get all the possible values
<gabord>
So basically bundle is a wrapper for "gem install", so that it is easy to install gems and dependecies?
<nofxx>
[k-, that would work, but I need somehow to get the var's sym to binding.local_variables[]
<[k->
compare the values of everything there
cats has joined #ruby
<nofxx>
[k-, with what?
ckinniburgh has quit [Read error: Connection reset by peer]
<[k->
var would give you the value
<[k->
then iterate through local_variables and get matching values
<[k->
i think
Hounddog has quit [Read error: Connection reset by peer]
rubie has quit [Remote host closed the connection]
<nofxx>
kamsky, well try this: x, y = 'ffffff-fff'.split(/\-/).map{ |n| n.to_i(16) } ; x.upto(0xffff)
<nofxx>
kamsky, dunno why split it anyway, just get it as 1 number I would say
<kamsky>
nofxx:quick priv?
<[k->
var = 1; binding.local_variables.select.with_object(var) { |v, o| binding.local_variable_get(i) == o }
<nofxx>
kamsky, x = 'fffffff-ffff'.tr('-', '').to_i(16)
Porfa has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<[k->
maybe if i change with_object part
stan has quit [Ping timeout: 246 seconds]
<nofxx>
[k-, with object |obj| but with 2 it's |sym, obj| ?? how obscure
<kamsky>
so nofxx, the idea is that I get that value, dash included from a server response, and then I have to get that value, and send all the possible left values to the server, one by 1, in the same format
dagda1 has joined #ruby
<[k->
>> var = 1; binding.local_variables.select { |v| binding.local_variable_get(v) == var }
<kamsky>
so.. c340a001-1073, then c340a001-1074, c340a001-1075, etc... till I get to ffffffff-ffff
<[k->
nofxx, i think it's got to do with enumerator
<nofxx>
>> kamsky dude... do some math
<ruboto>
nofxx # => /tmp/execpad-f4403ec178fe/source-f4403ec178fe:2: syntax error, unexpected keyword_do_block ...check link for more (https://eval.in/422183)
<nofxx>
[k-, thank you man, gonna use this just for fun
Guest73964 has quit [Quit: This computer has gone to sleep]
Baprath has quit [Ping timeout: 265 seconds]
dagda1 has quit [Ping timeout: 256 seconds]
Meow-J has quit [Quit: Connection closed for inactivity]
Kruppe has joined #ruby
<[k->
additional fun: regexp can declare local variables in your local scope
howdoi has quit [Quit: Connection closed for inactivity]
<[k->
i forgot how to make it do it
dagda1 has joined #ruby
fullofcaffeine has joined #ruby
<kamsky>
nofxx: actually is a little bit more complex than that.. so, given: c340a001-1073 , the second chunk (1074) is increased every couple seconds by the server, and then in the first chunk, the last 3 chars are always 001 or 801, and the rest random
<kamsky>
nofxx: the goal is to be able to "guess" valid values generated by the server
<[k->
elliptic curve?
<kamsky>
so the idea is to somehow generate as many values as possible for the first chunk before the second chunk changes
_blizzy_ has quit [Ping timeout: 255 seconds]
<nofxx>
kamsky, general irc tip for you: start with the goal instead of how you're planning to score it
xhosae has quit [Ping timeout: 260 seconds]
rideh has joined #ruby
<kamsky>
yeah nofxx, sorry about that
lsmola has quit [Ping timeout: 272 seconds]
<jhass>
sounds like you want to break something. Curious what that would be
<[k->
we have a command for this!
<[k->
?xy
<ruboto>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
lulzmachine has quit [Quit: Connection closed for inactivity]
<kamsky>
I'm a pentester jhass, this website Im testing doesnt generate sufficiently random cookies
<kamsky>
but I need a proof of concept
<shevy>
cookies!
mleung has joined #ruby
<adaedra>
?cookie
<ruboto>
here's your cookie:
rideh has quit [Client Quit]
<shevy>
ruboto has inbuilt all the important commands
<jhass>
kamsky: maybe just check if it's simple enough to port to say Crystal, should give you a lot more values
<adaedra>
indeed
rideh has joined #ruby
<[k->
yea, it has ?shevy too
<shevy>
I go with the cookies
mleung has quit [Client Quit]
<adaedra>
I prefer cake
<adaedra>
?cake
<ruboto>
here's your cake:
rideh has quit [Client Quit]
<adaedra>
b&w emoji works not so well, me thinks
<shevy>
I know!
<shevy>
it's like the unicode hangman here
Norrin has left #ruby ["Dueces"]
<[k->
i have coloured ones \o/
<adaedra>
still mad about that?
<dfockler>
sepia emoji for that old timey feel
<jher>
Emoji works great in iTerm
UtkarshRay has joined #ruby
<shevy>
I am not mad at all in the slightest
<jhass>
just stuck in the ancient past
<shevy>
there was a time when WhatsApp people joined here; jhass was so curious about their nicks
blackmes1 has joined #ruby
<jhass>
see
<shevy>
I combine the best of history with the best of the future
<mikecmpbll>
lol
Guest73964 has joined #ruby
rideh has joined #ruby
<shevy>
I am still undecided about Emojis
<jhass>
s/best/none/
blackmes1 has quit [Client Quit]
chipotle has quit [Quit: cheerio]
<shevy>
the best
<shevy>
keep it simple
<jhass>
UTF-8 is simple
arooni-mobile has quit [Ping timeout: 246 seconds]
<jhass>
a lot simpler than dealing with all other encodings
bruno- has quit [Ping timeout: 256 seconds]
<jhass>
just use it everywhere, simple as that
shinnya has joined #ruby
<shevy>
there is the unicode snowman
blackmesa has quit [Ping timeout: 260 seconds]
<nofxx>
you know, some say we evolved, from hieroglyphs to writing
<jhass>
?snowman
<ruboto>
I don't know anything about snowman
havenwood has joined #ruby
<adaedra>
oh!
<shevy>
yeah hieroglyphs like the unicode snowman :)))
<[k->
the more universal it is, the less things programmers have to worry about
<adaedra>
this bot needs the unicode-snowman gem
<dfockler>
how many more codepoints are empty in UTF-8?
<adaedra>
enough
<shevy>
adaedra was it you who wrote the snowman gem?
<jhass>
!fact mk snowman Here's a snowman for you: ☃
<ruboto>
jhass, I will remember that snowman is Here's a snowman for you: ☃
<nofxx>
shevy, with utf8 I'm ok. just don't put colorful gay emojis in my terminal please
<jhass>
dfockler: 1 third I think
<[k->
?shevy
<ruboto>
shevy is the hound of baskerville
<adaedra>
shevy: yes
<shevy>
I would not know how to put an emoji into IRC in the first place
<adaedra>
shevy: os?
rikkipitt has joined #ruby
<[k->
through ?pizza ?cookie ?cake
<shevy>
adaedra shevyOS
<adaedra>
ok
<[k->
he uses some unmaintained os
<jhass>
or was it that 1 third is filled? I can't remember
<shevy>
[k- the bot knows pizza?
khebbie has joined #ruby
<[k->
yes
<adaedra>
?pizza
<ruboto>
here's your pizza:
Timba-as has quit [Quit: Be back later ...]
Rinzlit1 has quit [Ping timeout: 244 seconds]
<nofxx>
?dice
<ruboto>
I don't know anything about dice
<nofxx>
isnt it utf8? what the comm
<jhass>
&roll
* `derpy
rolls a dice… got 5. Total: 5
<[k->
that's `derpy
<nofxx>
ah, not yet
<shevy>
you know... one distant day, 100 years from now on, Archaeologists may analyze ruboto to find out how we people here from 100 years ago, were a good or a bad people
<`derpy>
They see me rolling...
<jhass>
&doabarrelroll
<[k->
they should analyse the logs, duh
<`derpy>
weeee!
iamvery has quit [Quit: Leaving...]
stevednd has joined #ruby
<adaedra>
shevy: I know someone else who don't want to use unicode. And, like you, he takes his arguments against it from /dev/null.
symm- has quit [Ping timeout: 252 seconds]
khebbie has quit [Remote host closed the connection]
lseactuary has quit [Ping timeout: 246 seconds]
<shevy>
there are lots of excellent arguments
<shevy>
however I would consider this to be an offtopic discussion then
<[k->
none of them which is your face!
christiandsg has joined #ruby
<tubbo>
anyone who doesn't want to use unicode is a racist
<adaedra>
And since you loathe us^W#ruby-offtopic, you won't have it, we know
<tubbo>
there i said it
<jhass>
shevy: would love to have it over at y-offtopic
<shevy>
jhass there is unicode hangman there!!!
<jhass>
nobody's playing
<shevy>
yeah right *now* perhaps... but the moment I arrive...
<adaedra>
shevy: ignore DeBot...
<[k->
yea, debot went on a on and off rampage
<shevy>
let's talk about ruby :)
<adaedra>
arguments count: +0
<[k->
your face isn't Ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
face.rb
<[k->
touché
<adaedra>
coulé
hotpancakes has quit [Remote host closed the connection]
<mikecmpbll>
gosu looks all kinds of cool. might have to have a play around this weekend.
nhhagen has joined #ruby
Timba-as has joined #ruby
Renich has joined #ruby
nhhagen has quit [Client Quit]
Renich has quit [Client Quit]
nhhagen has joined #ruby
Renich has joined #ruby
pranny has quit [Ping timeout: 250 seconds]
Renich has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
nhhagen has quit [Client Quit]
Renich has joined #ruby
yatish27 has joined #ruby
rubie has joined #ruby
Kruppe has joined #ruby
Kruppe has quit [Client Quit]
bMalum has quit [Quit: bMalum]
Renich has quit [Client Quit]
Renich has joined #ruby
RobertBirnie has joined #ruby
Kruppe has joined #ruby
renanoronfle has quit [Quit: Leaving]
renanoronfle has joined #ruby
towski_ has quit [Remote host closed the connection]
rikkipitt has quit [Quit: Leaving...]
fedexo has quit [Ping timeout: 246 seconds]
DEA7TH has joined #ruby
greymeister has joined #ruby
mikecmpbll has quit [Ping timeout: 255 seconds]
startupality has quit [Quit: startupality]
hotpancakes has joined #ruby
<DEA7TH>
I'm trying to make concurrent web requests and right now am using new threads with curl, but this is failing with (23) Failed writing body. The same code works when not in a new thread. What can I do to fix it?
paulcsmith has quit [Quit: Be back later ...]
Renich has quit [Client Quit]
ckinniburgh has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Blaguvest has joined #ruby
Alayde has joined #ruby
<DEA7TH>
Is it because I'm doing it in a new thread, or because I'm using curl
umgrosscol has quit [Quit: Quit]
dc_ has joined #ruby
Cache_Money has left #ruby [#ruby]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 245 seconds]
harshs08 has joined #ruby
<havenwood>
DEA7TH: There are many nice HTTP client gems, including libcurl wrappers with parallelism features. Typhoeus for example: https://github.com/typhoeus/typhoeus#readme
<harshs08>
Hi all, I am getting the warning: circular argument reference
<DEA7TH>
awesome, I'll install that
Alayde has quit [Ping timeout: 246 seconds]
<havenwood>
harshs08: Show the code the error refers to?
<adaedra>
?context harshs08
<ruboto>
harshs08, Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
yqt has quit [Ping timeout: 256 seconds]
<harshs08>
I am trying to understand the reason for it and read about it here http://blog.vrinek.io/2015/01/15/ruby-2-2/. But still I don't fully understand the reason for this warning
nettoweb has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
pawnbox has joined #ruby
<havenwood>
>> def har shs = shs; end
<ruboto>
havenwood # => /tmp/execpad-d18f739cce2d/source-d18f739cce2d:2: warning: circular argument reference - shs ...check link for more (https://eval.in/422217)
<ruboto>
I'm just a bot. You don't need to address me.
choke has quit [Ping timeout: 252 seconds]
umgrosscol has joined #ruby
<adaedra>
commas, the difference between "sure, ruboto will do that" and "sure ruboto, will do that"
benlovell has joined #ruby
Respek has joined #ruby
<havenwood>
adaedra: or "sure ruboto will, do that" or "sure ruboto will do, that"
Jackneill has joined #ruby
petricore has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
<jhass>
now the lawyer comes through
<havenwood>
heh
hotpancakes has joined #ruby
<havenwood>
harshs08: when folk define a method with args `x = x` they probably really mean `x = x()` not a circular reference to an unset local variable, hence the warning
yatish27 has quit [Remote host closed the connection]
axsuul has joined #ruby
casadei has quit [Remote host closed the connection]
axsuul has quit [Max SendQ exceeded]
ReK2 has quit [Quit: Konversation terminated!]
axsuul has joined #ruby
saddad has joined #ruby
pauly_oc has joined #ruby
Azure|dc has joined #ruby
pushpak has joined #ruby
<harshs08>
havenwood: so to clear my understanding, why it was allowed in the earlier versions and is this more like a language semantics issue or there is some side effect of this in code?
<Freeaqingme>
Hi folks. I'm trying to do some stuff with timezones. I'm on 1.9.3, I require 'date'. But things like this gives me nothing but "undefined method utc": now = DateTime.now.utc
<Freeaqingme>
how should I get the time in a certain tz?
<BraddPitt>
oof
<BraddPitt>
timezones
<BraddPitt>
someone else can take this one
<jhass>
>> require "datetime"; DateTime.now.utc
<ruboto>
jhass # => cannot load such file -- datetime (LoadError) ...check link for more (https://eval.in/422249)
yqt has joined #ruby
<jhass>
meh
roolo has joined #ruby
<jhass>
>> require "date"; DateTime.now.utc
<ruboto>
jhass # => undefined method `utc' for #<DateTime:0x40e454e0> (NoMethodError) ...check link for more (https://eval.in/422250)
freerobby has quit [Read error: Connection reset by peer]
<jhass>
Freeaqingme: sure you need a DateTime?
freerobby has joined #ruby
<Freeaqingme>
jhass: hmz, I'm not. I was under the impression date would be just dates, whereas datetimes would be a date+time. Thought I'd also tested with 'date', but I guess not
<evo2020>
I have a question about refactoring (short) in ruby
phutchins has quit [Ping timeout: 264 seconds]
AlexAltea has joined #ruby
<kinduff>
evo2020: don't ask to ask :) just ask
finisherr has quit [Quit: finisherr]
<shevy>
refactoring can be very boring
mikecmpbll has quit [Ping timeout: 265 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagda1 has quit [Ping timeout: 252 seconds]
<evo2020>
I am trying to insert replay method into a Ruby CLI game. It doesn't work.
<evo2020>
I can't see my error!
<craysiii>
gist it
sundhell has quit [Quit: WeeChat 1.3]
anaeem1 has joined #ruby
<bootstrappm>
is it bad form to put requires in only the places where they're needed as opposed to the top? I only use URI in 1 out of 5 of my rake tasks,
<shevy>
drbrain yes I am looking at old code here :)
<miah>
"Prefer reverse_each to reverse.each because some classes that include Enumerable will provide an efficient implementation. Even in the worst case where a class does not provide a specialized implementation, the general implementation inherited from Enumerable will be at least as efficient as using reverse.each."
diego1 has quit [Changing host]
diego1 has joined #ruby
axsuul_ has quit [Read error: Connection reset by peer]
einarj has joined #ruby
<miah>
shevy: i run neovim with neomake
linoespinoza has joined #ruby
Alayde has quit [Ping timeout: 272 seconds]
<pipework>
Weird, why can't they just provide a more efficient #reverse?
stamina has quit [Quit: WeeChat 1.3]
benlovell has joined #ruby
<miah>
who is 'they' ?
<kinduff>
mantainers
msnyon has joined #ruby
<pipework>
"some classes"
<drbrain>
#reverse creates a new Array holding all the same objects
fantazo has quit [Quit: Verlassend]
<drbrain>
which you then traverse with #each
EllisTAA has quit [Quit: EllisTAA]
<pipework>
drbrain: So it sounds like #reverse_each is just generally better regardless of possible implementation bonus nachos?
<drbrain>
but for finite collections (Array) you walk the collection in reverse order
linoespinoza has quit [Client Quit]
radgeRayden has joined #ruby
bb010g has joined #ruby
<drbrain>
pipework: yes, since it avoids the temporary copy
khebbie has quit [Remote host closed the connection]
<miah>
^- for benchmarks
<drbrain>
then next suggestion might be "ruby should know to optimize .reverse.each to .reverse_each"
<miah>
+1
<pipework>
:D
JimmyNeutron has quit [Ping timeout: 252 seconds]
<drbrain>
but that's not trivial because a user can redefine "reverse" or "each" and not make them mean what you think they mean
baweaver has joined #ruby
<drbrain>
or they may be called on objects where that optimization doesn't make sense (in the general case for optimizations like this)
<drbrain>
so you end up adding a bunch of special-case checks (has #reverse been redefined, has #each been redefined, for this object will it improve performance, …)
<drbrain>
which makes the compiler harder to maintain
<pipework>
drbrain: Just add a cop to rubocop to suggest it.
<pipework>
Let people add ignores for when it's more correct. :D
<drbrain>
↑ yep, that's the more maintainable way
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
JimmyNeutron has joined #ruby
<pipework>
It's also educational!
<pipework>
one should edutate themselves on the regular
marsjaninzmarsa has quit [Quit: ZNC - http://znc.in]
Zai00 has joined #ruby
marsjaninzmarsa has joined #ruby
blackjid has quit [Max SendQ exceeded]
iateadonut has left #ruby [#ruby]
blackjid has joined #ruby
JimmyNeutron has quit [Ping timeout: 264 seconds]
voltalio has quit [Read error: Connection reset by peer]
<miah>
thats my one gripe with ruby style guide. while you can link to each nitpick, there is no link to a discussion about the hows and whys behind it.
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 246 seconds]
nofxx has quit [Ping timeout: 272 seconds]
nofxx has joined #ruby
momomomomo has quit [Quit: momomomomo]
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
DroidBurgundy has quit []
kies has joined #ruby
stevednd has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
fullofca_ has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.2]
voltalio has joined #ruby
JimmyNeutron has quit [Ping timeout: 246 seconds]
nux443 has quit [Ping timeout: 252 seconds]
solocshaw has joined #ruby
<miah>
there are issues on ruby-style-guide you can dig for the hows and whys. but you have to dig.
skade has joined #ruby
banister has joined #ruby
eightfold has quit [Ping timeout: 246 seconds]
kr3ssh has quit [Ping timeout: 264 seconds]
yardenbar has quit [Quit: Leaving]
nux443 has joined #ruby
ta has joined #ruby
Respek has quit [Quit: gone to sleep. ZZZzzz…]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roolo has quit [Remote host closed the connection]
<shevy>
it's the community!
yfeldblum has quit [Ping timeout: 244 seconds]
<baweaver>
Honestly I just use it to get people to stop whining about which way is better
<baweaver>
especially on syntax nonsense.
<dstarh>
I'm trying to DRY up a couple of methods that both take a block and yield to it at the end. Is it possible to pass the block to another method?
<shevy>
dstarh should be, via &
<shevy>
I don't have a minimal example at hand though
tno_ has joined #ruby
decoponio has quit [Quit: Leaving...]
<baweaver>
>> def a(&block) b(&block) end; def b() yield(3) end; a { |v| v + 1 }
but3k4 has quit [Read error: Connection reset by peer]
but3k4 has joined #ruby
nux443 has joined #ruby
Voker57 has quit [Remote host closed the connection]
zendrix has joined #ruby
khebbie has quit [Ping timeout: 256 seconds]
Silox| has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
kr3ssh has quit [Ping timeout: 255 seconds]
sphex_ has quit [Ping timeout: 244 seconds]
allcentury has joined #ruby
sphex has joined #ruby
yatish27 has joined #ruby
dfockler has quit [Remote host closed the connection]
pranny has quit [Remote host closed the connection]
jaycee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
victortyau has quit [Quit: Leaving]
jaycee has joined #ruby
Respek has quit [Read error: Connection reset by peer]
hydrozen has joined #ruby
dfockler has joined #ruby
greymeister_ has joined #ruby
kinduff has quit []
dojobo has quit [Quit: Leaving]
greymeister has quit [Ping timeout: 256 seconds]
greymeister_ is now known as greymeister
n_blownapart has joined #ruby
j_mcnally has joined #ruby
Timba-as has joined #ruby
mary5030_ has joined #ruby
[k- has quit [Ping timeout: 256 seconds]
michaeldeol has joined #ruby
diegoaguilar has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
mary5030 has quit [Ping timeout: 244 seconds]
Zai00 has quit [Quit: Zai00]
mary5030_ has quit [Ping timeout: 246 seconds]
pocketprotector has quit [Quit: WeeChat 1.2]
baweaver has joined #ruby
enebo has quit [Quit: enebo]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfockler has quit [Remote host closed the connection]
apt-get_ has quit [Ping timeout: 240 seconds]
dfockler has joined #ruby
eightfold has joined #ruby
EllisTAA has joined #ruby
umgrosscol has quit [Remote host closed the connection]
hinbody has quit [Quit: leaving]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdwrage has joined #ruby
monsieurp has quit [Ping timeout: 252 seconds]
momomomomo has quit [Quit: momomomomo]
<shevy>
anyone of you using prawn to auto-generate .pdf documentation? I am looking for a simple way to format it... from html. I need not much though, only <br>, and padding (aka either margin-left or padding-left / padding)
<shevy>
colours etc... isn't needed, the padding is only required for making it easier to read (it already is padded in the .html)
leafybasil has quit [Remote host closed the connection]
k3asd` has joined #ruby
leafybasil has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
leafybasil has quit [Ping timeout: 246 seconds]
ta has joined #ruby
Timba-as has quit [Quit: Be back later ...]
malconis has joined #ruby
Timba-as has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
datacat_ has joined #ruby
<datacat_>
hi
sarkyniin has joined #ruby
<datacat_>
So I run a ruby app - and it assumes ASCII - but I want that it uses UTF8
<datacat_>
I heard one has to set LC/LANG/LOCALE ?
<datacat_>
Is that true? what is the right way?
yatish27 has quit [Remote host closed the connection]
<shevy>
hmm
<shevy>
are you sure it assumes ASCII? they should default to UTF-8 when nothing else has been specified datacat_
<zenspider>
yashinbasement: how are you calling it?
<yashinbasement>
nthterm(1, 2, 3)
[H]unt3r has joined #ruby
<orionp>
zenspider - thanks!
freeze has quit [Ping timeout: 265 seconds]
<Aeyrix>
baweaver: Doubtful. :<
<zenspider>
orionp: I think the "right" way is to call Gem.paths = env
subshad has joined #ruby
<BraddPitt>
recursive overflow
<zenspider>
but that just calls clear_paths and then pulls data out of a hash
<BraddPitt>
yashinbasement did you mean to put `return first` on line 4?
<BraddPitt>
oh wait no
<BraddPitt>
there is no return out of the recursive call
<baweaver>
yep
<BraddPitt>
you have no base case
heyrhett has joined #ruby
freeze has joined #ruby
<yashinbasement>
isn't it a base case
<yashinbasement>
n == 1
<bougyman>
I think you ment for a condition to be in the elsif
<bougyman>
no?
<zenspider>
yashinbasement: what does it do if n == 1 ?
<yashinbasement>
and we don't need to specify return in ruby
<baweaver>
then it goes to the next conditional
<baweaver>
you do in that case
<yashinbasement>
ohh
<BraddPitt>
yashinbasement you have to explicitly specify for early returns
<yashinbasement>
sorry
<yashinbasement>
dammn
<baweaver>
or you need to make that a branch
<yashinbasement>
thanks
<baweaver>
it only implies a return of the last value in a function
<baweaver>
/ method
<zenspider>
baweaver / BraddPitt / bougyman -- *sigh* don't just give them it. let them work through it.
<yashinbasement>
that's why they say don't fall in love in ruby syntax :)
<BraddPitt>
we sort of did, zenspider
<zenspider>
study up on pedagogy
<zenspider>
BraddPitt: you _especially_ didn't
dseitz has joined #ruby
gofsckyourself has joined #ruby
<gofsckyourself>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
gofsckyourself has left #ruby ["Leaving"]
<BraddPitt>
can this meme be put to rest
<BraddPitt>
or at least have the trigger removed
<shevy>
I guess it was the same old dude who picks weird nicks
<zenspider>
no and no
<zenspider>
what we can do is nuke gofsckyourself
blackmesa has quit [Quit: WeeChat 1.3]
andybernard has quit [Ping timeout: 265 seconds]
eightfold has quit [Quit: eightfold]
<baweaver>
or put that on the blacklist
<baweaver>
admittedly my bot is lazy.
<baweaver>
well, more correctly, my bot plugin
<shevy>
it'll lazily scroll up and away :)
<baweaver>
Really I can just add a Levenshtein to it to see if it has distance < 3 from a curse word as a half point towards ban.
<shevy>
lol
<shevy>
shouldn't you be building dams instead?
jaycee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver>
radar rejected my PR to blacklist his name :(
yashinbasement has quit [Quit: Leaving]
<shevy>
I <3 beavers
<BraddPitt>
>they spoiled the entire meme in the url
* baweaver
shrugs
<shevy>
eh that fish has attitude so it's worth the visit
devoldmx has joined #ruby
<zenspider>
I've been face to face with one of those freediving
<shevy>
ewww
<zenspider>
they're _awesome_ looking... in the dictionary sense of the word
sdfgsdfg has joined #ruby
Timba-as has joined #ruby
<shevy>
he looks bitey
<zenspider>
you get a definite sense of "you've been around since dinosaurs" feel from it
<zenspider>
they're very bitey
<dfockler>
Parrotfish are nightmare fuel
axsuul has joined #ruby
<zenspider>
there's an awesome photo series of a dipshit who tried to pet one in phuket, thailand... luckily they have very good plastic surgeons there
sdwrage has joined #ruby
<zenspider>
they somehow got the thumb back, got him out, and got it reattached rather quickly
<zenspider>
not sure how the former happened. I'd eat it if I were the eel
<baweaver>
There are only two things that can be considered infinite, human stupidity and the universe. I'm not sure of the latter though
<BraddPitt>
whats so bad about the parrotfish dfockler