<Aloysius1>
But then when I try to use the class in it, it says "Could not find ... among 111 total gems (Gem::LoadError)".
<Aloysius1>
(I've stripped down to two lines--from previously working code!--and am getting this error now.)
<dingus_khan>
zzak: they fixed the documentation bug!
<drbrain>
Aloysius1: the … sounds like the important part of your error
<zzak>
dingus_khan: yay :)
<Aloysius1>
Well, here's what I have: One line Gemfile: --> gem "bunny", "~> 0.9.0.pre9"
<Aloysius1>
One line of code in a test.rb file: gem "bunny", "~> 0.9.0.pre9"
pipework has joined #ruby-lang
cored has quit [Ping timeout: 252 seconds]
<drbrain>
Aloysius1: pro-tip, don't use ~> with pre-release dependencies, it probably doesn't do what you mean
<drbrain>
Aloysius1: pro-tip: don't use "gem" in your ruby source if you're using Bundler
apeiros_ has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<Aloysius1>
drbrain: Second one first: what?
<drbrain>
Aloysius1: if you're using bundler to manage dependencies it should be the single unambiguous place you store that information
<drbrain>
aka it is DRY
<drbrain>
if you update it in your Gemfile then you must also update it in your source
<drbrain>
if someone else wants to upgrade bunny they'll see your Gemfile and change it there, then be very confused when it gives errors
teleological has joined #ruby-lang
<Aloysius1>
Let me go back a step: "don't use 'gem' in your ruby source if you're using Bundler"? I must have a misunderstanding there.
<Aloysius1>
The only place I'm using "gem" is my Gemfile.
<Aloysius1>
Is that what you mean?
imperator has quit [Ping timeout: 248 seconds]
<drbrain>
then why did you write: 17:02 Aloysius1: One line of code in a test.rb file: gem "bunny", "~> 0.9.0.pre9"
dingus_khan has quit [Remote host closed the connection]
imperator has joined #ruby-lang
dingus_khan has joined #ruby-lang
<drbrain>
combined with “One line Gemfile: --> gem "bunny", "~> 0.9.0.pre9"” it sounds like twice
imperator has quit [Client Quit]
<Aloysius1>
Ah..crap...my copy didn't work.
<Aloysius1>
That was supposed to be one line of code in a test.rb file: "connection = Bunny.new"
<drbrain>
ok
<drbrain>
you need to require 'bunny'
<Aloysius1>
Sorry.
<drbrain>
above Bunny.new
GeissT has joined #ruby-lang
<drbrain>
(presumably the bunny gem has a bunny.rb, but there is the rare exception where this is not true)
dingus_khan has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 256 seconds]
spinky has joined #ruby-lang
<Aloysius1>
There is a bunny.rb. I'm actually using Rubymine alternating with the command line to figure out the environment differences. But Rubymine IDE sees the "bunny.rb" while running it I get the constant issue. (Either CLI or IDE)
<drbrain>
perhaps Rubymine and your command-line ruby are different?
<drbrain>
try ruby -e 'p Gem.path' on the command line vs in Rubymine
dingus_khan has joined #ruby-lang
ryez has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
<Aloysius1>
Well, from the CLI it's ["~/.rvm/gems/ruby-2.0.0-p0", "~/.rvm/gems/ruby-2.0.0-p0@global"], which is where the bunny.rb gems are.
dingus_khan has joined #ruby-lang
<Aloysius1>
(The CLI is my main concern. I know there are going to be discrepancies, but I can work them out if I "get" the CLI.)
spinky has quit [Ping timeout: 264 seconds]
<drbrain>
which environment does it fail in?
<Aloysius1>
both, and both with the same error.
nathanstitt has quit [Quit: I growing sleepy]
<Aloysius1>
Which isn't the gem error but the "test.rb:1:in `<main>': uninitialized constant Bunny (NameError)".
<drbrain>
did you require 'bunny'?
io_syl has quit [Ping timeout: 260 seconds]
<Aloysius1>
Like it's just not seeing bunny.rb
nathanstitt has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
<Aloysius1>
Ah...yeah, that was my original question: I need to do that in the ... module, test or class where it's being used? It doesn't always seem to be necessary.
dingus_khan has quit [Ping timeout: 252 seconds]
<Aloysius1>
It definitely fixes my two (now three) line example.
io_syl has joined #ruby-lang
<drbrain>
if I have a project with multiple files I typically require my dependencies in the root file
<Aloysius1>
So, you have a root that requires all the files and all the dependencies?
<drbrain>
yes
<drbrain>
most of the time
<drbrain>
if the dependency is only used sometimes I may require it inside a method
agarie has quit [Remote host closed the connection]
<Aloysius1>
OK, that explains a lot. Mucho appreciato, doc.
<rickhull>
if you only want to require a certain chunk, and the requires are structured "properly", you could do require 'foo/bar' instead of require 'foo'
<rickhull>
i.e. foo.rb requires ~everything~, but foo/bar.rb just requires what it needs
<drbrain>
rickhull: that depends quite a bit on the intention of the author
<rickhull>
yeah
<drbrain>
sometimes require 'foo' is intended to be the only entry point
hogeo has joined #ruby-lang
<Aloysius1>
Right. I've seen that. It seems like an optimization.
<drbrain>
most of my projects work that way as otherwise it's difficult to avoid the "circular require" warning
lcdhoffman has joined #ruby-lang
<rickhull>
IMHO, it's a smell if you don't have a pure require structure. but agreed fully that it requires authorial intent
<rickhull>
and is not "standard"
DEac- has joined #ruby-lang
<Aloysius1>
I have another structural question, related to testing.
<Aloysius1>
I have a module, and this module publishes to a queue.
<Aloysius1>
My thought is that classes who want to publish to the queue will include this module.
<Aloysius1>
But I don't have any of those classes yet. Just the publishing module.
jacktrick has quit [Quit: Leaving]
justinmb_ has quit [Remote host closed the connection]
<Aloysius1>
Right now, I've done it badly by making all the module elements "self.whateverfunction".
bzalasky has joined #ruby-lang
<Aloysius1>
But this seems like a good place for a mock object. Reasonable?
<Aloysius1>
Except it would have to be a mock class, I guess, since it needs to include the module?
<drbrain>
Aloysius1: when testing modules, I often include them into my TestCase
<Aloysius1>
Ahhh. I'm using Cucumber at the moment and have Rspec on the brain but that might make more sense.
<rickhull>
Aloysius1: are you talking modules as mixins?
<Aloysius1>
(I'm struggling with how to divide testing responsibilities.)
<Aloysius1>
rickhull: yes
bzalasky has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
mrsolo has quit [Read error: Connection reset by peer]
sepp2k has quit [Remote host closed the connection]
priodev has quit [Ping timeout: 264 seconds]
mrsolo has joined #ruby-lang
nathanstitt has joined #ruby-lang
tylersmith has joined #ruby-lang
hashkey has quit []
pipework has quit [Remote host closed the connection]
dingus_khan has quit [Remote host closed the connection]
priodev has joined #ruby-lang
plurt has joined #ruby-lang
dingus_khan has joined #ruby-lang
teleological has quit [Remote host closed the connection]
dvorak_ has quit [Ping timeout: 245 seconds]
dvorak has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
roadt_ has joined #ruby-lang
spuk has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
<dingus_khan>
zzak: so I got the docs to generate, after following the instructions on the rvm channel, and I still get the same empty vim-style page for the command ri ruby:re
swygue has joined #ruby-lang
<dingus_khan>
I think I'm gonna try telling them in the rvm channel what it is I'm trying to do, lol
Cakey has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
krz has joined #ruby-lang
swygue has quit [Client Quit]
swygue has joined #ruby-lang
spinky has quit [Ping timeout: 248 seconds]
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
swygue has quit [Read error: Operation timed out]
swygue has joined #ruby-lang
hapster has quit [Quit: Leaving]
spinky has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
spinky has quit [Client Quit]
justinmb_ has joined #ruby-lang
swygue has quit [Read error: No route to host]
spinky has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
r0bby_ has joined #ruby-lang
swygue has joined #ruby-lang
spinky has quit [Ping timeout: 264 seconds]
pevjan has joined #ruby-lang
robbyoconnor has joined #ruby-lang
r0bby_ has quit [Ping timeout: 256 seconds]
swygue has quit [Read error: Operation timed out]
teleological has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
bzalasky has joined #ruby-lang
Gaelan has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
ryez has left #ruby-lang [#ruby-lang]
lsegal has joined #ruby-lang
swygue has joined #ruby-lang
Domon has joined #ruby-lang
spinky has joined #ruby-lang
jonahR has joined #ruby-lang
swygue has quit [Ping timeout: 245 seconds]
Gaelan has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
dvorak has quit [Ping timeout: 256 seconds]
Gaelan has quit [Client Quit]
Gaelan has joined #ruby-lang
swygue has joined #ruby-lang
spinky has quit [Ping timeout: 248 seconds]
mistym has quit [Remote host closed the connection]
roadt_ has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
dvorak has joined #ruby-lang
pevjan has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
chrishunt has quit [Quit: ZzZzZz...]
lguardiola has quit [Ping timeout: 256 seconds]
nathanstitt has quit [Quit: I growing sleepy]
seydar has joined #ruby-lang
<seydar>
drbrain: ping
<seydar>
i'm hoping you worked at nokia because my next question presumes so
<seydar>
can i write ruby apps for nokia phones (namely the Mer OS)?
<seydar>
i've never had a smartphone and now am considering getting one. i am very much not in the loop for this.
dhruvasagar has joined #ruby-lang
Bosox20051 has joined #ruby-lang
pevjan has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
machuga|away is now known as machuga
spuk_ has joined #ruby-lang
spuk has quit [Ping timeout: 276 seconds]
dvorak has quit [Ping timeout: 264 seconds]
machuga is now known as machuga|away
dhruvasagar has quit [Ping timeout: 276 seconds]
chrishunt has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 252 seconds]
nathanstitt has joined #ruby-lang
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
bzalasky has joined #ruby-lang
singpolyma has quit [Ping timeout: 246 seconds]
seydar has quit [Quit: leaving]
singpolyma has joined #ruby-lang
dvorak has joined #ruby-lang
jerrytgarcia has joined #ruby-lang
<drbrain>
segy: I haven't worked at Nokia, sorry
<drbrain>
oops
<drbrain>
oh, seydar is gone
<segy>
ahh
* segy
hides again.
sailias has quit [Ping timeout: 256 seconds]
dankest has quit [Quit: Leaving...]
dankest has joined #ruby-lang
droptone has quit [Read error: Operation timed out]
<rickhull>
hmm, apparently i don't understand how UDP sockets work. since I can connect "successfully" without the server running
Gaelan has quit [Ping timeout: 252 seconds]
saarinen has joined #ruby-lang
<rickhull>
writes apparently succeed, but reads don't TIL
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
Gaelan has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Bosox20051 has quit [Remote host closed the connection]
bentis has quit [Read error: Operation timed out]
bentis has joined #ruby-lang
Gaelan has quit [Ping timeout: 264 seconds]
bzalasky has quit [Remote host closed the connection]
cordax has joined #ruby-lang
nyuszika7h has quit [Remote host closed the connection]
nyuszika7h has joined #ruby-lang
akagr has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<eam>
rickhull: are you using connect() with udp?
<rickhull>
yeah, sheepishly
<rickhull>
i come from a tcp world :p
narsa has joined #ruby-lang
<rickhull>
wide open to alternative suggestions
<eam>
it's fine, it just means something different
kgrz has quit [Ping timeout: 276 seconds]
<rickhull>
i resolved my particular issue by writing garbage data, then reading. the server is supposed to respond to garbage data
<rickhull>
so now i test on the response contents or lack thereof
<eam>
when you use connect() with SOCK_DGRAM it sets the default address for a sent dgram, and it filters inbound dgrams to that socket
akagr has quit [Ping timeout: 250 seconds]
<eam>
filters dgrams not sourced from the peer you connect() to
<eam>
but it doesn't make udp connection oriented :)
<rickhull>
right
<eam>
so you still have no reliability and no way to know if a remote server is running
<rickhull>
yeah
kgrz has joined #ruby-lang
narsa has left #ruby-lang [#ruby-lang]
narsa has joined #ruby-lang
<rickhull>
i get no exceptions on writing to non-listening UDP port
<rickhull>
and Errno::ECONNREFUSED on reading a non-listening port
<rickhull>
i.e. server isn't running
dingus_khan has quit [Remote host closed the connection]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
narsa has left #ruby-lang [#ruby-lang]
D9 has joined #ruby-lang
spike|spiegel has quit [Quit: WeeChat 0.4.0]
narsa has joined #ruby-lang
narsa has left #ruby-lang [#ruby-lang]
narsa has joined #ruby-lang
<rickhull>
arguably i shouldn't even be testing at this level as a "unit test" i guess
<narsa>
hello, i have a question. i have a method (call it "run_the_block") that runs data = yield(data) if block_given? . i have another method that calls this (call it "pass_the_block"). i would like to pass a block (not a Proc) to pass_the_block and have it run by run_the_block. is this possible?
<rickhull>
i had to add a sleep 0.1 to make sure the server is running before the client does tests
<rickhull>
but i'm not convinced mocking or something is a reasonable substitute
henrikhodne has quit [Quit: Computer has gone to sleep.]
ruby-lang118 has joined #ruby-lang
henrikhodne has joined #ruby-lang
ruby-lang118 has quit [Client Quit]
fsvehla has quit [Quit: fsvehla]
breakingthings has joined #ruby-lang
roadt_ has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby-lang
tylersmith has joined #ruby-lang
roadt_ has joined #ruby-lang
bugg has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 246 seconds]
hashkey has quit [Ping timeout: 256 seconds]
hashkey has joined #ruby-lang
hashkey is now known as Guest6153
imperator has joined #ruby-lang
JohnBat26 has joined #ruby-lang
bugg has joined #ruby-lang
blacktulip has quit [Remote host closed the connection]
<chris2>
i have some code that deals with long base64 encoded strings, and String#unpack("m*") is a bottleneck since i actually just want to write the result into a file
lguardiola has joined #ruby-lang
<yorickpeterse>
ok
<pabs>
you could run the unpack and write in a background thread or a separate process
<chris2>
i wonder if i can split the data and unpack in chunks
<pabs>
you can, you just have to align it properly, at 8 byte intervals i think
<chris2>
problem is newlines
<pabs>
ignore all whitespace, it's not part of the encoding
wrwdev has quit [Remote host closed the connection]
wrwdev has joined #ruby-lang
vlad_starkov has joined #ruby-lang
wmoxam has joined #ruby-lang
pipework has joined #ruby-lang
<chris2>
yes
<chris2>
but then i cannot align
tomzx_mac has quit [Ping timeout: 276 seconds]
* chris2
decides its fast enough for now :P
cofin has joined #ruby-lang
justinmb_ has joined #ruby-lang
roadt_ has quit [Ping timeout: 276 seconds]
roadt_ has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
fsvehla has joined #ruby-lang
<whitequark>
chris2: what about piping it to base64 -d ?
<apeiros>
chris2: in base64 with newlines, the newlines are in a given interval (all 72 chars? forgot)
<apeiros>
so you could still align
<apeiros>
only the last chunk should be off
<chris2>
whitequark: yeah, considering such a thing
<chris2>
i'd prefer a Digest::XXX.style interface
<chris2>
apeiros: in theory yes
roadt_ has quit [Ping timeout: 256 seconds]
sailias has joined #ruby-lang
<whitequark>
chris2: require 'base64'
<whitequark>
Base64.decode64, I think it was so
<chris2>
not incremental
<apeiros>
chris2: meaning you have broken base64 in praxis?
<chris2>
yes
<chris2>
i deal with mail
<chris2>
everything is broken
roadt_ has joined #ruby-lang
rippa has joined #ruby-lang
<apeiros>
hurray!
<apeiros>
I wonder how long we'll be stuck with that broken mess which is SMTP
<chris2>
hopefully forever
anildigital_work has joined #ruby-lang
roadt_ has quit [Max SendQ exceeded]
<apeiros>
you're a born masochist?
<jaska>
anything they replace it with will probably be far worse
<whitequark>
apeiros: you like webapps more?
<apeiros>
no
<apeiros>
but I like sane protocols
<yorickpeterse>
I'd say SMTP isn't that bad
<whitequark>
we could use a sane, backwards and forwards compatible subset of SMTP
<whitequark>
this is better than anything else imo
<yorickpeterse>
at least it doesn't shit some form of pseudo-json-extension crap all over the place
<jaska>
go look at ldap schemas or snmp mibs if you want insanity
<yorickpeterse>
or XML
<whitequark>
jaska: I like LDAP
<chris2>
apeiros: newer protocols suck more
<whitequark>
in fact I have LDAP contact list on my server & I enjoy it
<jaska>
whitequark: but the.. schemas.. hurl.
<whitequark>
integration with roundcube webmail and android
<whitequark>
jaska: I even wrote some custom ones, for jabber and smth else
<whitequark>
it requires some consideration but in the end, ASN.1 is for better
mbj has quit [Read error: Operation timed out]
<jaska>
7 types of strings
<whitequark>
so?
<whitequark>
they're likely all used in practice
<whitequark>
even EBCDIC, which I assume is there
<whitequark>
or would you rather use XML, where everything is the single type of string? ;)
<jaska>
actually hmm, i dont see ebcdic
<chris2>
if smtp was 8bit safe everywhere, that i would approve
<whitequark>
jaska: that's strange
roadt_ has joined #ruby-lang
<whitequark>
chris2: not sure if it makes sense for a text-based protocol to be 8-bit-safe
<whitequark>
as in, binary-safe
<whitequark>
unicode-safe, maybe
<chris2>
yes, because people send fucking non-text things by mail since 1988
<apeiros>
all those poor wasted bytes due to base64… silently their sibling bytes weep.
<chris2>
yes
<chris2>
its just inefficient
rwilcox has joined #ruby-lang
<chris2>
else you can just shift stuff around
LinkedoT has quit [Quit: This computer has gone to sleep]
mbj has joined #ruby-lang
<whitequark>
chris2: that doesn't matter
LinkedoT has joined #ruby-lang
<whitequark>
if you want efficiency that badly, use TLS, which, IIRC, provides compression
roadt_ has quit [Ping timeout: 256 seconds]
<jaska>
(which people are disabling, re: the somewhat recent tls exploits)
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse>
whitequark: then you seriously need to fix your own code
<whitequark>
jaska: from the description of the attack, it doesn't even apply to SMTP
<whitequark>
yorickpeterse: wat?
<yorickpeterse>
Click link I pasted
<yorickpeterse>
read docs
<yorickpeterse>
then read code
<whitequark>
I did
<whitequark>
the code is correct
<yorickpeterse>
it talks *pecifically* about modifying the AST
<yorickpeterse>
* specifically
<whitequark>
where?
<jaska>
whitequark: i wouldnt be surprised if it still resulted in a knee-jerk reaction of disabling it everywhere
<whitequark>
jaska: dumb people are dumb. so?
<yorickpeterse>
whitequark: or does this return a new version of the entire AST?
<whitequark>
yorickpeterse: indeed
<jaska>
no argument.
<yorickpeterse>
oh
<yorickpeterse>
*facedesk*
<whitequark>
jaska: plus, the TLS attack reveals plaintext
<whitequark>
jaska: by just using plaintext you're going to achieve what
* whitequark
shrugs
rockpapergoat has joined #ruby-lang
<whitequark>
yorickpeterse: for any single node to be modified, it requires creation of N nodes where N is the depth of the node being modified
<whitequark>
this is considered acceptable
<whitequark>
(you can actually do insane kinds of magic to achieve even more sharing, as it was described by Eric Lippert; Visual Studio uses a similar structure)
<whitequark>
(but that's kind of extrnaeous for now)
<yorickpeterse>
hm, just noticed "parser" also has an AST::Processor
<yorickpeterse>
which is slightly confusing
<whitequark>
yorickpeterse: it's a Processor for Parser::AST
dhruvasagar has quit [Ping timeout: 252 seconds]
<yorickpeterse>
no shit, but when you talk about "AST::Processor" it gets confusing
teleological has joined #ruby-lang
akash has joined #ruby-lang
<whitequark>
yorickpeterse: yeah, I guess
akash has quit [Quit: leaving]
<yorickpeterse>
hm ruby meetup tonight, to go or to not go
<oddmunds>
i wish there was one in oslo tonight
<oddmunds>
i'd go
<yorickpeterse>
well considering I slept shit last night I'm not sure
<yorickpeterse>
that and my cat kept sleeping in front of my face
<yorickpeterse>
"OH YOU'RE TURNING YOUR HEAD? LET ME PARK MYSELF IN FRONT OF IT...AGAIN!"
<whitequark>
yorickpeterse: why is that a problem
<whitequark>
you don't like fur in your orifices?
<yorickpeterse>
Have you ever tried sleeping with cat pelt in your nose?
<yorickpeterse>
or cat paws in your face
<whitequark>
I think so
<whitequark>
I don't care, I can sleep in any state
jbsan_ has quit [Quit: jbsan_]
<whitequark>
including with 90db noise going on right over me
<yorickpeterse>
well I'm not deaf
<whitequark>
I'm neither
<whitequark>
I just don't give a fuck
mistym has quit [Remote host closed the connection]
<yorickpeterse>
well I suppose that's the Russian heritage
vlad_starkov has joined #ruby-lang
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<yorickpeterse>
BAH
<yorickpeterse>
Found a gem that does what I need
<yorickpeterse>
last release: 2012
<yorickpeterse>
docs in GH are completely different
<yorickpeterse>
so is the code
headius has joined #ruby-lang
tylersmith has joined #ruby-lang
ta has quit [Remote host closed the connection]
<yorickpeterse>
well, the gem "countries" seems to be decent
<Technodrome>
sinatra still the most common light framework
<judofyr>
yes
teleological has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
<Technodrome>
i really do prefer sinatra over rails
glebm has quit [Quit: Computer has gone to sleep.]
[[thufir]] has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<andrewvos>
yes
barttenbrinke has quit [Remote host closed the connection]
fsvehla has quit [Quit: fsvehla]
gnufied has quit [Quit: Leaving.]
saarinen has quit [Quit: saarinen]
GeissT has quit [Quit: MillBroChat AdIRC User]
<Technodrome>
andrewvos: what do you work on?
DomKM has joined #ruby-lang
<yorickpeterse>
According to CodeClime one of our apps has 45 denial of service issues
<yorickpeterse>
looks legit
<yorickpeterse>
"There are 85 vulnerabilities remaining: "
mytrile has quit [Remote host closed the connection]
mawueli has joined #ruby-lang
mawueli is now known as Guest73853
tylersmi_ has quit [Remote host closed the connection]
<andrewvos>
FFFFUUUUUU so I just find out after writing a websockets application that heroku doesn't support websockets
<andrewvos>
This is bullshit
<yorickpeterse>
tehee
jamilbk has joined #ruby-lang
gnufied has joined #ruby-lang
Squarepy has quit [Remote host closed the connection]
<Technodrome>
its taking *forever* to install rdoc documentation for sinatra
<Technodrome>
i think its bugged
<apeiros>
it's
<Technodrome>
hanging or whatever
<andrewvos>
--no-rdoc
<Technodrome>
still though, it shouldn't take this long
<Technodrome>
apeiros: to a non native speaker, its a huge difference huh? :)
<apeiros>
it's
<Technodrome>
^^
<apeiros>
grammar - the difference between knowing your shit and knowing you're shit.
bugg is now known as _KGBot_
<Technodrome>
I know english grammar quite well.
<Technodrome>
noticing you have studied the grammar quite hard, you might pick up on things, that many native speakers could give a shit about :) ……but when it comes to speaking it, you sound nothing like native
<yorickpeterse>
apeiros: this is #ruby-lang, not #grammar-nazi-lang
<Technodrome>
this is becoming quite common with dutch and german speakers , french to
<canton7>
Technodrome, 'could give a shit about' - that one really bugs me. I know it's an Americanism, but still :P
<apeiros>
yorickpeterse: you missed the opportunity to say `its #ruby-lang`
<yorickpeterse>
color vs colour, DISCUSS!
glebm has joined #ruby-lang
<andrewvos>
shutup
<breakingthings>
i prefer kolore
<canton7>
depends whether or not I'm writing code...
<breakingthings>
breakingthingslish.
<Technodrome>
I was at a conference and some french dude kept correcting peoples english
<Technodrome>
like I would never even have the nerve to do something like that to a french person, even if I think I know french, I would never speak as good as a native, never, and vice versa
<zzak>
injekt: good!
<yorickpeterse>
Technodrome: French people are....wait are there any French in this channel?
<zzak>
injekt: you free later tonight?
<Technodrome>
the problem is many foreign speakers, think they can spend english just as good as native
<Technodrome>
yorickpeterse: there is a few
<andrewvos>
they are of eating baguettes
judofyr has quit [Remote host closed the connection]
<yorickpeterse>
well in that case lets say I have a biased opinion of French people
<yorickpeterse>
mostly those aged between 10-20 playing videogames
<apeiros>
Technodrome: dude, it was meant in a friendly way. I'm sorry if you feel attacked.
<apeiros>
sheesh
<Technodrome>
its really a european thing in general, dutch people , think they're born speaking english
<yorickpeterse>
hey now
<yorickpeterse>
careful
<yorickpeterse>
hup holland hup
<andrewvos>
hahah
<Technodrome>
then when I speak to them in real life, they get so disappointed :)
<yorickpeterse>
Dutch people in general speak terrible English
<apeiros>
who doesn't speak terrible english…
<Technodrome>
well years of british people complimenting them, you speak better than we do …..got to their heads
<andrewvos>
amerrricans
<yorickpeterse>
Technodrome: that's probably just becase we don't stick the word "bruv" at the end of every sentence
<andrewvos>
you wot mate
<yorickpeterse>
see, andrewvos is the prime example of british "slag"
<Technodrome>
I don't mind bad english at all, but when someone tells me they got better english than me, and they sound foreign as hell, sometimes one has to refresh their minds
<apeiros>
lol
<apeiros>
this is getting ridiculous
<Technodrome>
i'm not even talking about you apeiros
<apeiros>
still, you seem quite butthurt. *shrugs*, *walks off*
<rue>
I do.
<Technodrome>
apeiros: but it is a sad sad realization for many
<rue>
I CHALLENGE YOU TO AN ENGLISH-OFF
<Technodrome>
apeiros: yes , I was a little butt hurt, just a little
<yorickpeterse>
rue: oi mate, shut up
<yorickpeterse>
i'll shank ya
* yorickpeterse
is bad at this
<andrewvos>
knife*
<yorickpeterse>
I like the (apparently) Aussie way: I'LL SMASH YA
<andrewvos>
knife ya
<yorickpeterse>
or w/e it was
* yorickpeterse
deals with way too many cultures/languages on a daily basis to keep track of all this
<apeiros>
Technodrome: so what do you see when you see somebody write broken code? do you tell them? or are you afraid to hurt his feelings?
* whitequark
giggles
<Technodrome>
apeiros: this is not code
<apeiros>
same principle.
<Technodrome>
apeiros: you notice it because you're not native
<whitequark>
Technodrome: both are communication medium for people.
<apeiros>
you're evading.
<whitequark>
Technodrome: btw. I notice bad grammar equally well in English and Russian.
<Technodrome>
not to sure about that bro :)
<yorickpeterse>
* too
* yorickpeterse
runs
<yorickpeterse>
wait, I have something more suitable
<Technodrome>
as I said, its very popular for europeans that are non english speaking these days, to go around thinking they are better at english than "english speaking people" , it's like a tongue and cheek thing
<Technodrome>
here where I live, we get it a lot
<andrewvos>
it's
<yorickpeterse>
whitequark: work?
<whitequark>
well
<yorickpeterse>
andrewvos: hahaha jesus
<Technodrome>
andrewvos: that was actually the auto correct that time :x
<whitequark>
I'm running rsync right now
<Technodrome>
andrewvos: you would think i bother writing a '
<apeiros>
Technodrome: ever tried to take things at face value instead of interpreting deeper things into it?
<whitequark>
apeiros: I guess it isn't bad at all.
<whitequark>
compared to russian at least.
<Technodrome>
does russia have it?
<whitequark>
Technodrome: yeah
<Technodrome>
can you get out of it?
<whitequark>
and if you're enlisted you're as good as dead, literally
<yorickpeterse>
whitequark: did you kill people?
<apeiros>
whitequark: army service? it's annoying. but not bad in any important way.
<whitequark>
Technodrome: yeah, with enough money
<Technodrome>
ah, the eastern way whitequark
carloslopes has quit [Ping timeout: 256 seconds]
<apeiros>
president of switzerland? wtf…
<whitequark>
last time I checked it was about 7000 USD. not bad for your life
<Technodrome>
i was watching some documentary, it was talking about in this war, russia was selling the army weapons, as well as fighting them. They still like the money
thatJasonSmith has quit [Remote host closed the connection]
<yorickpeterse>
As said before: hup holland hup, we don't have mandatory army service. Not that it would matter, our army is pretty shit anyway
<yorickpeterse>
plus we got steamrolled in WW2 anyway
rwilcox has quit [Quit: Computer has gone to sleep.]
<Technodrome>
Russia stays more aggressive, still want world domination
<whitequark>
lol @ that
cored has quit [Ping timeout: 252 seconds]
<Technodrome>
like the army tells americans to surrender if it's the only option
<yorickpeterse>
hmpf, for some reason NERDTree keeps removing my bookmark called "models"
<Technodrome>
in russia, you are better off dead than to surrender
<yorickpeterse>
whitequark: hey you gonna just sit and take that? He's mocking the motherland
<Technodrome>
No, I don't mean any hate
<Technodrome>
more or less joking
<Technodrome>
but its true, their military is much more aggressive
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<yorickpeterse>
that's because of their thirst for human flesh
<yorickpeterse>
or capitalist flesh to be more specific
akahn has quit [Ping timeout: 252 seconds]
dlackty_____ has quit [Ping timeout: 252 seconds]
<Technodrome>
some soldiers were surrendering once, and other soldiers (russia) shot them for doing such a horrible thing
DarkBushido has joined #ruby-lang
<Technodrome>
just a bit more aggressive military wise
<whitequark>
yorickpeterse: I don't care
<yorickpeterse>
what kind of patriot are you
<Technodrome>
as I said, I didn't mean anything by it
<Technodrome>
its not just russia, its pretty much anything east of France :)
Guest6153 has quit []
teleological has joined #ruby-lang
[[thufir]] has quit [Quit: Leaving.]
jamilbk has quit [Quit: jamilbk]
hashkey has joined #ruby-lang
danrabinowitz has joined #ruby-lang
<Technodrome>
yorickpeterse: you are dutch?
<yorickpeterse>
ASDKJHASDKJASHDJKD RUBY
<yorickpeterse>
Technodrome: yes
<yorickpeterse>
foo = foo.derp
<yorickpeterse>
CAN NOT CALL DERP ON NILCLASS
<yorickpeterse>
GET FUCKED VARIABLE PRESCANNING
<yorickpeterse>
grrrrrr
<Technodrome>
netherlands == english people who just speak dutch
<yorickpeterse>
Yeah except I happened to've learned my English in England :)
<yorickpeterse>
sadly I sound like I have a clogged nose and I'm talking through a toilet when I talk English using a mic (for some reason)
<whitequark>
yorickpeterse: I'm not?
<yorickpeterse>
whitequark: booo
<Technodrome>
the country side of the netherlands and the country side of england look very much alike
<yorickpeterse>
eh no, they are very very different
<yorickpeterse>
Mostly because England has this thing called "hills"
<yorickpeterse>
whereas NL is just a puddle of people below sea level
<Technodrome>
well
<yorickpeterse>
we have this thing called a "hill" somewhere in the south but it's like 2m tall
<apeiros>
want some of ours?
<Technodrome>
about somewhere below mid way down france, everything changes :)
wrwdev has left #ruby-lang [#ruby-lang]
wrwdev has joined #ruby-lang
<yorickpeterse>
apeiros: yes please, it would make biking so much more exciting
<yorickpeterse>
well the going downhill part
<apeiros>
^^
<apeiros>
it makes it also so much harder
<yorickpeterse>
true
<yorickpeterse>
But you don't need bike safety when you have swag
<yorickpeterse>
apparently
tylersmith has joined #ruby-lang
<apeiros>
was so proud when my wife finally managed 50m in height distance
kgrz has quit [Ping timeout: 260 seconds]
<apeiros>
of course, that gets you almost nowhere here
<apeiros>
(she learned biking last year and didn't have much chance to practice, so she's excused)
<yorickpeterse>
hey yo, biking is pretty hard if you've never done it
<yorickpeterse>
especially with hills
<yorickpeterse>
also lol, somebody asked on /r/amsterdam if it was a good idea to learn biking in Amsterdam
<yorickpeterse>
which is basically a death sentence
Guest73853 has quit []
carloslopes has joined #ruby-lang
<Technodrome>
for the next 6 months i don't leave the house
<yorickpeterse>
even if you manage to evade all the tourists, trams, cars and locals you'll probably still get stuck in a train track and break both your wheels and your neck
wrwdev has left #ruby-lang [#ruby-lang]
wrwdev has joined #ruby-lang
<yorickpeterse>
errr tram track
<apeiros>
yorickpeterse: oh yes it is. there was no sarcasm in it when I said I was proud.
skade has quit [Ping timeout: 260 seconds]
Dan has quit [Quit: Leaving...]
vlad_starkov has joined #ruby-lang
<yorickpeterse>
I still tend to be amazed when people come here and are like "HOLY SHIT I CAN BIKE HERE?", I'd say we take that too much for granted
<havenwood>
Technodrome: Sequel does use Mysql2, amongst other adapters.
<Technodrome>
ah
<Technodrome>
so it was would pretty useless to use the original mysql one?
gix has quit [Quit: Client exiting]
earthquake has quit [Ping timeout: 248 seconds]
ckipel has joined #ruby-lang
mawueli has joined #ruby-lang
mawueli is now known as Guest69430
henrikhodne has joined #ruby-lang
gix has joined #ruby-lang
<Technodrome>
did ruby's performance improve from 1.9 to 2.x?
Fretta has joined #ruby-lang
saarinen has quit [Quit: saarinen]
zerokarmaleft has joined #ruby-lang
machuga is now known as machuga|away
_KGBot_ is now known as bugg_
bugg_ is now known as [bugg]
dangerousbeans has joined #ruby-lang
<zerokarmaleft>
hmm, I'm iterating over a list of strings and converting them to symbols, and I'm unexpectedly getting double quotes included in the symbol names
<whitequark>
Technodrome: quite a bit
<Technodrome>
interesting
<Technodrome>
you like node.js whitequark ?
<zerokarmaleft>
e.g. foo.to_sym turns into :"Yo Foo" where foo="Yo Foo"
<apeiros>
zerokarmaleft: that's expected
<yorickpeterse>
I'M ON A TRAIN
<zerokarmaleft>
apeiros: is that new?
<apeiros>
zerokarmaleft: I guess you're confusing .inspect and .to_s
<apeiros>
:"Yo Foo" is how you write that symbol. how else could you?
<apeiros>
:Yo Foo? How'd ruby know that the symbol isn't finished after :Yo?
<zerokarmaleft>
oh I see, the spaces
<zerokarmaleft>
derp
<apeiros>
;-)
<zerokarmaleft>
apeiros: thanks for restarting my brain :D
<apeiros>
yw
__butch__ has quit [Quit: Leaving.]
kgrz has joined #ruby-lang
<whitequark>
Technodrome: it shouldn't exist.
machuga|away is now known as machuga
<yorickpeterse>
whitequark: but then how would you be able to start some redundant startup around the idea of using Node.js and feeling smug about it?
io_syl has joined #ruby-lang
sepp2k has joined #ruby-lang
vlad_starkov has joined #ruby-lang
hakunin has joined #ruby-lang
__butch__ has joined #ruby-lang
saarinen has joined #ruby-lang
Cakey has joined #ruby-lang
mrsolo has joined #ruby-lang
justinmb_ has quit [Read error: Connection reset by peer]
justinmb_ has joined #ruby-lang
Squarepy has quit [Remote host closed the connection]
MagBo_ has joined #ruby-lang
amerine has joined #ruby-lang
<MagBo_>
Hello, gentlemen. I get enoent when I invoke ``Digest::MD5.file(File.join('cache', file)).hexdigest``: ``cache/i3-4.2.tar.bz2 (Errno::ENOENT)``
<yorickpeterse>
and the file exists?
<MagBo_>
On the other hand, output of ``puts Dir.entries("./cache/").inspect`` is ["i3-4.2.tar.bz2", ".", ".gitignore", ".."]
tbuehlmann has quit [Remote host closed the connection]
LinkedoT has joined #ruby-lang
Nuru has joined #ruby-lang
LinkedoT has quit [Quit: This computer has gone to sleep]
vl3 has joined #ruby-lang
LinkedoT has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
<erikh>
got my mutt on
<erikh>
very happy
<erikh>
but that's not ruby either
<erikh>
solarized dark for mutt is not bad at all thoug
<fbernier>
so, I used "bundle open a_gem", made a couple of changes, then want to rollback those changes. So I deleted the folder in ~/.rvm/gems/ruby-1.9.3-p385/gems/a_gem
<fbernier>
and now everything is broken...
<fbernier>
How can I just deleter every gems in that project to get a fresh start ?
<spike|spiegel>
fbernier: delete it from specifications directory
havenwood has quit [Remote host closed the connection]
glebm has quit [Client Quit]
danrabinowitz has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
workmad3 has joined #ruby-lang
danrabinowitz has joined #ruby-lang
vlad_starkov has joined #ruby-lang
havenwood has quit [Ping timeout: 248 seconds]
slash_nick has quit [Ping timeout: 240 seconds]
pdswan has joined #ruby-lang
tylersmith has joined #ruby-lang
Nuru has quit [Quit: Bye bye]
glebm has joined #ruby-lang
pr0ton has joined #ruby-lang
glebm has quit [Client Quit]
<zzak>
injekt: cool, im free whenever
tylersmi_ has joined #ruby-lang
tylersmith has quit [Read error: Connection reset by peer]
wyhaines has joined #ruby-lang
glebm has joined #ruby-lang
pdswan has quit [Quit: pdswan]
bin7me has joined #ruby-lang
<MagBo_>
I believe that using ``return`` is a bad style in Ruby? What is the best way to re-write the following: ``imagecfg[:mirrors].each { |m| mirror_works?(m) and return(m) }``?
<injekt>
return m if mirror_works?(m)
<injekt>
or use ``imagecfg[:mirrors].find { |m| mirror_works?(m) }
nathanstitt has quit [Quit: I growing sleepy]
<workmad3>
or imagecfg[:mirrors].select{|m| mirror_works?(m) }
<injekt>
which will return the first record that matches that block, or nil otherwise
<MagBo_>
Second and third options are way better.
<injekt>
workmad3: return infers he wants a single record
<workmad3>
injekt: good point
<MagBo_>
Thank you, gentlemen!
<MagBo_>
No-no, if I was writing in languages I know I'd use dropwhile.
<MagBo_>
Or match with a predicate.
<injekt>
oh then you want workmad3s suggestion
<workmad3>
MagBo_: if you could put a 'works?' method on the items in the collection, you could do it with imagecfg[:mirrors].select(&:works?)