nfk|laptop

Activity Graph

Page 1 of 7 | Next »

2016-04-19

[08:32:59] nfk|laptop: has joined #ruby
[08:33:00] nfk|laptop: has joined #ruby-offtopic
[13:09:52] nfk|laptop: i'm trying to use capistrano for deployment and i'm getting TypeError: no implicit conversion of Symbol into String
[13:10:01] nfk|laptop: is my ruby2.1 too old or what?
[13:11:42] nfk|laptop: so what is going on there?
[13:12:07] nfk|laptop: it's in vendor code so surely many would have hit it if it was a common issue
[13:13:10] nfk|laptop: set :deploy_to, :application
[13:13:14] nfk|laptop: that has to be this
[13:24:44] nfk|laptop: oh god, it requires an absolute path, i'm really starting to hate capistrano
[13:30:08] nfk|laptop: ujjain, what?
[13:30:31] nfk|laptop: oh, right, he did
[18:12:55] nfk|laptop: is it just me or is unicorn slower than rails default webrack?
[18:13:36] nfk|laptop: ACTION yawns
[18:14:23] nfk|laptop: i have been setting up this server for like 10 hours now, mkey?
[18:15:14] nfk|laptop: why must every single piece of documentation ever be never complete and correct?
[18:21:54] nfk|laptop: like capistrano documentation is hopeless
[18:22:00] nfk|laptop: and i'm not the only one saying that
[18:23:16] nfk|laptop: now, if this passes pre-compilation, i might be out of the woods (and we all know what will happen now)
[18:24:00] nfk|laptop: also, i just noticed i'm slowly running out of free space on my 2 GB microSD card backed rasp
[18:27:28] nfk|laptop: pipework, i'm not sure there is one but let's see
[18:27:45] nfk|laptop: yep, i don't think this one has X installed
[18:28:00] nfk|laptop: i mean, the bare minimum for a full raspbian is 4 GB
[18:28:10] nfk|laptop: it's raspbian-lite or something
[18:28:33] nfk|laptop: 2 GB microSD from my 10yo nokia and 512 MB RAM
[18:28:55] nfk|laptop: of course it is
[18:29:09] nfk|laptop: i have 3 right now
[18:29:20] nfk|laptop: but, thanks, i'll keep that in mind
[18:29:32] nfk|laptop: i'm still trying to get it deployed via capistrano
[18:30:19] nfk|laptop: i'm waiting for it to stop doing stuff
[18:30:22] nfk|laptop: we'll see then
[18:30:56] nfk|laptop: it has printed some red text and some failed messages but it's going on
[18:31:01] nfk|laptop: ah, just failed
[18:31:14] nfk|laptop: Mysql2::Error: Access denied for user 'deploy'@'localhost' (using password: YES)
[18:31:21] nfk|laptop: should be working
[18:31:51] nfk|laptop: that is, the later
[18:32:06] nfk|laptop: ENV["DB_PASSWORD"]
[18:32:55] nfk|laptop: weird, why is it defined in bash but not irb?
[18:33:43] nfk|laptop: i'm already using capistrano and nginx for the first time in my life (successfully, anyway) and unicorn, too
[18:33:55] nfk|laptop: i thought i should not push my luck with yet another new software
[18:34:35] nfk|laptop: the issue seems to be that $DB_PASSWORD is set in bash but not irb
[18:34:50] nfk|laptop: pipework, thanks, i'll try it a bit later
[18:35:03] nfk|laptop: in ~/.profile
[18:35:32] nfk|laptop: but it's the environment it runs in
[18:35:40] nfk|laptop: since it logs in via git as that user
[18:35:49] nfk|laptop: and HOME is defined
[18:35:52] nfk|laptop: is there some whitelist?
[18:36:31] nfk|laptop: pipework, i would have used pam authentication but debian being debian obviously is a few years too old for that
[18:37:39] nfk|laptop: and postgres docs did not make much sense regarding use of pam authentication other than adding some worrisome warning even though i had heard that postgres has had that feature for years
[18:52:23] nfk|laptop: wtf, the current folder on server contains old database.yml?!!
[18:58:17] nfk|laptop: i guess if deployment fails, it does not update the symlink or something
[19:06:21] nfk|laptop: pipework, how do i set up a persistent database.yml? stackexchange implied i can just make a shared/config/database.yml but it seems that's not enough
[19:07:51] nfk|laptop: i have app/shared/config/database.yml that i copied from the latest version yet it running cap production deploy errors out with no database.yml error message
[19:08:03] nfk|laptop: since i also git mv'ed it to database.yml.sample
[19:14:06] nfk|laptop: okay, that's it, i'm simply committing the DB password, who cares, if anyone gets that deep that they can even attempt to authenticate against the DB server, they probably have extensive access and are probably a single local exploit away from escalation to full root
[19:18:13] nfk|laptop: that's not jquery being broken, that's assets pipeline being broken
[19:18:18] nfk|laptop: why, no idea
[19:18:56] nfk|laptop: you are doing that in application.js, right?
[19:19:17] nfk|laptop: that's the entry point into JS pipeline as far as I know and the only one (afaik) where that magic works
[19:19:47] nfk|laptop: that channel is nearly as bad as #php
[19:23:25] nfk|laptop: rgb-one, right, angular? you still need application.js where you do your //= require stuff
[19:23:38] nfk|laptop: that or you get to hack into rails assets pipeline
[19:24:23] nfk|laptop: ah, no idea then
[21:22:31] nfk|laptop: alright, now i'm annoyed to no end, i removed a foreign_key that was messing things up and now i'm hitting some weirdness that might be a bug
[22:04:44] nfk|laptop: that's it, to hell with capistrano
[22:04:53] nfk|laptop: i have wasted like 10 hours on this

2016-04-18

[16:01:14] nfk|laptop: has joined #ruby-offtopic
[16:01:14] nfk|laptop: has joined #ruby
[21:56:04] nfk|laptop: Ping timeout: 240 seconds

2016-04-15

[13:42:21] nfk|laptop: has joined #ruby
[13:42:22] nfk|laptop: has joined #ruby-offtopic

2016-04-13

[11:52:31] nfk|laptop: has joined #ruby-offtopic
[11:52:31] nfk|laptop: has joined #ruby

2016-04-12

[11:02:35] nfk|laptop: has joined #ruby-offtopic
[11:02:35] nfk|laptop: has joined #RubyOnRails
[11:02:35] nfk|laptop: has joined #ruby
[11:44:48] nfk|laptop: a question to angular users, what do you use for RESTful API support?
[11:45:16] nfk|laptop: i'm using ngResource for now but quickly feeling like i don't like it
[11:45:59] nfk|laptop: sevenseacat, you don't want to know
[11:48:26] nfk|laptop: sevenseacat, the answer is that angular users mostly write it by hand
[11:54:17] nfk|laptop: sevenseacat, despite your strong opinions, it's a valid question and it's a question that's more important to rails rather than angular users
[11:55:42] nfk|laptop: i already did, rails is RESTful, angular is whatever you make it and i want the opinion of someone who actually uses restufl APIs
[11:59:10] nfk|laptop: wow, #RubyOnRails has gone shitty
[12:00:29] nfk|laptop: i have never even been banned from #python despite how many times i have compared it to ruby there
[12:02:21] nfk|laptop: norc, way back when i was learning C++ that channel was pretty nice
[12:02:31] nfk|laptop: as long as you were willing to listen to what they were saying
[12:03:13] nfk|laptop: anyway, time to grab some food, afk
[12:22:36] nfk|laptop: i wouldn't say similar to whitespace but i definitely prefer the ruby syntax
[12:23:51] nfk|laptop: it just feels much more purposeful to have an end and not just the right number of whitespace, also, iirc, python uses 4 whitespaces by convention and i strongly prefer 2 since i started my modern programming with ruby
[12:25:44] nfk|laptop: anyway, i'd say going from ruby to python is unpleasant but easier than from most other languages
[12:25:56] nfk|laptop: and quite likely easier than from python to ruby
[12:29:06] nfk|laptop: also python feels like a hodgepodge of stuff (i know, 1337 people say that about ruby) which is kinda annoying and even infuriating when python programmers do not understand what you're talking about
[12:30:34] nfk|laptop: does ruby also have defaultdict or is that a python issue?
[12:31:31] nfk|laptop: ah, so it's not the same
[12:32:01] nfk|laptop: with defaultdict in python you can only basically have a dictionary of class instances
[12:32:44] nfk|laptop: which is neat since then you can assume that for example your array of arrays is literally an array of arrays at all times otherwise you need to instantiate every element yourself
[12:33:06] nfk|laptop: Ox0dea, which is why i said it's not the same thing
[12:34:00] nfk|laptop: yeah, except in ruby i never needed defaultdict because of how sexy and cool ruby is and in python you can't pass a block to it, you need to do what you described
[12:34:29] nfk|laptop: as for emulation, you can write a web server in asm, heck, binary works, too, who needs hex
[12:41:20] nfk|laptop: what? not going to be permanent? there, i'll help you myself, sevenseacat
[12:41:24] nfk|laptop: has left #RubyOnRails: ("yawn")
[13:43:56] nfk|laptop: shevy, i actually formulated it after i had to explain why rails instead of php
[13:44:29] nfk|laptop: i actually got my way but i later thought "why not php? why not asm? why not binray?!"
[13:45:02] nfk|laptop: since explaining to someone who has never programmed anything but PHP, JS and C# why Ruby is better is futile
[13:45:17] nfk|laptop: also does not want to program anything but what he already knows
[13:45:59] nfk|laptop: i like ruby as long as it's fast enough for the purpose and has the required bindings
[13:46:51] nfk|laptop: adaedra, i think my fast enough and has the right bindings pretty much implies that it's also the right tool for that purpose
[13:47:28] nfk|laptop: i would never try to write an os in ruby but i also avoid writing any script in anything but ruby unless i must (stupid systemd)
[13:47:46] nfk|laptop: shevy, i thought you meant lisp
[13:48:24] nfk|laptop: shevy, isn't ruby rather lispy under the hood?
[13:50:22] nfk|laptop: and isn't smalltalk a lisp dialect?
[13:50:54] nfk|laptop: whatever, more programming for me, time to kick in the crunch mode
[13:51:50] nfk|laptop: code is my blood, trial and error is my bones, so as i pray, unlimited ruby works
[13:51:53] nfk|laptop: or something
[13:57:07] nfk|laptop: one thing i do not like about programming is how long how little can take
[13:57:33] nfk|laptop: like i just solved a bug from a week ago by only deleting some characters in the right place
[13:57:47] nfk|laptop: it just took me a week to learn enough to know which ones to delete
[13:58:38] nfk|laptop: also, the navigation now works, booya

2016-04-11

[11:50:44] nfk|laptop: has joined #ruby-offtopic
[11:50:44] nfk|laptop: has joined #RubyOnRails
[11:50:44] nfk|laptop: has joined #ruby
[14:39:01] nfk|laptop: Read error: Connection reset by peer

2016-04-08

[10:51:02] nfk|laptop: has joined #ruby-offtopic
[10:51:02] nfk|laptop: has joined #RubyOnRails
[10:51:02] nfk|laptop: has joined #ruby
[11:16:44] nfk|laptop: gaussblurinc1, from the top of my head the DB or something records the last applied migration or something
[11:18:03] nfk|laptop: in practice as long as you haven't done anything funky, you should be able to simply run rake db:migrate on whatever DB you have and it will migrate it to the latest schema; and what more can you ask for?
[11:19:22] nfk|laptop: rvanlieshout, your IP when you make hatespeak online or slander the gov
[11:19:29] nfk|laptop: or so it sounds like
[11:20:22] nfk|laptop: would it not be for filtering out a specific subnet or somesuch?
[11:54:38] nfk|laptop: Ping timeout: 248 seconds
[15:29:03] nfk|laptop: has joined #ruby-offtopic
[15:29:03] nfk|laptop: has joined #RubyOnRails
[15:29:03] nfk|laptop: has joined #ruby
[16:13:04] nfk|laptop: Ping timeout: 264 seconds

2016-04-07

[11:07:37] nfk|laptop: has joined #ruby-offtopic
[11:07:37] nfk|laptop: has joined #RubyOnRails
[11:07:37] nfk|laptop: has joined #ruby
[11:12:49] nfk|laptop: i have a derpy situation, ActiveRecord IDs start from 1 but Angular uses 0 based indexing meaning i need to either program keeping this disrepancy in mind or use Angular IDs in Angular which could then cause issues with maintainability as I can't guarantee that in future foos arrray will not be a subset of all Foos, where only ActiveRecord ID will be easy to devise
[11:18:23] nfk|laptop: rvanlieshout, i don't think i have that luxury
[11:19:17] nfk|laptop: fundamentally i have something like host/#/luser/0 to show which actually does async GET of /user/1.json
[11:20:39] nfk|laptop: the reason is, i suspect, that internally users array is populated from index 0
[11:21:00] nfk|laptop: i could perhaps populate it from 1 and then skip the first everywhere but that sounds like a fucking hack
[11:21:05] nfk|laptop: and a bug heaven
[11:22:08] nfk|laptop: mikecmpbll, as for why, it's because Rails only serves the main and only application.html.erb, assets and then only responds to JSON
[11:22:55] nfk|laptop: so i have something like /#/users/0 path which as you might notice means that the users view is actually under whatever is the main view
[11:23:24] nfk|laptop: mikecmpbll, yes, it does return lusers
[11:24:23] nfk|laptop: mikecmpbll, because everything visitor sees is shown by Angular so it has its own internal models (it's built for PHP world, I guess) and those are based on JS arrays
[11:26:19] nfk|laptop: mikecmpbll, the link comes from angular-ui-router module if that makes you so happy and i do use the ID, it's just i'm using ID-1 to get the correct item
[11:26:50] nfk|laptop: so my Angular code looks like <td><a href="#/students/{{student.id-1}}">{{student.name}}</a></td>
[11:27:50] nfk|laptop: mikecmpbll, the path to JSON, yes, but I need to also generate a path for the Angular and that either means doctoring the URL from Rails or generating them on my own which is what I do right now
[11:28:03] nfk|laptop: and every time i do that, i need to remember to use -1 to generate it correctly
[11:29:06] nfk|laptop: because Rails user User (or Student) and it's 1 based while users (or students) in Angular is 0 based
[11:29:16] nfk|laptop: and they must map 1:1 or very bad things will happen
[11:29:44] nfk|laptop: because Angular was designed that way
[11:30:03] nfk|laptop: it's not really built for Rails but for whatever you like, no backend included
[11:31:04] nfk|laptop: mikecmpbll, i actually posted a sample line some minutes ago
[11:31:16] nfk|laptop: as for full code, i'm not quite allowed to show that much
[11:31:24] nfk|laptop: there's no search right now
[11:31:31] nfk|laptop: but there will be, eventually
[11:32:03] nfk|laptop: mikecmpbll, much like i have a vague idea where an ID gets used in Rails, I have next to no idea where it gets used in Angular
[11:32:28] nfk|laptop: do you know how fuel burs in your car's engine?
[11:32:59] nfk|laptop: i'm not joking, you don't have to know internals to use something
[11:33:31] nfk|laptop: so i only know as much as i have needed to know which isn't much with Rails and basically nothing with Angular as I'm still an utter novice
[11:34:08] nfk|laptop: mikecmpbll, i explained multiple times with examples that the IDs are used for Angular routing
[11:34:34] nfk|laptop: how that routing works is not a question i can answer
[11:36:57] nfk|laptop: rvanlieshout, WHICH PART OF 0 VS. 1 BASED DO YOU NOT UNDERSTAND? Both of you. Angular has unique IDs (at least as long as you don't use find or sort in a controller, perhaps), they're just offset by -1
[11:41:24] nfk|laptop: workmad3, i'm pretty sure i said that's probably the case like half an hour ago
[11:46:11] nfk|laptop: mikecmpbll, thanks for that link but skipping over the whole text, i saw nothing about the issue with index offset
[11:48:49] nfk|laptop: perhaps they did some magic elsewhere or perhaps i messed up or perhaps they messed up, who knows
[11:50:10] nfk|laptop: i do not use array indexes
[11:51:10] nfk|laptop: if i do /students/3 it will do GET /students/3.json
[11:52:45] nfk|laptop: but because for Angular that ID 3 is actually 4th [0,1,2,3], it will effectively fetch the wrong user
[11:52:52] nfk|laptop: err, wrong item
[11:54:36] nfk|laptop: workmad3, i'm doing it in only one place and only because it was showing the wrong student otherwise
[11:55:38] nfk|laptop: workmad3, i can't explain where it comes from but the first student for Angular is /#/students/0 while for rails it's /students/1
[11:56:36] nfk|laptop: imagine if you had to make Rails show the first student as /students/0, that's what I have in reverse
[11:57:15] nfk|laptop: workmad3, i have said before, i can show bits and whatnot but i'm not allowed to publish full code
[11:57:38] nfk|laptop: i can share some code
[11:59:01] nfk|laptop: elaptics, if you knew Angular, I don't think i'd need to show you anything as it's literally the default behaviour afaik, and if you don't, I don't think you'll just hop into it and understand it but I guess maybe I'm just that stupid that i can't do that
[11:59:58] nfk|laptop: epochwolf, i'm not being paid for this, mind you
[12:00:47] nfk|laptop: the fact that the system is dealing with students should have given you a clue that it's for an educational establishment and those aren't exactly know for shelling out big bucks to develop systems, only to buy what's already made at eye watering prices
[12:01:38] nfk|laptop: and funny enough, i'm writing a replacement for one of those systems
[12:01:51] nfk|laptop: epochwolf, a uni has students as well
[12:02:31] nfk|laptop: a school generally won't pay even for excel if it wasn't licensed to them already
[12:07:11] nfk|laptop: btw, have you considered calling yourself deptwolf? :/
[12:07:24] nfk|laptop: or loanwolf?
[12:09:07] nfk|laptop: there's been so many *wolf nicks lately, that i'm always a bit confused at them
[12:09:43] nfk|laptop: i fail to C where that C comes from
[12:10:53] nfk|laptop: perhaps it's just due to me not being a native speaker
[12:11:41] nfk|laptop: thanks but no, i already had my share of unhealthy food
[12:12:13] nfk|laptop: at least it's not epoxy
[12:12:18] nfk|laptop: that would be kinda bad
[13:23:33] nfk|laptop: workmad3, i might have figured out that magic bit, if i do -1 in each controller, it just might work
[13:23:41] nfk|laptop: *each angular controller
[13:32:39] nfk|laptop: rvanlieshout, please understand that Angular has its own model inside it, okay?
[13:32:44] nfk|laptop: same to mikecmpbll
[13:33:53] nfk|laptop: if deleting poses an issue (not that stuff will get deleted, much), i'll think of it then
[13:34:57] nfk|laptop: i'm not using indexes as id, the code is per one of the better angular rails tutorials
[14:29:46] nfk|laptop: workmad3, and you and others were right, deleting a user did break stuff, time to fix it, but first i'm going home, bb

2016-04-06

[11:31:15] nfk|laptop: has joined #ruby-offtopic
[11:31:15] nfk|laptop: has joined #RubyOnRails
[11:31:15] nfk|laptop: has joined #ruby
[11:34:50] nfk|laptop: now this is weird, I have an angular-rails gem and it works but it seems like it's an older version and even weirder trying to google for it only returns angularJS-rails, what's going on?
[11:41:54] nfk|laptop: ah, so for some reason i was using a 3.5 years old gem, gosh
[15:05:31] nfk|laptop: Ping timeout: 244 seconds

2016-04-05

[16:00:57] nfk|laptop: has joined #ruby
[16:00:58] nfk|laptop: has joined #ruby-offtopic
[16:00:58] nfk|laptop: has joined #RubyOnRails
[18:35:22] nfk|laptop: Ping timeout: 244 seconds

2016-04-04

[12:53:54] nfk|laptop: has joined #ruby-offtopic
[12:53:54] nfk|laptop: has joined #RubyOnRails
[12:53:54] nfk|laptop: has joined #ruby
[15:01:51] nfk|laptop: Ping timeout: 246 seconds

2016-04-01

[13:21:48] nfk|laptop: why would it not be weird?
[13:23:04] nfk|laptop: i'm not even going to waste my time on reading up what onus means
[13:24:26] nfk|laptop: sevenseacat, i am being civil
[13:24:49] nfk|laptop: i just honestly said that i'm not spending like half a minute to wiki some fancy word
[13:25:48] nfk|laptop: it better not mean "the burden is on you" as i inferred
[13:25:56] nfk|laptop: ah, so i was right, wasn't it?
[13:26:03] nfk|laptop: see, waste of time
[13:27:28] nfk|laptop: こちらこそ
[13:29:02] nfk|laptop: apeiros, why?
[15:09:25] nfk|laptop: Ping timeout: 244 seconds