« Back to channel list

#ruby - 20 March 2018

« Back 1 day Forward 1 day »
[00:00:00] nicesignal: has joined #ruby
[00:00:49] karapetyan: has joined #ruby
[00:03:36] nicesignal: has joined #ruby
[00:06:20] bmurt: has joined #ruby
[00:07:57] stairmast0r: has joined #ruby
[00:08:28] erlend: has joined #ruby
[00:19:23] nowhere_man: has joined #ruby
[00:20:06] stairmast0r: has joined #ruby
[00:32:54] cagomez: has joined #ruby
[00:42:53] al2o3-cr: havenwood: 1.yield_self.cycle :p
[00:43:46] al2o3-cr: but that's just dumb.
[00:43:48] SteenJobs: has joined #ruby
[00:45:39] guacamole: has joined #ruby
[00:45:39] guacamole: has joined #ruby
[00:47:54] duckpuppy: has joined #ruby
[00:50:42] al2o3-cr: go to sleep lee.
[00:54:37] litetip: has joined #ruby
[00:58:00] litetip: has joined #ruby
[01:08:19] duderonomy: has joined #ruby
[01:09:48] bmurt: has joined #ruby
[01:11:48] workmad3: has joined #ruby
[01:15:24] sspreitz: has joined #ruby
[01:19:15] netherwolfe: has joined #ruby
[01:26:23] adam12: has joined #ruby
[01:30:43] alfiemax: has joined #ruby
[01:31:52] pwntrik: has joined #ruby
[01:32:09] pwntrik: Hi there I posted my question here: https://stackoverflow.com/questions/49374978/how-to-monkey-patch-a-class-in-rails
[01:34:39] bowie: has joined #ruby
[01:42:13] james541: has joined #ruby
[01:43:23] jcarl43: has joined #ruby
[01:45:04] karapetyan: has joined #ruby
[01:47:39] LiamW: has joined #ruby
[01:48:23] LiamW: I have a strange problem
[01:48:51] LiamW: are there errors that begin; ...; rescue; end cannot catch?
[01:49:45] duckpuppy: has joined #ruby
[01:49:47] LiamW: this is happening to me: https://gist.github.com/liamwhite/552d9c2903cfc7ebe1cf63721d2b7808
[01:50:39] bmurt: has joined #ruby
[01:50:42] LiamW: RUBY_VERSION = "2.5.0" etc
[01:55:43] LiamW: never mind I'm dumb
[01:55:48] LiamW: it's an Exception not an Error
[01:55:50] LiamW: has left #ruby: ("WeeChat 2.0.1")
[01:56:48] luoliyan: has joined #ruby
[01:58:10] havenwood: al2o3-cr: ?y.yield_self.cycle &Kernel.method(:puts)
[01:58:52] havenwood: al2o3-cr: What a fine implementation of the classic "yes" command. ;-P
[01:59:28] havenwood: I guess it's quite a bit longer than: loop { puts 'y' }
[01:59:32] al2o3-cr: havenwood: hehe, yeah, i jumped the gun ;)
[02:01:20] havenwood: pwntrik: Inside `class Tumble` do an `extend Tinder`.
[02:06:35] SteenJobs: has joined #ruby
[02:07:03] al2o3-cr: havenwood: you told me you don't need Kernel at top-level
[02:08:09] havenwood: al2o3-cr: that's true
[02:08:23] havenwood: just being silly with the code
[02:08:38] havenwood: i do prefer private_method, which does need the explicitness
[02:08:49] havenwood: &Kernel.public_metho9
[02:09:02] havenwood: over &method(:puits
[02:09:09] havenwood: grr, can't type
[02:09:27] JoshS: has joined #ruby
[02:11:55] al2o3-cr: >> require 'json/add/time'; JSON.load({all_the_time_in_the_world: Time.now}.to_json) # or json/add/core why didn't i know about this :/
[02:11:56] ruby[bot]: al2o3-cr: # => {"all_the_time_in_the_world"=>2018-03-20 02:11:52 +0000} (https://eval.in/974881)
[02:13:59] al2o3-cr: when? please tell me when?
[02:14:47] al2o3-cr: obviously it's very ruby specific, but still.
[02:17:11] erlend: has joined #ruby
[02:19:04] jordanm: has joined #ruby
[02:22:06] al2o3-cr: >> require 'json/add/struct'; JSON.load({foo: Struct.new("Foo", :x, :y).new}.to_json)
[02:22:07] ruby[bot]: al2o3-cr: # => {"foo"=>#<struct Struct::Foo x=nil, y=nil>} (https://eval.in/974885)
[02:24:55] milardovich: has joined #ruby
[02:26:56] darkhanb: has joined #ruby
[02:31:16] al2o3-cr: JSON.parse ignores the json_class key therefore you have to use JSON.load. therefore meaning trusted input.
[02:32:38] al2o3-cr: which makes sense as it's specific serialization
[02:36:27] duderonomy: has joined #ruby
[02:36:56] voker57: has joined #ruby
[02:38:26] DTZUZO: has joined #ruby
[02:40:40] gizmore|2: has joined #ruby
[02:42:53] qyrlr: has joined #ruby
[02:46:35] xuyuheng: has joined #ruby
[02:50:43] jamesaxl: has joined #ruby
[02:56:20] dinfuehr_: has joined #ruby
[02:56:28] Vingador: has joined #ruby
[03:02:00] Toggi3: has joined #ruby
[03:02:30] xall: has joined #ruby
[03:05:02] sspreitz: has joined #ruby
[03:12:04] workmad3: has joined #ruby
[03:13:20] orbyt_: has joined #ruby
[03:13:29] alfiemax: has joined #ruby
[03:19:55] suhdood: has joined #ruby
[03:22:23] Lytol: has joined #ruby
[03:28:22] cschneid: has joined #ruby
[03:28:36] cschneid: has joined #ruby
[03:44:28] Ropeney: has joined #ruby
[03:49:52] Remuz: has joined #ruby
[03:49:55] Remuz: has left #ruby: ()
[03:51:02] milardovich: has joined #ruby
[03:54:28] ramfjord: has joined #ruby
[04:00:26] duderonomy: has joined #ruby
[04:03:31] imneuncu: has joined #ruby
[04:09:42] asaf: has joined #ruby
[04:14:22] luoliyan: has joined #ruby
[04:15:29] luoliyan: has joined #ruby
[04:16:43] alfiemax: has joined #ruby
[04:17:24] luoliyan: has joined #ruby
[04:19:13] dstrunk: has joined #ruby
[04:19:36] luoliyan: has joined #ruby
[04:20:04] luoliyan: has joined #ruby
[04:25:33] trautwein: has joined #ruby
[04:25:56] erlend: has joined #ruby
[04:27:27] _main_: has joined #ruby
[04:28:07] cypher057PBL: has joined #ruby
[04:30:47] james`: has joined #ruby
[04:33:03] ghormoon: has joined #ruby
[04:33:33] nowhere_man: has joined #ruby
[04:34:00] xuyuheng: has joined #ruby
[04:34:07] za1b1tsu: has joined #ruby
[04:36:52] duderonomy: has joined #ruby
[04:41:03] karapetyan: has joined #ruby
[04:43:15] Toggi3: has joined #ruby
[04:43:15] xuyuheng: has joined #ruby
[04:56:27] harrycs: has joined #ruby
[05:06:49] Ropeney: has joined #ruby
[05:06:55] konsolebox: has joined #ruby
[05:09:54] karapetyan: has joined #ruby
[05:15:30] Yzguy: has joined #ruby
[05:16:12] karapetyan: has joined #ruby
[05:21:07] shuforov: has joined #ruby
[05:26:18] guacamole: has joined #ruby
[05:26:19] guacamole: has joined #ruby
[05:31:09] karapetyan: has joined #ruby
[05:31:36] dionysus69: has joined #ruby
[05:36:39] milardovich: has joined #ruby
[05:37:07] c0ncealed: has joined #ruby
[05:38:55] duderonomy: has joined #ruby
[05:43:01] CrazyEddy: has joined #ruby
[05:46:06] jimmylu2333-rpi3: has joined #ruby
[05:49:23] bijan_: has joined #ruby
[05:49:56] burgestrand: has joined #ruby
[05:51:51] sidx64: has joined #ruby
[05:51:55] za1b1tsu: has joined #ruby
[05:54:39] ramfjord: has joined #ruby
[05:56:34] stoffus: has joined #ruby
[05:59:02] xuyuheng: has joined #ruby
[06:02:43] zipace: has joined #ruby
[06:03:56] sidx64: has joined #ruby
[06:07:02] anisha: has joined #ruby
[06:11:15] sidx64: has joined #ruby
[06:14:24] reber: has joined #ruby
[06:31:14] venmx: has joined #ruby
[06:33:33] cschneid: has joined #ruby
[06:34:34] erlend: has joined #ruby
[06:35:34] za1b1tsu: has joined #ruby
[06:36:26] c_nick: has joined #ruby
[06:38:29] sidx64: has joined #ruby
[06:42:10] tomphp: has joined #ruby
[06:43:09] duderonomy: has joined #ruby
[06:50:07] bijan_: has joined #ruby
[06:58:38] schneider: has joined #ruby
[07:00:20] sidx64: has joined #ruby
[07:00:36] karapetyan: has joined #ruby
[07:05:03] darkhanb: has joined #ruby
[07:05:24] shuforov: has joined #ruby
[07:06:42] jamesyu: has joined #ruby
[07:11:11] suukim: has joined #ruby
[07:11:39] karapetyan: has joined #ruby
[07:12:29] karapetyan: has joined #ruby
[07:12:34] workmad3: has joined #ruby
[07:13:13] karapetyan: has joined #ruby
[07:13:44] cschneid: has joined #ruby
[07:14:49] karapetyan: has joined #ruby
[07:16:15] karapety_: has joined #ruby
[07:22:15] conta: has joined #ruby
[07:22:56] Mia: has joined #ruby
[07:22:56] Mia: has joined #ruby
[07:23:30] karapetyan: has joined #ruby
[07:24:49] tomphp: has joined #ruby
[07:25:53] karapetyan: has joined #ruby
[07:28:15] karapetyan: has joined #ruby
[07:29:52] karapetyan: has joined #ruby
[07:30:15] andikr: has joined #ruby
[07:30:15] arekushi: has joined #ruby
[07:30:37] karapetyan: has joined #ruby
[07:31:27] karapetyan: has joined #ruby
[07:32:14] karapetyan: has joined #ruby
[07:32:56] conta1: has joined #ruby
[07:33:24] tAn: has joined #ruby
[07:33:48] karapetyan: has joined #ruby
[07:35:23] karapetyan: has joined #ruby
[07:36:59] karapetyan: has joined #ruby
[07:37:49] karapetyan: has joined #ruby
[07:38:40] ryan_ford: has joined #ruby
[07:40:09] karapetyan: has joined #ruby
[07:41:00] karapetyan: has joined #ruby
[07:48:59] duderonomy: has joined #ruby
[07:49:27] momomo: has joined #ruby
[07:49:42] momomo: how do you out in an erb file without <%= ?
[07:49:48] momomo: is tehre an out ("ssss")
[07:52:03] sidx64: has joined #ruby
[07:52:38] mtkd: has joined #ruby
[07:52:58] alfiemax: has joined #ruby
[07:53:51] tvw: has joined #ruby
[07:54:48] ramfjord: has joined #ruby
[07:56:01] n008f4g_: has joined #ruby
[08:02:53] milardovich: has joined #ruby
[08:03:40] sidx64: has joined #ruby
[08:04:03] dminuoso: Note to self.
[08:04:07] dminuoso: Ruby has strict evaluation.
[08:04:14] clemens3: has joined #ruby
[08:04:25] dminuoso: idg = 1.step.map { |n| "co-radio-#{id}-#{n}" }
[08:04:43] momomo: Burgestrand: because I am outing in a loop basically .. to see the value of a variable basically
[08:05:48] momomo: Is tehre a way to sort a hashmap into an array ?
[08:05:54] momomo: by keys or a comparator ?
[08:06:00] burgestrand: momomo you can loop in erb, that's not a problem
[08:06:03] dminuoso: ACTION smells a Java warrior
[08:06:49] burgestrand: momomo yes, http://ruby-doc.org/core-2.5.0/Enumerable.html#method-i-sort_by
[08:08:01] momomo: Burgestrand: I have a hash first ... right now i have this:
[08:08:10] burgestrand: momomo a Hash is Enumerable
[08:08:14] sidx64: has joined #ruby
[08:08:23] momomo: https://hastebin.com/yonepigowi.rb
[08:08:44] momomo: but there seems to be an error
[08:08:55] momomo: also, what is the key of each ?
[08:09:08] momomo: i am getting a, b, are the objects .. but I need the key as well
[08:09:31] schneider: has joined #ruby
[08:09:36] momomo: maybe I can iterate them and add them to a SortedArray or BinaryArray ?
[08:09:45] momomo: then I can push to that instead and they will be sorted
[08:10:31] momomo: Burgestrand: I found : http://ruby-doc.org/stdlib-1.9.3/libdoc/set/rdoc/SortedSet.html
[08:10:43] momomo: However, can I new that with a comparator ?
[08:11:40] burgestrand: momomo What does your data look like?
[08:11:45] burgestrand: momomo And what do you want it to look like?
[08:12:19] burgestrand: momomo It would help your case greatly if you could post a small self-contained example that can be executed to see what the problem is
[08:12:23] momomo: my data is { key1 : {}, key2: {} } ... i want them sorted by key
[08:12:26] momomo: basically
[08:12:40] momomo: but I would like to sort when the digits starts
[08:13:54] burgestrand: >> { g: "A", r: "B", e: "C", a: "D", t: "E", f: "F", o: "G", x: "H" }.sort_by { |key, value| key }
[08:13:55] ruby[bot]: Burgestrand: # => [[:a, "D"], [:e, "C"], [:f, "F"], [:g, "A"], [:o, "G"], [:r, "B"], [:t, "E"], [:x, "H"]] (https://eval.in/974982)
[08:14:49] burgestrand: It was surprisingly hard to write out the raw data for that example hash, two sequences one follows a word and the other one follows the alphabet… funny.
[08:15:13] burgestrand: momomo ^ that's how sort_by works
[08:15:29] konsolebox: has joined #ruby
[08:15:36] momomo: Burgestrand: https://hastebin.com/eguwomokeh.rb
[08:16:56] dminuoso: >> [('a'..'f').to_a.map(&:to_sym).shuffle, ('A'..'F').to_a.shuffle].transpose.to_h # Burgestrand
[08:16:57] ruby[bot]: dminuoso: # => {:f=>"E", :c=>"C", :a=>"D", :d=>"B", :b=>"F", :e=>"A"} (https://eval.in/974986)
[08:17:24] dminuoso: >> ('a'..'f').to_a.map(&:to_sym).shuffle.zip(('A'..'F').to_a.shuffle]).to_h # Burgestrand
[08:17:25] ruby[bot]: dminuoso: # => /tmp/execpad-3a428f63df4b/source-3a428f63df4b:2: syntax error, unexpected ']', expecting ')' ...check link for more (https://eval.in/974987)
[08:17:31] yohji: has joined #ruby
[08:17:31] burgestrand: dminuoso I think this is a good example where brevity ≠ clarity :D
[08:17:33] dminuoso: >> ('a'..'f').to_a.map(&:to_sym).shuffle.zip(('A'..'F').to_a.shuffle).to_h # Burgestrand
[08:17:34] ruby[bot]: dminuoso: # => {:d=>"E", :f=>"A", :a=>"D", :c=>"B", :e=>"F", :b=>"C"} (https://eval.in/974988)
[08:17:46] schneider: has joined #ruby
[08:17:58] momomo: dminuoso: is that for me ?
[08:17:58] dminuoso: Burgestrand: We just need an eval bot where you can define bindings
[08:18:09] burgestrand: >> bindings = "haha"
[08:18:10] dminuoso: so you can define things bit by bit, instead of forcing everything into one line
[08:18:10] ruby[bot]: Burgestrand: # => "haha" (https://eval.in/974989)
[08:18:47] burgestrand: momomo I think you'll find that if you attempt to use `sort_by` you'll get exactly what you're looking for
[08:18:56] karapetyan: has joined #ruby
[08:21:32] momomo: Burgestrand: thanks!
[08:21:56] duderonomy: has joined #ruby
[08:23:10] jottr: has joined #ruby
[08:24:07] al2o3-cr: data.map { |k, v| {"#{k}": v} } if structure is the same
[08:25:04] al2o3-cr: don't listen to that at all.
[08:25:17] venmx: has joined #ruby
[08:25:55] al2o3-cr: this old rosie is good stuff.
[08:27:59] guille-moe: has joined #ruby
[08:30:49] jnix: has joined #ruby
[08:31:05] al2o3-cr: >> [1,2,3].map &:-@
[08:31:07] ruby[bot]: al2o3-cr: # => [-1, -2, -3] (https://eval.in/974991)
[08:31:22] burgestrand: Ah, a barf-map!
[08:31:36] burgestrand: Or, well, a barf-map-with-a-hat!
[08:31:44] pfg: has joined #ruby
[08:31:57] HalcyonicStorm: has joined #ruby
[08:32:10] mostlybadfly: has joined #ruby
[08:32:11] rann: has joined #ruby
[08:32:15] maciuszek: has joined #ruby
[08:32:29] kspencer: has joined #ruby
[08:34:58] aupadhye: has joined #ruby
[08:35:14] Fire-Dragon-DoL: has joined #ruby
[08:35:29] al2o3-cr: >> class Array def ~@() sort_by &:object_id end end; ~[*1..100].shuffle
[08:35:31] ruby[bot]: al2o3-cr: # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ...check link for more (https://eval.in/974993)
[08:36:51] aufi: has joined #ruby
[08:37:02] al2o3-cr: i should stop abusing the bot now
[08:37:41] za1b1tsu: has joined #ruby
[08:38:27] za1b1tsu: has joined #ruby
[08:38:38] Danielss89: has joined #ruby
[08:39:05] al2o3-cr: i want a x270
[08:40:31] bijan_: has joined #ruby
[08:40:49] karapetyan: has joined #ruby
[08:43:00] banisterfiend: has joined #ruby
[08:43:17] erlend: has joined #ruby
[08:44:16] Antiarc: has joined #ruby
[08:44:41] milardovich: has joined #ruby
[08:45:33] p0p0pr37: has joined #ruby
[08:49:07] sidx64: has joined #ruby
[08:50:45] jimmylu2333-fedo: has joined #ruby
[08:52:11] pynfwem: has joined #ruby
[08:52:12] jimmylu2333-fedo: has joined #ruby
[08:53:56] karapetyan: has joined #ruby
[08:55:00] duderonomy: has joined #ruby
[08:56:00] konsolebox: has joined #ruby
[08:58:23] jimmylu2333-fedo: has joined #ruby
[08:59:17] mikecmpbll: has joined #ruby
[08:59:35] za1b1tsu: has joined #ruby
[09:03:07] Nahra: has joined #ruby
[09:03:22] schneider: has joined #ruby
[09:12:10] riotjones: has joined #ruby
[09:12:48] workmad3: has joined #ruby
[09:17:25] tomphp: has joined #ruby
[09:19:15] kriskropd: has joined #ruby
[09:22:08] Papierkorb: has joined #ruby
[09:24:16] sidx64: has joined #ruby
[09:24:59] konsolebox: has joined #ruby
[09:26:17] kliq: has joined #ruby
[09:27:57] kliq: has joined #ruby
[09:29:42] Papierkorb: has left #ruby: ("Konversation terminated!")
[09:31:13] nikivi: has joined #ruby
[09:32:07] milardovich: has joined #ruby
[09:37:17] banisterfiend: has joined #ruby
[09:39:21] WhereIsMySpoon: has joined #ruby
[09:39:21] WhereIsMySpoon: has joined #ruby
[09:39:40] sdfsdf: has joined #ruby
[09:40:18] konsolebox: has joined #ruby
[09:40:21] Serpent7776: has joined #ruby
[09:44:20] guacamole: has joined #ruby
[09:48:27] karapetyan: has joined #ruby
[09:49:54] venmx: has joined #ruby
[09:50:02] karapetyan: has joined #ruby
[09:50:51] karapetyan: has joined #ruby
[09:51:31] Nobun: has joined #ruby
[09:51:44] Nobun: Hi I have two questions about ruby and embedding
[09:52:26] karapetyan: has joined #ruby
[09:52:36] Nobun: 1) question is more about ruby in general, (remembering that the final objective is to embed ruby into an application) and it is "how to properly add directories to LOAD_PATH)?
[09:53:12] karapetyan: has joined #ruby
[09:53:13] Nobun: the examples I saw googling are not clear. I mean... how should I add a specific path?
[09:53:28] dminuoso: Nobun: 1) `$:.unshift foo`
[09:53:52] dminuoso: or `$LOAD_PATH.unshift` if you prefer
[09:54:02] karapetyan: has joined #ruby
[09:54:14] Nobun: yeah I saw but: A) what unshift exactly does?
[09:54:20] dminuoso: Nobun: .push but from the other side.
[09:54:40] Nobun: so it is like prepending instead of appending?
[09:54:41] dminuoso: &ri Array#unshift
[09:54:41] `derpy: http://ruby-doc.org/core-2.4.1/Array.html#method-i-unshift
[09:54:44] dminuoso: Nobun: Right.
[09:54:47] karapetyan: has joined #ruby
[09:55:03] ramfjord: has joined #ruby
[09:55:22] Nobun: dminuoso: could this be done also in an application wich will embed ruby?
[09:55:32] Nobun: I mean in the C code?
[09:55:45] dminuoso: Nobun: Yeah. Do you intend to embed full ruby, or just mruby?
[09:56:34] Nobun: I don't know the difference, to be honest. I need ruby for some specific task in my applications. Let me see my CMakeFile...
[09:57:23] dminuoso: Nobun: mruby is a cut down ruby tailored for embedding into other applications
[09:57:34] dminuoso: Nobun: https://github.com/mruby/mruby
[09:57:44] mtkd: has joined #ruby
[09:59:04] Nobun: At the current state I am embedding ruby (since I use 'find_package(Ruby 1.9)' on CMakeLists.txt)
[09:59:34] dminuoso: Nobun: You really should probably try to use mruby.
[09:59:38] Nobun: but I will consider also mruby. At the moment I focus my question to full ruby
[09:59:42] dminuoso: Nobun: What do you intend to use ruby for?
[10:00:00] dminuoso: Nobun: Well, you'd have to seriously screw around ruby itself to make this work.
[10:00:57] Nobun: my application will (optionally) embed ruby to try to extract informations from some ruby mashalized binary files
[10:01:37] Nobun: the task of ruby will be limited to this task (as my application will embed python as primary scripting language)
[10:01:59] dminuoso: Nobun: how are they marshalled?
[10:02:09] dminuoso: Using ::Marshal ?
[10:02:35] dminuoso: Nobun: use mruby.
[10:03:22] Nobun: Yeah... I assume. But not sure, since it is not completely a ruby file. I am developing an application for translating RpgMaker VX Ace projects (and also MV, but MV uses json files so not problem there)
[10:04:31] alfiemax: has joined #ruby
[10:04:34] Nobun: at the current state (without embed) the "extract text phase into .po files" can be done within Rpgmaker itself with two ruby script. But the process could be a little problematic for the end-user
[10:05:11] Nobun: the idea is to allow the application to perform directly this task.
[10:05:51] Nobun: dminuoso: however those files should be marshalled with Marshal
[10:07:30] Nobun: (however writing an additional line in ruby_file instead of embedding in the application could be not a problem, after all)
[10:07:43] xuyuheng: has joined #ruby
[10:08:04] Nobun: the question 2 is about embedding itself. More in detail about managing error (more or less like the interpreter).
[10:08:32] WhereIsMySpoon: has joined #ruby
[10:08:56] konsolebox: has joined #ruby
[10:08:59] Nobun: The problem is that I did a first embedding test, adding an Embedded C Ruby Class and it works
[10:10:15] Nobun: but if I will have errors, they will be not displayed like I could do in the interpreter. So I would like to ask if there is an API function I should use to "capture" all error messages cought in the script (like the interpreter does)
[10:10:43] alfiemax: has joined #ruby
[10:15:22] arne: has joined #ruby
[10:15:26] alfiemax: has joined #ruby
[10:15:32] arne: someone here having experience with "shrine"?
[10:15:35] alfiemax: has joined #ruby
[10:15:47] arne: i upload files to a s3 bucket, which reference gets stored with shrine
[10:15:53] marr: has joined #ruby
[10:16:05] arne: now i work on that file.. but shrine downloads the file over and over and over
[10:16:19] arne: (that resulted in a amazon bill of 800 bucks once, which they nicely reverted)
[10:16:30] arne: it's really odd that this gem has no cache
[10:18:00] psychicist__: has joined #ruby
[10:20:21] Azure: has joined #ruby
[10:20:48] momomo_: has joined #ruby
[10:20:51] momomo_: ola seniors
[10:21:18] momomo_: is it possible to set a partial in a partial ? without extrating to a separate file ?
[10:21:31] momomo_: create a local partial kind of ... from a string or variable
[10:22:17] arne: what is a local partial
[10:22:18] konsolebox: has joined #ruby
[10:23:11] arne: i feel like there is some explaining missing
[10:23:46] Bish: momomo_: are you trying to partition a file?
[10:24:03] alex``: has joined #ruby
[10:24:09] momomo_: i want to set a partial locally ... rather than extract content to a separate file .. the content in the separate partial .erb ... is desired to remain in the same file as the caller basically
[10:24:24] Bish: oh, you want to split a class or module?
[10:24:35] momomo_: Bish: it's an erb file
[10:24:54] milardovich: has joined #ruby
[10:25:34] Bish: well you should work with whatever the framework you're using is giving you, but erb itself does not have such a feature, i guess
[10:25:50] lxsameer: has joined #ruby
[10:25:57] momomo_: and I can extrat html and what not into a partial.erb right? ... rather than putting it in a separate file .. i would like to declare the body of that partial into a variable than can then be invoked in the same manner as when you load it from a file
[10:26:10] tomphp: has joined #ruby
[10:26:26] momomo_: Bish: example <%= partial 'partials/checkout/_generic-module-box-row', :locals => {:row => row.merge({key:key})} %>
[10:26:51] momomo_: is partial call here a framework specifik function ?
[10:27:50] Bish: im guessing, yes, but i am not sure
[10:30:08] Nobun: dminuoso: thank for your replies. However I taked a look at mruby, but I think that mruby introduces some additional problems so I will be stick in the full Ruby.
[10:30:51] Guest33581: has joined #ruby
[10:31:33] Bish: dminuoso: still not sleeping?
[10:33:12] Bish: momomo_: http://ruby-doc.org/stdlib-2.5.0/libdoc/erb/rdoc/ERB.html
[10:33:29] Bish: if you look at that, you can see that erb does not actually do anything except for
[10:33:35] Bish: <% > <%= >
[10:35:30] Bish: so yes, i'd say this is more of a #{framework} question than an erb one
[10:36:03] Bish: and i could only help you, if you were using roda
[10:36:47] tvw: has joined #ruby
[10:39:02] momomo_: Bish: where can I find a reference to the partial method ?
[10:39:22] momomo_: so that it can ignore opening a file and use it's content which is a string eventually
[10:39:59] conta: has joined #ruby
[10:40:22] Bish: momomo_: what is your framework?
[10:41:33] im0nde: has joined #ruby
[10:43:21] Bish: http://api.rubyonrails.org/classes/ActionView/PartialRenderer.html
[10:44:14] KeyJoo: has joined #ruby
[10:44:51] Bish: (and there is #rails)
[10:46:04] workmad3: has joined #ruby
[10:50:21] tomphp: has joined #ruby
[10:51:17] xuyuheng: has joined #ruby
[10:51:59] erlend: has joined #ruby
[10:52:03] sidx64: has joined #ruby
[10:55:15] amatas: has joined #ruby
[10:55:57] schneider: has joined #ruby
[11:00:43] amatas: has joined #ruby
[11:01:31] Megamosaren: has joined #ruby
[11:04:09] ryan_ford: has joined #ruby
[11:06:22] kapil___: has joined #ruby
[11:09:25] schneider: has joined #ruby
[11:12:10] banisterfiend: has joined #ruby
[11:15:27] drale2k_: has joined #ruby
[11:17:33] milardovich: has joined #ruby
[11:18:54] schneider: has joined #ruby
[11:19:01] conta: has joined #ruby
[11:19:41] phaul: has joined #ruby
[11:21:45] KeyJoo: has joined #ruby
[11:22:54] Toggi3: has joined #ruby
[11:26:52] conta: has joined #ruby
[11:28:58] Toggi3: has joined #ruby
[11:29:17] amatas: has joined #ruby
[11:29:40] apparition: has joined #ruby
[11:30:47] dstrunk: has joined #ruby
[11:33:30] ferr: has joined #ruby
[11:34:03] ferr: has left #ruby: ()
[11:34:23] dstrunk: has joined #ruby
[11:35:54] jimmylu2333-fedo: has joined #ruby
[11:36:36] ldnunes: has joined #ruby
[11:37:37] shinnya: has joined #ruby
[11:39:05] sidx64: has joined #ruby
[11:41:51] alfiemax_: has joined #ruby
[11:51:59] AJA4350: has joined #ruby
[11:54:23] sidx64: has joined #ruby
[11:55:15] ramfjord: has joined #ruby
[11:56:04] WhereIsMySpoon: has joined #ruby
[11:56:40] Nobun: I try to bump my second question, with a code snippet: http://dpaste.com/3VJSP8V
[11:57:29] Nobun: this piece of c++ code should keep some paramaters (not important for the question) and then run the "edb.rb" script
[11:58:55] Nobun: I follow a code snippet I found around the net. However the "if status" seems not working, since the function rubycall::errormsg (a function wich should print into a window the error catched by line 13-14) seems not called at all.
[11:58:56] sidx64: has joined #ruby
[11:59:21] Nobun: So... how to "capture" error messages and show them in my application wich embeds (full) ruby?
[12:01:07] Psybur: has joined #ruby
[12:01:43] Psybur_: has joined #ruby
[12:01:57] mtkd: has joined #ruby
[12:02:16] dionysus69: has joined #ruby
[12:03:16] synthroid: has joined #ruby
[12:03:17] cschneid: has joined #ruby
[12:04:45] apeiros: has joined #ruby
[12:05:00] synthroid: has joined #ruby
[12:05:23] milardovich: has joined #ruby
[12:07:07] sidx64: has joined #ruby
[12:10:12] xuyuheng: has joined #ruby
[12:12:38] alex``: has joined #ruby
[12:15:19] momomo_: has joined #ruby
[12:15:22] momomo_: I got logged out
[12:15:26] momomo_: Did I miss anything?
[12:15:35] momomo_: Nobody responded to my last
[12:18:15] Nobun: momomo_: Bish | momomo_: what is your framework? │ agrecascino
[12:18:16] Nobun: │11:40:58 Bish | rails?
[12:18:34] momomo_: but i believe that was before my last message
[12:18:50] Nobun: momomo_: Bish | http://api.rubyonrails.org/classes/ActionView/PartialRenderer.html
[12:19:02] Nobun: those are the last replies
[12:19:07] sidx64: has joined #ruby
[12:19:10] momomo_: Nobun: thanks!
[12:19:24] Psybur__: has joined #ruby
[12:24:38] Mike11: has joined #ruby
[12:25:16] momomo_: So I have this now:
[12:25:17] momomo_: https://hastebin.com/tahiyalixo.rb
[12:25:28] momomo_: It is working somewhat .. but I can't refer to the variables
[12:25:30] momomo_: of the model
[12:25:37] momomo_: Can someone help with that?
[12:26:00] vondruch: has joined #ruby
[12:26:38] Zaab1t: has joined #ruby
[12:26:56] perzival: has joined #ruby
[12:27:31] sidx64: has joined #ruby
[12:28:37] John_Ivan: has joined #ruby
[12:29:56] vondruch: has joined #ruby
[12:33:05] yohji: has joined #ruby
[12:36:47] kke: what's prettier than self.class.method_name?
[12:37:10] stairmast0r: has joined #ruby
[12:39:35] c_nick: has joined #ruby
[12:39:59] sidx64: has joined #ruby
[12:40:33] dminuoso: kke: F.method_name
[12:40:42] coderphive: has joined #ruby
[12:51:22] Toggi3: has joined #ruby
[12:53:18] bmurt: has joined #ruby
[12:54:02] tomphp: has joined #ruby
[12:54:10] bijan_: has joined #ruby
[12:58:32] shuforov: has joined #ruby
[13:00:12] alfiemax: has joined #ruby
[13:00:39] erlend: has joined #ruby
[13:01:45] WhereIsMySpoon: has joined #ruby
[13:04:04] milardovich: has joined #ruby
[13:05:59] sidx64: has joined #ruby
[13:06:01] rsh: has joined #ruby
[13:07:26] schneider: has joined #ruby
[13:08:40] jcalla: has joined #ruby
[13:10:41] alfiemax: has joined #ruby
[13:11:46] cdg: has joined #ruby
[13:16:18] leitz: has joined #ruby
[13:17:00] hinbody: has joined #ruby
[13:17:06] shinnya: has joined #ruby
[13:17:18] alfiemax: has joined #ruby
[13:19:50] Inoperable: has joined #ruby
[13:22:52] tomphp: has joined #ruby
[13:23:51] Inoperable: has joined #ruby
[13:26:22] amatas: has joined #ruby
[13:28:07] tomphp: has joined #ruby
[13:29:52] sidx64: has joined #ruby
[13:32:29] nicesignal: has joined #ruby
[13:33:31] duckpuppy: has joined #ruby
[13:33:36] c0ncealed: has joined #ruby
[13:34:21] nowhere_man: has joined #ruby
[13:38:07] tomphp: has joined #ruby
[13:38:32] konsolebox: has joined #ruby
[13:38:49] nowhereman_: has joined #ruby
[13:45:21] jecht: has joined #ruby
[13:45:23] graft: has joined #ruby
[13:45:23] graft: has joined #ruby
[13:45:24] ldnunes: has joined #ruby
[13:46:36] Rapture: has joined #ruby
[13:48:55] wsmoak: has joined #ruby
[13:49:19] pd: has joined #ruby
[13:49:50] momomo_: Hello again! I haven' given up
[13:49:52] momomo_: On http://ruby-doc.org/stdlib-2.0.0/libdoc/erb/rdoc/ERB.html
[13:50:10] momomo_: It says: filename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml
[13:50:15] momomo_: How would they be used ?
[13:50:35] momomo_: https://hastebin.com/mazuyogera.rb
[13:50:45] ciscam: has joined #ruby
[13:50:45] momomo_: But I can't get it to read any passed stuff
[13:50:53] momomo_: But it can see the surronding variables
[13:50:58] momomo_: (non passed)
[13:51:01] momomo_: in that template
[13:51:49] ciscam: has joined #ruby
[13:52:37] bwq: has joined #ruby
[13:55:25] ramfjord: has joined #ruby
[13:55:36] Toggi3: has joined #ruby
[13:57:16] jrafanie: has joined #ruby
[14:00:17] harrycs: has joined #ruby
[14:02:49] jottr: has joined #ruby
[14:03:10] perzival: has joined #ruby
[14:06:28] claudiuinberlin: has joined #ruby
[14:08:18] Toggi3: has joined #ruby
[14:10:00] momomo_: I think i've figured it out
[14:10:16] momomo_: Is there a way now to declare a string without having to escape anything ???
[14:16:16] raynold: has joined #ruby
[14:23:06] coderphive: has joined #ruby
[14:25:42] DTZUZO: has joined #ruby
[14:26:20] netherwolfe: has joined #ruby
[14:28:03] aufi_: has joined #ruby
[14:30:49] ramfjord: has joined #ruby
[14:34:11] tao_: has joined #ruby
[14:35:00] kn-928: has joined #ruby
[14:36:45] rabajaj: has joined #ruby
[14:39:29] cschneid: has joined #ruby
[14:39:58] Guest80639: has joined #ruby
[14:43:36] cschneid: has joined #ruby
[14:58:55] oleo: has joined #ruby
[15:02:10] tomphp: has joined #ruby
[15:02:59] rippa: has joined #ruby
[15:04:03] maufart__: has joined #ruby
[15:04:22] catbusters: has joined #ruby
[15:07:14] mtkd: has joined #ruby
[15:09:23] erlend: has joined #ruby
[15:15:10] synthroid: has joined #ruby
[15:16:02] synthroid: has joined #ruby
[15:24:34] Dimik: has joined #ruby
[15:25:39] troys: has joined #ruby
[15:29:01] tAn: has joined #ruby
[15:35:14] bmurt: has joined #ruby
[15:35:43] pastorinni: has joined #ruby
[15:36:37] vutral|kali: has joined #ruby
[15:36:37] vutral|kali: has joined #ruby
[15:37:30] mikecmpb_: has joined #ruby
[15:40:17] milardovich: has joined #ruby
[15:42:19] coderphive: has joined #ruby
[15:45:11] jcarl43: has joined #ruby
[15:53:45] alfiemax: has joined #ruby
[15:54:29] cagomez: has joined #ruby
[15:54:44] bmurt: has joined #ruby
[15:55:41] jeecht: has joined #ruby
[15:57:18] alfiemax: has joined #ruby
[15:58:11] cyberg: has joined #ruby
[16:00:07] einarj: has joined #ruby
[16:04:24] [Butch]: has joined #ruby
[16:05:32] imode: has joined #ruby
[16:06:27] cschneid: has joined #ruby
[16:07:09] za1b1tsu: has joined #ruby
[16:13:37] jimmylu2333-fedo: has joined #ruby
[16:14:51] ldnunes: has joined #ruby
[16:17:22] mikecmpbll: has joined #ruby
[16:20:14] guacamole: has joined #ruby
[16:20:14] guacamole: has joined #ruby
[16:20:25] FrostCandy: has joined #ruby
[16:20:33] desperek: has joined #ruby
[16:24:30] duderonomy: has joined #ruby
[16:26:31] jamesaxl: has joined #ruby
[16:30:52] c_nick: has joined #ruby
[16:33:29] yeticry: has joined #ruby
[16:34:54] c_nick: how can i capture the data from the following string {name|color:red}age{address|color:green} and split it into three components {name|color:red} {address|color:green} age
[16:35:51] schneider: has joined #ruby
[16:36:02] pd: has joined #ruby
[16:37:43] yohji: has joined #ruby
[16:40:20] harrycs: has joined #ruby
[16:42:58] apeiros: >> "{name|color:red}age{address|color:green}".scan(/\{(\w+)\|color:(\w+)\}/) # @ c_nick
[16:43:00] ruby[bot]: apeiros: # => [["name", "red"], ["address", "green"]] (https://eval.in/975203)
[16:43:24] apeiros: you want age as a component too…
[16:43:47] apeiros: >> "{name|color:red}age{address|color:green}".scan(/\{(\w+)\|color:(\w+)\}|[^\{]+/) # might serve as a start
[16:43:49] ruby[bot]: apeiros: # => [["name", "red"], [nil, nil], ["address", "green"]] (https://eval.in/975204)
[16:44:06] apeiros: right, if I have captures, everything needs one…
[16:44:17] apeiros: >> "{name|color:red}age{address|color:green}".scan(/\{(\w+)\|color:(\w+)\}|([^\{]+)/)
[16:44:18] ruby[bot]: apeiros: # => [["name", "red", nil], [nil, nil, "age"], ["address", "green", nil]] (https://eval.in/975205)
[16:44:27] c_nick: {name|color:red} should become name color:red
[16:44:40] tomphp: has joined #ruby
[16:44:44] WhereIsMySpoon: thats not what you specified before
[16:44:47] havenwood: >> '{name|color:red}age{address|color:green}'.scan(/[^}]*}/).flat_map { |s| if s.start_with? '{'; s; else; outside, _, inside = s.partition('{'); [outside, "{#{inside}"]; end }
[16:44:48] ruby[bot]: havenwood: # => ["{name|color:red}", "age", "{address|color:green}"] (https://eval.in/975206)
[16:44:52] WhereIsMySpoon: who made up this data format? o.O
[16:44:56] apeiros: c_nick: well, you have something to work with now
[16:45:08] apeiros: I'm sure you can give it a try :)
[16:45:24] apeiros: WhereIsMySpoon: looks a bit like some php template engine I used like a decade ago
[16:46:05] apeiros: where `name` is the expression which provides the value, and everything after | applies some kinds of processors to that value
[16:46:21] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}|([^\{]+)/)
[16:46:22] ruby[bot]: c_nick: # => /tmp/execpad-96f26d3c2423/source-96f26d3c2423:2: syntax error, unexpected tLABEL ...check link for more (https://eval.in/975207)
[16:46:50] havenwood: c_nick: => [[nil, "name|color:red}age"], [nil, "address|color:green}"]]
[16:47:01] darkhanb: has joined #ruby
[16:47:03] WhereIsMySpoon: havenwood: what on earth is that code?
[16:47:10] WhereIsMySpoon: outside, _, inside ?
[16:47:24] havenwood: WhereIsMySpoon: In my defense, i haven't had coffee!
[16:47:27] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}
[16:47:28] ruby[bot]: c_nick: # => /tmp/execpad-914e7f830ab6/source-914e7f830ab6:2: syntax error, unexpected tLABEL ...check link for more (https://eval.in/975209)
[16:47:34] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}}
[16:47:35] ruby[bot]: c_nick: # => /tmp/execpad-7648855a8bff/source-7648855a8bff:2: syntax error, unexpected tLABEL ...check link for more (https://eval.in/975211)
[16:47:38] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\})
[16:47:39] ruby[bot]: c_nick: # => /tmp/execpad-33a93b41432a/source-33a93b41432a:2: syntax error, unexpected tLABEL ...check link for more (https://eval.in/975212)
[16:47:51] havenwood: c_nick: #=> []
[16:48:00] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}/)
[16:48:09] havenwood: c_nick: #=> []
[16:48:12] WhereIsMySpoon: you broke the bot
[16:48:13] c_nick: no i missed the /
[16:48:37] c_nick: WhereIsMyBot
[16:49:08] WhereIsMySpoon: havenwood: it wasnt accusatory, i was just curious
[16:49:12] havenwood: WhereIsMySpoon: 'example'.partition 'x' #=> ["e", "x", "ample"]
[16:49:16] za1b1tsu: has joined #ruby
[16:49:45] havenwood: before_x, x, after_x = 'example'.partition 'x'
[16:49:47] WhereIsMySpoon: right, ruby has multiple variable assignments in one expression
[16:49:49] c_nick: i agree with WhereIsMySpoon the solution has a lot of layers will be nice to have a simple one
[16:50:14] havenwood: c_nick: You could use StringScanner, or maybe a bit fancier regexp.
[16:50:45] havenwood: c_nick: will the thing between the brackets ("age" in your example) ever begin or end the string?
[16:51:16] havenwood: or is it always?: }age{
[16:51:32] WhereIsMySpoon: havenwood’s solution looks nicest so far i think
[16:51:41] c_nick: nope it can start or end
[16:52:10] havenwood: mine above just doesn't account for an ending one
[16:52:26] c_nick: i am pretty sure this is possible via regex
[16:52:34] c_nick: i simply cannot get my head around it
[16:52:43] havenwood: the regexp for a single pass is pretty complex
[16:52:44] havenwood: two passes is easier
[16:54:42] havenwood: yeah, i'd probably do two passes with regexp or stringscanner
[16:56:36] tomphp: has joined #ruby
[16:57:23] havenwood: c_nick: I'll give you a multiple regexp example to consider, sec.
[17:02:42] havenwood: >> s = '{name|color:red}age{address|color:green}'; [s[/\A\w*/], *s.scan(/(?<=})[^{}]*/), *s.scan(/{[^}]*}/)].reject(&:empty?)
[17:02:43] ruby[bot]: havenwood: # => ["age", "{name|color:red}", "{address|color:green}"] (https://eval.in/975223)
[17:02:58] havenwood: c_nick: I didn't bother to preserve order, but it does beginning, middle or end.
[17:03:31] havenwood: >> s = 'before{name|color:red}age{address|color:green}after'; [s[/\A\w*/], *s.scan(/(?<=})[^{}]*/), *s.scan(/{[^}]*}/)].reject(&:empty?)
[17:03:32] ruby[bot]: havenwood: # => ["before", "age", "after", "{name|color:red}", "{address|color:green}"] (https://eval.in/975224)
[17:04:14] havenwood: the first bit with the \w is probably a little brittle, but that's easily replaced
[17:04:24] TvL: has joined #ruby
[17:04:27] tomphp: has joined #ruby
[17:04:32] c_nick: i forgot what A stood for
[17:04:42] havenwood: beginning of string: \A
[17:04:51] c_nick: wasnt that ^
[17:05:42] havenwood: c_nick: this is better: [s[/\A[^{]*/], *s.scan(/(?<=})[^{}]*/), *s.scan(/{[^}]*}/)].reject(&:empty?)
[17:05:43] c_nick: i need to study this but you have been a big help to me
[17:05:49] c_nick: many thanks havenwood
[17:06:15] havenwood: c_nick: ^ that version is solely based on { and } so it should handle more edgecases. you're welcome
[17:06:42] havenwood: Happy coding!
[17:07:38] eckhardt_: has joined #ruby
[17:10:03] kliq: has joined #ruby
[17:10:10] suukim: has joined #ruby
[17:11:58] mtkd: has joined #ruby
[17:17:14] konsolebox: has joined #ruby
[17:18:09] erlend: has joined #ruby
[17:19:20] pd: has joined #ruby
[17:24:47] havenwood: ACTION peers into the mysterious future...
[17:24:52] havenwood: module Kernel; alias then yield_self end
[17:25:07] perzival: has joined #ruby
[17:25:42] WhereIsMySpoon: is this going to be some form of #define
[17:26:18] havenwood: WhereIsMySpoon: It looks like Matz has accepted an alias for #yield_self. I can't tell if the alias will be "then" or "promise" or what.
[17:26:28] mtkd: has joined #ruby
[17:26:55] creat: has joined #ruby
[17:27:14] havenwood: investigating ;-)
[17:27:22] tomphp: has joined #ruby
[17:27:29] WhereIsMySpoon: i have no idea what yield_self is :D
[17:27:38] guacamole: #yield_self is one of my fav new things in 2.5 :)
[17:27:49] guacamole: although it took like 3 explanations for me to understand it lol
[17:27:49] havenwood: ACTION high fives guacamole 
[17:28:25] WhereIsMySpoon: its similar to what dminuoso was talking to me about yesterday
[17:28:32] guacamole: ACTION thanks havenwood for explaining 3 times
[17:28:59] WhereIsMySpoon: allows you to chain method calls that you would normally nest
[17:29:47] SeepingN: has joined #ruby
[17:29:54] WhereIsMySpoon: then seems like a reasonable alias
[17:30:21] WhereIsMySpoon: its kinda like the promise chaining stuff in js
[17:31:25] ramfjord: has joined #ruby
[17:31:37] lunarkitty7: has joined #ruby
[17:32:12] jeecht: has joined #ruby
[17:33:22] guacamole: its like tap but returns the receiver
[17:33:59] havenwood: guacamole: Yup, and instead of raising when no block is provided, it returns a sized enumerator, always size one with just the receiver as the thing.
[17:34:12] havenwood: raising when no block is provided, like tap*
[17:34:22] apeiros: oh, dminuoso will be a fan of that
[17:34:23] ruby[bot]: havenwood: # => no block given (LocalJumpError) ...check link for more (https://eval.in/975233)
[17:35:02] havenwood: apeiros: I got to teach Ruby objects they are size one when implementing #yield_self. That was fun, even though I admittedly don't know what I'm doing.
[17:35:47] WhereIsMySpoon: >> 42.yield_self
[17:35:48] ruby[bot]: WhereIsMySpoon: # => undefined method `yield_self' for 42:Fixnum (NoMethodError) ...check link for more (https://eval.in/975236)
[17:36:05] havenwood: apeiros: I changed it from an unsized enumerable to a sized one.
[17:36:20] havenwood: WhereIsMySpoon: The bot version is too old.
[17:36:37] WhereIsMySpoon: damnit, bot maintainer!
[17:36:37] guacamole: can we update rubybot to use 2.5?
[17:37:04] havenwood: I wrote this little function: https://github.com/ruby/ruby/blob/d13a2d498cb2758cd71523e1099f9591c30c2b86/object.c#L559-L563
[17:37:18] havenwood: I expected it to get denied, but merged! :-D
[17:38:09] havenwood: I'm excited about the `then` alias. That does seem nice. Will use!
[17:40:14] jrafanie_: has joined #ruby
[17:40:43] havenwood: I'm already excited for 2.6 with `then` and `filter` and a JIT.
[17:40:53] havenwood: It's nice the preview release is out so early.
[17:41:25] havenwood: And more to come early.
[17:44:24] raynold: has joined #ruby
[17:44:35] minimalism: has joined #ruby
[17:46:35] ldepandis: has joined #ruby
[17:46:58] havenwood: guacamole: I think ruby[bot] should use the nightly build. Live in the now!
[17:48:45] harrycs: has joined #ruby
[17:49:01] karapetyan: has joined #ruby
[17:50:26] shuforov: has joined #ruby
[17:51:06] alex``: has joined #ruby
[17:52:43] rabajaj: has joined #ruby
[17:53:12] ldnunes: has joined #ruby
[17:55:43] apeiros: havenwood: 👍🏻
[17:56:15] dionysus69: has joined #ruby
[18:00:49] conta: has joined #ruby
[18:01:45] pd: has joined #ruby
[18:04:08] jottr: has joined #ruby
[18:06:50] Evesy: has joined #ruby
[18:09:26] jimmylu2333-fedo: has joined #ruby
[18:19:02] dminuoso: apeiros: A fan of what?
[18:20:25] harrycs: has joined #ruby
[18:22:44] tomphp: has joined #ruby
[18:22:54] jimmylu2333-fedo: has joined #ruby
[18:23:53] zapata: has joined #ruby
[18:24:16] jottr: has joined #ruby
[18:24:39] mikecmpbll: has joined #ruby
[18:25:48] P1ro: has joined #ruby
[18:26:17] \void: has joined #ruby
[18:26:19] dminuoso: havenwood: I dont like #then
[18:26:41] havenwood: dminuoso: neither did some of core, but it seems Matz approved it
[18:26:44] havenwood: It's better than yield_self!
[18:27:11] dminuoso: havenwood: The whole construct is fishy.
[18:28:40] eckhardt_: has joined #ruby
[18:31:09] dminuoso: havenwood: Btw, did you notice that
[18:31:23] dminuoso: colon in there?
[18:35:36] dminuoso: Never thought about it, but that's the type theory symbol for "has type" that dates back to at least Chuch's typed λ calculus
[18:35:47] dminuoso: ACTION wonders whether that choice was intentional
[18:37:34] jecht: has joined #ruby
[18:46:19] harryk_: has joined #ruby
[18:46:25] howdoi: has joined #ruby
[18:47:55] jamesaxl: has joined #ruby
[18:51:45] Cavallari: has joined #ruby
[18:52:10] tomphp: has joined #ruby
[18:53:41] chouhoul_: has joined #ruby
[18:54:32] chouhoul_: has joined #ruby
[18:55:18] Code4Dopamine: has joined #ruby
[18:56:21] rabajaj: has joined #ruby
[18:57:42] tolerablyjake: has joined #ruby
[18:59:11] chouhoulis: has joined #ruby
[18:59:49] n0m4d1c: has joined #ruby
[19:03:57] rabajaj: has joined #ruby
[19:08:46] krawchyk: has joined #ruby
[19:11:51] duckpuppy: has joined #ruby
[19:15:07] bmurt: has joined #ruby
[19:21:33] venmx: has joined #ruby
[19:23:49] Ryzokuken: has joined #ruby
[19:26:48] za1b1tsu: has joined #ruby
[19:26:52] erlend: has joined #ruby
[19:28:59] conta1: has joined #ruby
[19:29:41] TheBloke: has joined #ruby
[19:30:51] jecht: has joined #ruby
[19:30:59] mtkd: has joined #ruby
[19:33:14] Hanmac: has joined #ruby
[19:34:22] karapetyan: has joined #ruby
[19:35:46] eam: has joined #ruby
[19:35:54] cagomez: has joined #ruby
[19:36:55] za1b1tsu: has joined #ruby
[19:41:50] zapata: has joined #ruby
[19:41:52] duderonomy: has joined #ruby
[19:42:09] harryk_: has joined #ruby
[19:45:23] bmurt: has joined #ruby
[19:47:20] netherwolfe: has joined #ruby
[19:48:32] harrycs: anyone have suggestions on getting a first time junior role? i'm thinking of focusing on open source projects to get some experience, plus going to meetups to network a bit, but i'm not sure exactly how best to land that first role without a resume... NYC if that matters
[19:49:10] n008f4g_: has joined #ruby
[19:49:49] rsh: has joined #ruby
[19:50:25] claudiuinberlin: has joined #ruby
[19:53:04] za1b1tsu: has joined #ruby
[19:54:58] Megamosaren: has joined #ruby
[19:55:44] goatish: has joined #ruby
[19:56:42] sammi`_: has joined #ruby
[19:58:21] eam: harrycs: internships are a great way to get some junk on your resume and get an "in" without companies worrying about the relatively high cost of hiring/firing
[19:59:23] eam: absent that approach, definitely networking both at meetups (find hiring managers and befriend them) and via OSS work should help
[20:00:09] Creatornator: has joined #ruby
[20:00:25] jecht: has joined #ruby
[20:00:30] clemens3: has joined #ruby
[20:03:33] guacamole: has joined #ruby
[20:03:34] guacamole: has joined #ruby
[20:08:21] jenrzzz: has joined #ruby
[20:09:58] Nobun: I try to bump my second question, with a code snippet: │ __main__
[20:09:59] Nobun: │ | http://dpaste.com/3VJSP8V
[20:10:39] Nobun: http://dpaste.com/3VJSP8V (pasted from question I asked some hours ago)
[20:11:08] Nobun: the question is. How to properly have the error log from ruby when I embed it into application.
[20:11:45] Nobun: In the code snippet I did, the pycall:rubyerr seems is never executed, so it seems that "status" thing didn't work. Any idea?
[20:11:47] eckhardt_: has joined #ruby
[20:15:06] cyberg: has joined #ruby
[20:16:35] sameerynho: has joined #ruby
[20:19:15] tolerablyjake: has joined #ruby
[20:22:21] Creatornator: has joined #ruby
[20:32:52] John_Ivan: has joined #ruby
[20:36:16] jeecht: has joined #ruby
[20:38:49] tomphp: has joined #ruby
[20:41:11] cagomez: has joined #ruby
[20:41:13] netherwolfe: has joined #ruby
[20:43:14] tomphp: has joined #ruby
[20:43:32] duderonomy: has joined #ruby
[20:47:28] _joes__: has joined #ruby
[20:50:48] pastorinni: has joined #ruby
[20:51:43] pastorinni: has joined #ruby
[20:52:43] _joes__: has joined #ruby
[20:54:59] p4tch3s: has joined #ruby
[20:55:13] bijan_: has joined #ruby
[20:57:22] p4tch3s: has joined #ruby
[20:58:01] sanscoeur: has joined #ruby
[21:01:28] im0nde: has joined #ruby
[21:02:34] im0nde: has joined #ruby
[21:03:23] Creatornator: has joined #ruby
[21:08:27] Toggi3: has joined #ruby
[21:09:08] im0nde: has joined #ruby
[21:09:46] workmad3: has joined #ruby
[21:10:44] im0nde: has joined #ruby
[21:11:17] karapetyan: has joined #ruby
[21:12:00] Nobun: has joined #ruby
[21:15:02] cdg: has joined #ruby
[21:19:47] n0m4d1c: has joined #ruby
[21:20:27] cdg_: has joined #ruby
[21:24:06] havenwood: think a nightly Ruby build script for macOS is worth doing anything with?: https://gist.github.com/havenwood/823382815cbdcfddadd798d4042023a8
[21:24:52] havenwood: I guess RVM folk have no such need. ;-)
[21:25:00] tomphp: has joined #ruby
[21:25:43] canton7: L59... should be nightly-announce?
[21:26:20] havenwood: canton7: eek, thanks!
[21:28:00] havenwood: I should ditch the cd'ing
[21:28:07] tAn: has joined #ruby
[21:30:14] tolerablyjake: has joined #ruby
[21:31:00] cyberg: has joined #ruby
[21:32:18] Radar: havenwood: thanks for the script! I've wanted something like this in the past.
[21:35:02] erlend: has joined #ruby
[21:35:07] mlehrer: has joined #ruby
[21:36:05] mtkd: has joined #ruby
[21:38:32] _joes__: has joined #ruby
[21:40:46] im0nde: has joined #ruby
[21:41:38] _joes__: has joined #ruby
[21:43:45] _joes___: has joined #ruby
[21:44:33] _joes____: has joined #ruby
[21:45:14] n0m4d1c: has joined #ruby
[21:46:41] _joes___1: has joined #ruby
[21:48:12] tAn: has joined #ruby
[21:48:22] _joes___2: has joined #ruby
[21:48:54] _joes___3: has joined #ruby
[21:52:56] schneider: has joined #ruby
[21:54:52] RedNifre: has joined #ruby
[21:55:47] RedNifre: Heeeeeeeeyo!
[21:55:52] SanguineAnomaly: has joined #ruby
[21:56:41] RedNifre: Remember when you always wanted to put UTF-8 text in a deck of poker cards? I wrote a ruby script that allows you to do that: https://steemit.com/software/@michaelzinn/store-text-in-a-deck-of-cards
[21:58:39] Inside: has joined #ruby
[21:59:28] Radar: Neat way to encrypt messages. Thanks for sharing RedNifre.
[21:59:56] Radar: Or encode, I guess.
[22:00:22] apeiros: steganograph?
[22:00:31] Inside: Guys. I just took a glance at using electron/react to create desktop applications. What. what. what?! It's easy! Just include all of these dependencies and type npm install. Just spool up a bunch of processes that talk to each other and etcetcetc. Oh - your hello world app is already 120MB? No biggie c_c
[22:00:39] apeiros: ACTION wonders what the verb of steganography is
[22:01:01] Radar: Inside: See also: Atom, VS Code, Slack, etc.
[22:01:10] Radar: RAM vendors _love_ electron.
[22:01:25] Inside: I use VS code. I used to use Slack at my old job, but it didn't want to work very well with my mobile nvidia graphics card.
[22:01:50] Radar: My battery lasts about 20% longer without Slack.
[22:02:01] Radar: Give me IRC or give me death.
[22:02:34] cyberg: has joined #ruby
[22:04:01] jenrzzz_: has joined #ruby
[22:04:22] RedNifre: Radar yes, I wrote it myself. Unfortunately I don't really have a use for it.
[22:05:13] RedNifre: apeiros Kinda, I guess. Except that the information is not hidden inside of other information since card order in decks of cards is usually assumed to be meaningless.
[22:05:40] Inside: I might as well try ruby + gtk at this rate :|
[22:05:58] apeiros: RedNifre: the deck is how it is hidden.
[22:06:03] Radar: RedNifre: But if you knew the order of the cards was meaningful then you could use that to decode the message.
[22:06:08] apeiros: you can pass somebody a deck of cards and they can translate the message back out of it
[22:06:22] Inside: Ooh cryptography stuff?
[22:06:33] apeiros: more steganography
[22:07:17] RedNifre: Yes, it's steganography. I think you could add symmetric encryption with modulo to make the deck look shuffled.
[22:07:29] RedNifre: I mean, instead of encrypting the bytes you encrypt the deck permutation number.
[22:08:05] duckpuppy: has joined #ruby
[22:08:24] RedNifre: 5h Qd Qs 3d 3c 9c 4d 9h Qh 8h 4s 5c Th 7d Kc Jh 2h 9d Jd Kd 7h Ah 5d Ac 2d 6c 7c 2s Td Ts 8s Tc 8d Ad 6d 3h 4h 6h Kh As 3s 5s 6s 7s 9s Js Ks 2c 4c 8c Jc Qc
[22:11:15] tomphp: has joined #ruby
[22:14:27] moei: has joined #ruby
[22:14:30] mkroman: cracked ur passwrod m8
[22:14:49] Inside: I'm running this centos instance within virtual box and the password is password. :|
[22:16:01] tAn: has joined #ruby
[22:17:24] Inside: I'm about to go learn C# since I can't find a non-convoluted way to write a simple windows desktop application that shows a single form :/
[22:17:45] nadir: has joined #ruby
[22:20:38] kobain: has joined #ruby
[22:22:20] im0nde: has joined #ruby
[22:22:32] im0nde: has left #ruby: ()
[22:22:38] AJA4350: has joined #ruby
[22:23:07] jenrzzz: has joined #ruby
[22:25:10] phaul: has joined #ruby
[22:30:35] zacts: has joined #ruby
[22:31:05] ineb: Inside: Qt?
[22:32:18] workmad3: has joined #ruby
[22:33:50] ledestin: has joined #ruby
[22:33:59] Inside: I'm trying to think of why i'm not using it
[22:34:11] Inside: Because I have done rubyqt stuff in the past
[22:37:19] graft: has joined #ruby
[22:37:29] havenwood: I just saw a writeup on the state of GUI bindings in Ruby, but I can't remember where.
[22:38:01] duckpuppy: has joined #ruby
[22:38:16] schneider: has joined #ruby
[22:38:40] havenwood: Inside: https://saveriomiroddi.github.io/An-overview-of-ruby-gui-development-in-2018/
[22:40:01] weaksauce: anecdote on that. i tried the more popular ones in that list and they didn't compile on macos
[22:40:22] weaksauce: perhaps someone with more time to give it a go might get it going
[22:40:26] havenwood: I've only used Shoes 4 and TK recently on macOS.
[22:40:34] Inside: havenwood: cool beans
[22:41:02] havenwood: They both worked. I'd be curious to try FXRuby and Ruby-GNOME2.
[22:41:10] weaksauce: i tried shoes a while ago and i think fx was the one that i couldn't get going
[22:41:40] weaksauce: figured i would just write whatever gui in something other than ruby
[22:41:56] Inside: I can't get gtk3 to work - something about cairo.so
[22:42:20] Inside: I guess C#.. but I popped over there and it's all about C# + trendy library!
[22:42:48] weaksauce: c# is pretty nice to develop for but it's a bit wordy
[22:43:21] weaksauce: the tag line for c# should be: hey, at least we aren't java!
[22:43:40] havenwood: Inside: Is JRuby a viable option. If so you might want to seriously consider Shoes 4, even though it's young.
[22:44:07] Inside: I can basically use any language - it's for a manufacturing test fixture to display some pretty charts.
[22:44:07] havenwood: weaksauce: I love how I follow up that comment by suggesting the JVM. :-O
[22:44:33] Inside: which is a nice kind of freedom, but also .. so much freedom
[22:44:34] havenwood: Inside: Shoes is so easy. Shoes 4 seems relatively stable and nice.
[22:44:48] weaksauce: the JVM is actually pretty solid... the language not so much :)
[22:45:04] havenwood: https://github.com/shoes/shoes4#readme
[22:45:16] havenwood: weaksauce: Kotlin ftw?
[22:45:40] weaksauce: seems pretty solid havenwood
[22:45:41] weaksauce: i haven't used it though
[22:45:53] sanscoeur: has joined #ruby
[22:46:16] duckpuppy: has joined #ruby
[22:47:49] kn-928: has joined #ruby
[22:52:33] nymous: has joined #ruby
[22:52:41] nymous: hey folks
[22:52:45] nymous: little help needed
[22:53:06] nymous: i'm trying to make an omnibus package
[22:53:24] nymous: but it fails right on the omnibus new
[22:53:42] nymous: with the following error: Could not find ".kitchen.local.yml.erb" in any of your source paths. Your current source paths are:
[22:54:56] nymous: var/lib/gems/2.3.0/gems/omnibus-5.6.8/lib/omnibus/generator_files
[22:57:40] weaksauce: havenwood seems like shoes 4 is a lot easier to get going
[22:57:46] weaksauce: but why is git all of the sudden messing up my line endings on files that i pull down
[22:59:08] n0m4d1c: has joined #ruby
[23:01:58] Creatornator: has joined #ruby
[23:04:59] xall: has joined #ruby
[23:05:36] rgb-one: has joined #ruby
[23:07:55] Creatornator: has joined #ruby
[23:08:10] nymous: is omnibus broken at all?
[23:08:29] havenwood: weaksauce: did your .gitconfig somehow get core.autocrlf set?
[23:08:33] havenwood: suspicious!
[23:08:48] weaksauce: havenwood maybe
[23:08:49] havenwood: nymous: the chef gem?
[23:09:00] cagomez: has joined #ruby
[23:09:15] nymous: i've managed to proceed with the omnibus new command, but trying to build an empty project cause error
[23:09:20] nymous: havenwood: yes
[23:09:24] weaksauce: i do use magit and sometimes i start typing thinking that i am in a different buffer and that could certainly cause some flags to be set
[23:10:07] havenwood: nymous: I'd suggest trying in the #chef channel, if you haven't already.
[23:10:15] sanscoeur: has joined #ruby
[23:11:03] nymous: just thought it should be popular
[23:11:06] havenwood: nymous: it has tests and seems maintained, so it seems it's meant to work
[23:11:35] nymous: their skeleton app have dead dependencies
[23:11:47] nymous: so i'm unable to build it
[23:12:28] nymous: i don't think that this should be a desired behavior for a newbie
[23:12:53] havenwood: nymous: aha. it sounds like the #chef channel is the right place to bring that up!
[23:13:38] robscomputer: has joined #ruby
[23:13:52] nowhereman_: has joined #ruby
[23:14:37] robscomputer: has joined #ruby
[23:15:40] havenwood: rgb-one: hi
[23:15:46] rgb-one: Why is yield used here: https://github.com/KDE/docker-neon/blob/Neon/stable/neondocker/neondocker.rb#L147?
[23:16:09] havenwood: rgb-one: The method is meant to be called with a block. That's where the block is yielded.
[23:16:50] tao_: has joined #ruby
[23:17:03] havenwood: rgb-one: If you called that method without a block, you'd get a `LocalJumpError: no block given (yield)` if you got to that part of the method.
[23:17:20] Radar: ACTION is conviced havenwood knew that error message off by heart
[23:17:22] iszak: has joined #ruby
[23:17:44] havenwood: ACTION plays the part of a REPL on many days
[23:17:56] havenwood: I am alas now a REPL and sock salesperson.
[23:18:06] ineb: havenwood: after some system()-call. i think the method sould check for block_given?
[23:18:15] duckpuppy: has joined #ruby
[23:20:06] havenwood: ineb: `yield if block_given?` is common, but doesn't it seem the author intended these to only be callable with a block?
[23:20:14] havenwood: I don't know. I'm not familiar with this code.
[23:20:16] schneider: has joined #ruby
[23:21:47] cschneid: has joined #ruby
[23:23:01] rgb-one: The result of this would be a string or a list havenwood: https://github.com/KDE/docker-neon/blob/Neon/stable/neondocker/neondocker.rb#L201?
[23:23:30] havenwood: rgb-one: An Array.
[23:24:00] havenwood: rgb-one: You can ask it what it is. Try: Dir['*'].class
[23:24:37] havenwood: rgb-one: You can do p-based debugging: p devices
[23:24:44] havenwood: rgb-one: puts devices.class
[23:24:47] rgb-one: > Dir['*'].class
[23:25:08] havenwood: rgb-one: (Try in IRB or Pry.)
[23:25:11] ruby[bot]: irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
[23:25:19] elomatreb: And + does concatenation on arrays
[23:25:59] rgb-one: Does this bot still execute code?
[23:26:03] ruby[bot]: Why don't you try it and see for yourself?
[23:26:12] Radar: >> puts "Do you still execute code?"
[23:26:13] ruby[bot]: Radar: # => Do you still execute code? ...check link for more (https://eval.in/975364)
[23:27:01] kn-928: has joined #ruby
[23:31:02] nowhere_man: has joined #ruby
[23:31:56] rgb-one: Alright, thanks guys
[23:38:22] kapil___: has joined #ruby
[23:41:41] ule: has joined #ruby
[23:43:46] erlend: has joined #ruby
[23:47:32] kn-928: has joined #ruby
[23:54:12] n0m4d1c: has joined #ruby
[23:55:20] POKE53280: has joined #ruby
[23:56:06] venmx: has joined #ruby