sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dstarh has joined #ruby
vdamewood has quit [Max SendQ exceeded]
an0ma1y has joined #ruby
Rakunh0 has joined #ruby
nym has joined #ruby
weemsledeux has joined #ruby
Rollabunna has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
rubie has quit [Remote host closed the connection]
morenoh149 has quit [Ping timeout: 272 seconds]
weemsledeux has quit [Client Quit]
duncannz has quit [Ping timeout: 268 seconds]
dstarh has quit [Ping timeout: 246 seconds]
Rollabunna has quit [Ping timeout: 272 seconds]
nahtnam has joined #ruby
lkba_ has joined #ruby
pocketprotector has joined #ruby
foureight84 has quit [Quit: Be back later ...]
lkba has quit [Ping timeout: 246 seconds]
justin_pdx has joined #ruby
[H]unt3r has quit [Quit: Leaving]
ladystarduust has joined #ruby
towski_ has joined #ruby
gusrub has quit [Quit: Leaving]
towski__ has quit [Ping timeout: 244 seconds]
samukasmk has joined #ruby
Igorshp has joined #ruby
morenoh149 has joined #ruby
samukasmk_ has joined #ruby
samukasmk__ has joined #ruby
samuk540 has joined #ruby
samuk899 has joined #ruby
<FernandoBasso>
"You may isolate variables in a block from the outer scope by listing them following a ; in the block’s arguments. See the documentation for block local variables in the calling methods documentation for an example."
<Radar>
The Gemfile doesn't explicitly state the Rack dependency because that dependency is specified in the project's gemspec, which Bundler interprets because of the "gemspec" line in the Gemfile.
<Radar>
FernandoBasso: Look in the sidebar. calling_methods.rdoc
sargas has quit [Quit: This computer has gone to sleep]
pyon has joined #ruby
pawnbox has joined #ruby
ScriptGeek has joined #ruby
juanpablo____ has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
<ScriptGeek>
is there a way to make a string contain a variable reference in such a way that the string doesn't need to be reinterpolated when the value of the variable changes?
weemsledeux has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
northfurr has joined #ruby
badfish129 has quit [Quit: badfish129]
<dfockler>
ScriptGeek: so you don't want "Ruby #{string_var}" ?
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
duncannz has quit [Ping timeout: 240 seconds]
<ScriptGeek>
well, I want to set a string with a variable inside it so that the string doesn't need to get reassigned
<ScriptGeek>
something like this
<ScriptGeek>
message = "You're already in #{location}"
nofxx has joined #ruby
workmad3 has joined #ruby
davedev24 has joined #ruby
<ScriptGeek>
and then if the location variable changes the string gets updated automagically
rbennacer has joined #ruby
<dfockler>
oh if that's the case no probably not
<ScriptGeek>
ok, thanks for the help
<dfockler>
Ruby sets the value of message after interpolating the string
<ScriptGeek>
yeah, I thought it would
<dfockler>
but you can have a function that does that
<dfockler>
and just return the built string
<ScriptGeek>
hmm... that might work
<ScriptGeek>
good idea
vipaca has joined #ruby
pocketprotector has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
claw has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
meph has quit [Quit: Leaving.]
G_ is now known as G
claw has joined #ruby
iandeejay has joined #ruby
Yzguy has quit [Quit: Zzz...]
troyready has quit [Remote host closed the connection]
<iandeejay>
what is the best way to give restricted access to specific ruby classes/modules for a sandboxed environment?
vipaca has quit [Ping timeout: 265 seconds]
northfurr has quit [Quit: northfurr]
devoldmx has joined #ruby
Musashi007 has joined #ruby
siemprefresco has joined #ruby
<dfockler>
iandeejay: only write the classes that you want the user to have access to
<dfockler>
ruby's class model isn't setup in a way that allows for real restriction on access
devoldmx has quit [Ping timeout: 244 seconds]
egtann has quit []
Musashi007 has quit [Ping timeout: 246 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
centrx has joined #ruby
towski_ has quit [Remote host closed the connection]
buttholio2099 has joined #ruby
claw has quit [Ping timeout: 265 seconds]
devbug has joined #ruby
an0ma1y has quit [Read error: Connection reset by peer]
justin_pdx has quit [Quit: justin_pdx]
icole has quit [Ping timeout: 260 seconds]
denisemccoy has joined #ruby
denisemccoy has quit [Remote host closed the connection]
an0ma1y has joined #ruby
morenoh149 has joined #ruby
<iandeejay>
dflocker: this is true. good point
justin_pdx has joined #ruby
dawkirst has joined #ruby
ranchodev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fgo has joined #ruby
Rakunh0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sn0wb1rd has quit [Read error: Connection reset by peer]
claw has joined #ruby
maletor has joined #ruby
jonee has joined #ruby
enebo has quit [Quit: enebo]
maletor has quit [Client Quit]
jonee has quit [Client Quit]
s00pcan_ has quit [Remote host closed the connection]
Zamerick has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
dawkirst has quit [Ping timeout: 260 seconds]
rbennacer has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 264 seconds]
iamvery has joined #ruby
bmurt has quit []
denisemccoy has joined #ruby
denisemccoy has quit [Read error: Connection reset by peer]
<havenwood>
And it'd be a nice thing for Ruby precompiled binaries.
opensource_ninja has joined #ruby
fedexo has quit [Ping timeout: 244 seconds]
duoi has quit [Ping timeout: 246 seconds]
<havenwood>
Or a waste of time. Maybe we should focus on just getting the basics done properly.
jonr22 has quit [Remote host closed the connection]
duoi has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
<pontiki>
meanwhile, we dance
moeabdol has quit [Ping timeout: 255 seconds]
<shevy>
havenwood sounds like an introduction to haskell
buttholio2099 has left #ruby ["Leaving"]
lokulin has joined #ruby
<shevy>
hmm
<shevy>
isn't the major point of reproducible builds that it'll be guaranteed to be the same all across the board, sort of what NixOS does with their hashed directories?
pawnbox has quit [Remote host closed the connection]
<havenwood>
shevy: I promise not do anything untoward with binaries I compile. It wouldn't take all that much to make them reproducible.
<havenwood>
If a dependency on say TravisCI was allowed as part of reproducibility. :P
<havenwood>
Nice to be able to give reproduction steps with checksums to confirm. I like that.
aaeron has joined #ruby
pawnbox has joined #ruby
<Ox0dea>
ScriptGeek: Still about?
nahtnam has joined #ruby
<ScriptGeek>
Ox0dea: I think so, lemme check
casadei_ has joined #ruby
<Ox0dea>
ScriptGeek: Ha?
<ScriptGeek>
oh, there I am. Yeah, I'm still here
<Ox0dea>
Okay, good.
<ScriptGeek>
what's up?
<Ox0dea>
ScriptGeek: I think there might be some clever way to stick your String in a Proc in order to delay its evaluation and have these sorts of "magic strings" you're after.
<havenwood>
shevy: Yeah, I guess that's a logical step.
roxtrong_ has quit [Remote host closed the connection]
<havenwood>
Magical Strings? :O What'd I miss?
<ScriptGeek>
Ox0dea: That would be cool, but I did find another solution for my predicament
<Ox0dea>
havenwood: "the magic goes #{here}"
<Ox0dea>
How to make `here` "dynamic"?
<Ox0dea>
It's probably not feasible now that I actually think on it.
<ScriptGeek>
#{string} didn't work
<Ox0dea>
You could alias #to_s to #call or some such, but that'll still eagerly evaluate and "cement" the String.
<ScriptGeek>
Another solution is to use a lambda that puts together the string on demand
<ScriptGeek>
I need to pass the string in as a parameter, but the string has to be dynamic so it references live data
rubie has joined #ruby
pecpec has joined #ruby
<Ox0dea>
>> loc = 'foo'; s = "you are here: #{loc}"; loc.replace 'bar'; s # ScriptGeek
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
barhum2013 has joined #ruby
anisha has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Johnny_ has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
senayar has joined #ruby
juanpablo____ has joined #ruby
lipoqil has joined #ruby
Johnny__ has joined #ruby
JohnnyTao has joined #ruby
nhhagen has quit [Read error: No route to host]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JohnnyTao has quit [Client Quit]
Johnny_ has quit [Quit: Leaving]
Johnny__ has quit [Client Quit]
juanpablo____ has quit [Ping timeout: 265 seconds]
barhum2013 has quit [Quit: barhum2013]
nhhagen has joined #ruby
CustosLimen has quit [Ping timeout: 272 seconds]
JohnnyTao has joined #ruby
freezevee has joined #ruby
CustosLimen has joined #ruby
marr has joined #ruby
jenrzzz has joined #ruby
rdark has joined #ruby
c0m0 has joined #ruby
codecop has quit [Remote host closed the connection]
joonty has joined #ruby
nik0 is now known as niko
skade has quit [Quit: Computer has gone to sleep.]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
CustosLimen has quit [Ping timeout: 264 seconds]
vdamewood has joined #ruby
mikecmpbll has joined #ruby
Iskarlar has joined #ruby
<Radar>
What's a good Ruby project to start newbies off on?
<Radar>
Not the koans.
moeabdol has joined #ruby
JohnnyTao has quit [Read error: Connection reset by peer]
OrbitalKitten has joined #ruby
gagrio_ has joined #ruby
gagrio_ is now known as gagrio|mtg
TheHodge has joined #ruby
JohnnyTao has joined #ruby
gagrio has quit [Ping timeout: 264 seconds]
justin_pdx has quit [Quit: justin_pdx]
skade has joined #ruby
naftilos76 has joined #ruby
<shevy>
the classical one would be: "write an IRC bot in ruby"
<shevy>
:D
jonelf has quit [Ping timeout: 246 seconds]
<shevy>
but I think any local project that can automate creation of directories, files, removal of either, showing help options for the script etc... would be a good start. and project organization
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
michael_mbp has quit [Excess Flood]
meph has joined #ruby
michael_mbp has joined #ruby
<Radar>
heh
pawnbox has joined #ruby
<yorickpeterse>
morning
ohaibbq has quit [Quit: Leaving...]
<apeiros>
write your own webframework is also popular I hear…
tvw has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Zai00 has joined #ruby
Hounddog has joined #ruby
<ljarvis>
no wai
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
CustosL1men has joined #ruby
Rollabunna has joined #ruby
ascarter has joined #ruby
devoldmx has joined #ruby
<shevy>
apeiros had one written in php
<apeiros>
old story
exadeci has joined #ruby
leafybasil has quit [Ping timeout: 250 seconds]
hal_9000__ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
pokmo: You should just be able to remove that .ruby-version file.
<Ox0dea>
Or else modify it accordingly.
jonr22 has quit [Ping timeout: 265 seconds]
<pokmo>
ah
<pokmo>
i'll change it to 2.2.3?
<Ox0dea>
Go for it.
<pokmo>
looking good!
<Ox0dea>
Excellent.
<pokmo>
thanks
<Ox0dea>
Sure thing.
<pokmo>
i come from a python background. does ruby have something like python's virtualenv?
juanpablo____ has quit [Ping timeout: 246 seconds]
<Ox0dea>
Gemsets, mostly.
<pokmo>
i see
jenrzzz has joined #ruby
dhjondoh has quit [Remote host closed the connection]
<Ox0dea>
And version managers, of course, if that's something virtualenv does.
<pokmo>
does bundle install need to be run after each modification made to the source?
<Ox0dea>
No.
mhenrixon is now known as mhenrixon_afk
<pokmo>
good. because it's taking a long time :)
roxtrongo has joined #ruby
<Ox0dea>
Well, thingspeak has quite a lot of dependencies.
northfurr_ has joined #ruby
pontiki has joined #ruby
<atmosx>
I have this: a = 1.upto(4).to_a ... but then I want to prin tthis like 1 2 3 4 ... not 1, 2, 3... any ideas?
<pokmo>
Ox0dea: indeed. but how do you tell?
banister has joined #ruby
<Ox0dea>
pokmo: Look at its Gemfile.
<atmosx>
ah .join
<ljarvis>
atmosx: .join
<pokmo>
ah
<atmosx>
ljarvis: yeah ty
<pokmo>
thanks
Asher has quit [Quit: Leaving.]
but3k4 has joined #ruby
<pontiki>
hi
platzhirsch has quit [Quit: Leaving.]
ldnunes has joined #ruby
Asher has joined #ruby
<pokmo>
hmm when i run bundle install, it tries to install eventmachine 1.0.3, but it isn't specified in Gemfile
platzhirsch has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<pokmo>
is there a way to find out what depends on it?
<atmosx>
as always, the problem is more complex than it appears to be. Hm.
<Ox0dea>
pokmo: That's a dependency specified by some other dependency.
atzorvas has joined #ruby
sevenseacat has quit [Quit: .]
danieli has joined #ruby
<atmosx>
bbl
<pontiki>
you can look in Gemfile.lock
gagrio|mtg has joined #ruby
roxtrongo has quit [Ping timeout: 240 seconds]
<Ox0dea>
atmosx: What's complex about #join?
<atmosx>
Ox0dea: not about join, but about the my situation. I'm displaying some... you know what :-P I'd rather eat first and discuss it later. hehe brb.
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
xylotism has quit [Read error: Connection reset by peer]
<pontiki>
if you see the number of times eventmachine is listed under another package, you can tell which need it, and follow the chain back up to the top
allcentury has quit [Ping timeout: 264 seconds]
xylotism has joined #ruby
<pontiki>
so it looks like tweetstream
<pokmo>
pontiki: so it's ZenTest 4.5. i wonder if there's a way to force it to take eventmachine 1.0.4?
<pokmo>
oh is it?
dionysus69 has joined #ruby
<pokmo>
pontiki: eventmachine (1.0.3) is under ZenTest (~> 4.5) isn't it?
tagrudev has quit [Remote host closed the connection]
<pontiki>
em-socksify is used by em-http-request, so that's easy. em-http-request and em-twitter are used by tweetstream
bmurt has joined #ruby
dhjondoh has joined #ruby
<pokmo>
pontiki: right. but it decides to pick 1.0.3 to be installed rather than another version like 1.0.4 because it's the minimal satisfiable version, due to em-http-request's dependency on >=1.0.3?
<pontiki>
yes
tagrudev has joined #ruby
ruby[bot] has joined #ruby
<pokmo>
right
<pontiki>
you can put eventmachine in your Gemfile with the dependency you require
<pokmo>
Ox0dea: yeah, funny i see different indentation though
<pokmo>
pontiki: right. i'll try that
<pokmo>
i ran bundle update eventmachine
<pokmo>
and that seem to have done the trick :\
<pokmo>
but i'll add to Gemfile like you suggested
<freezevee>
although it runs, the output is strange
UtkarshRay has quit [Ping timeout: 244 seconds]
tomaz_b has quit [Quit: Leaving]
fostertheweb has joined #ruby
devoldmx has joined #ruby
CloCkWeRX has joined #ruby
<freezevee>
I feel like osx opens too many connections and then fails
<freezevee>
by "Too many open files"
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<freezevee>
can anyone please help ?
[k-_ has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
<yorickpeterse>
open less files
joonty has joined #ruby
<yorickpeterse>
You have 255 threads opening sockets
<yorickpeterse>
So either use less threads, or increase the maximum amount of files you can open
<yorickpeterse>
IIRC you can do that using uname, but I'm not 100% sure
Iskarlar has joined #ruby
Rickmasta has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<freezevee>
yorickpeterse: how can I open less threads ?
<freezevee>
loop then in chunks of 10 for example ?
<freezevee>
I don't think it's a good idea to increase the amount of files I can open ?
fgo has joined #ruby
<yorickpeterse>
Simply start less threads
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<yorickpeterse>
You can speed things up by not using ping but just by using Ruby's Socket library
<yorickpeterse>
though you'd have to connect to a specific port
code1o6 has joined #ruby
Fire1o6 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
atomical has joined #ruby
Oka has joined #ruby
failshell has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fostertheweb has joined #ruby
d0p has joined #ruby
<d0p>
guys how do i install gem
<d0p>
?
<d0p>
command line
<d0p>
centos
zeroDivisible has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d0p has left #ruby ["WeeChat 1.3"]
lostinmalloc has quit [Quit: Page closed]
failshell has quit [Ping timeout: 244 seconds]
ItSANgo has joined #ruby
<greenarrow>
sudo gem install foo?
fostertheweb has quit [Client Quit]
mhenrixon_afk is now known as mhenrixon
JulioPapel has joined #ruby
rushed has joined #ruby
ruby[bot] has quit [Ping timeout: 272 seconds]
dorei has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
segfalt has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
ukd1 has quit [Ping timeout: 250 seconds]
fostertheweb has joined #ruby
ukd1 has joined #ruby
Iskarlar has joined #ruby
last_staff has quit [Quit: last_staff]
CloCkWeRX has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
decoponio has joined #ruby
hays has quit [Quit: No Ping reply in 180 seconds.]
jonr22 has quit [Remote host closed the connection]
mooe has quit [Quit: Connection closed for inactivity]
Rutix has quit []
jonr22 has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fgo has joined #ruby
tkuchiki has joined #ruby
ayonkhan has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
<Bish>
hi guys, can somebody help me with understand how celluloid is usually used?
northfurr has joined #ruby
<Bish>
im trying to understand a gem for the sake of learning.. it has a server and a connection class ( which than handles the stuff ) i understand how it works, but i have no clue how i would write an adapter for that
<Bish>
there is no documentation / im not ultra-familiar with celluloid, but i think it's awesome
<Bish>
i don't know how and where to overwrite those event functions
fxn has quit [Quit: zZzZzZ...]
<shevy>
that dude was too lazy to write docu
zlogan85 has quit [Ping timeout: 244 seconds]
<Bish>
exactly
yqt has quit [Ping timeout: 240 seconds]
<awk>
why do you want to use it
<Bish>
well, obviously to receive mails
<Bish>
or send, whatever
unsymbol has quit [Quit: cheerio]
<awk>
lol
<awk>
but why this one...
symbol has quit [Quit: WeeChat 1.1]
<Bish>
it has celluloid, other stuff i use uses it, i like concurrency,rbx
unsymbol has joined #ruby
JamesDH has quit [Client Quit]
<Bish>
it has been good so far, and i would love to learn usage of it, im also willing to contribute to this gem.. but i cannot find a start, this never happened to me when using a gem
devoldmx has joined #ruby
<Bish>
i don't know if i have to create my own connection class, or server class or anything
pawnbox_ has joined #ruby
JamesDH has joined #ruby
fostertheweb has joined #ruby
<[k-_>
there are examples in the repo
<awk>
I would never use that, but good luck.. i'd go with postfix and use net/smtp
<Bish>
yeah the examples don't use the code
<Bish>
awk doesn't help you if u want to receive mails
pawnbox has quit [Ping timeout: 264 seconds]
whippythellama has joined #ruby
<Bish>
the examples don't use the code, OR are very basic
kedibasi has joined #ruby
<awk>
Bish: hence I said postfix + net/smtp
zeroDivisible has quit [Quit: WeeChat 1.3]
<awk>
I wouldn't trust that as a MTA... someone will exploit it
devoldmx has quit [Ping timeout: 255 seconds]
kp666 has joined #ruby
<Bish>
awk, you cannot receive emails with net/smtp, am i wrong about that?
JamesDH has quit [Client Quit]
<awk>
Bish: "postfix" to recieve mails...
<awk>
net/smtp to speak to the MTA
<awk>
I wouldn't trust some dudes 'home made MTA'...
centrx has quit [Ping timeout: 250 seconds]
<Bish>
well what's the worst that can happen:3 someone spams with your mailserver
juanpablo____ has joined #ruby
NeverDie has joined #ruby
<Bish>
end of list, and none will put effort into that, there are easier ways to spam, don't you think so
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
theery has quit [Remote host closed the connection]
pyoor has joined #ruby
freezevee has quit [Remote host closed the connection]
xcesariox has joined #ruby
Dopagod has joined #ruby
Dopagod has joined #ruby
<quazimodo>
Bish: well as far as I can see, having more than 1 native thread per core is not so great
<[k-_>
>> [1 * "=", "m" * "1", %w[1 1 1] * "="]
<ruboto>
[k-_ # => String can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/430614)
leat3 has joined #ruby
<[k-_>
>> ["m" * "1", %w[1 1 1] * "="]
<ruboto>
[k-_ # => no implicit conversion of String into Integer (TypeError) ...check link for more (https://eval.in/430615)
<FernandoBasso>
shevy: I even find lots of lisp ideas in ruby.
<Bish>
quazimodo, you're ahving more than 1 native thread per core on the very machine you're sitting on, do you notice it?
<shevy>
yeah
<[k-_>
well all three of them have *
<quazimodo>
Bish: they are expensive and context switching happens at the kernel level... osx doesn't even let you have more that 2000 or so in a normal machine
<livcd>
guys teach me some of your best tips/tricks in ruby :D
<shevy>
the only language matz disliked was C++ and only because it was unproportionally more complex than the others; linus said something similar about C++ so perhaps it is true!
kent\n has quit [Ping timeout: 252 seconds]
<Bish>
quazimodo, i don't know about osx, but that would problably be a reason to ditch it
<Bish>
but what you are describing is not a ruby question... since that is true for every native thread
<quazimodo>
native threads kinda suck for concurrency
<[k-_>
Ox0dea can teach you more
<quazimodo>
yeah
<quazimodo>
i honestly thought celluloid actors would have lived on fibers
<Bish>
well but threads imply concurrency
<yorickpeterse>
"native threads kinda suck for concurrency" what?
<Bish>
what you say is not entirely true
<livcd>
[k-_: i hate you now :D
joonty has quit [Quit: joonty]
<shevy>
poor [k-_
MrFjords has joined #ruby
<quazimodo>
yorickpeterse: yeah they do
hinbody has joined #ruby
<Bish>
let's say you have 80 threads.. each of these threads is a webserver, if one of those sends data it will be some milliseconds until the data is send / the answer arrives.. that is FUKIN YEAAAARS for a cpu
<yorickpeterse>
Maybe if you spawn millions of them, but that's not what you should use threads for
<shevy>
hah
<[k-_>
¯\_(ツ)_/¯
<quazimodo>
yeah, agreed
Rickmasta has joined #ruby
<shevy>
80 versus millions!
<Bish>
so the thread just goes to sleep until the answer arrives, and another thread is able to process the next job, which is just the name
jonr2219 has quit [Remote host closed the connection]
Guest3285 has quit [Quit: This computer has gone to sleep]
<quazimodo>
so how does having 50000 open websockets work if each socket lives in an actor, which is backed by a native thread?
joonty has joined #ruby
<yorickpeterse>
It doesn't
Igorshp has joined #ruby
<yorickpeterse>
You'd have to use a thread pool for it
<yorickpeterse>
I highly doubt fibers would scale much better tbh
otherj has quit [Ping timeout: 264 seconds]
moeabdol has joined #ruby
<yorickpeterse>
Ruby isn't Erlang in that regard, sadly
<Bish>
that's how our cpus work nowadays, it's that simple
<Bish>
imho
<Bish>
yorickpeterse, what does erlang do?
<quazimodo>
Bish: i highly recommend you watch this
<[k-_>
you've never heard of erlang?
<[k-_>
:OOOOOOO
<Bish>
ofc i heard of erlang, but i never used it, never heard about how it handles lot of Shit
<quazimodo>
Bish: 1 native thread per core, and the program itself handles it's own soft threads
danieli has quit [Ping timeout: 265 seconds]
<yorickpeterse>
Though I believe you can still use native threads if you need them
yawniek has quit [Read error: Connection reset by peer]
<shevy>
whenever I read Erlang, I think of distributed immortal objects that keep on ressing
leat3 has quit [Ping timeout: 246 seconds]
<quazimodo>
'soft threads' being like fibers
Iskarlar has joined #ruby
denisemccoy has joined #ruby
terlar has joined #ruby
<quazimodo>
i think, going off this dude's analysis, even erlang wouldn't be able to easily do more than a few million open connections per machine
patrick_star has quit [Ping timeout: 256 seconds]
theery has joined #ruby
<Bish>
quazimodo, that's cool and all in case of research but not common, doesn't help you, threads are great
bigbadbear has joined #ruby
<quazimodo>
Bish: actually it's very practical
rubie has joined #ruby
<Bish>
quazimodo, if you know about it so well, why asks fukin questions
<yorickpeterse>
Keep it nice people
<Bish>
just confused about this guy.
<Bish>
im nice, promised
<shevy>
do you like cats
<Bish>
:3
moeabdol has quit [Ping timeout: 244 seconds]
<quazimodo>
because i'm in the process of exploring the space and learning, I came in asking why tony backed each celluloid actor onto a native thread when we know that they arent so fantastic when you use more than a handful
<quazimodo>
and the thing is
<quazimodo>
it's relevant
<quazimodo>
rails team was discussing switching out event machine for celluloid/reel
patrick_star has joined #ruby
<shevy>
is that good?
theery has quit [Remote host closed the connection]
<quazimodo>
well i can't understand how it works, Surely they know something i don't so i wanna learn
otherj has joined #ruby
Outlastsheep has joined #ruby
theery has joined #ruby
<shevy>
I don't know either so I wanna learn too. Who here will teach us?
<quazimodo>
you can't keep thousands and thousands of websockets open 1 per native thread
<yorickpeterse>
IIRC the reason for Celluloid using 1 thread per actor is because they haven't had time to change it
<yorickpeterse>
I recall reading up on them wanting to move to a thread pool based setup
chihhsin has joined #ruby
<quazimodo>
yorickpeterse: so that makes a lot of sense
centrx has quit [Ping timeout: 268 seconds]
<quazimodo>
our company builds a lot of start up company's platforms
<quazimodo>
they don't need 5 million concurrent connections any time soon
<Bish>
do you have aspergers? just curious.
<quazimodo>
and if the do, VC funding'll come and hire the erlang/haskell/wizardry/voodoo programmers
<quazimodo>
but... we may need 50000-100000 ?
<yorickpeterse>
Bish: last warning, keep it nice
<DCameronMauch>
Question: Does anyone know how to setup fiddle to call C function that takes an array of ints?
<quazimodo>
Bish: nah you and I ar just diametrically opposed in how we learn maybe?
<yorickpeterse>
No passive aggressive bullshit either
<Bish>
yorickpeterse, insulting was not my intention there, just the way he writes
<quazimodo>
Bish: why can't you be more tolerant of another persons communication style?
Guest3285 has joined #ruby
<yorickpeterse>
Bish: you might want to read up on aspergers
<Bish>
im tolerant, i was just curious, sorry, didn't want to insult
<Bish>
yorickpeterse, no worries, i did
haraoka has quit [Ping timeout: 240 seconds]
<quazimodo>
you didn't, but if i say what's actually on my mind they'll be on my case
<[k-_>
please be mindful of how you phrase your sentences
kent\n has joined #ruby
Ox0dea has joined #ruby
<Bish>
quazimodo, no really, sorry!
<livcd>
i have adhd
<quazimodo>
livcd: my housemate has that, 1 working eye which is color blind and the best abs you've ever seen
<quazimodo>
yorickpeterse: ok i think this makes sense that they'd use a thread pool, i wonder when that's scheduled for. Surely it'll be in the works if rails moves to use reel for it's action cable socket controllers
<Ox0dea>
[k-_: I didn't even realize I'd been lost.
<Ox0dea>
Why am I being highlighted with livcd?
<[k-_>
he has interests in Array#*
<[k-_>
and wants to learn more secrets
<[k-_>
┌(・。・)┘ ♪ └(・。・)┐ ♪ ┌(・。・)┘
<[k-_>
reveal them all!
<Ox0dea>
ᕕ( ᐛ )ᕗ ᕕ( ᐛ )ᕗᕕ( ᐛ )ᕗ ᕕ( ᐛ )ᕗ
timonv has joined #ruby
<adaedra>
great, another yorickpeterse
morenoh149 has joined #ruby
<Bish>
quazimodo, i was really curious, but im sorry
<quazimodo>
Bish: take it easy it's all good man
<Ox0dea>
Bish: Are you projecting, mate?
<Bish>
Ox0dea, pardon?
juanpablo____ has quit [Read error: Connection reset by peer]
Trynemjoel has joined #ruby
<Ox0dea>
With which word(s) did you have trouble?
juanpablo____ has joined #ruby
<[k-_>
paaaaaaarrrrrrrdooooooooooooon
<Bish>
no words, just the way he acted, asking question about something he has already an opinion on
<adaedra>
>_>
<Ox0dea>
<_<
kedibasi has quit [Remote host closed the connection]
<livcd>
Ox0dea: so what are the secrets
<[k-_>
why can't he question something he has an opinion of?
* adaedra
mirrors Ox0dea
* Ox0dea
mirrors adaedra
<adaedra>
!!!!!ooooooon
<Bish>
.. well if the questin is about something you can only have opinions about.. it's weird to ask "what's better"
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
Dammit. He broke the mirror.
* [k-_
mirrors #ruby srorrsim ybur#
<adaedra>
?!enod uoy evah tahw
fgo has quit [Quit: WeeChat 1.1.1]
<Ox0dea>
adaedra: Your interrobang is backward.
<Ox0dea>
Do excuse me if it turns out that's how the French do it. :P
<[k-_>
it's a baterrogation
<Bish>
i could go in here, ask why islam is better and then tell you why it is.. ( implying we're religious )
<livcd>
i am getting confused
<[k-_>
livcd: drink more water
<adaedra>
o_O
Soda has joined #ruby
<shevy>
Bish he just writes a lot, very quickly so - some people have quick fingers, look at [k-_ on the other hand, he can not type at all on his tiny smartphone ;-)
<Bish>
anyways i g2g, this is getting to weird either way :D
<Ox0dea>
livcd: Are you in search of "weird" Ruby?
morenoh149 has quit [Ping timeout: 264 seconds]
patrick_star has quit [Ping timeout: 246 seconds]
<livcd>
Ox0dea: i am in search of the ninja skills
<[k-_>
Ox0dea: fizzbuzz!
<shevy>
class Ninja; end
<Ox0dea>
I was only going to post Idiosyncratic Ruby.
<Ox0dea>
Ninja = Class.new
<DCameronMauch>
Ox0dea, what does the call look like? can't find an example...
<[k-_>
livcd: number&1 vs number.even? / number.odd?
<quazimodo>
Bish: to be fair you didn't appear aware that native threads are absolutely not the right solution for implementing concurrency at a medium to large scale, which is rookie stuff. Maybe you were aware, but it didn't appear so to me
<[k-_>
Ox0dea: tell us more!
pawnbox_ has quit [Remote host closed the connection]
<DCameronMauch>
I saw the general call for fiddle, but when I am passing a type INTPTR_T?
<[k-_>
livcd: Ox0dea made lollipop, a superator library
<Ox0dea>
DCameronMauch: In the Array of argument types.
<Ox0dea>
Did you ensure you've got a proper handle in `golib`?
<quazimodo>
I wonder if the linux kernel's thread scheduler has been fiddled with much since 2013 to make native threads more viable for more simple/naive concurrent servers
<DCameronMauch>
yes
centrx has joined #ruby
<Ox0dea>
It looks correct. :/
<DCameronMauch>
blah.rb:6:in `call': no implicit conversion of Array into Integer (TypeError)
dopamean_ has joined #ruby
<DCameronMauch>
if I change the C call to take, say, 3 ints, and pass 3 ints, it works just fine
aaeron has joined #ruby
<DCameronMauch>
but the array length will be unknown
<quazimodo>
hrm they must have, having epoll
jgt1 has quit [Ping timeout: 246 seconds]
theRoUS has quit [Quit: Coyote finally caught me]
moeabdol has joined #ruby
danieli has quit [Read error: Connection reset by peer]
<Ox0dea>
DCameronMauch: What happens if you use TYPE_VOIDP?
<DCameronMauch>
haven't tried that
<DCameronMauch>
blah.rb:4:in `[]': unknown symbol "compute" (Fiddle::DLError)
n008f4g_ has joined #ruby
<DCameronMauch>
uh, not sure what happened there
jgt1 has joined #ruby
<Ox0dea>
Essentially, dlopen() couldn't find a matching function.
<livcd>
[k-_: which one is lollipop ?
<DCameronMauch>
because of the type mismatch I assume?
<DCameronMauch>
this is the first time I have seen this message
<Ox0dea>
Almost certainly.
<Ox0dea>
It does seem Fiddle can't hand off pointers to int. :/
<Ox0dea>
What made you switch from FFI, if you don't mind my prying?
<DCameronMauch>
is there a way to say "pointer to this array" instead of the array itself?
nhhagen has quit [Remote host closed the connection]
<Ox0dea>
It's so ridiculous.
rbennacer has quit [Read error: Connection reset by peer]
juanpablo_____ has joined #ruby
juanpablo____ has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 246 seconds]
<[k-_>
imagine -+~object to get OpenSSL::X509::Someshit#some_really_long_method_name? You save a lot of time!
<apipkin>
When having keys with a boolean value in a hash, what is the convention of naming the hash key and the look up? { is_active: true } and o[:is_active] ?
rbennacer has joined #ruby
<Ox0dea>
apipkin: I'd nix the prefix.
ujjain- has quit [Changing host]
ujjain- has joined #ruby
roxtrongo has quit [Remote host closed the connection]
<Ox0dea>
Same goes for method names in most cases.
chipotle has quit [Client Quit]
<[k-_>
(remove is_)
<apipkin>
so { active: true} and o[:active] ?
<Ox0dea>
LGTM.
tomchapin has joined #ruby
<apipkin>
Thanks!
leat3 has quit [Ping timeout: 244 seconds]
<Ox0dea>
apipkin: Happy to help. You know you're allowed to end method names with '?', yes?
<DCameronMauch>
Ox0dea, no luck, giving same message about unknown symbol
<apipkin>
Ox0dea: I have read/heard that, but didn't know how a hash key would translate to a method
jgpawletko has joined #ruby
* apipkin
is a JavaScript developer generally
UtkarshRay has joined #ruby
<Ox0dea>
apipkin: No, it won't, at least not without the proper plumbing. I was just going to mention that you should use it for methods that return simple booleans.
foureight84 has joined #ruby
casadei_ has quit [Remote host closed the connection]
Johnny__ has joined #ruby
<apipkin>
Ah okay! I'll keep that in mind :)
sparr has quit [K-Lined]
Hijiri has quit [K-Lined]
larissa has quit [K-Lined]
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 246 seconds]
PaulCapestany has quit [Quit: .]
<freezeve_>
I tried to use "sorted_by" and I partially succeeded, they are saved but after 192.168.1.1 comes 192.168.1.10, then 192.168.1.101 etc.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
freezeve_: You're sorting using lexicographical order.
<freezeve_>
any ideas how to sort them ?
<freezeve_>
Ox0dea: that's true
pontiki has joined #ruby
<Ox0dea>
freezeve_: You just want to sort by the last quad, yes?
<freezeve_>
sure
<freezeve_>
Ox0dea: should I add an id to the hash ?
<Ox0dea>
No, why?
<freezeve_>
Ox0dea: that's the only thing that crosses my mind
<freezeve_>
1, 192.168.1.1, "up"
Igorshp has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 264 seconds]
<Ox0dea>
sort_by { |ip, _| ip[/\d+$/].to_i }
patrick_star has quit [Ping timeout: 264 seconds]
<havenwood>
hal_9000: Just an aside, but File.open without a block isn't self-closing. Consider `File.read(filename).downcase.split` or `File.readlines(filename).map { |line| line.downcase.chomp }`.
<Ox0dea>
freezeve_: That regular expression matches the last sequence of consecutive digits and converts it to an integer so that it gets sorted properly.
Igorshp has joined #ruby
<freezeve_>
Ox0dea: I hate it when I am thinking for hours and you reply in 5 seconds
ndrei has quit [Ping timeout: 240 seconds]
<Ox0dea>
<3
PaulCapestany has joined #ruby
<freezeve_>
Ox0dea: I mean, when am I going to be like you ?
leat3 has quit [Remote host closed the connection]
<Ox0dea>
Tomorrow.
<freezeve_>
I am trying hard
<freezeve_>
nope
<freezeve_>
I hope so but no
<Ox0dea>
> Constant vigilance!
<Ox0dea>
Really, though, just always be on the lookout for something new to learn, and then make sure you get it to stick.
<hal_9000>
havenwood: Thanks, I will look. I do know better :)
<havenwood>
hal_9000: You could set the default value for a Hash key to an empty Array: hash = Hash.new { |h, k| h[k] = [] }
<Sou|cutter>
hal_9000: Not sure why you point out setting the Hash value to an array, but it's a common pattern to condense that by using the Hash initializer that takes a block - hash = Hash.new { |h, k| h[k] = [] } (then you don't need the ||= line)
<freezeve_>
Ox0dea: it worked
<freezeve_>
but how ?
<Sou|cutter>
havenwood: jinx
<havenwood>
hal_9000: A nit, but `chars` is a bit nicer than `split("")`.
<freezeve_>
Ox0dea: why | ip, _
<Ox0dea>
freezeve_: Because the status is irrelevant to the sort.
<freezeve_>
what is the role of underscore ?
<centrx>
for great justice
<Ox0dea>
freezeve_: It's meant to indicate that we need to consume a value, but we don't care what it is.
<Sou|cutter>
underscore indicates an unused param
<hal_9000>
Sou|cutter: havenwood yes, i do sometimes use the hash initialization
jacksonmills has joined #ruby
<Ox0dea>
freezeve_: Without the _, `ip` would contain both the key and the value and that would muck things up.
<freezeve_>
Ox0dea: the regEx is \d for digits, then $ for the end of the string
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
lbwski has quit [Client Quit]
<freezeve_>
Ox0dea: what's the benefits of using ipaddr ?
<freezeve_>
an object instead of a string ?
lbwski has joined #ruby
negev has joined #ruby
<Ox0dea>
Aye, that's a big part of it.
bricker has joined #ruby
<mr_snowf1ake>
hey guys, i did a scan() on some string, and am doing some computation on that. the problem is I want to go back and modify the original string in place. what's the right way of doing that? i know about gsub, but i need to take the matched results and run it through first
<freezeve_>
Ox0dea: I suppose I save them as host_ip = IPAddr.new('192.168.1.' + host.to_s) ?
troyready has joined #ruby
<Ox0dea>
freezeve_: Yep, that would do.
<mr_snowf1ake>
oh, actually, can i just use gsub(pattern) { } ?
patrick_star has joined #ruby
<havenwood>
hal_9000: Good luck with the book! I look forward to it.
bronson has joined #ruby
<mr_snowf1ake>
s/gsub/gsub!/
j4cknewt has joined #ruby
<hal_9000>
havenwood: thank you! drop me an email sometime
<Ox0dea>
hal_9000: I think the dialogue is a nice touch; great for beginners.
Musashi007 has joined #ruby
<Ox0dea>
mr_snowf1ake: Could you perhaps clarify your intent?
<Ox0dea>
freezeve_: And because IPAddr includes Comparable, you can just use #sort on an Array of instances.
<Sou|cutter>
is the whole book written as a conversation?
<hal_9000>
Ox0dea that was johnny’s idea, but I am on board with it now
<freezeve_>
Ox0dea: but they're a hash
<havenwood>
hal_9000: Just have it in mind since it was randomly mentioned in #ruby-offtopic this morning, but I've implemented some of Elixir stdlib in Ruby hoping Rubyists would find it interesting: https://github.com/havenwood/elixir.rb#readme
<hal_9000>
Sou|cutter: that is the plan, but if people hate that, it is not too late to change it
<Ox0dea>
freezeve_: sort_by(&:first), then.
j4cknewt has quit [Remote host closed the connection]
<hal_9000>
that sounds very interesting, will read and bookmark
<mr_snowf1ake>
Ox0dea: i'm trying to take a file with lines that start with '#', modify them, and store for later use
<Ox0dea>
mr_snowf1ake: You want to store the old or the new?
<mr_snowf1ake>
both
<icewall>
hi guys, looking for direct contact with somebody from dev team. Any active dev here ?
<Ox0dea>
icewall: Try #ruby-core?
<icewall>
oki
<Ox0dea>
icewall: Godspeed. It's a graveyard, but many of the core devs are at least present. :/
bronson has quit [Ping timeout: 244 seconds]
kp666 has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
<negev>
can anyone tell me why variables changed outside of a Thread are then changed inside the thread? i thought fork() was supposed to take an entire clone of the current context
<Ox0dea>
negev: You're seeing those results because for loops leak their variables.
<freezeve_>
Ox0dea: should I save a hash of object IPs or convert them back to_s ?
<negev>
Ox0dea: leak their variables? what does that mean?
`mrspock has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<freezeve_>
the things that take the most time usually are :P
<[k-_>
?gist_usage
<ruboto>
To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
youngbaks has joined #ruby
<Ox0dea>
freezeve_: That output simply doesn't match that program.
<Ox0dea>
@hosts is a map from IPAddr to String; calling #keys on it will give you an Array of IPAddrs.
<freezeve_>
you are right
<freezeve_>
I am only getting an array
<freezeve_>
sorry about that
<Ox0dea>
No worries.
<freezeve_>
the array is sorted but the values are missing
arooni has joined #ruby
<freezeve_>
also, did I ask about an array ? I am currently sorting a hash and then output to json, how did it convert to an array
<freezeve_>
?
fantazo has joined #ruby
<freezeve_>
I mean, how was it done automatically ?
senayar has quit []
meatherly has joined #ruby
marr has joined #ruby
imperator has joined #ruby
siemprefresco has joined #ruby
<freezeve_>
Ox0dea: changed to .sort, not .keys.sort and it appears like that [["192.168.1.1","up"],["192.168.1.2","up"]
xcesariox has quit [Read error: Connection reset by peer]
<freezeve_>
what am i missing ?
fantazo has quit [Client Quit]
fantazo has joined #ruby
xcesariox has joined #ruby
<gamename>
Hi Guys, I'm new to Ruby and only use it in the context of Vagrantfiles. In one file, there is a hash which has lots of repetitive entries in it. Is there any way to specify the values in, say, 'role_consul_servers' one time only? Here is the sample:https://gist.github.com/gamename/6ee23582ade298a82a34
<Ox0dea>
freezeve_: The observation that a Hash is just a collection of key-value pairs, essentially.
JamesDH has joined #ruby
<freezeve_>
Ox0dea: it is but why converting it .to_json didn't change the way it is stored ?
<gamename>
centrx: Given the example, does that mean I'll still need to do the mapping 3 times?
jespada has quit [Quit: WeeChat 1.1.1]
JimmyNeutron has quit [Read error: Connection reset by peer]
<Ox0dea>
freezeve_: I've got to step out for a bit. Judging by the various outputs you've provided, I think you're inadvertently mixing "incompatible" approaches to this problem.
<centrx>
gamename, oh you can assign a variable that represents the consuls array
jobewan has joined #ruby
<freezeve_>
Ox0dea: thanks, you helped a lot already
<Ox0dea>
freezeve_: For starters, how come you're shelling out to `ping` and then not doing anything with the result?
<centrx>
gamename, and then in places where there are additions to the array, you can do: consuls + ['es1', 'es2'] etc
<centrx>
gamename, consuls + eses + logstashes
<freezeve_>
Ox0dea: what do you mean ? I just want to know If a host is up or down
<gamename>
centrx: ah, ok. :) thanks!
Eiam_ has joined #ruby
<Ox0dea>
freezeve_: Aye, but you're not putting that information anywhere?
<freezeve_>
Ox0dea: or at least If it replies to the ping
<freezeve_>
Ox0dea: no, just a ping sweep
<Ox0dea>
You don't want to remember what you learn?
<Ox0dea>
That is, shouldn't the `ping` result go into scan_results.json?
<freezeve_>
Ox0dea: I might do this with net-ping gem later
<Ox0dea>
(Back in ~15.)
<freezeve_>
I mean, I take one step at a time
Dzejmskrokan has joined #ruby
badfish129 has left #ruby [#ruby]
rbennacer has quit [Remote host closed the connection]
blackmesa has joined #ruby
pawnbox has joined #ruby
Jardayn has joined #ruby
Eiam_ has quit [Client Quit]
Eiam_ has joined #ruby
Guest3285 has joined #ruby
Eiam_ has quit [Client Quit]
rushed has quit [Quit: rushed]
ckinniburgh has joined #ruby
mleung has quit [Quit: mleung]
TheHodge has quit [Quit: Connection closed for inactivity]
momomomomo has quit [Ping timeout: 240 seconds]
leat3 has quit [Remote host closed the connection]
mleung has joined #ruby
dgutierrez1287 has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
kobain has joined #ruby
ndrei has joined #ruby
theery has quit [Ping timeout: 255 seconds]
rbennacer has joined #ruby
Eiam_ has joined #ruby
tkuchiki has joined #ruby
<imperator>
is there anything better than the VCR gem out there?
theery has joined #ruby
<imperator>
specifically, something that can deal with threaded methods?
cornerma1 has joined #ruby
leat3 has joined #ruby
Dzejmskrokan has quit [Remote host closed the connection]
<freezeve_>
Ox0dea: couldn't find something better than flatten
<freezeve_>
it does what it is intended to
<freezeve_>
Ox0dea: but thanks
<freezeve_>
!!
<Ox0dea>
Sure thing.
<Ox0dea>
There's still more learnin's to do if you want 'em.
lsmola has quit [Ping timeout: 260 seconds]
<Ox0dea>
`hash.map {|key, value| [key, value]}` is just `hash.to_a`, for instance.
<Ox0dea>
That's why I asked about Enumerable.
<gamename>
centrx: followup - how would you assign (1..3).map { |i| "consul#{i}" } to a consuls var which would then be used for consuls + another_var + another_var? Or am I missing your intent?
xylotism has quit [Read error: Connection reset by peer]
<Ox0dea>
freezeve_: With the exceptions of #select and #reject, all of the methods provided to Hash by Enumerable simply convert it to an Array of key-value pairs before operating.
xylotism has joined #ruby
<gamename>
centrx: ok. Got it.
UtkarshRay has quit [Remote host closed the connection]
teclator has joined #ruby
__main__ has joined #ruby
allomov has quit [Remote host closed the connection]
CustosL1men has quit [Ping timeout: 260 seconds]
DoubleMalt has quit [Remote host closed the connection]
<PaulePanter>
Well, my colleague passes `-1` in the array to denote that objects with no relation to another object should be found.
psy has quit [Max SendQ exceeded]
<Ox0dea>
Flog them.
<tobiasvl>
what
ht__ has joined #ruby
<tobiasvl>
magic numbers
<shevy>
42
krisquigley has quit [Ping timeout: 250 seconds]
psy has joined #ruby
momomomomo has quit [Quit: momomomomo]
nofxx has joined #ruby
xcesariox has joined #ruby
xcesariox has quit [Client Quit]
mikecmpbll has joined #ruby
<PaulePanter>
Ox0dea: One last thing. There is the possibility that the array does not contain `-1`.
icarus has quit [Ping timeout: 268 seconds]
<PaulePanter>
a[a.index(-1)] = nil
<PaulePanter>
TypeError: no implicit conversion from nil to integer
c1v0 has joined #ruby
JohnnyTao has quit [Quit: Leaving]
<Ox0dea>
PaulePanter: You'll have to be verbose, then.
<PaulePanter>
Ok.
<Ox0dea>
To catch up, there's only ever going to be at most one -1, but it could be anywhere?
<PaulePanter>
Indeed.
<Ox0dea>
How strange.
aaeron has joined #ruby
<PaulePanter>
Ox0dea: Sorry, I misunderstood you. I thought I’d need to use the verbose solution.
Dzejmskrokan has joined #ruby
platzhirsch has left #ruby [#ruby]
HAL2328 has joined #ruby
<PaulePanter>
[2, …, -1, …, 4] (exactly one -1) is valid, [145, 2, …, 145808] (no -1) is valid, but [145, 2, -1, …, -1, 14355] (more than one -1) is invalid.
tenderlove has quit [Remote host closed the connection]
spider-mario has joined #ruby
<Ox0dea>
PaulePanter: Yes, you probably will, since you'll need to do a preliminary check. :/
yardenbar has quit [Ping timeout: 246 seconds]
JimmyNeutron has joined #ruby
iamvery has joined #ruby
<Ox0dea>
There's probably some hackish slice you could use to make it a no-op if #index gives `nil`, but I can't condone such a thing.
<PaulePanter>
Ox0dea: Understood. Thanks again!
<Ox0dea>
Sure thing.
afrianska has quit [Ping timeout: 255 seconds]
Dzejmskrokan has quit [Ping timeout: 260 seconds]
xylotism has quit [Read error: Connection reset by peer]
casadei_ has joined #ruby
xylotism has joined #ruby
baweaver has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
deol is now known as michaeldeol
blackmesa has quit [Ping timeout: 240 seconds]
<Ox0dea>
PaulePanter: Do you happen to have a variable that could be used as scratch in the vicinity of this `-1 => nil` code?
leafybasil has quit [Remote host closed the connection]
CustosLimen has joined #ruby
leafybasil has joined #ruby
Rickmasta has joined #ruby
RobertBirnie has joined #ruby
afrianska has quit [Ping timeout: 250 seconds]
garethrees has joined #ruby
baweaver has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
Hardtail has quit [Quit: WeeChat 1.1.1]
ramfjord has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
jmignault has joined #ruby
baweaver has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 255 seconds]
j_suth has joined #ruby
Hardtail has joined #ruby
platzhirsch has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
lwu has joined #ruby
justin_pdx has joined #ruby
nanoz has joined #ruby
techminer has joined #ruby
Rollabunna has quit [Remote host closed the connection]
jsuth_ has quit [Ping timeout: 264 seconds]
<techminer>
I'm new to testing with rspec. I have a CSV file I'm going to eventually download and import, but first I want to verify the import directory exists. So far I'm having no luck just checking for the directory, here's my gist… https://gist.github.com/MattMencel/6b75b93f125a96a26712
<yxhuvud>
or be explicit and don't try to use implicit subjects until you understand what is going on
pocketprotector has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has quit [Remote host closed the connection]
<techminer>
subject refers to the Class in my describe block then?
mleung has joined #ruby
theery has quit []
<yxhuvud>
no, to an instance of it.
CustosLimen has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
lbwski has quit []
oldbay has joined #ruby
jgt1 has joined #ruby
AsFelix has left #ruby [#ruby]
Blaguvest has quit []
ricer2 has quit [Quit: Caught SystemExit exception.]
DroidBurgundy has joined #ruby
bigredboots has quit [Remote host closed the connection]
baweaver has joined #ruby
Dzejmskrokan has joined #ruby
xybre has joined #ruby
baweaver has quit [Remote host closed the connection]
saddad has joined #ruby
ricer2 has joined #ruby
bigredboots has joined #ruby
eosinx has joined #ruby
failshell has quit []
aaeron has joined #ruby
jackjackdripper has joined #ruby
baweaver has joined #ruby
jackjackdripper has quit [Client Quit]
howdoicomputer has joined #ruby
pecpec has quit [Remote host closed the connection]
oldbay has quit [Client Quit]
Hijiri has joined #ruby
rwyoung has joined #ruby
jackjackdripper1 has joined #ruby
yqt has joined #ruby
bronson has joined #ruby
Dzejmskrokan has quit [Ping timeout: 260 seconds]
alexUaN has quit [Remote host closed the connection]
jackjackdripper1 has quit [Client Quit]
CustosLimen has joined #ruby
pocketprotector has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
jackjackdripper has joined #ruby
psy has quit [Quit: Leaving]
Dzejmskrokan has joined #ruby
<SCHAAP137>
i'm writing a helper function for cinch (irc bot in Ruby), in which i'm calling a shell script with a user supplied parameter, sending output to a file, filtering that through sed, leaving me with a piece of text I'd like to reply into the channel
bruno- has quit [Ping timeout: 260 seconds]
finisherr has joined #ruby
Dzejmskrokan has quit [Client Quit]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<SCHAAP137>
however, i haven't found a good way yet to "slowly" make these lines appear, and the bot gets disconnected with a RecvQ exceeded server message
_mak has left #ruby [".."]
<[k-_>
how 'bout a collection of links
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
ruurd has joined #ruby
snapcase has quit [Ping timeout: 246 seconds]
snapcase has joined #ruby
`derpy has quit [Read error: Connection reset by peer]
IceDragon has quit [Ping timeout: 246 seconds]
cescalante has quit [Ping timeout: 246 seconds]
aep has quit [Ping timeout: 246 seconds]
Fraeon has quit [Ping timeout: 246 seconds]
`derpy has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
<Ox0dea>
SCHAAP137: Did you think [k-_ couldn't see ruboto's link?
alexUaN has joined #ruby
<SCHAAP137>
i could post the full .rb of the cinch bot, but it's irrelevant to the issue, Ox0dea, i thought the helper function itself would be sufficient
<[k-_>
SCHAAP137: you misunderstand.
<Ox0dea>
I suspect a language barrier.
<[k-_>
I meant, instead of dumping so many lines in IRC, why not just have a link that shows everything?
maletor has quit [Quit: Computer has gone to sleep.]
swgillespie has joined #ruby
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamvery has quit [Remote host closed the connection]
blackmesa has joined #ruby
NeverDie has joined #ruby
havenwood has quit [Ping timeout: 265 seconds]
mordocai has quit [Quit: Getting rid of distractions]
morenoh149 has quit [Ping timeout: 246 seconds]
icarus has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
MrFjords has quit [Ping timeout: 260 seconds]
maletor has joined #ruby
bender_unit has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mustmodify has joined #ruby
mleung has quit [Quit: mleung]
bender_unit has quit [Max SendQ exceeded]
baweaver has quit [Remote host closed the connection]
icarus has joined #ruby
eightfold has quit [Quit: eightfold]
devoldmx has joined #ruby
platzhirsch has quit [Ping timeout: 265 seconds]
<mustmodify>
IIRC, according to Tell Don't Ask, if I have a Message and it may be in one of two formats, and I want it parsed, I should tell some object to do that. But according to other philosophical bits whose names I've forgotten, you should have verb-objects, just noun-objects... though I never really understood that one. So should I create a MessageHandler object that determins the format of the message and delegates to the correct parser? OR is that too much bag
bigredboots has quit [Remote host closed the connection]
ngscheurich has joined #ruby
AlphaAtom has joined #ruby
JamesDH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfockler has quit [Remote host closed the connection]
oldbay has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Alina-malina has joined #ruby
bigredboots has joined #ruby
<HAL2328>
i'm on a windows, using irb. when i run long commands (that exceeds one line) it just truncates it in the buffer. i'd like to view the full command of what i ran. any ideas?
denisemccoy has quit [Remote host closed the connection]
Rollabunna has joined #ruby
esauOp has joined #ruby
banister has joined #ruby
CustosLimen has quit [Ping timeout: 272 seconds]
krisquigley has joined #ruby
borodin has joined #ruby
mistym has quit [Ping timeout: 256 seconds]
<imperator>
HAL2328, up arrow to repeat last command, or type Readline::HISTORY.to_a
Rollabunna has quit [Ping timeout: 244 seconds]
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
pocketprotector has joined #ruby
ruurd has joined #ruby
NeverDie has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
jamesaxl|2 has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 250 seconds]
sargas has joined #ruby
Guest3285 has quit [Quit: This computer has gone to sleep]
icarus has quit [Ping timeout: 240 seconds]
NeverDie has joined #ruby
<HAL2328>
imperator, thank you very much! the Readline::HISTORY.to_a did exactly what I wanted.
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
<imperator>
yw :)
<HAL2328>
imperator, is there a reason why irb decides not to report the full command on console? im taking notes as i'm learning on a separate doc, so i like to copy and paste commands
bigredboots has quit [Remote host closed the connection]
<Ox0dea>
HAL2328: irb isn't to blame here.
NeverDie has quit [Read error: Connection reset by peer]
icarus has joined #ruby
jzigmund_ has joined #ruby
NeverDie_ has joined #ruby
<HAL2328>
although the up arrow look up method repeats the code, it doesn't allow me to select the entire command (cmd limitation maybe)
finisherr has quit [Quit: finisherr]
vondruch_ has joined #ruby
Rurik has quit [Quit: Leaving]
<Ox0dea>
Aye, that's the much more likely culprit.
oldbay has joined #ruby
<HAL2328>
example: it should scroll to get the rest, but it just won't scroll so i get partial. but the READLINE is perfect solution! :)
Zai00 has joined #ruby
jenrzzz has joined #ruby
<HAL2328>
Ox0dea, good to know. i thought it was irb so i kept searching on google with no avail
mwlang has quit [Quit: mwlang]
bmurt has quit []
jzigmund has quit [Ping timeout: 246 seconds]
NeverDie_ has quit [Client Quit]
<Ox0dea>
HAL2328: I propose several solutions: use Alt+Enter to go into fullscreen, change your prompt to something much shorter (and maybe forget which directory you're in), upgrade your OS.
vondruch has quit [Ping timeout: 255 seconds]
<imperator>
HAL2328, get the same behavior in powershell?
CustosLimen has joined #ruby
eightfold has joined #ruby
rbennace_ has quit [Remote host closed the connection]
<HAL2328>
imperator, let me try. i've been using ConEmu which has been amazing, but it's not a cmd replacement, the core behavior is still there.
NeverDie has joined #ruby
jzigmund_ has quit [Ping timeout: 244 seconds]
vondruch_ has quit [Ping timeout: 268 seconds]
rbennacer has joined #ruby
denisemccoy has joined #ruby
Iskarlar has joined #ruby
jzigmund has joined #ruby
bender_unit has joined #ruby
FreeKevi_ has joined #ruby
gamename has joined #ruby
<HAL2328>
imperator, powershell worked :) no truncation! thanks again!
gamename has quit [Client Quit]
<imperator>
yeah, i pretty much only use powershell now
enebo has joined #ruby
gamename has joined #ruby
<HAL2328>
Ox0dea, i tried alt+enter but you can't even fullscreen cmd/powershell, it so sad. i downloaded ubuntu, been proscratinating haven't installed it yet
Soda has quit [Remote host closed the connection]
<HAL2328>
Ox0dea, windows is making me a more patience person everyday lol
Iskarlar has quit [Max SendQ exceeded]
mustmodify has left #ruby [#ruby]
Iskarlar has joined #ruby
<HAL2328>
imperator, yeah i think i will too.
rakm has joined #ruby
Kallis has joined #ruby
eightfold has quit [Quit: eightfold]
<imperator>
can't fullscreen them? i mean, with the mouse you can
<imperator>
never tried it via cmdline
Soda has joined #ruby
denisemccoy has quit [Remote host closed the connection]
<atmosx>
hello
allomov has joined #ruby
ruurd has quit [Ping timeout: 264 seconds]
j4cknewt has quit [Remote host closed the connection]
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jzigmund has quit [Ping timeout: 244 seconds]
<HAL2328>
imperator, yeah the most mine will expand is 2/3 of a fullscreen width
<imperator>
oh, you gotta mess with the properties
jzigmund has joined #ruby
<imperator>
otherwise it won't go past the max
<imperator>
if i remember right
Soda has quit [Remote host closed the connection]
aredridel is now known as Aria
howdoicomputer has quit [Ping timeout: 246 seconds]
Zai00 has quit [Quit: Zai00]
Soda has joined #ruby
xtsee has joined #ruby
bender_unit has quit [Ping timeout: 264 seconds]
vondruch_ has joined #ruby
gix has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
jzigmund has quit [Read error: Connection reset by peer]
DroidBurgundy has quit [Remote host closed the connection]
<HAL2328>
imperator, you're right, under layout i changed the width to 200 and it worked. really weird design, not very user friendly
roxtrongo has joined #ruby
jzigmund has joined #ruby
<Ox0dea>
HAL2328: What's got you tethered to Windows?
FernandoBasso has joined #ruby
athinggoingon has joined #ruby
rwyoung has quit [Ping timeout: 260 seconds]
Musashi007 has joined #ruby
but3k4_ has joined #ruby
but3k4 has quit [Ping timeout: 264 seconds]
dasher00 has quit [Ping timeout: 246 seconds]
vondruch_ has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Client Quit]
DroidBurgundy has joined #ruby
Jackneill has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
dgutierrez1287 has joined #ruby
karapetyan has joined #ruby
decoponio has quit [Quit: Leaving...]
workmad3 has joined #ruby
centrx has quit [Ping timeout: 240 seconds]
VeryBewitching has joined #ruby
<HAL2328>
Ox0dea, just came with my computer lol... old habit are hard to kill i guess. I had a macbook, but it's broken now. i'm just bootstrapping using my old PC laptop
<nofxx>
HAL2328, from mac to gnome is way more 'home' than mac to windows
<HAL2328>
windows 7, can't complain when im not developing. it's a battle as soon as i do rails console
dseitz has quit [Quit: bbl]
karapetyan has quit [Ping timeout: 250 seconds]
dgutierrez1287 has quit [Ping timeout: 265 seconds]
tejasmanohar has joined #ruby
<craysiii>
dual boot master race /s
<atmosx>
HAL2328: virtual machine + linux?
dasher00 has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
<nofxx>
HAL2328, life's too short man, just use stuff as they should. windows for games, boot a good distro to work
<HAL2328>
atmosx, that's the plan. someone here suggested i try ubuntu 14.04.3 LTS
JamesDH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
umgrosscol has quit [Quit: End of Line]
benlieb has joined #ruby
umgrosscol has joined #ruby
<atmosx>
HAL2328: are you familiar with command line? if yes I'd suggest debian.
<HAL2328>
nofxx, I agree. Although I was able to solve a lot of the roadblocks thanks to the generous and knowledge folks here but it ate up a lot of time and energy.
<atmosx>
HAL2328: really lightweight image... or even docker
Coldblackice has joined #ruby
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
leafybasil has joined #ruby
mleung has joined #ruby
<HAL2328>
atmosx, I've always heard great things about Debian. I did hear that ubuntu is a bit bloated. since my primary os for general stuff is win7, debian for dev might be a better fit.
JamesDH has joined #ruby
<atmosx>
HAL2328: just install ruby manually system wide. Don't go with the distributino's version becuase it's old.
<Ox0dea>
> distributino
<Ox0dea>
Sabayon is apparently of Italian origin.
momomomomo_ has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
rwyoung has joined #ruby
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo_ is now known as momomomomo
vondruch_ has joined #ruby
sedevc has joined #ruby
<imperator>
HAL2328, or use something like rbenv or chruby
tejasmanohar has quit [Read error: Connection timed out]
sedevc has left #ruby [#ruby]
mr_snowf1ake has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
<HAL2328>
thanks everyone. will try dual booting later tonight. i've had rbenv on OSX and it was beautiful. but i may try chruby to how that works. never heard of that
icarus_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
eosinx has quit [Ping timeout: 244 seconds]
icarus has quit [Ping timeout: 244 seconds]
krisquigley has joined #ruby
<atmosx>
Ox0dea: how can you tell? (that it's of italian origin)
but3k4_ has quit [Read error: Connection reset by peer]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
FernandoBasso: It's refreshing to see a beginner taking the time to read /doc. :)
jamesaxl has joined #ruby
kadoppe has quit [Ping timeout: 265 seconds]
j4cknewt has joined #ruby
<FernandoBasso>
atmosx: I think I see.
<atmosx>
Ox0dea: he's a good lad.
fantazo has quit [Quit: Verlassend]
<atmosx>
FernandoBasso: You don't need () but it's a good programming style as it makes methods/functions easier to read.
<FernandoBasso>
atmosx: Ruby and JS area easy, nobody needs to read docs.
<FernandoBasso>
s/area/are/
<Ox0dea>
atmosx: You need the parentheses if you intend to invoke a method which shares its name with a local variable.
<atmosx>
FernandoBasso: are easy to pick up but hard to master
<FernandoBasso>
atmosx: I was joking. :)
<atmosx>
Ox0dea: if that's the case, then I'll say you're stupid and you have bigger problems lying somewhere than that :-P
<FernandoBasso>
People assume these are toy langs, unlike the almighty java.
jamesaxl has quit [Remote host closed the connection]
<atmosx>
FernandoBasso: ah k
last_staff has joined #ruby
I has joined #ruby
rubie has quit [Remote host closed the connection]
kadoppe has joined #ruby
<atmosx>
FernandoBasso: hm, people get paid to write JS and Ruby too. So there's hardly toy langs.
I is now known as Guest76077
bronson has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Quit: Leaving.]
<Ox0dea>
atmosx: What would you name a method that sums some numbers? What would you name a variable that contains some sum? Why is it hard to imagine the two existing in the same scope?
<atmosx>
truth to be told js + rails makes a very good portfolio for landing jobs
rbennacer has quit [Remote host closed the connection]
<FernandoBasso>
atmosx: I agree :)
jackjackdripper has joined #ruby
<atmosx>
Ox0dea: because it's stupid and confusing. Use 'number_sums' if that's the case.
<FernandoBasso>
I am passionate about programming langs, and I don't understand why people say "lisp is the only one", "java is the best", "pyhton blah", "js rocks and the others suck", etc. I like them all :)
jamesaxl has joined #ruby
<atmosx>
FernandoBasso: good you're in the right place then :-)
<atmosx>
FernandoBasso: Sei Italiano?
<FernandoBasso>
atmosx: pt-br
Igorshp has quit [Remote host closed the connection]
finisherr has joined #ruby
<atmosx>
atmosx: good.
<FernandoBasso>
atmosx: You?
jeaye has quit [Ping timeout: 250 seconds]
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
<imperator>
atmosx, gotta stop talking to yourself, not healthy
yashinbasement has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
jeaye has joined #ruby
mesamoo has joined #ruby
firstdayonthejob has joined #ruby
<atmosx>
FernandoBasso: gr-it
<FernandoBasso>
Cool.
howdoicomputer has joined #ruby
rubie has joined #ruby
jenrzzz has joined #ruby
tvw has joined #ruby
<nofxx>
FernandoBasso, Brazil here too!
<FernandoBasso>
nofxx: :)
<FernandoBasso>
nofxx: Long time rubist?
bb010g has quit [Quit: Connection closed for inactivity]
Guest49 has quit [Remote host closed the connection]
<nofxx>
FernandoBasso, ~2008, you?
<FernandoBasso>
Some days :)
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has quit [Quit: Computer has gone to sleep.]
tejasmanohar has joined #ruby
nanoz has quit [Ping timeout: 272 seconds]
<nofxx>
FernandoBasso, ruby is great, you'll have fun
ruurd has quit [Quit: ZZZzzz…]
choke has joined #ruby
<nofxx>
rubygems, github, stackoverflow, here... all you prob going to need. Started with chris pine learn to program?
choke has quit [Client Quit]
choke has joined #ruby
<FernandoBasso>
Nope :)
<HAL2328>
nofxx, i got to chapter 8 fine. after that chris killed my confidence
<FernandoBasso>
I started in several different ways.
<nofxx>
but the best way to actually start, build or work on a gem
<Sou|cutter>
In fairness, the practice of programming is humbling at any experience level
<nofxx>
or an webapp
* imperator
figures out that pt-br must be portuguese-brazilian
<HAL2328>
nofxx, i really liked his writing style and the flow. but chapter 9 got real complex for me. i used other sources to learn though. i should finish his book though
catbusters has quit [Ping timeout: 246 seconds]
mprelude has quit [Ping timeout: 252 seconds]
<HAL2328>
nofxx, now im learning rails,trying to build a web app. been doing some michael hartl tutorial with other materials its been a joy so far
JohnBat26 has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
<nofxx>
imperator, yeah... there's actually a new agreement and the hipster new way is to merge pt-pt and pt-br
<imperator>
HAL2328, give it time, you'll become jaded and cynical like me
shmilan has joined #ruby
<Ox0dea>
Sick motivational skills.
<imperator>
mad skillz
symbol_ has quit [Ping timeout: 256 seconds]
j4cknewt has quit [Remote host closed the connection]
<Sou|cutter>
imperator: eventually you'll come back out the other side and it will be a joy again
<HAL2328>
imperator, that's like mic drop motivational
acke has joined #ruby
<Sou|cutter>
see how I turned that around?
<imperator>
Sou|cutter, haha, the other side is retirement at this point
<nofxx>
HAL2328, I advice you to start with a ruby gem or a simpler ruby webapp framework... like sinatra
<Ox0dea>
HAL2328: Do you remember where exactly you hit the wall in LtP 9?
<nofxx>
or non dynamic stuff like middleman or nanoc HAL2328
catbusters has joined #ruby
casadei_ has quit [Remote host closed the connection]
yashinbasement has quit [Quit: Leaving]
<imperator>
HAL2328, no problem, any time
firstdayonthejob has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 244 seconds]
<HAL2328>
nofxx, note taken. if i get stuck like i did with LtP, i might take a break and attempt those. that is if don't get jaded by that time ;)
pocketprotector has quit [Ping timeout: 272 seconds]
AlphaAtom has quit [Read error: Connection reset by peer]
thezanke has joined #ruby
AlphaAtom has joined #ruby
thezanke has left #ruby ["Leaving"]
<HAL2328>
Ox0dea, looking back at the table of contents, i think i actually made it to chapter 10. it might have been recursion. or maybe it seems so since i studied those from different sources.
FreeKevi_ has quit []
mib_mib has joined #ruby
benlieb has joined #ruby
workmad3 has joined #ruby
syath has quit [Quit: WeeChat 1.2]
<HAL2328>
Ox0dea, don't have the book with me at the moment to really see where but i think it's a book worth finishing
maletor has joined #ruby
<mib_mib>
hi - using ruby 2.1 - i have a csv file that has empty quoted fields, i.e. a field that is empty is just two quotes ("") instead of just blank - however, the default when reading the csv file seems to read this as two quotes instead of unquoting it - is there a csv option to optionally 'unquote' all fields?
jgpawletko has quit [Quit: jgpawletko]
<nofxx>
mib_mib, I believe you're seeing the quotes but it's actually blank
<nofxx>
puts "" vs p ""
sargas has quit [Quit: Leaving]
<mib_mib>
no
<nofxx>
otherwise it'll be "\"\""
<mib_mib>
the field actually is two quotes
<mib_mib>
maybe ur right....
<mib_mib>
hmmmm i guess i was confused, thanks!
<mib_mib>
=D
Alayde has quit [Ping timeout: 252 seconds]
<HAL2328>
mib_mib, great community here no? can learn a lot by just lounging here, not just by asking q's.
zenguy_pc has quit [Read error: Connection reset by peer]
finisherr has quit [Quit: finisherr]
NeverDie has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
<HAL2328>
Ox0dea, that's very true. I meant the environment we have here in this channel. say im doing something else, e.g. not in the room. in a typical classroom i'd miss everything had i gone to the restroom.
rakm has joined #ruby
<Ox0dea>
A classroom isn't inherently a place for active learning.
<nofxx>
Ox0dea, who are 10% who can't learn anything by DOING a presentation? Hm, when come to think... that how stupid ppl get a job ... teatching
havenn has joined #ruby
<nofxx>
teaching* ... bad teachers I mean. There are lots.
AlphaAtom has quit [Read error: Connection reset by peer]
<imperator>
wow, that was harsh
<HAL2328>
but here i have context since i can just trace back. some questions i probably won't ask since i haven't ran into those problems
AlphaAtom has joined #ruby
<HAL2328>
but like the p vs puts behavior
AlphaAtom has quit [Max SendQ exceeded]
casadei_ has joined #ruby
phutchins has joined #ruby
<HAL2328>
i learned that thanks to a question someone else. in a classroom, i woulda missed out. that's all i meant.
havenwood has quit [Ping timeout: 265 seconds]
<Ox0dea>
HAL2328: Sure, passive learning is fine as a supplement.
<HAL2328>
nofxx, i agree. i took c++ in high school and it was so bad i didn't pursue cs in college
<imperator>
HAL2328, ... what's the "2328" ... just curious
<Ox0dea>
Just mind that you don't become content with passive learning.
<HAL2328>
i thought cs wasn't for me
AlphaAtom has joined #ruby
<imperator>
i've tried and dropped c++ classses 3 times - the teachers were fucking horrid
djbkd has joined #ruby
<Ox0dea>
> Your best teacher is your last mistake.
<Ox0dea>
At least, you should strive to make it so.
Balzrael has quit [Quit: Leaving]
solars has quit [Ping timeout: 246 seconds]
banister has quit [Ping timeout: 244 seconds]
<imperator>
my favorite was the dude who required a book that was out of print, and would take cell phone calls from his wife in the middle of class
mib_mib has quit [Ping timeout: 246 seconds]
niemcu has quit [Ping timeout: 250 seconds]
<HAL2328>
imperator, lol my teacher would just make us do book problems and he just sat there with a book and half of the time he fell asleep
zenguy_pc has joined #ruby
<HAL2328>
imperator, the entire class goofed around. we never worked
<imperator>
that's bad
<HAL2328>
imperator, my name is a reference to a movie character can you figure it out?
<shmilan>
I cannot believe the horrible teachers you guys have had.
[Butch] has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 240 seconds]
<dgs_>
is there anyway to have .irbrc's PROMPT setting reevaluated either periodically, or after a command has run? (I've got an app that can connect to many different databases - I'd like to have the name of the database in the irb prompt to stop me accidentally working in the wrong databsae)
karapetyan has quit [Remote host closed the connection]
roolo has joined #ruby
acke has quit [Remote host closed the connection]
frem_ is now known as frem
finisherr has joined #ruby
<eam>
craysiii: primes have many powers, sure, but it's debatable whether they're number one
<dgs_>
Ox0dea: no! i hadn't seen that - looks promising though
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo_ is now known as momomomomo
<dgs_>
I'll give it a try - thanks =)
<wasamasa>
as long as I don't use it to run a webserver, I don't really care about the memory usage
<Ox0dea>
dgs_: It's wonky as hell, but it oughta do.
<dgs_>
yeah
<Ox0dea>
Godspeed.
dopamean_ has quit [Ping timeout: 246 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
* wasamasa
goes to bed
DroidBurgundy has quit []
zenguy_pc has joined #ruby
<eam>
memory is what, $5/gig?
<eam>
I can afford at least $5 of computing equipment to run a text editor
<eam>
hell, double that
dseitz has joined #ruby
finisherr has quit [Quit: finisherr]
symbol_ has quit [Ping timeout: 264 seconds]
iamvery has joined #ruby
mary5030 has quit [Remote host closed the connection]
bruno- has joined #ruby
finisherr has joined #ruby
mary5030 has joined #ruby
<ytti>
too bad it doesnt scale
zenguy_pc has quit [Read error: Connection reset by peer]
<ytti>
you can throw arbitrary amount of $5 and except to always get 1GB incremenet in memory
saddad has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
petricore has quit [Read error: Connection reset by peer]
bricker has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
modern has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
arooni has quit [Ping timeout: 246 seconds]
mary5030 has quit [Ping timeout: 246 seconds]
<eam>
ytti: density becomes an issue, sure, but it's still awfully cheap
<eam>
my laptop has 16G and it's pretty old
<eam>
two years old?
bruno- has joined #ruby
petricore has joined #ruby
<ytti>
sure, but if you'd want that extra 1GB
<ytti>
it wouldn't cost 5USD
<ytti>
it would be like 3000USD
bricker has joined #ruby
ruby-lang260 has quit [Ping timeout: 246 seconds]
Jackneill has quit [Remote host closed the connection]
brandon has joined #ruby
momomomomo has quit [Quit: momomomomo]
jackjackdripper has quit [Quit: Leaving.]
roxtrongo has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 268 seconds]
bigredboots has joined #ruby
<eam>
ytti: about $300 actually, if I wanted to go to 32G
tkuchiki has joined #ruby
jackjackdripper has joined #ruby
bruno- has joined #ruby
<eam>
but it turns out 16G is plenty to run several instances of both vi and emacs
jgt1 has joined #ruby
athinggoingon has quit [Ping timeout: 272 seconds]
iamvery has quit [Remote host closed the connection]
<imperator>
like 3 emacs
<eam>
speaking of memory hogs, iTerm2 is using about 3x as much as any of my editors
havenwood has quit [Ping timeout: 264 seconds]
but3k4_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator>
eam, now try eclipse
<eam>
I'd rather not
<imperator>
you'll try eclipse now, and you'll like it
tkuchiki has quit [Ping timeout: 246 seconds]
apt-get has quit [Remote host closed the connection]
<eam>
ok I clicked the button. I'll check back in tomorrow when it's running
bruno- has quit [Ping timeout: 260 seconds]
<imperator>
i tried using it for a while, it had a neat plugin architecture, but it was just so damned heavy
<imperator>
eam ;)
jenrzzz has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
victortyau has quit [Quit: Leaving]
bruno- is now known as Guest86287
mikecmpbll has quit [Quit: i've nodded off.]
imperator has quit [Quit: Leaving]
dman777_alter has quit [Quit: Lost terminal]
poli has quit [Ping timeout: 240 seconds]
symbol_ has joined #ruby
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest86287 has quit [Read error: Connection reset by peer]
Eiam_ has joined #ruby
yfeldblu_ has joined #ruby
bruno-_ has joined #ruby
HAL2328 has quit [Quit: Leaving]
blackmesa has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
pecpec_ has quit [Quit: Leaving...]
Soda has quit [Ping timeout: 244 seconds]
pandaant has joined #ruby
krz has quit [Ping timeout: 256 seconds]
cfloare_ has quit [Ping timeout: 250 seconds]
bruno-_ has quit [Ping timeout: 246 seconds]
allomov has quit [Ping timeout: 244 seconds]
cgfbee has quit [Ping timeout: 250 seconds]
bruno-_ has joined #ruby
zenguy_pc has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
m8 has quit [Quit: Sto andando via]
chouhoul_ has joined #ruby
EllisTAA has joined #ruby
bruno-_ has quit [Ping timeout: 250 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<EllisTAA>
when i run this method i get a collection of objects back, but i only want the first object, i tried putting the object in an array and calling .first but that didn’t work