<helpa>
Hi emacer. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
sevvie has quit [Remote host closed the connection]
baweaver has joined #ruby
<jhass>
emacer: mmh, I don't quite follow why they do the chroot, seems like a silly way to switch user. Did you switch to the openproject user and going to its home directory before running the backup script?
sevvie has joined #ruby
<jhass>
*did you try
<emacer>
jhass, the openproject user's home directory is completely empty. Not even a .bashrc
mostlybadfly has quit [Quit: Connection closed for inactivity]
<emacer>
emacer, and the directions said to run that inside the install directory, which is /opt/openproject-ce
leafybasil has quit [Read error: No route to host]
leafybas_ has joined #ruby
edwardly has quit [Quit: ??????????]
<jhass>
emacer: ah, you did switch user though?
<emacer>
jhass, no, I tried as root
<emacer>
jhass, lemme try as openproject
checkit has quit [Ping timeout: 255 seconds]
<emacer>
The program 'bundle' is currently not installed. To run 'bundle' please ask your administrator to install the package 'bundler'
wookiehangover has quit [Ping timeout: 256 seconds]
lucianosousa has quit [Quit: lucianosousa]
<jhass>
actually openproject-ce as root might support arbitrary commands, so try as root to prefix the command with openproject-ce run
postmodern has quit [Quit: Leaving]
leafybas_ has quit [Read error: No route to host]
leafybasil has joined #ruby
Sawbones has quit []
<emacer>
sh: 1: exec: RAILS_ENV=production: not found
karmatr0n has quit []
pengin has quit [Remote host closed the connection]
<emacer>
wait
<jhass>
eh, well yeah, after the environment variable
<emacer>
yeah, I realized that ;)
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
that was my last bet, I have to bail out here
<jhass>
try their official support channels
<emacer>
awwwwwwwwww
<emacer>
alright, thanks so much for all your help
christiandsg has joined #ruby
<emacer>
this is their first version to offer an apt repo, so maybe they did something weird.
jenrzzz has joined #ruby
<jhass>
it's incredibly over engineered IMO
<emacer>
jhass, yeah, I could tell that by the multiple levels of abstractions layers for the init.d script
triangles has joined #ruby
<jhass>
yes, and it just goes on
<emacer>
jhass, I wrote an init.d script for a previous version of it, and it was nowhere near bad enough to need that
<emacer>
but now they've changed a bunch of things since then, and I'm lost
pengin has joined #ruby
hcnewsom has joined #ruby
<jhass>
that's why I do a rather manual process for diasproa (rails app shipped to users too), you actually have an idea of the setup afterwards
jlast has joined #ruby
<emacer>
yeah, but I REALLY want to use apt, so that I can apt-get update; apt-get upgrade openproject
<jhass>
and you can keep a lot of stuff standard by not having to automate it too much
ramfjord has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
triangles2 has quit [Ping timeout: 255 seconds]
baweaver has quit [Remote host closed the connection]
<emacer>
I wish they hadn't taken the lazy way out with their apt repo. They used some website that automatically turns their stuff into deb packages, and hosts them.
rubie has quit [Quit: Page closed]
<jhass>
I basically automated the manual setup for the archlinux package for diaspora, just a couple of seds to the example configs and you just have to fill in your domain and db creds and are good to go
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zachrab has quit [Remote host closed the connection]
<emacer>
I know it's a royal pain to setup an apt repo, and create the packages; I've done just that. But, if you do it yourself, you have full control over everything.
<jhass>
this is just a layer or two of smartassness too much
<jhass>
too many points it can fail at
christiandsg has quit [Ping timeout: 252 seconds]
<emacer>
yep
<emacer>
there's a whole utility you run after you apt-get install for configuring it, too.
zachrab has joined #ruby
bronson has joined #ruby
<emacer>
nice idea, but the implementation is too abstracted.
jgt1 has joined #ruby
NoNMaDDeN has joined #ruby
<emacer>
they've obviously put a lot of work into it. Hopefully, it'll get better soon.
<emacer>
anyway, thanks so much for your help.
<jhass>
you're welcome, was an interesting journey at least :P
<emacer>
:D
jottr has joined #ruby
jlast has quit [Ping timeout: 255 seconds]
Aswebb_ has quit [Remote host closed the connection]
<jhass>
I'd probably would be able to figure it out with some well placed debug statements, but that requires hands-on for faster iteration, so their support is the better choice ;)
mikepack has quit [Remote host closed the connection]
duncannz has joined #ruby
startupality has joined #ruby
duncannz has quit [Max SendQ exceeded]
AndyBotwin has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
centrx has joined #ruby
duncannz has joined #ruby
diegoviola has joined #ruby
duncannz has quit [Max SendQ exceeded]
ramfjord has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby
RegulationD has joined #ruby
HakN99 has quit [Quit: Peace!]
nii2361 has joined #ruby
reinaldob has joined #ruby
Cache_Money has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
threh has quit [Ping timeout: 255 seconds]
avahey has joined #ruby
it0a has quit [Quit: WeeChat 1.1.1]
<emacer>
jhass, their so-called way to do it is what you thought (using openproject-ce run), but it doesn't work even after reverting my snapshot. just thought you'd like to know.
RegulationD has quit [Ping timeout: 252 seconds]
sevenseacat has joined #ruby
reinaldob has quit [Ping timeout: 245 seconds]
Wolland has joined #ruby
<jhass>
yeah, I gathered as much :)
Musashi007 has joined #ruby
ghostpl_ has joined #ruby
a1fa has left #ruby [#ruby]
jespada has quit [Ping timeout: 245 seconds]
kblake has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Limix has joined #ruby
charliesome has quit [Ping timeout: 265 seconds]
astrobunny has joined #ruby
krisquigley has joined #ruby
jgt1 has quit [Ping timeout: 264 seconds]
bricker has quit [Ping timeout: 240 seconds]
hcnewsom has quit [Quit: hcnewsom]
ghostpl_ has quit [Ping timeout: 255 seconds]
sngeth has joined #ruby
freerobby has quit [Quit: Leaving.]
christiandsg has joined #ruby
uptownhr has joined #ruby
SegFaultAX has quit [Excess Flood]
colorados has quit [Ping timeout: 256 seconds]
iteratorP has joined #ruby
iteratorP has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 244 seconds]
kirun has quit [Quit: Client exiting]
iteratorP has joined #ruby
SegFaultAX has joined #ruby
iteratorP has quit [Read error: Connection reset by peer]
iterator_ has joined #ruby
larsam has joined #ruby
ev_ has quit [Ping timeout: 255 seconds]
sngeth has quit [Ping timeout: 272 seconds]
AlphaTech has joined #ruby
claptor has joined #ruby
AnxiousGarlic has joined #ruby
freerobby has joined #ruby
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lucianosousa has joined #ruby
charliesome has joined #ruby
threh has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
bim has joined #ruby
jespada has joined #ruby
delisa has joined #ruby
Channel6 has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
marr has quit []
triangles2 has joined #ruby
Yzguy_ has left #ruby ["I'm bouncing outta here!"]
threh has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
atomi has quit [Quit: need to update locale]
milesmatthias has joined #ruby
triangles has quit [Ping timeout: 246 seconds]
davidhq has joined #ruby
atomi has joined #ruby
deric_skibotn has quit [Ping timeout: 252 seconds]
danzilio has joined #ruby
hmsimha has joined #ruby
milesmatthias has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
banister has joined #ruby
banister is now known as banisterfiend
jokester has quit [Read error: Connection reset by peer]
mloveless has joined #ruby
delisa has left #ruby [#ruby]
jokester has joined #ruby
<jokester>
#octave
<jokester>
oops please ignore that
yourwebdevguy has quit [Ping timeout: 264 seconds]
AnxiousGarlic has quit [Read error: Connection reset by peer]
<lamer>
No time because of army enforced conscription soon :)
TheNet has quit [Remote host closed the connection]
<jhass>
that's lame, you should bail out
jlast has joined #ruby
davedev2_ has joined #ruby
<lamer>
you cant
TheNet has joined #ruby
<jhass>
oh sure you can
charliesome has joined #ruby
<centrx>
so lame
<lamer>
how
rgb-one has joined #ruby
milesmatthias has quit [Ping timeout: 255 seconds]
<jhass>
piss your instructor in the face, shoot into your own foot and then throw him the weapon in the face, things like that
<jhass>
some some weed
<jhass>
*smoke
davedev24_ has quit [Ping timeout: 265 seconds]
<jhass>
just do stupid things, like you're training here already
<centrx>
Obama tells young people to care more about jobs - less about weed
sankaber has joined #ruby
milesmatthias has joined #ruby
<eat_multi>
hihi
duncannz has quit [Ping timeout: 244 seconds]
<eat_multi>
oh, are we plotting to get lamer out of military service?
jlast has quit [Ping timeout: 245 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
robustus has quit [Ping timeout: 255 seconds]
<lamer>
hehe this doesnt always work
duncannz has joined #ruby
flip_digits has joined #ruby
duncannz has quit [Max SendQ exceeded]
<jhass>
lamer: anything's better than being trained to murder people
duncannz has joined #ruby
<jhass>
just try
wallerdev has quit [Quit: wallerdev]
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
<lamer>
Well here you dont get trained really. Minimal training.
<jhass>
whatever the procedure, it's the purpose
startupality has quit [Quit: startupality]
jespada_ has joined #ruby
<lamer>
yeah if you are from denmark then thats what you did
robustus has joined #ruby
<lamer>
?
geraldbrent has left #ruby ["WeeChat 1.1.1"]
jespada has quit [Ping timeout: 246 seconds]
<jhass>
I have the luck to live a country without conscription
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheNet has quit [Read error: Connection reset by peer]
<jhass>
but we had that and if I'd lived in that time and the way over the court would failed, that's about what I would've done
pengin has quit [Remote host closed the connection]
TheNet has joined #ruby
oo_ has quit [Remote host closed the connection]
vivekananda has quit [Quit: Leaving]
davidhq has joined #ruby
xnr has joined #ruby
jespada__ has joined #ruby
mloveless has quit []
davidhq has quit [Client Quit]
<lamer>
Here some people cross dress
<lamer>
to avoid
jespada_ has quit [Ping timeout: 245 seconds]
jeramy_s has joined #ruby
<jhass>
doesn't that just prove how shitty it is?
<eat_multi>
to be fair that doesn't sound like the worst way of getting out of something
<jhass>
I'm not sure, it's giving up quite a bit of your identity
<lamer>
well there is a fine otherwise :)
bruno- has quit [Ping timeout: 246 seconds]
kblake has joined #ruby
<lamer>
the worst is that you sleep less than 3 hours most days
<lamer>
its a tactic in order to obey
TheNet has quit [Remote host closed the connection]
jespada__ has quit [Quit: WeeChat 1.1.1]
TheNet has joined #ruby
<eat_multi>
this may be the least effective thing, but can you not object on political grounds?
<eat_multi>
you're a pacifist through and through and no way in hell you could harm or be trained to harm another human being
<eat_multi>
hence useless to the military
Guest99640 has quit [Ping timeout: 246 seconds]
<lamer>
Yes you can. But they force you to work for free 8+ hours per day somewhere FAR away from your house
<lamer>
for longer.
<eat_multi>
ohhh so that's what they mean by 'alternative service'
flip_digits has quit [Quit: leaving]
<lamer>
So since you dont get paid ,you cant live:)
kblake has quit [Ping timeout: 250 seconds]
<lamer>
you cant rent a house etc
<eat_multi>
and it's far enough that you there's no way you could walk/bus/whatever everyday between home and work, I see
Apocalypse has joined #ruby
Apocalypse has joined #ruby
oo_ has joined #ruby
<jhass>
surely there are people who go that route though, how do they manage?
j_mcnally has joined #ruby
duncannz has quit [Remote host closed the connection]
oo_ has quit [Read error: Connection reset by peer]
<lamer>
most avoid it completely but it takes time. They pretend to be mad etc in order military psychiatrist
mostlybadfly has joined #ruby
davidhq has joined #ruby
<eat_multi>
I know a guy who avoided conscription in France like that some 30 odd years ago
<lamer>
but it doesnt always work and some people have to pay fines in between
<lamer>
its possible but risky
oo_ has joined #ruby
flip_digits has joined #ruby
<jhass>
lamer: do you know a nice doctor? maybe he can atest you a ton of food allergies or asthma or stuff
<lamer>
I know another who served only 1 day because he knew some politicians
uptownhr has quit [Quit: uptownhr]
<diegoviola>
I would like to write a simple authentication system with sinatra or rack using sessions, any ideas where to look at?
<diegoviola>
for a start
<jhass>
diegoviola: wardens source?
<lamer>
anyways time to sleep gn :)
<jhass>
lamer: one more thing
<eat_multi>
night lamer, good luck
<jhass>
lamer: I pretended you never posted these links
<jhass>
see what happens?
<jhass>
next time, just skip that shit, kay?
Synthbread has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: zzz]
<lamer>
yep but I'll have different nick...
<jhass>
nobody cares
<eat_multi>
aha
<diegoviola>
thanks
<lamer>
i know
lamer has quit []
* jokester
salutes jhass the good guy
bradleyprice has joined #ruby
<jhass>
oh, I was bored and the channel was silent ;)
Dopagod has joined #ruby
Rollabunna has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
<eat_multi>
I get the feeling I only appear when these channels are quite quiet
johnny51 has joined #ruby
DerisiveLogic has joined #ruby
hobodave has joined #ruby
johnny51 has quit [Remote host closed the connection]
<jhass>
what's your timezone?
<eat_multi>
GMT
<jhass>
mh
babykosh has joined #ruby
<jhass>
CET is pretty active usually and GMT is close enough
<eat_multi>
so right now I assume there's European night owls?
babykosh has quit [Read error: Connection reset by peer]
<eat_multi>
ah
<jhass>
and a few americanos, I guess, yeah
gr33n7007h has joined #ruby
<sevenseacat>
the asian timezones are starting to go to work
* sevenseacat
is at work
babykosh has joined #ruby
starless has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DerisiveLogic has quit [Ping timeout: 246 seconds]
* jokester
approaches his lunch bag in GMT+9
<sevenseacat>
thats an odd time zone
* sevenseacat
is in +8
jenrzzz has quit [Ping timeout: 256 seconds]
<jokester>
Japan and Korea and some other are here
<sevenseacat>
ah hah
<hobodave>
hey guys
<eat_multi>
slightly concerned I'm too easily amused, mildly mind-boggling talking with day/night time difference
<eat_multi>
hihi
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
<hobodave>
I am parsing a massive (> 6.5 million rows) gzipped CSV file into a Hash using this code: https://gist.github.com/hobodave/b6388c180147ce417257 -- Yes, I'm aware what I'm doing. My question is, this takes nearly 25 minutes to load this on our production hardware. Is there anything obvious I could do to cut this down (besides not parsing the UUID... I want to do that now so that it doesn't need to be done later by code not shown).
agrinb has quit [Remote host closed the connection]
krz has joined #ruby
<hobodave>
pretend there is a question mark at the end of that :)
<jhass>
hobodave: don't parse it into a hash, process line by line
bronson has joined #ruby
agrinb has joined #ruby
<hobodave>
jhass I need the hash
triangles has joined #ruby
<hobodave>
the purpose of that method is to return a 'lookup' hash
<hobodave>
intentionally trading a massive memory footprint for speed of execution of some code that will use the uuid_lookup hash
jonr22 has quit [Remote host closed the connection]
triangles2 has quit [Ping timeout: 246 seconds]
zachrab has joined #ruby
<jhass>
csv.read seems to extract the file, I think CSV should be okay with an io and stream?
charliesome has joined #ruby
lemur has joined #ruby
<hobodave>
I thought it would do line-by-line
<jhass>
pretty sure IO#read returns a string...
<jhass>
so I don't see how it possible could do that
agrinb has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 252 seconds]
morenoh149 has joined #ruby
<jhass>
*possibly
jottr has joined #ruby
<hobodave>
Opens the file, optionally seeks to the given offset, then returns length bytes (defaulting to the rest of the file).
<hobodave>
yep
Aswebb_ has joined #ruby
deric_skibotn has joined #ruby
<hobodave>
well, that part only takes about 60 seconds apparently then (time elapsed from output on line 8 to output on line 11)
davidhq has joined #ruby
<eat_multi>
idk your full situation, but maybe persisting it differently (some in memory store) would help?
<jhass>
hobodave: still, CSV.new seems to take the IO just fine
gr33n7007h has quit [Quit: WeeChat 0.3.8]
<hobodave>
we considered memcached eat_multi but we can't have the latency
<jhass>
^ redis/memcache would've been my next suggestion
riotjones has joined #ruby
<jhass>
and some C/Crystal/Julia/whatever to slurp it into there
<hobodave>
I think I'm just stuck with what I have, I could probably save some memory though by not loading the entire damn file into a string
<hobodave>
it's just a one time script that's getting run in a production console
<hobodave>
I was just seeing if there was low hanging fruit
<jhass>
hobodave: ruby-prof / rbkit if you want to know where time is spent exactly
<eat_multi>
haha, is it swapping a lot on production machines?
<hobodave>
no the utility box we're running it on has 128 GB, 90% free, and the process only consumes ~4 GB
jottr has quit [Ping timeout: 244 seconds]
it0a has joined #ruby
<eat_multi>
ah second ^jhass then
alphaatom has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby
Aswebb_ has quit [Ping timeout: 272 seconds]
<jhass>
the uuid parser is probably allocating a ton of useless strings or something
MatthewsFace has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
acl_ has joined #ruby
<hobodave>
yea, it's a 15 line method with a ton of local variables
ramfjord has quit [Ping timeout: 240 seconds]
<hobodave>
I wish it just had a class method that would convert a string directly to a binary UUID
<jhass>
String#unpack?
MatthewsFace has quit [Client Quit]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
jlast has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevenseacat has quit [Quit: Leaving.]
ghostpl_ has joined #ruby
sevenseacat has joined #ruby
ismaelga has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 245 seconds]
TheNet has quit [Quit: Leaving...]
krisquigley has joined #ruby
babykosh has quit [Quit: babykosh]
krz has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 246 seconds]
krz has joined #ruby
lucianosousa has quit [Quit: lucianosousa]
nii2361 has quit [Ping timeout: 256 seconds]
uptownhr has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
jefus has quit [Ping timeout: 252 seconds]
brandly has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
DrShoggoth has joined #ruby
hectortrope has joined #ruby
adriancb has quit [Remote host closed the connection]
snath has joined #ruby
DrShoggoth has quit [Max SendQ exceeded]
albert_ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
jcdesimp has joined #ruby
amclain has joined #ruby
jgt1 has joined #ruby
Lewix has quit [Remote host closed the connection]
ajsdklfjalksdf has joined #ruby
ajsdklfjalksdf is now known as ajskldf123
jeramy_s has quit [Quit: Peace out!]
jefus has joined #ruby
fuzzyhorns2 has quit [Ping timeout: 272 seconds]
ramfjord has joined #ruby
blazes816 has joined #ruby
yfeldblum has joined #ruby
hectortrope has left #ruby [#ruby]
rgb-one has quit [Remote host closed the connection]
hectortrope has joined #ruby
larsam has quit [Quit: larsam]
ajskldf123 has quit [Client Quit]
brandly has quit [Remote host closed the connection]
brandly has joined #ruby
ajsdklfjalksdf has joined #ruby
centrx has quit [Remote host closed the connection]
ajsdklfjalksdf is now known as whooooo123
uptownhr has quit [Quit: uptownhr]
centrx has joined #ruby
tcrypt has quit [Ping timeout: 250 seconds]
Soda has joined #ruby
blazes816 has quit [Ping timeout: 244 seconds]
n008f4g_ has quit [Ping timeout: 264 seconds]
bigmac has quit [Ping timeout: 256 seconds]
babykosh has joined #ruby
babykosh has quit [Client Quit]
bigmac has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
brandly has quit [Remote host closed the connection]
brandly has joined #ruby
whooooo123 is now known as nahhhhh123
brandly has quit [Remote host closed the connection]
milesmatthias has quit [Ping timeout: 256 seconds]
krz has joined #ruby
dcarmich has joined #ruby
<DrIranian>
How to easily run Ruby?
<DrIranian>
For test
Rephiax__ has quit []
ajsdklfjalksdf has quit [Ping timeout: 246 seconds]
ponga has quit [Ping timeout: 256 seconds]
ajsdklfjalksdf has joined #ruby
tubuliferous is now known as Guest98042
tubuliferous_ has joined #ruby
jcdesimp has quit [Quit: Leaving...]
sngeth has joined #ruby
The_Phoenix has joined #ruby
<Radar>
ruby
hmnhf has quit [Quit: Konversation terminated!]
<DrIranian>
a VS like, everything in one thing
hmnhf has joined #ruby
duncannz has joined #ruby
<Radar>
!elaborate
<helpa>
Instead of simply saying 'something is broken' please elaborate on this by showing us the code and the error that you are getting by making a Gist (http://gist.github.com) about it.
<Radar>
Not that one.
<Radar>
DrIranian: !explain
<helpa>
DrIranian: Please explain your problem better as we are having trouble understanding what you mean. A Gist (http://gist.github.com) is always helpful!
<Radar>
DrIranian: I don't understand exactly what you want.
<Wolland>
!explaborate
ghostpl_ has joined #ruby
<DrIranian>
thx, I want to code in Ruby, but don't have access to the internet, I want an install that sets up a basic environment (to download, like VS)
RegulationD has joined #ruby
Lingo__ has joined #ruby
<Wolland>
there are probably VM images of a dev setups out there
<Wolland>
ubuntu based or whatever
sngeth has quit [Ping timeout: 255 seconds]
mikepack has quit [Remote host closed the connection]
<Radar>
DrIranian: You don't have access to the internet but you're talking over IRC...?
craigp has quit [Remote host closed the connection]
Morkel has joined #ruby
arup_r has joined #ruby
jlast has quit [Ping timeout: 264 seconds]
RegulationD has quit [Ping timeout: 265 seconds]
arup_r_ has joined #ruby
bricker has quit [Ping timeout: 272 seconds]
arup_r_ has quit [Client Quit]
Crazy_Atheist has quit [Ping timeout: 255 seconds]
arup_r has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
zzing has joined #ruby
relix has joined #ruby
arup_r has joined #ruby
zzing has quit [Client Quit]
yokel has quit [Ping timeout: 255 seconds]
jonr22 has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
Dopagod has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
gr33n7007h has joined #ruby
tubuliferous has quit [Ping timeout: 244 seconds]
Rephiax has joined #ruby
_maes_ has joined #ruby
lessless has joined #ruby
yokel has joined #ruby
emdub has quit [Quit: .]
emdub has joined #ruby
michael_mbp has quit [Excess Flood]
milesmatthias has joined #ruby
Crazy_Atheist has joined #ruby
michael_mbp has joined #ruby
Hijiri has quit [Ping timeout: 256 seconds]
Hirzu has joined #ruby
iteratorP has quit [Remote host closed the connection]
Hijiri has joined #ruby
iteratorP has joined #ruby
brocktimus has joined #ruby
milesmatthias has quit [Ping timeout: 250 seconds]
krisquigley has joined #ruby
yfeldblum has quit [Remote host closed the connection]
nahtnam has quit [Quit: Connection closed for inactivity]
chrishough has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Quit: ciao.]
bruno- has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
iteratorP has quit [Remote host closed the connection]
iteratorP has joined #ruby
User458764 has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
sngeth has joined #ruby
Limix has quit [Quit: Limix]
<flughafen>
certainty: arup_r sevenseacat tach!
<arup_r>
flughafen: o/
<flughafen>
\o
charliesome has quit [Quit: zzz]
pico-pete has joined #ruby
riotjones has joined #ruby
tobago has joined #ruby
sngeth has quit [Ping timeout: 250 seconds]
Apocalypse has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
iteratorP has quit [Remote host closed the connection]
iteratorP has joined #ruby
bronson has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
iteratorP has quit [Remote host closed the connection]
uptownhr has joined #ruby
tagrudev has joined #ruby
chinmay_dd has joined #ruby
last_staff has joined #ruby
iteratorP has joined #ruby
DrIranian has left #ruby [#ruby]
lxsameer has joined #ruby
cvtsx has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
krz has joined #ruby
amclain has quit [Quit: Leaving]
lyuben_ has joined #ruby
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
piotrj has joined #ruby
iteratorP has quit [Remote host closed the connection]
coderhs has joined #ruby
iteratorP has joined #ruby
dling has quit [Ping timeout: 252 seconds]
dawkirst has joined #ruby
Macaveli has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<dawkirst>
Hey guys, is it a good idea to extract methods for the sake of easier reasoning, even if only one other method calls the extracted method?
jlast has joined #ruby
<apeiros_>
Radar: thanks for the ping. sadly sleep time :-|
dogweather has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
Megtastique has quit []
<arup_r>
dawkirst: didn't get you
<arup_r>
:(
<arup_r>
Ok... got it
<dawkirst>
arup_r: no worries, I'll try to explain better...
<dawkirst>
arup_r: ok :)
jlast has quit [Ping timeout: 272 seconds]
bim has quit [Disconnected by services]
<arup_r>
Are you refactoring
<arup_r>
?
bim_ has joined #ruby
<dawkirst>
arup_r: not really, just trying to figure out for myself if it is any use defining a (private) method that will only ever be called by one other method.
alkoma has quit [Remote host closed the connection]
Lingo__ has quit [Quit: (null)]
lemur has quit [Remote host closed the connection]
dling has joined #ruby
ghostpl_ has joined #ruby
SouL has joined #ruby
<arup_r>
then private method labelling makes sense
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
<sevenseacat>
if it makes the code clearer, then sure.
chinmay_dd has quit [Quit: Leaving]
bal has joined #ruby
_hollywood has joined #ruby
craigp has joined #ruby
wicope has joined #ruby
allenn has joined #ruby
acl_ has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
andikr has joined #ruby
hanmac1 has joined #ruby
AlphaTech has quit [Quit: Connection closed for inactivity]
sinkensabe has joined #ruby
<flughafen>
make all the things private
<flughafen>
in c++ friends can see your privates
dhjondoh has joined #ruby
<shevy>
in c++ nobody wants to see privates
<flughafen>
i like c++ ;)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<certainty>
flughafen: designing and implementing a good language is a tough task :)
<flughafen>
python sets a low bar ;)
<flughafen>
i know. i don't have the expertise to do it properly
<flughafen>
but it would be fun
piotrj has joined #ruby
<certainty>
flughafen: it sure is fun. my last language experiment was a brainfuck compiler and virtual machine, including a simple single step debugger
<flughafen>
certainty: github?
<certainty>
and that's brainfuck. i mostly wanted to learn haskell and a bit about compilers. it was not a language design thing
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
flip_digits has quit [Ping timeout: 250 seconds]
lyuben_ has quit [Read error: Connection reset by peer]
lyuben_ has joined #ruby
R1ck has left #ruby [#ruby]
spider-mario has joined #ruby
lessless has quit [Ping timeout: 240 seconds]
<shevy>
shszshs shshsß
<shevy>
how does python do docu
mikepack has joined #ruby
yfeldblum has joined #ruby
rdark has quit [Quit: leaving]
Aswebb_ has joined #ruby
rdark has joined #ruby
dumdedum has joined #ruby
_zerick_ has joined #ruby
<maasha>
tobiasvl: we were discussing why Ruby don't seem to have a single documentation style guide - and wondered if Python had one.
<avril14th>
morning
commmmodo has joined #ruby
ghr has joined #ruby
davedev2_ has quit [Ping timeout: 246 seconds]
<_zerick_>
Hi folks, I dont know any other place to ask this, I'm running Thin with Redmine, which has been working fine. After a reboot it has broken completely, I found that thin is not creating the socket properly (even when it says that its creating it)
<tobiasvl>
ah. yes, pydoc is that standard, "everyone" uses its documentation standard
codecop has quit [Quit: Išeinu]
<_zerick_>
pid file, log file are created, but socket file not. Any ideas?
ghostpl_ has quit [Remote host closed the connection]
Rephiax has quit []
<shevy>
the best docu are working examples!
yfeldblum has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
meschi has quit [Ping timeout: 256 seconds]
meschi has joined #ruby
ns5 has joined #ruby
nii2361 has quit [Ping timeout: 250 seconds]
<certainty>
shevy: nah, good technical documentation can be helpful
<certainty>
i'm not talking about api docs
<ns5>
When I use 'rvm install 1.9.3' to install ruby on Oracle Linux 7, I always get this: http://pastebin.com/AC0HkeFM Actually the system is registered to Oracle Linux repositories. Any idea?
<helpa>
Hi ns5. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
craigp has quit [Remote host closed the connection]
<jhass>
shevy: the has_key?/key? is based on some comment by matz that he would remove has_key? if it wouldn't literally break every ruby code in existence
<undeadaedra>
I haven’t tweaked rubocop yet, I just started using it
<undeadaedra>
I just set indent to be 4 spaces
scottymeuk has joined #ruby
<scottymeuk>
Hey, is anyone around that could give me a hand with delayed_job (via RVM) in production? Some odd things are happening
n008f4g_ has joined #ruby
jlast has joined #ruby
bronson has joined #ruby
Apocalypse has joined #ruby
Apocalypse has joined #ruby
<jhass>
undeadaedra: that's said :(
<jhass>
er
<undeadaedra>
?
<jhass>
sad
<undeadaedra>
what’s sad ?
<jhass>
4 spaces
<undeadaedra>
2 spaces is too narrow imo
<jhass>
scottymeuk: no clue about delayed_job but ask anyway, don't try to find the right person
<jhass>
you'll get used to it
<apeiros_>
undeadaedra: just a matter of getting used to
<jhass>
in fact I started using it everywhere where I can get away with it
jottr has joined #ruby
<jhass>
like shellscript
leafybasil has joined #ruby
<undeadaedra>
I tried in 2 spaces for a while
<apeiros_>
I don't touch shell scripting with a 10ft pole. bash is close to being the ugliest language in existence for anything beyond single lines :-S
<scottymeuk>
jhass: thanks :P basically, I am running ruby 2.1.5, and rails etc is all running that, but for some reason, delayed_job seems ot be using 2.1.0 :S i cannot work out why
krisquigley has joined #ruby
<jhass>
scottymeuk: how do you run it?
<scottymeuk>
jhass: so i run "bundle exec rake jobs:work", it all works fine, but I just received some crash reports in Sentry, and they say it's running from "shared/bundle/ruby/2.1.0"
<jhass>
oooh
<scottymeuk>
Normally it runs in daemon mode using ./bin/delayed_job start
<jhass>
that 2.1.0 is not the ruby version
<scottymeuk>
but just debugging. But it does the same
<jhass>
it's the ABI version
bronson has quit [Ping timeout: 264 seconds]
jlast has quit [Ping timeout: 246 seconds]
<jhass>
2.1.0-2.1.5 all have the ABI version 2.1.0
<scottymeuk>
jhass: ahhh that makes sense. Confusing as hell to look at. So many that is not the issue then. Just randomly started getting exceptions from premailer in prod since moving away from using Foreman to run stuff
oo_ has quit [Remote host closed the connection]
<scottymeuk>
jhass: atleast i can rule that one out, thanks for that.
triangles3 has joined #ruby
<jhass>
and there we go
jottr has quit [Ping timeout: 240 seconds]
<jhass>
question had nothing to do with delayed_job
<jhass>
that's why trying to find "the right expert" is wrong ;)
<scottymeuk>
;)
<scottymeuk>
jhass: May aswell ask this then before i go digging into it: "premailer/rails/css_helper.rb in block in css_for_doc at line 19" is the exception. Emails send fine in development mode
<scottymeuk>
It's early. My copy and paste sucks :P
<scottymeuk>
NoMethodError: undefined method `force_encoding' for #<Array:0x00000005671510>
<jhass>
the for part is 50% of the value of that exception ;)
triangles2 has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
joonty has quit [Quit: joonty]
<jhass>
so you get an Array where you expect a String
<jhass>
in line 19
<scottymeuk>
Ahh ok, makes sense. Shall try and find out where it's happening
joonty has joined #ruby
Takle has quit [Remote host closed the connection]
<scottymeuk>
jhass: just managed to trigger premailer/rails/css_loaders/network_loader.rb in uri_for_url at line 17 NoMethodError: undefined method `split' for nil:NilClass
<scottymeuk>
Think i know why this is happening now
sngeth has joined #ruby
<jhass>
!add abi Each Ruby release has actually two versions, the interpreter version and the ABI version. The interpreter version is what commonly is referred to, for example 2.1.5. The ABI version is for the binary interface used by compiled extensions and it is what you see in your paths. It's usually shared among one release series, for example for the Ruby versions 2.1.0 to 2.1.5 the ABI version is 2.1.0.
<helpa>
The !abi command is now available.
<jhass>
!abi
<helpa>
Each Ruby release has actually two versions, the interpreter version and the ABI version. The interpreter version is what commonly is referred to, for example 2.1.5. The ABI version is for the binary interface used by compiled extensions and it is what you see in your paths. It's usually shared among one release series, for example for the Ruby versions 2.1.0 to 2.1.5 the ABI version is 2.1.0.
Juanchito has joined #ruby
<jhass>
phew, not too long :P
lordkryss has joined #ruby
Takle has joined #ruby
iteratorP has quit [Ping timeout: 256 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
sngeth has quit [Ping timeout: 264 seconds]
jgt1 has quit [Ping timeout: 240 seconds]
<shevy>
kaspernj yeah that often becomes outdated; matz also wrote that autoload is deprecated, but it no longer is
jimms has joined #ruby
rupertbg has quit [Quit: Leaving.]
nfk has joined #ruby
charliesome has joined #ruby
triangles has joined #ruby
triangles3 has quit [Ping timeout: 252 seconds]
albert_ has quit [Remote host closed the connection]
a5i has joined #ruby
Soda has joined #ruby
triangles2 has joined #ruby
alphaatom has joined #ruby
jimms has quit [Remote host closed the connection]
mcpierce` has joined #ruby
triangles has quit [Ping timeout: 246 seconds]
<maasha>
I am reading this styleguide and it says that and/or are not to be used always use &&/|| - why?
mcpierce has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
SiliconDon has joined #ruby
<shevy>
no idea
<shevy>
they are not even equivalent because they have different precedence rules
<a5i>
&& shortcircuts
<a5i>
i dont thin and does
<shevy>
what I found is that things can become a bit confusing if you don't use ()
<a5i>
thnk*
<jhass>
maasha: a = b and c vs a = b && c, what do they do?
<a5i>
coming from Rust, not confusing for me
jeromelanteri has joined #ruby
<shevy>
if foo.include? 'bla' and ! bla > 5 or x.has_key? 'lala'
<shevy>
if foo.include? 'bla' && ! bla > 5 || x.has_key? 'lala'
<a5i>
loks like Rust
<a5i>
I like !
<shevy>
it loks nice
<undeadaedra>
x.key?, we said.
<shevy>
why do we have is_a? then and not a?
<shevy>
or actually
<shevy>
.is?
triangles2 has quit [Ping timeout: 255 seconds]
meschi has quit [Ping timeout: 264 seconds]
<maasha>
I have always favored and/or as more readable, but keeping in mind that &&/|| have higher precedence - and using that to avoid parens: if this and that || foo and bar
<shevy>
yeah sometimes you have to use parens
<undeadaedra>
We should have is_a? and is_an?, and if you use the gramatically incorrect one, it doesn’t works.
<maasha>
I also favor not over ! as more readable.
<shevy>
yeah undeadaedra
<shevy>
"is an array?"
vtunka has joined #ruby
<shevy>
hmm not sure if this is phonetically correct
<undeadaedra>
or is_a_fucking?
doodlehaus has joined #ruby
sambao21 has joined #ruby
R3dk1nG has joined #ruby
<DefV>
don't use .is_a?
<DefV>
that's not very duck-typy
<shevy>
do you need duck typing?
<undeadaedra>
\_o<
martinbmadsen has joined #ruby
<DefV>
Object#quaks?
<undeadaedra>
If it’s a duck, we can eat it
<shevy>
if it is a duck I'll throw it away
<shevy>
I prefer a dragon
<shevy>
Imagine if we'd call it DRAGON TYPING
<undeadaedra>
A dragon is nice, too.
krisquigley has joined #ruby
<jhass>
I think that's what weak typing is called
<jhass>
"Fuck it, you're a string now, because I'm a dragon!"
<undeadaedra>
:D
<undeadaedra>
Let’s not talk dirty things, though.
iMe has quit [Ping timeout: 264 seconds]
joonty has quit [Quit: joonty]
banister has joined #ruby
iMe has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
martinbmadsen has quit [Ping timeout: 256 seconds]
SiliconDon has quit [Quit: ...]
dhjondoh has quit [Ping timeout: 244 seconds]
joonty has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 246 seconds]
SiliconDon has joined #ruby
lkba has joined #ruby
ItSANgo_ has quit [Quit: Leaving...]
<workmad3>
undeadaedra: general rules of IRC - curse words are fine, as long as they're not directed in an insulting way at another person
<undeadaedra>
?
<shevy>
undeadaedra workmad3 is saying that he loves you
SiliconDon has quit [Client Quit]
<undeadaedra>
oh ok.
<avril14th>
is there a one liner to write a array.uniq_by{ |a,b| } method (with two arguments to compare)
<workmad3>
undeadaedra: well, I assumed your comment of 'lets not talk dirty things' was directed at jhass saying "Fuck it" :P
SiliconDon has joined #ruby
<undeadaedra>
no, at him talking about weak typing :p
<workmad3>
ah, ok :)
<workmad3>
PHP typing is indeed a dirty, unwholesome topic
<hanmac1>
avril14th: what do you try to do? give us input and wanted output
<workmad3>
avril14th: Array#uniq can take a block. The result of that block will be used for uniqueness
Takle has quit [Remote host closed the connection]
<avril14th>
I have a tree structure (using RubyTree gem). I have a method "equal" that recursively test if two trees are the same (meaning root and all children are the same). Now, I have an array of such trees and I want to uniq them.
<hanmac1>
avril14th: the Trees should have an hash value using the #hash method
<avril14th>
hmm, sounds great let me see
<jhass>
avril14th: rename your method to eql? and implement hash on the object
ghostpl_ has quit [Remote host closed the connection]
lyuben_ has quit [Quit: This computer has gone to sleep]
ghostpl_ has joined #ruby
rodfersou has joined #ruby
lyuben_ has joined #ruby
SiliconDon has quit [Quit: ...]
Takle has joined #ruby
SiliconDon has joined #ruby
n008f4g_ has quit [Ping timeout: 272 seconds]
bim_ has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
dhjondoh has joined #ruby
jlast has joined #ruby
<avril14th>
hmm
<avril14th>
the gem thought about it
<avril14th>
but it fails
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<avril14th>
anyway, thanks hanmac1 and jhass
<undeadaedra>
bug report time
<jhass>
avril14th: what objects do you store in the tree
<jhass>
?
<avril14th>
prices
User458764 has joined #ruby
<jhass>
so your own class?
<avril14th>
yes
Lewix has joined #ruby
<jhass>
does that implement those methods properly?
serivichi has joined #ruby
Takle has joined #ruby
<avril14th>
oh you are right
<avril14th>
undeadaedra: bug report time to myself :)
<undeadaedra>
it seems
<undeadaedra>
But will you accept your PR ?
lyuben_ has quit [Quit: This computer has gone to sleep]
<undeadaedra>
More in the next episode
Lewix has quit [Client Quit]
SiliconDon has quit [Read error: Connection reset by peer]
ghostpl_ has quit [Read error: Connection reset by peer]
ghostpl_ has joined #ruby
milesmatthias has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
SiliconDon has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
nii2361 has quit [Ping timeout: 250 seconds]
tesuji has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
dhjondoh has quit [Ping timeout: 244 seconds]
<avril14th>
hmm, but that hash thing is already used by mongoid
<avril14th>
and I want to keep it that way
ghostpl_ has joined #ruby
<jhass>
but you want different equality rules?
<avril14th>
cause there is one for instances
<avril14th>
and one for logic
milesmatthias has quit [Ping timeout: 256 seconds]
<avril14th>
"some" logic, used at some point
<jhass>
sounds like you want a wrapper
varunwachaspati has joined #ruby
varunwachaspati has quit [Read error: Connection reset by peer]
<avril14th>
a wrapper for what?
<jhass>
so that wasn't a yes? I can't follow anymore
<avril14th>
yes, I want different equality rules
lolmaus has joined #ruby
<jhass>
then you need different classes
xenon16 has joined #ruby
<jhass>
to have it cleanly and everywhere
<jhass>
and thus a wrapper
<avril14th>
hmm
<jhass>
check delegate stdlib
<avril14th>
makes sense
<jhass>
call it a container or a box if you like that more, but that's what it comes down to
<gregf_>
hello, has anyone use the rest-client gem?
<avril14th>
gregf_: yes
<gregf_>
i've got some code that does work. but it spits out a warning like so, :WARNING: The rest_client gem is deprecated and will be removed from RubyGems. Please use rest-client gem instead.
<avril14th>
jhass: thanks for your input. I'll do that
mikecmpbll has joined #ruby
<jhass>
this anyone knows a lot of stuff, I gotta meet him some day
Zai00 has quit [Quit: Zai00]
soc42 has joined #ruby
<avril14th>
gregf_: looks like the gem just changed name, so if you use the "-" version you should be fine
<jhass>
gregf_: different require != different gem
<jhass>
gem uninstall rest_client
<gregf_>
avril14th: ah - ok
<jhass>
gem install rest-client
<undeadaedra>
What happenend on 14/4 ?
<gregf_>
so, does '-' and '_' not mean much when requiring a gem/
<gregf_>
s/\/$/\?/
<jhass>
it does mean much
<jhass>
the gem likely just provides both files
<avril14th>
yes
<avril14th>
but you are still using the same gem
<gregf_>
jhass, avril14th: thanks. uninstalling and installing ;)
arup_r has joined #ruby
<workmad3>
gregf_: it means that the gem has a file called 'rest-client.rb' in its lib folder or a gem has a file called 'rest_client.rb' in its lib folder
<workmad3>
if both works, it means the gem has both in its lib folder :)
<apeiros_>
jhass: no, anyone is not a close friend of mine
<gregf_>
workmad3: ok
<workmad3>
*work
<jhass>
nobody: rumors then, k
jottr has joined #ruby
maximski has joined #ruby
<gregf_>
my, installing and unstalling so much easier in ruby/python
<avril14th>
0o
sngeth has quit [Ping timeout: 256 seconds]
<workmad3>
gregf_: as opposed to? :)
jgt1 has quit [Ping timeout: 256 seconds]
hcnewsom has joined #ruby
<gregf_>
workmad3: Perl for example :/
elfuego has quit [Quit: elfuego]
claptor has quit [Quit: this channel is bakas]
<gregf_>
PHP has composer and Java has maven/gradle for deps but they take ages.
jottr has quit [Ping timeout: 264 seconds]
<workmad3>
if you want somewhat more stable dependency management in ruby, there's also bundler to layer on top
dhjondoh has joined #ruby
triangles has joined #ruby
<workmad3>
and maven... *shudder*
astrobunny has joined #ruby
RegulationD has joined #ruby
<gregf_>
i've got bundler as well, and its very easy to install deps ;)
davispuh has joined #ruby
triangles3 has quit [Ping timeout: 252 seconds]
<workmad3>
gregf_: yeah, bundler makes it easy and stable :) "Oh when we first installed everything for this project, we installed version 1.2.3 of this transitive dependency. We'll just make a note of it so that you don't randomly get version 1000 of it when you install on another machine and break everything"
ghostpl_ has quit [Remote host closed the connection]
zenspider has quit [Ping timeout: 246 seconds]
<workmad3>
gregf_: I assume from the fact you know about maven that you've encountered that sort of lovely issue in java projects ;)
ghostpl_ has joined #ruby
hcnewsom has quit [Quit: hcnewsom]
delianides has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
hcnewsom has joined #ruby
piotrj has quit [Remote host closed the connection]
DaniG2k has joined #ruby
piotrj has joined #ruby
basiclaser has quit [Quit: Connection closed for inactivity]
<scottymeuk>
jhass: stupid premailer, i eventually just had to do: "Rails.application.assets.find_asset('email').to_s.html_safe" lol
<scottymeuk>
jhass: thank you for all your help
iamninja has joined #ruby
bim has joined #ruby
jonr22 has joined #ruby
jespada has joined #ruby
astrobunny has quit [Remote host closed the connection]
<workmad3>
undeadaedra: I think you need some SO rep before you can downvote :P
slap_stick has joined #ruby
<arup_r>
shevy: don't publish my account every where :D
aclearman037 has joined #ruby
<undeadaedra>
workmad3: I should have misunderstood, but to me, it seems that you need SO rep before doing /anything/. So you need rep to get rep :D
codecop has joined #ruby
<undeadaedra>
OH NO THE COPS
<shevy>
undeadaedra you can still reply
<workmad3>
undeadaedra: you don't need rep to ask or answer questions
<undeadaedra>
ok
piotrj has quit [Remote host closed the connection]
nateberkopec has joined #ruby
delianides has quit [Ping timeout: 240 seconds]
<shevy>
it's like with fight culb
<shevy>
*club
<shevy>
you must fight when you join
iamninja has quit [Quit: WeeChat 1.1.1]
parduse is now known as Guest87140
jlast has quit [Ping timeout: 264 seconds]
<arup_r>
well my code is not giving what I thought... It is giving only the files under which I CD into.. I wanted to traverse each directory recursively... that my code is not doing..
piotrj has joined #ruby
<canton7>
arup_r, you're going to have to manually traverse
iamninja has joined #ruby
<arup_r>
humm
pardusf has joined #ruby
<arup_r>
That I don't like
Guest87140 has quit [Ping timeout: 246 seconds]
<canton7>
tough
x1337807x has joined #ruby
<arup_r>
np.. I'll do manually.. can I list only dir names under the current dir ? Thinking If I can do so.. it will be solved..
hectortrope has quit [Ping timeout: 246 seconds]
bal has joined #ruby
bal has quit [Read error: Connection reset by peer]
bal has joined #ruby
Takle has quit [Remote host closed the connection]
SouL has quit [Remote host closed the connection]
<gregf_>
arup_r: sftp.dir.foreach("/path/to/directory") and you can recursively loop through ?
SouL has joined #ruby
<arup_r>
sftp is in stdlib.. let me see,,
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
<jhass>
GambitK: input, what you tried so far and desired output -> gist
<arup_r>
workmad3: is it? Why not mine then ? :(
freerobby has joined #ruby
livingstn has joined #ruby
meschi has joined #ruby
<workmad3>
arup_r: no idea... something in your local network screwing up the FTP connection maybe?
bruno- has quit [Ping timeout: 264 seconds]
triangles2 has joined #ruby
Seich has quit [Ping timeout: 250 seconds]
charliesome has quit [Ping timeout: 265 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
aswen has joined #ruby
vtunka has quit [Quit: Leaving]
delianides has quit [Remote host closed the connection]
delianides has joined #ruby
beef-wellington has joined #ruby
<GambitK>
jhass: I get this result from a web application https://gist.github.com/GambitK/1883a6e102b61e9281d7, I want to aggregate over a field, I wanted to know if there's a library or method that would help me without having to do it manually
milesmatthias has quit [Ping timeout: 252 seconds]
<ns5>
When I run a ruby program, I always get Gem::LoadError. Command output and 'gem env' output are in http://pastie.org/10035105. I'm new to ruby. Could anyone help to have a look?
<GambitK>
jhass: like a group by
OrbitalKitten has joined #ruby
<jhass>
then group_by + uniq the values
<jsrn>
ns5: It's trying and failing to load the gem "device_mapper_test_suite"
Seich has quit [Ping timeout: 256 seconds]
<jsrn>
Do you have a `require` any where in your code that matches that?
bruno- has joined #ruby
livathinos has quit [Ping timeout: 256 seconds]
lxsameer has quit [Quit: Leaving]
<jsrn>
Are you perhaps intending to load a file by that name instead?
Seich has joined #ruby
<GambitK>
jhass: is that an array method?
Mia has joined #ruby
Mia has joined #ruby
<jhass>
GambitK: Enumerable
<jhass>
Enumerable#group_by, Array#uniq
jlast has joined #ruby
mradmacher has joined #ruby
<jhass>
GambitK: well, maybe not unique, maybe you just want to pick a random entry, still not quite sure I fully understand tbh
tvw has joined #ruby
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby
sgambino has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
<GambitK>
jhass: the array is ordered by date, so maybe the first occurrence of the field that's more important. If the field has the same value over the first N elements, so only the first occurence of a different value of a given field of the json objects that are part of the array
aclearman037 has joined #ruby
greenbagels has joined #ruby
bruno- has joined #ruby
bruno- has quit [Remote host closed the connection]
jottr has joined #ruby
<jhass>
oh, merge w/ a block + uniq I think, let me try
jlast has quit [Ping timeout: 255 seconds]
HOrangeJewce has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
jerius has joined #ruby
bruno- has joined #ruby
sankaber has joined #ruby
sankaber has quit [Client Quit]
steve-la_ has joined #ruby
bim has joined #ruby
<jhass>
GambitK: .inject {|a, b| a.merge(b) {|k, a, b| [*a, b] } }.tap {|data| data.each_value(&:uniq!) } like this?
<apeiros>
GambitK: dude, stop with that "json object" nonsense. such a thing does not exist. once you parse json, it's plain old ruby objects.
<GambitK>
jhass: it's because in the group of json objects I receive, a lot of the individual objects only vary by date which is unimportant, since only the latest entry is required for any given field you want to search for
<GambitK>
apeiros: Ok
RegulationD has joined #ruby
<apeiros>
you'll only confuse yourself if you think of them as something special
<jhass>
GambitK: anyway ^ should give you some ideas
<jhass>
I think it makes more sense in your head
ns5 has quit [Quit: Leaving.]
DaniG2k has quit [Ping timeout: 245 seconds]
dblessing has joined #ruby
RegulationD has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
Regulati_ has joined #ruby
brb3 has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
DerisiveLogic has joined #ruby
triangles3 has joined #ruby
iteratorP has joined #ruby
max96at|off is now known as max96at
fryguy9 has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
kaleido has joined #ruby
lanemeyer has joined #ruby
SiliconDon has quit []
akky has joined #ruby
triangles2 has quit [Ping timeout: 272 seconds]
doodlehaus has joined #ruby
<arup_r>
I got some dir names as <space> inside the then like "03-13-15 11:46PM <DIR> Amita ww" ,,, If I do string.split(" ").last it wouldn't work.. Although it took time for me to figure out.. How can I get only "Amita ww"
<arup_r>
?
anaeem1_ has joined #ruby
iteratorP has quit [Ping timeout: 244 seconds]
zenith_ has joined #ruby
<arup_r>
I means everything after <DIR> .. then I can strip the white spaces
elfuego has joined #ruby
oo_ has quit [Ping timeout: 252 seconds]
<jsrn>
arup_r: Not sure how elegant this is, but `line.split("<DIR>").last` would get you everything after DIR
<jsrn>
And you can go from there
<tobiasvl>
or if this is the specific use case, string.split(" ")[-2..-1] ?
<arup_r>
like ""02-13-15 04:51PM <DIR> Lotus 901", "09-23-14 03:58PM <DIR> HD CREATIONS WOMENS WEAR" etc
HOrangeJewce has quit [Quit: Leaving.]
davidhq has joined #ruby
banister is now known as banisterfiend
danzilio has quit [Client Quit]
<jokester>
are they obtained from `dir` ?
_64k has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
jonr22 has quit [Ping timeout: 256 seconds]
casadei has joined #ruby
<maasha>
Right, reading about tomdoc I think it is pretty much what I want for documenting stuff. However, I fail to see how you get tomdoc processed for the use of ri and rubydoc.info ?
crueber has joined #ruby
flip_digits has joined #ruby
martinbmadsen has joined #ruby
enebo has joined #ruby
ghostpl_ has joined #ruby
failshel_ has quit [Remote host closed the connection]
DouweM has joined #ruby
<arup_r>
nah.. no rescue.. I gave up :(
nii2361 has joined #ruby
<gregf_>
arup_r: something like a split(",").map ?
<arup_r>
no..
<arup_r>
gregf_: /Users/shreyas/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/net/ftp.rb:978:in `parse227': 226 Transfer complete. (Net::FTPReplyError)
<arup_r>
This error...
<gregf_>
arup_r: str.split(",").map { |s| s =~ /<DIR>\s+([^"]+)/i; $1 }
<arup_r>
gregf_: the error is with FTP..
<gregf_>
ah - nevrmind then
<arup_r>
If I use ftp.passive = true getting error as `parse227': 226 Transfer complete. (Net::FTPReplyError)
Takle has joined #ruby
<arup_r>
If I don't use ftp.passive = true ... no output is coming..
a5i has joined #ruby
failshell has joined #ruby
anaeem1_ has quit [Ping timeout: 240 seconds]
zenith_ has quit [Ping timeout: 245 seconds]
martinbmadsen has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
greenbagels has quit [Read error: Connection reset by peer]
ojacobson has joined #ruby
rodfersou has quit [Remote host closed the connection]
bronson has joined #ruby
zenith_ has joined #ruby
nii2361 has quit [Ping timeout: 245 seconds]
Takle has quit [Ping timeout: 265 seconds]
hcnewsom has quit [Quit: hcnewsom]
dinhani has joined #ruby
dinhani has quit [Client Quit]
ghostpl_ has quit [Remote host closed the connection]
<a5i>
For erb, <%= %> evaluates and {{}} is when the value is already evaluated ?
elaptics_away is now known as elaptics
<jhass>
in erb {{}} is just {{}}, no special cases
<jhass>
{{ .. }} is used by other templating languages though, like handlebars
<a5i>
Oh
<a5i>
Okay
bronson has quit [Ping timeout: 252 seconds]
serivichi has joined #ruby
joonty has joined #ruby
ghostpl_ has joined #ruby
triangles has joined #ruby
gfawcettpq has joined #ruby
fuzzyhorns2 has joined #ruby
amystephen has joined #ruby
slap_stick has joined #ruby
arup_r has quit []
triangles3 has quit [Ping timeout: 244 seconds]
ghostpl__ has joined #ruby
ghostpl__ has quit [Remote host closed the connection]
<a5i>
Im a little confused with this
<a5i>
nvm
<a5i>
wrong chat :P
<undeadaedra>
you’re a little confused with you IRC client ?
rbennacer has joined #ruby
ghostpl_ has quit [Ping timeout: 256 seconds]
tejota has joined #ruby
ndrei has joined #ruby
anaeem1_ has joined #ruby
tier has quit [Remote host closed the connection]
otisZart has joined #ruby
iamjarvo has joined #ruby
<shevy>
he just can't write long sentences
<GambitK>
jhass: what I want is the same as array.uniq! but based on a single field, not all the fields
aryaching has joined #ruby
<undeadaedra>
uniq_by ?
JDiPierro has joined #ruby
<jhass>
GambitK: it takes a block
<undeadaedra>
is there a doc bot ?
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
DaniG2k has joined #ruby
pullphinger has joined #ruby
<GambitK>
jhass: i dont get it sorry, very new to ruby
<shevy>
undeadaedra unsure. I think helpa can learn new links
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
that's a poor select but I had no decent idea :P
startupality has quit [Quit: startupality]
sambao21 has quit [Quit: Computer has gone to sleep.]
zenith__ has joined #ruby
ghostpl_ has joined #ruby
sambao21 has joined #ruby
anaeem1_ has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Read error: Connection reset by peer]
dinhani has joined #ruby
ghostpl_ has joined #ruby
zenith_ has quit [Ping timeout: 256 seconds]
tier has joined #ruby
joonty has quit [Quit: joonty]
rodfersou has joined #ruby
hectortrope has left #ruby [#ruby]
last_staff has quit [Quit: last_staff]
ghostpl__ has joined #ruby
ghostpl_ has quit [Read error: Connection reset by peer]
n008f4g_ has joined #ruby
craigp has quit [Remote host closed the connection]
sngeth has joined #ruby
relix_ has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
millerti has joined #ruby
GambitK has quit [Ping timeout: 246 seconds]
joonty has joined #ruby
mitchellhenke has joined #ruby
relix has quit [Ping timeout: 256 seconds]
<shevy>
why do people like lisp so much
oo_ has joined #ruby
<jhass>
it has a cute story
<wasamasa>
it has no stupid syntax
dmsigu has joined #ruby
<wasamasa>
it's meta-programming is not braindead
<jhass>
the first high level programming language and it was never intended to be one
allcentury has joined #ruby
sngeth has quit [Ping timeout: 245 seconds]
troyready has quit [Ping timeout: 250 seconds]
<wasamasa>
it can be simple or complex or anything else you want it to be
anaeem1 has joined #ruby
zenith__ has quit [Ping timeout: 244 seconds]
failshell has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
fabrice31 has quit [Remote host closed the connection]
failshell has joined #ruby
imanzarrabian has joined #ruby
fabrice31 has joined #ruby
MXfive_ has quit [Read error: Connection reset by peer]
jmhmccr has joined #ruby
MXfive has joined #ruby
<certainty>
shevy: i can't speak for lisp in general but for scheme it is a sane language with a unique design goal. "Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary." .. this is a quote from the introduction section of r5rs
davispuh has quit [Remote host closed the connection]
<hanmac1>
jhass: the only good thing for lisp is that you cant code in hanmac style with it ;P (shevy knows what i mean)
aryaching has quit []
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
failshell has quit [Remote host closed the connection]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 256 seconds]
startupality has quit [Client Quit]
davispuh has joined #ruby
startupality has joined #ruby
Channel6 has joined #ruby
red_horned_rihno has joined #ruby
ElectionLibre has quit [Client Quit]
baroquebobcat has joined #ruby
commmmodo has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
red_horned_rihno has quit [Max SendQ exceeded]
spider-mario has joined #ruby
daynaskully has quit [Quit: quit]
red_horned_rihno has joined #ruby
startupality has quit [Client Quit]
red_horned_rihno has quit [Max SendQ exceeded]
red_horned_rihno has joined #ruby
lostcuaz has quit [Read error: Connection reset by peer]
hs366 has quit [Quit: Leaving]
startupality has joined #ruby
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brb3 has quit [Quit: <.<]
sngeth has joined #ruby
red_horned_rihno has quit [Remote host closed the connection]
antgel has joined #ruby
hobodave has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
SouL has joined #ruby
dmsigu has quit [Remote host closed the connection]
gregf has quit [Ping timeout: 246 seconds]
einarj has quit [Remote host closed the connection]
brb3 has joined #ruby
sngeth has quit [Ping timeout: 264 seconds]
jespada has quit [Ping timeout: 264 seconds]
jonr22 has joined #ruby
riotjones has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 246 seconds]
flip_digits has quit [Ping timeout: 256 seconds]
SouL has quit [Ping timeout: 245 seconds]
mwlang has joined #ruby
jespada has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
ndrei has joined #ruby
happyface has joined #ruby
<mwlang>
how do use Ruby I set the PATH in Windows before shelling a command with backticks
baroquebobcat has joined #ruby
<shevy>
mwlang should be possible via ENV
Hirzu_ has quit [Ping timeout: 264 seconds]
<shevy>
at least I tried on linux; I can modify ENV['LDFLAGS'] and it works
<shevy>
try what irb gives you for ENV['PATH'] on windows
mikepack has joined #ruby
<mwlang>
shevy: good idea. Let’s see what happens.
aswen has quit [Ping timeout: 245 seconds]
<shevy>
compile.rb: ENV['LDFLAGS'] = '-static'
<shevy>
that's what I use in compile.rb :)
<shevy>
my dream was to compile a static ruby... but somehow, I failed. it works with "make" program though, my make is static, "ldd make" gives no dependencies on any .so file
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
tobago has quit [Remote host closed the connection]
<nickjj>
jhass, btw. going weeks back to that refactor. your version with a few minor edits ended up being 30 less lines of code with a lot less duplication overall
<shevy>
havenwood hmm
<jhass>
nickjj: :)
mistermocha has quit [Remote host closed the connection]
<shevy>
havenwood I have only recently started to use gems!
<shevy>
now you tell me to change my world again
martinbmadsen has joined #ruby
<certainty>
haha
<shevy>
hmm replace ... /use gems/use and create gems/
dcarmich has joined #ruby
<certainty>
shevy: did you know that we have flying machines now? we call them airplanes
a346 has joined #ruby
brandly has joined #ruby
<shevy>
yeah
<certainty>
just checkin
<shevy>
it's strange - sometimes I am afraid to crash to the ground
<shevy>
and sometimes not
werelivinginthef has quit [Remote host closed the connection]
speakingcode has joined #ruby
ponga has quit [Remote host closed the connection]
<certainty>
shevy: yeah. the thing is some do actually crash to the ground and some don't
gregf has joined #ruby
nii2361 has joined #ruby
<shevy>
statistically it's a very low chance to crash
eat_multi has joined #ruby
mistermocha has joined #ruby
speaking1ode has joined #ruby
scrapcode has joined #ruby
SouL_ has joined #ruby
speaking1ode has quit [Client Quit]
SouL has quit [Ping timeout: 264 seconds]
amundj has quit [Ping timeout: 255 seconds]
uptownhr has joined #ruby
plashchynski has joined #ruby
Hirzu has joined #ruby
Takle has quit [Remote host closed the connection]
martinbmadsen has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
werelivinginthef has joined #ruby
<certainty>
shevy: i think the odds increase once you start using gems
cheater has joined #ruby
<cheater>
hi
joonty has quit [Quit: joonty]
<DEA7TH>
Does Ruby have a method array.indexes, which is like array.index, but returns the positions of all matching elements? like so: [1,2,3,4,3].indexes(3) == [2, 4]
<DEA7TH>
I wrote it myself already, but would be nicer if I could use the libraries instead
sambao21 has joined #ruby
jerius has quit [Quit: /quit]
<shevy>
DEA7TH probably .select ?
<DEA7TH>
shevy: no, I need a method which literally does what I want. input: element, output: indexes of element in array
<jhass>
cheater: p is like print or puts, except getting a representation of the object suited for the programmer
MXfive has quit [Read error: Connection reset by peer]
<workmad3>
gregf_: dat.select.with_index :P
milesmatthias has quit [Client Quit]
<gregf_>
heh
scrapcode has quit [Quit: Leaving]
B1n4r10 has joined #ruby
nymous has left #ruby ["I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/"]
slap_stick has joined #ruby
bigmac has quit [Ping timeout: 246 seconds]
brandly has quit [Remote host closed the connection]
<DEA7TH>
gregf_: I already did exactly that, only a little better :D. My requirement was that the function is in the standard libraries because I like to keep my ruby_extensions.rb file minimal.
jimms has joined #ruby
soc42 has joined #ruby
commmmodo has quit [Quit: commmmodo]
milesmatthias has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
JDiPierro has joined #ruby
bigmac has joined #ruby
<cheater>
jhass: thanks, let me try that
senayar has joined #ruby
<cheater>
jhass: can i also type STDERR.p caller ?
SOLDIERz______ has quit [Quit: Be back later ...]
<jhass>
I don't think so
<jhass>
>> $stderr.p
<eval-in_>
jhass => private method `p' called for #<IO:<STDERR>> (NoMethodError) ... (https://eval.in/301679)
<jhass>
cheater: however p is just puts x.inspect really
<eat_multi>
you can always use STDERR.puts(something.inspect)
<cheater>
ok. i know of inspect.
baroquebobcat has quit [Quit: baroquebobcat]
tkuchiki has quit [Ping timeout: 252 seconds]
<cheater>
when i'm trying to find something out about some things, i get output such as this: "#<VagrantPlugins::ProviderVirtualBox::Config:0xa2b6470 @auto_nat_dns_proxy=#<Object:0x9c4c1e8>, @check_guest_additions=#<Object:0x9c4c1e8>, @customizations=[], @destroy_unused_network_interfaces=#<Object:0x9c4c1e8>, @functional_vboxsf=#<Object:0x9c4c1e8>, @name=#<Object:0x9c4c1e8>, @network_adapters={1=>[:nat, {}]}, ...
tkuchiki_ has quit [Read error: Connection reset by peer]
<cheater>
... @gui=#<Object:0x9c4c1e8>>"
<cheater>
if i wanted to find out more about "name", what would i do?
<undeadaedra>
either print the object directly
<undeadaedra>
either use some debugging tool
<cheater>
i did, but it just shows "#<Object:" and so on
<jhass>
!goal
<undeadaedra>
You can try some inspections method on it, I don’t know what you need to know about it
<cheater>
this obviously isn't the way this thing is being accessed in the code, i assume it's a variable that holds a string, so how would i get at it?
<jhass>
mh, thought we had that
<jhass>
it doesn't hold a string
<undeadaedra>
If it were a string, it would show a string
<jhass>
when people say ^ in IRC they mean it as an arrow usually
<jhass>
"look at above"
<undeadaedra>
it just refers to previous message
<cheater>
ok
<cheater>
not assuming anything, i don't know ruby syntax
Takehiro has joined #ruby
<jhass>
time for some tryruby.org then ;)
<cheater>
i'm not sure this will be productive
<robindunbarr>
You shouldn’t aim for productivity. You should aim for fun! (:
bal has quit [Quit: bal]
<robindunbarr>
Just saying my two cents’ worth haha.
<cheater>
i'm unfortunately not in position to spend time and learn every nook and cranny of the language
<certainty>
my mother told me to always aim for the balls
<robindunbarr>
^ LOL
agarie has quit [Remote host closed the connection]
<jhass>
cheater: then stop whining that you don't know the syntax
Takehiro has quit [Client Quit]
<robindunbarr>
cheater: just do it man (:
<cheater>
jhass: i was just explaining my confusion, i'm not "whining"..
<jhass>
there is the opportunity to learn it, it's pretty easy if you know a programming language or two
<jhass>
take it or leave it
<certainty>
cheater: it's not about the language really. it's very vagrant specific. It seems todo some severe hackary. If you need to dig in you will have to develop a deeper understanding
<jhass>
well, we all read it the first time ;)
<cheater>
jhass: why would extending the object that i have in "name" help me find what's inside it? does ruby have some form of reflection which will tell me what things are inside an object?
<jhass>
or you just ask your real quesiton
<jhass>
it does, tons
<jhass>
but that's not what I meant
<jhass>
and there's actually no point to explain
<shevy>
he has no time to learn anyway
<jhass>
at this level
<jhass>
if you want to debug this on you own you got to learn stuff
<jhass>
if not ask your real question in the vagrant channel and patiently wait at least 24 horus there
mistermocha has quit [Remote host closed the connection]
<certainty>
or wait for answer in the vagrant channel
jespada has joined #ruby
<certainty>
< echo
<cheater>
please can we not start one of those arguments where people are telling a person new to the language to go and read a complete book on the language and then come back? that will not lead anywhere and will make sure we all have a bad day
mistermocha has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
<workmad3>
cheater: aww, you ruin all our fun :P
failshell has quit [Remote host closed the connection]
<jhass>
cheater: tryruby.org takes 30 minutes, max
<certainty>
cheater: the thing is that most of us are probably not familiar with the vagrant codebase. we can give general advices on how to approach debugging unknown code, which jhass did, but that's about it
Katselphrime has joined #ruby
<jhass>
it gives you a basic understanding of the syntax
<cheater>
jhass: if i go to tryruby.org and finish the tutorial will you stay here and help me figure out what i want to do?
gfawcettpq has quit [Ping timeout: 246 seconds]
swills has joined #ruby
<jhass>
sure
<cheater>
ok
<workmad3>
jhass is always here... I think he's an AI that only exists on IRC
<cheater>
so you mean the tutorial i get by typing "help"?
<jhass>
workmad3: mmh, I see you don't look at my Github
<cheater>
let me do that
baroquebobcat has joined #ruby
hobodave_ has joined #ruby
<jhass>
yes
shadoi1 has joined #ruby
davispuh has quit [Read error: Connection reset by peer]
<certainty>
githubs can be faked
DouweM has quit [Quit: Leaving...]
lemur has joined #ruby
<workmad3>
jhass: why would I want to destroy my illusions about your virtual reality? :)
Pharaoh2_ is now known as Pharaoh2
<jhass>
workmad3: see certainty
hobodave has quit [Ping timeout: 250 seconds]
bricker has joined #ruby
<jhass>
I'm just countering the claim that my AI can only do lously IRC stuff
<workmad3>
jhass: that still destroys my illusion that you only exist on IRC ;)
<workmad3>
jhass: and instead makes me panicky that AIs have escaped from the IRC sandbox and are roaming the interwebs at large
<jhass>
shevy: you didn't understand the turing test
bigmac has joined #ruby
brandly has joined #ruby
<jhass>
or markov chains
<shevy>
fancy names for shallow concepts
<jhass>
where's the source for that class anyway?
<workmad3>
shevy: that could be a carefully controlled, intentional introduction of errors in order to make the jhass-bot seem more human and therefore not a scary AI trying to get into nuclear launch sites and destroy the world
* jhass
never got how vagrant is structured
<shevy>
it's private
<shevy>
just like that... what was the name
<shevy>
penetration thingy
<shevy>
where people came here just to learn it but not ruby
<certainty>
you can't fool me. i know you all are AIs trying to cover up the fact that you are by talking about AIs
<bricker>
Does anybody have examples of good documentation for nested JSON responses?
<bricker>
I'm just nesting tables but it's unruly
<certainty>
nice try bricker. i know you're the king of AIs
spyderma_ has joined #ruby
<bricker>
:O
Cache_Money has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
<workmad3>
certainty: what could I say that would convince you I'm not an AI? :P
Lingo__ has joined #ruby
<certainty>
workmad3: tell me about you dreams
<certainty>
your, even
<jhass>
bricker: how about docson?
Rapier- has joined #ruby
<workmad3>
certainty: they're filled with sheep at a recharging station
arup_r has joined #ruby
<certainty>
workmad3: i knew it
rbennacer has quit [Remote host closed the connection]
<workmad3>
dammit! foiled again!
spyderm__ has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
<certainty>
:D
einarj has joined #ruby
<certainty>
alright i'll call it a day
bl4ckdu5t is now known as silverdust
<eam>
to prove you're not an AI you'll first have to come up with a definition of "artificial" that somehow doesn't include regular human beings
MXfive has joined #ruby
alexblom has quit [Remote host closed the connection]
DaniG2k has quit [Quit: leaving]
failshell has joined #ruby
iheartkode has joined #ruby
anarang has quit [Quit: Leaving]
alexblom has joined #ruby
<workmad3>
eam: lets not forget a working understanding of 'intelligence' that provides useful criteria for determining what intelligence is
alexblom has quit [Remote host closed the connection]
<cheater>
when i type :foo is that the same as "foo" and 'foo'?
davispuh has joined #ruby
<eam>
workmad3: indeed; first disprove my solipsism
<hoelzro>
cheater: no, :foo is a Symbol
<eam>
cheater: no, but it is the same as :"foo"
alexblom has joined #ruby
<workmad3>
eam: I'd rather just point at humans and say "Not artificial" then point at a computer and say "Artificial"
<eam>
workmad3: but you've already created an inconsistency, as humans are a subset of computers
<hoelzro>
cheater: pretty much, yes
DaniG2k has joined #ruby
<cheater>
k
flip_digits has joined #ruby
spyderma_ has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
why are humans not artificial
<shevy>
who booted them up
<eam>
artificial is defined as "made or produced by humans" so humans themselves would be artificial
jay_ has joined #ruby
nucular11 has joined #ruby
riotjones has joined #ruby
<shevy>
huh
<workmad3>
eam: no, it just means that my pointing made it clear that a thing recognisable as, say, an Apple laptop and a thing recognisable as a species of chimp that walks upright divide the set of 'things that can perform computations'
<shevy>
so a synthetic genome is artificial
<shevy>
yet it can reproduce by itself
pontiki has quit [Ping timeout: 244 seconds]
<jay_>
how to create soap api application using rubyonrails.....any links/leads/blogs/forum would be very helpful....... as I want to understand soap api concept
<workmad3>
eam: so that 'artificial' is not a subset or superset of 'computer'
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
<workmad3>
eam: it also means I don't want to spend time chopping and changing definitions in some foolish game that makes me think I'm changing reality :P
<mwlang>
jay_: I just did a couple SOAP apps myself in Ruby on Rails. It’s not entirely easy, but it’s doable.
<eam>
workmad3: sure, you can use a circular definition :)
<mwlang>
jay_: I’m planning to write up a couple of blog posts on it, but I’m not quite out of the woods just yet.
<workmad3>
eam: or I can continue to point at things ;)
<jay_>
ohhh
<mwlang>
jay_: however, having said that, the two gems to get familiar with are wash_out and savon.
krisquigley has quit [Ping timeout: 252 seconds]
<jay_>
ok
<eam>
workmad3: just sayin', "prove you're not an AI" is equally difficult for a silicon chip as for a human brain
tier has quit [Remote host closed the connection]
<workmad3>
eam: or at least, to your human brain it seems equally as difficult ;)
doodmtl has joined #ruby
<mwlang>
jay_: I did the first application using these gems, but I had lots of bugs and issues with them, so the second app, I wrote a Rack middleware app to parse SOAP messages.
ajsdklfjalksdf has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
<jay_>
hmm
DouweM has joined #ruby
pengin has joined #ruby
<jay_>
You gave me two gems "savon" and "wash_out" I will try to use them
<jay_>
thanks for the lead :)
jimms has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 250 seconds]
brandly has quit [Remote host closed the connection]
olivier_bK has quit [Ping timeout: 246 seconds]
<mwlang>
jay_: My favorite gem is one from the Savon stack call Nori as it translates the SOAP XML into Ruby hashes and I found this was all I really needed the 2nd time around.
<jay_>
ohh
<jay_>
so your using Savon and nori gems for soap architecture
failshell has quit [Remote host closed the connection]
brandly has joined #ruby
<mwlang>
jay_: So I just studied up on the specs for declaring WSDL and Soap Envelope/Body constructs and built the response messages with Ruby’s Builder https://github.com/jimweirich/builder and it worked out quite nice.
robbyoconnor has joined #ruby
<mwlang>
jay_: The first app, I do use Savon as I connect to a SOAP server to send messages.
<jay_>
ok
<mwlang>
and the second app is the SOAP server and doesn’t make external SOAP calls, so all it needed was a SUCCESS/FAILURE response.
<undeadaedra>
« Savon »
<mwlang>
So it just uses builder and nori
agarie has joined #ruby
meschi_ has joined #ruby
ponga has joined #ruby
robindunbarr has quit [Quit: robindunbarr]
Hirzu has joined #ruby
zachrab has quit [Remote host closed the connection]
zachrab has joined #ruby
bigmac_ has joined #ruby
<jay_>
builder and nori (y)
Takle has quit [Remote host closed the connection]
<eam>
I wish :?a worked
deric_skibotn has joined #ruby
bigmac has quit [Ping timeout: 256 seconds]
bim has quit [Remote host closed the connection]
<undeadaedra>
:’?a’
tier has joined #ruby
allcentury has quit [Ping timeout: 252 seconds]
<jay_>
mwlang_ thanks alot
<jay_>
for sharing information
digifiv5e has joined #ruby
ponga has quit [Ping timeout: 245 seconds]
digifiv5e is now known as Guest89586
Morkel has quit [Quit: Morkel]
zenith_ has quit [Remote host closed the connection]
bronson has joined #ruby
milesmatthias has quit [Remote host closed the connection]
<jhass>
cheater: it defines plain methods, it's a shortcut to writing the following methods: def name; @name; end; def name=(value); @name = value; end
<jhass>
Ruby has syntax sugar for calling methods that end in =, a.b=(v) can be written as a.b = v
ndrei has joined #ruby
<cheater>
hmm what does "def name=(value)" mean? is this a special syntax for a setter?
<iheartkode>
hash = { key: "Value" } when you access it hash[:key] why is the symbol turned around?
craigp has joined #ruby
spider-mario has joined #ruby
craigp has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 244 seconds]
<pipework>
iheartkode: It's not turned around. Those are two things. Symbols and then the 1.9 hash syntax.
pdoherty has joined #ruby
dc has joined #ruby
<iheartkode>
Interesting
schickung has quit [Quit: schickung]
failshell has joined #ruby
tubuliferous has joined #ruby
dinhani has quit [Quit: Leaving.]
<pipework>
The 1.9 hash syntax makes symbols keys and whatever you want to put as the value as the value. In 1.8, we had the hashrocket, which was any object on the left associated to the object on the right of the =>
antgel has joined #ruby
sepp2k has joined #ruby
graydot has quit [Client Quit]
atomiccc has joined #ruby
<iheartkode>
I recall the hash rocket but why is the : on the other end when you access it?
ndrei has quit [Ping timeout: 245 seconds]
<iheartkode>
"Key" => "Value"
<havenwood>
arup_r: Well, we have documentation, just not of EC2. :P
<iheartkode>
I like the symbol way better.
graydot has joined #ruby
DaniG2k has quit [Quit: leaving]
ndrei has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<a5i>
jhass: index.erb is Universal transformation format 8 bits; UTF-8
<a5i>
jhass: updates.htm is 7bit ASCII characters
j_mcnally has joined #ruby
<iheartkode>
Okay I guess I should not worry why lol
sevvie has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
tubuliferous has quit [Ping timeout: 244 seconds]
<arup_r>
havenwood: humm.. we need very perfect eyes to read Ruby documentation and #ruby channel also many times..
<arup_r>
:D
hobodave_ has quit [Quit: Computer has gone to sleep.]
enterprisedc has joined #ruby
hobodave has joined #ruby
ghr has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
sevvie has joined #ruby
<havenwood>
arup_r: i choose the font and color i prefer
<jhass>
a5i: gotta check with something else, maybe check with the nice people of #passenger
<workmad3>
iheartkode: the 1.9 symbol-hash syntax was basically introduced so that there was an upgrade path from 1.8 style hash arguments ( foo(:bar => "fizz") ) to 2.0 named arguments ( foo(bar: "fizz") ). It also has a pseudo-nice feature of being similar to JSON, but a not-nice feature of not being exactly like JSON
<iheartkode>
I wasn't asking about that sir.
allenn has quit [Remote host closed the connection]
<a5i>
jhass, I already told them but no response yet, also why did you want to know the encodings?
<workmad3>
iheartkode: yes you were, you just didn't realise it ;)
strixd has quit [Quit: 500]
<iheartkode>
lol
<iheartkode>
legit
<jhass>
a5i: because you have an encoding error
allcentury has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Jackneill has joined #ruby
vtunka has quit [Quit: Leaving]
<jhass>
a5i: that's usually because you read the file in a different encoding than they really are
<workmad3>
iheartkode: because foo(:bar => "fizz") is the same as foo({:bar => "fizz"}), and in 1.9 foo(bar: "fizz") is the same as foo({bar: "fizz"}) (the {} for a hash literal can be omitted in a parameter list)
<jhass>
a5i: but maybe you also managed to just paste an invalid codepoint into it
<a5i>
jhass: if ascii worked should I convert the index.erb to ascii ?
pengin has quit [Remote host closed the connection]
<iheartkode>
I know the hash rocket is the same.
<jhass>
a5i: no, read up on what encodings are
<workmad3>
iheartkode: so they introduced the upgrade path by allowing {foo: "bar"} for a symbol-hash literal
revoohc has quit [Quit: revoohc]
jottr has quit [Remote host closed the connection]
<arup_r>
havenwood: that didn't click on me.. sounds nice
agarie has quit [Read error: Connection reset by peer]
<workmad3>
iheartkode: {:foo => "bar"} is still valid though
<iheartkode>
Okay
<iheartkode>
Thanks
agarie has joined #ruby
speakingcode has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
<havenwood>
arup_r: like I use Menlo font for irc just like i do for my text editor. it's pleasant and readable.
martinbmadsen has quit [Ping timeout: 246 seconds]
senayar has quit []
razrunelord has joined #ruby
<avril14th>
havenwood: that's cool, thanks!
bim has joined #ruby
_blizzy_ has quit [Ping timeout: 255 seconds]
Synthbread has joined #ruby
<benlieb>
can anyone recommend a linux gui that can be used to make application architecture wireframs/diagrams. We have maybe 10 services, various websites, databases etc, that are getting compex to visualize...
<jaequery>
how safe is it to do arithmetic operations w/ Float and BigDecimal? i just deal with numbers up to two decimal points (ie; currency)
<benlieb>
perhaps not the best channel for that question, I realize, but they are rails apps :)
<avril14th>
jaequery: super safe with bigdecimal, not safe with float
basiclaser has joined #ruby
benlieb has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
benlieb has joined #ruby
<benlieb>
oops got kicked off...
blizzy has joined #ruby
blizzy has quit [Max SendQ exceeded]
<eam>
jaequery: with float, the number of decimal points doesn't matter as much as the total size of the number
blizzy has joined #ruby
<eam>
if all your values are significantly smaller than 2**53 then you're unlikely to have any serious issues, though with float it's always possible to lose precision
corehook has quit []
<jaequery>
so is it okay for me to do, BigDecimal('2.11') + 5.22 ? or do i need to do BigDecimal('2.111') + BigDecimal('5.22') ?
<jaequery>
avril14th: can you explain how it's same?
<avril14th>
jaequery: look at bigdecimal code, but adding bigdecimal + float first turns float to bigdecimal and add up.
<eam>
avril14th: which isn't the same
<avril14th>
ok now my turn to ask why
<eam>
the initial conversion from base 10 to base 2 can lose precision
<avril14th>
:)
commmmodo has joined #ruby
<avril14th>
okay
<avril14th>
so right, only use bigdecimals
flip_digits has joined #ruby
<eam>
0.1 + 0.1 is 0.2, right?
<avril14th>
jaequery: you can do '5.22'.to_d
<avril14th>
to get bigdecimals
<eam>
but 0.1 is a repeating decimal in base 2 and cannot be properly represented
<jhass>
cheater: sorry, got carried away by something. You would need to trace calls to the method, since env is a parameter to it
iliketurtles has quit [Quit: zzzzz…..]
<eam>
by changing the numeric base we also change which fractions can or cannot be expressed as terminating decimals
Cust0sL1men has quit [Ping timeout: 272 seconds]
<avril14th>
okay cool, I learnt something
<jaequery>
guys, im confused
<jaequery>
i got two different answers
<foureight84>
how can i verify that the float gets converted to big decimal before doing arithmatic?
craigp has joined #ruby
SOLDIERz______ has quit [Quit: Be back later ...]
<eam>
but the precision loss is out at the order of 2**53 so if we're only dealing with numbers with 3 significant figures it doesn't matter
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<avril14th>
foureight84: if a.kind_of? BigDecimal
jolg42 has quit [Quit: ZZZzzz…]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
foureight84: the input to the BigDecimal constructor needs to be a string
<workmad3>
avril14th: in more mathematical terms, the ratio of '1:10' (using decimal integers) cannot be expressed as a sum of ratioes involving powers of 2
<workmad3>
*as a finite sum of
<avril14th>
okay got it
* avril14th
gets back to his big decimal permutations
<eam>
if you type a numeric literal into your code, ruby will turn it into a base 2 numeric type first, which may lose precision (but -- only about 15 significant figures out)
sigurding has joined #ruby
alec-c4 has quit [Remote host closed the connection]
<eam>
base 10 sig figs
Synthbread has quit [Quit: Leaving]
ramfjord has joined #ruby
j_mcnally has joined #ruby
Synthbread has joined #ruby
j_mcnally has quit [Client Quit]
ghostpl_ has quit [Remote host closed the connection]
amundj has joined #ruby
dfinninger has quit [Remote host closed the connection]
gfawcettpq has joined #ruby
ghostmoth has joined #ruby
jespada has joined #ruby
iceden has joined #ruby
<atmosx>
Hello
<atmosx>
is it possible to check if a 'gem' was required?
<foureight84>
wait so when i add a float with a bigdecimal, ruby will convert the float -> string -> BigDecimal?
<foureight84>
that's implied
<foureight84>
the end result is a bigdecimal
<foureight84>
basically i'm trying to verify if i have to 1.23.to_s.to_d + BigDecimal('2.99')
<foureight84>
the first part
mikecmpbll has quit [Ping timeout: 244 seconds]
<GaryOak_>
atmosx: I think a require will only load a gem once
tcrypt has joined #ruby
<jhass>
a5i: got some time again, any progress?
<atmosx>
GaryOak_: that's cool. I wanted to know if it's possible to know which gems were loaded in order to see if the helper module is going to use that gem or not.
<atmosx>
or better yet, if that gem is present in the system => load => use.
<foureight84>
what happened to the bigdecimal guys?
ghostpl_ has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<workmad3>
foureight84: you'd need to check the conversion code in Float#to_d, but I doubt it's doing that... the point is that the simple case of having a float literal first can introduce a loss of precision because the literal (expressed in base 10) may be for a value that can't be represented exactly in base 2 floats
<workmad3>
foureight84: so if you want to be sure of avoiding a loss of precision, you should start with a string, e.g. "1.23".to_d rather than a float
<GaryOak_>
atmosx: not sure of the specifics though
<atmosx>
GaryOak_: thanks, didn't think of looking at the doc. Ok it can be done.
n008f4g_ has joined #ruby
zachrab has joined #ruby
<a5i>
jhass, no progress yet :(
<atmosx>
hm, come to think of this. I need to spend a weekend and write a 'gem' to add methods for Greek chars 'String'.
<a5i>
i have time too
Rahul_Roy_ has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
<jhass>
a5i: okay, I'd like to see the rest of the error message, its cut off by your pager
baweaver has quit [Remote host closed the connection]
<jhass>
bricker: not a valid codepoint in that encoding so include fails
<atmosx>
ah
razrunelord has quit [Remote host closed the connection]
<jhass>
a5i: did you try the magic comment yet?
razrunelord has joined #ruby
joris974 has quit [Read error: Connection reset by peer]
<a5i>
trying right now
Juanchito has quit [Quit: Connection closed for inactivity]
krisquigley has quit [Ping timeout: 255 seconds]
<eam>
seems like #include? should raise ArgumentError
joris974 has joined #ruby
<atmosx>
a5i: ruby-1.9 is evil with encodings and all it's a nightmare. I used to add 'encoding: utf-8' to all my files after the shebang. I had a vim shortcut for this...
<eam>
>> "\x89" =~ /./
<eval-in_>
eam => invalid byte sequence in UTF-8 (ArgumentError) ... (https://eval.in/301736)
<jhass>
a5i: did some more googling, it's <%# coding: UTF-8 %> for erb
aswen has quit [Ping timeout: 245 seconds]
<atmosx>
when I grow I'll learn the saxophone and join the dire straits.
<atmosx>
oh there you go with the <% and %>'s
elaptics is now known as elaptics_away
<a5i>
did not work :(
jerius has joined #ruby
<jhass>
update your gist with exactly what you have please
rbennacer has quit [Remote host closed the connection]
jenrzzz has quit [Quit: Lost terminal]
<atmosx>
a5i: can you add this to your routes too? -> # encoding: UTF-8
<a5i>
okay
<atmosx>
a5i: encodings should go on the first line of the file IIRC
Katselphrime has quit [Remote host closed the connection]
<jhass>
a5i: let's add passenger_env_var LC_COLLATE en_US.UTF-8 for good measure
<jhass>
eam: you can say the same about every software
<atmosx>
GaryOak_: if you define tables as 'classes' you can require and access them directly: e.g. TableName.first(id: 2)
<eam>
jhass: you can't if the hard corner cases don't exist in the first place
sngeth has joined #ruby
<jhass>
eam: anyway, the choice is still yours, go devuan and be happy
jespada has quit [Ping timeout: 264 seconds]
olivier_bK has joined #ruby
<eam>
already done, not that I'd run debian in prod
mike32 has joined #ruby
<atmosx>
jhass: for how many $$$ would you fix a5i's error (via ssh) ?
eighthbit has joined #ruby
imanzarrabian has joined #ruby
revoohc has joined #ruby
<atmosx>
eam: what do you run in prod/
<eam>
centos
<atmosx>
eam: why?
dseitz has joined #ruby
<jhass>
atmosx: dunno, none probably
<jhass>
I'm not in financial need atm
<eam>
actual software lifecycle strategy, enterprise support for various products
imanzarrabian has quit [Client Quit]
<eam>
and over the last decade: rhel is the only distro with a workable multi-arch strategy
senayar has joined #ruby
dc has quit [Remote host closed the connection]
<atmosx>
jhass: cool
<eam>
though everything is x86_64 now so that doesn't matter much anymore
<atmosx>
eam: multi-arch? why? do you deploy in multiple archs?
<eam>
not anymore
<eam>
but 5-10 years ago, sure did
<atmosx>
sparc?
<atmosx>
ppc?
<eam>
32/64bit x86
<atmosx>
other than x86 I mean
<atmosx>
well that's basically the same.
<eam>
haven't used sparc since near 00
<atmosx>
it's not, but you know what I mean.
<atmosx>
oh you used sparc in production? hehe cool.
<eam>
most distros couldn't handle both runtimes
sigurding has quit [Quit: sigurding]
<eam>
it was a big problem
<atmosx>
i see
<atmosx>
so you stuck with centos
<eam>
debian/ubuntu had a horrible shim library that supplied enough 32bit libs to get stuff like firefox working but it wasn't a real solution
nii2361 has joined #ruby
ramfjord has joined #ruby
<eam>
atmosx: it's the only real option
Alina-malina has quit [Ping timeout: 272 seconds]
sngeth has quit [Ping timeout: 256 seconds]
doodmtl has quit [Ping timeout: 256 seconds]
Alina-malina has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
thumpba has joined #ruby
_64k has joined #ruby
doodmtl has joined #ruby
jenrzzz has joined #ruby
<shevy>
If I have time such as target "07:00:30" (tomorrow) and current time "19:27:20" (today), how to calculate the distance between these two in seconds?
olivier_bK has quit [Ping timeout: 272 seconds]
<a5i>
jhass, both?
<atmosx>
shevy: I would convert them and use 'Time'
<a5i>
jhass: or just the second one?
<jhass>
a5i: both
<jhass>
can't harm
<a5i>
mk
zachrab has quit []
nii2361 has quit [Ping timeout: 264 seconds]
revoohc has quit [Quit: revoohc]
<a5i>
jhass: there is an arabic phrase in the index.erb
soc42 has quit [Remote host closed the connection]
speakingcode has joined #ruby
yfeldblum has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
lkba has quit [Ping timeout: 250 seconds]
zenith_ has quit [Ping timeout: 264 seconds]
tier has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
frem has joined #ruby
jimms has joined #ruby
hcnewsom has quit [Quit: hcnewsom]
sambao21 has joined #ruby
eighthbit has quit [Ping timeout: 255 seconds]
martinbmadsen has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
lyuben_ has joined #ruby
revoohc has joined #ruby
plashchynski has joined #ruby
milesmatthias has quit [Remote host closed the connection]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
Katselphrime has joined #ruby
Katselphrime has quit [Remote host closed the connection]
milesmatthias has joined #ruby
pengin has quit [Remote host closed the connection]
plashchynski has quit [Client Quit]
banister has joined #ruby
hcnewsom has joined #ruby
Lildirt has quit [Ping timeout: 250 seconds]
brb3_ has joined #ruby
banister is now known as banisterfiend
doodmtl has quit [Ping timeout: 264 seconds]
BombStrike has quit [Read error: Connection reset by peer]
gregf has quit [Quit: WeeChat 1.0.1]
startupality has joined #ruby
dblessing has quit [Ping timeout: 265 seconds]
iMe has quit [Ping timeout: 264 seconds]
dc has joined #ruby
lyuben_ has quit [Quit: This computer has gone to sleep]
Lildirt has joined #ruby
zenith__ has quit [Ping timeout: 272 seconds]
jimms has quit [Ping timeout: 272 seconds]
iMe has joined #ruby
pengin has joined #ruby
rubie has joined #ruby
BombStrike has joined #ruby
brb3 has quit [Ping timeout: 265 seconds]
gregf has joined #ruby
craigp has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
lyuben_ has joined #ruby
jottr has joined #ruby
pengin has quit [Ping timeout: 264 seconds]
<rubie>
hi all, im working on recursion and not understanding why an explict return to a recursive call will make the program run correctly but omitting that explicit return makes it fail here is the gist https://gist.github.com/db47534f048040a715f6.git
MatthewsFace has joined #ruby
max96at is now known as max96at|off
MatthewsFace has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
<jhass>
rubie: the explicit return exits the .each in the first iteration, of the if condition being true
dblessing has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
<rubie>
ahh!
ghostpl_ has joined #ruby
<havenn>
rubie: try changing that `return` to a `break`
<rubie>
ok
jmhmccr has quit [Quit: Connection closed for inactivity]
<rubie>
still works
<rubie>
is break the idiom to use?
<jhass>
rubie: also try using Enumerbale#find instead of the explicit return or a break
ghostpl_ has quit [Remote host closed the connection]
baweaver has joined #ruby
<jhass>
I'd say Enumerable#find would be most idiomatic
<havenn>
rubie: #find
<rubie>
ok i'll look into that
<rubie>
thanks
<agarie>
learning the methods in Enumerable is probably the best investment you can make when starting with Ruby
giuseppesolinas has joined #ruby
<agarie>
it helps a lot
craigp has joined #ruby
jgt1 has joined #ruby
<rubie>
im not sure what you mean by using #find, it seems like its a way to search for something in an array
bronson_ has quit [Remote host closed the connection]
<rubie>
do you mean use that instead of each?
anaeem1 has joined #ruby
martinbmadsen has joined #ruby
SegFaultAX has quit [Excess Flood]
relix has joined #ruby
relix has quit [Client Quit]
SegFaultAX has joined #ruby
<agarie>
yes
lolmaus has joined #ruby
Jesterman81 has joined #ruby
<havenn>
rubie: So `[1, 2, 3].find { |n| n.even? }` instead of `[1, 2, 3].each { |n| break n if n.even? }`.
<Senjai>
slipkfn: Not sure if you found what you were looking for
<Senjai>
slipkfn: But generally, I recommend ruby build for adding new rubies
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
<slipkfn>
Senjai: I tried that but I came across some issues with openssl and gem.
<Senjai>
slipkfn: Then you should fix those issues :P
ki0 has joined #ruby
<Senjai>
They'll be a problem for everything else anyway
Rapier- has quit [Quit: (null)]
yeticry has quit [Ping timeout: 265 seconds]
<havenwood>
slipkfn: ruby-install will use the package manager's openssl, which I think is much preferred
jgt1 has quit [Ping timeout: 246 seconds]
atomiccc has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jonr22 has joined #ruby
<Senjai>
err
morenoh149 has quit [Ping timeout: 272 seconds]
<Senjai>
ruby-install sorru
<Senjai>
not ruby-build
<havenwood>
ruby-build shipping its own versions of openssl even when it itself is installed through the package manager is... unexpected and unfortunate
craigp has quit [Remote host closed the connection]
<ramfjord>
Hey all! I'm trying to write some tests for a database heavy application. This is not rails, and although we have activerecord as a dependency almost all of the sql is executed with connection.execute. In fact, many of our tables don't even have activerecord models associated with them (at least in this app).
juanpablo___ has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
<ramfjord>
Do you guys know a factory-girl type gem that doesn't require activerecord models for everything?
<ramfjord>
do you think this would be a good case to use fixtures instead?
<ramfjord>
or something like them
jolg42 has quit [Quit: ZZZzzz…]
mordocai has joined #ruby
bronson has quit [Remote host closed the connection]
gfawcettpq has quit [Ping timeout: 256 seconds]
ev_ has quit [Ping timeout: 240 seconds]
tier has joined #ruby
mwlang has joined #ruby
dblessing has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
sambao21 has joined #ruby
baweaver has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
digitalextremist has joined #ruby
tier_ has quit [Ping timeout: 264 seconds]
thiagovsk has quit [Quit: Connection closed for inactivity]
pullphinger has quit []
aclearman037 has quit [Quit: I'm out!]
craigp has joined #ruby
Zai00 has joined #ruby
sambao21 has quit [Client Quit]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
pengin has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
<kappy>
Good afternoon. Do I need to import a module for ``srand''? Whenever I run it in a script, it doesn't return anything.
sdothum has joined #ruby
rodfersou has quit [Quit: leaving]
<kappy>
But rand works fine.
craigp has quit [Ping timeout: 246 seconds]
<jhass>
kappy: what do you think srand does?
<jhass>
and how do you verify "it doesn't return anything"?
pengin has joined #ruby
leafybasil has joined #ruby
decoponio has quit [Quit: Leaving...]
Lingo__ has joined #ruby
CaffeineShot has joined #ruby
<kappy>
I think it works just like rand, but I seed it with some numbers. So if I put it on a line by itself, ``srand 1976'', I would expect a number back from that seed.
<weaksauce>
basic way to do it for arbitrary pop values
emacer has quit [Quit: Leaving]
brandon has joined #ruby
<mistermocha>
I'm still way confused as to what 'symbols' are ... can someone explain?
brandon is now known as Guest1097
<mistermocha>
or send docs?
axl_ has quit [Quit: axl_]
<weaksauce>
mistermocha they are basically strings that all point to the same object
<weaksauce>
"this" and "this" are two different objects in ruby and have to be created
<weaksauce>
whereas :this and :this point to the same object
<mistermocha>
weaksauce: are they scoped? will a symbol defined in one place point to the same object if defined elsewhere?
<jhass>
mistermocha: ruby is your first language or do we have something to relate to?
<weaksauce>
I think they are immutable mistermocha and would refer to the same object regardless of location but I am not sure
<mistermocha>
jhass: python is my strongest, perl is my first
startupality has quit [Ping timeout: 246 seconds]
<eam>
mistermocha: it's exactly the same as perl symbols
<monsieurp>
jhass: there, a question for you: is there something like cpantesters for ruby that is NOT travis-ci?
doodmtl has quit [Ping timeout: 250 seconds]
<monsieurp>
(let's see what you come up with this time round)
<jhass>
troll?
cjim has quit [Quit: (null)]
<monsieurp>
travis-ci?
<monsieurp>
:D
<eam>
mistermocha: perldoc Symbol
<jhass>
you're close to a free ignore list entry, just sayin'
<mistermocha>
eam: yeah reading ... been ***ages*** since I wrote any perl
<jhass>
eam: so ruby stole symbols from perl actually? got to remember that
<eam>
well, also from C really
<eam>
they're all string names which reference an object/address
sngeth has joined #ruby
<mistermocha>
and I don't think I recall ever using symbols in any capacity in perl back in the day
DavidDudson has joined #ruby
nucular11 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rajeshchawla has quit [Remote host closed the connection]
DouweM has quit [Read error: Connection reset by peer]
pengin has quit [Remote host closed the connection]
cjim has joined #ruby
<mistermocha>
and I don't think I recall ever using symbols in any capacity in perl back in the day?
<jhass>
mistermocha: so, we use symbols as identifying values, one prominent example is to emulate keyword arguments (although we do have them proper these days): def foo(opts={}); do_x if opts[:do_x]; end; foo(doo_x: true)
<mistermocha>
whoops
DavidDudson has quit [Client Quit]
plashchynski has joined #ruby
pengin has joined #ruby
<mistermocha>
so does this make symbols global variables too?
jenrzzz_ has joined #ruby
<jhass>
no, they're global, but they're values
<jhass>
they don't point to objects, they're objects themselves
<jhass>
they're also immutable
commmmodo has joined #ruby
sngeth has quit [Ping timeout: 245 seconds]
KramerC has quit [Ping timeout: 256 seconds]
mhib has joined #ruby
duncannz has joined #ruby
jgt1 has joined #ruby
sambao21 has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
cjim has quit [Ping timeout: 255 seconds]
<mistermocha>
ok I think I see ...
<mistermocha>
it's not like a variable foo that gets assigned the value of "bar",
<mistermocha>
but the symbol :foo will always be the same thing
<mistermocha>
and that thing is a string
<mistermocha>
well not exactly a string
jenrzzz_ has quit [Ping timeout: 272 seconds]
pietr0 has quit [Quit: pietr0]
jenrzzz has joined #ruby
amundj has joined #ruby
craigp has quit [Read error: Connection timed out]
<jhass>
you use a string to store stuff in it
pietr0 has joined #ruby
<jhass>
you use a symbol to "recognize" it
craigp has joined #ruby
nii2361 has joined #ruby
mhib has quit [Quit: Leaving]
jottr has joined #ruby
<jhass>
state == :offline
KramerC has joined #ruby
<jhass>
puts "foo".upcase
superspring has quit [Ping timeout: 276 seconds]
starless has quit [Quit: Leaving]
<eam>
mistermocha: perl -wle'print for %::' # show the perl symbol table
martinbmadsen has joined #ruby
<eam>
when you write stuff like $Foo::bar, there's a symbol Foo::bar
JimmyNeutron has joined #ruby
Guest46846 has joined #ruby
<Guest46846>
Hey guys.
Guest46846 is now known as Vert`
<Vert`>
I'm looking for a regex to match part of a string, and pass the remainder as an argument.
<eam>
same thing in ruby, everything with a name is referenced by the symbol
nii2361 has quit [Ping timeout: 265 seconds]
<Vert`>
Could anyone give me pointers?
<eam>
>> def whatever; "see?"; end; send :whatever # send the symbol "whatever" to "main"
<eam>
conceptually the same as perl -wle'sub foo { "see?" }; print main->foo'
<jhass>
Vert`: match the remainder with a capture group and use that
ghostmoth has quit [Quit: ghostmoth]
superspring has joined #ruby
<eam>
mistermocha: in perl strings and symbols and barewords are much more conflated
<Vert`>
Which function should I be looking at?
<Vert`>
Actually let me explain the use case, maybe regex isn't what I should be looking at in the first place
<jhass>
Vert`: plain String/Regexp#match
ych4k3r_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
but yeah, describing your goal sounds awesome
dopie has quit [Read error: Connection reset by peer]
<Vert`>
I'm passing phrases with commands to a bot. The phrases come in to a case/when, where I intend to use regex to match the left part of the string to find the command, and on a match I then want to use the rest of the phrase as parameters.
snath has quit [Ping timeout: 256 seconds]
Lewix has quit [Remote host closed the connection]
<jhass>
so basically separate on the first whitespace?
<Vert`>
Basically.
<jhass>
command, params = input.split(\s+, 2)
<jhass>
er
<jhass>
command, params = input.split(/\s+/, 2)
<Vert`>
Thanks, I'm gonna keep that in mind.
serivichi has joined #ruby
<Vert`>
But just in case I start using commands that /do/ involve a whitespace, what should I do?
DavidDudson has joined #ruby
<jhass>
I just write regular expressions that match the whole thing, one for each command, and extract the parameters to match groups
jlast has quit [Remote host closed the connection]
<jhass>
did you take a look at cinchrb btw?
commmmodo has quit [Quit: commmmodo]
<Vert`>
No I did not, I've never heard of cinchrb?
danzilio has quit [Read error: Connection reset by peer]
danzilio_ has joined #ruby
neanderslob has quit [Remote host closed the connection]
<rpad>
Does anyone who uses Thor know how I would go about loading a custom configuration file into all commands?
<nerium>
Anyone knows a good way to parse content from a string without using regexp?
<jhass>
nerium: no
patrick99e99 has quit [Quit: leaving]
<nerium>
hmm, okay
patrick99e99 has joined #ruby
<catsoup>
well, you could use grep if your wants are very simple
<jhass>
nerium: we do might have alternatives for your specific case though
<catsoup>
it depends really on how you want to parse it
<Vert`>
jhass, so I'm getting this right, I should match the :message argument to a regex that contains the command I want to match on the left part of the string?
<Vert`>
I.e. have it search for a literal phrase?
<nerium>
I'm trying to parse data from a document and regexp is getting to completed
<nerium>
*compilcated
baweaver has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
adriancb has joined #ruby
<jhass>
Vert`: did you look at the example I linked?
<jhass>
nerium: yeah, but specific I mean, like specific
<jhass>
*by
<jhass>
you just restated "I parse some data"
<Vert`>
I missed that, but that's very helpful
<Vert`>
Thanks a lot jhass
Nuck has joined #ruby
<nerium>
jhass: I'm not sure what you mean my specific. It's just arbitrary, structured data from a document and I'm looking for a tool that can do this for me
<jhass>
sounds like a description of regular expression so far
djbkd has quit [Remote host closed the connection]
<apeiros_>
wouldn't write code like that anymore. but still think the overall design was pretty elegant.
enebo has quit [Quit: enebo]
djbkd has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jonr22 has joined #ruby
<apeiros_>
that's the access plugin. after __END__ are the triggers and localizations
slipkfn has quit [Quit: Page closed]
<jhass>
nerium: I'd need to stare a while, ideally at example input too, but those repeated = and \n give me a sense of some .lines / each_slice / split stuff could work
<a5i>
Hey jhass
<a5i>
Guess what? :D
<nerium>
jhass: I just wanted to show you that regexp is not the tool for the job. I'm looking for a BNF like tool
<mistermocha>
yay, I get to go from my curiousity question to my runtime question
Takle has quit [Ping timeout: 264 seconds]
aswen has joined #ruby
<apeiros_>
nerium: guess what, BNF is regular
milesmatthias has quit [Remote host closed the connection]
<mistermocha>
in this case, it's beaker-rspec loading serverspec
<apeiros_>
jhass: did that guy ask for help?
<jhass>
apeiros_: hm?
jonr22 has quit [Ping timeout: 265 seconds]
<mistermocha>
developing for puppet modules, been doing the same pattern throughout, and this happens
<apeiros_>
jhass: nevermind. I guess you already did what I do now.
Takle has joined #ruby
m8 has quit [Quit: Sto andando via]
<jhass>
my ignore list is empty, so not sure I follow
sgambino has quit [Remote host closed the connection]
duncannz has quit [Ping timeout: 256 seconds]
DavidDud_ has joined #ruby
sngeth has joined #ruby
<mistermocha>
jhass: serverspec is being called by beaker-rspec ... both are installed
<apeiros_>
jhass: that was what I meant
DavidDudson has quit [Read error: Connection reset by peer]
<mistermocha>
catsoup: I've installed everything as me and haven't had any problem on any other modules I've worked on
milesmatthias has quit [Ping timeout: 264 seconds]
davispuh has quit [Remote host closed the connection]
<catsoup>
mistermocha: fair enough, bitter experience leads me to permissions as a first stop :-)
DavidDudson has joined #ruby
<jhass>
mistermocha: if you want any help, do the following: go to gist.github.com, creating a gist with multiple files: 1) full error message with backtrace 2) output of gem list 3) output of gem env 4) if 1) is a LoadError output of gem which that_file
baweaver has quit [Remote host closed the connection]
<mistermocha>
jhass: ok gimme a sec so I can scrub some *my_company* stuff from a gist
<jhass>
sure, take your time
<mistermocha>
sorry sometimes I hope to get generic answers to generic questions...
<jhass>
setup issues aren't generic, else they would be bugs
razrunelord has joined #ruby
DavidDud_ has quit [Ping timeout: 246 seconds]
RegulationD has quit [Remote host closed the connection]
ghostmoth has joined #ruby
razrunelord has quit [Remote host closed the connection]
basiclaser has quit [Quit: Connection closed for inactivity]
<mistermocha>
jhass: even easier than that ... I blew away my Gemfile.lock and re-bundle-install'ed, now she works
rpad has quit [Ping timeout: 246 seconds]
<jhass>
oO
<jhass>
I don't think you're using bundler correctly :P
<mistermocha>
I did a bundle install on the stock Gemfile for the module, had no love, copied over the Gemfile that I'm using across the board on all my modules, bundle install'ed again, and got that stack
<jhass>
might just gem install -g
livingstn has quit []
<mistermocha>
so there was cruft installs from the first pass
<mistermocha>
that apparently broke things
plashchynski has quit [Quit: plashchynski]
<mistermocha>
yay! home again, home again, jiggety jig
<mistermocha>
jhass: thanks again for your patience and help
it0a has joined #ruby
<jhass>
you're welcome
<mistermocha>
if nothing else, you showed me lots more about how to troubleshoot and what to look at when things go awry
<mistermocha>
and THAT is worth the wait
Takle has quit [Read error: Connection reset by peer]
Yzguy_ has joined #ruby
<mistermocha>
now I have to delete this gist
<jhass>
sure
paradoja has quit [Ping timeout: 252 seconds]
juanpablo_ has quit [Ping timeout: 244 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
starless has joined #ruby
blahwoop has joined #ruby
dfinninger has quit [Remote host closed the connection]
CaffeineShot has quit [Quit: Leaving]
jcdesimp has joined #ruby
<blahwoop>
hey everyone. i'm writing some exercises for an intro to ruby class. does anyone know of any cool problems similar to finding a leap year in a range of years?
pengin has quit [Remote host closed the connection]
maletor has joined #ruby
<zenspider>
you can work through the ruby koans or do project euler (mathy)
meschi has quit [Ping timeout: 250 seconds]
lanemeyer has joined #ruby
Dolphi has joined #ruby
pengin_ has joined #ruby
HOrangeJewce has joined #ruby
anonnumberanon has joined #ruby
anonnumberanon has left #ruby ["Leaving"]
jottr has quit [Ping timeout: 250 seconds]
oetjenj has joined #ruby
<baweaver>
codewars if you want more magical points
<baweaver>
projectrosalind.info for biomedical problems
atomi has quit [Quit: leaving]
<baweaver>
euler is nice, but a lot of it involves high level math so remember that's a thing
jgt1 has quit [Ping timeout: 246 seconds]
<baweaver>
maybe your class has the prereqs, but if it doesn't....
bronson has quit [Remote host closed the connection]
<workmad3>
blahwoop: I'm not sure I'd class 'finding a leap year in a range of years' is a cool problem... it's an annoying nightmare of a problem that's dependent on what the years in question are and what geographical location you're in
<blahwoop>
cool thanks
<workmad3>
blahwoop: unless you're only interested in the gregorian calendar rule anyway :)
DavidDud_ has joined #ruby
<blahwoop>
yes
nii2361 has joined #ruby
<blahwoop>
the if its divisible by 4 but not divisible by 100 and divisible by 400 then it's a leap year
<blahwoop>
that type of convolutedness
<blahwoop>
would be best lol
<wallerdev>
i had that as an interview question once
<wallerdev>
at MS
<a5i>
jhass, do you have any idea?
<blahwoop>
baweaver: that's a cool book
<workmad3>
blahwoop: unless the year is less than 1582 in the UK, up to 1917 in turkey
jottr has joined #ruby
_zerick_ has quit [Read error: Connection reset by peer]
<baweaver>
Honestly I never saw the point of convoluted interview questions
<workmad3>
blahwoop: before 1582 in the UK, the julian calendar was in place so any year divisible by 4 was a leap year ;)
<blahwoop>
me either
<baweaver>
when are you ever going to write a sorting algorithm or reverse a string with recursion?
atomi has quit [Quit: leaving]
<blahwoop>
workmad3: that would've made it alot easier
<wallerdev>
theyre just trying to make sure you have a grasp of core concepts i guess
<baweaver>
At least use something practical such as Levenshtein distance for database discrepancies and spelling correction
<workmad3>
blahwoop: and before 1917 in turkey, they used an islamic calendar that I don't know even had the concept of a leap year
<jhass>
a5i: nope
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
blahwoop: it was a lot easier... it was also a lot more wrong and by 1582 had caused seasons to shift through the calendar
<a5i>
sigh :(
sngeth has quit [Ping timeout: 244 seconds]
DavidDudson has quit [Ping timeout: 255 seconds]
<baweaver>
Really I don't want to test rote memorization of CS concepts, I want to test thinking patterns
bronson has joined #ruby
<baweaver>
If you're not going to write it in a job, why write it in an interview?
krisquigley has joined #ruby
mburns has quit [Ping timeout: 250 seconds]
atomi has joined #ruby
yeltzooo has quit [Ping timeout: 250 seconds]
Squarepy has quit [Quit: Leaving]
a346 has quit [Quit: a346]
<baweaver>
I mean sure, you can write a Quick sort, but on the job you're far more likely to do some form of data munging / formatting
<baweaver>
so test on that
tkuchiki has joined #ruby
nii2361 has quit [Ping timeout: 264 seconds]
<blahwoop>
or bring u in to work for a week
<blahwoop>
paid
<baweaver>
No one has time for that though :/
<workmad3>
baweaver: yeah, I prefer open-ended design type questions in an interview to examine how people approach a problem, maybe coupled with some fairly simple coding questions so that you can ascertain that someone isn't stumped by basic syntax :)
<baweaver>
if they're already working
mburns has joined #ruby
<baweaver>
I just tell people I can be a man page for basic syntax
yeltzooo has joined #ruby
<baweaver>
I want to know if you can solve a problem
<baweaver>
so if you say something like I know I need a method that does X I don't hesitate to mention it.
x1337807x has joined #ruby
hiyosi has joined #ruby
tkuchiki_ has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
razieliyo has quit [Quit: Saliendo]
krisquigley has quit [Ping timeout: 245 seconds]
riotjones has joined #ruby
revoohc has joined #ruby
milesmatthias has joined #ruby
<workmad3>
baweaver: sure, I wouldn't criticise on inability to instantly recall stdlib methods or something like that... I'm talking about being able to at least follow and grok fairly basic stuff like loops and conditionals (this is a byproduct of so many people seeing that a lot of good devs are self-taught, so think it's not that difficult and throw their CV/resume at jobs, faking their way through to the point of
<workmad3>
consideration)
SOLDIERz______ has quit [Quit: Be back later ...]
<baweaver>
Yeah, if they ask I tend to tell them syntax bits
milesmatthias has quit [Ping timeout: 245 seconds]
<baweaver>
because when you're developing you have docs around
<baweaver>
for instance, I don't use Python daily
riotjones has quit [Ping timeout: 256 seconds]
<baweaver>
but given docs I can be effective in it again immediately.
clamstar has quit [Ping timeout: 256 seconds]
<baweaver>
No point in committing things to memory you aren't doing on a daily basis
Lewix_ has joined #ruby
<baweaver>
For instance, if I'm interviewing for a prod engineer position or SRE or the like
<baweaver>
I'm working on a dev stack all day long
HOrangeJewce has quit [Quit: Leaving.]
<baweaver>
the chances I immediately remember more than rudimentary systems knowledge off the top of my head are slim
Nightmare has quit [Ping timeout: 265 seconds]
<baweaver>
I relegate them to reference books (Unix Power Tools, TCP/IP System Administration, etc) or man pages
Nightmare has joined #ruby
<baweaver>
doesn't mean I don't know it, but that I see no need in keeping that all in my head while working a straight Ruby/Rails/JS dev stack
Lewix has quit [Ping timeout: 265 seconds]
thumpba has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
<baweaver>
(this granted that I used to be administering OpenBSD / Debian / FreeBSD boxen)
duncannz has quit [Remote host closed the connection]
<workmad3>
baweaver: sure... I've pushed a lot of that knowledge out into chef cookbooks personally :)
wallerdev has quit [Quit: wallerdev]
<workmad3>
baweaver: frequently it's stuff I've picked up purely so I can push it straight out into a chef cookbook :)
<baweaver>
yeah, the true mark of an effective dev is one who doesn't memorize, but develops a pattern of thinking and a reference collection
clamstar has joined #ruby
<baweaver>
and hopefully comments things for later
<baweaver>
most can't remember code they wrote last month
<workmad3>
baweaver: they internalize techniques and thinking patterns, but don't rote memorize changable details like framework interfaces
<baweaver>
bingo
<baweaver>
which is why I really hate interviews
jespada has joined #ruby
tris has quit [Ping timeout: 265 seconds]
<baweaver>
I don't need to recite man pages from memory, it does no good and wastes everyones time.
tris has joined #ruby
<workmad3>
baweaver: annoyingly, I can't seem to stop myself from memorizing the changeable details too... but I also then seem to be ok at remembering when they changed and what they changed to :)
<baweaver>
There are some things I wish I didn't still have memorized
<baweaver>
such as the IP addresses of some 1400 wireless antennas, their access points, and down to most of the mac address patterns
<zenspider>
I disagree that there is "THE true mark" for an effective dev. everyone is different. tenderlove and I couldn't be more different, but we're both effective devs.
<baweaver>
granted
<workmad3>
baweaver: or the airspeed of an unladen swallow? :)
<baweaver>
african or european?
<workmad3>
both :P
ghostmoth has quit [Quit: ghostmoth]
dc has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 250 seconds]
<baweaver>
I'm just heavily of the opinion that memorization isn't a good metric
mmoretti has joined #ruby
commmmodo has joined #ruby
swgillespie has joined #ruby
<baweaver>
also most of what made me dislike standardized testing in general
maletor has quit [Quit: Computer has gone to sleep.]
Evan_ has joined #ruby
mmoretti has quit [Client Quit]
jeramy_s has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dc has joined #ruby
commmmodo has quit [Client Quit]
<workmad3>
baweaver: that said, there does seem to be some compelling research that people who can quickly draw on a body of knowledge (such as that gained through memorisation) are more likely to exhibit traits classed as intelligence
<baweaver>
zenspider: I guess what I'm getting at is that some work well with memory and others work well with reference. Does that make the latter a bad dev? I'd say not.
<baweaver>
I tend to focus on my current domain and relegate anything else to man pages and reference
<baweaver>
because that's what I'll need to get a job done.
_maes_ has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
<baweaver>
give me all of a week and I can be back to an effective level in Python, C#, Perl, Chef, Systems, and a number of other things.
<baweaver>
and that's only because I'd be spending an extra few seconds looking at docs while I warm back up.
<workmad3>
baweaver: I do wonder if it's that sort of research that gets corrupted by politics and turned into 'memorization is easy to test, and memorization goes with intelligence, therefore if we test memorization and grade on that, it's a good proxy for intelligence', followed very quickly by people who don't follow that reasoning, see tests for memorization and conclude that memorization of details == intelligenc
<workmad3>
e
<baweaver>
For instance, I destroy IQ tests but don't do well with the ACT
startupality has joined #ruby
ismaelga has joined #ruby
ismaelga has quit [Client Quit]
<workmad3>
or maybe it's purely down to "If you tell me what you're measuring, I'll tell you how I'll act" type human behaviour
ismaelga has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
charliesome has joined #ruby
<baweaver>
It's slightly annoying that larger companies want the memorization route
giuseppesolinas has joined #ruby
<baweaver>
$WORK interviewed me on previous work and actual problems
tier has joined #ruby
revoohc has quit [Quit: revoohc]
djbkd has quit [Remote host closed the connection]
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
Limix has quit [Quit: Limix]
startupality has quit [Ping timeout: 256 seconds]
DavidDudson has joined #ruby
DavidDud_ has quit [Read error: Connection reset by peer]