<ruby[bot]>
hanmac: # => {"searchAppName"=>"Facebook\\n", "foundAppVersion"=>"v2.3", "foundAppName"=>"Facebook", "foundAppCod ...check link for more (https://eval.in/669238)
<toretore>
heh, i thought it was python..
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dminuoso_ has quit [Remote host closed the connection]
<toretore>
oh.. it is, but with yaml
<warrshrike>
its python-ish
<warrshrike>
the dudes who did this crawling shizz did it in python
igniting has joined #ruby
<warrshrike>
i doubt its YAML....i think thats a ruby thing
<warrshrike>
or is YAML a general purpose parser thing?
<toretore>
yes
<toretore>
yaml is a format
<warrshrike>
so you think this is yaml spit out by python?
<toretore>
it could very well be python "inspect" syntax too
<warrshrike>
so whats a man to do? just manually parse it?
pwnd_nsfw` has quit [Read error: Connection reset by peer]
<toretore>
you need: 1) output in a parseable format 2) to know what that format is
pwnd_nsfw` has joined #ruby
lxsameer has joined #ruby
<warrshrike>
errr...if I just had these files...then what?
<warrshrike>
couldnt some sort of regular expression shizz do it?
<toretore>
"this kinda looks like x, if i remove this and add that" works for about 5 minutes
<warrshrike>
No I mean if we just treat it as plain text...and dig out the data manually?
jottr has quit [Ping timeout: 260 seconds]
<toretore>
as i said, it will work for exactly the data you test it on, and then it won't on some future, unknown data
igniting has quit [Ping timeout: 245 seconds]
<warrshrike>
no i only need it to work now
<warrshrike>
for this specific data
<apeiros>
"boys"? srsly? the whole world tries to be more inclusive and you start with "boys". sheesh.
grh has quit [Remote host closed the connection]
<apeiros>
well, I guess some people are forever from yesterday.
<toretore>
relax bro, it's just locker room talk
<toretore>
*hides*
<warrshrike>
sorry man
<warrshrike>
im just a backwards country boy
<apeiros>
"I only need it to work now" - well, does yaml work or not? didn't sound like it wouldn't work?
<warrshrike>
R U A GIRL?
<apeiros>
maybe
benlieb has joined #ruby
<warrshrike>
ive never seen a GURL on programming ircs
<dminuoso_>
apeiros: Do you think this should be a thing?
conta has joined #ruby
<dminuoso_>
Because I think I can hack this into MRI quite easily... :o)
gusrub has joined #ruby
LoneHermit has joined #ruby
<ag4ve_>
just curious, how would i do that w/ a regex?
<warrshrike>
@tore-tore?
<warrshrike>
care to tell me again?
zukin has quit [Ping timeout: 252 seconds]
<ag4ve_>
(doesn't apply here, but i've done that type of thing in perl, so curious how it works in ruby)
yardenbar has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
<hanmac>
ag4ve_: you where nearly on the solution: h.keys.grep(foo).empty?
hutch34 has joined #ruby
User458764 has joined #ruby
<warrshrike>
i have file containing lines from python dictionary how can I parse it in ruby?
benlieb has quit [Quit: benlieb]
hutch34 has quit [Ping timeout: 252 seconds]
symm- has quit [Quit: Leaving...]
ur5us has joined #ruby
djbkd_ has joined #ruby
wugy has joined #ruby
<apeiros>
dminuoso_: I can't decipher what it does :) mind explaining?
<hanmac>
warrshrike: i did File.readlines("data.txt").map {|x| YAML.load(x[2..-3]) } and that works for your data ... (but i still think your data is ugly formated)
Derperperd has quit [Quit: Derperperd]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
xall_ has joined #ruby
firstdayonthejob has joined #ruby
shmuli has joined #ruby
AlexJakeGreen has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
Pumukel has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
xall_ has quit [Ping timeout: 268 seconds]
grh has joined #ruby
firstdayonthejob has quit [Ping timeout: 250 seconds]
xall has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
marsjaninzmarsa has quit [Remote host closed the connection]
aganov has joined #ruby
marsjaninzmarsa has joined #ruby
SesMan has joined #ruby
User458764 has joined #ruby
shmuli has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
Burgestrand has joined #ruby
warrshrike has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
SocratesTV has joined #ruby
elifoster has quit [Quit: sleep]
igniting has joined #ruby
hahuang61 has joined #ruby
ag4ve_ has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 260 seconds]
SocratesTV has quit [Client Quit]
alaing has joined #ruby
<alaing>
hi i'm having problems with bundler
<alaing>
I have just updated bundler to version 1.13.6 but when i run bundle --version its reporting 1.13.5
<alaing>
gem uninstall bundler shows two version 1.12.5 and 1.13.6
hahuang61 has quit [Ping timeout: 250 seconds]
aidalgol has joined #ruby
igniting has quit [Ping timeout: 252 seconds]
<alaing>
something odd is happening
<alaing>
when i do bundle install i get the following error too activesupport-5.0.0.1 requires ruby version >= 2.2.2, which is incompatible with the current version, ruby 2.0.0p648
<alaing>
but ruby --version says i'm using 2.3.1p112
jenrzzz has quit [Ping timeout: 260 seconds]
<apeiros>
so you have multiple rubies installed and are using different ones
<alaing>
apeiros: i'm using rbenv
<apeiros>
make sure you use the same ruby for all those operations
brianpWins has quit [Ping timeout: 260 seconds]
<alaing>
i think its bundler might be whats causing this fault
jenrzzz has joined #ruby
jenrzzz has joined #ruby
gusrub has quit []
<alaing>
apeiros: how do i check which ruby version is running for all those operations?
<alaing>
i though ruby --version would be the one its using
<apeiros>
bundler doesn't change the used ruby
<apeiros>
this is entirely your version manager in combination with any metainformation it uses to determine which ruby to use (such as a .ruby-version file f.ex.)
<apeiros>
I'm not using rbenv, so I can't tell. but yes, I'd expect `ruby --version` in the same directory to be the ruby which is also used for commands like bundler.
<alaing>
rbenv versions shows ruby 2.3.1 is being used because my project has a .ruby-version file that says 2.3.1
<apeiros>
but as said, not using rbenv. if it uses shims, then the used ruby depends on the executable, not the directory.
<apeiros>
try `which bundler`
<alaing>
/usr/local/bin/bundler
<apeiros>
maybe you're pulling in some a bundler executable which is "tied" to a ruby
<apeiros>
is /usr/local/bin where rbenv puts executables?
<alaing>
ah i see where you going with this
<alaing>
I dont think it is
<alaing>
thank you I'll dig around a bit more
xall_ has joined #ruby
ta__ has joined #ruby
xall has quit [Ping timeout: 265 seconds]
<apeiros>
yw, good luck
alaing has quit [Ping timeout: 244 seconds]
davix has joined #ruby
djbkd_ has quit [Remote host closed the connection]
govg has joined #ruby
shmuli has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shmuli has quit [Remote host closed the connection]
shmuli has joined #ruby
Toledo is now known as croberts
davix has quit [Ping timeout: 244 seconds]
mark_66 has joined #ruby
claudiuinberlin has joined #ruby
davix has joined #ruby
shmuli has quit [Remote host closed the connection]
dionysus69 has joined #ruby
abernstein has quit [Quit: abernstein]
joneshf-laptop has quit [Quit: Leaving]
aufi has joined #ruby
jottr has joined #ruby
Silthias has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
jaruga___ has joined #ruby
pokalyis has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
mikecmpbll has joined #ruby
flying has joined #ruby
mikecmpbll has quit [Client Quit]
Jackneill_ has joined #ruby
Pumukel has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
muelleme has joined #ruby
roamingdog has quit []
govg has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 250 seconds]
muelleme has quit [Ping timeout: 244 seconds]
antgel has joined #ruby
CloCkWeRX has quit [Ping timeout: 268 seconds]
j416 has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
ur5us has joined #ruby
Cohedrin has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Client Quit]
sonikspin has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
mikecmpbll has joined #ruby
govg has joined #ruby
palms has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mooru has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jsrn_ has joined #ruby
igniting has joined #ruby
palms has quit [Ping timeout: 260 seconds]
creat has quit [Ping timeout: 244 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
LoneHermit has joined #ruby
renderful has joined #ruby
<dminuoso_>
apeiros: I want inline assembly! :D
ace05 has quit [Remote host closed the connection]
<apeiros>
dminuoso_: look for zenspider's inline stuff
ace05 has joined #ruby
<dminuoso_>
:o
<apeiros>
I think he did that. even if only as a joke. wilson or somesuch iirc
<dminuoso_>
apeiros: That's inlined C code.
<dminuoso_>
I would like inlined Ruby bytecode.
<apeiros>
yes, afaik he also did inline asm with the same.
hanmac has quit [Remote host closed the connection]
xall has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
xall_ has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby
hanmac has joined #ruby
c355e3b has joined #ruby
igniting has joined #ruby
workmad3_ has quit [Ping timeout: 260 seconds]
Technodrome has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHermit has joined #ruby
anisha has joined #ruby
Tempesta_ is now known as Tempesta
Tempesta has quit [Changing host]
Tempesta has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
kareeoleez has quit []
antgel has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 244 seconds]
jaguarmagenta has joined #ruby
bkxd has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
anisha has quit [Quit: This computer has gone to sleep]
pokalyis has joined #ruby
xall_ has joined #ruby
marr has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 268 seconds]
xall has quit [Ping timeout: 265 seconds]
marr has joined #ruby
Jameser has joined #ruby
Beams has quit [Quit: .]
hammed has joined #ruby
<hammed>
anyone here has root
xall_ has quit [Ping timeout: 250 seconds]
haxrbyte has joined #ruby
<dminuoso_>
hammed: No.
<dminuoso_>
Im confident that someone here does not.
<toretore>
i have a root
<Burgestrand>
i am root
jeyraof has joined #ruby
govg has quit [Ping timeout: 250 seconds]
wopsbp has quit [Ping timeout: 244 seconds]
Beams has joined #ruby
Pumukel has joined #ruby
<hammed>
anyone here help me with ubuntu root
<dminuoso_>
toretore: Just one?
<dminuoso_>
What do you do with it?
<Burgestrand>
i'm also just one root
<Burgestrand>
there are many like it
<dminuoso_>
hammed: Please do not private message me.
<Burgestrand>
hammed your question is very confusing, what are you after?
<hammed>
i need root to get many roots
nekcode has joined #ruby
kaffepanna has joined #ruby
<Burgestrand>
i don't have any caps today, it's like casual monday
<toretore>
hammed: stop messaging people like that
<hammed>
o
<hammed>
ok
<hammed>
i need root to get more of roots
<toretore>
do you have a ruby related question?
User458764 has joined #ruby
<hammed>
i know about ruby
<hammed>
to add for user and pass
Pumukel has quit [Ping timeout: 250 seconds]
pandaant has joined #ruby
<Burgestrand>
i'm afraid I don't understand what you're trying to do, or where you're trying to do it :(
<hammed>
why some ruby dont add
<Burgestrand>
crap, I capsed
<hammed>
lol
acamargo has joined #ruby
rodfersou|afk is now known as rodfersou
jcao219 has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
igniting has quit [Ping timeout: 265 seconds]
hahuang61 has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
faces has joined #ruby
anisha has joined #ruby
nekcode has quit [Quit: nekcode]
hammed has quit [Excess Flood]
hammed has joined #ruby
john has joined #ruby
john has quit [Client Quit]
aphprentice has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
lenwood has joined #ruby
synthroid has joined #ruby
Heero has quit [Ping timeout: 250 seconds]
aphprentice has joined #ruby
Heero has joined #ruby
aphprentice has quit [Client Quit]
skweek has joined #ruby
antgel has joined #ruby
millerti has joined #ruby
millerti has quit [Max SendQ exceeded]
Snowy has joined #ruby
Snowy has quit [Client Quit]
quazimodo has quit [Ping timeout: 256 seconds]
lenwood has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Remote host closed the connection]
Ropeney has joined #ruby
hutch34 has joined #ruby
XV8 has joined #ruby
gingray has quit [Ping timeout: 260 seconds]
haxrbyte has quit [Quit: Leaving...]
<sparch>
lula preso amanhã
<dminuoso_>
mv a a/b #=> "Invalid argument"
<dminuoso_>
Love these kinds of diagnostics.
<dminuoso_>
"You fucked up but Im not gonna tell you how"
jottr has joined #ruby
<apeiros>
yeah. tons of software have crap error messages. it's so sad. you'd think devs know the value of good error messages. but nooooo…
<apeiros>
"fuck you for having an issue"
tessi_zz has quit [Remote host closed the connection]
<dminuoso_>
apeiros: Honestly Ruby is not better. The fact that it emits raw flex token names on syntax errors can be super annoying to the inexperienced.
<dminuoso_>
This is actually something I could relatively easily fix and perhaps even submit...
<apeiros>
dminuoso_: I know :-/
tvw has joined #ruby
<apeiros>
it has gotten better in some areas. but in many it's still bad.
<dminuoso_>
I mean I know what a "tEND" is and why it's different from "end" - but ...
<apeiros>
and I understand it where additional diagnostics are costly. but there's plenty of places where it isn't. and where it is, having them enabled optionally would be nice.
<dminuoso_>
apeiros: Ruby has the luxury of a very simple grammar - making most diagnostics trivial to implement - unlike C++
<dminuoso_>
Though the "void argument detected" is one of the shittiest.
<dminuoso_>
In fact I feel like Ruby could simply ignore it.
<dminuoso_>
Who cares if there's dead AST nodes.
<dminuoso_>
"return nil; puts foo;" - Ruby should choke on this too or not at all.
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<blackbombay_>
it doesn't bother me, but some ppl might find it offensive.
bkxd has joined #ruby
aupadhye has quit [Quit: Leaving]
<apeiros>
blackbombay_: is this an innuendo to an argument about which kinds of offenses are acceptable and which aren't?
<blackbombay_>
no, not an argument.
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros>
but an innuendo? :D
senayar has joined #ruby
<dminuoso_>
blackbombay_: There is very little point to say things in a roundabout way in the internet. Expressive language makes it much clearer.
<apeiros>
dminuoso_, blackbombay_: if we want to have that discussion - sure. but please over in either #ruby-offtopic or #ruby-community
<apeiros>
(depending on whether it shall be discussing it for fun or for channel politics)
<dminuoso_>
I don't give a fuck. :-P
* dminuoso_
goes back to productive things
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tessi_zz has joined #ruby
nankyokusei has joined #ruby
claudiuinberlin has quit [Ping timeout: 260 seconds]
nekcode has joined #ruby
ace05 has quit [Ping timeout: 256 seconds]
mluts has quit [Ping timeout: 250 seconds]
igniting has joined #ruby
ace05 has joined #ruby
workmad3_ has joined #ruby
vali has quit [Ping timeout: 245 seconds]
bkxd has quit [Quit: Lost terminal]
jcao219 has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
elomatreb has quit [Quit: mep mep]
nankyoku_ has joined #ruby
elomatreb has joined #ruby
Guest8256 is now known as kyle__
nankyokusei has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
workmad3_ has quit [Ping timeout: 256 seconds]
nopolitica has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
tyang has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<rfoust_>
Hi, not sure if this is the place to ask, but when I do a 'gem install mysql2' then I get an error that it doesn't know how to set rpath on my system. I'm on a mac.
<rfoust_>
the more specific error is "Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load"
renderful has joined #ruby
drogo has left #ruby [#ruby]
<dminuoso_>
rfoust_: Please gist the *entire* output until the end, starting from "Fetching: mysql2.... yadayadayada"
<dminuoso_>
You can thank Apple for deprecating OpenSSL and providing its own TLS library.
anisha has quit [Quit: This computer has gone to sleep]
skweek has quit [Ping timeout: 245 seconds]
kobain has joined #ruby
centrx has quit []
ben__ has joined #ruby
Littlemyu has joined #ruby
Littlemyu is now known as ryovaa
JoshS has quit [Ping timeout: 268 seconds]
jphase has joined #ruby
Vingador has joined #ruby
skweek has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
h1fuelcell has joined #ruby
ben__ has quit [Remote host closed the connection]
bmurt has joined #ruby
Ropeney has quit [Remote host closed the connection]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aegis3121 has joined #ruby
mluts has joined #ruby
malconis has joined #ruby
<rfoust_>
dminuoso_: the bundle config command worked. should that make the gem install work? It still fails.
h1fuelcell has quit [Ping timeout: 244 seconds]
matp_ is now known as matp
ben__ has joined #ruby
nankyoku_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
Pumukel has joined #ruby
malconis has quit [Ping timeout: 252 seconds]
malconis has joined #ruby
jottr has joined #ruby
DLSteve has joined #ruby
cdg has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 250 seconds]
DLSteve has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
<rfoust_>
I verified those openssl paths exist on my system
<hanmac>
rfoust_: does the error change? does it show some different output?
h1fuelcell has joined #ruby
<rfoust_>
hanmac: looks like the same error
DLSteve has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
h1fuelcell has quit [Read error: Connection reset by peer]
h1fuelce_ has joined #ruby
hahuang61 has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
DLSteve has quit [Client Quit]
DLSteve has joined #ruby
User458764 has joined #ruby
h1fuelce_ has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
jottr has quit [Quit: WeeChat 1.5]
mostlybadfly has joined #ruby
rodfersou is now known as rodfersou|lunch
jaguarmagenta has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nopolitica has joined #ruby
Beams has quit [Quit: .]
yardenbar has quit [Ping timeout: 252 seconds]
Guest57477 has joined #ruby
Beams has joined #ruby
claudiuinberlin has joined #ruby
<dminuoso_>
Next one:
<dminuoso_>
"invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
<dminuoso_>
#=> Now which one is it? ...........
harai has quit [Ping timeout: 260 seconds]
jhack has quit [Quit: jhack]
jhack has joined #ruby
jbeeze has joined #ruby
Guest66 has joined #ruby
ag4ve_ has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
Guest66 has quit [Client Quit]
shinnya has joined #ruby
lipoqil has quit [Ping timeout: 250 seconds]
deimos has quit [Ping timeout: 250 seconds]
deimos has joined #ruby
chrisseaton has quit [Ping timeout: 250 seconds]
<toretore>
dminuoso: probably not the case here, but sometimes it's good to be vague about exactly what went wrong with authentication/authorization
avdi has quit [Read error: Connection reset by peer]
zipkid has quit [Ping timeout: 250 seconds]
<dminuoso_>
toretore: How can it be good to be vague?
avdi has joined #ruby
lipoqil has joined #ruby
chrisseaton has joined #ruby
pandaant has quit [Quit: Lost terminal]
lenwood has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
zipkid has joined #ruby
rob_ has joined #ruby
<toretore>
dminuoso: imagine someone trying to guess username/password combos, if you tell them "the username is right, but the password is wrong" you make it easier for them
Guest57477 has quit [Ping timeout: 252 seconds]
<dminuoso_>
toretore: That has absolutely nothing to do with ruby exception messages.
<toretore>
a little contrived, i know, but stuff like that
<dminuoso_>
Exceptions are not meant to show the user what the problem was.
chouhoul_ has quit [Remote host closed the connection]
<dminuoso_>
They are meant to tell the developer what the problem was.
jaguarmagenta has quit [Remote host closed the connection]
<dminuoso_>
Being forced to byebug and loghell my way through OAuth is not what I consider a fun day at work.
Guest57477 has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
whiteline has joined #ruby
<toretore>
well, the question is, with the api it's using, is it able to be more specific? it seems like it's just forwarding the error from the server
<dminuoso_>
toretore: It is the error message from doorkeeper yes. Diagnostics wise its extremely shitty.
<dminuoso_>
If things go wrong, you are left with some pretty bizarre error messages.
jaguarmagenta has quit [Remote host closed the connection]
User458764 has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
CloCkWeRX has quit [Ping timeout: 245 seconds]
vondruch has left #ruby [#ruby]
Derperperd has joined #ruby
nekcode has quit [Quit: nekcode]
vondruch has joined #ruby
<dminuoso_>
toretore: So I figured it out - I never set up a resource_owner_from_credentials block to tell Doorkeeper how to implement the Resource Owner Credential Flow - which caused it to default to a 401 unauthorized, adding the error message from top
<dminuoso_>
Disgusting useless stuff.
oniifiv has quit [Quit: Who turned this off?! D:<]
Derperperd has quit [Client Quit]
Silthias1 has joined #ruby
nanoz has joined #ruby
Silthias has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
Pumukel has joined #ruby
<rfoust_>
finally got it working... had to install the xcode command line tools. "xcode-select --install"
<rfoust_>
no idea why. :)
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nekcode has joined #ruby
symm- has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
DroidBurgundy has joined #ruby
<dminuoso_>
I have a spec that needs to decode a JWT and then run some expectations on the decoded token. Is there a way to have expect {}.not_to raise_error assign a value inside the block and then reuse it for the next expectation?
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
polishdub has joined #ruby
BackEndCoder has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
kingkong- has quit [Remote host closed the connection]
ule has quit [Quit: leaving]
jhack has quit [Quit: jhack]
ule has joined #ruby
BackEndCoder has joined #ruby
abernstein has joined #ruby
kingkong- has joined #ruby
jhack has joined #ruby
vali has joined #ruby
kspencer has quit [Quit: switching over to znc]
Guest68326 has joined #ruby
Guest68326 is now known as kspencer
kspencer has joined #ruby
kspencer has quit [Changing host]
dviola has joined #ruby
<ljarvis>
dminuoso_: why would you want that? just assign it without the block/expect?
<ljarvis>
i never understood not_to raise_error
<dminuoso_>
ljarvis: JWT.decode will raise exceptions when the JWT is invalid, expired and what not.
<ljarvis>
it's kinda implied by just writing code
<ljarvis>
right, but you're asserting that it doesnt raise an error
<dminuoso_>
mmm
thisirs has joined #ruby
jrafanie has joined #ruby
<ljarvis>
dunno, it's personal opinion but the stuff that asserts nothing was raised is pointless to me. All it really does it catch exceptions and then print them in a more friendly mannor, doesn't help the test suite at all imo
<ljarvis>
manner*
bluOxigen has quit [Ping timeout: 268 seconds]
araujo has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
wugy has quit []
<Burgestrand>
imo it does help if that's the only statement, having a single expression and no assertions in a test is kind of strange
araujo has joined #ruby
meshsmith has joined #ruby
rodfersou|lunch is now known as rodfersou
shinnya has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
<Burgestrand>
it could just as easily be a comment too though, if that's what one prefers
grh has quit [Ping timeout: 256 seconds]
ChiefAlexander has joined #ruby
<ljarvis>
i guess if it was a single expression i'd agree, but in which case the spec description should be explicit
<ljarvis>
it "successfully does X" or it "does not raise an error when doing Y"
<ljarvis>
no need for superfluous code or comments
chouhoulis has joined #ruby
ta__ has quit [Remote host closed the connection]
benlieb has quit [Client Quit]
rkazak has joined #ruby
<dminuoso_>
ljarvis: Well Im just trying to be explicit about what the test actually covers.
dionysus69 has joined #ruby
<ljarvis>
fair enough
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dviola has quit [Quit: WeeChat 1.6]
dviola has joined #ruby
h1fuelcell has joined #ruby
mark_66 has quit [Remote host closed the connection]
workmad3 has quit [Read error: Connection reset by peer]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
en0x has quit [Changing host]
en0x has joined #ruby
jrafanie has joined #ruby
pawnbox has joined #ruby
workmad3 has joined #ruby
ben__ has quit [Remote host closed the connection]
ziarkaen has joined #ruby
ben__ has joined #ruby
Xentil has joined #ruby
h1fuelcell has quit []
dminuoso_ has quit [Ping timeout: 250 seconds]
aufi has quit [Ping timeout: 252 seconds]
zeroDi has joined #ruby
abernstein has quit [Ping timeout: 265 seconds]
Frankenstein has quit [Changing host]
Frankenstein has joined #ruby
Guest96381 is now known as alamar
Pumukel has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
tdy has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
aegis3121 has quit [Ping timeout: 256 seconds]
Pumukel has quit [Ping timeout: 250 seconds]
rodfersou is now known as rodfersou|afk
aegis3121 has joined #ruby
tdy has joined #ruby
nettoweb has joined #ruby
nankyokusei has quit [Remote host closed the connection]
hahuang61 has joined #ruby
railssmith has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
Dohplay has joined #ruby
cpruitt has joined #ruby
GodFather has joined #ruby
hahuang61 has quit [Ping timeout: 252 seconds]
Devalo has quit [Ping timeout: 260 seconds]
marxarelli has joined #ruby
amclain has joined #ruby
jrafanie has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jrafanie has quit [Client Quit]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jphase has quit [Remote host closed the connection]
xall_ has joined #ruby
mhib has joined #ruby
aganov has quit [Remote host closed the connection]
eljimmy has joined #ruby
Guest66 has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
blackbombay has joined #ruby
Dohplay has quit [Read error: Connection reset by peer]
<wrkrcoop>
what is the difference between a mixin and a library?
<ljarvis>
wrkrcoop: a mixin is a module, a library is a Ruby Gem
<wrkrcoop>
ljarvis: but gems can be modules correct?
<baweaver>
which is normally contained in a module
<ljarvis>
wrkrcoop: gems can contain modules
<ljarvis>
they don't *have* to though
railssmith has quit [Ping timeout: 260 seconds]
<ljarvis>
a gem is just a collection of ruby code
<wrkrcoop>
ljarvis: i see
<wrkrcoop>
why not just call mixins modules?
flying has quit []
nekcode has left #ruby [#ruby]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nekcode has joined #ruby
dviola has joined #ruby
nekcode has quit [Client Quit]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jameser has joined #ruby
lenwood has quit [Ping timeout: 244 seconds]
LeBlaaanc has quit [Client Quit]
millerti has joined #ruby
jhack has quit [Quit: jhack]
<ljarvis>
well they don't mean exactly the same thing
<wrkrcoop>
whats the dif
<ljarvis>
people refer to modules as mixins when they're designed to be included into a class
<ljarvis>
but that's not the only use for a module as I'm sure you're aware
<millerti>
I've got a Ruby program that's just too slow. It should be I/O bound, but it's CPU bound. The inner-most code takes a string of 16 hex digits and replaces "FF" with "F", "00" with "0" and anything else with "X" and then it counts up those patterns in a hash. Is there a faster way to do that string computation than slice!(0..1) and some if/else statements?
<ljarvis>
millerti: str.squeeze("F0") might be faster, but obviously it's not exactly the same, since it'll replace "FFFF" with "F"
<ljarvis>
so if that matters, perhaps use String#tr
nankyokusei has joined #ruby
<ljarvis>
either way, you don't need conditions
<baweaver>
showing the actual code helps divine more though.
<baweaver>
!gist.
<ljarvis>
^ truth
<baweaver>
!gist
<ljarvis>
?gist
<ruby[bot]>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver>
so many bot conventions I lose track
edwinvdgraaf has quit [Remote host closed the connection]
govg has joined #ruby
SeepingN has joined #ruby
<ljarvis>
wrkrcoop: make sense?
edwinvdgraaf has joined #ruby
<millerti>
ljarvis: byte=num.slice!(0..1); if (byte=="FF") pattern<<"F" elseif (byte=="00") pattern<<"0" else pattern<<"X" end
<wrkrcoop>
sorry let me read that
<wrkrcoop>
thanks ljarvis. i appreciate it
<millerti>
ljarvis: I'm not sure how tr will do that...
<ljarvis>
millerti: can you gist the full code?
igniting has joined #ruby
nanoz has quit [Quit: <3]
mluts has quit [Remote host closed the connection]
nikivi has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
[ddmp] has quit [Read error: Connection reset by peer]
ben______ has joined #ruby
ryovaa has quit [Ping timeout: 265 seconds]
[ddmp] has joined #ruby
jaguarmagenta has joined #ruby
ben__ has quit [Ping timeout: 260 seconds]
roflmyeggo has joined #ruby
zukin has joined #ruby
gusrub has joined #ruby
ngrin has joined #ruby
tomphp has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
Guest57477 has quit [Ping timeout: 256 seconds]
skweek has quit [Ping timeout: 245 seconds]
vuoto has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
frankiee_ has joined #ruby
<roflmyeggo>
it seems odd to me that ruby uses `def self.method` for class methods, yet instance methods just use the `def method`
senayar has quit []
<roflmyeggo>
when its calling an instance method, wouldnt the underlying call be: `Class.method(instance)`
<al2o3-cr>
Anyone no of a gem to determine image types
meshsmith has quit [Remote host closed the connection]
<jokke>
is it possible to somehow iterate over bundled gems?
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
<alexandernst>
what is the difference between including something at the top of the file and including that same thing inside a class (in the same file) ?
xall has joined #ruby
wrkrcoop has joined #ruby
User458764 has joined #ruby
<jokke>
i want to write a rake task which pushes the gem and all depencies that aren't available from rubygems to a remote server
<ljarvis>
alexandernst: depends what it is, usually that's done so you don't need to define the class inside the file that's being required
<jokke>
to find those dependencies i'd need to look at the dependencies and see if theyre fetched from a certain git server
the_drow has quit [Quit: This computer has gone to sleep]
<ljarvis>
otherwise you need to write class Foo; class Bar. requiring it inside the class allows you to write class Foo::Bar because Foo is now defined
ngrin has quit [Quit: Leaving]
ngrin_ has joined #ruby
ngrin_ has quit [Remote host closed the connection]
<apeiros>
alexandernst: beware, include and require are two different things. do you really mean include?
<ljarvis>
right, I assumed require :)
ngrin has joined #ruby
<pizzatonnocipoll>
is it true that ruby multi-threading doesn't take advantage of multiple cores?
<blackbombay>
IO bound operations might run in parallel.
<apeiros>
ruby, the language, doesn't prescribe anything in that regard
<jokke>
pizzatonnocipoll: there are gems like Parallel for true multithreading
<jokke>
except that spawns actual processes right?
<apeiros>
MRI, one ruby interpreter, does not allow parallelism (which means multiple cores won't run ruby code at the same time)
<alexandernst>
ljarvis: nothing too special. I have foo/bar.rb -> module Foo \n module Bar \n def say_moo ...and I use that as a filter for my methods in a controller (in rails)
<havenwood>
pizzatonnocipoll: CRuby has a GVL where some things might lock the VM but JRuby and Rubinius do not.
<apeiros>
pizzatonnocipoll: jruby, another ruby interpreter, does allow parallelism
<blackbombay>
apeiros: not totally true, to say it does not allow parallelism. there is fork, and IO bound operations.
<apeiros>
blackbombay: correct. but the scope was threading.
<apeiros>
blackbombay: also there's even with threads some parallelism happening. but (afaik) no ruby code ever.
<blackbombay>
havenwood: rubinius is better forgotten about.
* apeiros
afk, brb
<ljarvis>
alexandernst: right, then you're including that module into the current module/class. If you add it to the top of the file you're including the module into the toplevel, which you probably dont want
benlieb has quit [Quit: benlieb]
<alexandernst>
ljarvis: what exactly happens when I include it in the toplevel?
ngrin has quit [Client Quit]
ngrin has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
jaruga___ has quit [Quit: jaruga___]
<havenwood>
jokke: Are you using just RubyGems for your Gemfile or Bundler as well?
<jokke>
havenwood: both
<jokke>
havenwood: i specify all gems in gemspec
<jokke>
and those that aren't on rubygems i add to the gemfile with git: '...'
<jokke>
i just found Bundler.environment
sepp2k has quit [Quit: Leaving.]
<jokke>
it's just a string, but better than nothing i guess
jsrn_ has quit [Quit: Leaving]
<jokke>
oh
<jokke>
no it's not
<jokke>
ahh
<jokke>
great
gusrub has quit [Remote host closed the connection]
<ljarvis>
alexandernst: well the toplevel is call "main", and it's an instance of Object, when you include a module in main it'll be available as an instance method on Object (and thus available pretty much everywhere). There's a bit more to do, but in short, you shouldn't do it.
<blackbombay>
you can just return a hash from that method instead.
<millerti>
blackbombay: I'm counting occurrences of these patterns.
JoshS has joined #ruby
<millerti>
blackbombay: Do you think the global is slowing things down
<millerti>
?
<blackbombay>
you prob don't wanna use a global variable but i guess for a short script like that it doesn't matter.
AlexJakeGreen has quit [Remote host closed the connection]
<blackbombay>
nope.
<blackbombay>
it's just considered a bad practice, generally speaking.
pizzatonnocipoll has quit [Ping timeout: 260 seconds]
<blackbombay>
i would rewrite to return a hash from that method instead, and initialize it there. if you need to increment it over multiple method calls & persist the hash, id accept it as a second arg.
igniting has joined #ruby
<alexandernst>
ljarvis: hmm... so... the thing is that including that file in my toplevel I'm able to do say_moo() from anywhere
<blackbombay>
but anyway for a short script it doesnt matter.
<millerti>
blackbombay: I am calling that method many many times.
hahuang61 has joined #ruby
<alexandernst>
but if I include that file inside my class, I can't call say_moo in any way
TomyLobo has joined #ruby
nitric has joined #ruby
benlieb has quit [Client Quit]
<ljarvis>
alexandernst: you don't want to be able to call it *everywhere* though do you? that's pretty mental
<blackbombay>
yeah, i would use a second argument, like def count_pattern(num, h={}).
chouhoul_ has joined #ruby
<alexandernst>
ljarvis: yes, but I'd still like to call it from the file I'm including it
<alexandernst>
ljarvis: I tried Foo::Bar.say_moo, but that's not working
jcao219 has quit [Ping timeout: 252 seconds]
<ljarvis>
alexandernst: right, include will include those methods as instance methods
<ljarvis>
alexandernst: try extend
jhack has joined #ruby
<ljarvis>
alexandernst: then check the docs on include vs extend
<millerti>
blackbombay: OK, but I'm not sure that's really the main bottleneck...
<havenwood>
millerti: Does the pattern matching actually work like you want it to? Can more than two FFs or 00s be together or is it always two?
<blackbombay>
millerti: no, it wouldn't be..
<ljarvis>
the pattern matching thing makes no sense to me
<ljarvis>
with the single assignment
<havenwood>
me neither
<alexandernst>
ljarvis: doesn't work either. The error I get is 'undefined method say_moo in Foo::Bar:Module'
<ljarvis>
millerti perhaps you could add some examples of input => output?
<millerti>
ljarvis: I'm trying to assess patterns of bytes in an L2 cache. When are bytes 0's, when are they FF's, and when are they something else?
<ljarvis>
alexandernst: can you show me some code? :)
<alexandernst>
(whenever I try to do Foo::Bar.say_moo)
<alexandernst>
ljarvis: sure
Chair has quit [Ping timeout: 265 seconds]
<millerti>
Ok, here's an example: FF300057FF00FF -> FX0XF0F
chouhou__ has joined #ruby
bmurt has joined #ruby
<millerti>
Well, I miscounted, but you get the idea.
<ljarvis>
ok, but that makes no sense for your example
<alexandernst>
ljarvis: how I use it: include Authz::Authorizable and then "Authz::Authorizable.authorize arg1 arg2" right on top of a def in a controller in my rails code
<alexandernst>
ljarvis: and the exact error: undefined method `authorize' for Authz::Authorizable:Module (NoMethodError)
<ljarvis>
alexandernst: that's an instance method, you'll want `def self.authorize` or use `module_function` at the top of your module (which allows it to be both)
<havenwood>
>> ['FF300057FF00FF', 'FFFF'].map { |s| s.tr('^F0', 'X').gsub(/F(F)/, '\1') } # millerti give more examples to see if it's what you want
<ljarvis>
tr('^F0', 'X') = replace anything that's not F or 0 with X; gsub(/F(F)/, '\1') = replace all occurences of "FF" with "F" (the second F is being captured and used in the replacement in \1 -- you could also just write "F"
<jokke>
ah
<ljarvis>
)
Cohedrin has joined #ruby
<millerti>
Ah, I was wondering what the \1 was for.
<ljarvis>
it's kinda pointless here, but yeah it's for the capture
<millerti>
Do I need to escape the \ or do the single quotes handle that?
<ljarvis>
must be single quotes
<havenwood>
millerti: I was thinking you might want to do both Fs and 0s at once, but left that to your exercise
<ljarvis>
ah now it makes sense
<ljarvis>
i always had faith
<millerti>
havenwood: I could do them one after the other... would that be slower? Also, one thing that may not work right is if I get a number like "F0" which should be replaced by "X".
ramfjord has joined #ruby
<ljarvis>
this problem is growing
<millerti>
Another option....
<havenwood>
millerti: Are all of these pairs or characters? Do a gist with the full problem laid out and lots of examples of correct conversions.
<havenwood>
pairs *of characters
harfangk has joined #ruby
<millerti>
I could read the string in and convert the hex number to an integer. Then I convert it to base 256, if there's some way to do that, then substitute. But I don't know what base 256 would come out like.
claudiuinberlin has quit []
<millerti>
It's always in pairs. If a pair is FF, then I want F. It the pair is 00, I want 0. If it's anything else (even F0 or 30 or 0F or 0C or whatever), I want X.
<havenwood>
base 256? :0
jcao219 has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
<millerti>
havenwood: someinteger.to_s(256)
<millerti>
>> 65534.to_s(256)
<havenwood>
what are the 256 characters? i'm at a loss
<ruby[bot]>
millerti: # => invalid radix 256 (ArgumentError) ...check link for more (https://eval.in/669504)
<millerti>
Man, this student pacing outside my door is driving me crazy.
<havenwood>
millerti: I think you should describe in detail what you're really trying to do in a Gist and paste us a link.
jshjsh has joined #ruby
_djbkd has joined #ruby
<millerti>
havenwood: At what level? I mean, at a code level or semantically?
<elomatreb>
Example input, example output is usually helpful
<millerti>
For instance, I don't technically need to convert to a string. It could be an array.
<millerti>
As the key for the hash I'm using to count patterns.
zeroDi has quit [Quit: WeeChat 1.5]
sepp2k has joined #ruby
<havenwood>
millerti: Like I'm getting strings from X and I want to Y. Here are ten examples of initial input and the final result I'm looking for with each:
lenwood has joined #ruby
<millerti>
Ok, doing it.
zeroDi has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blackbombay>
if you meant, "globals become separate local variables", then that's not right, but you can have thread local variables and use sth like a queue for message passing, which is prob the most ideal way
jhack has quit [Quit: jhack]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<warrshrike>
I need 'data' array to be updated in 't' thread so that the following tcp socket part can compute averages and send them
GinoManWorks has joined #ruby
<warrshrike>
how do i do this message passing stuff
<apeiros>
warrshrike: a class with an instance variable, use a Queue instead of an array.
<blackbombay>
use a queue instead of an array?
bocaneri has quit [Read error: Connection reset by peer]
<apeiros>
hm, the "use" didn't make the move to the front of that phrase.
<warrshrike>
a normal queue will work?
<hanmac>
hm there are some global variables which are "thread local" but thats because of their magic nature
<apeiros>
warrshrike: Thread::Queue
<apeiros>
it'll automatically schedule a thread when a value is pushed.
<apeiros>
i.e. you can spin up multiple threads reading from the queue. they'll sleep until a value is added.
User458764 has joined #ruby
<warrshrike>
okay so how can i calculate average of values in ruby queue then?
<warrshrike>
or convert queue to array...
<warrshrike>
will this work? [].tap { |array| array << queue.pop until queue.empty? }
<blackbombay>
the 't' thread can push values onto the queue, and the main thread can then read from that queue, so you will have to write the code around that premise.
Dimik has joined #ruby
nankyokusei has quit [Remote host closed the connection]
amclain_ has joined #ruby
<blackbombay>
in your infinite loop on the main thread: read a value, and push it onto an array.
[Butch] has joined #ruby
<apeiros>
warrshrike: do you need to calculate the avg over multiple recvfroms, or over the data from a single read?
pawnbox has quit [Remote host closed the connection]
<apeiros>
this seems to be a problem poorly suited for multiple threads
benlieb has quit [Quit: benlieb]
<apeiros>
your code seems dysfunctional too, so it's hard to read what you actually intend to do.
amclain has quit [Ping timeout: 260 seconds]
<blackbombay>
i think it is constantly reading from a socket, adding the values from it to an array, and then recalcuting the average at each tick of the infinite loop. that seems to be the idea...
izaac has quit [Ping timeout: 244 seconds]
<warrshrike>
multiple...
<warrshrike>
yes
VeryBewitching has joined #ruby
<warrshrike>
exactly right bombay
nadir has joined #ruby
ramfjord has joined #ruby
<warrshrike>
now im storing in queue instead of array. but how to get average from that?
<apeiros>
you don't.
<apeiros>
the queue is for delegating work to workers.
smlocal has joined #ruby
ta_ has joined #ruby
<warrshrike>
but cant i pop everything and add and divide?
<apeiros>
I mean, sure you can. but as said, seems poorly suited for threading.
<apeiros>
you'd keep a sum variable, a count variable, and add to those when you deque a number
<blackbombay>
you can transfer objects from the queue onto an array (which is local to the main thread), and recalculate the average that way.
<blackbombay>
but why the empty? thing.. loop { q.pop } is the same no?
xall_ has joined #ruby
fpqc has joined #ruby
<fpqc>
heya
nyuszika7h has quit [Killed (karatkievich.freenode.net (Nickname regained by services))]
<fpqc>
I'm having a bit of trouble
<fpqc>
I'm using pkg-config to compile something
<fpqc>
on fedora
pawnbox has joined #ruby
matp has quit [Excess Flood]
<fpqc>
and it is able to find _everything_ except ruby
Devalo has quit [Remote host closed the connection]
<apeiros>
warrshrike: why do you use threads with that code?
<fpqc>
-- checking for one of the modules 'ruby-2.3;ruby-2.2;ruby-2.1;ruby-2.0;ruby-1.9;ruby-1.8'
<warrshrike>
hmm
<blackbombay>
fpqc: you will probably get better answers in #fedora.
Devalo has joined #ruby
<fpqc>
blackbombay, tried
<warrshrike>
because how will two loops run concurrently otherwise?
<warrshrike>
for two sockets
oyes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fpqc>
the problem is probably that it can't find ruby.pc wherever
nyuszika7h has joined #ruby
<apeiros>
warrshrike: doesn't seem like they'd need to run concurrently
<blackbombay>
i have no idea. over 2-3 years since i used fedora. sorry.
antgel has quit [Ping timeout: 268 seconds]
<apeiros>
warrshrike: you only ever write to the second socket once you've read data from the first socket.
<apeiros>
warrshrike: you can do that easily in a single loop without any threads whatsoever.
harai has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
jeyraof has quit [Quit: This computer has gone to sleep]
<apeiros>
while reading; text, sender = …; count += 1; sum += value(text); server.puts sum.fdiv(count); end
<warrshrike>
no the thing is they're always running....
<warrshrike>
like both run forever
<apeiros>
so?
tomphp has joined #ruby
<warrshrike>
I might be able to do something with timing and clocks
<warrshrike>
this just seems cleaner separation of concerns
<apeiros>
oh, you need that puts 35 each second?
guacamole has quit [Quit: leaving]
<apeiros>
IO.select with timeout.
oyes has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
guacamole has joined #ruby
<apeiros>
or put that in a separate thread. but don't forget to synchronize the write access on your socket.
<warrshrike>
yes
<warrshrike>
anyways
<apeiros>
but for the read/calc avg/print avg part, I'd not use threads. doesn't help.
<warrshrike>
I guess best way might be to convert to array after all
<warrshrike>
yeah sure
<warrshrike>
but queue is still needed right?
<warrshrike>
so..
<apeiros>
with single producer, single consumer - no.
<apeiros>
but `arr.inject{ |sum, el| sum + el }.to_f / arr.size` is a race condition.
<apeiros>
.size might have changed while you've been summing elements.
<apeiros>
so there too, either use the sum+count variables approach, or synchronize access.
<apeiros>
the above is regarding your current code
P1ro has joined #ruby
xall has joined #ruby
<apeiros>
with only having the puts 35 in a separate thread, and keeping read/write of avg in the main thread, you can use array and don't have to synchronize (since it's in the same thread)
cdg has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
shmuli has quit [Remote host closed the connection]
antgel has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
Pumukel has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
zukin has quit [Ping timeout: 244 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis>
does anyone here work at/know anyone who works at SendGrid?
nebg has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
nebg has joined #ruby
pwnd_nsfw` has joined #ruby
dviola has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
elifoster has joined #ruby
nankyokusei has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
pwnd_nsfw has quit [Ping timeout: 245 seconds]
frozengeek has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DroidBurgundy has quit [Remote host closed the connection]
DroidBurgundy has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
Pumukel has joined #ruby
tyang__ has quit [Quit: Leaving]
tomaw_ has joined #ruby
tyang has joined #ruby
sparch has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
Akuma has joined #ruby
tomphp has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<SeepingN>
we use them and their support was great but that's about all I can say
jackjackdripper has joined #ruby
DroidBur_ has joined #ruby
jcao219 has quit [Ping timeout: 250 seconds]
<ljarvis>
interesting
<ljarvis>
I have not had similar results with their support
johnmilton has quit [Remote host closed the connection]
cschneid_ has joined #ruby
gruggo has joined #ruby
DroidBurgundy has quit [Ping timeout: 244 seconds]
AndrewIsHere has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
ta__ has quit [Quit: Leaving...]
charliesome has joined #ruby
_djbkd has quit [Remote host closed the connection]
railssmith has joined #ruby
_djbkd has joined #ruby
postmodern has joined #ruby
ziarkaen has joined #ruby
sdothum has quit [Ping timeout: 244 seconds]
jcao219 has joined #ruby
JeanCarloMachado has joined #ruby
_djbkd has quit [Ping timeout: 260 seconds]
ngrin has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
_djbkd has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ziarkaen has quit [Ping timeout: 252 seconds]
bronson_ has quit []
jshjsh has joined #ruby
c-c has joined #ruby
<c-c>
Night
flashpoint9 has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
whathappens has quit [Remote host closed the connection]
Pumukel has joined #ruby
<c-c>
I have a shared hosting accoung (SElinux I think). How likely am I to get a relatively simple gems based app to run on it (via RVM)?
<c-c>
*account
bronson has joined #ruby
<c-c>
- going via pre-installed ruby I get lot of errors due to the fact that there is no write access to /var, and when installing gems in ~/.gems, the rubygems doesn't detect them.
bronson has quit [Remote host closed the connection]
whathappens has joined #ruby
GodFather has joined #ruby
bronson has joined #ruby
sdothum has joined #ruby
SeepingN has quit [Remote host closed the connection]
<havenwood>
c-c: Are you using gems installed with RVM's Ruby?
<c-c>
Ok, so the implication is your view is "it is possible in less than N*N time"
<havenwood>
c-c: A user install of RVM should result in locally installed gems.
<c-c>
havenwood: I've only attempted system wide and home-dir based gemming so far, with confusions
elifoster has quit [Quit: brb]
al2o3-cr has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pumukel has quit []
<havenwood>
c-c: A standard, non-root, non-sudo install of RVM will choose itself where to put gems (in your home dir). What's the problem you run into when doing a regular RVM install?
<c-c>
I have not done a RVM install yet - I am using what I think is aptitude installed ruby2.1 and gem2.1 (rgems v2.2.2) on this shared host
<c-c>
And, I can even install gems that do not require native extensions
c355e3b has joined #ruby
tdy has joined #ruby
Xiti has quit [Quit: Xiti]
Xeago has quit [Ping timeout: 268 seconds]
<c-c>
but they cannot be used, due to gems not having them (my home-dir .gems) in its path --> /usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'nanoc' (>= 0) among 121 total gem(s) (Gem::LoadError)
ldnunes has quit [Quit: Leaving]
postmodern has joined #ruby
<havenwood>
c-c: Have you tried installing gems with the --user-install flag?
<c-c>
thats what I get when running $ nanoc (and I believe thats the line require 'nanoc')
<c-c>
havenwood: ah, interesting
VeryBewitching has quit [Quit: Konversation terminated!]
Xeago has joined #ruby
<c-c>
I have used --install-dir ~/.gems to install these
elifoster has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
claudiuinberlin has quit [Remote host closed the connection]
<c-c>
let me try it just now...
<c-c>
..hey nice. It does work
claudiuinberlin has joined #ruby
<c-c>
havenwood: thank you for your help 8)
marxarelli is now known as marxarelli|afk
pokalyis has joined #ruby
al2o3-cr has quit [Ping timeout: 245 seconds]
nopolitica has quit [Ping timeout: 252 seconds]
muelleme has joined #ruby
TomyLobo has quit [Ping timeout: 260 seconds]
<c-c>
nice, even jekyll with its native extensions (?) seems to install correctly -- now I can compare jekyll and nanoc for my twisted media empire means!
tomaw_ has quit [Quit: Quitting]
bmurt has joined #ruby
<havenwood>
c-c: you're welcome, happy hacking!
ag4ve_ has joined #ruby
ag4ve_ has quit [Max SendQ exceeded]
<c-c>
I played a €5k (?) seven string Mayones in September
<c-c>
oops wrong channel sorry!
ag4ve_ has joined #ruby
ag4ve_ has quit [Max SendQ exceeded]
ag4ve_ has joined #ruby
muelleme has quit [Ping timeout: 252 seconds]
JeanCarloMachado has quit [Ping timeout: 268 seconds]
TinkerTyper has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 268 seconds]
TinkerTyper has joined #ruby
rodfersou has quit [Quit: leaving]
jackjackdripper has quit [Quit: Leaving.]
tyang_ has joined #ruby
jenrzzz has joined #ruby
TPug has joined #ruby
gusrub has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 244 seconds]
tyang_ has quit [Ping timeout: 244 seconds]
zeroDi has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
Uranio has joined #ruby
railssmith has joined #ruby
Uranio has left #ruby [#ruby]
nopolitica has joined #ruby
oyes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Capela has joined #ruby
balazs has quit [Remote host closed the connection]
SteenJobs has quit [Quit: SteenJobs]
marxarelli|afk is now known as marxarelli
pwnd_nsfw has joined #ruby
biberu has quit [Read error: Connection reset by peer]
pwnd_nsfw` has quit [Ping timeout: 245 seconds]
marxarelli is now known as marxarelli|afk
grh has joined #ruby
dionysus69 has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
claudiuinberlin has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
last_staff has quit [Ping timeout: 260 seconds]
last_staff has joined #ruby
synthroid has quit []
ag4ve_ has quit [Ping timeout: 244 seconds]
Devalo has quit [Remote host closed the connection]
bronson has quit [Read error: Connection reset by peer]
SuperLag has quit [Quit: leaving]
SuperLag has joined #ruby
phantompain has joined #ruby
flashpoint9 has joined #ruby
claudiuinberlin has joined #ruby
bronson has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
anisha has quit [Quit: This computer has gone to sleep]
xall_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oyes has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
johnmilton has joined #ruby
ta_ has quit [Remote host closed the connection]
vqrs has quit [Ping timeout: 252 seconds]
d0nn1e is now known as don
elenatanasoiu has joined #ruby
don is now known as Guest94844
Devalo has joined #ruby
palms has joined #ruby
jhack has quit [Quit: jhack]
ziarkaen has joined #ruby
Guest94844 is now known as d0nn1e
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
cdg has quit [Remote host closed the connection]
mistergibson has joined #ruby
nopolitica has quit [Ping timeout: 260 seconds]
SuperLag has quit [Quit: leaving]
ziarkaen has quit [Ping timeout: 265 seconds]
SuperLag has joined #ruby
Devalo has quit [Ping timeout: 252 seconds]
gusrub__ has joined #ruby
gusrub___ has joined #ruby
gusrub has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
frozengeek has quit [Quit: frozengeek]
gusrub___ has quit [Read error: Connection reset by peer]
tyang has joined #ruby
gusrub has joined #ruby
benlieb has joined #ruby
hanmac has joined #ruby
brianpWins has joined #ruby
gusrub__ has quit [Ping timeout: 256 seconds]
loincloth has joined #ruby
claudiuinberlin has quit []
hutch34 has quit [Ping timeout: 260 seconds]
gingray has quit [Ping timeout: 250 seconds]
Akuma has quit [Quit: So long sukkas!]
djellemah_ has quit [Ping timeout: 265 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
renderfu_ has quit [Ping timeout: 244 seconds]
muelleme has quit [Ping timeout: 244 seconds]
zukin has joined #ruby
sdothum has joined #ruby
vqrs has joined #ruby
hahuang61 has joined #ruby
malconis has quit [Read error: Connection reset by peer]
shum has joined #ruby
renderfu_ has joined #ruby
sdothum has quit [Ping timeout: 256 seconds]
zukin has quit [Ping timeout: 245 seconds]
muelleme has joined #ruby
shum has quit [Read error: Connection reset by peer]
vqrs has quit [Ping timeout: 256 seconds]
sdothum has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
<cschneid_>
I have an object, I need to replace it in-place with another object. So I'd like to call `o.superseded_by(new_obj)`, and have it setup a delegation to that new_obj, instead of the methods on self. So the next person to call o.foo gets forwarded to new_obj.foo. Is there a way to do that cleanly?
tristanp has quit [Remote host closed the connection]
sdothum has joined #ruby
johnmilton has quit [Ping timeout: 260 seconds]
<cschneid_>
subclass Delegator, and switch the return val of __getobj__ from `self` to `new_obj`?
tristanp has joined #ruby
ramortegui has quit [Remote host closed the connection]
jhack has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdothum has joined #ruby
yos7ph has joined #ruby
yos7ph has quit [Client Quit]
hammed has quit [Remote host closed the connection]
<c-c>
cschneid_: it sounds like you don't want to replace, but channel messages
<hanmac>
cschneid_ yeah Delegator looks like the only way to doing it
nikivi has quit [Remote host closed the connection]
Madplatypus has joined #ruby
tristanp has quit [Remote host closed the connection]
yos7ph has joined #ruby
<cschneid_>
c-c: right. start by delegating to self, then to replacement. The issue is that the code that swaps it out can't know everywhere that may have a local variable referencing the original.
<cschneid_>
ok - time to read up on delegator and figure it out :)
tristanp has joined #ruby
nikivi has joined #ruby
cpruitt has quit [Quit: cpruitt]
muelleme has quit [Ping timeout: 244 seconds]
code_ has joined #ruby
muelleme has joined #ruby
last_staff has quit [Quit: last_staff]
railssmith has joined #ruby
zukin has joined #ruby
hammed has joined #ruby
last_staff has joined #ruby
tristanp has quit [Ping timeout: 256 seconds]
sdothum has quit [Read error: Connection reset by peer]
kent\n has quit [Ping timeout: 260 seconds]
yos7ph has quit [Quit: Leaving]
hammed has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
JeanCarloMachado has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
vqrs has joined #ruby
izaac has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 260 seconds]
elenatanasoiu has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
bmurt has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has quit [Ping timeout: 245 seconds]
nettoweb has joined #ruby
blackwind_123 has quit [Ping timeout: 250 seconds]
skweek has joined #ruby
blackwind_123 has joined #ruby
gruggo has quit [Ping timeout: 252 seconds]
zukin has quit [Ping timeout: 268 seconds]
Jackneill_ has quit [Remote host closed the connection]
gruggo has joined #ruby
muelleme has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
shinnya has joined #ruby
nikivi has quit [Quit: irc]
[Butch] has quit [Quit: I'm out . . .]
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hammed has joined #ruby
ta_ has joined #ruby
grh has quit [Ping timeout: 260 seconds]
jtoyjtoy has quit [Quit: Lost terminal]
ta_ has quit [Remote host closed the connection]
Pent has left #ruby ["Leaving"]
palms has quit [Ping timeout: 260 seconds]
<vktec>
How do I make, err... module variables? That's probably the wrong term, but basically I want a variable that's global within a module. Defining locals in the root of the module doesn't seem to work...
<Papierkorb>
vktec: with rails (or ActiveSupport): module Foo; mattr_accessor :bar; end - without: module Foo; class << self; attr_accessor :bar; end; end
ta_ has joined #ruby
aaronds has joined #ruby
palms has joined #ruby
<vktec>
Papierkorb: Thanks, the second one works perfectly!
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 245 seconds]
zukin has joined #ruby
polishdub has quit [Quit: Leaving]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
hypercube32 has quit [Ping timeout: 268 seconds]
bronson has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
agent_white has quit [Quit: bbl]
NeverTired has quit [Quit: Connection closed for inactivity]
nopolitica has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
NeverTired has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
brent__ has joined #ruby
charliesome has joined #ruby
zukin has quit [Quit: bsd!]
whathappens has quit [Ping timeout: 250 seconds]
whathapp_ has joined #ruby
lacour has joined #ruby
cdg has quit [Remote host closed the connection]
arescorpio has joined #ruby
smlocal has quit [Remote host closed the connection]
railssmith has joined #ruby
tristanp has joined #ruby
cschneid_ has quit [Remote host closed the connection]
elenatanasoiu has joined #ruby
thisirs has quit [Ping timeout: 268 seconds]
sdothum has quit [Read error: Connection reset by peer]
Ishido has quit [Remote host closed the connection]
mvxlr has joined #ruby
<alexandernst>
ljarvis: I'm really sorry for pinging you directly. Remember the module I pasted in pastebin a few hours ago? (the issue I was having with the include statement)
<alexandernst>
is there a way I can use 'say_moo' without writing 'Foo::Bar.say_moo' ?
elenatanasoiu has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
lel has joined #ruby
<c-c>
you can include the module contents in the currect object scope?
<demio>
it will override the default selector properly
<demio>
but with `scope :visible_or_hidden, -> { any_in(:is_hidden.in => [true, false, nil]) }`
<demio>
and then `posts_for_show_route.visible_or_hidden`
<demio>
it doesnt
<demio>
any tips?
chouhoulis has quit [Ping timeout: 268 seconds]
flashpoint9 has quit [Remote host closed the connection]
elenatanasoiu has quit [Ping timeout: 256 seconds]
flashpoint9 has joined #ruby
chouhoul_ has quit [Ping timeout: 256 seconds]
quazimodo has joined #ruby
ziarkaen has joined #ruby
nopolitica has quit [Ping timeout: 260 seconds]
<SocalNick>
Hi all, I'm experiencing this issue that appears to be fixed on Ruby 2.3 branch. When can we expect a stable version of Ruby 2.3 containing the bug fix? Is there a patch version we can try? Thanks! https://bugs.ruby-lang.org/issues/12292
flashpoint9 has quit [Ping timeout: 245 seconds]
ziarkaen has quit [Ping timeout: 250 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]
last_staff has quit [Quit: last_staff]
hutch34 has joined #ruby
riskish has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bobdobbs has quit [Read error: Connection reset by peer]
nitric has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 252 seconds]
elenatanasoiu has joined #ruby
cdg has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
bronson has joined #ruby
railssmith has joined #ruby
elenatanasoiu has quit [Ping timeout: 250 seconds]
tristanp has joined #ruby
nikivi has joined #ruby
shmuli has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 250 seconds]
whathapp_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
gnufied has quit [Quit: Leaving]
whathappens has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
flashpoint9 has joined #ruby
palms has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
railssmith has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
pragmaticus has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
sdothum has joined #ruby
elenatanasoiu has joined #ruby
hahuang61 has quit [Ping timeout: 268 seconds]
rcvalle has quit [Quit: rcvalle]
demio has quit [Quit: Computer has gone to sleep.]
SteenJobs has quit [Quit: SteenJobs]
ramfjord has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
elenatanasoiu has quit [Ping timeout: 250 seconds]