flashpoi_ has quit [Remote host closed the connection]
minimalism has joined #ruby
Cork has quit [Ping timeout: 252 seconds]
bturker has joined #ruby
<Mrgoose>
i like angular
<lupine>
I liked angular 1
<lupine>
2 seems to be a bit... yeah
<Mrgoose>
haven't checked out 2 yet, but i figured it would be a nice upgrade? no?
nettoweb has joined #ruby
merlin2049er has joined #ruby
Siegfried has joined #ruby
nettoweb has quit [Client Quit]
yqt has quit [Ping timeout: 250 seconds]
bturker has quit [Ping timeout: 256 seconds]
SeepingN has quit [Ping timeout: 252 seconds]
solocshaw has joined #ruby
Channel6 has joined #ruby
Cork has joined #ruby
nankyokusei has joined #ruby
elifoster has joined #ruby
bturker has joined #ruby
ledestin has quit [Ping timeout: 245 seconds]
rakm has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
griffindy has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
<Radar>
Just rewrite it in React. It's a nicer framework.
<lupine>
"just"
<Radar>
;)
<lupine>
keeps the frontend devs in business, I guess
<Radar>
I would rather rewrite an entire app in React than have to code another hour in Angular.
<lupine>
it's nice when you get to make those decisions for yourself, I guess
<Radar>
It sure is.
ekinmur has joined #ruby
zukin has joined #ruby
<rakm>
if i have a sregex pattern in my database that includes the leading/trailing slashes, is there a way to turn that into a Regexp object correctly? Just calling Regexp.new includes the leading/trailing slashes
finisherr_ has joined #ruby
finisherr has quit [Read error: Connection reset by peer]
finisherr_ is now known as finisherr
<rakm>
i could remove the leading/trailing slashes (with another regex), but that is...lol
LoneHermit has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lupine>
Regexp.new(" foo ".strip) ?
charliesome has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Ping timeout: 256 seconds]
j0bk has joined #ruby
j0bk has quit [Changing host]
j0bk has joined #ruby
Zgan has joined #ruby
Felipe__ has quit [Quit: Leaving]
rodfersou has joined #ruby
zukin has quit [Quit: leaving]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
ResidentBiscuit has quit [Remote host closed the connection]
finisherr has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
finisherr has joined #ruby
xall has joined #ruby
solocshaw has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
ResidentBiscuit has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
finisherr has quit [Ping timeout: 250 seconds]
solocshaw has quit [Ping timeout: 250 seconds]
rodfersou has quit [Quit: leaving]
cisco has quit [Quit: Leaving.]
finisherr has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
Rodya_ has joined #ruby
Eleeleth has quit [Ping timeout: 248 seconds]
im0b has quit [Read error: Connection reset by peer]
jwheare has quit [Read error: Connection reset by peer]
caw has quit [Read error: Connection reset by peer]
Eleeleth has joined #ruby
im0b has joined #ruby
jwheare has joined #ruby
jaguarmagenta has joined #ruby
Tony-St4rk has quit [Ping timeout: 252 seconds]
caw has joined #ruby
xall has quit [Ping timeout: 250 seconds]
slackr has quit [Quit: Leaving]
Tony-St4rk has joined #ruby
astrobunny has joined #ruby
edorf has quit [Ping timeout: 260 seconds]
f0rpaxe has quit [Ping timeout: 260 seconds]
finisherr has quit [Ping timeout: 252 seconds]
boxrick1_ has quit [Ping timeout: 268 seconds]
solocshaw has joined #ruby
f0rpaxe has joined #ruby
kireevco_ has quit [Ping timeout: 258 seconds]
edorf has joined #ruby
finisherr has joined #ruby
kireevco_ has joined #ruby
JoshS has quit [Ping timeout: 265 seconds]
Immune_ has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
finisherr_ has joined #ruby
finisherr has quit [Ping timeout: 244 seconds]
finisherr_ is now known as finisherr
f0rpaxe has quit [Ping timeout: 245 seconds]
Immune has quit [Ping timeout: 245 seconds]
jaguarmagenta has joined #ruby
Aquazi has quit [Quit: Leaving]
jottr has joined #ruby
Channel6 has quit [Quit: Leaving]
cibs has quit [Ping timeout: 268 seconds]
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
dmnd has quit [Ping timeout: 248 seconds]
cibs has joined #ruby
dmnd has joined #ruby
f0rpaxe has joined #ruby
optiz0r has quit [Ping timeout: 256 seconds]
boxrick1_ has joined #ruby
Devalo has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
LoneHerm_ has joined #ruby
harai has joined #ruby
ruby-lang908 has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
solocshaw has quit [Ping timeout: 245 seconds]
jaykill has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
ruby-lang283 has joined #ruby
<ruby-lang283>
agile-web-development-with-rails-5 is a good book?
<ruby-lang283>
sorry
<ruby-lang283>
wrong chat
finisherr has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
astrobunny has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
finisherr has joined #ruby
Iacobus_ has quit [Ping timeout: 248 seconds]
cdg has quit [Read error: Connection reset by peer]
jaykilleen has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
ruby-lang908 has quit [Ping timeout: 260 seconds]
Iacobus_ has joined #ruby
parkbench has joined #ruby
finisherr has quit [Ping timeout: 260 seconds]
jeyraof has joined #ruby
finisherr has joined #ruby
jazzonmym111nd has quit [Ping timeout: 265 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
parkbench has quit [Client Quit]
brent__ has quit [Quit: Connection closed for inactivity]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
finisherr has quit [Ping timeout: 260 seconds]
finisherr has joined #ruby
ResidentBiscuit has joined #ruby
boombox_ has joined #ruby
elenatanasoiu has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
harai has quit [Quit: WeeChat 1.5]
AndyWojo has quit [Ping timeout: 258 seconds]
harai has joined #ruby
ichkv has joined #ruby
<bovis>
I'm in the beginning stages of learning ruby, and rather than come to #ruby every day and ask to have people review my code, is there an online matching service where I can basically make online friends to chat with in real time about my current projects?
<bovis>
#ruby has been extremely helpful in the past weeks, and I appreciate everyone being friendly here. It just seems odd/rude/awkward to step in and essentially demand people take time to review my work.
elenatanasoiu has quit [Ping timeout: 260 seconds]
AndyWojo has joined #ruby
<bovis>
Maybe something scheduled -- like meeting twice a week at 4 p.m. -- would be a better setup and more helpful for my situation?
<bovis>
Or is this something I need to endeavor to build and, in the meantime, forge ahead in other ways?
<bovis>
Meetups in my area appear sparse, though I have a hit on one that meets in several weeks from now.
finisherr has quit [Ping timeout: 256 seconds]
ni8 has quit [Read error: Connection reset by peer]
Torkable has joined #ruby
<elomatreb>
bovis: Have you looked for something like a hackerspace in your area?
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
blackmesa has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
johnmilton has joined #ruby
finisherr has joined #ruby
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 252 seconds]
ResidentBiscuit has quit [Ping timeout: 245 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
dviola has quit [Quit: WeeChat 1.6]
twodayslate has quit [Ping timeout: 250 seconds]
twodayslate has joined #ruby
finisherr_ has joined #ruby
finisherr has quit [Ping timeout: 252 seconds]
finisherr_ is now known as finisherr
blackmesa has quit [Ping timeout: 244 seconds]
LoneHerm_ has joined #ruby
<bovis>
nope
<bovis>
elomatreb: Well, I guess I've sifted through Meetup and Craigslist. Few results seemed to be relevant. The one Ruby meetup I mentioned, and then other groups of different languages. No generalized "programming".
segmond has joined #ruby
howdoi has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby-lang283 has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
duncannz has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
Zgan has quit [Remote host closed the connection]
Dohplay has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 245 seconds]
cdg has quit [Remote host closed the connection]
NeonGreenRibbon has joined #ruby
dnicole has quit [Remote host closed the connection]
boombox_ has quit [Remote host closed the connection]
dhk has left #ruby ["Leaving"]
Channel6 has quit [Quit: Leaving]
xall has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Derperperd has quit [Quit: Derperperd]
<havenwood>
rashomon: If there's a colon then it's a Symbol, even if there are quotes. The quoted Symbol literal allows for symbols with spaces and other chars that aren't allowed in the quote-less Symbol literal.
arescorpio has quit [Quit: Leaving.]
jcao219 has quit [Ping timeout: 252 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
conta has joined #ruby
LoneHermit has joined #ruby
nankyokusei has joined #ruby
brendan- has joined #ruby
solocshaw has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
jazzonmym111nd has joined #ruby
igniting has quit [Ping timeout: 256 seconds]
amclain has quit [Quit: Leaving]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jazzonmym111nd has quit [Ping timeout: 260 seconds]
parkbench has joined #ruby
jshjsh is now known as JoshS
conta has quit [Ping timeout: 250 seconds]
solocshaw has quit [Ping timeout: 245 seconds]
elenatanasoiu has joined #ruby
elenatanasoiu has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Remote host closed the connection]
indigolain has joined #ruby
shrinx has joined #ruby
saneax-_-|AFK is now known as saneax
ResidentBiscuit has joined #ruby
parkbench has quit [Quit: parkbench]
aupadhye has quit [Quit: Leaving]
<shrinx>
if I include ModuleA which defines ClassA into a class, then include ModuleB which reopens ClassA and extends it, the methods included from ModuleA::ClassA are gone
<shrinx>
is there any way to accomplish the same thing but while allowing ModuleB to extend the mixed in ModuleA::ClassA, without creating an abstraction to do this?
<rashomon>
what method I use to raise an exception when converting a string to float?
<rashomon>
''.to_f => 0.0
ResidentBiscuit has quit [Ping timeout: 245 seconds]
<shrinx>
rashomon: Float('')
bturker has joined #ruby
AndrewIsHere has joined #ruby
<rashomon>
shrinx: cheers
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
blackmesa has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
AndrewIsHere has quit [Ping timeout: 256 seconds]
djbkd has quit [Quit: My people need me...]
blackmesa has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
Devalo has joined #ruby
renderful has joined #ruby
zukin has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
yardenbar has joined #ruby
renderful has quit [Ping timeout: 256 seconds]
dminuoso_ has joined #ruby
pawnbox has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 260 seconds]
igniting has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
ur5us____ has quit [Remote host closed the connection]
ur5us_ has quit [Remote host closed the connection]
destructure has quit [Quit: Lost terminal]
ur5us_ has joined #ruby
ur5us has joined #ruby
hahuang65 has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
ur5us_ has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 252 seconds]
zukin has quit [Quit: leaving]
nadir has quit [Quit: Connection closed for inactivity]
vqrs has quit [Ping timeout: 260 seconds]
wugy has joined #ruby
jazzonmym111nd has joined #ruby
djbkd has quit []
ResidentBiscuit has joined #ruby
vqrs has joined #ruby
duncannz has quit [Quit: Leaving]
terlar has joined #ruby
djbkd has joined #ruby
nowhere_man has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
dminuoso_ has quit [Ping timeout: 252 seconds]
ResidentBiscuit has quit [Ping timeout: 245 seconds]
jazzonmym111nd has quit [Ping timeout: 260 seconds]
govg has joined #ruby
dminuoso_ has joined #ruby
firstdayonthejob has joined #ruby
harfangk has joined #ruby
polyidus has quit [Ping timeout: 256 seconds]
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
rumikk3 has quit [Quit: WeeChat 1.4]
lxsameer has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
<shrinx>
so any suggestions for a cleaner way to do this? module Mixin2; def self.included(base); base::Mixin1.class_exec do ... end end end
<dminuoso_>
shrinx: That depends on what the mixin is supposed to do exactly
<dminuoso_>
shrinx: IMO a Mixin has no business fiddling with the class its included into in an ideal world.
firstdayonthejob has quit [Ping timeout: 245 seconds]
<shrinx>
the Mixin1 constant in that example is actually badly named
<shrinx>
when Mixin2 is included into a class, it needs to extend the constant which was mixed into the class from Mixin1
blackmesa has joined #ruby
Hyuk has joined #ruby
conta has joined #ruby
segmond has quit [Ping timeout: 256 seconds]
CloCkWeRX has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
<dminuoso_>
shrinx: I've been developing a strong habit against such things in the past couple months.
<shrinx>
composition can be good, sometimes it is necessary
<shrinx>
I am working on very modular code, each component does a specific job and could be swapped out easily to change any aspect of the protocol being created and parsed
ocx has joined #ruby
<ocx>
hi
<ocx>
@index[aWord].push(anObject) <-- how are we pushing a hash like this? where @index is a Hash.new?
<dminuoso_>
shrinx: Composition in itself is fine.
<dminuoso_>
shrinx: but modules should not know about each other
<shrinx>
I would rather use the built in mixin functionality that ruby provides for composition, instead of adding the overhead of having to handle the components and execution of methods
<shrinx>
but it seems really tough to do that with clean syntax
<shrinx>
these are not really modules, they are components of a library
<shrinx>
they are very light weight mixins which get included into a derived client or server, which build the protocol used to encode and decode on either end of the network channel
last_staff has joined #ruby
dminuoso_ has quit [Remote host closed the connection]
<djellemah>
ocx: @index[aWord] must be something that respond_to? :push ie probably an Array instance
<ocx>
djellemah: its a Hash thats the idea
<ocx>
@index = Hash.new(nil)
aryaching has joined #ruby
^mtkd has quit [Ping timeout: 250 seconds]
LoneHermit has joined #ruby
<djellemah>
>> ha = Hash.new; ha[:some_value] = []; ha[:some_value].push(:other_value); ha # ocx
astrobu__ has quit [Remote host closed the connection]
arashb has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
arashb has quit [Ping timeout: 265 seconds]
biberu has joined #ruby
malcolmva has quit [Ping timeout: 260 seconds]
ResidentBiscuit has joined #ruby
MrBusiness3 has joined #ruby
TomyWork has joined #ruby
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
thoolihan has quit [Ping timeout: 260 seconds]
Mrgoose has quit [Ping timeout: 256 seconds]
chadwtay_ has joined #ruby
unforgiven512 has quit [Ping timeout: 250 seconds]
chadwtaylor has quit [Ping timeout: 256 seconds]
claudiuinberlin has joined #ruby
MrBusiness2 has quit [Ping timeout: 260 seconds]
scottschecter has quit [Ping timeout: 256 seconds]
ARCADIVS has quit [Ping timeout: 265 seconds]
Mrgoose has joined #ruby
ResidentBiscuit has quit [Ping timeout: 245 seconds]
thoolihan has joined #ruby
unforgiven512 has joined #ruby
astrobunny has joined #ruby
ARCADIVS has joined #ruby
aufi has joined #ruby
fiddlerwoaroof has quit [Ping timeout: 258 seconds]
Xeago has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
scottschecter has joined #ruby
ocx has quit [Ping timeout: 260 seconds]
malcolmva has joined #ruby
moei has quit [Ping timeout: 256 seconds]
tyang has quit [Ping timeout: 244 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby
moei has joined #ruby
govg has quit [Ping timeout: 250 seconds]
astrobunny has quit [Remote host closed the connection]
ahri has joined #ruby
bturker has joined #ruby
elastix has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<ahri>
hi, i'm using Guard and wondered if there's a way to output after a task has finished? i'm using guard-rake actually - i just want to emit a "Done!" message so i know rake has finished doing its thing
AndrewIsHere has joined #ruby
elifoster has quit [Quit: sleep]
fiddlerwoaroof has joined #ruby
<ahri>
i tried callback(:stop) { puts "Done!" }, but that doesn't appear to work the way i expected
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kamilion has left #ruby ["No boundaries on the net!"]
mark_66 has joined #ruby
xall has quit [Ping timeout: 256 seconds]
bturker has quit [Ping timeout: 256 seconds]
AndrewIsHere has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 260 seconds]
astrobunny has joined #ruby
nofxx has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
Humdai has joined #ruby
polysics has joined #ruby
charliesome has joined #ruby
Couch has joined #ruby
xall has joined #ruby
pegu has joined #ruby
ziarkaen has joined #ruby
fiddlerwoaroof has quit [Ping timeout: 256 seconds]
yqt has joined #ruby
dminuoso_ has joined #ruby
ur5us has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
dionysus69 has joined #ruby
mikecmpbll has joined #ruby
ur5us_ has joined #ruby
ziarkaen has quit [Ping timeout: 256 seconds]
TomyWork has joined #ruby
danst has quit [Ping timeout: 268 seconds]
aryaching has joined #ruby
jottr has joined #ruby
danst has joined #ruby
SesMan has joined #ruby
govg has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
tomphp has joined #ruby
Humdai has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
<pegu>
The above returns true for c:/Users, if I use select instead I would need something similar to the identity function in CL. Is there a identity function in Ruby?
polysics has quit [Ping timeout: 260 seconds]
<ciawal>
tell us what you're trying to do instead
<ciawal>
if you ask us how to do something from lisp in ruby, you’ll get lisp code in ruby
jottr has joined #ruby
<pegu>
As the ruby snippet above, map File.exists across an array of filenames and return the first one which exists
<pegu>
It just seem a bit inconsistent, most objects seem to play well with reduce, but not so with FalseClass
<dminuoso_>
mvxlr: What is your goal?
<ciawal>
pegu: I think you need to read the docs for reduce
<mvxlr>
manveru is ->(date) {} syntax is the same as lambda ?
<dminuoso_>
pegu: What?
<dminuoso_>
mvxlr: yes.
<dminuoso_>
mvxlr: it's a short for creating a lambda taking an argument called date
<mvxlr>
dminuoso_ I'm attempting to DRY a transform_with setting of Hashie
teclator_ has joined #ruby
elastix has quit [Quit: Leaving]
Macaveli_ has joined #ruby
pawnbox_ has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
omerzzz has joined #ruby
minimalism has quit [Quit: minimalism]
pawnbox has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 250 seconds]
JeanCarloMachado has joined #ruby
fmcgeough has joined #ruby
mim1k|wo1k is now known as mim1k|work
rodfersou has quit [Quit: leaving]
zukin has quit [Ping timeout: 265 seconds]
<pegu>
I've read the docs for reduce, but the method support is somewhat inconstistent:
<pegu>
false | "hey" -> true, using reduce [false,"hey"].reduce(:|) -> false # ok
<pegu>
false or "hey" -> "hey", using reduce [false,"hey"].reduce(:or) -> or missing or in FalseClass
<pegu>
false || "hey" -> "hey", using reduce [false,"hey"].reduce(:||) -> syntax error, function name might need to be quoted?
<pegu>
false || "hey" -> "hey", using reduce [false,"hey"].reduce(:"||") -> || missing in FalseClass
<pegu>
But anyways, thanks for the help with the using the find function
last_staff has quit [Quit: because opm staffer insulted the fuck out of me which I never deserved]
blackmesa has quit [Ping timeout: 252 seconds]
<Papierkorb>
pegu: | is binary, || is logical, they're NOT interchangeable. `or` should be avoided
tvw has quit [Read error: Connection reset by peer]
y2mq37 has quit [Ping timeout: 250 seconds]
ocbtec has joined #ruby
johnmilton has joined #ruby
mistermocha has joined #ruby
bkxd has joined #ruby
<ciawal>
pegu: and they are not methods
zukin has joined #ruby
jaguarmagenta has joined #ruby
DarkUnicorn has quit [Quit: Connection closed for inactivity]
jottr_ is now known as jottr
<pegu>
I understand they have different semantics, I'm not claiming they are interchangable, they can be used in binary expressions and return a value, but can not be passed to reduce in the same manner
mistermocha has quit [Ping timeout: 260 seconds]
<pegu>
| is a method in FalseClass, but not the others, which is what I'm pointing out is a bit inconsistent
jaguarmagenta has quit [Ping timeout: 260 seconds]
teclator_ is now known as teclator
nankyokusei has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
nankyokusei has quit [Ping timeout: 252 seconds]
AltLock has quit [Quit: Leaving.]
rodfersou has joined #ruby
omerzzz has quit [Remote host closed the connection]
last_staff has joined #ruby
charliesome has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
pawnbox has joined #ruby
pawnbox_ has quit [Read error: Connection reset by peer]
gizmore has quit [Remote host closed the connection]
<dn5>
guys whats your procedure for deployment?
gizmore has joined #ruby
<dn5>
whoops, wrong channel
<ccooke>
heh
<ccooke>
it's an interesting question to ask, though
<gizmore>
same
saslam has joined #ruby
renderful has joined #ruby
machinew_ has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
frankiee_ has joined #ruby
rajdesai has joined #ruby
rajdesai_ has joined #ruby
rajdesai_ has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 244 seconds]
coolboy has joined #ruby
modlin has joined #ruby
hinbody has joined #ruby
<dn5>
ccooke: :p what do you use tho?
rajdesai has quit [Ping timeout: 245 seconds]
mim1k|wo1k has quit [Quit: leaving]
bluOxigen has joined #ruby
modlin has quit [Client Quit]
<ccooke>
we generally package up the code into .deb files and deploy those through config management
<ccooke>
although we're planning to shift to docker artefacts eventually - those, however, will still use the debs
daffy_duck_2 is now known as naprimer
<dn5>
ah so dep
<dn5>
honestly thats smartest you can do
nuclears1 is now known as nuclearsandwich
<dn5>
id love to see an freenode channel like #programmersproblem where you could speak generally about problems we encouter through the day and everyone could give an advice no matter of language or such
<dminuoso_>
dn5: There's #programming
<dminuoso_>
Or its ##programming actually
Oliver__ has joined #ruby
<dminuoso_>
Also if there's no other discussion going on, you can ask general questions in here as well, as long as you give the floor if someone else steps in with a Ruby question
coolboy has quit [Ping timeout: 256 seconds]
<dn5>
dminuoso_: I know that #ruby is chill about it and thats why I love spending time here :-)
<dn5>
oh, programming, right
mim1k|work has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Oliver__ has quit [Max SendQ exceeded]
modlin has joined #ruby
Rodya_ has joined #ruby
indigolain has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
saslam_ has joined #ruby
indigolain has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 250 seconds]
ChiefAlexander has joined #ruby
hutch34 has joined #ruby
<machinew_>
would it be strange to define custom exception classes, but just use them to serialize error responses from my API as opposed to raising them? I..e if resource doesn't exist then respond with MyException.as_json
dreadedfrog_ has quit [Ping timeout: 245 seconds]
<machinew_>
I need to keep a list errors where each error has a code, message, and description. Not sure if I should make each a custom class or just a hash? or maybe each one a constant referencing a hash of those values? Sorry if this is pretty abstract question
saslam has quit [Ping timeout: 260 seconds]
<dminuoso_>
machinew_: It depends on the circumstances. Im using both techniques in different places.
<dminuoso_>
But either is not wrong per-se.
saslam_ has quit [Ping timeout: 260 seconds]
<machinew_>
dminuoso_: cool, i guess it really just comes down to preference and what you think is more intuitive to developers on the project
<dminuoso_>
machinew_: I think it's more than just preference - it's whether your application needs to be aware of them or not.
indigolain has quit []
Rodya_ has quit [Remote host closed the connection]
<machinew_>
dminuoso_: ah you're right, an exception you have the ability to raise/rescue (bit more flexibility) as opposed to just holding references to text to render to the client
jottr_ has joined #ruby
<dminuoso_>
But the moment when you do something like rescue FooServiceError => e; raise e unless e.msg =~ /packet loss/; end then unpack them into specific exceptions.
<dminuoso_>
machinew_: Exactly.
xall has joined #ruby
Blueby has joined #ruby
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso_>
machinew_: I would not bother unpacking if I did not care about them, would be just a waste of time.
<machinew_>
totally, for now think I'm better off just keeping it simple
blackmes1 has joined #ruby
jottr_ is now known as jottr
rkoller has joined #ruby
<dminuoso_>
machinew_: In another example I provide a wrapper for a SOAP API which denotes errenous states through some predefined XML format - a receipt causes a Ruby exception "FooService" to be generated, which is just then caught at a higher layer and wrapped into a standard json error handler.
Rodya_ has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
<machinew_>
dminuoso_: gotcha, that was the other idea I was playing with, just rescueing any custom exceptions at a higher level, and having a standard json error handler, so that anywhere I can, I could just raise the exception and know that it will be handled
chouhoulis has quit [Remote host closed the connection]
xall has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
qwertyco has quit [Quit: Leaving]
jaguarmagenta has joined #ruby
<dminuoso_>
machinew_: Yup.
jaguarmagenta has quit [Remote host closed the connection]
<dminuoso_>
machinew_: Though I just rescue that particular FooServiceError and respond with a 422
<dminuoso_>
Because in itself the request was accepted by my server, but it could not be processed. So it's not just a HTTP 500 (which would be responded with by the default error handler)
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<machinew_>
makes sense
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dn5 has quit [Ping timeout: 250 seconds]
lenwood has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
dreadedfrog_ has joined #ruby
JoshS has quit [Ping timeout: 250 seconds]
govg has joined #ruby
pawnbox has joined #ruby
Rodya_ has quit [Remote host closed the connection]
rodfersou|lunch is now known as rodfersou
coolboy has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcao219 has quit [Ping timeout: 256 seconds]
Rodya_ has joined #ruby
igniting has quit [Ping timeout: 256 seconds]
kyle__ has quit [Remote host closed the connection]
kyle has joined #ruby
kyle is now known as Guest50709
Guest50709 is now known as kyle__
wldcordeiro has quit [Ping timeout: 256 seconds]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
dminuoso_ has quit [Ping timeout: 260 seconds]
blackmes1 has quit [Ping timeout: 244 seconds]
cdg has joined #ruby
TvL2386 has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Ping timeout: 250 seconds]
ru151 has quit [Quit: leaving]
al2o3-cr has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
dminuoso_ has joined #ruby
machinew_ has quit []
lifted has joined #ruby
schickung has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
jottr has quit [Ping timeout: 260 seconds]
dmnd has quit [Ping timeout: 250 seconds]
troter__________ has quit [Ping timeout: 258 seconds]
vuoto has quit [Read error: Connection reset by peer]
moneylotion has quit [Ping timeout: 260 seconds]
cdg_ has joined #ruby
modlin has quit [Client Quit]
zz has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
zz is now known as xx
<xx>
I have some Rake files *.rake and I want to import them into individual namespaces in Rake
<xx>
Short of reading the file in and doing eval, what should I do?
mtkd has joined #ruby
<xx>
e.g. hello.rake contains `task :world do ... end` and Rakefile should end up creating the task `hello:world` from that
mikecmpb_ has quit [Quit: inabit. zz.]
cdg has quit [Ping timeout: 256 seconds]
SCHAAP137 has quit [Ping timeout: 250 seconds]
senayar has quit []
moneylotion has joined #ruby
xall has joined #ruby
modlin has joined #ruby
nitric has joined #ruby
polysics has quit []
agent_white has joined #ruby
<agent_white>
Mornin'
<manveru>
xx: i think eval is perfectly fine for that case?
<xx>
hmm
<xx>
feels dirty
<manveru>
require is also eval
<manveru>
so you must feel like a mudball :)
<xx>
I know
ramfjord has joined #ruby
jottr has joined #ruby
<xx>
but there must be a nicer way
whathappens has joined #ruby
jbeeze has joined #ruby
<eam>
xx: must there? Loading code from files kinda must involve eval
<xx>
hmm, oh well
xx has quit [Quit: Page closed]
SeepingN has joined #ruby
moneylotion has quit [Ping timeout: 260 seconds]
balazs has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
elifoster has joined #ruby
jaruga has quit [Ping timeout: 250 seconds]
claudiuinberlin has joined #ruby
balazs has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga
Devalo has quit [Ping timeout: 245 seconds]
kent\n has quit [Ping timeout: 256 seconds]
moneylotion has joined #ruby
LoneHerm_ has joined #ruby
kent\n has joined #ruby
moneylotion has quit [Client Quit]
Ishido has joined #ruby
kent\n has quit [Read error: Connection reset by peer]
saslam_ has quit [Ping timeout: 260 seconds]
moneylotion has joined #ruby
roamingdog has joined #ruby
kent\n has joined #ruby
LoneHerm_ has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
ziarkaen has quit [Ping timeout: 250 seconds]
Humdai has quit [Ping timeout: 252 seconds]
roamingdog has quit [Ping timeout: 244 seconds]
rakm has joined #ruby
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
moneylotion has joined #ruby
nankyokusei has joined #ruby
xall has quit [Ping timeout: 245 seconds]
Beams has quit [Quit: .]
mikecmpbll has joined #ruby
Resident_ has joined #ruby
rcvalle has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
hahuang65 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
Resident_ has quit [Ping timeout: 245 seconds]
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
blackmes1 has joined #ruby
moneylotion has joined #ruby
disconnekted has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Noxz2 has joined #ruby
<theRoUS>
question about OptionParser.. in an parserobj.on('-f FILE', '--file') {} block, how can i tell what the actual option specified was?
<Noxz2>
is it possible to use tls1.2 (via net/https and assumingly openssl) with ruby 1.8.7? looks like 1.9.3 needs a patch/recompile?
<soahccc_>
What can possibly cause ruby to behave differently when reading files/eval'ing? When I run it normally it works, when I use a GUI wrapper program thingy I get the (known from <2) invalid multibyte char (US-ASCII) (but only when evaling it)
elenatanasoiu has quit [Ping timeout: 245 seconds]
ascarter has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
djbkd has joined #ruby
tomphp has joined #ruby
<soahccc_>
Hmm okay I figured out that I have to set LANG env variable to utf8
symm- has joined #ruby
sp4rrow has joined #ruby
sdothum has joined #ruby
<apeiros>
soahccc_: or use ruby 2.3+, or set the encoding comment
<apeiros>
actually I think it changed with 2.2, so use 2.2+. IMO 2.2+ > encoding comment > LANG
<soahccc_>
apeiros: the encoding comment doesn't work, I guess it's because the eval (it only happens there, not when it's in a normal file that gets required)
<haaj>
I want to translate ruby to a different spoken language. I'm thinking to either take the DSL approach or try to actually find the KEYWORDS and try to translate those. Any advice on where to start and how difficult this would be?
ziarkaen has quit [Ping timeout: 260 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d^sh>
... seems something is wrong with my bash ... it has problems with the case-statements
ascarter has quit [Ping timeout: 245 seconds]
flashpoi_ has quit [Ping timeout: 245 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
krastavac is now known as bezveze
flashpoint9 has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
<apeiros>
haaj: that'll be a lot of work. the syntax part is in parse.y
<haaj>
I do expect it to be huge work, ok great thanks I'll take a look at it.
iceden has quit [Ping timeout: 256 seconds]
frozengeek__ has joined #ruby
Resident_ has quit [Ping timeout: 245 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<hays_>
hey, erm I think I screwed up my ruby on accident a long time enough ago that I don't remember what I did. can someone help with a perhaps nebulous question/problem?
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<hays_>
I believe I was installing different versions of ruby (rvm,jruby, etc) and using some sort of tool to manage switching between them, but I don't remember which tool I was using
<havenwood>
hays_: RVM, rbenv and chruby are the usual suspects.
<dminuoso_>
I recommend you look at that. There's lots of examples.
* theRoUS
thinks he has scoured it but must be having blind spot
jackjackdripper has quit [Quit: Leaving.]
<theRoUS>
dminuoso_: i don't want to know that it was an -f or --file option, it want to know *which* it was, so i can semi-reconstruct the command line
<dminuoso_>
theRoUS: I misunderstood the question. Let me look.
roamingdog has quit [Ping timeout: 252 seconds]
<theRoUS>
dminuoso_: no problem. it's one of my usual edge cases, and easy to see as falling into a FAQ category :-)
skweek has joined #ruby
ur5us_ has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us_ has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us_ has joined #ruby
<dminuoso_>
theRoUS: Do you just require it for a special flag, or for all?
<theRoUS>
dminuoso_: all, but i can DRY a function once i know the mechanism
<theRoUS>
i tried reading the source, but i hadn't had enough Ritalin® to follow the circuitousness:-)
<dminuoso_>
theRoUS: You could match the short and long differently.
frozengeek__ has joined #ruby
<dminuoso_>
(DRYed up this should be manageable)
nankyokusei has joined #ruby
<dminuoso_>
theRoUS: i.e. f.on('-p') {} and f.on('--parse') {} for example
<dminuoso_>
(Not certain whether this would work, but it seems like your best bet)
<dminuoso_>
Based on the doc I mean
lenwood has joined #ruby
<theRoUS>
i *could*, but i'd hope there's something in the OptionParser local variable
<dminuoso_>
theRoUS: That's easy to figure out. Load pry, drop a binding.pry into the lambda
<dminuoso_>
and inspect it
<theRoUS>
that would be sub-optimal, i suspect, because some of my blocks are rather involved
<dminuoso_>
pry it until you find what you are looking for
<theRoUS>
dminuoso_: never heard of pry.. ?
<dminuoso_>
?pry]
<dminuoso_>
?pry
<dminuoso_>
theRoUS: Its like irb, except tons better.
banisterfiend has quit [Read error: Connection reset by peer]
<dminuoso_>
Once you try it, you will never use irb again.
<dminuoso_>
It's design to interactively inspect and pry into objects - with features you would expect (tab completing anything - variables, method names), shell kind of features "cd into objects, ls for their state"
<theRoUS>
i've put a breakpoint into one of the lambdas, but the OptionParser instance is quite opaque
<dminuoso_>
theRoUS: Look at the features to get an idea of what it can do.
<manveru>
theRoUS: you want to reconstruct the command line?
<manveru>
why not just use ARGV
nankyokusei has quit [Ping timeout: 260 seconds]
LBKEAJ has joined #ruby
last_staff has quit [Quit: *poff*]
<manveru>
easier if you make a copy before calling parse! or only pass a copy to parse! :)
jottr has joined #ruby
<theRoUS>
manveru: because it can be *really* long, and i want to record it as ["command","--option foo","- O bar","--boolean"].join("\\\n\t")
<theRoUS>
manveru: the parser has already broken it up into option/value tuples
<dminuoso_>
theRoUS: I recommend you pry into the lambda, and inspect the passed argument. With pry it's reasonably easy.
<manveru>
you never get the flag from the argument
gusrub has quit [Remote host closed the connection]
<dminuoso_>
(If you combine it with awesome_print you get some pretty elegant introspection abilities)
<manveru>
only the value
<theRoUS>
dminuoso_: the 'passed argument' in an option lambda is the option value. the 'passed argument' in the OptionParser.new is the instance i've mentioned
art-solopov has joined #ruby
<theRoUS>
manveru: that's why i'm hoping it's in the OptionParser instance somwhere
[Butch] has quit [Quit: I'm out . . .]
gentoo_ has quit [Quit: Konversation terminated!]
conta has quit [Ping timeout: 260 seconds]
iamnotyellow has joined #ruby
<iamnotyellow>
Can I search historic chats for ruby-lang?
<manveru>
see the topic
<dminuoso_>
theRoUS: I got a solution.
<dminuoso_>
theRoUS: How hacky do you want it to be.
<dminuoso_>
?
<theRoUS>
dminuoso_: i'm listening.. :-)
jackjackdripper has joined #ruby
<dminuoso_>
theRoUS: ever heard of binding_of_caller?
* manveru
draws his katana
<theRoUS>
lol
coolboy has quit [Ping timeout: 252 seconds]
<dminuoso_>
theRoUS: the caller has the context for obvious reasons because well its a parser.. ;-)
<theRoUS>
dminuoso_: no, but i can guess where this is going..
<manveru>
OptionParser is stateless, the argv you parse leaves no trace
<dminuoso_>
manveru: The parser itself cant be stateless.
<manveru>
it only uses local variables
<manveru>
and is mostly functional
Rodya_ has joined #ruby
<theRoUS>
manveru: exactly, hence the binding magiv
<theRoUS>
magic, even
<manveru>
the only state across invocations of #parse are the parser itself
<theRoUS>
manveru: that's fine, it's out of my scope
<dminuoso_>
manveru: is it a token based parser?
futilegames has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<dminuoso_>
manveru: There needs to be some code that sees the option which decides what to do with it - Im willing to bet there is a stack frame that has access ot this information. :D
<theRoUS>
it looks as though i *might* have something if i can figure out what constitutes a 'setter' and differentiates it from a callback
<dminuoso_>
Also there's that bit that I always wanted to see binding.of_caller in production code...
<manveru>
:P
iamnotyellow has quit [Ping timeout: 260 seconds]
<theRoUS>
dminuoso_: binding_of_caller is a gem or something, mm?
jackjackdripper has quit [Ping timeout: 250 seconds]
<dminuoso_>
theRoUS: It's a native extension even.
chouhoulis has quit [Ping timeout: 245 seconds]
<manveru>
it used to be implemented using continuations i think
<theRoUS>
dminuoso_: not in 2.2.5 i'm guessing
<dminuoso_>
theRoUS: It's a very simple extension though, as it doesn't do much except expose information that Ruby does not.
<manveru>
back in 1.6-1.8
<dminuoso_>
theRoUS: In a nutshell you can do binding.of_caller(n).eval("puts foo")
<dminuoso_>
theRoUS: and it will go up the call stack n frames, and evaluate the given code within that binding.
<dminuoso_>
The amazing stuff you can do with it makes you wonder why Ruby doesn't ship with this naturally.
jackjackdripper has joined #ruby
modlin has joined #ruby
<dminuoso_>
I mean they hand you the tools to Fiddle all around Ruby but dont give you binding_of_caller - I mean really?
<manveru>
because it makes things slow as heck :P
<dminuoso_>
manveru: You mean unlike things such as set_trace_func?
<dminuoso_>
Or the inability to properly do method caching?
<dminuoso_>
Or or or ?
<manveru>
at least you don't have to keep all the stack information just in case someone ever uses binding.of_caller
<manveru>
set_trace_func is only enabled if you use it
modlin_ has joined #ruby
modlin_ has quit [Client Quit]
gusrub has joined #ruby
j416 has quit [Ping timeout: 260 seconds]
<dminuoso_>
manveru: The stack information has to remain anyway.
<dminuoso_>
Because you will unwind at some point, and the binding still needs to be there..
<dminuoso_>
binding_of_caller basically just unwinds the callstack and calls GetBindingPtr on demand.
j416 has joined #ruby
<manveru>
i thought they added tail-call-optimization sometime back... or is that still experimental build flag?
<chrisseaton>
dminuoso_ manveru don't think binding of caller has any performance implications
<dminuoso_>
manveru: that has to be enabled explicitly
<theRoUS>
well, TIL lots of stuff thanks to
<manveru>
ok, then it's just me being stupid :)
modlin has quit [Remote host closed the connection]
<theRoUS>
dminuoso_++
<theRoUS>
dminuoso_++
<theRoUS>
dminuoso_++
<theRoUS>
manveru++
<theRoUS>
manveru++
<theRoUS>
manveru++
synthroid has quit [Ping timeout: 252 seconds]
<dminuoso_>
chrisseaton: Mmm, yeah. Been browsing through the source code, it does not seem to do much in fact.
<chrisseaton>
dminuoso_: it makes things hard, but not impossible, for a JIT
<manveru>
argv = ['--foo', 'bar']; x = OptionParser.new{|o| o.on('-f', '--foo FILE'){|f| p argv.grep(/-f/) } }; x.parse(argv)
<manveru>
here, without binding of anything
<chrisseaton>
STF likewise doesn't need to have any peak performance impact
<manveru>
theRoUS: cu :)
<dminuoso_>
chrisseaton: Is that because you have to be paranoid that at any given moment someone might want to use a binding that is potentially optimized away (let's say because the callstack is getting collapsed through successive call inlining) ?
Guest66 has joined #ruby
<chrisseaton>
Yes you may need to recreate a binding that you optimised away
<chrisseaton>
But if you know that is likely to happen you can not optimise it away
djbkd has quit [Remote host closed the connection]
gerf has joined #ruby
djbkd has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
plantfood has quit [Ping timeout: 244 seconds]
gerf has quit [Client Quit]
zenguy_pc has joined #ruby
lipoqil has quit [Ping timeout: 244 seconds]
Guest66 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mjc_ has quit [Read error: Connection reset by peer]
lipoqil has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
zrl has quit [Ping timeout: 256 seconds]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
the-eat-scout has quit [Ping timeout: 252 seconds]
amitchellbullard has quit [Ping timeout: 245 seconds]
deimos has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 265 seconds]
Devalo has quit [Remote host closed the connection]
Dimik has joined #ruby
amitchellbullard has joined #ruby
mjc_ has joined #ruby
roamingdog has joined #ruby
futilegames has quit [Quit: futilegames]
lenwood has quit [Ping timeout: 245 seconds]
troter__________ has quit [Ping timeout: 252 seconds]
deimos has joined #ruby
zrl has joined #ruby
Macaveli has joined #ruby
Jackneill_ has quit [Remote host closed the connection]
the-eat-scout has joined #ruby
futilegames has joined #ruby
Resident_ has joined #ruby
futilegames has left #ruby [#ruby]
troter__________ has joined #ruby
yardenbar has quit [Ping timeout: 252 seconds]
johnbat26 has joined #ruby
<jokke>
is this _really_ the easiest way to prepend a '\' before a "'"?
jwheare has quit [Ping timeout: 265 seconds]
<jokke>
>> "foo 'test'".gsub("'", "\\\\'")
<jokke>
> "foo 'test'".gsub("'", "\\\\'")
<jokke>
..
<jokke>
bot!
<Yxhuvud>
no, gsub() {} is easier.
lenwood has joined #ruby
<jokke>
ooooh
<jokke>
you're so right, it hurts!
Resident_ has quit [Ping timeout: 245 seconds]
jwheare has joined #ruby
Guest66 has joined #ruby
jenrzzz has joined #ruby
zukin has quit [Quit: bsd!]
<jokke>
hm rubocop...
<jokke>
Use %q only for strings that contain both single quotes and double quotes.
shadeslayer has joined #ruby
<jokke>
"foo 'test'".gsub("'") { %q(\') }
shadeslayer has quit [Changing host]
shadeslayer has joined #ruby
<jokke>
like that better than "foo 'test'".gsub("'") { "\\'" }
<jokke>
oh well
plantfood has joined #ruby
SteenJobs has joined #ruby
ellen_ has joined #ruby
<jokke>
Yxhuvud: can you explain the output of "foo 'test'".gsub("'", "\\'") to me?
<jokke>
i'm really confused
<jokke>
is \\' some magic thing like &?
<SeepingN>
it makes every ' into \'
<Yxhuvud>
no, the problem is that it does double escaping due to inserting regexp matches into \1 etc
<shrinx>
I prefer %() to %q()
<jokke>
shrinx: it's not the same
<jokke>
shrinx: %() == %Q()
<jokke>
shrinx: == ""
<jokke>
%q() == ''
<shrinx>
it doesn't matter in most cases
ellen_ has left #ruby [#ruby]
<jokke>
sure does...
<shrinx>
you can use interpolation with %()
<Yxhuvud>
It matters in this case.
Yzguy has joined #ruby
zapata has joined #ruby
<shrinx>
right, it would require escaping in this case, but it's an extra char to escape, or an extra char for the q syntax
<jokke>
shrinx: you should never use "" or %() or %Q() except when you _really_ want interpolation
<shrinx>
so no big deal
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<Yxhuvud>
You can use %q"tes\ting" if you want to confuse people
<jokke>
hehe
<shrinx>
I rarely do use %() without interpolation, usually stick to single quotes, %() is ideal for single/double quotes, interpolation and multiple lines
coolboy has joined #ruby
galeido_ has joined #ruby
<adaedra>
>> % % % % % #
smlocal has joined #ruby
<adaedra>
ah, bot's broken again?
djbkd has joined #ruby
<adaedra>
apeiros:
pawnbox has quit [Remote host closed the connection]
tyang has quit [Read error: Connection reset by peer]
flashpoint9 has quit [Ping timeout: 245 seconds]
ziarkaen has joined #ruby
flashpoint9 has joined #ruby
disconnekted has joined #ruby
flashpoi_ has quit [Ping timeout: 245 seconds]
flashpoi_ has joined #ruby
flashpoint9 has quit [Ping timeout: 245 seconds]
ziarkaen has quit [Ping timeout: 256 seconds]
ctp has quit [Ping timeout: 260 seconds]
AltLock has quit [Quit: Leaving.]
flashpoint9 has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
flashpoi_ has quit [Ping timeout: 245 seconds]
LoneHerm_ has joined #ruby
brendan- has joined #ruby
patarr has joined #ruby
gusrub has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roamingdog has quit [Ping timeout: 252 seconds]
LoneHerm_ has quit [Ping timeout: 256 seconds]
coolboy has quit [Ping timeout: 250 seconds]
patarr has quit [Quit: patarr]
harai has quit [Ping timeout: 256 seconds]
Guest66 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
galeido_ has quit [Quit: leaving]
coolboy has joined #ruby
Guest66 has joined #ruby
rakm has joined #ruby
ledestin has quit [Ping timeout: 265 seconds]
roamingdog has joined #ruby
AndrewIsHere has quit []
roamingdog has quit [Remote host closed the connection]
synthroid has quit []
bezveze has quit [Quit: ChatZilla 0.9.92 [Firefox 48.0/20160726073904]]
mtkd has quit [Ping timeout: 252 seconds]
plantfood has quit [Ping timeout: 252 seconds]
mtkd has joined #ruby
vikaton has joined #ruby
plantfood has joined #ruby
smlocal has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 245 seconds]
zeroDi has joined #ruby
splud has joined #ruby
skweek has joined #ruby
GinoManWorks has quit [Quit: Leaving]
nankyokusei has joined #ruby
roamingdog has joined #ruby
jcao219 has joined #ruby
<splud>
I’m trying to use threading in a basic test scenario. main process comes up, instantiates a class, and calls a run method that generates some random values and performs file I/O with those (size, offset, and a pattern), and sleeps for a random period, then repeats the process. This works, no threading.
dnicole has joined #ruby
DarkUnicorn has quit [Quit: Connection closed for inactivity]
<splud>
If I Thread.new a block to invoke the run method, that invocation blocks any further operations. and I end up servicing a single thread. Not the plan.
<Papierkorb>
splud: in MRI, no more than one thread will run any ruby code at all times (even on multi-core systems). Exception: Waiting on I/O will not block other threads
symm- has quit [Ping timeout: 250 seconds]
<Papierkorb>
splud: If you want real multi-threading, see JRuby
<splud>
These threads don’t need to communicate with one another, just do their respective random operations.
bmurt has quit [Read error: Connection reset by peer]
LBKEAJ has quit [Read error: Connection reset by peer]
<splud>
So, calling sleep() isn’t going to switch?
Blueby has quit [Quit: Blueby]
nankyokusei has quit [Ping timeout: 245 seconds]
LBKEAJ has joined #ruby
patarr has joined #ruby
<Papierkorb>
sleep'ing should allow other threads to run, but why would you intentionally sleep?
<havenwood>
splud: sleep and IO, among other things, unlock the GVL
sdwrage has joined #ruby
<splud>
the point of the method is to have random times between operations.
pmarreck has quit [Read error: Network is unreachable]
joaomdmoura__ has quit [Read error: Connection reset by peer]
darthvorik has quit [Read error: Connection reset by peer]
adambeynon has quit [Read error: Connection reset by peer]
boxrick1_ has quit [Read error: Connection reset by peer]
podman has quit [Read error: Network is unreachable]
smlocal has quit [Read error: Network is unreachable]
pfg_ has quit [Read error: Connection reset by peer]
AndyWojo has quit [Read error: Connection reset by peer]
<splud>
the simple class is performing some arbitrary write operations to a file of its own, and sleeping some arbitrary time in between, repeating the process. I want to spool up ’n’ threads to have ’n’ such files being operated upon.
<dminuoso_>
But sleep() will never return will it?
firstdayonthejob has joined #ruby
adambeynon has joined #ruby
smlocal has joined #ruby
alem0lar- has quit [Ping timeout: 256 seconds]
darthvorik has joined #ruby
pmarreck has joined #ruby
pfg_ has joined #ruby
AndyWojo has joined #ruby
* havenwood
sleeps forever
podman has joined #ruby
boxrick1_ has joined #ruby
<dminuoso_>
Can we make a case study? Ill watch havenwood.
SegFaultAX has quit [Ping timeout: 256 seconds]
j0bk has quit [Ping timeout: 256 seconds]
joaomdmoura__ has joined #ruby
JesseH has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 256 seconds]
velu_aon[m] has quit [Ping timeout: 256 seconds]
fladson[m] has quit [Ping timeout: 256 seconds]
gnufied has quit [Ping timeout: 256 seconds]
cpfeilschifter[m has quit [Ping timeout: 256 seconds]
eliotk[m] has quit [Ping timeout: 256 seconds]
laithshadeed[m] has quit [Ping timeout: 256 seconds]
davix has quit [Ping timeout: 256 seconds]
Luca[m] has quit [Ping timeout: 256 seconds]
Silke[m] has quit [Ping timeout: 256 seconds]
M-manveru has quit [Ping timeout: 256 seconds]
M-shine has quit [Ping timeout: 256 seconds]
M-mistake has quit [Ping timeout: 256 seconds]
saneax-_-|AFK has quit [Ping timeout: 256 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
frozengeek__ has quit [Quit: frozengeek__]
SteenJobs has joined #ruby
jphase has quit [Ping timeout: 260 seconds]
rakm has joined #ruby
jphase_ has quit [Ping timeout: 244 seconds]
Resident_ has joined #ruby
dminuoso_ has quit [Ping timeout: 245 seconds]
frozengeek__ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
ponga has quit [Quit: Connection closed for inactivity]
Resident_ has quit [Ping timeout: 245 seconds]
plantfood has quit [Quit: Leaving]
yqt has quit [Ping timeout: 260 seconds]
SuperLag has quit [Ping timeout: 260 seconds]
arashb has joined #ruby
skweek has quit [Ping timeout: 245 seconds]
flashpoint9 has joined #ruby
skweek has joined #ruby
malconis has quit [Read error: Connection reset by peer]
biberu has quit []
zerowaitstate has quit [Quit: leaving]
sp4rrow has joined #ruby
sp4rrow has quit [Client Quit]
WhiteKIBA has joined #ruby
jphase has joined #ruby
jottr has joined #ruby
last_staff has quit [Quit: last_staff]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
Joufflu has joined #ruby
hinbody has quit [Quit: leaving]
arashb has quit [Ping timeout: 245 seconds]
disconnekted has quit []
ledestin has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
asahi_ has joined #ruby
bmurt has joined #ruby
y2mq37 has joined #ruby
<asahi_>
Hell, I'm looking for the documentation on File#write, but I don't see it at http://ruby-doc.org/core-2.0.0/File.html. Am I looking in the wrong place?
threedee has quit [Remote host closed the connection]
bmurt has quit [Client Quit]
ledestin_ has joined #ruby
<havenwood>
>> File.method(:write).owner
bmurt has joined #ruby
ledestin has quit [Ping timeout: 260 seconds]
bmurt has quit [Client Quit]
JeanCarloMachado has quit [Read error: No route to host]
bmurt has joined #ruby
claw has quit [Ping timeout: 250 seconds]
LoneHerm_ has joined #ruby
elifoster has quit [Quit: class]
Madplatypus has joined #ruby
bmurt has quit [Client Quit]
aswen has quit [Quit: WeeChat 1.5]
<Radar>
TIL
bmurt has joined #ruby
bmurt has quit [Client Quit]
CloCkWeRX has joined #ruby
Bellthoven has joined #ruby
JeanCarloMachado has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
mtkd has quit [Ping timeout: 244 seconds]
LoneHerm_ has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
bmurt has quit [Client Quit]
mtkd has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
bmurt has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
flashpoi_ has joined #ruby
cibs has joined #ruby
flashpoint9 has quit [Read error: Connection reset by peer]
bmurt has quit [Client Quit]
bmurt has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
bmurt has quit [Client Quit]
gingray has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
flashpoi_ has quit [Remote host closed the connection]
bmurt has quit [Client Quit]
ChiefAlexander has quit [Remote host closed the connection]
JoshS has quit [Quit: Leaving]
bmurt has joined #ruby
rakm has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
SteenJobs has quit [Quit: SteenJobs]
bmurt has quit [Client Quit]
hahuang65 has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
bmurt has joined #ruby
bmurt has quit [Client Quit]
teclator has quit [Ping timeout: 250 seconds]
teclator has joined #ruby
bmurt has joined #ruby
anuxivm has joined #ruby
tdy1 has quit [Read error: Connection reset by peer]
tubuliferous has joined #ruby
mikecmpbll has joined #ruby
bmurt has quit [Client Quit]
griffindy has joined #ruby
tdy1 has joined #ruby
bmurt has joined #ruby
CloCkWeRX has left #ruby [#ruby]
TomyLobo has quit [Ping timeout: 250 seconds]
chopin has quit [Remote host closed the connection]
bmurt has quit [Client Quit]
chopin has joined #ruby
hays_ has joined #ruby
lenwood has quit [Ping timeout: 244 seconds]
bmurt has joined #ruby
<hays_>
thank you those who helped earlier
<hays_>
if I need a ruby without the GIL limitation to support threading what would you guys recommend? jruby?
bmurt has quit [Client Quit]
<havenwood>
hays_: yup
<hays_>
the versions of both jruby and rbx look quite funky in ruby-install
<hays_>
jruby goes from 1.7.26 to 9.1.5.0
<havenwood>
hays_: It's over 9000!
<hays_>
then rbx is apparently e and 3.62
bmurt has joined #ruby
<hays_>
that is a level of wtf that makes me worried they don't know what a major/minor release is, and they are going to break my stuff
<havenwood>
>> Math::E.round(8)
chopin has quit [Ping timeout: 265 seconds]
<havenwood>
#=> 2.71828183
bmurt has quit [Client Quit]
<havenwood>
hays_: What's worrisome is that rbx truncated rather than rounding e: 2.71828182
<hays_>
heh
<havenwood>
hays_: The reason for JRuby jumping versions was to avoid confusion with Ruby 1.8, 1.9, 2.0, etc.
<havenwood>
hays_: It was a one-time thing. 1.7 is due for end of life at the end of the year.
bmurt has joined #ruby
<havenwood>
hays_: There's a #jruby channel as well.
bmurt has quit [Client Quit]
coolboy has quit [Ping timeout: 252 seconds]
art-solopov has quit [Quit: Konversation terminated!]
<hays_>
alright ill give jruby a shot before i go to what seems crazier (rubinius)
jaykill has joined #ruby
bmurt has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Yzguy has joined #ruby
aries_liuxueyang has joined #ruby
sp4rrow has joined #ruby
millerti has joined #ruby
quazimodo has joined #ruby
<hays_>
havenwood: do you happen to know what option is needed to make ruby-install use multiple cores when it builds? I drank my coffee and its not done
firstdayonthejob has quit [Ping timeout: 256 seconds]
<Nilium>
You'd probably need to get it to forward -J<N> to make. Not sure what'd trigger that.
bmurt has quit [Ping timeout: 244 seconds]
Aquazi has quit [Quit: Leaving]
Blueby has joined #ruby
sp4rrow has quit [Read error: Connection reset by peer]
SuperLag has joined #ruby
<hays_>
yeah there's this line in the quick readme: ruby-install ruby 2.3.0 -- --enable-shared --enable-dtrace CFLAGS="-O3" but not sure if those are make opts
<hays_>
i mean pretty sure they arent
sp4rrow has joined #ruby
<Nilium>
Those would be configure options.
<Nilium>
Maybe there's an environment variable you can set.
jbeeze has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 256 seconds]
Jameser has joined #ruby
banisterfiend has joined #ruby
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SuperLag has quit [Client Quit]
coolboy has joined #ruby
frozengeek__ has quit [Quit: frozengeek__]
SuperLag has joined #ruby
wldcordeiro has quit [Ping timeout: 245 seconds]
SteenJobs has joined #ruby
Jameser has quit [Client Quit]
cdg_ has quit [Remote host closed the connection]
<hays_>
Nilium: i think its MAKEFLAGS
wpostma has joined #ruby
coolboy has quit [Ping timeout: 245 seconds]
nankyokusei has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
jaequery has joined #ruby
ruby_ has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
sepp2k has quit [Quit: Leaving.]
ruby[bot] has joined #ruby
jinglebellz is now known as thomas
smlocal has quit []
moei has joined #ruby
chopin has joined #ruby
cstrahan has joined #ruby
Siegfried is now known as Siegfried[away]
DLSteve has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
bturker has quit [Ping timeout: 256 seconds]
AustinMatherne has joined #ruby
jobewan has quit [Ping timeout: 256 seconds]
Bellthoven has quit []
SteenJobs has quit [Quit: SteenJobs]
hays_ has quit [Quit: Page closed]
Yzguy has quit [Quit: Bye]
SteenJobs has joined #ruby
brendan- has joined #ruby
Azure has joined #ruby
ocbtec has quit [Quit: leaving]
solocshaw has joined #ruby
marr has quit [Ping timeout: 252 seconds]
SteenJobs has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
flashpoint9 has joined #ruby
wldcordeiro has joined #ruby
boombox_ has joined #ruby
SteenJobs has joined #ruby
flashpoint9 has quit [Ping timeout: 245 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
flashpoint9 has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
anuxivm has left #ruby [#ruby]
agent_white has quit [Quit: back later]
SteenJobs has quit [Quit: SteenJobs]
boombox_ has quit [Remote host closed the connection]