kiki_lamb

Activity Graph

Page 1 of 2 | Next »

2018-09-20

[01:00:40] kiki_lamb: *.net *.split

2018-07-20

[00:07:15] kiki_lamb: *.net *.split
[00:15:40] kiki_lamb: has joined #ruby

2018-07-10

[02:19:25] kiki_lamb: Ping timeout: 260 seconds
[02:24:02] kiki_lamb: has joined #ruby

2018-05-29

[02:47:05] kiki_lamb: *.net *.split
[02:48:07] kiki_lamb: has joined #ruby

2018-05-07

[13:11:10] kiki_lamb: *.net *.split

2018-04-25

[12:26:05] kiki_lamb: *.net *.split
[12:27:22] kiki_lamb: has joined #ruby
[15:01:37] kiki_lamb: *.net *.split
[15:03:32] kiki_lamb: has joined #ruby

2018-04-06

[03:38:17] kiki_lamb: has joined #ruby
[03:38:37] kiki_lamb: Is there an active, modern CLR implementation of Ruby? IronRuby looks long dead.

2017-04-19

[00:01:00] kiki_lamb: Quit: leaving

2017-03-23

[23:34:37] kiki_lamb: has joined #ruby

2017-03-13

[04:35:53] kiki_lamb: has joined #RubyOnRails
[04:37:09] kiki_lamb: In routes.rb, in a call to 'match', can I artificially add extra parameters to the controller method being called?
[04:37:58] kiki_lamb: i.e., say I already have "match 'something/:id' to: 'thing#something'"...
[04:38:33] kiki_lamb: can I have "match 'something_special/:id', to: 'thing#something', params: { special: true }", or something along those lines?
[04:42:23] kiki_lamb: _3dwardsharp: cool, i'll search for that, thanks

2016-06-26

[01:32:37] kiki_lamb: has left #ruby: ()
[01:32:39] kiki_lamb: has left #RubyOnRails: ()

2016-06-10

[03:14:24] kiki_lamb: Quit: leaving
[03:14:42] kiki_lamb: has joined #RubyOnRails
[03:14:42] kiki_lamb: has joined #ruby

2016-06-06

[19:24:52] kiki_lamb: Quit: leaving
[19:25:36] kiki_lamb: has joined #RubyOnRails
[19:25:36] kiki_lamb: has joined #ruby

2016-05-12

[14:25:00] kiki_lamb: Ping timeout: 276 seconds
[14:25:16] kiki_lamb: has joined #ruby
[23:28:57] kiki_lamb: Ping timeout: 250 seconds
[23:29:56] kiki_lamb: has joined #ruby

2016-02-27

[22:40:57] kiki_lamb: Ping timeout: 240 seconds
[23:04:59] kiki_lamb: has joined #ruby

2016-02-21

[04:55:23] kiki_lamb: Ping timeout: 250 seconds
[04:56:11] kiki_lamb: has joined #ruby

2016-02-18

[20:12:04] kiki_lamb: Ping timeout: 255 seconds

2016-02-17

[09:52:50] kiki_lamb: *.net *.split
[09:53:08] kiki_lamb: has joined #ruby

2016-01-31

[12:25:17] kiki_lamb: *.net *.split
[12:29:17] kiki_lamb: has joined #ruby

2016-01-30

[01:04:03] kiki_lamb: *.net *.split

2016-01-20

[13:56:08] kiki_lamb: *.net *.split

2015-12-13

[19:35:51] kiki_lamb: *.net *.split
[19:35:57] kiki_lamb: has joined #RubyOnRails
[19:36:01] kiki_lamb: has joined #ruby

2015-11-26

[19:01:54] kiki_lamb: *.net *.split
[19:08:06] kiki_lamb: has joined #ruby
[19:08:09] kiki_lamb: has joined #RubyOnRails

2015-11-24

[01:06:40] kiki_lamb: has joined #RubyOnRails
[01:07:35] kiki_lamb: Hey, is there any easy way to make the inspect method on ActiveRecord produce prettier output? Like, with newlines and indentation after commas and collection braces, etc.
[01:08:06] kiki_lamb: FailBit: sure, just seems like something that may well already exist in an option or a gem somewhere.
[01:12:25] kiki_lamb: sevenseacat: ooh, that looks like exactly what I want, i'll try it out
[01:23:33] kiki_lamb: Radar: looks like a view helper? i'm wanting this in the console, so I'm giving awesome_print a go
[01:41:10] kiki_lamb: Radar: *nods* keep hearing people mentioning pry in different contexts, i'll have to try it at some point. for now though, i've got a bug to fix and awesome_print's doing the trick, so I'm just gonna keep working for now :)
[07:46:32] kiki_lamb: Tryna remember how to enumerate only those instance methods explicitly defined in a class (not those inherited from ancestors), can someone remind me?
[22:47:31] kiki_lamb: Hey, maybe someone could help me avoid doing something ugly here... I'm sure there must be some really elegant query to group these records into three sets, as shown, but I'm having trouble working the query out in my head -> https://gist.github.com/kiki-lamb/1842c53bb9294a603d49

2015-11-23

[22:25:55] kiki_lamb: given a block like this { x = calculate_x; nil }, is there a way of either #1. causing 'x = ' to act like 'self.x = ' or option #2. scraping the loal variable x out of the context somehow after executing the block?
[22:27:50] kiki_lamb: i'm implementing a DSL, and in this DSL it would be convenient if the user of the DSL could pass blocks to objects that assign to their attributes without having to write self all over the place
[22:28:30] kiki_lamb: the DSL is for livecoding (performing music by editing the source code that's making it as it plays), so tersity is a paramount concern
[22:28:48] kiki_lamb: norc_: yeah, I may end up using 'x! foo'.
[22:29:17] kiki_lamb: jhass: yeah, these blocks are being instance eval-ed by the relevant objects
[22:29:52] kiki_lamb: I'll either go with 'x!' for assignment or stick 'self.' on the front in the preprocessor, i suppose
[22:30:51] kiki_lamb: hightower4: lookahead with a backreference, maybe?

2015-11-21

[02:19:04] kiki_lamb: Write error: Broken pipe

2015-11-20

[04:36:02] kiki_lamb: Anyonne familiar with the 'Modularity' gem? I've been playing with it, I notice it hasn't been updated in a couple of years... is it dead, has it been replaced, or is it just good enough as is?
[04:40:25] kiki_lamb: droptone: i dunno, for multi-year old gems, i've seen a pretty even split between 'dead' and 'replaced by something better', just curious which it is in this case
[04:41:27] kiki_lamb: cause, you know, if it's the latter case, I should go play with that instead.

2015-11-18

[02:24:08] kiki_lamb: What's the simplest way of inquiring whether an object can be .dup-ed?
[02:25:32] kiki_lamb: .respond_to?(:dup) doesn't seem adequate - nilclass responds true, but then throws 'can't dup nil' if you try.. fixnums don't exen have .respond_to? available.
[02:41:40] kiki_lamb: jhass: yeah, i looked back and i mistyped my respond_to? check on fixnum, sorry. Hmm, okay... so I should basically just go with 'o.dup rescue o'.
[02:48:46] kiki_lamb: jhass: i'm writing some attribute helper methods for a set of classes, which accept an optional default. if the default is mutable, like a hash, we need to dup it so that instances don't end up sharing references to the same default object... but for other default values, like integers or boolean values, we don't need to call dup, and just want to pass the value straight to instance_variable_set to set the underlying storage variable.
[02:50:50] kiki_lamb: jhass: if you're interested, specifically, I'm working on the first method shown in this file, into which i've just stuck a 'default.dup rescue default' expression on line 15 -> https://github.com/kiki-lamb/drumtool/blob/devel/lib/drumtool/models/bubbles/traits/klass.rb
[02:58:57] kiki_lamb: jhass: makes sense. is there anything particularly wrong with the rescue version, though? I'm already using my block parameter for an &after Proc that happens after the setter sets, and it's a little easier on the eye for this method's user to just pass a value instead of a big cumbersome Proc.new { value }.
[03:03:32] kiki_lamb: Okay... the likely defaults are pretty much all stdlib items or classes I'm writing, so it's probably alright.
[03:04:10] kiki_lamb: Yeah, I considered that - the only case I can think of, so far, where sharing a default makes for these atrribute would be when the default is a Module or Class.
[03:04:36] kiki_lamb: So, on that basic I've revised the expression to: (Module === default ? default : (default.dup rescue default)))
[03:07:07] kiki_lamb: I can't think of another situation where sharing state would make sense for these. They're arranged in a tree structure, and behaviour covering when they should access each others state is already implemented (and working well) elsewhere, so sharing state via shared default objects seems at best unnecessary and more often than not a source for cconfusion and errors.
[03:09:41] kiki_lamb: Plus, these aren't really used to hold a mutating state over time, so any benefits related to that are moot. Once the objects have been built, they're essentially used as is, the only thing that's mutated over time after building them is literally a single Fixnum counter value on the topmost scope.
[03:15:33] kiki_lamb: (these 'bubbles' are essentially nodes in an AST created from the program's DSL, which is, at the moment, purely declarative and does not include mutable states... mutable states will probably be added in the future, but when that happens the DSL's AST and it's current program state will likely be held in separate objects, since, in addition to mutating state while keeping the same AST, here we're actually also going to need the ability to rebuild the
[03:18:10] kiki_lamb: it's a livecoding tool for performing music, so being able to update the code while it's running is kind of the entire point... mutable state would only be useful here if I can continue to update the program's code during execution without destroying that state. :) fun stuff.
[07:26:02] kiki_lamb: How can I ask a class what it's instances respond to without instantiating one?
[07:33:49] kiki_lamb: Mon_Ouie, norc: perfect, makes sense... thanks, I'll give it a go. :)
[07:39:16] kiki_lamb: So... if instance_methods walks the tree for me, then that's probbly a simpler way to do it than method_defined?, it sounds like.
[07:40:34] kiki_lamb: Mon_Ouie: okay, so norc's original comment that I'd have to walk the ancestors chain was incorrect?
[21:59:58] kiki_lamb: Hey, I've noticed that when I use Object.send(:remove_const,blah) to undefine a class and then re-load, it's instances seemingly retain their old behaviour. Is there a way to have the instances adopt the behaviour of the reloaded class?
[22:40:25] kiki_lamb: Ox0dea: okay, so if I decide to actually try doing this i'll go with anon classes, then.
[22:40:53] kiki_lamb: Ox0dea: also, thanks, you always have really good answers to my perverse questions, heh.
[22:43:14] kiki_lamb: Ox0dea: this question's not immediately applicable to any particular problem I'm having, it's more just speculation at this point.
[22:47:39] kiki_lamb: hahah. you might recall, i'm working on that drum livecoding thing... so, I'm sitting there working on it, editing code in one pane and watching it's output scroll in another, hammering the save button in the text editor and then tabbing over to the other pane to start/stop my tool every minute or two to see the result of the changes I just made...
[22:48:08] kiki_lamb: soo, the thought had occured to me that i could save a lot of starting/stopping of the tool if I just made it undefine and reload half it's class structure on every clock tick. :P
[22:48:45] kiki_lamb: but apparently this is not that practical, and as that behaviour has no serious value in the finished product, it's not worth putting a lot of work into, I suppose.
[22:51:00] kiki_lamb: Ox0dea: eh, I've already got enough weird fun things to implement for the end use without sinking a lot of time into writing things solely useful for my own use during development
[22:51:59] kiki_lamb: i mean, really, in practical terms, i can basically get the effect i want on that front by setting my program to play 1 bar and then die and wrapping it in a bash while loop
[22:52:43] kiki_lamb: Ox0dea: well... clearly not very exclusive, given the nature of what i'm making in the first place
[22:55:34] kiki_lamb: spaceghost|work: hahah, I can only handle so many layers of nuttiness at once.
[22:57:08] kiki_lamb: if the goal is merely saving me some hammering of 'C-cC-c!!\n' in bash, a while loop suffices, and lets me focus all the nuttiness at the heart of my actual program, where it belongs.
[22:57:54] kiki_lamb: spaceghost|work: oh, sure, i'm definitely not saying it's bad. from a cursory glance, it looks like i could probably use this to reimplement the loader class I use to read this thing's input language more cleanly.
[22:58:20] kiki_lamb: but, for now, that component is working fine and I have a long list of fun and useful features to add elsewhere before revisiting it.
[23:00:14] kiki_lamb: maybe someday, sure. one day the loader will be visited, and some of that stuff could probably be handy.
[23:04:59] kiki_lamb: right now though, i've got a full plate: more advanced loop manipulation features, MIDI CC events, 'multiplayer mode', nodes that evolve on their own over time and figuring out how to produce some event models based on more complex math, like geometry and physics simulations, are all currently higher on the list than tampering with the loader.
[23:06:40] kiki_lamb: i've got some ideas for some genetic algorithm like behaviour to toy with too, once i've got the randomly mutating nodes
[23:06:43] kiki_lamb: shevy: nah, music tool
[23:08:48] kiki_lamb: right now it basically just lets you write interesting drum beats a lot more quickly, but if I manage to implement all those features it should be able to do about 80% of the composition required to produce a fairly decent techno tune with little more than a gentle nudge.

2015-11-16

[02:50:54] kiki_lamb: Request: Can someone please recomemnd me a parsing gem? I've done lots of parsing in other languages, just not in ruby, so i'm not sure what gem to look for.
[02:51:49] kiki_lamb: Yes, I want to parse a language of my own.
[02:52:02] kiki_lamb: kk, i'll look at that one.
[02:53:38] kiki_lamb: My language is currently implemented as a ruby DSL with some preprocessing applied to the source file first, but that's becoming restrictive as it gets more complex, so i'd like to replace the preprocessing stages with a legit parser.
[03:02:00] kiki_lamb: Ox0dea: what's that number for? >_>
[03:02:30] kiki_lamb: derp, lol, i didn't try to read it as leetspeak. okay.
[03:04:02] kiki_lamb: And yeah, gonna need it soon enough... for now, the input files are simple enough that I can get away with preprocesing the source to make valid Ruby out of it, but some of the features i've got planned will warrant more complex syntax that I'm dreading the idea of handling with the preprocessor
[03:04:16] kiki_lamb: example input file for the current syntax -> https://github.com/kiki-lamb/drumtool/blob/master/input/sample.dt
[03:08:55] kiki_lamb: Ox0dea: neat, citrus looks like it'll proabably do the trick.
[03:11:58] kiki_lamb: Ox0dea: i feel like i'm gonna push up the limits of that really quickly, though
[03:13:37] kiki_lamb: Ox0dea: like, on should be able to (and currently) does accept any mixture of things that are valid arguments to it, not just if they're all the same type... like, 'on 8 %3 %x10 { t < 8 && some_arbitray_method }' needs to be valid
[03:15:25] kiki_lamb: hahah, i suppose
[03:17:01] kiki_lamb: some of the arguments don't syntactically look like any valid ruby object in the raw source, though, so somewhere along the line, something needs to make them into something valid (currently, the preprocessor is what does this)
[03:17:15] kiki_lamb: like, '%x10' is kind of just nonsense in pure ruby
[03:17:58] kiki_lamb: right now, the preprocessor will take that and transform it into 'Proc.new { |t| t % 0x10 == 0 }'
[03:20:51] kiki_lamb: Ox0dea: hahah, I tried.
[03:21:20] kiki_lamb: example of preprocessor output, and some output as it spits out some MIDI -> https://gist.github.com/kiki-lamb/4e4eb27e0eea970feb09
[03:24:58] kiki_lamb: well, the output of the preprocessor is run as a DSL inside ruby
[03:25:20] kiki_lamb: it's just a little ungainly for live manipulation
[03:26:17] kiki_lamb: most of the preprocessing is in the name of tersity, since this is intended for livecoding - i.e., the idea is to be able to perform music live by manipulating the source code in real time as it plays
[03:26:25] kiki_lamb: so every character saved, the better
[03:27:04] kiki_lamb: hence why the preprocessor implements stuff like indentation-defined blocks, abbreviations for all the keywords, shortcuts for trigger proc definitions, indentation-defined multiline comments, etc.
[03:27:54] kiki_lamb: all those features are, basically, making the input code shorter so that you can change things more quickly while performing
[03:30:25] kiki_lamb: There are some things there I should move in each direction, though, probably
[03:30:46] kiki_lamb: like, the abbreviation handling could probably occur inside the DSL via method_missing instead of in the preprocessor
[03:31:39] kiki_lamb: and there are parts of the block handling that should maybe move the other way
[03:34:48] kiki_lamb: cool, I'll take a look. I don't mind taking inspiration/ideas from other peoples stuff, but I still wanna build my own :)
[03:37:16] kiki_lamb: I'm one of those people that's kind of wary using tools that I don't feel like I understand well, and in the past when I've encountered other peoples livecoding tools, they're usually 'big' enough that I don't feel like I really know what's going on.
[03:37:40] kiki_lamb: Even if you tech me how to spit some notes out, I'm still gonna be wondering how doing (insert steps) actually results in notes coming out the other end
[03:38:24] kiki_lamb: Part of the enjoyment I've been getting from playiwng with my own tool (hah) comes from having a complete understanding of the entire process that's occuring
[03:38:47] kiki_lamb: It's nice to be able to, in my head, break down every single step that happens between me typing in an expression and a MIDI note being shot out the other side.
[03:40:45] kiki_lamb: sure, but a lot of the hidden complexity can be dismissed as 'implementation details of the surrounding programming environment', it's stuff that's kind of outside the actual high level problem domain
[03:47:37] kiki_lamb: Ox0dea: ooh, but this item, also in overtone's github, I might steal or borrow from -> https://github.com/overtone/emacs-live
[03:48:13] kiki_lamb: Right now I'm just hammering the save keychord a lot >_>
[03:49:40] kiki_lamb: and mode-switching is for people with two much time on their hands :)
[05:29:00] kiki_lamb: Is there a method for enumerables that's in between .any? and .all? Specifically, I want to know whether my condition applies to more than one of the things in the enumerable.
[05:29:25] kiki_lamb: So, something like .two? or .multiple?, i guess
[05:29:56] kiki_lamb: .select and .count seems like overkill, we don't really need to study the whole collection, i'd have my answer on the second match
[05:34:24] kiki_lamb: ah-hah, .any? and ! .ony?
[06:33:47] kiki_lamb: is there a smarter way of writing [*args].flatten(1)?
[06:35:47] kiki_lamb: hm, maybe i shouldn't have called my example variable args, sorry
[06:35:57] kiki_lamb: this is actually being done to values in a **opts hash
[06:37:01] kiki_lamb: like, i want myfunc(b: 1) and myfunc(b: [1]) to mean the same thing while also acccepting myfunc(b: [1,2,3]), so I'm doing this to the values.
[06:42:18] kiki_lamb: >> def xx *a; Array(a); end; xx [1,2,3] # djellemah
[06:42:23] kiki_lamb: ^ shouldn't that work, then?
[06:47:41] kiki_lamb: Ox0dea: yeah... the behaviour I want is 'foo 1 => [1]', 'foo 1, 2 => [1,2]', 'foo [1,2] => [1,2]', though..
[06:49:25] kiki_lamb: Ox0dea: in this case, yes.
[06:49:57] kiki_lamb: Well... there's no scenario in which it makes sense to pass this method anything other than a 1 dimensional array of items.
[06:53:53] kiki_lamb: Ox0dea: why sholdn't the method's user be able to omit the array braces for single items, though? Like, what's the harm in providing this convenience?
[06:54:08] kiki_lamb: Rails does it all the time, why shouldn't I?
[06:55:07] kiki_lamb: for example, in a Rails app's routes file, 'match ':controller/:action/:id', via: [:get]' means the same things as match ':controller/:action/:id', via: :get'. That's what I want here.
[06:56:35] kiki_lamb: Well, you can't flatten :get, in that second example.
[06:58:38] kiki_lamb: Ox0dea: I was attempting to, but I don't have to, if there's a better way of achieving that.
[07:01:07] kiki_lamb: Ox0dea: just the first two, [[1]] would be an unsupported argument here.
[07:01:14] kiki_lamb: I guess this is what I want:
[07:01:19] kiki_lamb: >> def this **opts; Hash[opts.map { |k,v| [k, Array(v)] }]; end; this a: 1, b: [1,2]
[07:05:25] kiki_lamb: Ox0dea: i guess the problem was that I was trying to use a splat on the wrong argument, since I was initially trying a block like { |*v| [*v] }
[07:05:38] kiki_lamb: when it turns out I needed one like { |v| [*v] }

2015-11-14

[05:10:30] kiki_lamb: Quickie question: let's say I have a method, and someone's going to pass a class to it as an argument. Is there a way I can inquire about the arity of that class's initialize method?
[05:13:13] kiki_lamb: shevy: let's say they're passing a class though, not a proc

2015-11-12

[04:24:53] kiki_lamb: So... if I feel like I want what would, in C++, be private inheritance, then in Ruby I probably wanna just use composition instead, right?
[04:25:16] kiki_lamb: or, rather, just make a different class delegating as needed to the class i want to, in theory, privately inherit from?

2015-11-10

[11:34:51] kiki_lamb: if my class has both an cluded module and a parent class, both containing an initialize method, how do I control which one I am calling with super in my own class's initialize method?
[11:35:00] kiki_lamb: 'an included'
[11:39:40] kiki_lamb: suchness: if i'm reading that right, there's no way to ensure both intializers are called, assuming the module and parent class don't know about each other
[11:40:07] kiki_lamb: sounds like super will hit the included module, and the parent class's initialize will never be called?
[11:42:55] kiki_lamb: seems like for that to work properly, the module would need to know something about the parent class
[11:47:01] kiki_lamb: right now i've got something like 'class Instruments < Hash; include TimingScope; ...; end'. Each Instruments needs to initialize it's parent Hash with certain arguments, but it also needs to do the same with it's TimingScope.
[11:47:33] kiki_lamb: there are plenty of other classeds including TimingScope that are not descendents of Hash, so having TimingScope initialize the Hash seems impractical
[11:47:36] kiki_lamb: blubjr: yup
[11:48:17] kiki_lamb: ^ figured that was kind of implied, but yeah
[11:48:58] kiki_lamb: suchness: so, for my snippet there, is there any possible way for Instruments (not it's included TimingScope) to initialize it's parent Hash?
[11:50:50] kiki_lamb: norc: maybe under the hood, sure.. but from a language user perspective, though, they're integrated into the method argument system and at any given time they're a character or two of sugar away from being the same as any typical Proc argument.
[11:51:06] kiki_lamb: suchness: 'class Instruments < Hash; include TimingScope; ...; end'
[11:53:27] kiki_lamb: blubjr: definitely. once you get to the point where you're building your own little task specific DSLs you'll find that often half the arguments you're dealing with are blocks.
[11:58:12] kiki_lamb: norc: sure, just not something you have to think about a lot as a user, given how trivial it is to box/unbox them in Procs

2015-11-08

[02:32:38] kiki_lamb: Hey all, I just saw '*' on it's own, as the entirety of a methods arguments, for the first time the other day and I'd like to know exactly how this works... where is it documented?
[02:33:16] kiki_lamb: I'm talking about constructs like : def a_method *; super; end
[02:33:56] kiki_lamb: Ox0dea: so it just accepts any combination of args without naming them, that's all there is to it?
[02:34:08] kiki_lamb: cool, thanks
[02:41:18] kiki_lamb: Ox0dea: cool, thanks

2015-11-07

[07:41:32] kiki_lamb: Which implementation or eRuby does Rails use by default?
[07:47:22] kiki_lamb: sevenseacat: what does it normally use then, to render .erb files?
[07:49:32] kiki_lamb: okay, that's promising... thanks
[07:51:43] kiki_lamb: I'm working on a custom template handler for ActionView to render RTF files, which explicitly uses Erubis, and I'm seeing that trying to do certain things that would normally be okay in, say, .html.erb / .txt.erb files are causing problems. If those are normally Erubis, then that means there probably should be a way to get it to do what I want...
[07:53:39] kiki_lamb: Specifically, what I'm running into is that things are mostly working, and embedding single line expressions in the <%= tags works fine. But, when I try to do multiline expressions, like, say, anything taking a lengthy block, Erubis seems to be trying to eval/execute that line of code in isolation, resulting in a syntax error.
[07:54:08] kiki_lamb: Presumably, there's something somewhere I can toggle to get it to handle multiline expressions properly
[07:55:27] kiki_lamb: basically, Erubis taked my expression and renders it into nonsense like this that it can't eval:
[07:55:30] kiki_lamb: SyntaxError ((erubis:2: syntax error, unexpected ')': _buf << ( with_tabs(2000) do ).to_s; _buf << '\\b '; _buf <...
[08:10:41] kiki_lamb: basically, Erubis taked my expression and renders it into nonsense like this that it can't eval:
[08:10:47] kiki_lamb: whoops, sorry for repeat.
[08:26:34] kiki_lamb: basically, Erubis taked my expression and renders it into nonsense like this that it can't eval:

2015-11-02

[04:52:48] kiki_lamb: Quit: leaving
[04:53:29] kiki_lamb: has joined #ruby
[04:53:29] kiki_lamb: has joined #RubyOnRails

2015-10-31

[04:59:26] kiki_lamb: Quickie question: are 'x.try(:y).try(:z)' and 'x.try { y.z }' equivalent, or not? My guess is not...
[04:59:46] kiki_lamb: like, the latter will still toss a NameError if the result of x.y doesn't respond to z, right?
[05:25:50] kiki_lamb: DylanJ: hey, i played with it a bit... it actually looks even worse, it'll even throw a NameError on y. So it's actually more equivalent to 'x.y.z unless x.nil?'
[05:26:15] kiki_lamb: no protection against methods that aren't respond_to?-d at all. :/

2015-10-29

[18:39:15] kiki_lamb: How can I control whether ERB uses HTML escaping for special characters for a particular MIME type?
[18:39:57] kiki_lamb: I've registered text/richtext so that I can have .rtf.erb files, but it's trying to escape special characters as if this were HTML, I want to turn that escaping off.

2015-10-27

[19:40:39] kiki_lamb: Is there a way to completely disable HTML escaping in views for a particular extension (or MIME type)? I'm trying to make .rtf.erb files and don't want it to do any HTML escaping in them at all.

2015-10-20

[07:19:36] kiki_lamb: has joined #RubyOnRails
[07:19:53] kiki_lamb: Is there a non-shitty template handler to make RTF output?

2015-10-18

[05:02:55] kiki_lamb: *.net *.split

2015-10-16

[00:19:54] kiki_lamb: has joined #RubyOnRails
[00:20:28] kiki_lamb: has joined #ruby

2015-10-06

[20:43:47] kiki_lamb: *.net *.split
[20:46:18] kiki_lamb: has joined #RubyOnRails
[20:46:21] kiki_lamb: has joined #ruby

2015-09-17

[01:10:20] kiki_lamb: So, I've got a rails app and now I want to be able to encrypt/decrypt some string using AES. What's the quickest/simplest way for me to start encrypting/decrypting some strings? Like, is there a built in library I should look at or is there a gem that I should use?
[01:12:19] kiki_lamb: astrodog: shouldn't really matter, should it? but for argument's sake, let's say small-ish bits of YAML between say, 20-60 characters.
[01:14:52] kiki_lamb: astrodog: sure... from what i've read, AES should probably fine, I'm mostly looking for a recommendation as to whether there's a particular library I should look at to use for it.
[01:16:52] kiki_lamb: I just need encryption here
[01:18:41] kiki_lamb: basically, all I'm really trying to do here is encrypt some expiration dates and other boring details about what features are enabled into the activation codes for a piece o software we sell
[01:19:25] kiki_lamb: I don't need anything special activerecord wise, i really just need crypt/decrypt methods that take the key and the string and encrypt/decrypt it
[01:22:35] kiki_lamb: i was just gonna put a checksum in the encrypted string, which shouldn't come out right if they decrypt with the wrong key. this doesn't have to be super-secure stuff anyhow, a serious cracker would have no problems bypassing our copy protection, it's just here to deter casual tampering.
[01:23:19] kiki_lamb: we already have that sort of checksum-ing code in the applications current copy protection code, so reusing it is easy.
[01:24:22] kiki_lamb: okay... you don't have a recommendation as to what library you'd use for the AES crypt/decrypt themselves, though?
[01:26:50] kiki_lamb: astrodog: it's < 50 characters of data, and it would be great if the cipthetext wasn't too much longer
[01:29:21] kiki_lamb: unique ones for each installation of the software product
[01:31:19] kiki_lamb: in our existing copy protection scheme, the product it generates a 'request code' hash based on various properties of the host PC, and that hash is mangle/hashed again in various ways to produce the activation code to unlock the software.
[01:32:01] kiki_lamb: my boss likes code reuse, so I'm going to use the string that would previously have been the activation code in the old system as the AES key in the new one
[01:34:33] kiki_lamb: if they reverse engineer the process we use to generate the activation code from the request code, then sure.
[01:35:06] kiki_lamb: but that's good enough for us, this is just to deter casuals. any serious hacker has a bunch of easier ways of getting around this anyhow.
[01:35:39] kiki_lamb: like, it'd be easier to scrape the expected code from memory on the client side, or just patch the binary to jump past the copy protection check
[01:36:23] kiki_lamb: cool, i'll look at that.
[02:22:34] kiki_lamb: astrodog: kinda looks like rbnacl hides the underlying algorithm? Like, the examples I'm looking at don't show any explicit reference indicating it's gonna use AES...

2015-09-09

[06:04:28] kiki_lamb: Ping timeout: 252 seconds
[06:05:31] kiki_lamb: has joined #ruby
[06:05:31] kiki_lamb: has joined #RubyOnRails

2015-07-26

[11:05:58] kiki_lamb: *.net *.split
[11:08:05] kiki_lamb: has joined #RubyOnRails
[11:08:06] kiki_lamb: has joined #ruby

2015-07-19

[01:20:33] kiki_lamb: Ping timeout: 256 seconds
[01:22:13] kiki_lamb: has joined #RubyOnRails
[01:22:14] kiki_lamb: has joined #ruby

2015-07-11

[02:22:33] kiki_lamb: Ping timeout: 256 seconds
[02:24:11] kiki_lamb: has joined #ruby
[02:24:11] kiki_lamb: has joined #RubyOnRails

2015-07-08

[13:01:00] kiki_lamb: has joined #ruby
[13:01:00] kiki_lamb: has joined #RubyOnRails