bentanweihao has quit [Read error: Connection reset by peer]
maletor has joined #ruby
maletor has quit [Client Quit]
stamina has quit [Ping timeout: 272 seconds]
A124 has quit [Read error: Connection reset by peer]
SHyx0rmZ has joined #ruby
ericjphillips has joined #ruby
benlieb has joined #ruby
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BTRE has joined #ruby
ryanlntn has quit [Ping timeout: 240 seconds]
A124 has joined #ruby
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cmoneylulz has quit [Remote host closed the connection]
voltalio has joined #ruby
jun has joined #ruby
benlieb has quit [Quit: benlieb]
lukaszk has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
Brin has quit [Quit: Page closed]
djbkd has quit [Ping timeout: 268 seconds]
Guest65 has joined #ruby
Puffball has quit [Remote host closed the connection]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
Guest26447 has quit [Changing host]
Guest26447 has joined #ruby
Guest26447 is now known as nitrix
DenSchub has quit [Read error: Connection reset by peer]
fedexo has joined #ruby
bigmac_ has quit [Ping timeout: 244 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
bigmac_ has joined #ruby
DenSchub has joined #ruby
Akagi201 has quit []
casadei has quit [Remote host closed the connection]
ericjphillips has quit [Quit: Leaving.]
n008f4g_ has joined #ruby
j4cknewt has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dasher00 has quit [Ping timeout: 250 seconds]
n008f4g_ has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
karapetyan has joined #ruby
Rickmasta has joined #ruby
moeabdol has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solocshaw has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Max SendQ exceeded]
karapetyan has quit [Ping timeout: 268 seconds]
Rickmasta has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Beoran_ has joined #ruby
maikowblue has quit [Quit: .]
solocshaw has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
bentanwe_ has quit []
Beoran has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
M-prosodyContext has quit [Remote host closed the connection]
M-Kodo has quit [Remote host closed the connection]
M-mistake has quit [Remote host closed the connection]
swgillespie has joined #ruby
ant2k has joined #ruby
RegulationD has quit [Ping timeout: 268 seconds]
natevick has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
natevick has quit [Client Quit]
Tempesta has joined #ruby
gener1c_ has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nateberkopec has quit [Quit: Leaving...]
M-Kodo has joined #ruby
gener1c has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
zenguy_pc has quit [Read error: Connection reset by peer]
braincras has joined #ruby
tomchapin has joined #ruby
psy_ has joined #ruby
charliesome has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jun has quit [Remote host closed the connection]
djbkd has joined #ruby
hahuang65 has joined #ruby
blizzy has quit [Ping timeout: 255 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
M-mistake has joined #ruby
M-prosodyContext has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
bmurt has quit []
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenguy_pc has joined #ruby
darkf has joined #ruby
amystephen has quit [Quit: amystephen]
gix has quit [Ping timeout: 265 seconds]
sdothum has joined #ruby
favadi has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gix has joined #ruby
<pontiki>
zenspider: stupid question on minitest (i'm just starting in to learn it from scratch): by convention, should the test file names be `test_*.rb` or `*_test.rb` ? I know it doesn't matter in the end, but what is the convention, if any?
baweaver has joined #ruby
<pontiki>
reason i ask is `bundler gem xxx` makes `xxx_test.rb` but guard-minitest expects `test_xxx.rb`
sjums has left #ruby [#ruby]
riskish has joined #ruby
Rickmasta has joined #ruby
devoldmx has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 268 seconds]
bronson has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
opensource_ninja has joined #ruby
lemur has joined #ruby
stardiviner has joined #ruby
blizzy has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Matadoer has quit [Ping timeout: 265 seconds]
fastAndSlow has quit [Quit: leaving]
davedev2_ has joined #ruby
ledestin has joined #ruby
ryanlntn has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 240 seconds]
lemur has quit [Ping timeout: 260 seconds]
roxtrongo has joined #ruby
ryanlntn has left #ruby [#ruby]
roxtrong_ has joined #ruby
blizzy has quit [Read error: Connection reset by peer]
aNoble has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Ping timeout: 264 seconds]
blizzy has joined #ruby
fullofcaffeine has joined #ruby
dopie has quit [Quit: Leaving]
I has joined #ruby
I is now known as Guest45689
aNoble has quit [Quit: aNoble]
Guest45689 has quit [Client Quit]
blizzy has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
j4cknewt has quit [Remote host closed the connection]
swgillespie has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 252 seconds]
krz has joined #ruby
swgillespie has quit [Client Quit]
houhoulis has quit [Remote host closed the connection]
swgillespie has joined #ruby
j4cknewt has joined #ruby
favadi has quit [Ping timeout: 246 seconds]
agent_white has joined #ruby
<agent_white>
Evenin' folks
shinnya has quit [Ping timeout: 256 seconds]
dopie has joined #ruby
favadi has joined #ruby
djbkd_ has joined #ruby
djbkd_ has quit [Remote host closed the connection]
devoldmx has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
hi agent_white
<agent_white>
pontiki: Heya! How goes it?
freezevee has joined #ruby
Rickmasta has joined #ruby
<pontiki>
not too bad
favadi has quit [Read error: No route to host]
hahuang65 has quit [Ping timeout: 246 seconds]
fullofcaffeine has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
ryanlntn has joined #ruby
ryanlntn has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
robbyoconnor has quit [Quit: Konversation terminated!]
<pontiki>
hi
renderfu_ has joined #ruby
<A124>
Hello. Anyway.. Q: Database recommendation for tens of millions of records? Could be key-value, document, or table. Only one client needed.
freerobby has quit [Quit: Leaving.]
theery has joined #ruby
<thejamespinto>
hey guys, long time I havent' been here... do you all still hate Rails like you used to back in my day? :P
<baweaver>
pontiki: alo
<pontiki>
i work in Rails p.much every day. i love it.
<pontiki>
hey, baweaver
<mozzarella>
I like it
<baweaver>
A124: MySQL works fine
<A124>
I dont hate Rails. Why would one hate Rails? Depending for situation its a nice thing to have.
bruno- has joined #ruby
<A124>
baweaver Any other recommendations? I am not fan of that :D
<baweaver>
PostgreSQL
<pontiki>
some people need controversy
<pontiki>
Oracle
<baweaver>
unless you _need_ NoSQL I wouldn't
<pontiki>
Sybase
<baweaver>
MariaDB :trollface:
<A124>
What cuold be a reason to need NoSQL?
allomov has quit [Remote host closed the connection]
<baweaver>
If you don't know, don't use it.
roxtrong_ has quit [Remote host closed the connection]
<A124>
I already did.
<A124>
I asked to have opinion from someone else.
<baweaver>
The trade off is that you get parts of structure ripped out for speed
<baweaver>
it really depends on the data though
renderfu_ has quit [Ping timeout: 256 seconds]
<baweaver>
10mil+ isn't that many.
jun has joined #ruby
<baweaver>
If it's relational and you're going to ad-hoc that back on, it's a very bad idea until you hit a scale where that matters.
<baweaver>
by which point you can hire people to migrate it.
roxtrongo has joined #ruby
bronson has joined #ruby
<baweaver>
Saying you have 10M+ records and asking for a database is like asking what food to feed 10M+ animals
<A124>
10 mil is just the start.
<baweaver>
if we don't know what type of data it is, any recommendation is pointless.
<A124>
Combined.
tagrudev has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<A124>
Maybe I should use multple data storages then.
bruno- has quit [Ping timeout: 268 seconds]
<baweaver>
So I have 10M+ Chimeras then
<baweaver>
what are you dealing with?
<baweaver>
vague questions will get equally vague and frustrating answers
<A124>
Not frustrating by any means, I did actually look for broad answers.
<A124>
Research and content retrival/serving.
<baweaver>
Is it in any way relational?
<baweaver>
If so, use PostgreSQL
<A124>
Both data storage for linear runs as well as random lookups by key. And the usable outputs to be used for serving could be relational indeed.
joufflu has quit [Ping timeout: 240 seconds]
<bnagy>
I feel like if you're in the 10s of millions postgres is less likely to be a mistake than a nosql
jto has quit [Quit: leaving]
nofxx has quit [Ping timeout: 250 seconds]
<baweaver>
when we're talking billions to trillions you're getting there.
bronson has quit [Ping timeout: 240 seconds]
allcentu1 has quit [Quit: WeeChat 1.2]
ndrei has joined #ruby
<baweaver>
at that scale though you really need to hire someone trained in that type of thing.
bluOxigen has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<A124>
Hmm... Well.. back in 2008 I had a plan. ... did not meet the support at all and... then was a personal failure of self. Today, many years forward this looks simple at the rate I wanted to start, but as the data grows by years, things change too.
rushed has quit [Ping timeout: 260 seconds]
<bnagy>
yes.
<A124>
Reachieng billions no biggie. I do not at the present moment percieve going trillions though. At that point, yes you were right. But never thought of looking for someone to deal with billions.
last_staff has joined #ruby
rushed has joined #ruby
dionysus69 has joined #ruby
<A124>
Thanks for the idea. Its not that much and as its mostly research its not realtime critical, and if it is, one can split the data by a "connector" feed to a separate system that gets updated by duplicating flow based on condition.
<A124>
Ok. PostgreSQL it is then. Could you also recommend a NoSQL?
<A124>
I have actually that page open atm.
<baweaver>
Not MongoDB
anisha has joined #ruby
<A124>
Haha, thanks. I already used it. Seems neat.
<A124>
For small scales stuff.
<baweaver>
Ask BitCoin how they liked it some time.
<A124>
But seemed to lack at more. I was there when Mongo and Avocado (today known as Arango) was born.
<baweaver>
and why atomic operations are a big deal
<A124>
Yeah, I know myself a lot about atomicity.
<baweaver>
something about exfiltrating millions in bitcoin due to Mongo sucking with atomic ops and locking
<A124>
Wow.
<A124>
Thanks for pointer :D
<A124>
Yeah, I think I could relate a nosql key-value storage, with sql by a key, or using object oriented. Which leads me to conclusion to seek three database things/layers and look how it comes out.
<A124>
Bumped into HyperTable. Could be suited for a hybrid storage of large data at some point of time.
Anti-Pizza has left #ruby ["Leaving"]
<A124>
Ok. Thank you very much for input, this helped a lot in decisions. If anyone would like to recommend any more, will appreciate.
radgeRayden_ has quit [Quit: Leaving]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<A124>
" No matter how many features we ever add, we can never be better at being Oracle than Oracle can." Well said.
konsolebox has quit [Max SendQ exceeded]
<A124>
Thank you. I did not see this stuff for a shile so had no idea it has.
konsolebox has joined #ruby
<A124>
If I can leverage json and give client data as it is stored minus internal "columns", that could speed up a lot.
naftilos76 has joined #ruby
<atmosx>
yeap
howdoi has joined #ruby
FrankD has quit [Ping timeout: 244 seconds]
slaytor has quit []
j4cknewt has joined #ruby
konsolebox has quit [Max SendQ exceeded]
pontiki has quit [Remote host closed the connection]
pontiki has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
nofxx has quit [Ping timeout: 264 seconds]
agent_white has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
blaxter has joined #ruby
theery has quit [Remote host closed the connection]
blackmesa has joined #ruby
agent_white has joined #ruby
blizzy has joined #ruby
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
arup_r has joined #ruby
maokomioko has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
firstdayonthejob has joined #ruby
Macaveli has joined #ruby
blizzy has quit [Read error: Connection reset by peer]
sanjayu has joined #ruby
aganov has joined #ruby
konsolebox has joined #ruby
blizzy has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
Ilyes512 has joined #ruby
banjara has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
slayerjain has joined #ruby
bronson has joined #ruby
konsolebox has quit [Max SendQ exceeded]
ndrei has joined #ruby
konsolebox has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
araujo_ has quit [Quit: Leaving]
Xeago has joined #ruby
araujo has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
naftilos76 has quit [Ping timeout: 252 seconds]
iamninja_ has quit [Read error: Connection reset by peer]
nfk|laptop has joined #ruby
moeabdol has joined #ruby
iamninja_ has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
slayerja_ has joined #ruby
ruurd has joined #ruby
slayerja_ has quit [Max SendQ exceeded]
RegulationD has joined #ruby
slayerjain has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
spider-mario has quit [Read error: Connection reset by peer]
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
nofxx has quit [Ping timeout: 246 seconds]
nofxx has joined #ruby
slayerjain has joined #ruby
timonv has quit [Ping timeout: 244 seconds]
symm- has joined #ruby
cih has joined #ruby
solars has joined #ruby
<tejasmanohar>
!books
<tejasmanohar>
~books
<tejasmanohar>
~~books
<tejasmanohar>
recommended books?
rushed has quit [Quit: rushed]
dikaio has quit [Quit: ........]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Oka has quit [Quit: o/]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
slayerja_ has joined #ruby
stan has joined #ruby
NightMonkey has quit [Ping timeout: 255 seconds]
bubbys has quit [Ping timeout: 265 seconds]
slayerjain has quit [Ping timeout: 264 seconds]
bubbys has joined #ruby
NightMonkey has joined #ruby
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
SCHAAP137 has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
pragmatism has joined #ruby
blackmesa has joined #ruby
<arup_r>
You want Rails/Ruby book ? If Ruby well grounded Rubyist
solocshaw has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
<arup_r>
tejasmanohar: ^^
solocshaw has joined #ruby
<tejasmanohar>
got it!
pragmatism has quit [Client Quit]
platzhirsch has quit [Ping timeout: 240 seconds]
banjara has quit [Quit: Leaving.]
astrobun_ has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
peteykun has quit [Ping timeout: 252 seconds]
pawnbox_ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
pawnbox has joined #ruby
Balzrael has joined #ruby
pragmatism has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
jun has quit []
karapetyan has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
Xeago has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
naftilos76 has joined #ruby
_joes_ has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
Ilyes512 has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
platzhirsch has joined #ruby
Pisuke has joined #ruby
ta has quit [Remote host closed the connection]
konsolebox has quit [Ping timeout: 240 seconds]
j4cknewt has quit []
MyMind has quit [Ping timeout: 244 seconds]
lolmaus_ has joined #ruby
jud has quit [Quit: Leaving]
ndrei has joined #ruby
Burgestrand has joined #ruby
funkenstrahlen has joined #ruby
<funkenstrahlen>
hey, I want to call a CLI command from my ruby code. I want to see the output of the cli command when running the ruby script. Should I use system() or exec()?
freezevee has joined #ruby
<Burgestrand>
funkenstrahlen: do you just want to see the output, or do you want to do something with it in ruby code afterwards?
<apeiros>
funkenstrahlen: exec will replace your current process, so probably you don't want that :)
bronson has joined #ruby
TheHodge has joined #ruby
<funkenstrahlen>
Burgestrand: just see the outout. simply true/false as return value is ok
<Burgestrand>
funkenstrahlen: in that case #system should be just fine.
<funkenstrahlen>
Burgestrand: want to call ffmpeg
<funkenstrahlen>
Burgestrand: ok thanks
<Burgestrand>
funkenstrahlen: if you pass in user-provided data in your command, do call system with multiple parameters, e.g. system("ffmpeg", "-i", user_provided_path)
Stalkr_ has joined #ruby
<funkenstrahlen>
Burgestrand: why?
<funkenstrahlen>
Burgestrand: cant I simply do system ("some command")
<funkenstrahlen>
with all the parameters in the string
<funkenstrahlen>
ffmpeg has a lot of parameters...
pawnbox has joined #ruby
<Burgestrand>
funkenstrahlen: Yes, you can, but if you interpolate user-provided data they might provide something akin to: "; rm -rf /"
<Burgestrand>
funkenstrahlen: If it's all just the same parameters every time (no variables, no string interpolation) then feel free to call it with just a single string.
<funkenstrahlen>
Burgestrand: ok got it. in my case it is not user provided, but it is more safe to do it your way
abuzze has joined #ruby
<funkenstrahlen>
thanks for the hint
<Burgestrand>
funkenstrahlen: You can put your parameters in an array, e.g.: command = []; command << "ffmpeg"; command << "-f"; system(*command)
<freezevee>
how do I include more strings when filtering with regex ? output(/hello/).to_stdout and I want to include "hello", "world", "!!"
bronson has quit [Ping timeout: 255 seconds]
<freezevee>
[hello,world,!!] does not work
<Burgestrand>
freezevee: I don't understand your question, could you rephrase?
<freezevee>
Burgestrand: how do you find certain string in a phrase/string
<Burgestrand>
freezevee: that's a way that you could write your regex to match all three things, then there's different ways of using the regex, i.e.: "this is a string" =~ /is/
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<freezevee>
no I want to match all of them
araujo_ has joined #ruby
baweaver has quit [Remote host closed the connection]
qwertme has quit [Client Quit]
<bougyman>
i'm going crazy over a gem install
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman>
we're in an env with no network access to the outside, and I can't figure out how to get gems installed.
<bougyman>
gem i --force --local /path/to/the.gem just hangs forever.
Stalkr_ has quit [Quit: Leaving...]
<bougyman>
looking at the process trace, it's trying to find an http rubygems source
<funkenstrahlen>
Burgestrand: does it have to be a string only cmd array?
<bougyman>
even when I turn all the network interfaces off.
<apeiros>
bougyman: -y?
<apeiros>
so it doesn't try to install dependencies
<funkenstrahlen>
Burgestrand: or can I pass integers to it too?
<bougyman>
is there some option to gem to say "do not fucking touch the network you idiot" ?
<Burgestrand>
funkenstrahlen: maybe, try it :)
<bougyman>
apeiros: i have all the deps.
<Burgestrand>
>> system("echo", 5)
<ruboto>
Burgestrand # => no implicit conversion of Fixnum into String (TypeError) ...check link for more (https://eval.in/440478)
<Burgestrand>
funkenstrahlen: looks like it has to be strings!
Mia has joined #ruby
Mia has joined #ruby
<bougyman>
-y is not a valid option, apeiros
<apeiros>
oh, seems that option changed anyway (or I misremember)
kalusn has joined #ruby
<apeiros>
your -f/--force seems to do that now
<Burgestrand>
bougyman: does it have dependencies that might be attempted to be retrieved from elsewhere?
<Burgestrand>
bougyman: (just a thought)
<bougyman>
apeiros: it seems to not do it.
araujo has quit [Ping timeout: 260 seconds]
<bougyman>
Burgestrand: nope.
<bougyman>
i'm using gem install --local --force ./the.gem
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman>
i've never even had to use --local nor --force before to install a gem from the disk
<bougyman>
this is driving me batty.
Axy has joined #ruby
<Burgestrand>
bougyman: maybe you could try to remove all sources as well, which'd remove the https-lookup?
platzhirsch has quit [Ping timeout: 265 seconds]
<bougyman>
ok.
<Burgestrand>
bougyman: --clear-sources or --source or something. might be a workaround.
Zai00 has joined #ruby
maokomioko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
Greetings, humans
<funkenstrahlen>
exit
funkenstrahlen has left #ruby ["WeeChat 1.1.1"]
<bougyman>
Burgestrand: yep, that worked, you're an angel, thank you.
Hounddog has joined #ruby
<Burgestrand>
bougyman: yippee. :)
Mia has quit [Ping timeout: 255 seconds]
AlphaAtom has joined #ruby
tomphp has joined #ruby
kalusn has quit [Remote host closed the connection]
agit0 has joined #ruby
thejamespinto is now known as yakko
yakko is now known as thejamespinto
parduse has quit [Ping timeout: 246 seconds]
kalusn has joined #ruby
parduse has joined #ruby
abuzze has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<babysnoop>
hi, anybody familiar with the paperclip gem? Im validating image uploads as described in https://github.com/thoughtbot/paperclip#security-validations . the issue i am having is that when uploading non-image files renamed to "file.jpeg", my rails sever struggles terribly for about 30 seconds. thanks
pawnbox has quit [Read error: Connection reset by peer]
pyon has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
rodfersou has joined #ruby
keen___________ has joined #ruby
keen__________ has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
ericjphillips has quit [Quit: Leaving.]
pyon has quit [Remote host closed the connection]
pawnbox has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
Pathfinder has quit [Ping timeout: 240 seconds]
RaceCondition has joined #ruby
RaceCondition has left #ruby [#ruby]
tcopeland has quit [Quit: Leaving.]
RegulationD has quit [Ping timeout: 268 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
mjuszczak has joined #ruby
scripore has joined #ruby
peteykun has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Remote host closed the connection]
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
Ilyes512 has joined #ruby
scripore has quit [Client Quit]
Pathfinder has joined #ruby
kljadfs has joined #ruby
pyon has joined #ruby
gustav__ has joined #ruby
devoldmx has joined #ruby
moeabdol has joined #ruby
Anti-Pizza has joined #ruby
kljadfs has quit [Client Quit]
FernandoBasso has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
moeabdol has quit [Ping timeout: 252 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdothum has joined #ruby
babysnoop has quit [Ping timeout: 240 seconds]
platzhirsch has quit [Ping timeout: 265 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Read error: Connection reset by peer]
ghoti has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
Igorshp has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
Macaveli has joined #ruby
skade has joined #ruby
Voker57 has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
Pathfinder has quit [Ping timeout: 255 seconds]
platzhirsch has joined #ruby
blackmesa has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ghoti has joined #ruby
DoubleMalt has quit [Ping timeout: 256 seconds]
cajone has quit [Remote host closed the connection]
southpawlar has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Ping timeout: 240 seconds]
syath has joined #ruby
niKeITA has quit [Quit: Textual]
jcromartie has quit [Read error: Connection reset by peer]
cajone has joined #ruby
charliesome has joined #ruby
Hounddog has quit [Remote host closed the connection]
gustav__ has quit [Remote host closed the connection]
ericjphillips has joined #ruby
symm- has quit [Ping timeout: 256 seconds]
kalusn has quit [Remote host closed the connection]
dasher00 has quit [Ping timeout: 264 seconds]
ruurd has joined #ruby
karapetyan has joined #ruby
but3k4 has joined #ruby
kalusn has joined #ruby
platzhirsch has quit [Ping timeout: 244 seconds]
krz has quit [Quit: WeeChat 1.2]
ldnunes has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has quit []
southpawlar has joined #ruby
platzhirsch has joined #ruby
Kallis has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
renderful has joined #ruby
kalusn has quit [Ping timeout: 264 seconds]
pawnbox has quit [Read error: Connection reset by peer]
babysnoop has joined #ruby
Ramsek has joined #ruby
southpawlar has quit [Ping timeout: 255 seconds]
atomical has joined #ruby
<Ramsek>
hi all , i have a error while i download ruby-1.8.7-p374
renderful has quit [Ping timeout: 250 seconds]
d10n-work has joined #ruby
A124 has quit [Disconnected by services]
A124 has joined #ruby
<apeiros>
is it a "zombie resurrection failed" error?
<Guest490>
yorickpeterse: I read that. Can you provide a simple definition for what a thread is? Is it like a sub-program inside a ruby program?
<yorickpeterse>
The wikipedia page explains exactly what it is
<yorickpeterse>
"In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system."
<yorickpeterse>
Not sure what's so dense about that
<yorickpeterse>
it's literally what it is
<_el_fer_>
"Threads", a Season 8 Stargate SG-1 episode
gusTester has joined #ruby
pawnbox_ has joined #ruby
terlar has quit [Quit: WeeChat 1.3]
lolmaus has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
<Guest490>
yorickpeterse: When I write a ruby program, is that called the "main thread"?
p0wn3d has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
nateberkopec has joined #ruby
blaxter has quit [Quit: foo]
Macaveli has joined #ruby
<apeiros>
Guest490: if you don't create any threads, all your code runs in the main thread, yes
chipotle has quit [Quit: cheerio]
prestorium has joined #ruby
emilkarl has quit [Quit: emilkarl]
<Guest490>
apeiros: And if I create threads, the threads run alongside the main thread. And if the main thread ends, the created threads also end. Correct?
Burgestrand has quit []
mjuszczak has joined #ruby
<apeiros>
kinda. the other threads will be terminated. i.e. the main thread won't wait (without you telling it to) for other threads to end
<apeiros>
(referring to "when the main thread ends")
<Guest490>
apeiros: and the main thread always runs to completion but the created ones dont?
asxbr has joined #ruby
<apeiros>
the main thread ending means your program terminates
mjuszczak has quit [Client Quit]
<[k->
when an uncaught exception is raised
<[k->
exit is called
<[k->
abort is called
<[k->
or by any other means
<apeiros>
or the code simply reaches its end
ledestin has quit [Ping timeout: 252 seconds]
evanjs has quit [Remote host closed the connection]
nsuke has quit [Remote host closed the connection]
kalusn has joined #ruby
southpawlar has quit [Ping timeout: 250 seconds]
_el_fer_ has joined #ruby
bronson has joined #ruby
guest_____ has joined #ruby
<darix>
see also fibers, coroutines
<guest_____>
"You can wait for a particular thread to finish by calling that thread's Thread.join method. The calling thread will block until the given thread is finished." What does block mean here?
<[k->
block means to suspend the thread such that it cannot proceed to it's next instruction, for a period of time
RegulationD has joined #ruby
Hydro-x1 has joined #ruby
<Hydro-x1>
b Hello gays
<Hydro-x1>
Oh sorry Hello Guys
<yorickpeterse>
interesting way of making an entrance
<[k->
interesting autocorrect?
<shevy>
interesting evil intent
<guest_____>
<[k->: Why does it say "will block" instead of "will be blocked"?
dasher00 has joined #ruby
jzigmund_ has joined #ruby
<shevy>
guest_____ it might block the main thread
<shevy>
I have that with ruby-gtk where I can freeze the parent widget when doing things :D
dstarh has joined #ruby
<shevy>
which is annoying because you can then no longer click on anything in the main widget
bronson has quit [Ping timeout: 264 seconds]
<guest_____>
is the calling thread the main thread?
moeabdol has joined #ruby
jzigmund has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 240 seconds]
peteykun has quit [Ping timeout: 240 seconds]
dasher00 has quit [Ping timeout: 240 seconds]
guest_____ has quit [Quit: Page closed]
<[k->
no
beauby has joined #ruby
jzigmund_ has quit [Ping timeout: 250 seconds]
Igorshp has quit [Remote host closed the connection]
<[k->
it means the thread that called join
kobain has joined #ruby
<[k->
Thread.join, that is
favadi has joined #ruby
moeabdol has quit [Ping timeout: 268 seconds]
phutchins1 has joined #ruby
Igorshp has joined #ruby
slayerjain has joined #ruby
jzigmund has joined #ruby
southpawlar has joined #ruby
Igorshp has quit [Remote host closed the connection]
arup_r_ has quit [Remote host closed the connection]
slayerja_ has quit [Ping timeout: 265 seconds]
bmurt has joined #ruby
sgambino has joined #ruby
dorei has joined #ruby
dhjondoh has joined #ruby
slayerjain has quit [Max SendQ exceeded]
JDiPierro has joined #ruby
slayerjain has joined #ruby
victortyau has joined #ruby
dhjondoh has quit [Client Quit]
Xeago has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
dhjondoh has joined #ruby
Hydro-x1 has quit []
devoldmx has joined #ruby
dhjondoh has quit [Client Quit]
moeabdol has joined #ruby
peteykun has joined #ruby
<[k->
" "" """ """" """"" Ox0dea
<[k->
where has Ox0dea gone?
dasher00 has joined #ruby
dhjondoh has joined #ruby
dasher00 has quit [Max SendQ exceeded]
lkba_ has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 264 seconds]
dasher00 has joined #ruby
bayed has joined #ruby
dasher00 has quit [Max SendQ exceeded]
_el_fer_ has quit [Quit: Leaving]
slayerjain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dasher00 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
InternetFriend has joined #ruby
dasher00 has quit [Max SendQ exceeded]
jmignault has joined #ruby
slayerjain has joined #ruby
renderful has joined #ruby
inteq has quit [Read error: Connection reset by peer]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
Burgestrand has quit []
dasher00 has joined #ruby
dasher00 has quit [Max SendQ exceeded]
shpoont has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
timonv has quit [Ping timeout: 268 seconds]
dasher00 has joined #ruby
to_json has joined #ruby
gustav__ has quit [Remote host closed the connection]
Igorshp has joined #ruby
dasher00 has quit [Max SendQ exceeded]
WizJin has quit [Remote host closed the connection]
dasher00 has joined #ruby
<shevy>
eaten by a crocodile
dasher00 has quit [Max SendQ exceeded]
<shevy>
sevenseacat is also missing
<shevy>
WE ARE LOSING ZE PEOPLES!!!
<adaedra>
People come, people go
ItSANgo has quit [Quit: Leaving...]
<adaedra>
It's the circle of liiiiiiiiife ♪
<[k->
WE ARE LOSING THE SHEVY TO THE MENTAL
prestorium_ has joined #ruby
Psi-Jack has joined #ruby
Kendos-Kenlen has joined #ruby
dasher00 has joined #ruby
dasher00 has quit [Max SendQ exceeded]
<yorickpeterse>
they already were mental
dasher00 has joined #ruby
dasher00 has quit [Max SendQ exceeded]
_el_fer_ has joined #ruby
ndrei has joined #ruby
Jardayn has joined #ruby
gustav__ has joined #ruby
jmignault has quit [Ping timeout: 256 seconds]
dasher00 has joined #ruby
prestorium has quit [Ping timeout: 250 seconds]
`tim` has joined #ruby
SenpaiSilver has quit [Ping timeout: 240 seconds]
dasher00 has quit [Max SendQ exceeded]
<[k->
zeeeeeeeeeee
<[k->
no one knows where they have gone :(
dasher00 has joined #ruby
hod0r has quit [Quit: Leaving]
dasher00 has quit [Max SendQ exceeded]
mhib has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
babysnoop has quit [Remote host closed the connection]
<shevy>
lost forever
dasher00 has joined #ruby
dopie has quit [Ping timeout: 244 seconds]
dhjondoh has quit [Quit: dhjondoh]
djcp has joined #ruby
piotrj has quit [Remote host closed the connection]
_el_fer_ has quit [Read error: Connection reset by peer]
spcmastertim has joined #ruby
malconis has joined #ruby
<[k->
like your face!
Xeago has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
kp666 has quit [Read error: Connection reset by peer]
<bazbing81>
so then
whippythellama has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<bazbing81>
is there a method for finding the closest match to a string in an array of strings? ['ab,'abb','zx'].closest_to 'abba' #=> 1 or 'abb'
<apeiros>
bazbing81: do you already have an algorithm to determine "closeness" of two strings?
Xeago has joined #ruby
blackmesa has joined #ruby
icbm has quit [Quit: Computer sleeping]
<[k->
this is obviously a case of levenshtein distance
<bazbing81>
apeiros: nope, going to make one myself. should be easy and fun, just wondering if ruby already does it. Maybe that example's a little off. I'm looking more for google's autofill type usage
piotrj has joined #ruby
<[k->
compute the difference, and grab the one with the lowest difference
jdawgaz has joined #ruby
<apeiros>
no, ruby has no methods for string closeness
Anti-Pizza has quit [Quit: Quit]
<bazbing81>
[k-: indeed :)
karapetyan has joined #ruby
<bazbing81>
okay kewl, I shall compute away
<apeiros>
Enumerable#min_by once you have your method
pawnbox_ has quit [Read error: Connection reset by peer]
<bazbing81>
apeiros: thanks for the hint!
JDiPierro has quit [Remote host closed the connection]
voltalio has joined #ruby
dasher00 has quit [Ping timeout: 264 seconds]
joonty has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 252 seconds]
voltalio has quit [Max SendQ exceeded]
decoponyo has joined #ruby
joonty has joined #ruby
voltalio has joined #ruby
<southpawlar>
Hello guys
Xeago has quit [Remote host closed the connection]
<southpawlar>
Do frameworks like Ruboto and RubyMotion have any performance issues as compared to coding in native Java
<yottanami>
but I got this error /home/yottanami/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/http/generic_request.rb:182:in `send_request_with_body': undefined method `bytesize' for {:receiver=>"XXXXXX", :text=>"Sample Text"}:Hash (NoMethodError)
Jardayn has quit [Quit: Leaving]
timonv has joined #ruby
Igorshp has quit [Remote host closed the connection]
_el_fer_ has joined #ruby
pawnbox has joined #ruby
prestorium_ is now known as prestorium
dionysus69 has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
southpawlar has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
krz has joined #ruby
decoponio has joined #ruby
<apeiros>
yottanami: sounds to me (without looking at the API) like the body is expected to be a string
ItSANgo has joined #ruby
dionysus69 has joined #ruby
<yottanami>
apeiros, I changed body to URI.encode_www_form(body) and it works now
bronson has joined #ruby
bkxd has joined #ruby
dasher00 has joined #ruby
lkba has joined #ruby
dhollinger has joined #ruby
RTG` has quit []
Beoran_ has quit [Remote host closed the connection]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timonv has quit [Quit: WeeChat 1.3]
tagrudev has quit [Remote host closed the connection]
slayerjain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
agit0 has quit [Quit: Leaving]
blaxter has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nfk|laptop has quit [Quit: yawn]
NeverDie has quit [Ping timeout: 250 seconds]
gustav__ has quit [Remote host closed the connection]
JDiPierro has joined #ruby
paulcsmith has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
favadi has joined #ruby
<goncalo>
/wi/win 2
Igorshp has quit [Remote host closed the connection]
favadi has quit [Max SendQ exceeded]
Xeago has joined #ruby
umgrosscol has joined #ruby
gustav__ has joined #ruby
RegulationD has joined #ruby
Igorshp has joined #ruby
cornerma1 has joined #ruby
bigbadbear has joined #ruby
prefixed has joined #ruby
bluOxigen has quit []
keen____________ has joined #ruby
j2k_ has quit [Ping timeout: 240 seconds]
mike___1234 has quit [Quit: Leaving]
nopc0de has joined #ruby
freerobby has joined #ruby
Ilyes512 has joined #ruby
gustav__ has quit [Remote host closed the connection]
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
gustav__ has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
tk__ has quit [Quit: ばいばい]
keen___________ has quit [Ping timeout: 244 seconds]
hal_9000 has joined #ruby
<bazbing80>
is there some kind of escaped string that means "delete"? And is there one for "enter"? I want to detect when these keys are pressed like puts "delete key pressed!" if input == "\eCODE_FOR_DELETE_KEY"
Gnomethrower is now known as GT|away
<bazbing80>
I've tried to log it but my terminal doesn't recognize the char :P
<adaedra>
man ascii for characters codes, but you should not be able to catch them in default mode.
bazbing81 has quit [Quit: leaving]
Xeago has quit [Ping timeout: 252 seconds]
<adaedra>
Look for a terminal manipulation gem.
<shevy>
did this not come up yesterday too
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has joined #ruby
<[k->
your face came up yesterday too
<shevy>
bazbing80 enter will equate to "\n", I don't think you can capture the raw codes such as via xev
<adaedra>
If only your study time would come.
<adaedra>
shevy: xev captures X codes, not terminal ones.
<shevy>
ah yes
icbm has joined #ruby
govg has joined #ruby
<adaedra>
But yes, you can setup the terminal to send you all keys.
mello has quit [Quit: Lost terminal]
<eam>
the terminal needs to be put in raw mode
<eam>
in "cooked" mode, the line editing is handled by the kernel, before the data is returned to ruby
<eam>
bazbing80: there are gems that do this for you
Zarthus has quit [Quit: ZNC 1.7.x-git-196-5faaf67 - http://znc.in]
<bazbing80>
eam: yeah I'm looking...google thinks I'm trying to find out how to delete keys from hashes
<bazbing80>
silly google
funkenstrahlen has joined #ruby
<funkenstrahlen>
hey, I have to set an expire_date for a connection. How can I do expire_date = Time.now + 2.hours?
bruno- has joined #ruby
chrissonar has quit [Remote host closed the connection]
Zarthus has joined #ruby
gustav__ has quit [Remote host closed the connection]
<apeiros>
crayfishx: that gives an integer, though, not a Time
<crayfishx>
apeiros: convert it back from integer if you need to
<apeiros>
crayfishx: if you love roundtrips… there's no point to it, though. as said, Time#+ a) exists and b) works with seconds
<eam>
bazbing80: if you just want to mess around: ruby -e'begin system "stty raw"; x = STDIN.getc; ensure system "stty sane"; end; puts "got: #{x.ord}"'
renderful has quit [Remote host closed the connection]
dopie has joined #ruby
peteykun has quit [Ping timeout: 264 seconds]
<apeiros>
require 'io/console', allows you to do it without system()
<eam>
ah, is that where the ioctls are hiding?
<bazbing80>
eam: thanks, I was thinking how you put a terminal in raw mode manually
<apeiros>
eam: only a small subset I think
<apeiros>
stuff like IO#noecho, #raw etc.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<funkenstrahlen>
apeiros: how is the syntax for Time#+ ?
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
if you have a better proposition of how to handle that, apeiros
hashrocket has joined #ruby
<apeiros>
adaedra: you want an @ because you treat everything without as an item to look up, right?
<bazbing80>
eam: yeah I'll check that out...urgh this is embarrassing, I can't find a gem for capturing raw input :(
Jardayn has joined #ruby
<adaedra>
apeiros: yes, so you can lookup String even if someone is named String.
<adaedra>
and you can, well, &ri String @String :)
<apeiros>
mhm, thought so
<bazbing80>
Something captures letter and number characters normally but delete keys and enter keys and everything are captured raw...trying to find such a gem
<bazbing80>
*something that
nfk has joined #ruby
Igorshp has quit [Remote host closed the connection]
jdawgaz has joined #ruby
<apeiros>
adaedra: not sure. I'm usually a fan of being explicit. but might be more intuitive to always handle last argument (in case of >1 arg & arg being an existing nick) as "address person with this nick"
mhib has quit [Ping timeout: 244 seconds]
lkba has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 272 seconds]
<adaedra>
That means checking against nick list at each &ri request >1 arg, tho.
govg has quit [Ping timeout: 240 seconds]
stardiviner has quit [Ping timeout: 255 seconds]
Igorshp has joined #ruby
<shevy>
it scares me what kind of old knowledge eam possesses
ndrei has joined #ruby
dfockler has joined #ruby
lkba has joined #ruby
govg has joined #ruby
slayerjain has joined #ruby
drptbl_ has joined #ruby
<shevy>
he must have learned that through perl
evanjs has joined #ruby
pawnbox_ has joined #ruby
drptbl has quit [Ping timeout: 265 seconds]
<eam>
bazbing80: well, letters and numbers still work like normal in raw mode
<apeiros>
adaedra: afaik in cinch it's a hash lookup, so it's O(1), not really a performance issue
<apeiros>
(and in butler it's guaranteed to be a hash lookup)
mbff has joined #ruby
<adaedra>
ah, can be possible then. The question is should I, as the @ form is still more explicit.
<shevy>
good old butler
<mbff>
Hello! Has anyone used mina for deployments before?
<apeiros>
bazbing80: curses/ncurses are the traditional gems for that kind of stuff iirc
DroidBurgundy has joined #ruby
<apeiros>
mbff: no, nobody ever
<apeiros>
?anyone mbff
<ruboto>
mbff, Just ask your question, if anyone has or can, they will respond.
cih_ has joined #ruby
<apeiros>
adaedra: sure it's more explicit. but how often will it happen that your last lookup also matches a nickname?
pawnbox has quit [Ping timeout: 250 seconds]
stardiviner has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
minimalism has joined #ruby
Rickmasta has joined #ruby
<mbff>
Alright, so I am using mina for deployments and I am trying to get the npm:install to function correctly. Right now it can't find the modules that need to be installed.
<bazbing80>
eam: hmm..maybe I'll just put it raw mode myself like you showed me
skade has quit [Quit: Computer has gone to sleep.]
s00pcan has joined #ruby
sharkman has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has quit [Ping timeout: 240 seconds]
cih_ has quit [Remote host closed the connection]
ruby-lang648 has joined #ruby
mwlang has joined #ruby
Rickmasta has joined #ruby
rcvalle has quit [Quit: rcvalle]
_djbkd has joined #ruby
michaeldeol has joined #ruby
atin_ has joined #ruby
Oka has joined #ruby
<atin_>
clear
codenapper has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Steve_Jobs has quit [Ping timeout: 255 seconds]
<ruby-lang648>
"When a Ruby program terminates, all threads are killed, regardless of their states. However, you can wait for a particular thread to finish by calling that thread’s Thread#join method. The calling thread will block until the given thread is finished." What does the last sentence mean?
brendan- has quit [Max SendQ exceeded]
mbff has quit [Ping timeout: 240 seconds]
drptbl_ has quit [Read error: Connection reset by peer]
InternetFriend has joined #ruby
<adaedra>
That the thread you call Thread#join in will block (not execute anything) until the thread you want to join is not terminated.
brendan- has joined #ruby
benlieb has joined #ruby
Steve_Jobs has joined #ruby
<ruby-lang648>
adaedra: Why do we say "will block" instead of "will be blocked"?
<adaedra>
Beats me.
<ruby-lang648>
adaedra: It's incorrect english though, is it not?
<adaedra>
er
favadi has joined #ruby
casadei has quit [Remote host closed the connection]
<adaedra>
it seems correct to me, at least gramaticaly-wise
Xeago has joined #ruby
<adaedra>
But – as you may see –, I'm not a native English speaker, so I don't know if some weird rule would make this invalid
<ruby-lang648>
adadra: So by block we just mean that the calling thread will be moved to the blocked state right?
jshow has joined #ruby
<adaedra>
yes
rcvalle has joined #ruby
<ruby-lang648>
The calling thread is the main thread?
[Butch] has joined #ruby
<ruby-lang648>
As in Thread.main?
<adaedra>
and unblocked when the other thread will be done
Pathfinder has joined #ruby
<adaedra>
You can wait a thread from another thread, not only the main one
last_staff has joined #ruby
favadi has quit [Max SendQ exceeded]
devoldmx has joined #ruby
skade has joined #ruby
<ruby-lang648>
adaedra: All right.
<ruby-lang648>
adaedra: Thanks!
piotrj has quit [Remote host closed the connection]
skade has quit [Client Quit]
Spami has joined #ruby
Lucky__ has joined #ruby
<jhass>
ruby-lang648: you can see it as a shorted version of "will block further execution"
skade has joined #ruby
ngscheurich has joined #ruby
bronson has joined #ruby
<ruby-lang648>
jhass: That makes sense. Got it.
devoldmx has quit [Ping timeout: 264 seconds]
Pathfinder has quit [Ping timeout: 265 seconds]
dome22xl has joined #ruby
<jhass>
that it moves to the blocked state is right, but kinda an implementation detail
ruby-lang216 has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang216>
can I get help with this exercise?
<jhass>
?ask
<ruboto>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
_djbkd has quit [Remote host closed the connection]
ruby-lang648 has left #ruby [#ruby]
amclain has joined #ruby
<ruby-lang216>
here's the exercise and I need a little help:encryptor 1 - write a ruby script that takes in 2 arguements - a key(int) and a string to encrypt(string) 2 - encrypt the string with random letters in between each character based off of the key example - encrypt(2, 'hello') output - hdkelxslieo
bronson has quit [Ping timeout: 240 seconds]
<adaedra>
you may want to show your current state and state your current problem.
eminencehc has quit [Remote host closed the connection]
Uranio-238 has quit [Ping timeout: 246 seconds]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
eminencehc has joined #ruby
Kendos-Kenlen has quit [Ping timeout: 268 seconds]
Igorshp has quit [Remote host closed the connection]
<shevy>
ruby-lang216 def foo(a,b)
pawnbox has joined #ruby
casadei has joined #ruby
<jhass>
ruby-lang216: we won't solve it for you, you should detail your thoughts and where you're stuck
araujo has joined #ruby
Ilyes512 has quit [Read error: Connection reset by peer]
araujo has quit [Max SendQ exceeded]
Pathfinder has joined #ruby
joonty has quit [Quit: joonty]
Ilyes512 has joined #ruby
bricker has joined #ruby
araujo has joined #ruby
xet7 has quit [Remote host closed the connection]
Ilyes512 has quit [Read error: Connection reset by peer]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
Ilyes512 has joined #ruby
psy_ has joined #ruby
agent_white has joined #ruby
naftilos76 has quit [Ping timeout: 272 seconds]
agent_white has left #ruby [#ruby]
bugrum has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
blackmesa has joined #ruby
Ilyes512 has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
Igorshp has quit [Remote host closed the connection]
DLSteve has joined #ruby
Ilyes512 has joined #ruby
sharkman has quit [Quit: Leaving]
araujo has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
Ilyes512 has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
voltalio has joined #ruby
Soda has joined #ruby
Ilyes512 has joined #ruby
govg has quit [Quit: leaving]
JDiPierro has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<ruby-lang216>
how can I write a string in ruby and encrypt and have a key for it?
<pruby>
adaedra: and afterwards why do we have to call Thread#join on each thread?
tuxero has joined #ruby
ta has joined #ruby
<adaedra>
pruby: The main thread waits for child threads to finish, one by one. Once the threads are launched, they run concurrently, and the main thread can continue
dome22xl has quit [Ping timeout: 255 seconds]
eminencehc has quit [Remote host closed the connection]
<adaedra>
so you have to block, thread by thread, until this thread is done
<adaedra>
otherwise, you may request data from the thread during the sleep, and so not get the data
spider-mario has joined #ruby
roxtrong_ has quit [Remote host closed the connection]
Maxandr has joined #ruby
<pruby>
adaedra: What does calling thread[:mycount] do immediately after calling thread.join?
poguez_ has quit [Quit: Connection closed for inactivity]
agent_meerkat has joined #ruby
<adaedra>
pruby: it gets the data that you set in the thread
fmcgeough has joined #ruby
<pruby>
adaedra: all the threads have a :mycount local variable. this is different for each?
<pruby>
adaedra: As in this local variable has a unique value for each thread?
<adaedra>
they have local storage, that you can access with [] and []=. So, in the thread, you store something in the thread's :mycount key in storage, and get it afterwards. And yes, each thread has its own storage.
Maxandr has quit [Client Quit]
<adaedra>
Do you see how threads work, basically?
ruby-lang216 has quit [Ping timeout: 246 seconds]
pietr0 has joined #ruby
<pruby>
adaedra: Yeah I'm sort of getting it but it's not very clear yet. Might have to do a little more reading I guess.
gustav_ has joined #ruby
<adaedra>
pruby: Can I try an analogy?
FernandoBasso has joined #ruby
symm- has quit [Quit: Leaving...]
<pruby>
adaedra: Yeah sure.
joshyjosh has joined #ruby
troulouliou_div2 has joined #ruby
leafybas_ has joined #ruby
<adaedra>
Immagine your program is a shopping cart, with items, and that your computer is the cahier.
symm- has joined #ruby
asxbr has joined #ruby
<adaedra>
So your cahier will take your items, scan them one by one. It's executing your program.
<adaedra>
In default mode, you have one queue, so only one cart is processable at the time.
<shevy>
anyone happens to know if Tom Copeland is still using ruby?
chipotle has quit [Quit: cheerio]
<adaedra>
Now, when you create a thread, you open another queue with another cahier.
<adaedra>
So you can treat two carts.
<adaedra>
Each one works independently.
reset has joined #ruby
<adaedra>
Okay until there?
<pruby>
Yup.
mjuszczak has quit []
ehth77 has joined #ruby
petricore has joined #ruby
zotherstupidguy has quit [Ping timeout: 250 seconds]
kappy has quit [Remote host closed the connection]
<adaedra>
So in your case, you open 10 lanes.
<pruby>
10 carts?
<adaedra>
And feed them 10 carts, yes.
leafybasil has quit [Ping timeout: 264 seconds]
kalusn has quit [Remote host closed the connection]
<pruby>
and they're all served concurrently?
<adaedra>
yes.
leafybas_ has quit [Ping timeout: 244 seconds]
mxrguspxrt has joined #ruby
<adaedra>
Working on each cart is done independently from other carts, like in real life
ponga has quit [Quit: Connection closed for inactivity]
paulcsmith has joined #ruby
Jackneill has joined #ruby
<pruby>
adaedra: Okay until now yes but this part "threads.each {|t| t.join; print t[:mycount], ", " }"
momomomomo has joined #ruby
<pruby>
adaedra: don't get that part.
Rollabunna has joined #ruby
danieli has joined #ruby
<adaedra>
That's the manager office. The manager come this morning and opened the lanes for the cashiers. Now, it waits for work to be done to close them, in order.
ledestin has joined #ruby
Jackneill has quit [Remote host closed the connection]
<adaedra>
So, lane by lane, it waits for carts to be processed, then close the lane. Beginning by the lane 1, even if another lane close before.
InternetFriend has joined #ruby
Igorshp has quit [Remote host closed the connection]
moeabdol has joined #ruby
<pruby>
When we call t.join, we wait until that thread finishes running and then we run print t[:mycount] ?
<adaedra>
Yes
NeverDie has joined #ruby
<adaedra>
I have a thing to re-read, I come back to you in a sec for the local storage
eminencehc has joined #ruby
<pruby>
adaedra: All right.
niftylettuce has joined #ruby
InternetFriend has quit [Client Quit]
Rollabunna has quit [Ping timeout: 250 seconds]
InternetFriend has joined #ruby
_djbkd has joined #ruby
skullcrasher_ has joined #ruby
Igorshp has joined #ruby
saddad has joined #ruby
fantazo has joined #ruby
krisquigley has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 250 seconds]
DroidBur_ has joined #ruby
wldcordeiro_ has joined #ruby
<adaedra>
pruby: So
DroidBurgundy has quit [Ping timeout: 264 seconds]
<pruby>
adaedra: Do the threads start running as soon as we create the threads variable? in the example I showed?
firstdayonthejob has joined #ruby
tenderlove has joined #ruby
mjuszczak has joined #ruby
<adaedra>
yes
xet7 has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
<adaedra>
they are created on after each other, and once all are created, they are saved into threads
<adaedra>
so you have an array of Thread objects
hahuang65 has quit [Ping timeout: 250 seconds]
<pruby>
and they start running even before we call Thread#join on either one of em right?
rgb-one has joined #ruby
<rgb-one>
Hey
<pruby>
Thread#join is just to ensure they get executed completely?
<adaedra>
They start at the new
<adaedra>
join is to "merge" them
<adaedra>
so it waits until the thread is completed
<rgb-one>
Given a text file with 10 lines of text, how can I create a MD5 hash for each line
<rgb-one>
?
Musashi007 has joined #ruby
<adaedra>
like the manager, waiting for the cart to be processed to close the lane, pruby
<adaedra>
rgb-one: with which part of this problem do you need help?
tejasmanohar has joined #ruby
<rgb-one>
adaedra: Creating the MD5 hash of each line of a text file
<adaedra>
rgb-one: do you know how to create a md5 hash?
<pruby>
adaera: Okay
<shevy>
rgb-one just pass the string into a method that does it
voltalio has joined #ruby
prater has left #ruby ["WeeChat 1.0.1"]
<adaedra>
pruby: Thread storage is like a little note block a cashier has with it. So when you do "Thread.current[:mycount] = count", it says "Write at page :mycount on the current cashier's note block the current value of count"
<rgb-one>
>> require 'digest'; t = hello; Digest::MD5.hexdigest t
<ruboto>
rgb-one # => undefined local variable or method `hello' for main:Object (NameError) ...check link for more (https://eval.in/440803)
sjums has left #ruby [#ruby]
<rgb-one>
>> require 'digest'; t = 'hello'; Digest::MD5.hexdigest t
Igorshp has quit [Remote host closed the connection]
Cyther has joined #ruby
<adaedra>
should help you.
<pruby>
adaedra: If I create 10 threads, I will have a total of 11 threads running as a full program since the main program is a thread itself right?
<adaedra>
yes
<adaedra>
The main thread is the first thread, created at the start of the program. And remember that if the main thread dies, it kills all other threads at the same time.
michaeldeol has joined #ruby
ericjphillips has joined #ruby
Igorshp has joined #ruby
<adaedra>
The worst case of manager, the one which kills all of its employees at the end of the day :(
Gachr has joined #ruby
blackmesa has joined #ruby
<Gachr>
Hello everyone, how can I make UI inside terminal with Ruby?
<pruby>
adaedra: Thread#join to the rescue!
<adaedra>
exactly!
<adaedra>
so, still need help with something?
parduse has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pruby>
adaedra: No that was a great analogy. Thank you so much!
<adaedra>
you're welcome.
<adaedra>
(off to the train, now!)
nsuke has joined #ruby
pragmatism has quit [Ping timeout: 246 seconds]
pruby has left #ruby [#ruby]
codecop has joined #ruby
wldcordeiro_ has quit [Quit: Konversation terminated!]
pragmatism has joined #ruby
dome22xl has joined #ruby
wldcordeiro_ has joined #ruby
snockerton has joined #ruby
momomomomo has quit [Quit: momomomomo]
pragmatism has quit [Client Quit]
blackmesa has quit [Ping timeout: 268 seconds]
TomyLobo has joined #ruby
`tim` has joined #ruby
pragmatism has joined #ruby
Igorshp has quit [Remote host closed the connection]
gustav_ has quit [Remote host closed the connection]
slayerjain has joined #ruby
jshow has quit [Quit: jshow]
slayerjain has quit [Max SendQ exceeded]
allomov has joined #ruby
phutchins1 has quit [Ping timeout: 244 seconds]
<prefixed>
YO BROS
paulcsmith has quit [Quit: Be back later ...]
<prefixed>
what's the syntax optionparser uses for input?
slayerjain has joined #ruby
hanmac has joined #ruby
pragmatism has left #ruby [#ruby]
pragmatism has joined #ruby
slayerjain has quit [Max SendQ exceeded]
paulcsmith has joined #ruby
<Gachr>
How can I do terminal interface with Ruby?
casadei has joined #ruby
InternetFriend has joined #ruby
slayerjain has joined #ruby
dfockler has quit [Remote host closed the connection]
<eam>
I think the interpretation of EAGAIN was taken a bit too literally
<eam>
it doesn't actually mean you should blindly try the call again
seabasshunter has joined #ruby
* apeiros
doesn't know enough C for this :(
<apeiros>
your explanation makes sense to me
Cyther has quit [Quit: Leaving]
Cyther has joined #ruby
Cyther has quit [Client Quit]
rgb-one has quit [Ping timeout: 265 seconds]
Cyther has joined #ruby
casadei has quit [Remote host closed the connection]
dasher00 has quit [Read error: Connection reset by peer]
<seabasshunter>
can anyone advise how to test a method on an object that initializes with an http request? I tried using webmock to stub out the request but I must've been doing it wrong because I can't make use any class methods without the instantiating in rspec under webmock (blocking http requests and all)
howdoi has quit [Quit: Connection closed for inactivity]
samuelkadolph has joined #ruby
iateadonut has left #ruby [#ruby]
rgb-one has joined #ruby
<seabasshunter>
or maybe i've designed the class wrong. I'm wrapping a very simple api.
eminencehc has quit [Remote host closed the connection]
samuelkadolph has quit [Client Quit]
rdark has quit [Quit: leaving]
<drbrain>
eam: strace says you're stuck in an EAGAIN loop
<eam>
what's happening is fork() returns EAGAIN (as expected - we limited to disallow additional processes)
<eam>
what's unexpected is that ruby's fork is implemented with an infinite retry loop instead of raising on error
* drbrain
nods
slayerja_ has joined #ruby
samuelkadolph has quit [Client Quit]
<eam>
the ENOMEM case is similarly worrisome I think; it's *possible* that running the gc will free memory to allow a fork -- but probably unlikely in the general case
seabasshunter has quit [Quit: Page closed]
<eam>
the whole clamping down on NPROC is just a synthetic way to hit this codepath
<drbrain>
I'd have to poke at rb_gc, but I think that can raise NoMemoryError
<eam>
possibly - the problem is, let's say you have a 10M ruby and it has no objects to free -- and some unrelated stuff is using all your memory. You probably want fork() to raise (ENOMEM, can't allocate another 10M) and not try to re-fork/re-gc in a tight loop
samuelkadolph has joined #ruby
atin_ has joined #ruby
<eam>
likely it's not ruby itself that created the situation where fork won't work
platzhirsch has left #ruby [#ruby]
<eam>
rb_gc wouldn't raise in that case (hey, nothing to free, no problem)
dasher00 has joined #ruby
Cyther_ has joined #ruby
skweek has quit [Remote host closed the connection]
greymeister has joined #ruby
dasher00 has quit [Max SendQ exceeded]
dasher00 has joined #ruby
dasher00 has quit [Max SendQ exceeded]
dasher00 has joined #ruby
casadei has joined #ruby
dasher00 has quit [Max SendQ exceeded]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dasher00 has quit [Read error: Connection reset by peer]
<joufflu>
makes sense...hmmm
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
momomomomo has quit [Client Quit]
snockerton has quit [Quit: Leaving.]
<Ademan2>
this is a dumb question, but I'm not familiar with ruby. I'm trying to help a friend with some homework. one piece of the given code is @httpd_hash['ScriptAlias'[path]] path will always be something like "/foo/" so how is this not equivalent to @httpd_hash[nil] ?
dstarh has quit [Read error: Connection reset by peer]
_djbkd has quit [Remote host closed the connection]
swgillespie has quit [Ping timeout: 252 seconds]
<Ademan2>
well that matches what I expected, but the code is supposed to retrieve a piece of data. as you might expect, always using nil as the key is not desired behavior, but that's part of the given code (AFAIK it is supposed to remain unmodified)
evanjs has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
reset has joined #ruby
<shevy>
yeah you got a sure nil there
southpawlar has quit [Ping timeout: 240 seconds]
<to_json>
is the class 'Metaprogramming Ruby'? You could override [] on string
evanjs has joined #ruby
<Ademan2>
*shrug* at least it's not my homework. .. I almost wonder if this is just a bug. they were given some code, and a big 'ol test suite, but it's not super thorough
wldcordeiro_ has quit [Quit: Konversation terminated!]
Coldblackice has joined #ruby
momomomomo has joined #ruby
<Ademan2>
to_json: no it's some web class, they're actually writing an http server which is kind of neat
<adaedra>
I'm back \o/
kirun has joined #ruby
<to_json>
yeah asking the student then to determine that they should do something insane like that would be realllllyy shitty homework design
wldcordeiro_ has joined #ruby
Cyther_ has quit [Quit: Leaving]
<to_json>
academia is so awkward. if that was job interview homework what I'd be looking for is for the prospect to write me a bug report
slayerjain has joined #ruby
_djbkd has joined #ruby
Cyther has joined #ruby
<to_json>
but they might actually expect the student to Do What They Mean
snockerton has joined #ruby
_djbkd has quit [Remote host closed the connection]
kurzweil has joined #ruby
_djbkd has joined #ruby
<Ademan2>
yeah part of the problem may be that I'm getting things second hand through someone in way over their head. the cs department here has failed him utterly
Brando753 has quit [*.net *.split]
ytti has quit [*.net *.split]
soloone has quit [*.net *.split]
Brando753 has joined #ruby
<pruby>
adaedra: Welcome back. Hey, I was wondering...why is the output random in https://eval.in/440913 if the first thread is joined first? :p
slayerja_ has quit [Ping timeout: 246 seconds]
soloone has joined #ruby
rushed has quit [Quit: rushed]
<adaedra>
pruby: well, how does each thread takes a number?
chouhoulis has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rushed has joined #ruby
p0wn3d has quit [Ping timeout: 272 seconds]
<pruby>
adaedra: I mean when we do threads.each { |thread| thread.join } the first thread is joined first so the output should always be "Thread 1" then "Thread 2" ?
<adaedra>
Is the number you output the number of the thread?
chouhoul_ has joined #ruby
ehth77 has quit [Quit: WeeChat 1.2]
<pruby>
adaedra: Yeah.
<adaedra>
Sure? :)
codenapper has joined #ruby
stamina has quit [Ping timeout: 244 seconds]
<Ademan2>
anywho thanks folks
<adaedra>
oh wait\
<pruby>
The output is "Thread 1" then "Thread 2" sometimes and sometimes it's "Thread 2" then "Thread 1"
<adaedra>
you changed code, my bad
Ademan2 has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<nofxx>
pruby, it's not syncronous
<nofxx>
there's no way to know which will end first, supposing the same code is running
<pruby>
but we're joining the first thread first? The main thread should wait for the first thread to be completed first?
ericjphillips has quit [Quit: Leaving.]
<adaedra>
pruby: processor may not treat the code you give to it in the order with threads.
dasher00 has joined #ruby
finisherr has joined #ruby
<adaedra>
so it is possible that the code from the second thread get picked up by the processor before the first.
dasher00 has quit [Max SendQ exceeded]
saddad has joined #ruby
<pipework>
pruby: If I'm understanding you correctly, you'll have the main thread wait until the first completes, yes.
ytti has joined #ruby
codenapper has quit [Client Quit]
<pipework>
Though the others after the first thread might be complete.
<adaedra>
remember, code execution starts when you create the thread, not join it.
chouhoulis has quit [Ping timeout: 250 seconds]
x-wing has joined #ruby
dasher00 has joined #ruby
parduse has quit []
agent_white has joined #ruby
southpawlar has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
tomphp has joined #ruby
Xeago has joined #ruby
DoubleMalt has joined #ruby
<pruby>
Okay say we have two threads. Both downloading a file from the internet. What exactly happens when we call first_thread.join and then we call second_thread.join immediately afterwards?
Xeago has quit [Remote host closed the connection]
<adaedra>
the first call will wait for first_thread to terminate.
<pipework>
It waits for the first thread to join.
<adaedra>
then, the second call, will wait for the second thread.
<pipework>
Then after it does, it waits for the next thread to join.
<jhass>
however both threads are running in parallel
kadoppe has quit [Ping timeout: 255 seconds]
<pipework>
Read the docs for Thread#join
<jhass>
the second thread might even finish while you wait on the first one and the join on the second thread will be a noop
<pruby>
so when we join the first thread, the second file is also being downloading without me having to join it?
<pipework>
jhass: As parallel as it can, yeah.
<pipework>
pruby: If that code is running in that thread, yes.
<jhass>
pipework: download sounds quite IOish, so even in ruby ;)
kadoppe has joined #ruby
<pipework>
jhass: Really depends on the implementation, but I get you.
mallu has joined #ruby
<jhass>
pruby: yes, though it might be aborted if it isn't finished when the main thread exits
Xeago has joined #ruby
<jhass>
that's why you join, to keep the main thread alive while the other threads run
<mallu>
I know I can compare two arrays with - operator. Is it possible to display only the difference if both arrays are not same?
<jhass>
(or to wait for them to finish/wait for their results)
<adaedra>
pruby: the code in the thread you create is running (well, available for the processor to pick up, actually) as soon as you create it.
<jhass>
mallu: r = a - b; puts r unless r.empty? # use better variable names fitting your domain
<mallu>
ok.. let me try that
nettoweb has joined #ruby
<jhass>
mallu: that if b is a superset of a, r will be empty too
<jhass>
*note that
<pruby>
When I iterate over some threads and join, does the main thread get blocked each time Thread#join is called on a thread?
<adaedra>
pruby: please note that my earlier analogy was kinda idealized.
<jhass>
pruby: each time the thread you join is still alive
<adaedra>
pruby: yes, unless the thread already finished its job.
subshad has quit [Ping timeout: 250 seconds]
moeabdol has quit [Quit: WeeChat 1.3]
x-wing has quit [Quit: Leaving]
<adaedra>
a thread may finish early; through it still needs to be joined to the parent thread to be truly ended.
jackjackdripper has joined #ruby
<pruby>
Is there any ruby-specific guide on threads that I can use? I am reading Programming Ruby and the bit on threads feels a bit too complicated for me...
Rollabunna has joined #ruby
<jhass>
pruby: maybe skip the topic until you truly need it
<jhass>
it massively helps to have a concrete problem to solve
<pipework>
I've read all of jstorimer's books so far.
polysics has joined #ruby
NeverDie has joined #ruby
n008f4g_ has joined #ruby
slayerjain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
slayerjain has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
slayerjain has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
theery has quit []
pruby_ has joined #ruby
<pruby_>
Are threads used in Rails?
orangeappled has joined #ruby
pruby has quit [Ping timeout: 246 seconds]
<shevy>
grep through it man
<shevy>
grep -r Thread
<shevy>
or search via google
<jhass>
pruby_: I believe not directly, but there are several application servers that use threads as well as background job systems and similar things
<Papierkorb>
shevy: the_silver_searcher's ag tool to the rescue!
<nofxx>
ag rocks
yqt has joined #ruby
bb010g has joined #ruby
parduse has joined #ruby
<pruby_>
jhass: So if I want to get into rails-dev, is there an immediate need for me to know about em?
<jhass>
no
DroidBurgundy has joined #ruby
momomomomo has joined #ruby
<Papierkorb>
nofxx: "So I have this grep line. it's pretty fast, look, it searches this projects' 50k lines in only 2 seconds!" *me typing the same query but using ag* took less than a second "Uh how was that package called again?"
pruby_ has left #ruby [#ruby]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
but3k4_ has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
<eam>
Papierkorb: on OSX?
<Papierkorb>
eam: Thank god no.
<eam>
OSX grep is super slow - gnu grep is on par with ag
tomphp has joined #ruby
but3k4 has quit [Ping timeout: 250 seconds]
<Papierkorb>
eam: your drive must be super slow
<Papierkorb>
it's magnitudes faster
DroidBur_ has quit [Ping timeout: 260 seconds]
jschmid has joined #ruby
<Papierkorb>
let alone for the better output formatting it's worth using
jschmid has quit [Remote host closed the connection]
moeabdol has joined #ruby
<eam>
it's magnitudes faster than BSD grep
<eam>
(like, one)
cassioscabral has quit [Quit: cassioscabral]
<eam>
Papierkorb: if my drive was slow, the difference would be more pronounced -- not less :)
<eam>
I tested on an SSD fwiw
<Papierkorb>
Same here. much faster on every project I ever used it in. Always on fast SSDs
<Papierkorb>
Who still dev's on HDDs anyway?
<eam>
ag and gnu grep should roughly have the same behavior anyway
<eam>
this is in an optimal case, of course. BSD grep will beat both in corner cases
tw1sted has quit [Remote host closed the connection]
MyMind has joined #ruby
<eam>
(because ag and gnu grep both make tradeoffs to slightly increase the common case at great expense to corner cases)
phutchins1 has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
naftilos76 has joined #ruby
marens_ has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
nopc0de has quit [Ping timeout: 246 seconds]
aibot has quit [Ping timeout: 246 seconds]
snapcase has quit [Ping timeout: 246 seconds]
twohlix has quit [Ping timeout: 246 seconds]
jsrn has quit [Ping timeout: 246 seconds]
Sembei has quit [Ping timeout: 246 seconds]
marens has quit [Ping timeout: 246 seconds]
Anti-Pizza has quit [Quit: Quit]
lele has quit [Ping timeout: 240 seconds]
aibot has joined #ruby
j416 has quit [Ping timeout: 240 seconds]
Fraeon has quit [Ping timeout: 240 seconds]
_el_fer_ has quit [Quit: Leaving]
twohlix has joined #ruby
twohlix has quit [Excess Flood]
nopc0de has joined #ruby
Fraeon has joined #ruby
twohlix has joined #ruby
twohlix has quit [Excess Flood]
jsrn has joined #ruby
twohlix has joined #ruby
DroidBurgundy has quit []
hanmac has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
drptbl has joined #ruby
j416 has joined #ruby
lele has joined #ruby
maletor has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
snapcase has joined #ruby
pushpak has joined #ruby
agent_meerkat has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
Soda has quit [Remote host closed the connection]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
p0wn3d has joined #ruby
mjuszczak has quit []
podman has joined #ruby
momomomomo has quit [Quit: momomomomo]
codecop has quit [Quit: Išeinu]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
tw1sted has joined #ruby
stamina has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
<Authenticator>
or better: def x.to_hash ; instance_variables.map {|n| [n, instance_variable_get(n)] } ; end
ruurd has joined #ruby
<dorei>
i see, thanx a lot :)
odigity2 has joined #ruby
<VeryBewitching>
dorei: After that, you can require 'json' and add: def to_json; to_hash.to_json; end
<odigity2>
Is there a way to enable IRB history in ruby code rather than via ~/.irbrc? I'm using Docker, and it's not convenient to recreate ~/.irbrc every time I create a container.
<VeryBewitching>
Instead of calling x.to_hash.to_json
<dorei>
VeryBewitching: i think .to_json automatically calls to_h if it exists
jenrzzz has joined #ruby
Rollabunna has joined #ruby
wildlander has joined #ruby
but3k4 has joined #ruby
NeverDie has joined #ruby
<VeryBewitching>
dorei: Nope.
<VeryBewitching>
For a test class with to_h defined, I get "\"#<Test:0x007f7b83061a48>\""
<jhass>
VeryBewitching: dorei define as_json and return a hash though, not to_json
<jhass>
mmh, or was that rails magic?
eminencehc has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<VeryBewitching>
jhass: I don't know, I hadn't ever done it without Rails, I had to Google for plain Ruby solution ;)
<jhass>
meh, looks like it, how annoying
Rollabunna has quit [Ping timeout: 246 seconds]
krisquigley has joined #ruby
JDiPierro has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
Xeago has joined #ruby
k3asd` has quit [Ping timeout: 265 seconds]
asxbr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has joined #ruby
Jammyhammy|Work has quit [Read error: Connection reset by peer]
k3asd` has joined #ruby
sepp2k has joined #ruby
bmurt has quit []
prestorium has quit [Quit: Leaving]
renderful has joined #ruby
arup_r has quit [Quit: Leaving]
krisquigley has quit [Ping timeout: 256 seconds]
eminencehc has joined #ruby
pheuko has joined #ruby
<TTilus>
odigity2: why not build an image which has ~/.irbrc? (base on the image you are using now and only add that .irbrc)
dasher00 has quit [Ping timeout: 260 seconds]
polysics has quit [Read error: Connection reset by peer]
mjuszczak has quit []
polysics has joined #ruby
polysics has quit [Read error: Connection reset by peer]
nopc0de is now known as j2k_
sperant has joined #ruby
polysics has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
danieli has quit [Ping timeout: 255 seconds]
bklane has quit [Read error: Connection reset by peer]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mia has joined #ruby
Mia has joined #ruby
bklane has joined #ruby
Axy has quit [Ping timeout: 255 seconds]
ldnunes has quit [Quit: Leaving]
drewvanstone has joined #ruby
Xeago has quit [Remote host closed the connection]
polysics has quit [Read error: Connection reset by peer]
<odigity2>
TTilus, I thought of that, but that seems like a pain just to get one little file in, and I'd have to upload it to a registry if there are other developers on the project.
workmad3_ has quit [Ping timeout: 240 seconds]
Guest65 has quit [Max SendQ exceeded]
dfockler has quit [Remote host closed the connection]
<odigity2>
TTilus, lastly, this is not a file that's needed in production. I ended up solving the problem by having my bin/console script generate the .irbrc file if it's not already there. (I only use bin/console for dev, so the file will never get created in production)
polysics has joined #ruby
skade has joined #ruby
FernandoBasso has joined #ruby
leafybasil has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
k3asd` has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 240 seconds]
last_staff has quit [Quit: last_staff]
mary5030 has quit [Remote host closed the connection]
polysics has quit [Read error: Connection reset by peer]
spcmastertim has quit [Quit: Leaving]
danieli has joined #ruby
mary5030 has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
banjara has quit [Read error: Connection reset by peer]
Swappticon has joined #ruby
banjara has joined #ruby
danieli has quit [Max SendQ exceeded]
danieli has joined #ruby
dasher00 has joined #ruby
dasher00 has quit [Max SendQ exceeded]
kyle___ is now known as kyle__
danieli has quit [Read error: Connection reset by peer]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dasher00 has joined #ruby
immucahit has joined #ruby
icole has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
decoponio has quit [Quit: Leaving...]
eminencehc has quit [Remote host closed the connection]
sagittarian|2 has quit [Ping timeout: 246 seconds]
gustav__ has quit [Remote host closed the connection]
mjuszczak has joined #ruby
gustav_ has joined #ruby
pwnd_nfsw has quit [Ping timeout: 246 seconds]
kiper has joined #ruby
Porfa has quit [Quit: Porfa]
charliesome has joined #ruby
roxtrongo has joined #ruby
tcopeland has quit [Ping timeout: 244 seconds]
sepp2k1 has joined #ruby
fastAndSlow has quit [Quit: leaving]
iamninja_ has joined #ruby
mjuszczak has quit [Client Quit]
mjuszczak has joined #ruby
gustav_ has quit [Ping timeout: 256 seconds]
workmad3_ has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
sepp2k has quit [Ping timeout: 265 seconds]
<nofxx>
Papierkorb, raid 0 ssd here, ag is way faster. linux grep*
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
sagittarian|2 has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
mjuszczak has quit [Client Quit]
banjara has quit [Quit: Leaving.]
to_json has quit [Ping timeout: 250 seconds]
to_json has joined #ruby
ngscheurich has quit [Ping timeout: 240 seconds]
apt-get has quit [Remote host closed the connection]
bkulbida has quit [Ping timeout: 268 seconds]
banjara has joined #ruby
mjuszczak has joined #ruby
Eiam_ has joined #ruby
charliesome has quit [Ping timeout: 260 seconds]
workmad3_ has quit [Ping timeout: 246 seconds]
dravine has quit [Ping timeout: 250 seconds]
dravine has joined #ruby
kirun has quit [Quit: Client exiting]
orangeappled has quit [Ping timeout: 246 seconds]
deavid has quit [Ping timeout: 268 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<ramfjord>
Maybe someone on here has dealt with CSV's and knows the answer to this - it's been bothering me for a while. I'm initializing a CSV with CSV.new(file, headers: :first_row, return_headers: false)
<ramfjord>
despite the return_headers: false, I still have to call csv.shift once to load the headers
spider-mario has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ramfjord>
When false, header rows are silently swallowed. If set to true, header rows are returned in a CSV::Row object with identical headers and fields (save that the fields do not go through the converters).
duddik has quit [Remote host closed the connection]
<ramfjord>
it's not a big deal, but a constant minor source of irritation
duddik has joined #ruby
duddik has quit [Remote host closed the connection]
<ramfjord>
using ruby 2.2.2 standard CSV library
scripore has joined #ruby
doddok has joined #ruby
<joufflu>
noob question: if n < 0 return nil #Question: What does the "nil" mean? is it the same as null ?
d10n-work has quit [Quit: Connection closed for inactivity]
VeryBewitching has quit [Remote host closed the connection]
<ramfjord>
joufflu: yes
<joufflu>
ramfjord, k thanks
<ramfjord>
though this is ruby, so it is technically an object
S_Walker has joined #ruby
Zackio has quit [Read error: Connection reset by peer]
Zackio has joined #ruby
VeryBewitching has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
victortyau has quit [Quit: Leaving]
bigbadbear has quit [Ping timeout: 246 seconds]
ruurd has quit [Quit: ZZZzzz…]
pwnd_nfsw has joined #ruby
dirtyonekanobi has quit [Quit: Connection closed for inactivity]
banister has quit [Ping timeout: 240 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
unreal has joined #ruby
mjuszczak has quit []
unreal_ has quit [Ping timeout: 246 seconds]
quazimodo has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
jenrzzz has joined #ruby
unreal has quit [Ping timeout: 264 seconds]
dirtyonekanobi has joined #ruby
rbennacer has joined #ruby
Azure has quit [Quit: Oops.]
Azure has joined #ruby
devdazed has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
stamina has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
gustav_ has joined #ruby
piotrj has quit [Remote host closed the connection]