<uhsf>
I'm trying to solve a problem since a few hours. cannot load such file -- bundler/setup (LoadError). Using ruby 2.2.2, passenger and nginx. Please help.
djbkd has quit [Remote host closed the connection]
Akagi201 has joined #ruby
Musashi007 has joined #ruby
<uhsf>
the error page says RUBY_VERSION = 2.2.2 and RubyGems paths = ["~/.gem/ruby/2.2.0", "/usr/lib/ruby/gems/2.2.0"]
BTRE has quit [Quit: Leaving]
fabrice31 has quit [Ping timeout: 272 seconds]
iwishiwerearobot has quit [Ping timeout: 256 seconds]
<uhsf>
RubyGems paths seems wrong. How to change it to ~/.gem/ruby/2.2.2?
<sevenseacat>
its not wrong, thats the api version
<uhsf>
sevenseacat: how to solve: cannot load such file -- bundler/setup (LoadError)?
<sevenseacat>
install bundler?
yh__ has quit [Ping timeout: 256 seconds]
shuber_ has joined #ruby
CHVNX has joined #ruby
yh__ has joined #ruby
Aswebb_ has joined #ruby
Azure has quit [Excess Flood]
<uhsf>
sevenseacat: I have bundler installed in ~/.gem/ruby/2.2.2/gems/bundler-1.9.9 why passenger can't load it?
<sevenseacat>
hmm
GriffinHeart has joined #ruby
growlove has quit [Remote host closed the connection]
Azure has joined #ruby
Dakuan has joined #ruby
shuber_ has quit [Ping timeout: 264 seconds]
<uhsf>
sevenseacat: when using passenger directly in app directory it works fine.
<uhsf>
sevenseacat: when using nginx it doesn't work
master has left #ruby [#ruby]
wildroman2 has quit [Remote host closed the connection]
ddarkpassenger has joined #ruby
<sevenseacat>
i dont know, sorry mate.
Yzguy has quit [Quit: I'm sleeping, go away.]
rodfersou has quit [Remote host closed the connection]
Aswebb_ has quit [Ping timeout: 272 seconds]
Yzguy has joined #ruby
powersurge has joined #ruby
<shevy>
uhsf I just installed bundler via gem
<shevy>
in irb, I did this:
<shevy>
require 'bundler/setup'
<shevy>
and it works
<shevy>
so you (a) either do not have it installed, or (b) have it installed somewhere where by default it can't be found
<shevy>
I did not try user-install though
havenwood has joined #ruby
<powersurge>
so in python if you have a tuple like ('foo', 'bar') you can do 'tuple unpacking' which is baz, foobar = ('foo', 'bar'). I know you can do similar in ruby with arrays but for the life of me I can't remember what ruby calls it
<powersurge>
anyone able to jog my memory?
<shevy>
but from my experience, user-installed gems work just as the normal system-installed gems too
<powersurge>
not having success trying to google it
<powersurge>
the array I'll be decomposing/compressing/w/e will be known to be a pair
<powersurge>
and if it's not a pair I don't mind the stuff after the first two elements becoming 'lost'
wildroman2 has joined #ruby
mrmargolis has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
<gambl0re>
guys...how do i make a website like espn. what front/back end frameworks should i look into?
<sevenseacat>
gl with that
<gambl0re>
thanks..
<gambl0re>
any suggesions?
<powersurge>
that's a pretty broad question. so broad in fact that there's not really a correct answer gambl0re
<powersurge>
what do you know?
<gambl0re>
ht
<gambl0re>
html/css
<shevy>
gambl0re build with .cgi!
<powersurge>
mmm
<powersurge>
you've got quite a way to go, I'm afraid
<shevy>
you can do it
<gambl0re>
thats why im asking which technologies i need to use so i can learn it
<gambl0re>
or a site like cnn..
<powersurge>
imo the next steps would be to read some introductory tutorials to ruby, php, & python and then make a call on which one fits the way you think best
<powersurge>
all of these technologies are more or less equivalent at the end of the day, and it really boils down to preference
MatthewsFace has joined #ruby
_seanc_ has joined #ruby
<powersurge>
from there you can start looking at the specific platform/framework and narrow your focus
cirn0 has quit [Remote host closed the connection]
<powersurge>
there are more general web focused channels that can help you as you pick and learn a backend technology like #web, #webdevs & #webtech
<gambl0re>
do you recommend bootstrap or foundation? im thinking of rails or angular for backend
<powersurge>
for you I don't recommend anything at that level yet
<powersurge>
it doesn't sound like you have the foundational knowledge yet
<gambl0re>
i have it!
<ebonics>
bootstrap is old
mase-chatter has quit [Quit: Leaving]
<powersurge>
I'd recommend learning a backend technology where the technology is one of: ruby, php, or python and then learning js to complement your existing html & css
<gambl0re>
bootstrop is not old?...new version just got released. get with the program.
<powersurge>
html + css are both declarative programming languages and are a world apart from imperative languages
<ebonics>
no one takes bootstrap seriously anymore
<ebonics>
foundation replaced it
<gambl0re>
i already did codecademy ruby already.
<powersurge>
mmm
<ebonics>
personally i dont bother with either of them
<powersurge>
if you feel that you like ruby then the next step, imo would be to play with sinatra and learn ruby in a web context
<powersurge>
sinatra does very little for you and will teach you about how http works
<ebonics>
just slap in normalize and write your own grid with sass
<gambl0re>
foundation is more widely used than bootstrap?
<ebonics>
no bootstrap is because its popular among noobs
<powersurge>
once you get a handle on that you can move up to rails which is the defacto standard in ruby
Matthews_ has quit [Ping timeout: 264 seconds]
DerisiveLogic has quit [Remote host closed the connection]
<ebonics>
foundation is better though and more widely used among actual frontend devs
<powersurge>
alternative full stack frameworks exist though, if you are curious
<powersurge>
bootstrap is still crazy popular and pretty widespread
<powersurge>
I find foundation ot be very buggy
<ebonics>
uwot
<powersurge>
although I prefer it for how... composable it is, I should say
<gambl0re>
bootstrap includes responsive design.
<powersurge>
the most useful thing in either is the grid system which you don't really need nowadays with flexbox imo
uhsf has quit [Read error: No route to host]
<gambl0re>
thats why its popular..
<powersurge>
foundation does as well
<ebonics>
gambl0re, you'll find out soon how little that means
<powersurge>
the biggest thing bootstrap has going for it is inertia
<ebonics>
depending on bootstrap for responsiveness is garbo
<gambl0re>
company's need responsive design you know.
<powersurge>
loads of themes and blog posts and all kinds of stuff
<ebonics>
yeah, you do that yourself
<ebonics>
bootstrap etc limits your freedom
someword has quit [Quit: Leaving.]
<gambl0re>
yo man, it's pretty complicated to handcode a responsive site
That1Guy has joined #ruby
multiscan has joined #ruby
<powersurge>
yea, bootstrap & foundation are both starting points. the more complex and unique your design goes the more you'll drop from the toolkit
<gambl0re>
thats why theres frameworks
<ebonics>
no its actually not
<powersurge>
check out flexbox and media queries gambl0re
<ebonics>
^
<powersurge>
it's much simpler than it has been
<ebonics>
and sass
chris349 has quit [Ping timeout: 255 seconds]
<powersurge>
which is a big reason why you see fewer dedicated grid systems
someword has joined #ruby
<ebonics>
using frameworks is old meta
<powersurge>
heh 'old meta'
<ebonics>
and the only ones sttill using them generally are people who are dependent on them
FernandoBasso has quit [Quit: leaving]
<powersurge>
competitive gamer identified!
<ebonics>
lol
GriffinHeart has quit [Remote host closed the connection]
<duderonomy>
why is recommended to do sinatra before rails?
uhsf has joined #ruby
<powersurge>
rails has a load of magic and it can be frustrating without a base understanding of http imo
<powersurge>
like driving on the highway before you drive on the street imo
<sevenseacat>
i wouldnt say its recommended
GriffinHeart has joined #ruby
<powersurge>
ya, it's my recommendation :>
<powersurge>
which you can take with a grain of salt
<duderonomy>
yeah, I spent a lot of time re-reading route tables; still don't "know it"
<powersurge>
mmm
<sevenseacat>
if you already have a lot of web MVC experience, I dont see the benefit in using sinatra first as a stepping-stone for rails
<powersurge>
I agree
_seanc_ has quit [Quit: _seanc_]
Matthews_ has joined #ruby
<ebonics>
how does rails compare to like laravel
<powersurge>
but if you're starting from scratch, imo, learn ruby -> learn sinatra -> learn rails
<bootstrappm>
yeah we use laravel alongside rails. one for consumer product, other for admin interface
car has quit [Quit: Leaving]
bootstrappm has quit [Quit: bootstrappm]
<powersurge>
rails is defacto in ruby, sure gambl0re
ZergCoder has left #ruby [#ruby]
<powersurge>
but every language has their preferred frameworks
multiscan has quit [Read error: Connection reset by peer]
<powersurge>
python has django, php has... a few, heh
saadq has joined #ruby
tkuchiki has joined #ruby
Hijiri has quit [Ping timeout: 276 seconds]
multiscan has joined #ruby
sevenseacat has quit [Remote host closed the connection]
sevenseacat has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hijiri has joined #ruby
mattwildig has joined #ruby
<gambl0re>
i want to learn frameworks that will help me get a job...
vikaton has quit []
bronson has joined #ruby
<gambl0re>
laravel is probably nice to know but i dont think company's use it as much as rails which will put me a disadvantage.
kinduff has joined #ruby
<kinduff>
Good morning good people
yh__ has quit [Ping timeout: 244 seconds]
<powersurge>
laravel is the little brother of another framework called symfony2, they use a lot fo the same libs under the hood
pengin has quit [Remote host closed the connection]
<powersurge>
between the two it's probably more popular overall than rails is
<gambl0re>
symfony2 is more popular than rails?
<powersurge>
not to talk you off of rails, of course :>
pengin has joined #ruby
<kinduff>
gambl0re: highly doubt it
Channel6 has joined #ruby
someword has quit [Quit: Leaving.]
<powersurge>
php is much more popular than ruby and symfony2 is the current darling of the php world
<kinduff>
lets avoid talking about php again :V
<powersurge>
fair
That1Guy has joined #ruby
<powersurge>
tbh gambl0re it sounds like you've got a bit of tunnel vision going on. I'd encourage you to focus on what you like rather than what will get you employed immediately
<sevenseacat>
+1
<powersurge>
jumping straight into rails without any prior web or ruby experience is a recipe for frustration
<sevenseacat>
+100
bronson has quit [Ping timeout: 264 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
<kinduff>
+1000 both coments from powersurge
uhsf has quit [Quit: leaving]
pengin has quit [Ping timeout: 252 seconds]
<powersurge>
are _ holes idiomatic in ruby? if you're unpacking an array and don't care about the first var, for example
nettoweb has joined #ruby
nettoweb has quit [Client Quit]
saadq has quit [Remote host closed the connection]
lidenskap has quit [Remote host closed the connection]
That1Guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
powersurge: I think so
<powersurge>
cool, ty
DerisiveLogic has joined #ruby
<gambl0re>
ok fine...do you suggest i learn sinatra first??
<powersurge>
if you stay with ruby I suggest learning sinatra and then rails
juanpaucar has joined #ruby
<powersurge>
but my base advice is to play with the major players in the web space (ruby, python, php) and find one which fits your head the best and go from there
Dakuan has joined #ruby
<powersurge>
the advice will be similar in any of the three languages though. learn a micro framework and then a fullstack framework
<sevenseacat>
my advice to someone just starting web dev would probably be 'start with flat html'
<powersurge>
he said he's got some base html/css experience
nettoweb has joined #ruby
<powersurge>
but yes, I agree :>
<sevenseacat>
ah okay
<sevenseacat>
missed that part
* Radar
remembers banning gambl0re
That1Guy has quit [Client Quit]
<shevy>
lol
<powersurge>
I can't remember what the popular php micro framework is
<powersurge>
going to drive me crazy if I don't figure it out
That1Guy has joined #ruby
<gambl0re>
im only learning ruby because everybody says ruby makes people happy or something like that...
<gambl0re>
cakephp?
<powersurge>
cakephp is pretty big and bloated, deffo not micro, heh
<powersurge>
but yea, the convo is deffo going to be off topic here
<sevenseacat>
my advice would also be 'if you're here trying to learn just do you can get a job, leave now'
That1Guy has quit [Client Quit]
<sevenseacat>
*just so
<gambl0re>
why
<powersurge>
there are general web channesl like #web, #webdevs, #webtech that will help you pick a language and give advice to get better at it
<powersurge>
well he may find out he likes it sevenseacat
<gambl0re>
those are zombie channels. dead.
<powersurge>
#web deffo isn't dead
<sevenseacat>
if he liked it, he would have been interested to try it without the pressure of OMG NEED JOB
<powersurge>
and I idle in #webtech a lot, we're mostly active during the weekdays though
<powersurge>
fair
Agoldfish has quit [Quit: G'Bye]
<powersurge>
#web currently has 367 users in it
segfalt has joined #ruby
<powersurge>
not sure what you'd define as 'lively' if that's dead :>
<Radar>
popcorn
<sevenseacat>
but thats my opinion. i could rhapsodize for days about that kind of stuff. maybe i should write a blog post about ot.
<sevenseacat>
it
juanpaucar has quit [Ping timeout: 265 seconds]
Dakuan has quit [Ping timeout: 264 seconds]
<powersurge>
imo I think passion being a requirement for developing is a little oversold. especially the github as a resume bit that's making the rounds
<powersurge>
that one in particular implies that you have to work for free on your own time to get a job if your existing job isn't open source friendly
<sevenseacat>
we're talking about web development, not sit-in-an-office-and-play-with-ten-year-old-java
<powersurge>
but ya I do think you have to like it at least a little, heh
<sevenseacat>
that can be done by zombies
<powersurge>
if you just clock in for your 8hrs then ultimately you'll be left behind
JoshGlzBrk has joined #ruby
<powersurge>
doing whatever the equivalent of COBOL is 5 yrs from now
Musashi007 has joined #ruby
xcesariox has joined #ruby
<sevenseacat>
web development is a fast moving field - if you dont have a keen interest (and sometimes even if you do) you'll be left behind
That1Guy has joined #ruby
nso95 has joined #ruby
Kricir has quit [Remote host closed the connection]
<shevy>
java zombies
<sevenseacat>
import javax.zombie.braaaaaaains;
MatthewsFace has joined #ruby
wildroman2 has joined #ruby
<ebonics>
m8
<ebonics>
are you trying to say java is oldmeta
<sevenseacat>
no idea what 'oldmeta' means so
Hijiri has quit [Ping timeout: 276 seconds]
That1Guy has quit [Client Quit]
huddy has quit [Quit: Connection closed for inactivity]
<ebonics>
it's a term applied to games when certain characters or strategies get phased out of the "meta" in favour of new ones
<sevenseacat>
and what is 'the meta'?
Hijiri has joined #ruby
<ebonics>
metagame
<powersurge>
yea
<sevenseacat>
I'd consider myself a gamer and I still have no idea what you're talking about.
<ebonics>
i think it's funny when people say you corrupt the filesystem on usbs permanently
<ebonics>
if you pull them out
<ebonics>
like they never thought to use gparted on it
growlove has joined #ruby
<shevy>
I had some bad luck lately
<shevy>
with USB hdds
<ebonics>
it does feel like luck sometimes
<shevy>
since then I try to be a well-behaving person; always properly umount before unplugging
idafyaid has quit [Quit: idafyaid]
<shevy>
I had like 3 of my external hdds die in the last ~14 months or so :(
<ebonics>
how
<ebonics>
im actually terrified of using usbs for backups
<kinduff>
I want to scrap out all those pokemon gifs
Yzguy has joined #ruby
<powersurge>
they've been dumped
<powersurge>
...somewhere, heh
<ebonics>
ihave to like take it out, mount it again, check its not corrupt, then keep doing it
<kinduff>
they're pretty cool
<powersurge>
the pokemon showdown code is open source nodejs
<ebonics>
because each time i do it im scared i corrupted i
<ebonics>
t
<powersurge>
if nothing else I'm sure you can find them there
<shevy>
ebonics dunno. they make weird sounds when I try to connect them, and dmesg is full of some corrupted file descriptor bla; one does not even power on at all anymore
<ebonics>
dont those games get taken down or anything
<powersurge>
I took the data from veekun's open source dump of the pkmn data and graphed the type distribution of pokemon subdivided by the generation that it was introduced in
<powersurge>
it only simulates the battles ebonics
<powersurge>
since they don't make any money it's considered fair use
<ebonics>
i wonder if you could just like
<powersurge>
if they built out the whole game it'd be shutdown but as it is it's just the battle mechanics
<ebonics>
make one that's 100% p2p
<powersurge>
that's what pokemon showdown is, really
starless has joined #ruby
<powersurge>
you put your pokemon in, set their ivs/evs/movesets and play online
<ebonics>
havenwood, i went on a rant earlier about building my own rubiess
<ebonics>
i would be a hypocrite
mrmargolis has joined #ruby
darkf has joined #ruby
<havenwood>
ebonics: build away!
<ebonics>
havenwood, i have problemsss with mruby
<ebonics>
im gonna use v8 instead
<havenwood>
ebonics: how are those binary options?
<ebonics>
someone should work on that damn regex library
<havenwood>
ebonics: use stable versions
<ebonics>
havenwood, i compiled the pcre plugin into it. it passed tests
<ebonics>
then i run it and any ruby code that uses regex just segfault
<ebonics>
with no error messages
<havenwood>
ebonics: with mruby-1.1.0?
<ebonics>
i spent like a few hours on it too, its hopeless
<ebonics>
no the new package
<havenwood>
ebonics: the not stable bleeding edge master?
fabrice31 has quit [Ping timeout: 256 seconds]
gusrub has quit [Quit: Leaving]
oo_ has joined #ruby
<ebonics>
havenwood, i only tried using the nightlies because there's some issue with go-mruby with the pcre plugin. it's probably my fault but i followed the build instructions and it didnt work out of the box
<ebonics>
so i just rm -rf'd and tried with the nightlies
<havenwood>
ebonics: mm
iwishiwerearobot has quit [Ping timeout: 272 seconds]
mattwildig has quit []
willharrison has joined #ruby
kinduff has quit [Ping timeout: 252 seconds]
saadq has joined #ruby
<maknz>
I have a question about modules and namespacing. Consider https://gist.github.com/maknz/1d3c80d1b05b5316b075 -- where B is extending, is there a way to specify that class 'relatively' and cleaner, rather than having to repeat the parent module name? Note the 2nd level Bar module and the 3rd level Bar module under Baz, which makes Bar ambiguous
willharrison has quit [Client Quit]
willharrison has joined #ruby
<ebonics>
at first glance and my armchair beginner ruby opinion, that looks like bad design
<ebonics>
but i'm actually a shitter so take it with a grain of salt
iamdoo2 has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maknz>
I want to re-use the bar name, so it's something like SomeNamespace::Errors, and SomeNamespace::SomethingElse::Errors -- which is elegant I feel, but maybe it's not how ruby namespacing was intended
<ebonics>
i was ranting about how garbo ruby namespaces are before, so yeah
Joufflu has joined #ruby
Aswebb_ has joined #ruby
<ebonics>
maknz, i feel like defining ::Errors isnt clean though
<ebonics>
in each namespace
<ebonics>
that's hardly code reuse
bronson has joined #ruby
<ebonics>
SomeNamespace::SomeNamespaceError
<maknz>
Something::Errors would be general errors across the library, Something::Bar::Errors would be specific errors for stuff inside Bar.
<ebonics>
SomeNamespaceError < GenericError
<maknz>
Repeats the class name though :(
<ebonics>
like my MRuby namespace would have
<ebonics>
MRuby::SegfaultError
alvaro_o has joined #ruby
<ebonics>
and my PCRE namespace would have MRuby::PCRE::DoesntWorkError
<maknz>
right sure.. keep the errors just flat like the classes
<maknz>
I kinda liked being able to put them in a module to group them
lessless has joined #ruby
<ebonics>
that's not modular
<ebonics>
why couple them if you don't have to
<shevy>
one namespace to rule them all
<maknz>
Not sure I see the coupling?
<shevy>
and in ebonics' cellar, bind them and spank them
<ebonics>
yes
<ebonics>
do that
<shevy>
haha
<ebonics>
maknz, it's not that they're strictly coupled through dependency
<ebonics>
but they're coupled by having to share the same namespace
Aswebb_ has quit [Ping timeout: 256 seconds]
<shevy>
is there a difference between java namespaces and ruby namespaces?
<ebonics>
lol
<ebonics>
yes
<ebonics>
java doesn't have namespaces per se
<ebonics>
and encapsulation/privatization is incredibly idiomatic in java
tjbiddle has quit [Quit: tjbiddle]
bronson has quit [Ping timeout: 272 seconds]
<ebonics>
so it doesn't need them
<ebonics>
honestly i have no idea why people hate on java, it's an awesome language
<ebonics>
verbose, but awesome
<powersurge>
the verbosity is the biggest reason
<powersurge>
and the ecosystem kind of sucks imo
<ebonics>
use scala then
<powersurge>
although new java is better than old java
<powersurge>
I intend to, friend :>
<ebonics>
what ecosystem
<maknz>
I would have thought Foo::Errors and Foo::Bar::Errors woudn't be any different than Foo::Errors and Foo::Bar::NotErrrors? I'm a bit :S on Ruby's modules though
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<powersurge>
stuff like struts and hibernate and all that crap
<powersurge>
newere java like play and dropwizard looks much more reasonable though
<ebonics>
that stuff is only for EE
<ebonics>
any EE stuff is bound to be stale
<powersurge>
I hear good things about springboot too but I haven't tried it first hand
<powersurge>
a big problem with java is it grew up side by side with xml and there's a load of cross polination
<ebonics>
i don't see how
<ebonics>
unless you mean ant
<shevy>
maknz you scope twice via :: there so they shouldn't be in the same namespace
<ebonics>
people don't use ant anymore though
<powersurge>
ant, the application server standard with java... the name escapes me
<powersurge>
pretty hard to say something like that in java imo
<powersurge>
change is slow to trickle down
<powersurge>
most *new* java uses gradle, sure
<maknz>
but the more-deeply-nested Errors shouldn't have any relation to the higher Errors, I would have thought? Or does the fact they're named the same, regardless of nesting, relate them somehow?
<ebonics>
no
<ebonics>
like
<ebonics>
even jdk uses gradle
<ebonics>
spring uses gradle
<ebonics>
etc
<powersurge>
mmm
<powersurge>
my experience is at least a year out of date
shuber_ has joined #ruby
<powersurge>
so it's entirely possible that the java I was looking forward to then is standard now
<powersurge>
the java ecosystem I was looking forward to*
<ebonics>
it still has some work to go to "modernize" it, but it's sort of the nice thing about java
<ebonics>
iin that you know you're not super far behind when you have to use it again
<ebonics>
and all your old stuff is going to run the same
<powersurge>
yea, that's a big selling point for java
<powersurge>
which is why companies build so much on it
<ebonics>
they have strict policies on backwards compatibility
<powersurge>
btu it's a double edged sword imo
<powersurge>
the language accumulates cruft
nettoweb has joined #ruby
<ebonics>
i don't really agree
jokester has quit [Quit: pwned by badguy]
<ebonics>
that's just a popular opinion that i think is baseless
bronson has joined #ruby
<shevy>
I always have to download something from oracle
<ebonics>
why ;o
<powersurge>
I'm obv out of my depth because it's been a while since I've done java dev for work
<shevy>
either it is the jre or it is that jdk
<ebonics>
you can get openjdk and openjre
<powersurge>
but my experience in java was pretty painful due to the libs we were using
<powersurge>
I had to use a soap client, for instance, and it required dumping a whole 50-ish megabytes of generated code
<ebonics>
java reminds me of like, centos of programming haha
<ebonics>
just super duper solid
<powersurge>
which I had to modify to support credentials and junk
<shevy>
isn't that PHP
<powersurge>
left a horrible taste in my mouth
<powersurge>
I'd say enterprise PHP has a lot in common with java dev, tbh
<ebonics>
i didn't know enterprise php existed
<powersurge>
the devs at work who do PHP every day tell me that symfony2 is pretty much a PHP port of... struts, I believe
<ebonics>
oh right, symfony
<ebonics>
yeah
<ebonics>
i prefer laravel
<powersurge>
spring I meant to say
<powersurge>
I misspoke
shuber_ has quit [Ping timeout: 258 seconds]
Dakuan has joined #ruby
<powersurge>
I don't really get enterprise php tbh
<powersurge>
it feels a lot like java so why not just make the leap and reap the advantages of the jvm
jokester has joined #ruby
<ebonics>
i think the benefit of php is that it's a lot easier to find developers
<powersurge>
you're emulating everything except the static typing and the speed which are the biggest things that matter
<ebonics>
and also it's faster to code with
nettoweb has quit [Client Quit]
<ebonics>
but i think php in general is far inferior to java
<powersurge>
it's easy to get scrubs & hacks in php sure
<powersurge>
but I'm sure there are more professional java programmers than php programmers
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
towski_ has joined #ruby
jarray52 has joined #ruby
gmas has joined #ruby
lidenskap has quit [Ping timeout: 272 seconds]
juanpaucar has joined #ruby
Coldblackice has quit [Ping timeout: 252 seconds]
Joufflu_ has joined #ruby
Joufflu_ has quit [Remote host closed the connection]
juanpaucar has quit [Ping timeout: 272 seconds]
crdpink2 has joined #ruby
zreisman_ has joined #ruby
crdpink has quit [Ping timeout: 265 seconds]
towski_ has quit [Remote host closed the connection]
Joufflu has quit [Ping timeout: 256 seconds]
shuber_ has joined #ruby
zreisman has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
_seanc_ has quit [Quit: _seanc_]
_seanc_ has joined #ruby
scooby1961 has joined #ruby
powersurge has quit [Ping timeout: 276 seconds]
Dakuan has joined #ruby
saadq has joined #ruby
shuber_ has quit [Ping timeout: 276 seconds]
bronson has quit [Ping timeout: 250 seconds]
Parker0 has joined #ruby
Dakuan has quit [Ping timeout: 250 seconds]
wallerdev has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ziprar has quit [Ping timeout: 244 seconds]
swgillespie has joined #ruby
ebonics has joined #ruby
<ebonics>
i broke the shit out of unity
<ebonics>
not even mad
djbkd has joined #ruby
ebonics has quit [Remote host closed the connection]
lidenskap has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
Deele has joined #ruby
multiscan has quit [Read error: Connection reset by peer]
multiscan has joined #ruby
ebonics has joined #ruby
ebonics has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
ebonics has joined #ruby
krz has joined #ruby
<xxneolithicxx>
anyone know if any gems that install cli bin tools? i need to compare my gem to another that includes bin's to figure out why its not adding my gem's bin files into the ruby's bin dir like it does for nokogiri
iwishiwerearobot has joined #ruby
lidenskap has quit [Ping timeout: 252 seconds]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
* baweaver
makes program into a one liner for amusement
creakybones has joined #ruby
creakybones has joined #ruby
tagrudev has joined #ruby
<Ox0dea>
baweaver: Shall we golf?
psy_ has quit [Ping timeout: 244 seconds]
zreisman_ has quit [Remote host closed the connection]
<sevenseacat>
i didnt actually read the code too closely.
<baweaver>
leave it in the comments section of aforementioned gist? :D
ndrei has quit [Remote host closed the connection]
<sevenseacat>
I'm really confused about the first file-reading part though
arietis has joined #ruby
ndrei has joined #ruby
ohaibbq has joined #ruby
hanmac1 has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
towski_ has joined #ruby
<baweaver>
Ox0dea: Do we want to count the string print?
<Ox0dea>
baweaver: Nah, just return a "tuple" containing the number of zeroes and ones.
aganov has joined #ruby
<baweaver>
98
<baweaver>
working on shortening a bit more
inndy has joined #ruby
inndy has left #ruby [#ruby]
<Ox0dea>
baweaver: #to_s doesn't pad.
juanpaucar has joined #ruby
<baweaver>
drat
<baweaver>
hm
<baweaver>
how much pad for a char was it again?
<baweaver>
I think it was 16, but way rusty there
<Ox0dea>
8.
jarray52 has left #ruby [#ruby]
sepp2k has joined #ruby
<Ox0dea>
baweaver: I got 66.
<Ox0dea>
It's gross, though.
<baweaver>
you'll win this one then
<baweaver>
I can't get far below 90
simpyll has quit [Ping timeout: 250 seconds]
juanpaucar has quit [Ping timeout: 240 seconds]
<Ox0dea>
`.join.count` feels so verbose here.
<baweaver>
116 :/
<Ox0dea>
How'd that happen?
Joufflu has quit [Read error: Connection reset by peer]
<baweaver>
You've probably got this one
<baweaver>
rjust
* baweaver
is also not familiar with bit mechanics
<Ox0dea>
I've posted mine, if that helps.
<Ox0dea>
There are any number of clever bit twiddle approaches, but I highly doubt any of them would be shorter than just using % string formatting.
<Ox0dea>
Then again...
* baweaver
goes hunting for his copy of Hacker's Delight
ndrei has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<baweaver>
I wonder if you can open a file as binary in ruby
_seanc_ has joined #ruby
<Ox0dea>
baweaver: Nah, there's #binread, but that's mostly for subverting the automatic CR/LF conversions.
<Ox0dea>
59.
<baweaver>
Worth a shot
<Ox0dea>
55.
<Ox0dea>
^_^
<sevenseacat>
hax
hsps_ has joined #ruby
simpyll has joined #ruby
* baweaver
bows
<Ox0dea>
I suppose I'll stop there.
ramfjord has quit [Ping timeout: 272 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
Ox0dea: Lot of time in C, or how does one get into such bit twiddling?
coderhs has quit [Ping timeout: 258 seconds]
<Ox0dea>
My final approach doesn't really twiddle any bits; it does use Numeric#[] to *access* the bits, though.
arietis has quit [Quit: Leaving.]
<Ox0dea>
You really can't go wrong reading Hacker's Delight to get better with bitwise arithmetic, but writing C now and again certainly doesn't hurt either.
<baweaver>
DevOps by trade, so I rarely touch lower level
<baweaver>
Though I do like hacking about a bit from time to time
towski_ has quit [Remote host closed the connection]
<Ox0dea>
To be sure, working at the higher levels is generally more enjoyable, but I can't help heeding the "call of the void" now and again.
<baweaver>
Last time I heeded it I ended up learning Haskell
<Ox0dea>
That is quite a ways from low-level, I should think.
<Ox0dea>
But I believe I took your point nonetheless.
<baweaver>
Yeah, functional programming is about as far from low level as you can get
<Ox0dea>
And yet it's all the lambda calculus at the bottom.
<Ox0dea>
There's a strange circularity there.
<baweaver>
Granted, but most of the point of it was focus on the problem instead of the machine
<Ox0dea>
Right, declarative programming, in essence.
<Ox0dea>
"What, now how."
<Ox0dea>
*not
<baweaver>
Logic programming is a bit of a trip too
<Ox0dea>
I've still not been able to convince myself to take that particular plunge.
<baweaver>
It's interesting if for no other reasons than finding a new way to think
<baweaver>
sevenseacat knows Prolog way better than I do though
Timba-as has quit [Quit: Be back later ...]
<sevenseacat>
o.o I haven't looked at prolog in like ten years
<baweaver>
(*read: she took a class on it and I didn't)
<sevenseacat>
I took *one* class on it
<Aeyrix>
Lol fucking prolog
<Ox0dea>
sevenseacat: How about Clojure's core.logic?
<Aeyrix>
I actually took a class in Prolog too.
* baweaver
ducks
<sevenseacat>
I know nothing about clojure
<sevenseacat>
am looking at elixir for shits and giggles
<Aeyrix>
The class introduced itself with 2001: A Space Odyssey.
<baweaver>
Aeyrix: How can you possibly go wrong from there?
<baweaver>
Aeyrix: depends on your moral compass and if your security expertise expands to wireless
<Aeyrix>
I have considered it.
<Aeyrix>
And it does. ;)
<baweaver>
I have a few 5+ mile antennas
ScriptGeek has quit [Disconnected by services]
<baweaver>
for reasons
<Aeyrix>
tbh if I did, you know, do that, I don't even think the people would notice.
_seanc_ has quit [Quit: _seanc_]
<Aeyrix>
I am a pretty light internet user. I don't even torrent.
<baweaver>
Used to work at a Wireless ISP as the only programmer
<baweaver>
got a lot of time to have fun with high powered antennas and automation
swgillespie has joined #ruby
sinkensabe has joined #ruby
Dakuan has quit [Ping timeout: 245 seconds]
* zotherstupidguy
morning everyone
MatthewsFace has quit [Remote host closed the connection]
Timba-as has joined #ruby
ohaibbq has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
saadq has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
scooby1961 has left #ruby [#ruby]
bruno- has joined #ruby
ohaibbq has joined #ruby
iwishiwerearobot has quit [Ping timeout: 245 seconds]
chinmay_dd has joined #ruby
<Ox0dea>
zotherstupidguy: Unlikely.
irobevjodu has quit [Ping timeout: 272 seconds]
konsolebox has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby
bronson has quit [Read error: Connection reset by peer]
bronson has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
Aswebb_ has joined #ruby
arup_r has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Timba-as has quit [Remote host closed the connection]
lidenskap has joined #ruby
freggles has quit []
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
Aswebb_ has quit [Ping timeout: 240 seconds]
<ex0ns>
Hi ! I've an issue with a Weechat script written in Ruby, nobody in #weechat was able to help me so I'll try here (I really have no idea of what it could be). I want to load the Sequel gem into my script, but when I load the script in Weechat I get the following error : "module_eval': cannot load such file -- sequel (LoadError)"
riotjones has joined #ruby
AlphaAtom has joined #ruby
<Radar>
ex0ns: Try "gem install sequel" first
lidenskap has quit [Ping timeout: 265 seconds]
<ex0ns>
Radar: I've done it and my script works when I load it in IRB
<Radar>
ex0ns: then I don't know what could be going wrong.
<ex0ns>
One strange point is that when I require rubygems
<ex0ns>
I have the following error [200~ uninitialized constant Encoding::UTF_7 (NameError)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcesariox has quit [Remote host closed the connection]
<Ox0dea>
Which versions of Ruby and WeeChat are you using?
<ex0ns>
ruby 2.2.0
<ex0ns>
Weechat 1.2
yardenbar has joined #ruby
unshadow has joined #ruby
<Ox0dea>
ex0ns: I suspect using an older version of Ruby would magically solve your problem. :/
<ex0ns>
I read that on Stackoverflow
<Ox0dea>
Did you try it?
<ex0ns>
I will try but I would love to understand why
ixti has quit [Read error: Connection reset by peer]
<Ox0dea>
It's very likely to do with WeeChat's plugin system mucking about with $LOAD_PATH.
ScriptGeek has joined #ruby
<ex0ns>
Ok i'm installing ruby 1.9 to see
arup_r has quit [Read error: Connection reset by peer]
bronson has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
multiscan has quit [Ping timeout: 240 seconds]
_ht has joined #ruby
<ex0ns>
Ox0dea: thank you for your help
<ex0ns>
if it works I might try to look deeper why it's not working
<Ox0dea>
ex0ns: Did downgrading do the trick?
<Ox0dea>
Ah, then thanks aren't in order just yet. :P
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arturaz has joined #ruby
Rickmasta has joined #ruby
rrichardsr3 has quit [Quit: The road to hell is paved with good intentions...]
conanza has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yardenbar>
Hi, I'm new to ruby so little guidance is needed. I'm trying to use https://github.com/siebertm/parse-cron to determine next cron execution time, can someone help? the example doesn't show how to read the 'crontab -l' content
tubuliferous has quit [Ping timeout: 246 seconds]
Brozo has joined #ruby
shuber_ has joined #ruby
fabrice31 has joined #ruby
ta has joined #ruby
ScriptGeek has quit [Ping timeout: 240 seconds]
Muhannad has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
tyfighter has quit [Quit: tyfighter]
shuber_ has quit [Ping timeout: 272 seconds]
surs has joined #ruby
sigurding has joined #ruby
iwishiwerearobot has joined #ruby
michael_mbp has quit [Excess Flood]
gauke has joined #ruby
michael_mbp has joined #ruby
surs has quit [Changing host]
surs has joined #ruby
doodleha_ has joined #ruby
ta has quit [Remote host closed the connection]
zacts has joined #ruby
Hounddog has joined #ruby
<zacts>
b haskell
doodleha_ has quit [Read error: Connection reset by peer]
ohaibbq has quit [Remote host closed the connection]
saadq has quit [Remote host closed the connection]
Guest24 is now known as lele_
saadq has joined #ruby
<Aeyrix>
yardenbar: It says in the README that this is not a scheduler. It's not reading crontab -l.
<Aeyrix>
It's making a fake crontab with the arguments you give, and then telling you when the next occurrence would be if that was in your crontab.
<yardenbar>
I don't need to schedule crons
<yardenbar>
I only need to determine the next run
<Aeyrix>
My point was it's not reading your crontab at all.
<Aeyrix>
It's just parsing the syntax.
doodleha_ has joined #ruby
<yardenbar>
So I'll manually parse the 'crontab -l' time config and pass it to the gem
<yardenbar>
10x Aeyrix
<Aeyrix>
If... if you want.
msgodf has joined #ruby
<Aeyrix>
Is there any reason you're parsing crontab with Ruby and not just parsing it manually?
<sevenseacat>
and people wonder why we drink.
<Aeyrix>
Hah.
doodleha_ has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 250 seconds]
Ilyes512 has joined #ruby
asmodlol has joined #ruby
doodleha_ has joined #ruby
edwinvdgraaf has joined #ruby
arietis has joined #ruby
roshanavand has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
kwd has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
doodleha_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
kwd has joined #ruby
dumdedum has joined #ruby
prillian5 has joined #ruby
hanmac has quit [Ping timeout: 256 seconds]
saadq has quit [Remote host closed the connection]
doodleha_ has quit [Ping timeout: 272 seconds]
tejasmanohar has joined #ruby
<tejasmanohar>
im trying to setup an app that just redirects all my traffic on one domain to another
<tejasmanohar>
like .io -> .com
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
use a proxy server
<tejasmanohar>
but redirect even the query parameters, url directories, etc.
<tejasmanohar>
hm lemme look apeiros
<apeiros>
or do a DNS redirect
ScriptGeek has joined #ruby
juanpaucar has joined #ruby
<tejasmanohar>
apeiros: i tried CloudFlare page rules but it seemed to not redirect my ? parameters
<apeiros>
I don't know what cloudflare page rules are
<tejasmanohar>
rules for URL forwarding in the CloudFlare panel
<tejasmanohar>
but yeah np
User458764 has quit [Ping timeout: 264 seconds]
<sevenseacat>
definitely something to do at the server config level, eg. with a server alias if using apache
<Aeyrix>
wtf just use a CNAME record.
<sevenseacat>
or even higher like that.
baweaver has quit [Remote host closed the connection]
<sevenseacat>
though having the same content available at two separate URLs is silly in terms of SEO (if you believe in that)
ramfjord has joined #ruby
ta has joined #ruby
User458764 has joined #ruby
MatthewsFace has joined #ruby
ta has quit [Remote host closed the connection]
ScriptGeek has left #ruby [#ruby]
juanpaucar has quit [Ping timeout: 256 seconds]
rubie has quit [Remote host closed the connection]
stoffus has joined #ruby
<tejasmanohar>
sevenseacat: redirect, not mask... so "same content" won't be available at two URLs i guess
doodleha_ has quit [Read error: Connection reset by peer]
<tejasmanohar>
Ah yeah
<tejasmanohar>
Let me look. Right now, I'm using Heroku w/ two domains pointed to the 1 app... but now that we bought .com I'm going to move .io to another app to redirect everything to the .com.
lidenskap has joined #ruby
user121212 has joined #ruby
Hirzu has joined #ruby
tesuji has joined #ruby
<tejasmanohar>
Aeyrix: about your comment earlier, i don't think CNAME can do http redirects...?
<tejasmanohar>
were you also thinking masking, not redirection?
dumdedum has quit [Ping timeout: 245 seconds]
<user121212>
Hello, I have image url and I want save it into the disk, Can I save the file without specifying the file name?
doodleha_ has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 265 seconds]
fabrice31 has joined #ruby
doodleha_ has joined #ruby
sevenseacat has quit [Remote host closed the connection]
Alina-malina has joined #ruby
sevenseacat has joined #ruby
<tejasmanohar>
sevenseacat: yeah its node w/ express
<tejasmanohar>
apeiros: "but I'd not use node.js for this for the same reason I wouldn't use ruby either." - what is that reason?
doodleha_ has quit [Read error: Connection reset by peer]
<sevenseacat>
because it's a server configuration concern
<tejasmanohar>
i guess its just overkill for something that could easily be handled withn server config
<tejasmanohar>
yeah
<sevenseacat>
not an application-level concern
<apeiros>
tejasmanohar: cannons to shoot sparrows
<tejasmanohar>
eh heroku messes up this picture :P - i could setup something on a linux box i guess
_blizzy_ has quit [Ping timeout: 256 seconds]
Muhannad has quit [Ping timeout: 272 seconds]
<tejasmanohar>
agreed
<apeiros>
I think the english idiom is: use a sledgehammer to crack nuts
<tejasmanohar>
yea
dumdedum has joined #ruby
rdark has joined #ruby
saadq has joined #ruby
anisha has joined #ruby
doodleha_ has joined #ruby
<Aeyrix>
Web.js
<Aeyrix>
My sides are currently reporting from planet Venus
doodleha_ has quit [Read error: Connection reset by peer]
slackbotgz has joined #ruby
<al2o3-cr>
!spider
bakednotfried has joined #ruby
<Aeyrix>
You what?
doodleha_ has joined #ruby
<tejasmanohar>
?
<al2o3-cr>
i've got to many terminals open :(
<al2o3-cr>
and i'm skipping back and forth
shuber_ has joined #ruby
<sevenseacat>
yay I made all the code work! ...now I need tofix all the tests
doodleha_ has quit [Read error: Connection reset by peer]
<Aeyrix>
That sounds
<Aeyrix>
Backwards
<sevenseacat>
shh
<Aeyrix>
Aren't you meant to do it the other way?
MatthewsFace has quit [Remote host closed the connection]
<Aeyrix>
WOW
<sevenseacat>
probably
<apeiros>
driven tests design
<tejasmanohar>
bdd (but i shouldn't be talking :P )
<Aeyrix>
Lmao
<tejasmanohar>
lol
<sevenseacat>
(and by fix i mean delete tests as theyre no longer necessary)
<Aeyrix>
O
<tejasmanohar>
LOL
dain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
sounds microsoftian
<apeiros>
"our tests fail!" - "delete the test and specify the current behavior as intended"
doodleha_ has joined #ruby
dain has joined #ruby
charliesome has quit [Quit: zzz]
<tejasmanohar>
sevenseacat: about your comment from earlier, do you think i should serve all my content on either a www subdomain or apex domain and redirect the other but not both?
dain has quit [Client Quit]
<tejasmanohar>
(from the SEO perspective)
<Aeyrix>
Help
<Aeyrix>
Me
<sevenseacat>
definitely.
<sevenseacat>
pick one and redirect the other to it.
<Aeyrix>
Don't use www
<sevenseacat>
I'd lean that way also.
bruno- has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
<apeiros>
Aeyrix: but it means WORLD WIDE WEB! everybody loves the www. how'd you know the url is not about ftp!?
TheHodge has joined #ruby
shuber_ has quit [Ping timeout: 272 seconds]
<sevenseacat>
:P
ta has joined #ruby
<Aeyrix>
Wait
<Aeyrix>
I don't even use subdomains for that.
<sevenseacat>
must be late in theday, i actually started typing a reply to that.
<Aeyrix>
Do you ssh into ssh.domain.com?
<tejasmanohar>
sevenseacat: yeah, i don't like the www either
<Aeyrix>
Even my IRC network is in the top level.
<apeiros>
telnet.domain.com
<apeiros>
what's ssh?
<Aeyrix>
domain.com
<sevenseacat>
even later for Aeyrix who needed the sarcasm tags :P
<Aeyrix>
Lol
<Aeyrix>
Oi
<Aeyrix>
Wait shit
<Aeyrix>
You were being sarcadgic
<Aeyrix>
... Sarcastic *
<Aeyrix>
Thanks phone.
* hanmac1
votes for <sarcasm> tags in HTML6
chthon has joined #ruby
saadq has quit [Remote host closed the connection]
<tejasmanohar>
Aeyrix: i dont wanna turn off browser integrity checks on cloudflare :P
<tejasmanohar>
even tho theyre stupid, anyone can get around them using like phantomjs to render js
<tejasmanohar>
or selenium
<apeiros>
"It's a unique utility that lets you … perform competitive intelligence in a way that wasn't possible before." - say what?
<tejasmanohar>
? apeiros
yh__ has joined #ruby
<tejasmanohar>
what are we referring to here?
Aswebb_ has quit [Ping timeout: 272 seconds]
<apeiros>
tejasmanohar: your url, wheregoes.com
Affix has joined #ruby
<Aeyrix>
That site
<tejasmanohar>
apeiros: oh lol, i didn't read the description or any of the text there... i just found the tool and it served me well
<tejasmanohar>
"It's a unique utility that lets you troubleshoot links and perform competitive intelligence in a way that wasn't possible before."
Affix is now known as Guest85503
<tejasmanohar>
competitive intelligence wtf
<apeiros>
I guess it's the same as with lyrics
doodleha_ has quit [Read error: Connection reset by peer]
<apeiros>
if you enjoy a song, never try to understand the lyrics
<tejasmanohar>
"you won't be disappointed"... what is this? an ad?
<tejasmanohar>
lol
<tejasmanohar>
amen
<Aeyrix>
Only $39.99 a month.
edwinvdgraaf has quit [Read error: Connection reset by peer]
<sevenseacat>
apeiros: lol
<adaedra>
apeiros: there are song I enjoy which I also enjoy the lyrics.
<adaedra>
songs
<sevenseacat>
90% of song lyrics are just meaningless
<sevenseacat>
i sing along to them all anyway
fedexo has quit [Ping timeout: 265 seconds]
<sevenseacat>
sometimes theyre even in english
edwinvdgraaf has joined #ruby
Guest85503 is now known as Affix
doodleha_ has joined #ruby
<apeiros>
adaedra: yeah. it happens. but I think my general experience is like 9 out of 10 songs I stop liking once I actually listen to the lyrics.
<sevenseacat>
some songs are downright disturbing when you listen to the lyrics
Affix is now known as Guest39165
<adaedra>
Lucy in the sky with diamonds ♪
<apeiros>
yellow submarine…
<sevenseacat>
theres one example i have on the tip of my tongue but i cant remember it
michael_mbp has quit [Excess Flood]
doodleha_ has quit [Read error: Connection reset by peer]
einarj has joined #ruby
<tejasmanohar>
for detecting a mobile browser and displaying a share on email vs a share on SMS link... there's nothing better than user agents, right?
Guest39165 has quit [Changing host]
Guest39165 has joined #ruby
<adaedra>
At least you can taste it, sevenseacat
<sevenseacat>
tastes like failure.
<adaedra>
tejasmanohar: you can also have both links, and hide based on CSS media queries
michael_mbp has joined #ruby
Guest39165 is now known as Affix
<adaedra>
but it may be less accurate
<tejasmanohar>
adaedra: yeah but i dont like to change _functionality_ based on screen dimensions... only display
<tejasmanohar>
yeah
oo_ has joined #ruby
<tejasmanohar>
sorry, i'm not really talking about ruby here today am i :P ... but i guess none of us are
doodleha_ has quit [Read error: Connection reset by peer]
<_ht>
Does anyone know if there are (long) logs of this channel available someplace?
<al2o3-cr>
_ht: check /topic
<_ht>
Thanks, that last bit was hidden by the GUI :-(
doodleha_ has joined #ruby
Dakuan has quit []
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
doodleha_ has quit [Read error: Connection reset by peer]
saadq has quit [Remote host closed the connection]
msgodf has quit [Ping timeout: 265 seconds]
proxima has joined #ruby
quimrstorres has joined #ruby
<proxima>
I have installed shopify_api and shopify_cli too. But still on writing 'shopify' command in terminal this gives error: shopify command is no longer bundled with shopify_api. if you need these tools, install shopify_cli gem. Thanks in advance.
startupality has joined #ruby
<jhass>
proxima: what does type -a shopify print?
workmad3 has joined #ruby
<proxima>
jhass: you mean to write "-a shopify" in command prompt? I wrote this then it gives: -a is not recognised as internal or external command, operable or batch file.
doodleha_ has joined #ruby
<jhass>
no, type is the command
granthatcher has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
poguez_ has quit [Quit: Connection closed for inactivity]
albert_delta has joined #ruby
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
<proxima>
jhass: the system cannot find the file specified. error occured while processing: -a.the system cannot find the file specified. error occured while processing: shopify
<arup_r>
But I trust there is a better regex for that
<arup_r>
I am not good in Regex mapping
<arup_r>
:/
Igorshp has quit [Read error: Connection reset by peer]
<jhass>
proxima: that's for running: type -a shopify ? what's your shell?
Igorshp has joined #ruby
oo_ has quit [Remote host closed the connection]
Igorshp has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
<proxima>
I am writing it in comand prompt. Please specify where i am supposed to write it and what line.
<proxima>
jhass: I am new to this.
bronson has joined #ruby
mengu has joined #ruby
<jhass>
"command prompt"? so you're on windows?
<proxima>
jhass: yes I am on windows.
oo_ has joined #ruby
<jhass>
that would've been some important piece of information ;)
<proxima>
jhass: ok so what should I do now to solve the issue?
<jhass>
mh, I have no clue how to debug $PATH issues on windows
GriffinHeart has quit [Remote host closed the connection]
<jhass>
does ruby -S shopify print anything different?
Takle has joined #ruby
GriffinHeart has joined #ruby
<adaedra>
what's the issue, jhass proxima ?
krz has joined #ruby
<proxima>
jhass: no problem. Thanks. but i tried to make the environment path to be clear in windows but still its giving error. Thanks for your help
<adaedra>
proxima: what does `echo %PATH%` outputs?
chinmay_dd has quit []
bronson has quit [Ping timeout: 246 seconds]
mandarinkin has joined #ruby
<proxima>
adaedra: It gives big list of c:Program data etc.
<adaedra>
proxima: to copy from command prompt, click on program icon, go to Edit > Select, select the output (rectangular select), and press enter, iirc
<proxima>
adaedra: This is the exact output C:\Users\wizrocket\Desktop\Hello_World>echo %PATH% C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\Sy stem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\I ntel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64; C:\Program Files\Java\jdk1.8.0_25\bin; C:\Program Files (x86)\Skype\Phone\; C:\ Python27\; C:\Python27\Script
Takle has quit [Ping timeout: 250 seconds]
<adaedra>
mmmh, that's weird, I see no reference to Ruby at all
arup_r has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 246 seconds]
<adaedra>
How did you install Ruby?
<proxima>
adaedra: yes but that should not happen, as while installing I marked the boxes for adding the path to environment. So, what you suggest now?
<sevenseacat>
its incomplete, thats likely why
GriffinHeart has quit [Remote host closed the connection]
Igorshp has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
<adaedra>
proxima: are you sure the whole content of output was pasted, as IRC has a message length limit? Try going through gist
Takle has joined #ruby
Igorshp has joined #ruby
iamdoo2 has quit []
<proxima>
adaedra: yeah you are right more than half part was not copied here. here is the rest part: C:\Python27\Lib;C: \Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Ruby22-x64\bin;C:\Windows\system32\Wind owsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32
<proxima>
adaedra: so ruby is here. Now whats the issue. Any further checking parameter?
<adaedra>
proxima: gem env, but please, gist it this time rather than pasting it here ;)
startupality has quit [Quit: startupality]
sepp2k has quit [Ping timeout: 264 seconds]
multiscan has quit [Remote host closed the connection]
multiscan has joined #ruby
iamninja has quit [Ping timeout: 256 seconds]
<al2o3-cr>
Is CGI.h same as CGI.escapeHTML ?
<adaedra>
proxima: you alive?
<proxima>
adaedra: If you dont mind. Can you tell how to gist instead of copy-paste. i got one method by github, but due to some network error I am not able to access it. So, tell me if any other way of gist is available.
<adaedra>
ah
n008f4g_ has joined #ruby
<adaedra>
there's other paste system available, I don't remember which currently :x
shuber_ has joined #ruby
<proxima>
adaedra: so I hope you do not mind if I again paste the results over here.
<adaedra>
I'm sure lot of people will mind, see topic
<adaedra>
try with pastie.org
Ropeney has joined #ruby
<adaedra>
I think you can redirect output in a file like in linux (gem env > file.txt) if it's easier than copy-paste
<adaedra>
But I'm not sure, haven't used Windows console for a while
<proxima>
The error is this: I have installed shopify_api and shopify_cli too. But still on writing 'shopify' command in terminal this gives error: shopify command is no longer bundled with shopify_api. if you need these tools, install shopify_cli gem.
<adaedra>
yeah
idakyne has joined #ruby
idakyne has quit [Remote host closed the connection]
<adaedra>
it seems that they renamed the command when moving in a separate gem
<adaedra>
so you should use shopify-cli in place of shopify
idakyne has joined #ruby
chipotle has joined #ruby
<proxima>
adaedra: yes, thanks a lot. :)
<adaedra>
yw
fabrice31 has quit [Remote host closed the connection]
prillian5 has joined #ruby
sk321 has joined #ruby
idakyne has quit [Quit: idakyne]
Rickmasta has joined #ruby
DEA7TH has joined #ruby
quimrstorres has joined #ruby
tejasmanohar has quit [Ping timeout: 264 seconds]
wildroman2 has joined #ruby
startupality has quit [Quit: startupality]
arup_r has quit [Ping timeout: 258 seconds]
tubuliferous has joined #ruby
startupality has joined #ruby
vikaton has joined #ruby
startupality has quit [Client Quit]
saadq has joined #ruby
leafybasil has joined #ruby
anaeem1 has joined #ruby
tubuliferous has quit [Ping timeout: 272 seconds]
DLSteve_ has joined #ruby
casadei has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
did you install gem dependencies, and if you did, did you do it in the same user as the webserver runs and in the same ruby environment (i.e. rvm rbenv)
<adaedra>
?
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Nahra has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<uhsf>
gems are installed as user, I will try to install as root
<adaedra>
no
<adaedra>
?root
<ruboto>
General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<DLSteve_>
hello?
<adaedra>
hallå
quimrsto_ has joined #ruby
<DLSteve_>
sorry laged out for a sec
<DLSteve_>
/usr/lib/ruby/site_ruby/2.2.0/ is user ruby version
<DLSteve_>
/home/uhsf/.gem/ruby/2.2.2/ is passenger ruby version
<DLSteve_>
so def an environment issue.
<adaedra>
seems so
<adaedra>
also, you changed nick without telling so, I was confused for a second here.
michael_mbp has joined #ruby
<DLSteve_>
changed nick?
<uhsf>
I didn't change nick.
quimrstorres has quit [Ping timeout: 256 seconds]
<adaedra>
:|
<DLSteve_>
I was trying to type "/home/uhsf/.gem/ruby/2.2.2/" but the / ate my input.
<DLSteve_>
So I thought I had laged out.
<uhsf>
the 2.2.0 and 2.2.2 thing is what I was looking to fix
<DLSteve_>
you need to use the 2.2.2 env to install all the gems.
<adaedra>
ah
<DLSteve_>
your system default is 2.2.0 so that is what is causing the issue.
<adaedra>
sorry, thought you were the same person, misread >_<
<dudedudeman>
it looks like it is a searchable base of gems, and then it rates them based on how well they've been maintained and how usable they are, and if they have good docs
That1Guy has joined #ruby
scripore has joined #ruby
quimrsto_ has quit [Ping timeout: 272 seconds]
DLSteve_ has quit [Remote host closed the connection]
<adaedra>
looks nice
nettoweb has quit [Client Quit]
<dudedudeman>
agreed
hanmac1 has quit [Quit: Leaving.]
<adaedra>
would be good to have a comparaison feature
<dudedudeman>
since i'm fairly new to the ruby community, i have a hard time trusting gems sometimes, especially if they're something that i don't know much about
<dudedudeman>
oooo, that would be neat
<adaedra>
a little bit like ruby-toolbox.org does, but with more complete and useful information
<adaedra>
s/org/com/
yh__ has joined #ruby
nhhagen has quit [Ping timeout: 272 seconds]
<dudedudeman>
lol
anaeem1 has quit [Ping timeout: 244 seconds]
<dudedudeman>
speaking of .org/.com, i had been building a e-commerce site for a buddy of mine, and we go to buy his domain, and come to find out his direct competitor had purchased a good while ago. .org was the only thing available. lol
<dudedudeman>
cybersquatting is dumb
<adaedra>
it is
<daxroc>
Anyone know a pure ruby library to create an ISO image (win/linux/mac) ?
<adaedra>
domain hacks are a good thing for that
<dudedudeman>
domain hacks?
<adaedra>
as you remember the TLD with it
jespada has quit [Read error: Connection reset by peer]
<adaedra>
yeah, when you use the tld as part as the address
<adaedra>
like dudedudem.an
jespada has joined #ruby
rbennacer has joined #ruby
<dudedudeman>
ahhh, yeah i had seen a couple of those. i guess we wanted something for him that was easily just typeable
<adaedra>
but heh, obtaining one is much harder.
<jhass>
well, those 700 new gtlds help a bit
rbennacer has quit [Remote host closed the connection]
umgrosscol has joined #ruby
rbennacer has joined #ruby
<dudedudeman>
hey! jhass said something and i actually understood all of those words!
<adaedra>
:)
<jhass>
heh
<dudedudeman>
that's not a knock btw, you're just much more robust in your knowledge of this IRC's subject matter
<adaedra>
jhass: true, it helps a bit.
<adaedra>
now, what kind of hack will I be able to do with .paris?
<dudedudeman>
sleepin.paris?
<dudedudeman>
that could be a cool hotel/travel site
<jhass>
taken, I bet
<adaedra>
yep
<bkxd>
menagein.paris
<adaedra>
NXDOMAIN
That1Guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anaeem1 has joined #ruby
balazs has joined #ruby
horsecowdog has joined #ruby
ixti has joined #ruby
sandelius has joined #ruby
unshadow has joined #ruby
schiz has joined #ruby
fu2ristiq has joined #ruby
northfurr has joined #ruby
fu2ristiq has left #ruby [#ruby]
gambl0re has quit [Ping timeout: 255 seconds]
cirn0 has quit [Remote host closed the connection]
That1Guy has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
krz has joined #ruby
workmad3 has joined #ruby
shuber_ has joined #ruby
volcanix has joined #ruby
lyuben_ has joined #ruby
tubuliferous has joined #ruby
Buck has joined #ruby
multiscan has quit []
<Buck>
I'm trying to map an array to an associative array, but failing: h.each_with_index.map { |c,i| {c => i}}
<Buck>
that will just give me an array of associative arrays with just one element
<Buck>
how can do it correctly?
<jhass>
it's called hash in Ruby, general name is map ;)
Ilyes512 has quit [Read error: Connection reset by peer]
Ilyes512_ has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
tagrudev has quit [Remote host closed the connection]
railsraider has joined #ruby
davispuh has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
nhhagen has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 272 seconds]
lxsameer has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
gusto has quit [Quit: Leaving]
poguez_ has joined #ruby
starship is now known as duracrisis
lxsameer has joined #ruby
IrishGringo has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
asmodlol has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
ascarter has joined #ruby
CustosLimen has quit [Ping timeout: 245 seconds]
nfk has quit [Quit: yawn]
jespada has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
tjohnson has joined #ruby
asmodlol has joined #ruby
powersurge has joined #ruby
jayeshsolanki has quit [Ping timeout: 264 seconds]
startupality has quit [Read error: Connection reset by peer]
anaeem1 has quit [Remote host closed the connection]
Buck has left #ruby ["Leaving"]
CustosLimen has joined #ruby
startupality has joined #ruby
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ebbflowgo has quit [Ping timeout: 265 seconds]
CloCkWeRX has joined #ruby
jmignault has joined #ruby
casadei has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
<izzol>
hmm
someword has quit [Quit: Leaving.]
<izzol>
how to handle the STDIN in ruby?
<izzol>
I found few examples but now sure which method is the best.
<izzol>
One is executing code with -n.
<izzol>
I would like to do something like: $test = join( '', <STRING>); (perl:P)
Laptyp has joined #ruby
<Laptyp>
hey
<izzol>
of course <STDIN>.
Synthbread has quit [Quit: Leaving]
Synthead has joined #ruby
<jhass>
izzol: prefer $stdin over STDIN
<jhass>
STDIN is a backup for easier resetting of $stdin
<izzol>
jhass: STDIN.gets ?
<jhass>
no, $stdin.gets
juanpaucar has joined #ruby
<jhass>
or plain gets from Kernel which delegates to ARGF.gets which delegates to $stdin.gets
riotjones has quit [Remote host closed the connection]
ebbflowgo has joined #ruby
anisha has quit [Quit: Leaving]
stoffus has quit [Quit: leaving]
dsathe has joined #ruby
freerobby has joined #ruby
postmodern has joined #ruby
Osz has joined #ruby
iwishiwerearobot has quit [Ping timeout: 256 seconds]
anisha has joined #ruby
sinkensabe has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
juanpaucar has quit [Ping timeout: 255 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zotherstupidguy>
anybody saw the hololens of microsoft, please tell me there is an opensource ver of that in the making!
<powersurge>
I think the closest you'll get is google cardboard. which isn't open source and isn't anything like hololens
someword has joined #ruby
mistermocha has quit [Ping timeout: 255 seconds]
<powersurge>
so not really afaik
gambl0re has joined #ruby
<mduk>
there wasn't for kinect either until someone wrote them. give it time ;)
<powersurge>
yea, but the current state of things the answer is no
<jhass>
that idea is obvious, there will once the tools/materials become cheap enough
<mduk>
that was the state of things with the kinect too until the state changed
<dsathe>
Hello folks I have an interesting question. Suppose I have a fairly parallel application running multiple processes , each process runs a bunch of worker threads, using a shared variable (threads only read its value ) so mutex is probably not required (is this assumption valid ?). Now i would want to modify the shared variable without bringing down the process using signal.trap to do the bidding. What would be the implications of this
Osz has left #ruby [#ruby]
<jhass>
hat depends a lot on the shared state, how it's used and how it's modified
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<mduk>
moral of the story? give it time :P
<dsathe>
its a simple dict in the real use case
<dsathe>
the threads lookup values from it
<jhass>
?fake
<ruboto>
Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<jhass>
whether the shared state is a Fixnum or a Hash affects a real lot of my questions
senayar has quit [Remote host closed the connection]
Goldfish has joined #ruby
<dsathe>
jhass: I really couldn't do that for reasons out of my hand , besides its a part of a large codebase so it would lack context , let me write the example to better illustrate the use case , gimme a bit
moeSeth has quit [Quit: Connection closed for inactivity]
<jhass>
in fact in MRI assigning key/values to the hash in place is safe, but not in say JRuby
<jhass>
you can also edit gists ;)
<dsathe>
yeah im using forking so on mri
davispuh has quit [Read error: Connection reset by peer]
davispuhh has joined #ruby
<jhass>
oh, well, changing it in the parent process won't change it in the child processes
Ilyes512_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dsathe>
i maintian a manager process that can modify the lookup for which im guessing signals is a good approach
<dsathe>
The key question being what happens to each thread thats already started executing
<dsathe>
each thread takes say 1-2 sec to run, IO intensive stuff hence this apporach to begin with
<jhass>
assigning to an instance variable is atomic
<dsathe>
what value will it see
<jhass>
well, that's random
<jhass>
depends on whether your signal handler runs before or after the thread read the instance variable
pdoherty has joined #ruby
<dsathe>
in a more complex case if the lookup were a Array type and im using some select on it , a signal shows up while the select op is runing what happens in that case ?
<jhass>
but that'll be true with locking too
<jhass>
well, that's the cases you want to avoid
<dsathe>
i know its rarae but that is a race condition as i understand the Array.select is not atomic
<jhass>
which is why I asked for your usecase
snockerton has joined #ruby
<jhass>
if you iterate, you want to lock (perhaps a read write lock)
<dsathe>
haha fair point let me get rid of the other code that I probabluy do not want to expose and give you something more concrete, really appreciate the patience
<jhass>
if you do simple lookups through the instance var and just the var a new object instead of changing the existing one, you're as safe as it gets
<jhass>
*just assign
<dsathe>
hmm yeah that would be good so within the thread i could do foo=@lookup and iter through foo
<jhass>
yes, that will protect against cases like if @foo.size > 0; @foo.operation
<jhass>
(again, given there's no other thread modifying the object)
Igorshp has quit [Remote host closed the connection]
fabrice31 has quit [Remote host closed the connection]
<jhass>
lupine: oh, then rm -rf / and yell hacked?
<dsathe>
vhass & other kind folks https://gist.github.com/dhananjaysathe/9250f66de01b4cacfeca this is exactly the way it is being used , sorry for the vagueness earlier I should have been a lot more clear , i understand its hard to gauge finer nuances with finer implementation details
failshell has quit []
<dsathe>
using ruby 2.0.0
<izzol>
jhass: better, RealMarc 0m0.021s, but still in perl it's: RealMarc 0m0.004s :(
livathinos has quit []
Igorshp has quit [Ping timeout: 240 seconds]
<jhass>
dsathe: okay, if you do the assignment in an atomic step like you've shown and really have no interdependent accesses to @lookup, like shown, then you're safe
shuber_ has quit [Ping timeout: 272 seconds]
<jhass>
no amount of locking will make a difference
jpfuentes2 has joined #ruby
<dsathe>
jhass the parent process will just dispatch the signals each child will rebuild lookup ;) im aware changes in the parent do not show up in the child . The parent is basically just a "manager" of sorts for a bunch of forked children
Igorshp has joined #ruby
<izzol>
So it looks like while() in perl is 2-3x faster then in ruby (somehow) :(
Hijiri has quit [Ping timeout: 265 seconds]
alex88 has quit []
mahtennek has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
ringarin has quit [Quit: Leaving]
rubie has joined #ruby
<dsathe>
jhass thank you :)
Macaveli has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hijiri has joined #ruby
anaeem1 has quit [Remote host closed the connection]
EasyCo has quit [Quit: Connection closed for inactivity]
psy_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
HotCoder has joined #ruby
yardenbar has quit [Quit: Leaving]
aryaching has quit [Ping timeout: 250 seconds]
tejasmanohar has quit [Read error: Connection reset by peer]
startupality has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
codeFiend has quit [Quit: codeFiend]
bronson has quit [Ping timeout: 245 seconds]
commondream has quit [Remote host closed the connection]
ziprar has joined #ruby
ziprar has joined #ruby
yfeldblum has joined #ruby
commondream has joined #ruby
vikaton has quit []
startupality has joined #ruby
anaeem1_ has quit [Ping timeout: 272 seconds]
Papierkorb has joined #ruby
lyuben_ has quit [Quit: This computer has gone to sleep]
Hounddog has quit [Read error: Connection reset by peer]
speakingcode has quit [Ping timeout: 264 seconds]
anaeem1_ has joined #ruby
ItSANgo_ has joined #ruby
barkerd427 is now known as zz_barkerd427
ItSANgo__ has quit [Ping timeout: 245 seconds]
Rollabunna has joined #ruby
davispuhh has quit [Read error: Connection reset by peer]
davispuh has joined #ruby
woodennails has joined #ruby
<jhass>
izzol: mmh, in my shell that measures the time of the cat command only
lolmaus_ has joined #ruby
lxsameer has quit [Quit: Leaving]
axilla has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
commondream has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 256 seconds]
commondream has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
izzol: I think it's just bootup time, IO.copy_stream shows the same times
wildroman2 has quit [Remote host closed the connection]
commondream has quit [Ping timeout: 256 seconds]
mrdmi has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
susmus has joined #ruby
esplainisix has joined #ruby
Eiam has quit [Ping timeout: 240 seconds]
<esplainisix>
Hi all
riotjones has joined #ruby
railsraider has quit [Quit: railsraider]
<jhass>
hi
bronson has joined #ruby
jpfuentes2 has quit [Remote host closed the connection]
<dsathe>
that's interesting so ruby implicitly created a copy of the object when i executed select ?
St1gma has joined #ruby
<jhass>
well, yes, it's just a reference update, the select operates on self, not the variable
mrdmi has joined #ruby
ascarter has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 264 seconds]
riotjones has quit [Ping timeout: 246 seconds]
<dsathe>
so function here behave call by value
<dsathe>
TIL
<jhass>
no, it's all call by reference
<dsathe>
out of curiosity how can i know this ?
<jhass>
variables are just references to an object. when you do def foo(a); end; b = :bar; foo(b), you do not pass b to foo, you pass a reference to :bar
<dsathe>
oh so the function call operated on the older reference , the new assignment just updated the ref to the variable , so technically the function still has the old ref so it *just works*
<jhass>
so while inside foo there are two references to the object :bar, the local a of the scope of the method and the local b of the toplevel scope
<dsathe>
is that approximately right ?
<jhass>
yes
<dsathe>
nice
<dsathe>
thank you so much
banister has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
anisha has quit [Quit: Leaving]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
imperator has joined #ruby
bronson has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
arietis has quit [Quit: Leaving.]
tubuliferous has joined #ruby
edwinvdgraaf has quit [Ping timeout: 272 seconds]
railsForDaiz has joined #ruby
baroquebobcat has joined #ruby
mrdmi has quit [Ping timeout: 244 seconds]
tubuliferous has quit [Ping timeout: 265 seconds]
kinduff has quit [Quit: Saliendo]
<adaedra>
Do you know a gem which could search templates, given a name, in multiple view paths, like sinatra does?
darkf has quit [Quit: Leaving]
MasterPiece has joined #ruby
gluten_hell has quit [Quit: Computer has gone to sleep.]
anaeem1_ has quit [Remote host closed the connection]
vt102 has joined #ruby
blandflakes has joined #ruby
<eam>
but you know, it has dollar signs on the variables :)
<ljarvis>
none of that refutes the claim that ruby is more readable...
hmnhf has quit [Ping timeout: 250 seconds]
<elfuego>
I have a ruby script to generate 20 million row csv file, but I find it takes too long to generate, I am running this on a machine with intel xeon processor which stays at 26 % and 30 gb of ram and ruby only occupies 10 MB of ram. Is there a default cap on ruby memory utilization?
<ljarvis>
elfuego: Ruby is slow
<canton7>
writing to disk?
<elfuego>
canton7: yes
shuber_ has joined #ruby
railsraider has joined #ruby
<elfuego>
canton7: disk isn’t maxed out either
<elfuego>
canton7: 10 MB/s
<jhass>
post your script, maybe there's a low hanging fruit
mrdmi has joined #ruby
<canton7>
how many cores?
lnr has joined #ruby
lnr has quit [Max SendQ exceeded]
lnr has joined #ruby
lnr has quit [Max SendQ exceeded]
<railsraider>
hi, im trying to make a logger that will automatically add the class name, module name, and method in it’s in http://pastie.org/10208255
lnr has joined #ruby
lnr has quit [Max SendQ exceeded]
<railsraider>
its always showing the extend method as the method name
<eam>
ljarvis: sure it does
davedev2_ has joined #ruby
_seanc_ has quit [Quit: _seanc_]
lnr has joined #ruby
<railsraider>
please help
lnr has quit [Max SendQ exceeded]
xxneolithicxx has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
lnr has joined #ruby
lnr has quit [Max SendQ exceeded]
davedev24_ has quit [Ping timeout: 256 seconds]
<ljarvis>
railsraider: you'll have to parse caller. I think __method__ will always be explicit
lnr has joined #ruby
lnr has quit [Max SendQ exceeded]
<apeiros>
railsraider: Module.nesting always refers to the place in the code it is. like __LINE__ or __FILE__
<railsraider>
at the moment i have to this at every method logger.progname = "#{Module.nesting.first.to_s} #{__method__}"
lnr has joined #ruby
cirn0 has quit [Ping timeout: 276 seconds]
<railsraider>
im trying not to repeat myself
_seanc_ has joined #ruby
<railsraider>
looks to me like the callback for extend should be able to accept the method name somehow
<railsraider>
but i can’t figure it out
schiz has left #ruby ["WeeChat 1.2"]
v0n has quit [Quit: WeeChat 1.0.1]
bb010g has quit [Quit: Connection closed for inactivity]
<railsraider>
i tried also using caller_locations(1,1)[0].label
<canton7>
elfuego, how many cores do you have?
s2013 has joined #ruby
cirn0 has joined #ruby
<railsraider>
but that doesn’t see the correct method it was trigger if the method im in is in private section
<elfuego>
canton7: getting that info now
mello is now known as Guest41146
<railsraider>
i would love to get any suggestions on how to make a logger that looks like this: I, [2015-05-26T18:37:17.998636 #55331] INFO -- AsCombinedMetrics::Cli::Config load_config: Loading config file (../combinedMetrics.yml)
cirn0 has quit [Remote host closed the connection]
<jhass>
elfuego: given you generate uuids, do you have a good source for randomness? what's cat /proc/sys/kernel/random/entropy_avail while it's running?
<adaedra>
ah no
lnr has quit [Ping timeout: 255 seconds]
cirn0 has joined #ruby
shuber_ has quit [Remote host closed the connection]
<adaedra>
railsraider: I had one (got the wrong thing), let me find it
<railsraider>
thanks adaedra im trying to build a gem that will be executable
<elfuego>
canton7 the overall cpu is 26% - its a windows server it doesn’t show usage on each core
<jhass>
sounds like it's maxing out a core for you then too
lnr has joined #ruby
lnr has quit [Max SendQ exceeded]
<railsraider>
im using thor and aws-sdk for the majority of that
<shevy>
"Builds a .gem file given a Gem::Specification. A .gem file is a tarball which contains a data.tar.gz and metadata.gz, and possibly signatures."
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
dumdedum has quit [Ping timeout: 245 seconds]
juanpaucar has joined #ruby
<shevy>
hmm how to grab 10 random elements of an Array? Should I use .sample 10 times or is there a better way?
cirn0_ has joined #ruby
cirn0 has quit [Read error: Connection reset by peer]
codeFiend has quit [Quit: codeFiend]
imperator2 has joined #ruby
oo_ has quit [Remote host closed the connection]
* xxneolithicxx
Universal consensus on optional keywords: I dont always use optional keywords, but when I do, I use them in a way that suits my style (screw yours :-) )
baweaver has quit [Remote host closed the connection]
railsraider has quit [Quit: railsraider]
baweaver has joined #ruby
oo_ has joined #ruby
cirn0_ has quit [Remote host closed the connection]
ravenreborn_ has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
juanpaucar has quit [Ping timeout: 276 seconds]
andikr has joined #ruby
mello has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has quit [Ping timeout: 245 seconds]
cirn0 has joined #ruby
serivichi has quit [Ping timeout: 255 seconds]
s2013 has joined #ruby
simpyll has quit [Ping timeout: 245 seconds]
jpfuentes2 has quit [Ping timeout: 245 seconds]
djbkd has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
ndrei has joined #ruby
djbkd has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
s2013 has quit [Client Quit]
codeFiend has joined #ruby
baroquebobcat has joined #ruby
hololeap has quit [Ping timeout: 250 seconds]
gusto has joined #ruby
Pathfinder has quit [Ping timeout: 272 seconds]
<rindolf>
shevy: hi.
<rindolf>
shevy: can the elements repeat?
ndrei has quit [Ping timeout: 246 seconds]
<jhass>
shevy: .sample(10) for 10 unique, Array.new(10) { .sample } for 10 with repetition
<shevy>
oh cool
<shevy>
.sample allows arguments - I don't think I used it with the argument-variant yet :)
MeStesso has joined #ruby
<MeStesso>
hi. quick question. anyone knows of a pre-made url shortener server made in Ruby? something that just works out of the box. I found good ones just in PHP (YOURLS), and nothing in other languages. It will be used for internal purposes (same way Microsoft uses aka.ms, for example)
<MeStesso>
hi. quick question. anyone knows of a pre-made url shortener server made in Ruby? something that just works out of the box. I found good ones just in PHP (YOURLS), and nothing in other languages (PHP doesn't fit our stack). It will be used for internal purposes (same way Microsoft uses aka.ms, for example)
ndrei has joined #ruby
<MeStesso>
(sorry wasn’t sure the message was sent)
<shevy>
I like how the question becomes bigger and bigger at every iteration :)
wjimenez5271 has joined #ruby
<MeStesso>
shevy: sorry
<shevy>
I don't know of an URL shortener in ruby myself though possibly the rails guys know such things?
<MeStesso>
shevy: ok i’ll see there. thanks
<shevy>
in that case you could always try to ask on #rubyonrails - do tell them that you have asked here too though
commondream has quit [Remote host closed the connection]
<shevy>
'Yeah, so I rolled back to 2.0.0. and it worked. You get "DL is deprecated, please use Fiddle" which I found here, Ruby 2.0.0p0 IRB warning: "DL is deprecated, please use Fiddle", is just a warning'
<jhass>
yeah, they mean Ruby 2.0
railsraider has quit [Client Quit]
<jhass>
not Rails 2.0
MeStesso has quit [Quit: MeStesso]
<blogjy>
so much for stackoverflow expertise!
<shevy>
attention to detail blogjy :)
<jhass>
well, it doesn't have an upvote!
commondream has joined #ruby
<shevy>
I should pity-upvote it
wildroman2 has quit [Remote host closed the connection]
d10n-work has joined #ruby
* jhass
prepares to down vote
<shevy>
haha
<blogjy>
actually the answer didn't give that gem install line
wildroman2 has joined #ruby
<blogjy>
i guess the answer is saying that if rails gives an error like that then the answer is to downgrade ruby to be 2.0.0?
n008f4g_ has joined #ruby
<jhass>
when did nokogiri become a rails dep anyway?
<havenwood>
blogjy: Having trouble installing Nokogiri with 2.2 on Win?
<shevy>
blogjy well, ideally you could try to use the most recent versions
<jhass>
but given there's no newer nokogiri version than 1.6.6.2...
<jhass>
btw does anybody have a table with all ruby releases and their release dates?
<shevy>
but I am not entirely sure. windows is very confusing
<shevy>
\o/
<blogjy>
that's how new i am to ruby, just put it on their yesterday
commondream has quit [Ping timeout: 256 seconds]
<shevy>
it already works
<shevy>
you left 80% of the newcomers on windows in the dust
<blogjy>
i'll find the line that fails..
wildroman2 has quit [Ping timeout: 240 seconds]
shadoi has quit [Quit: Leaving.]
<shevy>
"autoload works in a similar way to require, but it only loads the file specified when a constant of your choosing is accessed/used for the first time."
<shevy>
ok so
baweaver has quit [Remote host closed the connection]
<shevy>
when exactly do I need autoload or rather why
<shevy>
or can I just require + include manually?
<jhass>
it's not include
<jhass>
it's just require
<shevy>
hmm
edwinvdgraaf has joined #ruby
<jhass>
and yeah, never really got the point of autoload, faster load times I guess
cirn0 has joined #ruby
<havenwood>
blogjy: Do you have DevKit installed? Guessing that'll be the error. If you haven't already, install the DEVELOPMENT KIT from: http://rubyinstaller.org/downloads/
shuber_ has quit [Remote host closed the connection]
<shevy>
but that actually scares me :\
<shevy>
"Because require works straight away, the puts method gets executed immediately."
wallerdev has quit [Quit: wallerdev]
<shevy>
so I guess, require() is simpler than autoload()
<jhass>
it's not equivalent though
graft has joined #ruby
kirun has joined #ruby
chinmay_dd has joined #ruby
<graft>
is there some sort of gem cache or something that i might need to flush out?
shuber_ has joined #ruby
<graft>
my rails console doesn't seem to be able to find a method on a class in a gem
<blogjy>
so i do rails new rtgsf, that works. cd rtgsf. bundle install. that works. then rails s, gives this error http://pastebin.com/raw.php?i=Bhmswt9W "C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29
<blogjy>
:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)..." I do have the development kit installed to c:\dkt and c:\dkt\bin is in the path
<ruboto>
blogjy, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
aryaching has quit [Read error: Connection reset by peer]
<blogjy>
which comes from that link you mentioned havenwood
scripore has quit [Client Quit]
bartj3 has quit [Ping timeout: 240 seconds]
<havenwood>
blogjy: Did you run hte installation scripts?
<blogjy>
i ran some command like ruby init dk.rb
<havenwood>
blogjy: and also something like?: ruby dk.rb install
turtil has joined #ruby
jerius has joined #ruby
<blogjy>
yeah that too, neither gave an error
<blogjy>
C:\dkt>ruby dk.rb init and C:\dkt>ruby dk.rb install
<graft>
jhass: tried it, no good. if i do my_instance.method(:some_other_method).source_location, it points to a file in my gem tree which clearly contains the method i want, but my_instance.method(:my_method) produces method not defined
<tejasmanohar>
but without excluding results that use http://autolotto.io/?ref (notice the "/" before the "?")
<tejasmanohar>
if i just google the URL, it pulls up the exact link... 1 result - not results that include the link.
<tejasmanohar>
anyone know ideas for this?
PaulCapestany has quit [Quit: .]
_blizzy_ has joined #ruby
banister has quit [Ping timeout: 256 seconds]
shuber_ has quit [Remote host closed the connection]
* jhass
searches the Ruby in the question :P
<kaleido>
a hadoop cluster thats constantly crunching the contents of every website on the planet?
<kaleido>
best of luck with that
<jhass>
GA/piwik based referrer analysis might be your best bet I fear
<tejasmanohar>
basically backlinks. hm ok jhass youre probably right
baroquebobcat has joined #ruby
PaulCapestany has joined #ruby
<blogjy>
judging by the description here http://rubyinstaller.org/downloads/ I should use a 2.1.x 32bit if starting off. As otherwise i have to deal with compatibility problems as 64bit ruby is very new in windows and 2.1.x is stable one they recommend
<tejasmanohar>
jhass and yeah theres no ruby in the question, sorry :P - i've just found that sometimes the people can shine some insight into other questions too
<tejasmanohar>
(guessing they've faced similar things etc)
creakybones has joined #ruby
Kricir has quit [Remote host closed the connection]
<imperator>
blogjy, i'd go with that for simplicity, yes
<havenwood>
blogjy: and then the corresponding 32-bit DevKit then
Hijiri has quit [Quit: WeeChat 1.0.1]
cirn0_ has joined #ruby
<blogjy>
what should i do to get rid of the rails installation i have?
<blogjy>
i've got rid of the ruby one i have
<dudedudeman>
This stack overflow does a good job of walking through it
<jhass>
I don't know the windows paths, but I'd say good chances that got rid of the rails one too
<dudedudeman>
oh.. windows
cirn0 has quit [Read error: Connection reset by peer]
<imperator2>
blogjy, how did you install rails?
sigurding has joined #ruby
moretti has joined #ruby
<blogjy>
i don't remember exactly i guess i double clicked an exe!
<blogjy>
i think that removed it though, removing ruby
davedev2_ has joined #ruby
<imperator2>
ok, you can install rails from the command line
davedev24_ has quit [Ping timeout: 258 seconds]
arietis has joined #ruby
jerius has quit [Quit: /quit]
djbkd has quit [Remote host closed the connection]
Jackneill has joined #ruby
Zai00 has joined #ruby
jefus has joined #ruby
konsolebox has quit [Quit: Leaving]
edwinvdgraaf has quit [Remote host closed the connection]
zz_barkerd427 is now known as barkerd427
edwinvdgraaf has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
thebastl has quit [Read error: Connection reset by peer]
jerius has joined #ruby
davedev24_ has joined #ruby
thebastl has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
Palmer11 has quit [Ping timeout: 272 seconds]
Lucky__ has joined #ruby
Akagi201 has joined #ruby
emptyflask has quit [Remote host closed the connection]
<tejasmanohar>
do a lot of people here use activerecord or better to keep all activerecord questions to #ror
<tejasmanohar>
?
jenrzzz has joined #ruby
<jhass>
I'd say both
<bootstrappm>
I can only speak for myself but yes, I use it
<balazs>
with Rufus::Scheduler it is not safe to update a hash in different threads, right ?
<tejasmanohar>
User.where.not(:referrer_id => nil).group_by_day(:created_at).sum(:referrals_count) is my current query for finding 2nd round referrals. :referrer_id is the user id of the person who referred them
Hijiri has joined #ruby
<tejasmanohar>
since user belongs_to :referrer, :class_name => "User", :foreign_key => "referrer_id" has_many :referrals, :class_name => "User", :foreign_key => "referrer_id"
<tejasmanohar>
now , im trying to find 3rd round referrals so .where.not(:referrer_id => nil WHERE the referred of THIS referred is also NOT nil
<tejasmanohar>
not really sure if this can be done in an activerecord query... any thoughts? do i just need to loop through all the users in a rake task and do some # crunching
mpistone has joined #ruby
<bootstrappm>
alright .... for stuff like that I drop down into SQL
<bootstrappm>
love me some postgres
<tejasmanohar>
and, yeah let me know if that doesn't make much sense- it's kinda a hard question to ask
<tejasmanohar>
bootstrappm: and is that possible in 1 SQL joined query or do i need to loop through a bunch of data?
<tejasmanohar>
bleh i havent done raw SQL in forever, we'll see how this goes :P bootstrappm
<bootstrappm>
hahah I'll re-read your question slower tejasmanohar and see if I can help, one sec
<tejasmanohar>
sure thanks
woodennails has joined #ruby
<jhass>
?crosspost tejasmanohar
<ruboto>
tejasmanohar, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<tejasmanohar>
quick description is i have a query to find referred users who referred other users (2nd round referrals) but now i need to find referred users who referred other users who referred other users --> counts of these kinda referrals
<tejasmanohar>
jhass: i did, i cancelled my post there- you see?
<jhass>
oh nvm, that question just looked the same :P
<tejasmanohar>
14:41:48 tejasmanohar | moving this to #ruby
<tejasmanohar>
from #ror 6
tyfighter has joined #ruby
cirn0 has joined #ruby
<tejasmanohar>
*from #ror ^
<tejasmanohar>
jhass: np, ive done it before as you know and am trying to avoid that now ;)
cirn0_ has quit [Read error: Connection reset by peer]
banister has joined #ruby
danman has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
cirn0 has quit [Remote host closed the connection]
<arup_r>
al2o3-cr: Ok.. but why mine one is not working ?
<bootstrappm>
hey tejasmanohar what does referrals_count mean semantically?
<havenwood>
arup_r: Because #new doesn't take a path as the first argument like #read.
<bootstrappm>
like, what information does it give you?
pragmatism has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
<tejasmanohar>
bootstrappm: # of referrals uses counter cache
<bootstrappm>
and could you put the relationships you pasted in one line into a gist and share it? kind of confusing seeing it in one line
paulcsmith has joined #ruby
<havenwood>
blogjy: Forget the json gem. Was just what Nokogiri docs suggest to test but it should be updated to something you'd actually install. Does Nokogiri build?
<bootstrappm>
as far as I can tell you CAN get the information you're looking for using AR if you do the join right
byprdct has joined #ruby
<blogjy>
even bundle install, in the project directory, doesn't work
<havenwood>
blogjy: Error?
<tejasmanohar>
yes bootstrappm
<bootstrappm>
its not going to read pretty and I'd prefer to do it in SQL but yes, its possible
<tejasmanohar>
one sec
Palmer11 has joined #ruby
<blogjy>
actually bundle install might work..
<havenwood>
arup_r: #new's first arg is data not the path to the file containing the data
<arup_r>
humm "This constructor will wrap either a String or IO object passed in data for reading and/or writing.
<arup_r>
misread it
<havenwood>
arup_r: sees you want #read, so use #read
cirn0_ has quit [Remote host closed the connection]
ndrei has joined #ruby
<havenwood>
blogjy: Seems you may have the wrong version of DevKit installed for your Ruby?
<tejasmanohar>
bootstrappm: but yeah you get my question right? 3rd level referrals
freerobby has joined #ruby
<havenwood>
blogjy: ruby dk.rb init --force
<havenwood>
blogjy: then reinstall
paulcsmith has quit [Ping timeout: 256 seconds]
<bootstrappm>
yeah, I'd phrase it more as "people who have been referred by other people who have been referred" tejasmanohar, makes imagining the logic a bit easier
<havenwood>
blogjy: I think you're using your previous DevKit install.
<blogjy>
havenwood: oh i think you're right re previous devkit install
<blogjy>
i'll remove that devkit
<tejasmanohar>
well i already have that
<tejasmanohar>
or wait yeah youre right bootstrappm
<bootstrappm>
cool
<blogjy>
i'll rmdir that devkit.. i think that is how to uninstall that one
<blogjy>
as i installed it via extraction i think
Takle has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
chinmay_dd has quit []
swgillespie has joined #ruby
swgillespie has quit [Remote host closed the connection]
<bootstrappm>
what DB you using tejasmanohar?
iamjarvo has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
mrmargolis has joined #ruby
edwinvdgraaf has joined #ruby
codecop_ has joined #ruby
Deele has joined #ruby
turtil has quit [Ping timeout: 265 seconds]
<tejasmanohar>
bootstrappm: i have "# of referrals by people who were referred" and am trying to get "# of referrals by people who were referred by people who were referred"
<bootstrappm>
cool tejasmanohar, gonna give you some SQL to try first on the console just to make sure we're getting the data we want
baweaver has joined #ruby
thebastl has quit [Quit: Leaving...]
ndrei has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
Igorshp has joined #ruby
tyfighter has quit [Quit: tyfighter]
ndrei has joined #ruby
<tejasmanohar>
bootstrappm: ok, hm User.where.not(:referrer_id => nil).group_by_day(:created_at).sum(:referrals_count) is my current query in AR
codecop has quit [Ping timeout: 265 seconds]
<tejasmanohar>
if its possible in SQL is it possible in AR or is that not always true bootstrappm ?
ernham has joined #ruby
<tejasmanohar>
^^ and that query (my current one) is "# of referrals by people who were referred" but im trying to go a level deeper in the where: so i can get "# of referrals by people who were referred by people who were referred"
<bootstrappm>
yep, completely understand you
<bootstrappm>
its usuuually possible in AR, this one definitely is
jerius has quit [Quit: /quit]
<blogjy>
THANKS!
Palmer11 has quit [Quit: Palmer11]
<blogjy>
rails s now works
<havenwood>
blogjy: \o/
<bootstrappm>
when its not you can drop down into AR's query builder, which is that Arel thing you were looking at
<bootstrappm>
and when even that proves difficult there's a method or two to execute raw SQL
<tejasmanohar>
ah
banister has quit [Read error: No route to host]
<tejasmanohar>
i see
<tejasmanohar>
im looking too, its the embedded "where" thats throwing me off
ndrei has quit [Ping timeout: 240 seconds]
<jhass>
you'll need a self join for starters
wildroman2 has joined #ruby
jpfuente_ has joined #ruby
Kricir has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
cirn0 has joined #ruby
<bootstrappm>
^ which means you'll need to alias users as two different 'tables' and use fully qualified identifiers in your where
jpfuentes2 has quit [Read error: Connection reset by peer]
vikaton has joined #ruby
<tejasmanohar>
oh bootstrappm hm
<tejasmanohar>
bootstrappm: is it better to loop through and do number crunching or is that harder?
<bootstrappm>
that'd prob be easier but more inefficient
<bootstrappm>
let the database do the work for you though, one sec
sandelius has joined #ruby
<tejasmanohar>
ah yeah
<tejasmanohar>
seems right
<tejasmanohar>
looking at docs on this hm
<tejasmanohar>
i mean i am using a self-joining association
<sandelius>
I've read that alot of people think that ActionController::Base(Metal) should be a module. I don't get that, a controller is a controller and without ActionController::Base it's not one. What do you think?
MrBeardy has joined #ruby
<sandelius>
ApplicationController should be a module
arietis has quit [Quit: Leaving.]
<bootstrappm>
tejasmanohar try this in your psql console: SELECT goal.referrals_count, goal.referrer_id, close_referrers.id, close_referrers.referrer_id FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
jpfuente_ has quit [Ping timeout: 258 seconds]
<bootstrappm>
sorry in advance for syntax errors etc.
fabrice31 has joined #ruby
<bootstrappm>
throw a limit in there if you have a lot of data and you don't want to wait a wihle
<tejasmanohar>
bootstrappm: how does the goal stuff work?
<bootstrappm>
goal is just a name I gave the table of the people you actually want
<bootstrappm>
hence, its the 'goal' of this query
<bootstrappm>
that's not like 'a thing', I just called it goal in this specific case
<tejasmanohar>
do i need to generate that table or is that done by the query?
jerius has joined #ruby
<bootstrappm>
done by the query
cirn0_ has joined #ruby
<bootstrappm>
"users AS goal" just means call this table goal
cirn0 has quit [Read error: Connection reset by peer]
Takle has joined #ruby
mello_ has quit [Ping timeout: 276 seconds]
<bootstrappm>
I do it because in the join I also use users and call it `close_referrers`
<jhass>
User.joins("JOIN users AS referred ON referred.referrer_id = users.id").joins("JOIN users AS second_referred ON second_referred.referrer_id = referred.id").group_by("second_referred.id").count something like that? I'm not good with this
Bermulium has joined #ruby
<tejasmanohar>
ah
<Bermulium>
So, str = "Some string"; n = str #this will not copy str into n
<jhass>
Bermulium: right!
<Bermulium>
but rather make it point in the same memory address
<jhass>
yes
<Bermulium>
jhass, Damn :p
<tejasmanohar>
SELECT goal.referrals_count, goal.referrer_id, close_referrers.id, close_referrers.referrer_id FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
<tejasmanohar>
ok ill give it a shot
tjbiddle has quit [Ping timeout: 258 seconds]
<bootstrappm>
I just tested it on my end tejasmanohar, that works
<Bermulium>
jhass, str = "Some string"; n = str; str = str.upcase #this will not affect n, how come?
Takle has quit [Remote host closed the connection]
<bootstrappm>
let me know if the data you're seeing makes sense and we'll make it ActiveRecord-y
cirn0_ has quit [Remote host closed the connection]
<tejasmanohar>
bootstrappm: can i manually run the SQL raw in activerecord?
edwinvdgraaf has quit [Remote host closed the connection]
<jhass>
Bermulium: because .upcase returns a copy, it doesn't modify the receiver
<bootstrappm>
you can but that kind of defeats the purpose of using ActiveRecord haha
<havenwood>
Bermulium: compare with #upcase!
<tejasmanohar>
bootstrappm: oh so `rails dbconsole` ?
<jhass>
Bermulium: if you were to leave of the str =, it wouldn't affect str either
fabrice31 has quit [Ping timeout: 272 seconds]
<tejasmanohar>
bootstrappm: because ... im using heroku thats where mmost of the good data is ;)
Takle has joined #ruby
kriskropd has joined #ruby
<tejasmanohar>
bootstrappm: and i cant run `heroku run rails dbconsole` since there's no psql client on heroku's machine installed
krz has quit [Quit: WeeChat 1.0.1]
<bootstrappm>
if you don't mind having non-portable stuff in your app, AKA if you're not planning on changing RDBMS then just encapsulate that sql in a method and go for it
<bootstrappm>
wait tejasmanohar there's something cool i remember about connecting to a heroku DB
<Bermulium>
Oh okey. So after the = ..., str now points to a different block in memory and all changed made to it won't affect n?
<tejasmanohar>
bootstrappm: whats all the referrals_count => 0 about?
<bootstrappm>
tejasmanohar that means your 3rd degree referral isn't referring manyo ther people
<bootstrappm>
many other*
<tejasmanohar>
ohhh
shazaum has quit [Quit: This computer has gone to sleep]
<tejasmanohar>
but the id's list my 3rd degree referrals, right?
<tejasmanohar>
bootstrappm:
<bootstrappm>
or simply enough time hasn't passed for your viral loop to get that far
<tejasmanohar>
that seems right
<tejasmanohar>
so this chart is of my third degree referrals, and the id's are the id's of them
<tejasmanohar>
and then there's some data about them in the following columns, right bootstrappm ?
ndrei has quit [Remote host closed the connection]
<tejasmanohar>
ah i get the query now i think
ndrei has joined #ruby
<tejasmanohar>
or am i mistaken? bootstrappm
dopie has joined #ruby
<bootstrappm>
correct though in the following columns there's also some info about the person that referred them
<bootstrappm>
one sec, i'm making it a bit clearer
tjbiddle has joined #ruby
<tejasmanohar>
oh
<tejasmanohar>
im just really trying to get the COUNT of the # of third degree referrals bootstrappm
<bootstrappm>
SELECT goal.id AS "id of this 3rd degree referrak", goal.referrals_count AS "# of people this person referred", close_referrers.id AS "id of person that referred this person", close_referrers.referrer_id AS "id of 1st person in chain" FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
<bootstrappm>
that should make it clearer
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<bootstrappm>
then just throw a count in there: SELECT COUNT(goal.id) FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
edwinvdgraaf has joined #ruby
n_blownapart has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Igorshp has quit [Remote host closed the connection]
<tejasmanohar>
i think that may be unecessary ? jhass
<bootstrappm>
that's right tejasmanohar. Yes jhass he's looking for people where the person that referred them was also referred by somebody. Hence the person that referred them's referrer_id is not null
<bootstrappm>
not unecessary I swear hahah
Igorshp has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<tejasmanohar>
oh ah yeah
<tejasmanohar>
makes sense
<tejasmanohar>
since there are ruby "nil" when i did my AR queries earlier
robertodecurnex has quit [Remote host closed the connection]
<tejasmanohar>
bootstrappm: so this can be done in AR?
leafybasil has joined #ruby
<bootstrappm>
yep, working on that part now
<tejasmanohar>
but why not just embed raw SQL in AR? bootstrappm
<tejasmanohar>
and then get the value in ruby var and show it
<jhass>
but wouldn't that include any level?
<tejasmanohar>
or actually nvm its better with AR since i do things like group gem etc
aryaching has joined #ruby
<bootstrappm>
oh jhass is right tejasmanohar, this includes 3rd level and above
<jhass>
say you have a chain of null -> a -> b -> c -> d, it'll include a -> b, b -> c and c -> d, no?
<bootstrappm>
need another join to get 3rd level exclusive
<tejasmanohar>
3rd level and above meaning 3+ (so 4, 5 , 6 etc)
<bootstrappm>
yes
<tejasmanohar>
thats fine actually
<bootstrappm>
and the reason to not get embed SQL in AR is portability and purism
<tejasmanohar>
i was just trying to get the picture i can add in exclusions etc later myself once i see the picture
<tejasmanohar>
and i think that data is beneficial to me though im no data scientist and i dont know one
<bootstrappm>
if you're more comfortable with AR, plan to switch database type, or just generally like ruby over SQL then you shouldn't embed the sql ... if none of those are true go ahead and do it
<jhass>
.joins("SQL fragment").where("SQL fragment").count("SQL fragment") will be as good as you get here I think
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wildroman2 has quit [Remote host closed the connection]
<bootstrappm>
yeah, I agree. If you use the AR associations (@user.referrers or User.all.collect {|u| u.referrers }) your app is gonna be doing more work
wildroman2 has joined #ruby
baweaver has quit [Remote host closed the connection]
<bootstrappm>
If your DB isn't huge it doesn't matter much, but just an FYI
paulcsmith has quit [Ping timeout: 256 seconds]
zagaza has joined #ruby
yalue has quit [Read error: Connection reset by peer]
<zagaza>
hi guys, where is the gemfile located in windows 8?
<tejasmanohar>
ah
<tejasmanohar>
bootstrappm: doesnt matter as much
<tejasmanohar>
i think AR helps me a lot since i use some ar gems
x1337807x has quit [Ping timeout: 272 seconds]
sigurding has quit [Quit: sigurding]
_ht has quit [Quit: Konversation terminated!]
<bootstrappm>
zagaza Gemfile exists per repo / app ... not system-wide
gambl0re has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
tjbiddle has quit [Ping timeout: 256 seconds]
last_staff has joined #ruby
<tejasmanohar>
bootstrappm: when i join the sql fragments is it like
rindolf has quit [Quit: Leaving]
tjbiddle has joined #ruby
bruno- has joined #ruby
<zagaza>
bootstrappm oh ok, so for jekyll, I guess jekyll.rb ?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bootstrappm>
zagaza jekyll installs as a system-wide binary. do `jekyll new whatever`
<tejasmanohar>
User.joins("SELECT COUNT(goal.id) FROM users AS goal").joins("users AS close_referrers ON goal.referrer_id = close_referrers.id").where("close_referrers.referrer_id IS NOT NULL;")
<bootstrappm>
then in the whatever folder should be your gemfile
wildroman2 has quit [Ping timeout: 255 seconds]
<tejasmanohar>
bootstrappm: what is the method if i just wanna run the SQL query raw?
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tejasmanohar>
and get the # in ruby var
n_blownapart has quit []
<tejasmanohar>
or sry nvm i cant do that i forgot since im using groupdate ruby gem
<zagaza>
bootstrappm: do you mean the _config.yml?
dopie has quit [Quit: This computer has gone to sleep]
<tejasmanohar>
zagaza: no, he doesn't :)
willharrison has joined #ruby
<bootstrappm>
zagaza I've never used jekyll, if in that folder there is no Gemfile ... you might not need a Gemfile?
<tejasmanohar>
i've used jekyll
x1337807x has joined #ruby
<zagaza>
I need to add this to my gemfile: gem 'wdm', '~> 0.1.0' if Gem.win_platform?
<tejasmanohar>
not required by jekyll, many sites dont use external gems
alvaro_o has quit [Quit: Ex-Chat]
<zagaza>
ah cool, so I can just add it there ?
<tejasmanohar>
yeah of course
x1337807x has joined #ruby
<zagaza>
what's the gemfile.lock?
<tejasmanohar>
you can add a gemfile anywhere you want
<tejasmanohar>
its generated with all the deps etc
<tejasmanohar>
take a peek, pretty self explanatory
<tejasmanohar>
specific versioning etc
jpfuentes2 has quit [Ping timeout: 255 seconds]
<tejasmanohar>
bootstrappm: do i have the right idea for that active record statement?
Hijiri has joined #ruby
<tejasmanohar>
User.joins("SELECT COUNT(goal.id) FROM users AS goal").joins("users AS close_referrers ON goal.referrer_id = close_referrers.id").where("close_referrers.referrer_id IS NOT NULL;")
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
banister has joined #ruby
<bootstrappm>
tejasmanohar its closer to something like this: User.joins('users AS close_referrers ON referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
multi_io has joined #ruby
ndrei has joined #ruby
goodcodeguy has joined #ruby
DerisiveLogic has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
<zagaza>
hmm tejasmanohar, I added gemfile but still getting that error with jekyll: "Please add the following to your Gemfile to avoid polling for changes:
<zagaza>
gem 'wdm', '>= 0.1.0' if Gem.win_platform?"
<tejasmanohar>
gist your gemfile
<tejasmanohar>
and the error and what command ur running to bring up the err
x1337807x has quit [Client Quit]
casadei has quit [Remote host closed the connection]
<tejasmanohar>
bootstrappm: is "AS" allowed? rails doesnt seem to like that
__chris has quit [Quit: This computer has gone to sleep]
<tejasmanohar>
never used if Gem.win_platform? zagaza but seems logical. have you run `bundle`
visof has joined #ruby
<visof>
hi guys
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GPrime has joined #ruby
rdark has quit [Quit: leaving]
<bootstrappm>
my mistake tejasmanohar, include keyword "JOIN" at the beginning of the joins clause
ndrei has quit [Ping timeout: 265 seconds]
<jhass>
zagaza: try gem install wdm instead
<zagaza>
I tried gem install wdm, but got a bunch of errors
<tejasmanohar>
bootstrappm: hm like this ? User.joins('JOIN users AS close_referrers ON referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
<bootstrappm>
yes
<bootstrappm>
alternatively you can try the association syntax tejasmanohar: User.joins(:referrer).where.not(referrer: {referrer_id: nil}) tejasmanohar
tak1n has quit [Ping timeout: 250 seconds]
idafyaid has quit [Read error: Connection reset by peer]
GPrime has quit [Read error: Connection reset by peer]
<tejasmanohar>
irb(main):001:0> User.joins('JOIN users AS close_referrers ON referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
<zagaza>
ah ok nvm I needed bundler first
<tejasmanohar>
PG::AmbiguousColumn: ERROR: column reference "referrer_id" is ambiguous
<tejasmanohar>
hm but im running it on User.
idafyaid has joined #ruby
<tejasmanohar>
oh this looks a lot more AR-y, irb(main):003:0> User.joins(:referrer).where.not(referrer: {referrer_id: nil}) PG::UndefinedTable: ERROR: missing FROM-clause entry for table "referrer"
casadei has joined #ruby
<jhass>
zagaza: sounds like wdm is incompatible to Ruby 2.2
GPrime has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
<tejasmanohar>
oh i think i understand the 2nd err
<jhass>
zagaza: might be the simplest solution, try 2.1
<tejasmanohar>
wait nvm that still fails, its a JOIN hmm
<tejasmanohar>
bootstrappm: do you follow this error? kinda weird
<zagaza>
how do I uninstall the old? just plain uninstall?
<tejasmanohar>
zagaza: consider a version manager like rvm or rbenv
* jhass
not a windows user, *shrug*
<jhass>
but I guess so
<tejasmanohar>
consider not using windows too lolol
<zagaza>
I'll try uninstalling :)=
<tejasmanohar>
i thought rubyinstaller on windows could do multiple versions
<tejasmanohar>
try that
dru` has joined #ruby
<bootstrappm>
tejasmanohar one sec
<bootstrappm>
tejasmanohar the first error is right, referrer_id there is ambiguous because both users and referrers have it
<bootstrappm>
going to need to alias it using .from
<bootstrappm>
the second error ...
asmodlol has joined #ruby
<tejasmanohar>
o
<zagaza>
ok so I installed ruby 2.1
<zagaza>
and when I do ruby dk.rb init
Igorshp has quit [Ping timeout: 272 seconds]
<zagaza>
I get sh.exe": /c/Ruby22-x64/bin/ruby: No such file or directory
<bootstrappm>
is odd, I would assume it'd be able to infer the table name from the class_name you declared in the association
<zagaza>
but my ruby folder changed to Ruby21-x64
einarj has joined #ruby
visof has quit [Ping timeout: 272 seconds]
<zagaza>
so the question is, how do I change that folder in the init to Ruby21-x64? i am completely new to ruby
startupality has joined #ruby
ldnunes has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
<bootstrappm>
tejasmanohar try: User.from('users AS goal').joins('JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
<zagaza>
nvm fixed it
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
umgrosscol has quit [Quit: Quit]
casadei has quit [Remote host closed the connection]
<zagaza>
jhass: gem install wdm worked with 2.1, thanks
hololeap has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
mrsolo has quit [Quit: This computer has gone to sleep]
<tejasmanohar>
gambl0re, your attitude prob pissed them off
<tejasmanohar>
i wish ##javascript had logs so i could check how long you waited :P
<tejasmanohar>
(but only ##node.js does)
ForkingPaths has joined #ruby
codecop_ has quit [Remote host closed the connection]
graydot has joined #ruby
<jhass>
that's why I don't find any? :(
edwinvdgraaf has joined #ruby
graydot has quit [Client Quit]
<bootstrappm>
gambl0re if you don't care about your indentation i don't care about helping you
jpfuentes2 has joined #ruby
<tejasmanohar>
bootstrappm: do you know how i can debug this one? id love to p some stuff, but not seeming to do the trick. running this in rails c btw
<tejasmanohar>
questioning why the group by date works after the where earlier and not now
paulcsmith has joined #ruby
<bootstrappm>
tejasmanohar since created_at can be in goal or in close_referrers you have to specify which one you're referring to
<tejasmanohar>
is it not returning activerecord objects or something?
<tejasmanohar>
oh hm
<bootstrappm>
replace created_at with goal.created_at
<DoubleMalt>
hey people, is there a rails channel on freenode?
<gambl0re>
damn...its like 10 lines of code. i'm asking those who want to help to help. if you dont want to help then fine.
<tejasmanohar>
DoubleMalt: /join #RubyOnRails
<bootstrappm>
DoubleMalt its #ror i believe
<tejasmanohar>
*that redirects, yeah
<bootstrappm>
oh, that
<c355E3B>
gambl0re: check your return
<DoubleMalt>
thx
<tejasmanohar>
bootstrappm: but goal is not an available variable at that point in the query is it ?
edwinvdgraaf has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 265 seconds]
<tejasmanohar>
group_by_day(goal.created_at)
<bootstrappm>
gambl0re: it matters because my your indentation it looks like you believe var result = 1 only executes in the case of the if, which isn't the case
<jhass>
I'm serious, take it to ##javascript
<bootstrappm>
tejasmanohar: make it a string
<tejasmanohar>
ah
<tejasmanohar>
ahh ok that makes sense
<tejasmanohar>
gambl0re: just use a freaking js beautifier
edwinvdgraaf has joined #ruby
<jhass>
do I have to start kicking people?
<tejasmanohar>
and ask in ##javascript and wait lol, its such an active channel
startupality has quit [Quit: startupality]
swgillespie has joined #ruby
pandaant has quit [Remote host closed the connection]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tejasmanohar>
how could <%= line_chart
<tejasmanohar>
User.from('users AS goal').joins('JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').group_by_day('goal.created_at').count %> be
<tejasmanohar>
be considered 1..2 arguments?
Hijiri has quit [Quit: WeeChat 1.0.1]
juanpaucar has joined #ruby
<tejasmanohar>
oh wait nvm i had a linebreak oops editor
bkxd has quit [Ping timeout: 244 seconds]
<bootstrappm>
also don't use queries in your views, bad form. put it in a helper method or something
<bootstrappm>
figured out the association syntax tejasmanohar: User.joins(:referrer).where.not(referrers_users: {referrer_id: nil})
rodfersou has joined #ruby
<bootstrappm>
don't ask why the table name AR gives the association is 'referrers_users' because I don't know ... but it does work
<workmad3>
bootstrappm: habtm join table
<workmad3>
bootstrappm: which has the convention of using both table names in lexical order
<bootstrappm>
^ thanks :)
enebo has quit [Quit: enebo]
juanpaucar has quit [Ping timeout: 252 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
jpfuentes2 has joined #ruby
<shevy>
we need to make ruby more kickass
rodfersou has quit [Client Quit]
tejasmanohar has quit [Ping timeout: 258 seconds]
decoponio has quit [Quit: Leaving...]
<bootstrappm>
shevy how do we do that_
nettoweb has joined #ruby
<bootstrappm>
?
Vitor has quit [Ping timeout: 264 seconds]
<shevy>
hmmm
imperator has quit [Quit: Leaving]
<jhass>
yeah, ruboto is already written in ruby, and it does most definitely kick asses
<shevy>
we need to improve the quality of the gems
<shevy>
old and abandoned projects should be picked up by people - see when _why left and others took over shoes
<bootstrappm>
yeah, I remember that ... were all his projects picked up?
<shevy>
not sure actually
<shevy>
I think it was somewhere collected in some umbrella project
<bootstrappm>
I'm down to help, I've been devoting a lot of my free time to developing publicly as I'll be leaving my company soon, been wanting to get my public presence up
mrmargol_ has quit [Remote host closed the connection]
nettoweb has quit [Client Quit]
<bootstrappm>
any gems in particular yo have in mind shevy?
baweaver has quit [Remote host closed the connection]
<shevy>
quite amazing how many of his projects have been taken over :)
<shevy>
bootstrappm well
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
poguez_ has quit [Quit: Connection closed for inactivity]
freerobby has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
baweaver has joined #ruby
tyfighter has quit [Quit: tyfighter]
<shevy>
no idea
<shevy>
some mysteries in life can never be figured out
mary5030 has quit [Ping timeout: 265 seconds]
einarj has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xxneolithicxx>
hello
einarj has joined #ruby
gambl0re has quit [Ping timeout: 272 seconds]
<bootstrappm>
hello there xxneolithicxx
<xxneolithicxx>
hideho rubyist!
<xxneolithicxx>
:-)
<bootstrappm>
you got me curious shevy, started googling how people decide which projects to contribute too
<bootstrappm>
to*
<jhass>
the answer "looks fun, lacks this thing I can do"
<xxneolithicxx>
anything that makes me better at my job or I find interesting and know how to solve problems for
Zai00 has quit [Quit: Zai00]
casadei has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
willharrison has joined #ruby
Notte has quit [Remote host closed the connection]
startupality has joined #ruby
<shevy>
bootstrappm I guess one way is for projects that are popular
fabrice31 has quit [Ping timeout: 272 seconds]
<bootstrappm>
I think there's different kinds. There are people that run into a bug and pull request / fix it and then there are people that are involved with the other committers and follow the progress of a project ... and one doesn't necessarily lead into the other
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Aeyrix>
Morning y'all
codelurker has quit [Quit: Leaving]
momomomomo has quit [Ping timeout: 256 seconds]
<bootstrappm>
there's this: https://www.openhub.net/ but most of the projects on the homepage need some lower level knowledge
<Coraline>
Also CodeMontage (OSS projects for social good)
<Coraline>
And openhatch
<xxneolithicxx>
I was looking at the metrics on that openhub yesterday, was quite interesting and wonder how accurate it is
mary5030 has joined #ruby
<xxneolithicxx>
the trending data seems to show people dropping/moving away from C/C++ for Python
concave has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arietis has joined #ruby
<eam>
xxneolithicxx: I think most of the C/C++ is toward java
rodfersou has joined #ruby
<eam>
python serves a fairly different problem space
<eam>
(as does ruby)
<xxneolithicxx>
shoot me pls, ill take C++ over Java any day
rodfersou has quit [Client Quit]
arietis has quit [Client Quit]
<eam>
well, yes
<xxneolithicxx>
it does but i think Python's rise is probably more due to lower barrier to entry than most the others and increased use in OS (Linux) space
<shevy>
well
<shevy>
people combine a high level language with a low level language
<xxneolithicxx>
like that hot mess of embedding python in java that i seen somewhere the other day
<shevy>
look at the old days of the C hackers using perl
<shevy>
hehe
<jhass>
well, pretty sure java is considered a high level language
<shevy>
well that's an improvement still xxneolithicxx
<eam>
keep in mind, everything is growing in absolute terms
<shevy>
more python, less java
<eam>
it's not like C++ use is shrinking
<eam>
heck, there's probably more FORTRAN written today than at any point in history
<xxneolithicxx>
I know, i really think if C++ was backed with community repos for deploying libs like ruby/python/perl it would bring more people back to it
<bootstrappm>
I really hope that's not true O_O, what industry uses FORTRAN a lot?
<shevy>
people still use FORTRAN?
<eam>
xxneolithicxx: what do you think distros are? :)
imperator2 has quit [Quit: Valete!]
<xxneolithicxx>
lol
<eam>
shevy: yeah, it still dominates for fast math
<Aeyrix>
Or unconscious, I don't do it deliberately.
kinduff has quit [Client Quit]
<eam>
Radar: what country are you located in?
platzhirsch has quit [Quit: Leaving.]
edwinvdg_ has joined #ruby
<Radar>
eam: No company I've worked for has been willing to hire interns with the purpose of training them up.
<Aeyrix>
shevy: That article is balderdash.
<Radar>
eam: Australia.
<eam>
Radar: ah, maybe different over there but in silicon valley intern season is HUGE
<shevy>
Aeyrix it is all the things!!!!!!!
<Radar>
eam: Are the SV interns paid?
<shevy>
imagine a huge thread of code
<eam>
yes very well
<Radar>
eam: Good :)
<shevy>
containing ALL code that has ever been written
<eam>
Radar: ~70-90k?
<shevy>
and ever will be written
<Radar>
eam: I would love it if we could do the same here. I think it'd be beneficial to the commuity.
kinduff has joined #ruby
<eam>
I've even seen discussions about how we can create a lower position because the hiring bar for interns has gotten so high
<eam>
like "ok how about internship apprentices"
<xxneolithicxx>
70-90k for SV? are you joking, have you seen their living expenses?
<Radar>
eam: The fear that I've heard is that we'll train up the intern and then they'll leave and go somewhere else.
mary5030 has quit [Remote host closed the connection]
<eam>
xxneolithicxx: not joking
<Radar>
70-90k is good pay for AU :)
weemsledeux has joined #ruby
<xxneolithicxx>
i wouldnt step foot in SV for anything less that 100-120k
starless has joined #ruby
<shevy>
Aeyrix haha the guy from that webpage asks what this yields in python: print unichr(0x61b) + " what does this print out ?!?" and it yields me a "SyntaxError: invalid syntax"
<eam>
xxneolithicxx: as a summer intern?
mary5030 has joined #ruby
<xxneolithicxx>
no in general
<Radar>
!popcorn
<Radar>
;)
<xxneolithicxx>
im well past interning age lol
<eam>
well as a senior guy I agree
<Radar>
fwiw I agree with xxneolithicxx
<eam>
I'd demand twice that minimum ;)
<eam>
but as an intern, 90k oughta be doable
<xxneolithicxx>
sure, doable in half a garage lol
<Radar>
Living the live
<Radar>
living the life*
<eam>
xxneolithicxx: it's not even close to that bad
<shevy>
bill gates slept in a garage!!!
<Radar>
shevy: Yeah but he wasn't exploited as cheap labour :P
<xxneolithicxx>
eam: have you not read the stories of 1k rent for garages?
einarj has quit [Remote host closed the connection]
<eam>
xxneolithicxx: I just got back this morning from preping a rental for sale, 3bd home in sunnyvale I've been renting for 2k/mo
edwinvdgraaf has quit [Ping timeout: 264 seconds]
<eam>
I'm pretty up to speed on the market
<shevy>
xxneolithicxx garages are that pricey??
<Radar>
eam is old
<xxneolithicxx>
shevy: hell yes
<Radar>
(er)
<shevy>
yeah
<eam>
xxneolithicxx: most of what you see are for the extremely fashionable neighborhoods in SF
<shevy>
good old eam
<shevy>
perl guru
<shevy>
fossil unix hacker
<eam>
and asshole silicon valley slumlord
<shevy>
lol
<eam>
seriously though it's not so expensive
<djbkd>
lol
<shevy>
actually, California would be my favourite area in the USA
<eam>
live in san leandro, interns don't have kids
<xxneolithicxx>
i dunno man, ill take my 90 and work from home
<eam>
I think they can tolerate 20 minutes on the train
cirn0 has joined #ruby
jenrzzz has joined #ruby
<Radar>
I tolerate 20 minutes on the train :)
<Radar>
(barely)
<eam>
Radar: I tolerate 60
<shevy>
"At least half of the fruit produced in the United States is now grown in California, and the state also leads in the production of vegetables."
<Radar>
eam: hardcore
<Radar>
eam: I bet you get a seat?
starless has quit [Client Quit]
<eam>
Radar: indeed I'm at the very end of one line
<eam>
schools out that far are great
<shevy>
60 minutes standing
<eam>
shevy: sitting, with a mifi
<eam>
it's not bad
<eam>
2 hours a day to write code without coworkers bothering me
<jhass>
shevy: let me quote from your link: "In fact, if your code isn't using Unicode to represent strings right now, you're almost certainly doing it wrong."
mary5030 has quit [Ping timeout: 245 seconds]
<xxneolithicxx>
when i was in Atlanta as an intern i took two buses and a train to go to work with a 1-2hr commute each way
<shevy>
jhass I have lost faith in that guy, his python example does not even work
Hijiri has quit [Quit: WeeChat 1.0.1]
finisherr has quit [Quit: finisherr]
rubie has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
mistergibson has quit [Quit: Leaving]
Takle has quit [Remote host closed the connection]
<baweaver>
the lambda returned there remembers that n is 4
<shevy>
My ruby code is like the last man standing, a zombie. It always tries to come back.
<ebonics>
that's just streaming
<baweaver>
closure
<shevy>
but the & syntax just trips me up
<kinduff>
know the feel, just try to be as expressive as you must have
<ebonics>
i'm talking about if you have a block in an object, you pass it to one method, then pass it to another method while keeping some state from the first
<ebonics>
not inlining it though, i mean as part of the block itself
<baweaver>
Functions can return functions to capture more state
<xxneolithicxx>
inception
hsps__ has quit [Ping timeout: 264 seconds]
juanpaucar has joined #ruby
<baweaver>
You can simulate objects using lambdas if you're really driven
<baweaver>
and numbers (church numerals)
<baweaver>
and basically any other data structure
<baweaver>
See partial application and currying
<zenspider>
tom stewart has a really fantastic blog post doing just that
<zenspider>
implements fizzbuzz entirely out of lambdas, including numbers / strings
<baweaver>
zenspider: Have you seen Jim's talk on the Y Combinator?
<bootstrappm>
alright, found something that def needs work shevy - the mongodb ruby driver documentation -_-
<bootstrappm>
oooo when did rubygems get a redesign
<bootstrappm>
i like
hsps__ has joined #ruby
<baweaver>
Within a few months
<kinduff>
looks pretty good
<zenspider>
it was one of the better ones I've seen... but I have yet to see a GOOD explanation of the ycombinator that doesn't rely on a huge leap in the middle
<ebonics>
people still use mongodb :o
<shevy>
yeah a while ago
<ebonics>
i thought that was just a fad
<shevy>
the bright orange is a bit eye-scratching
<baweaver>
zenspider: You should try Monads some time then ;)
<zenspider>
gah. yeah. that orange... my eyes bleed
<baweaver>
I've yet to see someone give a good explanation without an entire book leading up to it.
<zenspider>
baweaver: not a big fan
juanpaucar has quit [Ping timeout: 272 seconds]
<zenspider>
Tom's talk on monads was great tho
<baweaver>
The second someone says endofunctors you know stuff is about to get real
<zenspider>
real mentabatory :P
<baweaver>
Though contracts for Ruby are an interesting idea in some cases
rkazak has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
gusrub has quit [Quit: Leaving]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baroquebobcat has quit [Quit: baroquebobcat]
mikecmpb_ has joined #ruby
mary5030 has joined #ruby
shuber_ has quit [Remote host closed the connection]