#ruby - 14 October 2017
« Back 1 day Forward 1 day »
[02:50:56] RickHull: specifically, I want to run rocco on e.g. master branch. this drops an .html file on the filesystem. ideally, it would go to the gh-pages branch and be easily published and go live
[02:51:51] RickHull: i can't think of a good way for e.g. a rake task to operate on/within the master branch, and yet have an output of that rake task make changes on the gh-pages branch
[02:54:15] RickHull: you could do it with `git merge` I suppose, but it's kinda weird since gh-pages isn't *really* a branch off master
[02:55:15] elomatreb: Operate on master, move the result out of the way, checkout gh-pages, commit, checkout master again? Hacky though
[02:56:34] RickHull: it's especially gnarly because any automation tricks (e.g. Rakefile) get blown away by switching branches
[02:57:46] RickHull: if not, i'll probably just delete the gh-pages branch and send rocco's output directly to my username.github.io repo
[02:58:39] elomatreb: I think that's better IMO, mixing branches that actually don't have anything directly to do with a software into the repo seems like bad practice to me
[03:12:54] RickHull: I think that's a relatively newer feature; either you publish everything under master, or everything under master's docs/ subdir
[08:35:06] ruby[bot]: impermanence: "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
[10:20:15] morfin: as example i has some TOC in the beginning of file and then N blocks(every block could have different size) i can mmap, read TOC and then access any block i need
[13:47:58] jnj: Hey guys I'm having issues install ffi. I did just get a brand new laptop and I'm running linux mint, so I think I may be missing some basic stuff that I need.
[13:48:23] jnj: I keep on getting an error saying "unable to make makefiles", but I already have gcc installed
[13:54:04] jnj: jhass: nice timing, I was just looking at it. At the top I have "package configuration for libffi is not found"
[13:56:21] jnj: jhass: Now when trying out sudo gem install ffi I get the error: No such file or directory - getcwd
[14:05:32] jhass: all I can find on the net on this error is people that messed with their working directory in another shell :P
[14:12:32] jnj: jhass: I had a feeling it was just me missing some C packages, I assumed that build-essential was already installed
[14:14:46] jnj: jhass: Same tbh. I'm trying to install github-pages now too but it says I do not have zlib. Do you what zlib is called in apt-get?
[14:17:30] jnj: jhass: Huh, I can't find it. I'm just following the instructions here: https://geeksww.com/tutorials/libraries/zlib/installation/installing_zlib_on_ubuntu_linux.php
[14:21:01] jhass: well this kind of stuff is largely personal preference, but it's incredibly stable for my type of usage, I even run it on all my personal servers by now
[14:22:10] jhass: the main advantage I see is that the packaging system is so easy to learn, I never have to do that terrible sudo make install from that "tutorial" you linked anymore :P
[14:23:02] jnj: I recently bought a used thinkpad t530 and I love it. I got it for $425 it has 8gb ram, ssd, and an i7 quadcore processor - things a beast!
[14:23:19] jnj: jhass: I've thought about learning arch in the future, that level of configuration is sort of what I really like
[14:24:03] jhass: yeah, definitely worth if you want to understand the linux stack/know how your system comes together without going all LFS
[14:24:23] jhass: if you just want it for the package manager and maybe the rolling release though go with antergos
[14:33:32] cagmz: what's the difference between these 2 Ruby methods? I don't understand why you would make this change. https://hastebin.com/tisapukoju.rb
[14:35:40] matthewd: cagmz: They behave differently (on the second+ call) if get_bar returns nil or false
[14:38:21] cagmz: matthewd, so in `foo`, `get_bar()` may return nil and assign it to @bar? where as in `other_foo`, once we get a non-nil value from `get_bar()` and assign it to `@bar`, we "protect it" by returning early if it is defined?
[14:39:37] cagmz: actually, that still doesn't make sense. in `foo`, we can get a non-nil value from `get_bar()` and on the second call, @bar would not be redefined by `get_bar()`
[14:40:27] cagmz: because it is already defined? I thought ||= only redefines a variable if the variable is falsey
[14:41:36] cagmz: on the first call to `foo`, `@bar` can be assigned a non-nil value by `get_bar()`. then on the second call, since `@bar` is already defined, `get_bar()` would not be called again. as far as I understand, anyways
[18:10:24] impermanence: I have a one-liner that is returning a value that is double-quoted. I'm trying to then pass this value to a hash, but it doesn't correctly access the hash I suppose to the double quotes around my value. Where am I going wrong here?
[18:16:33] impermanence: k, well change my hash keys to double-quoted instead of single has done the trick so far...