teclator has quit [Quit: No Ping reply in 180 seconds.]
astrobunny has quit [Remote host closed the connection]
teclator has joined #ruby
UnknownSoldier has quit [Read error: Connection reset by peer]
teclator has quit [Client Quit]
__Yiota has joined #ruby
teclator has joined #ruby
agent_white has quit [Quit: headinghome]
centrx has joined #ruby
montyboy has quit [Read error: Connection reset by peer]
jhack has quit [Quit: jhack]
despai has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 240 seconds]
despai has joined #ruby
centrx has quit [Ping timeout: 240 seconds]
duderono_ has joined #ruby
duderonomy has quit [Ping timeout: 255 seconds]
alanquillin has quit [Quit: I out! ::mic drop::]
quiller has joined #ruby
karapety_ has quit [Remote host closed the connection]
thoolihan has joined #ruby
quiller has quit [Quit: I out! ::mic drop::]
yqt has quit [Ping timeout: 256 seconds]
quiller has joined #ruby
karapetyan has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
cschneid_ has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
charliesome has joined #ruby
cdg_ has quit [Ping timeout: 276 seconds]
msmith has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 255 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
karapetyan has quit [Remote host closed the connection]
zacts has quit [Ping timeout: 245 seconds]
karapetyan has joined #ruby
benlieb has quit [Quit: benlieb]
lanc has joined #ruby
simmib_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
__Yiota has joined #ruby
simmib_ has quit [Ping timeout: 245 seconds]
nettoweb has joined #ruby
__Yiota has quit [Client Quit]
jgnagy has quit []
nettoweb has quit [Client Quit]
mhenrixon has quit [Ping timeout: 256 seconds]
Synthead has quit [Remote host closed the connection]
aryaching_ has joined #ruby
marr has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
aryaching has quit [Ping timeout: 264 seconds]
minimalism has joined #ruby
agent_white has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
jameser has joined #ruby
astrobunny has joined #ruby
kht has joined #ruby
rewolf has quit [Quit: Connection closed for inactivity]
antoniobeyah has quit [Quit: Connection closed for inactivity]
warreng_ has joined #ruby
ferr1 has quit [Ping timeout: 255 seconds]
<warreng_>
when does ruby interrupt threads? assuming @queue = Queue.new, would ruby interpreter ever interrupt "@queue.empty? && @queue.num_waiting == 10" between the two conditions?
arescorpio has joined #ruby
montanonic has quit [Ping timeout: 252 seconds]
astrobunny has quit [Ping timeout: 255 seconds]
<warreng_>
or does it only interrupt during IO stuff like "puts" or "NET::HTTP.get" ?
Rodya_ has joined #ruby
skweek has quit [Remote host closed the connection]
username_ has quit [Ping timeout: 245 seconds]
username1 has quit [Ping timeout: 252 seconds]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
cyphase has quit [Ping timeout: 255 seconds]
nadir has quit [Quit: Connection closed for inactivity]
LoneHermit has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
FiveBroDeepBook has joined #ruby
djbkd has joined #ruby
LoneHerm_ has quit [Ping timeout: 258 seconds]
despai has quit [Ping timeout: 260 seconds]
brent__ has joined #ruby
nadir has joined #ruby
centrx has joined #ruby
JeanCarloMachado has joined #ruby
jhack has joined #ruby
Rodya_ has quit [Remote host closed the connection]
brent__ has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
toretore has quit [Ping timeout: 264 seconds]
cschneid_ has joined #ruby
ornerymoose has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<ornerymoose>
Hello, having a strange issue on a server of mine and not sure what’s causing it. I have a handful of rails applications running on this Linux server, and CPU usage seems quite high (running top), near 100%. The most intense processes are listed as ruby. New ones are spawning up every minute or so. When I do the following http://imgur.com/a/L853D , it looks like it’s pointing to rbenv. Can anyone offer some insight on this
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Ping timeout: 255 seconds]
mikeiniowa has joined #ruby
tolerablyjake has quit [Ping timeout: 255 seconds]
dkphenom has joined #ruby
saneax-_-|AFK is now known as saneax
bmurt has joined #ruby
infernix has quit [Ping timeout: 256 seconds]
eizua has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Remote host closed the connection]
warreng_ has joined #ruby
<warreng_>
can anybody answer my thread question above? is "@queue.empty? && @queue.num_waiting == 10" thread safe?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Derperperd has quit [Read error: Connection reset by peer]
fowlduck has quit [Remote host closed the connection]
Derperperd has joined #ruby
jdm has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
simmib_ has joined #ruby
astrobunny has joined #ruby
optiz0r has joined #ruby
banisterfiend has joined #ruby
simmib_ has quit [Ping timeout: 276 seconds]
AHemlocksLie has joined #ruby
jdm has quit [Remote host closed the connection]
<AHemlocksLie>
I'm having some trouble with ruby's bundler on Arch Linux since a recent update. I updated Ruby from 2.3.3-2 to 2.4.0-1 and bundler from 1.13.7-2 to 1.14.3-1, and I had to downgrade Ruby back to the original version for compatibility reasons, but now I need to run "bundle install", and it complains of not being able to find bundler after just running "sudo gem install bundler"
astrobunny has quit [Ping timeout: 260 seconds]
montanonic has joined #ruby
genpaku has quit [Remote host closed the connection]
<warreng_>
(feel free to answer even when i'm not in the channel, i'll read through logs in case i miss something)
ornerymoose has joined #ruby
<marchelzo>
warreng_: lol at this point you could have just read the MRI source and found out
govg has joined #ruby
benlieb has quit [Quit: benlieb]
jdm has joined #ruby
<havenwood>
warreng_: Say more about what you're worried will happen?
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<havenwood>
warreng_: Is it really thread safety you're interested in or volatility or atomicity?
Channel6 has joined #ruby
jhack has quit [Quit: jhack]
JeanCarloMachado has joined #ruby
FiveBroDeepBook has joined #ruby
FiveBroDeepBook has left #ruby [#ruby]
warreng_ has quit [Ping timeout: 260 seconds]
<havenwood>
I guess what I'm asking is what do you mean by "interrupt"?
howdoi has quit [Quit: Connection closed for inactivity]
<havenwood>
My guess would be that you're meaning atomicity and that the answer is no, there are not guarantees.
AndBobsYourUncle has joined #ruby
benlieb has joined #ruby
AndBobsYourUncle has quit [Client Quit]
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
<AHemlocksLie>
havenwood, so just adding the directories given by gem env path to my $PATH, it should fix it?
<havenwood>
AHemlocksLie: Yes, that should do the trick.
UnknownSoldier has quit [Remote host closed the connection]
_whitelogger has joined #ruby
<AHemlocksLie>
I think I understand what's going wrong here... If I run gem install bundler without sudo, I get "You don't have write permissions for the /usr/lib/ruby/gems/2.3.0 directory.", but with sudo I get a warning about having /root/.gem/ruby/2.3.0/bin in my PATH. Is using sudo not recommended? If not, what's the alternative? I could tamper with permissions, but that's usually not a good idea
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
AHemlocksLie: You could run bundler with the --quiet flag to silence the warning regarding sudo.
msmith has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 256 seconds]
msmith has quit [Remote host closed the connection]
<AHemlocksLie>
This is just installing bundler. Installing it using sudo is placing it where nothing can get to it because it's in root's home, but it fails to install as anyone else because it doesn't have access to the /usr/lib/ruby/gems/2.3.0 directory
montanonic has quit [Ping timeout: 256 seconds]
<AHemlocksLie>
So running it as sudo tries to install it where nobody else can find it, but running it as anyone else tries to install it where everyone can find it but only root can put it
gix has joined #ruby
<Radar>
nuke it from orbit it's the only way to be sure
<havenwood>
AHemlocksLie: Ah. Are you trying to make bundler accessible to multiple users?
jcao219 has quit [Ping timeout: 264 seconds]
<AHemlocksLie>
no, I just need it accessible to one non-root user
jenrzzz has quit [Ping timeout: 240 seconds]
<AHemlocksLie>
flexibility for the future might be nice but isn't really necessary
astrobunny has joined #ruby
JeanCarloMachado has joined #ruby
<havenwood>
AHemlocksLie: The gist I linked to above is one nice path to take. Or you could install a Ruby just for that user with ruby-install and use chruby to set the correct env vars.
enterprisey has quit [Remote host closed the connection]
CloCkWeRX has quit [Quit: Leaving.]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
roger_rabbit has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
eizua has quit [Remote host closed the connection]
<havenwood>
jaspervdj: It's a LALR (look-ahead left reverse right-most) derivation parser. The book Ruby Under a Microscope has a good explanation.
<havenwood>
jaspervdj: It's pretty nifty. Neat to look at with Ruby stdlib's Ripper.
roger_rabbit has quit [Quit: WeeChat 0.3.8]
<jaspervdj>
havenwood: thanks for the pointer, I'll have a look at the book! I'm undecided as to whether or not I like it because I appreciate context-free grammars generally.
shinnya has joined #ruby
<havenwood>
jaspervdj: You can also use the -y flag to see what grammar rules are being used, like: ruby -y -e "def test02; def a(x); x end; a /b/i end"
<jaspervdj>
oh sweet
l4v2 has quit [Quit: l4v2]
Guest69 has joined #ruby
blackwind_123 has quit [Ping timeout: 256 seconds]
TomyLobo has quit [Ping timeout: 255 seconds]
railswebdev has joined #ruby
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
<jaspervdj>
/quit/quit
jaspervdj has quit [Quit: leaving]
bpmedley has quit [Ping timeout: 252 seconds]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
enterprisey has joined #ruby
haylon has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
nofxxx has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
<marchelzo>
so if i say '1234567', what should the output be?
<marchelzo>
size=3
a346 has joined #ruby
<nofxxx>
newrubycoder, just one 'btw': get 'rubocop' into your editor, or run it on code. You'll start with the right foot on ruby
<nofxxx>
in your editor is fantastic, you have inline ruby tutoring
_sfiguser has quit [Ping timeout: 240 seconds]
<newrubycoder>
marchelzo: is will split into arrays of 3, discard the 7 because it's not enough size, then it should reverse the first into [3, 2, 1] and rotate the second to [5, 6, 4] and then join them together to 321564
<newrubycoder>
nofxxx: can i get it for sublime text
amclain has quit [Quit: Leaving]
<nofxxx>
newrubycoder, I believe so. goog sublime+rubocop
lx4 has joined #ruby
LoneHermit has joined #ruby
<newrubycoder>
the logic of the code is good, if i tell it to p "reverse" and p "rotate", i'll get the operations in correct order, i just don't know how i can apply it to the arrays separately, then get a modified array back which i can .join and output
<marchelzo>
i see
LoneHermit has quit [Remote host closed the connection]
LoneHermit has joined #ruby
<marchelzo>
instead of return, use the mutating variant of map, and remove the call to .join
<marchelzo>
wait
<marchelzo>
it seems there's a logic error
<newrubycoder>
yeah maybe
LoneHermit has quit [Ping timeout: 255 seconds]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
<newrubycoder>
i think the logic is good until the last if line
<marchelzo>
ok, so let f xs be reverse(xs) if the sum of the cubes of xs is odd, and rotate(xs) otherwise. then you want digit_groups.map { |g| f(g).join }.join
JeanCarloMachado has joined #ruby
brent__ has joined #ruby
a346 has quit [Quit: a346]
_sfiguser has joined #ruby
<newrubycoder>
what does f and xs mean?
<newrubycoder>
i mean i guess it's variables but dunno how to incorporate it
brent__ has quit [Ping timeout: 240 seconds]
<marchelzo>
you can just inline f anyway
<marchelzo>
so like
yeltzooo has quit [Remote host closed the connection]
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
<newrubycoder>
wow thanks so much!!!!!
JeanCarloMachado has joined #ruby
<newrubycoder>
now i can finally take the weekend off lol
<marchelzo>
lol
mistermocha has joined #ruby
saneax is now known as saneax-_-|AFK
<marchelzo>
you're welcome
tildes has joined #ruby
ponga has joined #ruby
ponga has quit [Client Quit]
Abhijit has joined #ruby
<Abhijit>
hello
<newrubycoder>
hey
<Abhijit>
is there any standalone English Dictionary app / gem for ruby? Without free / paid api.
<Abhijit>
or thesaurus.
hahuang65 has quit [Remote host closed the connection]
haylon has quit [Remote host closed the connection]
haylon_ has joined #ruby
Anonymoose2 has joined #ruby
reverberations has quit [Ping timeout: 256 seconds]
tjazh has joined #ruby
enterprisey has quit [Ping timeout: 256 seconds]
pilne has quit [Quit: Quitting!]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
tjazh has quit [Quit: tjazh]
JeanCarloMachado has joined #ruby
simmib has joined #ruby
<atmosx>
Abhijit: I am not sure, however you can export all the English wrods contained in aspell dictionaries to a text file and use it to match-up-against... implementing your own solution.
marchelzo has quit [Quit: marchelzo]
astrobunny has joined #ruby
simmib has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
Abhijit_ has joined #ruby
Abhijit has quit [Ping timeout: 240 seconds]
renchan has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
tlahtoani has quit [Quit: Connection closed for inactivity]
JeanCarloMachado has joined #ruby
agent_white has quit [Ping timeout: 255 seconds]
tildes has quit [Ping timeout: 240 seconds]
tildes has joined #ruby
bocaneri has joined #ruby
mistermocha has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
gizmore|2 has joined #ruby
askhat has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
gizmore has quit [Ping timeout: 264 seconds]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Channel6 has quit [Quit: Leaving]
rippa has joined #ruby
x00r__ has joined #ruby
Abhijit_ is now known as Abhijit
<askhat>
Good day, fellows! I have bit a conceptual question: so, I have service which serves rest-api and holds table with usernames and bcrypted passwords, also I have a bunch of other services with different purposes, at the back end. Now on the front, I have a js application, which supposed to communicate with all this back end stuff. How would you implement authentication strategy taking this circumstances, given all services (except auth service) holds
<askhat>
partially public partially private data?
tildes has quit [Ping timeout: 245 seconds]
<askhat>
BTW each services uses rack based frameworks
JeanCarloMachado has quit [Ping timeout: 240 seconds]
vuoto has joined #ruby
astrobunny has quit [Ping timeout: 255 seconds]
patarr has joined #ruby
tildes has joined #ruby
<atmosx>
askhat: you want to have a single authentication system for various different pieces?
<askhat>
atmosx exactly
Qchmqs has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
<atmosx>
askhat: well, I'm not sure if it will work for you, but couchdb has built-in a strong encryption system (pbkdf2) and uses a REST API. I use it for a side project and implementing authentication/authorization was very straight forward.
<ruby[bot]>
Inv1s1ble_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Inv1s1ble_>
So list_containers does list all the containers I want (the ones that start with /bigsense)
<Inv1s1ble_>
but if I just wanted a list of those containers, and try the following: "existing = sense_containers { |c| c }"
<apeiros>
Inv1s1ble_: block return is unrelated to method return
Qchmqs has quit [Quit: Konversation terminated!]
<Inv1s1ble_>
that returns the full list from Container.all and not what comes out of the yeild block. How do you take the elements within a yield statement and return them as an array?
Qchmqs has joined #ruby
<Inv1s1ble_>
can you reduce returns in the block into an array?
<apeiros>
you usually don't. you just use the existing Enumerable#map to do that
<Inv1s1ble_>
so ... do blocks in Ruby always contain side-effects then?
<arup_r>
now I need to set the logger to rails logger object :D let me read their doc no
<arup_r>
now*
<al2o3-cr>
arup_r: yours would work if you pass uri.host, uri.port to Net::HTTP.new
learning has joined #ruby
astrobunny has joined #ruby
<arup_r>
but I passed that to #new() method.. no idea. but it worked the way I wanted... so leave it, I have many other things to write :) Like CSS, JS and HTML now
<arup_r>
thanks once again to you al2o3-cr
<al2o3-cr>
arup_r: you passed uri.to_s
<al2o3-cr>
but ok
<arup_r>
yeah, without that .to_s I got another error
<arup_r>
implicit converstion not possible kind of
<arup_r>
#start() method as per the doc, doesn't take any arguments.. or I read it wrong.
<arup_r>
::start takes arguments as per my reading od the doc
<al2o3-cr>
arup_r: in yours you could of changed `http = Net::HTTP.new uri.to_s` to `http = Net::HTTP.new uri.host, uri.port` and everything would of been good
<arup_r>
hm. ok
<arup_r>
that could be the reason
astrobunny has quit [Ping timeout: 255 seconds]
patarr has joined #ruby
* al2o3-cr
uses Typhoeus for everything
braincrash has joined #ruby
chouhoulis has joined #ruby
qchmqs_ has joined #ruby
gloscombe_ has joined #ruby
<arup_r>
:)
chouhoulis has quit [Ping timeout: 245 seconds]
patarr has quit [Ping timeout: 252 seconds]
Qchmqs has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
ocbtec has joined #ruby
kernelPaniq has quit []
s0l__ has joined #ruby
charliesome has joined #ruby
montanonic has quit [Ping timeout: 264 seconds]
marr has quit [Remote host closed the connection]
arup_r has quit []
<s0l__>
im failing to install taglib-ruby on windows for 3 years now, is there anyone who could give me some tips
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<s0l__>
installing taglib-ruby-0.6.0-x86-mingw32 on ruby versions that are > 1.93 i get: LoadError: 126 .... taglib-ruby-0.6.0-x86-mingw32/lib/taglib_base.so
<s0l__>
module not found
blackmesa has quit [Ping timeout: 240 seconds]
<s0l__>
when i compile it i get: procedure not found
bpmedley has joined #ruby
govg has quit [Ping timeout: 276 seconds]
Definity has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
_mak has left #ruby [".."]
saltsa has joined #ruby
zeroDi has joined #ruby
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
toretore has joined #ruby
aryaching has joined #ruby
tomphp has joined #ruby
Tramy has joined #ruby
szulak has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
sagax has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
armyriad has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
armyriad has joined #ruby
Fernando-Basso has joined #ruby
Sembei has joined #ruby
Tramy has quit [Ping timeout: 245 seconds]
Pisuke has quit [Ping timeout: 258 seconds]
TomyLobo has joined #ruby
astrobunny has joined #ruby
galeido has quit [Quit: Lost terminal]
astrobunny has quit [Ping timeout: 255 seconds]
galeido has joined #ruby
Ishido has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
brent__ has joined #ruby
rrios has joined #ruby
rrios has joined #ruby
rrios has quit [Changing host]
jameser has joined #ruby
r__rios has quit [Ping timeout: 240 seconds]
nowhereman has quit [Ping timeout: 240 seconds]
brent__ has quit [Ping timeout: 258 seconds]
bigtawm has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
jcao219 has joined #ruby
learning has quit [Remote host closed the connection]
cdg has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
johnny56 has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
pandaant has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Derperperd has joined #ruby
tildes has joined #ruby
blackwind_123 has quit [Ping timeout: 264 seconds]
blackwind_123 has joined #ruby
Derperperd has quit [Ping timeout: 255 seconds]
xen0fon has joined #ruby
tvw has joined #ruby
cschneid_ has joined #ruby
astrobunny has joined #ruby
DaveTaboola has joined #ruby
Macaveli has joined #ruby
AnoHito has quit [Quit: Leaving]
Macaveli_ has joined #ruby
Macaveli_ has quit [Client Quit]
tvw has quit []
patarr has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
Macaveli has quit [Ping timeout: 240 seconds]
astrobunny has quit [Ping timeout: 255 seconds]
Macaveli has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soahccc>
Hmm can I call super somehow "dynamic"? Like __send__(:super)
patarr has quit [Ping timeout: 256 seconds]
biberu has joined #ruby
Macaveli has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
Macaveli has joined #ruby
cdg has quit [Remote host closed the connection]
patarr has joined #ruby
Macaveli has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
patarr has quit [Ping timeout: 260 seconds]
d^sh has quit [Ping timeout: 264 seconds]
d^sh has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
ejnahc has quit [Remote host closed the connection]
ejnahc has joined #ruby
<apeiros>
leitz: your Character class does not define an upp= method
<soahccc>
leitz: also the other error is because your generate method gives you a normal string with non of your defined methods
<leitz>
apeiros, should it? I'm actually trying to avoid that as it has already confused me in other areas. I am going back to very basic stuff and trying to move forward again.
<apeiros>
leitz: you tell me
<apeiros>
after all, you are trying to call upp= on it
<soahccc>
Opal requires an environment right? I can't just use a ruby method with it to get a JS version of it, right?
<apeiros>
so… why do you try to call that method if you don't define it? one side of it doesn't make sense. either define it, or don't call it.
<soahccc>
leitz: what are you asserting there anyway? in line 53
<leitz>
apeiros, ah, gimme a sec. I see what you me.
<leitz>
mean.
pandaant has quit [Remote host closed the connection]
hlmjr has joined #ruby
_sfiguser has joined #ruby
herbmillerjr has quit [Ping timeout: 240 seconds]
yokel has joined #ruby
despai has joined #ruby
Chagel has quit [Ping timeout: 264 seconds]
skitzo_1 has joined #ruby
skitzo_1 has quit [Remote host closed the connection]
tomphp has joined #ruby
DLSteve has joined #ruby
herbmillerjr has joined #ruby
hlmjr has quit [Ping timeout: 240 seconds]
Skitzo has quit [Ping timeout: 260 seconds]
<leitz>
Well, I'm not sure where the formatting went, but I fixed the "upp=" thing. What I don't get is why the test_has_upp fails.
<leitz>
My thought was that t_upp would be a string.
<leitz>
And then test for String.length
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<leitz>
soahccc, the line #53 test is that the string is empty, and then in theory the string is set on @character.generate.
jcao219 has quit [Ping timeout: 245 seconds]
<soahccc>
leitz: in line 49 you set @character to whatever generate returns (String) and then you call a method on it that only Character has
ismaris has joined #ruby
Jackneill_ has joined #ruby
<leitz>
Ah...I see. And generate returns @upp so @character is just a string, not an instance of Character.
<al2o3-cr>
also note, String.new return a empty string binary encoded
JeanCarloMachado has joined #ruby
yokel has quit [Ping timeout: 258 seconds]
<leitz>
soahccc, so the fix is to create a second Character with "@character = Character.new" and then "@character.generate"
jcao219 has joined #ruby
<soahccc>
leitz: I don't know what you are doing there in general :D
<leitz>
al2o3-cr, yes. I'm trying to keep a confused mind straight.
yokel has joined #ruby
<al2o3-cr>
okay
<leitz>
soahccc, I'm reworking the Ruby code I learned on 2 years ago. It's a mess, and I'm easily confused. Trying to fix both.
<leitz>
The mess and my confusion.
<soahccc>
leitz: the question is if you want to mutate the object or not. If so generate stays as it is (maybe with a bang! since it mutates) and you have to call show_upp on @base_character
<soahccc>
And talking about sanity... I try to port Shellwords.shellsplit to javascript and it's not going well
<leitz>
I like Shellwords.
<soahccc>
I don't even understand the regexp :(
<leitz>
So, the Character class is a shell; it could almost be a struct. The generate method will fill in the data. The "update" method will fill in data that isn't populated.
<leitz>
So I can get a basic character, or one with data. The basic is useful as a data transfer object.
<leitz>
The earlier issue was the old "upp" method did too many things and broke stuff.
despai has quit [Ping timeout: 276 seconds]
astrobun_ has quit [Read error: Connection reset by peer]
despai has joined #ruby
lxsameer has joined #ruby
astrobunny has joined #ruby
<soahccc>
So shellsplit uses a regex, would it be possible to determine whether a "word"/argument was indeed quoted or not? >foo "bar;"< vs >foo bar;<
<apeiros>
purely from the result? no
<soahccc>
well that I know :D I'm just asking whether it would be possible with a regex or do I need proper tokenizer?
ishigoya has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
I think it can be done with a regex. getting escaping handling right isn't too easy, though
ishigoya has joined #ruby
<soahccc>
yeah that is indeed the hard part, I wrote a (I would assume very bad) tokenizer once but I don't really want to port this to javascript :<
<apeiros>
but shell's splitting operation isn't exactly rocket science IMO
<apeiros>
(I may well be wrong - some things look easy at a glance)
<soahccc>
apeiros: do you know by any chance any game based on source engine?
<apeiros>
no idea
<soahccc>
because I'm actually porting some aspects of this engine to JS for my game project ;) that is the "syntax" of the config/console format
<soahccc>
basically shellsplit but I also need to know if an argument was quoted (or actually just if it wasn't). In order to split properly on ; separator.
<soahccc>
and for me the rocket science starts with quoting and nested quoting :)
JeanCarloMachado has quit [Ping timeout: 240 seconds]
haylon_ has quit [Remote host closed the connection]
haylon_ has joined #ruby
<apeiros>
nested quoting?
pilne has joined #ruby
cibs has quit [Ping timeout: 255 seconds]
<soahccc>
well something like: alias foo "alias bar \"something\"; something else"; foobar
<apeiros>
that's not really nested quoting. it's just escape sequences.
cibs has joined #ruby
<soahccc>
well a quote in something quoted :)
<soahccc>
qouteception
jhack has joined #ruby
<al2o3-cr>
2called_chaos i see it in your name now :p
<apeiros>
["alias", "foo", "alias bar \"something\"; something else;", "foobar"] is what you'd except from that?
<soahccc>
al2o3-cr: :D
<soahccc>
al2o3-cr: who told you my name :o
eminencehc has joined #ruby
<al2o3-cr>
off your gist
<soahccc>
apeiros: exactly
<leitz>
So, an attr_accessor like ":upp" will return "@upp"?
<leitz>
Or else my next test step is broke.
astrobunny has quit [Remote host closed the connection]
<apeiros>
leitz: yes
<soahccc>
al2o3-cr: oh well... I guess that gave it away
<apeiros>
`attr_accessor :upp` is short for `def upp; return @upp; end; def upp=(value); @upp = value; end`
<leitz>
Whew....I thought I had lost it. Again.
<soahccc>
al2o3-cr: but you are the first to notice (and mentioning it)
<apeiros>
(literally - that's what it does)
<al2o3-cr>
soahccc: yeah, ;)
<leitz>
Have I mentioned how much I love Ruby?
<leitz>
Dang...
despai has quit [Ping timeout: 276 seconds]
despai has joined #ruby
_sfiguser has quit [Ping timeout: 240 seconds]
<pagios>
hi all, i am trying to encrypt in javascript and decrypt in ruby the same msg , using AESCrypt i get OpenSSL::Cipher::CipherError - wrong final block length: any idea?
<pagios>
in javascript/angulat i am using the mdo-angular-cryptography AES
<pagios>
it encrypts and decrypts fine on javascript itself but when i try to decrypt in ruby i get that error
<pagios>
the encrypted text looks like: /validateQR?encryptedQR=U2FsdGVkX1+NqZlh9ItkRqeKnqveRTCHZzLmX2oRjGE=
<pagios>
Get request soahccc
<pagios>
using sinatra to get that request
jhack has quit [Quit: jhack]
astrobunny has joined #ruby
<leitz>
If the initialize method sets @appearence to String.new, and there is an attr_accessor for :appearence but no method setting it, why would a test of "assert(true, @character.appearence.length > 10)" pass?
<soahccc>
pagios: maybe try strict_decode64 otherwise your settings might not be the same on both ends (cipher mode or something)
<pagios>
what is strict decode?
<pagios>
soahccc, if i prpint the params in the get request they aren ot encoded, the are plain text
Derperperd has quit [Ping timeout: 258 seconds]
<apeiros>
soahccc: fun. I wrote an argument splitter and now I wonder about shellsplit…
<leitz>
soahccc, well, I'm not so new as to be allowed that mistake. However, even changing them the tests pass.
<soahccc>
apeiros: how it works or why it does things? I don't get why the last expression is optional for example
<apeiros>
oooh, I just figured. I misunderstood a part about shell splitting. I mean I actually knew it, but I never really realized
<apeiros>
quotes don't delimit arguments. they are just a form of escaping
<apeiros>
i.e. `"foo"bar"baz"` is a single argument
<apeiros>
well, adapting my code accordingly :D
eclm has quit [Quit: WeeChat 1.4]
<soahccc>
well that could explain why I don't understand the regex
<pagios>
soahccc, if i print :params they print in not encoded format, does it mean ruby is decoding them before?
<apeiros>
'""""""'.shellsplit # => [""]
<apeiros>
interesting. I somewhat expected no argument :)
<apeiros>
soahccc: so technically there are no quoted arguments either
Channel6 has joined #ruby
<apeiros>
an argument can start with a quote and end without
<apeiros>
and the other way round
<apeiros>
or have quotes in between
<soahccc>
apeiros: but I actually don't need this "feature". I abused shellsplit to allow arguments with spaces :)
<soahccc>
apeiros: so you wrote an argument splitter you say :>
<leitz>
The test in 111-113 passes even if I change ">" to "<". A test program shoes it as String and length of 0.
<apeiros>
yes
<apeiros>
I have to adapt it for my misunderstanding, though
<pagios>
hi, so i am using mdo-angular-cryptography to encrypt in javascript , sending that encrypted test in a get request to ruby and now trying to decrypt that string using AESCrypt module in ruby. Do i need more than the password to decrypt in ruby? should i use an IV along?
<soahccc>
apeiros: is yours easier to grasp? I need something to port to JS since I can't really find anything for this
<apeiros>
mine is in js
<apeiros>
ES6, but translating to ES5 if necessary should be trivial
blackmesa has joined #ruby
<soahccc>
es6 is supported by modern browsers no? I don't care about legacy
<leitz>
NevermindImanidiot...
<soahccc>
pagios: do you use angular for other stuff as well?
haylon_ has quit [Remote host closed the connection]
<apeiros>
anyway, metroid killing time (or ings, actually… there don't seem to be too many metroids in this game)
<apeiros>
soahccc: so you parse that and translate it for AR?
<soahccc>
yeah
<apeiros>
ok, then I indeed understood what it's intended to do :) nice!
astrobun_ has joined #ruby
<soahccc>
but it's a mess of reading charbychar with a lot of states and shit... very messy I guess but I never did something like this before ;) happy killing
_sfiguser has joined #ruby
Channel6 has quit [Quit: Leaving]
<apeiros>
well, that language is quite a bit more complex than the shellsplitting bit
<apeiros>
so no wonder it took you a bit longer than it took me for this ;-)
<apeiros>
I like the idea of using >=< as between operator
<soahccc>
I could do the same for this problem but this would be way to slow or a game loop I think... or I need to "precompile" the stuff
<pagios>
i am not able to decrypt in ruby that AES!\
despai has quit [Ping timeout: 240 seconds]
jhack has quit [Quit: jhack]
despai has joined #ruby
marchelzo has joined #ruby
jhack has joined #ruby
despai has quit [Ping timeout: 276 seconds]
<leitz>
Has anyone worked through Biner's "Testing Object Oriented systems"?
learning has joined #ruby
xxxrosaxxx has joined #ruby
<soahccc>
apeiros: I think I did it. Thank you very much, you saved me a lot of headache and I just had to add two lines to track quoting (with dirty magic strings)
<xxxrosaxxx>
Hello can someone tell me why I can't use a file.foreach do inside a case statement A and inside that case statement A use another case statement B with a when clause and inside that when clause is a file.foreach do? it won't write "does this work!" here is my ruby code -> https://gist.github.com/anonymous/7bd07016ad2f163c33c2c2f0f61216a4
<_mak>
maybe I should force the encoding somewhere?
<xxxrosaxxx>
for fuck sake -_- this is so annoying.
xxxrosaxxx has quit [Quit: Leaving]
johnzorn has joined #ruby
<_mak>
it can't be something with my terminal because I'm getting the same weird chars when I try to decompress it using javascript
<_mak>
so I must be missing something during the compression
ismaris has quit [Read error: Connection reset by peer]
<_mak>
I think it has to do with the base64 encoding... it seems that the chars are appearing once I encode/decode in base64
ismaris has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
tlahtoani has quit [Quit: Connection closed for inactivity]
ismaris has quit [Read error: Connection reset by peer]
vuoto has quit [Quit: Lost terminal]
vuoto has joined #ruby
<_mak>
yeah, it must be the encoding. Becode encoding to base64 the text is #<Encoding:UTF-8> but after decoding the text becomes #<Encoding:ASCII-8BIT>
<_mak>
I wonder why would the decode base64 function not revert to the original encoding
<elomatreb>
How should it know what the original encoding was?
<leitz>
xxxrosaxxx, have you printed out the results of the foreach? I'm not sure case can do a pattern match like that, but I'm a newbie myself.
<elomatreb>
If you're *sure* it was a certain encoding you can use String#encode to re-encode it again
<_mak>
elomatreb: It works fine if I use .force_encoding("UTF-8") on the decoded text... the problem is that I'm going to decode in JS, so I will need to force UTF-8 there then
Derperperd has joined #ruby
pragmaticus has joined #ruby
nowhereman has joined #ruby
cagmz has joined #ruby
<yorickpeterse>
manveru: heh yeah, it's never a boring day at GitLab
Derperperd has quit [Ping timeout: 255 seconds]
marchelzo has quit [Quit: marchelzo]
banisterfiend has joined #ruby
arashb has quit [Remote host closed the connection]
arashb has joined #ruby
yk_ has joined #ruby
xen0fon has joined #ruby
JeanCarloMachado has joined #ruby
flashpoint9 has joined #ruby
benlieb has joined #ruby
yk__ has joined #ruby
warreng_ has joined #ruby
marchelzo has joined #ruby
yk_ has quit [Ping timeout: 240 seconds]
<warreng_>
havenwood: i have a threadpool of workers and a queue where jobs go on. i want to kill the whole threadpool when all work is complete. so the expression "@queue.empty? && @queue.num_waiting == 10" is meant to capture the state where there is nothing left to do and all workers are done processing.
<warreng_>
however if the ruby interpreter were to switch between those two checks, it's possible that the queue could be empty when the first expression runs but there's still workers running. and then it context switches, and a worker pushes something new into the queue (so no longer empty?) but num_waiting might == 10
jcao219 has quit [Remote host closed the connection]
<warreng_>
(i'm checking logs, so feel free to respond even if i'm not in the channel)
frewsxcv_old has quit []
learning has quit [Remote host closed the connection]
Derperperd has joined #ruby
szulak has joined #ruby
marchelzo has quit [Remote host closed the connection]
nebg has quit [Quit: #eHito ZNC]
warreng_ has quit [Ping timeout: 260 seconds]
yokel has quit [Ping timeout: 240 seconds]
yokel has joined #ruby
<apeiros>
soahccc: yw
<apeiros>
soahccc: out of curiosity - care to gist your modified variant?
Lord_of_Life has quit [Excess Flood]
Lord_of_Life has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
astrobun_ has quit [Remote host closed the connection]
evilkhaoskat has joined #ruby
astrobunny has joined #ruby
emessp has joined #ruby
yk__ has quit [Quit: Leaving]
evilkhaoskat has quit [Client Quit]
knutmithut has quit [Ping timeout: 245 seconds]
emessp has quit [Client Quit]
evilkhaoskat has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
daed has quit [Quit: leaving]
despai has joined #ruby
evilkhaoskat has quit [Client Quit]
despai has quit [Client Quit]
JeanCarloMachado has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Nimonas has joined #ruby
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
elementaru has quit [Ping timeout: 257 seconds]
UserOO7 has joined #ruby
haylon has quit [Remote host closed the connection]
haylon has joined #ruby
sepp2k has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
haylon has quit [Remote host closed the connection]
haylon has joined #ruby
mihaj_ has joined #ruby
haylon has quit [Remote host closed the connection]
haylon has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
sagax has quit [Ping timeout: 240 seconds]
<mihaj_>
Hi all. I just started 'helloworld' on RoR. And see that on each browser request server re-render few *.erb files. That needs more then one 1s. It is normally ?
<mihaj_>
Rendered error.html.erb within rescues/layout (1206.7ms)
<lupine>
could be slow discs
<lupine>
or anything, really
<lupine>
profile it
ifctj has quit [Ping timeout: 255 seconds]
Channel6 has joined #ruby
<mihaj_>
Yes, disk is slow ( not SSD )... but file is less than 1kb
flashpoint9 has quit [Ping timeout: 258 seconds]
forgot_ has joined #ruby
KillerFox has joined #ruby
abdulmugni has joined #ruby
marchelzo has joined #ruby
minimalism has quit [Quit: minimalism]
<mihaj_>
wow.... 30% of CUP O_O
<mihaj_>
CPU
<mihaj_>
fast ruby,,, very fast))))
<toretore>
provide more information and context
sagax has joined #ruby
montanonic has joined #ruby
<lupine>
nah, I'm all for a nice long session of complaints about ruby performance
buzz0763 has joined #ruby
<buzz0763>
does anyone have good auth solutions they recommend?
<mihaj_>
Hey, stop. I understand your reaction, but. I need only find where is a problem. I am newbie in Ruby and answer like "<lupine> profile it" is poor for me
<buzz0763>
adam12: I really like rodauth -- but cant seem to make it work with rails and ohm :(
ur5us has joined #ruby
<adam12>
buzz0763: Yeah - no surprise considering the authors' library portfolio :)
<adam12>
buzz0763: That said, Jeremy is usually very receptive to questions.
Lord_of_Life has quit [Excess Flood]
<buzz0763>
thanks for the advice adam12!
<buzz0763>
adam12: wondering if anything comes close to as full featured as rodauth in rails land..
<adam12>
buzz0763: I always roll my own. I hate having to override everything. Most people use Devise.