cseder has quit [Read error: Connection reset by peer]
esObe_ has quit [Ping timeout: 260 seconds]
dcunit3d has quit [Ping timeout: 255 seconds]
JoshS has joined #ruby
__Yiota has joined #ruby
Guest96 has quit [Remote host closed the connection]
marxarelli is now known as marxarelli|afk
Guest96 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
brent__ has joined #ruby
SeepingN has quit [Ping timeout: 240 seconds]
nicesignal has quit [Remote host closed the connection]
ahrs has quit [Remote host closed the connection]
nicesignal has joined #ruby
marr has quit [Ping timeout: 240 seconds]
ahrs has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has quit [Ping timeout: 240 seconds]
skade_ has joined #ruby
JeanCarloMachado has joined #ruby
dcunit3d has joined #ruby
charliesome has joined #ruby
GinoMan2440 has joined #ruby
skade_ has quit [Ping timeout: 240 seconds]
<masterasia>
Is it possible for a module to have an instance variable?
eljimmy has joined #ruby
dmtd has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 276 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
excph has joined #ruby
<excph>
Hello ! I heard in ruby i can write bug free codes ??
<llua>
puts 'Hello world!'
PresidentBiscuit has joined #ruby
<excph>
I dont know much about ruby, but how can i allow semicolon after each line of code?
rgr_ has quit [Ping timeout: 258 seconds]
bsartek has quit [Quit: This computer has gone to sleep]
__Yiota has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
p0p0pr37_ has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
milardovich has quit [Remote host closed the connection]
duderonomy has quit [Read error: Connection reset by peer]
mjora7 has joined #ruby
Channel6 has joined #ruby
xco has left #ruby [#ruby]
PaulCapestany has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
azwieg103 has quit [Quit: leaving]
Vile` has quit [Ping timeout: 264 seconds]
PaulCape_ has joined #ruby
JeanCarloMachado has joined #ruby
p0p0pr37 has quit [Ping timeout: 260 seconds]
p0p0pr37_ is now known as p0p0pr37
nitric has quit [Ping timeout: 260 seconds]
mjora7 has quit [Client Quit]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
d^sh has quit [Ping timeout: 240 seconds]
gbailey has joined #ruby
d^sh has joined #ruby
<havenwood>
masterasia: Yes, though there's only one instance of a module. If you show us how you're thinking of using them we might have better options.
mjora7 has joined #ruby
Alina-malina has quit [Ping timeout: 255 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
PresidentBiscuit has quit [Remote host closed the connection]
cschneid_ has joined #ruby
PresidentBiscuit has joined #ruby
AnoHito has joined #ruby
Alina-malina has joined #ruby
Vile` has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PresidentBiscuit has quit [Ping timeout: 255 seconds]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<masterasia>
havenwood, thanks. I was trying to write a small memoization module
<masterasia>
solved
<masterasia>
I wanted classes that included the module
<masterasia>
to inherit the instance variables
<masterasia>
so that the classes dont have to initialize it
AnoHito has joined #ruby
<havenwood>
masterasia: If you have no state to instantiate, module. If you have one instance of state, singleton class. If you have multiple instances of state, class.
<havenwood>
Maybe not relevant to what you're doing. Shareable code?
sp4rrow has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JoshS has quit [Ping timeout: 240 seconds]
skade_ has joined #ruby
JeanCarloMachado has joined #ruby
iliketurtles has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
skade_ has quit [Ping timeout: 260 seconds]
linetrace has quit [Quit: leaving]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
__Yiota has joined #ruby
gizmore|2 has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore has quit [Ping timeout: 240 seconds]
rails4444 has quit [Quit: Leaving.]
szulak has quit [Quit: bye!]
bataii has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ahrs has quit [Remote host closed the connection]
libastral has quit [Ping timeout: 276 seconds]
BSAlb has joined #ruby
ahrs has joined #ruby
libastral has joined #ruby
ben_ has joined #ruby
BSaboia has quit [Ping timeout: 260 seconds]
PresidentBiscuit has joined #ruby
Dry_Lips has quit [Ping timeout: 268 seconds]
JeanCarloMachado has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
jameser has joined #ruby
mim1k has joined #ruby
PresidentBiscuit has quit [Remote host closed the connection]
sp4rrow has joined #ruby
genpaku has quit [Remote host closed the connection]
sp4rrow has quit [Client Quit]
charliesome has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
genpaku has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
bataii has joined #ruby
Andrevan has joined #ruby
milardovich has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has quit [Changing host]
eljimmy has quit [Quit: This computer has gone to sleep]
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
eljimmy has joined #ruby
gnufied has joined #ruby
iliketurtles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dlitvak has quit [Quit: Connection closed for inactivity]
skade_ has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
droptone has joined #ruby
JeanCarloMachado has joined #ruby
User458764 has joined #ruby
User458764 has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
iliketurtles has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
polysics has quit []
<Yxhvd>
The number of times I've needed the distinction from constants in the class scope can be counted on one digit though.
anisha has quit [Read error: Connection reset by peer]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
anisha has joined #ruby
guardianJ has quit [Remote host closed the connection]
jaruga has joined #ruby
guardianJ has joined #ruby
mjora7 has joined #ruby
bataii has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 246 seconds]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
jusa has joined #ruby
blackwind_123 has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Mortomes|Work has joined #ruby
Cohedrin has joined #ruby
jusa has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
bataii has joined #ruby
JeanCarloMachado has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
bataii has quit [Client Quit]
conta has joined #ruby
last_staff has joined #ruby
Verity has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
synstack is now known as synbot
synbot is now known as synstack
kristofferR has joined #ruby
jusa has joined #ruby
mim1k has joined #ruby
JeanCarloMachado has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
grh has joined #ruby
bataii has joined #ruby
polysics has joined #ruby
Pumukel has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
^mtkd has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
mtkd has joined #ruby
guardianJ has quit [Read error: Connection reset by peer]
guardianJ has joined #ruby
rgr_ has joined #ruby
andikr has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
droptone has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Burgestrand has joined #ruby
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
xall has joined #ruby
anisha has quit [Read error: Connection reset by peer]
xall has quit [Client Quit]
armyriad has joined #ruby
iliketurtles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Raiden__ has joined #ruby
modin has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 245 seconds]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
JeanCarloMachado has joined #ruby
<foxmask>
bonjello
ddffg has joined #ruby
nobitanobi has quit []
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
username_ has joined #ruby
modin has joined #ruby
JeanCarloMachado has quit [Ping timeout: 258 seconds]
TreyG has quit [Ping timeout: 240 seconds]
Xakotu has joined #ruby
quobo has joined #ruby
username_ has quit [Ping timeout: 240 seconds]
TreyG has joined #ruby
Xakotu has quit [Client Quit]
bataii has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_66 has joined #ruby
esObe_ has joined #ruby
djbkd has joined #ruby
Xakotu has joined #ruby
guardianJ has quit [Read error: Connection reset by peer]
erlend has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
antgel has joined #ruby
__Raiden__ has quit [Read error: Connection reset by peer]
esObe_ has quit [Ping timeout: 240 seconds]
Xakotu has quit [Client Quit]
franck_ has joined #ruby
esObe_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
franck_ has quit [Client Quit]
guardianJ has joined #ruby
__Raiden__ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hxegon has quit [Ping timeout: 245 seconds]
JeanCarloMachado has joined #ruby
TvL2386 has quit [Ping timeout: 255 seconds]
ksinkar has joined #ruby
TvL2386 has joined #ruby
BTRE has quit [Quit: Leaving]
BTRE has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
<ksinkar>
Just read a function signature similar to `def some_function(param_a:, param_b:, param_c:)` Any idea what is the meaning of these params with a colon at the end of the identifier. In the function body they are simply being accessed as `param_a` and there seems to be nothing special about `param_a:` in the the argument list.
Guest96 has quit [Remote host closed the connection]
<herwin>
you call it like "some_function(param_a: 'foo', param_b: 'bar')"
<herwin>
it's great for having a bunch of optional parameters
<herwin>
or as an illustration of the purpose of the parameter, 'foo(option1: true)' is clearer than 'foo(true)'
PresidentBiscuit has joined #ruby
jaruga has quit [Quit: jaruga]
skade_ has joined #ruby
jaruga has joined #ruby
Guest96 has joined #ruby
jcao219 has joined #ruby
patarr has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
PresidentBiscuit has quit [Ping timeout: 258 seconds]
jsrn_ has joined #ruby
JeanCarloMachado has joined #ruby
nishiki_ is now known as nishiki
jaruga has quit [Ping timeout: 268 seconds]
patarr has quit [Ping timeout: 258 seconds]
biberu has joined #ruby
blackmesa has joined #ruby
JeanCarloMachado has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
JeanCarloMachado has joined #ruby
Silthias has joined #ruby
marr has joined #ruby
bitcycle has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
bataii has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
hxegon has joined #ruby
leitz has joined #ruby
drcode has joined #ruby
guardianJ has joined #ruby
TreyG has quit [Ping timeout: 240 seconds]
TreyG has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
<leitz>
What Ruby tool do I use to simultaneously go do something on a bunch of servers? The idea is that the program can start something that takes a couple seconds but not take N * a_couple_seconds to finish.
excph has left #ruby [#ruby]
<Silthias>
leitz: the thing that jumps to mind is Choria/MCollective, I think they are written in Ruby (from what I recall), so you can then use it nativly within other Ruby apps/scripts.
JeanCarloMachado has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
zack6849 has quit [Ping timeout: 240 seconds]
astrobunny has quit [Remote host closed the connection]
TreyG has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
jaruga has joined #ruby
cfec0b8d has joined #ruby
ovaltine1 has quit [Ping timeout: 255 seconds]
KeyJoo has joined #ruby
JeanCarloMachado has joined #ruby
<havenwood>
leitz: When you say "go do something", what do you mean? Waiting for IO response? Computations?
marr has quit [Ping timeout: 255 seconds]
Mortomes|Work_ has joined #ruby
soc42 has quit [Remote host closed the connection]
<ljarvis>
just sounds like dispatch, so... Thread.new? :D
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mortomes|Work has quit [Ping timeout: 260 seconds]
mjora7 has joined #ruby
<havenwood>
sounds like a job for computational parallel flows on top of GenStage, ahem, I mean... yeah, Threads. :-)
<ljarvis>
:P
<havenwood>
leitz: Typhoeus is one of many lovely Ruby HTTP libraries that does parallel requests particularly well: https://github.com/typhoeus/typhoeus
<mikecmpbll>
DRb!
<havenwood>
leitz: There are many options.
Cohedrin has joined #ruby
guidos has quit []
guidos has joined #ruby
__Raiden__ has left #ruby ["Leaving"]
__Raiden__ has joined #ruby
__Raiden__ has left #ruby ["Leaving"]
__Raiden__ has joined #ruby
bigkevmcd has quit [Ping timeout: 240 seconds]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
armyriad has quit [Ping timeout: 268 seconds]
<leitz>
We have servers that are on ntp but still going out of sync. So the idea is to give it a list of servers; for each server "time_start = <seconds_since_epoch>, time_remote = <remote_seconds_since_epoch>, time_end = <seconds_since_epoch>" As long as the remote host's time is between the start and end, we're good.
<leitz>
I'd like to have it do all the servers "at once", realizing that "at once" isn't nanosecond "at once". I would prefer a 3 second task on 100 servers take less than 300 seconds.
anisha has joined #ruby
lipoqil has joined #ruby
ovaltine1 has joined #ruby
<leitz>
10 seconds would be a great goal.
<leitz>
Faster is better.
JeanCarloMachado has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ruby
JeanCarloMachado has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
guardianJ has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leitz>
Hmm..."net/ssh" isn't avaialb e for 2.4.0?
<leitz>
Or am I more confused.
<havenwood>
leitz: gem install net-ssh
<leitz>
Jsut found that.
Daneel has left #ruby ["wizzzzzzz"]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
guardianJ has joined #ruby
postmodern has quit [Quit: Leaving]
Komic_ has quit [Ping timeout: 240 seconds]
vayan has quit []
vayan has joined #ruby
Mortomes|Work_ has quit [Ping timeout: 260 seconds]
<leitz>
Hmm....exec, spawn, and system don't seem to give me what I need locally. Trying to set "time_now" to the results of "date +%s".
<leitz>
Using the date locally ensures the same output format as the remote.
bataii has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
guardianJ_ has joined #ruby
AlexRussia has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
<arne>
i have an array with a lot of numbers where many ( but not all ) are in order, and it's really big
<arne>
i have no chocie right, i have to read them all?
<canton7>
what do you mean by "compress"?
<arne>
well, i certainly could do [[start,end],[start,end]]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<canton7>
I thought you meant come up with a representation which uses less space but contains the same information, then you said you have to read them all...
<arne>
do i? if they're ordered and no duplicates?
romank has joined #ruby
JeanCarloMachado has joined #ruby
<arne>
i mean, couldn't i jump 20 ahead, check if it's the number i expect it to be
<herwin>
you could, if you want to make it more difficult
<canton7>
so is your question "I have this array, I want to create a compressed representation, but I don't want to read each element to do so"?
<arne>
well, not really, because if i could read every element quick. i wouldn't care.
<havenwood>
>> [1,2,3,4,5,6,10000,10001,10002,10004].chunk_while { |before, after| before.succ == after }.map { |a| a.one? ? a.first : a.first..a.last } # arne
<arne>
so it would be, i have an array with numbers ordered, no duplicates, not many gaps, and i want it compressed, but fast.
bsartek has quit [Quit: This computer has gone to sleep]
<Bish>
gem uninstall -aIx, if i remembeer correctly
<Bish>
no gems left, every project you work on should have a Gemfile, so you just bundle, get a cup of coffee and it works?
<Bish>
and user docker, docker is hip.
<leitz>
It's the "reinstall those you need" bit that requires human intervention. If gem uninstall took the entire gem name, including version, it would make finding and removing new ones easy.
mattwc has quit []
vali has joined #ruby
mattwc has joined #ruby
<Bish>
leitz: well you can uninstall certain versions
<Bish>
to find out which have been installed "recently" is the hard part i guess
<leitz>
Lean, Secure, and Productive are hip
<leitz>
To me, anyway.
<Bish>
reinstall those you need does not need human intervention.. if you have gemfiles
<leitz>
ls -lart in the gem repo shows the gems and install dates. But the gem names have versions which gem uninstall can't use.
<esObe>
hi guys, I'm learning sinatra, now trying to build a reddit app based on the tutorial http://www.drurly.com/blog/2012/06/05/build-reddit-in-sinatra/. I cut haml snippet code from reddit.rb file and pasted to views/index.haml and now after running server I can see error 'LocalJumpError at / no block given (yield)'
<mnemon>
esObe: with 10s look over, probably need to require the time_go_in_words gem.
gnufied has quit [Quit: Leaving]
patarr has quit [Ping timeout: 240 seconds]
xall has joined #ruby
<esObe>
done and there is still the same problem
<canton7>
esObe, been a while since I did sinatra... but don't you need to define a helper to make something available to templates? http://www.sinatrarb.com/intro.html#Helpers
hutch34 has quit [Ping timeout: 260 seconds]
<canton7>
and you'll need the explicit requires in the same file as you define the helper, as shown in the time_ago_in_words readme
<canton7>
(although, it would probably be easier to follow the Usage: "require 'time_ago_in_words'" and define your time_ago_in_words helper as 'def time_ago_in_words(time); time.ago_in_words; end'
marr has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
GodFather__ has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
thesubr00t has joined #ruby
<esObe>
okay thanks, let's see if it helps
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nertzy2 has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
<thesubr00t>
I have an array "a" containing all the checkpoints (points), and another array "b" containing the coupled checkpoints (x -> y). How to sort the first array in a way that no y comes after x
gnufied has joined #ruby
<thesubr00t>
before*
nertzy has quit [Ping timeout: 264 seconds]
millerti has joined #ruby
minimalism has quit [Quit: minimalism]
toretore has quit [Ping timeout: 260 seconds]
<ineb>
thesubr00t: you have a directed graph there and tsort is the algorithm for sorting that
goldleader has joined #ruby
thesubr00t has quit [Ping timeout: 268 seconds]
goldleader has quit [Client Quit]
vondruch has quit [Quit: vondruch]
toretore has joined #ruby
planigan has quit [Ping timeout: 258 seconds]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has quit [Quit: xall]
nertzy2 has quit [Ping timeout: 258 seconds]
nertzy2 has joined #ruby
GodFather__ has joined #ruby
jaruga has joined #ruby
vondruch has joined #ruby
thesubr00t has joined #ruby
skade_ has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
duckpupp1 has joined #ruby
xall has joined #ruby
xall has quit [Remote host closed the connection]
xall has joined #ruby
rgr_ has quit [Ping timeout: 240 seconds]
bataii has joined #ruby
bataii has quit [Client Quit]
vondruch has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
nertzy3 has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
rkazak has joined #ruby
polysics has quit [Read error: Connection reset by peer]
nertzy2 has quit [Ping timeout: 240 seconds]
JamesPeach has joined #ruby
FastJack has quit [Quit: leaving]
ledestin has joined #ruby
swills has quit [Quit: Leaving]
DuivesteijnM has quit [Ping timeout: 240 seconds]
nertzy2 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
xenops has quit [Ping timeout: 240 seconds]
nertzy3 has quit [Ping timeout: 245 seconds]
bataii has joined #ruby
swills has joined #ruby
Silthias1 has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
Silthias2 has joined #ruby
Silthias has quit [Ping timeout: 255 seconds]
synthroid has joined #ruby
mim1k_ is now known as mim1k
vali has quit [Quit: vali]
Bacta has joined #ruby
xenops has joined #ruby
rkellermeyer has joined #ruby
Silthias1 has quit [Ping timeout: 246 seconds]
synthroi_ has quit [Ping timeout: 240 seconds]
PresidentBiscuit has joined #ruby
xall has quit [Ping timeout: 260 seconds]
bataii has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroi_ has joined #ruby
Silthias2 has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
PresidentBiscuit has quit [Ping timeout: 246 seconds]
synthroid has quit [Ping timeout: 268 seconds]
Silthias1 has joined #ruby
yogg-saron has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
nertzy2 has quit [Quit: This computer has gone to sleep]
TreyG has joined #ruby
nertzy2 has joined #ruby
apparition has joined #ruby
DuivesteijnM has joined #ruby
jameser has joined #ruby
heftig1 is now known as heftig
millerti has joined #ruby
synthroid has joined #ruby
gaucheph has joined #ruby
bataii has joined #ruby
DLSteve has joined #ruby
synthroi_ has quit [Ping timeout: 240 seconds]
<Bacta>
How can I define my own custom operator in Ruby?
mostlybadfly has quit [Quit: Connection closed for inactivity]
ngee has quit [Remote host closed the connection]
<ljarvis>
Bacta: such as?
JamesPeach has quit [Ping timeout: 240 seconds]
synthroi_ has joined #ruby
guardianJ has joined #ruby
<Bacta>
∪
guardianJ has quit [Remote host closed the connection]
pwnd_nsfw` is now known as pwnd_nsfw
<ljarvis>
Bacta: how would you use it?
<Bacta>
Set.new([1, 2, 3]) ∪ Set.new([1,2,3])
<Bacta>
I can get Set.new([1, 2, 3]).∪ Set.new([1,2,3]) to work but cannot drop the period
mark_66 has left #ruby ["PART #elixir-lang :PART #crystal-lang :PING 1493912689"]
perniciouscaffei has joined #ruby
DuivesteijnM has quit [Read error: Connection reset by peer]
gusrub has joined #ruby
gusrub has quit [Client Quit]
ChiefAlexander has joined #ruby
gusrub has joined #ruby
ChiefAlexander has quit [Client Quit]
hutch34 has joined #ruby
synthroid has joined #ruby
last_staff has quit [Quit: last_staff]
xall has quit [Quit: xall]
xall has joined #ruby
omarek has joined #ruby
<omarek>
Hi, does Ruby string *slice* creation have O(1) time complexity ? It's O(k) in Python.
patarr_ has quit [Ping timeout: 264 seconds]
<omarek>
One person posted his Ruby solution to a programming task, and I can't verify his solution. I get a runtime error. But my understanding of the code is he treats string slice creation as if it was in constant time.
__Yiota has joined #ruby
fusta has joined #ruby
[Butch] has joined #ruby
xall has quit [Ping timeout: 268 seconds]
xall_ has joined #ruby
rkazak has joined #ruby
xall_ has quit [Client Quit]
<eam>
@omarek: it probably depends on the character encoding of the string
<omarek>
herwin: What I understood as someone who never programmed Ruby is that Ruby shares string data (the same string) as long as the slice contains both ends. But in my case it doesn't.
<omarek>
Here's the Ruby program someone posted, and it seems to imply that 'include?' action in slices is O(1) https://dpaste.de/EtKA
dhollinger has quit [Ping timeout: 258 seconds]
<omarek>
But I can't test it in online IDE, it has a runtime error.
mtkd has quit [Ping timeout: 240 seconds]
<omarek>
I actually typed that in from a screenshot (the Ruby programmer didn't know how to use <pre><code> in Disqus comments)
oleo has quit [Read error: Connection reset by peer]
username1 has joined #ruby
thoolihan has quit [Quit: ZNC 1.6.3 - http://znc.in]
<herwin>
I fail to see how this snippet implies include? runs in constant time
mtkd has joined #ruby
jsrn_ has quit [Quit: Leaving]
<omarek>
The program does something like this: You get a string of nucleotides 'ACTGCCTGACCTGCC' (A:1, C: 2, G: 3, T: 4) and two arrays P, Q. For each pair of p, q in P, Q (for example P[3] and Q[3]) you have to print lowest worth letter in slice p..q
roonsauce has quit [Remote host closed the connection]
<omarek>
Worst time complexity is O(String_length + array_length), and I achieve that with my Python solution. Can Ruby really achieve O(array_length) instead ??
<hanmac>
omarek first thing there is a typo in the dna hash, you need "T" => 4, otherwise you get "TypeError: no implicit conversion of Symbol into String"
FastJack has joined #ruby
mim1k has joined #ruby
<omarek>
hanmac: Thank you, corrected. I used Python syntax. Okay, that guy's solution works, I'll check how the website evaluates its time complexity.
skweek has quit [Ping timeout: 240 seconds]
<hanmac>
omarek: ruby has {sym: value} syntax too, but that results in a Symbol which are not 100% equal to a String
tomphp has joined #ruby
<omarek>
Okay, I tested it. Detected time complexity of the program is O(n+m), the same as Python except I wasn't able to so easily test existence in slices.
<omarek>
Slice creation in Python is O(k), where k is slice length.
mim1k has quit [Ping timeout: 268 seconds]
<hanmac>
i think the code can be optimized, like "dna.each_key do |key|" can be "dna.each do |key, value|" so that you don't need access dna[key] later
bataii has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Qer-S>
I have an hex string like this -> "\\x11\\x22\\x44\\x55" how can I pad it with N number of \x00 so that the total lenght of the string is 100: "\\x11\\x22\\x44\\x55\x00\\x00\\x00\\x00 ......"
JoshS has quit [Ping timeout: 268 seconds]
<elomatreb>
Qer-S: your_string.rjust 100, "\x00"
<elomatreb>
Uh, ljust
<Qer-S>
oh thanks elomatreb :)
antgel has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
Mia has quit [Ping timeout: 240 seconds]
lacrosse has left #ruby [#ruby]
skade_ has joined #ruby
postmodern has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
DeeJayh has joined #ruby
ben_____ has joined #ruby
ben_ has quit [Read error: Connection reset by peer]
solocshaw has joined #ruby
<DeeJayh>
How do we continue other tasks on a server while still listening for new client connections, but without relying on a new connection for other parts of the server to function?
<DeeJayh>
would it be as simple as changing the line 5 to be an if, rather than a waiting condition?
renchan has quit [Quit: Leaving...]
al2o3-cr has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
thoolihan has joined #ruby
kies^ has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pocketprotector- has quit [Changing host]
pocketprotector- has joined #ruby
<DeeJayh>
basically, the server is running the logic for games, it needs to accept new client connections so that new clients may authenticate and join in on the games, but games should run regardless, not rely on a new client connection to get touched
Cohedrin has joined #ruby
pocketprotector- is now known as pocketprotector
al2o3-cr has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
marxarelli|afk is now known as marxarelli
roonsauce has joined #ruby
devopsPrashu has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
<DeeJayh>
when listening in c, If there are unaccepted connections (governed by the second listen argument) accept just fetches one and it's done... Otherwise it actually waits for connections to become available before returning
<DeeJayh>
Which this seems to be doing, but I don't want it to wait for connections, I just want it to accept connections if they're queued up
lagweezle_away is now known as lagweezle
dcunit3d has quit [Ping timeout: 240 seconds]
roonsauce has quit [Ping timeout: 268 seconds]
Dimik has joined #ruby
ddffg has quit [Ping timeout: 240 seconds]
jaruga has quit [Quit: jaruga]
<u0_a170>
do anyone know how to import nmap in ruby or just in python
<DeeJayh>
the nice thing about Celluloid though is that it's a direct dropin replacement for socket. everything is the same, but non-blocking (unless you want it to be)
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
ddffg has joined #ruby
grh has joined #ruby
majjoha has left #ruby ["WeeChat 1.6"]
[Butch] has quit [Quit: I'm out . . .]
lagweezle is now known as lagweezle_away
jrafanie has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mia has joined #ruby
solocshaw has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
roonsauce has joined #ruby
Qer-S has quit [Ping timeout: 240 seconds]
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
dcunit3d has joined #ruby
Qer-S has joined #ruby
skade_ has quit [Read error: Connection reset by peer]
whysthatso has joined #ruby
davidmichaelkarr has joined #ruby
otherj has quit [Quit: .]
solocshaw has joined #ruby
User458764 has joined #ruby
foli has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
outreachdan has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
outreachdan has quit [Client Quit]
Bock has quit [Read error: Connection reset by peer]
skade_ has joined #ruby
outreachdan has joined #ruby
<Qer-S>
re
u0_a170 has joined #ruby
outreachdan has quit [Client Quit]
enterprisey has quit [Read error: Connection reset by peer]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
fusta has quit [Ping timeout: 258 seconds]
cdg has quit [Ping timeout: 240 seconds]
mrD_ has joined #ruby
blackmesa has joined #ruby
AlexRussia has joined #ruby
skade_ has quit [Ping timeout: 268 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
bsartek has quit [Quit: Quitte]
agent_white has joined #ruby
bataii has joined #ruby
<mrD_>
If i understand correctly MRI 2.3 still using Global VM Lock and parallel threads are not really parallel, although they "linked" to native threads. That makes me lean toward multiprocessing instead of multithreads. But all the information i read was dated back 2012 and i can't find recent official work
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
<mrD_>
could someone explain how GVL actually work and how VM switch between threads
aryaching has joined #ruby
duderonomy has joined #ruby
<daed>
when you run "gem server -d /my/directory/", and you cp a .gem file after "gem build" into that directory.. and you add that server as a source, it should find the gem right?
<daed>
there's no other command that you need to run to let the gem server know that there's a new gem in that directory?
<mrD_>
2daed: you probably want rebuild index
<daed>
"GET /latest_specs.4.8.gz HTTP/1.1" -- i see the gem server's log showing bundler requesting data from it
<daed>
right next to the index files in the /data/repos/gems/ dir
<Qer-S>
how can I convert a integer to a hex string. For instance I have 1368 and I want to get "\x00\x00\x05\x58" aligned to 4 bytes
patarr has joined #ruby
Komic_ has joined #ruby
<daed>
mrD_: looks like i may need to put it in /data/repos/gems/gems/*.gem
whysthatso has quit [Quit: Leaving]
skweek has joined #ruby
<daed>
mrD_: so now.. Generating Marshal quick index gemspecs for 1 gems, it finds the gem in /data/repos/gems/gems/*.gem on the server... but remote bundler gets index data from gem server (pointing at /data/repos/gems) and doesn't find it
<daed>
mrD_: restarted server trying to point at /data/repos/gems/gems and still bundler doesn't find it.. strange
eindoofus has joined #ruby
<mrD_>
you need to point to root directory where the index lives
<mrD_>
dead could you ls <path>/gems and also add Gemfile into gist and post link here? that would be faster :)
<daed>
sure
petruff1 has quit [Ping timeout: 255 seconds]
<al2o3-cr>
Qer-S: [1368].pack('N')
<mrD_>
dead: and if you need just pull gems your could point your nginx to directory where you indexs lives and you can use it that way
jenrzzz has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
Cyrus has quit [Read error: Connection reset by peer]
Cyrus has joined #ruby
Cyrus is now known as Guest4409
JeanCarloMachado has joined #ruby
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
<u0_a170>
a is their a big difference between mac & windows coding?
mist_ has quit [Ping timeout: 268 seconds]
tercenya has quit [Remote host closed the connection]
TreyG has quit [Ping timeout: 240 seconds]
mist_ has joined #ruby
<daed>
mrD_: msg'd you the gist
tercenya has joined #ruby
TreyG has joined #ruby
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
User458764 has joined #ruby
GodFather_ has joined #ruby
d^sh has quit [Ping timeout: 264 seconds]
dcunit3d_ has joined #ruby
dcunit3d has quit [Ping timeout: 268 seconds]
mooser has joined #ruby
d^sh has joined #ruby
mooser has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 240 seconds]
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grh has quit [Ping timeout: 240 seconds]
mooser has joined #ruby
TreyG has quit [Ping timeout: 255 seconds]
bitcycle has quit [Quit: WeeChat 1.7]
Ellimist has quit [Ping timeout: 246 seconds]
Ellimist has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
Ellimist has quit [Ping timeout: 260 seconds]
AndroUser2 has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
polysics has quit []
username1 has quit [Ping timeout: 260 seconds]
kirun has joined #ruby
MyMind has joined #ruby
Sembei has quit [Ping timeout: 268 seconds]
Cohedrin has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
AndroUser2 has quit [Read error: Connection reset by peer]
AndroUser2 has joined #ruby
AndroUser2 has quit [Ping timeout: 240 seconds]
u0_a170 has quit [Ping timeout: 268 seconds]
__Yiota has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
cagomez has joined #ruby
grh has joined #ruby
haylon_ has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
patarr has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
mikecmpbll has joined #ruby
_haylon_ has quit [Ping timeout: 268 seconds]
patarr has joined #ruby
tfitts has quit [Quit: Connection closed for inactivity]
u0_a170 has joined #ruby
u0_a170 has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jenrzzz has joined #ruby
mrD_ has left #ruby [#ruby]
<cagomez>
I have an array of objects that need to be in a certain order. what's a good way to make sure they're in that order?
vuoto has quit [Quit: Lost terminal]
<cagomez>
scratch that. I have an array of objects such that I need a subset of them (I already know which ones) to appear in a certain order. what's a good way to achieve this?
FastJack has quit [Remote host closed the connection]
nowhereman has joined #ruby
username1 has joined #ruby
Scriptonaut has joined #ruby
<Scriptonaut>
can any one explain this behavior to me? %w(a b c).map &'Z'.method(:prepend)
skweek has joined #ruby
<Scriptonaut>
it returns this: ["cbaZ", "cbaZ", "cbaZ"]
fusta has quit [Read error: Connection reset by peer]
<Scriptonaut>
1) Why is the entire string being processed, and 2) Why is the string reversed?
<Scriptonaut>
er, Array, not string
Pumukel has joined #ruby
<Qer-S>
to convert an integer to hex string I'm using to_s(1). For instance 11111120.to_s(16) gives me "a98ad0". how can I get the number to be aliged to 4 bytes and in the the format? So I would like to get "\x00\xa9\x8a\xd0"
JeanCarloMachado has quit [Ping timeout: 268 seconds]
tercenya has left #ruby [#ruby]
[Butch] has quit [Quit: I'm out . . .]
jamesaxl has quit [Quit: WeeChat 1.7]
rkellermeyer has joined #ruby
nicesignal has quit [Ping timeout: 264 seconds]
nicesignal has joined #ruby
MrBusiness has joined #ruby
tvw has joined #ruby
nofxx has quit [Ping timeout: 268 seconds]
nofxx has joined #ruby
brent__ has quit [Remote host closed the connection]
patarr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mostlybadfly has joined #ruby
marxarelli|afk is now known as marxarelli
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ResidentBiscuit has quit [Quit: hometime]
sparr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sparr has quit [Changing host]
sparr has joined #ruby
__Yiota has joined #ruby
jenrzzz_ has joined #ruby
brent__ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
username1 has quit [Quit: Lost terminal]
jf_ has joined #ruby
sparr has quit [Quit: WeeChat 1.4]
sparr has joined #ruby
romank has quit [Read error: Connection reset by peer]
sparr has quit [Changing host]
sparr has joined #ruby
jf_ is now known as antib
bronson has joined #ruby
axellj has quit [Ping timeout: 245 seconds]
wheatand has joined #ruby
romank has joined #ruby
axellj has joined #ruby
skade_ has quit [Ping timeout: 240 seconds]
gaucheph has quit [Quit: Zzzz...]
eljimmy has quit [Quit: This computer has gone to sleep]
minimalism has joined #ruby
TreyG has joined #ruby
biberu has quit []
foli has quit [Ping timeout: 268 seconds]
bataii has joined #ruby
mjora7 has joined #ruby
mjora7 has quit [Client Quit]
chouhoulis has quit [Ping timeout: 268 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 268 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
Qer-S has quit [Quit: leaving]
jcao219 has quit [Ping timeout: 268 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
JeanCarloMachado has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
gusrub has quit [Ping timeout: 268 seconds]
cseder has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
patr0clus has joined #ruby
polishdub has quit [Quit: kill -9]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rkellermeyer has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
romank has quit [Read error: Connection reset by peer]
romank has joined #ruby
Cohedrin has quit [Ping timeout: 240 seconds]
spicerack has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Ping timeout: 240 seconds]
Ellimist has joined #ruby
Cohedri__ has joined #ruby
spicerack has quit [Client Quit]
nitric has quit [Ping timeout: 240 seconds]
SteenJobs has quit [Quit: SteenJobs]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 268 seconds]
yqt has quit [Ping timeout: 260 seconds]
planigan has quit [Ping timeout: 240 seconds]
gaucheph has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
perniciouscaffei has joined #ruby
enterprisey has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cschneid_ has quit [Ping timeout: 268 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
millerti has joined #ruby
kirun has quit [Quit: Konversation terminated!]
lxsameer has joined #ruby
enterprisey has quit [Remote host closed the connection]
Silthias has joined #ruby
amclain has quit [Quit: Leaving]
Silthias1 has quit [Ping timeout: 240 seconds]
Silthias1 has joined #ruby
hutch34 has quit [Ping timeout: 268 seconds]
Silthias has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
hutch34 has joined #ruby
Jayson_Virissimo has joined #ruby
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve has joined #ruby
skade_ has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
Jayson_Virissimo has quit []
hutch34 has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade_ has quit [Ping timeout: 268 seconds]
Puffball has quit [Remote host closed the connection]
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
duderono_ has joined #ruby
duderonomy has quit [Ping timeout: 246 seconds]
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
amclain has joined #ruby
xenops has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
paparas has joined #ruby
sepp2k has quit [Quit: Leaving.]
<paparas>
hi I want to use if params[:controller] == 'something' inside a helper but my colleagues don't like using this coding practice any better ways?
ddffg has quit [Ping timeout: 264 seconds]
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
bataii has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]