« Back to channel list

#ruby - 26 June 2018

« Back 1 day Forward 1 day »
[00:00:41] bijan_: has joined #ruby
[00:01:01] jhack: has joined #ruby
[00:01:42] izaac: has joined #ruby
[00:17:25] redlegion: has joined #ruby
[00:20:59] k0mpa: has joined #ruby
[00:23:28] al2o3-cr: cthu|: puts "\x1b[38;2;219;112;114mSALMON\x1b[0m" rgb if your terminal supports it.
[00:24:44] cthu|: why do they keep using this weird awkward old thing with 16 colors?
[00:25:12] cthu|: all these manuals about how to do PS1
[00:25:38] cthu|: I guess some terminals don't support it
[00:26:26] z3uS: has joined #ruby
[00:27:45] cagomez: has joined #ruby
[00:28:44] jabowa: has joined #ruby
[00:28:52] vyorkin: has joined #ruby
[00:31:10] elomatreb: There are different standards for terminal colors, the oldest one defined the 16 colors, a next one defined a set of 256 colors, and there is a standard for "true" 24-bit RGB, but support decreases as you go up
[00:31:20] elomatreb: Some terminals also fake support
[00:32:11] jabowa: Hey, new to ruby. Is it possible to see assign gems when importing? Example: custom_gem = require "custom_gem"
[00:33:20] havenwood: jabowa: No, there isn't anything like that.
[00:33:23] elomatreb: Not really, there is no true namespacing in Ruby
[00:33:49] havenwood: I think we'll see some namespace-related additions in the next few years.
[00:34:10] elomatreb: Any gem can modify any other class when it's required, the only thing that prevents this are conventions to not touch other peoples code unless you make it explicit
[00:34:21] havenwood: ACTION peers into the mysterious future...
[00:35:11] maiz: has joined #ruby
[00:35:13] jabowa: Oh okay. How about, is it possible to log all the "namespaces" from the required gems in a file?
[00:35:54] cthu|: is this ok? https://i.imgur.com/3oRafCF.png
[00:36:08] cthu|: I'm not sure if I can newline string concats
[00:36:22] jabowa: For example, require "custom_gem1", require "custom_gem1" ... puts available_namespaces?
[00:36:37] havenwood: cthu|: images are decidedly *not* okay for representing text ;-P
[00:36:50] cthu|: I know, sorry, it's the vnc
[00:36:56] cthu|: pain to copy from
[00:37:20] cthu|: can I concat like that? I won't get newlines in the concat result?
[00:37:32] elomatreb: That should work, yes, but it's not really idiomatic style
[00:37:33] havenwood: the lack of whitespace makes it odd to read
[00:37:56] cthu|: lack of whitespace? you'd add spaces before <<?
[00:37:57] havenwood: cthu|: ithinkyoushouldusespaces
[00:38:10] cthu|: and after colons?
[00:38:24] cthu|: and after commas
[00:39:11] cthu|: so you do 1 + 1 = 2 instead of 1+1=2?
[00:39:22] cthu|: I mean the latter seems more readable
[00:39:59] jottr_: has joined #ruby
[00:40:14] bijan_: has joined #ruby
[00:40:51] elomatreb: Maybe, but certainly not if you include more complicated expressions like method calls
[00:41:36] elomatreb: https://github.com/rubocop-hq/ruby-style-guide is a commonly used styleguide, if you want to look over some more idioms
[00:43:17] havenwood: cthu|: I always do `1 + 1 = 2`, yup.
[00:43:29] havenwood: cthu|: Though I'd never try to assign 2 to 2. ;-P
[00:43:58] havenwood: Well, I shouldn't say "never", haha
[00:44:03] cthu|: ahahahahaah
[00:50:25] SeepingN: has joined #ruby
[00:50:58] herbmillerjr: has joined #ruby
[00:53:27] StarSeed0000: has joined #ruby
[00:56:17] bijan_: has joined #ruby
[00:56:58] knight33: has joined #ruby
[00:57:23] jhack: has joined #ruby
[00:58:33] \void: has joined #ruby
[01:03:26] cadillac__: has joined #ruby
[01:03:54] orbyt_: has joined #ruby
[01:07:12] bijan_: has joined #ruby
[01:09:59] tdy: has joined #ruby
[01:12:31] moldy1984: has joined #ruby
[01:14:37] karapetyan: has joined #ruby
[01:18:23] cagomez: has joined #ruby
[01:23:12] bijan_: has joined #ruby
[01:30:08] t0xik: has joined #ruby
[01:34:52] bijan_: has joined #ruby
[01:41:34] shinnya: has joined #ruby
[01:42:10] moldy1984: has joined #ruby
[01:42:54] taylorzr: has joined #ruby
[01:44:04] jottr_: has joined #ruby
[01:44:19] shakes: has joined #ruby
[01:45:00] shakes: has joined #ruby
[01:45:03] lupine: has joined #ruby
[01:46:11] bijan_: has joined #ruby
[01:46:39] moldy1984: has joined #ruby
[01:47:08] shakes: has joined #ruby
[01:48:20] white_lilies: has joined #ruby
[01:49:26] shakes: has joined #ruby
[01:50:08] moldy1984: has joined #ruby
[01:56:20] tdy: has joined #ruby
[01:57:38] bijan_: has joined #ruby
[02:04:36] rwb: has joined #ruby
[02:04:36] moldy84: has joined #ruby
[02:06:07] spencer: has joined #ruby
[02:09:07] bijan_: has joined #ruby
[02:16:19] karapetyan: has joined #ruby
[02:17:30] moldy84: has left #ruby: ("Be back later...")
[02:17:58] pebble2014: has joined #ruby
[02:20:22] chouhoulis: has joined #ruby
[02:20:33] bijan_: has joined #ruby
[02:20:39] chouhoulis: has joined #ruby
[02:32:17] bijan_: has joined #ruby
[02:38:50] SeepingN: has joined #ruby
[02:39:37] zenspider: pebble2014: 'lo
[02:40:01] pebble2014: 有人说中文吗?
[02:40:35] pebble2014: speak chinese?
[02:40:54] zenspider: pebble2014: no. this is an English & Ruby speaking channel
[02:41:26] pebble2014: ok , i see !
[02:43:05] bijan_: has joined #ruby
[02:45:15] taylorzr: has joined #ruby
[02:50:05] herbmillerjr: has joined #ruby
[02:54:32] bijan_: has joined #ruby
[02:58:58] pebble2014: has joined #ruby
[03:00:13] cadillac_: has joined #ruby
[03:00:46] pebble2014: has joined #ruby
[03:04:37] bijan_: has joined #ruby
[03:09:46] braincrash: has joined #ruby
[03:21:08] pebble: has joined #ruby
[03:21:12] tdy: has joined #ruby
[03:26:33] BloopMonster: has joined #ruby
[03:31:13] kryptoz: has joined #ruby
[03:36:18] pebble: has joined #ruby
[03:38:14] jabowa: has joined #ruby
[03:40:52] jabowa: Hey, have a basic question - new to ruby. I came across a common code pattern a lot - func :symbol do {...}. How do you trigger the do block statement? https://repl.it/repls/ExtralargeSanePaint
[03:42:26] Axy: has joined #ruby
[03:44:27] elomatreb: jabowa: You execute a block with the `yield` statement
[03:45:07] jottr_: has joined #ruby
[03:45:08] elomatreb: It doesn't have anything to do with the symbol in the method though, that's just an parameter to the method
[03:45:09] bijan_: has joined #ruby
[03:46:17] chouhoulis: has joined #ruby
[03:48:21] jabowa: elomatreb: Thanks that makes sens
[03:53:49] pebble2014: has joined #ruby
[03:54:55] konsolebox: has joined #ruby
[03:56:14] bijan_: has joined #ruby
[03:58:24] tvw: has joined #ruby
[04:00:08] taylorzr: has joined #ruby
[04:00:24] z3uS: has joined #ruby
[04:07:38] bijan_: has joined #ruby
[04:17:08] ciscam: has joined #ruby
[04:19:01] bijan_: has joined #ruby
[04:19:20] karapetyan: has joined #ruby
[04:20:52] JamJam_kid: has joined #ruby
[04:26:48] NightMonkey: has joined #ruby
[04:27:40] JamJam_kid: has joined #ruby
[04:28:52] BloopMonster: has joined #ruby
[04:30:22] bijan_: has joined #ruby
[04:32:40] dreamthese: has joined #ruby
[04:41:10] bijan_: has joined #ruby
[04:52:44] bijan_: has joined #ruby
[04:55:18] cadillac_: has joined #ruby
[05:03:40] bijan_: has joined #ruby
[05:05:12] Mia: has joined #ruby
[05:05:12] Mia: has joined #ruby
[05:11:17] bijan_: has joined #ruby
[05:12:15] fluxAeon: has joined #ruby
[05:14:59] roamingdog: has joined #ruby
[05:15:51] segy: has joined #ruby
[05:15:57] cadillac_: has joined #ruby
[05:23:53] Guest74533_: has joined #ruby
[05:26:14] kryptoz: has joined #ruby
[05:26:22] Guest74533_: has joined #ruby
[05:26:23] Guest74533_: has joined #ruby
[05:26:26] aufi: has joined #ruby
[05:29:45] sauvin: has joined #ruby
[05:35:42] anisha_: has joined #ruby
[05:42:26] aupadhye: has joined #ruby
[05:43:34] apeiros: has joined #ruby
[05:43:41] kryptoz: has joined #ruby
[05:45:59] jottr_: has joined #ruby
[05:46:58] segy: has joined #ruby
[05:57:00] Mike11: has joined #ruby
[06:01:40] conta: has joined #ruby
[06:05:57] pebble2014: has joined #ruby
[06:06:08] DoYouKnow: has joined #ruby
[06:06:42] biberu: has joined #ruby
[06:10:04] nima_m: has joined #ruby
[06:16:09] roamingdog: has joined #ruby
[06:22:46] segy: has joined #ruby
[06:22:48] nima_m_: has joined #ruby
[06:25:41] c0ncealed2: has joined #ruby
[06:30:36] za1b1tsu: has joined #ruby
[06:31:54] reber: has joined #ruby
[06:39:28] dionysus69: has joined #ruby
[06:43:47] andikr: has joined #ruby
[06:47:05] suukim: has joined #ruby
[06:47:29] zautomata1: has joined #ruby
[06:47:30] pebble2015: has joined #ruby
[06:49:45] pebble2014: has joined #ruby
[06:55:17] tdy: has joined #ruby
[06:56:24] bijan_: has joined #ruby
[06:59:45] sysvalve: has joined #ruby
[07:00:50] pebble2016: has joined #ruby
[07:02:07] TomyWork: has joined #ruby
[07:07:22] claudiuinberlin: has joined #ruby
[07:07:48] bijan_: has joined #ruby
[07:08:26] clemens3_: has joined #ruby
[07:11:15] yohji: has joined #ruby
[07:11:17] MasukaV: has joined #ruby
[07:19:29] bijan_: has joined #ruby
[07:21:03] karapetyan: has joined #ruby
[07:26:22] MasukaV: If I needed to clear all row data and maintain the database structure created from this ( https://gist.github.com/xysten/38b6e3615e58da219c1a415eb2d97cfb ) every 5 minutes, what would be the most practical way to do this?
[07:28:19] kut20126: has joined #ruby
[07:29:28] apeiros: ?crosspost MasukaV
[07:29:28] ruby[bot]: MasukaV: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[07:30:59] bijan_: has joined #ruby
[07:31:39] MasukaV: I can see where that would be relevant if any response had been received at all.
[07:32:00] apeiros: poor excuse.
[07:32:43] MasukaV: apeiros, do you have any helpful information?
[07:33:45] apeiros: not in the mood to spend time trying to help a crossposter.
[07:34:41] MasukaV: Ahh, now I have a label. All right, carry on with your power trip. I bet you twitch everytime you see you get to call the bot on someone. LOL
[07:35:04] apeiros: !kick MasukaV adjust that attitude, will you?
[07:35:04] ruby[bot]: +bbb $a:MasukaV$#ruby-banned MasukaV!*@*$#ruby-banned *!*@170.249.171.98$#ruby-banned
[07:35:05] ruby[bot]: ruby[bot] kicked MasukaV: that attitude, will you?
[07:36:27] aufi: has joined #ruby
[07:36:27] ruby[bot]: -bbb $a:MasukaV$#ruby-banned MasukaV!*@*$#ruby-banned *!*@170.249.171.98$#ruby-banned
[07:36:55] aufi: has joined #ruby
[07:38:24] burgestrand: has joined #ruby
[07:39:08] aufi_: has joined #ruby
[07:39:51] anisha_: has joined #ruby
[07:40:11] dminuoso: ACTION .oO( is crossposting really that bad? )
[07:41:12] apeiros: almost always crossposters are inconsiderate of other people's time. witnessed it often enough. I wouldn't kick or ban for it, though.
[07:42:05] bijan_: has joined #ruby
[07:43:04] MasukaV: has joined #ruby
[07:46:52] jottr_: has joined #ruby
[07:47:26] maiz: has joined #ruby
[07:53:18] bijan_: has joined #ruby
[08:04:49] bijan_: has joined #ruby
[08:08:03] mjolnird: has joined #ruby
[08:10:45] mikecmpbll: has joined #ruby
[08:11:50] amar_: has joined #ruby
[08:12:46] schleppel: has joined #ruby
[08:16:32] bijan_: has joined #ruby
[08:18:25] loveablelobster: has joined #ruby
[08:19:12] discopatrick: has joined #ruby
[08:27:32] bijan_: has joined #ruby
[08:27:37] dtzuzu: has joined #ruby
[08:28:59] DTZUZO: has joined #ruby
[08:33:07] dionysus69: has joined #ruby
[08:36:29] ur5us: has joined #ruby
[08:38:53] bijan_: has joined #ruby
[08:43:41] maiz: has joined #ruby
[08:45:25] BloopMonster: has joined #ruby
[08:46:07] fribmendes: has joined #ruby
[08:48:04] ren0v0_: has joined #ruby
[08:50:33] bijan_: has joined #ruby
[08:53:18] arne: has joined #ruby
[08:55:04] ellcs: has joined #ruby
[08:55:33] dtzuzu: has joined #ruby
[08:56:33] jottr_: has joined #ruby
[08:56:41] jamesaxl: has joined #ruby
[08:56:48] Nicmavr: has joined #ruby
[08:58:29] amar_: has joined #ruby
[08:59:41] DTZUZO: has joined #ruby
[09:01:39] bijan_: has joined #ruby
[09:05:12] Beams: has joined #ruby
[09:08:06] mikecmpb_: has joined #ruby
[09:12:21] conta: has joined #ruby
[09:13:01] bijan_: has joined #ruby
[09:16:44] arne: how do you guys endless chaining of modules?
[09:17:00] arne: i mean if you want to use A::B::C you need to have A and B already
[09:17:22] arne: do you do module A;end;require 'something_that_is_inside_A'
[09:18:26] guille-moe: has joined #ruby
[09:18:36] apeiros: requires always on top. and yes, a.rb contains the requires to all a/*.rb's, a/b.rb contains all requires to a/b/*.rb etc.
[09:18:37] dminuoso: arne: The ruby "idiomatic" way (whatever thats good for) is to manually eval everything in the right order so that everything is avaiulable.
[09:18:45] apeiros: (and a/b/c.rb of course contains A::B::C)
[09:19:20] apeiros: though I newer projects I tend to just have a single require in every file for the toplevel file and use autoload on each level.
[09:19:32] apeiros: beware, though, matz doesn't like autoload.
[09:19:55] dminuoso: arne: I'm looking into techniques to avoid nesting at all.
[09:20:19] dminuoso: The problem is the mixing of namespace concepts with runtime behavior of objects.
[09:20:35] dminuoso: It would be cool if we had namespaces that were part of a build process (and erased at runtime)
[09:21:29] dminuoso: autoloading fakes this, but the problem is that its brittle, makes it unclear when what code is being executed and when
[09:23:34] alem0lars: has joined #ruby
[09:24:02] arne: but i like namespaces
[09:24:18] dminuoso: arne: The problem is that Ruby has no real namespaces.
[09:24:26] bijan_: has joined #ruby
[09:24:40] arne: i know, but always if i get into a ruby tool, and i inspect it with pry, im happy if it uses namespaces
[09:24:43] arne: avoiding them seems off
[09:25:38] amelliaa: has joined #ruby
[09:25:40] dminuoso: arne: It would require some major rework on the Ruby VM and require additional tooling.
[09:25:44] dminuoso: Ruby was never designed to write complex programs with.
[09:26:04] dminuoso: This is directly observable in the fact that we have piss-poor build tools.
[09:26:20] arne: well, what is a build tool in terms of ruby?
[09:26:53] dminuoso: When my library uses `Object::Magic` and another library uses `Object::Magic` you are essentially screwed when you want to use both.
[09:27:51] arne: well, i use docker, idc
[09:28:08] dminuoso: What does docker have to do with this?
[09:28:24] arne: well, gems don't collide, as long as you don't use these 2 in ONE project
[09:28:38] dminuoso: When you want to use `libthing` and `libstuff` at the same time, and they both "monkey patch" Object (creating top level constants is just monkey patching Object), you're screwed.
[09:28:47] dminuoso: That's the thing. What if you do want to use both in one project.
[09:28:48] dminuoso: Now you cant.
[09:29:07] dminuoso: And gem authors have to carefull design their packages to not collide with, essentially, the entire rest of rubygems.
[09:29:22] dminuoso: Without a unified infrastructure to even *know* what modules/constants other libraries define, it's a guessing game./
[09:29:27] arne: well, how do you tackle that? i mean.. if you use a c funciton mamed "pow"
[09:29:32] arne: you also have a problem
[09:29:45] dminuoso: arne: In C you can control includes and linkage.
[09:30:04] dminuoso: And there's techniques to wrap libraries
[09:30:28] dminuoso: But yeah, its a problem in C too.
[09:30:36] dminuoso: But its manageable there
[09:32:34] arne: so your suggestion is not to use namespaces?
[09:32:37] dminuoso: arne: I mean ideally you'd create some top level constant that is named according to your library. And *everything* has to live inside that.
[09:33:09] arne: well, that also sucks, i did that in my biggest project
[09:33:10] arne: and i hate it
[09:33:50] dminuoso: It's the only way to have a reasonably high probability to avoid conflicts
[09:34:05] dminuoso: What rails promotes is amazingly bad
[09:34:10] arne: yah, naming things is fun
[09:34:17] dminuoso: class User < ApplicationRecord; .. end
[09:34:24] arne: well, luckily in this project im doing it either way
[09:34:28] dminuoso: Now you can't use *any* gem anymore that defines Object::User
[09:35:03] tbuehlmann: rails even generates a top level module for your application
[09:36:15] bijan_: has joined #ruby
[09:36:49] dminuoso: tbuehlmann: Oh yeah it does. And then it generates the boilerplate in `app/...` and *not* use it.
[09:38:20] arne: that rails does it that way, makes it worse for me
[09:38:44] arne: i mean, i won't have to create that top level namespace thing in the final project, do i
[09:38:54] arne: i mean if i don't expect anyone else to use that thing
[09:39:22] dminuoso: Ruby developers have the mentality of "writing less code", but it's a red herring. It's not import statements that costs time. It's designing your software.
[09:39:33] dminuoso: Writing code is the fastest and least problematic part of the job.
[09:39:47] suukim: has joined #ruby
[09:40:07] dminuoso: I've had to fight rails autoloading so many times, probably a fair 50 hours wasted.
[09:40:26] tbuehlmann: including spring hours? :)
[09:40:50] dminuoso: tbuehlmann: I have very quickly developed a habit to restart spring on basically any issue.
[09:41:14] dminuoso: When I get frustrated enough it gets thrown out until I get annoyed by the slow speed of Ruby
[09:41:45] tbuehlmann: I have a `export DISABLE_SPRING=1` in my .zshrc, so I'm not using spring at all even if a project has it in its Gemfile
[09:41:50] Cork: do ruby when have a way to write additional conditions or is nested ifs the only way?
[09:42:03] dminuoso: Cork: Boolean operators?
[09:42:33] segy: has joined #ruby
[09:42:41] Cork: something like case variable; when "something" and other_var == 2
[09:42:51] arne: dminuoso: you really do rails :o?
[09:43:01] dminuoso: arne: Trying very hard not to.
[09:43:29] dminuoso: Really want to yesod instead. :(
[09:43:33] arne: but you have to because of #{job}?
[09:43:46] arne: dminuoso: Yesod also looks too strict for me
[09:43:52] arne: but warp looks cool
[09:43:54] dminuoso: arne: What do you mean too strict?
[09:44:06] dminuoso: warp and yesod are different things..
[09:44:21] arne: i know, but if you're a normal person you would use them together
[09:44:27] dminuoso: When comparing with Ruby world, the yesod equivalent might be rails, whereas warp is the equivalent of rack
[09:44:34] arne: just like i like rack, but i hate rails
[09:44:52] arne: well, actually i don't like rack either.. also too limited
[09:45:01] arne: wanna have streaming, lul, nope
[09:45:01] dminuoso: arne: rack has a really cumbersome API
[09:45:14] arne: is there http2 for ruby yet?
[09:45:19] dminuoso: arne: Plug in elixir is a decent abstraction
[09:45:56] dminuoso: It's kind of similar to WAI
[09:45:58] arne: i don't wanna learn elixir
[09:46:20] dminuoso: arne: Im just saying it's decent, not that you should use it :)
[09:46:37] dminuoso: arne: Rack is so mindbending, weird and badly documented.
[09:46:46] dminuoso: Anyone who claims differently has never had to learn Rack the hard way.
[09:46:58] arne: i wished there was something good :(
[09:47:05] arne: but nothing makes me happy
[09:47:19] bijan_: has joined #ruby
[09:47:37] dminuoso: arne: All our new APIs are written in servant.
[09:48:10] arne: that gives ma terrible earwig
[09:48:22] RougeR: has joined #ruby
[09:48:43] dminuoso: Well it's really cool to have some interface module with the API specification, and then reuse the same types on clients and servers..
[09:49:01] dminuoso: It's like swagger, except not shitty - and in the type system
[09:52:59] arne: still not got warm with haskell
[09:53:18] arne: feel like development takes too long if you.re not THE FP CRACK
[09:54:27] dminuoso: arne: Well depending on your imperative background it takes a while to get used to. We are a lot more comfortable with it because it lets us write code much faster, that is much more stable with stronger guarantees.
[09:54:40] dminuoso: And it's fast.
[09:55:11] dminuoso: But in the end you didn't learn imperative programming in a week either.
[09:58:02] quiqua: has joined #ruby
[09:58:13] bijan_: has joined #ruby
[09:59:31] bijan_: has joined #ruby
[10:02:30] arne: well, but if you fuckup in design, you won't be able to hack things in as easily
[10:02:42] fcser__: has joined #ruby
[10:02:56] dminuoso: arne: We find that Haskell makes designing software much easier.
[10:03:11] dminuoso: Mostly because you can roughly sketch the program with just types.
[10:03:22] arne: designing, yeah but if your type which you create can't handle something, and you have to rewrite it completely and all functions using it
[10:03:51] arne: sure, it wont compile if you forgot something, which is great, but it feels like really time consumng
[10:03:55] dminuoso: arne: Well you have that problem in any software. When your interface is wrong you have to rewrite code.
[10:03:58] dminuoso: Not sure what your point is.
[10:04:09] arne: in ruby you might be able to write a hack
[10:04:15] arne: did that many times, never shoot my foot
[10:04:29] dminuoso: We like robust software with provable properties.
[10:04:49] dminuoso: 12:03 arne | sure, it wont compile if you forgot something, which is great, but it feels like really time consumng
[10:04:57] dminuoso: Thats the thing with Ruby. The fact that your code runs doesn't say much.
[10:04:59] arne: yeah, everybody does that.. but a startup could die from not being able to quickly hack it
[10:05:02] arne: don't you agree?
[10:05:06] nima_m: has joined #ruby
[10:05:26] dminuoso: arne: Like I said, we find that Haskell lets us write software *faster* generally.
[10:05:56] arne: well, i somehow doubt that, and even if, if you grow as a company, it will be harder to find employees
[10:06:03] dminuoso: The type system doesnt constrain and slow you down, it saves you work in the long run because you are forced to fix issues as their arise, not as they get reported by consumers.
[10:06:18] canton7: I find a lot depends on the depth of the program - how much of the application a single type is used in, how many types interact with each other. Beyond a certain depth, I really miss the guarantees of a good type system
[10:06:37] arne: and ecosystem isn't as devfeloped as rubygems for example, that would slow me down af also
[10:06:40] dminuoso: arne: Agreed, that is definitely an issue.
[10:06:45] dminuoso: arne: What?
[10:06:52] canton7: being able to say "find all the places where this is used" or "rename this" or "change the type of this, now tell me everywhere else I need to change" speeds you up a lot
[10:06:54] dminuoso: arne: the rubygem ecosystem is garbage.
[10:06:59] ha: has joined #ruby
[10:07:00] dminuoso: Shitty to not documented at all
[10:07:07] arne: dminuoso: well, if i want to do something, ther eis always something
[10:07:10] dminuoso: Tons of gems not maintained with nobody willing to fix them
[10:07:13] arne: want to patch elf files? ruby has you covered
[10:07:16] dminuoso: Extremely poor code quality
[10:07:18] arne: want to write pdf? ruby has you covered
[10:07:43] t0xik: has joined #ruby
[10:08:06] dminuoso: arne: Hackage has an elf parser. Hackage has several pdf libraries.
[10:08:12] dminuoso: And they are well documented.
[10:08:42] dminuoso: arne: The general quality of gems is really low.
[10:08:45] dtzuzu: has joined #ruby
[10:08:50] dminuoso: There's some good gems, and sure overall there is more gems.
[10:09:02] dminuoso: But so far I've not really felt like I was missing much in Haskell.
[10:09:41] arne: what about apis, like aws/stripe similiar
[10:09:57] arne: oh that exists, also
[10:10:17] arne: man haskell folks ARE crazy.
[10:11:08] DTZUZO: has joined #ruby
[10:12:13] dreamthese: has joined #ruby
[10:13:44] maiz: has joined #ruby
[10:19:44] apparition47: has joined #ruby
[10:26:25] jottr_: has joined #ruby
[10:28:35] kryptoz: has joined #ruby
[10:34:12] maufart__: has joined #ruby
[10:50:30] dr3wo: has joined #ruby
[10:57:10] bijan_: has joined #ruby
[10:59:11] ferr: has joined #ruby
[10:59:51] giraffe: has joined #ruby
[11:00:54] tpendragon: has joined #ruby
[11:02:58] sphenxes: has joined #ruby
[11:13:03] arne: is there some geo-type to use for ruby?
[11:13:37] cyberg: has joined #ruby
[11:15:51] lupine: not in the stdlib
[11:16:32] lupine: but consider class Cartesian ; attr_accessor :x, :y ; end
[11:19:56] conta: has joined #ruby
[11:22:56] burgestrand: has joined #ruby
[11:23:00] uso_: has joined #ruby
[11:23:14] uso_: has left #ruby: ("WeeChat 1.5")
[11:23:49] nowhere_man: has joined #ruby
[11:24:34] BloopMonster: has joined #ruby
[11:29:32] psychicist__: has joined #ruby
[11:29:47] AJA4350: has joined #ruby
[11:31:48] roamingdog: has joined #ruby
[11:33:12] biberu: has joined #ruby
[11:36:20] p4p0l0: has joined #ruby
[11:37:28] dminuoso: arne: But it's also little and small things that are really amazing. It's fairly easy to achieve high concurrency without race conditions with STM.
[11:38:02] zautomata: has joined #ruby
[11:38:07] zautomata: has joined #ruby
[11:38:30] dminuoso: arne: Or green threads that make certain idioms really powerful. A server can be implemented as a simple handler that forkIOs *each* request. Haskell can run several million threads concurrently.
[11:38:32] arne: i agree, but still, it sounds like hell before you'd be able to do that
[11:38:37] dminuoso: Java ditched them because they didnt have a clean implementation
[11:38:44] zautomata: has left #ruby: ()
[11:38:46] RougeR: ACTION is doing interviews today
[11:38:47] dminuoso: arne: Dunno they feel ridiculously simple.
[11:39:07] arne: RougeR: like on what side of the table?
[11:39:18] RougeR: im being interviewed
[11:39:21] RougeR: first dev job
[11:39:30] arne: RougeR: uhhh good luck
[11:39:39] RougeR: had one interview for a startup just...no ruby though
[11:39:43] arne: dminuoso: everything seems simple when you grasped it
[11:39:55] dminuoso: arne: I didn't have any trouble grasping STM.
[11:39:57] dminuoso: It feems very natural.
[11:40:02] RougeR: js/typescript/python totally full stack, 5 person team, london based
[11:40:08] RougeR: finacial services SaaS
[11:40:11] dminuoso: arne: Just consider how concurrency in databases is simple.
[11:40:17] dminuoso: It's the same idea.
[11:40:19] RougeR: next one is more interesting to me
[11:40:27] arne: transactions are a lot of things
[11:40:33] arne: but intuitive?
[11:40:41] dminuoso: arne: To programmers they are.
[11:40:41] RougeR: video broadcasting/social media SaaS, 30 person startup, ruby and python and js and even c++
[11:40:55] dminuoso: Because it's ridiculously hard to reason about the state of your memory when multiple threads can ruin it.
[11:41:15] dminuoso: locks are a way of ensuring a consistent view of memory, but they are highly error prone and usually inefficient
[11:41:20] ldnunes: has joined #ruby
[11:41:27] dminuoso: a transaction does the same thing but without the locks.
[11:42:14] dminuoso: you stop thinking about synchronization
[11:42:19] dminuoso: you start thinking in your domain logic
[11:42:25] dminuoso: which is what a programmer wants anyway
[11:43:31] dminuoso: It comes at a cost though, it costs extra memory for the house keeping - and implementations are tricky to write. But that's essentially a problem for the implementor.
[11:43:47] dminuoso: With synchronization primitives it becomes a user problem
[11:43:48] burgestrand: has joined #ruby
[11:47:13] dionysus69: has joined #ruby
[11:48:22] bijan_: has joined #ruby
[11:49:22] nowhere_man: has joined #ruby
[11:50:06] ur5us: has joined #ruby
[11:52:04] arne: i agree, i know all that, still learning that is crazy, find masochist employees who do that impossible
[11:52:37] conta: has joined #ruby
[11:53:27] guille-moe: has joined #ruby
[11:53:33] arne: god xpath syntax wo created that
[11:53:53] arne: //a[b[c]] finds a a with a b as child with a c as child
[11:54:03] dminuoso: arne: Wanna talk about lenses...? =)
[11:54:21] arne: dminuoso: i wish i could, but all i know about them, i learned from you
[11:54:30] dminuoso: They are the universal solution to exactly what XPath tries to do.
[11:54:44] arne: oh, now i see where you are going
[11:54:59] arne: well as long as i can't search nokogiri with lenses, it doesnt help, really
[11:55:12] dminuoso: arne: nokogiri supports css selectors.
[11:55:24] dminuoso: in most cases they are sufficient, and they tend to be easier to write
[11:55:32] TheBrayn: what's the difference between %i() and %I() for an array of symbols?
[11:56:02] arne: there does not seem to be one
[11:56:44] dminuoso: TheBrayn: https://ruby-doc.org/core-2.5.1/doc/syntax/literals_rdoc.html#label-Percent+Strings
[11:56:55] nima_m_: has joined #ruby
[11:56:56] dminuoso: TheBrayn: Uppercase allows interpolation.
[11:57:39] TheBrayn: thanks, I see it now
[11:58:11] aufi_: has joined #ruby
[11:59:22] Bish: hm wrote that thing in css know, and it doesn't work
[11:59:58] bijan_: has joined #ruby
[12:00:10] synthroid: has joined #ruby
[12:01:48] shinnya: has joined #ruby
[12:02:25] workmad3: has joined #ruby
[12:09:13] guille-moe: has joined #ruby
[12:10:58] bijan_: has joined #ruby
[12:11:08] karapetyan: has joined #ruby
[12:13:11] Bish: i mean a > b > c should do the same thing, shouldn't it?
[12:14:54] apeiros: has joined #ruby
[12:16:31] bijan_: has joined #ruby
[12:17:43] dfr: has joined #ruby
[12:18:23] Guest81103: hi, some ideas on how apply the splat operator together with ternary?
[12:18:47] Bish: dminuoso: have you ever been witness to a "steuerüberprüfung"?
[12:19:19] pppppacop: has joined #ruby
[12:19:40] Bish: Guest34814: what are you trying to do?
[12:19:46] pppppacop: something like that object.send(:name_method, condition ? values : *values)
[12:20:35] Bish: interesting
[12:20:54] Bish: i doub that's possible
[12:22:52] pppppacop: yeah, I know that would have been awesome
[12:23:38] pppppacop: ideas on how rewrite are also welcome
[12:24:00] Bish: well go with case;when conidition then method(values);else method(*value);
[12:24:39] pppppacop: that was the first naive approach but it will replicate many lines for my particular case
[12:24:43] Bish: coniditon ? method(values) : method(*values)
[12:25:31] Bish: or param = conidition ? [values] : values; method(*values)
[12:25:45] Bish: or param = conidition ? [values] : values; method(*param) rather
[12:27:05] pppppacop: this last solution works, I was overthinking for sure
[12:27:28] Bish: you're welcome!
[12:28:01] bijan_: has joined #ruby
[12:28:21] Bish: maybe you can even
[12:28:44] Bish: method(*(condition ? [values] : values))
[12:28:49] Bish: that would be what you want i guess
[12:29:14] cagomez: has joined #ruby
[12:29:30] Bish: im such a good hacker
[12:29:34] bijan_: has joined #ruby
[12:30:35] pppppacop: yeah. that`s what I was looking for. Thanks again!
[12:30:55] Bish: too bad you have that pointless creation of array then, but whatever
[12:36:58] ciscam: has joined #ruby
[12:37:57] Bish: is there an unsplat operator?
[12:40:25] leitz: has joined #ruby
[12:44:23] ccooke: Technically, yes, in a sense.
[12:44:50] TomyWork: has joined #ruby
[12:46:05] ccooke: >>> a = [1,2,3]; b = *a; b
[12:51:40] maiz: has joined #ruby
[12:52:33] rf`: has joined #ruby
[12:53:59] loveablelobster: has joined #ruby
[12:59:25] quiqua: has joined #ruby
[13:01:25] guille-moe: has joined #ruby
[13:01:46] amar_: has joined #ruby
[13:04:37] crankharder: has joined #ruby
[13:05:28] mkaito: has joined #ruby
[13:05:29] mkaito: has joined #ruby
[13:05:44] quiqua: has joined #ruby
[13:08:53] mkaito: has joined #ruby
[13:08:53] mkaito: has joined #ruby
[13:10:03] fmcgeough: has joined #ruby
[13:10:43] orbyt_: has joined #ruby
[13:12:43] conta1: has joined #ruby
[13:14:12] kryptoz: has joined #ruby
[13:16:36] foglabs: has joined #ruby
[13:23:26] jottr_: has joined #ruby
[13:32:16] Bish: i have a json, which has timestamps as keys and hashes as value
[13:32:25] Bish: inside the values are again.. an array with these very same objects
[13:32:38] Bish: how would you guys convert all timestamps to Times
[13:33:00] Bish: i did this serveral times, and i always end up having 2 procs for arrays and hashes
[13:33:06] suukim: has joined #ruby
[13:34:58] Bish: i mean how do you create a proc that walks through arrays and hashes likewise, and transforms everything of a certain key
[13:35:59] bijan_: has joined #ruby
[13:40:42] amar_: has joined #ruby
[13:42:55] _seanc_: has joined #ruby
[13:43:45] fmcgeough_: has joined #ruby
[13:43:51] ljarvis: Bish: do you have an example?
[13:43:55] ljarvis: it sounds awfully confusing
[13:44:37] dminuoso: Bish: with a lens?
[13:45:22] Bish: https://gist.github.com/bananarne/57c1301f9ea0377c2d29af2476267958
[13:45:34] StarSeed0000: has joined #ruby
[13:45:43] Bish: inb4 some discussion about indentation
[13:46:49] ljarvis: does it work?
[13:46:53] Bish: there has to be a better way, i mean
[13:47:16] Bish: not yet, but in principle it does
[13:47:22] bijan_: has joined #ruby
[13:52:40] brianpWins: has joined #ruby
[13:53:08] Inline: has joined #ruby
[13:53:44] amar_: has joined #ruby
[13:54:28] alem0lars: has joined #ruby
[13:56:40] bmurt: has joined #ruby
[13:58:07] bijan_: has joined #ruby
[13:59:07] jottr_: has joined #ruby
[13:59:39] kryptoz: has joined #ruby
[14:01:12] TinkerT: has joined #ruby
[14:02:15] burgestrand: has joined #ruby
[14:02:51] karapetyan: has joined #ruby
[14:04:30] zapata: has joined #ruby
[14:06:23] Bish: dminuoso: trying to parse the very same json with haskell and im sad already
[14:07:43] bijan_: has joined #ruby
[14:08:52] Bish: readFile gives me String, aeson wants Data.ByteString.Lazy.Internal.ByteString
[14:09:03] dminuoso: Bish: Do you know what String is?
[14:09:09] Bish: array of char
[14:09:09] dminuoso: Dont use readFile then.
[14:09:21] dminuoso: Bish: bytestring brings its own readFile
[14:09:48] dminuoso: use Data.ByteString.Lazy.readFile.
[14:09:52] kryptoz: has joined #ruby
[14:10:31] dminuoso: Ive just completed writing about 2000 lines of JSON parsing and I must say it's quite a pleasant experience.
[14:10:37] dminuoso: Using aeson.
[14:12:07] Bish: and we're at monads and im lost again
[14:14:16] chouhoulis: has joined #ruby
[14:16:17] Bish: why do i need to distinquish between String and ByteString anyways
[14:21:12] burgestrand: has joined #ruby
[14:24:08] dminuoso: Bish: ByteString is a bit badly named. ByteVector or ByteArray might have been more appropriate.
[14:24:16] ldnunes: has joined #ruby
[14:24:30] dminuoso: String is just [Char] which is an incredibly inefficient way to store textual data. Text is a packed unicode variant.
[14:24:33] drale2k_: has joined #ruby
[14:24:34] p4p0l0: has joined #ruby
[14:24:36] pebble2019: has joined #ruby
[14:25:34] Eising: hey did the built-in OptionParser change somewhere between ruby 2.1 and 2.5?
[14:25:46] Eising: I'm finding some compatibility issues with older stuff
[14:26:43] dminuoso: Bish: One thing that Haskell forces you is to acknowledge the difference between ByteString and Text/String very much. Ruby for example pretends everything is unicode.
[14:27:16] dminuoso: Part of the reason why developers frequently hop in this channel and complain about encoding issues is because they are never confronted with that problem.
[14:27:16] apeiros: dminuoso: that's nonsense
[14:27:47] apeiros: it could do better, but it certainly does not pretend everything was unicode.
[14:28:13] dminuoso: >> Encoding.default_external
[14:28:15] ruby[bot]: dminuoso: # => #<Encoding:UTF-8> (https://eval.in/1028638)
[14:28:17] dminuoso: >> Encoding.default_internal
[14:28:18] ruby[bot]: dminuoso: # => nil (https://eval.in/1028639)
[14:28:41] havenwood: eising: it has changed, yeah - but not usually in breaking ways - what did work that now doesn't?
[14:28:44] dminuoso: apeiros: It's completely transparent and you have to explicitly take control over it.
[14:29:11] dminuoso: apeiros: Reading a file should always require an explicit encoding.
[14:29:26] apeiros: that's just like… your opinion.
[14:29:49] Eising: havenwood: well, the code I'm looking at right now is 9 years old or more, and rather dead. Looks like it does a opts.parse!(ARGV) and that throws wrong number of arguments (given 3, expected 2) (ArgumentError)
[14:29:52] apeiros: ACTION works in a sane env and is happy not to have to redundantly specify utf-8 all over the place
[14:30:03] bhaak: having a default is something else than "it just assumes unicode"
[14:30:10] apeiros: dminuoso: also no amount of type will save you from developer ignorance about encodings.
[14:30:28] dminuoso: bhaak: no it means *exactly that8
[14:30:35] dminuoso: Ruby by default assumes everything is UTF8 encoded.
[14:30:40] dminuoso: Source code, external files.
[14:30:41] Eising: havenwood: I would guess that parse! takes a hash rather than an array now.
[14:30:46] apeiros: dminuoso: yeah, no, those are not equivalents
[14:30:59] apeiros: dminuoso: and you being the pedant you are know that full well :-p
[14:31:05] bhaak: dminuoso: how come my Encoding.default_external looks like this => => #<Encoding:ISO-8859-1>
[14:31:20] dminuoso: bhaak: oh wait. is that the system locale? =)
[14:31:30] dminuoso: this is even better.
[14:31:59] dminuoso: Id say this promotes "well it runs on my machine"
[14:32:52] apeiros: I'd file that under things it could have done better. afaik defaults are now always utf-8.
[14:33:02] apeiros: it's still not equivalent to pretending everything was utf-8.
[14:33:53] bhaak: >> File.open('/dev/null', 'rb').read.encoding
[14:33:54] ruby[bot]: bhaak: # => #<Encoding:ASCII-8BIT> (https://eval.in/1028641)
[14:34:05] bhaak: doesn't look like Unicode to me
[14:35:33] Venomen: has joined #ruby
[14:35:54] Bish: well so what5 encoding does String have
[14:36:30] bhaak: it depends from where the string is coming and possibly what environment you are running.
[14:37:30] bhaak: but the usual default is utf-8. because we aren't living in the 1990s anymore
[14:37:59] synthroid: has joined #ruby
[14:40:28] fluxAeon_: has joined #ruby
[14:40:49] dminuoso: has left #ruby: ("WeeChat 2.0.1")
[14:41:26] jottr_: has joined #ruby
[14:45:59] Bish: bhaak: this wasn't a ruby question :/
[14:48:54] burgestrand: has joined #ruby
[14:50:01] bhaak: Bish: ah. well. it depends :-]
[14:50:13] rodd: is there a way to avoid "repetition" in a hash where key/value are the same? i.e { email: email, username: username } -> { email, username }
[14:50:41] roamingdog: has joined #ruby
[14:52:29] bhaak: Bish: a "String" is just a data type. different languages have different solutions on how to represent that. therefore you can't say what encoding a general String has, you have to put it in context
[14:52:51] Bish: never understood that
[14:54:28] bhaak: Bish: you know the difference between integers and floats and how they look at byte level?
[14:55:06] Bish: i also get the difference between encoding
[14:55:14] bhaak: then why are they different? why not one byte representation to rule them all?
[14:55:37] bhaak: the same with strings. different approaches have different use cases and different advantages and disadvantages
[14:56:07] bhaak: Ruby chose to put an explicit encoding on a string. in Python, AFAIK, everything is converted to a Unicode representation.
[14:56:20] Bish: ^ that is so stupid
[14:56:47] bhaak: with the latter, you don't have any issues with encoding as there is only one. but if you need to go latin-1 or shift-jis, you have to fall back to byte strings handling
[14:57:20] Bish: everything should be utf8 if you ask me
[14:57:25] Bish: why wouldn't it?
[14:58:08] bhaak: what if you don't want to uft8? like when you need to output latin1?
[14:58:30] za1b1tsu: has joined #ruby
[14:59:04] gizmore: has joined #ruby
[15:00:41] StarSeed0000: has joined #ruby
[15:01:49] havenwood: bhaak: there's no such thing as latin1 if everything is utf8 ¯\_(ツ)_/¯
[15:03:05] Bish: bhaak: why wouldn't anyone want utf8? is there something you can't express with it?
[15:03:11] Bish: havenwood: why do we need latin1?
[15:03:16] Bish: for äüö?
[15:03:54] havenwood: Bish: I don't find myself needing latin1. I'm not Roman though.
[15:04:00] bhaak: havenwood: closing your eyes, putting your hands over your ears and going "lalala" is not a proper issue resolving strategy ;-)
[15:04:01] delsol: has joined #ruby
[15:04:29] havenwood: bhaak: I'm just saying the normative claim that everything *should* be utf8 would mean the latin1 should be too
[15:04:45] delsol: I can't seem to get ruby to execute certain command line scripts.
[15:04:58] havenwood: delsol: How's it not working?
[15:05:22] Bish: use uncertain command line scripts
[15:05:55] bhaak: Bish: what about legacy systems? what about systems that don't use utf-8 but utf-16 (it's broken, but they do exist)? or even utf-32?
[15:06:11] Bish: well f* them for not inventing utf8
[15:06:17] delsol: ruby GUI app just basically refuses to do certain things, like sh /etc/rc.d/rc.vncservers restart
[15:06:18] bhaak: havenwood: if we would live in an ideal world, yes. but we don't.
[15:06:40] Bish: delsol: what does refuse mean
[15:06:48] havenwood: bhaak: descriptivlely, that's true, but wasn't it a normative claim?
[15:07:01] delsol: it doesn't work. No execution happens
[15:07:11] havenwood: delsol: Does it hang?
[15:07:13] delsol: same with bash scripts that include scp or ssh, etc
[15:07:14] Bish: what does happen, you ahve to see output
[15:07:18] TheBrayn: bhaak: https://tools.ietf.org/html/rfc4042
[15:07:20] havenwood: delsol: What's the exit status?
[15:07:30] havenwood: delsol: echo $?
[15:07:37] za1b1tsu: has joined #ruby
[15:07:38] delsol: blank line.
[15:07:48] Bish: what is $? after execution
[15:08:01] delsol: there is no execution of the other script.
[15:08:24] ccooke: Bish: $? is the exit code of the last process executed
[15:08:26] bhaak: havenwood: I don't believe in normative claims with programming languages. there are always advantages and disadvantages that need to be considered.
[15:08:30] Bish: how do you invoke it, whats the value of $? after it
[15:08:35] Bish: ccooke: tell him.
[15:08:38] delsol: for example, when i backtic, or system the script that has scp and ssh, the other machine that it SCP's or SSH's to never increases a process ID.
[15:08:49] ccooke: Bish: Ah, I see
[15:08:55] bhaak: TheBrayn: I don't think we need to dig that up. nonet systems haven't aged well
[15:09:06] Bish: delsol: yet, if system or %x() returns you willo have a exit status of ssh locally
[15:09:37] shinnya: has joined #ruby
[15:09:39] Bish: and depending on the cmdline to ssh, ssh might want a terminal
[15:09:46] braincrash: has joined #ruby
[15:10:01] delsol: Bish: the script basically SSH's and runs scripts on the other machine.
[15:10:12] delsol: if I have ruby do EACH LINE separately... it works fine using system command
[15:10:24] Bish: yeah and when the script wants a terminal, because ssh wants a terminal
[15:10:27] ccooke: delsol: Does the script execute the ssh command, or a ruby SSH library?
[15:10:29] Bish: it might not start, because of that
[15:10:39] Bish: ccooke: sounds like the first
[15:10:57] ccooke: Bish: it does, just wanted to check.
[15:10:58] delsol: system("ssh root@client /u/scripts/dosomeshit") works fine
[15:11:31] ccooke: delsol: Right. So, after you run that command, you *absolutely will* have a return code of the ssh command, whether it worked or not.
[15:11:33] Bish: well, a) don't do it b) it is because of stdin/stdout nonexistence
[15:11:39] delsol: but a single script that has multiple commands in it DOESNT work.
[15:11:44] delsol: and doesn't SSH even a single time
[15:12:02] Bish: well, what does the script do besides ssh then?
[15:12:17] delsol: SCP over a file, and then SSH's 5 times.
[15:12:19] delsol: thats it.
[15:12:29] Bish: scp is ssh with benefits
[15:12:31] ccooke: delsol: when you say "a single scipt that has multiple commands", what do you mean? Is that a long ssh line with multiple commands or an ssh command that runs a multi-line file
[15:12:32] Bish: it might want stdin/stdout
[15:12:51] venomenalny: has joined #ruby
[15:12:55] delsol: shell script with 1 SCP and 5 SSH commands, 1 line each.
[15:13:11] Bish: thats why it works with system("") because system gives your shellscript stdin/stdout of your ruby program
[15:13:26] delsol: running the shell script in ruby doesn't work. Doing the 6 lines separately work fine in ruby.
[15:13:34] ccooke: delsol: so, you run "ssh user@host script_file" and the script_file contains an scp and 5 ssh commands?
[15:13:44] delsol: ccooke: no
[15:13:50] Bish: why are you ignoring me
[15:14:29] delsol: doing the script that does it all at the command line works fine. Doing it in ruby does not..... until I break the script down, and do each line in ruby separately.
[15:14:54] ccooke: delsol: how do you run multiple commands in one line? Give us an example
[15:15:11] nowhere_man: has joined #ruby
[15:16:24] ccooke: ... if you're scp'ing a file to the server, and then running it with "ssh user@host filename"... do you make sure the file is executable first?
[15:16:34] delsol: ccooke: the whole script: LINE1: scp over SSH keys package LINE2: install SSH keys package. LINE3: run hostname script with given hostname. LINE4: change lilo config and run lilo script with given hostname LINE5: change IP address in inet1.conf script.
[15:16:49] delsol: system("runwholescript" doesn't work.
[15:17:15] ccooke: so, you're trying a multiline string in system()?
[15:17:24] delsol: system("scp -i keyfile keypackage root@client")
[15:17:46] delsol: system("ssh -i keyfile root@client installpkg keyfile.tgz")
[15:17:58] ccooke: The latter works?
[15:18:27] delsol: system("ssh root@client install_hostname #{client.name}")
[15:18:32] ccooke: did you actually try something like system("scp stuff server\nssh server do_thing") ?
[15:18:34] delsol: doing it all one line at a time works
[15:18:55] delsol: having it execute the entire script at once does not.
[15:19:10] ccooke: What is the exact machine format of "the entire script"
[15:19:21] ccooke: is it a string joined with newlines? is it an array?
[15:19:52] delsol: its a shell script
[15:20:15] delsol: its a damn file that executes any other way I try it.
[15:20:32] ccooke: when you say "it's a shell script", do you mean that the thing you are running in system() is a path to a file in which there are commands?
[15:20:37] delsol: sh executes it, ./ works fine,
[15:20:47] braincrash: has joined #ruby
[15:21:58] ccooke: Right, finally. So. what is the value of $? after you run the system() command that fails?
[15:25:10] nowhere_man: has joined #ruby
[15:25:51] ccooke: that's impossible as per the specification
[15:26:02] ccooke: $? is either nil or a Process::Status object
[15:26:03] p4p0l0: has joined #ruby
[15:26:41] ccooke: https://ruby-doc.org/core-2.2.0/Process/Status.html
[15:26:53] ccooke: To quote: "The built-in variable $? is either nil or a Process::Status object."
[15:27:56] havenwood: delsol: p $?
[15:29:06] delsol: pid 19349 exit 127
[15:29:07] havenwood: delsol: See: Process.last_status
[15:30:06] havenwood: delsol: 127 means the command wasn't in your PATH
[15:30:53] havenwood: delsol: system 'nerp'; Process.last_status.exitstatus #=> 127
[15:31:09] tcopeland: has joined #ruby
[15:32:17] braincrash: has joined #ruby
[15:33:55] jottr_: has joined #ruby
[15:34:31] nowhere_man: has joined #ruby
[15:36:40] jrich523: has joined #ruby
[15:40:03] tdy: has joined #ruby
[15:40:28] amar_: has joined #ruby
[15:42:02] cagomez: has joined #ruby
[15:46:34] jcarl43: has joined #ruby
[15:47:17] bijan_: has joined #ruby
[15:48:27] bijan_: has joined #ruby
[15:51:04] roamingdog: has joined #ruby
[15:51:48] bijan_: has joined #ruby
[15:52:59] braincrash: has joined #ruby
[15:54:30] wontruefree: has joined #ruby
[15:58:15] bijan_: has joined #ruby
[15:59:27] Venomen: has joined #ruby
[16:04:41] bijan_: has joined #ruby
[16:05:30] delsol: Yeah, typo there. Fixed the problem. / wasn't / due to chroot.
[16:06:11] jrafanie: has joined #ruby
[16:08:32] Rapture: has joined #ruby
[16:08:35] delsol: Thanks for the help!
[16:10:31] bijan_: has joined #ruby
[16:11:46] dionysus69: has joined #ruby
[16:12:09] p4p0l0: has joined #ruby
[16:16:25] amar_: has joined #ruby
[16:18:16] desperek: has joined #ruby
[16:20:42] Sylario: has joined #ruby
[16:21:13] StarSeed0000: has joined #ruby
[16:25:56] gheegh: has joined #ruby
[16:26:54] claudiuinberlin: has joined #ruby
[16:30:07] agent_white: has joined #ruby
[16:31:41] guille-moe: has joined #ruby
[16:32:14] jottr_: has joined #ruby
[16:33:17] nowhere_man: has joined #ruby
[16:34:12] Fr4n: has joined #ruby
[16:38:11] bijan_: has joined #ruby
[16:41:58] agent_white: has left #ruby: ()
[16:42:03] agent_white: has joined #ruby
[16:42:37] chouhoulis: has joined #ruby
[16:43:35] aufi_: has joined #ruby
[16:44:36] orbyt_: has joined #ruby
[16:47:20] Fr4n: has joined #ruby
[16:54:24] [Butch]: has joined #ruby
[16:56:15] bijan_: has joined #ruby
[16:57:36] amar_: has joined #ruby
[16:58:31] amar_: has joined #ruby
[16:59:36] vyorkin: has joined #ruby
[17:00:13] lxsameer: has joined #ruby
[17:05:03] theRoUS: rails 5. i put a file in app/validators/balancer_validator.rb, but no longer need it. but if i delete it, rails blows up because it can't find it. i can't find any references to it anywhere; is it marshalled into a cache or something?
[17:05:48] jottr_: has joined #ruby
[17:06:20] bijan_: has joined #ruby
[17:07:22] bijan_: has joined #ruby
[17:07:51] theRoUS: never mind, PEBKAC
[17:10:46] anjen: has joined #ruby
[17:14:47] EvilJStoker: has joined #ruby
[17:15:53] claudiuinberlin: has joined #ruby
[17:16:37] eckhardt: has joined #ruby
[17:17:47] BloopMonster: has joined #ruby
[17:22:16] lxsameer: has joined #ruby
[17:22:29] bijan_: has joined #ruby
[17:24:40] bijan_: has joined #ruby
[17:27:22] dr3wo: has joined #ruby
[17:29:35] Venomen: has joined #ruby
[17:30:32] maiz: has joined #ruby
[17:33:59] bijan_: has joined #ruby
[17:34:20] chouhoulis: has joined #ruby
[17:35:55] bijan_: has joined #ruby
[17:36:59] bijan_: has joined #ruby
[17:38:00] bijan_: has joined #ruby
[17:41:32] mikecmpbll: has joined #ruby
[17:42:07] bijan_: has joined #ruby
[17:44:30] SeepingN: has joined #ruby
[17:48:32] tty: has joined #ruby
[17:50:14] amar_: has joined #ruby
[17:52:49] guille-moe: has joined #ruby
[17:57:49] jottr_: has joined #ruby
[17:59:24] bijan_: has joined #ruby
[17:59:27] SanguineAnomaly: has joined #ruby
[17:59:29] sameerynho: has joined #ruby
[18:02:11] r29v: has joined #ruby
[18:02:28] schleppel: has joined #ruby
[18:06:19] bijan_: has joined #ruby
[18:07:25] lxsameer: has joined #ruby
[18:09:09] moei: has joined #ruby
[18:09:09] bijan_: has joined #ruby
[18:12:45] guille-moe: has joined #ruby
[18:15:23] cagomez: has joined #ruby
[18:17:18] lxsameer: has joined #ruby
[18:17:43] cagomez: has joined #ruby
[18:18:01] Lytol: has joined #ruby
[18:19:29] bijan_: has joined #ruby
[18:21:48] bijan_: has joined #ruby
[18:24:42] bijan_: has joined #ruby
[18:25:30] drale2k_: has joined #ruby
[18:27:22] lxsameer: has joined #ruby
[18:33:22] cthu|: I'm starting to love ===, but I know it's wrong
[18:33:32] cthu|: it's a drug. It'll have consequences.
[18:35:02] bijan_: has joined #ruby
[18:35:33] jottr_: has joined #ruby
[18:36:09] bijan_: has joined #ruby
[18:41:50] crankharder: has joined #ruby
[18:43:53] drale2k_: has joined #ruby
[18:47:41] p4p0l0: has joined #ruby
[18:48:25] anjen: has joined #ruby
[18:53:02] jabowa: has joined #ruby
[18:54:36] tycoon177: where can i effectively learn OO ruby? I have been working with rails for over 2 years now and i have learned a lot (i think) of ruby, but i stumble greatly when it comes to modules vs classes and things like that
[18:54:45] bijan_: has joined #ruby
[18:55:16] dviola: has joined #ruby
[18:55:26] tycoon177: i guess now that i'm thinking about it, specifying OO was redundant
[18:57:00] bijan_: has joined #ruby
[19:00:11] za1b1tsu: has joined #ruby
[19:01:59] zachk: has joined #ruby
[19:02:18] rcs: has joined #ruby
[19:03:57] zachk: has joined #ruby
[19:04:19] p4p0l0: has joined #ruby
[19:05:06] bijan_: has joined #ruby
[19:06:00] synthroid: has joined #ruby
[19:07:08] bijan_: has joined #ruby
[19:07:11] lxsameer: has joined #ruby
[19:07:12] jenrzzz: has joined #ruby
[19:07:13] jenrzzz: has joined #ruby
[19:07:39] stairmast0r: has joined #ruby
[19:09:27] bijan_: has joined #ruby
[19:10:16] synthroid: has joined #ruby
[19:10:47] wontruefree: has joined #ruby
[19:11:23] bijan_: has joined #ruby
[19:11:58] cthu|: hell === is black magic!
[19:12:08] cthu|: it matches if an ip is in the subnet!
[19:12:24] clemens3_: has joined #ruby
[19:13:20] ellcs: has joined #ruby
[19:16:27] jottr: has joined #ruby
[19:19:44] JamJam_kid: has joined #ruby
[19:20:49] bijan_: has joined #ruby
[19:21:57] ellcs: has joined #ruby
[19:22:21] oncall-pokemon: has joined #ruby
[19:23:53] bijan_: has joined #ruby
[19:25:00] maiz: has joined #ruby
[19:25:09] bijan_: has joined #ruby
[19:26:50] apeiros_: has joined #ruby
[19:27:21] t0xik: has joined #ruby
[19:28:54] daemonwrangler: has joined #ruby
[19:29:31] webhat: has joined #ruby
[19:32:39] jenrzzz: has joined #ruby
[19:32:46] DeepIO: has joined #ruby
[19:35:02] Nicmavr: has joined #ruby
[19:35:39] bijan_: has joined #ruby
[19:40:59] bijan_: has joined #ruby
[19:43:55] Venomen: has joined #ruby
[19:45:01] bijan_: has joined #ruby
[19:46:09] alem0lars: has joined #ruby
[19:47:25] lxsameer: has joined #ruby
[19:50:07] orbyt_: has joined #ruby
[19:52:02] cagomez: has joined #ruby
[19:53:32] GodFather: has joined #ruby
[19:54:23] shinnya: has joined #ruby
[19:56:47] workmad3: has joined #ruby
[19:57:04] Mike11: has joined #ruby
[19:57:23] bijan_: has joined #ruby
[20:00:48] jabowa: has joined #ruby
[20:02:34] jenrzzz: has joined #ruby
[20:02:35] jenrzzz: has joined #ruby
[20:05:01] Puffball: has joined #ruby
[20:07:16] lxsameer: has joined #ruby
[20:07:34] karapetyan: has joined #ruby
[20:08:14] bijan_: has joined #ruby
[20:08:43] p4p0l0: has joined #ruby
[20:09:35] BloopMonster: has joined #ruby
[20:12:32] roamingdog: has joined #ruby
[20:13:49] roamingd_: has joined #ruby
[20:14:32] cagomez: has joined #ruby
[20:22:13] lxsameer: has joined #ruby
[20:25:15] claudiuinberlin: has joined #ruby
[20:32:11] lxsameer: has joined #ruby
[20:34:04] karapetyan: has joined #ruby
[20:40:05] leitz: has joined #ruby
[20:42:10] lxsameer: has joined #ruby
[20:42:47] reber: has left #ruby: ("Leaving")
[20:46:14] jinie: has joined #ruby
[20:47:24] cagomez: has joined #ruby
[20:52:11] lxsameer: has joined #ruby
[21:04:54] samosaphile: has joined #ruby
[21:06:14] cyberg: has joined #ruby
[21:07:22] quobo: has joined #ruby
[21:08:02] ur5us: has joined #ruby
[21:09:32] Dounx: has joined #ruby
[21:10:17] ur5us_: has joined #ruby
[21:12:49] ur5us: has joined #ruby
[21:14:35] Venomen: has joined #ruby
[21:15:24] gbenussi: has joined #ruby
[21:17:49] crankharder: has joined #ruby
[21:19:11] orbyt_: has joined #ruby
[21:20:58] jenrzzz: if I know the path to a ruby file, is it possible to find out what constants it defines from another ruby script? i'm thinking no, but wondered if y'all have any ideas
[21:21:24] apeiros_: with limitations
[21:21:59] apeiros: if you can run the file (i.e. are willing to accept potential side effects) you can map existing constants before and after and then diff
[21:24:36] apeiros: jenrzzz: what probblem are you trying to solve?
[21:24:42] jenrzzz: apeiros: cool, yeah I'm fine with requiring it. is there a quick way to get the list of defined constants or do I need to do ObjectSpace.each_object(Module)?
[21:24:57] apeiros: ObjectSpace is the way
[21:25:05] r29v: has joined #ruby
[21:26:28] jenrzzz: apeiros: nothing useful... my friend asked me how to copy all the method names for a class in vim and I wondered if there was a nice one-liner to load the file, find the module it defines, and call #methods on it. just a really roundabout way to avoid writing :g/def \v.+/y A
[21:27:02] apeiros: jenrzzz: if you run yard on installations, you could query its index
[21:27:10] jenrzzz: oooh that's a good idea
[21:32:12] lxsameer: has joined #ruby
[21:42:13] lxsameer: has joined #ruby
[21:56:05] eckhardt: has joined #ruby
[22:01:04] cschneid: has joined #ruby
[22:02:48] herbmillerjr: has joined #ruby
[22:04:42] Asher: has joined #ruby
[22:18:05] Venomen: has joined #ruby
[22:18:06] Venomen: has joined #ruby
[22:21:03] dviola: has joined #ruby
[22:22:14] lxsameer: has joined #ruby
[22:25:26] tfitts: has joined #ruby
[22:33:55] fluxAeon_: has joined #ruby
[22:36:17] cthulchu_: has joined #ruby
[22:41:14] white_lilies: has joined #ruby
[22:44:12] JamJam_kid: has joined #ruby
[22:44:26] roamingdog: has joined #ruby
[22:45:16] roamingdog: has joined #ruby
[22:46:03] roamingdog: has joined #ruby
[22:47:43] t0xik: has joined #ruby
[22:48:53] roamingdog: has joined #ruby
[22:51:05] cschneid_: has joined #ruby
[22:53:15] chouhoulis: has joined #ruby
[22:54:15] chouhoul_: has joined #ruby
[22:55:21] chouhoul_: has joined #ruby
[22:56:29] chouhoul_: has joined #ruby
[22:57:36] chouhoul_: has joined #ruby
[22:58:40] chouhoulis: has joined #ruby
[22:59:48] chouhoul_: has joined #ruby
[23:00:54] roamingdog: has joined #ruby
[23:00:58] chouhoul_: has joined #ruby
[23:01:44] roamingdog: has joined #ruby
[23:01:57] chouhoul_: has joined #ruby
[23:02:29] roamingdog: has joined #ruby
[23:03:02] chouhoul_: has joined #ruby
[23:03:16] roamingdog: has joined #ruby
[23:04:06] roamingdog: has joined #ruby
[23:04:29] chouhoulis: has joined #ruby
[23:05:15] chouhoul_: has joined #ruby
[23:07:27] chouhoul_: has joined #ruby
[23:08:07] cschneid: has joined #ruby
[23:08:53] chouhoul_: has joined #ruby
[23:10:45] raynold: has joined #ruby
[23:10:48] chouhoul_: has joined #ruby
[23:11:49] chouhoul_: has joined #ruby
[23:12:14] lxsameer: has joined #ruby
[23:12:59] chouhoul_: has joined #ruby
[23:13:27] tty: has joined #ruby
[23:14:07] chouhoul_: has joined #ruby
[23:15:08] chouhoulis: has joined #ruby
[23:16:03] tag: has joined #ruby
[23:16:17] chouhoul_: has joined #ruby
[23:17:20] chouhoul_: has joined #ruby
[23:17:39] jhack: has joined #ruby
[23:18:02] hph^: has joined #ruby
[23:19:39] chouhoul_: has joined #ruby
[23:20:35] infernix: has joined #ruby
[23:20:38] chouhoulis: has joined #ruby
[23:22:04] chouhoul_: has joined #ruby
[23:23:53] chouhoul_: has joined #ruby
[23:25:01] chouhoul_: has joined #ruby
[23:26:29] chouhoulis: has joined #ruby
[23:27:14] chouhoul_: has joined #ruby
[23:28:12] d5sx43: has joined #ruby
[23:28:23] chouhoul_: has joined #ruby
[23:29:28] chouhoul_: has joined #ruby
[23:31:39] chouhoulis: has joined #ruby
[23:32:44] chouhoul_: has joined #ruby
[23:33:05] feelx: has joined #ruby
[23:34:00] chouhoul_: has joined #ruby
[23:35:17] chouhoul_: has joined #ruby
[23:36:24] chouhoul_: has joined #ruby
[23:36:38] subroot: has joined #ruby
[23:37:11] chouhoulis: has joined #ruby
[23:38:13] chouhoul_: has joined #ruby
[23:39:31] chouhoul_: has joined #ruby
[23:40:46] chouhoul_: has joined #ruby
[23:41:38] chouhoul_: has joined #ruby
[23:42:58] chouhoulis: has joined #ruby
[23:43:49] chouchen_: has joined #ruby
[23:45:55] chouhoul_: has joined #ruby
[23:47:03] chouhoul_: has joined #ruby
[23:49:16] chouhoul_: has joined #ruby
[23:50:41] chouhoul_: has joined #ruby
[23:52:27] lxsameer: has joined #ruby
[23:52:36] chouhoul_: has joined #ruby
[23:53:27] mozzarella: has joined #ruby
[23:53:40] chouhoulis: has joined #ruby
[23:55:43] zenspider: !connection chouhoulis
[23:55:43] ruby[bot]: +bbbb $a:chouhoulis$#ruby-fix-your-connection chouhoulis!*@*$#ruby-fix-your-connection chouhoul_!*@*$#ruby-fix-your-connection chouhou__!*@*$#ruby-fix-your-connection
[23:55:43] ruby[bot]: +bbbb chouho___!*@*$#ruby-fix-your-connection chouh____!*@*$#ruby-fix-your-connection chou_____!*@*$#ruby-fix-your-connection *!*@50-207-64-46-static.hfc.comcastbusiness.net$#ruby-fix-your-connection
[23:55:43] ruby[bot]: ruby[bot] kicked chouho___: join/part detected
[23:55:45] ruby[bot]: ruby[bot] kicked chouhoulis: join/part detected
[23:56:01] zenspider: so tired of that
[23:56:20] jenrzzz: has joined #ruby
[23:56:20] jenrzzz: has joined #ruby