<Ox0dea>
I just thought it was weird you having a go at Ruby for not letting you do something crazy that Python permitted.
<Ox0dea>
Could you show how to modify a dictionary in-place while iterating over it in Lisp?
Senecea has joined #ruby
ixti has quit [Quit: WeeChat 1.4]
ixti has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
codefo has joined #ruby
ixti has quit [Client Quit]
Ebok has joined #ruby
cschneid_ has quit [Remote host closed the connection]
janebootydoe has joined #ruby
Senecea has quit [Client Quit]
kalopsian has joined #ruby
Senecea has joined #ruby
ascarter has joined #ruby
jam_ has quit []
<malice>
Ox0dea: I have limited time. When I'm finished and I still got some time(although it's kind of late now) I might do it, otherwise I'll try to come here later with an example(if I succeed)
<volty>
what's the prob with iterating and changing the hash? won't find the newly inserted key / value pairs ?
jam_ has joined #ruby
<Ox0dea>
volty: Buckets are essentially linked lists.
<Ox0dea>
The pointers get all wonky if you're allowed to muck with 'em in flight.
Senecea has quit [Client Quit]
Senecea has joined #ruby
xet7 has quit [Quit: Leaving]
oivoodoo has joined #ruby
djbkd has joined #ruby
<volty>
can't you do an external iteration ?
jam_ has quit [Client Quit]
ur5us has joined #ruby
h99h9h88_ has quit [Remote host closed the connection]
<volty>
ellistaa: we all start our lives with simple (brute) iterations, then grow and begin sophisticating —- the truth, whatever the lispers and haskellers say about (their) brains. nobody came functional & recursive on the earth
usershell has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ccowart has quit [Ping timeout: 272 seconds]
<Ox0dea>
!xkcd 224
<Ox0dea>
?xkcd 224
<ruby[bot]>
Ox0dea: I don't see no 224, whom should I tell about xkcd?
<Ox0dea>
Wat.
duncannz has quit [Remote host closed the connection]
_darinthompson has joined #ruby
usershell has quit [Ping timeout: 250 seconds]
<Ox0dea>
volty: I suspect you're aware, but iteration and recursion are equivalent; the latter just abstracts away the stack.
<volty>
Ox0dea: pretty aware, from the old days, when writing both versions
<_darinthompson>
And sorry in advance for the massive tabs, I keep setting it to 2 tabs, but it saves as 8.
Jardayn_two is now known as Jardayn
<volty>
but let's say iteration is easier since it's easier to emulate it in your brain, to trace it, etc etc (and always whatever the brained stackful say)
chouhoulis has joined #ruby
<Ox0dea>
_darinthompson: You're defining local variables in #get_dates.
<Ox0dea>
You have to say either `@foo = 1` or `self.foo = 1`.
sandstrom has quit [Quit: My computer has gone to sleep.]
<_darinthompson>
Can you explain that a little? I thought that is what the initialize method did when you set @date = date
mondok has quit [Ping timeout: 250 seconds]
spider-mario has quit [Remote host closed the connection]
<ellistaa>
_darinthompson: end_date - start_date … did u mean @start_date - @end_date
<Ox0dea>
ellistaa: No, he's got accessors defined.
<volty>
no sense of setting a local with the same name as a setter
marienz has quit [Quit: upgrades]
<Ox0dea>
It would still have to check the table of accessors.
<bnagy>
_darinthompson: ^^ there I force it to use the accessor by referring to self
<volty>
Ox0dea: I agrre, everything has a price
cicloid has joined #ruby
<Ox0dea>
Some not worth paying.
_darinthompson has quit [Ping timeout: 252 seconds]
<volty>
Ox0dea: would have allowed at least start_date() = ....
marienz has joined #ruby
<Ox0dea>
You're scaring me.
<volty>
hi hi
<Ox0dea>
In the case that you meant `foo=()`, I disagree more gently.
<Ox0dea>
Still, all kinds of expressions require outer parentheses, in which case it would have to disambiguate via operator padding, and that'd be lame.
_darinthompson has joined #ruby
jottr_ has joined #ruby
iateadonut has joined #ruby
<_darinthompson>
Sorry, I'm in the desert of Oman. My internet is a little spotty right now.
<volty>
yes, but let's think about a guy that comes from python, just to free from using self (or this?) all the time, then goes on and discovers that there are exceptions
cicloid has quit [Ping timeout: 245 seconds]
x77686d has quit [Quit: x77686d]
jottr has quit [Ping timeout: 250 seconds]
h99h9h88 has quit [Remote host closed the connection]
<Ox0dea>
Explicit `self` is arguably a smell.
<Ox0dea>
Assign to instance variables by—wait for it...—assigning to instance variables.
<Ox0dea>
Ruby is hardly the language for people allergic to symbols.
<_darinthompson>
To the person who was telling me to do the variable exercises did you have a website to study more about that?
<bnagy>
don't know tbh
stannard has joined #ruby
<bnagy>
you can probably just work it out by playing with how locals vs @ivars work in toy classes in irb
<bnagy>
I don't know what's good these days for online exercises
pdoherty has quit [Read error: Connection reset by peer]
<_darinthompson>
:kspenser Thanks for the time helping me out. *and to everyone else as well
<_darinthompson>
I need some training in understanding the things I have book knowledge of.
<kspencer>
np
yeticry_ has quit [Ping timeout: 240 seconds]
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terminalrecluse has joined #ruby
dopie has quit [Quit: Lost terminal]
adgtl has joined #ruby
dopie has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
nertzy2 has joined #ruby
northfurr has quit [Quit: northfurr]
jespada has quit [Ping timeout: 240 seconds]
<Ox0dea>
_darinthompson: Telling yourself you "know" something is the first step to never actually doing so.
<Ox0dea>
There's no such thing as "knowing", by my lights.
<_darinthompson>
also true. My cup is definitely empty.
<Ox0dea>
*ready for water
scripore has quit [Quit: This computer has gone to sleep]
paradisaeidae has joined #ruby
dopie has quit [Client Quit]
<_darinthompson>
haha. Man, I can't get it right. It's also 520 am and i've been at work since midnight and awake since 9pm
<Ox0dea>
Sleep is death practice.
stjames has quit [Quit: Leaving]
<_darinthompson>
that military life though...
dopie has joined #ruby
<kspencer>
_darinthompson: see pm
<volty>
you'll reach the knowledge when you'll become aware that 'knowledge' as a bag of notions does not give you knowledge
adgtl has quit [Ping timeout: 250 seconds]
<volty>
sleeping helps reorganize neural net
scripore has joined #ruby
<volty>
knowing to not know is knowing? «consistence knowledge of inconsistency» — one of typical phrases that modern artists expose (instead of hard || deep work)
<volty>
I feel I got overfuzzy. gn
volty has quit [Quit: Konversation terminated!]
<_darinthompson>
I recognize my need for practice training and mentorship.
FernandoBasso has quit [Quit: Leaving]
Kryptonic has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
Kryptonical has joined #ruby
djbkd_ has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
northfurr has joined #ruby
Senecea has joined #ruby
pdoherty has joined #ruby
northfurr has quit [Client Quit]
jottr_ has quit [Ping timeout: 245 seconds]
scripore has quit [Quit: This computer has gone to sleep]
sandstrom has quit [Quit: My computer has gone to sleep.]
SpikeMaster has joined #ruby
jbrhbr has joined #ruby
Senecea has quit [Client Quit]
sandstrom has joined #ruby
Senecea has joined #ruby
djbkd_ has quit [Ping timeout: 272 seconds]
SpikeMaster has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
timanema has quit [Ping timeout: 240 seconds]
shanemcd has joined #ruby
dcunit3d has quit [Ping timeout: 265 seconds]
j416 has quit [Ping timeout: 272 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
bafbomb has quit [Read error: Connection reset by peer]
bafbomb has joined #ruby
shanemcd has quit [Ping timeout: 256 seconds]
fly5566 has joined #ruby
arthurnn has quit [Ping timeout: 264 seconds]
ebertx has quit [Ping timeout: 264 seconds]
Xiti` has quit [Quit: Xiti`]
guzzlefry has left #ruby [#ruby]
ruisantos has quit [Ping timeout: 264 seconds]
j416 has joined #ruby
ruisantos has joined #ruby
jbrhbr has quit [Quit: Leaving.]
sandstrom has quit [Quit: My computer has gone to sleep.]
baweaver has joined #ruby
ellistaa has quit [Quit: ellistaa]
sandstrom has joined #ruby
Sucks has quit [Ping timeout: 245 seconds]
arthurnn has joined #ruby
LoneHermit has joined #ruby
davedev2_ has quit []
ebertx has joined #ruby
zhkirill has joined #ruby
LoneHermit has quit [Remote host closed the connection]
tomchapin has joined #ruby
nertzy2 has quit [Quit: This computer has gone to sleep]
tomchapin has quit [Ping timeout: 260 seconds]
LoneHermit has joined #ruby
penne12 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
scripore has joined #ruby
avgn5 has joined #ruby
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
Ebok has joined #ruby
avgn5 has left #ruby [#ruby]
sandstrom has quit [Quit: My computer has gone to sleep.]
pdoherty has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
_darinthompson has quit [Ping timeout: 252 seconds]
cpup has quit [Ping timeout: 250 seconds]
itscalleddaytwah has joined #ruby
ellistaa has joined #ruby
Xiti has joined #ruby
Musashi007 has joined #ruby
nerium has quit [Quit: nerium]
malice has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
kkeuning has joined #ruby
kkeuning has quit [Max SendQ exceeded]
Pande has joined #ruby
kkeuning has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
victortyau has quit [Ping timeout: 245 seconds]
kkeuning has quit [Max SendQ exceeded]
sandstrom has quit [Quit: My computer has gone to sleep.]
kkeuning has joined #ruby
nerium has joined #ruby
kkeuning has quit [Max SendQ exceeded]
sandstrom has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kkeuning has joined #ruby
cpup has joined #ruby
artX000 has joined #ruby
jottr_ has joined #ruby
djbkd_ has joined #ruby
akem has joined #ruby
speaking1ode has quit [Quit: Reconnecting]
speaking1ode has joined #ruby
bklane has joined #ruby
jottr_ has quit [Ping timeout: 272 seconds]
shaileshg has joined #ruby
terminalrecluse has joined #ruby
stannard has quit [Remote host closed the connection]
djbkd_ has quit [Ping timeout: 265 seconds]
gbgdev_ has quit [Remote host closed the connection]
hannelita has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
akem has quit [Remote host closed the connection]
sandstrom has joined #ruby
bklane has quit [Remote host closed the connection]
victortyau has joined #ruby
goodcodeguy has joined #ruby
goodcodeguy has quit [Client Quit]
scripore has quit [Quit: This computer has gone to sleep]
craigp has quit [Remote host closed the connection]
Jardayn has quit [Quit: Leaving]
Pande has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
sandstrom has quit [Quit: My computer has gone to sleep.]
djbkd has quit [Remote host closed the connection]
bklane has joined #ruby
djbkd has joined #ruby
AugustoC has left #ruby [#ruby]
x77686d has joined #ruby
wilbert has joined #ruby
sandstrom has joined #ruby
lotsoftuna has joined #ruby
<lotsoftuna>
Hi, so... Ruby = Ruby On Rails?
<lotsoftuna>
Or are they totally different?
<lotsoftuna>
afaik my web hoster allows Ruby, but what makes Rails different then?
<ropeney>
Ruby On Rails uses ruby, like wordpress uses php :)
<lotsoftuna>
ah
Bloomer has joined #ruby
<lotsoftuna>
There's a local job offer that's looking for people who've used Ruby on Rails, so I'd like to learn it and use it a bit
A124 has quit [Read error: Connection reset by peer]
<lotsoftuna>
but, idk if my hoster supports it, or allows it
<lotsoftuna>
wait
<lotsoftuna>
yeah, they do support it :)
h99h9h88 has joined #ruby
<ropeney>
is it cpanel hosting?
<cscheib_>
rails is a framework built on top of ruby
<cscheib_>
there's a channel specifically for rails
<havenwood>
#rubyonrails
<lotsoftuna>
Ropeney: it's NearlyFreeSpeech
<lotsoftuna>
Yaeh, I joined
<lotsoftuna>
but oh wait uh
<lotsoftuna>
I've no idea if they're using cpanel
<lotsoftuna>
but their FAQ says "You can run CGI lisp, perl, python, ruby, and tcl scripts by putting them in your web space and giving them a .cgi extension."
nertzy2 has joined #ruby
<cscheib_>
you could always just get your own VPS
<lotsoftuna>
:/
<cscheib_>
or use Heroku free tier
<cscheib_>
(or Hobby tier)
<ropeney>
lotsoftuna: You may have trouble installing gems on that
<lotsoftuna>
I've got full ssh access
<lotsoftuna>
but yeah, I feel I might
<cscheib_>
you can also run/test rails projects on your local box
A124 has joined #ruby
<lotsoftuna>
It's more like, to be able to have them on my site, so that someone can visit it and interact with it
<havenwood>
lotsoftuna: CentOS tends to be a good bit behind the times but I'm sure you could make it work if you had to.
<cscheib_>
yea, you may want to look into Linode, DigitalOcean, or AWS for that... or Heroku, if you don't want to manage/deal with a full OS
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has quit [Ping timeout: 256 seconds]
<lotsoftuna>
They're running FreeBSD
<lotsoftuna>
"Advanced web frameworks: Django, Node.JS, Ruby on Rails, and many more"
<lotsoftuna>
is what they claim are their "features"
<Ox0dea>
Of course you can host a Rails app on NearlyFreeSpeech.
<Ox0dea>
But, as advised, it'd be more painful than the better alternatives.
scripore has quit [Quit: Leaving]
<cscheib_>
you'll get better help from people if you run on Linux via one of the methods I mentioned
<lotsoftuna>
I figure, yeah
<lotsoftuna>
Ox0dea: how will it be more painful? Just more difficult for me to setup?
<Ox0dea>
lotsoftuna: Aye, you'll have to fight whatever "easy-to-use" configuration they've got going.
<lotsoftuna>
ah
<Ox0dea>
"One-size-fits-all" is marketing spiel.
<lotsoftuna>
Are you with NFS?
<Ox0dea>
I've used them in the past.
<Ox0dea>
Those were my PHP days. *shudder*
<lotsoftuna>
>.>
<lotsoftuna>
Ox0dea: so then you didn't run anything Ruby-wise there, I take it?
<Ox0dea>
lotsoftuna: I didn't.
<lotsoftuna>
Ah
<cscheib_>
my employer's public facing stuff is all PHP
<lotsoftuna>
I feel that there's nothing wron with PHP man
<cscheib_>
but I will still write all my shit in Ruby
<Ox0dea>
They're certainly not lying when they say they support it; the C in CGI means what it says on the tin.
<Ox0dea>
lotsoftuna: Do you like fractals?
sandstrom has quit [Quit: My computer has gone to sleep.]
<Ox0dea>
Don't even bother to read it. Just look at how long it is.
sandstrom has joined #ruby
arlek has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
<Ox0dea>
If somebody can in good conscience spill that much ink about how PHP is shit, it's gotta be shit. And it really is.
bronson has joined #ruby
<lotsoftuna>
>PHP is C
<lotsoftuna>
goodbye
<Ox0dea>
Uh... do you know PHP?
arlek has joined #ruby
System42 has quit [Quit: Leaving]
<lotsoftuna>
I do not
<lotsoftuna>
but I don't know C either
<lotsoftuna>
:/
<lotsoftuna>
I know bash, batch and vbs scripting, and a bit of C++
<lotsoftuna>
that's it. I'm teaching myself HTML as well :/
wheresmyjetpack has joined #ruby
<lotsoftuna>
I'm not the best at code, I'm more hardware, which is why the program I'm in is hardware based
x77686d has quit [Quit: x77686d]
<lotsoftuna>
networking, fixing systems, administration, with some scripting in there
<Ox0dea>
Sounds like a good time. Don't go settin' nothin' on fire.
Yzguy has quit [Quit: Zzz...]
diegoviola has quit [Quit: WeeChat 1.3]
<lotsoftuna>
mm
Anothermoron has quit [Quit: Leaving]
adgtl has joined #ruby
<lotsoftuna>
That's why this job might not be for me lol
bronson has quit [Ping timeout: 265 seconds]
<Ox0dea>
There are plenty of pyromaniacal sysadmins.
<lotsoftuna>
"The end game will be a system that can automatically bootstrap and configure all switches and servers in a new datacenter, and then continue to manage the entire lifecycle of all equipment and components."
<lotsoftuna>
I meant the job I was looking at locally, which wanted some Ruby on Rails work
<lotsoftuna>
"Developed or supported a Ruby on Rails stack/application"
sandstrom has quit [Quit: My computer has gone to sleep.]
wilbert has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
bklane has quit [Remote host closed the connection]
djbkd_ has quit [Ping timeout: 240 seconds]
stannard has joined #ruby
_darinthompson has joined #ruby
bklane has joined #ruby
hannelita has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
Ankhers has quit [Ping timeout: 264 seconds]
<_darinthompson>
Can anyone take a look at this gist and help me understand why it repeats itself and gives a strange answer as output? I'd really appreciate it.
sandstrom has quit [Quit: My computer has gone to sleep.]
<_darinthompson>
it was yelling when I changed some text around
<_darinthompson>
@per_diem = @per_diem * 0.75 keeps it from throwing an error, but it doesn't function properly. Obviously.
<Ox0dea>
Do you know why?
<_darinthompson>
it should be to_i huh?
<Ox0dea>
Where?
<_darinthompson>
gets gets a string
<Ox0dea>
It does.
<_darinthompson>
gets.chomp.to_i
<Ox0dea>
Do you want the user to be able to supply a fractional per diem?
sandstrom has joined #ruby
m1dnight1 is now known as m1dnight_
<_darinthompson>
It can, but the user who would use this. already knows the per Diem rate, it's a constant on the NAVY side. But it changes based on the length of deployment
<Ox0dea>
It's always a whole number, then?
ellistaa has quit [Quit: ellistaa]
<_darinthompson>
I guess there are fractions like 3.50
<_darinthompson>
there is a lot to think about that I didn't even know to think about
rtail has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
<ponga>
I finally had a moment where it should be running fine but it did, then it didn't a moment after, which took me a lot of time investigate the problem, and wondered how it did work in first place anyhow
<ponga>
:(
<ponga>
*where it should not be running
<_darinthompson>
:Ox0dea I don't really understand that.
<Ox0dea>
_darinthompson: Well, the #to_i method converts to an integer; 3.5 isn't an integer, so it has to throw away the fractional part.
<_darinthompson>
Oh yeah, I get that. Is that what the exception was saying?
howdoi has joined #ruby
<Ox0dea>
Wizard != psychic. :P
<_darinthompson>
hahahaha. That's even funnier being awake for as long as I have been
<_darinthompson>
Since it's money, I guess to_d(eez_nuts) would work, correct?
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_darinthompson>
nope, still throws an error.
solocshaw has quit [Ping timeout: 240 seconds]
<Ox0dea>
Enlighten me: in which jurisdictions do your testicles constitute valid currency?
<Ox0dea>
Addendum: have you already spent them?
<_darinthompson>
Maybe here in the desert of Oman.
skofo has joined #ruby
ur5us has quit [Remote host closed the connection]
<Ox0dea>
Good luck out there.
Yzguy has joined #ruby
<_darinthompson>
If you were to see me right now, you'd think that programming of any kind would be the last thing on my mind. But it isn't. It's the first.
<ponga>
can someone explain difference between " x == 1 || x == 2 " and " x == 1 || 2 "
<ponga>
it somehow messed up my code
bklane has quit [Ping timeout: 240 seconds]
<_darinthompson>
one is x is equal to 1 or x is equal to 2. the other one is x is equal or 1 or x is 2
chouhoulis has quit [Remote host closed the connection]
<Ox0dea>
Is that a drone in the sky behind you?
<ponga>
I lost it at "x is equal or 1 "
ICantCook has joined #ruby
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
zhkirill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_darinthompson>
So. the first code example is a comparison. is x equal to 1 or is x equal to 2 the second one is saying. Is X equal to 1 or just the number 2
<ponga>
ah hah
<ponga>
got it like 50%, thanks
<ponga>
I think I need time to understand it
<_darinthompson>
It's like have a scale. On one side of the scale you have x == 1 and on the the side you have the number 2
braincrash has joined #ruby
<_darinthompson>
one is a comparison, the other side is just a number
<ponga>
oh
<Ox0dea>
== "binds" more tightly than ||, so it may help to think of it as `(x == 1) || (2)`.
dmr8 has quit [Quit: Leaving]
<Ox0dea>
|| (and &&) "short-circuit", meaning that they stop as soon as they know what they must evaluate to.
<_darinthompson>
That's probably better than what I was saying.
<_darinthompson>
just programming for "fun" as well then huh?
jottr_ has joined #ruby
<Radar>
Yzguy: I know right. How dare we get paid $$$$$$ to do our hobbies?
<Radar>
or in the case of Ox0dea: $$$$$$$$$$
<Yzguy>
nah I mean more of the atmosphere.
Senecea has quit [Max SendQ exceeded]
<Ox0dea>
Radar: You're onto something, but rb_is_global_id() is such a stickler!
<Yzguy>
am looking onto my next opportunity, really excited. lots of docker, ruby, CI/CD, etc.
<_darinthompson>
So, i've got a question for you again. If I may.
<Radar>
Yes I think we have time for that today.
djbkd_ has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
<Ox0dea>
How to do CI for real: `while :; do git commit -am '#justCIthings'; done`
<Yzguy>
lmfao
jottr_ has quit [Ping timeout: 250 seconds]
bklane_ has quit [Ping timeout: 240 seconds]
<_darinthompson>
So, I can understand that my "program" works locally on my machine, with me calling every method one at time. But, how would it deploy and be used by someone else?
<Ox0dea>
_darinthompson: Package it as a Ruby gem.
<Yzguy>
I need some feature enhancements, validation, etc. but
finisherr has joined #ruby
ellistaa has joined #ruby
stannard has quit [Ping timeout: 256 seconds]
zast has joined #ruby
krz has joined #ruby
<Yzguy>
may do some bash completion too
<Yzguy>
since its cli tool
hannelita has quit [Ping timeout: 264 seconds]
gix has quit [Ping timeout: 250 seconds]
gix has joined #ruby
skcin7 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hahuang65 has quit [Ping timeout: 264 seconds]
rakm has joined #ruby
sandstrom has joined #ruby
kalopsian has quit [Ping timeout: 272 seconds]
kalopsian has joined #ruby
bklane_ has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
bklane has joined #ruby
finisherr has quit [Ping timeout: 245 seconds]
_darinthompson has quit [Ping timeout: 252 seconds]
Musashi007 has quit [Quit: Musashi007]
kalopsian has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
Xeago has quit [Ping timeout: 276 seconds]
JoyfulStudent has quit [Ping timeout: 272 seconds]
finisherr has joined #ruby
justqyx has joined #ruby
<justqyx>
exit
Yzguy has quit [Quit: Zzz...]
justqyx has left #ruby [#ruby]
asccigcc has quit [Quit: asccigcc]
kalopsian has joined #ruby
justqyx has joined #ruby
<justqyx>
/close
justqyx has left #ruby [#ruby]
sandstrom has quit [Quit: My computer has gone to sleep.]
bklane_ has joined #ruby
sandstrom has joined #ruby
s0undw4ve has joined #ruby
RegulationD has joined #ruby
bklane has quit [Ping timeout: 256 seconds]
asccigcc has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akem has joined #ruby
kalopsian has joined #ruby
rtail has quit [Ping timeout: 250 seconds]
rtail has joined #ruby
bronson has joined #ruby
bklane_ has quit [Read error: Connection reset by peer]
bklane has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 265 seconds]
adgtl has joined #ruby
kalopsian has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
Contigi has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
kalopsian has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Dimik has joined #ruby
sandstrom has joined #ruby
adgtl has quit [Ping timeout: 264 seconds]
RegulationD has quit []
Macaveli has joined #ruby
craigp has joined #ruby
finisherr has quit [Quit: finisherr]
mhb_ has quit [Ping timeout: 265 seconds]
djbkd_ has joined #ruby
arup_r has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
djbkd_ has quit [Ping timeout: 240 seconds]
tildes has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
hannelita has joined #ruby
CloCkWeRX has joined #ruby
d0lph1n98 has joined #ruby
zeknox has quit [Quit: Leaving.]
bklane has quit [Ping timeout: 256 seconds]
bklane has joined #ruby
jcdesimp has quit [Remote host closed the connection]
Ilyes512 has joined #ruby
mhb has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
d0lph1n98 has quit [Client Quit]
chouhoulis has joined #ruby
hannelita has quit [Ping timeout: 245 seconds]
kalopsian has quit [Ping timeout: 240 seconds]
bklane has quit [Remote host closed the connection]
fedexo has joined #ruby
goodroot has quit [Ping timeout: 256 seconds]
bklane has joined #ruby
kalopsian has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
hahuang65 has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 250 seconds]
lacuna has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
lxsameer has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ilyes512 has joined #ruby
zhkirill has joined #ruby
Ilyes512 has quit [Client Quit]
axsuul has joined #ruby
nanoz has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
adgtl has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
kalopsian has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
ziyadb has joined #ruby
dionysus69 has joined #ruby
kalopsian has joined #ruby
darkf has joined #ruby
LemonSkunk has joined #ruby
ICantCook has quit [Quit: bye]
arlek has quit [Ping timeout: 240 seconds]
ICantCook has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ICantCook has quit [Client Quit]
tildes has joined #ruby
bklane has quit [Read error: Connection reset by peer]
russt has quit [Ping timeout: 260 seconds]
asccigcc has quit [Quit: asccigcc]
LemonSkunk has left #ruby [#ruby]
shmoon has joined #ruby
<shmoon>
what do people use for automated web/mobile UI testing ?
arthropododo has quit [Quit: Leaving]
<Ox0dea>
"The human eye is an organ that reacts to light and has several purposes."
<baweaver>
depends what frameworks I'm using. Typically some combination of Jasmine, Capybara, or Karma
<baweaver>
then again I work on a JS/Angular frontend so your mileage may vary.
bklane has joined #ruby
<baweaver>
also note that integration tests are very brittle
sulky has quit [Ping timeout: 250 seconds]
<baweaver>
focus on unit testing as much as possible, and only have a few integration. You find out very quickly what diminishing returns and the halting problem are otherwise.
kalopsian has quit [Ping timeout: 250 seconds]
<shmoon>
I've used Jasmine for writing unit tests for my frontend JS code
<shmoon>
I've heard of capybara but never used it, does it test like a user ? I mean open a browser then open the website in it then fill forms, etc.
<baweaver>
that's what it was.
Maxed has joined #ruby
<baweaver>
something like that
<shmoon>
protractor ?
sandstrom has quit [Quit: My computer has gone to sleep.]
<baweaver>
angular's integration test runner.
<shmoon>
well by integration if you mean something like the UI testing ,then shouldn't it be there for atleast all the forms that I have ?
<baweaver>
runs off of selenium webdriver.
<shmoon>
ok
<baweaver>
why bother?
<baweaver>
do you test the data is valid on the backend?
<shmoon>
yeah, validations are there
<baweaver>
then unit test validations on the front end and you're golden
sandstrom has joined #ruby
<shmoon>
oh yeah I think backend + frontend unit tests would cover most of it. We only do backend unit testing, not frontend yet.
<baweaver>
focus on covering everything unit-wise first.
mfb2 has quit [Ping timeout: 276 seconds]
<baweaver>
integration only when you have a workflow that absolutely must work a certain way that's not coverable with only unit tests.
<baweaver>
the more towards integration, the more brittle and the more work to maintain them
<shmoon>
makes sense tbh
<baweaver>
that being said, I do have integration tests in my app at $WORK
UtkarshRay has joined #ruby
<baweaver>
because external APIs need to be tested from end to end to make sure it works
<baweaver>
which in this case is deploying a server on AWS.
<shmoon>
gotcha
<baweaver>
so in that case, we're screwed if a server doesn't deploy right and a unit test isn't going to make sure that chef likes our data all the way.
Maxed has quit []
<baweaver>
it's more of a sanity check of making sure everything in the pipeline works, not only our app.
zast has quit [Ping timeout: 240 seconds]
<baweaver>
maybe someone updated the OS, maybe a new package is present, who knows. That's what that's meant to catch if that makes any sense.
kalopsian has joined #ruby
<shmoon>
yeah
<baweaver>
I fear having to make changes to that beast though :P
<shmoon>
haha
<baweaver>
also probably not good to cross-post between here and rails
<baweaver>
just for future reference.
last_staff has joined #ruby
<shmoon>
I posted here first, then thought since I'm coding rails maybe ask there too.
jcdesimp has joined #ruby
<baweaver>
I figured about as much, not a big deal.
<shmoon>
no one answered there, but got some good ideas here :D
<baweaver>
I'm on both
abra0 has joined #ruby
<baweaver>
I just figured I'd answer here since I already saw it
jottr_ has joined #ruby
<shmoon>
:)
rtail has quit [Quit: Later]
kalopsian has quit [Ping timeout: 245 seconds]
chancy has quit [Remote host closed the connection]
djbkd_ has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
Darmani has joined #ruby
<Darmani>
Hey guys
<Darmani>
Quick question
oivoodoo has joined #ruby
<baweaver>
Slow answer
sandstrom has quit [Quit: My computer has gone to sleep.]
<Darmani>
noob question actually lol
<baweaver>
1337 answer
<Darmani>
How do you make a hash where the values are increment counters?
scottschecter has quit [Ping timeout: 240 seconds]
<ruby[bot]>
zhkirill: # => undefined local variable or method `text' for main:Object ...check link for more (https://eval.in/507375)
<zhkirill>
Right, just use each_with_object method
<baweaver>
text is undefined
<zhkirill>
Don't look at my code :) Yours is correct.
<Darmani>
Lol... I need to study those... You linked a few different methods with a block.
<baweaver>
which surprises me slightly, a tinge tipsy
<zhkirill>
The last one by @baweaver is correct
<Darmani>
I'm a beginner baweaver Q.Q you need to speak Ruby slowly to me lol
<Darmani>
Can't be talking that fast talk xD
<baweaver>
r
<baweaver>
u
<baweaver>
b
<baweaver>
y
ur5us has joined #ruby
<Darmani>
lulz
<baweaver>
learn map, reduce, and select.
hannelita has quit [Ping timeout: 245 seconds]
tildes has quit [Ping timeout: 272 seconds]
<Darmani>
But I know those already o.o
<baweaver>
ah, good.
<baweaver>
now try and implement map and select using reduce
<baweaver>
then combine them into one function
<Darmani>
O.O to make my hash?
usershel_ has joined #ruby
<baweaver>
na, just in general, a generic function
<Darmani>
or you mean in a different script entirely?
<Darmani>
oh okay
usershell has quit [Ping timeout: 256 seconds]
<Darmani>
jesus that sounds hard...
<baweaver>
exactly
<Darmani>
Lol
<baweaver>
it's a question I occasionally ask in interviews.
djbkd_ has joined #ruby
<Darmani>
wonderful.
<Darmani>
They must love you.
<baweaver>
it involves passing blocks to functions, yield and other such things
<baweaver>
just don't be the person who writes Haskell on your resume
sigurding has joined #ruby
<Darmani>
I don't even know what that is. Lol
<baweaver>
otherwise I have special questions :D
kalopsian has quit [Ping timeout: 240 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
<Darmani>
man I went to an interview the other day
beast has joined #ruby
<Darmani>
And this guy asked me...
<baweaver>
If I notice an obscure or lesser-used language I'll ask someone about it.
<Darmani>
What do you like most about yourself?
<Darmani>
Whats your greatest weakness?
<Darmani>
jesus christ I almost walked out right there.
<baweaver>
don't humblebrag that one
<Darmani>
Please tell me you don't ask those.
sandstrom has quit [Quit: My computer has gone to sleep.]
<baweaver>
No
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zhkirill>
I "know" Haskell
ur5us has quit [Ping timeout: 272 seconds]
<zhkirill>
baweaver what's your question about Haskell? :D
<baweaver>
explain to me what a monad is
ellistaa has quit [Quit: ellistaa]
<baweaver>
and then show me how to implement one.
<Darmani>
baweaver - By the way, I can't even think of a function that would ever need reduce,map, & select. I mean... Can you give me an idea of what the function should be??
<zhkirill>
baweaver never mind.
<Darmani>
LOL
<Darmani>
that's funny.
kalopsian has joined #ruby
sandstrom has joined #ruby
<zhkirill>
baweaver what did you mean by "then combine them into one function"?
<baweaver>
one of my new favorites is make an anagram finder, and lead it into a scrabble solver.
<baweaver>
map_select
SOLDIERz has joined #ruby
lyoshajapan has joined #ruby
<baweaver>
only maps over values that map returns something non-falsy
<zhkirill>
Oh, I see.
<zhkirill>
Should be easy...
<baweaver>
so: (1..5).map_select { |v| v.even? && v * 2 } # returns: [4,8]
<zhkirill>
I've never tried to implement map and select using reduce though.
oivoodoo has quit [Remote host closed the connection]
<baweaver>
it's an interesting thought exercise if nothing else.
<zhkirill>
Should map_select be O(n)?
<baweaver>
yep
<zhkirill>
So technically I am not using both map and select?
<baweaver>
yep
<zhkirill>
Let me try :)
<baweaver>
speaking of interviews, I have two this week I suppose.
aufi has joined #ruby
Abrin has quit [Ping timeout: 256 seconds]
lacuna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani>
baweaver - HA
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani>
I did it.
<Darmani>
It's probably not what you are looking for though lol
<Ox0dea>
Don't focus on the specifics of whatever whoever was doing with a reduction over a Hash up there.
kalopsian has joined #ruby
krz has quit [Ping timeout: 245 seconds]
<Ox0dea>
Take time to really try to grok the core concept of #reduce.
BSaboia has joined #ruby
aganov has joined #ruby
<Ox0dea>
It really does perform a very simple but extremely elegant operation, broadly applicable to pretty much any problem domain.
<Ox0dea>
Oh, sorry. Do be mindful that #p returns its argument(s).
<Darmani>
Ox0dea - No worries, I knew that.
sandstrom has quit [Quit: My computer has gone to sleep.]
<Darmani>
Ox0dea - I think the general concepts are easy to understand. But using them in real applications and knowing when to use them is what really puzzles me.
<Darmani>
Like I would have never thought to use "reduce" to make the word counter.
<Ox0dea>
But how come not?
<Ox0dea>
You want to take a collection and reduce it down to a single value.
<Ox0dea>
I guess it's maybe the considering a Hash to be a "single value" that's tripping you up?
<Darmani>
What do you mean the Hash is a single value?
<Ox0dea>
A Hash is *a* collection of *many* key-value pairs.
CloCkWeRX has quit [Quit: Leaving.]
CloCkWeRX has joined #ruby
<Darmani>
You mean like how an array is one "value" persay?
kalopsian has quit [Ping timeout: 256 seconds]
<Ox0dea>
Yeah. Maybe better to use "object" in place of "value" here.
<Darmani>
Or one "collection" might be a better term.
<Ox0dea>
Right, Hash and Array are both collection types.
<Ox0dea>
And everything nests.
sandstrom has joined #ruby
<Darmani>
Ox0dea - Right... okay..
<baweaver>
reduce is basically recursion in loop form anyways
<baweaver>
well, tail recursion.
<Darmani>
Could you make a loop that returns a hash in the same form?
<Darmani>
without "reduce"?
<baweaver>
give it a try
<shevy>
reduce works dam well!
CloCkWeRX has quit [Ping timeout: 250 seconds]
dopie has quit [Quit: Lost terminal]
<Darmani>
p 'some words and stuff and other stuff'.split.each_with_object(Hash.new(0)){|w,a| a[w]+=1 } <--- This doesn't seem like a loop. Does this work on a different principal then?
dopie has joined #ruby
<baweaver>
nope, same thing
<baweaver>
what does each do?
<Darmani>
But where is the loop?
<Darmani>
each iterates through the collection...
mdw has joined #ruby
<Ox0dea>
That's the loop.
<baweaver>
which is the equivalent of a for loop in ways.
<Darmani>
I didn't know those were considered loops...
<Ox0dea>
It's literally a for loop spelled sexier.
<Darmani>
If "each" and "map" both yield to the block then why is there a "map" method at all? Why doesn't each work for the same purpose?
<Darmani>
I mean if it just obeys the block what's the difference?
<Ox0dea>
#map is defined in terms of #each.
<Ox0dea>
They do different things with the block.
<Ox0dea>
#each just yields them, #map takes them and does a transformation.
ponga has quit [Quit: Leaving...]
sandstrom has joined #ruby
<Darmani>
oh.
<djellemah>
Darmani: map remembers each return value from your block and gives you back that collection.
CloCkWeRX has joined #ruby
symm- has joined #ruby
<Ox0dea>
`[1,2,3].each { 42 }` just walks over the collection, sees a 42, goes "oh, cool", and keeps on truckin'.
usershell has joined #ruby
djbkd_ has quit [Remote host closed the connection]
<Ox0dea>
What does #map do?
<Darmani>
So... Each is like me on the side of the road with my thumb up waiting for someone to give me a ride... and map is like me calling an Uber to take me where I have to go.
hannelita has quit [Ping timeout: 245 seconds]
dopie has joined #ruby
<Ox0dea>
¯\_(ツ)_/¯
<Darmani>
I like to think of it that way.
kalopsian has quit [Ping timeout: 240 seconds]
<Darmani>
and reduce is that really weird cousin I know nothing about but he seems really useful. I mean I know his name and people like him I just don't know him very well you know?
<zhkirill>
Ok.
<Darmani>
zhkirill - I'm kiddingg xP
<zhkirill>
Great! I thought I am not gonna sleep tonight.
symm- has quit [Ping timeout: 264 seconds]
<Darmani>
Lol funny.
TheRokh has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
adgtl has quit [Remote host closed the connection]
aryaching has joined #ruby
adgtl has joined #ruby
TheRokh has quit [Ping timeout: 276 seconds]
skofo has quit [Ping timeout: 240 seconds]
dopie has quit [Quit: Lost terminal]
dopie has joined #ruby
colegatron has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
mayamai has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
yardenbar has joined #ruby
mdw has quit [Ping timeout: 245 seconds]
iamayam has joined #ruby
DirtyFinn has joined #ruby
andikr has joined #ruby
dh64 has quit [Quit: Konversation terminated!]
toretore has joined #ruby
krz has joined #ruby
singleton_method has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
juddey has quit [Ping timeout: 264 seconds]
lDoran has joined #ruby
Xeago has joined #ruby
kalopsian has joined #ruby
vondruch has joined #ruby
astrobun_ has joined #ruby
amclain has quit [Quit: Leaving]
TomyWork has joined #ruby
mfb2 has joined #ruby
ur5us has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
kalopsian has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
Burgestrand has joined #ruby
codecop has joined #ruby
usershell has quit [Remote host closed the connection]
jcdesimp has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
jcdesimp has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
joncol has quit [Quit: leaving]
bronson has joined #ruby
lyoshajapan has joined #ruby
jas02 has joined #ruby
adgtl has quit [Remote host closed the connection]
arlek has joined #ruby
adgtl has joined #ruby
futilegames has joined #ruby
crazydiamond has joined #ruby
howdoi has joined #ruby
adgtl has quit [Remote host closed the connection]
ohaibbq has quit [Quit: Leaving...]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 265 seconds]
adgtl has joined #ruby
SCHAAP137 has joined #ruby
antgel has joined #ruby
jcdesimp has quit [Remote host closed the connection]
kristian_on_linu has joined #ruby
<kristian_on_linu>
hi
sandstro_ has joined #ruby
jbrhbr has joined #ruby
jottr_ has joined #ruby
<kristian_on_linu>
there seems to be a bug in the RVM install script ... it says "RVM sourcing line found in /home/kristian/.profile /home/kristian/.bashrc /home/kristian/.bash_profile /home/kristian/.zlogin" even though these instances are commented out
<apeiros>
maybe it considers commented out still as present, and respects your commenting out
usershell has joined #ruby
jas02 has quit [Quit: jas02]
<Ox0dea>
kristian_on_linu: Have you logged out and back in since commenting them?
Ebok has joined #ruby
<Ox0dea>
.bash_profile and .zlogin are only read once.
<kristian_on_linu>
Ox0dea: no
srenatus has joined #ruby
<kristian_on_linu>
apeiros: but when commented out it is not a "sourcing line" ... it is just a comment
sandstrom has quit [Ping timeout: 264 seconds]
<apeiros>
kristian_on_linu: it's still in there and I'd assume commenting out is deliberate. it might do a better job and tell you that it found them, but that they're deactivated.
<apeiros>
at least if I wrote rvm, I'd actually assume that if I find the line and it is commented out, then that's what you want, and that you don't want me to de-comment the line.
<apeiros>
so IMO the behavior is sensible. but the message might be improved.
jottr_ has quit [Ping timeout: 256 seconds]
sandstro_ has quit [Quit: My computer has gone to sleep.]
<kristian_on_linu>
apeiros: the behavior is okay, the wording could be improved
jas02 has joined #ruby
<apeiros>
we agree then ;-)
<apeiros>
report it as a bug?
<apeiros>
or even better, make a PR?
sandstrom has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
dEPy has quit [Quit: (null)]
txrx has joined #ruby
<kristian_on_linu>
I just wrote them on #rvm, let's see what happens
einarj has joined #ruby
stannard has joined #ruby
firstdayonthejob has quit [Ping timeout: 272 seconds]
futilegames has quit [Quit: futilegames]
CloCkWeRX has quit [Quit: Leaving.]
adgtl has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 265 seconds]
mdw has joined #ruby
mark1 has joined #ruby
adgtl has joined #ruby
rgtk has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
<kristian_on_linu>
inukshuk: what version of jekyll are you using?
axsuul has quit [Ping timeout: 265 seconds]
shredding has joined #ruby
lDoran has quit [Quit: Leaving]
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
burbus has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
ta has joined #ruby
blur3d has joined #ruby
futilegames has joined #ruby
usershell has quit [Remote host closed the connection]
<konsolebox>
Ox0dea: the code you wrote earlier has a little issue: the inherited class gets to set the default values instead: https://eval.in/507420
<Ox0dea>
Which I suppose is how it should've been to begin with.
hannelita has joined #ruby
ur5us has quit [Remote host closed the connection]
zenlot2 is now known as zenlot
ziyadb has joined #ruby
<konsolebox>
Ox0dea: thought about that, but the real initialize() gets called before the attributes gets initialized.
last_staff1 has joined #ruby
kalopsian has joined #ruby
last_staff1 has quit [Client Quit]
<Ox0dea>
konsolebox: But, well, it's gotta be one or the other, yeah?
joonty has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
axsuul has joined #ruby
burbus has joined #ruby
rodfersou has joined #ruby
<Diabolik>
hi all
<konsolebox>
Ox0dea: i actually made a modification, but i still don't feel like using it: https://eval.in/507425
<zhkirill>
hi
<Ox0dea>
konsolebox: Good heavens!
<konsolebox>
Ox0dea: i mean, i don't feel like it's worth prepending modules just for it. i'd rather just manually initialize the attributes.
last_staff has quit [Ping timeout: 250 seconds]
arlek has quit [Ping timeout: 250 seconds]
user has joined #ruby
<mikecmpbll>
when rsync runs, it connects to the remote server and initiates a process on that server and communicates directly with it (as i understand it from https://rsync.samba.org/how-rsync-works.html)
<mikecmpbll>
how would one approach something similar with ruby?
<mikecmpbll>
thus far i've implemented it using net/ssh and serialising to STDOUT
kalopsian has quit [Ping timeout: 260 seconds]
blaxter has joined #ruby
<mikecmpbll>
feel as though i'm missing a trick though
huyderman has joined #ruby
drptbl has joined #ruby
<mikecmpbll>
"When Rsync communicates with a remote non-daemon server via a remote shell the startup method is to fork the remote shell which will start an Rsync server on the remote system" — i don't really know what it means by "fork the remote shell" to be honest.
bweston92 has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
kirillzh has joined #ruby
futilegames has joined #ruby
mdw has joined #ruby
bweston92 has joined #ruby
<kirillzh>
lyoshajapan has quit [Remote host closed the connection]
craigp has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
Xeago has joined #ruby
futilegames has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
montagne_goat has joined #ruby
jbrhbr has quit [Quit: Leaving.]
craigp has joined #ruby
Nahra``` has joined #ruby
nerium has joined #ruby
user has quit [Ping timeout: 276 seconds]
Jackneill has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
usershell has quit [Remote host closed the connection]
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
baweaver has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
araujo has joined #ruby
user has joined #ruby
Burgestrand has joined #ruby
nettoweb has joined #ruby
chouhoulis has joined #ruby
blur3d has quit [Quit: blur3d]
araujo has quit [Max SendQ exceeded]
Kryptonical has quit [Read error: Connection reset by peer]
Kryptonical has joined #ruby
mondok has joined #ruby
araujo has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nettoweb>
hello guys, I crated a method some year ago, as passed parameters like this: method(name = nil, age=nil, hair=nil,interest=nil) but now it's too bmuch parameters and when calling the parameter I had to do something like this method("John",nil,nil,'tennis',nil,nil) and so long
<nettoweb>
is there a easy way to work with parameters?
adgtl has quit [Remote host closed the connection]
araujo has quit [Max SendQ exceeded]
<ddv>
nettoweb: keyword args
<nettoweb>
I order to pass just the data I have, for example: method("John",'tennis') and ruby find out that tennis is related to 'interests'
Xeago has quit [Remote host closed the connection]
<ddv>
or the splat operator
<mikecmpbll>
probably just pass a hash of attributes and attribute names. even with keyword args you'll end up with a massive list of args
marr has joined #ruby
araujo has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 250 seconds]
araujo has quit [Max SendQ exceeded]
jaiks has joined #ruby
<nettoweb>
ddv but in my method I have to list all the keywords there, right?
<mikecmpbll>
no, the atts are what you pass to the method
mdw has joined #ruby
<serard>
I'm trying to add sinatra cors to mailcatcher webserver, but I'm not a ruby dev, and don't know exactly what to do
<serard>
I have git clone, bundle install, rake package after adding the gem line
tulak has joined #ruby
gbgdev has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
gbgdev_ has joined #ruby
gbgdev has quit [Read error: Connection reset by peer]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gbgdev_ has quit [Remote host closed the connection]
mark1 has quit [Remote host closed the connection]
mark1 has joined #ruby
jottr_ has joined #ruby
tubuliferous_ has joined #ruby
Xeago has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
the_drow_ has joined #ruby
PedramT has joined #ruby
astrobun_ has quit [Remote host closed the connection]
the_drow has quit [Ping timeout: 252 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
drptbl has joined #ruby
hannelita has joined #ruby
araujo has joined #ruby
BSaboia has quit [Ping timeout: 250 seconds]
araujo has quit [Max SendQ exceeded]
IronD has quit [Ping timeout: 272 seconds]
<nettoweb>
mikecmpbll so in the method definition I dont need to list all names there?
<nettoweb>
just method(args)?
<mikecmpbll>
nettoweb: correct.
kalopsian has joined #ruby
araujo has joined #ruby
Xeago has joined #ruby
<nettoweb>
hmm ok. And lemme know if it's possible. I have a custom form which whe is submitted I call this method which create a user, is it possible to set a custom validarion message in this method and the message appear in the first form? I dont know if you got the idea
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hannelita has quit [Ping timeout: 245 seconds]
<mikecmpbll>
sure.
<nettoweb>
because in my app one lead could turn into a user in many ways.
<nettoweb>
mikecmpbll hmm so in my method I set an exception and in the current controller I treat this exception? that's the way? If not, do you know something I can learn more how to achieve this? I dont know exactly how t search for this kinda of way
sandstrom has joined #ruby
solocshaw has joined #ruby
<mikecmpbll>
you'll want to encapsulate it in an object, and store the error information on the object.
kalopsian has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 264 seconds]
<blackms>
is there a way to specify a gem requirement with a path for development and without it for "production"
<mikecmpbll>
blackms : in a Gemfile?
<blackms>
Gemfile or in the gemspec
<blackms>
actually I'm using the gemfile to define the requirements
<apeiros>
serard: usually: go into the repo, run `gem build *.gemspec` and then `gem install *.gem`
ldnunes has joined #ruby
<apeiros>
serard: sometimes the project has a rake task to do more or less that. often if there's additional steps necessary.
<flaker>
Question regarding Ruby on OSX … I just downloaded latest ruby using homebrew… it placed it in /usr/local/Cellar
<apeiros>
to check for that, run `rake -T` and see
<flaker>
using rvm list I just see the default 1.9 one with my OSX/Mountain Lion
jcdesimp has joined #ruby
<flaker>
and another one under rvm/gems
<apeiros>
flaker: uh, use either rvm or homebrew, not both.
<flaker>
Ok - so how do I install latest ruby using rvm ?
<apeiros>
rvm install ruby-2.3.0
<apeiros>
potentially `rvm get stable` first
<flaker>
thanks apeiros
<flaker>
much appreciated
<apeiros>
yw
<flaker>
Do I need rails to install compass for SASS ?
<ljarvis>
no
<flaker>
just ruby ?
<Ox0dea>
And a de-plenker.
<nettoweb>
mikecmpbll my method was inside class ApplicationController < ActionController::Base, I can create a class inside this application_controller.rb?
Bloomer has quit [Remote host closed the connection]
mondok has quit [Ping timeout: 276 seconds]
chriscoffee has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chriscoffee has quit [Max SendQ exceeded]
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
platzhirsch has joined #ruby
stannard has joined #ruby
<serard>
apeiros, thank you ! I can gem build && gem install ./... && then execute bin/my_bin but it looks like the code is not changed : I don't see expected changes :)
the_drow_ has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
evidex has joined #ruby
dcunit3d has joined #ruby
last_staff has quit [Quit: last_staff]
last_staff has joined #ruby
<apeiros>
you bin/my_bin and not just my_bin? after all, you just installed it? :)
gbgdev has joined #ruby
<apeiros>
since I have to go in a minute, I can't help you figuring out wether it's loading your changes or not and if not, why it doesn't.
<apeiros>
but a quick tip: to just test changes you can have it easier: ruby -Ilib bin/my_bin
<apeiros>
note: that's capital-i, not lowercase-L
hannelita has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 256 seconds]
gbgdev_ has joined #ruby
gbgdev has quit [Read error: Connection reset by peer]
<nettoweb>
mikecmpbll I start playing with your code and I've already came accross an error: NameError (undefined local variable or method `session' for #<Whatever:0x007fec64a94040>):
dcunit3d has quit [Client Quit]
<nettoweb>
so I have to inherit something form tuby, right?
<nettoweb>
ruby
Snowy has quit [Remote host closed the connection]
dcunit3d has joined #ruby
IronD has joined #ruby
mdw has quit [Ping timeout: 240 seconds]
<mikecmpbll>
nettoweb: *shrugs* the code is a bit of a mess, i haven't got time to help you straighten it all out.
sergey_makagon has joined #ruby
TomyWork has quit [Quit: Leaving]
TomyWork has joined #ruby
<mikecmpbll>
you should separate your controller stuff (setting session variables, cookies, etc) from the domain logic
<ruby[bot]>
serard: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<serard>
Oops, sorry
sandstrom has quit [Quit: My computer has gone to sleep.]
nerium has joined #ruby
hannelita has joined #ruby
krz has quit [Ping timeout: 276 seconds]
pandaant has joined #ruby
<nettoweb>
mikecmpbll that's because in this class I check wether the user is already in the database or not. In that case I thought the best place to check this was inside this class but now I'll rethink all this
peteyg_ has quit [Read error: Connection reset by peer]
kalopsian has joined #ruby
peteyg has joined #ruby
montagne_goat has quit [Quit: Leaving...]
<Zarthus>
I don't think I fully understand what's happening there
<Zarthus>
but the error message definitely includes a \n
<Ox0dea>
No error.
<Ox0dea>
That's its value.
<Zarthus>
`$\n' is not allowed as a global variable name
<Zarthus>
when you just type $ to inspect its value
<Ox0dea>
It's double evaluating it or something?
<Zarthus>
>> $
<ruby[bot]>
Zarthus: # => /tmp/execpad-5dff2f1baa3a/source-5dff2f1baa3a:2: `$' without identifiers is not allowed as a global ...check link for more (https://eval.in/507465)
<Zarthus>
maybe
<Zarthus>
doesn't seem to reproduce there, just in irb
tvw has joined #ruby
bigkevmcd has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
dlitvak_ has joined #ruby
dlitvak__ has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalopsian has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 272 seconds]
FooMunki has joined #ruby
gregf_ has quit [Quit: leaving]
usershell has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 250 seconds]
gregf_ has joined #ruby
sftrabbit has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
AlexJakeGreen has joined #ruby
colegatron has quit [Ping timeout: 265 seconds]
aryaching has quit [Ping timeout: 272 seconds]
the_drow has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xet7 has joined #ruby
txrx has quit [Ping timeout: 250 seconds]
usershell has joined #ruby
astrofog has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
countryHick has joined #ruby
stannard has joined #ruby
colegatron has joined #ruby
dlitvak__ has quit [Ping timeout: 265 seconds]
the_drow has quit [Ping timeout: 252 seconds]
krobzaur_ has quit [Ping timeout: 272 seconds]
stannard has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
shellie has quit [Ping timeout: 276 seconds]
sigurding has quit [Quit: sigurding]
mdw has quit [Ping timeout: 256 seconds]
hlegius has joined #ruby
mdw has joined #ruby
rdark has quit [Quit: WeeChat 1.0.1]
Sebastia1Thorn is now known as SebastianThorn
hannelita has quit [Remote host closed the connection]
Xeago has joined #ruby
dionysus69 has joined #ruby
sigurding has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
jespada has joined #ruby
Zggb has quit [Quit: Connection closed for inactivity]
jespada has quit [Client Quit]
astrofog has quit [Quit: Quite]
dlitvak_ has joined #ruby
nerium has quit [Quit: nerium]
hannelita has joined #ruby
Xeago has quit [Remote host closed the connection]
user has quit [Ping timeout: 240 seconds]
konsolebox has quit [Quit: Leaving]
dlitvak has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
ebbflowgo has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
kalopsian has joined #ruby
Tomasso has joined #ruby
jottr_ is now known as jottr
krobzaur_ has joined #ruby
adgtl has joined #ruby
mfb2 has joined #ruby
<Tomasso>
im runnning my batch process, but at some point I just get the message "Killed". It seems to be using many reasources, is there some tool to be able to detect where the bottleneck is or what variables are involved?
dwfait has joined #ruby
sftrabbit has joined #ruby
sandstrom has joined #ruby
drptbl has joined #ruby
kalopsian has quit [Ping timeout: 245 seconds]
zapata has quit [Quit: WeeChat 1.3]
mfb2 has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
adgtl has quit [Remote host closed the connection]
ebbflowgo has quit [Quit: ebbflowgo]
baweaver has joined #ruby
Xeago has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
mody1350 has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
<AlexJakeGreen>
Tomasso, if the process was killed by linux kernel then appropriate message should be in 'dmesg' output.
Burgestrand has joined #ruby
MODY1350_ has joined #ruby
jcdesimp has joined #ruby
<MODY1350_>
hi
<DefV>
probably (but I'm in guessing-teritory) out of memory got it killed Tomasso
PedramT has quit [Ping timeout: 265 seconds]
mody1350 has quit [Ping timeout: 252 seconds]
jcdesimp has quit [Ping timeout: 260 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
<Tomasso>
AlexJakeGreen: yes, was killed by the kernel.. .but its not that much memory compared to other processes... "Killed process 25086 (ruby) total-vm:440736kB, anon-rss:207840kB, file-rss:0kB"
PedramT has joined #ruby
MODY1350_ has quit [Ping timeout: 252 seconds]
<Tomasso>
well.. looks like bit more.. my mysql has 198000kb
<Tomasso>
but this server is empty.... has almost nothing... may be i should increase its priority ?>
ljames has quit []
Trynemjoel has joined #ruby
Guest74617 is now known as beagles
PedramT_ has joined #ruby
PedramT_ has quit [Remote host closed the connection]
PedramT_ has joined #ruby
CloCkWeRX has joined #ruby
PedramT_ has quit [Remote host closed the connection]
txrx has joined #ruby
PedramT has quit [Ping timeout: 276 seconds]
sdothum has joined #ruby
sepp2k has joined #ruby
<AlexJakeGreen>
Tomasso, a fast but dirty way is to add some swap to get more memory. If your script is a parser of smth like parser, then it is better to refactor the script so it will process the data by small chunks
jcdesimp has joined #ruby
PedramT has joined #ruby
rsc___ has quit [Quit: rsc___]
Trynemjoel has quit [Ping timeout: 250 seconds]
<Tomasso>
it basically gets a nasdaq symbol... downloads its history, do some operatiion and saves to my mongo database... but don't understand what remains in memory.. I enabled garbage collection... i set variables to nil when dont use them... :S
dlitvak_ has joined #ruby
Trynemjoel has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Ping timeout: 245 seconds]
rubyonrails287 has joined #ruby
dlitvak has quit [Ping timeout: 265 seconds]
tubuliferous_ has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
zapata has joined #ruby
<ddv>
Tomasso: you should be able to figure out what process got the highest score and got killed, this is the process that used the most memory
UtkarshRay has quit [Ping timeout: 260 seconds]
<ddv>
Tomasso: if this is ruby you should check for memory leaks or otherwise figure out why your program is using so much memory
shellie has joined #ruby
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
oivoodoo has joined #ruby
chouhoulis has quit [Ping timeout: 245 seconds]
UtkarshRay has joined #ruby
jcdesimp has quit [Remote host closed the connection]
UtkarshRay has quit [Max SendQ exceeded]
Trynemjoel has quit [Ping timeout: 264 seconds]
Shaboum has joined #ruby
Trynemjoel has joined #ruby
solars has joined #ruby
krz has joined #ruby
Musashi007 has joined #ruby
Musashi007 has quit [Client Quit]
Sp3ct3r_2k11 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
UtkarshRay has joined #ruby
CloCkWeRX has joined #ruby
txrx has quit [Read error: Connection reset by peer]
krobzaur_ has quit [Ping timeout: 250 seconds]
rsc___ has joined #ruby
rsc___ has quit [Client Quit]
rsc___ has joined #ruby
UtkarshRay has quit [Ping timeout: 250 seconds]
bnt has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
chridal has quit [Ping timeout: 240 seconds]
chridal has joined #ruby
kalopsian has joined #ruby
minimalism has joined #ruby
<serard>
Re
<serard>
When I run gem build .gemspec I get a mailcatcher-0.6.3.pre.CORS.gem, why is there a ".pre." appended and how do I remove it ? :)
dionysus69 has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
dionysus69 has joined #ruby
sgambino has joined #ruby
lxsameer has quit [Quit: Leaving]
pdoherty has joined #ruby
axsuul has joined #ruby
<chrisarcand>
serard: What is the version assigned to in your .gemspec file?
<serard>
It imports a version.rb file to import its const : s.version = MailCatcher::VERSION
kalopsian has quit [Ping timeout: 265 seconds]
<chrisarcand>
Ok, what's VERSION then?
chridal has quit [Ping timeout: 250 seconds]
<serard>
"0.6.3-CORS"
<serard>
(sorry :) )
Biopandemic2 has quit [Remote host closed the connection]
<chrisarcand>
I believe any version with a letter in it will have 'pre' appended to it by Bundler.
<serard>
Ah, ok :)
<serard>
I accept this, then
dlitvak has joined #ruby
stannard has joined #ruby
krz has quit [Ping timeout: 260 seconds]
chridal has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
ympeg_ has quit [Ping timeout: 245 seconds]
ympeg has quit [Ping timeout: 245 seconds]
dlitvak_ has quit [Ping timeout: 272 seconds]
oivoodoo has quit [Remote host closed the connection]
PedramT has quit [Ping timeout: 260 seconds]
oivoodoo has joined #ruby
Tomasso has quit [Ping timeout: 252 seconds]
shanemcd has joined #ruby
bnt has quit [Quit: Leaving]
<bonhoeffer>
is there a ruby library to record system audio?
chridal has quit [Ping timeout: 264 seconds]
fgro has joined #ruby
<fgro>
hi. when trying to install mysql gem (building native extensions) ... make cannot find "mkdir" command (looks for /usr/bin/mkdir, but its actually in /bin/mkdir). How to resolve this? (this is gentoo)
sftrabbit has quit [Quit: sftrabbit]
chridal has joined #ruby
chridal has quit [Changing host]
chridal has joined #ruby
sftrabbit has joined #ruby
<soahccc>
bonhoeffer: I'm not sure but I would think it is OS depended.
<bonhoeffer>
sure -- but in python pyaudio accounts for that in how you configure it
adgtl has joined #ruby
<Burgestrand>
bonhoeffer not AFAIK, back when I wanted to play audio back I had to write my own bindings to OpenAL to do these things.
<bonhoeffer>
got it -- i might want to use c anyway -- to be close to the h/w and not get caught in a racing condition with the buffer
<Burgestrand>
bonhoeffer there were like 3 ruby libraries with sound capabilities, all of them more or less abandoned. It's possible there's a new player in town, so rubygems could have some candy for you.
<AlexJakeGreen>
fgro, I've never seen this before on gentoo, but I use mysql2 gem installed via rvm without problems. I don't use gems provided by portage
<bonhoeffer>
yeah -- all the implementations i saw weren't actively maintained
<Burgestrand>
For me Ruby was fast enough to play/record fast enough even on a shitty little raspberry pi, so you don't necessary need to go C, but you might want to anyway because there are no nice bindings for Ruby AFAIK. :(
<fgro>
AlexJakeGreen: this will also fail when I try bundle install in the rvm gemset.
<fgro>
AlexJakeGreen: what the location of your mkdir? why in my case is it wrongly set when creating the make.conf?
solocshaw has quit [Ping timeout: 265 seconds]
<AlexJakeGreen>
fgro, /bin/mkdir
<fgro>
AlexJakeGreen: hmpf
<fgro>
AlexJakeGreen: any idea what I could try to resolv this?
<AlexJakeGreen>
fgro, fastest - create a symlink for mkdir
<fgro>
AlexJakeGreen: ok thats just a tmp fix though
<AlexJakeGreen>
fgro, but don't do this in production :)
gbgdev_ has quit [Remote host closed the connection]
dseitz has joined #ruby
adgtl_ has joined #ruby
GinoManWorks has joined #ruby
kalopsian has joined #ruby
oivoodoo has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
ramortegui has joined #ruby
oivoodoo_ has quit [Remote host closed the connection]
penne12 has joined #ruby
krz has joined #ruby
<AlexJakeGreen>
soahccc, no. just $ cd /usr/bin && ln -s /bin/mkdir - only to check if the gem can be installed and there is no any other issue. Sure, thish should not be used in prod envs
adgtl has quit [Ping timeout: 240 seconds]
<j416>
is there a nicer way to get the name of the key not found, than this?
<j416>
>> begin; {}.fetch(:foo); rescue KeyError => e; e.to_s.match(/key not found: (.*)/)[1] end
PedramT has quit [Remote host closed the connection]
Nahra``` has joined #ruby
hnagamin has joined #ruby
djcp has joined #ruby
lyoshajapan has quit [Ping timeout: 245 seconds]
M-Kodo has quit [Quit: node-irc says goodbye]
karmatr0n has joined #ruby
scripore has joined #ruby
futilegames has joined #ruby
Puffball_ has quit [Read error: Connection reset by peer]
Puffball has joined #ruby
whippythellama has joined #ruby
fgro has quit [Quit: leaving]
zeknox has joined #ruby
zotherstupidguy has joined #ruby
Abrin has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
go|dfish has joined #ruby
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
russt has joined #ruby
malconis has joined #ruby
brendan- has joined #ruby
usershell has quit [Remote host closed the connection]
TomPeed has joined #ruby
pdoherty has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
sftrabbit has quit [Quit: sftrabbit]
sergey_makagon has quit []
timanema has quit [Quit: leaving]
gbgdev has joined #ruby
arup_r has joined #ruby
nertzy2 has joined #ruby
Omilun1 has joined #ruby
<Omilun>
hello . i'm using Ruby with rbenv . when i use compass on gulp it say an error : http://dpaste.com/1294EJH
sftrabbit has joined #ruby
psf has joined #ruby
jlebrech has joined #ruby
floatingpoint has joined #ruby
hxegon has quit [Ping timeout: 250 seconds]
oivoodoo has quit [Remote host closed the connection]
<Omilun>
gem install compass
groteworld has joined #ruby
Xeago has joined #ruby
sftrabbit has quit [Client Quit]
oivoodoo has joined #ruby
jas02 has joined #ruby
Omilun1 has joined #ruby
stannard has joined #ruby
frem has joined #ruby
solars has quit [Ping timeout: 245 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Omilun1 has left #ruby [#ruby]
Nahra``` has quit [Ping timeout: 265 seconds]
dwfait has quit [Remote host closed the connection]
groteworld has quit [Changing host]
groteworld has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
jcdesimp has joined #ruby
dwfait has joined #ruby
oivoodoo has quit [Ping timeout: 256 seconds]
solars has joined #ruby
groteworld has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Omilun has quit [Ping timeout: 276 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oivoodoo has joined #ruby
craigp has joined #ruby
freerobby has joined #ruby
Burgestrand has joined #ruby
sulky has joined #ruby
jcdesimp has quit [Ping timeout: 276 seconds]
stannard_ has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
skade has quit [Read error: Connection reset by peer]
user has joined #ruby
babblebre has joined #ruby
skade has joined #ruby
kaleido has joined #ruby
grn has quit []
sftrabbit has joined #ruby
jas02 has quit [Ping timeout: 245 seconds]
dlitvak_ has quit [Ping timeout: 264 seconds]
newbie22 has joined #ruby
decoponio has joined #ruby
mfb2 has joined #ruby
s2013 has joined #ruby
shredding has quit [Ping timeout: 265 seconds]
nav_ has quit [Remote host closed the connection]
atomical has joined #ruby
bMalum has quit [Ping timeout: 245 seconds]
nav_ has joined #ruby
jas02 has joined #ruby
shanemcd has quit [Remote host closed the connection]
renancarvalho has joined #ruby
newdan has joined #ruby
oivoodoo has quit [Remote host closed the connection]
shanemcd has joined #ruby
oivoodoo has joined #ruby
mfb2 has quit [Remote host closed the connection]
bMalum has joined #ruby
atomical_ has joined #ruby
shellie has joined #ruby
govg has quit [Remote host closed the connection]
oivoodoo has quit [Ping timeout: 272 seconds]
saush has joined #ruby
atomical has quit [Ping timeout: 250 seconds]
tulak has quit [Ping timeout: 260 seconds]
snguyen has joined #ruby
<saush>
I created my own gem and I have a ruby file inside lib directory. Now I want to use it in my rails app. But I don't know how to access the methods from my gem in controller files?
chouhoulis has joined #ruby
melter has joined #ruby
snguyen has quit [Client Quit]
ta has quit [Remote host closed the connection]
shellie has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
Xeago has joined #ruby
shellie has joined #ruby
govg has joined #ruby
rodfersou is now known as rodfersou|lunch
Anothermoron has joined #ruby
mchu has joined #ruby
mfb2 has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
tjohnson has joined #ruby
jas02 has quit [Read error: Connection reset by peer]
truenito has joined #ruby
snguyen has joined #ruby
ponga has joined #ruby
chipotle has quit [Quit: cheerio]
oivoodoo has joined #ruby
<ponga>
as I can #rotate an Array, how can I achieve to rotate a hash in a likely way?
einarj has quit [Remote host closed the connection]
<saush>
I created my own gem and I have a ruby file inside lib directory. Now I want to use it in my rails app. But I don't know how to access the methods from my gem in controller files?
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak_ has joined #ruby
newbie22 has quit [Quit: Leaving]
<kedare>
Do you remember many years ago there was a small GUI in Tk to explore the "ri" content of the ruby setup, is it still there ?
iateadonut has quit [Quit: Leaving.]
shellie has quit [Ping timeout: 250 seconds]
oivoodoo has quit [Ping timeout: 276 seconds]
shanemcd has quit [Remote host closed the connection]
hannelita has quit [Remote host closed the connection]
<ponga>
workaround
<apeiros>
ponga: that's horribly inefficient :D
<ponga>
apeiros: I know, I did this sort of rotate around benchmark myself before
<apeiros>
but yeah, it'll work
<ponga>
and it was horribly slower too
<ponga>
but it looks easier on my eye
hannelita has joined #ruby
dudedudeman has joined #ruby
djcp has quit [Quit: WeeChat 1.0.1]
<apeiros>
you can always implement it as Hash#rotate, even easier on your eyes.
aegis3121 has quit [Ping timeout: 276 seconds]
<kedare>
lucasb: It starts but can't do anything more, to bad, maybe you know a good alternative ? (I know YARV for the gems and Dash/Zeal for stlib but I would like something where I could really explore and search in the whole RI/RDOC)
<ponga>
btw if A && B should be A true and B true , right?
<kedare>
%s/yarv/yard :)
<lucasb>
kedare: sorry, dunno any alternatives. I generate my rdoc HTML docs to view. I split the generation in core/ext/lib to be easier for me, but I think not everybody likes the darkfish output (me included :)
<ponga>
damn it, should have used 'and'
snguyen has quit [Read error: Connection reset by peer]
<kedare>
darkfish ?
<lucasb>
it's the standard rdoc html generator
<kedare>
Oh okay :)
<lucasb>
kedare: ah, you could also try sdoc
<lucasb>
sdoc generates html like the rails api
djcp has joined #ruby
atomical has joined #ruby
jas02 has joined #ruby
treaki_ has joined #ruby
jas02_ has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
railsForDaiz has joined #ruby
bMalum has quit [Ping timeout: 240 seconds]
atomical_ has quit [Ping timeout: 260 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
pdoherty has joined #ruby
oivoodoo has joined #ruby
Xeago has quit [Remote host closed the connection]
crowell has quit [Ping timeout: 256 seconds]
dudedudeman_ has joined #ruby
groteworld has joined #ruby
tomchapin has joined #ruby
bMalum has joined #ruby
jas02 has quit [Ping timeout: 240 seconds]
jas02_ is now known as jas02
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
renancarvalho1 has quit [Ping timeout: 250 seconds]
groteworld has joined #ruby
kies^ has joined #ruby
rakm has joined #ruby
themsay2 has joined #ruby
themsay2 has quit [Read error: Connection reset by peer]
themsay2 has joined #ruby
usershell has joined #ruby
dlitvak has joined #ruby
themsay has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
goodroot has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
Pupp3tm4st3r has quit [Remote host closed the connection]
ZerGabriel has joined #ruby
groteworld has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
oivoodoo has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 265 seconds]
psf has left #ruby [" "]
x77686d has joined #ruby
dave23 has joined #ruby
oivoodoo has joined #ruby
FooMunki has quit [Quit: FooMunki]
Sucks has joined #ruby
FooMunki has joined #ruby
groteworld has joined #ruby
railsForDaiz has quit [Ping timeout: 264 seconds]
truenito has quit [Quit: truenito]
truenito has joined #ruby
groteworld has quit [Max SendQ exceeded]
underplank has joined #ruby
cschneid_ has joined #ruby
truenito has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.3]
oivoodoo has quit [Ping timeout: 276 seconds]
triangles has quit [Quit: Leaving]
solars has quit [Ping timeout: 245 seconds]
themsay2 has quit [Quit: AtomicIRC: The nuclear option.]
psy_ has joined #ruby
futilegames has quit [Quit: futilegames]
TomyWork has quit [Ping timeout: 248 seconds]
themsay has joined #ruby
sftrabbit has joined #ruby
asccigcc has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
ponga has quit [Quit: Leaving...]
zast has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
renancarvalho has left #ruby [#ruby]
davedev24 has joined #ruby
codecop has quit [Remote host closed the connection]
yardenbar has joined #ruby
baweaver has joined #ruby
rodfersou|lunch is now known as rodfersou
dlitvak has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
underplank has quit [Ping timeout: 276 seconds]
karmatr0n has quit [Ping timeout: 276 seconds]
lindistock has joined #ruby
<serard>
Anyone useng sqlite3 here ? :)
<serard>
*using
Azure has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
aganov has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
oivoodoo has joined #ruby
ZerGabriel has quit []
scottschecter has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
bjensen82 has joined #ruby
arup_r has joined #ruby
Azure has joined #ruby
<soahccc>
serard: very rarely and usually for little daemons or so
antgel has joined #ruby
<bjensen82>
I have a start and end_date. I need to divide the interval in six equally sized intervals (potentially the last one being a bit bigger). How would you guys approach this?
solars has joined #ruby
ascarter has joined #ruby
elaptics is now known as elaptics`away
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 265 seconds]
<newdan>
bjensen82: Count up the days in all months from start to end, divide by six and store as span, go [start_date, start_date + span], [start_date + span, start_date + span * 2], etc.
sandstrom has quit [Quit: My computer has gone to sleep.]
arup_r has quit [Ping timeout: 264 seconds]
oivoodoo has quit [Ping timeout: 276 seconds]
mark1 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PONG :sendak.freenode.net"]
sandstrom has joined #ruby
<bjensen82>
newdan: but that leaves you with end_date and start dates being equal start_date + span], [start_date + span
<serard>
soahccc, I am in this case ! :)
<serard>
I'm stupid with LIKE on db.prepare
<serard>
and execute... Cant get it working
<newdan>
bjensen82: I don't understand what you mean
<soahccc>
serard: I used AR and their models :S
<bjensen82>
newdan: the date pairs should be not intersect: it should be 2016/1/1 - 2016/1/15, 2016/1/16 - 2016/1/31 etc
dudedudeman has quit [Quit: dudedudeman]
Xeago has joined #ruby
<bjensen82>
well intersect is the wrong word. more like overlap.
scripore has quit [Quit: This computer has gone to sleep]
dudedudeman has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
<soahccc>
bjensen82: well if you have <= 6 days between those days you either take all there are or you have overlaps
<newdan>
bjensen82: So just + 1 to the start_date of the next span?
<kaleido>
is there a decent tacacs client gem? just needed for authentication.
govg has quit [Ping timeout: 240 seconds]
oivoodoo has joined #ruby
<bjensen82>
newdan: well then how do you make sure the duration is correct in each of them? the last one will be much larger because you reduced the size of the other 5
govg has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
IrishGringo has joined #ruby
synthroid has quit [Remote host closed the connection]
bMalum has quit [Ping timeout: 276 seconds]
tomchapin has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TomyLobo has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
norc has joined #ruby
IrishGringo has quit [Excess Flood]
romero has quit [Read error: Connection reset by peer]
IrishGringo has joined #ruby
jbrhbr has joined #ruby
Burgestrand has joined #ruby
<newdan>
bjensen82: Some small variant of that should work, or it should be easy to write a loop you're satisfied with. Unfortunately for me I'd probably have to doodle with a pen and paper for five minutes to come up with a perfect answer, and that's too much of a commitment for me right now
wilbert has joined #ruby
Xeago has quit [Remote host closed the connection]
usershell has quit [Remote host closed the connection]
<newdan>
[start, start + span], [start + span + 1, start + span + 1 + span] etc should work
bjensen82 has quit [Read error: Connection reset by peer]
rehat has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<rehat>
There is a webpage that has a popup after submitting a form and then takes the user to another page. Is there a way with mechanize to know when the page has been redirected
dionysus69 has joined #ruby
<rehat>
its one of those pop ups that says don't reload or press back. Some old ass web page lol
einarj has joined #ruby
<shevy>
will there be pink marque tags
usershell has joined #ruby
<rehat>
haha not that old
duracrisis has quit [Changing host]
duracrisis has joined #ruby
arup_r has joined #ruby
gagrio|wfh has quit [Quit: Leaving...]
FooMunki has quit [Quit: FooMunki]
skade has joined #ruby
Jardayn has joined #ruby
underplank has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
zambini has joined #ruby
<AlexJakeGreen>
rehat: two ways, one is to handle redirects 301\302 manually, second one is to find specific string which exists only after redirect
nerium has joined #ruby
amclain has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lindistock has quit [Remote host closed the connection]
<ruby[bot]>
norc: # => #<Enumerator: #<Date: 2016-01-01 ((2457389j,0s,0n),+0s,2299161j)>..#<Date: 2001-01-07 ((2451917j,0s, ...check link for more (https://eval.in/507629)
zambini has quit [Client Quit]
sftrabbit has joined #ruby
moeabdol has joined #ruby
<norc>
When ever you have something you need split up in some way, chances are Ruby already has some elegant method for it.
<norc>
:-)
Snowy is now known as Sowny
crazydiamond has quit [Read error: Connection reset by peer]
scripore has joined #ruby
usershell has quit [Remote host closed the connection]
usershell has joined #ruby
user has quit [Ping timeout: 240 seconds]
jas02 has quit [Quit: jas02]
scripore has quit [Client Quit]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saush has quit [Ping timeout: 252 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jcdesimp has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 265 seconds]
skade has quit [Ping timeout: 264 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
[Butch] has joined #ruby
moeabdol has joined #ruby
nettoweb has joined #ruby
atomical_ has joined #ruby
zambini has joined #ruby
jcdesimp has quit [Ping timeout: 264 seconds]
sgambino has joined #ruby
scripore has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
ledestin has joined #ruby
atomical has quit [Ping timeout: 256 seconds]
Ebok has joined #ruby
unreal has quit [Ping timeout: 240 seconds]
tomphp has quit [Ping timeout: 272 seconds]
_ht has quit [Quit: Konversation terminated!]
_ht has joined #ruby
yardenbar has quit [Ping timeout: 245 seconds]
tiagobarreto has joined #ruby
wilbert has quit [Ping timeout: 250 seconds]
Bloomer has joined #ruby
renderfu_ has joined #ruby
jas02 has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
renancarvalho has joined #ruby
renancarvalho has left #ruby [#ruby]
jas02 has quit [Client Quit]
lacuna has quit [Client Quit]
rgtk has quit [Remote host closed the connection]
PedramT has joined #ruby
craigp has quit [Remote host closed the connection]
rgtk has joined #ruby
andikr has quit [Remote host closed the connection]
d10n-work has joined #ruby
ramfjord has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
wonk has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
craigp has joined #ruby
axsuul has joined #ruby
axsuul has quit [Max SendQ exceeded]
Sowny has quit []
tomphp has joined #ruby
PedramT has quit [Ping timeout: 256 seconds]
groteworld has joined #ruby
synthroid has joined #ruby
blackms has quit [Quit: Leaving]
zotherstupidguy has quit [Ping timeout: 260 seconds]
lurch_ has joined #ruby
colegatron has quit [Ping timeout: 250 seconds]
jbrhbr has quit [Quit: Leaving.]
sftrabbit has joined #ruby
lurch_ has quit [Client Quit]
shredding has joined #ruby
wilbert has joined #ruby
<sunya7a>
Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand why it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/9435393b5b2e214d000c
skade has joined #ruby
oivoodoo_ has joined #ruby
tulak has joined #ruby
jottr has quit [Quit: WeeChat 1.4]
diegoviola has joined #ruby
dcunit3d has quit [Ping timeout: 272 seconds]
vvalien has joined #ruby
oivoodoo has quit [Ping timeout: 276 seconds]
solars has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
hxegon_ is now known as hxegon_AFK
AlexJakeGreen has quit [Remote host closed the connection]
yqt has joined #ruby
mdw has joined #ruby
sigurding has quit [Quit: sigurding]
kalopsian has quit [Quit: leaving]
skade has quit [Read error: Connection reset by peer]
kalopsian has joined #ruby
nertzy2 has quit [Quit: This computer has gone to sleep]
newbie22 has joined #ruby
symm- has joined #ruby
chouhoulis has joined #ruby
aufi has quit [Quit: Konversation terminated!]
chouhoulis has quit [Remote host closed the connection]
hxegon_AFK is now known as hxegon_
chouhoulis has joined #ruby
Nahra has joined #ruby
colegatron has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
craigp has quit [Remote host closed the connection]
<shevy>
sunya7a btw you can save with .rb end on gist then you get colour highlighting for free
<shevy>
(2) it is invoked but whatever it is in the assignment, returns nil which then gets assigned to @wheel
craigp has joined #ruby
hannelita has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joonty has quit [Ping timeout: 260 seconds]
malconis has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tulak has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
finisherr has joined #ruby
atomical_ has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Quit: WeeChat 1.4-dev]
newbie22 has quit [Quit: Leaving]
dlitvak has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
<lucasb>
there are 2 classes named GearTest, so the second one is overwritting the setup method
scripore has joined #ruby
hannelita has joined #ruby
whippythellama has quit [Ping timeout: 245 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
jlebrech has quit [Remote host closed the connection]
hannelita has quit [Remote host closed the connection]
dlitvak has joined #ruby
<lucasb>
just changing the name of one of those classes makes the test pass
baweaver has joined #ruby
nettoweb has joined #ruby
floatingpoint has joined #ruby
scripore has quit [Client Quit]
kristian_on_linu has joined #ruby
zotherstupidguy has joined #ruby
<kristian_on_linu>
hi
<kristian_on_linu>
again, building with jekyll and jekyll-scholar
<kristian_on_linu>
E, [2016-01-25 18:50:34#3980] ERROR -- : Failed to parse BibTeX Name on value "$" ($end) ["(^start)"]
<kristian_on_linu>
is the above rubyspeak?
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #ruby
mostlybadfly has joined #ruby
h99h9h88 has joined #ruby
hannelita has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
moeabdol has quit [Quit: WeeChat 1.4]
<shevy>
kristian_on_linu very weird error, looks totally custom
h99h9h88 has quit [Remote host closed the connection]
govg has quit [Ping timeout: 245 seconds]
<kristian_on_linu>
thanks, shevy
PaulCapestany has quit [Quit: .]
<kristian_on_linu>
I was thinking perhaps the 34#3980 was of significance
<shevy>
that is a weird display
<shevy>
34 is seconds... what is 3980? milliseconds? line number?
SCHAAP137 has joined #ruby
<kristian_on_linu>
good questions :)
oivoodoo_ has quit [Remote host closed the connection]
<kristian_on_linu>
I'm thinking milliseconds as I don't have that much code
PaulCapestany has joined #ruby
oivoodoo has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
jbrhbr has joined #ruby
_djbkd has joined #ruby
whippythellama has joined #ruby
poguez_ has joined #ruby
bithon has joined #ruby
govg has joined #ruby
h99h9h88 has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
devbug has joined #ruby
groteworld has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ympeg_ has quit [Ping timeout: 250 seconds]
ympeg has quit [Ping timeout: 250 seconds]
gregf has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 264 seconds]
<IceDragon>
yo
groteworld has joined #ruby
<IceDragon>
Crude greetings aside, does anyone have a library for working with Date ranges sanely?
<IceDragon>
Something where I can do DateRange.new(a, b).each_month { |d| do_stuff_with_month_date }
sftrabbit has quit [Quit: sftrabbit]
gregf has joined #ruby
fantazo has joined #ruby
sigurding has joined #ruby
fsapo has joined #ruby
Sucks has quit [Ping timeout: 250 seconds]
antgel has quit [Ping timeout: 272 seconds]
dlitvak_ has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
ympeg has joined #ruby
ympeg_ has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 240 seconds]
IrishGringo has quit [Ping timeout: 240 seconds]
nav_ has quit []
Dimik has joined #ruby
rakm_ has joined #ruby
<shevy>
apeiros had chronos or so, perhaps that fits
guacamole has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
rakm has quit [Ping timeout: 264 seconds]
<IceDragon>
shevy: I'll check it
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has quit [Remote host closed the connection]
wonk has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
h99h9h88 has joined #ruby
mondok has joined #ruby
rakm has joined #ruby
kaizend has joined #ruby
Pumukel has quit [Ping timeout: 240 seconds]
dwfait has quit [Remote host closed the connection]
kaizend has left #ruby [#ruby]
h99h9h88 has quit [Remote host closed the connection]
arlek has joined #ruby
<IceDragon>
shevy: o_o; this is overkill
<shevy>
lol
<IceDragon>
and it doesn't fit the bill >:
IrishGringo has joined #ruby
<IceDragon>
Why are dates to hard to work with!
rakm_ has quit [Ping timeout: 276 seconds]
Eiam has quit [Ping timeout: 264 seconds]
codecop has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
Eiam has joined #ruby
<apeiros>
IceDragon: start = Date.civil(…); stop = Date.civil(…); current = start; while current < stop; current << 1; do_stuff_with(current); end
<apeiros>
not that hard. but you'll have to know how you want to deal with stuff like 2016-02-29 + 1 month
bb010g has joined #ruby
<apeiros>
err, 2016-01-31 + 1 month :)
<IceDragon>
apeiros: round it back to the beginning_of_month
<IceDragon>
and then push it :P
PedramT has joined #ruby
bronson has joined #ruby
<apeiros>
that makes little sense to me. but remember to check how Date#<< behaves in that regard and take proper provisions.
mchu has quit [Quit: mchu]
<IceDragon>
apeiros: Yeah, I resorted to a until loop, but it makes you cringe in ruby
<IceDragon>
where everything is a fancy smancy method
mg^^ is now known as mg^
kalopsian has quit [Quit: leaving]
<djellemah>
IceDragon: class Monther < Date; def succ; self >> 1 end end
shinnya has quit [Ping timeout: 265 seconds]
arlek has quit [Ping timeout: 240 seconds]
gruz0 has joined #ruby
<IceDragon>
djellemah: I saw that one on stack overflow :P
kalopsian has joined #ruby
<djellemah>
I haven't seen it on stack overflow.
<djellemah>
But I haven't looked.
mchu has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<IceDragon>
apeiros, djellemah: Thanks for the help
* IceDragon
scurries off back to code land
PedramT has quit [Ping timeout: 240 seconds]
craigp has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 265 seconds]
arup_r has quit []
maikowblue has joined #ruby
maletor_ has joined #ruby
fantazo has quit [Ping timeout: 265 seconds]
dudedudeman has quit [Quit: dudedudeman]
thomas has quit [Quit: leaving]
zambini has quit [Quit: Leaving.]
skcin7 has joined #ruby
dlitvak has joined #ruby
hightower4 has joined #ruby
evidex has quit [Ping timeout: 272 seconds]
<hightower4>
Hey, when compiling Ruby, how do I specify extra gems that I want built/installed along with Ruby? I assume it has to be something with 'bundled gems'
mchu has quit [Quit: mchu]
joonty has joined #ruby
spider-mario has joined #ruby
mchu has joined #ruby
fourq has joined #ruby
fourq is now known as Guest1054
zambini has joined #ruby
Guest1054 has left #ruby [#ruby]
ajf- has joined #ruby
dlitvak_ has quit [Ping timeout: 260 seconds]
fourq has joined #ruby
sigurding has quit [Quit: sigurding]
ajf- has quit [Max SendQ exceeded]
ajf- has joined #ruby
usershell has quit [Remote host closed the connection]
usershell has joined #ruby
ajf- has left #ruby [#ruby]
devbug has joined #ruby
thomas has joined #ruby
<drbrain>
hightower4: I think you can edit gems/bundled_gems
usershell has quit [Remote host closed the connection]
lucasb has quit [Quit: leaving]
joonty has quit [Ping timeout: 276 seconds]
fantazo has joined #ruby
user_ has joined #ruby
speaking1ode has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
firstdayonthejob has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wonk has joined #ruby
binaryplease has joined #ruby
bithon has quit [Ping timeout: 264 seconds]
speaking1ode has joined #ruby
juddey has joined #ruby
sigurding has joined #ruby
rehat has quit [Read error: Connection reset by peer]
hannelita has joined #ruby
moeabdol has joined #ruby
FernandoBasso has quit [Quit: Leaving]
dlitvak_ has joined #ruby
Azulinho has quit [Ping timeout: 276 seconds]
baweaver has quit [Ping timeout: 260 seconds]
kristian_on_linu has quit [Quit: Leaving]
fmcgeough has joined #ruby
victortyau has joined #ruby
kirillzh has joined #ruby
_djbkd has quit [Remote host closed the connection]
sftrabbit has joined #ruby
_djbkd has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
aegis3121 has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
dlitvak has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
hannelita has quit [Ping timeout: 264 seconds]
_djbkd has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
r4do has quit [Quit: Leaving.]
_djbkd has joined #ruby
tiagobarreto has quit [Remote host closed the connection]
mchu has quit [Quit: mchu]
SenpaiSilver has joined #ruby
Jet4Fire has joined #ruby
shredding has quit [Ping timeout: 264 seconds]
Burgestrand has joined #ruby
jcdesimp has joined #ruby
ramfjord_ has joined #ruby
<sunya7a>
shevy: ty =)
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sunya7a>
Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand why it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/5e3fe49c7a847540ac93
agit0 has joined #ruby
<drbrain>
sunya7a: add your output too?
<sunya7a>
it passes when I use DiameterDouble.new instead of @wheel on lines 85
<sunya7a>
drbrain: ok
stamina has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
<hightower4>
drbrain, right, that's what I did but it had no effect. I ran make clean, repeated configure and re-ran make install, but only the default "default" and "bundled" gems were installed, not the ones I added
kalopsian has quit [Quit: leaving]
kalopsian has joined #ruby
jcdesimp has quit [Ping timeout: 240 seconds]
<drbrain>
hightower4: I see `make update-gems` and `make extract-gems` both reference the bundled_gems file
<maletor_>
ya, i'm gonna create a private NormalizedFriend class that redefines eql? and intersect those two. then i will have to map the results to normalized_friends.map(&:friend)
<maletor_>
or just build into normalized friend the specific methods i need from fried
bronson has quit [Ping timeout: 265 seconds]
lipoqil has quit [Quit: Connection closed for inactivity]
sgambino has joined #ruby
<IceDragon>
maletor_: What objects are you exactly working with? Hashes and ActiveRecords/ActiveModel/SomeORMModel?
bithon has joined #ruby
<maletor_>
precisely. the result will only ever be objs of the latter kind though. so that will come first in the intersection ARmodel & Hash
Emmanuel_Chanel has joined #ruby
Cohedrin has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
momomomomo has quit [Ping timeout: 245 seconds]
momomomomo_ is now known as momomomomo
<maletor_>
(a.id) & (b[:id]) would that actually work?
Emmanuel_Chanel has joined #ruby
<maletor_>
that would return me ids though. which isn't what iw ant
tulak has joined #ruby
nerium has quit [Quit: nerium]
uri_ has quit [Quit: --]
lucasb has joined #ruby
renderfu_ has quit [Read error: Connection reset by peer]
<IceDragon>
maletor_: just use == if you want to check equality
<IceDragon>
maletor_: What I'm saying is, & is a Bitwise operator, #eql?, #==, and #equal? are all equality checks with their minor variations
<IceDragon>
maletor_: You're doing a bitwise operation on ids which I assume are Integers
<maletor_>
definitely not doing bitwise, sorry that's not clear
baweaver has joined #ruby
<kristian_on_linu>
I think you are correct, newdan
<kristian_on_linu>
but where would I put that file?
theRealAlexz has quit [Ping timeout: 265 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
<lucasb>
I think he means the array/set intersetion (&), not bitwise operator
<IceDragon>
maletor_: Then you should be using the equality methods, I'm not sure what you're trying to accomplish which is why I've only been giving vague answers
<shevy>
IceDragon are you still writing on that game?
bithon has quit [Ping timeout: 256 seconds]
<kristian_on_linu>
lucasb: me?
<IceDragon>
shevy: Nah, I got a job at a telecom company and never looked back
<maletor_>
i need to intersect Object A and Object B on two different methods call them A#foo B#bar.
<IceDragon>
shevy: the "real life" got me
<lucasb>
kristian_on_linu: nop, I meant maletor_ :)
wonk has quit [Ping timeout: 240 seconds]
<shevy>
aha
<maletor_>
intersection is much faster than .each and .each
<newdan>
kristian_on_linu: I am not too familiar with Jekyll. There's no configuration .rb file?
theRealAlexz has joined #ruby
theRealAlexz has quit [Changing host]
theRealAlexz has joined #ruby
<newdan>
kristian_on_linu: Why not ask #jekyll?
<maletor_>
So i have a private class NormalizedObject that implements .eql? and things are going well
<kristian_on_linu>
newdan: this might be better suited for #jekyll, I have a hard time telling when it's that or #ruby sometimes
hannelita has joined #ruby
jaequery has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
_djbkd has joined #ruby
cdg has joined #ruby
jaequery has quit [Max SendQ exceeded]
h99h9h88 has joined #ruby
zerowaitstate has joined #ruby
jaequery has joined #ruby
countryHick has joined #ruby
skcin7_ has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
skcin7 has quit [Ping timeout: 265 seconds]
hannelita has quit [Ping timeout: 264 seconds]
<shadowfirebird>
Has anyone got any good ideas for working with locally stored gems, ie, not hosted on rubygems? Best I can manage is to put a `git: <url>` line in Gemfile -- bundler honours that but gem doesn't which is confusing...
<shadowfirebird>
gem list -> gem not there; bundle exec gem list -> gem there.
<IceDragon>
shadowfirebird: Use path: 'path/to/gem'
<shadowfirebird>
Again, don't think gem understands that, although bundler does?
jcdesimp has joined #ruby
<shadowfirebird>
Could be wrong
<IceDragon>
Yeah that's a bundler thing
toretore has joined #ruby
<IceDragon>
You'll have to ask the `gem` experts
cpup has joined #ruby
gbgdev has quit [Remote host closed the connection]
<shadowfirebird>
This is for work and we don't want to spin up a gem server for just a couple of gems ...
wonk has joined #ruby
<shadowfirebird>
I *love* Ruby ... but, eurgh, deployment.
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jas02 has quit [Quit: jas02]
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<IceDragon>
shadowfirebird: Grab bundler, make a Gemfile, throw your deps into a git repository somewhere, ..., PROFIT?
<IceDragon>
I had to do something similar
aegis3121 has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
jcdesimp has quit [Ping timeout: 265 seconds]
h99h9h88 has joined #ruby
zambini has quit [Quit: Leaving.]
<shadowfirebird>
IceDragon: deps in a git repo, nobody can work out why program doesn't work .... profit???
<IceDragon>
Yeaaaaah
<IceDragon>
fun times
<IceDragon>
usually bundler will complain about missing deps on startup though
<IceDragon>
so that's a thing
[Butch]_ has joined #ruby
<IceDragon>
shadowfirebird: Push comes to shove, pack the gems and the application into a zip and deploy that, ASSUMING there is nothing in it that needs to be "built"
[Butch] has quit [Ping timeout: 256 seconds]
[Butch]_ is now known as [Butch]
h99h9h88 has quit [Ping timeout: 240 seconds]
<shadowfirebird>
IceDragon: yeah. My other option is to have a vendor subdir and make it a subrepo. But nested repositories have their own problems.
ur5us_ has quit [Remote host closed the connection]
<IceDragon>
git clone repo "repo_url" --recursive
h99h9h88 has joined #ruby
<IceDragon>
eh
<IceDragon>
ignore that 'repo'
mdw has joined #ruby
ferr has joined #ruby
<IceDragon>
shadowfirebird: Are you deploying a web app?
<tubbo>
shadowfirebird: git dude
<tubbo>
shadowfirebird: also it's really not that hard to set up a gem server. geminabox makes it really simple.
<tubbo>
any ruby company i ever worked for worth their shit had a private gem server.
<tubbo>
there are even companies that run your gem server for you
<shadowfirebird>
IceDragon: sometimes... not so bad then because we've got to build to jRuby. It's when I'm building something to run on the command line that it's a problem
codefo has joined #ruby
<IceDragon>
ehhh
* IceDragon
cringes
<shadowfirebird>
tubbo: interesting. Shame we're not. End user. and the Ruby guys are just me and someone else
* IceDragon
remembers trying to get dawn deployed...
jas02 has joined #ruby
pdoherty has quit [Remote host closed the connection]
h99h9h88 has quit [Ping timeout: 240 seconds]
Shaboum has quit [Quit: WeeChat 1.4]
<tubbo>
*shrug*
<shadowfirebird>
Sinatra deployment is pretty straight forward, we use Warbler -> Tomcat. No problems
skcin7_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has joined #ruby
<shadowfirebird>
Talking about it, I think I've just decided to put up a geminabox server on my development box. I haven't liked to before, because I think it's the wrong place for one. But.
xnp70 has joined #ruby
<xnp70>
I am trying to use an app that has a Gemfile.in instead of Gemfile
<xnp70>
how's that supposed to be used ?
mdw has quit [Ping timeout: 245 seconds]
<IceDragon>
xnp70: Rename it?
devbug has quit [Read error: Connection reset by peer]
<IceDragon>
xnp70: I think bundler had something for running against a specified Gemfile
joneshf-laptop has quit [Ping timeout: 276 seconds]
TomPeed has quit [Client Quit]
<binaryplease>
hello how/with what can I create a small window like dmenu ? I want to write an application launcher
<v0n>
binaryplease: pipe whatever you need in dmenu (not dmenu_run) directly :-)
blackgoat has joined #ruby
<binaryplease>
v0n: Yes but I want to have bang syntax. Like "!man ifconfig" would open the man page for ifconfig
ebbflowgo has joined #ruby
p7r has joined #ruby
<v0n>
binaryplease: echo -e "ls\ncp\nifconfig" | /usr/bin/dmenu | xargs man
mjuszczak has quit []
skofo has joined #ruby
dlitvak has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
codefo has joined #ruby
<v0n>
binaryplease: change "man" by something like "gnome-terminal -e ..." if you want a window, you get the idea
mjuszczak has joined #ruby
Burgestrand has joined #ruby
dwfait has joined #ruby
davedev2_ has joined #ruby
shiver_ has joined #ruby
baweaver has quit [Remote host closed the connection]
shiver has quit [Ping timeout: 272 seconds]
ramortegui has quit [Remote host closed the connection]
newdan has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 240 seconds]
ferr has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
atomical_ has joined #ruby
__main__ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
C0L0R has joined #ruby
dwfait has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
__main__ has quit [Read error: Connection reset by peer]
ico has quit [Read error: Connection reset by peer]
oivoodoo has quit [Remote host closed the connection]
__main__ has joined #ruby
bronson has joined #ruby
ico has joined #ruby
einarj has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 265 seconds]
oivoodoo has joined #ruby
karapetyan has quit [Remote host closed the connection]
workmad3 has joined #ruby
<binaryplease>
v0n: I think I explained that badly, I need dmenu to works as normal + other functions. Example: Open Demnu, enter "fir" <enter>, firefox opens. or: Open dmenu, enter "!man<space>", dmenu now no longer shows entrys from path but all man pages, enter some characters and <enter> opens the man page.
C0L0R has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenlot1 has joined #ruby
<v0n>
binaryplease: then you want to write a complex script that parses the stdout of dmenu and executes your custom actions (eventually pipe a content back into dmenu) or exec "${SHELL:-"/bin/sh"} &" (which is the default)
felltir has joined #ruby
Trynemjoel has joined #ruby
<v0n>
dmenu is just a graphical selector. You can pipe whatever you want (the default is `dmenu_path`), then parse, pipe, parse ... eventually exec the end result
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shiver_ is now known as shiver
shiver has quit [Quit: leaving]
dlitvak has joined #ruby
shiver has joined #ruby
shiver has quit [Changing host]
shiver has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard_ has quit [Ping timeout: 250 seconds]
<Ox0dea>
norc: The madness to which I was referring a while back: https://git.io/vzPh2
<xpt>
binaryplease: you would like to run dmenu with something like this: { dmenu_path; for i in /usr/share/man/man1/* ; do i=${i##*/}; printf '!man %s'${i%%.*}'\n'; done; } | dmenu "$@"
Azure has quit [Quit: Oops.]
bithon has joined #ruby
Azure has joined #ruby
<xpt>
binaryplease: and pipe it to a script that will check if 1st argument is !man or not
baweaver has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
baweaver has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
CloCkWeRX has joined #ruby
atomical has joined #ruby
atomical_ has quit [Ping timeout: 250 seconds]
x77686d has quit [Quit: x77686d]
hannelita has joined #ruby
symm- has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
cactuzzz has quit [Quit: cactuzzz]
musicnode has joined #ruby
hobodave has joined #ruby
baweaver has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
bithon has quit [Quit: WeeChat 1.4]
dlitvak has joined #ruby
baweaver has quit [Remote host closed the connection]
<binaryplease>
v0n: I guess that's an option. Drawbacks are that it always shows all options and that it shows "!man" infront of the options. Anyway, is there a ruby lib that can create this kind of windows?
chrisface has joined #ruby
ellistaa has quit [Quit: ellistaa]
wonk has quit [Ping timeout: 256 seconds]
Anothermoron has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xnp70 has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hannelita has quit [Ping timeout: 264 seconds]
rehat_ has joined #ruby
<rehat_>
with ruby selenium-webdriver, is there a way to move a element to the top of the page
volty has joined #ruby
mjuszczak has quit []
mjuszczak has joined #ruby
atomical has quit [Ping timeout: 240 seconds]
kalopsian has quit [Ping timeout: 240 seconds]
ESpiney has quit [Ping timeout: 240 seconds]
kies^ has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
mjuszczak has quit [Ping timeout: 240 seconds]
ympeg___ has quit [Ping timeout: 265 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ympeg__ has quit [Ping timeout: 260 seconds]
countryHick has quit [Quit: Connection closed for inactivity]
<Ox0dea>
I've used Highline, but only to avoid having to deal with termcap for hiding password input.
<Ox0dea>
Darmani: Today.
<Ox0dea>
Do you even timestamps?
Domaldel has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 264 seconds]
<Darmani>
no Q.Q
usershell has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
<Darmani>
Ox0dea - Did you get me something special?
<Darmani>
Are you going to sing me a song?
<Ox0dea>
Why'd you have to go and load the question?
<Ox0dea>
I did get you something special, but it's not a song.
konsolebox has quit [Quit: Leaving]
musicnode has joined #ruby
<kspencer>
Ox0dea: If I'm going to allow ./script > file.conf for a generator script, should I make output go to STDERR so that it doesn't get taken in by regular .puts