apeiros changed the topic of #ruby to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<Radar> emacer: Then install ruby using ruby-install and setup the environment for that version of Ruby.
<emacer> Radar, the ruby install works, since openproject works
<Radar> I am concerned about /usr/share/rubygems-integration pointing to 1.9.1 when your ruby version is 2.1.x
<emacer> Radar, I just don't know how to manually get my shell environment set up so that I can run that backup script
<Radar> ok
<emacer> Radar, here's the backup guide: https://www.openproject.org/download/backup-guide/
<emacer> Radar, you'll notice, they're very helpful by assuming you already know how to do this ;)
pengin has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ghostpl_ has joined #ruby
Sawbones has joined #ruby
Limix has quit [Quit: Limix]
<jhass> emacer: do you happen to have a link to that init script?
sngeth has joined #ruby
<emacer> jhass, no...
<emacer> uh...
Yzguy_ has quit [Quit: I'm sleeping, go away.]
bayed has quit [Quit: Connection closed for inactivity]
<jhass> cause I can't find it in the repo
<jhass> or a repo for the packages
<emacer> jhass, let me pastebin it
<jhass> gist please!
veduardo has joined #ruby
GnuYawk has joined #ruby
<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!
<emacer> oh sorry
<maletor> I have an algorithm I cannot figure out: https://gist.github.com/maletor/9fdd31eb69d48adabc15
narcan has joined #ruby
wallerdev has quit [Quit: wallerdev]
<jhass> emacer: okay, you should have (a bunch of) /etc/init.d/openproject-ce-something, can you please show one of these too?
graft is now known as Guest16056
sngeth has quit [Ping timeout: 252 seconds]
<zenspider> rawr
<emacer> jhass, they're all the same
<emacer> well, almost
ghostpl_ has quit [Ping timeout: 264 seconds]
paradoja has quit [Ping timeout: 255 seconds]
<jhass> ;)
<jhass> details matter
<zenspider> maletor: ECODETOOLONGORCLEVAR
<maletor> zenspider: EHELP
Musashi007 has joined #ruby
<maletor> zenspider: my spec is failing because my brain hurts too
Musashi007 has quit [Client Quit]
<zenspider> maletor: w/o a concise question, I doubt you'll find help
<maletor> GROUP BY is too memory inefficient so i am using order
jgt1 has quit [Ping timeout: 245 seconds]
<jhass> emacer: welp, okay one more iteration: /etc/init.d/openproject-ce-web-something
<maletor> but, i can't fire off this last batch, as evidenced by the spec, because my algorithm that uses order is borked
<Radar> maletor: well to start with the ids in the puts output are different to the ids in the expectation
<emacer> jhass, ah hah, I didn't look at that
AndyBotwin has quit [Quit: Leaving]
delianides has joined #ruby
Ankhers has joined #ruby
<Radar> maletor: ids are Sent: 1 [7, 9]
<Radar> in your test, 2, 1, 3, and 5
Peter___ has quit []
<maletor> Radar: i am expecting it to be called twice for each receiver
threh has quit [Ping timeout: 264 seconds]
<zenspider> "expected: 1 time with arguments" and I tune out. not a good test.
<maletor> one has ids of 7, 9 and other other of 1, 3, 5
<zenspider> but if you're hitting memory inefficiencies w/ a group by on this little data, something else entirely is going on
threh has joined #ruby
<maletor> who said this is little data?
mikepack has joined #ruby
<jhass> emacer: looks like we have to continue to play that game :/ you should have a script at /usr/bin/openproject-ce
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<maletor> also, i think it's a little presumptuous to assume all message expectation tests are worthless
thumpba_ has quit []
<maletor> Radar: fwiw, i would love to simplify the code or tests but i can't figure out how while using this "algo"
delianides has quit [Ping timeout: 246 seconds]
shortdudey123 has quit [Max SendQ exceeded]
baweaver_ has quit [Remote host closed the connection]
jusmyth has quit [Quit: Leaving.]
Alina-malina has quit [Ping timeout: 250 seconds]
<jhass> emacer: ah, looks like we're down to the meat finally :)
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<emacer> good :)
shortdudey123 has joined #ruby
Alina-malina has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
juanpablo___ has quit [Quit: (null)]
<zenspider> mmmmmmeat
Synthbread has joined #ruby
tkuchiki has joined #ruby
juanpablo___ has joined #ruby
<zenspider> maletor: looking at your test? I say it is little data.
Spami has quit [Quit: This computer has gone to sleep]
juanpablo___ has quit [Read error: Connection reset by peer]
<maletor> zenspider: you're right
blackmesa has quit [Ping timeout: 264 seconds]
<zenspider> a group by, even if it is ruby-side, is a hash of pairs. it isn't going to chew up anything
<zenspider> s/pairs/arrays/
GambitK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
OrbitalKitten has joined #ruby
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…]
<emacer> hmm, tried to work
OrbitalKitten has joined #ruby
cpt_yossarian has quit [Read error: Connection reset by peer]
leafybasil has quit [Read error: No route to host]
oo_ has joined #ruby
leafybasil has joined #ruby
oo_ has quit [Remote host closed the connection]
<jhass> which version of openproject is that actually?
oo_ has joined #ruby
<emacer> jhass, 4.0.8
cpt_yossarian has joined #ruby
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
freerobby has joined #ruby
OrbitalKitten has quit [Client Quit]
bim has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
codegate has quit [Ping timeout: 246 seconds]
edwardly has joined #ruby
edwardly has joined #ruby
<jhass> *sigh*, looks like it didn't transport RAILS_ENV
triangles2 has joined #ruby
OrbitalKitten has joined #ruby
<jhass> try running export RAILS_ENV=production and then again
NoNMaDDeN has quit [Remote host closed the connection]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
zachrab has joined #ruby
<emacer> jhass, same error
<a5i> jhass, everythins is running fine! thanks alots btw, next step to to set-up sub-domains
<a5i> is it similar to the steps I took witht eh default one ?
<jhass> a5i: subdomain, domain, same thing just a different name
wookiehangover has joined #ruby
<jhass> emacer: your config/database.yml has a production section though? I can't imagine it doesn't but better verify then assume ;)
triangles has quit [Ping timeout: 246 seconds]
threh has quit [Ping timeout: 246 seconds]
<emacer> jhass, nope
<emacer> heh
<jhass> huh, what sections does it have then?
<emacer> doesn't look like it has any, actually
<jhass> huh?
<emacer> lemme paste it. I don't know yaml
<jhass> emacer: careful
<jhass> likely to contain a password
<emacer> no, it's generic
<jhass> gosh, what monstrosity is this
<emacer> I know, right?
<jhass> dafuq
<emacer> lol
<jhass> sorry
<jhass> okay, let's try something else
<emacer> ok
<jhass> openproject-ce run bash
<jhass> does that give you usable shell?
leafybasil has quit [Ping timeout: 255 seconds]
ych4k3r has joined #ruby
<emacer> yes
<jhass> does the command work there?
<emacer> lemme try runnig it now
baweaver has joined #ruby
leafybasil has joined #ruby
<emacer> nope, same error
<emacer> I think
sankaber has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
davidhq has joined #ruby
<emacer> /opt/openproject-ce/lib/tasks/backup.rake:146:in `default_db_filename'
<jhass> you did include RAILS_ENV=production?
<emacer> is where the nil:NilClass error came in
<emacer> yes
<emacer> oh
<emacer> same with and without
dorei has quit []
<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 ;)
Hobogrammer has joined #ruby
davedev2_ has quit [Ping timeout: 245 seconds]
riotjones has joined #ruby
davedev24_ has joined #ruby
Yzguy_ has joined #ruby
<emacer> jhass, I just found that this is a bug with this install type, or the documentation. I'm reading through now: https://community.openproject.org/topics/4146?board_id=9&r=4179#message-4179
zachrab has quit [Ping timeout: 264 seconds]
threh has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
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]
duncannz has joined #ruby
lamer has joined #ruby
<lamer> hello
davidhq has quit [Read error: Connection reset by peer]
sngeth has joined #ruby
davidhq has joined #ruby
<Radar> apeiros: ^ ban
<sevenseacat> seems susicious
<sevenseacat> suspicious
<lamer> :P
<lamer> what?
<Radar> NSFL links
<Radar> not appropriate
<Radar> foad, plz?
<lamer> fu
<lamer> :)
<lamer> i dont give a shit for ban I have tons of proxies :)
<centrx> wow you are so cool
<lamer> I am a lamer
<jokester> none do we, you are wasting time
<centrx> # of shits given thus far: 0
Musashi007 has quit [Quit: Musashi007]
<jhass> lamer: how's your Ruby?
<lamer> fine
sngeth has quit [Ping timeout: 255 seconds]
<jhass> What did you code last?
lordkryss has quit [Quit: Connection closed for inactivity]
towski_ has quit [Remote host closed the connection]
<jhass> lamer: ^
<lamer> I dont use ruby
geraldbrent has joined #ruby
<lamer> Wrote some vertex shaders
millerti has quit [Read error: Connection reset by peer]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lamer> In order to relax I send NSFL links to people
milesmatthias has joined #ruby
<geraldbrent> Relax... lol.
<jhass> lamer: why don't you learn some ruby?
tjohnson has quit [Quit: Connection closed for inactivity]
<lamer> I cant learn everything
<jhass> it's much more fun than pretending to have any effect here, I promise!
<centrx> He's a busy man
<centrx> How many channels are you in
<jhass> lamer: much more rewarding too!
<lamer> This is fake nick , I am in many :)
<jhass> lamer: http://tryruby.org
<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]
brandly has joined #ruby
nahhhhh123 is now known as wowowowow123
baroquebobcat has joined #ruby
<wowowowow123> 123
<jhass> yes, 123 is a lovely number
<wowowowow123> sorry sorry, testing some stuff
<jhass> no worries ;)
spacemud has quit [Quit: ZNC - http://znc.in]
bronson has joined #ruby
jmhmccr has quit [Quit: Connection closed for inactivity]
amystephen has quit [Quit: amystephen]
RickHull has joined #ruby
brandly has quit [Remote host closed the connection]
brandly has joined #ruby
jottr has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
jxpx777 has joined #ruby
centrx has quit [Client Quit]
jottr has quit [Ping timeout: 246 seconds]
reinaldob has joined #ruby
jlast has joined #ruby
Channel6 has joined #ruby
martinbmadsen has quit [Ping timeout: 246 seconds]
martinbmadsen has joined #ruby
reinaldob has quit [Ping timeout: 256 seconds]
martinbmadsen has quit [Remote host closed the connection]
a5i has quit [Quit: Connection closed for inactivity]
n_blownapart has joined #ruby
RickHull has left #ruby [#ruby]
wowowowow123 has quit [Quit: wowowowow123]
Xiti has quit [Quit: Xiti]
jlast has quit [Ping timeout: 272 seconds]
deric_skibotn has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
martinbmadsen has joined #ruby
Xiti has joined #ruby
brandly has quit [Ping timeout: 256 seconds]
RegulationD has joined #ruby
flip_digits has quit [Ping timeout: 252 seconds]
jxpx777 has quit [Quit: Leaving...]
oo_ has quit [Remote host closed the connection]
GnuYawk has quit [Quit: WeeChat 1.0]
shadoi1 has quit [Quit: Leaving.]
marx has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
ajsdklfjalksdf has joined #ruby
psy has quit [Disconnected by services]
psy_ has joined #ruby
adriancb has joined #ruby
starless has quit [Quit: Leaving]
braincrash has quit [Quit: bye bye]
jmhmccr has joined #ruby
pwnz0r has joined #ruby
n_blownapart has quit [Quit: Leaving]
brandly has joined #ruby
lkba_ has quit [Read error: Connection reset by peer]
brandly has quit [Remote host closed the connection]
lkba has joined #ruby
oo_ has joined #ruby
Soda has quit [Remote host closed the connection]
adriancb has quit [Ping timeout: 256 seconds]
Synthbread has joined #ruby
oo_ has quit [Remote host closed the connection]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
n_blownapart has joined #ruby
oo_ has joined #ruby
NoNMaDDeN has quit [Quit: Leaving...]
braincras has joined #ruby
veduardo has quit [Ping timeout: 250 seconds]
jgt1 has quit [Ping timeout: 250 seconds]
mikepack has joined #ruby
jonr22 has joined #ruby
charliesome has quit [Quit: zzz]
anaeem1_ has joined #ruby
Aswebb_ has joined #ruby
jwang_ has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
eat_multi has quit [Ping timeout: 256 seconds]
ponga has quit [Remote host closed the connection]
it0a has quit [Quit: WeeChat 1.1.1]
charliesome has joined #ruby
alkoma has joined #ruby
riotjone_ has joined #ruby
govg has quit [Ping timeout: 252 seconds]
Aswebb_ has quit [Ping timeout: 272 seconds]
anaeem1_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
craigp has joined #ruby
arescorpio has quit [Excess Flood]
Joufflu has joined #ruby
pwnz0r has quit [Remote host closed the connection]
riotjone_ has quit [Ping timeout: 264 seconds]
Cache_Money has quit [Quit: Cache_Money]
zzing has joined #ruby
iliketurtles has joined #ruby
dogweather has joined #ruby
ghostpl_ has joined #ruby
AndyBotwin has quit [Quit: Leaving]
techsethi has joined #ruby
duncannz has joined #ruby
krisquigley has joined #ruby
Baprath has joined #ruby
Filete has joined #ruby
Baprath has quit [Client Quit]
kyb3r_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
krisquigley has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Ping timeout: 256 seconds]
Rayford has joined #ruby
bruno- has joined #ruby
jlast has joined #ruby
emdub has quit [Quit: .]
emdub has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
flip_digits has joined #ruby
starless has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
techsethi has quit [Ping timeout: 252 seconds]
bradleyprice has quit []
Rayford has quit [Quit: Rayford]
kappy has quit [Ping timeout: 245 seconds]
n_blownapart has quit [Quit: Leaving]
Ankhers has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
sngeth has joined #ruby
Lingo__ has joined #ruby
bronson has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
flip_digits has quit [Ping timeout: 252 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
ev_ has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
Lingo__ has quit [Read error: Connection reset by peer]
tubuliferous_ has joined #ruby
sngeth has quit [Ping timeout: 252 seconds]
iteratorP has joined #ruby
iterator_ has quit [Ping timeout: 256 seconds]
techsethi_ has joined #ruby
techsethi_ has quit [Client Quit]
ajsdklfjalksdf has quit [Ping timeout: 250 seconds]
gr33n7007h has quit [Remote host closed the connection]
kappy has joined #ruby
hmnhf has quit [Quit: Konversation terminated!]
ajsdklfjalksdf has joined #ruby
hmnhf has joined #ruby
DrIranian has joined #ruby
nucular11 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has quit [Ping timeout: 244 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
Limix has quit [Quit: Limix]
duncannz has quit [Ping timeout: 240 seconds]
milesmatthias has quit [Remote host closed the connection]
Rephiax__ has joined #ruby
nii2361 has joined #ruby
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
techsethi_ has joined #ruby
milesmatthias has joined #ruby
Rephiax has quit [Ping timeout: 246 seconds]
ponga has joined #ruby
hvxgr has quit [Ping timeout: 256 seconds]
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...?
<DrIranian> Radar: Limited and expensive :)
<DrIranian> Radar: all my wings are cut :)
<Radar> DrIranian: If you're on Ubuntu you can follow this guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
iliketurtles has quit [Quit: zzzzz…..]
ghostpl_ has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
bricker has joined #ruby
jlast has joined #ruby
<DrIranian> Radar: thx dude
Channel6 has quit [Quit: Leaving]
lolmaus has joined #ruby
Limix has joined #ruby
krz has quit [Read error: Connection reset by peer]
lolmaus has quit [Client Quit]
jlast has quit [Ping timeout: 264 seconds]
tubuliferous_ is now known as tubuliferous
Ankhers has joined #ruby
techsethi_ has quit [Quit: techsethi_]
speakingcode has joined #ruby
hvxgr has joined #ruby
hmnhf has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby
jlast has joined #ruby
RegulationD has joined #ruby
Ankhers has quit [Ping timeout: 244 seconds]
zzing has quit [Quit: Textual IRC Client: www.textualapp.com]
riotjones has quit [Ping timeout: 250 seconds]
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…]
User458764 has joined #ruby
milesmatthias has joined #ruby
tubuliferous has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
milesmatthias has quit [Ping timeout: 245 seconds]
piotrj has quit [Remote host closed the connection]
Rarikon has joined #ruby
hs366 has joined #ruby
<certainty> yow
Xoro has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has joined #ruby
<flughafen> ha
<flughafen> and google is dumping c++ for go
* flughafen should write a language
<flughafen> called flughafen++
Filete has quit [Quit: Textual IRC Client: www.textualapp.com]
<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
RegulationD has joined #ruby
iteratorP has quit [Remote host closed the connection]
iteratorP has joined #ruby
jenrzzz has joined #ruby
SOLDIERz__ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anarang has joined #ruby
<flughafen> certainty: i'm surprised that works with all the { on the same line as the code ;)
piotrj has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<certainty> hehe
RegulationD has quit [Ping timeout: 246 seconds]
<flughafen> https://bitbucket.org/certainty/chicken-stuff? du bist naturlich hamburger
piotrj has joined #ruby
<certainty> flughafen: how do you mean?
<dawkirst> thanks arup_r, sevenseacat
<flughafen> ah, it's just a joke, i don't know anything about hamburgers other than they have a cool train museum
<flughafen> dawkirst: no thanks to me?
<flughafen> i inspired them
<dawkirst> and flughafen :)
<flughafen> you're welcome dawkirst
relix has joined #ruby
jonr22 has joined #ruby
starless has quit [Quit: Leaving]
SOLDIERz____ has joined #ruby
Spami has joined #ruby
jlast has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
SOLDIERz__ has quit [Ping timeout: 264 seconds]
<shevy> hamburgers are produced in hamburg
Aswebb_ has joined #ruby
<shevy> and certainty lisps
strixd has joined #ruby
oo_ has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 256 seconds]
diegoviola has quit [Quit: WeeChat 1.1.1]
<flughafen> certainly certainty has a lisp?
codecop has joined #ruby
elaptics is now known as elaptics_away
Vidiot_X has joined #ruby
oo_ has joined #ruby
indianpirate has joined #ruby
dawkirst has quit [Quit: Leaving...]
vivekananda has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
craigp has quit [Remote host closed the connection]
bronson has joined #ruby
ponga has joined #ruby
<shevy> certainty's hamburger lisps
jottr has joined #ruby
User458764 has joined #ruby
<shevy> most certainly
<shevy> now I am hungry :(
krisquigley has joined #ruby
zenspider has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 244 seconds]
einarj has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
sigurding has quit [Quit: sigurding]
yellowgh0st has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
<certainty> shevy: :)
krisquigley has quit [Ping timeout: 265 seconds]
Akagi201 has joined #ruby
uptownhr has quit [Quit: uptownhr]
amundj has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
lsmola has joined #ruby
jgt1 has joined #ruby
ki0 has joined #ruby
maasha has joined #ruby
Takle has joined #ruby
ki0 has quit [Remote host closed the connection]
Cust0sL1men has joined #ruby
ki0_ has joined #ruby
<maasha> Do we have some best practices guide to write docs for methods etc?
sngeth has joined #ruby
yellowgh0st has quit [Ping timeout: 272 seconds]
fabrice31 has quit [Remote host closed the connection]
danjordan has joined #ruby
fabrice31 has joined #ruby
<shevy> maasha depends. you could use that signature thingy which I think is in yard
User458764 has joined #ruby
techsethi_ has joined #ruby
jmhmccr has quit [Quit: Connection closed for inactivity]
<shevy> which possibly may look similar to http://rack.rubyforge.org/doc/Rack/Mime.html
<shevy> though I seem to remember more formatting than that
techsethi_ has quit [Client Quit]
sngeth has quit [Ping timeout: 246 seconds]
<maasha> shevy also, I never found an explanation of the markup used. seem to be muddled with different ways.
<shevy> yeah :)
<shevy> that's why I tried to find some example
<shevy> I remember, I think, return values were denoted in []
craigp has joined #ruby
<shevy> and lots of more stuff
<shevy> since I was lazy I decided to not use any of that
terlar has joined #ruby
<maasha> what does Ruby itself use? (or Rails)
<shevy> rdoc even hates lines that are like this: # ===================================== #
rdark has joined #ruby
Hirzu_ has joined #ruby
<SebastianThorn> shevy: when i saw the line i thought is was time for hangman
<shevy> lol
<flughafen> shevy: H?
<shevy> I hate that rdoc thinks these are special. I think rdoc acts "if there are at least 3 '=', treat the line in a special way
Aswebb_ has quit [Remote host closed the connection]
<shevy> and I don't know how to disable it
<shevy> maasha you can look at the ruby source
arup_r has quit [Remote host closed the connection]
<shevy> I show you an example from lib/time.rb
coderhs has quit [Read error: Connection reset by peer]
flip_digits has joined #ruby
terlar has quit [Client Quit]
<maasha> shevy: sure, but I was wondering if there was a best practices guide or such.
Guest64074 has joined #ruby
<maasha> There really ought to be lots of blog posts and so on, but ... ?
<shevy> dunno
<shevy> sounds like a boring blog!
Hirzu has quit [Ping timeout: 264 seconds]
terlar has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
livathinos has joined #ruby
antgel has joined #ruby
<maasha> shevy: plenty of boring blogs ...
<shevy> how does python do it?
<maasha> I don't speak python :o(
<tobiasvl> how does python do what?
<tobiasvl> I speak python
Guest64074 is now known as marr
einarj has joined #ruby
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?
yfeldblu_ has joined #ruby
dc has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 255 seconds]
<maasha> Anyone studied this: http://tomdoc.org/
<maasha> ?
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]
<ns5> repasted on pastie: http://pastie.org/10034745
<maasha> So who is behind that tomdoc.org guide?
joonty has joined #ruby
<Hirzu_> "The git gem requires git 1.6.0.0 or later, but only found 2.2.1. You should probably upgrade." Interesting :)
jolg42 has joined #ruby
martinbmadsen has quit [Ping timeout: 272 seconds]
duncannz has quit [Ping timeout: 255 seconds]
kwd has joined #ruby
<shevy> Hirzu_ sounds like a wrong check
<Hirzu_> indeed :)
<Hirzu_> but seems to work. So that I consider to be my entertainment, when starting the app
indianpirate has quit [Ping timeout: 246 seconds]
sigurding has joined #ruby
jlast has joined #ruby
craigp has joined #ruby
kwd has quit [Client Quit]
fabrice31 has quit [Remote host closed the connection]
kaspernj has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
zenspider has joined #ruby
Synthbread has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
olivier_bK has joined #ruby
commmmodo has quit [Quit: commmmodo]
joonty has joined #ruby
dling has quit [Ping timeout: 255 seconds]
basiclaser has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
kwd has joined #ruby
sevenseacat has left #ruby [#ruby]
blackmesa has joined #ruby
bayed has joined #ruby
milesmatthias has joined #ruby
<maasha> Is this the official Ruby coding style guide?
decoponio has joined #ruby
Dakuan has joined #ruby
<apeiros_> maasha: there's no official coding style guide
<tobiasvl> there is no official one
Dakuan has quit [Remote host closed the connection]
<maasha> avril14th: which is the unofficial style guide? the other one refer to this too
Dakuan has joined #ruby
<maasha> apeiros_: tobiasvl: right
<oddmunds> maasha: i recommend you follow these style guides, despite them not being official
ghostpl_ has joined #ruby
<oddmunds> they are the defacto standard
* flughafen wishes they would list bogomips scores on the top500
yeticry has quit [Ping timeout: 255 seconds]
reinaldob has joined #ruby
milesmatthias has quit [Ping timeout: 272 seconds]
yeticry has joined #ruby
<maasha> oddmunds: yeah, I think I shall give these two a careful read: https://github.com/bbatsov/ruby-style-guide and http://tomdoc.org/
<kaspernj> maasha, community style guide can be found here https://github.com/bbatsov/ruby-style-guide
<kaspernj> maasha, you can use RubyCop to help you honor it https://github.com/bbatsov/rubocop
piotrj has quit [Remote host closed the connection]
Dakuan has quit [Client Quit]
piotrj has joined #ruby
<maasha> kaspernj: hah, rubocop is like a lint-remover for ruby?
<shevy> I think it only tells you what is bad
<shevy> like no trailing newline or so
<kaspernj> maasha, that is a funny word for it, but I guess it isn't totally wrong to compare the two like that :-)
reinaldob has quit [Ping timeout: 264 seconds]
<kaspernj> shevy, indeed it does. But it goes much deeper than that. It is pretty extensive.
<maasha> kaspernj: great, I'll give it a spin
<kaspernj> maasha, it is very configurable as well. You can disable certain checks, if you prefer doing it different.
<kaspernj> maasha, the community disagrees on a lot of stuff. Like if it actually matters to use ' or "
<maasha> kaspernj: yeah, well it does matter ... but being that anal hampers productivity - so its a tradeoff
razieliyo has joined #ruby
razieliyo has joined #ruby
<kaspernj> maasha, I don't want to argue if it does or not, but a lot of people did publicly available benchmarks which argues to either side.
Tuxero has quit [Remote host closed the connection]
triangles2 has joined #ruby
<maasha> eeeeeek, I have been shot and arrested: 11647 offenses detected
nii2361 has joined #ruby
SOLDIERz_____ has joined #ruby
triangles has quit [Ping timeout: 255 seconds]
dhjondoh has quit [Ping timeout: 244 seconds]
jimms has joined #ruby
dhjondoh has joined #ruby
oo_ has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SOLDIERz____ has quit [Ping timeout: 272 seconds]
RegulationD has joined #ruby
<shevy> maasha lol
<shevy> in how many lines of code?
Aswebb_ has joined #ruby
<maasha> shevy: 923
<maasha> shevy: bah, I don't know :o)
Tuxero has joined #ruby
<shevy> wat
iMe has joined #ruby
<shevy> 10 errors in a single line?
<maasha> shevy: pulling your leg here. most warnings seems to arise from code lines being longer than 80 chars.
leafybasil has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
msgodf has joined #ruby
<shevy> k
<shevy> so 5000 offenses left
RegulationD has quit [Ping timeout: 264 seconds]
<shevy> 185 files inspected, 7078 offenses detected
oo_ has joined #ruby
Akuma has quit [Quit: So long sukkas!]
<shevy> readline/readline.rb:121:3: C: Use alias_method instead of alias.
<shevy> lol
<shevy> readline/readline.rb:77:13: C: Hash#has_key? is deprecated in favor of Hash#key?.
<shevy> that is not even true
havenwood has quit [Remote host closed the connection]
<shevy> as otherwise a warning would show from ruby itself
<shevy> just as it was with .id vs. object_id some years ago
zenspider has quit [Ping timeout: 256 seconds]
Aswebb_ has quit []
jonr22 has joined #ruby
wald0 has quit [Quit: Lost terminal]
Rollabunna has quit [Remote host closed the connection]
User458764 has joined #ruby
Rollabunna has joined #ruby
slap_stick has joined #ruby
serivich has joined #ruby
selu has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
commmmodo has joined #ruby
mike32 has joined #ruby
Zai00 has joined #ruby
vivekananda has quit [Quit: Leaving]
zenspider has joined #ruby
Rephiax has joined #ruby
jimms has quit [Remote host closed the connection]
<jhass> rubocop config sharing time? rubocop config sharing time! \o/
<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
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
<undeadaedra> But
<undeadaedra> I use has_key? :(
SouL has quit [Ping timeout: 265 seconds]
rupertbg has joined #ruby
Apocalypse has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
<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
<kaspernj> shevy, looks like "has_key?" has been deprecated according to Matz http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/43765
krisquigley has quit [Ping timeout: 245 seconds]
<kaspernj> Maybe they didn't go ahead and actually do it though...
<undeadaedra> nooooo
<jhass> scottymeuk: that's some part of the backtrace, not the exception
<scottymeuk> jhass: NoMethodError: undefined method `force_encoding'
<scottymeuk> sorry, was just getting it
<jhass> scottymeuk: for...?
<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'
<jhass> a5i: and does short circuit
<a5i> o
triangles3 has joined #ruby
<jsrn> Some examples of and vs. && -> http://stackoverflow.com/a/1429359
<maasha> shevy: you can always write ugly code
<shevy> hey
<shevy> is this prettier:
<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
a5i has quit []
<jhass> avril14th: in other words implement the requirements for hash keys http://ruby-doc.org/core-2.2.1/Hash.html#class-Hash-label-Hash+Keys
<avril14th> sounds definitely like the way to go
Akagi201 has quit [Ping timeout: 246 seconds]
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
<avril14th> jhass: anyone?
<avril14th> ah
sngeth has joined #ruby
delianides has joined #ruby
* avril14th reads up
rdark has quit [Quit: leaving]
<jhass> yes, close friend of mr nobody I heard
rdark has joined #ruby
<gregf_> avril14th: well, tried both. https://gist.github.com/anonymous/e8041aecaae7144815a6
jgt1 has joined #ruby
<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]
<arup_r> Need little idea... Why am I getting `nil` ? https://gist.github.com/aruprakshit/81bdf667ff2e1f8a80b1
<canton7> which line are you seeing the exception on?
<canton7> ...or are 'files' nil?
maximski has quit []
lanemeyer has quit [Ping timeout: 250 seconds]
<canton7> my guess is that #chdir doesn't return anything, because it's there to change the directory, not to list anything
<canton7> my guess is that #chdir doesn't return anything, because it's there to change the directory, not to list anything
<arup_r> ok moment
<hanmac1> ri chdir says: Dir.chdir( [ string] ) -> 0
SouL has joined #ruby
kirun has joined #ruby
startupality has joined #ruby
<arup_r> humm... canton7 and hanmac1 I have some other questions... But before reaching there.. I got stuck.. :)
jonr22 has quit [Ping timeout: 256 seconds]
zenspider has joined #ruby
<arup_r> error ^^
flip_digits has joined #ruby
<arup_r> what I want is to go through each directry and collect all files inside those dirs.. Like Dir::glob method..
dhjondoh1 has joined #ruby
<shevy> arup_r yeah I think that is the only way in ftp
martinbmadsen has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<arup_r> like Dir::chdir... and then come back..
dhjondoh has quit [Ping timeout: 250 seconds]
<shevy> arup_r you could try .nlst too
<canton7> arup_r, sticking 'ftp.passive = true' in there helps
<canton7> at least for me
flip_digits has quit [Ping timeout: 245 seconds]
<arup_r> can you guys give me your code.. which you are trying I never did ftp
<mikecmpbll> all your codes are belong to us
<shevy> dunno, I wrote a wrapper over ftp so I don't remember
<canton7> arup_r, add 'ftp.passive = true' between lines 3 and 4
<canton7> arup_r, easy....
<arup_r> ok
Pupeno has joined #ruby
dhjondoh has joined #ruby
<gregf_> workmad3: indeed, lol
mostlybadfly has joined #ruby
martinbmadsen has quit [Ping timeout: 240 seconds]
<hs366> any OP available ?
dhjondoh1 has quit [Ping timeout: 256 seconds]
sigurding has quit [Quit: sigurding]
<jhass> apeiros_: ^
<apeiros_> hm? what's up, hs366?
bronson has joined #ruby
<hs366> just wondering if it's possible to have ruby in botbot.me irc log
ndrei has quit [Ping timeout: 272 seconds]
Rollabunna has quit [Remote host closed the connection]
ldnunes has joined #ruby
Rollabunna has joined #ruby
<hs366> usually it's easy to search and have a look what was going on last days
<hs366> apeiros_, do you think it's possible ? of if there is alternative way ?
<arup_r> canton7: thanks.. I want only file names.. it is now giving everything.. I need only `.zip` files..
<arup_r> shevy: ^^
<apeiros_> hs366: see topic
ndrei has joined #ruby
<canton7> arup_r, then parse and filter it
<canton7> arup_r, you're a programmer, right? this is a simple string parsing task
<canton7> I'm sure you can solve it ;)
reinaldob has joined #ruby
<arup_r> humm
<hs366> duhh..im so embarrassed, need a glasses i think :D
<hs366> thx a lot !
<arup_r> nlst take argument regexp like ? That's my question .. _short-cut_ `list` does.. I am sire
<arup_r> let me try
<mikecmpbll> i say too much libelous stuff to be logged.
<arup_r> I won
bronson has quit [Ping timeout: 245 seconds]
<canton7> congrats. have a ribbon
<arup_r> yayy!
<shevy> arup_r \o/
<arup_r> shevy: \o/
<undeadaedra> /o\
SOLDIERz_____ has quit [Quit: Be back later ...]
<arup_r> undeadaedra: why :(
_64k has joined #ruby
<shevy> he is different
<shevy> he is french
<arup_r> Ohh
bal has quit [Ping timeout: 252 seconds]
<undeadaedra> shevy: stop that
iamninja has quit [Quit: WeeChat 1.1.1]
<arup_r> Now.. I want to download... :) which method should I hit ?
<undeadaedra> or I’ll hit you with my baguette
<mikecmpbll> it's not even a person with arms, it's a string of onions.
<jhass> arup_r: from looking at the docs, which would you consider?
<arup_r> My mouse borken jhass :(
<jhass> I can't operate a computer without a mouse just fine
<arup_r> anyway.. Looking the docs.. took the other guys mouse.. as he is not working now..
<shevy> undeadaedra I like baguettes
<shevy> the guy is not working now?
<shevy> why are you working!
maximski has joined #ruby
<undeadaedra> He’s eating a baguette
maximski has quit [Max SendQ exceeded]
maximski has joined #ruby
<arup_r> canton7: right now... I am getting only file names .. not the full path to the file.. so How would I download.. ?
<shevy> arup_r but you can find out in which directory you are
<shevy> and you have an array
<shevy> so .map over your array where you build the full remote path
<arup_r> array is showing the names of the files
<canton7> arup_r, you know what directly you are in
<canton7> arup_r, you JUST chdir'd there
<shevy> you have like a million karma on stackoverflow
<gregf_> heh
phutchins has joined #ruby
<arup_r> humm.. but got the file names recursively only the names.. how would I track ?
<jhass> shevy: I start to think that's a bad sign actually
<undeadaedra> I have 0 points on SO :D
<canton7> arup_r, you know how to add strings together, right? ...right?
<arup_r> canton7: yes
<canton7> arup_r, that's all you need to do
iamninja has joined #ruby
DEA7TH has joined #ruby
delianides has joined #ruby
<shevy> arup_r you have the filename! you have the path via .pwd now you can assemble
<workmad3> undeadaedra: hmm... pretty sure you start at 1 point :P
<shevy> a string is a string is a string
<undeadaedra> workmad3: well, 1.
jlast has joined #ruby
<mikecmpbll> i downvoted him
<undeadaedra> D:
<workmad3> mikecmpbll: pretty sure SO doesn't go below 1 (unless they changed things) :P
<shevy> mikecmpbll lol
<mikecmpbll> workmad3: i'll downvote you if you're not careful
<mikecmpbll> :D
<workmad3> mikecmpbll: https://stackoverflow.com/users/16035/workmad3 pretty sure I can take it ;)
<shevy> I downvote workmad3's beard
<shevy> I think if enough downvote, the thing must go off
<mikecmpbll> touche
* workmad3 hides
apeiros_ changed the topic of #ruby to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org, other public logging is prohibited
<workmad3> the op is on the prowl
MXfive_ has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<shevy> what did he do
<shevy> or rather, change
<apeiros_> shortened the topic
<undeadaedra> I’ll downvote everything you like.
<canton7> "other public logging is prohibited"
<arup_r> confused!
<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]
<gregf_> arup_r: you using net/ftp or net/sftp?
<arup_r> net/ftp
<gregf_> arup_r: use sftp its secure
sigurding has joined #ruby
<arup_r> ok.. thanks let me look into it
<undeadaedra> maybe he can’t, gregf_
<arup_r> sftp is a Gem
maximski has quit [Ping timeout: 246 seconds]
sevenseacat has joined #ruby
<gregf_> undeadaedra: 'can\'t' is like saying. 'here\'s a gun, now decide where you shoot yourself to die quick'
<undeadaedra> No but I mean
sngeth has joined #ruby
maximski has joined #ruby
<undeadaedra> Maybe the services he has to search are FTP only
iamninja has quit [Quit: WeeChat 1.1.1]
<jhass> arup_r: gregf_: note sftp != ftps and sftp != ftp + tls, ftps is ftp + tls, sftp is an entirely different protocol
R3dk1nG has quit [Ping timeout: 240 seconds]
<workmad3> also note that there's an sftp server that has nothing to do with the sftp protocol
<arup_r> well I can make a list of dirs now https://gist.github.com/aruprakshit/81bdf667ff2e1f8a80b1
<workmad3> because secure forms of ftp are completely screwed up
<arup_r> I need to CD into it and return back again from where I cd into it
bruno- has joined #ruby
iamninja has joined #ruby
R3dk1nG has joined #ruby
<arup_r> If I can do ` cd ..` then I am done..
dhjondoh has quit [Remote host closed the connection]
sngeth has quit [Ping timeout: 244 seconds]
<gregf_> arup_r: prolly 'cd -' ..... just a wild guess
RandyT has quit [Ping timeout: 250 seconds]
hcnewsom has quit [Quit: hcnewsom]
<arup_r> with which method ?
<arup_r> ok
<gregf_> hmm, never heard of ftps. so many protocols to do the same thing :/ . transfer a file securely :/
<arup_r> trying..
<workmad3> gregf_: ftps is ftp + tls, sftp is ftp over SSH
<gregf_> workmad3: ah - ok
ndrei has quit [Ping timeout: 246 seconds]
<jhass> except that it's not ftp over SSH, it's ftp's job over SSH
<undeadaedra> sftp > ftps > ftp
<workmad3> gregf_: you could also probably have a normal ftp protocol that you secure through stunnel or a gnutls wrapper
gfawcettpq has quit [Ping timeout: 244 seconds]
<shevy> arup_r you can always keep track manually
RandyT has joined #ruby
<workmad3> jhass: yeah, I was being a bit imprecise to get the idea across :)
sandelius has joined #ruby
Takle has joined #ruby
strixd has quit [Quit: 500]
<gregf_> workmad3, jhass: thanks!
lyuben_ has joined #ruby
<maasha> any opinions on tomdoc?
bruno- has quit [Ping timeout: 245 seconds]
Pharaoh2 has joined #ruby
iamninja has quit [Client Quit]
maximski has quit []
Zai00 has joined #ruby
<flughafen> gregf_: my favorite gregf_ in #ruby
strixd has joined #ruby
ghostpl_ has quit [Ping timeout: 255 seconds]
<mikecmpbll> why are you all talking about the simple fax transport protocol?
<arup_r> Well.. I thought I am there... But I am now.. why is this error https://gist.github.com/aruprakshit/81bdf667ff2e1f8a80b1 ?
ajsdklfjalksdf has joined #ruby
triangles2 has joined #ruby
<gregf_> flughafen: are you saying someone stole my nick :/
<flughafen> no
_64k has quit [Ping timeout: 255 seconds]
Aswebb_ has joined #ruby
krisquigley has joined #ruby
jgt1 has joined #ruby
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tier has joined #ruby
<gregf_> haha. s/stole/nicked/ ;)
<workmad3> arup_r: it's probably because you're creating an absolute directory with "/#{dir_name}" rather than a relative directory path
triangles has quit [Ping timeout: 255 seconds]
<workmad3> arup_r: so you're in essence trying to do 'cd /whatever' when what you want to do is 'cd /pub/ruby/whatever'
Takle has quit [Remote host closed the connection]
<flughafen> ha. i would be worried if your nick was nicked
<arup_r> I tried without `/` .. same error
bruno- has joined #ruby
GambitK has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
jxpx777 has joined #ruby
iamninja has joined #ruby
iamninja has quit [Client Quit]
iamninja has joined #ruby
sinkensabe has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 245 seconds]
<mikecmpbll> arup_r: looks something to do with that @passive setting from the source, but i've almost completely no clue what the source means :>
mike32 has quit [Ping timeout: 252 seconds]
SOLDIERz_____ has joined #ruby
failshell has joined #ruby
fabrice31 has joined #ruby
nymous has joined #ruby
<nymous> hey folks
triangles has joined #ruby
<nymous> i need a little help on activerecord from rails
<arup_r> mikecmpbll: I tried this also https://gist.github.com/aruprakshit/4fa115c018456bbcdccb but no luck :(
failshel_ has joined #ruby
<mikecmpbll> arup_r: /shrugs
<nymous> i'm trying to hack gitlab a bit, this code https://gist.github.com/divanikus/c1d4ba5fbce58150bb41
triangles2 has quit [Ping timeout: 272 seconds]
<workmad3> arup_r: absolute directory
<workmad3> arup_r: also, remove that 'passive = true' thing
<nymous> the problem is with builds
hiyosi has joined #ruby
<mikecmpbll> from fumbling through the source, it seems to not be expecting a response starting with a 2-- code when the passive setting is set
anaeem___ has joined #ruby
<mikecmpbll> as you can see from the exception it's in parse227 method
<nymous> i made an edit allowing several commits with same sha
<mikecmpbll> ohwait nvm
* mikecmpbll lunchtime
hcnewsom has joined #ruby
anaeem___ has quit [Remote host closed the connection]
bruno- has joined #ruby
<nymous> and now i'm willing to get whole builds from as many commits with same sha i have
<nymous> it's obviously means editing "show" method
<GambitK> I have an array of json objects, is there a way to aggregate them based on one of the json fields?
delianides has joined #ruby
<nymous> but how to properly implement that?
delianides has quit [Read error: Connection reset by peer]
delianides has joined #ruby
serivichi has quit [Ping timeout: 255 seconds]
failshell has quit [Ping timeout: 265 seconds]
dstarh has joined #ruby
<arup_r> workmad3: then getting error if I comment out https://gist.github.com/aruprakshit/81bdf667ff2e1f8a80b1#file-error-L2
revoohc has joined #ruby
anaeem1_ has quit [Ping timeout: 252 seconds]
* workmad3 shrugs
<workmad3> that works perfectly here
<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
<arup_r> workmad3: humm... this SO also telling me the same -- http://stackoverflow.com/questions/15103830/why-cant-netftp-connect-to-server
yfeldblu_ has quit [Ping timeout: 256 seconds]
davedev24_ has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davedev24_ has quit [Remote host closed the connection]
<jhass> GambitK: if "aggregate over a field" would be totally unambiguous, I wouldn't have asked for desired output ;)
triangles has quit [Ping timeout: 244 seconds]
Seich has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
milesmatthias has joined #ruby
hectortrope has joined #ruby
sandelius has joined #ruby
startupality has quit [Quit: startupality]
tier has quit [Read error: Connection reset by peer]
mbwe has quit [Quit: WeeChat 0.4.2]
tier has joined #ruby
jherbst has joined #ruby
adriancb has joined #ruby
adriancb has quit [Remote host closed the connection]
startupality has joined #ruby
adriancb has joined #ruby
bim has quit [Remote host closed the connection]
<jsrn> GambitK: Do you mean get the sum of values in the fields of all json objects?
<jsrn> So if each json object has an integer foobar, you want the sum of all foobars?
livathin_ has joined #ruby
<GambitK> jhass: a lot of there sults are similar and only vary on date so I just want he objects where a particular field is different from the others, kinda like this: https://gist.github.com/GambitK/1883a6e102b61e9281d7#file-example
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] ?
akky has quit [Client Quit]
joonty has quit [Quit: joonty]
it0a has joined #ruby
<arup_r> not sure it is risky or nor
jonr22 has joined #ruby
<tobiasvl> but isn't <DIR> just a placeholder?
<tobiasvl> if it is the exact string then sure
<arup_r> >> "03-13-15 11:46PM <DIR> Amita ww".match(/(?<=<dir>).*/i)[0].strip
<eval-in_> arup_r => "Amita ww" (https://eval.in/301604)
<arup_r> tobiasvl: no
<arup_r> I think FTP system is windows
danzilio has joined #ruby
<arup_r> :)
<arup_r> I am getting information as I mentioned
<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> >> [1, 2, 3, 4, 5, 6].uniq {|e| e.even? }
<eval-in_> jhass => [1, 2] (https://eval.in/301619)
<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…]
steve-la_ has quit [Quit: Lingo: www.lingoirc.com]
iamjarvo has joined #ruby
<jhass> hanmac1: want to see one of my lovely macros?
<hanmac1> jhass: only if you want to see some of my C(++) macros too ;P
senayar has joined #ruby
renier_ has joined #ruby
<jhass> I already saw them
<undeadaedra> #define true false
<jhass> #define while whilst
<jhass> er, wrong way around :P
ismaelga has joined #ruby
davedev24_ has joined #ruby
renier has quit [Ping timeout: 256 seconds]
jimms has joined #ruby
<hanmac1> jhass: imo https://github.com/Hanmac/rwx/blob/master/ext/main.hpp#L487 and following are nice macros for generating wrapper code
juanpablo___ has joined #ruby
kaspernj has quit [Remote host closed the connection]
<jhass> hanmac1: we should make this one https://github.com/manastech/crystal_ruby/blob/master/sample/test_ruby.cr fully work though
ych4k3r has joined #ruby
troyready has joined #ruby
krisquigley has joined #ruby
jerius has quit [Quit: /quit]
anaeem1 has quit [Remote host closed the connection]
tjohnson has joined #ruby
anaeem1_ has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
KramerC has quit [Ping timeout: 245 seconds]
Rayford has joined #ruby
jerius has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
ghr has joined #ruby
ghostpl__ has quit [Remote host closed the connection]
KramerC has joined #ruby
ghostpl_ has joined #ruby
zenith_ has joined #ruby
bricker has joined #ruby
serivichi has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
anaeem1_ has quit [Ping timeout: 246 seconds]
Rayford has quit [Client Quit]
serivichi has joined #ruby
ych4k3r_ has joined #ruby
jlast has joined #ruby
SOLDIERz______ has joined #ruby
zenith_ has quit [Remote host closed the connection]
Megtastique has joined #ruby
ghostpl_ has joined #ruby
Megtastique has quit [Max SendQ exceeded]
havenwood has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
sevenseacat has quit [Remote host closed the connection]
ych4k3r has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
SOLDIERz_____ has quit [Ping timeout: 255 seconds]
hcnewsom has joined #ruby
anaeem1 has joined #ruby
Takle has joined #ruby
HOrangeJewce has joined #ruby
anaeem1 has quit [Remote host closed the connection]
yeticry has quit [Remote host closed the connection]
anaeem1 has joined #ruby
yeticry has joined #ruby
kobain has joined #ruby
commmmodo has quit [Quit: commmmodo]
tubuliferous has quit [Ping timeout: 264 seconds]
zenith_ has joined #ruby
pontiki has joined #ruby
bronson has joined #ruby
anaeem1 has quit [Ping timeout: 252 seconds]
brb3 has quit [Quit: ZZZzzz…]
vtunka has joined #ruby
x1337807x has quit [Ping timeout: 246 seconds]
brb3 has joined #ruby
speakingcode has quit [Ping timeout: 245 seconds]
dinhani has quit [Quit: Leaving.]
dinhani has joined #ruby
milesmatthias has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
bronson has quit [Ping timeout: 244 seconds]
x1337807x has joined #ruby
bashusr has quit [Quit: ZNC - http://znc.in]
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
bashusr has joined #ruby
bashusr has quit [Changing host]
bashusr has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
jimms has quit [Remote host closed the connection]
x1337807x has joined #ruby
jgt1 has quit [Ping timeout: 246 seconds]
snath has quit [Ping timeout: 255 seconds]
x1337807x has quit [Max SendQ exceeded]
Pharaoh2_ has joined #ruby
x1337807x has joined #ruby
mistermocha has joined #ruby
milesmatthias has quit [Ping timeout: 256 seconds]
x1337807x has quit [Max SendQ exceeded]
Pharaoh2_ has quit [Max SendQ exceeded]
x1337807x has joined #ruby
Pharaoh2_ has joined #ruby
schickung has joined #ruby
Pharaoh2 has quit [Ping timeout: 246 seconds]
spider-mario has quit [Ping timeout: 245 seconds]
j_mcnally has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
kblake has joined #ruby
agarie has joined #ruby
fabrice31_ has joined #ruby
soc42 has quit [Remote host closed the connection]
rajeshchawla has joined #ruby
MXfive has quit [Quit: Textual IRC Client: www.textualapp.com]
werelivinginthef has joined #ruby
Ankhers has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
startupality has joined #ruby
serivichi has quit [Ping timeout: 255 seconds]
ElectionLibre has joined #ruby
gfawcettpq has quit [Ping timeout: 265 seconds]
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
n008f4g_ has quit [Ping timeout: 252 seconds]
<havenwood> shevy: Tried Traveling Ruby?
<shevy> traveling ruby? what kind is that
jonr22 has quit [Ping timeout: 256 seconds]
sandelius has joined #ruby
failshell has joined #ruby
gfawcettpq has joined #ruby
jespada has quit [Ping timeout: 250 seconds]
sandelius has quit [Client Quit]
SouL has joined #ruby
ddv has joined #ruby
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
aswen has joined #ruby
joonty has joined #ruby
<cheater> i put a print statement in a do block and it gets printed three times. why is it doing that? here's the code: http://0bin.net/paste/drFnO3ec8+YwlyWi#VlhUF6difGHAWHm7B2HksLrfjrFe9Sn2COGdpTwnT8i
<shevy> %w( a b c d e f ).index('e') # => 4
jerius has joined #ruby
<shevy> don't think you can get a multiple match
Takle has joined #ruby
vtunka has quit [Quit: Leaving]
snath has joined #ruby
GaryOak_ has joined #ruby
lostcuaz has joined #ruby
<cheater> does anyone know? :S
nii2361 has quit [Ping timeout: 250 seconds]
<certainty> haha client side encryption :)
<shevy> cheater this one gets printed three times? so how many times do you print there
bricker has quit [Ping timeout: 255 seconds]
<jhass> cheater: that's very specific and an implementation detail of vagrant
<jhass> ask them
brandly has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 245 seconds]
hanmac1 has quit [Quit: Leaving.]
Limix has joined #ruby
tejota has quit [Remote host closed the connection]
<certainty> shevy: ?
spider-mario has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
baroquebobcat_ has joined #ruby
senayar has quit [Remote host closed the connection]
<cheater> jhass: i was hoping for some pointers on how to find this out myself. the vagrant irc channel is very inactive.
dfinninger has joined #ruby
brandly has joined #ruby
spider-mario has joined #ruby
oo_ has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 246 seconds]
baroquebobcat_ is now known as baroquebobcat
tkuchiki has joined #ruby
<scrapcode> A company I applied for sent me a link to a set of 4 hackerrank problems and 2/4 kicked my ass. =[
<jhass> cheater: p(caller), p(Process.pid) stuff like that I guess
JDiPierro has quit [Remote host closed the connection]
milesmatthias has joined #ruby
maasha has quit [Quit: Page closed]
<cheater> jhass: sorry, what is p()?
uptownhr has quit [Quit: uptownhr]
<cheater> jhass: i know very little about ruby (i can program in a lot of other languages though)
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
Hirzu has quit [Ping timeout: 252 seconds]
<gregf_> >> def indexes dat; dat.each_with_index.select { |arr| arr.first == 3 }.map(&:last);end; p indexes([1,2,3,4,3])
<eval-in_> gregf_ => [2, 4] ... (https://eval.in/301673)
<gregf_> DEA7TH: ^^
MXfive has joined #ruby
<gregf_> * ducks && runs*
<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)
<undeadaedra> >> method(:p).inspect
<eval-in_> undeadaedra => "#<Method: Object(Kernel)#p>" (https://eval.in/301680)
tkuchiki_ has joined #ruby
sigurding has quit [Quit: sigurding]
<undeadaedra> I don’t know what I expected
<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
<undeadaedra> >> %(Hello).inspect
<eval-in_> undeadaedra => "\"Hello\"" (https://eval.in/301682)
<cheater> maybe it's some sort of object (??) that ontains a string.
bigmac has quit [Ping timeout: 252 seconds]
<jhass> >> Object.new
<eval-in_> jhass => #<Object:0x41d143e0> (https://eval.in/301684)
<jhass> it's some sort of metaprogramming weirdness
<cheater> how do i digest it?
<jhass> probably doing ^ and then extending shit into it
<jhass> read the source of where it's created
<cheater> would you mind telling me what ^ is? symbolhound finds nothing: http://symbolhound.com/?q=ruby+^
robindunbarr has joined #ruby
<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
<certainty> xD
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> your AI needs more typo correction jhass
kaspernj has joined #ruby
<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"
<hoelzro> >> :foo.class
<eval-in_> hoelzro => Symbol (https://eval.in/301695)
<eam> or "foo".to_sym
<shevy> cheater "foo" and 'foo' are synonymous.
Lingo__ has quit [Client Quit]
<hoelzro> unless there's a #{...} in the string
<cheater> is a Symbol like a singleton string?
krisquigley has joined #ruby
<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]
milesmatthias has joined #ruby
<a5i> Can anyone help me with this lil problem?
startupality has quit [Quit: startupality]
kaspernj has quit [Remote host closed the connection]
flip_digits has quit [Ping timeout: 272 seconds]
jay_ has quit [Quit: Page closed]
DouweM has quit [Quit: Leaving...]
ghr has quit [Read error: Connection reset by peer]
<eam> >> ??
<eval-in_> eam => "?" (https://eval.in/301707)
bronson has quit [Ping timeout: 244 seconds]
Takle has joined #ruby
foodemperror has joined #ruby
foodemperror has left #ruby [#ruby]
milesmatthias has quit [Ping timeout: 246 seconds]
alec-c4 has joined #ruby
mradmacher has quit [Quit: leaving]
uptownhr has joined #ruby
jaequery has joined #ruby
IrishGringo has joined #ruby
<cheater> i have finished the tutorial
<arup_r> I'm not a good programmer :(
sngeth has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
SHyx0rmZ has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby
<cheater> jhass: so how does extending an Object help me figure out its text contents? I didn't understand that.
Takle has quit [Remote host closed the connection]
<jhass> cheater: forget about it, it's advanced class hierarchy wizardy and was a guess about what it is, not how you can learn about it
zachrab has quit [Ping timeout: 256 seconds]
<jhass> cheater: I tracked down the code by now
tjohnson has quit [Quit: Connection closed for inactivity]
<jhass> https://github.com/mitchellh/vagrant/blob/master/plugins/providers/virtualbox/config.rb#L39 here is the method defined that lets you set it externally
<jhass> (and read)
nii2361 has joined #ruby
antgel has quit [Ping timeout: 245 seconds]
<a5i> jhass, do you have any idea?
brandly has quit [Ping timeout: 264 seconds]
<jhass> a5i: that's an incomplete exception, specifically it's (part of) a backtrace
maletor has joined #ruby
<a5i> ill try to again
<cheater> jhass: thanks for your time. how do I use "attr_accessor :name"?
<jhass> a5i: on a side note you want to learn about https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks
Wolland has joined #ruby
sngeth has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
<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?
vtunka has joined #ruby
<undeadaedra> yes
gfawcettpq has joined #ruby
<undeadaedra> you can then do x.name = y
<cheater> thanks
terlar has quit [Ping timeout: 244 seconds]
imanzarrabian has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_maes_ has joined #ruby
<jhass> a5i: your encodings are messed up
jgt1 has joined #ruby
nii2361 has quit [Ping timeout: 246 seconds]
<iheartkode> Good Morning
<jhass> a5i: what does enca on update.htm report?
<a5i> jhass: it works
terlar has joined #ruby
serivichi has joined #ruby
<a5i> jhass: the hompage is the onlly one that chokes
livathin_ has quit []
gfawcettpq has quit [Ping timeout: 256 seconds]
milesmatthias has joined #ruby
Takle has joined #ruby
<jhass> a5i: index.html or whatever the file is then
<a5i> jhass, its index.erb
<jhass> basically check the encoding of all your fiels
<a5i> index.html doesnt exist
<jhass> *files
<a5i> jhass: how can I? also, it works perfectly standalone running puma
hmsimha has quit [Ping timeout: 252 seconds]
<jhass> a5i: enca is a handy tool, as said initially
spider-mario has quit [Ping timeout: 272 seconds]
zenith_ has joined #ruby
rippa has joined #ruby
graydot has joined #ruby
jespada has quit [Ping timeout: 265 seconds]
<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.
<cheater> jhass: i'm not sure how to get at :id or env, as they are being used here, from outside the context of this plugin: https://github.com/mitchellh/vagrant/blob/master/plugins/providers/virtualbox/action/customize.rb#L24
Hirzu has quit [Remote host closed the connection]
<workmad3> iheartkode: in 2.2, they finally extended it to allow {"foo": "bar"} btw... which is a 'finally' because that then allows valid JSON :)
jonr22 has joined #ruby
<cheater> jhass: i'm not sure how to find out where 'env' is created. how would one go about this?
<iheartkode> I see, I appreciate your time. Thx
Hirzu has joined #ruby
Hobogrammer has quit [Ping timeout: 256 seconds]
msgodf has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
jtzero has joined #ruby
failshell has quit [Read error: Connection reset by peer]
iamjarvo has quit [Max SendQ exceeded]
jtzero has left #ruby [#ruby]
sambao21 has joined #ruby
iamjarvo has joined #ruby
wallerdev has joined #ruby
iliketurtles has joined #ruby
blackmesa has joined #ruby
<arup_r> havenwood: I use chatzilla.. But don't get sound.. don't know how to set.. Tried a lot.. then got bored.. :)
jonr22 has quit [Ping timeout: 256 seconds]
_64k has quit [Ping timeout: 244 seconds]
Regulati_ has quit [Remote host closed the connection]
Hirzu has quit [Ping timeout: 252 seconds]
<avril14th> rethorical question: is there a speed difference between a = a + 1; and a+=1; ?
revoohc has joined #ruby
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pengin has joined #ruby
blackmesa has quit [Client Quit]
revoohc has quit [Client Quit]
<arup_r> can anyone do now to me arup_r : <like this> ?
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MXfive has quit [Quit: Textual IRC Client: www.textualapp.com]
<arup_r> I'll check the sound again
MXfive has joined #ruby
banister has joined #ruby
martinbmadsen has joined #ruby
banister has quit [Max SendQ exceeded]
<undeadaedra> arup_r:
<arup_r> one more.. I missed..
<apeiros_> avril14th: and do you expect a rethorical answer?
<apeiros_> *rhetorical
<avril14th> yep :)
atheos has joined #ruby
serivichi has quit [Ping timeout: 244 seconds]
<eam> avril14th: there is no significant difference
jenrzzz has joined #ruby
SOLDIERz______ has joined #ruby
corehook has joined #ruby
starless has joined #ruby
iceden has quit [Read error: Connection reset by peer]
jespada has joined #ruby
<eam> avril14th: if you are ever curious, use the benchmark module
uptownhr has quit [Quit: uptownhr]
ndrei has quit [Ping timeout: 250 seconds]
joonty has quit [Quit: joonty]
Guest89586 has quit [Changing host]
Guest89586 has joined #ruby
<havenwood> avril14th: or check out the benchmark-ips gem: https://github.com/evanphx/benchmark-ips#readme
Guest89586 is now known as daynaskully
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') ?
danjordan has quit [Quit: danjordan]
ndrei has joined #ruby
<avril14th> jaequery: same
<havenwood> >> 2.11r + 5.22r
<eval-in_> havenwood => (733/100) (https://eval.in/301715)
foureight84 has joined #ruby
<avril14th> IIRC if first operand is bigdecimal you're fine
<avril14th> >> 53.48 * 0.7
<eval-in_> avril14th => 37.43599999999999 (https://eval.in/301716)
<eam> jaequery: it depends on how much precision you need
<jaequery> i just need up to two decimal points
jespada has quit [Ping timeout: 250 seconds]
<eam> jaequery: then you don't need bigdecimal at all
<havenwood> >> require 'bigdecimal'; require 'bigdecimal/util'; 2.11.to_d + 5.22.to_d
<eval-in_> havenwood => #<BigDecimal:40d6e580,'0.733E1',18(27)> (https://eval.in/301717)
<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
<havenwood> >> Gem.loaded_specs.map(&:first)
<eval-in_> havenwood => [] (https://eval.in/301718)
sambao21 has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby
<havenwood> atmosx: ^
<jhass> a5i: and while updating your gist, the output of the locale command would be nice
<atmosx> havenwood: awesome ty.
ki0_ has quit [Ping timeout: 265 seconds]
tier has quit [Ping timeout: 255 seconds]
tier_ has joined #ruby
towski_ has joined #ruby
<workmad3> atmosx: more interesting... Gem.loaded_specs is actually a hash keyed by the gem name
jerius has quit [Quit: /quit]
<atmosx> ah nice
<workmad3> atmosx: so Gem.loaded_specs[gem_name] will be either the gem spec, or nil if the gem isn't loaded
<a5i> jhass: what local command?
<jhass> a5i: also note that you can add multiple files to a gist, which makes it easier to track line numbers and such
<jhass> a5i: locale
<workmad3> atmosx: or Gem.loaded_specs.has_key?
<arup_r> no
<a5i> jhass, this is nginx, so there is no command output
<jhass> a5i: I'm interested in your system locale really
joonty has joined #ruby
<jhass> it's a command, like cat, less etc.
<havenwood> workmad3: And I should have said #keys for the list of gem names. >.> More coffee for me!
dumdedum has quit [Quit: foo]
commmmodo has quit [Quit: commmmodo]
<workmad3> havenwood: heh :)
joonty has quit [Client Quit]
<workmad3> havenwood: I had fun recently... I wrote a one-liner to slurp in a Gemfile.lock and give me back a hash of gem-name => version :)
last_staff has joined #ruby
MXfive has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
relix has joined #ruby
blackmesa has joined #ruby
<a5i> jhass, Im rly confused
SouL_ has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
thiagovsk has joined #ruby
dinhani has joined #ruby
<jhass> now show me yours
<jhass> on your server of course
iliketurtles has joined #ruby
<atmosx> jhass's command prompt is like my vim powerline lol.
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> foureight84: 10:34 < foureight84> basically i'm trying to verify if i have to 1.23.to_s.to_d + BigDecimal('2.99')
<eam> foureight84: no, that won't help. BigDecimal('1.23') + BigDecimal('2.99') should, though
<havenwood> workmad3: require 'bundler'; Bundler::LockfileParser.new(Bundler.read_file('Gemfile.lock')).dependencies.map { |dep| [dep.name, dep.requirement.to_s] }.to_h
R3dk1nG has quit [Quit: Konversation terminated!]
<eam> foureight84: simply expressing a float literal in ruby code causes a base 2 conversion
antgel has quit [Ping timeout: 252 seconds]
<eam> >> 1.23.class # it's too late at this point
<eval-in_> eam => Float (https://eval.in/301727)
werelivinginthef has quit [Remote host closed the connection]
atheos has quit [Remote host closed the connection]
iMe has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
graydot has quit [Quit: graydot]
iMe has joined #ruby
morenoh149 has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
iliketurtles has quit [Quit: zzzzz…..]
graydot has joined #ruby
rsavage has joined #ruby
dhruvasagar has joined #ruby
<jhass> yes, all I wanted
<a5i> jhass, :D
<jhass> on the gist tutorial side: to post ruby code just name the file foo.rb and paste the code directly
RegulationD has joined #ruby
sevvie has quit [Ping timeout: 265 seconds]
<a5i> oh that makes more snese
<a5i> sense*
<jhass> a5i: but lets take a look at your error message
<jhass> [ 2015-03-18 12:16:07.3908 2551/0x0000000157eff8(Worker 1) utils.rb:85 ]: *** Exception Encoding::InvalidByteSequenceError in Rack applicatio$
<jhass> do yousee that $ at the end?
<jhass> it's an artifact of your pager
<jhass> it tells you that there's more on that line
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> you can see it by pressing the left arrow key
<jhass> er, right
jimms has joined #ruby
<jhass> today is not my best day either :/
<atmosx> that's not proper utf8 support
baweaver has joined #ruby
<jhass> atmosx: how so?
<atmosx> jhass: I had similar errors in some sinatra programs of mine
zenith_ has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<a5i> jhass, alright try to get it
<jhass> atmosx: oh, I thought you meant the locale output
<atmosx> jhass: IIRC the app expects ASCII while it receives some utf-8 string.
lyuben_ has quit [Quit: This computer has gone to sleep]
<atmosx> a5i: you have views too? haml/erb?
<jhass> atmosx: huh, the trace is going through temple
<a5i> atmosx: yes, erb
alec-c4 has joined #ruby
<jhass> er, tilt
<atmosx> tilt
<atmosx> I don't know what tilt is, so I raise my case
lyuben_ has joined #ruby
<jhass> tilt is some abstraction thingy around the various templating gems
<atmosx> I see
<jhass> a5i: oh, Ruby 1.9 fun I guess
<pipework> Mmm tilt.
<atmosx> a5i: can you paste this file too? /var/www/cubaa/views/index.erb
lyuben_ has quit [Client Quit]
alec-c4 has quit [Remote host closed the connection]
<pipework> jhass: It's a templating engine handler thingy.
<a5i> atomsx sure
* pipework hopes there's a PHP engine for tilt
<a5i> atmosx: sure*
<jhass> a5i: can you add the following as the first line to index.erb?: # -*- coding: UTF-8 -*-
sambao21 has joined #ruby
krisquigley has joined #ruby
<atmosx> one solution might be what jhass said, adding that file to your erb (not sure if you need to add some <% %> though)
sevvie has joined #ruby
<jhass> I hope ruby drops it from the file
<a5i> well tis in here now
<atmosx> a5i: are you using ruby 1.9?
dfinninger has joined #ruby
<a5i> yes
jusmyth has joined #ruby
<atmosx> a5i: upgrade please
<jhass> a5i: that's some weird HTML, but lets do that later
<a5i> I dont think i can with reverse proxy atm
<atmosx> doesn't look like erb, last time I saw erb was full of % and <
<atmosx> lol
<jhass> atmosx: there's some
<atmosx> a5i: cool, that's the HTML code, can you show us the 'erb code?
<jhass> <%= req.ip %>
Zai00 has quit [Quit: Zai00]
lolmaus has quit [Quit: Konversation terminated!]
<bricker> Why is this?:
<bricker> >> "\x89".include?("\x89")
<eval-in_> bricker => false (https://eval.in/301734)
riotjones has joined #ruby
jottr has joined #ruby
<bricker> Someone in #rubyonrails is running into this
<a5i> atmosx: It has one bit of it thats erb
<jhass> mmh
<eam> >> "\x89".b.include?("\x89".b)
<eval-in_> eam => true (https://eval.in/301735)
<jhass> ^ just wanted to do the same
DouweM has joined #ruby
<eam> \x89 isn't a valid unicode character
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]
riotjones has quit [Ping timeout: 272 seconds]
<jhass> yes, first line unless that's a hashbang
<jhass> then second is valid
ponga has joined #ruby
havenn has joined #ruby
<a5i> where should I put it in the sever file ?
<a5i> the # encoding: UTF-8 part
Jesterman81 has joined #ruby
<jhass> first line
Cache_Money has quit [Quit: Cache_Money]
<atmosx> above the => require "cuba"
<a5i> ok
<jhass> so, this is was a debian box or..?
<atmosx> also, how do you reload the app? I mean do you literally stop/start the server (somehow) right?
<atmosx> the rack server
shadeslayer has quit [Ping timeout: 256 seconds]
iliketurtles has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<a5i> No luck :(
<a5i> I do nginx -s reload
mjuszczak has joined #ruby
<a5i> and yes debian
DouweM has quit [Quit: Leaving...]
havenwood has quit [Ping timeout: 252 seconds]
sevvie has quit [Ping timeout: 264 seconds]
<shevy> you poor man
<atmosx> a5i: nginx is a reverse proxy.
<atmosx> a5i: that doesn't restart your app.
<jhass> a5i: uh, are you sure that actually reboots the app? been some time since I used passenger
<atmosx> ah passenger
<jhass> atmosx: they have the passenger module for nginx
ponga has quit [Ping timeout: 256 seconds]
shadeslayer has joined #ruby
xenon16 has quit [Remote host closed the connection]
chrishou_ has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Cache_Money has joined #ruby
j_mcnally has joined #ruby
<atmosx> a5i: can you reboot the machine?
werelivinginthef has joined #ruby
<jhass> wat, no, this aint windows
jottr has quit [Ping timeout: 252 seconds]
<eam> jhass: the gap is narrowing lately
<jhass> I do have a systemd box
craigp has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
paradoja has joined #ruby
<jhass> I still do only reboot on kernel updates
<GaryOak_> Does anyone know how to specify schema using the Sequel gem?
<eam> some kernel updates can be done on the fly -- not systemd updates though
<jhass> eam: FUD
<eam> fact!
morenoh149 has joined #ruby
<jhass> systemctl daemon-reexec
Jesterman81_ has joined #ruby
<atmosx> GaryOak_: I do
<eam> jhass: I should say, some subset :)
<a5i> I also so service nginx restart
<a5i> to ensure the saves
<jhass> eam: never had ^ fail
<GaryOak_> atmosx: I'm only using one schema
<a5i> any other solutions :(
<GaryOak_> but I can't figure out how to configure the connection for that schema
Nirgali42 has joined #ruby
jimms has quit [Remote host closed the connection]
rbennacer has joined #ruby
govg has joined #ruby
<atmosx> GaryOak_: you mean define associations?
<atmosx> GaryOak_: show me the code and what you're trying to do.
<GaryOak_> maybe...., just need to say I'm using this schema to access these tables
_hollywood has quit [Ping timeout: 246 seconds]
Guest98042 has quit [Remote host closed the connection]
<GaryOak_> atmosx: So like SELECT * FROM my_schema.items;
Jesterman81 has quit [Ping timeout: 244 seconds]
Jesterman81_ is now known as Jesterman81
Eiam has joined #ruby
Jesterman81 has left #ruby [#ruby]
<jhass> a5i: one more I have: add passenger_env_var LANG en_US.UTF-8 to your nginx config
<a5i> okay
<atmosx> GaryOak_: here is how you define a schema https://github.com/atmosx/pritory/blob/master/models/init.rb
<a5i> lets all pray for this to work
<eam> jhass: most people never encounter the hard corner cases :)
<atmosx> GaryOak_: actually take a look at this https://github.com/atmosx/pritory/tree/master/models
<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
craigp has joined #ruby
<jhass> a5i: I noticed as much
<a5i> okay good
_hollywood has joined #ruby
ki0 has joined #ruby
Crisix has joined #ruby
sevvie has joined #ruby
<a5i> IT WORKED!
<a5i> THANK THE LORD
<a5i> thanks @ jhass and @atmosx
<atmosx> hahaha
<atmosx> can I sed the result of jhass's sweat?
Crisix has quit [Max SendQ exceeded]
dinhani has quit [Ping timeout: 244 seconds]
<atmosx> s/sed/see
maletor has quit [Quit: Computer has gone to sleep.]
<a5i> please tell me im not hallucinating
bim has quit [Remote host closed the connection]
iliketurtles has quit [Remote host closed the connection]
<atmosx> a5i: Karim Ellaisy <-- is that you?
<atmosx> a5i: no, it's a beautiful landing page btw
mike32 has quit [Quit: Leaving]
<atmosx> a5i: there are little clouds floating around, lovely.
tvw has quit []
<a5i> yeah thats me :P
<atmosx> cool :-)
<atmosx> a5i: out of curiosity, is that jewish?
<a5i> Nope its arabic
<atmosx> Arabic
ItSANgo has joined #ruby
<atmosx> hm Arabic is used throught many countries right? In south africa and middle east, or not?
<eam> atmosx: that would be Hebrew you're thinking of, btw
<atmosx> eam: yes, yes. Hebrew, I wanted to ask him abotu the election in Israel, ut it's not the case apparently
ki0 has quit [Ping timeout: 246 seconds]
aarwine has quit [Ping timeout: 264 seconds]
pdoherty has quit [Quit: Leaving]
_64k has quit [Ping timeout: 256 seconds]
SOLDIERz______ has joined #ruby
timanema has joined #ruby
<jhass> atmosx: now why the hell do you have two doctypes and two headers?
<jhass> er a5i ^
DouweM has joined #ruby
<jhass> sorry my tab completion fails that all the time :P
<a5i> err
<a5i> I dont know o.o.
perrier has quit [Write error: Broken pipe]
selu has quit [Quit: Textual IRC Client: www.textualapp.com]
Channel6 has quit [Quit: Leaving]
Takle has quit [Remote host closed the connection]
bronson has joined #ruby
zenith_ has joined #ruby
Takle has joined #ruby
<atmosx> jhass: if it works, I wouldn't touch it (at this point in ttime) or at least make a copy of it. lol
Takle has quit [Remote host closed the connection]
ramfjord has quit [Quit: Lost terminal]
ramfjord has joined #ruby
<atmosx> a5i: how old r u?
<a5i> 16
<atmosx> a5i: really cool hehe
<atmosx> a5i: nice, keep rubying
<a5i> thanks :P
ndrei has joined #ruby
<a5i> and bet on it
jgt1 has quit [Ping timeout: 272 seconds]
sevvie has quit [Ping timeout: 255 seconds]
JimmyNeutron has quit [Read error: Connection reset by peer]
sevvie has joined #ruby
marr has quit [Read error: Connection reset by peer]
tier_ has quit [Remote host closed the connection]
perrier has joined #ruby
agrinb has joined #ruby
speakingcode has joined #ruby
jonr22 has joined #ruby
mjuszczak has quit []
bim has joined #ruby
DouweM has quit [Quit: Leaving...]
mjuszczak has joined #ruby
agrinb_ has joined #ruby
shazaum has joined #ruby
tier has joined #ruby
shazaum has joined #ruby
shazaum has quit [Changing host]
sevvie has quit [Ping timeout: 245 seconds]
stef204 has joined #ruby
SOLDIERz______ has quit [Ping timeout: 252 seconds]
ismaelga has quit [Remote host closed the connection]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leafybasil has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 256 seconds]
HanaNix has joined #ruby
tier has quit [Remote host closed the connection]
werelivinginthef has quit [Remote host closed the connection]
agrinb has quit [Ping timeout: 265 seconds]
tier has joined #ruby
B1n4r10 has joined #ruby
freerobby has joined #ruby
craigp has quit [Remote host closed the connection]
Rollabun_ has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
plashchynski has quit [Quit: plashchynski]
ghostpl_ has quit [Remote host closed the connection]
Jesterman81 has joined #ruby
lkba_ has joined #ruby
tier_ has joined #ruby
braincras has quit [Ping timeout: 265 seconds]
zenith__ has joined #ruby
craigp has joined #ruby
chrishou_ has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson_ has joined #ruby
martinbmadsen has joined #ruby
speakingcode has quit [Ping timeout: 256 seconds]
Jesterman81 has left #ruby [#ruby]
sevvie has joined #ruby
timanema has quit [Quit: leaving]
bronson has quit [Ping timeout: 252 seconds]
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? }`.
Cache_Money has quit [Quit: Cache_Money]
joonty has joined #ruby
<rubie> makes sense, thank you
<havenn> >> [1, 2, 3].find &:even?
<eval-in_> havenn => 2 (https://eval.in/301764)
plashchynski has joined #ruby
phale has joined #ruby
<phale> Hello, sorry for bad english But I need book for ruby Knowledge enticing
<agarie> also
<agarie> >> [1, 2, 3, 4].find &:even?
<eval-in_> agarie => 2 (https://eval.in/301765)
<agarie> and...
<phale> A very god bok
<agarie> >> [1, 2, 3, 4].find_all &:even?
<eval-in_> agarie => [2, 4] (https://eval.in/301766)
<phale> is this a new hipster method added in 2.2.0?
<agarie> `find` returns the first element that matches, if you need all of them, use `find_all` :P
<rubie> fixed it up
<rubie> ugh sorry about the tabs
<phale> >> [1, 2, 3, 4].each {|i| print i if i.even?}
<eval-in_> phale => 24[1, 2, 3, 4] (https://eval.in/301767)
KnownSyntax has quit [Ping timeout: 265 seconds]
mjuszczak has quit []
<phale> if you dont want a yucky array for no reason
<phale> ;)
duncannz has joined #ruby
Jesterman81 has quit [Quit: Jesterman81]
AdamMeghji has quit [Ping timeout: 265 seconds]
<phale> rubie: I can't read your code.
SouL has joined #ruby
<phale> There are more than 2 spaces used for tabbing.
ojacobson_ has joined #ruby
martinbmadsen has quit [Quit: Lost terminal]
duncannz has quit [Max SendQ exceeded]
ki0 has joined #ruby
yfeldblu_ has joined #ruby
<phale> Also, unnecessary if.
jottr has joined #ruby
<phale> who are you trying to fool here?
blackjid has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
Hijiri has quit [Ping timeout: 265 seconds]
exadeci has quit [Ping timeout: 265 seconds]
Zggb has quit [Ping timeout: 265 seconds]
waxjar has quit [Ping timeout: 265 seconds]
Klumben has quit [Ping timeout: 265 seconds]
thesheff17 has quit [Ping timeout: 265 seconds]
ramblinpeck_ has quit [Ping timeout: 265 seconds]
whoojemaflip has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
<rubie> ya im not sure why, i tried fixing it, and its set on 2 tab spacing on the gist
KnownSyntax has joined #ruby
bayed has quit [Ping timeout: 265 seconds]
mjc_ has quit [Ping timeout: 265 seconds]
bim has quit [Remote host closed the connection]
alol__ has quit [Ping timeout: 265 seconds]
jimeh has quit [Ping timeout: 265 seconds]
mattjbarlow has quit [Ping timeout: 265 seconds]
<phale> don't use return
<phale> it's redundant
duncannz has quit [Max SendQ exceeded]
<phale> return number if i < 1
AdamMeghji has joined #ruby
<phale> if num != 1 do...
Earthnail has quit [Remote host closed the connection]
<phale> etc!
Klumben has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
waxjar has joined #ruby
mattjbarlow has joined #ruby
bayed has joined #ruby
thesheff17 has joined #ruby
ojacobson has quit [Ping timeout: 244 seconds]
PaulCapestany has quit [Quit: .]
whoojemaflip has joined #ruby
ramblinpeck_ has joined #ruby
Zggb has joined #ruby
alol__ has joined #ruby
Hijiri has joined #ruby
mjc_ has joined #ruby
jimeh has joined #ruby
blackjid has joined #ruby
exadeci has joined #ruby
mjuszczak has joined #ruby
jxpx777_ has joined #ruby
PaulCapestany has joined #ruby
ki0 has quit [Ping timeout: 256 seconds]
PaulCapestany has quit [Client Quit]
jusmyth has quit [Ping timeout: 252 seconds]
relix has joined #ruby
PaulCapestany has joined #ruby
tris has quit [Excess Flood]
deol has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
tris has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> agarie: rubie note most people prefer the select alias to find_all
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
jgt1 has quit [Ping timeout: 264 seconds]
dh64 has quit [Quit: Konversation terminated!]
<rubie> ok thanks jhass!
<agarie> you're right :P
jxpx777 has quit [Ping timeout: 244 seconds]
oetjenj has joined #ruby
leafybasil has joined #ruby
phale has quit [Remote host closed the connection]
bim has joined #ruby
maletor has joined #ruby
jmhmccr has joined #ruby
bim has quit [Remote host closed the connection]
oetjenj_ has joined #ruby
rsavage has quit [Quit: Konversation terminated!]
leafybasil has quit [Remote host closed the connection]
oetjenj has quit [Remote host closed the connection]
x1337807x has joined #ruby
krisquigley has joined #ruby
spacemud has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jimms has joined #ruby
PaulCapestany has quit [Quit: .]
slipkfn has joined #ruby
<slipkfn> Is there any ubuntu repositories for ruby 2.2?
<shevy> you have to ask ubuntu
PaulCapestany has joined #ruby
Apocalypse has quit [Ping timeout: 256 seconds]
chu has joined #ruby
Lewix has joined #ruby
<jhass> slipkfn: brightbox
Rahul_Roy_ has quit [Quit: Connection closed for inactivity]
leafybasil has joined #ruby
commmmodo has joined #ruby
leafybasil has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 252 seconds]
oetjenj has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
m8 has joined #ruby
atomi has quit [Quit: brb]
brb3 has joined #ruby
axisys has quit [Read error: Connection reset by peer]
iMe has quit [Ping timeout: 255 seconds]
clamstar has quit [Ping timeout: 256 seconds]
AdamMeghji has quit [Ping timeout: 256 seconds]
oetjenj_ has quit [Ping timeout: 265 seconds]
Klumben has quit [Ping timeout: 265 seconds]
atomi has joined #ruby
tris has quit [Ping timeout: 265 seconds]
Zggb has quit [Ping timeout: 265 seconds]
ballPointPenguin has quit [Ping timeout: 265 seconds]
bim has joined #ruby
Cache_Money has joined #ruby
unclouded has quit [Ping timeout: 256 seconds]
clamstar has joined #ruby
<SegFaultAX> What's the current best tool for making command line applications?
<SegFaultAX> Thor seems quite popular, is that the generally best option?
mistermo_ has joined #ruby
tris has joined #ruby
AdamMeghji has joined #ruby
unclouded has joined #ruby
Zggb has joined #ruby
<jhass> !best
<helpa> "Best" and "better" are subjective. Try to use a different term.
ballPointPenguin has joined #ruby
doodmtl has joined #ruby
<SegFaultAX> Pick whatever definition of best most suits you.
<SegFaultAX> "Popular"
oetjenj has quit [Client Quit]
milesmatthias has quit [Remote host closed the connection]
iMe has joined #ruby
gfawcettpq has quit [Ping timeout: 252 seconds]
lanemeyer has quit [Ping timeout: 265 seconds]
<agarie> Thor is great indeed, I've written some internal tools for my company with it
tris has quit [Excess Flood]
milesmatthias has joined #ruby
Synthbread has quit [Ping timeout: 252 seconds]
brb3_ has quit [Ping timeout: 265 seconds]
<jhass> if you want popular just check github stars
tris has joined #ruby
Klumben has joined #ruby
<SegFaultAX> jhass: I'm looking for direct recommendations, thanks.
oetjenj has joined #ruby
<SegFaultAX> I appreciate your input, though.
<shevy> "The whole team worked hard for the next 18 months to eventually produce Ruby."
<agarie> but if what you need is really simple, using ARGV might be enough, or even OptionParser
bronson has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
<SegFaultAX> agarie: I'm also looking at methadone.
SOLDIERz______ has joined #ruby
<eam> shevy: ruby borrows a lot from vb :)
<shevy> !!!!!!!!
<shevy> MICROSOFT INVENTED RUBY!
_hollywood has quit [Quit: Leaving]
<arup_r> good news
jcdesimp has joined #ruby
marr has joined #ruby
baweaver has quit [Remote host closed the connection]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
milesmatthias has quit [Ping timeout: 244 seconds]
Davey has quit [Ping timeout: 250 seconds]
Matthews_ has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
dinhani has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
slap_stick has joined #ruby
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
werelivinginthef has joined #ruby
Davey has joined #ruby
jcdesimp has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
oetjenj has joined #ruby
MatthewsFace has quit [Ping timeout: 264 seconds]
jjlim has joined #ruby
jolg42 has joined #ruby
lyuben_ has quit [Quit: This computer has gone to sleep]
spyderm__ has quit [Ping timeout: 256 seconds]
Jackneill has quit [Quit: Leaving]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
werelivinginthef has quit [Ping timeout: 252 seconds]
milesmatthias has joined #ruby
pietr0 has joined #ruby
noobier03 has joined #ruby
jjlim_ has joined #ruby
justin_pdx has joined #ruby
sngeth has joined #ruby
<noobier03> hello, i was wondering if anyone knows of a online or sublime text formatter that will fix indentition of erb code
ponga has joined #ruby
spyderman4g63 has joined #ruby
joonty has quit [Quit: joonty]
<jhass> just indentation?
<jhass> I juse the built-in reindent for that
Takle has joined #ruby
RedCrustacean has quit [Quit: WeeChat 0.4.2]
allcentury has quit [Ping timeout: 250 seconds]
<mozzarella> gg=G
mistermo_ has quit [Remote host closed the connection]
sngeth has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
lordkryss has quit [Quit: Connection closed for inactivity]
gfawcettpq has joined #ruby
ponga has quit [Ping timeout: 244 seconds]
Jiyuhen has quit [Ping timeout: 252 seconds]
revoohc has quit [Quit: revoohc]
Jiyuhen has joined #ruby
_ixti_ has joined #ruby
nii2361 has joined #ruby
dorei has joined #ruby
jimms has quit [Remote host closed the connection]
Tuxero has left #ruby [#ruby]
ixti has quit [Ping timeout: 272 seconds]
rubie has quit [Quit: Page closed]
nii2361 has quit [Ping timeout: 265 seconds]
mistermocha has joined #ruby
jjlim has quit [Quit: WeeChat 0.4.2]
havenn is now known as havenwood
pengin has joined #ruby
jgt1 has joined #ruby
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevvie has quit [Ping timeout: 252 seconds]
maasha has joined #ruby
danzilio has joined #ruby
<maasha> Using TomDoc what is the correct way to describe a splat argument?
kadoppe has quit [Ping timeout: 252 seconds]
jerius has quit [Quit: /part]
danzilio has quit [Max SendQ exceeded]
danzilio has joined #ruby
iheartkode has quit [Quit: Leaving]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kadoppe has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
deol has joined #ruby
wallerdev has joined #ruby
otisZart has quit [Remote host closed the connection]
Takle has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
chrishough has joined #ruby
phutchins has joined #ruby
sevvie has joined #ruby
jenrzzz has joined #ruby
<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
<havenwood> Senjai: aha :)
yeticry has joined #ruby
<slipkfn> Ill try that in a minute. I think the brightbox repos screwed up my system.
noobier03 has quit [Quit: Page closed]
danzilio has quit [Quit: My computer has fallen asleep!]
revoohc has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
digitalextremist has quit [Ping timeout: 252 seconds]
ki0 has quit [Ping timeout: 272 seconds]
dinhani has quit [Ping timeout: 265 seconds]
justin_pdx has quit [Read error: Connection reset by peer]
oetjenj has quit [Quit: Textual IRC Client: www.textualapp.com]
jonr22 has quit [Ping timeout: 256 seconds]
jjlim_ has quit [Ping timeout: 265 seconds]
oetjenj has joined #ruby
mwlang has quit [Ping timeout: 246 seconds]
slap_stick has joined #ruby
juanpablo_ has joined #ruby
justin_pdx has joined #ruby
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.
<jhass> so that's where your confusion comes from
<jhass> it re-seeds the prng used by rand
<jhass> it returns the old seed
bronson has joined #ruby
<jhass> >> Array.new(5) { rand }
<eval-in_> jhass => [0.35241286169162234, 0.9123924536881409, 0.48405143118756677, 0.27453919011407535, 0.3332401379040668] (https://eval.in/301782)
happyface has quit [Quit: Connection closed for inactivity]
<jhass> >> Array.new(5) { rand }
<eval-in_> jhass => [0.8520221705948431, 0.8889245656254113, 0.13862235762824238, 0.1450237370837183, 0.6968874391496365] (https://eval.in/301783)
<jhass> >> srand(10); Array.new(5) { rand }
<eval-in_> jhass => [0.771320643266746, 0.0207519493594015, 0.6336482349262754, 0.7488038825386119, 0.4985070123025904] (https://eval.in/301784)
<jhass> >> srand(10); Array.new(5) { rand }
<eval-in_> jhass => [0.771320643266746, 0.0207519493594015, 0.6336482349262754, 0.7488038825386119, 0.4985070123025904] (https://eval.in/301785)
Hijiri has quit [Quit: WeeChat 1.0.1]
dogweather has joined #ruby
Squarepy has joined #ruby
lordkryss has joined #ruby
sambao21 has joined #ruby
workmad3 has joined #ruby
<dogweather> Brainstorming an app idea: "Analyze a GitHub project: Well managed? Accepts help? Wants help?" https://github.com/dogweather/ducking-octo-dangerzone
postmodern has joined #ruby
RedCrustacean has joined #ruby
leafybasil has quit [Ping timeout: 252 seconds]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
Synthbread has joined #ruby
mordocai has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jenrzzz_ has quit [Ping timeout: 265 seconds]
<kappy> Thanks, @jhass, I still don't quite get it, but I will do more reading on it.
craigp has joined #ruby
<kappy> And futz with your examples some. ;)
ldnunes has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
<jhass> kappy: maybe using Random directly is easier to understand for you, check its docs
Vidiot_X has quit [Quit: We be chillin - IceChat style]
plashchynski has quit [Quit: plashchynski]
danzilio has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danzilio has quit [Max SendQ exceeded]
commmmodo has quit [Quit: commmmodo]
ghr has joined #ruby
<workmad3> apeiros_: any chance I could make a request that the log in the topic go to http://irclog.whitequark.org/ruby rather than the root? :)
danzilio has joined #ruby
<workmad3> apeiros_: I get annoyed at going to the log and having to then click on #ruby ;)
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
Channel6 has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
Lingo__ has quit [Quit: (null)]
razrunelord has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 256 seconds]
slap_stick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Azure has quit [Quit: Blue Sky Fish]
brb3 has quit [Quit: <.<]
beef-wellington has quit [Ping timeout: 244 seconds]
atomi has quit [Quit: brb]
jenrzzz has joined #ruby
grr_ has joined #ruby
axl_ has joined #ruby
jxpx777_ has quit [Quit: Leaving...]
it0a has quit [Quit: WeeChat 1.1.1]
rbennacer has quit [Ping timeout: 244 seconds]
tris has quit [Excess Flood]
Rollabun_ has quit [Remote host closed the connection]
mjuszczak has quit []
tris has joined #ruby
shazaum has quit [Quit: Leaving]
delianides has quit [Remote host closed the connection]
Azure has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DouweM has joined #ruby
grr_ has quit [Quit: Leaving.]
agarie has quit []
yqt has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
mwlang has quit [Ping timeout: 265 seconds]
baroquebobcat has joined #ruby
ponga has joined #ruby
ojacobson_ has quit [Quit: Leaving...]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SegFaultAX has quit [Excess Flood]
razrunelord has joined #ruby
SegFaultAX has joined #ruby
reinaldob has joined #ruby
pengin has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
leafybasil has joined #ruby
maasha has quit [Quit: Page closed]
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
dopiee has quit [Quit: Leaving]
adriancb has quit [Remote host closed the connection]
dopie has joined #ruby
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pengin has joined #ruby
krisquigley has joined #ruby
<slipkfn> Ok, got a good ruby installation working.
<slipkfn> thanks!
pengin has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
pengin has joined #ruby
riotjones has joined #ruby
jobewan has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
cjim has joined #ruby
anaeem1 has quit [Remote host closed the connection]
justin_pdx has quit [Read error: Connection reset by peer]
anaeem1_ has joined #ruby
last_staff has quit [Quit: last_staff]
crueber has quit [Quit: Leaving.]
codecop has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 246 seconds]
<weaksauce> I know it's not idiomatic ruby but how would one implement a pop on the string class?
reinaldob has quit [Remote host closed the connection]
phutchins has quit [Read error: Connection reset by peer]
<weaksauce> is it even possible?
justin_pdx has joined #ruby
<dogweather> weaksauce: that's pretty easy in ruby.
atomi has joined #ruby
<eam> pop() is just [-1]
phutchins has joined #ruby
Synthbread has quit [Ping timeout: 252 seconds]
<weaksauce> I get that part. it's the modifying the original string part that has me questioning it. I get a cannot modify self
<eam> >> class String; def pop; self[-1]; end; end; "abc".pop
<eval-in_> eam => "c" (https://eval.in/301796)
anaeem1_ has quit [Ping timeout: 272 seconds]
jmhmccr has quit [Quit: Connection closed for inactivity]
baroquebobcat has quit [Quit: baroquebobcat]
morenoh149 has joined #ruby
elfuego has quit [Quit: elfuego]
<dogweather> weaksauce: It's the 'replace' keyword/function.
startupality has quit [Quit: startupality]
<dogweather> Here's an example of it in use: https://gist.github.com/dogweather/a39e71e19cab2d330fd1
<weaksauce> thanks dogweather
baroquebobcat has joined #ruby
startupality has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<eam> >> class String; def pop!; self.slice!(-1); end; end; s = "abc"; s.pop!
<eval-in_> eam => "c" (https://eval.in/301799)
Takle has joined #ruby
meschi_ has quit [Remote host closed the connection]
<eam> >> class String; def pop!; self.slice!(-1); end; end; s = "abc"; [s.pop!, s]
<eval-in_> eam => ["c", "ab"] (https://eval.in/301800)
Aswebb_ has joined #ruby
Guest82051 has quit [Ping timeout: 256 seconds]
<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"
<eval-in_> eam => "see?" (https://eval.in/301807)
<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]
commmmodo has joined #ruby
<Vert`> Oh!
<Vert`> Yes I'm using that :)
<jhass> uh, well, just do a separate plugin/handler for each plugin?
maletor has quit [Quit: Computer has gone to sleep.]
<jhass> it already nicely passes you the capture groups as parameters
<jhass> *for each command I mean
fryguy9 has quit [Quit: Leaving.]
inf_ has joined #ruby
revoohc has quit [Quit: revoohc]
vcs has joined #ruby
Soda has quit [Remote host closed the connection]
<apeiros_> butler had a word-matching mechanism
vcs has left #ruby [#ruby]
foureight84 has quit [Ping timeout: 252 seconds]
<Vert`> You mean with on :message, "phrase"?
<jhass> apeiros_: mmh, DeBot has hangman now though
<jhass> Vert`: you can put a regexp there
<Vert`> I see.
rpad has joined #ruby
<Vert`> Cause ordinarily it matches a complete string, correct?
<Vert`> I guess I should trim the left word using a regex then..
<apeiros_> trunk also had a Dialog class, which encapsulated messages between a user and the bot into a simple send/receive
nerium has joined #ruby
<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
<nerium> jhass: Here's the current regexp https://gist.github.com/oleander/64c70c91a8b96080fdbf
<jhass> but could also mean CSV, dunno
razrunelord has quit [Remote host closed the connection]
inf_ has quit [Quit: leaving]
<nerium> just to get you a hint of the complexity
sepp2k has quit [Quit: Konversation terminated!]
<apeiros_> hehe, only 8 years old: https://gist.github.com/apeiros/10a1120c0ff14863acea
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> require 'gemname' throws an error:
<apeiros_> and I wouldn't wonder if there were BNF -> PCRE translators around
<mistermocha> `require': cannot load such file -- gemname
<mistermocha> far as I know, the gem is installed
milesmatthias has joined #ruby
<catsoup> permissons?
<mistermocha> shouldn't be
<catsoup> mistermocha:
<jhass> mistermocha: gem which gemname says what?
<jhass> on your shell
<nerium> apeiros_: Yeah, but I don't have to real with details, which is the point I'm trying to prove
<jhass> also gem list has it?
olivier_bK has joined #ruby
<a5i> Ayedarma pl0x
<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]
Hirzu has joined #ruby
<a5i> Is anyone available to help with this weird error? https://gist.github.com/Ap0ph1s/c5183758645b6a5b3683
<catsoup> it's not one weird trick to help us lose weight, is it? :-)
justin_pdx has quit [Quit: justin_pdx]
morenoh149 has quit [Ping timeout: 245 seconds]
<jhass> a5i: it's late (early?) enough I think, try pinging FooBarWidget
<mistermocha> jhass: https://gist.github.com/mistermocha/d10fab342f2eca2525fe ... I'm not bothering to copy out files in dependent gems, but perhaps should post my Gemfile and Rakefile...
<jhass> (in #passenger)
<mistermocha> jhass: if you do need more though, let me know
hobodave has quit [Quit: Computer has gone to sleep.]
<jhass> mistermocha: that's 1 of 4 I requested ;)
x1337807x has joined #ruby
Hirzu has quit [Ping timeout: 245 seconds]
justin_pdx has joined #ruby
<jhass> oh, didn't realize he's CET
<jhass> bad luck
* mistermocha sighs at himself for being a bad reader
jobewan has quit [Quit: Leaving]
morenoh149 has joined #ruby
<jhass> mistermocha: good thing gists have an edit function!
<mistermocha> jhass: lolz ... btw, stdout is there (although it's probably stderr) which has the stack
jenrzzz_ has joined #ruby
keen____ has joined #ruby
djbkd has quit [Remote host closed the connection]
Pharaoh2_ has joined #ruby
<jhass> mistermocha: yes, that's the 1 ;D
<jhass> I actually took a look!
reinaldob has joined #ruby
Hijiri has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
<mistermocha> ok 2 & 3 done, but I'm confused on 4
<mistermocha> LoadError output?
Daikan has joined #ruby
<jhass> gem which sererspec
speakingcode has quit [Ping timeout: 245 seconds]
<jhass> *serverspec, damn typos
keen___ has quit [Ping timeout: 264 seconds]
<Daikan> What are some good massive user uploaded material amateur porn sites other than the usual imagefap.com / x.fap.to, nudedphotos.com, etc
<Radar> what the fuck
<Daikan> oh and http://sexmenu.us
arescorpio has joined #ruby
<Daikan> i thought some of you nerds might know
<Daikan> you mean, you don't know about the porn star ruby?
Daikan was kicked from #ruby by apeiros_ [OT]
Pharaoh2 has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
Daikan has joined #ruby
echevemaster has joined #ruby
startupality has joined #ruby
<mistermocha> jhass: ok, complied with 1-4 ... I really appreciate your patience
* mistermocha will continue to see what he can figure out on his end
<Daikan> sorry
<Daikan> i'm sorry you took offense, there were penty of porn xdcc channels on the dcc search engine
<Daikan> freenode seemed like a big network so i thought it had warez and porn since it was so large
<jhass> mistermocha: mkay, that looks all fine and dandy, you mentioned a Gemfile, would you mind to post the .lock too?
<apeiros_> Daikan: this is not the right channel.
<Daikan> k, where can I get help with what to find on http://pre.corrupt-net.org
<Radar> Yay apeiros_ our saviour
aswen has quit [Ping timeout: 245 seconds]
<jhass> Daikan: how's your ruby going though?
Daikan was kicked from #ruby by apeiros_ [You had been warned]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> aw
<csaunders> probably the same person who was lamer last night
<mistermocha> jhass: ok ... super long
<mistermocha> I wonder if there's anything to be missed from here ...
<jhass> I wanted to ask why they don't code porn search engine in ruby!
<csaunders> haha
<csaunders> wouldn't scale :P
<jhass> who cares!
<mistermocha> beaker-rspec refers to rspec about 200 times
<jhass> csaunders: nobody looks beyond the second result anyway, they could be all fake
<csaunders> haha
bruno-_ has joined #ruby
baweaver has joined #ruby
davidhq has quit [Ping timeout: 244 seconds]
startupality has quit [Ping timeout: 265 seconds]
<jhass> mistermocha: uh, so gonna post the .lock?
bruno- has quit [Ping timeout: 246 seconds]
<mistermocha> jhass: working on it ... it's long
<jhass> huh
Alina-malina has quit [Ping timeout: 265 seconds]
commmmodo has quit [Quit: commmmodo]
HOrangeJewce has quit [Quit: Leaving.]
<jhass> mistermocha: actually nvm, bundle which serverspec would be nice already
<jhass> I think it was bundle which too, I always forget that one
<apeiros_> Radar: you mean our brutal tyrant cop?
<Radar> apeiros_: Yes.
Alina-malina has joined #ruby
<mistermocha> jhass: Could not find command "which".
yfeldblu_ has quit [Remote host closed the connection]
<jhass> ah, see!
<jhass> it's show
<jhass> bundle show serverspec
yfeldblum has joined #ruby
<mistermocha> lolz
davidhq has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
danzilio_ has quit [Quit: Baiii!]
<mistermocha> jhass: ok added Gemfile.lock, but the number of "rspec" gemspecs under beaker-rspec may be wrong ...
<mistermocha> because I'm paging through less
<mistermocha> eh?
razrunelord has joined #ruby
<mistermocha> jhass: Could not find gem 'serverspec'.
<jhass> mistermocha: uh, no serverspec in it?
<jhass> there's your problem!
<jhass> serverspec isn't in your bundle!
<mistermocha> there's the rub ... but wtf!?
<jhass> man, I made that way harder than necessary, sorry
<mistermocha> I copied over the Gemfile from another module
<mistermocha> jhass: that's why I start with the small question ... sometimes just getting the small question hints at the easy answer
<jhass> echo "gem 'serverspec'" >> Gemfile && bundle
juanpablo_ has quit [Quit: (null)]
hcnewsom has quit [Quit: hcnewsom]
juanpablo_ has joined #ruby
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....
justin_pdx has quit [Quit: justin_pdx]
atomi has joined #ruby
Moony22 has joined #ruby
Moony22 has left #ruby [#ruby]
<baweaver> http://www.nostarch.com/wcruby.htm - This is actually a pretty good one
<baweaver> gets to the more practical usages
wldcordeiro_ has joined #ruby
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
<a5i> Anyone else welcome to try to help me on this issue: https://gist.github.com/Ap0ph1s/c5183758645b6a5b3683
<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]