ensyde_ has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
moos3 has quit [Ping timeout: 264 seconds]
marcdel has joined #ruby
ensyde_ has joined #ruby
mostlybadfly has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
cdg has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
cdg has joined #ruby
Vile` has joined #ruby
bootstrappm has quit [Quit: Leaving.]
decoponio has quit [Quit: Leaving...]
Don_John has joined #ruby
pawnbox has joined #ruby
Don_John has quit [Client Quit]
mustmodify__ has left #ruby [#ruby]
cdg has quit [Ping timeout: 264 seconds]
intrigueD has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
rcvalle has quit [Quit: rcvalle]
ytti has joined #ruby
ensyde__ has joined #ruby
junior2 has quit [Ping timeout: 244 seconds]
plonk_ has joined #ruby
plonk_ has joined #ruby
eregi_ has quit [Ping timeout: 244 seconds]
RegulationD has quit [Remote host closed the connection]
elifoster has quit [Ping timeout: 260 seconds]
kapowaz_ has joined #ruby
kireevco_ has joined #ruby
audiodude_ has joined #ruby
chrisseaton_ has joined #ruby
skmp_ has joined #ruby
ramfjord has joined #ruby
lancetw_ has joined #ruby
podman_ has joined #ruby
manveru_ has joined #ruby
AdamMeghji_ has joined #ruby
saneax is now known as saneax_AFK
pikajude_ has joined #ruby
neanderslob__ has joined #ruby
rikai_ has joined #ruby
uglybandersnatch has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
tvl has joined #ruby
speakingcode has joined #ruby
ekaleido has joined #ruby
junior2 has joined #ruby
rethi has joined #ruby
Prira_ has joined #ruby
Liothen- has joined #ruby
Bugboy10- has joined #ruby
jinie_ has joined #ruby
cschneid_ has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 248 seconds]
svkurowski has quit [Ping timeout: 248 seconds]
cschneid has quit [Ping timeout: 248 seconds]
pikajude has quit [Ping timeout: 248 seconds]
yosafbridge` has quit [Ping timeout: 248 seconds]
kireevco has quit [Ping timeout: 248 seconds]
nullwarp has quit [Ping timeout: 248 seconds]
mistym has quit [Ping timeout: 248 seconds]
AdamMeghji has quit [Ping timeout: 248 seconds]
tobiasvl has quit [Ping timeout: 248 seconds]
kaleido has quit [Ping timeout: 248 seconds]
SaintAardvark has quit [Ping timeout: 248 seconds]
speaking1ode has quit [Ping timeout: 248 seconds]
kapowaz has quit [Ping timeout: 248 seconds]
TheMoonMaster has quit [Ping timeout: 248 seconds]
audiodude has quit [Ping timeout: 248 seconds]
lancetw has quit [Ping timeout: 248 seconds]
chrisseaton has quit [Ping timeout: 248 seconds]
skmp has quit [Ping timeout: 248 seconds]
Meow-J has quit [Ping timeout: 248 seconds]
ensyde_ has quit [Ping timeout: 248 seconds]
CloCkWeRX1 has quit [Ping timeout: 248 seconds]
flughafen has quit [Ping timeout: 248 seconds]
hanmac has quit [Ping timeout: 248 seconds]
jaiks has quit [Ping timeout: 248 seconds]
mg^ has quit [Ping timeout: 248 seconds]
cyphactor has quit [Ping timeout: 248 seconds]
kalzz has quit [Ping timeout: 248 seconds]
DarkBushido has quit [Ping timeout: 248 seconds]
sesquipedalian has quit [Ping timeout: 248 seconds]
infernix has quit [Ping timeout: 248 seconds]
Bugboy1028 has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
jinie has quit [Ping timeout: 248 seconds]
samuelkadolph has quit [Ping timeout: 248 seconds]
rethi_ has quit [Ping timeout: 248 seconds]
podman has quit [Ping timeout: 248 seconds]
KervyN has quit [Ping timeout: 248 seconds]
plonk has quit [Ping timeout: 248 seconds]
manveru has quit [Ping timeout: 248 seconds]
moss has quit [Ping timeout: 248 seconds]
kspencer has quit [Ping timeout: 248 seconds]
BTRE has quit [Ping timeout: 248 seconds]
rikai has quit [Ping timeout: 248 seconds]
braincrash has quit [Ping timeout: 248 seconds]
neanderslob_ has quit [Ping timeout: 248 seconds]
whiteline has quit [Ping timeout: 248 seconds]
hostess has quit [Ping timeout: 248 seconds]
Prira has quit [Ping timeout: 248 seconds]
mburns has quit [Ping timeout: 248 seconds]
Liothen has quit [Ping timeout: 248 seconds]
weaksauce has quit [Ping timeout: 248 seconds]
jinie_ is now known as jinie
tvl is now known as tobiasvl
Jon30 has joined #ruby
K3rvyN has joined #ruby
Jardayn has joined #ruby
<Jon30>
is anyone else having issues with google drive api today? I am using google_drive and google-api-client gems to authenticate and write to google drive's spreadsheet files... everything was working fine for a year and suddenly 40 minutes ago both of my apps are getting: "Unauthorized client or scope in request"
yosafbridge has joined #ruby
SaintAardvark has joined #ruby
nullwarp has joined #ruby
DarkBushido has joined #ruby
CloCkWeRX has joined #ruby
jaiks has joined #ruby
cyphactor has joined #ruby
whiteline has joined #ruby
svkurowski has joined #ruby
pikajude_ is now known as pikajude
flughafen has joined #ruby
audiodude_ is now known as audiodude
samuelkadolph has joined #ruby
AdamMeghji_ is now known as AdamMeghji
kireevco_ is now known as kireevco
chrisseaton_ is now known as chrisseaton
hostess has joined #ruby
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
TheMoonMaster has joined #ruby
kapowaz_ is now known as kapowaz
kspencer has joined #ruby
hanmac has joined #ruby
braincrash has joined #ruby
mg^ has joined #ruby
moss has joined #ruby
Snowy has quit [Quit: ragequit]
skmp_ is now known as skmp
mburns has joined #ruby
lancetw_ is now known as lancetw
TomyLobo has quit [Ping timeout: 244 seconds]
sesquipedalian has joined #ruby
Meow-J_ has joined #ruby
rkazak has joined #ruby
Emmanuel_Chanel has joined #ruby
kalzz has joined #ruby
pwnd_nsfw has quit [Read error: Network is unreachable]
Guest47188 is now known as Tristan
pwnd_nsfw has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Tristan is now known as Guest48353
Meow-J_ is now known as Meow-J
Guest48353 is now known as Tristan-Speccy
CloCkWeRX has quit [Quit: Leaving.]
toretore has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
Kim^J has joined #ruby
<Kim^J>
Is asking Rails questions OK or is there a more suitable channel?
Azure has quit [Quit: Oops.]
sp4rrow has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
CloCkWeRX has joined #ruby
Azure has joined #ruby
elifoster has joined #ruby
<havenwood>
Kim^J: The best place is the #rubyonrails channel, it's most on-topic there. They do require nick registration (if you have trouble talking).
weaksauce has joined #ruby
<Kim^J>
havenwood: Ah, I tried #rails, which didn't work. Thanks! I actually solved my issue... It was a Mac space that made the parser go nuts. :/
marr has quit [Ping timeout: 248 seconds]
jottr has joined #ruby
Azure has quit [Client Quit]
marxarelli is now known as marxarelli|afk
Musashi007 has joined #ruby
shanemcd has joined #ruby
infernix has joined #ruby
Azure has joined #ruby
howard_ has quit [Remote host closed the connection]
Musashi007 has quit [Client Quit]
finisherr has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
eregi has joined #ruby
ytti has joined #ruby
sp4rrow has quit [Ping timeout: 276 seconds]
milesmatthias has joined #ruby
sp4rrow has joined #ruby
poerror has joined #ruby
Musashi007 has joined #ruby
j0n3 has joined #ruby
elifoster has quit [Ping timeout: 250 seconds]
houhoulis has joined #ruby
trosborn has joined #ruby
Don_John has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
ta__ has quit [Read error: Connection reset by peer]
shadoi has quit [Quit: Leaving.]
jottr has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
HalcyonicStorm has quit [Quit: Leaving.]
poerror has quit [Remote host closed the connection]
poerror has joined #ruby
arlek has joined #ruby
statelesscode has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
nijjer has joined #ruby
nijjer has left #ruby [#ruby]
shanemcd_ has joined #ruby
grassass has quit [Ping timeout: 260 seconds]
x77686d has joined #ruby
finisherr has quit [Quit: finisherr]
Jardayn_two has joined #ruby
milesmatthias has quit []
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
BrunoSaboia has quit [Quit: Leaving]
x77686d has quit [Client Quit]
Jardayn has quit [Disconnected by services]
Jardayn_two is now known as Jardayn
shanemcd_ has quit [Ping timeout: 264 seconds]
fexilal has quit [Ping timeout: 276 seconds]
BTRE has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
Vile` has quit [Ping timeout: 260 seconds]
Trynemjoel has joined #ruby
<Jon30>
is anyone else having issues with google drive api today? I am using google_drive and google-api-client gems to authenticate and write to google drive's spreadsheet files... everything was working fine for a year and suddenly 40 minutes ago both of my apps are getting: "Unauthorized client or scope in request" -- no settings were touched.
ytti has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
not_a_robot has joined #ruby
blackmesa has joined #ruby
<not_a_robot>
hey
<not_a_robot>
hi
<havenwood>
not_a_robot: hi
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ivanskie_work_ has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sp4rrow has joined #ruby
ss_much has joined #ruby
mistermo_ has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
Jardayn has quit [Quit: Leaving]
<not_a_robot>
quick question, is more about oop than ruby exclusive
<not_a_robot>
its a robot that is supposed to roam around on a map
nisstyre has quit [Ping timeout: 264 seconds]
<not_a_robot>
suppose a map can have many robots
mistermocha has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
Trynemjoel has joined #ruby
<not_a_robot>
how would i organize the classes? when running the program, should i create a Map instance, and pass that to each robot
<not_a_robot>
so each robot knows the boundary of the map
mistermocha has quit [Remote host closed the connection]
ta_ has joined #ruby
<not_a_robot>
or the map is supposed to have many rovers? which can't go outside the boundary
mistermocha has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
SenpaiSilver has quit [Read error: Connection reset by peer]
mistermocha has quit [Remote host closed the connection]
<Papierkorb>
not_a_robot: "Do one thing and do it well". in short, I'd have a Map and Rover class, and then maybe something like a World class, which has a map and many rovers in it
blackmesa has quit [Ping timeout: 248 seconds]
<not_a_robot>
thanks @Papierkorb
<colstrom>
@not_a_robot I'd use the has_a? sniff test. Does a Rover have a map? Does a Map have a Rover?
<not_a_robot>
but how does each rover know the map boundaries?
<colstrom>
Intuitively, it feels more like the Map has Rovers.
<colstrom>
So I'd reframe that question.
mistermocha has joined #ruby
<colstrom>
Which is responsible for enforcing those?
<colstrom>
The boundaries are a property of the Map, right?
mistermocha has quit [Remote host closed the connection]
Vile` has joined #ruby
<not_a_robot>
yes suppose a map is 5x5
mistermocha has joined #ruby
<colstrom>
The Rover doesn't really need to know what rules the map has internally.
<not_a_robot>
how would a rover know not to go beyound that
<colstrom>
It just does what it does, and when it tries to move, it sends its attempt to the Map. It either passes or fails.
ur5us has joined #ruby
<colstrom>
IMO, the Rover shouldn't know this. That domain logic belongs in the Map, which owns the boundaries.
<ramfjord>
I feel like an idiot for not being able to figure this out from searching, but how would I define a method like :attr_accessor without modifying the Class class?
sneakerhax has quit [Ping timeout: 244 seconds]
<ramfjord>
I only want this method to be available on subclasses of some class I'm defining. Kind of like attr_accessible for ActiveRecord::Base
<ramfjord>
what is the scope that I have available when I'm inside a "class Blah" block?
<colstrom>
Consider: there may be non-Rover things moving on the Map, right? The bounds-checking shouldn't need to be reimplemented for each new class.
<colstrom>
@ramfjord Would a module + include be viable for what you need?
<not_a_robot>
@colstrom oh ok, so the map would have the position of each robot, and each robot just tries to moves and the map approves the boundaries
<not_a_robot>
thanks! @colstrom
<colstrom>
not_a_robot: Anytime!
sczizzo has quit [Ping timeout: 246 seconds]
moeabdol3 has joined #ruby
poerror has quit [Ping timeout: 264 seconds]
<Ox0dea>
ramfjord: I suspect you're looking for the #inherited hook.
<ramfjord>
colstrom: I'm not sure what you mean. Another way of explinaing what I want would be in "class A < MyClass ; col_mapping :a, :b ; end" - where can I define col_mapping besides the Class class
<colstrom>
@Ox0dea Good call! I hadn't thought of that.
<ramfjord>
Ox0dea: excellent, that looks like exactly what I mean
baweaver has quit [Remote host closed the connection]
moeabdol3 has quit [Ping timeout: 240 seconds]
Noxilex has quit [Ping timeout: 268 seconds]
Hammy_Work has quit [Quit: Leaving]
eregi has quit [Ping timeout: 252 seconds]
hxegon has quit [Quit: BRB]
quazimodo has joined #ruby
_tc has joined #ruby
yqt has quit [Ping timeout: 244 seconds]
krzkrzkrz has joined #ruby
marxarelli|afk is now known as marxarelli
shanemcd_ has joined #ruby
chipotle has quit [Quit: cheerio]
shanemcd has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
bronson has quit [Remote host closed the connection]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
mistermocha has quit [Remote host closed the connection]
Sucks has joined #ruby
uglybandersnatch has quit [Ping timeout: 252 seconds]
bollullera has quit [Excess Flood]
Vingador has quit [Quit: Leaving]
jonee has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sankaber has joined #ruby
not_a_robot has quit [Ping timeout: 252 seconds]
_tc has quit [Remote host closed the connection]
trosborn has quit [Quit: trosborn]
arlek has quit [Quit: Leaving]
DynamicM` has joined #ruby
trosborn has joined #ruby
trosborn has quit [Client Quit]
DynamicMetaFlow has quit [Ping timeout: 248 seconds]
<ljames>
I want to generate some code at runtime that will be used quite a lot during the program's runtime. The code cannot be generated at compile time because it completely depends on values known only at runtime. Efficiency is somewhat important because I expect to call the generated functions dozens of thousands of times to hundreds of thousands of times. How would I go about it? Eval some string of code, or maybe some sort of lambdas as closures?
<ljames>
I would expect the lambdas to be cleaner to program, but maybe less efficient?
<Jon30>
is anyone else having issues with google drive api today? I am using google_drive and google-api-client gems to authenticate and write to google drive's spreadsheet files... everything was working fine for a year and suddenly 40 minutes ago both of my apps are getting: "Unauthorized client or scope in request" -- no settings were touched.
<ljames>
and the evals to take longer to run the first time
ESpiney has joined #ruby
<ljames>
and I expect maybe few hundred generated functions, and each would be called as many times as I mentioned.
DynamicM` has quit [Remote host closed the connection]
mistermocha has joined #ruby
<havenwood>
ljames: you can define methods dynamically
SenpaiSilver has joined #ruby
zenspider has quit [Quit: bye]
<ljames>
havenwood, can you link me to the parts of the documentation I should read? I'm pretty new to Ruby
trosborn has joined #ruby
<ljames>
I know of Proc and lambda, although not all the particulars
workmad3 has joined #ruby
SenpaiSilver has quit [Max SendQ exceeded]
trosborn has quit [Client Quit]
<ljames>
I could obviously build the function body out of strings and generate the lambda string then eval it, but it seems ugly, even if I think it might be the most efficient way, because otherwise I have to build the lambdas out of many small chunks
<havenwood>
ljames: It's pretty common in Ruby to dynamically generate methods.
<ljames>
ah
<ljames>
interesting
duderonomy has quit [Ping timeout: 276 seconds]
SenpaiSilver has joined #ruby
trosborn has quit [Client Quit]
blackmesa has joined #ruby
<havenwood>
You can make methods and instance variables and constants and such all dynamically with metaprogramming.
<ljames>
a close enough example though would be that I would would be passed an array of unknown number of elements then I would need to generate a function that calls a function for each element of that array, so in your example I'd need 3 puts calls
SenpaiSilver has quit [Max SendQ exceeded]
<ljames>
even the function body?
<Ox0dea>
ljames: You should probably say something about what you're actually trying to do. :)
duderonomy has joined #ruby
DmitryBochkarev has joined #ruby
<Ox0dea>
You've given a whole lot of "how" without much "what" or "why", and that's usually a bad sign.
dopie has quit [Quit: Lost terminal]
workmad3 has quit [Ping timeout: 276 seconds]
trosborn has joined #ruby
govg has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
<havenwood>
ljames: I agree I've no clue what you're doing, but try this in irb/pry and see if it makes sense?: a = ['x', 'y', 'z']; a.each { |letter| define_method letter, ->{ a.each { |l| puts "#{letter}:#{l}" } } }
<ljames>
Ox0dea, basically I'm reading some user inputted code in a restricted domain specific language and I need to compile that to something efficient, as the code will be called between 10-100k calls each.
astrobun_ has joined #ruby
Xiti has joined #ruby
rdw200169 has quit [Read error: Connection reset by peer]
trosborn has quit [Client Quit]
<ljames>
the language itself is simple enough that I could build it out of lambdas maybe, but I think it might be too slow
charliesome has quit [Read error: Connection reset by peer]
<Ox0dea>
You should probably switch to C?
<havenwood>
Assembly!
<ljames>
Ox0dea, I could, but most of the code is written in Ruby already
<Ox0dea>
ljames: Ruby interfaces with C just fine.
<Ox0dea>
And vice versa, should it come to that.
<ljames>
I guess if the performance is truly poor I'll do that, but for now I wanted to see how far I could get without switching languages
charliesome has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<Ox0dea>
You'll have to say more about what you understand "compile" to mean in this context.
<ljames>
Ox0dea, just a set of simple expressions like ((x+123)*456)^789, similar to that, where x will be supplied at runtime
<ljames>
its not quite that, but similar enough
<ljames>
not even a turing complete language
<ljames>
however the generated code has to be called a lot
trosborn has joined #ruby
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljames>
the language the expressions are written isn't exactly that though
<Ox0dea>
I really think you're barking up the wrong tree here, mate. :/
trosborn has quit [Client Quit]
<ljames>
why?
<Ox0dea>
Unless you're talking about transforming these expressions into something more performant, you're going to be impeded by Ruby's performance characteristics.
shanemcd_ has quit [Remote host closed the connection]
<ljames>
I can live with 100 slowdown from C, but not with 10k slowdown
<Ox0dea>
I don't know what that means.
<ljames>
take that expression and compile it to C code, then compile that to native code. now take the same expression in ruby and eval it
<ljames>
is the ruby version runs 100 times slower it's acceptable to me, but 10000 slower and its no longer acceptable
jdawgaz has joined #ruby
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KensoDev has joined #ruby
<ljames>
<havenwood> https://github.com/seattlerb/wilson <-- haha, thanks, I actually have access to another x86 assembler from within ruby (metasm), although I haven't looked into how to get it to execute the native code
RegulationD has joined #ruby
shanemcd has joined #ruby
<ljames>
I guess if the performance is poor enough I can always go that way, as the variables in my expressions are fixed sized ints
<havenwood>
"Ruby, the usually-less-than-10,000-times slower than C language."
<havenwood>
ljames: Real benchmarks!
<ljames>
I suppose I'll have to benchmark it afterwards, or maybe not if it turns out to be of satisfactory speed
finisherr has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
<ljames>
thanks for the ideas havenwood, Ox0dea
<Ox0dea>
ljames: Godspeed. :)
<ljames>
thanks
Guest34101 has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
trosborn has joined #ruby
shanemcd_ has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
Scient has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
shanemcd has quit [Ping timeout: 240 seconds]
Bugboy10- has quit [Ping timeout: 240 seconds]
ESpiney_ has joined #ruby
mattp_ has joined #ruby
matp has quit [Ping timeout: 276 seconds]
livcd has quit [Ping timeout: 244 seconds]
SebastianThorn has quit [Remote host closed the connection]
SebastianThorn has joined #ruby
Bugboy1028 has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
livcd has joined #ruby
veloutin has quit [Ping timeout: 246 seconds]
matp has joined #ruby
mattp__ has quit [Read error: Connection reset by peer]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
arup_r has joined #ruby
genpaku has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 244 seconds]
ESpiney has quit [Ping timeout: 244 seconds]
veloutin has joined #ruby
genpaku has joined #ruby
Scient has joined #ruby
sbhatore has joined #ruby
x77686d has quit [Quit: x77686d]
bronson has joined #ruby
fantasticsid has quit [Ping timeout: 268 seconds]
trosborn has quit [Quit: trosborn]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
Scient has quit [Ping timeout: 250 seconds]
Scient has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
trosborn has joined #ruby
ruby-lang067 has joined #ruby
DmitryBochkarev has joined #ruby
moosetans has quit [Quit: moosetans]
avahey has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
poerror has quit [Ping timeout: 246 seconds]
FooMunki has quit [Quit: FooMunki]
mistermocha has joined #ruby
shanemcd_ has quit [Ping timeout: 268 seconds]
Bugboy1028 has quit [Ping timeout: 250 seconds]
kinduff has joined #ruby
matp has quit [Ping timeout: 264 seconds]
uglybandersnatch has joined #ruby
kohvihoor has quit [Ping timeout: 252 seconds]
Bugboy1028 has joined #ruby
SebastianThorn has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
trosborn has quit [Quit: trosborn]
SebastianThorn has joined #ruby
mistermocha has quit [Ping timeout: 252 seconds]
trosborn has joined #ruby
duncannz has joined #ruby
rubie has quit [Remote host closed the connection]
trosborn has quit [Client Quit]
matp has joined #ruby
kohvihoor has joined #ruby
shanemcd has joined #ruby
hahuang61 has joined #ruby
shanemcd has quit [Ping timeout: 248 seconds]
Wicaeed has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 268 seconds]
coyo has quit [Ping timeout: 248 seconds]
jottr has joined #ruby
krzkrzkrz has quit [Ping timeout: 250 seconds]
rubie has joined #ruby
nerium has quit [Quit: nerium]
moeabdol3 has joined #ruby
ariel_17 has quit [Ping timeout: 260 seconds]
jayc0b0 has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
s00pcan_ has quit [Ping timeout: 260 seconds]
casadei has quit [Remote host closed the connection]
shanemcd has joined #ruby
sneakerhax has joined #ruby
astrobun_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
s00pcan_ has joined #ruby
moeabdol3 has quit [Ping timeout: 276 seconds]
finisherr has quit [Quit: finisherr]
bronson has joined #ruby
djbkd has quit [Quit: My people need me...]
finisherr has joined #ruby
theRealAlexz has quit [Ping timeout: 252 seconds]
shanemcd has quit [Ping timeout: 260 seconds]
rubie has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
rubie has joined #ruby
Tempesta_ has joined #ruby
bronson has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 268 seconds]
theRealAlexz has joined #ruby
Supplication has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
eregi has joined #ruby
i8igmac has joined #ruby
Tempesta has quit [Ping timeout: 252 seconds]
gbgdev has joined #ruby
moeabdol3 has joined #ruby
s00pcan_ has quit [Ping timeout: 244 seconds]
Guest34101 has joined #ruby
eregi has quit [Ping timeout: 248 seconds]
statelesscode has quit [Quit: statelesscode]
moeabdol3 has quit [Ping timeout: 248 seconds]
coyo has joined #ruby
coyo has joined #ruby
arthropododo has quit [Quit: Leaving]
i8igmac has quit [Ping timeout: 276 seconds]
astrobun_ has joined #ruby
jonee has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160209234642]]
Guest34101 has quit [Ping timeout: 276 seconds]
Tempesta_ has quit [Quit: See ya!]
evenix has quit [Remote host closed the connection]
Mia has quit [Ping timeout: 252 seconds]
krzkrzkrz has joined #ruby
pawnbox has joined #ruby
johnmilton has joined #ruby
Rinalds has joined #ruby
trosborn has joined #ruby
babblebre has joined #ruby
bronson has quit [Remote host closed the connection]
hk238 has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
s00pcan_ has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
johnmilton has quit [Ping timeout: 250 seconds]
braincrash has quit [Quit: bye bye]
Trynemjoel has joined #ruby
marxarelli is now known as marxarelli|afk
bigmac_ has joined #ruby
terminal_ has joined #ruby
`tim` has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has joined #ruby
poerror has joined #ruby
rew has joined #ruby
jdawgaz has joined #ruby
tonyynot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Remote host closed the connection]
tonyynot has joined #ruby
tonyynot has quit [Client Quit]
arescorpio has quit [Quit: Leaving.]
braincrash has joined #ruby
rrrepsaj has joined #ruby
aupadhye has joined #ruby
johnmilton has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
bry4n_ has joined #ruby
nanoz] has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
Vile` has quit [Ping timeout: 260 seconds]
rubie has quit [Remote host closed the connection]
nanoz has quit [Ping timeout: 268 seconds]
trosborn has quit [Quit: trosborn]
govg has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has quit [Ping timeout: 250 seconds]
saneax_AFK is now known as saneax
Dimik has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
jdawgaz has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit [Ping timeout: 250 seconds]
zast has joined #ruby
ixti has quit [Ping timeout: 244 seconds]
connor_goodwolf has quit [Ping timeout: 268 seconds]
connor_goodwolf has joined #ruby
nando293921 has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 244 seconds]
kent\n has joined #ruby
govg has joined #ruby
govg is now known as Guest47069
yakbrown has joined #ruby
astrobun_ has joined #ruby
s00pcan_ has quit [Ping timeout: 240 seconds]
<yakbrown>
hi
<havenwood>
yakbrown: hey
<yakbrown>
whats up
<havenwood>
yakbrown: Ruby!
hahuang65 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
s00pcan has joined #ruby
pawnbox has quit [Remote host closed the connection]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
pawnbox has joined #ruby
tjbiddle has joined #ruby
shanemcd has joined #ruby
treaki__ has joined #ruby
Vile` has joined #ruby
blackmesa has joined #ruby
treaki_ has quit [Ping timeout: 248 seconds]
eregi has joined #ruby
shanemcd has quit [Ping timeout: 248 seconds]
tjbiddle_ has joined #ruby
jayc0b0 has quit [Read error: Connection reset by peer]
tjbiddle has quit [Ping timeout: 276 seconds]
tjbiddle_ is now known as tjbiddle
mistermocha has joined #ruby
jayc0b0 has joined #ruby
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vile` has quit [Ping timeout: 276 seconds]
poerror has quit [Ping timeout: 276 seconds]
rubie has joined #ruby
eregi has quit [Ping timeout: 268 seconds]
moeabdol3 has joined #ruby
colegatron has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Ping timeout: 268 seconds]
kinduff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
kinduff has joined #ruby
gbgdev has quit [Remote host closed the connection]
Guest47069 has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
y2mq37 has quit [Ping timeout: 250 seconds]
Scient has quit [Ping timeout: 248 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
ProofTechnique has quit [Ping timeout: 250 seconds]
majjoha has quit [Ping timeout: 246 seconds]
kohvihoor has quit [Ping timeout: 248 seconds]
moeabdol3 has quit [Ping timeout: 276 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snapcase has quit [Ping timeout: 244 seconds]
govg_ has joined #ruby
SebastianThorn has quit [Ping timeout: 264 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
colegatron has joined #ruby
finisherr has quit [Quit: finisherr]
bronson has joined #ruby
ytti has joined #ruby
snapcase has joined #ruby
saneax is now known as saneax_AFK
majjoha has joined #ruby
Scient has joined #ruby
mistermocha has quit [Remote host closed the connection]
ProofTechnique has joined #ruby
kohvihoor has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 248 seconds]
ytti has joined #ruby
Chagel has joined #ruby
Mattx has joined #ruby
<Mattx>
Hey there!
<Chagel>
hi everyone
<Mattx>
Quick question, can I create a Thread and don't run it until I invoke some method?
<Mattx>
Something like: t = Thread.create do ... end // ... // t.start_now
<mozzarella>
is that not how it works by default?
<Mattx>
nope
mallu has joined #ruby
mallu has quit [Client Quit]
<Mattx>
when you do Thread.new or Thread.start it runs the block right away
<Mattx>
(.create doesn't exist)
mallu has joined #ruby
terminal_ has joined #ruby
rubie has quit [Remote host closed the connection]
terminal_ has quit [Client Quit]
ytti has quit [Ping timeout: 240 seconds]
gix has joined #ruby
<Chagel>
accidentally ran `brew upgrade` and ncurses has been updated to 6
<Chagel>
everything breaks..
<Chagel>
Now i can't install ruby 2.0 from rbenv/ruby-build
ytti has joined #ruby
<Chagel>
it says readline extension was not compiled
<Chagel>
anybody has a clue how to fix? thanks
djbkd has joined #ruby
nemo_ has joined #ruby
ixti has joined #ruby
<eam>
Chagel: not super familiar with brew, but install ncurses 5?
nemo_ is now known as nemohash
<eam>
you should be able to have both versions installed at once
<b0urne>
Hi everyone i am stuck on this variable name. I have to call this [selectlist:0x3fe88e9a8628 type: name: p_tagrepl~: value: PARA2$COMB]. Since the name has colon in it. I can't change its value.
<b0urne>
is i do xyz.p_tagrepl~: = "SOMEVAL" error :/ can't escape either i tried several ways.
<mozzarella>
what?
<Ox0dea>
mozzarella: Well, shucks, there's gotta be a way to spawn a Thread without immediately invoking it?
<Ox0dea>
Not without some kind of sentinel value in the Thread body itself, I guess.
ixti has quit [Ping timeout: 244 seconds]
<b0urne>
@mozzarella any ideas ?
<toretore>
Thread.new{Thread.stop; ...}
<Ox0dea>
I suppose that'd do it.
<mozzarella>
Ox0dea: I thought it was the default behavior, either they changed it or I'm misremembering it
<Ox0dea>
Nah, I think it's been this way from the start.
<Ox0dea>
b0urne: You simply can't have invalid identifiers; consider using a Hash with String keys.
houhoulis has quit [Remote host closed the connection]
ytti has quit [Ping timeout: 240 seconds]
avahey has quit [Quit: Connection closed for inactivity]
fedexo has joined #ruby
sp4rrow has joined #ruby
ybakos has joined #ruby
zast has quit [Remote host closed the connection]
<shevy>
do a lot of people use e. g. puts "foo "\"bar" where "bar" would be on the next line
Supplication has joined #ruby
eregi has joined #ruby
djbkd has quit [Quit: My people need me...]
ESpiney_ has quit [Read error: Connection reset by peer]
darkxploit has quit [Ping timeout: 264 seconds]
colegatron has quit [Ping timeout: 252 seconds]
UtkarshRay has quit [Remote host closed the connection]
ytti has joined #ruby
ur5us has quit [Remote host closed the connection]
<toretore>
it is a synchronization problem, and there are various ways of solving it
siaw has quit [Quit: siaw]
<toretore>
but i'd like to know what the actual problem is
Guest62791 has joined #ruby
<Mattx>
I'm writing a library to sync the work of many scrappers that start other "specialized scrappers" sometimes
siaw has joined #ruby
<toretore>
and what does sync mean in this case?
roshanavand has joined #ruby
programmerq has quit [Ping timeout: 268 seconds]
<toretore>
it's quite impossible to give advice on concurrency issues without knowing the full context
ytti has joined #ruby
KensoDev has joined #ruby
mburns has joined #ruby
quazimodo has joined #ruby
hanmac has joined #ruby
manveru_ has joined #ruby
Abrin_AWAY has joined #ruby
chrisseaton has joined #ruby
kies has joined #ruby
crowell has joined #ruby
flughafen has joined #ruby
podman_ has joined #ruby
bluOxigen_ has joined #ruby
<Mattx>
it sync the output basically, I buffer it until the thread end
<Mattx>
also I'm syncing when they run, because some scrappers can run concurrently while others has to wait for a result from a previous one
baweaver has joined #ruby
blackmesa has joined #ruby
<Mattx>
have *
<toretore>
so you have a bunch of threads doing some work, and you have various synchronization points where you have to wait for one or more threads to finish
<Mattx>
that's right
<toretore>
if one thread starts another "sub" thread, it must wait for it?
<Mattx>
the output sync is also important, otherwise it's painful to follow the process
<Mattx>
yes, they have to wait for all its children
<toretore>
ok, so that's not a problem; it will know the identity of all of them as it was the one to start them
<toretore>
you have a hierarchy of threads and each thread waits for the threads it started
`tim` has quit [Read error: Connection reset by peer]
shanemcd has joined #ruby
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Mattx>
"pass: Give the thread scheduler a hint to pass execution to another thread. A running thread may or may not switch, it depends on OS and processor."
<Mattx>
"A running thread may or may not switch"
<Mattx>
if it doesn't, good luck with the rest of the code
<drbrain>
sorry, reading scrollback
mistermocha has quit [Ping timeout: 244 seconds]
<drbrain>
I just responded to that last bit
<Mattx>
np
Chagel has quit [Remote host closed the connection]
sauvin has joined #ruby
DonOtreply has joined #ruby
infra-red has quit []
<drbrain>
does it need to be a new thread every time?
skade has joined #ruby
<drbrain>
I suppose you could do q = Queue.new; t = Thread.new { q.pop.run }; history[id] << t.object_id; q << -> { whatever_work_you_want_to_do }
<drbrain>
Mattx: ↑ ?
ytti has joined #ruby
quazimodo has joined #ruby
mburns has joined #ruby
hanmac has joined #ruby
flughafen has joined #ruby
manveru_ has joined #ruby
podman_ has joined #ruby
chrisseaton has joined #ruby
kies has joined #ruby
crowell has joined #ruby
bluOxigen_ has joined #ruby
Abrin_AWAY has joined #ruby
<drbrain>
s/run/call
sbhatore1 has joined #ruby
sbhatore has quit [Ping timeout: 264 seconds]
<Mattx>
hmn, let me see
sauvin has quit [Ping timeout: 250 seconds]
Chagel has joined #ruby
<drbrain>
the other option is using Mutex
elifoster has joined #ruby
<drbrain>
m = Mutex.new; m.lock; t = Thread.new { m.lock; whatever_work_you_want_to_do }; history[id] << t.object_id; m.unlock
programmerq has joined #ruby
<drbrain>
or even m.synchronize block around creating thread and recording the id
johnmilton has quit [Ping timeout: 244 seconds]
sbhatore1 has quit [Read error: Connection reset by peer]
roshanavand has quit [Quit: This computer has gone to sleep]
Chagel has quit [Remote host closed the connection]
<toretore>
this is a generic problem that's been solved many times and this implementation is likely incorrect
ytti has joined #ruby
johnmilton has joined #ruby
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
aeontech has joined #ruby
sauvin has quit [Quit: Leaving]
djbkd has joined #ruby
sauvin has joined #ruby
Guest62791 has quit [Quit: WeeChat 1.4]
jas02 has joined #ruby
trosborn has joined #ruby
krzkrzkrz has joined #ruby
govg has quit [Ping timeout: 240 seconds]
steffkes has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
ytti has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
moeabdol3 has joined #ruby
govg has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
atmosx_ has joined #ruby
matsu has joined #ruby
atmosx has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 240 seconds]
krzkrzkrz has quit [Ping timeout: 240 seconds]
sbhatore has joined #ruby
last_staff1 has joined #ruby
atmosx_ is now known as atmosx
oliver___ has quit []
moeabdol3 has quit [Ping timeout: 264 seconds]
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #ruby
Guest34101 has joined #ruby
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
last_staff has quit [Ping timeout: 268 seconds]
last_staff1 is now known as last_staff
BtcBen has joined #ruby
solocshaw has quit [Ping timeout: 244 seconds]
bry4n_ has quit [Ping timeout: 260 seconds]
Chagel has quit [Remote host closed the connection]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
Guest34101 has quit [Ping timeout: 276 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Chagel has joined #ruby
DoubleMalt has joined #ruby
pwnd_nsfw has quit [Ping timeout: 248 seconds]
RegulationD has joined #ruby
tvw has joined #ruby
mistermocha has joined #ruby
jenrzzz has joined #ruby
blackmesa has joined #ruby
elifoster has quit [Ping timeout: 244 seconds]
matsu has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 264 seconds]
NightMonkey has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby
krzkrzkrz has joined #ruby
govg has quit [Ping timeout: 244 seconds]
<Mattx>
I guess that would work
<Mattx>
err, wrong pasted :P
flughafen has quit [Quit: WeeChat 1.3]
blackmesa has quit [Ping timeout: 264 seconds]
aganov has joined #ruby
<Chagel>
eam: thanks. i've reinstalled readline in homebrew and it works.
saneax_AFK is now known as saneax
NightMonkey has joined #ruby
Mattx has quit [Quit: Leaving]
ur5us has quit [Read error: No route to host]
fedexo has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
hxegon has quit [Quit: BRB]
skade has joined #ruby
Chagel_ has joined #ruby
SebastianThorn has joined #ruby
govg has joined #ruby
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
djbkd has quit []
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
Chagel has quit [Ping timeout: 264 seconds]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
lxsameer has joined #ruby
rmulligan has joined #ruby
pwnd_nsfw has joined #ruby
firstdayonthejob has joined #ruby
uglybandersnatch has quit [Ping timeout: 250 seconds]
drtn_ has joined #ruby
drtn_ has left #ruby [#ruby]
x77686d has quit [Quit: x77686d]
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
poerror has joined #ruby
quazimodo has joined #ruby
phredus has joined #ruby
<phredus>
Hello anyone can please help me with installing rails on gentoo, currently running ruby 2.1.7, thanks
ta_ has quit [Remote host closed the connection]
rdark has joined #ruby
ta_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
bronson has quit [Remote host closed the connection]
Liothen- has quit [Quit: The Dogmatic Law of Shadowsong]
<havenwood>
phredus: Have you already tried `gem install rails` and that didn't work?
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
rmulligan has quit [Remote host closed the connection]
ohaibbq has joined #ruby
Liothen has joined #ruby
<havenwood>
phredus: Ah, or wanting to use the portage rails package? The #RubyOnRails channel would be a good place to follow up for Rails-specific installation questions.
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BLuEGoD has joined #ruby
rmulligan has joined #ruby
BLuEGoD is now known as Guest39569
mistermocha has quit [Remote host closed the connection]
DonOtreply has quit [Quit: DonOtreply]
DonOtreply has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
mistermocha has joined #ruby
steffkes has quit [Ping timeout: 260 seconds]
rmulligan has quit [Remote host closed the connection]
colegatron has joined #ruby
rmulligan has joined #ruby
creat has quit [Changing host]
creat has joined #ruby
amclain has quit [Quit: Leaving]
rmulligan has quit [Remote host closed the connection]
sandstrom has joined #ruby
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
drtn has joined #ruby
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rmulligan has joined #ruby
drtn has left #ruby [#ruby]
safe has quit [Quit: Leaving]
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
Moosashi has joined #ruby
rmulligan has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
Moosashi has quit [Client Quit]
jayc0b0 has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
<phredus>
havenwood: Ok Ill try that channel thanks
anisha has joined #ruby
mistermocha has quit [Remote host closed the connection]
manveru_ is now known as manveru
Don_John has quit [Read error: Connection reset by peer]
flughafen has quit [Quit: WeeChat 1.3]
<Ox0dea>
phredus: Why Gentoo?
uglybandersnatch has joined #ruby
ekem is now known as _3IK3IVI
_3IK3IVI is now known as _3IK3IVI_
_3IK3IVI_ is now known as _3_IK_3_IVI_
_3_IK_3_IVI_ is now known as _3_IK3_IVI_
Musashi007 has joined #ruby
rmulligan has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
rmulliga` has joined #ruby
andikr has joined #ruby
yardenbar has joined #ruby
<phredus>
Ox0dea: That is the OS I am using on this perticular system, why? did I answer your question? I'm not really understanding your question, sorry
JohnBat26 has joined #ruby
tjbiddle_ has joined #ruby
tjbiddle has quit [Ping timeout: 252 seconds]
tjbiddle_ is now known as tjbiddle
rmulligan has quit [Remote host closed the connection]
rmulliga` has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
<Ox0dea>
A wild Gentoo user appeared! Ox0dea used Passing Interest. It's not very effective...
sandstrom has quit [Quit: My computer has gone to sleep.]
futilegames has joined #ruby
Guest34101 has joined #ruby
rmulligan has joined #ruby
Jonno_FTW has joined #ruby
configged- has joined #ruby
configged has joined #ruby
<Jonno_FTW>
anyone in?
pandaant has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
<Jonno_FTW>
I'm trying to convert a line of ruby to python,
rmulligan has quit [Remote host closed the connection]
<Jonno_FTW>
does 'n << [x-1, y] if x > 0 && grid[y][x-1] & IN != 0' only append if the conditional is true?
<baweaver>
#python would be a better place to ask
skade has joined #ruby
ziyadb has joined #ruby
blackmesa has joined #ruby
djbkd has joined #ruby
<Jonno_FTW>
:/
uglybandersnatch has quit [Ping timeout: 240 seconds]
<Jonno_FTW>
well is my assumption right though?
rmulligan has joined #ruby
<baweaver>
Unary & would probably break it
atmosx has quit [Max SendQ exceeded]
skade has quit [Client Quit]
<Ox0dea>
I don't see a unary &.
<baweaver>
terms are hard today
rmulligan has quit [Remote host closed the connection]
<baweaver>
what's the word I'm looking for there?
rmulligan has joined #ruby
chipotle has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
<hanmac>
Jonno_FTW: that might work on python too, but i think you might need to put (grid[y][x-1] & IN != 0) inside brackets
rmulligan has quit [Remote host closed the connection]
rmulligan has quit [Remote host closed the connection]
berserk_ren has quit [Remote host closed the connection]
rmulligan has joined #ruby
<phredus>
Ox0dea: Would you please clarify your question? Are you trying to help me?
rmulligan has quit [Remote host closed the connection]
<Ox0dea>
phredus: I just like knowing why people choose Gentoo, mate.
rmulligan has joined #ruby
<baweaver>
because it's there
<Ox0dea>
That's usually about the size of it.
<baweaver>
kinda like Everest
<baweaver>
except one is likely to kill you and leave you without hope for the rest of your life, and the other is a mountain
blackmesa has quit [Ping timeout: 268 seconds]
<Ox0dea>
Jonno_FTW: The use of `&` instead of `&&` there is unnecessary confusion, but it binds more tightly than `&&` anyway, so the semantics aren't changed any; it's still just a chained conditional, and yes, it controls whether or not the push occurs.
<phredus>
Ox0dea: oh, your research. I see. try #gentoo shitload of guys there that will happily tell you all about it, they helped me. :) Good luck.
Xeago has joined #ruby
<baweaver>
`operation if condition` is the same as `if condition; operation end` essentially.
<Jonno_FTW>
Ox0dea: thanks for the help
Xeago has quit [Remote host closed the connection]
rew has quit [Remote host closed the connection]
ebbflowgo has quit [Read error: Connection reset by peer]
<baweaver>
not sure about precedence in Python and how that'd translate though
ebbflowgo has joined #ruby
Xeago has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
Paradox_ has joined #ruby
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
merida has joined #ruby
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
sandstrom has joined #ruby
Supplication has quit [Ping timeout: 244 seconds]
nemohash has quit [Ping timeout: 276 seconds]
Abrin_AWAY2 has joined #ruby
Abrin_AWAY has quit [Ping timeout: 240 seconds]
rmulligan has quit [Remote host closed the connection]
<hanmac>
Ox0dea: no its not a boolean & there, because " grid[y][x-1] & IN != 0" in that it does use the value of the grid, does make a bitvise AND with it, and does check if it isnt zero ... means it does check if IN is set for the grid value.
rmulligan has joined #ruby
aufi has joined #ruby
rmulligan has quit [Remote host closed the connection]
_3_IK3_IVI_ is now known as rekem
rmulligan has joined #ruby
merida_ has joined #ruby
<Ox0dea>
hanmac: You're right.
ebbflowgo has quit [Read error: Connection reset by peer]
Couch has joined #ruby
rmulligan has quit [Remote host closed the connection]
ebbflowgo has joined #ruby
rmulligan has joined #ruby
sbhatore has quit [Ping timeout: 244 seconds]
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
merida has quit [Ping timeout: 244 seconds]
tenderlove has joined #ruby
Paradox_ is now known as Supplication
chipotle has quit [Quit: cheerio]
rmulligan has quit [Remote host closed the connection]
contradictioned has quit [Read error: Connection reset by peer]
jhass has quit [Ping timeout: 268 seconds]
ctrlrsf has quit [Ping timeout: 268 seconds]
heftig has joined #ruby
ctrlrsf has joined #ruby
ohcibi has quit [Remote host closed the connection]
contradictioned has joined #ruby
jhass has joined #ruby
ohcibi has joined #ruby
openstruct has joined #ruby
<hanmac>
ferr hm from i see now, its not the rawurlencode which is the problem, but it seems that hmac does return different things on ruby and on php (and so the Base64 encoded strings are different) ... but i currently cant understand why ... i used fixed expires to test the output.
anisha has quit [Quit: This computer has gone to sleep]
rmulligan has joined #ruby
moeabdol4 has joined #ruby
phrozen77 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
bry4n_ has joined #ruby
moeabdol3 has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
charliesome has joined #ruby
anisha has joined #ruby
<ferr>
Oh hanmac
anisha has quit [Client Quit]
<hanmac>
i did use hexdigest (and non-raw for php) for better compare ... for me, the digest are different and i dont know why :/ (or does it should be like that?)
Hobbyboy has joined #ruby
rmulligan has quit [Ping timeout: 252 seconds]
Shaboum has joined #ruby
bry4n_ has quit [Ping timeout: 240 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
jottr has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
openstruct has quit []
caustic has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ebbflowgo has quit [Read error: Connection reset by peer]
<hanmac>
i once had a gem which does use libarchive to open and save nearly everything, but i might need to rewrote it because i didnt touched it for to long.
ProofTechnique has joined #ruby
shanemcd has quit [Remote host closed the connection]
DmitryBochkarev has joined #ruby
<al2o3-cr>
will take a look at minitar :)
ramfjord has quit [Ping timeout: 244 seconds]
<fschuindt>
2218.45 / (500/1000) => Infinity; I was expecting 4436.9, lol. Any tip?
Tharbakim has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
tulak_ has quit [Remote host closed the connection]
govg has joined #ruby
tulak has joined #ruby
krzkrzkrz has quit [Read error: Connection reset by peer]
bry4n_ has quit [Ping timeout: 246 seconds]
HalcyonicStorm has joined #ruby
evidex has quit [Remote host closed the connection]
AlexJakeGreen has quit [Remote host closed the connection]
Tharbakim has joined #ruby
VeryBewitching has joined #ruby
<VeryBewitching>
G'day folks.
atomical has quit [Ping timeout: 248 seconds]
eurialo has quit [Ping timeout: 240 seconds]
Kodan has joined #ruby
eurialo has joined #ruby
<Kodan>
Hi all, newbie and a dumb question: is ruby still worthwhile now that NodeJS + friends seems to be out competing ruby on rails? Or is it still worth learning?
lxsameer has joined #ruby
jaruga has joined #ruby
sandstro_ has joined #ruby
jaruga has quit [Client Quit]
jaruga has joined #ruby
skweek has joined #ruby
sandstro_ has quit [Client Quit]
<ljarvis>
you're right that is newbie and dumb
sbhatore has quit [Ping timeout: 268 seconds]
<ljarvis>
did you ask the same question on the node irc channel?
<shevy>
lol
merida has quit [Remote host closed the connection]
sandstro_ has joined #ruby
<shevy>
actually, I could swear that this question happened perhaps a month or two ago
JohnBat26 has joined #ruby
lxsameer has quit [Remote host closed the connection]
sandstrom has quit [Ping timeout: 240 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Ping timeout: 260 seconds]
ferr has quit [Quit: WeeChat 1.4]
JohnBat26 has quit [Client Quit]
lxsameer has joined #ruby
merida has joined #ruby
`tim` has joined #ruby
JohnBat26 has joined #ruby
<Kodan>
ljarvis: Nope, never been to the node irc
sandstro_ has quit [Client Quit]
shanemcd has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
sandstrom has joined #ruby
shanemcd has joined #ruby
rubie has joined #ruby
rippa has joined #ruby
shredding has quit [Ping timeout: 246 seconds]
Hammy_Work has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
x77686d has joined #ruby
shanemcd has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
jordanm has quit [Ping timeout: 250 seconds]
moos3 has quit [Quit: Lost terminal]
tamole has joined #ruby
<yorickpeterse>
Kodan: No, you should be using COBOL
<ljarvis>
you should do some research and form your own opinion
nocontrol has quit [Remote host closed the connection]
<yorickpeterse>
you probably never heard of it
jaruga has quit [Ping timeout: 244 seconds]
adgtl has joined #ruby
<yorickpeterse>
In all seriousness, like ljarvis do some research and figure it out yourself; that's the only way to get a good understanding
<Kodan>
I am doing so - this is part of that :)
<Kodan>
Initially I wasn't going to consider it, but I saw that it's still pretty popular
<yorickpeterse>
You're asking a Ruby IRC channel whether they think Ruby or NodeJS is better
<ljarvis>
this isn't research, it's not a neutral opinion
* havenwood
grabs a pitchfork
<Kodan>
:P I believe I asked just what the future looks like for ruby
<ljarvis>
it looks glorious?
<ljarvis>
happy? going to write rails forever now?
<havenwood>
Kodan: Ruby 3.0 in 2020, just you wait!
djbkd has joined #ruby
<Kodan>
Lol well thanks guys :D
<yorickpeterse>
Kodan: realistically Ruby is here to stay for at least another 10 years
joneshf-laptop has quit [Quit: Leaving]
shinnya has joined #ruby
s00pcan has joined #ruby
bry4n_ has joined #ruby
jaruga has joined #ruby
<yorickpeterse>
Node on the other hand will probably vanish
tamole has quit [Quit: away]
AlexRussia has joined #ruby
rmulligan has joined #ruby
Xeago_ has quit [Remote host closed the connection]
<yorickpeterse>
unless they suddenly pull their heads out of their arses and actually support multi-threading
Prominent has joined #ruby
tamole has joined #ruby
Xeago has joined #ruby
<yorickpeterse>
also Elixir appears like it might become very popular in 5-10 years
<yorickpeterse>
but I'm basing all this on my armchair science
<yorickpeterse>
see, that alone should be reason #1 to kill JS
<morfin>
i dreamed about that
atmosx has joined #ruby
<shevy>
lol jsfuck
<morfin>
we can have small JS interpreted for Brainfuck
<morfin>
*interpreter
jas02 has quit [Quit: jas02]
<n1colas>
o/
`tim` is now known as BuildTheWall
melter has quit [Ping timeout: 250 seconds]
<morfin>
hahaha
<morfin>
String - [] + []
<morfin>
that actually gives "" in JS
xaxisx has joined #ruby
<havenwood>
morfin: 'NaN'
<morfin>
oO?
<morfin>
weird, with V8 it gave me ""
<morfin>
and with Gecko as well
Ishido has quit [Remote host closed the connection]
<havenwood>
morfin: You mean `String - [] + []` or just `[] + []`?
adgtl has quit [Remote host closed the connection]
<ljarvis>
lol
shanemcd has joined #ruby
<yorickpeterse>
hm this reminds me I really need to kick up the pace of my own language
LastWhisper____ has joined #ruby
LastWhisper____ has quit [Read error: Connection reset by peer]
<yorickpeterse>
been stuck on the parser for too long now
<yorickpeterse>
but we're getting there ᕕ(ᐛ)ᕗ
Mon_Ouie has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
LastWhisper____ has joined #ruby
livcd has quit [Changing host]
livcd has joined #ruby
<ljarvis>
but can i build a web framework in it
<ljarvis>
no wait
<ljarvis>
a MICRO framework
BrunoSaboia has joined #ruby
<ljarvis>
yeah one of those
baweaver has joined #ruby
zast has joined #ruby
<morfin>
just [] + []
<morfin>
:D
<yorickpeterse>
once I build an HTTP parser, a package manager, a GC, a JIT, etc, etc
Supplication has quit [Ping timeout: 268 seconds]
<ljarvis>
so soon then
<morfin>
let's create Fuck++
<ljarvis>
my new startup can use it
pawnbox has quit [Remote host closed the connection]
<yorickpeterse>
Yeah "soon" as in "maybe in 5 years"
aganov has quit [Remote host closed the connection]
<ljarvis>
also known as "very soon" to apeiros
<yorickpeterse>
Though once I get past the parser (which is sooooo boring) I hope the pace kicks in
Ishido has joined #ruby
pawnbox has joined #ruby
<yorickpeterse>
Then I need to write a basic compiler
djbkd has quit [Remote host closed the connection]
<yorickpeterse>
then I need to re-write that one in the language itself
<yorickpeterse>
then bootstrap it
<yorickpeterse>
then write a GC
pawnbox has quit [Remote host closed the connection]
<yorickpeterse>
in the language itself, ideally
<yorickpeterse>
then a JIT
<yorickpeterse>
which will take months of learning LLVM
pawnbox has joined #ruby
<yorickpeterse>
and probably months of fighting Rust LLVM bindings
<yorickpeterse>
or maybe I'll just use their C API directly
<ljarvis>
your timeline is opimistic
BSaboia has quit [Ping timeout: 240 seconds]
<yorickpeterse>
oh, it will be another 2 years before all that is done I think
umdstu has joined #ruby
<yorickpeterse>
The JIT will come last
<yorickpeterse>
since LLVM's docs suck
<umdstu>
trying to build ruby on a machine, forgot to include readline with it the first time. when i use --with-readline-dir=/usr for the ./configure command, the option isn't in "Configured with..." that prints at the end
<yorickpeterse>
and LLVM itself is a beast
<yorickpeterse>
I'm kinda hoping that by postponing it something easier to use than LLVM pops up in the mean time
<morfin>
hmmm
poerror has joined #ruby
jaruga has joined #ruby
<ljarvis>
I thought llvm was the sticky icky
<yorickpeterse>
LLVM right now is like the only way to build JITs/AOT compilers unless you hate yourself
<yorickpeterse>
You can build it on top of gcc, though that doesn't really work for JITs
<yorickpeterse>
and libjit is dead
baweaver has quit [Ping timeout: 246 seconds]
<ljarvis>
i'll wait for libyorick
<yorickpeterse>
Webkit's new JIT thing looks interesting but from what I can tell it's not really meant to be a generic library
DexterLB has quit [Ping timeout: 276 seconds]
<yorickpeterse>
instead it seems to be more of a new webkit specific thing
asmodlol has quit [Ping timeout: 260 seconds]
<yorickpeterse>
ljarvis: my idea was to build a C FFI API in the language, then use that to load LLVM's C API
<yorickpeterse>
then use that to write the JIT in the language itself
<morfin>
LLVM is fine for C/C++ => native machine code
<umdstu>
morfin: probably same reason they created react.js
jaruga has quit [Ping timeout: 268 seconds]
jottr has quit [Quit: WeeChat 1.4]
moeabdol4 has quit [Quit: WeeChat 1.4]
<morfin>
react.js is weird thing
<umdstu>
morfin: ... because they couldn't figure out how to use existing technologies to do what they wanted!
darkxploit has quit [Ping timeout: 240 seconds]
<morfin>
i was looking at that but i saw benchmarks and it was pretty fast
<morfin>
well, maybe they understand that not enought just use some technologies and create own ones
<umdstu>
yea? that's good
<yorickpeterse>
umdstu: Euh, no
nfk has joined #ruby
<morfin>
there is also React.native for mobile applications
<yorickpeterse>
The argument of LLVM not being as suitable for dynamic languages as for static languages has some truth to it
<umdstu>
morfin: hadn't heard of that one
<yorickpeterse>
e.g. compile times is one problem, difficulties in supporting GCs in multi-threaded languages is another
<umdstu>
yorickpeterse: i was being a bit flippant
moeabdol has joined #ruby
<morfin>
it looks similar to React.js(except specifics of movile applications), but nice
<yorickpeterse>
That is, last I checked LLVM's GC support for multi-threading was problematic
wilbert has joined #ruby
B1n4r10 has joined #ruby
adgtl has quit [Read error: Connection reset by peer]
<morfin>
i think Facebook inventing own HHVM/Hack wheel because they have tonns of old code
adgtl has joined #ruby
<morfin>
and want make that work faster than just PHP(HHVM is almost compatible with PHP except maybe some things like annotations)
jaruga_ has quit [Ping timeout: 268 seconds]
<yorickpeterse>
When you have millions of lines of code in X it makes sense to write a better version of X
<yorickpeterse>
as it's probably faster/easier than re-writing everything in Y and re-training everybody for Y
xaxisx has quit [Ping timeout: 268 seconds]
nocontrol has joined #ruby
Kiwi_sherbet has joined #ruby
aryaching has joined #ruby
xaxisx has joined #ruby
<umdstu>
havenwood: is that the new option for including things like readline and ssl and yaml libs ?
<morfin>
yes, that's a point
last_staff has quit [Quit: last_staff]
mary5030 has joined #ruby
<havenwood>
umdstu: not new, but yeah, colon delimited
mary5030 has quit [Remote host closed the connection]
<morfin>
but what if creating/maintaining better X is more expensive?
jaruga has joined #ruby
jaruga is now known as jaruga_
nocontrol has quit [Remote host closed the connection]
nocontrol has joined #ruby
mary5030 has joined #ruby
<umdstu>
alright thanks man
skade has joined #ruby
skweek has joined #ruby
jaruga_ has quit [Client Quit]
BSab has joined #ruby
gregf_ has quit [Quit: leaving]
Sucks has joined #ruby
jaruga has joined #ruby
jaruga is now known as jaruga_
zotherstupidguy has joined #ruby
xaxisx has quit [Quit: xaxisx]
Tharbakim has quit [Read error: Connection reset by peer]
BrunoSaboia has quit [Ping timeout: 240 seconds]
shanemcd has quit [Remote host closed the connection]
MarcWebe1 has quit [Quit: leaving]
shanemcd has joined #ruby
ashishjain has joined #ruby
<ashishjain>
Hello a newbie here trying to modify html.erb files
ekaleido is now known as kaleido
<ashishjain>
but somehow changes made to this file are not reflected once I restart my server
kaleido has quit [Changing host]
kaleido has joined #ruby
<ashishjain>
Can someone please advice how to go about modifying an html.erb file
skweek has quit [Remote host closed the connection]
Tharbakim has joined #ruby
<havenwood>
ashishjain: Sounds suspicious... Does it still work with the file moved or deleted? :O Are you sure you've got the right file and right server?
<darix>
restart your server after changing it?
chipotle has joined #ruby
<ashishjain>
havenwood, Yes I have got the right file,
<ashishjain>
havenwood, it works even after moving the file
<ashishjain>
do i need to rebuild this up?
skweek has joined #ruby
skweek has quit [Remote host closed the connection]
dgncn has quit [Excess Flood]
theunraveler has joined #ruby
dgncn has joined #ruby
jyaworski has joined #ruby
rubie has quit [Remote host closed the connection]
merida_ has joined #ruby
shanemcd has quit [Remote host closed the connection]
merida has quit [Ping timeout: 244 seconds]
nocontrol has quit []
shanemcd has joined #ruby
benjwadams has joined #ruby
<benjwadams>
How does rvm activate when `cd`ing into a directory?
tjohnson has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
the_drow has quit [Quit: This computer has gone to sleep]
<ashishjain>
guys can someone help
<umdstu>
havenwood: now i get make has both : and :: entries. Stop. error when running make
<benjwadams>
I'm trying to run some ancient scripts i inherited via a shell script and have to do something like `/bin/bash -l -c 'cd rubydir && ruby somefile.rb'` and would like to just activate rvm but don't know *how* because of black magic
<umdstu>
tried make clean and it gets the same error
gbgdev has joined #ruby
anisha has joined #ruby
rmulligan has joined #ruby
gbgdev has quit [Read error: Connection reset by peer]
gbgdev has joined #ruby
poerror has quit [Ping timeout: 244 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<havenwood>
benjwadams: For a newer project it's probably detecting a .ruby-version or .rvmrc file or a Gemfile with the Ruby version specified: https://rvm.io/workflow/projects
<havenwood>
ashishjain: If it runs when not present, it's not what's running. Asset compilation going on?
shanemcd has quit [Remote host closed the connection]
rubie has joined #ruby
<ashishjain>
havenwood, could it be cached in someway?
B1n4r10 has quit [Read error: Connection reset by peer]
<havenwood>
ashishjain: I dunno what your code does!
rmulligan has quit [Ping timeout: 252 seconds]
aryaching has quit [Read error: No route to host]
RegulationD has joined #ruby
nerium has quit [Quit: nerium]
<benjwadams>
havenwood: probably more the gemfile paths? ruby version is the same but `rvm info` shows different gemfile paths
synthroid has quit [Remote host closed the connection]
<benjwadams>
*gem
<ghr>
anyone know if there's a page on ruby official support arragements, or is it pretty ad-hoc?
<havenwood>
umdstu: I'd expect make clean to do the trick, hrm. Dunno!
<benjwadams>
probably gemsets? I'm not a rubinian, so I don't know the parlance
adgtl has quit [Remote host closed the connection]
<ghr>
Yeah I noticed that, but didn't know whether there was any timeline for current versions
adgtl has joined #ruby
adgtl has quit [Changing host]
adgtl has joined #ruby
<ghr>
e.g. Debian says there's support for Jessie until May 2020
<havenwood>
benjwadams: Yeah, gemsets are an RVM thing that most folk use Bundler for now.
RegulationD has quit [Ping timeout: 248 seconds]
<havenwood>
ghr: What's your current version?
sandstrom has joined #ruby
<havenwood>
ghr: Ah, Jessie, so 2.1.
hakunin_ has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
maner has joined #ruby
eregi has joined #ruby
<ghr>
Yeah. We use rbenv in prod so not too worried about us specifically, but just wondering what the ruby core team's policy is on maintenance and support
houhoulis has joined #ruby
<havenwood>
ghr: I'd expect Ruby 2.1 to reach end-of-life from Ruby's perspective on Feb 24, 2017.
<havenwood>
ghr: It'll be in security maintenance mode in a few weeks so it's days of bugfixes are about to end.
<havenwood>
its*
chouhoulis has joined #ruby
<ghr>
So security maintenance is about a year after bugfixes end?
<havenwood>
ghr: yup
<ghr>
great, cheers :)
casadei has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
<hxegon>
ask yourself why that regex needs to be /(.)(.)/
sandstrom has quit [Ping timeout: 240 seconds]
quakephil_ has joined #ruby
<quakephil_>
Hi all! I have a little sinatra api svc I'm playing around with. I have a get route that works. But if I change the "get" to "post" in the code (and accordingly in postman) it breaks with: Unexpected error while processing request: bad content body
<quakephil_>
Any clues?
y2mq37 has joined #ruby
aufi has quit [Ping timeout: 248 seconds]
eregi has quit [Ping timeout: 252 seconds]
sneakerhax has quit [Ping timeout: 246 seconds]
wilbert has quit [Ping timeout: 240 seconds]
<hxegon>
quakephil_ it would help if there was more detail. What is the request body?
<quakephil_>
hxegon: I just figured it out... I was sending form-data in postman body, setting it to raw and now its working
<quakephil_>
Had nothing to do with ruby :X but you were on the right track!
decoponio has joined #ruby
cpup has quit [Ping timeout: 264 seconds]
<hxegon>
quakephil_ :)
SCHAAP137 has quit [Remote host closed the connection]
stunder has joined #ruby
cpup has joined #ruby
casadei_ has joined #ruby
wilbert has joined #ruby
Renich has joined #ruby
al2o3-cr has joined #ruby
faelkle is now known as faelkle_away
atmosx has quit [Quit: This is aparting message!]
DonOtreply has joined #ruby
Alayde has joined #ruby
Renich has quit [Client Quit]
casadei has quit [Ping timeout: 248 seconds]
ashishjain has quit [Quit: Leaving]
poerror has joined #ruby
kaleido has quit [Remote host closed the connection]
freerobby has joined #ruby
mrgrieves has quit [Ping timeout: 260 seconds]
DonOtreply has quit [Client Quit]
billy_ran_away has joined #ruby
Alayde has quit [Client Quit]
Alayde has joined #ruby
Alayde has left #ruby [#ruby]
<billy_ran_away>
Can someone explain why this Regex isn't working for "Given a plan year, with premium tables, something else, exists", regex is: /a plan year(?:, ([^,]*),)* exists/
eregi has joined #ruby
<billy_ran_away>
I would expect 2 captures, but I get none
<ljarvis>
billy_ran_away: why would you expect two?
<ljarvis>
billy_ran_away: and what exactly do you want? your regex is confusing
<billy_ran_away>
ljarvis: Can I do a variable number of captures?
<ljarvis>
billy_ran_away: regular expressions don't work like that by default, what result do you want?
znz_jp has joined #ruby
<billy_ran_away>
ljarvis: I want two captures from the 2nd example: 'with premium tables' and 'something else'
sandstrom has joined #ruby
<ljarvis>
billy_ran_away: is this test string actually real, or are you doing this separately for each line for example?
wilbert has quit [Ping timeout: 240 seconds]
<billy_ran_away>
But I'd like it to be optional so that "Given a plan year exists" matches period, and if there is only one attribute it's captured, like "Given a plan year, with premium tables, exists"
<billy_ran_away>
ljarvis: separately for each line
<tobiasvl>
capture the entirety of the string between the prefix and suffix, and split it with commas?
DonOtreply has joined #ruby
<tobiasvl>
I didn't look too closely on what you're trying to do but that looks like the simplest solution
<billy_ran_away>
tobiasvl: Yea that's one idea, it's lame, but it'd work
<tobiasvl>
haha, why lame
adgtl has quit [Remote host closed the connection]
paul98 has left #ruby [#ruby]
DonOtreply has quit [Client Quit]
<billy_ran_away>
because it's a cucumber step definition, i'd like to pass the proc a variable number of parameters and then just explode them to the helper method I'm using
shanemcd has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
<norc>
billy_ran_away, are you trying to parse cucumber code?
<ljarvis>
msg31: what do you mean "the value that is being got"? it tells you what's expected and that didn't happen
<billy_ran_away>
norc: writing a step definition
shanemcd has quit [Remote host closed the connection]
<norc>
billy_ran_away, nevermind then.
htmldrum has quit [Ping timeout: 260 seconds]
<msg31>
ljarvis, right it didn't get array with the values, but I want to know what array/values it actually got
joonty has quit [Ping timeout: 248 seconds]
merida_ has quit [Ping timeout: 244 seconds]
Rinalds has quit [Ping timeout: 244 seconds]
shanemcd has joined #ruby
<msg31>
ljarvis, I want to know what value is associated with ":execute"
shanemcd has quit [Remote host closed the connection]
HalcyonicStorm has quit [Quit: Leaving.]
Don_John has quit [Ping timeout: 250 seconds]
tinnvec has quit [Remote host closed the connection]
stannard has joined #ruby
<umdstu>
havenwood: just started fresh, no error. would the same command work to include openssl, libyaml, etc? it doesn't seem to be picking anything up but readline in /usr/
tinnvec has joined #ruby
<havenwood>
umdstu: yup
rmulligan has quit [Ping timeout: 252 seconds]
yardenbar has quit [Ping timeout: 260 seconds]
Bloomer has joined #ruby
<umdstu>
hmmph
Prominent has quit [Ping timeout: 252 seconds]
<havenwood>
umdstu: maybe even gdbm while you're at it ;)
bronson has joined #ruby
tenderlove has joined #ruby
<umdstu>
never heard of it!
Don_John has joined #ruby
Sembei has quit [Quit: WeeChat 1.5-dev]
elaptics is now known as elaptics`away
<havenwood>
Gnu dbm, ruby has DBM, GDBM, SDBM and even YAML::DBM for when you tire of only String values. :O
malconis_ has quit [Remote host closed the connection]
malconis_ has joined #ruby
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
what is this dbm stuff used in ruby - I don't think I have ever used that before
<al2o3-cr>
shevy: simple databases
sandstrom has quit [Ping timeout: 268 seconds]
malconis has quit [Ping timeout: 276 seconds]
baweaver has joined #ruby
elaptics is now known as elaptics`away
grill is now known as TRUMP4EVR
<shevy>
well sqlite is simple!
adgtl has quit [Remote host closed the connection]
eregi has quit [Ping timeout: 252 seconds]
Xeago_ has quit [Remote host closed the connection]
mfaeh has quit []
binaryplease has quit [Ping timeout: 246 seconds]
wldcordeiro has quit [Ping timeout: 276 seconds]
Snowy has quit [Quit: ragequit]
mistermocha has joined #ruby
Shaboum has quit [Quit: WeeChat 1.4]
go-nuts has joined #ruby
<go-nuts>
im trying to understand this: const x = i % 8; const y = Math.floor(i / 8); const black = (x + y) % 2 === 1; i can be any nbr from 0 to 64 in a loop
<ljarvis>
well that's not ruby
<go-nuts>
it's for a chess board
<go-nuts>
im conveting it to ruby so convert the syntax in your head if you can
baweaver has quit [Remote host closed the connection]
<ljarvis>
how about you convert the syntax and then ask for help with the code you produce?
_ht has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
<go-nuts>
grr
chipotle has quit [Quit: cheerio]
sandstrom has joined #ruby
<ljarvis>
are you unhappy that someone won't do this work for you?
adgtl has joined #ruby
<go-nuts>
x = i % 8 ; y = i/8 ; black = ((x+y) % 2 == 1)
mistermocha has quit [Ping timeout: 240 seconds]
marr has joined #ruby
niksrc has joined #ruby
<ljarvis>
that's not exactly the same, but anyway, which part don't you understand?
<go-nuts>
what does this code mean? why do we need the modulo of 8 and i/8 just to set a cell to black=true or false. I'm trying to understand the math
<go-nuts>
it's related to a chess board
<go-nuts>
which has 64 cells
diegoviola has joined #ruby
x77686d has quit [Quit: x77686d]
maletor has joined #ruby
roshanavand has joined #ruby
pawnbox has quit [Remote host closed the connection]
chipotle has joined #ruby
<eam>
go-nuts: looks like they're storing x/y coordinates in a single integer?
lxsameer has quit [Quit: Leaving]
merida has joined #ruby
fedexo has quit [Ping timeout: 248 seconds]
<eam>
x is stored as the values of 0 through 7, y is stored as multiples of 8
<eam>
weird way to do it if that's the case
<ljarvis>
they're just calculating the coordinates for each row, if you print them out for each iteration and follow a chess board you'll see how it works
<ljarvis>
it's not how I'd write it though
pawnbox has joined #ruby
<apeiros>
eam: that's just using an index instead of coordinates
<apeiros>
used the same when I wrote my sudoku solver
SenpaiSilver has joined #ruby
<eam>
apeiros: yeah, I just don't get why y = i/8
<ljarvis>
as someone who hates math, I do it the long way :D
nennes has quit [Quit: Leaving]
<apeiros>
i.e. you index all fields, top left is 0, bottom right is 80 (for sudoku - haven't read this case)
mostlybadfly has joined #ruby
SenpaiSilver has quit [Max SendQ exceeded]
<apeiros>
so go-nuts is having a chess board from what I read in the backlog?
mistermocha has joined #ruby
<apeiros>
i should only go from 0 to 63 then, though. not 64 as they report.
aryaching has quit [Read error: Connection reset by peer]
<umdstu>
so after rebuilding and installing ruby with ssl, readline, etc. I get an 'incompatible library version' error with thread.so when using the gem command
<umdstu>
the gem binary didn't get updated with the ruby install
mistermocha has quit [Remote host closed the connection]
shanemcd has quit [Remote host closed the connection]
BSaboia has joined #ruby
Mon_Ouie has joined #ruby
moos3 has joined #ruby
BSab has quit [Ping timeout: 252 seconds]
edwinvdgraaf has joined #ruby
graffix has quit [Ping timeout: 276 seconds]
SCHAAP137 has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KensoDev has quit [Client Quit]
KensoDev has joined #ruby
weemsledeux has joined #ruby
shanemcd has joined #ruby
eregi has quit [Ping timeout: 276 seconds]
baweaver has joined #ruby
ybakos1 has joined #ruby
<shevy>
sounds as if you did something wrong
blackmes1 has quit [Quit: WeeChat 1.4]
eregi has joined #ruby
graffix has joined #ruby
synthroid has quit [Remote host closed the connection]
jottr has joined #ruby
joonty has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
ponga has quit [Quit: Connection closed for inactivity]
RegulationD has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
baweaver has quit [Ping timeout: 268 seconds]
blackmesa has joined #ruby
cpup has joined #ruby
Billias has quit [Read error: Connection reset by peer]
shanemcd has quit [Remote host closed the connection]
the_drow has joined #ruby
poerror has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 240 seconds]
Limix has joined #ruby
<xgfnxftt>
Today I learned that we are switching from Ruby to Go, Erlang, and Elixir.
<xgfnxftt>
Some background: We are a development company with about 15 developers, some senior, some junior, and some in between. We have a so called SOA platform where most services are written in Rails with some custom modifications. We are having performance issues (100-200 req/second against hardware with several hundreds of cores & several hundred GB RAM) and issues with large amount of technical debt that gives us problems releasing new feat
<xgfnxftt>
We have some Go code already and a few developers with a bit of Go experience. I think it's great to have the opportunity to learn new languages, but Im sceptical that switching language will improve the situation.
joonty has quit [Ping timeout: 276 seconds]
stannard has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 250 seconds]
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
synthroid has joined #ruby
poerror has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<xgfnxftt>
We are also going to stop using http/json calls between services and instead do protobuf over RabbitMQ
jackjackdripper1 has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
Sucks has quit [Read error: Connection reset by peer]
fschuindt has quit [Quit: WeeChat 1.3]
<nickjj>
xgfnxftt, have you tried replacing a few small services and then benchmark the changes?
<nickjj>
nothing is going to give you an answer as accurate as actually testing the thing you're trying to figure out
mfb2 has joined #ruby
uglybandersnatch has quit [Ping timeout: 246 seconds]
Sembei has joined #ruby
tulak has quit []
cpruitt has joined #ruby
intrigueD has quit [Remote host closed the connection]
jyaworski_ has joined #ruby
<xgfnxftt>
nickjj, yes, we did an experiment with one service, on one machine the old code did about 50 req/sec, a go version did 100 req/sec and one in Ddid around 600 req/sec. It was a basically finding a record and returning it as json
The_Phoenix has quit [Read error: Connection reset by peer]
daytime has quit [Ping timeout: 612 seconds]
<xgfnxftt>
nickjj, we don't do caching btw
<nickjj>
selective caching sounds a bit easier than rewriting your entire platform in a different language
kirun has joined #ruby
jyaworski has quit [Ping timeout: 276 seconds]
jyaworski_ is now known as jyaworski
<xgfnxftt>
i think so too
<nickjj>
i'm also a bit surprised about your figures, even if your rails app could only pump out 10 reqs/second, then you shouldn't need more than 10 servers to reach 100/second
<xgfnxftt>
well, its a lot of services talking to each other, not many instances of one service
snockerton1 has joined #ruby
e has joined #ruby
flou has quit [Ping timeout: 240 seconds]
snockerton1 has quit [Read error: Connection reset by peer]
snockerton2 has joined #ruby
rmulligan has joined #ruby
stannard has joined #ruby
<xgfnxftt>
i would expect a rails app to do a few hundred req/sec on a normal server unless it was doing something heavy
snockerton has quit [Ping timeout: 252 seconds]
<nickjj>
it's impossible to generalize reqs/s like that, because it depends on so many things
cpup has quit [Ping timeout: 268 seconds]
<nickjj>
what type of server are you running? what is the app doing?
eggoez has quit [Ping timeout: 250 seconds]
flou has joined #ruby
flou has quit [Client Quit]
<xgfnxftt>
of course, but this was fetching a record and returning it as json, nothing heavy
bronson has joined #ruby
sankaber has quit [Remote host closed the connection]
<xgfnxftt>
it virtualized so not sure, it wasnt a prod machine anyway
cpup has joined #ruby
sankaber has joined #ruby
stannard_ has joined #ruby
<nickjj>
i would just do a cache/benchmark/repeat loop until your perform is good enough
<nickjj>
*performance
console has joined #ruby
<nickjj>
and before caching just do a once over on everything to track down poorly written queries (if any)
rmulligan has quit [Ping timeout: 252 seconds]
stannard has quit [Ping timeout: 250 seconds]
ybakos1 has quit [Ping timeout: 240 seconds]
poerror has joined #ruby
ybakos2 has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
e has quit [Read error: Connection reset by peer]
niksrc has quit [Quit: Leaving]
<xgfnxftt>
mm, somethng is weird when go is only twice as fast as ruby, but D is 5 times faster than Go
DexterLB has quit [Ping timeout: 276 seconds]
<xgfnxftt>
also not sure hot switching language will help with code quality
<xgfnxftt>
s/hot/how
<nickjj>
often times the largest gains from rewrites are making funamental changes that could in theory be applied with any language
htmldrum has joined #ruby
eggoez has joined #ruby
TDJACR has left #ruby ["WeeChat 1.4"]
<xgfnxftt>
agreed
<nickjj>
obviously a compiled statically typed language will perform better too, no one will deny that, but massive perform improvements are a combination of a few things usually
<nickjj>
*ance
sandstrom has quit [Quit: My computer has gone to sleep.]
the_drow has quit [Quit: This computer has gone to sleep]
<xgfnxftt>
thats likely, but it depends on what the bottleneck is, if its the database it might not make a big difference
moeabdol2 has joined #ruby
<nickjj>
right, and in a lot of cases your db will be your bottleneck
hahuang65 has quit [Ping timeout: 240 seconds]
<nickjj>
but then you can solve that somewhat easily by just caching things if your app is mostly read heavy (which most are)
intrigueD has joined #ruby
dtordable has joined #ruby
moeabdol1 has quit [Ping timeout: 252 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<xgfnxftt>
well, its going to be interesting to see how it goes at least :)
htmldrum has quit [Ping timeout: 248 seconds]
dtordable has quit [Client Quit]
Cohedrin has joined #ruby
LastWhisper____ has quit [Ping timeout: 252 seconds]
roshanavand has quit [Quit: This computer has gone to sleep]
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as diegoviola
cpup has quit [Ping timeout: 244 seconds]
dtordable has joined #ruby
the_drow has joined #ruby
baweaver has joined #ruby
cpup has joined #ruby
dtordable has quit [Remote host closed the connection]
solars has quit [Ping timeout: 250 seconds]
dc1 has joined #ruby
Limix has quit [Quit: Limix]
rmulligan has joined #ruby
mfb2 has quit [Remote host closed the connection]
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
B4daBing73 has joined #ruby
go-nuts has quit [Quit: Page closed]
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
jgpawletko has joined #ruby
Hammy_Work has quit [Quit: Leaving]
imperator has joined #ruby
baweaver has quit [Remote host closed the connection]
boontdustie has quit [Read error: Connection reset by peer]
boontdus` has joined #ruby
sandstrom has joined #ruby
zotherstupidguy has quit [Ping timeout: 260 seconds]
acidrainfall has joined #ruby
LastWhisper____ has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
aaeron has joined #ruby
rmulligan has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 244 seconds]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
shanemcd has joined #ruby
rmulligan has joined #ruby
Supplication has quit [Ping timeout: 248 seconds]
wilbert has joined #ruby
fourq is now known as fourq|away
workmad3 has quit [Read error: Connection reset by peer]
Coldblackice has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
rmulligan has quit [Remote host closed the connection]
shanemcd has quit [Remote host closed the connection]
Wicaeed has joined #ruby
shanemcd has joined #ruby
rmulligan has joined #ruby
ArtursL has joined #ruby
fourq|away is now known as fourq
fourq is now known as fourq|away
<c_nick>
if i want to represent 123987456 in 4 characters will it be 1240 or 1239?
<norc>
acidrainfall, just a random example. You could also pass an explicit hash like obj.flush_synced({index: ["foo", "bar"], allow_no_indices: true})
<acidrainfall>
./es_rolling_restart.rb:69:in `sync_flush': undefined method `flush_synced' for "apollo-d-01.lv.ntent.com":String (NoMethodError)
gbgdev has quit [Remote host closed the connection]
<acidrainfall>
Yeah but obj.flush_synced doesn't work.
kinduff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tobiasvl>
obj is a string?
<norc>
People really need to learn to read exceptions and understand them. :
<norc>
:S
<acidrainfall>
Oh god dammit
<acidrainfall>
Learning is hard
<ruby-lang004>
:$
<acidrainfall>
./es_rolling_restart.rb:69:in `sync_flush': undefined method `flush_synced' for "apollo-d-01.lv.ntent.com":String (NoMethodError)
<acidrainfall>
Stop it clipboard
<acidrainfall>
./es_rolling_restart.rb:70:in `sync_flush': undefined method `flush_synced' for #<Elasticsearch::Transport::Client:0x00556db1d47b90> (NoMethodError)
ramfjord_ has joined #ruby
<acidrainfall>
Yeah sorry I forgot I had messed with code in between my questions
<norc>
acidrainfall, you are calling it on an instance of Elasticsearch::Transport::Clien
<acidrainfall>
So that must be what I'm doing wrong. I'm sorta reverse engineering a script I picked up
<tobiasvl>
you need to call it on an Elasticsearch::API::Indices::IndicesClient
<acidrainfall>
I could have just done a quick http POST but I wanted to at least try learning how to use the API.
<tobiasvl>
or something else that includes Elasticsearch::API::Indices::Actions
<acidrainfall>
Oh I see.
<acidrainfall>
Okay
<tobiasvl>
which is the module you linked to earlier
<norc>
acidrainfall, look at the exception message.
<norc>
acidrainfall, it basically tells you that the object does not respond to the method "flush_synced" - this usually always means you are calling a method on the wrong object.
<acidrainfall>
Right
<acidrainfall>
I know that
<norc>
>> a = {}; a.chomp
<acidrainfall>
I just don't understand how I'm supposed to figure it out.
<ruby[bot]>
norc: # => undefined method `chomp' for {}:Hash (NoMethodError) ...check link for more (https://eval.in/534406)
mdw has joined #ruby
<acidrainfall>
They didn't document this bit in their API
<norc>
acidrainfall, if you are diving into a script like that it can be beneficial to pry directly into where you are working at.
<norc>
That way you can quickly inspect the objects around.
<acidrainfall>
Well, I've gone to the docs of the actual gem
<acidrainfall>
And they didn't even touch on how to use these methods
<acidrainfall>
It's just there
<acidrainfall>
Which I assume for a seasoned ruby veteran is obvious, but as I'm not, I'm struggling.
ramfjord has quit [Ping timeout: 276 seconds]
<norc>
acidrainfall, browsing through the doc its not obscure really.
<norc>
acidrainfall, top tells you that this method is part of a module, which is included in IndicesClient.
shanemcd has joined #ruby
<acidrainfall>
Which is also apparently not a valid method
<norc>
IncicesClient is a class.
shanemcd_ has quit [Read error: Connection reset by peer]
Nahra has joined #ruby
BSaboia has quit [Ping timeout: 240 seconds]
<norc>
acidrainfall, honestly my best suggestion is: If you honestly want to quickly dive into a script with libraries you dont understand: Learn the library first. Get experienced so you know what you re doing. Hire someone to do it for you.
mr_rich101 has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
Xiti has joined #ruby
<acidrainfall>
That's not a realistic expectation
<acidrainfall>
Hiring someone to do it.
<norc>
acidrainfall, it quite is.
<acidrainfall>
I'm trying to learn enough Ruby to skate by, in a company that has no Ruby experience aside from myself
<norc>
acidrainfall, if you want someone else to do something for you, the common thing is to pay him.
<acidrainfall>
I hate that that's your position every time someone asks a question
gizless has joined #ruby
<acidrainfall>
Why be in a channel where noobs ask for help if you judge their stupid questions?
gizless has quit [Client Quit]
<norc>
acidrainfall, you misunderstood my list of recommendations for shooting you down.
<acidrainfall>
I'm trying to learn this with a very small amount of time given to me
<acidrainfall>
I must have done.
<norc>
acidrainfall, I was merely saying that these are the 3 realistic options you have for solving your issue.
intrigueD has joined #ruby
<acidrainfall>
So,
<acidrainfall>
I'm here, trying to get experienced.
<postmodern>
when would it be acceptable to use t2 - t1 instead of Benchmark.measure ?
<postmodern>
never?
djcp has quit [Ping timeout: 252 seconds]
ruby-lang004 has quit [Ping timeout: 252 seconds]
<TRUMP4EVR>
what does "out of char range (RangeError)" mean?
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TRUMP4EVR>
I am simply pushing strings / ints onto another string with the << method
joonty has quit [Ping timeout: 268 seconds]
<eam>
TRUMP4EVR: likely the ordinal values don't represent a character in your string's encoding
<quakephil_>
Is there any way to test phpass generated nonportable passwords? https://github.com/uu59/phpass-ruby doesn't help as it handles portable passwords only :<
<quakephil_>
Right now my solution is to call a little php script but that is such a kludge :X
<norc>
quakephil_, help me with something.. what is a portable password?
<quakephil_>
Portable one just uses md5 I think. Nonportable tacks on blowfish as per phpass spec
<TRUMP4EVR>
eam what does that mean
<slash_nick>
yeah, eam... what should he do? let's make his code great again!