<Psi-Jack>
Hmmm, interesting though. I shove 10 items into the direct queue, add a sleep to the consumer, and my main process sleeps while the thread is running, but it only consumes 5 out of 10 items that were published. Heh.. I'm kinda consumed with confusion. LOL
baweaver has quit [Remote host closed the connection]
hotpancakes has quit []
jgt has quit [Ping timeout: 252 seconds]
Rinzlit1 has joined #ruby
sooo has joined #ruby
eminencehc has joined #ruby
choke has joined #ruby
fgo has joined #ruby
sooo has quit [Client Quit]
veduardo has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
Rinzlit has quit [Ping timeout: 245 seconds]
<rehat>
how to I properly set a constant in my class def. Every I create a new instance I get a warning 'already initialized constant ...'
<rehat>
oh wait I use ||= this right
<Ox0dea>
rehat: Don't define constants in methods.
Musashi007 has joined #ruby
<[k->
Ox0dea!
<Ox0dea>
[k-!
fgo has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
<rehat>
its right under my class def not in a method
<Ox0dea>
rehat: Nope.
<[k->
it wouldnt do that if it's it the class body
<[k->
does ruby give line numbers for warnings? :o
<Ox0dea>
rehat: Yes, it's terrible. You're using hard tabs.
Rickmasta has joined #ruby
<rehat>
haha man I have sublime text set to 2 spaces for tabs
<rehat>
maybe I suck at copy pasta
<[k->
you do not need to use ||= to assign the constant
<Ox0dea>
rehat: You want "translate_tabs_to_spaces": true.
christiandsg has joined #ruby
<[k->
or don't even use tabs at all
bruno- has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
towski_ has quit [Remote host closed the connection]
nux443 has quit [Ping timeout: 244 seconds]
Soda has quit [Remote host closed the connection]
user1138__ has quit [Quit: Leaving]
dr3w has joined #ruby
tjohnson has joined #ruby
stardiviner has joined #ruby
<rehat>
hmm I think should avoid Edit->Line->Reindent option. Is there a sublime text setting to use spaces instead of tabs for that option?
<rehat>
nvm found it
chipotle has quit [Quit: cheerio]
eminencehc has quit [Remote host closed the connection]
NeverDie_ has joined #ruby
Ox0dea has quit [Disconnected by services]
Ox0dea has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
NeverDie has quit [Ping timeout: 256 seconds]
christiandsg has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
christiandsg has joined #ruby
<rehat>
oh should I ignore that warning if I am loading the script in irb more than once to reload it when I make changes?
<[k->
psssssssssssh
<[k->
yes ignore it
<rehat>
haha ok sorry
<cscheib>
are there any particularly good gems that implement a wrapper for a site's REST API? need some really good examples before I can conceptualize how I should write one for one of my storage devices
bmcginty has quit [Quit: leaving]
finisherr has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
christiandsg has quit [Ping timeout: 265 seconds]
user1138 has quit [Quit: Leaving]
<BraddPitt>
cscheib choose any popular service
<BraddPitt>
twitter, stripe, etc
user1138 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenguy_pc has quit [Read error: Connection reset by peer]
einarj has joined #ruby
<cscheib>
yes yes, just wasn't sure if there were any particular well-known shining examples.
eminencehc has joined #ruby
<cscheib>
just cause it exists and works doesn't mean it's good, well thought out code :P
<shevy>
:)
<shevy>
are you describing one of my projects!!!
Omni_ has quit [Max SendQ exceeded]
<cscheib>
shevy: nope, mine
<shevy>
these days I try to opt for functionality first, then cleaniness
Guest80999 has joined #ruby
nux443 has joined #ruby
stardiviner has quit [Ping timeout: 256 seconds]
<cscheib>
I barely even define methods in most of my code... definitely not very modular yet. trying to get there
einarj has quit [Ping timeout: 246 seconds]
Ropeney has quit [Ping timeout: 246 seconds]
<Ox0dea>
Wat.
d2dchat has joined #ruby
<[k->
do you copy paste a lot
<cscheib>
yup
yqt has quit [Ping timeout: 272 seconds]
<cscheib>
I come from a mostly shell scripting background... so everything's very linear and single task based
<cscheib>
trying to swap my mindset to writing some more reusable code (and sane code), another reason I was asking for good API examples, heh
d2dchat has quit [Remote host closed the connection]
Motoservo has quit [Ping timeout: 246 seconds]
nux443 has quit [Ping timeout: 255 seconds]
Axy has quit [Read error: Connection reset by peer]
<shevy>
cscheib using methods is always useful, you can bind the logic into the methods and just use them
<shevy>
def cleanup
zenguy_pc has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
def create_directories
Ropeney has joined #ruby
<cscheib>
shevy: oh, I'm aware of your utility, it's mostly changing my habits and way of thinking into actually use them
<cscheib>
s/your/their/
davedev24 has quit [Client Quit]
ngscheurich has joined #ruby
war_pigs has joined #ruby
iamninja has quit [Ping timeout: 244 seconds]
eminencehc has quit [Remote host closed the connection]
<shevy>
yeah
nux443 has quit [Ping timeout: 260 seconds]
bazbing80 has joined #ruby
<bazbing80>
How do I give an error class a default message? Shouldn't this be working? class SpecificError < StandardError; def message; "hello I am a specific error"; end; end
<bazbing80>
=> :message
<bazbing80>
2.2.1 :002 > raise SpecificError
<bazbing80>
SpecificError: SpecificError
anibara has joined #ruby
finisherr has quit [Quit: finisherr]
<bazbing80>
sorry, didn't think my irc client would send all 4 lines..regardless, can you see my error? SpecificError: SpecificError rather than SpecificError: "hello I am a specific error"
<bazbing80>
can you see my problem
NeverDie has joined #ruby
fgo has joined #ruby
<Ox0dea>
bazbing80: ruby -v?
NeverDie_ has quit [Ping timeout: 240 seconds]
ericwood has quit [Ping timeout: 255 seconds]
<Ox0dea>
Eh, it won't matter; your example works as expected here all the way back to 1.8.7.
ngscheurich has quit [Ping timeout: 250 seconds]
ericwood has joined #ruby
<bazbing80>
Ox0dea that is so odd..2.2.1 btw...the above has been pasted straight from irb :/ any ideas?
<Ox0dea>
You're right that it doesn't quite work in irb, but irb != ruby.
dagda1_ has quit [Ping timeout: 265 seconds]
<[k->
it heavily modifies ruby
zxvcd_ has quit [Read error: Connection reset by peer]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bazbing80>
Ox0dea: I did not know that! I've been experimenting with irb and it turns out it's heavily modified...although this is the only weirdness I've encountered
zenguy_pc has quit [Read error: Connection reset by peer]
charliesome has quit [Client Quit]
charliesome has joined #ruby
<zenspider>
bazbing80: the problem with your approach is that it overrides a custom message
<zenspider>
raise SpecificError, "something even more specific"
nux443 has quit [Ping timeout: 264 seconds]
jeadre has quit [Remote host closed the connection]
nux443 has joined #ruby
jenrzzz has joined #ruby
<Ox0dea>
zenspider: But then whence E2MM?
<Ox0dea>
That is, isn't it reasonable to give Exceptions default messages?
jeadre has joined #ruby
sacarlson has joined #ruby
* [k-
checks the Exception class
<zenspider>
sure it is.
<zenspider>
from ri: Exception.new(msg = nil)
<zenspider>
so you subclass, override initalize, and give it a default message
sp4rrow has joined #ruby
<[k->
based on what i could gather: @mesg ||= (...)
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
<sacarlson>
there seems to be some conflict when I have two versions of ruby installed on Linux Mint 17 (same as Ubuntu 14.04) when I have installed ruby-full and gems as global with apt-get and sudo gem install ... when I now try to use bundler
nux443 has quit [Remote host closed the connection]
<sacarlson>
is there some method to have both bundler and global apt-get installs not effect each other?
<sacarlson>
I tried a few other versions of install some have different errors, but seem when I do a complete delete of all ruby-full and all global install gems the problem goes away
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
(it doesnt work)
<zenspider>
[k-: so... it doesn't work. :P
<zenspider>
try it my way above
<zenspider>
(don't forget super)
<sacarlson>
eval I'll take a look
<sacarlson>
oh that's not for me
<zenspider>
sacarlson: are you asking a question?
UtkarshRay has joined #ruby
<zenspider>
I see a lot of muddled words... I don't see a coherently described problem and/or question
chipotle has joined #ruby
<sacarlson>
sorry zenspider I went to look at the link above thinking it was a posible solution to my question above
saddad has quit [Ping timeout: 240 seconds]
Miyeah has joined #ruby
nux443 has joined #ruby
Miyeah has quit [Max SendQ exceeded]
* zenspider
sighs
Miyeah has joined #ruby
<sacarlson>
zenspider yes I looking at putting together a more detailed package of my problem to try to make it more clear
<zenspider>
well... meh. that's ok for this example
braincrash has quit [Quit: bye bye]
<zenspider>
sacarlson: we don't need a "package", we just need to understand you. you suck at asking clear questions. just try to be clear. We're smart, but we're not psychic.
<zenspider>
gah. I'm not reading that w/o sending you a bill.
<sacarlson>
ok yes that's what I thought but that's what I had
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ObiWanCannobe has joined #ruby
AlexAltea has joined #ruby
ObiWanCannobe has left #ruby ["Leaving"]
<sacarlson>
the point being there must be some conflict with apt-get install and rbenv install as it seems I have to uninstall the apt-get version to get rbenv version to install and work
<shevy>
possibly the apt-get one comes first in your $PATH
<sacarlson>
shevy: ah very good posibility
einarj has joined #ruby
<sacarlson>
I'm new to this rbenv and bundler world so I must have missed a step
christiandsg has quit [Ping timeout: 265 seconds]
Azure has joined #ruby
braincras has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
nux443 has quit [Ping timeout: 245 seconds]
<shevy>
I am not sure what you are doing there
<shevy>
rbenv can be used without bundler right?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<zenspider>
they have nothing to do with each other
<sacarlson>
I think in my procedure it only gets as far as attempting to do the version install in most cases
amystephen has quit [Quit: amystephen]
nux443 has joined #ruby
<shevy>
I don't know, you seem to fail even before bundler
<shevy>
omg
<shevy>
I can not copy/paste from the link you gave!
<sacarlson>
yes even after I get it to install on other versions I later have problems with bundler
einarj has quit [Ping timeout: 250 seconds]
<zenspider>
NOPE. aren't google apps WONDERFUL?
<sacarlson>
oh ya that sucks want me to pastebin it?
<shevy>
that was a weird moment... I tried to paste the error part here... and I only could paste the URL to that site...
<shevy>
try pastebin and see what happens ;)
<sacarlson>
ok
<sacarlson>
it's very big with all the error output
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<sacarlson>
dam
<sacarlson>
oh ok he did it for me
davedev24 has joined #ruby
nux443 has quit [Remote host closed the connection]
<shevy>
:D
<shevy>
the problem is that the error is not on the site
<shevy>
BUILD FAILED (LinuxMint 17 using ruby-build 20150818)
<shevy>
that doesn't say much at all
<sacarlson>
in the end I did get this bundler app to work but not without killing my other apps that were setup using the old apt-get ruby-full method. so I'm looking for a way for them to work together
<sacarlson>
oh ya the tmp file? you me to post that
<shevy>
that is pretty madness
<shevy>
incompatible library version - /home/sacarlson/.bundle/gems/ffi-1.9.10/lib/ffi_c.so (LoadError)
davedev24 has quit [Client Quit]
<shevy>
isn't that superold?
nux443 has joined #ruby
<sacarlson>
so it pulls the old global gems I think and puts them into the .bundle file I guess
<sacarlson>
ya I run some old ruby stuf that is installed global
<sacarlson>
only way around it that I could find was to remove all global installs
ledestin has joined #ruby
<shevy>
hmm I would assume that there must exist some way to ignore other installs, that is the whole point of installing all those things into the home dir, for users who would not have control over /usr hierarchy
Musashi007 has quit [Quit: Musashi007]
<sacarlson>
yes I would think so but so far failed to find a solution
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimasg has joined #ruby
JulioPapel has quit [Ping timeout: 256 seconds]
<sacarlson>
or maybe I'm wrong and the global install has nothing to do with the problem and just reinstall just some how magicly fixed it
fedexo has joined #ruby
<sacarlson>
does anyone here run both global and rbenv version installs at the same time?
nux443 has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 250 seconds]
fgo has joined #ruby
choke has joined #ruby
darkf has joined #ruby
nux443 has joined #ruby
sdfgsdfg has joined #ruby
sdfgsdfg has joined #ruby
sdfgsdfg has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
sdfgsdfg has joined #ruby
sdfgsdfg has quit [Changing host]
sdfgsdfg has joined #ruby
hmsimha__ has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
Musashi007 has joined #ruby
Rickmasta has joined #ruby
dimasg has quit [Ping timeout: 244 seconds]
lucyinthesky has quit [Quit: dreaming away your life.]
saddad has joined #ruby
Lucky___ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<sacarlson>
oh and by global I mean installed with apt-get install ruby-full on top of running rbenv
war_pigs has quit [Quit: later... computer is sleeping]
dgutierrez1287 has joined #ruby
dimasg has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
dgutierrez1287 has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
tubulife- has quit [Max SendQ exceeded]
jhack has quit [Ping timeout: 252 seconds]
jeadre has quit [Remote host closed the connection]
tenseiten is now known as seitensei
war_pigs has joined #ruby
jeadre has joined #ruby
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
rushed has joined #ruby
towski_ has quit [Remote host closed the connection]
houhouli_ has joined #ruby
lkba has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dimasg has quit [Ping timeout: 252 seconds]
houhoulis has quit [Ping timeout: 255 seconds]
zenguy_pc has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
hashrocket has quit [Quit: Connection closed for inactivity]
christiandsg has joined #ruby
ta has joined #ruby
charliesome has joined #ruby
clarkenciel has joined #ruby
hmsimha__ has joined #ruby
charliesome has quit [Client Quit]
christiandsg has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
ta has quit [Ping timeout: 252 seconds]
<Psi-Jack>
Anyone here ever work with Ruby and RabbitMQ and could provide me some insight? This example code I wrote https://gist.github.com/erenfro/9a3cbe4ac4b1407afd5d puts in 10 items into a rabbitmq queue into a direct exchange. However, it does not get more than 5 items back and when checking RabbitMQ after the run completes, there's no items in queue, only 5 of which were consumed and displayed in the Consumer#run.
<shevy>
sacarlson guess not many opt for that combination. I myself limit myself to one ruby version these days
pranny_ has joined #ruby
<sacarlson>
yes seems so but I have apt-get packages that have dependances on ruby-full that is causeing conflicts at this time.
tubulife- has joined #ruby
<sacarlson>
mini-isp being one of them
tubulife- has quit [Max SendQ exceeded]
<shevy>
is mini-isp a regular gem?
<sacarlson>
no mini-isp is an apt-get package
<sacarlson>
that forces install of ruby-full
tubulife- has joined #ruby
towski_ has joined #ruby
arescorpio has joined #ruby
<shevy>
what do they mean with ruby-full?
<sacarlson>
but I'm sure it's not the only package that includes dependancies on ruby-full
<sacarlson>
ruby-full is the apt-get package to install ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubulife- has quit [Max SendQ exceeded]
davedev24 has joined #ruby
finisherr has joined #ruby
IrishGringo has joined #ruby
finisherr has left #ruby [#ruby]
<shevy>
ok
<shevy>
it includes mkmf?
<shevy>
you can try in irb; by starting the apt-get irb and trying require 'mkmf'
iamninja has joined #ruby
tmtwd has joined #ruby
tubulife- has joined #ruby
jeadre has quit [Remote host closed the connection]
<sacarlson>
mkmf? I'll have to look that up
n_blownapart has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
jeadre has joined #ruby
<n_blownapart>
hi two things. does this block return a hash anywhere and if so , how ? also what is the long number returned by line 6 ? http://pastie.org/10369721
towski_ has quit [Remote host closed the connection]
davedev24 has quit []
ivanf has joined #ruby
charliesome has joined #ruby
iamninja has quit [Ping timeout: 246 seconds]
<Ox0dea>
n_blownapart: The expression on Lines 2-5 evaluates to an empty Hash.
<Ox0dea>
Block-local variables do not "leak" into the outer scope, so the value of `hash` is not the Hash from #each_with_object.
<Ox0dea>
It is, in fact, a method call on `self`, which is `main` at the top level.
<sacarlson>
shevy as far as I can tell this mkmf is some kind of make creator, not sure what I'm suposed to do with it or how it will prevent the conflict
hashrocket has joined #ruby
jtdoncas has quit [Ping timeout: 244 seconds]
charliesome has quit [Ping timeout: 244 seconds]
<n_blownapart>
Ox0dea, ok thanks, so the block does not in fact create a hash with a key/value pair from the indices and the array elements.
jeadre has quit [Remote host closed the connection]
jeadre has joined #ruby
charliesome has joined #ruby
<shevy>
sacarlson not sure whether you said that it works or not
<sacarlson>
mini-isp works find for years. but being installed with this new app scc that runs under rbenv it conflicts I think
<shevy>
no, I meant mkmf
<sacarlson>
NameError: undefined local variable or method `mkmf' for main:Object
<sacarlson>
from (irb):1
<sacarlson>
from /home/sacarlson/.rbenv/versions/1.9.3-p484/bin/irb:12:in `<main>'
havenwood has joined #ruby
<Ox0dea>
n_blownapart: Indeed not. You could use `hash[index] = element` within the block if that is the desired result.
<Ox0dea>
And just `foo.each_with_index.to_h` if the debug output isn't crucial.
<shevy>
sacarlson do you now know ruby? :)
<shevy>
sacarlson require 'mkmf' - but you tried with the .rbenv, I wanted to know about your ruby-full irb
nux443 has quit [Ping timeout: 256 seconds]
<sacarlson>
that's debateable ha ha, I think not
<n_blownapart>
Ox0dea, thank you I'm working on it.
davedev24 has joined #ruby
<shevy>
I am quite sure that the .rbenv one will have mkmf, it is debian that typically removes mkmf from their system ruby
yashinbasement has joined #ruby
<sacarlson>
oh I no longer have it installed as I said it conflicts so I could reinstall ruby-full now and see what happens is what you ask
<shevy>
I am confused
<yashinbasement>
Hi there
<yashinbasement>
can anyone can help me what
<Ox0dea>
?anyone yashinbasement
<ruboto>
yashinbasement, Just ask your question, if anyone has or can, they will respond.
<shevy>
I thought the problem came from the system ruby
bmcginty has joined #ruby
<shevy>
and why do you have 1.9.3 in .rbenv, didn't you have 2.1
<sacarlson>
the problem happens as it seems if I already have ruby-full installed and I try to install an app requiring rbenv
<sacarlson>
1.9.3 is the version that ruby-full installs so I guess I have global set to it?
davedev24 has quit [Read error: Connection reset by peer]
dagda1 has quit [Ping timeout: 250 seconds]
<yashinbasement>
so .join will be called in the end
<n_blownapart>
Ox0dea, I understand #each_with_index, but when you pass a hash : each_with_object({}) , you would think that the block would somehow convert the array into a hash that could be returned. I don't see what the chained methods do in this case.
<yashinbasement>
{|a,b| a.casecmp(b) } like what it does it just returns -1, 0 or 1 right ?
tmtwd has quit [Remote host closed the connection]
dagda1 has joined #ruby
<Ox0dea>
n_blownapart: You're not doing anything with the Hash in the block you pass to #each_with_object.
pabs has quit [Quit: brb]
<Ox0dea>
#each_with_object yields the receiver and the specified object to the block; it's on you to do the appropriate thing with them.
<yashinbasement>
got it
maletor has joined #ruby
<yashinbasement>
I was confusing myself , did not think that sort gives an array and then .join just mesh it up into string
ponga has joined #ruby
<Ox0dea>
yashinbasement: Why wouldn't #sort return an Array?
mblagden has quit [Read error: Connection reset by peer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<n_blownapart>
Ox0dea, yields the receiver to the block?
<Ox0dea>
n_blownapart: Just like with regular #each.
Motoservo has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
mblagden has joined #ruby
<n_blownapart>
Ox0dea, if you have the time and since you mention each : I understand what map does, but I never understood each since it doesn't modify an array and return anything . so I'm having the same trouble getting this as well.
postmodern has quit [Quit: Leaving]
pabs has joined #ruby
djbkd has quit [Remote host closed the connection]
<Ox0dea>
n_blownapart: In a nutshell, #each is #map for side effects.
<Ox0dea>
#map is for when you intend to transform each element in some way.
<Ox0dea>
#each is for when you just want to "do something" with each element.
<zenspider>
I love it when you talk just to hear yourself. it really helps everyone here.
<Ox0dea>
Well, that got ad hominem remarkably quickly.
<zenspider>
hopefully it'll shut you down just a bit quicker so I don't have to deal with you anymore tonight
<n_blownapart>
uh oh
<Ox0dea>
No worries.
<Ox0dea>
n_blownapart: Did that explanation of #each help clarify anything?
deavid has quit [Ping timeout: 272 seconds]
amystephen has quit [Ping timeout: 252 seconds]
<n_blownapart>
It must be quite simple, but each just returns an identical array after, say, some math is done in the block. say it is a simple sum. the block goes through the elements, does an operation, nothing is returned except the original array. would you kindly explain '#each is #map for side effects'? Ox0dea
Cache_Money has joined #ruby
_blizzy_ has joined #ruby
<Ox0dea>
n_blownapart: If you wanted, for instance, to create some files based on the elements of an Array, you would use #each: filenames.each { |fname| File.write fname, 'foo' }
<Ox0dea>
You *could* just do that within a call to #map, but it wouldn't be as semantically correct.
<Ox0dea>
It wouldn't be your intention to transform the filenames into File objects, so #map would be inappropriate.
leat has quit [Ping timeout: 255 seconds]
zacts_ has quit [Quit: leaving]
einarj has joined #ruby
diegoaguilar has joined #ruby
<diegoaguilar>
Hello, is it advised to install ruby with a ppa
<diegoaguilar>
?
devbug has joined #ruby
<Ox0dea>
Nope.
<diegoaguilar>
whats best way to install it for dev
<diegoaguilar>
?
<diegoaguilar>
and for production
Rickmasta has joined #ruby
<Ox0dea>
chruby + ruby-install is pretty nice.
<n_blownapart>
I think I used rvm / homebrew
riotjones has joined #ruby
<diegoaguilar>
whats confident source to read how to install rvm
<diegoaguilar>
and get a complete and working ruby environment in my laptop
<diegoaguilar>
?
<n_blownapart>
ok OxOdea I really appreciate your time. I'm going to read up on it . thanks and no bickering !
iateadonut has joined #ruby
devbug_ has quit [Ping timeout: 255 seconds]
<n_blownapart>
what OS diegoaguilar ?
maletor has quit [Quit: Computer has gone to sleep.]
einarj has quit [Ping timeout: 245 seconds]
howdoicomputer has joined #ruby
<diegoaguilar>
ubuntu 14.04
riotjones has quit [Ping timeout: 260 seconds]
<n_blownapart>
use rvm it is well developed for mac / unix / linux diegoaguilar
psy_ has quit [Read error: Connection reset by peer]
<n_blownapart>
yeah follow that tutorial . if I can install rvm anyone can diegoaguilar
devbug_ has joined #ruby
<Ox0dea>
zenspider: Would you be so kind as to clarify how "everything returns something" is any more educational than pointing out when it doesn't hold?
<n_blownapart>
Ox0dea, maybe zenspider meant at the level that I am struggling at. don't worry about it.
psy_ has joined #ruby
pranny has joined #ruby
Cache_Money has joined #ruby
devbug has quit [Ping timeout: 255 seconds]
<relic>
*boggle*
rek2gnulinux has quit [Quit: Konversation terminated!]
blue_deref has quit [Quit: bbn]
n_blownapart has quit [Quit: Leaving]
arescorpio has quit [Quit: Leaving.]
<sacarlson>
shevy what I have learned from a bit more research is that there is a apt-get deb package for rbenv and it is shows in the dependancies that the apt-get deb packages of ruby and ruby-full are noted as :break rbenv so are not allowed to install at the same time
CorySimmons has joined #ruby
<shevy>
oh my god
bluOxigen has joined #ruby
keen___________1 has joined #ruby
<sacarlson>
why is that bad?
<shevy>
you are in a prison
<sacarlson>
ha ha
djbkd has joined #ruby
keen___________0 has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
deavid has quit [Ping timeout: 250 seconds]
noethics has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 245 seconds]
<Ox0dea>
sacarlson: You wouldn't have this problem on LFS. :P
<shevy>
on any sane OS
<shevy>
that's reaching the point where windows would be simpler
<Psi-Jack>
Aha! I needed my rabbitmq subscriber to not auto-acknowledge everything.
<Psi-Jack>
Which I didn't know it was doing... heh
Dopagod has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
<sacarlson>
other wierd thing is rails deb package installs the ruby deb package so makes rails conflict with rbenv as must be why my searches for my error see some commonality
ta has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
CorySimmons has quit [Quit: Bye!]
clarkenciel has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby
deavid has joined #ruby
ta has quit [Ping timeout: 256 seconds]
saddad has quit [Ping timeout: 240 seconds]
mleung has joined #ruby
renderful has joined #ruby
clarkenciel has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 244 seconds]
pranny has quit [Remote host closed the connection]
AlexRussia_ has joined #ruby
renderful has quit [Ping timeout: 244 seconds]
zenguy_pc has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
yashinbasement has quit [Quit: Leaving]
yardenbar has joined #ruby
hmsimha__ has quit [Ping timeout: 265 seconds]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenguy_pc has joined #ruby
tkuchiki has joined #ruby
meow has joined #ruby
meow has quit [Read error: Connection reset by peer]
<Ox0dea>
relic: I expect this person is up to no good.
khebbie has joined #ruby
<xeslana>
wouldn't it be better to see how the person behaves before harassing ops Ox0dea?
<Ox0dea>
Some books can be judged by their covers.
dimasg has joined #ruby
<xeslana>
no
Dolo has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
Dolo has left #ruby [#ruby]
<xeslana>
minimodding does not get anyone anywhere
<hanmac>
maybe his/her parents where cruel while nameing him/her? ;P
<Ox0dea>
xeslana: Perhaps being called out as a potential troll will cause you not to act out so as to spite me, in which case some good has still been done.
<xeslana>
xes is the company i work at and lana is my name
<Ox0dea>
Is XES an acronym or an initialism?
<xeslana>
Ox0dea: can you please leave this channel and stop accusing people of being potentially disruptive when in fact it is you who's disrupting this channel by relentlessly harassing ops for trivial matters
<sysx1000>
Hi friends! Probably, not a Ruby question. Is there any kind of software, which acts as a local caching proxy server for gems? I'd like to keep some gems locally, not to fetch them each time from net.
<chris2>
you can pass a cache dir somehow
moredhel has joined #ruby
chipotle has quit [Quit: cheerio]
<darix>
sysx1000: you can run your own gem server and point your apps to that.
towski_ has quit [Ping timeout: 252 seconds]
zenguy_pc has quit [Ping timeout: 240 seconds]
<sysx1000>
will gem server acts like a caching proxy for gems?
AbdulRehman has joined #ruby
sevenseacat has joined #ruby
<sysx1000>
I think I found that I need: yarp
pranny has quit [Remote host closed the connection]
m3ow1504_x has quit [Read error: Connection reset by peer]
moredhel has quit [Quit: byee]
m3ow1504_x has joined #ruby
catoblepa has joined #ruby
pranny has joined #ruby
moredhel has joined #ruby
moredhel has quit [Remote host closed the connection]
moredhel has joined #ruby
<apeiros>
sysx1000: I think guides.rubygems.org has something on that
<pontiki>
did you know you can have multiple files in a gist? it's what the "Add File" button is for the left of the "Create" buttons
christiandsg has quit [Ping timeout: 265 seconds]
stamina has quit [Quit: WeeChat 1.3]
<soahccc>
Can you lock a mutex in one thread and pass the reference to that mutex in a second thread and unlock it again? I have multiple threads running in parallel while they shouldn't :S
glenn_ has quit [Quit: Konversation terminated!]
robertjpayne has joined #ruby
<robertjpayne>
Is there any major difference between doing: method("id.in" => ["1"]) or method(:id.in => ["1"]) or method("id.in": ["1"])? The library I'm using works with the first two but not the third.
polysics has quit []
<robertjpayne>
I'm guessing the last one the kwargs are being passed as a opts hash with string keys rather than symbol?
sacarlson has left #ruby [#ruby]
above has quit [Ping timeout: 244 seconds]
<soahccc>
robertjpayne: all three do the same just different syntax... I'm pretty sure that v2 and v3 only works in recent ruby versions
Trieste has joined #ruby
<apeiros>
soahccc: nope
<soahccc>
apeiros: string as key with new hash syntax, no?
<apeiros>
robertjpayne: "id.in" is a String. :id.in is the method "in" called on the symbol :id
UtkarshRay has joined #ruby
<apeiros>
and "id.in": is the symbol :"id.in"
<robertjpayne>
ahhh
<robertjpayne>
that would explain a lot
<apeiros>
and presumably your library will convert a String and perform :id.in, but it won't do that with a symbol
<robertjpayne>
yea makes sense
usrnix has joined #ruby
<robertjpayne>
shucks, was hoping I didn't have to use fat arrow
einarj has joined #ruby
<apeiros>
ruby-lang838: splitting the gists on multiple files with syntax highlighting on would help. let me see…
<apeiros>
ruby-lang838: oh, you omitted the file which contains the actual test?
<sevenseacat>
lol
Azure has quit [Read error: Connection reset by peer]
<apeiros>
ruby-lang838: also that VALID_EMAIL_REGEX is broken. it won't allow tons of valid email addresses.
<apeiros>
all IDN email addresses for example.
howdoicomputer has joined #ruby
Azure has joined #ruby
<ruby-lang838>
whats your advice sir
<apeiros>
with regards to your test issue? update the gist :) add the file which contains the test
Cysioland has joined #ruby
<apeiros>
with regards to email validation? use one of the mail validation gems. not sure about their quality, but presumably better than that regex.
Aww has joined #ruby
_blizzy_ has quit [Ping timeout: 255 seconds]
<ruby-lang838>
sure 1 sec sir
<apeiros>
no need to call me "sir" btw.
<ruby-lang838>
ok
einarj has quit [Ping timeout: 264 seconds]
<Cysioland>
I have a bizarre problem: on my local host, string with utf-8 characters is sent to IRC normally, but on the remote server it's send as "\uXXXX"
<darix>
Cysioland: locale
<apeiros>
ruby-lang838: btw., if you want to use a regex to test for valid email addresses - https://gist.github.com/apeiros/e7410e2d1b4a099d9ed3 is what I use (AddrSpec). it still disallows some (per spec) valid email addresses, though
<soahccc>
wait_for_workers appears to work, aquire_deferred_lock doesn't care
<ruby-lang838>
apeiros: i update my gist
<Cysioland>
darix, I now matched the locales wth my local machine, and still fails
Aww has left #ruby ["Leaving"]
iooner has joined #ruby
usrnix has quit [Ping timeout: 260 seconds]
<apeiros>
ruby-lang838: ok, so to understand your expectation - you expect current_user to return nil because the remember_token changed?
<ruby-lang838>
my test should me pass but its show error i don't know why i check everything
<ruby-lang838>
apeiros:
ex0ns has quit [Ping timeout: 272 seconds]
northfurr has joined #ruby
pranny has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
etqqkoiflwhb has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
dfockler has quit [Ping timeout: 264 seconds]
stef_204 has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pranny has joined #ruby
kr3ssh has quit [Ping timeout: 255 seconds]
etqqkoiflwhb has joined #ruby
above has joined #ruby
bluenemo has joined #ruby
stef204 has quit [Ping timeout: 246 seconds]
<bluenemo>
hi guys. Sry for long post - I've got this old UMTS/3g WWAN Stick and discovered it can send sms / receive too. I wrote a little python around gammu (some sms thingy) and can now send mails to foo@bar.com and my py will fetch that, parse it and send it via sms to my mobile. What I want next is to have like "plugins", which have a function to send a message and to fetch messages. This for sms, jabber, emails, and so on (generic). Is there something
<bluenemo>
like this out there yet? Preferably in py or ruby. An example config for my idea: http://paste.debian.net/303967/ (very basic, but you might catch my drift). the example means fetch mails from the "fetch" email account, look in the message body on how to use them (or set overridable defaults in config) and send that via jabber.
<apeiros>
ruby-lang838: I try to understand what you expect and why. without understanding, I can't help.
bMalum has joined #ruby
<ruby-lang838>
apeiros: what i expected --- expected +++ actual @@ -1 +1 @@ -#<User id: 357369365, name: "Alina Example", email: "alina@example.com", created_at: "2015-08-23 11:39:04", updated_at: "2015-08-23 11:39:04", password_digest: "$2a$04$AXY0sTy6scNKLW.fca.nsuPfxwQrAqeiq6PcHyjBblX...", remember_digest: nil> +nil test/helpers/sessions_helper_test.rb:11:in `block in <class:SessionsHelperTest>'
eladmeidar has joined #ruby
etqqkoiflwhb is now known as dennis074
<soahccc>
Okay now it's getting bizarre here as well... Multiple threads lock the mutex and just continue but when I actually try to unlock them they deadlock against each other... I must have misunderstood something :S
max_Q has joined #ruby
fgo has quit [Ping timeout: 252 seconds]
Gnomethrower has joined #ruby
<apeiros>
soahccc: your thread crashes
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
<apeiros>
you can't return in that loop
<apeiros>
from where to where would it return?
<apeiros>
I think due to threading I can't even use ruboto to show the crash, but let me try:
<apeiros>
>> def x; Thread.new do return 123 end end; tx = x; sleep(0.1); tx.value
<soahccc>
apeiros: oh you mean in wait_for_workers?
<apeiros>
no work in ruboto :(
<apeiros>
it results in: LocalJumpError: unexpected return
<apeiros>
soahccc: yes
<soahccc>
apeiros: well wait_for_workers coincidentally works since I wait for the thread to end and yeah it ends xD
<soahccc>
but thanks for pointing that out
<soahccc>
the problem I have is that the mutex locking doesn't work like I expect it to do I'm afraid
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<soahccc>
I basically want the threads to wait for each other in a specific spot but they don't. I thought a single mutex all workers must lock to should do the trick
fgo has joined #ruby
<bMalum>
Anyone a good solution to export a View to “xls” or open document with ruby?
<apeiros>
soahccc: it sounds to me like you were reinventing existing thread primitives
<apeiros>
"only one thread should do importing at any given time" - Mutex#synchronize
platzhirsch has joined #ruby
<soahccc>
apeiros: exactly just that I want to lock and unlock instead of using block syntax
<apeiros>
bMalum: there are excel reading gems, like spreadsheet and roo
<apeiros>
soahccc: that's prone to error. why do you want that?
northfurr has quit [Quit: northfurr]
charliesome has joined #ruby
<soahccc>
apeiros: due to the display rendering. I mean I understand what you mean (forget to unlock) but the issue is that they all get a lock at the same time
<apeiros>
"they"? and why's that an issue?
<apeiros>
I don't see how "display rendering" is a reason to not use Mutex with block-form synchronize
m3ow1504_x has quit [Read error: Connection reset by peer]
I has joined #ruby
I is now known as Guest26811
dopie has quit [Ping timeout: 252 seconds]
CpuID has quit [Ping timeout: 246 seconds]
dennis074 has quit [Quit: (null)]
<soahccc>
apeiros: "they" are the workers. So lock-dosomething-unlock is not the same as synchronize{dosomething} ?
Gnomethrower is now known as uphoria
<Mon_Ouie>
If dosomething raises an exception, then no, they're not
bruno- has joined #ruby
ferhaty has joined #ruby
<soahccc>
well the unlock is in an ensure. the point is that all workers (at the same time) execute "dosomething" and then hang forever at unlock
pranny has quit [Remote host closed the connection]
eladmeidar has joined #ruby
charliesome has joined #ruby
einarj has quit [Ping timeout: 244 seconds]
finisherr has quit [Quit: finisherr]
anibara has quit [Quit: anibara]
Rinzlit2 has joined #ruby
<soahccc>
apeiros: Thanks. I didn't want to rework everything so I solved it now by letting the worker synchronize after spawning a thread before which is doing background stuff until it locked
<soahccc>
-before
blackjid has quit [Max SendQ exceeded]
havenwood has joined #ruby
blackjid has joined #ruby
Rinzlit1 has quit [Ping timeout: 272 seconds]
uphoria has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat has quit [Remote host closed the connection]
<ruby-lang838>
apeiros: did u check it already
matp has quit [Ping timeout: 250 seconds]
dgutierrez1287 has joined #ruby
leat has joined #ruby
catoblepa has quit [Ping timeout: 260 seconds]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
leafybasil has quit [Remote host closed the connection]
<apeiros>
ruby-lang838: no. we're still at "if you can't explain your expectation, I can't help you"
<gabord>
Well, yes, but i kind of did know, just didnt really realized. I asked about the passenger because im trying to install a ruby webapp.
<gabord>
Just didnt realize.
<Gnomethrower>
Okay :)
<Papierkorb>
gabord: you could write something custom which bundles the .rb files with ruby itself and then runs through it. Can get quite complex. Better focus on making something that's worthy of a crack.
jgt has joined #ruby
<gabord>
Gnomethrower: thats a good xkcd comic.
bruno- has quit [Ping timeout: 240 seconds]
hmsimha__ has quit [Ping timeout: 265 seconds]
leat has joined #ruby
AlphaAtom has joined #ruby
<gabord>
Papierkorb: Well, yes, probably not worth doing it. Maybe i will try to make it very differently.
SCHAAP137 has quit [Quit: Leaving]
AlphaAtom has quit [Client Quit]
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
charliesome has quit [Ping timeout: 260 seconds]
davedev24 has joined #ruby
charliesome has joined #ruby
jhack has joined #ruby
charliesome has quit [Client Quit]
rushed has joined #ruby
lessless has joined #ruby
<havenwood>
good mornin'
stardiviner has quit [Ping timeout: 244 seconds]
Pupp3tm4st3r has quit [Quit: Leaving...]
monsieur1 has joined #ruby
monsieur2 has joined #ruby
christiandsg has joined #ruby
NeedRubyhelp has joined #ruby
<NeedRubyhelp>
hi
Feyn has quit [Quit: Leaving]
<jhass>
NeedRubyhelp: hi, do you need help with Ruby?
<Gnomethrower>
jhass: what tipped you off? :P
<NeedRubyhelp>
Yeah I have a code here that I am trying to execute however, I can't seem to get it to do what I'm expecting it to do
<jhass>
idk
finisherr has joined #ruby
<NeedRubyhelp>
haha I couldn't think of another name
finisherr has quit [Client Quit]
<shevy>
NeedRubyhelp can you put up the code into a pastie and say where it fails
<havenwood>
?gist NeedRubyhelp
<ruboto>
NeedRubyhelp, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<NeedRubyhelp>
the issue I think i am having is that when i run it in terminal with ruby it just displays "success" so I think it's worked but nothing happened
<NeedRubyhelp>
I don't know if it's produced a file or what
<NeedRubyhelp>
I tried reading the code. But with my limited knowledge it prints "success" so i dont know what running it is meant to do
lele has joined #ruby
<jhass>
well, there's a lot of code called that's not shipped with Ruby but apparently inside your local project
<jhass>
so you didn't write all that stuff?
beef-wellington has joined #ruby
<jhass>
it's rather unidiomatic code :/
<NeedRubyhelp>
No I didn't write this code so unfortunately thats why im not exactly sure what the outcome was meant to be
exadeci has joined #ruby
<havenwood>
NeedRubyhelp: Where did the headlessCamelCase code come from?
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<NeedRubyhelp>
okay I got fresh repo
<havenwood>
NeedRubyhelp: And check that it's unmodified: git status
<havenwood>
NeedRubyhelp: Run script and check the changes: git diff
mary5030 has joined #ruby
<NeedRubyhelp>
the difference in the .txt files?
<havenwood>
NeedRubyhelp: If there are any. I'm seeing some float rounding differences only it looks like. (Without having changed any config files in a fresh VM.)
<pontiki>
or contact the author
<pontiki>
s/or/and/
<NeedRubyhelp>
I've tried contacting the author but not much luck in that department
<NeedRubyhelp>
doesn't look like there is any difference
<shevy>
his ruby code is weird
<shevy>
@keyRadii.each do |radius|
<pontiki>
looks like just a quick hack to get what he wanted
<NeedRubyhelp>
I thought so as well. I mean even though I don't know ruby, after a lot of googling, couldn't find many things that were similar
<havenwood>
shevy: headlessCamels are frightening, no doubt
<shevy>
looks very C++-ish
mary5030 has quit [Ping timeout: 260 seconds]
<NeedRubyhelp>
I've been at this for about a week to see what it was meant to do and thought I would see if there was a ruby channel I could ask
jgt has quit [Ping timeout: 250 seconds]
<pontiki>
it would seem to have an extremely narrow use
polysics has joined #ruby
<pontiki>
not sure how many people need to build propeller cross sections for 3D modeling
<NeedRubyhelp>
I was hoping it would generate some sort of coordinate system
<NeedRubyhelp>
but doesn't seem to do anything by the looks of it
symm- has quit [Ping timeout: 245 seconds]
<NeedRubyhelp>
or some sort of macro file for solidworks
<pontiki>
i would say it doesn't do anything that isn't already in the repo
<shevy>
I did not need a 3D propeller yet :)
daynaskully has joined #ruby
<NeedRubyhelp>
what do you mean pontiki?
daynaskully is now known as Guest55705
<shevy>
although I did want to generate every 3D object possible via scripting since I can't model for .... in blender
<NeedRubyhelp>
haha you never know when you might shevy
<pontiki>
he saved the output from his program in the repo
catoblepa has quit [Ping timeout: 250 seconds]
<NeedRubyhelp>
what is a repo?
<pontiki>
that thing on github
<pontiki>
a repository
<NeedRubyhelp>
basically the files?
<pontiki>
basically
<pontiki>
with a history mechanism
<NeedRubyhelp>
oh fair enough
<NeedRubyhelp>
I saw the read me and it said to just run the script on ruby so i thought okay easy enough
<NeedRubyhelp>
and well a week later here I am with nothing to show haha
christiandsg has joined #ruby
bMalum has quit [Quit: bMalum]
<pontiki>
ever read "Alice in Wonderland" ?
<NeedRubyhelp>
I have
<pontiki>
this is your version of "Eat Me" only it didn't provide anywhere near as interesting an adventure
rbennacer has joined #ruby
<shevy>
you could always learn ruby and take over that project to improve on it
<shevy>
and then you could generate the perfect propellor
<NeedRubyhelp>
haha that is essentially it
Gnomethrower has joined #ruby
rbennacer has quit [Remote host closed the connection]
<NeedRubyhelp>
haha as much I would really love to do that to avoid this again, this is a time sensitive thing I'm working on which wouldn't allow me to learn ruby and fix the code before this needs to be done ahaha
<pontiki>
hrmmm... you need better time-boxing. you spent a week on it?
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
<NeedRubyhelp>
yeah on off
<NeedRubyhelp>
cause its being used for an assignment at university
<NeedRubyhelp>
so naturally it's been on off
<pontiki>
doing stuff like this for a living is no different
<pontiki>
but being in uni, this is where you get to learn stuff like this.
leafybasil has joined #ruby
<pontiki>
if you pick up something, don't understand it, can't figure out why, and you have a limited amount of time to get something done, drop it
<NeedRubyhelp>
yeah but the degree isn't IT so I have no clue about ruby haha
<pontiki>
even more reason to drop it
<NeedRubyhelp>
trust me nothing sounds more pleasing to drop it
<pontiki>
but you can't for some reason??
<NeedRubyhelp>
but this isn't related to the degree and I have 8 weeks left
<NeedRubyhelp>
not gonna drop my entire degree cause of a ruby script haha
<pontiki>
i'm talking about dropping this particular bit of software
<NeedRubyhelp>
oh right haha
<NeedRubyhelp>
awk
rbennacer has joined #ruby
<NeedRubyhelp>
i might have to
monsieurp has quit [Quit: leaving]
timonv has joined #ruby
rbennacer has quit [Remote host closed the connection]
<NeedRubyhelp>
either way everyone, I would like to say thank you very much for the insight :)
<pontiki>
best of
NeedRubyhelp has quit [Quit: Page closed]
rbennacer has joined #ruby
Rickmasta has joined #ruby
lannonbr has joined #ruby
bMalum has joined #ruby
monsieurp has joined #ruby
monsieurp has quit [Client Quit]
catoblepa has joined #ruby
bruno- has joined #ruby
lannonbr has quit [Client Quit]
lannonbr has joined #ruby
ruby-lang442 has joined #ruby
zenguy_pc has quit [Ping timeout: 240 seconds]
lannonbr has quit [Client Quit]
Thai_ has joined #ruby
gabord has quit [Quit: WeeChat 1.1.1]
beef-wellington has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 260 seconds]
tkuchiki has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
bazbing80 has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Remote host closed the connection]
catoblepa has quit [Ping timeout: 246 seconds]
zenguy_pc has joined #ruby
ne1l has joined #ruby
rbennacer has quit [Remote host closed the connection]
blue_deref has joined #ruby
Asher has joined #ruby
monsieurp has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
ne1l has left #ruby ["suerte es que les digo!"]
polysics has quit []
m3ow1504_x has quit [Read error: Connection reset by peer]
m3ow1504_x has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
SenpaiSilver has joined #ruby
einarj has joined #ruby
yardenbar has quit [Quit: Leaving]
usrnix has joined #ruby
c_nick has joined #ruby
Thai_ has quit [Ping timeout: 246 seconds]
sevenseacat has quit [Quit: .]
<c_nick>
I tried opts.on("--test-names x y", x y, "Test Names") do |test_names| {} this works for --test-names name1,name2 but not for --test-names name1 name2 can you tell me how i can get it to work for space separated values too
[k-_ has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
usrnix has quit [Ping timeout: 265 seconds]
above has quit [Ping timeout: 240 seconds]
RaeCar has joined #ruby
RaeCar is now known as RaeCarruth
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
yqt has quit [Ping timeout: 240 seconds]
<RaeCarruth>
I hate niggers
<jhass>
!ban RaeCarruth !P troll
RaeCarruth was banned on #ruby by ChanServ [RaeCarruth!*@*]
RaeCarruth was kicked from #ruby by ChanServ [Banned: troll]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
analsexisgood has joined #ruby
analsexisgood was kicked from #ruby by ChanServ [Banned: troll]
iloverubynoob has joined #ruby
iloverubynoob has quit [Client Quit]
m3ow1504_x has quit [Read error: Connection reset by peer]
m3ow1504_x has joined #ruby
m3ow1504_x has quit [Max SendQ exceeded]
m3ow1504_x has joined #ruby
AncientAmateur has joined #ruby
AncientAmateur has quit [Client Quit]
Coldblackice has quit [Ping timeout: 272 seconds]
rushed has quit [Quit: rushed]
nofxx has joined #ruby
Gnomethrower has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dailite has joined #ruby
dailite has quit [Remote host closed the connection]
dh64 has joined #ruby
jtdoncas has joined #ruby
rbennacer has joined #ruby
nsuke has quit [Remote host closed the connection]
IrishGringo has joined #ruby
m3ow1504_x has quit [Ping timeout: 252 seconds]
m3ow1504_x has joined #ruby
christiandsg has quit [Remote host closed the connection]
sarkyniin has joined #ruby
hyy1 has joined #ruby
<hyy1>
what's the syntax for do ... while in Ruby?
IrishGringo has quit [Ping timeout: 244 seconds]
<jhass>
hyy1: loop do; # body; break if condition; end
m3ow1504_x has quit [Client Quit]
<jhass>
hyy1: but show your problem, usually there's a better way
etqqkoiflwhb has joined #ruby
etqqkoiflwhb has quit [Remote host closed the connection]
<hyy1>
ok
etqqkoiflwhb has joined #ruby
<hyy1>
input = nil
christiandsg has joined #ruby
<jhass>
?gist
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
raddazong has quit [Ping timeout: 260 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
madhatter has joined #ruby
dgutierrez1287 has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
banister has joined #ruby
<hyy1>
can you show me unless? break unless input == ""
<hyy1>
what does that do?
<hyy1>
does it do this? break if input != ""
BTRE has quit [Remote host closed the connection]
<pontiki>
hyy1: exactly that
tjohnson has joined #ruby
<pontiki>
more generally: if (expr) is the same as unless ! (expr)
RobertBirnie has quit [Ping timeout: 246 seconds]
rfmind has quit [Ping timeout: 245 seconds]
linuxboytoo has joined #ruby
lucyinthesky has joined #ruby
BTRE has joined #ruby
rbennacer has quit [Remote host closed the connection]
maletor has joined #ruby
linuxboytoo has quit [Read error: No route to host]
rfmind has joined #ruby
linuxboytoo has joined #ruby
RobertBirnie has joined #ruby
rbennacer has joined #ruby
cornerma1 has joined #ruby
linuxboytoo has quit [Client Quit]
cornerman has quit [Ping timeout: 260 seconds]
saddad has joined #ruby
cornerma1 is now known as cornerman
lucyinthesky has quit [Client Quit]
m3ow1504_x has joined #ruby
joneshf-laptop has quit [Ping timeout: 260 seconds]
hanmac has quit [Ping timeout: 246 seconds]
marcoecc has joined #ruby
codecop has joined #ruby
rbennacer has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 244 seconds]
Cache_Money has joined #ruby
Ludo- has left #ruby [#ruby]
yeticry has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
bruno- has joined #ruby
m8 has joined #ruby
kr3ssh has joined #ruby
banjara has joined #ruby
mgorbach has quit [Ping timeout: 272 seconds]
nitenq has joined #ruby
einarj has joined #ruby
mgorbach has joined #ruby
joneshf-laptop has joined #ruby
rbennacer has joined #ruby
hanmac has joined #ruby
AlexRussia_ has quit [Ping timeout: 260 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has quit [Ping timeout: 260 seconds]
cashnguns has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
ollie314 has joined #ruby
workmad3 has joined #ruby
darkf has quit [Quit: Leaving]
RobertBirnie has quit [Client Quit]
chinmay_dd has joined #ruby
rbennacer has quit [Remote host closed the connection]
eminencehc has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
dgutierrez1287 has joined #ruby
above has joined #ruby
codecodecode123 has joined #ruby
RobertBirnie has joined #ruby
Novice201y has joined #ruby
<Novice201y>
Hello. Do you recommend any open source online integrated development enviroment for Ruby?
* apeiros
actually recommends to not use an IDE for ruby
<apeiros>
a good text editor > IDE IMO.
chinmay_dd has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
<codecodecode123>
Hi, I am trying to make a card game, but I have run into a problem. I want the :ai_cards to only be attr_readable to instance methods of AI, and not readable to the player. How do I achieve this?
rbennacer has quit [Remote host closed the connection]
christiandsg has joined #ruby
<shevy>
hey
<shevy>
haven't you been at that for the last 5 years codecodecode123
<codecodecode123>
at what
<shevy>
a card game
<codecodecode123>
no
<codecodecode123>
what are you talking about?
<shevy>
you can make a class instance method call ai_cards
<shevy>
there is some other guy then who is doing a card game
yardenbar has joined #ruby
<shevy>
attr_readable does not exist, perhaps you meant attr_reader
nitenq has quit [Quit: nitenq]
<codecodecode123>
yes, I transformed it to a verb
<codecodecode123>
of course I know it's attr_reader
<[k-_>
of course, of course
<shevy>
:)
<[k-_>
dont make a method
eminencehc has quit [Remote host closed the connection]
<[k-_>
just use the instance variable
<shevy>
you should publish the code you have so far
rbennacer has quit [Remote host closed the connection]
gam3 has quit [Ping timeout: 246 seconds]
khebbie has joined #ruby
mgorbach has quit [Ping timeout: 250 seconds]
mgorbach has joined #ruby
nug has quit [Ping timeout: 272 seconds]
phutchins1 has quit [Ping timeout: 245 seconds]
blueOxigen has joined #ruby
finisherr has joined #ruby
nug has joined #ruby
khebbie has quit [Ping timeout: 240 seconds]
finisherr has quit [Client Quit]
bluOxigen has quit [Ping timeout: 252 seconds]
christiandsg has quit [Remote host closed the connection]
christiandsg has joined #ruby
Rickmasta has joined #ruby
rbennacer has joined #ruby
AlexRussia_ has joined #ruby
above has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
JulioPapel has quit [Quit: Leaving]
rbennacer has quit [Remote host closed the connection]
xet7_ has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
AlphaAtom has joined #ruby
banjara has quit [Ping timeout: 246 seconds]
banjara has joined #ruby
iamninja has joined #ruby
DLSteve has joined #ruby
phutchins1 has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
teleporting_kat has quit [Quit: Leaving]
Soda has quit [Remote host closed the connection]
blackmesa has joined #ruby
iamninja has quit [Ping timeout: 240 seconds]
rubie has quit [Remote host closed the connection]
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
eminencehc has joined #ruby
Coldblackice has joined #ruby
fedexo has joined #ruby
rbennacer has quit [Remote host closed the connection]
djbkd has joined #ruby
UtkarshRay has quit [Quit: Leaving]
yardenbar has quit [Ping timeout: 250 seconds]
dr3w has quit [Ping timeout: 255 seconds]
ponga has quit [Quit: Connection closed for inactivity]
catos has joined #ruby
catos has quit [Changing host]
catos has joined #ruby
catoblepa has quit [Ping timeout: 264 seconds]
toretore has joined #ruby
<c_nick>
I want to capture everything after --names cmd line parameter on my cmd link .. i tried with opts.on as an Array but it works for comma separated values and not space
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Porcpdio was banned on #ruby by ChanServ [Porcpdio!*@*]
Porcpdio was kicked from #ruby by ChanServ [User is banned from this channel]
FernandoBasso has quit [Quit: May the force be with you.]
<Aria>
Thanks, jhass. Faster than I!
<Psi-Jack>
Most expediant ops. :)
<jhass>
Psi-Jack: thanks
inteq has joined #ruby
ftj has joined #ruby
<Psi-Jack>
No sir, thank you! :)
jefus is now known as jefus_
Cust0sLim3n has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
frem has joined #ruby
j_mcnall_ has joined #ruby
<apeiros>
lovely indeed
jefus_ is now known as jefus
bruno- has joined #ruby
<jhass>
they must like lisp
platzhirsch has quit [Ping timeout: 240 seconds]
<c_nick>
can someone help me out with the command line query? i hope i was articulate enough. I understad that opts.on actually alters argv array and removes whatever is registered with it but for a space deliminated list of names not sure how would be the best way to handle the same
j_mcnally has quit [Ping timeout: 250 seconds]
psy_ has quit [Ping timeout: 250 seconds]
<apeiros>
weapons, from a more civilized age
yqt has joined #ruby
hyy1 has quit [Ping timeout: 246 seconds]
willharrison has joined #ruby
<nofxx>
going op and kick is power, but !mute is authoritah
<apeiros>
can't wait for crowd based mute
<apeiros>
less work for ops, more happiness for users, more frustration for assholes like porcpdio
ndrei has quit [Read error: Connection reset by peer]
<nofxx>
apeiros, do we get first login/hours logged for users? that might be some weight in vote
ndrei has joined #ruby
<hololeap>
where can i find any official documentation on the ? before a character?
dgutierrez1287 has quit [Remote host closed the connection]
<apeiros>
^ check that one. it covers (most likely) all of ruby's syntax
Musashi007 has joined #ruby
<Mon_Ouie>
Those are just 1-character string literals now though
<apeiros>
not just 1-char
<apeiros>
>> \C-c
<ruboto>
apeiros # => /tmp/execpad-dfcc3f788159/source-dfcc3f788159:2: syntax error, unexpected $undefined ...check link for more (https://eval.in/421004)
<apeiros>
should not forget the main character in that literal :D
rbennacer has joined #ruby
<Mon_Ouie>
I mean the string represented by ?\C-c is only 1-character long (as would be other types of escape sequences)
<apeiros>
ah, ok
jiada has quit [Quit: Connection closed for inactivity]
einarj has quit [Ping timeout: 250 seconds]
vickleton has joined #ruby
rehat has joined #ruby
<bestbrents>
what is #ruby's favorite text editor/IDE? I just got handed a ruby project and I'm going to be working in a linux environment for the first time. I'm used to visual studio if that matters.
Soda has joined #ruby
<bestbrents>
i'm going to be doing development in ubuntu probably
* apeiros
prefers sublime text 3
<apeiros>
emacs and vim are often used too
<apeiros>
wrt IDEs, rubymine is probably the most prominent
<apeiros>
@ bestbrents
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
<rehat>
does anyone know if there is a gem that does this kind of terminal output? http://imgur.com/XqCxi7G
<bestbrents>
i'm test driving rubymine but I'm not sure if its the best fit
codecodecode123 has quit [Ping timeout: 246 seconds]
<Psi-Jack>
Hmmm. Lately I'm using Sublime Text, coming from using vim. :)
<bestbrents>
i was considering vim but its going to be a pain to pick up ruby and vim at the same time
<apeiros>
rehat: core's Kernel#sprintf
<apeiros>
err, Kernel#printf
<apeiros>
all that you need for that
<rehat>
thanks
<apeiros>
and some ansi escape sequence to reposition the cursor :)
<rehat>
oh well mainly the downloading stats
<bestbrents>
i'll give sublime text a shot after i mess with rubymine a bit more. Thanks
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
rehat: print "\e[3A" will move the cursor up by 3 lines
chazubell has joined #ruby
<rehat>
apeiros: I meant the download output information. Like the current speed, data recieved ..
jpfuentes2 has quit [Ping timeout: 246 seconds]
<apeiros>
rehat: to print those values you have to have them first…
doosy has joined #ruby
<apeiros>
I thought you were asking for formatting output like that and updating the output
bubbys has quit [Ping timeout: 246 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rehat>
so I made a script that downloads a video file but not sure how to get that data from open-uri
eminencehc has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
veduardo has joined #ruby
Torrieri has quit [Quit: Be back later ...]
rbennacer has quit [Remote host closed the connection]
<apeiros>
rehat: not sure if open-uri can be used in a streaming way
chazubell has quit [Client Quit]
<apeiros>
the way you'd do it is by reading the content-size header and compare how much you've read to that value
choke has joined #ruby
<apeiros>
and all the rest is "just maths"™
<rehat>
ok I'll look into it more thanks
chazubell has joined #ruby
pranny has joined #ruby
<c_nick>
guys option params ?
barhum2013 has joined #ruby
<apeiros>
guys are option params?
last_staff has joined #ruby
<apeiros>
I think you accidentally a word
cabreraM516 has joined #ruby
<shevy>
lol
<shevy>
you think forgot word he has
<shevy>
this is #yoda!!!
SCHAAP137 has quit [Quit: Leaving]
<jhass>
this #yoda is, please
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick>
lol .. it was more of a question :) -> my cmd line is --names girl1 girl2 girl3 --age 23 24 25 i want this info to be captured in two arrays -> names and age
towski_ has joined #ruby
choke has joined #ruby
<jhass>
you know, option parser is written in ruby, you could've just read its code by now
<apeiros>
c_nick: that's not a common way to process command line args
bruno- has joined #ruby
yardenbar has joined #ruby
last_staff has quit [Ping timeout: 265 seconds]
<apeiros>
there's plenty of common line argument parsers for ruby, though. maybe one of them supports this pattern
<apeiros>
?toolbox
<ruboto>
I don't know anything about toolbox
last_staff has joined #ruby
<Mon_Ouie>
And probably partly because of how that breaks for arguments that start with '-'
catos has quit [Quit: Leaving]
<apeiros>
!fact add toolbox https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
<ruboto>
apeiros, I will remember that toolbox is https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
<c_nick>
hmm .. yeah i could read the whole source code of it didnt click me. i tried with opts.on("--names NAMES", Array, "Names") but it just picks comma separated vaues
<apeiros>
c_nick: alternatively, manually process the ARGV array which contains all arguments passed to your script
<apeiros>
and now that we provided you some support:
<apeiros>
?guys c_nick
<ruboto>
c_nick, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<shevy>
c_nick another possibility is that optionparser sucks
<System42>
Unit testing question: How should I test that a function puts/prints out specific text? Should I be redirecting stdout or is there a more elegant way?
<toretore>
optparse can parse into arrays just fine
barhum2013 has joined #ruby
<toretore>
why is it printing to stdout in the first place?
nanoz has quit [Quit: <3]
<toretore>
System42: ^
<c_nick>
apeiros: ARGV will have names and ages and i can go is this an integer or something but there should be a better way to do it
<toretore>
ususally when you find yourself testing side effects it's a smell
<apeiros>
System42: minitest has assert_output (or similarly named)
swgillespie has joined #ruby
<apeiros>
c_nick: yes, argv parsing would mean you'd have to do it all by hand yourself.
yardenbar has quit [Ping timeout: 272 seconds]
<apeiros>
toretore: yeah, they complain about it wanting the list coma separated
<System42>
Yeah, I feel like it's a code smell to be testing printed output. I suppose the better was to do that would be to test that a function returns a given string and not that it prints it out?
<apeiros>
toretore: they want like `--foo a b c` all arguments are attributed to --foo
<shevy>
c_nick it should be trivial, the order is preserved in ARGV
rehat has quit [Remote host closed the connection]
<apeiros>
toretore: oh, btw., semacode-ruby19 still considered stable?
miguelff has joined #ruby
<toretore>
c_nick: opts.on( '-s', '--sub URI[,URI]', Array, "List of ZMQ URIs to connect SUB to" ){|l| options[:sub_uris] = l }
twistedpixels has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<toretore>
this works with --arg val1,val2 afaicr
<apeiros>
o0
mary5030 has quit [Remote host closed the connection]
* apeiros
wonders whether he's on toretore's ignore
Sembei has quit [Quit: WeeChat 1.2-dev]
<toretore>
apeiros: yes, afaiac it's stable
davedev24 has quit []
<toretore>
apeiros: why? :P
<apeiros>
yay, not on ignore! :D
mary5030 has joined #ruby
<toretore>
haha
<apeiros>
we're using it in production. and one of my co-devs meant he'd heard something about it being broken/unstable.
AlphaAtom has joined #ruby
pranny has quit [Remote host closed the connection]
<c_nick>
will have to read up more else have to process argv last resort
<toretore>
c_nick: did you properly initialize the continuum transfunctioner?
<c_nick>
toretore: it was abot opt.ons :)
<apeiros>
toretore: as said, c_nick wants space as separator, not comma
rubie has joined #ruby
<toretore>
oh right
<shevy>
c_nick just handle ARGV rather than searching for hours :)
<toretore>
why?
zenguy_pc has joined #ruby
<c_nick>
because i want the user to have the flexibility to input comma or space separated values .. they are more readable that way
<c_nick>
:D dont kill me
<toretore>
*kills c_nick*
<toretore>
user flexibility is the killer of stability
<c_nick>
:P
<toretore>
have one, well defined interface
bffff_ has quit [Quit: Connection closed for inactivity]
<c_nick>
shevy: yeah probably that way it can get done faster.. i know a project where the invocation works like that i will read that code when i reach work tomorrow.
miguelff has quit [Quit: miguelff]
barhum2013 has joined #ruby
<c_nick>
tc all
c_nick has left #ruby [#ruby]
saddad has quit [Ping timeout: 255 seconds]
Synthbread has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Narzew has joined #ruby
pranny has quit [Remote host closed the connection]
lkba has joined #ruby
rbennacer has quit [Remote host closed the connection]
jgt has joined #ruby
tmtwd has joined #ruby
JoL1hAHN has quit [Ping timeout: 252 seconds]
AlexRussia_ has quit [Ping timeout: 255 seconds]
SCHAAP137 has joined #ruby
JoL1hAHN has joined #ruby
allcentury has joined #ruby
mary5030 has joined #ruby
last_staff has quit [Ping timeout: 255 seconds]
matp has joined #ruby
SCHAAP137 has quit [Client Quit]
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 252 seconds]
above has quit [Ping timeout: 252 seconds]
khebbie has joined #ruby
einarj_ has joined #ruby
noethics has joined #ruby
einarj has quit [Ping timeout: 264 seconds]
AlexAltea has quit [Read error: Connection reset by peer]
above has joined #ruby
allcentury has joined #ruby
rushed has joined #ruby
Narzew has left #ruby ["Leaving"]
Narzew has joined #ruby
JoshGlzBrk has joined #ruby
khebbie has quit [Ping timeout: 245 seconds]
sarkyniin has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
AlexAltea has joined #ruby
mary5030 has joined #ruby
daynaskully has joined #ruby
daynaskully is now known as Guest76476
<arup_r>
k
<arup_r>
sorry.. wrong window
christiandsg has quit [Remote host closed the connection]
christiandsg has joined #ruby
banister has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
<atmosx>
anyone remembers a tool that let you create a reverse tunnel so that you could share your rack server with the internet? It created temporary tunnels IIRC.
<atmosx>
then it came out as a gem too.
maletor has joined #ruby
<jhass>
yes, I remember. Now let me also remember the name :D
marr has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
doosy has quit [Remote host closed the connection]
<atmosx>
jhass: yes thanks, but I've found the error so I don't need to bother ppl at #css, I'll bookmark it though.
chinmay_dd has quit [Ping timeout: 240 seconds]
iateadonut has quit [Quit: Leaving.]
platzhirsch has joined #ruby
platzhirsch has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
sinkensa_ has joined #ruby
dseitz has joined #ruby
sinkensa_ has quit [Remote host closed the connection]
veduardo has quit [Ping timeout: 246 seconds]
last_staff has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
nofxx has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
cochise has joined #ruby
ftj has joined #ruby
iamninja has joined #ruby
kr3ssh has quit [Ping timeout: 272 seconds]
noethics has quit [Quit: Leaving]
A124 has quit [Ping timeout: 260 seconds]
platzhirsch has quit [Ping timeout: 250 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
A124 has joined #ruby
willharrison has joined #ruby
iamninja has quit [Ping timeout: 265 seconds]
ruby-lang489 has joined #ruby
ruby-lang489 has quit [Client Quit]
djbkd has joined #ruby
rushed has quit [Quit: rushed]
eminencehc has joined #ruby
einarj has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
kr3ssh has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
above has quit [Ping timeout: 265 seconds]
doosy has joined #ruby
rbennacer has joined #ruby
DLSteve has quit [Ping timeout: 255 seconds]
above has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yqt has quit [Ping timeout: 250 seconds]
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
doosy has quit []
platzhirsch has joined #ruby
vickleton has quit [Remote host closed the connection]
m3ow1504_x has quit [Ping timeout: 246 seconds]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
willharrison has joined #ruby
pranny has joined #ruby
IrishGringo has joined #ruby
fantazo has quit [Ping timeout: 256 seconds]
JulioPapel has joined #ruby
benlovell has joined #ruby
kr3ssh has quit [Ping timeout: 245 seconds]
m3ow1504_x has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<shevy>
dumdedum
rubie has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
David27 has joined #ruby
ishahnaz has joined #ruby
mhib has quit [Remote host closed the connection]
kirun has quit [Remote host closed the connection]
axisys has quit [Remote host closed the connection]
einarj_ has joined #ruby
SCHAAP137 has joined #ruby
eminencehc has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 245 seconds]
SCHAAP137 has quit [Changing host]
SCHAAP137 has joined #ruby
decoponyo has quit [Quit: Leaving...]
swistak35 has joined #ruby
<atmosx>
shevy: how's life?
gdd229 has joined #ruby
saddad has joined #ruby
gdd229 has left #ruby [#ruby]
<shevy>
dunno... studying a lot. Also trying to dig through C but it's so boring compared to ruby
<atmosx>
haha
<atmosx>
I can imagine
<atmosx>
I'll start studying after 10th Set.
<atmosx>
sept.
<atmosx>
hopefully would be the last time in my life I'll go through all the chemistry shit. I'll have forgotten everything in about a year or two I guess.
* atmosx
can't wait
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
I thought you were finished with the exams and only waiting for your degree
zeroDivisible has joined #ruby
TomyLobo has quit [Ping timeout: 246 seconds]
<atmosx>
shevy: I have the state exams
<atmosx>
theoretically the most difficult exam, becuase it's like having 5 exams all together. But you have 300 questions on 5 subjects basically.
<atmosx>
It's pharmacognosy, pharmacology, biopharmacy, social pharmacy and medicinal chemistry (that's the killer one).
IrishGringo has quit [Ping timeout: 246 seconds]
m3ow1504_x has quit [Ping timeout: 240 seconds]
chinmay_dd has joined #ruby
<atmosx>
I get 5 profs, who ask me questions on the same topic, e.g. opiods... structures, derivatives, pharmacology, where can be found, whre they come from (papaverum somniferum etc.) effects, possible preparation (although I don't thin she'll ask me how to prepare heroin)... for sure you'll get ask diff between morphine and heroin, etc.
<atmosx>
of course, no one is lucky enough to get opiods but anyway.
pranny has quit [Remote host closed the connection]
<shevy>
cu
dgutierrez1287 has quit [Ping timeout: 250 seconds]
<adaedra>
he
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
bye shevy
<arup_r>
bye all
arup_r has quit [Quit: Leaving]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
barhum2013 has quit [Quit: barhum2013]
barhum2013 has joined #ruby
blackmesa has joined #ruby
fullofca_ has quit [Remote host closed the connection]
bruno-_ has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
barhum2013 has quit [Quit: barhum2013]
AlphaAtom has joined #ruby
rbennacer has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 264 seconds]
Synthead has quit [Disconnected by services]
Synthbread is now known as Synthead
Synthbread has joined #ruby
rbennacer has joined #ruby
dimasg has joined #ruby
opensource_ninja has quit [Remote host closed the connection]
ruurd has joined #ruby
ruurd has quit [Client Quit]
opensource_ninja has joined #ruby
blueOxigen has quit [Ping timeout: 244 seconds]
Rutix has quit []
willharrison has joined #ruby
zenguy_pc has joined #ruby
dimasg has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 265 seconds]
<System42>
What is the best way to unit test a class attribute?
arian0n has joined #ruby
banister has joined #ruby
yeticry has joined #ruby
<jhass>
System42: expect(Foo.bar).to eq something ? not sure what you're asking really
snath has joined #ruby
snath has left #ruby [#ruby]
<System42>
jhass: essentially that, yes. I'm from the Python world where there is no such thing as a private instance attribute, and if I want to keep it private, I can really unit test it. catch-22 really.
<jhass>
you should unit test the behavior of your class
<jhass>
not that is implemented in a certain way
<jhass>
if the instance variable (assuming that's what you actually mean) is not exposed in any public API, your tests shouldn't care about it at all
hmsimha__ has joined #ruby
bruno-_ has quit [Ping timeout: 246 seconds]
Soda has quit [Remote host closed the connection]
kr3ssh has joined #ruby
<jhass>
if its value affects the behavior of some method, trigger whatever changes it to that value and then that the behavior of that method is correct
<System42>
Okay, that makes sense. I'm pretty new to unit testing.
<jhass>
but I'm still much shooting into the dark here since you've been rather vague
hyy1 has joined #ruby
cochise has quit []
hyy1 has quit [Ping timeout: 244 seconds]
maletor has quit [Changing host]
maletor has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
Narzew has quit [Read error: Connection reset by peer]
houhoulis has quit [Remote host closed the connection]
<chinmay_dd>
Hello all :) .Can I host a ruby program which is a TCPServer on a port using socat? I basically want to access the program using nc
Rodya_ has quit [Remote host closed the connection]
ndrei has joined #ruby
<jhass>
not sure how socat comes into play here
jeadre has quit [Remote host closed the connection]
<chinmay_dd>
I see. I wanted to pipe the STDIN and STDOUT
ollie314 has quit [Ping timeout: 272 seconds]
dgutierrez1287 has joined #ruby
<jhass>
?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
benlovell has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
jeadre has joined #ruby
einarj has joined #ruby
einarj_ has quit [Ping timeout: 246 seconds]
allcentury has joined #ruby
<chinmay_dd>
Hmm, ok. So I want to host a TCPServer on a port to which there will be multiple incoming connections from various other TCPSockets. There is a client-server communication between them. Rather than sending data via the sockets, i wanted to print it to STDIN and STDOUT.
<chinmay_dd>
Sorry, take input from STDIN and print output to STDOUT
<jhass>
just do that then?
<jhass>
starting a TCPServer doesn't prevent you from using stdin or stdout
<chinmay_dd>
I want to transfer the STDIN and STDOUT data via sockets
iamninja has joined #ruby
<chinmay_dd>
so basically i want to use 'puts' instead of 'sock.send' :D
<jhass>
if you got concurrency the tricky part is just having a message format that doesn't mess up or a global lock around writing a single message or a writer thread and a queue to it
<jhass>
why? that seems rather arbitrary
einarj_ has joined #ruby
<chinmay_dd>
There is no specific reason to it.. I wanted to know if it is possible to do it.
einarj has quit [Ping timeout: 260 seconds]
<jhass>
sure you can just override the method
<jhass>
or define one inside your class which is reached before Kernel#puts
<jhass>
not saying it's a good idea though
<chinmay_dd>
Correct. Fiddling around with puts is not really a good idea i guess
<chinmay_dd>
Thanks a lot jhass :)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
can't you just reopen stdin/stdout with the socket?
<Mon_Ouie>
You wouldn't need to override anything by the way. You could just have $stdout = some_socket and same with $stdin
<apeiros>
should be possible
<Mon_Ouie>
Or that
einarj has joined #ruby
<jhass>
hf with multiple clients though
<apeiros>
and yeah, if you don't need to deal with stuff which doesn't properly use $stdin/$stdout, you can just reassign as Mon_Ouie says
einarj_ has quit [Ping timeout: 260 seconds]
yqt has joined #ruby
<apeiros>
o0
<apeiros>
what? one stdout should feed N sockets?
<chinmay_dd>
apeiros: Yes. That is why i wanted to know if fork-exec socat will do the trick
<apeiros>
no idea what socat even is
<chinmay_dd>
But then there are multiple server spawns
rbennacer has quit [Remote host closed the connection]
<chinmay_dd>
I guess the question was a little vague. Sorry for the trouble :)
einarj_ has joined #ruby
yardenbar has joined #ruby
einarj has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby
dented42 has joined #ruby
chinmay_dd has quit [Quit: See ya!]
khebbie has joined #ruby
nitenq has joined #ruby
dimasg has joined #ruby
Musashi007 has quit [Quit: Musashi007]
fullofcaffeine has joined #ruby
northfurr has joined #ruby
IrishGringo has joined #ruby
clarkenciel has quit [Remote host closed the connection]
nitenq has quit [Ping timeout: 244 seconds]
khebbie has quit [Ping timeout: 265 seconds]
renderful has joined #ruby
rbennacer has joined #ruby
ftj has joined #ruby
northfurr has quit [Quit: northfurr]
IrishGringo has quit [Ping timeout: 244 seconds]
yardenbar has quit [Quit: Leaving]
Rickmasta has joined #ruby
kent\n has quit [Ping timeout: 246 seconds]
renderful has quit [Ping timeout: 264 seconds]
shazaum has joined #ruby
einarj_ has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
<shevy>
socat... the sophomore cat
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
dont-panic has quit [Quit: leaving]
kidoz has joined #ruby
northfurr has joined #ruby
VanWeyden has joined #ruby
armin has joined #ruby
otisZart has joined #ruby
rlreis has joined #ruby
northfurr has quit [Client Quit]
northfurr has joined #ruby
bruno- has joined #ruby
platzhirsch has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 244 seconds]
rbennacer has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has joined #ruby
dgutierrez1287 has joined #ruby
genuine has joined #ruby
dimasg has quit [Ping timeout: 260 seconds]
[H]unt3r has quit [Quit: Leaving]
zenguy_pc has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
raypulver has quit [Ping timeout: 256 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has quit [Ping timeout: 252 seconds]
einarj has joined #ruby
clarkenciel has joined #ruby
genuine has quit [Ping timeout: 255 seconds]
rodfersou has joined #ruby
bruno- has joined #ruby
tmtwd has joined #ruby
phutchins2 has quit [Ping timeout: 256 seconds]
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Torrieri has joined #ruby
rodferso1 has joined #ruby
RandyT_ has quit [Ping timeout: 250 seconds]
rodfersou has quit [Ping timeout: 256 seconds]
PlasmaStar has quit [Ping timeout: 246 seconds]
ohaibbq has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
Porfa has joined #ruby
<Porfa>
yellow guys
<Porfa>
i mean, hello guys!
jancel_ has quit [Remote host closed the connection]
phutchins has joined #ruby
kent\n has quit [Ping timeout: 255 seconds]
PlasmaStar has joined #ruby
rubie has joined #ruby
<Porfa>
after login in with mechanize, how can i jump to an address?
jancel has joined #ruby
jeadre has quit [Remote host closed the connection]
<Porfa>
(i have an address i want to parse using nokogiri, but it needs a login… so i used mechanize to login.. now I'm lost :) )
saddad has quit [Ping timeout: 250 seconds]
jeadre has joined #ruby
saddad has joined #ruby
phutchins has quit [Read error: Connection reset by peer]
<toretore>
never used mechanize, but it looks to me like you'd just do `agent.get_post_whatever url` after and that the Mechanize instance tracks the cookie/session state
phutchins1 has joined #ruby
Ropeney has joined #ruby
<toretore>
(keeping the state being most of the purpose behind its existence, afaict)
<Ox0dea>
toretore: Mechanize is much more than a "cookie jar".
<jhass>
mmmh, cookies
<toretore>
'n cream
<toretore>
is what i'm eating right now
rodferso1 has quit [Quit: leaving]
rodfersou has joined #ruby
rfmind has quit [Quit: WeeChat 1.2]
phutchins1 has quit [Ping timeout: 240 seconds]
phutchins2 has joined #ruby
veduardo has joined #ruby
einarj has quit [Remote host closed the connection]
kr3ssh has joined #ruby
rubie has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 255 seconds]
rodfersou has quit [Client Quit]
RandyT_ has joined #ruby
phutchins2 has quit [Ping timeout: 252 seconds]
jancel has quit [Remote host closed the connection]