michaeldeol has quit [Remote host closed the connection]
jrendell has quit [Quit: jrendell]
rickruby has joined #ruby
DenzaOvulates is now known as DenzaTard
zeade has quit [Quit: Leaving.]
JZTEch101 is now known as JZTech101
nari_ has quit [Ping timeout: 264 seconds]
RichardBaker has quit [Quit: RichardBaker]
DenzaTard is now known as DenzasWeeping
vlad_starkov has quit [Remote host closed the connection]
peter_ss has joined #ruby
wsterlin_ has quit [Read error: Connection reset by peer]
wsterling has joined #ruby
lnormous has quit [Ping timeout: 240 seconds]
marcgg_ has joined #ruby
marcgg has quit [Read error: No route to host]
conner has quit [Quit: Leaving]
DenzasWeeping is now known as DenzasBegging
DenzasBegging is now known as DenzaIsBegging
Speed has joined #ruby
Columcille has quit [Ping timeout: 256 seconds]
peter_ss has quit [Ping timeout: 240 seconds]
Speed is now known as Guest87176
fuhgeddaboudit has joined #ruby
DenzaIsBegging has left #ruby [#ruby]
bluehavana has joined #ruby
dv_ has joined #ruby
radic has joined #ruby
DonRichie has quit [Ping timeout: 240 seconds]
DonRichie has joined #ruby
v0yager has joined #ruby
AlSquirikou has quit [Quit: This computer has gone to sleep]
Guest87176 has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
speed2 has joined #ruby
Skylab has quit [Quit: Skylab]
tobyo has joined #ruby
fixl has joined #ruby
atmosx has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
pskosinski has quit [Ping timeout: 240 seconds]
rsahae has joined #ruby
jrendell has joined #ruby
pskosinski has joined #ruby
marr has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
tatsuya_o has joined #ruby
atmosx has joined #ruby
fridim_ has quit [Ping timeout: 246 seconds]
Notte has quit [Remote host closed the connection]
aedorn has quit [Quit: Leaving]
jds_ has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
devoldmx3 has joined #ruby
tatsuya_o has quit [Ping timeout: 240 seconds]
julweber_ has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
arya__ has joined #ruby
zeropx has quit [Quit: zeropx]
kofno has joined #ruby
jds_ has quit [Ping timeout: 260 seconds]
deadalus has quit [Excess Flood]
deadalus has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
tylersmith has joined #ruby
blarghmatey has joined #ruby
jrendell has quit [Quit: jrendell]
s0ber has joined #ruby
renderful has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
doritostains has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 276 seconds]
bricker has quit [Ping timeout: 248 seconds]
tylersmith has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby
xavier23 has quit [Quit: xavier23]
DanKnox_away is now known as DanKnox
Guest41605 has quit [Read error: Connection reset by peer]
renderful has quit [Ping timeout: 240 seconds]
mansi has quit [Remote host closed the connection]
osvico has joined #ruby
Spami has joined #ruby
lnormous has joined #ruby
kasper has joined #ruby
v0yager has quit [Remote host closed the connection]
bzitzow has quit [Ping timeout: 245 seconds]
io_syl has joined #ruby
v0yager has joined #ruby
v0yager has quit [Remote host closed the connection]
thams has joined #ruby
cj3kim has joined #ruby
v0yager has joined #ruby
marcdel has joined #ruby
Bry8Star{T2 has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
burz has quit [Remote host closed the connection]
_ffio_ has joined #ruby
ffio_ has quit [Ping timeout: 260 seconds]
bradhe_ has quit [Remote host closed the connection]
bradhe has joined #ruby
lnormous has quit [Ping timeout: 264 seconds]
Guest41605 has joined #ruby
agjacome has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
bradhe has quit [Read error: Connection reset by peer]
jetblack_ has quit [Quit: leaving]
bradhe has joined #ruby
nycjv321 has joined #ruby
nettoweb has quit [Quit: nettoweb]
<nycjv321>
Hello I am trying to "monkey" patch the Array class and thought I had gotten this functionality to work in the past. I am revisiting some old code and it doesn't seem to work anymore saying the new method is undefined
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
chriskk has joined #ruby
hakunin has quit [Remote host closed the connection]
bricker has joined #ruby
hakunin has joined #ruby
peter_ss has joined #ruby
inimit has joined #ruby
rsahae has quit [Quit: rsahae]
blitz has quit [Quit: This computer has gone to sleep]
hogeo has quit [Remote host closed the connection]
krainboltgreene has quit [Ping timeout: 240 seconds]
at133 has joined #ruby
zigomir has quit [Ping timeout: 276 seconds]
peter_ss has quit [Ping timeout: 260 seconds]
johnnyfuchs has quit [Remote host closed the connection]
DonRichie has quit [Quit: Verlassend]
krainboltgreene has joined #ruby
DrShoggoth has joined #ruby
Guga_ has quit [Quit: ~]
hogeo has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
mnemon has quit [Quit: No Ping reply in 180 seconds.]
bricker has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
Shirakawasuna has joined #ruby
machuga is now known as machuga|away
mnemon has joined #ruby
_main_ has joined #ruby
x1337807x has joined #ruby
kenneth has joined #ruby
mercwithamouth has joined #ruby
<at133>
Hi, I'm trying to write a simple command line tool that asks for some user input. Is there a way to prompt with a prepopulated response? I tried highline with defaults, but I would like to have the default be editable, like a suggestion.
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Ping timeout: 245 seconds]
<nycjv321>
at133: read the value to a variable if nil then assign to default value?
<nycjv321>
at133: or just declare the variable with value and then overwrite if not nil?
<nycjv321>
then assign a default*
marcgg has quit [Read error: No route to host]
kenneth has quit [Client Quit]
marcgg has joined #ruby
_main_ has joined #ruby
fuhgeddaboudit_ has joined #ruby
Ry0_ has joined #ruby
Fuzai has quit [Quit: Ex-Chat]
Fuzai has joined #ruby
otherj has quit []
marcdel has joined #ruby
<at133>
Highline can do that. I was hoping for the ability to have it prepopulate. Right now the default gets used if the response is blank, but I would like the response to be prefilled. Example: If the default was hello I would like to make the input hell2 by inputting backspace then 2.
bradhe has joined #ruby
cads has joined #ruby
hogeo has joined #ruby
_main_ is now known as __main__
havenwood has joined #ruby
tbn`` has joined #ruby
wargasm has quit [Ping timeout: 256 seconds]
<nycjv321>
what do u mean prepopulate?
<nycjv321>
oh
Ry0_ has quit [Ping timeout: 240 seconds]
<at133>
Does that make sense?
<nycjv321>
no
tbn` has quit [Ping timeout: 246 seconds]
<nycjv321>
at133: So you have a prompt "Type Input: "
<nycjv321>
at133: if value is nil you want a default value?
choobie has quit [Read error: Operation timed out]
DeanH has joined #ruby
<nycjv321>
or do u want an association?
DeanH has quit [Max SendQ exceeded]
<nycjv321>
so if user types "a key" they get "some value" ?
marcgg_ has joined #ruby
<jkline>
at133: wants the prompt to be "Type Input: default value here"
threesome has quit [Ping timeout: 245 seconds]
<jkline>
so the user can either hit enter, to keep the default value, or hit backspace and retype a new value
<at133>
Yes, but you can edit the default value.
<at133>
Exactly
marcgg has quit [Read error: No route to host]
<nycjv321>
ahh I'm on the phone sorry :P
bradhe has quit [Ping timeout: 246 seconds]
<jkline>
normally this is done as "Continue? [Y/n]: " with the default value in bold and not editable
<at133>
right
rupee has quit [Quit: Leaving]
<jkline>
I don't know how to do any prompting in ruby yet. I'm just trying to help translate your question :)
nycjv321 has quit [Quit: leaving]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
mansi has quit [Read error: Connection reset by peer]
wsterling has quit [Remote host closed the connection]
<at133>
Oh, thank you jkline
nettoweb has joined #ruby
mansi has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
Fuzzy_ has joined #ruby
Fuzai has quit [Quit: Ex-Chat]
pipework has joined #ruby
hogeo has quit [Remote host closed the connection]
<r0bglees0n>
and that doesnt compute anymore than needed
<r0bglees0n>
its find
<r0bglees0n>
it stops on the first detection
emergion has joined #ruby
jalcine has quit [Excess Flood]
<jkline>
thanks
lnormous has quit [Ping timeout: 246 seconds]
jalcine_ has joined #ruby
machuga is now known as machuga|away
jalcine_ is now known as jalcine
nycjv321 has quit [Quit: leaving]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
hogeo has joined #ruby
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
eldariof has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Ping timeout: 260 seconds]
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
tobyo has quit [Read error: Operation timed out]
_ffio_ has quit [Ping timeout: 240 seconds]
anay has joined #ruby
codemannew has joined #ruby
noop has joined #ruby
RobW_ has joined #ruby
wargasm1 has joined #ruby
BizarreCake has joined #ruby
<RobW_>
Is there a sweet Ruby way to concat a string into an unset/nil variable? As in, if i'm adding the results of an expression inside of an each into a single variable, can I do it without setting var='' first?
Davey has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
krisfremen-home has quit [Remote host closed the connection]
<jkline>
so, RobW_ , it sort of depends on what you really want :)
Davey has joined #ruby
codesoda has quit [Remote host closed the connection]
<jkline>
join is really good at concatenating strings in arrays, but inject will do pretty much whatever you want
<RobW_>
I need the block for some logic, so inject seems like a good choice.
<jkline>
cool
<RobW_>
Just trying to decide if it actually cleans up the code.
<jkline>
you mean clever isn't always better ? :)
<jkline>
inject returns the final value, so you might be able to do away with a variable entirely. Fewer side effects
<RobW_>
Beginner at Ruby, so the new shorthands I learn I can't tell if they're really pretty or if they obfuscate, because to me they seem unfamiliar.
<RobW_>
i.e. var ||= default
<jkline>
yeah, i'm with you on that
<jkline>
var ||= default is totally a ruby idiom, use it without fear
<jkline>
inject might be more familar as reduce
<jkline>
or fold_left
jefflyne has joined #ruby
<RobW_>
Yeah, I think inject works well here. Thanks for the +1 on ||= too.
<jkline>
(I don't think ruby defines fold_left, but I think it provides reduce)
<jkline>
Enumerable is where inject comes from, in case you didn't know
<jkline>
what version of ruby are you using?
RORgasm has quit [Ping timeout: 276 seconds]
<RobW_>
I'm in the api right now :). Reduce is a method on enumerable too.
Nisstyre has joined #ruby
<RobW_>
1.9.3
<RobW_>
or 1.9.x, believe it's 3.
<jkline>
oh, good, so you're already looking at the many fun methods provided by Enumerable
vlad_starkov has joined #ruby
<RobW_>
yep. ruby-doc is nice documentation.
ssvo has quit [Ping timeout: 246 seconds]
rsahae has joined #ruby
_ffio_ has joined #ruby
rgoodwin has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
<jkline>
what programming languages do you already know?
rezzack has quit [Quit: Leaving.]
peter_ss has quit [Quit: Leaving.]
Davey has quit [Quit: Computer has gone to sleep.]
peter_ss has joined #ruby
peter_ss has left #ruby [#ruby]
cofin has quit [Quit: cofin]
krisfremen-home has quit [Ping timeout: 240 seconds]
Guest41605 has joined #ruby
pipework has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Quit: Leaving.]
DeanH has joined #ruby
invsblduck has quit [Ping timeout: 264 seconds]
mansi has quit [Ping timeout: 276 seconds]
jkline has quit [Quit: jkline]
PhilK has quit [Remote host closed the connection]
d4rkstalk3r has joined #ruby
rsahae has quit [Quit: rsahae]
rgoodwin has joined #ruby
PhilK has joined #ruby
awc737_ has quit [Read error: Operation timed out]
rsahae has joined #ruby
renderful has joined #ruby
stkowski has quit [Quit: stkowski]
cj3kim has joined #ruby
flaccid has joined #ruby
n1x has joined #ruby
renderful has quit [Ping timeout: 245 seconds]
<flaccid>
hey guys, i'm on os x and install libarchive gem, but its not looking in /opt/local/include for libarchive.h to build the native extension. how can i solve this?
<flaccid>
i tried export CFLAGS="-I/opt/local/include $CFLAGS" but bundle or gem doesn't seem to obey
atno has quit [Read error: Connection reset by peer]
<flaccid>
*archive.h
anay has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 240 seconds]
rshetty has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
atno has joined #ruby
krisfremen-home has joined #ruby
<flaccid>
seems to run with --without-opt-include=${opt-dir}/include
CrozzCyborg has quit [Quit: ...]
doritostains has joined #ruby
Es0teric has joined #ruby
bonobo has joined #ruby
flaccid has quit [Ping timeout: 256 seconds]
bzitzow has joined #ruby
anay has joined #ruby
flaccid has joined #ruby
kil0byte has joined #ruby
thebastl has joined #ruby
MrPoT4tO_ has quit [Remote host closed the connection]
rsahae has quit [Quit: rsahae]
thebastl_ has joined #ruby
workmad3 has joined #ruby
brunoro has joined #ruby
krisfremen-home has quit [Remote host closed the connection]
thebastl has quit [Ping timeout: 240 seconds]
krisfremen-home has joined #ruby
goshakkk has joined #ruby
CrozzCyborg has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
smathieu has quit [Ping timeout: 240 seconds]
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anay has quit [Remote host closed the connection]
matematikaadit has joined #ruby
Mars` has quit [Ping timeout: 240 seconds]
brunoro has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
<mstksg>
RobW_: the best way is to just read more code; but things like ||= are as "idiomatic" as i++, etc. in C
<mstksg>
the best way to get a feel is to just read more code to be honest, and maybe coding with others
<RobW_>
mstksg: Thanks. Yeah, I collaborated with a ruby dev at open hack last month, was very helpul.
DeanH has joined #ruby
DeanH has quit [Max SendQ exceeded]
hamakn has quit [Remote host closed the connection]
Bofu2U has quit [Remote host closed the connection]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cj3kim has joined #ruby
flaccid has left #ruby ["Konversation terminated!"]
anay has joined #ruby
rsahae has joined #ruby
darth_chatri has quit [Quit: Leaving.]
jibi has joined #ruby
Guest41605 has quit [Ping timeout: 246 seconds]
cj3kim has quit [Ping timeout: 240 seconds]
vdandre has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
gotts has joined #ruby
hamed_r has joined #ruby
vlad_starkov has joined #ruby
pyoor has joined #ruby
ghosTM55 has joined #ruby
hadees has quit [Quit: hadees]
Guest41605 has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
mansi has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
marcgg has quit [Read error: No route to host]
marcgg has joined #ruby
<pyoor>
is there a way to determine which gem provides "windows/time" ?
yashshah has quit [Ping timeout: 256 seconds]
anay has quit [Remote host closed the connection]
anay has joined #ruby
tatsuya_o has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
poga has joined #ruby
anay has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
io_syl has quit [Quit: io_syl]
rshetty has quit [Quit: Sleeping]
RobW_ has quit [Quit: RobW_]
thebastl_ has quit [Remote host closed the connection]
gotts has quit [Remote host closed the connection]
renderful has joined #ruby
rsahae has quit [Quit: rsahae]
nbouscal has quit [Ping timeout: 240 seconds]
jkline has joined #ruby
timonv has joined #ruby
hamakn has joined #ruby
CrozzCyborg has quit [Remote host closed the connection]
CrozzCyborg has joined #ruby
dash_ has joined #ruby
atno has quit [Ping timeout: 260 seconds]
tonini has joined #ruby
atno has joined #ruby
CrozzCyborg has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
kil0byte has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
krainboltgreene has joined #ruby
Deele has joined #ruby
cj3kim has joined #ruby
sayan has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
love_color_text has quit [Read error: Connection reset by peer]
dash_ has quit [Ping timeout: 241 seconds]
smathieu has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 276 seconds]
dash_ has joined #ruby
tbn`` is now known as tbn
justsee has joined #ruby
huttan has joined #ruby
Meatant has quit [Ping timeout: 248 seconds]
gkunno has quit [Ping timeout: 248 seconds]
Speed has joined #ruby
tomzx_mac has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
prezJFK has quit [Read error: Connection reset by peer]
gkunno has joined #ruby
CrozzCyborg has joined #ruby
threesome has joined #ruby
jkline has quit [Quit: jkline]
RORgasm has joined #ruby
rshetty has joined #ruby
yashshah has joined #ruby
intuxicated has joined #ruby
ayonix has quit [Ping timeout: 260 seconds]
ayonix has joined #ruby
dhruvasagar has joined #ruby
CrozzCyborg has quit [Ping timeout: 240 seconds]
prezJFK has joined #ruby
poga has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 245 seconds]
Guest41605 has quit [Ping timeout: 246 seconds]
ghosTM55 has quit [Quit: leaving]
tonini has quit [Read error: Connection reset by peer]
CrozzCyborg has joined #ruby
Astralum has joined #ruby
byprdct has quit [Ping timeout: 276 seconds]
CrozzCyborg has quit [Client Quit]
mansi has joined #ruby
codemannew has quit [Ping timeout: 245 seconds]
invsblduck has joined #ruby
kenneth has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
Fuzzy_ has quit [Quit: Ex-Chat]
tobyo has joined #ruby
tacos1de has quit [Remote host closed the connection]
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
<apeiros>
stormbytes: seems like your issue is with whatever gli is. mongo installs fine and can be used from ruby 2.0 (even though those warnings from bson/bson_ext - wonder what the dev was thinking…)
<apeiros>
run bundle install, then try your bundle exec again.
<stormbytes>
with backticks?
<apeiros>
no
<stormbytes>
or are you using those here for clarity
<stormbytes>
ah k
<apeiros>
yes
<apeiros>
and read up on what bundler does. otherwise you're blindly using a tool which you might not even need.
Alina-malina has quit [Quit: Leaving]
Alina-malina has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
renderful has quit [Remote host closed the connection]
<stormbytes>
its a part of the Gli workflow
<stormbytes>
I've worked through a coupel of tutorials
Alina-malina has joined #ruby
<stormbytes>
but yes i've every intention of reading about it
vlad_starkov has joined #ruby
kasper has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
<apeiros>
since you have `gemspec` in your Gemfile, you could (and maybe that's better suited to gli) add mongo as a dependency in the gemfile instead.
<stormbytes>
so basically, if i use any gems in my project i've gotta 'call' them from the gemfile
<apeiros>
`s.add_runtime_dependency 'mongo'`
<stormbytes>
mongo is actually my own addition -- not a part of GLi
<stormbytes>
does that negate the above or does it still apply?
<apeiros>
conceptual misunderstanding. the gemfile is about providing an "environment" to run your code in.
mansi has quit [Ping timeout: 240 seconds]
<apeiros>
it does not load any code. it's a substitute for what ruby itself already can do, but does "globally" for all ruby code.
binw__ has quit [Ping timeout: 256 seconds]
<stormbytes>
analogous to a 'runtime' ?
<apeiros>
probably. depends on what your definition of runtime is :-p
elaptics`away is now known as elaptics
<stormbytes>
well, as i said i'm new to ruby, but my understanding is that 'gem build' does something loosely along the lines of 'compiling' the source, yes?
<apeiros>
the .gemspec specifies *your* gem, not gli.
<apeiros>
'compiling' the source: no. all it does is create an archive (a tar with some gz's in it actually)
<apeiros>
and it provides enough metadata for `gem install` to put all the files in your gem into the proper places when installing.
smathieu has quit [Ping timeout: 276 seconds]
<stormbytes>
just a way of looking at it -- you said the gemfile provides an environment so I'm assuming its about resource/dependency managment
<apeiros>
well, bundler provides an environment. the Gemfile is the description of the environment bundler should create.
<stormbytes>
ohh now that makes sense
<stormbytes>
bundler = bundles
<apeiros>
and "it's about dependency managment" - to an extent. that's why it's confusing for newcomers, and also one thing I think bundler solved badly. rubygems already is about dependency management.
<apeiros>
they reinvented that part for no good reason.
<stormbytes>
oh and by the way, that was the problem :)
intuxicated has quit [Quit: Leaving]
maroloccio has quit [Quit: WeeChat 0.4.0]
<stormbytes>
well i've only started writing ruby and already i'm completely in love
codecop has joined #ruby
intuxicated has joined #ruby
yashshah has joined #ruby
<stormbytes>
i'll have enough to do working through a basic workflow
<apeiros>
stormbytes: I think in your case, adding the dependency to the .gemspec makes the most sense. it allows users of your gem to use your gem without bundler. (not everybody has or wants bundler)
<stormbytes>
if i were to add mongo as a runtime_dependency
<stormbytes>
and i'd remove it from the gemfile
<stormbytes>
would the app still work with bundle exec?
<apeiros>
it should, yes
<stormbytes>
will give that a go
<apeiros>
since the line `gemspec` instructs bundler to also evaluate the dependencies in the .gemspec
marcgg has quit [Ping timeout: 240 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
<stormbytes>
so then why have both?
<stormbytes>
gemfile + .gemspec
<apeiros>
see scrollback: 13:16 apeiros: and "it's about dependency managment" - to an extent. that's why it's confusing for newcomers, …
arietis has joined #ruby
<stormbytes>
i see
<stormbytes>
there's gonna be a learning curve here.. lots of reading i can see that already
<apeiros>
interesting… FEZ says me game progress is 104.7% - does that mean I've beaten the game without noticing? o0
<stormbytes>
thanks for the tips
Liothen has quit [Quit: System of a down……]
<stormbytes>
know of a good gem that handles password hashing ?
<apeiros>
bcrypt
<stormbytes>
ERROR: Could not find a valid gem 'bcrypt' (>= 0) in any repository
Spooner has joined #ruby
<Morrolan>
bcrypt-ruby, most likely.
tacos1de has joined #ruby
<stormbytes>
yep
<stormbytes>
wow that's really weird
<Morrolan>
The name of many libraries is created by taking the technology which it implements, and pre- or postfixing it with the programming language's name. *shrug*
<stormbytes>
yes i remember ffmpeg-php
<Morrolan>
Probably some influence from Linux package management. But I wouldn't know for sure.
<stormbytes>
lil bit ;)
<stormbytes>
linux rocks
Bry8Star{T2 has joined #ruby
stonevil has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
razi has quit [Ping timeout: 256 seconds]
akashj87 has joined #ruby
cdelo has joined #ruby
wesside has quit [Ping timeout: 240 seconds]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
yashshah has quit [Read error: Operation timed out]
<stormbytes>
whats the deal with 'require' + 'include' of the same gem
dmyers has quit [Ping timeout: 240 seconds]
otherj has joined #ruby
hamakn has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
yashshah has joined #ruby
Squarepy has quit [Quit: Leaving]
io_syl_ has quit [Quit: Computer has gone to sleep.]
rshetty has joined #ruby
dhruvasagar has joined #ruby
<apeiros>
require loads files
<apeiros>
include is about modules
marcgg has joined #ruby
<apeiros>
different things
tonini has quit [Remote host closed the connection]
<stormbytes>
i see
<stormbytes>
will read.
<apeiros>
you know ri?
stonevil has quit [Remote host closed the connection]
<stormbytes>
nope
stonevil has joined #ruby
<stormbytes>
the docs ?
<stormbytes>
ri / rdoc
<apeiros>
the command line tool
hamakn has quit [Ping timeout: 256 seconds]
dmyers has joined #ruby
<apeiros>
in your bash, type `ri Kernel#require`
<apeiros>
make sure you did `rvm docs generate` first
hakunin has quit [Read error: Connection reset by peer]
justsee has quit [Client Quit]
justsee has joined #ruby
tonini has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
hakunin has joined #ruby
mercwithamouth has joined #ruby
monkegjinni has joined #ruby
TIJ has joined #ruby
RORgasm has quit [Ping timeout: 276 seconds]
bruticus has joined #ruby
Squarepy has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
spider-mario has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
softy has joined #ruby
robertjpayne has joined #ruby
jefflyne has joined #ruby
jds_ has quit [Remote host closed the connection]
jefflyne has quit [Max SendQ exceeded]
<robertjpayne>
For method calls in ruby 2.0.0+ Is it be practice to do my_method(:param => value) or my_method(param: value)? Any any best practice if the parens are ommitted?
spider-mario has joined #ruby
kevinykchan has joined #ruby
mansi has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jerkbot1 has quit [Ping timeout: 240 seconds]
jefflyne has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Client Quit]
rubybee has joined #ruby
TIJ has quit [Read error: Operation timed out]
smathieu has joined #ruby
rickruby has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
jds_ has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
statarb3 has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
rubybee has quit [Quit: Leaving]
softy has left #ruby ["Мягкий как жесть."]
intuxicated has quit [Remote host closed the connection]
emergion has joined #ruby
emergion has quit [Max SendQ exceeded]
emergion has joined #ruby
emergion has quit [Max SendQ exceeded]
emergion has joined #ruby
justsee is now known as muji
cads has quit [Ping timeout: 246 seconds]
mengu has quit [Quit: This computer has gone to sleep]
anderson has quit [Read error: Connection reset by peer]
anderson has joined #ruby
bruticus has quit [Quit: bruticus]
axeman- has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
jds_ has quit [Remote host closed the connection]
kirun has joined #ruby
atno has quit [Remote host closed the connection]
lys1 has joined #ruby
thepumpkin has quit [Remote host closed the connection]
Beoran__ has joined #ruby
rickruby has quit [Remote host closed the connection]
io_syl has quit [Quit: io_syl]
kevinykchan has quit [Quit: Computer has gone to sleep.]
io_syl has joined #ruby
ntus1017 has joined #ruby
jbpros has joined #ruby
lys1 has quit [Client Quit]
Beoran_ has quit [Ping timeout: 246 seconds]
thepumpkin has joined #ruby
sambao21 has joined #ruby
io_syl has quit [Quit: io_syl]
nettoweb has joined #ruby
akashj87_ has joined #ruby
nettoweb has quit [Client Quit]
obs has quit [Quit: Konversation terminated!]
icco has quit [Ping timeout: 240 seconds]
akashj87 has quit [Ping timeout: 276 seconds]
adrian_ has joined #ruby
icco has joined #ruby
lys1 has joined #ruby
doritostains has quit [Ping timeout: 240 seconds]
statarb3 has quit [Quit: Leaving]
sayan has quit [Ping timeout: 256 seconds]
mengu has joined #ruby
thepumpkin has quit [Remote host closed the connection]
Shirakawasuna has quit [Ping timeout: 240 seconds]
canton7 has joined #ruby
sventon_ has quit [Remote host closed the connection]
zeromodulus has joined #ruby
wallerdev has joined #ruby
KevinSjoberg has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jds_ has joined #ruby
icco has quit [Ping timeout: 252 seconds]
icco has joined #ruby
sambao21 has joined #ruby
sventon has joined #ruby
DestinyAwaits has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
arya_ has joined #ruby
kofno has quit [Remote host closed the connection]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mansi has joined #ruby
timonv has quit [Remote host closed the connection]
sambao21 has joined #ruby
stormbytes has quit [Quit: Leaving...]
sambao21 has quit [Client Quit]
lebek has joined #ruby
<KevinSjoberg>
I'd like some help figuring out a better way of calculating average scores per week. See https://gist.github.com/KevinSjoberg/5990694. Any ideas of how to improve or optimize?
sambao21 has joined #ruby
s0ber has quit [Remote host closed the connection]
jds_ has quit [Remote host closed the connection]
s0ber has joined #ruby
jibi has quit [Quit: .]
jds_ has joined #ruby
marcgg has quit [Read error: Connection reset by peer]
marcgg has joined #ruby
smathieu has joined #ruby
yashshah has quit [Ping timeout: 240 seconds]
s0ber has quit [Remote host closed the connection]
nyaruhodo has joined #ruby
mansi has quit [Ping timeout: 276 seconds]
s0ber has joined #ruby
McSoFake has joined #ruby
sventon has quit [Remote host closed the connection]
yashshah has joined #ruby
<apeiros>
KevinSjoberg: your link is empty
<apeiros>
oh, hu? wait, works
smathieu has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
Ry0_ has quit [Remote host closed the connection]
bbunny has quit [Quit: leaving]
jds_ has quit [Ping timeout: 256 seconds]
<apeiros>
KevinSjoberg: if this data comes from an SQL db, I'd probably just let the db do the work. via group by + avg
<apeiros>
note that your `scores.reduce(:+) / scores.size` is potentially doing an integer division (e.g. 20/3 == 6, instead of 6.666)
txdv_ has quit [Read error: Connection reset by peer]
txdv has joined #ruby
pygospa has quit [Disconnected by services]
sambao21 has quit [Quit: Computer has gone to sleep.]
TheRealPygo has joined #ruby
otherj has quit []
anonymuse has joined #ruby
Ry0_ has joined #ruby
Notte has joined #ruby
<KevinSjoberg>
apeiros: Thanks a lot, I'll look at that.
sambao21 has joined #ruby
asteve has joined #ruby
DonRichie has joined #ruby
soulcake has quit [Ping timeout: 240 seconds]
<KevinSjoberg>
apeiros: This is data coming from the database though. So maybe this should be done in SQL.
ntus1017 has quit [Remote host closed the connection]
<apeiros>
KevinSjoberg: in that case - as I said, use group by + avg
<KevinSjoberg>
Yep, I'll try that out.
matematikaadit has joined #ruby
McSoFake has left #ruby ["Leaving"]
<apeiros>
depending on performance requirements, you might consider creating an integer column with time.strftime("%G%V") in it (date as iso-week)
mengu has quit [Quit: This computer has gone to sleep]
<apeiros>
i.e. you can then group by without a function. alternatively you can probably do an index over the week function in the db.
jds_ has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
diabel232 has joined #ruby
Iszak has joined #ruby
matematikaadit has quit [Quit: Leaving]
jds_ has joined #ruby
`p has joined #ruby
yashshah has quit [Ping timeout: 276 seconds]
xargoon has quit [Ping timeout: 240 seconds]
Ry0_ has quit [Remote host closed the connection]
JZTech101 has joined #ruby
horofox_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
xargoon has joined #ruby
ravster has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
viszu has quit [Ping timeout: 246 seconds]
Mitor has joined #ruby
scrollback has quit [Remote host closed the connection]
ravster has quit [Client Quit]
jonathanwallace has joined #ruby
thepumpkin has joined #ruby
scrollback has joined #ruby
ravster has joined #ruby
axeman- has joined #ruby
brunoro has joined #ruby
<KevinSjoberg>
apeiros: SQL was better. I did "SELECT AVG(score) as average_score FROM wellness_measurements GROUP BY DATE_TRUNC('week', logged_at)". Worked perfectly.
<apeiros>
KevinSjoberg: beware, week only will create invalid results if your set spans more than a single year
jds_ has quit [Remote host closed the connection]
<KevinSjoberg>
apeiros: Yeah, you're right. I'll have to figure that out.
binw has joined #ruby
yashshah has joined #ruby
<KevinSjoberg>
apeiros: We will restrict timespans to a single year. Problem solved!
dayepa has quit [Quit: dayepa]
Mitor has quit [Ping timeout: 264 seconds]
Xsheller has joined #ruby
dayepa has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
arietis has quit [Quit: Computer has gone to sleep.]
redgirl has joined #ruby
optimusprimem has joined #ruby
jbpros has quit [Quit: jbpros]
Xsheller has quit [Client Quit]
codex has quit [Read error: Operation timed out]
alexwh has joined #ruby
redgirl has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
horofox_ has quit [Quit: horofox_]
Xsheller has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
wmoxam has joined #ruby
rshetty has joined #ruby
dhruvasagar has joined #ruby
smathieu has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
stonevil has quit [Remote host closed the connection]
TIJ has joined #ruby
jds_ has quit [Remote host closed the connection]
brunoro has quit [Quit: WeeChat 0.4.0]
cofin has joined #ruby
jds_ has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
allaire has joined #ruby
sambao21 has joined #ruby
allaire has quit [Client Quit]
jonathanwallace has quit [Quit: WeeChat 0.4.0]
jds_ has quit [Ping timeout: 260 seconds]
BBonifield has quit [Ping timeout: 241 seconds]
BBonifield has joined #ruby
D1351l has joined #ruby
<D1351l>
yoo
intuxicated has joined #ruby
<D1351l>
what is (exact) a rails full stack developer ?
<D1351l>
it's about knowledge routes, views, controllers and models ?
n1x has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<D1351l>
rails channel is "away"
monkegjinni has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
brunoro has joined #ruby
<havenwood>
D1351l: Its #RubyOnRails
tatsuya_o has joined #ruby
<D1351l>
havenwood: thanks
<havenwood>
D1351l: I'd take that to mean knowing some JavaScript and SQL.
mercwithamouth has quit [Ping timeout: 246 seconds]
<havenwood>
Dunno. What would a partial stack rails dev be?
<havenwood>
I only do controllers!
<havenwood>
talk to the model dept!
Fire-Dragon-DoL has joined #ruby
<canton7>
yeah I'd imagine through to html/css/js/etc
emmanuelux has joined #ruby
<D1351l>
humm
<D1351l>
then .. i am a full stack rails dev .. LOL
<vdandre>
D1351l: For us 'Fullstack' means you're also aware of the operational side (deployment, packaging, blue-green deployments). You are aware of the full stack of your application.
monkegjinni has quit [Remote host closed the connection]
sambao21 has joined #ruby
<havenwood>
mm, DevOps
<D1351l>
vdandre: then ... i'm not a full stack rails dev LOL
<D1351l>
fullstack*
<D1351l>
i know only basic deployment
<havenwood>
D1351l: I'd have thought more on the front end side. I guess it could mean that you know operations, which is annoying cause those two are pretty far apart.
mansi has joined #ruby
bobbyz has quit [Ping timeout: 248 seconds]
<havenwood>
D1351l: What size of shop? That might be indicative.
yashshah has joined #ruby
<havenwood>
D1351l: If they do mean deployment and they have a current stack, it shouldn't be hard to study up on exactly the stack they're using.
akashj87_ has quit [Quit: leaving]
stonevil has joined #ruby
splittingred has quit [Quit: splittingred]
wallerdev has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jonathanwallace has joined #ruby
<D1351l>
havenwood: size of shop .. u meant size of app ?
wmoxam has quit [Ping timeout: 240 seconds]
wallerdev has quit [Client Quit]
<D1351l>
i have developed some apps in rails
<havenwood>
D1351l: Guess I'm confused. Is this a post for a job, or consulting, or something?
jerkbot1 has joined #ruby
<havenwood>
D1351l: If its freelance then vdandre is prolly right.
sgkim1261 has quit [Ping timeout: 240 seconds]
<D1351l>
then ... I could be called "fullstack developer" in my curriculum ?
mary5030 has joined #ruby
stonevil has quit [Remote host closed the connection]
bobbyz has joined #ruby
<havenwood>
D1351l: Ah, sure, why not. :)
<apeiros>
KevinSjoberg: you could also just include the year in the group by (note: the correct year corresponding to the week - see strftime's %Y vs. %G as an example)
stonevil has joined #ruby
* apeiros
is a stack of full developers
arietis has joined #ruby
* havenwood
is a meta-stack developer.
<D1351l>
lol
yashshah has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
<havenwood>
The question of what ultimately is the stack? What is the stack *like*?
Mitor has joined #ruby
<D1351l>
yep
<D1351l>
whatis is the "fullstack dev" !?
thams has quit [Quit: thams]
jds_ has joined #ruby
<apeiros>
havenwood: are meta-stack developer those who never develop a real stack? :)
<havenwood>
apeiros: We just write tests and comments, no code.
<havenwood>
TOD
<havenwood>
Test Only Development
<apeiros>
unpopular abbreviation in german, though
yashshah has joined #ruby
horofox_ has joined #ruby
Mitor has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
cofin has quit [Quit: cofin]
stonevil has quit [Ping timeout: 260 seconds]
wmoxam has joined #ruby
wmoxam has quit [Changing host]
wmoxam has joined #ruby
<D1351l>
"me:whatis is the "rails fullstack developer" ?" : "other:Someone who can debug the TCP/IP stack and JS both"
asteve has quit [Changing host]
asteve has joined #ruby
n1x has joined #ruby
sailias has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
kil0byte has joined #ruby
brennanMKE has joined #ruby
wmoxam has quit [Ping timeout: 260 seconds]
DrShoggoth has quit [Ping timeout: 245 seconds]
DrShoggoth has joined #ruby
timonv has quit [Remote host closed the connection]
rshetty has quit [Ping timeout: 240 seconds]
alcoder has joined #ruby
<apeiros>
rails full stack developer can: develop the full stack. which includes html, haml, css, sass, scss, js, coffee on the client side, ruby, rails, sql (in all variants, that is oracle, postgres, mysql, sqlite etc.), nosql (in all variants, that is mongo, redis, cassandra etc.) on the server side, can build a webserver, write his own os, implement a db, and of course - since hardware is part of the stack too, build his own pcbs, cp
<apeiros>
us, network chips etc.
Dekade has joined #ruby
<apeiros>
blerp, and thus I learned that limechats message splitting algorithm sucks ass.
jds_ has quit [Remote host closed the connection]
jds_ has joined #ruby
arietis has joined #ruby
brennanMKE has quit [Ping timeout: 276 seconds]
sambao21 has joined #ruby
mercwithamouth has joined #ruby
<alcoder>
just need to know the opinion, what is the common ruby culture ? to include the parentheses for function calls ? say gets(), puts("hello");
graph has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<havenwood>
alcoder: No parens with gets and puts.
<alcoder>
doesn't parentheses make things better to read ?
D1351l has quit [Ping timeout: 250 seconds]
<robertjpayne>
Does active record automatically wrap requests in transactions?
banister has joined #ruby
sambao21 has quit [Client Quit]
<banister>
anyone here speak german?
wchun has joined #ruby
<havenwood>
alcoder: Lisp thinks so.
<alcoder>
hm..., i'm coming from world of c/c++ and java. may be it is a hang i have.
<havenwood>
alcoder: Ruby is for those who like the concept of LISP, but don't like too many parentheses.
<alcoder>
havenwood: i see, will it be frowned up on if i use parentheses for function calls ?
axeman- has quit [Read error: Connection reset by peer]
<alcoder>
i feel naked without it.
jefflyne has joined #ruby
axeman- has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<havenwood>
alcoder: Parens are optional for methods. It is just convention not to use them for certain common methods. E.g., you *can* do `1.+(1)` but `1 + 1` is idiomatic.
<alcoder>
alright noted. :)
<Morrolan>
Starts off with "if there's god then there can't be any aliens, because the bible doesn't mention any extraterrestial life", countered by the funky lady with "oh, it's the devil who did mimicry and became an alien", which seems to have Bublath leave the show. :P
<banister>
alcoder: well there are some method calls you will not use parentheses for, i guarantee it ;)
locriani has quit [Remote host closed the connection]
<banister>
alcoder: many 'keywords' in ruby are actually methods
<Morrolan>
Ah, and a TV moderator, seemingly.
haxrbyte has joined #ruby
<banister>
alcoder: they just look like keywords due to optional paretheses ;)
<banister>
paren*
<banister>
Morrolan: cool
<banister>
Morrolan: thanks mang
<Morrolan>
Where did you stumble across this video, out of curiosity? :)
<Morrolan>
Haha, sure thing. :P
lnormous has joined #ruby
<alcoder>
banister: aha, i think them its optional overuse will make ruby code unreadable.
locriani has joined #ruby
<banister>
alcoder: well you have to use your aesthetic judgement, if for example you have a chain of function calls and you dont use parentheses in any of them and you rely on precedence rules to determine which function gets the args and teh block, then yes that's confusing/unreadable for anyone
<banister>
but like any syntax you have to use your common sense
Ry0_ has joined #ruby
<alcoder>
noted.
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
haxrbyte_ has joined #ruby
iko1 has quit [Ping timeout: 245 seconds]
myth17 has joined #ruby
ezkl has quit [Quit: Quit]
asteve has joined #ruby
asteve has joined #ruby
asteve has quit [Changing host]
haxrbyte has quit [Ping timeout: 246 seconds]
kevinykchan has joined #ruby
digitalcake has joined #ruby
cmhobbs has joined #ruby
timonv has joined #ruby
dmyers has quit [Read error: Operation timed out]
DrCode has quit [Ping timeout: 240 seconds]
<digitalcake>
Trying to build a rake take that will publish a jeykll site, getting an error on Dir.mktmpdir "undefined method `mktmpdir' for Dir:Class" using Ruby 2
<r0bglees0n>
alainus: there's a lot of knowledge in that book, unfortunately it is no longer online, so you will need to clone + check it out locally.
<r0bglees0n>
alainus: based on 1.9.2 as well, so a bit old.
Mitor has quit [Ping timeout: 240 seconds]
crazymykl has quit [Remote host closed the connection]
xardas has quit [Read error: Connection reset by peer]
CaptainJet has quit []
crazymykl has joined #ruby
bnagy has quit [Ping timeout: 256 seconds]
DestinyAwaits has quit [Quit: Leaving]
Kelet has quit [Read error: Connection reset by peer]
<alainus>
r0bglees0n, looks good ! thanks
monkegjinni has joined #ruby
<Dwarf>
apeiros: what would I use inside of that def tho, if I wanted to use the thing I used it on?
<apeiros>
what?
<r0bglees0n>
alainus: yeah sure no problem, I learnt new features of 1.9 from that book (I came from 1.8), but i dont know.. its just packed with information and i guess his style is appealing to me.
<apeiros>
Dwarf: methods with a ? at the end are normal methods
CaptainJet has joined #ruby
<Dwarf>
For example
<Dwarf>
def foo(bar)
<Dwarf>
puts bar.to_s
<Dwarf>
end
<apeiros>
they don't work differently from other methods in any way. it could just as well be X instead of ? as the last character.
<Dwarf>
That makes sense
<Dwarf>
But for example
<Dwarf>
bar.foo?
<Dwarf>
How would I do the same thing?
<r0bglees0n>
Dwarf: are you really a dwarf?
chxane has joined #ruby
<Dwarf>
r0bglees0n: I'd appreciate it if you stated on topic
<r0bglees0n>
just curious
<Dwarf>
No, I'm not
<r0bglees0n>
:(
<apeiros>
Dwarf: I don't get your problem. but it seems unrelated to the method being named with a question mark.
razi has quit [Ping timeout: 246 seconds]
<r0bglees0n>
Dwarf: anyway, you'd define the method "foo?" on the receiver class of "bar", so: class Bar; def foo?; true; end; end; bar = Bar.new; bar.foo?
prezJFK has joined #ruby
<Dwarf>
Oh right
himsin has quit [Quit: himsin]
<r0bglees0n>
alainus: plus its free :D
freerobby has joined #ruby
<Dwarf>
apeiros: How would I do it for all classes?
<apeiros>
Dwarf: all classes inherit from Object
<Dwarf>
Alright, thought so, thanks
relix has joined #ruby
redgirl has joined #ruby
elaptics is now known as elaptics`away
bnagy has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<RobW_>
When a hash has a nil value it's nil'ing the entire memo. Next iteration gives me a "cannont << to nil" error.
arya__ has joined #ruby
<RobW_>
(there are some spaces missing in that paste code for the actual output I want, but it doesn't matter for the example.)
arya_ has quit [Ping timeout: 248 seconds]
bruticus has joined #ruby
<realDAB>
RobW_: an 'if' statement that fails returns nil
<RobW_>
realDAB: … thank you.
<RobW_>
That makes total sense now.
<realDAB>
cool
* RobW_
high fives.
<realDAB>
:-)
Kelet has joined #ruby
arietis has joined #ruby
rsahae has joined #ruby
tchebb has quit [Ping timeout: 264 seconds]
JZTech101 has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
diabel232 has joined #ruby
rsahae has quit [Client Quit]
<r0bglees0n>
or, {foo: "bar", x: nil}.reject { |_, v| v.nil? }, now you now its not nil
<r0bglees0n>
know*
kofno has joined #ruby
vlad_starkov has joined #ruby
tchebb has joined #ruby
<RobW_>
don't suppose I need that each in there either.
robscomputer has quit [Ping timeout: 260 seconds]
jlast has joined #ruby
<RobW_>
I need the keys from the nil values, but thanks for the suggestion.
<RobW_>
all is working well.
jarray52 has joined #ruby
badquanta has joined #ruby
richiebkr has quit [Remote host closed the connection]
iko1 has quit [Ping timeout: 245 seconds]
jbpros has quit [Quit: jbpros]
viszu has joined #ruby
<jarray52>
If I have an object a that was initially constructed using a class object whose name I don't know, is there a way to determine the name of the class object that was used to instantiate the object a given that I have the object a?
tobyo has quit [Read error: Operation timed out]
<jarray52>
Oh, it is a.class.
<apeiros>
.class
<jarray52>
apeiros: Thanks.
<jarray52>
I think I managed to confuse myself. It just clicked.
<apeiros>
:)
<apeiros>
well, you managed to unconfuse yourself ;-)
<jarray52>
apeiros: :)
io_syl has joined #ruby
smathieu has joined #ruby
diabel232 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
diabel232 has joined #ruby
wmoxam has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
Guest39520 is now known as nitrodex
colonolGron has joined #ruby
axeman- has quit [Remote host closed the connection]
pskosinski has joined #ruby
philcrissman has quit [Remote host closed the connection]
tobyo has joined #ruby
S0da has quit [Remote host closed the connection]
thams has joined #ruby
icecandy has joined #ruby
zooz has quit [Ping timeout: 276 seconds]
stkowski has quit [Quit: stkowski]
mengu has joined #ruby
nanoxd_ has joined #ruby
Astral_ has joined #ruby
nanoxd has quit [Ping timeout: 260 seconds]
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
Astralum has quit [Ping timeout: 256 seconds]
rickruby has joined #ruby
pipework has joined #ruby
zooz has joined #ruby
renderful has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
freerobby has quit [Quit: Leaving.]
wmoxam has quit [Ping timeout: 264 seconds]
michaeldeol has joined #ruby
kofno has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
kofno has joined #ruby
locriani has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
<pupperwares>
Hello, I need some help converting Ruby regular expressions to JavaScript. I see some one-liners and small functions going around, but I can't seem to get them to work… any suggestions?
locriani has quit [Ping timeout: 260 seconds]
motto has joined #ruby
dallasm has quit [Remote host closed the connection]
m8 has quit [Ping timeout: 264 seconds]
RORgasm has joined #ruby
thams has quit [Quit: thams]
freerobby has joined #ruby
ffio_ has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RORgasm has quit [Ping timeout: 276 seconds]
stkowski has joined #ruby
ffio has quit [Ping timeout: 260 seconds]
bruticus has quit [Quit: bruticus]
intuxicated has quit [Quit: Leaving]
intuxicated has joined #ruby
Kiry has quit [Quit: —I-n-v-i-s-i-o-n— 3.3 (November '11)]
nettoweb has joined #ruby
jefflyne has joined #ruby
tkuchiki has joined #ruby
spider-mario has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<apeiros>
pupperwares: with such a vague question - no
pskosinski has quit [Quit: Til rivido Idisti!]
timonv has quit [Remote host closed the connection]
marcgg_ has joined #ruby
TgMts has joined #ruby
marcgg has quit [Read error: No route to host]
tkuchiki has quit [Ping timeout: 246 seconds]
locriani has joined #ruby
jmimi has joined #ruby
Ziarkaen` has joined #ruby
nbouscal has quit [Ping timeout: 240 seconds]
Liothen has joined #ruby
Ziarkaen has quit [Ping timeout: 246 seconds]
<pupperwares>
I need to convert the regular expressions from the youtube-dl project on GitHub so I can use them in the Node.js proxy I'm coding. Some are multiple lines and a few use features not present in the JS engine, but I just want help getting the one liners to work, like: http://reefpoints.dockyard.com/ruby/2011/11/18/convert-ruby-regexp-to-javascript-regex.html
axeman- has joined #ruby
cdelo has joined #ruby
dash_ has quit [Quit: Time to beer :)]
postmodern has joined #ruby
mikewintermute has joined #ruby
stonevil_ has joined #ruby
ckrailo has joined #ruby
<RobW_>
pupperwares: As unhelpful as it is, it's probably easiest to read the regex and rewrite it with required js syntax. You're going to need to understand it to test the "automatic" conversion anyways.
schickung has joined #ruby
chrisramon has joined #ruby
mahmoudimus has joined #ruby
stonevil has quit [Ping timeout: 246 seconds]
<RobW_>
regexpal is a good js regex tester. Rubular is good for Ruby so you can see what's going on.
<RobW_>
i.e. drop the current regex into Rubular and see how it's breaking things up.
n1x has quit [Ping timeout: 260 seconds]
mansi has quit [Remote host closed the connection]
<waxjar>
rubular <3
TgMts has left #ruby [#ruby]
thebastl has quit [Remote host closed the connection]
Ziarkaen` has quit [Read error: Connection reset by peer]
TgMts has joined #ruby
mansi has joined #ruby
<pupperwares>
I use patterns for OSX but unfortunately it supports many engines, and the ruby expressions work in patterns, but don't work in V8
WillSh has joined #ruby
<pupperwares>
I love the match groups in ruby
<waxjar>
pupperwares, is it URIs you need to regexp?
<pupperwares>
yes, they've already been written, many aren't to spec though, so I can't use a URI parsing library
colonolGron has quit [Quit: leaving]
<waxjar>
ah, that's what i was gonna suggest :/
colonolGron has joined #ruby
Mitor has joined #ruby
Mitor is now known as stormbytes
wmoxam has joined #ruby
<pupperwares>
this is for a prototype, all I wanted to do was test the URL coming into my proxy using the URL validation regexp from Ruby, if it matched, I'd insert a header in the page that was requested to "Download the video" which would call youtube-dl and download the video on all supported sites
mansi has quit [Ping timeout: 245 seconds]
<pupperwares>
it's for intercity schools to allow teachers to download videos and push them out to tablets for kids who don't have internet at home
<stormbytes>
hey all
<waxjar>
youtube's own API can parse URIs to get metadata from it, iirc, but they probably won't return a direct dl URI
burz has joined #ruby
<stormbytes>
is there a way to get a blinking cursor in stdIn.gets?
TgMts has quit [Quit: Page closed]
<waxjar>
i think that's more a feature of the terminal emulator itself, but i'm sure you can mimic it with some blocky looking character
mahmoudimus has quit [Quit: Computer has gone to sleep.]
arya__ has quit [Ping timeout: 240 seconds]
<stormbytes>
I've got a 'simulated prompt' going on
<stormbytes>
but the the blinking part.. not so much
<stormbytes>
oh well
pr0ggie has quit [Ping timeout: 260 seconds]
<apeiros>
stormbytes: there might be an ansi escape sequence for it, if not, something like curses is probably your only chance.
<stormbytes>
hey apeiros
arya_ has joined #ruby
<stormbytes>
i thought maybe there was some quick hack for it, not really worth the effort beyond that :)
<stormbytes>
i'm writing a command line contact manager
<apeiros>
ansi escape sequence is a quick hack
prezJFK has quit [Read error: Connection reset by peer]
axeman- has quit [Ping timeout: 245 seconds]
<RubyPanther>
stormbytes: term-ansicolor gem makes it easy
<stormbytes>
thanks RubyPanther
<RubyPanther>
puts "<3".red.blink
<stormbytes>
at first i thought it'd work like any other command line tool, but after tinkering a bit i decided to make it option-driven (stdIn.gets())
<stormbytes>
hah
prezJFK has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
CrozzCyborg has joined #ruby
colonolGron has quit [Quit: Lost terminal]
io_syl_ has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
stormbytes: you can also set autoflush and then print | and backspaces in a loop, if you want it to really be like, wtf
<apeiros>
yikes, `!String.instance_methods(false).map(&:to_sym).include?(:clear)` - what a horrible way to check for the presence of a method…
<RubyPanther>
apeiros: as bad as it is, at least they didn't use is_a?
axeman- has joined #ruby
<apeiros>
seems that method is broken anyway. incomplete implementation.
workmad3 has quit [Ping timeout: 246 seconds]
<apeiros>
(it's the support? method)
<banister>
you can just use method_defined?
<banister>
String.method_defined?(:clear)
ssvo has quit [Ping timeout: 264 seconds]
tomzx_mac has quit [Ping timeout: 240 seconds]
n1x has joined #ruby
<banister>
though i guess the point of that was to be 1.8 proof
<banister>
but im pretty sure 1.8 accepts symbols to method_defined?
<apeiros>
it does
<apeiros>
all that kind of stuff in 1.8 used rb_intern anyway
<RubyPanther>
apeiros: presumably they didn't want to instantiate a string in order to call #respond_to?
<apeiros>
RubyPanther: that would have been an equally bad solution ;-p
<apeiros>
well, slightly less horrible actually. but banister has the right solution.
<apeiros>
you've got way too much time on your hands - I wish I had that much *jealous* :(
<banister>
apeiros: well i wrote it in the weekend :) and it's the first lib aside from pry i've released in ages... :)
tomzx_mac has joined #ruby
<apeiros>
:(
mikewintermute has quit [Quit: mikewintermute]
<apeiros>
all I did last week-end was fight some broken iban spec file from swift, and that wasn't because I wanted to. and this week-end I'll work too. and all just because managers define deadlines before they know their own requirements…
<apeiros>
*sob*
<banister>
apeiros: are you going to get a ps4?
<banister>
sux
<apeiros>
banister: nope. decided against next-gen consoles and got myself a shiny gaming pc instead
bradhe has joined #ruby
<banister>
cool
<banister>
i wonder when gta5 will have a pc release
<apeiros>
my first windows pc ever. and it reminded me of why I don't want to use windows for anything serious ever.
platzhirsch has joined #ruby
<banister>
that game looks incredible, it's evolved into an 'everything' simulator
<banister>
apeiros: what's windows 8 like?
<apeiros>
I have win7
threesome has joined #ruby
<banister>
probabl a good move
smathieu has quit [Ping timeout: 276 seconds]
zooz has quit [Read error: Operation timed out]
zooz has joined #ruby
dash__ has joined #ruby
<Notte>
The last trailer shown it will be only for ps3 and xbox.
<Notte>
I'd like it for pc too.
<banister>
Notte: that's just on release though right? they usually release a pc version a few months later dont they?
codecop has quit [Remote host closed the connection]
<Notte>
Maybe you're right. The last i played was gta san andreas for ps3.
<Notte>
ps2
nettoweb has quit [Quit: nettoweb]
tomzx_mac has quit [Read error: Operation timed out]
tomzx_mac has joined #ruby
dash__ has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
io_syl_ has joined #ruby
burz has quit [Remote host closed the connection]
shadoi1 has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]