« Back to channel list

#ruby - 12 February 2016

« Back 1 day Forward 1 day »
[00:04:33] rodfersou: has joined #ruby
[00:05:09] bhaak: has joined #ruby
[00:05:25] yqfvwal: has joined #ruby
[00:07:06] diegoviola: has joined #ruby
[00:08:38] crank1988: has joined #ruby
[00:10:05] joonty: has joined #ruby
[00:10:30] tAn: has joined #ruby
[00:10:32] ledestin: has joined #ruby
[00:11:40] bluOxigen: has joined #ruby
[00:12:17] zipkid_: has joined #ruby
[00:13:02] lancetw_: has joined #ruby
[00:13:29] peterevjan: has joined #ruby
[00:13:33] ex0ns_: has joined #ruby
[00:13:47] edulix_: has joined #ruby
[00:14:39] jlyndon_: has joined #ruby
[00:14:53] zenlot2: has joined #ruby
[00:14:58] glowcoil_: has joined #ruby
[00:15:09] tvw: has joined #ruby
[00:15:10] c355E3B: has joined #ruby
[00:15:20] bodgix: has joined #ruby
[00:15:22] kirillzh: has joined #ruby
[00:15:47] crayfishx: has joined #ruby
[00:16:01] shevy: has joined #ruby
[00:16:23] peterevjan: has joined #ruby
[00:16:40] dyce_: has joined #ruby
[00:16:40] mrsolo: has joined #ruby
[00:16:45] vcoinminer__: has joined #ruby
[00:17:50] ur5us: has joined #ruby
[00:18:15] ur5us: has joined #ruby
[00:19:03] infernix: has joined #ruby
[00:19:45] M-shine: has joined #ruby
[00:21:13] arescorpio: has joined #ruby
[00:21:47] dfockler: has joined #ruby
[00:22:48] amokr: has joined #ruby
[00:23:01] weemsledeux: has joined #ruby
[00:23:23] peterevjan: has joined #ruby
[00:24:14] floatingpoint: has joined #ruby
[00:24:54] g3funk: has joined #ruby
[00:25:45] Ox0dea: Halp! https://eval.in/517292
[00:25:56] Ox0dea: I'd rather not have to patch #method_added.
[00:28:24] CloCkWeRX: has joined #ruby
[00:30:17] M-Kodo: has joined #ruby
[00:31:50] johnmilton: has joined #ruby
[00:34:01] azure32: has joined #ruby
[00:35:45] nlackbiggerkkk: has joined #ruby
[00:37:00] milesmatthias: has joined #ruby
[00:41:00] aupadhye: has joined #ruby
[00:41:10] napstablook: has joined #ruby
[00:42:04] jottr: has joined #ruby
[00:42:39] william3: has joined #ruby
[00:43:40] Scripore: has joined #ruby
[00:44:42] TomPeed: has joined #ruby
[00:44:50] napstablook: has joined #ruby
[00:45:44] napstablook: hey, can anyone help me out? i'm an absolute newbie with ruby and I'm having trouble understanding an example
[00:47:15] Axy: has joined #ruby
[00:49:00] cjbottaro: has joined #ruby
[00:49:08] nfk: has joined #ruby
[00:49:24] hays: napstablook: i could try. im a bit of a noob myself
[00:50:22] andrewjf: has joined #ruby
[00:50:41] M-mistake: has joined #ruby
[00:50:43] theastrowolfe: has joined #ruby
[00:50:48] elifoster: has joined #ruby
[00:50:52] napstablook: ok, I'm trying to follow a tutorial but I don't really understand the usage of symbols on a certain part
[00:50:53] RegulationD: has joined #ruby
[00:50:56] napstablook: can I link it here?
[00:51:13] napstablook: http://guides.rubyonrails.org/getting_started.html
[00:51:32] napstablook: the author uses :title and :text
[00:51:50] napstablook: but from what I understood those will be replaced with the actual title and text of the article
[00:52:10] hays: yeah probably--this is actually a rails question so i might sugest the rails channel
[00:52:11] napstablook: but how can he do this using symbols? don't they simply have a string value?
[00:52:34] napstablook: what's the channel for rails?
[00:52:40] hays: oh-- well what's wrong with them having a string value
[00:52:47] hays: a title is a string is it not
[00:53:24] skyjumper: has joined #ruby
[00:53:41] napstablook: but it's being set by the user
[00:53:50] napstablook: can symbols have their values changed?
[00:53:57] Ropeney: napstablook: They are different attributes on the model
[00:54:17] hays: yeah its probably keying off a hash or something
[00:54:50] Ropeney: its building a html form, and using those symbols to build the name of the input
[00:55:13] napstablook: so they're not acting as variables
[00:55:23] Ox0dea: They're acting as identifiers.
[00:55:39] Ropeney: napstablook: correct, they're input identifiers.
[00:56:52] Ropeney: it generates `<input type='text' name='title' />
[00:57:17] hays: well... if the title is 'title'
[00:57:26] napstablook: so they're not symbols?
[00:57:44] Ropeney: napstablook, they are symbols in ruby, but they aren't used to store the values of anything
[00:58:09] skweek: has joined #ruby
[00:58:22] hays: they do act as an index or identifier though.. i bet there is a hash with :title => 'Actual title' somewhere
[00:58:22] Ropeney: napstablook: they are used, in this case, to identify the attribute to build the html form element for.
[00:59:22] napstablook: I think I get it
[00:59:31] Ox0dea: napstablook: https://eval.in/517294
[00:59:38] sucks: has joined #ruby
[00:59:41] Ox0dea: Symbols are essentially always used as more convenient identifiers.
[00:59:43] hays: you can associtate values with symbols but not assign them directly
[01:00:06] kirillzh: has joined #ruby
[01:00:30] hays: Ox0dea: whoa. that's some magic i didn't know about
[01:00:56] hays: use of understore like that
[01:01:04] hays: underscore
[01:01:10] Ox0dea: Er... it's just part of the variable name.
[01:01:28] Domaldel: has joined #ruby
[01:01:38] napstablook: ok, so if I were to grab those parameters with the params[:something]
[01:01:52] napstablook: ok, I understand now...
[01:02:11] kknight: has joined #ruby
[01:02:23] napstablook: I'm working on an assignment on rails, is it ok if I ask more questions here over time?
[01:02:33] napstablook: or should I go to the rails channel?
[01:02:44] Ox0dea: I bet you could answer your own question. :P
[01:02:49] hays: if its a question about the ruby language, ask here
[01:02:58] sarlalian: has joined #ruby
[01:04:57] RegulationD: has joined #ruby
[01:05:28] kknight: has joined #ruby
[01:05:39] crank1988: has joined #ruby
[01:06:01] hays: Ox0dea: nevermind--i read that weird
[01:06:35] fschuindt: has joined #ruby
[01:06:56] fschuindt: Guys, how can I get the decimal value of #<BigDecimal:6dfa718,'0.2092581E-1',9(45)>? Sorry for the noob question.
[01:07:21] fschuindt: Isn't 2.092581?
[01:08:43] lucasb: do you mean like BigDecimal.new(...).to_f ?
[01:09:30] fschuindt: Yes, I used some math now, I think it's 0.0209258
[01:09:35] Ox0dea: hays: I think this is what you thought was happening? https://eval.in/517298
[01:09:47] Ox0dea: Either way, just pretend this didn't happen. :P
[01:10:58] joonty: has joined #ruby
[01:11:45] hays: heh yeah probably something like that. I thought ruby treated _ as a shortcut to define a hash lookup for what preceded the _ using what came after the _ as a symbol
[01:12:20] hays: ive had a frustrating day with ruby and kinda sparse documentation of various gems
[01:12:47] william3: has joined #ruby
[01:12:56] hays: first 'rmodbus' apparently doesn't allow a server without a slave id of 255 which is super weird
[01:13:50] peterevjan: has joined #ruby
[01:14:02] hays: then celluloid silently moving all docs of supervise to the celluloid-supervise github
[01:14:08] hays: which is not linked to
[01:14:34] hays: and broken examples are left in the original docs
[01:15:07] johnmilton: has joined #ruby
[01:15:26] Ox0dea: // to escape /
[01:15:56] baweaver: do note though that rails questions should go to #RubyOnRails
[01:16:04] baweaver: but that's just an aside.
[01:16:16] baweaver: hays: submit PRs for the docs if you have time
[01:16:43] symbol: has joined #ruby
[01:16:47] baweaver: whenever I suffer through something I try and fix it or the docs related so it's not such a headache for anyone else afterwards.
[01:17:03] hays: baweaver: yeah i'll try to do that on my own the time vs. on the clock for customer hehe
[01:17:20] peterevjan: has joined #ruby
[01:17:51] hays: i spent about an hour looking through the source code for the darn function. heh turned out it was in a different github
[01:19:39] Ox0dea: A different GitHub?!
[01:21:20] hays: Ox0dea: a different github.. repo?
[01:22:13] hays: is there a generally accepted way to split .rb files into smaller chunks to separate classes and such into smaller files
[01:22:21] kknight: hays: you are free to to write anything on your git account..
[01:22:59] hays: i found something called 'require_relative' that looks to be deprecated
[01:23:08] benlieb: has joined #ruby
[01:23:54] Ox0dea: Who says it's deprecated?
[01:24:13] x77686d: has joined #ruby
[01:24:22] theastrowolfe: has joined #ruby
[01:24:39] ElFerna: has joined #ruby
[01:25:06] allcentury: has joined #ruby
[01:25:18] andrewh: has joined #ruby
[01:25:28] hays: not sure--different computer
[01:26:50] havenwood: hays: It's supported by all supported Rubies.
[01:27:09] bougyman: not older ones.
[01:27:13] havenwood: hays: Ruby 1.8 is past End-of-Life.
[01:27:16] bougyman: it was 1.9.x, right?
[01:27:38] havenwood: bougyman: ayup
[01:28:38] havenwood: hays: In Ruby 1.8 you can just `require` for the current working directory since "." used to be in the $LOAD_PATH.
[01:29:52] hays: hmm soo i guess put classes in lib/ or something then have a master file that require_relative's them
[01:31:16] havenwood: hays: Gems set it up so lib/ is in the $LOAD_PATH. So you can `require 'xo/version'` for example for lib/xo/version.
[01:31:51] havenwood: hays: Ah right, you mean Rails.
[01:31:55] havenwood: hays: Or do you?
[01:32:04] havenwood: hays: Gem lib/ or app lib/?
[01:32:39] havenwood: (I'm reading the scrollback now. So much to catch up on.)
[01:33:14] nettoweb: has joined #ruby
[01:36:22] dlitvak: has joined #ruby
[01:39:32] william3: has joined #ruby
[01:40:30] duckpuppy: has joined #ruby
[01:41:23] pipework: havenwood: Isn't &proc the way to get a hold of the block passed to the method regardless of whether you've made a variable in the signature for it?
[01:41:40] andrewh: has joined #ruby
[01:42:00] Ox0dea: pipework: Also Proc.new.
[01:42:11] rhombical: has joined #ruby
[01:42:19] Ox0dea: >> def foo; Proc.new.call; end; foo { 42 }
[01:42:20] ruby[bot]: Ox0dea: # => 42 (https://eval.in/517301)
[01:42:54] Ox0dea: `proc` is actually just a Kernel method that delegates to Proc.new.
[01:43:07] Ox0dea: It'll use the surrounding block if one isn't explicitly provided.
[01:43:12] Ox0dea: And all methods take an implicit block.
[01:43:20] hays: havenwood: i do not mean rqilw
[01:43:32] toretore: thats ghetto af
[01:43:51] hays: havenwood: im just thinking generally how to structure things so it fits with the norms/conventions
[01:44:12] hays: learningrubythehardway has a structure.. thats pretty extensive
[01:44:40] Ox0dea: toretore: What is?
[01:44:48] Synthead: I just installed an SSL cert and when connecting to a server with it via openssl s_client, it shows that it's fine. However, I still get an OpenSSL::SSL::SSLError saying that the certificate verify failed. Is there something I missed?
[01:44:52] Ox0dea: That all methods take an implicit block and that there's a way to get hold of it?
[01:45:02] toretore: Proc.new just magically using the method's block Ox0dea
[01:45:09] pipework: Ox0dea: So if I've defined a method and I'm inside the method and I need to get a hold of the proc/block passed into the method, but I can't add &block or whatever to the signature, then to get a hold of the block from anywhere within the method I use Proc.new ?
[01:45:21] Ox0dea: pipework: Or `proc`, aye.
[01:45:26] pipework: It must not work in irb
[01:46:56] dfinninger: has joined #ruby
[01:47:33] TomPeed: has joined #ruby
[01:47:47] havenwood: pipework: or block_given? with yield
[01:47:51] Scripore: has joined #ruby
[01:47:57] pipework: havenwood: I need to check the arity of the proc.
[01:48:59] havenwood: pipework: should work in irb
[01:49:38] TomPeed: has joined #ruby
[01:50:41] jamo: has joined #ruby
[01:51:06] Synthead: looks like if I do SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt rails c, it works fine
[01:51:07] Ox0dea: toretore: It's useful to be able to decide whether or not you want to reify the block into an actual Proc.
[01:51:50] andrewh: has joined #ruby
[01:51:51] Ox0dea: `cond ? yield : proc.call(...)`
[01:53:23] stannard: has joined #ruby
[01:55:17] toretore: Ox0dea: for twhat purpose?
[01:55:32] Ox0dea: toretore: Just in case. :P
[01:55:52] Ox0dea: Procs are comparatively expensive, if that's how you meant.
[01:56:09] hololeap: has joined #ruby
[01:56:09] toretore: compared to yield?
[01:56:28] Ox0dea: Blocks are not Objects.
[01:56:45] rhombical: has joined #ruby
[01:57:22] DLSteve: has joined #ruby
[01:58:57] pipework: Ox0dea: Ah, in my case all I need is the proc in a way I can check the arity and then yield without needing to modify the signature.
[01:59:15] pipework: I'm working on something right miaow though, and it seems to be on the right path.
[02:00:39] Ox0dea: pipework: That's certainly a valid (and intriguing) use case, but no memory savings.
[02:02:23] pipework: Ox0dea: I'm not too concerned about memory savings, just not changing the actual method signature.
[02:02:39] pipework: `if proc.arity.nonzero?` is most of what I needed.
[02:02:48] pawnbox: has joined #ruby
[02:04:48] Ox0dea: pipework: Blocks aren't lambdas; they don't check their arguments.
[02:04:58] pipework: Ox0dea: I don't want it checked.
[02:05:07] Ox0dea: You have no say. :P
[02:05:17] pipework: Happy situation then
[02:05:26] Ox0dea: It just seems like `proc.call *foo` would do The Right Thing either way?
[02:05:48] pipework: If the caller of this method passes a block with a block variable, I'm doing something different than if they pass a block without a block variable.
[02:06:08] Ox0dea: Gotcha. That's slightly terrifying, though. :)
[02:06:27] toretore: instance_eval?
[02:06:42] pipework: Ox0dea: On purpose!
[02:06:54] pipework: It's a patch for lograge (but logging in general)
[02:07:07] pipework: I'll show it off in a bit.
[02:09:39] Ox0dea: toretore: Found that ghetto you were talking about: https://git.io/vgPzi
[02:10:11] Ox0dea: Why did they skip 0x51?
[02:10:15] Ox0dea: The numbers, Mason!
[02:10:22] Ox0dea: So many MAGIC.
[02:11:16] SenpaiSilver_: has joined #ruby
[02:11:17] peterevjan: has joined #ruby
[02:11:25] joonty: has joined #ruby
[02:11:59] Ox0dea: I just want TracePoint to say more about the arguments during :call and :c_call events. :(
[02:12:14] Ox0dea: That it doesn't is probably not just an oversight but actually hard. :/
[02:14:50] LuckyABA: has joined #ruby
[02:15:31] JoshGlzBrk: has joined #ruby
[02:15:35] scouth: has joined #ruby
[02:17:14] theastrowolfe: has joined #ruby
[02:17:17] Ox0dea: Ogodwhy: https://eval.in/517309
[02:25:01] TomPeed: has joined #ruby
[02:30:42] peterevjan: has joined #ruby
[02:32:15] skreem: has joined #ruby
[02:32:18] skreem: has left #ruby: ()
[02:32:20] dlitvak: has joined #ruby
[02:35:47] VeryBewitching: Mezmerizing muses muddling mundanely.
[02:36:30] VeryBewitching: Today is an M day.
[02:38:00] VeryBewitching: Ox0dea: That's a fun example.
[02:38:13] nofxx: there's a brazilian comedian with a famous poem titled 'monologue of the modern world' 'world is Mundo' heh
[02:38:18] dlitvak_: has joined #ruby
[02:38:48] nofxx: VeryBewitching, rejoice: http://pensador.uol.com.br/frase/NTQ0MDE0/
[02:39:44] Ox0dea: Why?! https://eval.in/517314
[02:39:58] Ox0dea: What the heck causes it to stop returning them in defined order? :/
[02:40:03] nofxx: he says that when he was 7 daddy gave it his first gun, he was the first boy in the street with a gun, next yr he was the only boy on the street
[02:41:06] VeryBewitching: Ox0dea: That's really strange.
[02:41:16] duckpuppy: has joined #ruby
[02:41:19] Ox0dea: It happens slightly earlier on my 64-bit machine as well. :(
[02:41:38] Ox0dea: Should be 236.
[02:42:10] VeryBewitching: It's nothing like yours
[02:42:20] Ox0dea: All over the place?
[02:43:05] VeryBewitching: Only if I run it in irb
[02:43:14] VeryBewitching: If I pipe output to a file, it's in order
[02:43:26] Ox0dea: Totally ordered?
[02:43:26] VeryBewitching: ruby ~/test.rb > out.txt
[02:43:50] VeryBewitching: Up, it looks 0 to 254 in sequence.
[02:43:59] Ox0dea: What do you get for this? https://eval.in/517315
[02:44:32] Ox0dea: I suppose it might loop forever.
[02:44:51] VeryBewitching: That doesn't return
[02:45:00] VeryBewitching: Ya, it's "working"
[02:45:27] VeryBewitching: Intel Core i7, 8 CPUs
[02:46:24] VeryBewitching: So if you put it in a script file, run it and pipe it out, what order does it come out in?
[02:46:32] krz: has joined #ruby
[02:46:33] VeryBewitching: On your CPU that is
[02:47:27] VeryBewitching: With respect to the former, that is.
[02:47:29] Ox0dea: It's ordered until :m235, which gets placed at the beginning, and then all subsequent methods show up after it.
[02:47:41] zenergi: has joined #ruby
[02:47:54] VeryBewitching: Did you break Ruby?
[02:48:38] Ox0dea: I vaguely recall somebody asking about this on the mailing list fairly recently.
[02:48:48] Ox0dea: As you might expect, nobu said that there's no guarantee.
[02:48:50] scouth: has joined #ruby
[02:48:55] VeryBewitching: Are you on AMD?
[02:49:18] Ox0dea: Are you on 2.3?
[02:50:07] Ox0dea: Well, there it is: https://eval.in/517319
[02:50:57] Ox0dea: This is a new feature in 2.3. :/
[02:52:47] pawnbox: has joined #ruby
[02:53:46] VeryBewitching: I have it compiling
[02:54:12] VeryBewitching: What OS do you usually run Ruby in?
[02:54:30] zenergi: has joined #ruby
[02:55:27] Ox0dea: I found the "bug" report: https://bugs.ruby-lang.org/issues/7152#note-2
[02:55:45] Ox0dea: So prolix, that nobu.
[02:57:38] VeryBewitching: I think that the sequence should be honoured.
[02:57:45] VeryBewitching: I would want to rely on that.
[02:58:55] Ox0dea: Like right meow.
[02:59:18] VeryBewitching: Oh, wait, I didn't chruby to 2.3 :<
[02:59:29] moeabdol2: has joined #ruby
[02:59:46] bronson: has joined #ruby
[02:59:55] VeryBewitching: Damn. Starts at 249 for me.
[03:01:15] Ox0dea: https://eval.in/517320
[03:01:22] Ox0dea: That's wonderfully simple...
[03:01:48] Ox0dea: I can't think of a different way to do it without having to make this a C extension that gets all up in the internals. :/
[03:02:04] moeabdol3: has joined #ruby
[03:04:05] DmitryBochkarev: has joined #ruby
[03:04:23] VeryBewitching: Almost the time of the day for me when I'm up for losing a ship.
[03:05:02] Ox0dea: Still parsing that.
[03:05:04] VeryBewitching: Ox0dea: Debug the ruby process, while running that script, in an ide.
[03:05:15] A124: has joined #ruby
[03:05:33] Ox0dea: VeryBewitching: Hm? The problem has been identified.
[03:05:56] Ox0dea: #instance_methods isn't guaranteed to return methods in definition order.
[03:06:27] Ox0dea: And the TracePoint API doesn't expose the arguments passed in a call, so I can only know that *a* method has been added, but not which.
[03:06:42] VeryBewitching: I guess what I'm wondering is... why is it output in that specific pattern.
[03:06:44] Ox0dea: Without monkey-patching Module#method_added, to which I'm opposed on principle.
[03:06:51] VeryBewitching: And what causes it to differ?
[03:07:20] VeryBewitching: With respect to losing a ship, I play Eve on occasion.
[03:08:14] VeryBewitching: On my PC it starts at 249.
[03:08:23] VeryBewitching: Yours it starts later, on both it wraps to fill
[03:08:36] VeryBewitching: I want to know why those specific starting points.
[03:09:21] VeryBewitching: afk a sec, grabbing phone
[03:11:21] Ox0dea: These lines stand out as being potentially relevant: https://git.io/vgPos
[03:12:09] joonty: has joined #ruby
[03:12:09] Ox0dea: I suspect the sizes are the same on both our 64-bit machines, so maybe it's to do with structure packing differences between our compilers?
[03:12:10] A124: has joined #ruby
[03:14:28] arlek: has joined #ruby
[03:14:38] azure32: has joined #ruby
[03:17:50] scouth: has joined #ruby
[03:19:10] VeryBewitching: How much addressable memory plus swap on your end?
[03:20:34] VeryBewitching: 1024 Mb swap plus 7567/7944 MB RAM
[03:20:58] idefine: has joined #ruby
[03:21:32] Ox0dea: Are you frying eggs?
[03:21:48] VeryBewitching: That's mem free btw
[03:21:52] Ox0dea: A little less RAM, infinitely less swap.
[03:22:01] kies^: has joined #ruby
[03:22:17] Ox0dea: Compiler?
[03:22:31] VeryBewitching: gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
[03:22:33] pawnbox: has joined #ruby
[03:22:52] karapetyan: has joined #ruby
[03:23:04] Ox0dea: I'm on 5.3, but I suspect irrelevance there as well. :/
[03:23:47] VeryBewitching: I don't see how a collection could be assigned out of order, and in a different pattern.
[03:24:18] chipotle: has joined #ruby
[03:24:50] VeryBewitching: Certain the iterator would determine the generated index, starting at 0.
[03:25:05] VeryBewitching: s/Certain/Certainly
[03:25:25] Ox0dea: It's constructing the list with a hash table, presumably to ignore duplicates from superclasses.
[03:26:01] Ox0dea: Ruby Hashes are ordered, but the VM goes out of its way to ensure that, and it just doesn't do so with the internal hash constructed by #instance_methods.
[03:26:52] VeryBewitching: But the execution order should always put :m0 at index 0
[03:27:06] ur5us: has joined #ruby
[03:27:08] Ox0dea: Only the buckets and their contents matter, not their positions in the chain; when #instance_methods goes to iterate over them, there's "spillage".
[03:27:15] VeryBewitching: Oh, wait, no that's not at all sensical.
[03:27:35] Ox0dea: I thought that wasn't a word.
[03:27:49] VeryBewitching: Which gives the word so much more meaning :D
[03:28:12] kies^: has joined #ruby
[03:28:33] VeryBewitching: So it sounds like it's an efficiency thing?
[03:28:58] peterevjan: has joined #ruby
[03:29:24] peterevjan: has joined #ruby
[03:30:00] Ox0dea: MRI just doesn't go out of its way to keep internal hashes ordered.
[03:30:16] VeryBewitching: Not having to account for position, especially in something as large as a Rails app, would probably keep more free memory available.
[03:30:49] Ox0dea: Better than that would be if #instance_methods and the like did any caching at all.
[03:31:33] Ox0dea: >> methods.__id__ == methods.__id__
[03:31:34] VeryBewitching: Someone in #RubyOnRails was talking about memoize earlier.
[03:31:34] ruby[bot]: Ox0dea: # => false (https://eval.in/517322)
[03:33:53] VeryBewitching: I think a constant/symbol cache would be nice.
[03:34:16] DEA7TH: has joined #ruby
[03:36:14] Ox0dea: Symbols are interned.
[03:36:22] theastrowolfe: has joined #ruby
[03:36:56] Ox0dea: >> :foo.__id__ == :foo.__id__ # to clarify
[03:36:57] ruby[bot]: Ox0dea: # => true (https://eval.in/517323)
[03:37:09] Ox0dea: Still, #methods is constructing a new Array each time.
[03:39:21] renderful: has joined #ruby
[03:40:23] Ox0dea: The local variable table maintains order: https://eval.in/517334
[03:40:44] Ox0dea: ??\_(???)_/??
[03:41:04] VeryBewitching: And that's when I have a drink.
[03:41:09] pawnbox: has joined #ruby
[03:41:13] siphonage: has joined #ruby
[03:42:03] duckpuppy: has joined #ruby
[03:42:35] Ox0dea: Well, if you insist.
[03:43:10] VeryBewitching: I'm off for the night, a long day with a framework I don't enjoy. I still want to know why mine starts at 249 though, I'm going to see if I sort that tomorrow.
[03:44:05] s00pcan: has joined #ruby
[03:47:04] TomPeed: has joined #ruby
[03:47:55] DmitryBochkarev: has joined #ruby
[03:52:51] idefine: has joined #ruby
[03:52:53] agent_white: has joined #ruby
[03:54:42] azure32: has joined #ruby
[03:56:27] terminalrecluse: has joined #ruby
[03:59:53] doublemalt_: has joined #ruby
[04:00:48] pawnbox: has joined #ruby
[04:01:11] kingsler: has joined #ruby
[04:02:10] RegulationD: has joined #ruby
[04:06:53] tona: has joined #ruby
[04:07:00] tona: hello guys
[04:07:24] tona: is there one way to create one ssh web browser in ruby to connect with servers using ssh but into one browser ?
[04:09:42] stannard: has joined #ruby
[04:09:52] minimalism: has joined #ruby
[04:11:12] dcope: has left #ruby: ()
[04:11:13] treaki: has joined #ruby
[04:13:10] x77686d: has joined #ruby
[04:13:13] joonty: has joined #ruby
[04:14:49] andrewh: has joined #ruby
[04:15:24] braincrash: has joined #ruby
[04:16:20] moeabdol: has joined #ruby
[04:16:37] mistermocha: has joined #ruby
[04:17:04] djbkd: has joined #ruby
[04:18:51] Bloomer: has joined #ruby
[04:20:44] asccigcc: has joined #ruby
[04:23:38] sneakerhax: has joined #ruby
[04:24:58] zacstewart: has joined #ruby
[04:26:57] sneakerhax: has joined #ruby
[04:29:41] floatingpoint: has joined #ruby
[04:30:47] Scripore: has joined #ruby
[04:31:16] pawnbox: has joined #ruby
[04:31:44] rkazak: has joined #ruby
[04:35:06] gix: has joined #ruby
[04:36:45] aaeron: has joined #ruby
[04:38:57] nofacade: has joined #ruby
[04:39:11] duncannz: has joined #ruby
[04:40:24] fedexo: has joined #ruby
[04:42:49] duckpuppy: has joined #ruby
[04:43:24] terminalrecluse: has joined #ruby
[04:44:39] twintail: has joined #ruby
[04:44:54] pawnbox_: has joined #ruby
[04:45:43] kirillzh: has joined #ruby
[04:49:06] Gobioidei: has joined #ruby
[04:52:36] william3: has joined #ruby
[04:54:17] edwardly: has joined #ruby
[04:54:17] edwardly: has joined #ruby
[04:58:00] edwardly: has joined #ruby
[04:58:00] edwardly: has joined #ruby
[04:59:23] chipotle: has joined #ruby
[05:00:19] perrier_: has joined #ruby
[05:00:23] _djbkd: has joined #ruby
[05:05:03] konsolebox: has joined #ruby
[05:06:25] dragon9783: has joined #ruby
[05:10:04] arbys: has joined #ruby
[05:10:05] armyriad: has joined #ruby
[05:10:05] pawnbox: has joined #ruby
[05:10:05] Kryptonical: has joined #ruby
[05:10:05] darkf: has joined #ruby
[05:10:05] dexter-tzu: has joined #ruby
[05:10:05] crdpink2: has joined #ruby
[05:10:05] djbkd: has joined #ruby
[05:11:51] ceej: has joined #ruby
[05:12:10] derailed: has joined #ruby
[05:12:32] rideh: has joined #ruby
[05:12:47] Miron: has joined #ruby
[05:12:50] skarn: has joined #ruby
[05:12:59] hostess: has joined #ruby
[05:13:14] kent\n: has joined #ruby
[05:13:14] kent\n: has joined #ruby
[05:13:39] joonty: has joined #ruby
[05:14:42] budhram: has joined #ruby
[05:17:22] blackjid: has joined #ruby
[05:19:33] pigeonhearted: has joined #ruby
[05:20:00] tpendragon: has joined #ruby
[05:22:58] pawnbox: has joined #ruby
[05:23:48] Tempesta: has joined #ruby
[05:24:31] cjheath: has joined #ruby
[05:26:00] sorah: has joined #ruby
[05:26:07] baweaver: has joined #ruby
[05:26:19] cjheath: I???ve published a lot of gems, but something today has me baffled. I have an executable in my gem. A clean install installs the runtime dependencies, but when I run the executable, it requires the development deps to be installed. Is this a problem with rbenv?
[05:26:54] cjheath: Try it: ???gem install activefacts-compositions??? then try to run: ???schema_compositor ???help???
[05:27:15] cjheath: It works fine if you install the development deps as well
[05:27:26] cjheath: any ideas?
[05:27:55] cjheath: the executable is *not* a dev tool; it???s the main purpose for the gem.
[05:28:31] chipotle: has joined #ruby
[05:30:00] adgtl: has joined #ruby
[05:32:54] nodejunkie: has joined #ruby
[05:32:55] idefine: has joined #ruby
[05:34:27] kingsler: has left #ruby: ("AndroIRC")
[05:37:22] baweaver: Ox0dea or jhass might know.
[05:37:59] cjheath: I???ve also asked in #rubygems, and now asking on stackoverflow
[05:38:09] baweaver: it's beyond me honestly.
[05:38:33] cjheath: I suspect that the answer will be that ???executables are development tools???. Clearly not true in this case, but that might be the assumption
[05:43:35] duckpuppy: has joined #ruby
[05:44:32] diegoviola: has joined #ruby
[05:44:34] diegoviola: has left #ruby: ()
[05:46:04] dopamean1: has joined #ruby
[05:46:22] ruby[bot]: -b *!*@gateway/web/freenode/ip.5.254.65.180$#ruby-banned
[05:55:31] pigeonhearted: has joined #ruby
[05:57:59] zacstewart: has joined #ruby
[06:04:22] ruby[bot]: -bb $a:RUDIS$#ruby-banned RUDIS!*@*$#ruby-banned
[06:04:43] mdw: has joined #ruby
[06:06:52] djellemah: cjheath: what's in Gemfile and activefacts-compositions.gemspec ?
[06:08:03] cjheath: djellemah: It???s here: https://github.com/cjheath/activefacts-compositions
[06:08:10] Aces1up: has joined #ruby
[06:08:36] Aces1up: i cannot seem to find a simple answer to this, just want to get current time, in timezone pacific.. in date and timestamp format.
[06:10:22] speakingcode: has joined #ruby
[06:12:43] djellemah: cjheath: My guesses: maybe one of your activefacts- gems has those gems as runtime dependencies; or maybe require 'bundler/setup' is pulling in development dependencies. Bundle.require may help, I'm quite hazy on bundler though.
[06:13:11] cjheath: I checked the installed files, and none of the deps has activefacts as a runtime dep
[06:13:30] cjheath: I mean in the installed gem repo
[06:14:25] joonty: has joined #ruby
[06:17:08] adgtl: has joined #ruby
[06:18:53] djellemah: cjheath: http://bundler.io/bundler_setup.html might help, the second code example
[06:20:16] codecop: has joined #ruby
[06:22:10] last_staff: has joined #ruby
[06:22:29] ghostfish: has joined #ruby
[06:23:25] rsc___: has joined #ruby
[06:26:07] cjheath: djellemah: thanks, looking now (just had dinner)
[06:26:58] LoneHerm_: has joined #ruby
[06:28:15] SkepBrain: has joined #ruby
[06:28:54] mdw: has joined #ruby
[06:33:12] _mak: has joined #ruby
[06:33:13] agent_white: has joined #ruby
[06:33:32] s00pcan: has joined #ruby
[06:33:53] _mak: hi there
[06:33:55] cjheath: No, that didn???t help.
[06:35:21] _mak: I have this json api endpoint, which in order to query I need to have a 'session cookie', which in order to get I need to login to the site using a html login form. Is there any gem I could use to get the cookie without resorting to a headless browser to login to the site?
[06:35:27] aganov: has joined #ruby
[06:35:52] cjheath: _mak: Mechanize used to be the go-to gem for webscraping.
[06:36:45] p1k: has joined #ruby
[06:36:47] _mak: cjheath: cool, thanks!
[06:37:09] cjheath: check the ruby toolbox to see if there???s something better, but I expect not
[06:37:24] p1k: is there any way to make changes to ruby objects but limit the scope within those changes are visible ?
[06:38:28] cjheath: p1k: That???s what Ruby 2???s Refinements are for
[06:38:44] p1k: cjheath: more specifically? :o
[06:38:57] adgtl: has joined #ruby
[06:39:08] cjheath: Google for Ruby and Refinements, you???ll find more than you wantto know
[06:39:21] cjheath: be aware that the feature was somewhat controversial
[06:40:43] p1k: cjheath: thanks
[06:41:15] djellemah: p1k: jruby and rubinius don't implement refinements afaik, but it's been a while since I checked.
[06:41:59] djellemah: cjheath: When I do gem install activefacts-compositions in a clean gemset I get
[06:41:59] djellemah: Fetching: debugger-linecache-1.2.0.gem (100%)
[06:41:59] djellemah: Fetching: byebug-1.8.2.gem (100%)
[06:41:59] djellemah: Fetching: tracing-2.0.6.gem (100%)
[06:41:59] djellemah: those look like development dependencies to me.
[06:42:31] cjheath: byebug is only if you enable it in TRACE environment variable. Likewise tracing - it does nothing unless you enable it
[06:43:06] cjheath: The tracing is left in for production, because that???s where you???re most likely to need it
[06:43:06] youngmathimus0: has joined #ruby
[06:43:25] p1k: so Using declarations are block scoped ?
[06:43:45] ur5us: has joined #ruby
[06:44:52] ur5us: has joined #ruby
[06:45:20] platinochloric: has joined #ruby
[06:45:31] _mak: has left #ruby: ("..")
[06:45:36] intrigueD: has joined #ruby
[06:47:38] pawnbox: has joined #ruby
[06:48:20] djellemah: cjheath: When I do comment out require 'bundler/setup' in schema_compositor, schema_compositor --help shows Available compositors etc
[06:48:36] cjheath: Oh really! Thanks, that???s a great find
[06:48:56] djellemah: p1k: I think they're module scoped.
[06:49:31] adgtl: has joined #ruby
[06:49:36] cjheath: djellemah: I must buy you a beer sometime! You solved m'y problem :
[06:50:02] mickey_mouse: has joined #ruby
[06:51:14] s00pcan: has joined #ruby
[06:51:42] djellemah: cjheath: thanks, but you might want to check that the non --help codepaths still work ;-)
[06:52:09] cjheath: It???s basically a driver - the options it lists are modules it can load
[06:52:16] cjheath: so they should work too
[06:52:18] p1k: djellemah: Yeah I think this is too heavy handed for what I'm looking to do
[06:54:02] Macaveli: has joined #ruby
[06:55:48] BTRE: has joined #ruby
[06:55:52] s00pcan: has joined #ruby
[06:57:02] djellemah: cjheath: consult the demo gods about 'should work' ;-)
[06:57:18] cjheath: tested, works fine, thanks!
[06:58:16] chouhoulis: has joined #ruby
[06:58:45] piotrj: has joined #ruby
[06:58:52] Macaveli: has joined #ruby
[06:59:46] diegoviola: has joined #ruby
[06:59:54] uanl: has joined #ruby
[06:59:56] uanl: i have no math background and i can't do logic well
[07:00:02] uanl: what would you recommend to do for me to improve?
[07:00:41] s00pcan: has joined #ruby
[07:01:14] bronson: has joined #ruby
[07:02:34] chouhoulis: has joined #ruby
[07:03:56] s00pcan_: has joined #ruby
[07:04:52] solars: has joined #ruby
[07:12:42] lurch_: has joined #ruby
[07:13:24] djellemah: uanl: http://learnrubythehardway.org/book/ex28.html might help
[07:13:31] ur5us: has joined #ruby
[07:14:08] azure32: has joined #ruby
[07:14:17] scepticulous: has joined #ruby
[07:14:51] uanl: i can't code chess is something wrong with me?
[07:15:03] uanl: chess or checkers
[07:15:10] uanl: my head can't wrap around the logic
[07:18:12] ta: has joined #ruby
[07:18:23] s00pcan: has joined #ruby
[07:23:13] LoneHermit: has joined #ruby
[07:24:06] mistermocha: has joined #ruby
[07:26:27] karapetyan: has joined #ruby
[07:26:28] Polysics_: has joined #ruby
[07:26:41] toretore: has joined #ruby
[07:30:13] lxsameer: has joined #ruby
[07:31:33] diegoviola: has joined #ruby
[07:32:20] ta: has joined #ruby
[07:33:16] sandstrom: has joined #ruby
[07:33:43] mhoungbo: has joined #ruby
[07:35:54] anisha: has joined #ruby
[07:36:52] Mia: has joined #ruby
[07:37:02] bruce_lee: has joined #ruby
[07:37:23] bruce_lee: has joined #ruby
[07:38:44] piotrj: has joined #ruby
[07:39:20] jas02: has joined #ruby
[07:42:29] robbyoconnor: has joined #ruby
[07:43:06] y2mq37: has joined #ruby
[07:43:49] symm-: has joined #ruby
[07:44:14] firstdayonthejob: has joined #ruby
[07:45:04] duckpuppy: has joined #ruby
[07:47:26] andrewh: has joined #ruby
[07:48:13] PedramT: has joined #ruby
[07:50:01] lubekpl: has joined #ruby
[07:51:45] unflated: has joined #ruby
[07:53:17] azure32: well chess isn't exactly a simple game to be fair
[07:53:33] SkepBrain: has joined #ruby
[07:54:30] rdark: has joined #ruby
[07:56:34] tAn: has joined #ruby
[07:56:39] sandstrom: has joined #ruby
[07:58:48] tvw: has joined #ruby
[08:01:28] Hounddog: has joined #ruby
[08:02:47] cox^: has joined #ruby
[08:03:13] cox^: has left #ruby: ()
[08:04:26] RegulationD: has joined #ruby
[08:05:45] ta: has joined #ruby
[08:07:03] Hounddog: has joined #ruby
[08:11:39] Spami: has joined #ruby
[08:11:49] urtokk: has joined #ruby
[08:13:31] mdw: has joined #ruby
[08:15:06] zacstewart: has joined #ruby
[08:17:23] pawnbox: has joined #ruby
[08:18:02] moei: has joined #ruby
[08:20:36] srenatus: has joined #ruby
[08:21:37] solars: are there any good/working vim refactoring plugins for ruby?
[08:22:03] Ox0dea: Sounds like you want an IDE.
[08:22:13] ljarvis: solars: refactoring in what sense? Ruby style is very opinionated
[08:22:32] ljarvis: you wouldn't think it idling here of course
[08:22:36] amorbix: has joined #ruby
[08:23:03] sandstrom: has joined #ruby
[08:23:44] mhoungbo: has joined #ruby
[08:25:24] yaewa: has joined #ruby
[08:26:23] uanl: why did ruby lose the battle against node?
[08:26:46] adaedra: why are all the trolls so unoriginal?
[08:27:01] heftig: evil always triumphs in the middle
[08:27:16] uanl: ruby was popular last year and then node improved a lot and now nobody wants ruby devs anymore
[08:27:18] vondruch: has joined #ruby
[08:27:22] uanl: i live in san francisco
[08:27:31] adaedra: cool story.
[08:27:53] uanl: i know more about the tech industry than most of you here
[08:28:12] eam: well, not more than me
[08:28:25] uanl: so what is the demand for ruby these days?
[08:30:22] dmolina: has joined #ruby
[08:32:02] kmckelvin: has joined #ruby
[08:32:25] william3: has joined #ruby
[08:34:05] vondruch: has joined #ruby
[08:36:56] solars: Ox0dea, I'm using vim as my ide
[08:37:02] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[08:37:14] solars: ljarvis, refactoring, not style.. I mean things like extract method etc
[08:38:09] adaedra: you mean yank and paste? :p
[08:38:18] solars: are you a programmer? :)
[08:38:38] ljarvis: i don't know what you mean by extract method unless you do mean yank and paste
[08:38:41] Ox0dea: solars: This might be the talk for you: https://www.youtube.com/watch?v=SkdrYWhh-8s
[08:38:42] ljarvis: because that's what i do
[08:38:50] Ox0dea: Video quality's kinda shit. :/
[08:39:01] LoneHerm_: has joined #ruby
[08:39:09] solars: ljarvis, see https://en.wikipedia.org/wiki/Code_refactoring
[08:39:16] silicio: has joined #ruby
[08:39:34] adaedra: There seems to be that https://github.com/ecomba/vim-ruby-refactoring
[08:39:46] solars: Ox0dea, I know all these things, I just wanted to know if somebody does know a plugin that I do not
[08:39:58] Ox0dea: solars: Know all what things?
[08:40:04] solars: adaedra, unfortunately it's outdated
[08:40:08] karapetyan: has joined #ruby
[08:40:12] Ox0dea: You're being silly.
[08:40:16] solars: Ox0dea, I mean I know how to use vim
[08:40:30] adaedra: I'm tempted to reuse Ox0dea's gif here.
[08:40:31] solars: but I did not find anything decent, oder than eclim, to refactor ruby
[08:40:43] Ox0dea: solars: What's wrong with the plugin adaedra linked?
[08:40:55] adaedra: I'm afraid you still have to do some things manually.
[08:40:56] solars: Ox0dea, it's not actively maintained and has bugs
[08:41:03] Ox0dea: solars: What kind of bugs?
[08:41:12] kirillzh: has joined #ruby
[08:41:12] Ox0dea: Like, name one.
[08:41:16] ljarvis: those shortcuts are really... simple
[08:41:21] ljarvis: I guess that's why I'm confused
[08:41:29] solars: Ox0dea, extract method didn't work
[08:41:31] ljarvis: like why would you need anything more that just.. vim
[08:41:54] Ox0dea: I knew it!
[08:41:57] solars: if you never tried it, there is no point in discussing it
[08:42:03] solars: so please don't troll
[08:42:07] ljarvis: I refactor code all the time
[08:42:14] ljarvis: so please don't troll
[08:42:24] solars: ljarvis, obviously you didn't even know what extract method is, right
[08:42:34] ljarvis: well im done here
[08:42:46] solars: there are refactoring patterns, and that's what I'm referring to with refactoring
[08:42:52] solars: not changing code style
[08:42:59] solars: that's certainly not refactoring
[08:43:31] ljarvis: I asked about style to start with because I was unsure, I know you're talking about refactoring and I know what refactoring is
[08:43:48] PedramT: has joined #ruby
[08:44:01] solars: good, then please do not try to convince me that I am wrong just because you do it differently
[08:44:58] adaedra: Okay, so to close the discussion, no, we do not know plugins that do what you want.
[08:45:17] solars: I noticed, yes
[08:45:51] duckpuppy: has joined #ruby
[08:46:25] snowy: has joined #ruby
[08:47:07] yfeldblum: has joined #ruby
[08:48:35] tvw: has joined #ruby
[08:52:02] william3: has joined #ruby
[08:52:12] rodfersou: has joined #ruby
[08:53:36] kp666: has joined #ruby
[08:56:05] UtkarshRay: has joined #ruby
[08:59:39] foo`: has joined #ruby
[08:59:52] benlieb: has joined #ruby
[09:02:17] bilus: has joined #ruby
[09:04:01] marr: has joined #ruby
[09:05:05] unflinching: has joined #ruby
[09:05:20] SCHAAP137: has joined #ruby
[09:05:41] lipoqil: has joined #ruby
[09:05:52] william3: has joined #ruby
[09:06:09] ziyadb: has joined #ruby
[09:06:35] valera: has joined #ruby
[09:08:44] sepp2k: has joined #ruby
[09:15:20] Gnut: has joined #ruby
[09:16:06] kimegede: has joined #ruby
[09:18:49] unflinching: has joined #ruby
[09:19:18] mark4: has joined #ruby
[09:19:30] binaryplease: has joined #ruby
[09:20:42] drptbl: has joined #ruby
[09:20:55] Mon_Ouie: has joined #ruby
[09:22:21] bkxd: has joined #ruby
[09:24:23] Darkwater: has joined #ruby
[09:24:45] huyderman: has joined #ruby
[09:24:48] drptbl_: has joined #ruby
[09:25:09] Darkwater: is it good practice to create loads of custom *Error classes? (eg for a build script: UnknownConfigError, UnknownBuildTypeError, NoConfigUsedError, etc)
[09:25:23] ur5us: has joined #ruby
[09:25:28] yorickpeterse: ljarvis: bro do you even know about refactoring?
[09:25:46] adaedra: bro do you even refactor
[09:26:04] toretore: has joined #ruby
[09:27:07] andrewh: has joined #ruby
[09:27:34] mistermocha: has joined #ruby
[09:28:04] yorickpeterse: no I don't know what refactoring is
[09:28:12] djellemah: Darkwater: do you need to rescue them separately?
[09:28:41] djellemah: A friend of a friend told me that rubymine refactors.
[09:29:03] adaedra: yorickpeterse: are you a programmer? :)
[09:29:03] Darkwater: djellemah: probably, I at least want unique error messages printed to the user for each one
[09:29:32] Darkwater: and since this build script is meant to be extensible I figured it might be best to pull printing messages out of the main logic
[09:29:54] CloCkWeRX: has joined #ruby
[09:30:01] Darkwater: actually I probaly don't have to rescue them separately if I put description messages in the error classes
[09:30:40] djellemah: Darkwater: there ya go
[09:31:20] Darkwater: that still leaves the question of RuntimeError with message vs custom *Error with static messages
[09:31:36] PedramT_: has joined #ruby
[09:32:13] yorickpeterse: adaedra: No I'm just a plumber
[09:32:31] ljarvis: yorickpeterse: adaedra: No, I brofactor
[09:32:48] Ox0dea: Darkwater: Would a user of your thing ever want to rescue any of your custom errors?
[09:33:11] CloCkWeRX: has joined #ruby
[09:33:15] maikowblue: has joined #ruby
[09:33:17] CloCkWeRX: has left #ruby: ()
[09:33:28] Darkwater: possibly yes
[09:33:52] ljarvis: then use custom ones, and probably inherit from a parent exception class that your library owns
[09:34:37] Ox0dea: &ri Exception2MessageMapper
[09:34:37] `derpy: http://ruby-doc.org/stdlib-2.3.0/libdoc/e2mmap/rdoc/Exception2MessageMapper.html
[09:34:48] Ox0dea: Might be overkill, might be perfect.
[09:35:07] wprice: has joined #ruby
[09:35:11] adaedra: Never heard of that before @_@
[09:35:18] TheHodge: has joined #ruby
[09:35:23] Ox0dea: You're supposed to read the standard library. :P
[09:35:29] ljarvis: ah yes, Exception2MessageMapper, part of the rarely used stdlib gang
[09:35:48] Darkwater: probably overkill, I like the idea of having a parent exception class tho
[09:35:49] adgtl: has joined #ruby
[09:35:49] idefine: has joined #ruby
[09:35:52] ljarvis: and rarely is being nice
[09:35:58] adaedra: Ox0dea: I wrote a bot to do that for me.
[09:36:18] ljarvis: it's too early for boston accents
[09:36:42] adaedra: But just in time for French accents.
[09:36:47] adaedra: ?? for everybody!
[09:37:26] ocbtec: has joined #ruby
[09:37:36] adaedra: O??x0??de??a??
[09:38:06] benlieb: has joined #ruby
[09:38:36] Ox0dea: http://i.imgur.com/Q83ybmQ.jpg
[09:39:39] LoneHerm_: has joined #ruby
[09:39:50] adgtl: has joined #ruby
[09:39:52] adgtl: has joined #ruby
[09:39:56] yorickpeterse: you lot heard about bronads?
[09:40:18] yorickpeterse: that and brosures are these really cool things from functional brogramming
[09:40:33] yorickpeterse: I also crush code in Braskell
[09:41:25] platzhirsch: has joined #ruby
[09:41:31] ljarvis: do you even broroutine
[09:43:13] Ox0dea: Apparently Haskell Brooks Curry has three programming languages named after him.
[09:43:16] adaedra: Just to be sure, `def param, options = {}` is replacable by `def param, **options` ?
[09:43:22] Ox0dea: Can't find anything about the middle one, though.
[09:44:10] neanderslob: has joined #ruby
[09:44:14] Ox0dea: adaedra: I suspect you'd have to purposely subvert something to break that equivalence, yes.
[09:44:35] ljarvis: adaedra: that means 'yes' in english btw
[09:44:54] Ox0dea: Anti-intellectualism can shove it.
[09:44:59] rideh: has joined #ruby
[09:45:14] Ox0dea: Not that that was even intellectualism.
[09:46:12] scepticulous: has joined #ruby
[09:46:36] duckpuppy: has joined #ruby
[09:48:04] dotix: has joined #ruby
[09:48:31] Ox0dea: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.59.9478
[09:48:42] pandaant: has joined #ruby
[09:49:30] Ox0dea: I'm not sure it could even be said to be a programming language if it only exists in a white paper.
[09:50:18] Domaldel: has joined #ruby
[09:50:24] karapetyan: has joined #ruby
[09:53:02] bruce__lee: has joined #ruby
[09:54:46] moeabdol: has joined #ruby
[09:55:31] FooMunki: has joined #ruby
[09:57:09] Xeago: has joined #ruby
[09:57:40] Xeago: has joined #ruby
[09:58:26] evidex: has joined #ruby
[10:01:17] platzhirsch: has joined #ruby
[10:02:28] Napear: has joined #ruby
[10:03:12] hamed_r: has joined #ruby
[10:04:38] Xeago: has joined #ruby
[10:05:10] RegulationD: has joined #ruby
[10:05:47] platzhirsch: has left #ruby: ()
[10:08:46] benhuda: has joined #ruby
[10:08:56] hayden_: has joined #ruby
[10:09:03] chipotle: has joined #ruby
[10:10:46] einarj: has joined #ruby
[10:10:54] PedramT: has joined #ruby
[10:12:19] platzhirsch: has joined #ruby
[10:15:31] blackmesa: has joined #ruby
[10:17:10] ElFerna: has joined #ruby
[10:17:13] baweaver: has joined #ruby
[10:17:20] PedramT: has joined #ruby
[10:17:47] mikecmpbll: has joined #ruby
[10:18:20] karapetyan: has joined #ruby
[10:21:44] karapetyan: has joined #ruby
[10:22:14] patchedmonkey: has joined #ruby
[10:23:09] norc: has joined #ruby
[10:24:00] trinaldi: has joined #ruby
[10:24:15] dlitvak: has joined #ruby
[10:24:27] Xeago: has joined #ruby
[10:24:30] djellemah: Ox0dea: Hmm. It looks like a hybrid of a fancy turing machine and a fancy lambda calculus.
[10:25:56] rodfersou: has joined #ruby
[10:25:58] Ox0dea: djellemah: That describes all programming. :)
[10:26:46] Ox0dea: Brooks is "purely academic" in the purest sense of the phrase.
[10:26:51] Ox0dea: Haskell++
[10:26:55] platzhirsch: has joined #ruby
[10:27:06] dlitvak_: has joined #ruby
[10:29:36] joonty: has joined #ruby
[10:30:17] ldnunes: has joined #ruby
[10:31:33] Ox0dea: https://en.wikipedia.org/wiki/Church_(programming_language)
[10:32:15] nettoweb: has joined #ruby
[10:32:27] norc: For sharing a resource (a session id) between processes that any process could possibly change, Im guessing my best bet is simply a shared file with proper flocks?
[10:32:43] Ox0dea: Seems the most straightforward, at any rate.
[10:33:18] Zai00: has joined #ruby
[10:33:43] ta: has joined #ruby
[10:33:44] Ox0dea: Alternatively, Process.setproctitle + https://en.wikipedia.org/wiki/Raft_(computer_science)
[10:34:21] kam270: has joined #ruby
[10:35:08] Ox0dea: There are also FP languages named Betrand and Russell.
[10:35:43] ldnunes: has joined #ruby
[10:35:46] Ox0dea: *Bertrand
[10:42:59] andrewvos: has joined #ruby
[10:44:34] PedramT: has joined #ruby
[10:46:21] heftig: norc: or a shared sqlite database
[10:47:23] duckpuppy: has joined #ruby
[10:47:45] norc: heftig: That would be overkill.
[10:48:12] heftig: norc: or tdb: http://www.rubydoc.info/gems/tdb/0.6.2
[10:48:20] heftig: it's a string key-value store
[10:48:49] Hounddog: has joined #ruby
[10:48:52] Ishido: has joined #ruby
[10:48:53] norc: ACTION waits for the obligatory "redis" shout
[10:48:54] heftig: hm, actually it seems to use marshalling to store whatever
[10:49:26] norc: Thanks for your input.
[10:49:34] apathogenic: has joined #ruby
[10:49:42] norc: I think Ill go with the File based approach, its simple enough and does not incur any extra dependencies.
[10:49:45] Ox0dea: A filesystem is a key-value store. :)
[10:49:51] Bloomer: has joined #ruby
[10:49:53] zeroDivisible: has joined #ruby
[10:50:00] norc: Not exactly!
[10:50:07] Ox0dea: With aliases!
[10:50:16] norc: hardlinks are more than just aliases.
[10:51:00] norc: Oh brilliant.
[10:51:06] heftig: norc: no need to do flocks, either. you could depend on atomic rename
[10:51:19] Ox0dea: >> $foo = 1; alias $bar $foo; $bar = 42; $foo # norc
[10:51:21] ruby[bot]: Ox0dea: # => 42 (https://eval.in/517579)
[10:51:38] djellemah: Ox0dea: Church looks similar as this http://www.mathstat.dal.ca/~selinger/quipper/ but I lack most of the knowledge needed to say that with any gravity.
[10:52:07] Ox0dea: djellemah: https://esolangs.org/wiki/Quipu is the first thing that came to mind.
[10:52:11] Ox0dea: It is completely unrelated.
[10:52:51] norc: Ox0dea: I was really surprised when I recently learned that `rm -rf /??has the potential to wreck your mainboard nowadays.
[10:53:06] Ox0dea: norc: That was pretty terrifying.
[10:53:36] Ox0dea: djellemah: I totally missed that Church is meant to be used for quantum computation.
[10:55:11] moei: has joined #ruby
[10:57:12] dlitvak: has joined #ruby
[10:57:21] heftig: norc: fn = "sessionid.#{Process.pid}"; begin; File.write(fn, "newsessionid"); File.rename(fn, "sessionid"); rescue; File.delete(fn) rescue nil; raise; end
[10:58:07] norc: heftig: Using flocks just seems cleaner.
[10:58:17] norc: While I admit your solution is quite compact
[10:58:27] heftig: atomic rename is widely used
[10:58:35] bluOxigen_: has joined #ruby
[10:59:28] norc: Oh. Wait.
[10:59:30] norc: heftig: I like it
[11:01:00] norc: heftig: How does this interact with concurrent reads though?
[11:01:16] heftig: when you open the file you'll either get the old one or the new one
[11:01:43] heftig: renaming over a file won't disturb any of its handles
[11:01:54] heftig: (so those still operate on the old file, which just lost its name)
[11:02:36] kinetogenic: has joined #ruby
[11:02:59] norc: How about deleting while its being read?
[11:03:13] norc: I mean I dont know much about how linux does blocking here.
[11:03:42] jespada: has joined #ruby
[11:03:49] karapetyan: has joined #ruby
[11:04:31] william3: has joined #ruby
[11:05:10] karapetyan: has joined #ruby
[11:07:03] pawnbox: has joined #ruby
[11:07:16] blackmesa: has joined #ruby
[11:07:30] pawnbox: has joined #ruby
[11:09:52] karapetyan: has joined #ruby
[11:10:33] yorickpeterse: So String has a method called String#-@ and String#+@, is there any established name for these kind of methods?
[11:10:41] yorickpeterse: as in, something like "prefix minus"?
[11:11:13] pawnbox: has joined #ruby
[11:11:37] atmosx: has joined #ruby
[11:12:05] Ox0dea: They're unary operators.
[11:12:20] Ox0dea: "unary minus"
[11:12:53] william3: has joined #ruby
[11:13:22] ruby[bot]: -b gfdhjf!*@*$#ruby-banned
[11:14:48] Azulinho: has joined #ruby
[11:16:24] einarj: has joined #ruby
[11:16:55] Antiarc: has joined #ruby
[11:16:55] PedramT: has joined #ruby
[11:18:23] inev: has joined #ruby
[11:19:09] bluOxigen: has joined #ruby
[11:20:06] dajobat: has joined #ruby
[11:20:13] Bish: is there something like the c++ "use" in ruby
[11:20:19] Bish: so i don't have the whole namespace path all the time
[11:20:23] Averna: has joined #ruby
[11:20:49] Ox0dea: Bish: You think you want top-level #include. :P
[11:21:16] norc: Which defeats the point entirely...
[11:21:24] norc: Of namespaces.
[11:21:27] Ox0dea: Bish doesn't want to have to type so much!
[11:21:44] Bish: norc: well, you don't have to do it
[11:21:52] Bish: so how does it destroy anything
[11:22:25] norc: Bish: Wait until you have a Agent::Finder::IO that defines a method calls open
[11:22:31] norc: I want to be in the chat on that day.
[11:22:42] scepticulous: why not alias the long namespace :D
[11:23:44] scepticulous: I mean SHORT = My::Way::Too::Long::Namespace
[11:23:44] norc: Ox0dea: So I was pondering a lot on your idea to pack a trace information into nil.
[11:23:49] norc: And Im actually beginning to like it more and more.
[11:24:05] kinetogenic: has joined #ruby
[11:24:11] Ox0dea: norc: There's a pretty serious problem, though.
[11:24:21] norc: scepticulous: If you have to specify it all the time you are likely doing something wrong though.
[11:24:29] Ox0dea: Or, well, the change would absolutely have to be made in MRI itself.
[11:24:37] Ox0dea: NaN is just NaN at the Ruby level.
[11:24:37] norc: scepticulous: Usually you are inside the module already which gives you lexical access to the constants defined within.
[11:25:07] scepticulous: norc: yes but in that case Bish would not have to use the NS anyway. Thus my suggestion addresses the other cases.
[11:25:16] scepticulous: Even though I never used this in ruby
[11:25:26] norc: And having public interfaces in Foo::Bar::Quux::Baz::Apple::Orange really indicates a code smell.
[11:25:51] Ox0dea: I don't think visibility has anything to do with Bish's objection.
[11:26:00] Ox0dea: He just doesn't like his code to drift to the right.
[11:26:09] norc: A chain helps.
[11:26:17] norc: People do it with dogs all the time.
[11:26:31] ElFerna: has joined #ruby
[11:26:35] Ox0dea: Wait, did you mean nil or NaN back there?
[11:26:45] toretore: has joined #ruby
[11:26:47] Bish: aliasing the namespace is a good idea, surprised i didn't think of that
[11:26:57] norc: nil, as that was what you envisioned.
[11:27:04] norc: You just demonstrated it with NaN I think.
[11:27:06] Ox0dea: But nil is a tagged pointer.
[11:27:16] norc: Stop it.
[11:27:20] norc: Spoiler alert.
[11:27:26] norc: Have not dived into nil yet. :S
[11:27:30] jas02: has joined #ruby
[11:27:44] dlitvak_: has joined #ruby
[11:30:16] mistermocha: has joined #ruby
[11:31:53] huyderman: has joined #ruby
[11:32:18] pawnbox: has joined #ruby
[11:32:33] ldnunes: has joined #ruby
[11:33:03] adgtl: has joined #ruby
[11:33:42] adgtl: has joined #ruby
[11:36:39] Cohedrin: has joined #ruby
[11:37:08] benhuda: has joined #ruby
[11:37:41] moeabdol: has joined #ruby
[11:38:51] Ox0dea: norc: https://eval.in/517642
[11:39:23] Ox0dea: Relevant: https://xkcd.com/356/
[11:39:43] aryaching: has joined #ruby
[11:39:56] moeabdol: has joined #ruby
[11:40:52] kam270: has joined #ruby
[11:41:50] Ox0dea: It's just that there's no guarantee on the order, but the details of when it becomes unordered in MRI are... "interesting" isn't quite the word.
[11:42:09] dlitvak: has joined #ruby
[11:42:33] norc: Yeah I got that much.
[11:46:10] symbol: has joined #ruby
[11:46:21] sandstrom: has joined #ruby
[11:48:08] duckpuppy: has joined #ruby
[11:48:43] ljames: has joined #ruby
[11:49:11] Shaboum: has joined #ruby
[11:49:48] blackmesa: has joined #ruby
[11:52:21] huyderman: has joined #ruby
[11:52:39] sdothum: has joined #ruby
[11:58:26] adgtl: has joined #ruby
[11:59:06] shuriu: has joined #ruby
[11:59:16] karapetyan: has joined #ruby
[12:00:43] underisive: has joined #ruby
[12:01:30] wprice: has joined #ruby
[12:02:05] Kallis: has joined #ruby
[12:02:15] Mon_Ouie: has joined #ruby
[12:02:42] dlitvak: has joined #ruby
[12:06:08] flughafen_: has joined #ruby
[12:06:34] ElFerna: has joined #ruby
[12:07:38] Bloomer: has joined #ruby
[12:08:11] ruby-lang877: has joined #ruby
[12:08:13] ruby859: has joined #ruby
[12:09:29] mdw: has joined #ruby
[12:10:17] Coral: has joined #ruby
[12:10:33] adgtl: has joined #ruby
[12:11:19] Macaveli: has joined #ruby
[12:13:00] aspiers: has joined #ruby
[12:13:12] Ox0dea: norc: https://eval.in/517650
[12:13:23] Ox0dea: Any recourse to making that be [3,2,1] somehow?
[12:13:37] adgtl: has joined #ruby
[12:13:38] txd: has joined #ruby
[12:14:27] einarj: has joined #ruby
[12:14:30] discourageable: has joined #ruby
[12:14:42] rizenine: has joined #ruby
[12:17:40] dlitvak_: has joined #ruby
[12:17:48] roshanavand: has joined #ruby
[12:18:49] baweaver: has joined #ruby
[12:19:54] TheMoonMaster: has joined #ruby
[12:21:11] tknz: has joined #ruby
[12:21:17] A124: has joined #ruby
[12:31:12] duckpuppy: has joined #ruby
[12:34:05] william3: has joined #ruby
[12:35:19] jds: has joined #ruby
[12:35:19] william3: has joined #ruby
[12:35:24] jottr: has joined #ruby
[12:38:09] CloCkWeRX: has joined #ruby
[12:38:27] PedramT: has joined #ruby
[12:39:02] sgambino: has joined #ruby
[12:39:28] DEA7TH: has joined #ruby
[12:40:03] bilus`: has joined #ruby
[12:44:07] rsc___: has joined #ruby
[12:44:59] ph0: has joined #ruby
[12:45:58] tatsuo: has joined #ruby
[12:47:00] quaristice: has joined #ruby
[12:47:06] Bloomer: has joined #ruby
[12:48:44] blackmesa: has joined #ruby
[12:49:24] Polysics: has joined #ruby
[12:50:16] adgtl: has joined #ruby
[12:51:14] nettoweb: has joined #ruby
[12:53:02] johnmilton: has joined #ruby
[12:53:20] PedramT_: has joined #ruby
[12:53:51] snowy: has joined #ruby
[12:54:29] antgel: has joined #ruby
[12:54:40] tamarin: has joined #ruby
[12:55:08] sgambino: has joined #ruby
[12:57:01] joonty: has joined #ruby
[12:57:34] CloCkWeRX: has joined #ruby
[12:57:57] pawnbox: has joined #ruby
[12:58:03] SCHAAP137: has joined #ruby
[12:59:14] pawnbox: has joined #ruby
[13:02:05] lubekpl: has joined #ruby
[13:02:29] dlitvak: has joined #ruby
[13:04:09] bronson: has joined #ruby
[13:04:18] PedramT: has joined #ruby
[13:04:34] jxs_: has joined #ruby
[13:07:41] sgambino: has joined #ruby
[13:08:48] ElFerna_: has joined #ruby
[13:08:50] karapetyan: has joined #ruby
[13:09:40] k13nox: has joined #ruby
[13:12:23] synthroid: has joined #ruby
[13:12:51] querimoniousness: has joined #ruby
[13:12:53] maesitos: has joined #ruby
[13:13:38] dionysus69: has joined #ruby
[13:16:29] sondr3: has joined #ruby
[13:16:50] flughafen_: has joined #ruby
[13:20:09] yalue: has joined #ruby
[13:21:16] krz: has joined #ruby
[13:24:44] symbol: has joined #ruby
[13:29:07] dlitvak: has joined #ruby
[13:29:29] goodcodeguy: has joined #ruby
[13:31:34] dotix: has joined #ruby
[13:32:05] mistermocha: has joined #ruby
[13:36:05] nfk: has joined #ruby
[13:36:55] william3: has joined #ruby
[13:37:24] Ishido: has joined #ruby
[13:37:55] lubekpl: has joined #ruby
[13:38:41] querimoniousness: has joined #ruby
[13:39:38] blackmesa: has joined #ruby
[13:40:08] cdg: has joined #ruby
[13:42:51] zacstewart: has joined #ruby
[13:43:38] symbol: has joined #ruby
[13:44:11] patchedmonkey: has joined #ruby
[13:44:15] chipotle: has joined #ruby
[13:44:27] EdwardIII: how come in ruby to call a lambda you say f.call()? why not just f()?
[13:44:49] openstruct: has joined #ruby
[13:44:50] openstruct: has joined #ruby
[13:44:56] yorickpeterse: because the parser treats f() as a method call to "f"
[13:44:59] yorickpeterse: and not as "f.call"
[13:45:04] yorickpeterse: You can do this though:
[13:45:13] yorickpeterse: >> x = lambda { 10 }; x.()
[13:45:14] ruby[bot]: yorickpeterse: # => 10 (https://eval.in/517693)
[13:45:19] atomical: has joined #ruby
[13:46:11] EdwardIII: heh x.() is shorthand for x.call()?
[13:46:40] EdwardIII: or something more complex?
[13:47:13] quaristice: has joined #ruby
[13:48:35] unl0ckd: has joined #ruby
[13:48:43] ta: has joined #ruby
[13:49:46] Shaboum: has joined #ruby
[13:50:38] adaedra: it's just syntax sugar
[13:54:38] rsc___: has joined #ruby
[13:57:52] bweston92: has joined #ruby
[13:58:12] haylon: has joined #ruby
[13:58:37] uncorruptive: has joined #ruby
[13:59:50] symm-: has joined #ruby
[14:00:05] soahccc: How do you debug StackError exceptions with just one line of backtrace? :(
[14:00:35] quakephil: has joined #ruby
[14:01:12] soahccc: https://gist.github.com/2called-chaos/4a2cf46d395f4a37b2d5 is that error
[14:04:50] einarj: has joined #ruby
[14:06:33] djellemah: >> f = ->{:yeehaa}; [f[], f.(), f::(), f.call] # EdwardIII
[14:06:34] ruby[bot]: djellemah: # => [:yeehaa, :yeehaa, :yeehaa, :yeehaa] (https://eval.in/517711)
[14:06:38] RegulationD: has joined #ruby
[14:07:28] soahccc: Could I assume Thread.current.backtrace to be "the stack"?
[14:08:14] Scripore: has joined #ruby
[14:08:46] goodcodeguy: has joined #ruby
[14:09:20] haylon: djellemah, htat was pretty cool
[14:10:02] quaristice: has joined #ruby
[14:10:57] sgambino: has joined #ruby
[14:11:43] dlitvak: has joined #ruby
[14:12:14] Hanmac: djellemah: as this shows: all are totally the same in the underlying vm code
[14:12:14] Hanmac: >> %w[f.() f.call f::()].uniq {|x| RubyVM::InstructionSequence.compile(x).disasm }.one?
[14:12:16] ruby[bot]: hanmac: # => true (https://eval.in/517713)
[14:12:32] uncorruptive: has joined #ruby
[14:14:36] Ropeney: has joined #ruby
[14:16:25] silicio: has joined #ruby
[14:16:29] avenj: has joined #ruby
[14:16:29] avenj: has joined #ruby
[14:17:28] soahccc: Alright... how you debug stack level errors in ruby? Use ruby >=2.2 :D
[14:18:19] apeiros: soahccc: you read the backtrace?
[14:18:36] soahccc: apeiros: there was no backtrace really now I have it
[14:18:42] vdamewood: has joined #ruby
[14:18:45] patchedmonkey: has joined #ruby
[14:18:47] soahccc: apeiros: https://bugs.ruby-lang.org/issues/6216
[14:18:59] openstruct: has joined #ruby
[14:18:59] openstruct: has joined #ruby
[14:19:22] themsay: has joined #ruby
[14:19:41] apeiros: soahccc: hm? ruby itself does not truncate the backtrace afaik. only places where you print it do.
[14:19:47] baweaver: has joined #ruby
[14:19:57] apeiros: i.e. if you yourself rescue it and do a `puts exception.backtrace`, you'll get the full backtrace
[14:20:20] soahccc: apeiros: in my gist you see I directly ask the exception object for its backtrace but prior to ruby 2.2 you just get one line of backtrace
[14:20:39] apeiros: soahccc: did you rescue the exception?
[14:20:45] soahccc: apeiros: yes
[14:21:01] apeiros: so you say `puts ex.backtrace` gives you only a single line?
[14:21:14] soahccc: on 2.1 at least
[14:21:16] apeiros: ok. that's curious. I've never experienced that.
[14:21:23] Shaboum: has joined #ruby
[14:24:01] maikowblue_: has joined #ruby
[14:24:30] william3: has joined #ruby
[14:25:09] codecop: has joined #ruby
[14:26:03] sandstrom: has joined #ruby
[14:26:14] floatingpoint: has joined #ruby
[14:26:17] snowy: has joined #ruby
[14:26:35] cdg: has joined #ruby
[14:26:58] mdw: has joined #ruby
[14:29:56] blackmesa: has joined #ruby
[14:32:54] tuxaanand: has joined #ruby
[14:32:57] dlitvak: has joined #ruby
[14:34:10] eikood: has joined #ruby
[14:36:10] platzhirsch: has joined #ruby
[14:38:30] TomPeed: has joined #ruby
[14:41:07] JDiPierro: has joined #ruby
[14:41:16] lucasb: has joined #ruby
[14:41:22] prettifier: has joined #ruby
[14:41:44] eikood: has joined #ruby
[14:42:44] eikood: has joined #ruby
[14:42:46] sankaber: has joined #ruby
[14:43:14] eikood: has joined #ruby
[14:43:33] aspiers: has joined #ruby
[14:44:19] eikood: has joined #ruby
[14:45:37] godzillaenlacasa: has joined #ruby
[14:45:41] sankaber: has joined #ruby
[14:47:25] floror: has joined #ruby
[14:50:53] JoshGlzBrk: has joined #ruby
[14:50:55] ramortegui: has joined #ruby
[14:51:35] babblebre: has joined #ruby
[14:54:19] sumark: has joined #ruby
[14:54:24] scepticulous: has joined #ruby
[14:55:00] pdoherty: has joined #ruby
[14:55:37] mary5030: has joined #ruby
[14:57:05] malconis: has joined #ruby
[14:57:37] Diabolik: is false.present? ? false : true the same as false || true?
[14:57:49] cdg_: has joined #ruby
[14:58:03] Diabolik: >> false.present? ? false : true == false || true
[14:58:04] ruby[bot]: Diabolik: # => undefined method `present?' for false:FalseClass (NoMethodError) ...check link for more (https://eval.in/517744)
[15:00:24] mary5030: has joined #ruby
[15:03:20] dlitvak_: has joined #ruby
[15:04:00] einarj_: has joined #ruby
[15:04:34] lucasb: yes, I think (false.present? ? false : true) == (false || true) is a tautology :)
[15:05:14] whippythellama: has joined #ruby
[15:05:37] apeiros: Diabolik: no, it's not
[15:05:50] Diabolik: apeiros what's the difference?
[15:06:09] bkxd: has joined #ruby
[15:06:32] apeiros: hm, actually??? I'm not sure I can make sense of this
[15:06:53] pseudocumenyl: has joined #ruby
[15:06:54] apeiros: how'd an actual use-case look? `x.present? ? false : true` vs. what?
[15:07:11] apeiros: vs. `x ? false : true`? or something else?
[15:07:15] Diabolik: well im looking at this
[15:07:15] Diabolik: ACTION http://api.rubyonrails.org/classes/Object.html#method-i-presence
[15:07:18] Diabolik: and trying to figure out the value
[15:07:36] apeiros: "".presence || "default"
[15:07:38] apeiros: that's the value
[15:08:00] einarj: has joined #ruby
[15:08:04] apeiros: or rather: x.presence || default, vs. x.present? ? x : default
[15:08:25] apeiros: the longer the x expression is, the more obvious the succinctness of the former form becomes
[15:08:36] stannard: has joined #ruby
[15:09:04] apeiros: and the answer to a different question: `x.present? ? ???` is not equivalent to `x ? ???`
[15:09:38] stannard: has joined #ruby
[15:09:54] livcd_: for those that use emacs. Do you guys use rsense or robe mode ?
[15:09:55] Diabolik: the statement i posted
[15:09:58] p1k: has joined #ruby
[15:10:07] Diabolik: in what circumstances would they be different apeiros
[15:10:23] apeiros: the statement you posted makes no sense as all are literals and you wouldn't use that in any real case.
[15:10:28] pseudocumenyl: has joined #ruby
[15:11:12] apeiros: `false.present? false : true` is equivalent to a plain `true`. there's really no point in considering it.
[15:11:35] Diabolik: what im asking is logic wise are they identical
[15:11:42] Diabolik: rmeove false/true and replace with xy
[15:11:51] pseudocumenyl: has joined #ruby
[15:12:02] nofacade: has joined #ruby
[15:12:21] apeiros: Diabolik: again, please make a concrete example.
[15:12:23] x77686d: has joined #ruby
[15:12:50] Diabolik: x.present? ? x : y vs x || y
[15:13:03] Diabolik: is the first a longer version of the second or are there any differences
[15:13:09] apeiros: would have different output in above.
[15:13:22] apeiros: because present? does not test for falsy
[15:13:32] apeiros: "".present? # => false
[15:13:37] apeiros: but "" is trueish
[15:13:49] jamesaxl: has joined #ruby
[15:13:54] arlek: has joined #ruby
[15:14:13] apeiros: so given `x = ""`, `x.present? ? x : y` # => y, meanwhile `x || y` => x
[15:14:25] apeiros: hi jamesaxl
[15:15:00] apeiros: Diabolik: but `x.present? ? x : y` is equivalent to `x.presence || y`
[15:15:59] Diabolik: interesting
[15:16:48] dionysus69: has joined #ruby
[15:18:59] jamesaxl: Could you help me, I am looking for a network framwork like Python-Twisted?
[15:19:08] pawnbox: has joined #ruby
[15:20:09] ddv: jamesaxl: EventMachine
[15:20:21] idefine: has joined #ruby
[15:20:59] jamesaxl: ddv: thank you
[15:21:09] senayar^: has joined #ruby
[15:22:03] sucks: has joined #ruby
[15:28:35] Xeago: has joined #ruby
[15:29:32] y2mq37: has joined #ruby
[15:30:04] einarj_: has joined #ruby
[15:31:20] B1n4r10: has joined #ruby
[15:31:48] blackmesa: has joined #ruby
[15:32:26] pseudocumenyl: has joined #ruby
[15:33:29] DmitryBochkarev: has joined #ruby
[15:33:35] dlitvak: has joined #ruby
[15:33:56] ponga: what else do we have than Sinatra and Rails for ruby?
[15:34:24] einarj: has joined #ruby
[15:34:33] patchedmonkey: has joined #ruby
[15:34:39] Hanmac: ponga: what do you mean "for ruby" ? i use it for many other different stuff
[15:34:45] ljarvis: ponga: https://www.ruby-toolbox.com/categories/web_app_frameworks
[15:34:47] Mon_Ouie: has joined #ruby
[15:34:47] ponga: in ruby, sorry
[15:34:54] ljarvis: if you mean web frameworks
[15:34:55] ponga: or *with ruby
[15:35:05] ponga: thanks ljarvis
[15:35:13] Bish: ponga: what do you mean? you can patch PE files with ruby, theres a gem for that
[15:35:16] floror: has joined #ruby
[15:35:25] Bish: there is a gem for everything, in my experience
[15:35:29] ponga: Bish: what gem is it
[15:35:54] Hanmac: my stuff i wrote is mostly non-web related, recently i revite my gaming scripting stuff
[15:35:59] ponga: i never knew we had PE file with ruby, damn
[15:36:22] Bish: pedump a.e
[15:36:28] Bish: there is also ruby-elf which i also liked very much
[15:36:39] Bish: for patching binaries
[15:37:40] adgtl: has joined #ruby
[15:39:06] LeMalandrin: has joined #ruby
[15:39:22] Hanmac: Bish: i once did see an ruby implementation for EFI ;P means you can run ruby without an OS XD
[15:40:00] tubbo: hanmac: orly
[15:40:03] tubbo: that sounds interesting
[15:40:16] tubbo: does that actually work though?
[15:40:45] Hanmac: hm there was a test 2012 http://masamitsu-murase.blogspot.de/2012/05/mruby-on-efi-shell.html
[15:40:51] LeMalandrin: i have an issue on rails :/ Am i in the right room ?
[15:41:09] dopamean1: has joined #ruby
[15:41:37] Hanmac: LeMalandrin: try #rubyonrails
[15:41:42] sumark: has left #ruby: ()
[15:41:51] william3: has joined #ruby
[15:42:09] LeMalandrin: oh thank you hanmac :)
[15:42:11] Hanmac: ACTION thinks that #IssueOnRails would also be a funny room name XD
[15:42:14] ponga: I want to ask user number of questions to fill in, which in result gives out a result filled in with the answers, in Web browser. what would be my best approach regarding; what language to use, what library/framework? to use, etc
[15:42:37] ponga: I guess sinatra can solve my problem
[15:43:11] crowell: has joined #ruby
[15:43:12] crowell: has joined #ruby
[15:43:14] apeiros: ponga: with the given requirement, about any language & framework would work.
[15:43:34] apeiros: there are even completely implemented tools around, like limesurvey (iirc that was the name)
[15:43:40] ponga: apeiros: thanks I will spend time learning sinatra
[15:43:53] ponga: or nodejs? maybe
[15:43:55] Bish: ponga: i liked webmachine
[15:44:03] Bish: i still like webmachine*
[15:44:29] inev: has left #ruby: ("Leaving")
[15:44:38] Bish: wrong channel for nodejs, but still cool
[15:44:48] Bish: but i guess that depends too much on what you want to do
[15:44:51] momomomomo: has joined #ruby
[15:45:39] william3: has joined #ruby
[15:46:06] william3: has joined #ruby
[15:50:34] dfinninger: has joined #ruby
[15:51:11] Renich: has joined #ruby
[15:51:32] EdwardIII: hrm trying to create a braindead app. i have lib/ns_finder.rb, but in <root dir>/finder.rb, when i do 'require "ns_finder"' i get "LoadError: cannot load such file -- ns_finder"?
[15:51:47] wprice_: has joined #ruby
[15:51:48] EdwardIII: in perl i'd probably do perl -I'lib' finder.pl
[15:52:57] JDiPierro: has joined #ruby
[15:53:01] tubbo: hanmac: lol can you read japanese?
[15:53:08] karapetyan: has joined #ruby
[15:53:12] apeiros: EdwardIII: and in ruby you do ruby -Ilib
[15:53:15] EdwardIII: huh, same thing works in ruby heh
[15:53:22] apeiros: surpriise ;-)
[15:53:28] EdwardIII: the proper approach is probably to make a gem right?
[15:53:30] tubbo: i had to turn translating off because chrome would always try to translate this spanish-language web app i'm working on
[15:53:43] apeiros: EdwardIII: well, even when making a gem I use ruby -Ilib bin/foo
[15:53:49] apeiros: that is while developing
[15:54:09] adgtl_: has joined #ruby
[15:54:13] apeiros: once installed, the -Ilib is no longer necessary. but then again, neither is the prefixed `ruby` necessary.
[15:54:15] tubbo: EdwardIII: all -I does is add that directory to the $LOAD_PATH. you can do that *in* Ruby itself as well.
[15:54:48] Hanmac: tubbo: no but i read a german translation of it in a blog
[15:55:45] Macaveli: has joined #ruby
[15:55:48] shreddor: has joined #ruby
[15:58:40] kmckelvin: has joined #ruby
[15:59:28] william3: has joined #ruby
[15:59:29] einarj: has joined #ruby
[15:59:29] y2mq37: has joined #ruby
[15:59:42] decoponio: has joined #ruby
[16:00:07] circ-user-NoIIC: has joined #ruby
[16:00:30] EdwardIII: in irb can i force it to like, reload a module?
[16:00:38] EdwardIII: save me quitting & restarting all the time when i'm playing with something?
[16:01:19] apeiros: load "file.rb"
[16:01:20] dajobat: Edward: you could probably fork a new instance?
[16:01:22] AnonRecluse13: has joined #ruby
[16:01:27] apeiros: load unlike require needs the suffix
[16:01:51] mary5030: has joined #ruby
[16:02:22] dhollinger: has joined #ruby
[16:03:03] roshanavand: has joined #ruby
[16:03:44] einarj_: has joined #ruby
[16:05:00] tenderlove: has joined #ruby
[16:05:20] EdwardIII: very cool, thanks apeiros
[16:05:24] dlitvak_: has joined #ruby
[16:05:31] B1n4r10: has joined #ruby
[16:05:33] dotix: has joined #ruby
[16:05:40] Hanmac: apeiros: i dont know how it totally works, but did you try to call "irb" in "irb" ?;P
[16:05:54] apeiros: hanmac: it'll open a nested irb session
[16:05:56] apeiros: works with pry too
[16:06:04] apeiros: you can even specify an object for context
[16:06:19] apeiros: i.e. I often do `pry ActiveRecord::Migration` in a rails console.
[16:06:19] Hanmac: hm yeah, is that enough for reloading or doesnt that solve the problem?
[16:06:29] apeiros: it doesn't reload anything ;-)
[16:07:04] apeiros: you could do `exec('irb', *ARGV')`
[16:07:05] y2mq37: has joined #ruby
[16:07:36] davedev24: has joined #ruby
[16:07:37] apeiros: that'd reload everything. but you'd also lose all data from the current session.
[16:08:59] jgpawletko: has joined #ruby
[16:09:14] tomchapin: has joined #ruby
[16:09:21] EdwardIII: speaking of irb, what stupidity am i doing that stops me from being able to do single-line blocks? report.no_nameservers.each({|d| d.to_s })
[16:09:37] angelixd: has joined #ruby
[16:09:57] dotix: has joined #ruby
[16:09:57] dotix: has joined #ruby
[16:10:17] lucasb: put outside the parens
[16:10:40] Takumo: Hi all, I'm trying to return a PDF from aGrape
[16:11:04] Takumo: an API using Grape, but I get a rack error saying it can't convert \xE2 from ASCII-8bit to UTF-8
[16:11:15] xapak: has joined #ruby
[16:11:41] Takumo: should I be instructing rack to set the content encoding to ascii-8bit and not try to convert to utf-8?
[16:12:18] arthropododo: has joined #ruby
[16:12:38] xapak: Can someone help me figure out where should I look for the methods mentioned here? https://github.com/cheezy/page-object/blob/master/lib/page-object.rb#L63-L65
[16:13:02] xapak: I did a grep of the whole project looking for example for 'initialize_page', and I don???t see it defined anywhere.
[16:13:10] xapak: So I???m curious if it???s a Ruby something.
[16:13:38] momomomomo: has joined #ruby
[16:14:51] kies^: has joined #ruby
[16:15:01] chouhoulis: has joined #ruby
[16:15:36] aegis3121: has joined #ruby
[16:16:00] codecop: has joined #ruby
[16:16:02] lucasb: if I understood correctly, those methods are just hooks that will be called for you, if you define them
[16:18:25] weemsledeux: has joined #ruby
[16:18:29] einarj: has joined #ruby
[16:18:33] dlitvak: has joined #ruby
[16:19:14] EdwardIII: heh durr it was working already, i was just misreading the output
[16:19:32] EdwardIII: to_s was showing the default object representation... because i was looking at the wrong object like a fool
[16:20:13] zast: has joined #ruby
[16:20:18] xapak: lucasb, I see, but where should they exist or in what context? Looks weird to me. :p
[16:21:13] lucasb: i don't know, but I think you can put them in the class that includes the PageObject module
[16:21:41] lucasb: class MyPage; include PageObject; def initialize_accessors; ... end; def initialize_page; ...; end end
[16:22:00] jgt4: has joined #ruby
[16:22:49] einarj: has joined #ruby
[16:23:13] wpm: has joined #ruby
[16:26:38] jgt: has joined #ruby
[16:26:57] hamed_r: has joined #ruby
[16:27:02] wpm: has joined #ruby
[16:27:23] einarj: has joined #ruby
[16:28:03] flughafen_: has joined #ruby
[16:28:17] hashrocket: has joined #ruby
[16:28:42] Gnut: has joined #ruby
[16:29:09] zacstewart: has joined #ruby
[16:29:12] adgtl: has joined #ruby
[16:31:56] dfinninger: has joined #ruby
[16:32:06] DexterLB: has joined #ruby
[16:33:44] xapak: lucasb, got it. Thanks for the explanations!
[16:35:02] roger_rabbit: has joined #ruby
[16:35:05] asccigcc: has joined #ruby
[16:35:10] mark4: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PONG :leguin.freenode.net")
[16:35:58] amoeba: has joined #ruby
[16:36:51] Jardayn: has joined #ruby
[16:37:19] xapak: has left #ruby: ()
[16:37:58] mistermocha: has joined #ruby
[16:44:22] treehug88: has joined #ruby
[16:44:24] LuckyABA: has joined #ruby
[16:44:46] dlitvak: has joined #ruby
[16:46:34] FooMunki: has joined #ruby
[16:46:47] kobain: has joined #ruby
[16:47:23] stannard: has joined #ruby
[16:47:31] baweaver: has joined #ruby
[16:47:37] dayjo: has joined #ruby
[16:48:12] atomical: has joined #ruby
[16:48:24] aspiers: has joined #ruby
[16:49:34] tenderlove: has joined #ruby
[16:49:58] einarj_: has joined #ruby
[16:50:07] sigurding: has joined #ruby
[16:51:21] polishdub: has joined #ruby
[16:51:24] graffix222: has joined #ruby
[16:52:42] sneakerhax: has joined #ruby
[16:53:06] blackmesa: has joined #ruby
[16:53:32] johnnyt: has joined #ruby
[16:53:58] einarj: has joined #ruby
[16:54:53] hfp: Hi, what do double asterisks mean? As in `def foo(**args)'
[16:54:57] lubekpl: has joined #ruby
[16:55:16] EdwardIII: hfp: optional params
[16:55:18] chouhoulis: has joined #ruby
[16:55:46] malconis: has joined #ruby
[16:55:50] hfp: EdwardIII: How is it different from `def foo(*args)' ?
[16:56:28] adaedra: it concerns kwargs
[16:57:04] adaedra: def foo(*a, **b); [a, b]; end; foo 1, 2, 3, a: 4, c: 5
[16:57:09] adaedra: >> def foo(*a, **b); [a, b]; end; foo 1, 2, 3, a: 4, c: 5
[16:57:10] ruby[bot]: adaedra: # => [[1, 2, 3], {:a=>4, :c=>5}] (https://eval.in/517832)
[16:58:34] replay: has joined #ruby
[17:01:43] amclain: has joined #ruby
[17:02:23] bruce__lee: has joined #ruby
[17:02:42] momomomomo: has joined #ruby
[17:03:14] LoneHerm_: has joined #ruby
[17:03:15] Lildirt: has joined #ruby
[17:04:07] patchedmonkey: has joined #ruby
[17:04:11] lessless: has joined #ruby
[17:04:31] dfinninger: has joined #ruby
[17:05:05] Zai00: has joined #ruby
[17:05:42] dhollinger: has joined #ruby
[17:06:21] bronson: has joined #ruby
[17:06:26] Synthead: has joined #ruby
[17:07:49] kith: has joined #ruby
[17:07:52] ohaibbq: has joined #ruby
[17:08:02] malconis: has joined #ruby
[17:08:09] RegulationD: has joined #ruby
[17:08:30] dlitvak: has joined #ruby
[17:08:43] benlieb: has joined #ruby
[17:09:49] jespada: has joined #ruby
[17:10:17] davedev24: has joined #ruby
[17:11:02] azure32: has joined #ruby
[17:11:03] jokke: (how) can i provide a functionality like String("foo") for my own class?
[17:11:07] PD028300: has joined #ruby
[17:11:21] davedev24: has joined #ruby
[17:12:57] KensoDev: has joined #ruby
[17:13:40] mdw: has joined #ruby
[17:13:42] lucasb: module Kernel; def MyObject(*args); MyObject.new(*args); end end
[17:13:56] jokke: lucasb: oh alright
[17:14:13] Lildirt: has joined #ruby
[17:16:33] Coral: has joined #ruby
[17:17:53] jackjackdripper: has joined #ruby
[17:18:12] kfpratt: has joined #ruby
[17:19:27] Jardayn: has joined #ruby
[17:19:49] tatsuo: has joined #ruby
[17:23:45] pawnbox: has joined #ruby
[17:24:55] karapetyan: has joined #ruby
[17:28:05] roshanavand: has joined #ruby
[17:28:11] pawnbox: has joined #ruby
[17:28:59] Guest38: has joined #ruby
[17:29:59] EdwardIII: what's the advantage of String("foo") over just String.new("foo")? less verbose?
[17:30:09] blackmesa: has joined #ruby
[17:30:46] Maletor: has joined #ruby
[17:30:52] stupidcracker: has joined #ruby
[17:30:57] ss_much: has joined #ruby
[17:31:56] shevy: EdwardIII it's similar to Integer('5')
[17:32:05] jakobhans: has joined #ruby
[17:32:12] patchedmonkey: has joined #ruby
[17:32:34] shevy: Integer('5d') ArgumentError: invalid value for Integer(): "5d"
[17:32:35] finisherr: has joined #ruby
[17:32:38] shevy: String(5) # => "5"
[17:32:45] shevy: String.new 5 # TypeError: no implicit conversion of Fixnum into String
[17:32:53] shevy: so it is not the same from a conceptual point of view
[17:33:16] floror: has joined #ruby
[17:33:25] stupidcracker: suck my big black dick bitch ass cracker
[17:33:50] symm-: has joined #ruby
[17:34:02] fedexo: has joined #ruby
[17:35:58] EdwardIII: shevy: but what's the advantage?
[17:36:11] rht: has joined #ruby
[17:36:47] dlitvak_: has joined #ruby
[17:37:23] pushcx: EdwardIII: Some of them provide different functionality, like Array(2) vs Array.new(2)
[17:37:32] NeckBeardPrince: has joined #ruby
[17:37:54] roshanavand: has joined #ruby
[17:37:55] shevy: EdwardIII one is more stringent than the other
[17:38:06] einarj: has joined #ruby
[17:38:29] stupidcracker: europe is for crackers so go back to europe fucking cracker
[17:38:39] shevy: someone ban stupidcracker pls
[17:38:41] shevy: Array('2') # => ["2"]
[17:38:50] shevy: Array.new '2' # TypeError: can't convert String to Integer (String#to_int gives NilClass)
[17:38:53] stupidcracker: go back to europe bitch
[17:39:03] EdwardIII: shevy: but why?
[17:39:08] stupidcracker: yall crackers racist af and you wanna ban me cuz i'm black racist bitch
[17:39:11] EdwardIII: shevy: why is it designed that way?
[17:41:22] shevy: EdwardIII http://ruby-doc.org/core-2.3.0/Kernel.html#method-i-Integer
[17:41:33] shevy: you don't get the same behaviour
[17:41:38] shevy: it is a method on Kernel
[17:41:39] shevy: Integer("0x1a") #=> 26
[17:41:47] shevy: Integer.new "0x1a" # NoMethodError: undefined method `new' for Integer:Class
[17:41:52] pushcx: EdwardIII: Ruby makes a subtle distinction between "things that can be converted" and "things that pretty much are" in the difference between to_s and to_str, to_a and to_ary.
[17:43:58] nettoweb: has joined #ruby
[17:44:44] dlitvak: has joined #ruby
[17:45:03] ur5us: has joined #ruby
[17:45:17] idefine: has joined #ruby
[17:46:40] Jackneill: has joined #ruby
[17:48:10] chipotle: has joined #ruby
[17:49:34] blackoperat: has joined #ruby
[17:49:48] einarj: has joined #ruby
[17:50:24] EdwardIII: pushcx: interesting, i'd wondered why they were there too heh
[17:50:38] EdwardIII: well i think i'll sign off for the week, thanks guys
[17:52:34] mdw: has joined #ruby
[17:53:53] intrigueD: has joined #ruby
[17:55:17] baweaver: has joined #ruby
[17:55:20] chipotle: has joined #ruby
[17:55:48] jottr: has joined #ruby
[17:55:59] ljarvis: yorickpeterse: https://github.com/sparklemotion/mechanize/issues/462 THANKS BRO
[17:56:17] [Butch]: has joined #ruby
[17:56:32] drbrain: !ban stupidcracker !P
[17:56:32] ruby[bot]: +bb stupidcracker!*@*$#ruby-banned *!*@gateway/web/freenode/ip.46.165.246.178$#ruby-banned
[17:56:32] ruby[bot]: ruby[bot] kicked stupidcracker: offense, see http://ruby-community.com/pages/user_rules
[17:56:49] drbrain: thank you all for remaining calm during that incursion
[17:57:01] ljarvis: oh wow I missed that somehow
[17:58:28] pushcx: He wanted attention, so I figured ignoring him completely would annoy him most. :)
[17:58:47] veleno: has joined #ruby
[17:59:04] drbrain: they haven't shown up in in ruby-banned yet, though
[17:59:47] veleno: hello. we???re hitting a performance issue with the execution of this method when the input is particularly large: https://github.com/splay-project/splay/blob/master/src/controller/lib/jobd.rb#L92 it generates a JSON string. apart from changing radically its code, is there something in there particularly obvious that triggers to the eyes of you experts ?
[18:00:18] drbrain: veleno: use interpolation and << instead of +/+=
[18:00:19] lagweezle: Well, that was interesting...
[18:01:06] drbrain: >> out = ''; out << %Q({"ref":#{list['ref']}"); out
[18:01:07] ruby[bot]: drbrain: # => undefined local variable or method `list' for main:Object (NameError) ...check link for more (https://eval.in/517865)
[18:01:36] drbrain: >> out = ''; out << %Q({"ref":"#{'some_ref'}")
[18:01:37] ruby[bot]: drbrain: # => "{\"ref\":\"some_ref\"" (https://eval.in/517866)
[18:01:41] veleno: drbrain: not sure to have understood the suggestion.
[18:01:55] veleno: given the line: out = '{"ref":"' + list['ref'] + '"'
[18:02:08] firstdayonthejob: has joined #ruby
[18:02:11] drbrain: or, even, use a JSON library
[18:02:29] drbrain: veleno: see ruby[bot] response above ???
[18:02:51] einarj: has joined #ruby
[18:03:00] veleno: drbrain: i see. the +/+= do create temp strings ?
[18:03:12] drbrain: yes, then throws them away
[18:03:39] drbrain: so "a" + "b" creates three strings, while "a" << "b" creates two
[18:04:46] dlitvak_: has joined #ruby
[18:05:18] drbrain: so as `out` grows it gets reallocated every time you + more strings onto it
[18:05:32] veleno: drbrain: indeed.
[18:05:48] veleno: ok, that???s relatively easy fix to do i guess
[18:06:16] veleno: if that???s not enough, using the ???json??? gem would be a good plan-B ?
[18:06:43] veleno: as I noticed it???s already being used in there for some reason
[18:07:11] drbrain: you can build a Hash then to_json it
[18:07:20] goodcodeguy: has joined #ruby
[18:08:05] aegis3121: has joined #ruby
[18:08:26] lucasb: at the end of the method, the generated is getting parsed with JSON.parse to see if it's valid. Maybe you can comment that code to speed things
[18:08:36] DmitryBochkarev: has joined #ruby
[18:08:47] lucasb: *the generated string
[18:08:50] drbrain: oh, I didn't even look down there
[18:09:02] drbrain: yeah, using JSON to dump it from a Hash means you won't need to do that
[18:09:24] jottr: has joined #ruby
[18:09:38] ElFerna_: has joined #ruby
[18:10:01] django_: has joined #ruby
[18:10:08] django_: hey anyone done the ruby course on Coursera?
[18:10:16] speakingcode: has joined #ruby
[18:10:31] B1n4r10: has joined #ruby
[18:11:07] pawnbox: has joined #ruby
[18:11:46] rakm: has joined #ruby
[18:12:46] veleno: lucasb: indeed.
[18:14:34] arlek: has joined #ruby
[18:14:54] johnnyt: has joined #ruby
[18:16:22] Spami: has joined #ruby
[18:17:04] aep: uuuh this is really confusing. i have a initialize function with no arguments, and i call Class.new with no arguments, and i get "wrong number of arguments (1 for 0)
[18:17:20] aep: what's.... the magic first argument
[18:17:25] aegis3121: Do you have code?
[18:18:01] aep: well, no. i'm trying to isolate it now
[18:18:06] aep: in the meantime http://i.imgur.com/a9yePdr.png
[18:19:45] aep: huh. it...works now
[18:19:51] aep: must be me being crazy
[18:19:58] ur5us: has joined #ruby
[18:21:13] pawnbox: has joined #ruby
[18:25:55] stannard: has joined #ruby
[18:26:02] gregf_: >> class Foo; def initialize **params; params.each { |k,v| instance_variable_set "@#{k}", v; };end;end; [Foo.new, Foo.new(a:1, b:2)]
[18:26:03] ruby[bot]: gregf_: # => [#<Foo:0x41bd96d8>, #<Foo:0x41bd969c @a=1, @b=2>] (https://eval.in/517877)
[18:26:06] PedramT: has joined #ruby
[18:27:32] agent_white: has joined #ruby
[18:27:37] atomical: has joined #ruby
[18:28:00] einarj: has joined #ruby
[18:28:35] theery: has joined #ruby
[18:29:17] PedramT: has joined #ruby
[18:30:27] adaedra: reminder (for shevy and others): in case of troll, just use !ops and ignore.
[18:30:42] shevy: that would highlight them!
[18:30:42] karapetyan: has joined #ruby
[18:30:57] ljarvis: I would have prefered that
[18:31:00] adaedra: that's the goal
[18:31:06] ljarvis: then I'd have seen it
[18:31:15] adaedra: so we can see something is happening
[18:32:57] TomyLobo: has joined #ruby
[18:33:02] nofxx: has joined #ruby
[18:33:02] nofxx: has joined #ruby
[18:35:04] veleno: drbrain: and what %Q means ?
[18:35:06] bb010g: has joined #ruby
[18:35:16] drbrain: veleno: it's like "", but allows you to have "" inside
[18:35:46] adaedra: The Q is unneeded, note.
[18:36:49] codecop: has joined #ruby
[18:37:16] cdg: has joined #ruby
[18:37:44] eam: not to be confused with \Q
[18:38:32] NeckBeardPrince: has joined #ruby
[18:38:35] pdoherty: has joined #ruby
[18:38:35] bronson: has joined #ruby
[18:38:35] cschneid_: has joined #ruby
[18:39:02] RegulationD: has joined #ruby
[18:39:16] NeckBeardPrince: has joined #ruby
[18:39:26] einarj_: has joined #ruby
[18:39:36] spider-mario: has joined #ruby
[18:39:42] mistermocha: has joined #ruby
[18:39:48] shadoi: has joined #ruby
[18:41:49] youngmathimus0: has joined #ruby
[18:43:09] Mon_Ouie: has joined #ruby
[18:43:39] dextertzu: has joined #ruby
[18:44:23] ryanwinchester: has joined #ruby
[18:44:44] treehug88: has joined #ruby
[18:45:03] kirillzh: has joined #ruby
[18:45:08] baweaver: has joined #ruby
[18:45:12] niko: has joined #ruby
[18:46:27] Frem: has joined #ruby
[18:49:00] Ilyes512: has joined #ruby
[18:49:10] jackjackdripper: has joined #ruby
[18:49:25] kirillzh: has joined #ruby
[18:49:27] PedramT: has joined #ruby
[18:50:23] Ilyes512: has joined #ruby
[18:51:42] LoneHerm_: has joined #ruby
[18:53:44] darkf: has joined #ruby
[18:55:38] dlitvak: has joined #ruby
[18:56:29] veleno: drbrain: does that syntax is supported only since a given ruby version ?
[18:57:06] drbrain: 1.4, probably
[18:57:12] drbrain: probably earlier
[18:57:15] veleno: ah ok so it???s pretty much standard
[18:57:22] drbrain: since forever
[18:57:38] drbrain: since it came from perl, it might exist for all ruby
[18:57:54] veleno: i???m getting a sytax error for: nodes << '%Q({"ip":"#{n['ip']}","port":"#{n['port']}"},)'
[18:58:12] marr: has joined #ruby
[18:58:14] eam: veleno: no outer single quotes
[18:58:18] eam: just %Q()
[18:59:45] AlexRussia: has joined #ruby
[19:00:09] einarj: has joined #ruby
[19:00:45] azure32: has joined #ruby
[19:00:46] patchedmonkey: has joined #ruby
[19:00:56] jokester: has joined #ruby
[19:01:12] kirun: has joined #ruby
[19:02:11] blackmesa: has joined #ruby
[19:02:20] webopsx: has joined #ruby
[19:02:39] malconis: has joined #ruby
[19:03:14] fantazo: has joined #ruby
[19:03:26] NeckBear_: has joined #ruby
[19:04:38] NeckBeardPrince: has joined #ruby
[19:04:55] theery: has joined #ruby
[19:05:35] Xeago: has joined #ruby
[19:05:45] NeckBeardPrince: has joined #ruby
[19:06:26] kies^: has joined #ruby
[19:09:10] hogetaro: has joined #ruby
[19:09:24] dionysus69: has joined #ruby
[19:10:01] kirillzh: has joined #ruby
[19:10:32] symm-: has joined #ruby
[19:10:41] finisherr: has left #ruby: ()
[19:11:57] avenj: has joined #ruby
[19:11:57] avenj: has joined #ruby
[19:12:27] Antiarc: has joined #ruby
[19:12:56] lapide_viridi: has joined #ruby
[19:13:33] baweaver: has joined #ruby
[19:15:15] malconis: has joined #ruby
[19:15:48] cjbottaro: has joined #ruby
[19:15:56] momomomomo: has joined #ruby
[19:16:50] andrewvos: Is this a bad idea or the worst idea? https://github.com/AndrewVos/markdown-expander
[19:17:36] momomomomo: andrewvos: have you seen https://github.com/jekyll/jekyll
[19:18:01] hessparker: has joined #ruby
[19:18:06] andrewvos: momomomomo: yah
[19:18:07] momomomomo: has iteration etc. built into markdown
[19:18:17] andrewvos: you mean it uses liquid?
[19:18:40] andrewvos: liquid was too much dependency for me
[19:19:01] marxarelli: has joined #ruby
[19:21:17] ljarvis: wot andrewvos
[19:22:47] Xeago: why is the bot operator?
[19:23:07] ljarvis: because it controls the channel
[19:23:20] ljarvis: one might say, it operates it
[19:23:52] goodcodeguy: has joined #ruby
[19:24:23] lucasb: has joined #ruby
[19:24:44] Xeago: does the bot handle kicks and bans? Haven't seen that happen. Topic is still set by people, not the bot either.
[19:25:14] ljarvis: yeah it does
[19:25:26] PedramT: has joined #ruby
[19:25:35] DEA7TH: has joined #ruby
[19:26:34] chouhoulis: has joined #ruby
[19:27:48] andrewvos: ljarvis: wot wot inkjet
[19:27:52] zacstewart: has joined #ruby
[19:28:00] podman: has joined #ruby
[19:28:14] arlek: has joined #ruby
[19:29:03] einarj: has joined #ruby
[19:30:34] william3: has joined #ruby
[19:31:57] chouhoulis: has joined #ruby
[19:32:28] veleno: thanks everyone, it was very helpful
[19:32:40] veleno: drbrain: thanks to you in particular
[19:32:49] ljarvis: andrewvos wot bruv
[19:34:44] RIK_: has joined #ruby
[19:34:47] dubek: has joined #ruby
[19:35:06] andrewvos: ljarvis: do you think if I pass active records to that thing then people are going to pwn my server
[19:35:22] Eiam: when you print an object and get something like <Class:0x0055a4b0570d28> is there a way to snag that object with just the address later, assuming it still allocated?
[19:35:26] ljarvis: andrewvos: prolly ya nub
[19:35:32] andrewvos: basically I'm allowing users to do some_model[:whataver_they_want]
[19:35:41] andrewvos: is that an issue/
[19:35:57] andrewvos: scared rails has like a model[:database_connection_string_please] in there
[19:36:15] RIK_: has joined #ruby
[19:36:26] aegis3121: Eiam: no idea, but I'm curious why
[19:36:45] ljarvis: andrewvos: no [] just does read_attribute - https://github.com/rails/rails/blob/08576b94ad4f19dfc368619d7751e211d23dcad8/activerecord/lib/active_record/attribute_methods/read.rb#L84
[19:37:38] andrewvos: thanks buddy
[19:37:44] PedramT: has joined #ruby
[19:37:50] Eiam: aegis3121: trying to debug an issue that occurs in a heroku like instance, so I cannot use something like pry remote to attach the debugger to it when the problem happens.. I just see logs. I figured I could try to pop into the server and try to better interact with whats there without having to just drop every print statement under the sun into the object before I deploy..
[19:37:55] einarj: has joined #ruby
[19:38:36] Eiam: I tried running the code in a console on the server and it runs fine no issue.. but when a request comes in, it blows up. so I'm missing something =)
[19:39:59] ysz: has joined #ruby
[19:41:01] djellemah: Eiam: maybe Marshal.dump the object to a file.
[19:41:31] djellemah: although that would break if the object ivars contain procs, or if the object has singleton methods.
[19:41:53] chipotle: has joined #ruby
[19:42:03] NeckBeardPrince: has joined #ruby
[19:44:20] RegulationD: has joined #ruby
[19:44:30] elifoster: has joined #ruby
[19:45:37] kirillzh: has joined #ruby
[19:46:42] Eiam: will give it a whirl
[19:47:28] william3: has joined #ruby
[19:48:51] EvilRoey: has joined #ruby
[19:49:05] yardenbar: has joined #ruby
[19:49:40] EvilRoey: Hi! I'm coming from the Python side.. been using it since 1997. I want to learn Ruby because I like learning for learning's sake. Any useful resources you guys can point me at?
[19:49:43] baweaver: has joined #ruby
[19:49:58] EvilRoey: * and thanks!
[19:50:00] lolcodenewbie: has joined #ruby
[19:50:14] Eiam: EvilRoey: http://ruby-community.com/pages/links
[19:50:50] Dimik: has joined #ruby
[19:50:51] tomchapin: has joined #ruby
[19:50:52] jottr: has joined #ruby
[19:54:46] dlitvak: has joined #ruby
[19:55:20] pandaant: has joined #ruby
[19:56:27] baweaver: has joined #ruby
[19:59:13] vr_mex: has joined #ruby
[19:59:14] nettoweb: has joined #ruby
[19:59:47] dionysus69: has joined #ruby
[20:01:43] rodfersou: has joined #ruby
[20:02:19] william3: has joined #ruby
[20:03:30] rodd: has joined #ruby
[20:03:55] LoneHermit: has joined #ruby
[20:04:37] rodd: has left #ruby: ()
[20:06:17] einarj: has joined #ruby
[20:08:24] platzhirsch: has joined #ruby
[20:10:24] einarj_: has joined #ruby
[20:11:06] doublemalt__: has joined #ruby
[20:14:06] ZerGabriel: has joined #ruby
[20:14:15] Azure: has joined #ruby
[20:15:43] moeabdol1: has joined #ruby
[20:17:16] einarj: has joined #ruby
[20:17:29] yfeldblum: has joined #ruby
[20:17:31] tomchapin: has joined #ruby
[20:17:53] blackmesa: has joined #ruby
[20:18:36] yardenbar: has joined #ruby
[20:18:48] btwebdev: has joined #ruby
[20:19:07] SirFunk: has joined #ruby
[20:19:52] dfinninger: has joined #ruby
[20:21:13] btwebdev: is there a way to convert this time format to 2015-12-14T14:05:26+0000 to 2015-12-14 02:05:25 with ruby's Time?
[20:21:38] einarj_: has joined #ruby
[20:22:08] B1n4r10: has joined #ruby
[20:22:20] ur5us: has joined #ruby
[20:22:26] mostlybadfly: has joined #ruby
[20:25:04] Zai00: has joined #ruby
[20:25:38] blackgoat: has joined #ruby
[20:27:39] dlitvak: has joined #ruby
[20:28:59] Lildirt: has joined #ruby
[20:30:49] Eiam: btwebdev: check here -- http://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/DateTime.html
[20:31:29] havenwood: >> require 'date'; the_eve_of_the_ides_of_december = DateTime.iso8601 '2015-12-14T14:05:26+0000'; the_eve_of_the_ides_of_december.strftime '%Y-%m-%d %H:%M:%S'
[20:31:30] ruby[bot]: havenwood: # => "2015-12-14 14:05:26" (https://eval.in/517936)
[20:31:38] dfinninger: has joined #ruby
[20:32:19] dlitvak_: has joined #ruby
[20:32:57] floror: has joined #ruby
[20:33:24] Eiam: havenwood: why not %F %T ?
[20:33:41] havenwood: Eiam: I just wanted to write the variable.
[20:34:06] havenwood: Eiam: But good point!
[20:34:33] havenwood: >> require 'date'; DateTime.iso8601('2015-12-14T14:05:26+0000').strftime '%F %T'
[20:34:34] ruby[bot]: havenwood: # => "2015-12-14 14:05:26" (https://eval.in/517938)
[20:34:40] havenwood: btwebdev: ^
[20:35:24] dhollinger: has joined #ruby
[20:35:27] Eiam: i was using strptime to try and parse the string
[20:35:31] Eiam: but it drops the time
[20:36:27] intrigueD: has joined #ruby
[20:37:10] Maletor: has joined #ruby
[20:39:09] hobodave: has joined #ruby
[20:42:01] nunchuck: has joined #ruby
[20:42:11] genshu: has joined #ruby
[20:42:16] genshu: hi everyone
[20:43:33] dfinninger: has joined #ruby
[20:44:22] genshu: anyone interested in working on my lightweight MIT-licensed Internet Site framework? It is not the second Ruby On Rails, it should stay lighweight. If you are not interested in yet another Framework, have a look at the included SQLite3 wrapper (which will be a separate gem). Link on Github: https://github.com/jrnakk/Lightweight-Site-Framework
[20:45:08] dfinninger: has joined #ruby
[20:45:25] genshu: I have some dump feelings on how I extract and save values, if I would do some stuff twice, but cannot concentrate after some hours coding.
[20:46:38] genshu: the SQLite3 wrapper is the files "overwriting.run.rb", "database_overwriting.run.rb" and "database.module.rb"
[20:47:06] Limix: has joined #ruby
[20:47:41] genshu: regarding myself I judged innovative to overwrite the standard types for database functions, instead of methods of a class which has the object of the type as an argument.
[20:47:57] shadoi: has joined #ruby
[20:49:01] genshu: this time last to be said is that it's the first working alpha version, as the GPL requests, anyways MIT licensed
[20:49:37] dlitvak: has joined #ruby
[20:49:49] stannard: has joined #ruby
[20:50:59] mistermocha: has joined #ruby
[20:51:44] baweaver: has joined #ruby
[20:54:53] treehug88: has joined #ruby
[20:55:59] treehug88: has joined #ruby
[20:57:42] baweaver: has joined #ruby
[20:58:52] andrewvos: has joined #ruby
[20:59:07] genshu: are there any sites to make repos more public? there are often links to github, are there more popular sites to make my repo more public?
[21:01:24] Xeago: has joined #ruby
[21:01:57] genshu: however, got to shutdown now, cya ruby folks!
[21:02:09] genshu: has left #ruby: ()
[21:03:16] jtzero1: has joined #ruby
[21:03:41] jtzero1: has left #ruby: ()
[21:04:18] TomPeed: has joined #ruby
[21:04:37] cjheath: has left #ruby: ()
[21:07:12] jordanm: has joined #ruby
[21:10:01] aswen: has joined #ruby
[21:11:39] ur5us: has joined #ruby
[21:12:03] elifoster: has joined #ruby
[21:13:21] kirillzh: has joined #ruby
[21:15:32] kirillzh: How unique is SecureRandom.base58(24)?
[21:15:52] jgpawletko_: has joined #ruby
[21:15:55] ilhami: has joined #ruby
[21:15:57] ilhami: sup guys?
[21:16:06] ilhami: should I learn Ruby?
[21:16:09] PedramT_: has joined #ruby
[21:16:49] ruby-lang629: has joined #ruby
[21:16:50] goodcodeguy: has joined #ruby
[21:16:56] nofxx: kirillzh, you could append a time in microseconds to it, pretty unique (kinda like bson object id)
[21:17:37] nofxx: ilhami, mens sana in corpore sano ... learn is always good =D
[21:18:05] ilhami: why do you speak Latin?
[21:18:13] johnnyt: has joined #ruby
[21:18:25] shevy: ilhami why would you want to program?
[21:19:06] kirillzh: nofxx I just realized that's more Rails related question...
[21:19:10] Limix: has joined #ruby
[21:19:14] n00bDev: has joined #ruby
[21:19:18] ilhami: shevy, it's fun
[21:19:21] kirillzh: nofxx not sure which method I should use for User token
[21:19:28] ilhami: and I want to earn money
[21:19:51] nofxx: kirillzh, 'get a unique string' is pretty language even agnostic ...
[21:20:19] shevy: ilhami go java then
[21:20:56] ilhami: shevy, I know Java..
[21:21:00] ilhami: I didn't like it.
[21:21:01] shevy: Java leads the way: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
[21:21:04] eam: best effort unique string: https://en.wikipedia.org/wiki/Universally_unique_identifier
[21:21:07] nofxx: shevy, how evil
[21:22:04] nofxx: the money part? I like the 'for fun and profit' motto
[21:22:06] mistermocha: has joined #ruby
[21:22:07] shevy: he wants to earn money!
[21:22:49] nofxx: how a guy will buy a motorcycle and eat pizza every week w/o it?
[21:23:31] shevy: I like pizza
[21:23:31] eam: do you really need a new motorcycle every week
[21:23:32] nofxx: and get some booze and drugs? for a top 3 money uses that pops in my head
[21:23:34] Limix_: has joined #ruby
[21:23:40] shevy: who ordered the giga pizza lately... was it eam
[21:24:05] nofxx: eam, need to gas it =/ but that will go electric some day
[21:24:06] ilhami: shevy, maybe you can send me some money. :)
[21:24:13] ilhami: I'd appreciate that.
[21:24:52] whippythellama: has joined #ruby
[21:25:05] shevy: hmm semi-off topic... if I have written some hello world app in ruby-gtk, I suppose there is no way to put this into a firefox tab right? :D
[21:25:36] nofxx: shevy, printscreen
[21:26:06] sandstrom: has joined #ruby
[21:26:10] Coldblackice: has joined #ruby
[21:27:12] youngmathimus0: how would i, using gets to retrieve a users day,month and year of birth determine the day of year from their input
[21:27:25] youngmathimus0: i know how to get day of year with yday
[21:27:32] ilhami: I want an Ubuntu phone :)
[21:27:39] solars: has joined #ruby
[21:28:00] roshanavand: has joined #ruby
[21:28:15] JoshGlzBrk: has joined #ruby
[21:29:00] lucasb: Time.new(gets, gets, gets).yday :D
[21:29:18] ilhami: Hehehehehe
[21:29:19] lucasb: just kidding, it doesn't work :)
[21:29:28] ilhami: :D:D:D:D:D:D::D:D:D
[21:29:32] gregf: has joined #ruby
[21:29:59] youngmathimus0: not sure i can use variables when doing yday
[21:30:51] lucasb: oops, it does work. I thought it wouldn't accept strings as arguments, but it accepts
[21:31:05] einarj: has joined #ruby
[21:31:13] Lildirt: has joined #ruby
[21:32:24] PedramT: has joined #ruby
[21:32:36] youngmathimus0: shit you're right
[21:35:25] dfinninger: has joined #ruby
[21:35:44] duncannz: has joined #ruby
[21:36:25] idefine: has joined #ruby
[21:36:34] duncannz: has joined #ruby
[21:37:30] veleno: has joined #ruby
[21:37:57] william3: has joined #ruby
[21:37:59] duncannz: has joined #ruby
[21:38:55] duncannz: has joined #ruby
[21:39:10] dopamean_: has joined #ruby
[21:39:20] renderful: has joined #ruby
[21:39:23] veleno: hello (again). any eagle-eye around can understand why in these 2 snippts https://gist.github.com/vschiavoni/344d76a34914bcff22f6 the a.rb version produces an invalid string at line 10 ?the b.rb is the previous (slower) version of the same piece of code
[21:39:40] duncannz: has joined #ruby
[21:40:51] s00pcan_: has joined #ruby
[21:41:07] psmolen: has joined #ruby
[21:41:17] william3: has joined #ruby
[21:41:30] Ox0dea: veleno: Why are you treating your structured data as text?
[21:41:41] Ox0dea: require 'json'
[21:41:58] shevy: Youngmathimus0 you have to parse that input into some time/date object, then you can do .year for instance
[21:42:31] shevy: cool... never saw yday before
[21:42:34] shevy: is that the doomsday?
[21:42:46] youngmathimus0: just the numbered day of the year
[21:43:42] baweaver: has joined #ruby
[21:43:53] larsk: has joined #ruby
[21:45:40] platzhirsch: has left #ruby: ()
[21:46:59] Ox0dea: _why day > #yday
[21:47:26] edwinvdgraaf: has joined #ruby
[21:47:29] floror: has joined #ruby
[21:47:40] sanguisdex: has joined #ruby
[21:47:55] blackmesa: has joined #ruby
[21:51:07] sanguisdex: Hi question about guard. I can see the plug-in that I want to use when I run guard list, but when I try to run the guard init script it reurns and error about not being able to find the plug-in class. is there a process I am missing between installing the gem and running init?
[21:52:50] pawnbox: has joined #ruby
[21:53:40] ico: has joined #ruby
[21:57:14] lemur: has joined #ruby
[21:57:32] Ox0dea: sanguisdex: Did you... install that plugin?
[22:00:34] Ox0dea: sanguisdex: Can you say which plugin you're trying to use?
[22:01:10] atomical: has joined #ruby
[22:01:23] i: has joined #ruby
[22:01:25] aegis3121: has joined #ruby
[22:01:25] sanguisdex: Ox0dea, yes I installed the plugin in my users gem dir, I tried both bundle install and gem install. When I run `guard list` I can see that it is there, but not in my Guardfile. when I try to run `guard init jshit-node` I get en error that it can not load or find the Class/ method
[22:01:46] Ox0dea: sanguisdex: You're misspelling it. :P
[22:02:15] einarj: has joined #ruby
[22:03:09] FooMunki: has joined #ruby
[22:03:10] sanguisdex: Ox0dea: even when I spell it correctly (via copy and paste from the gems readme file) it fails.
[22:03:37] kobain: has joined #ruby
[22:04:04] x77686d: has joined #ruby
[22:04:27] sanguisdex: ACTION has to sign off but will be back in 10-15 mins
[22:04:35] stannard: has joined #ruby
[22:04:51] Ox0dea: sanguisdex: Ah, well, I found the problem.
[22:06:58] floror: has joined #ruby
[22:11:40] DodoBeastro: has joined #ruby
[22:11:50] DodoBeastro: all my fellow gold diggers
[22:12:00] malconis: has joined #ruby
[22:12:11] pdoherty: has joined #ruby
[22:12:13] DodoBeastro: rubies are quite rare
[22:12:21] DodoBeastro: I got a few in my collection my self
[22:12:37] DodoBeastro: those red pieces of awesomeness
[22:12:46] DodoBeastro: sooo sparkly and soo perfect
[22:13:12] DodoBeastro: has left #ruby: ()
[22:15:48] azure32: has joined #ruby
[22:16:40] platzhirsch: has joined #ruby
[22:21:49] ferr: has joined #ruby
[22:23:41] sandstrom: has joined #ruby
[22:24:37] intrigueD: has joined #ruby
[22:25:57] ironcamel: is there a better way to do this: lona, lonb, lata, latb = [lona, lonb, lata, latb].map { |x| x.gsub(',', '.').to_f }
[22:27:21] Ox0dea: Not really. :/
[22:27:30] ironcamel: ok, just checking, thanks
[22:28:17] andrewvos: has joined #ruby
[22:32:00] Scripore: has joined #ruby
[22:34:53] JDiPierro: has joined #ruby
[22:35:13] william3: has joined #ruby
[22:35:26] ironcamel: why does this output [nil]:
[22:35:28] ironcamel: aa = "a"; z = [aa].map { |x| x.upcase! }; z = [aa].map { |x| x.upcase! }; p z
[22:35:37] YR: has joined #ruby
[22:35:43] ironcamel: but this outputs ["A"]:
[22:35:54] ironcamel: aa = "a"; z = [aa].map { |x| x.upcase! }; p z
[22:37:25] youngmathimus0: heh this is kinda neat https://repl.it/BlUR/59
[22:38:32] Ox0dea: ironcamel: Most "bang methods" return `nil` if they wouldn't modify the receiver.
[22:38:33] youngmathimus0: woops wrong link https://repl.it/BlUR/60
[22:38:47] youngmathimus0: always forget to hit save. it changes the link
[22:38:58] Hanmac: ironcamel: because that upcase! does change the sting itself, and creating a new array is pointless ... and upcase! does return nil when nothing is changed
[22:39:33] ironcamel: but i'm doing the exact same assignment twice
[22:39:41] ironcamel: both times i'm doing the destructive upcase!
[22:39:41] Ox0dea: ironcamel: https://eval.in/518019
[22:39:45] elifoster: has joined #ruby
[22:40:04] Ox0dea: The #upcase! is applying the first time (because there are characters to capitalize), but then it doesn't apply the second time since they're all capital.
[22:40:05] shevy: how heavy would a camel be that is made out of iron
[22:40:29] william3: has joined #ruby
[22:40:37] schpn: has joined #ruby
[22:40:44] Hanmac: ironcamel: yes but you call the destructive method on the String object, not on the Array
[22:41:19] ironcamel: https://eval.in/518021
[22:41:39] Ox0dea: >> s = 'foo'; [s.upcase!, s.upcase!] # ironcamel
[22:41:40] yfeldblum: has joined #ruby
[22:41:40] ruby[bot]: Ox0dea: # => ["FOO", nil] (https://eval.in/518025)
[22:41:44] zenlot1: has joined #ruby
[22:41:50] ironcamel: oh, interesting
[22:41:54] Ox0dea: It's really quite straightforward once you know that this is how the method behaves.
[22:42:02] ironcamel: when the string is already upcased, upcase! returns nil
[22:42:08] ironcamel: didn't know that. thanks
[22:42:12] Ox0dea: Aye, and similarly for most other bang methods.
[22:42:35] chipotle: has joined #ruby
[22:42:56] Hanmac: ironcamel: also checkout the difference between array.map!(&:upcase) and array.map(&:upcase!)
[22:43:28] Ox0dea: Youngmathimus0: That /60 is terrifying.
[22:43:50] Ox0dea: Just install Ruby! :P
[22:44:19] ironcamel: hanmac: what's the difference?
[22:44:49] Hanmac: >> x = "abc"; [x].map!(&:upcase); x
[22:44:51] ruby[bot]: hanmac: # => "abc" (https://eval.in/518028)
[22:44:57] Hanmac: >> x = "abc"; [x].map(&:upcase!); x
[22:44:58] ruby[bot]: hanmac: # => "ABC" (https://eval.in/518029)
[22:45:31] youngmathimus0: lol true, but it works Ox0dea
[22:45:55] youngmathimus0: i have ruby installed lol, just like to much around in the console and share with people
[22:46:02] Hanmac: first does change the array with new strings
[22:46:02] Hanmac: second does make a new array but with changed strings
[22:46:07] ironcamel: hanmac: neat
[22:46:30] solocshaw: has joined #ruby
[22:46:47] Hanmac: Youngmathimus0: question: when you are using "date" why not directly using the Date class and their functions too? because "date1 - date2" does return the diff in days
[22:50:10] NeckBeardPrince: has joined #ruby
[22:50:22] Scripore: has joined #ruby
[22:51:10] Hanmac: Youngmathimus0: also checkout Date::parse so you can do it that the user can enter "dd.mm.yyyy" (or what ever format you use)
[22:51:12] NeckBeardPrince: has joined #ruby
[22:52:08] adaedra: If you have a determined format, Use Date.strptime, not parse.
[22:52:23] pawnbox: has joined #ruby
[22:53:53] stevemackinnon: has joined #ruby
[22:54:13] Limix: has joined #ruby
[22:55:15] postmodern: has joined #ruby
[22:56:37] armyriad: has joined #ruby
[22:58:02] baweaver: has joined #ruby
[22:58:51] haylon: has left #ruby: ("WeeChat 1.3")
[22:59:22] benlieb: has joined #ruby
[23:01:16] sanguisdex: has joined #ruby
[23:04:07] stannard: has joined #ruby
[23:05:04] sanguisdex: well I am back it took longer than I thought due to walking into a house with an upset daughter
[23:05:06] sanguisdex: Ox0dea: any thoughts on why guard would show the plug in in the list output but not be able to init it?
[23:05:27] Ox0dea: sanguisdex: The class is improperly capitalized. :/
[23:05:39] kmckelvin: has joined #ruby
[23:05:49] Ox0dea: I'm sure it worked at some point, but Guard has since changed how it loads code, and this plugin hasn't been updated accordingly.
[23:06:03] sanguisdex: Ox0dea: ahhh
[23:06:10] sanguisdex: that makes sense
[23:06:16] sdothum: has joined #ruby
[23:06:32] KensoDev: has joined #ruby
[23:07:59] baweaver: has joined #ruby
[23:08:34] hays: is it completely unnecessary to have #{foo.to_s}
[23:08:40] hays: vs. just #{foo}
[23:09:20] Ox0dea: hays: Yep.
[23:09:36] Ox0dea: >> class Foo; def to_s; "ohai"; end end; "#{Foo.new}"
[23:09:37] ruby[bot]: Ox0dea: # => "ohai" (https://eval.in/518051)
[23:10:18] lucasb: you missed the oportunity to say 'ohays'
[23:11:22] johnmilton: has joined #ruby
[23:13:34] n00bDev: has joined #ruby
[23:18:36] jackjackdripper1: has joined #ruby
[23:19:14] bluOxigen_: has joined #ruby
[23:25:33] RegulationD: has joined #ruby
[23:26:23] dopamean_: has joined #ruby
[23:27:00] RubyWarrior: has joined #ruby
[23:27:50] inhwrb: has joined #ruby
[23:28:12] inhwrb: Hi all! Can someone look at these simple Ruby program?
[23:28:16] inhwrb: https://gist.github.com/anonymous/99c72e667ff3bb234a84
[23:28:26] inhwrb: Why does the code still seem to work if I change @all_tasks to all_tasks
[23:28:31] inhwrb: Isn't the @ necessary for instance variables?
[23:28:53] Scripore: has joined #ruby
[23:28:58] User1234: has joined #ruby
[23:29:37] havenwood: inhwrb: But you created an `attr_reader :all_tasks` which makes an #all_tasks reader instance method.
[23:29:57] bluOxigen: has joined #ruby
[23:30:00] Mia: has joined #ruby
[23:30:00] Mia: has joined #ruby
[23:30:24] havenwood: inhwrb: Do just use the instance variables internally. You can call #all_tasks from outside the class, it's a public interface.
[23:30:25] User1234: Does anyone have a game developing experience
[23:30:32] havenwood: User1234: Yes, folk do.
[23:30:43] User1234: Is ruby slow for games
[23:31:15] tobiasvl: what kind of games
[23:31:36] havenwood: User1234: Probably not great for FPS 3d games. Probably fine for 2d and there are some nice tools to assist. Gosu, RubyMotion, etc.
[23:32:04] baweaver: has joined #ruby
[23:32:07] User1234: I want to write a wallhack for some guy
[23:32:19] User1234: Is ruby good for that or do i need to use something else?
[23:32:43] inhwrb: havenwood: Ah I see! That makes sense, so I should keep all_tasks private by removing the reader
[23:33:18] mozzarella: has joined #ruby
[23:33:23] havenwood: inhwrb: Depends if you want to be able to ask an instance of the class about #all_tasks from the outside, your call!
[23:33:23] mozzarella: anyone on mac os x in here?
[23:33:29] havenwood: mozzarella: Yes, folk are.
[23:33:37] inhwrb: got it, thanks once again
[23:33:52] mozzarella: do you need to be root in order to install gems, using the default ruby installation?
[23:34:02] hays: is this a good style guide? https://github.com/bbatsov/ruby-style-guide
[23:34:09] havenwood: User1234: mruby is nice but your wallhack isn't really about Ruby at all, there's probably a better gaming community channel to discuss
[23:34:28] havenwood: hays: yeah, pretty good
[23:34:32] User1234: no my question is can i make ruby hacks for a game made in c
[23:34:38] havenwood: mozzarella: yes, if you use the default installation location
[23:34:42] User1234: that doesnt seem easy
[23:35:01] havenwood: User1234: You can embed mruby in C or Python. But this isn't a good question for this channel.
[23:35:12] User1234: you helped enough
[23:35:29] User1234: what channel?
[23:35:47] havenwood: ?offtopic User1234
[23:35:47] ruby[bot]: User1234: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[23:35:57] nettoweb: has joined #ruby
[23:36:46] johnmilton: python is pretty close to c, and you compile it as c code...you might as well you that for such a task User1234
[23:36:53] johnmilton: use the best tool for the job
[23:37:13] johnmilton: s/compile/can compile
[23:37:22] User1234: i was refering to ruby embeding
[23:37:27] User1234: into python
[23:38:15] pandaant: has joined #ruby
[23:38:23] ElFerna_: has joined #ruby
[23:38:55] trinaldi: has joined #ruby
[23:41:01] hahuang61: has joined #ruby
[23:41:53] Canar: o.O johnmilton
[23:42:07] Canar: User1234: Ruby embeds without much difficulty, AFAIK.
[23:42:21] Canar: vim, for example, has a ruby script module, as does weechat
[23:51:39] aibot: has joined #ruby
[23:52:13] marxarelli: has joined #ruby
[23:53:28] themsay: has joined #ruby
[23:54:02] ysz: has joined #ruby
[23:54:47] Limix: has joined #ruby