« Back to channel list

#ruby - 16 November 2017

« Back 1 day Forward 1 day »
[00:08:35] Aliv3: has joined #ruby
[00:08:56] Devalo: has joined #ruby
[00:09:09] orbyt_: has joined #ruby
[00:13:06] cdg: has joined #ruby
[00:13:22] mim1k: has joined #ruby
[00:20:11] ruby[bot]: -b PaulWasher!*@*$#ruby-banned
[00:20:57] alfiemax: has joined #ruby
[00:22:43] tcopeland: has joined #ruby
[00:23:06] Devalo: has joined #ruby
[00:23:54] Devalo: has joined #ruby
[00:31:14] mtkd: has joined #ruby
[00:31:54] SeepingN_: has joined #ruby
[00:35:15] Devalo: has joined #ruby
[00:36:02] nowhere_man: has joined #ruby
[00:36:08] rubyguynew: has joined #ruby
[00:37:54] Lyubo1: has joined #ruby
[00:38:46] lexruee: has joined #ruby
[00:39:37] Jameser: has joined #ruby
[00:40:16] rubyguynew: hey guys i'm having problems with saving non-standard letters such as ø to a file, i tried adding # encoding: utf-8 to the top of my source file, but doesn't really work anyone got advice?
[00:40:23] lexruee: has joined #ruby
[00:41:32] lexruee: has joined #ruby
[00:44:12] lexruee: has joined #ruby
[00:45:19] lexruee: has joined #ruby
[00:45:53] imode: has joined #ruby
[00:46:02] klaas: has joined #ruby
[00:47:45] Devalo: has joined #ruby
[00:49:05] shtirlic: has joined #ruby
[00:50:44] govg: has joined #ruby
[00:53:26] scientes: has joined #ruby
[00:53:27] scientes: has joined #ruby
[00:54:46] shtirlic: has joined #ruby
[00:58:51] Azure: has joined #ruby
[01:00:00] alveric: has joined #ruby
[01:01:29] Devalo: has joined #ruby
[01:04:13] pwnd_nsfw`: has joined #ruby
[01:05:19] shtirlic: has joined #ruby
[01:05:34] orbyt_: has joined #ruby
[01:06:37] Emmanuel_Chanel: has joined #ruby
[01:06:41] kryptoz: has joined #ruby
[01:08:30] Devalo: has joined #ruby
[01:10:15] charliesome: has joined #ruby
[01:14:39] orbyt_: has joined #ruby
[01:16:21] helpa-bot: has joined #ruby
[01:22:29] shtirlic: has joined #ruby
[01:22:49] helpa: has joined #ruby
[01:23:15] _aeris_: has joined #ruby
[01:23:58] Archrover: has joined #ruby
[01:25:20] kuchi: has joined #ruby
[01:25:22] kriskropd: has joined #ruby
[01:25:49] cagomez: has joined #ruby
[01:25:59] cagomez: has joined #ruby
[01:26:59] mtkd: has joined #ruby
[01:27:33] NightMonkey: has joined #ruby
[01:28:17] romain_t: has joined #ruby
[01:28:17] c0ncealed: has joined #ruby
[01:28:18] Guest60078: has joined #ruby
[01:28:18] cosimo_: has joined #ruby
[01:28:18] bier: has joined #ruby
[01:28:18] hogetaro_: has joined #ruby
[01:28:18] bhaak: has joined #ruby
[01:28:18] chmuri: has joined #ruby
[01:28:18] fuzzyhorns: has joined #ruby
[01:28:18] al2o3-cr: has joined #ruby
[01:28:18] chamunks: has joined #ruby
[01:28:18] segy: has joined #ruby
[01:28:18] Roa: has joined #ruby
[01:28:18] Muz: has joined #ruby
[01:28:18] quiller: has joined #ruby
[01:28:18] yasu: has joined #ruby
[01:28:18] clamstar: has joined #ruby
[01:28:18] dostoyevsky: has joined #ruby
[01:28:18] planigan: has joined #ruby
[01:28:18] solos: has joined #ruby
[01:28:18] x0F: has joined #ruby
[01:28:18] \13k: has joined #ruby
[01:28:18] href: has joined #ruby
[01:28:19] SuperChickeNES: has joined #ruby
[01:28:19] levifig: has joined #ruby
[01:28:19] zululee: has joined #ruby
[01:28:19] Junaos: has joined #ruby
[01:28:19] fumk: has joined #ruby
[01:28:19] nunchuck: has joined #ruby
[01:28:19] Fire-Dragon-DoL: has joined #ruby
[01:28:19] bwq: has joined #ruby
[01:28:19] yosafbridge: has joined #ruby
[01:28:19] greenbagels: has joined #ruby
[01:28:19] nug: has joined #ruby
[01:28:19] Sp4rKy: has joined #ruby
[01:28:19] eam: has joined #ruby
[01:28:19] agrecascino: has joined #ruby
[01:28:19] jrgifford: has joined #ruby
[01:28:19] valkyr2e: has joined #ruby
[01:28:19] `derpy: has joined #ruby
[01:28:19] syamaoka: has joined #ruby
[01:28:19] RazorX: has joined #ruby
[01:28:19] reinh1: has joined #ruby
[01:28:19] phreakocious: has joined #ruby
[01:28:19] michael_mbp: has joined #ruby
[01:28:30] coderphive: has joined #ruby
[01:28:35] href: has joined #ruby
[01:28:38] dostoyevsky: has joined #ruby
[01:28:41] syamaoka: has joined #ruby
[01:29:40] greenbagels: has joined #ruby
[01:30:29] levifig: has joined #ruby
[01:31:20] shtirlic: has joined #ruby
[01:33:08] michael_mbp: has joined #ruby
[01:33:35] jrafanie: has joined #ruby
[01:35:13] yosafbridge: has joined #ruby
[01:36:22] postmodern: has joined #ruby
[01:37:27] clamstar: has joined #ruby
[01:42:38] bmurt: has joined #ruby
[01:48:24] threh: has joined #ruby
[01:50:05] Devalo: has joined #ruby
[01:51:57] hutch34: has joined #ruby
[01:52:32] alfiemax: has joined #ruby
[01:54:54] ledestin: has joined #ruby
[01:59:32] Archrover: has joined #ruby
[02:02:29] threh: has joined #ruby
[02:04:56] enterprisey: has joined #ruby
[02:05:43] hutch34: has joined #ruby
[02:05:59] Roa: has joined #ruby
[02:06:08] Devalo: has joined #ruby
[02:12:37] ap4y1: has joined #ruby
[02:12:50] Aliv3: how do you get the version of a gem; for example require 'tilt'; tilt.version;
[02:12:54] Aliv3: or something like that
[02:13:46] mim1k: has joined #ruby
[02:17:05] fuzzyhorns: has left #ruby: ("WeeChat 1.7")
[02:21:01] Aliv3: i think gemspec
[02:21:44] guardianx: has joined #ruby
[02:24:07] divoxx: has joined #ruby
[02:32:30] jrafanie: has joined #ruby
[02:37:41] jrafanie: has joined #ruby
[02:39:54] houhoulis: has joined #ruby
[02:42:44] scientes: has joined #ruby
[02:42:44] scientes: has joined #ruby
[02:43:20] alfiemax: has joined #ruby
[02:45:25] Devalo: has joined #ruby
[02:45:46] growp: has joined #ruby
[02:46:10] Devalo: has joined #ruby
[02:47:08] growp: has joined #ruby
[02:47:45] bmurt: has joined #ruby
[02:48:44] alfiemax: has joined #ruby
[02:54:17] d^sh: has joined #ruby
[02:56:27] gizmore|2: has joined #ruby
[02:58:13] nofxx: has joined #ruby
[03:01:03] growp: has joined #ruby
[03:01:17] houhoulis: has joined #ruby
[03:01:22] Devalo: has joined #ruby
[03:02:02] Devalo: has joined #ruby
[03:05:14] alfiemax: has joined #ruby
[03:08:22] kryptoz: has joined #ruby
[03:08:51] hutch34: has joined #ruby
[03:09:09] al2o3-cr: has joined #ruby
[03:13:12] GodFather: has joined #ruby
[03:15:39] govg: has joined #ruby
[03:21:15] uZiel: has joined #ruby
[03:22:28] hutch34: has joined #ruby
[03:24:36] ramfjord: has joined #ruby
[03:25:32] duderonomy: has joined #ruby
[03:26:10] cdg: has joined #ruby
[03:28:05] mson: has joined #ruby
[03:31:14] uZiel: has joined #ruby
[03:31:32] hutch34: has joined #ruby
[03:34:02] Devalo: has joined #ruby
[03:35:25] scientes: has joined #ruby
[03:35:25] scientes: has joined #ruby
[03:36:38] orbyt_: has joined #ruby
[03:37:49] threh: has joined #ruby
[03:38:56] cdg: has joined #ruby
[03:40:29] hutch34: has joined #ruby
[03:42:39] alfiemax_: has joined #ruby
[03:43:10] Aliv3: has joined #ruby
[03:44:09] pwnd_nsfw: has joined #ruby
[03:46:53] alfiemax: has joined #ruby
[03:48:30] alfiemax_: has joined #ruby
[03:51:06] growp: has joined #ruby
[03:52:33] jordanm: has joined #ruby
[03:56:51] raynold: has joined #ruby
[03:58:05] ramfjord: has joined #ruby
[03:58:43] nullobject: has joined #ruby
[04:00:28] quarters: has joined #ruby
[04:02:23] Devalo: has joined #ruby
[04:04:40] Devalo: has joined #ruby
[04:05:25] Devalo: has joined #ruby
[04:05:52] quarters: hello. I was wondering if it's ill-advised to update a jekyll app's ruby version
[04:10:17] Devalo: has joined #ruby
[04:11:02] Devalo: has joined #ruby
[04:11:17] imode: has joined #ruby
[04:14:19] mim1k: has joined #ruby
[04:17:58] Radar: quarters: nope. It should Just Work™
[04:20:31] al2o3-cr: has joined #ruby
[04:22:36] nullobject: has joined #ruby
[04:24:47] gix: has joined #ruby
[04:28:22] nullobject: has joined #ruby
[04:31:11] AnoHito: has joined #ruby
[04:34:26] TViernion: has joined #ruby
[04:37:24] podlech: has joined #ruby
[04:37:31] Devalo: has joined #ruby
[04:41:12] Devalo: has joined #ruby
[04:42:06] imode: has joined #ruby
[04:44:41] sucks: has joined #ruby
[04:45:15] sucks: has joined #ruby
[04:50:30] Swat2: has joined #ruby
[04:52:03] Guest60078: has joined #ruby
[04:56:30] Devalo: has joined #ruby
[04:57:15] Devalo: has joined #ruby
[04:57:45] alfiemax: has joined #ruby
[05:03:12] helpa: has joined #ruby
[05:06:21] al2o3-cr: has joined #ruby
[05:12:44] mim1k: has joined #ruby
[05:12:57] helpa-bot: has joined #ruby
[05:19:15] iamarun: has joined #ruby
[05:28:26] charliesome: has joined #ruby
[05:32:15] k3rn31_: has joined #ruby
[05:32:44] c0ncealed: has joined #ruby
[05:36:29] al2o3-cr: has joined #ruby
[05:36:36] mozzarella: has joined #ruby
[05:41:25] Devalo: has joined #ruby
[05:43:30] mson: has joined #ruby
[05:46:54] osvimer: has joined #ruby
[05:48:32] alfiemax_: has joined #ruby
[05:50:46] guardianxx: has joined #ruby
[05:54:29] Devalo: has joined #ruby
[05:55:08] Devalo: has joined #ruby
[05:59:39] michael3: has joined #ruby
[05:59:50] rouge: has joined #ruby
[06:00:58] scientes: has joined #ruby
[06:00:59] scientes: has joined #ruby
[06:01:32] Dimik: has joined #ruby
[06:04:50] aroaminggeek: has joined #ruby
[06:08:28] baweaver: Wanna see something cool?
[06:08:38] apeiros: please don't
[06:08:46] apeiros: show us! :D
[06:08:52] baweaver: [{a: 1, b: 2}, {a: 3, c: 4}].map { |a:, b: 5, c: 10| a + b + c }
[06:08:56] baweaver: >> [{a: 1, b: 2}, {a: 3, c: 4}].map { |a:, b: 5, c: 10| a + b + c }
[06:08:57] ruby[bot]: baweaver: # => [13, 12] (https://eval.in/900974)
[06:09:10] baweaver: KWArgs totally work for that
[06:09:18] apeiros: oh, wow, TIL
[06:09:26] apeiros: that's indeed quite cool!
[06:09:28] baweaver: Just remembered that Lambda did that
[06:09:34] baweaver: Really danged useful
[06:09:42] apeiros: ACTION still misses proc { |@foo|
[06:10:00] apeiros: I still think they shouldn't have removed that, but instead made def work the same: def foo(@bar, …)
[06:11:27] baweaver: Having fun trying to explain each in pictures at the moment, that's fun too :D
[06:11:52] CrazyEddy: has joined #ruby
[06:12:31] jenrzzz: has joined #ruby
[06:17:14] LocaMocha: has joined #ruby
[06:20:16] elphe: has joined #ruby
[06:22:39] rabajaj: has joined #ruby
[06:27:17] pifon: has joined #ruby
[06:30:42] elomatreb: apeiros: What did that @ do? I've never seen that before
[06:31:26] apeiros: elomatreb: simple, you could assign to any variable type directly
[06:31:44] elomatreb: Oh, that sounds ... weird
[06:31:53] apeiros: 18>> proc { |@x, $y| }.call(10, 20); [@x, $y]
[06:31:55] ruby[bot]: apeiros: # => [10, 20] (https://eval.in/900980)
[06:32:03] scientes: has joined #ruby
[06:32:03] scientes: has joined #ruby
[06:32:28] apeiros: for procs yes, for methods, it'd be nice since you could avoid `def foo(a, b, c); @a = a; @b = b; @c = c; end`
[06:32:40] apeiros: you'd be able to just `def foo(@a, @b, @c); end`
[06:32:49] apeiros: ACTION off for commute, laters!
[06:35:13] Lytol: has joined #ruby
[06:36:52] jenrzzz: has joined #ruby
[06:36:52] jenrzzz: has joined #ruby
[06:37:58] gradio: has joined #ruby
[06:38:27] anisha: has joined #ruby
[07:00:57] etehtsea: has joined #ruby
[07:01:58] al2o3-cr: has joined #ruby
[07:06:38] nicesignal: has joined #ruby
[07:09:42] nofxx: has joined #ruby
[07:11:11] gradio: has joined #ruby
[07:12:58] al2o3-cr: has joined #ruby
[07:13:32] dionysus69: has joined #ruby
[07:14:28] jenrzzz: has joined #ruby
[07:20:07] apeiros_: has joined #ruby
[07:25:25] andywojo: has joined #ruby
[07:28:29] conta: has joined #ruby
[07:30:51] Devalo: has joined #ruby
[07:34:46] konsolebox: has joined #ruby
[07:35:55] ShekharReddy: has joined #ruby
[07:42:28] mjolnird: has joined #ruby
[07:43:17] ur5us: has joined #ruby
[07:43:32] sppp: Hello, i would like to write a backend server and i dont master any programming languages. i did some nodejs some sinatra/ruby but have time to learn a solid language (1month) and start writing the backend. The backend mainly would authenticate users have a dashboard for monitoring stuff and a place to do some ui drag and drop stuff and some api calls. Can you please guide me in the best way to tackle this project? Should i
[07:43:32] sppp: consider python?php?ruby?
[07:45:09] elomatreb: Well, asking in a Ruby channel you probably know the answer we'll give. You should be able to do this relatively easily with Rails, but other languages are just as capable
[07:45:18] al2o3-cr: has joined #ruby
[07:46:28] sppp: has left #ruby: ("Leaving")
[07:46:30] konsolebox: has joined #ruby
[07:47:24] rupam123456: has joined #ruby
[07:47:55] aroaminggeek: has joined #ruby
[07:48:56] sppp: has joined #ruby
[07:48:58] sppp: has left #ruby: ("Leaving")
[07:49:03] apeiros_: given the seemingly smallish task and the limited time (1 month), I'd probably go with sinatra over rails
[07:49:32] ramfjord: has joined #ruby
[07:53:15] konsolebox: has joined #ruby
[08:00:03] andikr: has joined #ruby
[08:01:55] konsolebox: has joined #ruby
[08:02:46] Devalo: has joined #ruby
[08:06:41] Mon_Ouie: has joined #ruby
[08:08:51] konsolebox: has joined #ruby
[08:10:25] guille-moe: has joined #ruby
[08:10:46] biberu: has joined #ruby
[08:13:42] aufi: has joined #ruby
[08:14:48] konsolebox: has joined #ruby
[08:17:45] TomyWork: has joined #ruby
[08:18:54] Technodrome: has joined #ruby
[08:20:40] Hexafox[I]: has joined #ruby
[08:22:52] claudiuinberlin: has joined #ruby
[08:25:13] BioSpider: has joined #ruby
[08:25:33] BioSpider: has joined #ruby
[08:25:41] al2o3-cr: has joined #ruby
[08:25:52] madhatter: has joined #ruby
[08:27:04] BioSpider: has joined #ruby
[08:28:54] konsolebox: has joined #ruby
[08:30:21] sina: has joined #ruby
[08:30:39] mark_66: has joined #ruby
[08:32:27] Defenestrate: has joined #ruby
[08:35:56] konsolebox: has joined #ruby
[08:36:30] elphe: has joined #ruby
[08:40:07] dinfuehr: has joined #ruby
[08:40:38] hs367: has joined #ruby
[08:43:59] hightower2: has joined #ruby
[08:45:08] marr: has joined #ruby
[08:45:58] selim: has joined #ruby
[08:48:26] tomphp: has joined #ruby
[08:48:48] gradio: has left #ruby: ("Leaving")
[08:52:05] aupadhye: has joined #ruby
[08:52:18] dn`_: has joined #ruby
[08:53:34] mikecmpbll: has joined #ruby
[08:53:56] QualityAddict: has joined #ruby
[08:55:55] guille-moe: has joined #ruby
[08:56:11] alfiemax: has joined #ruby
[08:56:17] Bish: im having a model, which changes another model on save
[08:56:38] Bish: for a batch insert, i dont want that "hook" to run
[08:57:09] Bish: right now i am having a class variable set to false, if i don't want this behaviour to happen
[08:57:32] Bish: but now i have multiple threads in a single process, where some might want this behaviour some do not..
[08:57:39] Bish: how do i go with that?
[09:01:42] MrSparkle: has joined #ruby
[09:02:53] konsolebox: has joined #ruby
[09:04:22] Devalo: has joined #ruby
[09:10:21] al2o3-cr: has joined #ruby
[09:15:55] apeiros: Bish: best would probably to untangle that save. i.e. that your model never saves another model on its own save.
[09:16:33] Nahra: has joined #ruby
[09:17:15] duderonomy: has joined #ruby
[09:18:29] Ag3nt: has joined #ruby
[09:19:00] Brak____________: has joined #ruby
[09:19:41] daxroc: has joined #ruby
[09:20:24] Chew: has joined #ruby
[09:23:53] Bish: well, i wanted to be transparent..
[09:23:57] alfiemax: has joined #ruby
[09:24:12] Bish: because users of that software can define their own "selections" of said mdoel
[09:24:25] Bish: for example "find every user which last name begins with X"
[09:24:37] Bish: and if a user marries, and changes his name to Charles Xavier
[09:24:50] Bish: i want him to be part of that selection
[09:25:30] p0p0pr37_: has joined #ruby
[09:25:30] p0p0pr37_: has joined #ruby
[09:25:43] Bish: so i wanted this to be as transparent as possible
[09:26:30] Bish: it works well, but as soon as i do batch inserts, it's too slow
[09:27:10] moei: has joined #ruby
[09:30:06] bmn: has joined #ruby
[09:33:04] Serpent7776: has joined #ruby
[09:39:58] Azure: has joined #ruby
[09:41:24] burgestrand: has joined #ruby
[09:43:44] Beams: has joined #ruby
[09:46:47] elphe: has joined #ruby
[09:47:22] rikkipitt: has joined #ruby
[09:52:26] elomatreb: That sounds like something that should be solved on the database level? (Not to mention the concept of last/first name being difficult if you have international users)
[09:53:01] Azure: has joined #ruby
[09:54:40] sjors_: has joined #ruby
[09:57:07] Devalo: has joined #ruby
[09:57:11] sjors_: Is it possible to call a method that has keyword parameters by providing a hash containing the keys and arguments?
[09:58:25] Veejay: has joined #ruby
[09:59:04] elomatreb: Yes, ** does keyword splatting
[09:59:23] Veejay: Hello everyone, I was wondering, is there a way to create a Queue from existing data? (Array, Set, etc)
[09:59:51] Veejay: Having to call new then iterating over the data to push them to the Queue seems strangely involved for Ruby
[10:00:14] Veejay: (Queue in the context or Thread I mean)
[10:01:19] Caius: has joined #ruby
[10:01:19] Caius: has joined #ruby
[10:01:37] alfiemax: has joined #ruby
[10:03:05] sjors_: elomatreb: Thank you, I will look into that
[10:07:53] osvimer: has joined #ruby
[10:20:31] plexigras: has joined #ruby
[10:28:25] ldnunes: has joined #ruby
[10:32:15] guille-moe: has joined #ruby
[10:34:05] Devalo: has joined #ruby
[10:34:50] Devalo: has joined #ruby
[10:39:11] ferr: has joined #ruby
[10:39:24] ferr: has left #ruby: ()
[10:41:20] Devalo: has joined #ruby
[10:45:01] sjors_: has joined #ruby
[10:49:49] ramfjord: has joined #ruby
[10:52:13] alfiemax: has joined #ruby
[10:53:20] tomphp: has joined #ruby
[10:54:48] Bish: elomatreb: oh wow, thats a complex task
[10:55:00] Bish: elomatreb: those "user defineable selections" are implemented in ruby
[10:55:11] Bish: i would have to write a parser for the own syntax i created in plpgsql
[10:55:20] Bish: but in future projects, i would do that, yes.
[10:55:57] elomatreb: Sure, but depending on what selections you have you can probably do them in SQL (maybe even through the AR interface), which is usually faster than doing it in Ruby
[10:56:09] elomatreb: But I don't know your system so I'll shut up
[10:56:14] Bish: well, my end-user are not technical...
[10:56:28] Bish: so i have a dialog.. where they can click them together, phpmyadmin style
[10:58:07] Bish: {"op"=>"OR", "exps"=>[{"filter"=>{"id"=>0, "selectedFilterFunction"=>{"name"=>"purchased_product_category", "paramTypes"=>["third_party_product_category"], "fieldTypes"=>["third_party_product_category"], "params"=>[42]}}}, {"filter"=>{"id"=>1, "selectedFilterFunction"=>{"name"=>"purchased_product", "paramTypes"=>["third_party_product"], "fieldTypes"=>["third_party_product"], "params"=>[747]}}}]}
[10:58:17] Bish: they kinda look like this? rather complex.. with and and or
[10:58:30] Bish: not sure if i want do that in plpgsql :D
[10:58:35] armando: has joined #ruby
[10:59:06] matthewd: lolololololol
[10:59:20] matthewd: Bish: You want ActiveRecord::Base.suppress
[10:59:20] Bish: matthewd: eh?
[10:59:55] burgestrand: Veejay not AFAIK
[11:00:07] matthewd: See the Googles for extensive discussion about the addition of that feature, for why it's funny
[11:00:45] Bish: matthewd: no please explain is it because i implemented this crap?
[11:01:25] Bish: oh suppress as in, not calling hooks?
[11:01:26] matthewd: Bish: No.. this is a solution to your stated "don't save changes to the related object" problem
[11:01:34] matthewd: Yeah.. sort of
[11:01:38] Bish: i get it, yes, i am not using activerecord
[11:01:45] Bish: i hate rails and everything that comes with it
[11:01:50] matthewd: It's funny because it was a hugely controversial feature because no-one would want it
[11:02:00] claudiuinberlin: has joined #ruby
[11:02:02] matthewd: Yeah, I assumed so. And that makes it even funnier.
[11:02:11] Bish: well i don't want it either, but i need it performance wise
[11:02:12] al2o3-cr: has joined #ruby
[11:02:20] Bish: otherwise my customer wait 24 hour for an import
[11:02:25] Bish: been there, was not a happy time
[11:03:03] matthewd: Well, I assumed you weren't using it. Actively hating it is an option too, I suppose.
[11:03:44] Bish: the only
[11:04:38] bob_f: Eh. If you don't want to use some default Rails magic then don't use it. i.e. remove your related-object hook and call it explicitly, and then abstract all of that away.
[11:05:10] Bish: or don't use rails because it's unflexiable af
[11:05:15] Bish: but i don't want to start a flamewar
[11:05:24] Bish: never used it, because of said reason
[11:05:36] Bish: so i would rather not judge
[11:05:48] bob_f: If Rails is one thing, it's unflexiable. I can't argue that.
[11:06:07] Bish: something like my selection implementation in rails, i would kill myself
[11:06:14] Bish: land i am not saying this lightly, i mean it
[11:06:16] matthewd: You hate it and everything that comes with it, and it's 'unflexiable af', but you've never used it. And you don't want to start a flamewar.
[11:06:17] Veejay: Burgestrand: Not that big of an issue though, it's litterally two lines, thanks a lot
[11:06:22] bob_f: Why not just use arel ?
[11:06:31] Bish: matthewd: well, i tried to use it, until i noticed how unflexible it is
[11:06:37] burgestrand: Veejay I double-checked with the source and I can say it's a definite no :)
[11:06:42] bob_f: Bish: unflexiable*
[11:06:49] Bish: bob_f: thanks
[11:07:02] Bish: and startup times where horrible back then atleast
[11:07:51] Bish: bob_f: what's arel?
[11:08:05] Bish: no that was correct, right? confused today :(
[11:08:18] bob_f: Bish: ActiveRelation. It's what ActiveRecord is built on top of.
[11:08:21] matthewd: It falls under the "everything that comes with it" banner
[11:08:23] bob_f: You can use it to build queries.
[11:08:37] Veejay: Burgestrand: And also, I was only wondering because I'm making liberal use of the Queue (I gather the data prior to creating the queue, when usually, the queue is being populated dynamically, as the threads are already consuming it)
[11:09:05] GodFather: has joined #ruby
[11:09:17] Bish: bob_f: well, i google'd it up, and what does arel give me except building sql with strings?
[11:09:44] burgestrand: Bish the point of arel is to not build SQL with strings
[11:09:46] Bish: certainly can't create a user definable select with it? can i?
[11:09:55] bob_f: Sure you can.
[11:10:13] bob_f: You may have to do some programming though, so be careful.
[11:10:32] Bish: well, i am using sequel for that, and i really think this cannot keep up
[11:10:42] Bish: wehn i read .where('a < 3')
[11:10:43] matthewd: It's an important component in AR/Rails's flexiability
[11:10:58] Bish: lol, which isn't existing you say.
[11:11:52] dn`: has joined #ruby
[11:13:46] matthewd: You may have confused me with yourself, there. But okay. Sequel is a great library, so if you're happy with that, great.
[11:14:17] Bish: sorry, really don't want to be that guy.. but i REALLY really cannot see how ActiveRecord is ANY good
[11:14:27] Bish: it's not like im argueing iphone vs android or something
[11:14:45] Bish: best thing i can say about it is it's platform independent? i think? works on every db same way?
[11:14:58] Bish: certainly can argue that's a good thing
[11:15:26] Bish: not a good thing*
[11:15:27] matthewd: You seem to be trying very hard to pick a fight, while also trying pretty hard to throw vague insults instead of identifying concrete shortcomings
[11:15:32] tacoboy: has joined #ruby
[11:15:38] Bish: no. sorry.. can't stop.. in this particular manner
[11:15:40] Bish: but i will try
[11:15:41] elomatreb: (and of course not trying to start a flamewar)
[11:15:56] Bish: nono, really, don't want that, but i have storng feelings regarding that
[11:16:03] matthewd: That's not going to provide a productive conversation, so it's time to call this discussion concluded
[11:16:09] matthewd: Bish: The trick is you don't have to share them
[11:16:14] Bish: you're right
[11:16:25] Bish: matthewd: well, depends on what you want i guess
[11:19:17] Bish: after_create -> { ...
[11:19:22] Bish: what kind of syntax is that?
[11:19:26] Bish: first parameter=proc{} ?
[11:19:51] charliesome: has joined #ruby
[11:20:25] matthewd: Ruby, and yes that's a stabby lambda
[11:20:32] Bish: isn't that confsing while the rest of the world uses blocks in ruby?
[11:20:43] Bish: i mean i like it, it looks like some event-based language
[11:20:48] Bish: this ->{ that }
[11:20:58] Bish: but never seen it
[11:21:29] matthewd: I don't know where you're seeing this example
[11:21:40] Bish: https://github.com/rails/rails/issues/18847
[11:22:23] Bish: guess after_create can do both? get a stabby as first parameter, or a block?
[11:23:32] matthewd: Yes, it accepts both, mostly to allow using other non-proc callables. I don't have any particular reason one would use that form with a proc directly.
[11:23:45] dminuoso: ACTION raises a hand
[11:23:54] dminuoso: in-place function composition!
[11:24:07] dminuoso: ACTION hides from the harsh comment matthewd is preparing to type
[11:24:09] matthewd: dminuoso: In this context, as a parameter to after_create
[11:24:17] dminuoso: matthewd: Yes, I know. :P
[11:24:49] Bish: i like it, more readable than after_create {... } even though it's subtle
[11:24:57] mr_foto: has joined #ruby
[11:24:57] matthewd: My guess would be that David's just unused to using that form, because he's more likely to use a symbol + a method
[11:25:04] dminuoso: matthewd: Honestly I enjoy the fact that unlike Enumerable Rails is much more open to callables instead of blocks.
[11:26:42] Bish: then what are blocks good for dminuoso ?
[11:27:01] dminuoso: Bish: Blocks are just a low level optimization for avoiding to create an RObject around the internal block.
[11:27:13] dminuoso: Semantically they are just functions (like proc/lambda)
[11:27:26] Bish: blocks are faster, like, really?
[11:27:43] Bish: didn't even expect that
[11:27:51] dminuoso: Bish: A tiny bit because ruby does not have to create an explicit object around them. It's not much honestly.
[11:28:02] Bish: dminuoso: well, but you could live without them?
[11:28:17] Bish: if you say you like the fact rails uses procs more regulary?
[11:28:23] |ifei5good: has joined #ruby
[11:30:02] Devalo: has joined #ruby
[11:30:29] zautomata: has joined #ruby
[11:43:09] jaruga: has joined #ruby
[11:49:29] biberu: has joined #ruby
[11:52:50] BioSpider: has joined #ruby
[11:54:33] Devalo: has joined #ruby
[12:05:48] nofxx: has joined #ruby
[12:12:22] kapil___: has joined #ruby
[12:13:02] drowze: has joined #ruby
[12:15:12] Technodrome: has joined #ruby
[12:15:59] Ag3nt: has joined #ruby
[12:16:04] alfiemax: has joined #ruby
[12:17:42] nickjj: has joined #ruby
[12:26:05] Elodin: has joined #ruby
[12:26:24] al2o3-cr: has joined #ruby
[12:27:00] Elodin: hello, how do i make installed gems to be in my path, i just had to install tmuxinator and i would like its executable to be in my path
[12:31:21] Elodin: nevermind i think i should add the gems/bin manually to path
[12:35:06] Bish: has joined #ruby
[12:42:03] Elodin: has left #ruby: ("WeeChat 1.9.1")
[12:43:38] al2o3-cr: has joined #ruby
[12:44:10] guille-moe: has joined #ruby
[12:46:55] JsilverT: has joined #ruby
[12:50:01] ramfjord: has joined #ruby
[12:50:23] voker57: has joined #ruby
[12:50:23] voker57: has joined #ruby
[12:52:20] KrzaQ: I want to upload a fairly large file over https. Normally, I'd use the httpclient gem, but I want to show upload progress as it goes - does anyone know if it's feasible with it, or if there's an alternative?
[12:55:45] alfiemax_: has joined #ruby
[12:57:38] hogetaro: has joined #ruby
[12:58:25] Psybur: has joined #ruby
[13:04:07] ogres: has joined #ruby
[13:06:05] synthroid: has joined #ruby
[13:09:00] yeticry: has joined #ruby
[13:10:59] apparition: has joined #ruby
[13:13:40] pwnd_nsfw: has joined #ruby
[13:17:25] kryptoz: has joined #ruby
[13:17:39] al2o3-cr: has joined #ruby
[13:17:46] govg: has joined #ruby
[13:19:04] BTRE: has joined #ruby
[13:19:30] yeticry_: has joined #ruby
[13:22:58] Devalo: has joined #ruby
[13:27:06] rouge: has joined #ruby
[13:30:49] tacoboy: has joined #ruby
[13:31:31] dviola: has joined #ruby
[13:31:38] im0nde: has joined #ruby
[13:32:40] hutch34: has joined #ruby
[13:35:10] kristofferR: has joined #ruby
[13:46:41] bmurt: has joined #ruby
[13:47:11] shinnya: has joined #ruby
[13:47:47] cdg: has joined #ruby
[13:49:02] rgr: has joined #ruby
[13:49:20] kryptoz: has joined #ruby
[13:52:05] cdg: has joined #ruby
[14:00:51] rouge: has joined #ruby
[14:03:25] iamarun: has joined #ruby
[14:04:36] alveric1: has joined #ruby
[14:07:55] Jameser: has joined #ruby
[14:09:43] al2o3-cr: has joined #ruby
[14:12:41] ledestin: has joined #ruby
[14:13:17] Bish: KrzaQ: i like resumeable uploads
[14:13:31] Bish: like .. partial uploads, even gives you a progressbar, which is useable
[14:13:49] Bish: requires some html5 javascript stuff, tho
[14:14:12] KrzaQ: it's an api, I just want to show the progress in the client app
[14:14:48] Bish: so you can't change the way it gets uploaded?
[14:14:53] Bish: and you want to do it from ruby?
[14:15:03] Bish: sorry i misunderstood, thought u want get uploaded to
[14:15:16] KrzaQ: I have a ruby script that does post('https://...', myfile.zip)
[14:15:26] mson: has joined #ruby
[14:15:27] KrzaQ: I want to show progress of this upload
[14:15:52] Bish: i think mechanize was able to have some sort of upload callback
[14:16:40] KrzaQ: I didn't see anything in the docs, though the examples were mostly html-download-takeaction oriented
[14:17:36] Bish: http://www.rubydoc.info/gems/mechanize-progressbar/0.2.0
[14:17:53] sepp2k: has joined #ruby
[14:17:57] Bish: but it seems to display.. really odd
[14:18:22] KrzaQ: HTTP response only. HTTP requests are not supported.
[14:18:31] KrzaQ: even so, I don't want to track the download, but upload
[14:18:53] Bish: well, which is basicially the same, assuming the answer is pretty short & the progressbar uses the full process
[14:20:02] gnufied: has joined #ruby
[14:21:30] TomyWork: has joined #ruby
[14:24:00] Devalo: has joined #ruby
[14:26:17] safetypin: has joined #ruby
[14:30:02] oleo: has joined #ruby
[14:34:45] aufi: has joined #ruby
[14:37:33] hightower2: has joined #ruby
[14:37:38] Devalo: has joined #ruby
[14:38:23] Devalo: has joined #ruby
[14:40:39] yaewa: has joined #ruby
[14:41:10] hutch34: has joined #ruby
[14:42:56] apeiros_: has joined #ruby
[14:44:43] guille-moe: has joined #ruby
[14:45:45] duckpuppy: has joined #ruby
[14:47:00] Jameser`: has joined #ruby
[14:50:07] ramfjord: has joined #ruby
[14:50:39] Neptu_: has joined #ruby
[14:53:16] saslam: has joined #ruby
[14:53:45] Devalo: has joined #ruby
[14:55:51] Rapture: has joined #ruby
[14:59:09] apparition: has joined #ruby
[15:06:31] fusta: has joined #ruby
[15:06:51] ozzieneher: has joined #ruby
[15:08:26] tvw: has joined #ruby
[15:13:40] Trpger: has joined #ruby
[15:15:20] borodin: has joined #ruby
[15:17:33] Veejay: has left #ruby: ("WeeChat 0.4.2")
[15:19:32] DLSteve_: has joined #ruby
[15:20:11] MrSparkle: has joined #ruby
[15:23:50] darkness: has joined #ruby
[15:24:52] _lyte_: has joined #ruby
[15:29:00] lewisinc: has joined #ruby
[15:33:16] Technodrome: has joined #ruby
[15:39:10] _whitelogger: has joined #ruby
[15:39:46] Devalo: has joined #ruby
[15:40:26] jenrzzz: has joined #ruby
[15:40:26] jenrzzz: has joined #ruby
[15:40:35] qqmash: has joined #ruby
[15:41:11] polishdub: has joined #ruby
[15:42:16] burgestrand: has joined #ruby
[15:46:14] workmad3: has joined #ruby
[15:48:02] polishdub: has left #ruby: ()
[15:49:15] Devalo: has joined #ruby
[15:49:15] Puffball: has joined #ruby
[15:49:59] Devalo: has joined #ruby
[15:56:06] guille-moe1: has joined #ruby
[15:56:52] mikecmpb_: has joined #ruby
[16:02:29] moei: has joined #ruby
[16:02:43] elphe: has joined #ruby
[16:03:48] hgost: has joined #ruby
[16:04:46] orbyt_: has joined #ruby
[16:05:48] Bish: >> 0.2+0.1
[16:06:01] Bish: >> 0.2+0.1
[16:06:03] ruby[bot]: Bish: # => 0.30000000000000004 (https://eval.in/901697)
[16:06:11] Bish: this always hurts :/
[16:06:50] d10n-work: has joined #ruby
[16:07:38] ccooke: Bish: it's a limitation of precision, though
[16:08:04] Exhiled: has joined #ruby
[16:08:29] Bish: ccooke: i know what it is, it just hurts
[16:08:46] scientes: has joined #ruby
[16:09:51] ccooke: Bish: but you can avoid it if you actually need that precision
[16:10:08] guacamole: has joined #ruby
[16:10:22] ccooke: >> require 'bigdecimal'; BigDecimal("0.1") + BigDecimal("0.2")
[16:10:23] ruby[bot]: ccooke: # => #<BigDecimal:41f4572c,'0.3E0',9(18)> (https://eval.in/901704)
[16:11:59] ccooke: Precision is an important consideration in performance. Most things don't need it arbitrary precision, but if you actually do then you have options
[16:12:25] al2o3-cr: has joined #ruby
[16:18:59] chouhoulis: has joined #ruby
[16:19:42] chouhoulis: has joined #ruby
[16:19:54] centrx: has joined #ruby
[16:19:54] centrx: has joined #ruby
[16:20:01] mikecmpbll: has joined #ruby
[16:21:14] uZiel: has joined #ruby
[16:21:42] troys: has joined #ruby
[16:25:15] elomatreb: >> 0.2r + 0.1r # No need for bigdecimal
[16:25:16] ruby[bot]: elomatreb: # => (3/10) (https://eval.in/901727)
[16:25:38] iceden: has joined #ruby
[16:26:50] apeiros: has joined #ruby
[16:27:34] synthroid: has joined #ruby
[16:28:19] guille-moe: has joined #ruby
[16:33:19] scientes: has joined #ruby
[16:33:20] scientes: has joined #ruby
[16:33:46] dinfuehr: has joined #ruby
[16:35:27] ogres: has joined #ruby
[16:36:29] jaruga: has joined #ruby
[16:36:38] drowze: has joined #ruby
[16:37:57] aroaminggeek: has joined #ruby
[16:41:29] Silthias: has joined #ruby
[16:41:31] Silthias: has left #ruby: ()
[16:46:10] Nahra: has joined #ruby
[16:47:06] ur5us: has joined #ruby
[16:48:17] SuperLag: has joined #ruby
[16:50:22] ramfjord: has joined #ruby
[16:50:38] guacamole: has joined #ruby
[16:52:35] drowze: has joined #ruby
[16:53:10] jackjackdripper: has joined #ruby
[16:53:16] hutch34: has joined #ruby
[16:56:23] polishdub: has joined #ruby
[16:57:16] guacamole: has joined #ruby
[16:59:58] chouhoulis: has joined #ruby
[17:00:24] cagomez: has joined #ruby
[17:01:01] mikecmpb_: has joined #ruby
[17:01:30] guacamole: has joined #ruby
[17:01:34] safetypin: has joined #ruby
[17:02:26] bmurt: has joined #ruby
[17:03:18] elphe: has joined #ruby
[17:03:44] cagomez: has joined #ruby
[17:03:55] guacamole: has joined #ruby
[17:03:57] marxarelli: has joined #ruby
[17:04:44] Senecea: has joined #ruby
[17:06:14] jenrzzz: has joined #ruby
[17:06:15] jenrzzz: has joined #ruby
[17:06:57] jackjackdripper: has joined #ruby
[17:08:34] ltem: has joined #ruby
[17:16:37] ramfjord: has joined #ruby
[17:17:23] anisha: has joined #ruby
[17:18:15] porfavordama: has joined #ruby
[17:20:21] cagomez: has joined #ruby
[17:20:29] iamarun: has joined #ruby
[17:20:33] porfavordama: Hello everyone,
[17:20:49] porfavordama: I just had a Ruby exam and there was a code like this . https://ideone.com/t3eNCV
[17:21:04] porfavordama: Can someone please explain how this "if" work?
[17:21:27] tomphp: has joined #ruby
[17:21:32] porfavordama: I'd never seen it before. Like using if after the actual code you want the block to execute
[17:23:02] apeiros: action if condition
[17:23:10] apeiros: i.e., if the condition is satisfied, action is executed
[17:23:26] DTZUZO: has joined #ruby
[17:24:17] centrx: same as regular if, except the condition is after the statement (postfix)
[17:24:31] centrx: and on the samel ine
[17:24:36] ldnunes: has joined #ruby
[17:24:40] porfavordama: It is like do.. while then
[17:25:01] lacour: has joined #ruby
[17:25:12] apeiros: entirely unrelated
[17:25:43] apeiros: `action if condition` works exactly the same as if you'd write `if condition then action end`
[17:25:56] porfavordama: No, I mean it's just similar. action and the stament. It is always executed once at least anyway
[17:26:27] apeiros: no. it's not. hence entirely unrelated.
[17:27:08] cagomez: has joined #ruby
[17:27:16] porfavordama: apeiros : Don't you think the "do ... while" loop is like action and condition? :D
[17:27:17] apeiros: `while … end` vs. `do … while` work differently. `if cond then action end` works *the same* as `action if cond`
[17:27:39] porfavordama: oh that's right
[17:27:42] apeiros: yes, there's condition and action in those expressions too, but ^
[17:28:25] apeiros: and note that postfix while exists too, and it works like regular while, not like do/while
[17:28:48] apeiros: and that part can be confusing, especially if you know about do/while.
[17:29:16] porfavordama: oh yea but I've never used it.
[17:29:41] porfavordama: Even though they say like "ruby is like speaking the language" it is almost more confusing for me than the other languages :D
[17:29:56] porfavordama: Especially when you've started with the other ones
[17:29:59] mistym: has joined #ruby
[17:29:59] mistym: has joined #ruby
[17:30:38] apeiros: it's generally not a bad idea to forget a lot you know from other languages when learning a new language
[17:30:59] apeiros: there are parts which can help, but there are also many parts which will stop you from learning the new language's idioms properly.
[17:31:06] RickHull: I tend to go for loop { break if cond } more these days, rather than a contortive while loop
[17:31:19] RickHull: i think it's matz endorsed too ;)
[17:31:27] porfavordama: I just got confused when I first saw that "action if condition" as to what that condition would be applied to.
[17:31:33] apeiros: but it's spaghetti :<
[17:31:40] porfavordama: apeiros : yeah especially the semicolons :D
[17:32:29] porfavordama: Learnt something new but the bad thing was learning it in the exam :D
[17:32:34] apeiros: porfavordama: oh you still have much to learn if that's what you think ;-p
[17:33:01] apeiros: I mean, there's much more interesting things where ruby shines than semicolons :)
[17:33:01] Didac: has left #ruby: ("Leaving")
[17:33:03] porfavordama: apeiros : Of course I do , I am kinda beginner in Ruby :D
[17:33:26] apeiros: well, as long as you haven't failed the exam…
[17:33:55] porfavordama: Hope I won't haha.
[17:34:04] porfavordama: And the other thing "**" operator :D
[17:34:20] apeiros: the operator or the method? :) (both exist)
[17:34:47] hutch34: has joined #ruby
[17:34:51] porfavordama: I was asked about the operator but I didn't know that either. And yet I just learnt that it is also a method? :D
[17:34:55] ruby[bot]: RickHull: # => 1024 (https://eval.in/901775)
[17:35:27] centrx: all math operators are methods in Ruby
[17:35:28] RickHull: many ruby "operators" are implemented as methods
[17:35:45] apeiros: ^ is one ** method
[17:35:50] cschneid_: has joined #ruby
[17:36:00] apeiros: being a method its meaning depends on the object you invoke it
[17:36:04] apeiros: the operator is in method definitions
[17:36:42] apeiros: >> def foo(kwarg1:, **other_kwargs); other_kwargs; end; foo(kwarg1: "hi", other: "keyword", argument: "values")
[17:36:43] ruby[bot]: apeiros: # => {:other=>"keyword", :argument=>"values"} (https://eval.in/901779)
[17:36:49] apeiros: ^ is the ** operator
[17:37:15] apeiros: well, technically only the lhs side use (left-hand-side)
[17:37:49] apeiros: though beware, some people will call the method an operator too, even though it's IMO wrong.
[17:38:09] RickHull: mostly by analogy from C, I suspect
[17:38:10] eckhardt: has joined #ruby
[17:38:21] apeiros: probably, yse
[17:38:52] RickHull: that ruby chose to implement them with methods doesn't (much) change their usage and interpretation
[17:39:36] conta1: has joined #ruby
[17:39:45] apeiros: sure, but it does change their nature and their workings. and since there are operators in ruby, it's just wrong to misidentify a method as an operator.
[17:39:59] porfavordama: apeiros : what is that double star thing called by the way ?
[17:40:02] RickHull: yep -- and confusion and miscommunication can result
[17:40:26] apeiros: porfavordama: huh, fun, I'm not even sure. kwarg-splat?
[17:40:36] apeiros: kwarg = keyword argument - just in case
[17:40:46] RickHull: * tends to be known as splat. ** sometimes double-splat
[17:40:51] porfavordama: haha okay. I didn't know how to search it :D
[17:41:11] apeiros: hm, yeah true, I think I've heard double-splat a couple of times
[17:41:44] RickHull: in my head, I often call it star, mostly with the super-star-args idiom ;)
[17:42:23] apeiros: heh, one of the cases where I notice that I don't always think in fully formed terms :D
[17:43:12] RickHull: super-star-args would be a good blog name
[17:43:15] RickHull: i call dibs
[17:44:10] RickHull: or maybe a debate / flamewar platform
[17:44:39] porfavordama: Oh now I got that super star args thingy :D
[17:44:48] porfavordama: A lot to learn
[17:45:03] blackmesa: has joined #ruby
[17:45:35] RickHull: >> def foo(*args); args; end; [foo(1), foo(1, 2); foo(:bar, :baz, :quux)]
[17:45:36] ruby[bot]: RickHull: # => /tmp/execpad-9fbda82d48e7/source-9fbda82d48e7:2: syntax error, unexpected ';', expecting ']' ...check link for more (https://eval.in/901788)
[17:45:50] RickHull: >> def foo(*args); args; end; [foo(1), foo(1, 2), foo(:bar, :baz, :quux)]
[17:45:51] ruby[bot]: RickHull: # => [[1], [1, 2], [:bar, :baz, :quux]] (https://eval.in/901789)
[17:46:45] RickHull: foo will accept any number of args with *args, and then args in the method definition is the array of args
[17:47:20] porfavordama: and the "**" one returns the hash
[17:47:21] RickHull: this quality is known as "variadic" in some spaces, and the count of args is known as "arity"
[17:47:51] guacamole: has joined #ruby
[17:47:53] RickHull: yes, for keywords args aka kwargs
[17:47:56] orbyt_: has joined #ruby
[17:48:32] kenichi: had some fun with kwargs and glitter(**) a few months ago https://gist.github.com/kenichi/7ab9c19f4cdca0cd80e1e361d9a93c9f
[17:49:12] RickHull: you could say the splat operators "decompose" the hash or the array into a comma-separated list of args
[17:49:45] RickHull: but the comma separated list is not a data type -- it's special syntax for method calls I guess
[17:50:01] Technodrome: has joined #ruby
[17:55:58] RickHull: i think the term "varargs" is sometimes used in rubyland for this
[17:57:18] apeiros: I think varargs stems from C land. not entirely sure, though
[17:57:20] ramfjord: has joined #ruby
[17:57:39] rexwin_: has joined #ruby
[17:57:57] rexwin_: what is unicode eqivalent of A&B?
[17:59:04] sagax: has joined #ruby
[17:59:14] porfavordama: What is the difference between Enumarable and an array ? Or are they two separate things ?
[17:59:54] apeiros: arrays are enumerable
[18:00:10] apeiros: Enumerable is a module which you can mix into classes which provide the "each" method
[18:00:23] apeiros: Enumerable will then add a lot of helpful methods based on "each"
[18:00:30] porfavordama: Oh okay. I thought there was a difference
[18:00:46] porfavordama: Yes I've seen them like map, select, find etc.
[18:00:59] apeiros: there is. Array is a class. Enumerable is a module. Arrays are enumerable. not all enumerables are arrays :)
[18:01:36] porfavordama: String is an enumarable I guess ? :D is it ?
[18:01:43] apeiros: it was. it no longer is.
[18:02:29] porfavordama: So what else could be for example?
[18:02:32] apeiros: but you can get enumerators from string, and enumerators are enumerable.
[18:02:52] apeiros: >> ObjectSpace.each_object(Enumerable.singleton_class).to_a
[18:02:54] ruby[bot]: apeiros: # => [Enumerable] (https://eval.in/901814)
[18:03:01] dminuoso: <apeiros> it was. it no longer is.
[18:03:03] apeiros: hm, that didn't quite work out how I thought it would :D
[18:03:20] dminuoso: As long as String has #chars, there's a fully sane implementation for it.
[18:03:32] apeiros: dminuoso: because what should String#each iterate over? bytes? chars? lines? something else? that's why it was dropped, so you can have explicit code.
[18:03:52] dminuoso: ACTION cries
[18:03:53] apeiros: and if you just said String#chars - 1.8 iterated over lines ;-)
[18:04:12] apeiros: porfavordama: Hash and Set f.ex.
[18:04:15] Devalo: has joined #ruby
[18:04:22] apeiros: also as just said above, Enumerator
[18:04:37] porfavordama: apeiros : Oh, right. Thanks ^^
[18:04:45] dminuoso: apeiros, I can hardly remember anything from back then.
[18:04:50] motstgo_: has joined #ruby
[18:05:12] dminuoso: Didn't the current core behavior of Symbol#to_proc came from ActiveSupport back then?
[18:06:11] hahuang65: has joined #ruby
[18:06:34] apeiros: I think it came from why and AS picked it up and gave it support
[18:06:38] apeiros: back then it was slow AF
[18:07:00] apeiros: good think syntax constructs can be optimized
[18:08:30] dminuoso: Now _why is a name I havent heard in a long while.
[18:09:49] rexwin_: has left #ruby: ()
[18:10:06] hutch34: has joined #ruby
[18:10:18] mikecmpbll: has joined #ruby
[18:12:43] _the_blackadder: has joined #ruby
[18:14:10] ramfjord: has joined #ruby
[18:14:33] nofxx: has joined #ruby
[18:15:09] blackmesa: has joined #ruby
[18:17:28] guacamole: has joined #ruby
[18:18:53] eckhardt: has joined #ruby
[18:21:52] Senecea: has joined #ruby
[18:25:04] Dimik: has joined #ruby
[18:25:26] dinfuehr: has joined #ruby
[18:25:46] al2o3-cr: has joined #ruby
[18:25:55] Puffball: has joined #ruby
[18:28:18] mostlybadfly: has joined #ruby
[18:31:22] Success: has joined #ruby
[18:31:33] eckhardt: has joined #ruby
[18:31:59] Success: is there a way i can parse an html file and convert <link rel="stylesheet" href="source.css"> to <style>/*source.css contents*/</style>
[18:32:47] baweaver: Success: Nokogiri
[18:33:26] baweaver: XPath to get the stylesheet, yank it, pull the href, File open, append to style tag in head, done.
[18:35:13] guacamole: has joined #ruby
[18:40:57] kapil___: has joined #ruby
[18:46:02] urk187: has joined #ruby
[18:49:41] aScottishBoat: has joined #ruby
[18:52:40] scientes: has joined #ruby
[18:54:24] aScottishBoat: Anyone ever write Ruby for ManageIQ? I've been doing that today, learning how to hack onto MiQ. Man, what a ride. But it's been quite fruitful.
[18:55:01] SeepingN: has joined #ruby
[18:56:45] Success: thanks that was actually easier than i expected
[18:57:07] raynold: has joined #ruby
[18:59:01] Success: how would I make the html output pretty and formatted?
[18:59:37] baweaver: ....good luck
[18:59:44] blackpajamas: has joined #ruby
[18:59:45] baweaver: ACTION isn't actually sure
[19:00:34] baweaver: So we have Success and aScottishBoat, today's a good day in Ruby
[19:01:13] aScottishBoat: baweaver, what do you mean?
[19:01:23] baweaver: puns are what I mean
[19:01:46] baweaver: do you come with Scotch? That'd make it better
[19:02:06] aScottishBoat: I do. Caol Ila Moscatel-aged to be exact
[19:02:13] aScottishBoat: Ever try that one?
[19:02:20] baweaver: Then it is indeed a good day
[19:02:25] baweaver: #ruby-offtopic?
[19:02:33] aScottishBoat: does it even exist?
[19:02:45] aScottishBoat: hey it does. Sure hop on
[19:02:51] patrick99e99: has joined #ruby
[19:03:41] apeiros: so by way of #ruby-offtopic, we now also reached suppress and went full circle?
[19:03:41] patrick99e99: Hi everyone.. I am just wondering, if I have a string like this: "name:4:3", is there a way to use split, to only split on the first colon character? so I'd get: ['name', '4:3'] ?
[19:03:56] apeiros: patrick99e99: split(":", 2)
[19:04:41] aScottishBoat: apeiros, I s'pose so
[19:05:39] patrick99e99: apeiros: oh cool, thanks! I didn't know about that 2nd parameter
[19:06:46] jaruga: has joined #ruby
[19:07:15] sonOfRa: has joined #ruby
[19:09:11] tao_: has joined #ruby
[19:09:25] konsolebox: has joined #ruby
[19:10:35] scientes: has joined #ruby
[19:10:36] scientes: has joined #ruby
[19:10:42] imode: has joined #ruby
[19:11:21] rippa: has joined #ruby
[19:12:02] Devalo: has joined #ruby
[19:12:28] allcentury: has joined #ruby
[19:12:36] VladGh: has joined #ruby
[19:17:00] VladGh: has joined #ruby
[19:17:14] selim: has joined #ruby
[19:21:25] muelleme: has joined #ruby
[19:23:51] ColeHub: has joined #ruby
[19:24:52] Technodrome: has joined #ruby
[19:26:52] ur5us: has joined #ruby
[19:27:15] roshanavand: has joined #ruby
[19:29:52] jottr: has joined #ruby
[19:30:15] reaVer: has joined #ruby
[19:30:29] cdg: has joined #ruby
[19:32:52] GodFather: has joined #ruby
[19:33:27] orbyt_: has joined #ruby
[19:36:59] polishdub: has left #ruby: ()
[19:37:35] nadir: has joined #ruby
[19:40:16] patrick99e99: apeiros: one more split question for you... what if I have: 'hello:world,greetings:my, friendly,friend,whatup:dawg', and I want to split on the last comma before a colon, so that I get: ['hello:world', 'greetings:my, friendly,friend', 'whatup:dawg'] Can I do that with split, or do I have to use scan?
[19:40:40] anisha: has joined #ruby
[19:45:03] apeiros: patrick99e99: with lookaheads
[19:45:42] claudiuinberlin: has joined #ruby
[19:47:03] patrick99e99: apeiros: would that be like .scan(/,(?=:)/) ?
[19:47:16] apeiros: almost, yes
[19:47:24] dionysus69: has joined #ruby
[19:47:29] apeiros: >> 'hello:world,greetings:my, friendly,friend,whatup:dawg'.split(/,(?=[^,]*:)/)
[19:47:30] ruby[bot]: apeiros: # => ["hello:world", "greetings:my, friendly,friend", "whatup:dawg"] (https://eval.in/901857)
[19:47:49] patrick99e99: ah.. ok awesome.
[19:47:50] patrick99e99: thank you so much
[19:48:18] aScottishBoat: apeiros, the regex god
[19:48:33] aScottishBoat: Ahh it's something I'm meaning to get good at.
[19:48:55] baweaver: aScottishBoat: is that a strong wish?
[19:49:08] bbakersmith: has joined #ruby
[19:49:08] baweaver: because I _do_ have a bit of fun there
[19:49:52] bbakersmith: has left #ruby: ()
[19:50:09] baweaver: It involves grokking meta-info from tabs on classtab.org like tuning, key, tempo, and other items.
[19:50:10] baweaver: The problem? None of them are consistent formats
[19:50:32] mtkd: has joined #ruby
[19:50:33] baweaver: I tend to use that site to practice with new frontend frameworks I want to learn, or as an interview question on Regexp
[19:50:40] aScottishBoat: yeah, I'd love to get good at regex mate
[19:52:24] baweaver: Here's a starting point - https://baweaver.github.io/classtab/tabs/abreu_ticotico.txt
[19:52:42] baweaver: Try and get the tuning (E A D G B E) and the time signature (2/4) out of that.
[19:53:01] RickHull: what about whether a problem is suitable for regex or not? and also the various classes of regex (e.g. PCRE)
[19:53:19] baweaver: Is it HTML?
[19:53:36] baweaver: Then don't use Regex
[19:53:41] baweaver: All other things are fair game
[19:54:19] baweaver: (even then you could totally use flip-flop ops to get HTML :D )
[19:55:13] RickHull: most "regular expression" implementations have additional features that go beyond regular languages, which can lead to pathological behavior
[19:55:22] ramortegui: has joined #ruby
[19:55:33] RickHull: https://en.wikipedia.org/wiki/Regular_language
[19:56:50] RickHull: there are GNU regex, POSIX regex, Perl-compatible regex, extended GNU regex
[19:57:06] baweaver: There was one article explaining how PCRE ended up getting nailed after so many character matches in time complexity
[19:57:12] baweaver: Need to find it later.
[19:57:42] baweaver: AHA! https://swtch.com/~rsc/regexp/regexp1.html
[19:58:51] RickHull: https://en.wikipedia.org/wiki/Regular_expression#Patterns_for_non-regular_languages
[19:58:59] baweaver: yay for finite autonima
[19:59:34] baweaver: aScottishBoat: the mean part of the question is that a lot of them have dates which look like time signatures in them XD
[19:59:47] jinie: has joined #ruby
[20:00:07] aScottishBoat: one day I'll get good at regexp :P
[20:00:09] baweaver: (which was really not fun whenever I was trying to write an engine for going through all of them)
[20:00:14] aScottishBoat: but that day is... not today. But maybe soon ;)
[20:00:17] baweaver: I think I ended up looking that there were no proximate english words
[20:00:56] allcentury: has joined #ruby
[20:01:13] tomphp: has joined #ruby
[20:01:19] baweaver: The really fun one is when the tuning is on the left side of the tab instead of written out like E A D G B E
[20:01:38] baweaver: Also some lute music tunes to F# so: E A D F# B e
[20:01:45] baweaver: they also lower case the e some times
[20:02:10] baweaver: or all the letters
[20:02:10] aScottishBoat: baweaver, what instruments do you play?
[20:02:11] baweaver: or have no spaces, who knows
[20:02:27] aScottishBoat: errr #ruby-offtopic*
[20:05:23] RickHull: baweaver: yeah, that russ cox article is great
[20:07:01] jackjackdripper: has joined #ruby
[20:08:46] jackjackdripper: has joined #ruby
[20:16:07] cagomez: has joined #ruby
[20:16:07] allcentury: has joined #ruby
[20:16:54] wilbert: has joined #ruby
[20:23:12] john__: has joined #ruby
[20:23:29] porfavordama: has left #ruby: ()
[20:23:45] Hexafox[I]: has joined #ruby
[20:25:11] jenrzzz: has joined #ruby
[20:25:12] jenrzzz: has joined #ruby
[20:30:54] allcentury: has joined #ruby
[20:35:54] ozzieneher: has joined #ruby
[20:39:36] Psybur: has joined #ruby
[20:41:18] ur5us: has joined #ruby
[20:42:59] Asher: has joined #ruby
[20:45:04] orbyt_: has joined #ruby
[20:47:18] mrgrieves: has joined #ruby
[20:50:56] ur5us: has joined #ruby
[20:51:39] ur5us_: has joined #ruby
[20:57:42] shazbotmcnasty: has joined #ruby
[20:58:09] shazbotmcnasty: I'm getting this error, anyone know why? https://pastebin.com/kGWHR452
[20:58:11] ruby[bot]: shazbotmcnasty: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/a3d9f340bb5d7677f126f90a9b1fe2b1
[20:58:11] ruby[bot]: shazbotmcnasty: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:58:21] shazbotmcnasty: oh thanks ruby[bot]
[20:59:01] apeiros: shazbotmcnasty: sounds like you don't have bundler installed
[20:59:50] shazbotmcnasty: oh ok. this is ubuntu 16.04, I've installed build-essential and ruby-full
[21:00:12] apeiros: bundler is not part of ruby
[21:00:13] shazbotmcnasty: did i miss something in particular or should i give the server a restart or somthin
[21:00:25] apeiros: it's a gem
[21:00:29] baweaver: apeiros: which version? :troll:
[21:00:43] baweaver: (2.5 I think is bringing it into core)
[21:01:07] shazbotmcnasty: apeiros: how would one um, get one?
[21:01:16] apeiros: and if this thing you installed is a gem and depends on bundler, it should update its gemspec.
[21:01:16] shazbotmcnasty: I'm just using preconfigured ruby stuff for my zammad server
[21:01:26] apeiros: gem install bundler
[21:02:10] hutch34: has joined #ruby
[21:02:11] apeiros: baweaver: oh, in 2.5 already? I somewhat expected it to be later
[21:02:27] baweaver: I remember seeing something along that line
[21:02:46] apeiros: IMO it'd be nice if they'd just roll bundlers features into rubygems
[21:02:58] apeiros: a good part is already there afaik
[21:04:16] ^mtkd: has joined #ruby
[21:05:25] RickHull: that was planned at one point, I thought
[21:06:35] RickHull: the bundler gem is now bundled with ruby 2.5.0-preview1
[21:07:00] shazbotmcnasty: so now i'm getting the danged "Your ruby version is 2.3.1, but your Gemfile specified 2.4.1"
[21:07:55] kies: has joined #ruby
[21:08:06] RickHull: you can run multiple versions of ruby, abandoning the distro packaged ruby
[21:08:15] RickHull: or you can edit your Gemfile to relax that restriction
[21:08:35] RickHull: not sure if that's a transitive restriction based on some gem actually depending on ruby == 2.4.1
[21:09:08] RickHull: (which would be strange -- probably your Gemfile says something about required ruby version)
[21:09:51] pilne: has joined #ruby
[21:10:14] RickHull: re: bundler, ruby, rubygems: https://bugs.ruby-lang.org/issues/12733
[21:10:44] RickHull: it looks like rubygems will depend on bundler, and I imagine from there, necessary features will migrate from bundler codebase to rubygems codebase
[21:13:08] Devalo: has joined #ruby
[21:13:21] shazbotmcnasty: you're speaking so far above my head i can't begin to grasp it
[21:13:47] aroaminggeek: has joined #ruby
[21:13:48] RickHull: shazbotmcnasty: two different topics -- one regards your ruby version per bundler's Gemfile
[21:14:16] RickHull: the second regards bundler's status with respect to ruby 2.5.0
[21:14:44] RickHull: shazbotmcnasty: can you paste your Gemfile or otherwise examine it for restrictions on the ruby version?
[21:15:20] br0d1n: has joined #ruby
[21:16:27] nachoman: has joined #ruby
[21:19:03] RickHull: https://github.com/blog/2470-introducing-security-alerts-on-github js and ruby only, python in 2018
[21:19:10] diego2: has joined #ruby
[21:19:52] RickHull: I've been using https://hakiri.io/ for this
[21:19:59] shazbotmcnasty: I think i figured it out. installed ruby via ubuntu then installed bundler as a gem
[21:20:04] shazbotmcnasty: imma try it a different way
[21:22:49] shazbotmcnasty: yep nope didn't help
[21:23:12] dviola: has joined #ruby
[21:24:46] shazbotmcnasty: RickHull: I would love to, I've never used ruby before and am attempting to follow a walkthrough with preconfigured ruby scripts. How would one examine their gemfile
[21:25:16] RickHull: e.g. `less path/to/Gemfile`
[21:26:03] RickHull: you can `cat path/to/Gemfile` and then copy/paste it to a paste site
[21:26:25] RickHull: do you have a link to this walkthru?
[21:26:32] jenrzzz: has joined #ruby
[21:26:33] jenrzzz: has joined #ruby
[21:28:30] eightlimbed: has joined #ruby
[21:28:34] shazbotmcnasty: oh I found it! also absolutely. https://docs.zammad.org/en/latest/channel-fetchmail.html?highlight=ticket%2520creation%2520
[21:29:20] jackjackdripper: has joined #ruby
[21:30:38] RickHull: uh, do you mean https://docs.zammad.org/en/latest/install-source.html#install-from-source-debian-7-8-ubuntu-16-04
[21:30:46] cdg: has joined #ruby
[21:31:05] RickHull: that link shows installing the particular ruby version with rvm (a ruby version manager)
[21:32:07] Immune: has joined #ruby
[21:33:45] cdg: has joined #ruby
[21:38:39] shazbotmcnasty: Oh it does says requires 2.4.1 - and what you're looking at is the install from source section, i installed zammad from deb - and am setting up the fetchmail section, the link i gave you, which is the first time ruby has came up
[21:41:23] shazbotmcnasty: I will install the correct version via that walkthrough :<
[21:41:50] iceden: has joined #ruby
[21:43:35] nullobject: has joined #ruby
[21:43:41] enterprisey: has joined #ruby
[21:44:36] RickHull: shazbotmcnasty: the deb install should be fine, I expect
[21:44:56] RickHull: they would need to keep their deb repos update and package ruby 2.4.1 themselves
[21:45:07] RickHull: it's possible they haven't kept their debs up to dat4e
[21:47:49] UserOO7_: has joined #ruby
[21:48:16] postmodern: has joined #ruby
[21:49:52] workmad3: has joined #ruby
[21:53:19] shazbotmcnasty: suprisingly it didn't actually install a bunch of those prereqs so i'm doing that now
[21:53:50] PaulCapestany: has joined #ruby
[21:56:57] kitsunenokenja: has joined #ruby
[21:59:19] cagomez: has joined #ruby
[22:01:03] UserOO7: has joined #ruby
[22:01:55] roshanavand: has joined #ruby
[22:04:37] ColeHub: has left #ruby: ("Bye.")
[22:06:23] elphe: has joined #ruby
[22:06:24] eckhardt: has joined #ruby
[22:06:31] guacamole: has joined #ruby
[22:08:16] apeiros: test failed. please reboot.
[22:08:54] RickHull: press alt-F4 to acknowledge
[22:09:01] underport: has joined #ruby
[22:09:16] apeiros: ACTION can't find f4 on the touchbar :<
[22:09:35] RickHull: overpriced and underpowered QED
[22:09:51] apeiros: you won't hear me contradicting you
[22:10:12] RickHull: I don't need you to contradict me!
[22:10:17] RickHull: (I'm plenty)
[22:10:34] apeiros: are you really old enough to contradict yourself? o0
[22:11:36] RickHull: I'm old enough to buy my own ticket to #ruby-offtopic ;)
[22:13:03] UserOO7: has joined #ruby
[22:13:03] Quentinius: has joined #ruby
[22:16:30] UserOO7: has joined #ruby
[22:18:12] Ober: ACTION dislikes editing code that does not use matz's standard indentation
[22:20:32] sammi`: has joined #ruby
[22:24:30] Quentinius: has joined #ruby
[22:24:42] sucks: has joined #ruby
[22:25:35] hutch34: has joined #ruby
[22:27:16] UserOO7: has joined #ruby
[22:28:27] mjolnird: has joined #ruby
[22:28:52] orbyt_: has joined #ruby
[22:36:21] UserOO7: has joined #ruby
[22:38:16] UserOO7: has joined #ruby
[22:46:01] nicesignal: has joined #ruby
[22:48:38] mostlybadfly: has joined #ruby
[22:49:29] wilbert: has joined #ruby
[22:55:51] milardovich: has joined #ruby
[22:58:11] PaulCape_: has joined #ruby
[22:58:39] havenwood: 'helloooooo'.squeeze 'o'
[22:58:56] shazbotmcnasty: has joined #ruby
[23:00:43] mson: has joined #ruby
[23:01:11] SeepingN: squeeze that o
[23:05:01] orbyt_: has joined #ruby
[23:05:25] thinkpad: has joined #ruby
[23:06:07] shazbotmcnasty: hey there i'm having issues install 'pg' - all logs say "fatal error: libpg-fe.h: no such file or directory compilation terminated.'
[23:06:41] shazbotmcnasty: attempted with 'bundle install' says cannot install pg, and "gem install pg -v '0.21.0'" fails as well
[23:09:21] wnd: you probably want to install a package from your distribution/whatever that provides libpg-fe.h
[23:09:48] wnd: assuming that was a typo, Debian has /usr/include/postgresql/libpq-fe.h in package libpq-dev
[23:11:19] RickHull: yeah, some ruby gems prefer to hook into the system, and to do that, they need the "header files" or "dev packages"
[23:11:41] shazbotmcnasty: oh shewt - i totally thought that was a g - which i thought was provided by installing pg
[23:11:43] RickHull: so often for a major dependency, you need to install not just foo, but foo-dev or foo-devel as well
[23:12:06] shazbotmcnasty: got it - installed libpq-dev and was able to install pg
[23:13:51] scientes: has joined #ruby
[23:15:09] GodFather: has joined #ruby
[23:20:07] shazbotmcnasty: Okay, so that finally freakin worked
[23:20:14] havenwood: shazbotmcnasty: grats
[23:20:35] shazbotmcnasty: can anyone make sense of the part of this article though that refers to ticket attributes? https://docs.zammad.org/en/latest/channel-fetchmail.html
[23:20:55] |ifei5g00d: has joined #ruby
[23:21:13] shazbotmcnasty: it says use "X-Zammad-Ticket-Attribute:some value" for ticket creation
[23:21:22] shazbotmcnasty: I'm not sure where to put or specify what attribute
[23:21:58] |ifei5g00d: has joined #ruby
[23:27:18] bambanx: has joined #ruby
[23:29:11] baweaver: Trick shot!
[23:29:14] baweaver: >> [{a: 1, b: 2}, {b: 2, c: 3}].map { |a:1,b:2,c:3| a + b + c }
[23:29:15] ruby[bot]: baweaver: # => [6, 6] (https://eval.in/901912)
[23:30:50] dinfuehr: has joined #ruby
[23:35:34] twe4ked: has joined #ruby
[23:38:25] charliesome: has joined #ruby
[23:39:03] aroaminggeek: has joined #ruby
[23:39:49] allcentury: has joined #ruby
[23:43:01] milardov_: has joined #ruby
[23:45:39] orbyt_: has joined #ruby
[23:46:00] bambanx: hello guys
[23:47:24] RickHull: shazbotmcnasty: let's say you want a Priority header (with a priority value, say 1-10)
[23:47:25] baweaver: and ladies too :)
[23:47:33] baweaver: bambanx: What's up?
[23:47:40] RickHull: X-Zammad-Ticket-Priority:7
[23:48:07] bambanx: hehe baweaver sorry my native language is spanish i though guys means for ladies too
[23:48:09] RickHull: X-Zammad-Ticket-Source:facebook
[23:48:30] bambanx: baweaver, so what is the best way? say hello folks?
[23:48:36] baweaver: Something like that :)
[23:48:59] baweaver: How can we help you today?
[23:50:02] workmad3: has joined #ruby
[23:50:06] bambanx: in nothing really just saying hello, always enjoy the vibrant and nice ruby community
[23:50:59] baweaver: Hello hello
[23:51:18] bambanx: well maybe yes, what is meteprogramming in ruby?
[23:51:21] minimalism: has joined #ruby
[23:51:53] baweaver: Programs that write programs
[23:52:14] bambanx: like a function but more complex?
[23:52:27] baweaver: Think that you have 100 text files, you edit them all by hand
[23:52:52] RickHull: typically, the coder writes the code that gets executed. in metaprogramming, the coder writes code that writes/manipulates the code that will get executed
[23:52:59] baweaver: If you automate that process you've gone one step further in abstraction by making a Ruby script for it
[23:53:00] baweaver: Metaprogramming is to go one step further
[23:53:23] RickHull: macros in C could be considered metaprogramming
[23:53:31] baweaver: Though when starting out it's best to focus on just regular programming
[23:53:41] baweaver: attr_writer and friends are technically metaprogramming
[23:54:08] baweaver: attr_writer :attribute defines a method: def attribute; @attribute end
[23:54:32] baweaver: So it's part of a Ruby program that writes more Ruby
[23:55:30] baweaver: ACTION tries to think how he's going to explain metaprogramming with Lemur pictures
[23:56:05] baweaver: Oooooo. A Lemur that draws more Lemurs
[23:56:31] RickHull: how about a picture of you watching lemurs
[23:56:39] RickHull: and the reader watches the picture
[23:57:06] RickHull: or is that too meta?
[23:59:40] bambanx: has joined #ruby