linduxed

Activity Graph

Page 1 of 3 | Next »

2019-08-22

[00:56:33] linduxed: *.net *.split
[01:13:39] linduxed: has joined #ruby
[01:13:53] linduxed: has joined #elixir-lang

2019-08-18

[15:39:24] linduxed: Quit: WeeChat 2.5
[20:32:21] linduxed: has joined #elixir-lang
[20:32:21] linduxed: has joined #ruby
[20:32:39] linduxed: Client Quit
[20:33:21] linduxed: has joined #elixir-lang
[20:33:21] linduxed: has joined #ruby

2019-07-15

[06:50:38] linduxed: *.net *.split
[07:16:21] linduxed: has joined #elixir-lang
[08:26:26] linduxed: *.net *.split
[08:37:03] linduxed: has joined #elixir-lang

2019-07-07

[06:08:04] linduxed: *.net *.split
[06:18:28] linduxed: has joined #elixir-lang

2019-06-27

[08:34:08] linduxed: has joined #elixir-lang

2019-06-14

[16:21:17] linduxed: Quit: WeeChat 2.4

2019-05-13

[22:06:06] linduxed: Ping timeout: 258 seconds
[22:21:00] linduxed: has joined #ruby
[22:21:03] linduxed: has joined #elixir-lang

2019-05-11

[15:39:15] linduxed: Quit: WeeChat 2.3
[15:42:49] linduxed: has joined #elixir-lang
[15:42:49] linduxed: has joined #ruby

2019-04-26

[12:32:58] linduxed: hello guys! I've got a question about how dialyzer works: https://gist.github.com/linduxed/237f546deda7088c8f5d598a606c927c
[13:44:44] linduxed: micmus: oh, i see! is the suppression caused by the `__@2 -> erlang:error({with_clause, __@2})
[13:44:58] linduxed: or is it something else?
[13:48:59] linduxed: (btw i added the erl dumping module to the gist)
[14:06:55] linduxed: micmus: ah, and this is something that dialyzer picks up in its runs?
[14:07:53] linduxed: thank you for explaining!
[14:08:30] linduxed: it certainly surprised me when i noticed that one version resulted in warnings and another did not

2019-04-24

[15:00:10] linduxed: for Ecto, i've noticed that one can make a call to the Repo.transaction/2 callback without the last opts argument, essentially making it work like a transaction/1 (where the signature would have had "opts \\ []"). this is not documented here https://hexdocs.pm/ecto/Ecto.Repo.html#c:transaction/2
[15:00:23] linduxed: is this somehow intended?
[15:41:07] linduxed: gamache: right, i'm referring to how it's used, like MyApp.Repo.transaction(fn -> :foo end)
[15:42:12] linduxed: do you happen to know where this plumbing is located in their code?
[15:42:21] linduxed: if not, then i'll find it myself
[15:48:33] linduxed: gamache: thank you!

2019-04-13

[16:49:42] linduxed: *.net *.split

2019-04-04

[09:18:58] linduxed: has joined #ruby

2019-03-31

[20:40:41] linduxed: how would one view the documentation for Kernel.SpecialForms.%/2 in iex?
[20:41:00] linduxed: i get "syntax error before: '%'"
[20:41:09] linduxed: probably due to it trying to parse the %
[20:44:09] linduxed: Dakora: ah, that works. thank you!
[20:44:47] linduxed: which, by the way, reminded me that this is not what i'm looking for: rem/2 is the function i'm looking for :-P

2019-03-12

[06:07:26] linduxed: Ping timeout: 246 seconds
[06:10:07] linduxed: has joined #elixir-lang

2018-08-21

[19:39:12] linduxed: *.net *.split

2018-07-20

[00:07:06] linduxed: *.net *.split
[00:15:44] linduxed: has joined #ruby

2018-07-01

[22:22:02] linduxed: Ping timeout: 255 seconds
[22:23:09] linduxed: has joined #ruby

2018-06-29

[16:09:46] linduxed: *.net *.split
[16:14:17] linduxed: has joined #ruby
[16:14:28] linduxed: Quit: WeeChat 2.1
[16:15:37] linduxed: has joined #ruby

2018-06-07

[08:44:35] linduxed: Ping timeout: 260 seconds
[08:52:09] linduxed: has joined #ruby

2018-05-29

[02:47:04] linduxed: *.net *.split
[02:48:04] linduxed: has joined #ruby

2018-05-16

[13:40:51] linduxed: Ping timeout: 240 seconds
[13:56:57] linduxed: has joined #ruby

2018-05-14

[06:56:22] linduxed: Ping timeout: 260 seconds
[08:14:50] linduxed: has joined #ruby

2018-05-07

[13:11:09] linduxed: *.net *.split
[13:19:32] linduxed: has joined #ruby

2018-04-25

[12:25:40] linduxed: *.net *.split
[12:27:22] linduxed: has joined #ruby
[15:01:11] linduxed: *.net *.split
[15:03:15] linduxed: has joined #ruby
[18:30:57] linduxed: Ping timeout: 240 seconds
[18:33:51] linduxed: has joined #ruby

2018-04-05

[00:51:15] linduxed: *.net *.split
[01:00:06] linduxed: has joined #ruby

2018-03-28

[07:55:31] linduxed: Quit: WeeChat 2.0.1
[08:04:00] linduxed: has joined #ruby

2018-03-18

[18:47:20] linduxed: Quit: WeeChat 2.0.1
[18:48:57] linduxed: has joined #ruby

2018-03-16

[22:07:20] linduxed: *.net *.split
[22:07:55] linduxed: has joined #ruby

2018-03-13

[02:36:44] linduxed: Ping timeout: 255 seconds
[10:40:34] linduxed: has joined #ruby

2018-02-23

[07:53:26] linduxed: has joined #ruby
[08:11:50] linduxed: *.net *.split
[08:22:58] linduxed: has joined #ruby

2018-02-06

[00:42:39] linduxed: Ping timeout: 248 seconds
[00:49:42] linduxed: has joined #ruby
[01:30:07] linduxed: Ping timeout: 256 seconds
[01:33:49] linduxed: has joined #ruby

2018-02-05

[12:28:20] linduxed: Quit: WeeChat 2.0.1
[15:17:25] linduxed: has joined #ruby

2018-01-27

[12:55:45] linduxed: has joined #ruby

2018-01-26

[22:14:17] linduxed: Quit: WeeChat 2.0.1

2018-01-15

[16:01:17] linduxed: Quit: WeeChat 2.0.1
[16:03:44] linduxed: has joined #ruby

2018-01-06

[09:21:35] linduxed: Ping timeout: 248 seconds
[09:23:44] linduxed: has joined #ruby

2018-01-04

[01:14:05] linduxed: Ping timeout: 276 seconds
[01:15:07] linduxed: has joined #ruby

2018-01-03

[09:34:18] linduxed: has joined #ruby

2018-01-02

[16:56:57] linduxed: Quit: WeeChat 2.0.1

2017-12-30

[12:44:44] linduxed: Quit: WeeChat 2.0
[12:46:26] linduxed: has joined #ruby

2017-12-27

[13:24:18] linduxed: has joined #ruby

2017-12-21

[06:26:10] linduxed: *.net *.split

2017-12-18

[06:46:28] linduxed: Quit: WeeChat 1.9.1
[07:32:21] linduxed: has joined #ruby

2017-12-12

[20:45:15] linduxed: *.net *.split
[20:46:30] linduxed: has joined #ruby

2017-12-03

[12:01:18] linduxed: Quit: WeeChat 1.9.1
[12:12:15] linduxed: has joined #ruby

2017-12-01

[02:28:55] linduxed: has joined #ruby

2017-11-09

[02:51:45] linduxed: Ping timeout: 248 seconds
[03:07:24] linduxed: has joined #ruby

2017-10-29

[10:07:36] linduxed: has joined #ruby
[13:42:36] linduxed: Quit: WeeChat 1.9.1
[13:44:25] linduxed: has joined #ruby

2017-09-28

[07:23:41] linduxed: Ping timeout: 240 seconds
[07:27:24] linduxed: has joined #ruby

2017-09-16

[04:22:34] linduxed: Ping timeout: 264 seconds
[04:35:40] linduxed: has joined #ruby

2017-09-09

[09:32:53] linduxed: kapil___: that method returns a constant
[09:33:04] linduxed: well actually
[09:33:17] linduxed: first and foremost: you have not included the error that is returned
[09:33:28] linduxed: although i can assume that the error is ArgumentError
[09:33:44] linduxed: because `edit_component` takes no arguments, yet you have provided some
[09:34:38] linduxed: well then what is your problem? what does "not works" mean?
[09:38:15] linduxed: kapil___: if you have a method that where the first line is `def edit_component` then it takes no arguments
[09:38:47] linduxed: it would have to look like `def edit_component(i:, mode:)`
[09:39:01] linduxed: or `def edit_component(opts = {})`
[09:39:08] linduxed: but not `def edit_component`
[09:39:24] linduxed: in that case you will want to do this:
[09:39:47] linduxed: edit_component.new(i: 2, mode: "open")
[09:40:19] linduxed: what does it say?
[09:54:54] linduxed: kapil___: then you have to inspect how the class is defined. check the initialize method of StyleEditComponent
[09:55:42] linduxed: it might also be the case that by "it does not read parameters in it" you mean that some other method that you call on the instance of StyleEditComponent doesn't behave the way you expect
[09:56:03] linduxed: that's could also be the case, in which case you have to look at the class definition as well

2017-09-03

[11:08:18] linduxed: here's a question i can't really figure out for myself
[11:08:44] linduxed: i very much like to have the `initialize` method be populated with nothing but instance variable assignment
[11:09:14] linduxed: that way i can instantiate objects knowing that there will be no side effects or behaviour triggered from the `.new` method
[11:10:34] linduxed: at the same time, if one follows that as a strict rule, then one must expect instance methods can exhibit behaviour that could have been prevented if the `initialize` method did validation
[11:11:11] linduxed: example: let's say that i have a Database class and that the initialize method has one argument: database_path
[11:11:34] linduxed: let's also say that Database only has one instance method: write_text
[11:11:56] linduxed: #write_text takes a string and writes it to the database. the details of how are not important
[11:12:58] linduxed: by deciding on having #initialize only do instance variable setting, suddently the #write_text method needs to care for such things as "is @database_path a valid path?"
[11:13:25] linduxed: "@database_path.nil?"
[11:14:47] linduxed: these are things that one could argue would be helped by having a validation step as a part of #initialize, but then i couldn't instantiate objects as easily
[11:16:41] linduxed: i've been considering keeping #initialize in this rather pure form, but add a .build method to the Database class, essentially having a factory methdo
[11:17:12] linduxed: but I'm unsure whether this is more confusing than beneficial
[11:22:41] linduxed: hmmm, maybe ensuring correctness of what one tries to instantiate could be likened to the syntactic checks that are made (did you supply the right arguments? is this arg a string or a number?)
[11:23:46] linduxed: but then one needs to consider the existence of plenty of classes with the #valid? method
[11:46:32] linduxed: PacificSalmon: raising ArgumentError might indeed be a good idea for some things!
[11:48:39] linduxed: clemens3: true... while optimistic treatment of the database would simplify code, it wouldn't account for potential severe changes
[11:50:24] linduxed: clemens3: i specifically wrote "pure form" to avoid the expression "pure state", which i thought would imply something about side effects. i was just referencing the code structure. on the other hand, using "pure" already has its implications, i guess
[11:52:09] linduxed: matthewd: hmmm, will have to think how it applies to my code
[11:52:17] linduxed: thanks for all of your input!
[11:54:05] linduxed: PacificSalmon: tiny script which has a simple YAML file as a "database". nothing long running, which means that above discussion is purely academical for the purposes of my application
[11:56:40] linduxed: i mostly asked for future reference, since i've been opting to have nothing but instance variable initialization in my #initialize methods for some time now, due to the comfort of always knowing that they can be instantiated without behaviour
[11:56:54] linduxed: oooh, a solnic library!
[11:57:06] linduxed: reminds me of the fact that i should try out the DRY libraries
[11:57:22] linduxed: dry-validataion could be cool for this kind of purpose

2017-08-24

[08:19:24] linduxed: Ping timeout: 246 seconds
[08:50:58] linduxed: has joined #ruby

2017-08-15

[22:18:19] linduxed: Ping timeout: 246 seconds
[22:20:57] linduxed: has joined #ruby

2017-08-11

[23:18:27] linduxed: so there's this language called moonscript which is something like a coffeescript for lua. there's one language feature of it that i've been wondering if one could port over to ruby:
[23:19:10] linduxed: if one writes `:foo, :bar` this gets compiled to `{ foo: foo, bar: bar }`
[23:20:19] linduxed: a very quick way to construct hashes (tables in moonscript/lua) with keys named the same as the variables used as values
[23:20:36] linduxed: i'm thinking one could maybe achieve this with some meta-programming, maybe
[23:21:01] linduxed: of course one would need to choose something else than :foo, considering we've already got that used by symbols
[23:29:06] linduxed: konsolebox: i'd say it's no more than a convenience, but it shortens up certain long hash-literal declarations
[23:42:18] linduxed: konsolebox: not quite the same: the `e.to_s` would need to be replaced with something that does `instance_eval(e)`, i believe
[23:42:34] linduxed: my meta-programming knowledge is a bit rusty...
[23:43:24] linduxed: the result should, if i was to use your example, # => {:a=>a, :b=>b, :c=>c}
[23:46:57] linduxed: nofxxx: hmmm, but would send work for local variables?
[23:47:16] linduxed: i know it works for methods, but i'm not sure one would be able to have it work for local variables
[23:47:27] linduxed: that's why i reached for eval
[23:47:39] linduxed: by no means do i think it's a pretty thing
[23:47:57] linduxed: Radar: this is just a curiosity :-P
[23:48:09] linduxed: Radar: it's a feature i find nice in moonscript
[23:49:36] linduxed: basically, the seventh code example under the "Table literals" section here: http://moonscript.org/reference/#the-language/table-literals
[23:49:59] linduxed: that's waht i was thinking about
[23:52:14] linduxed: hmm, considering the difference in how instance variables are referenced as compared to local variables this wouldn't really be working the same way in ruby
[23:52:56] linduxed: once more, this is just a curiosity that i started thinking about, not something i'm trying to introduce to some codebase

2017-08-09

[08:47:18] linduxed: *.net *.split
[09:32:51] linduxed: has joined #ruby

2017-07-04

[00:54:40] linduxed: Ping timeout: 255 seconds
[07:48:13] linduxed: has joined #ruby

2017-06-27

[05:40:08] linduxed: Ping timeout: 260 seconds
[05:42:33] linduxed: has joined #ruby

2017-06-20

[00:20:04] linduxed: Ping timeout: 240 seconds
[00:40:46] linduxed: has joined #ruby

2017-05-15

[13:10:10] linduxed: hey guys! let's say that i've got some high-res source image that gets run through rmagick, or something like that. over on whatever storage solution one uses, there are now at least two files: "thumb.png" and "full.png"
[13:11:02] linduxed: one way of storing links to these images would be to have a database column that is called "thumbnail_url" and one called "full_image_url"
[13:11:31] linduxed: but if i have like 5 of these, that's a lot of extra database columns
[13:12:13] linduxed: an alternative would be to generate links that have hardcoded suffixes, such as "thumb.png", "full.png" and so on
[13:12:29] linduxed: easier, but i think it's a hacky solution that's error prone
[13:13:51] linduxed: maybe if the suffix was fetched from a list of constants
[13:17:52] linduxed: ljarvis: well, thanks for your input!

2017-03-28

[00:15:22] linduxed: Ping timeout: 264 seconds
[00:22:25] linduxed: has joined #ruby

2016-06-03

[09:35:26] linduxed: has left #ruby: ("WeeChat 1.3")

2016-05-27

[01:26:55] linduxed: has joined #ruby

2016-05-26

[22:07:14] linduxed: Ping timeout: 244 seconds

2016-05-24

[00:21:28] linduxed: has joined #ruby

2016-05-23

[22:53:39] linduxed: *.net *.split

2016-05-11

[21:09:33] linduxed: Ping timeout: 276 seconds
[21:14:18] linduxed: has joined #ruby

2016-04-20

[22:11:12] linduxed: Ping timeout: 260 seconds
[22:14:22] linduxed: has joined #ruby

2016-04-15

[08:59:07] linduxed: let's say that i get a response from a database driver
[08:59:27] linduxed: now i want to turn those rows into some data structure
[08:59:47] linduxed: would you guys call that procedure a "packaging procedure"?
[08:59:55] linduxed: "serialization"?
[09:00:01] linduxed: "transformation procedure"?
[12:35:36] linduxed: norc: i think serialization makes the most sense

2016-04-13

[13:43:45] linduxed: *.net *.split
[13:53:38] linduxed: has joined #ruby

2016-03-24

[15:13:15] linduxed: *.net *.split
[15:29:42] linduxed: has joined #ruby
[21:44:44] linduxed: *.net *.split
[22:00:42] linduxed: has joined #ruby

2016-03-13

[08:38:55] linduxed: Ping timeout: 246 seconds
[08:41:14] linduxed: has joined #ruby

2016-03-01

[15:10:44] linduxed: Ping timeout: 260 seconds
[15:26:21] linduxed: has joined #ruby
[16:04:54] linduxed: Ping timeout: 276 seconds
[16:23:43] linduxed: has joined #ruby

2016-02-28

[10:52:02] linduxed: has joined #ruby
[14:57:37] linduxed: Ping timeout: 244 seconds
[15:26:44] linduxed: has joined #ruby

2016-02-25

[13:47:42] linduxed: Ping timeout: 276 seconds

2016-02-23

[13:27:24] linduxed: Quit: WeeChat 1.3
[13:29:27] linduxed: has joined #ruby

2016-02-17

[09:52:40] linduxed: *.net *.split
[09:56:10] linduxed: has joined #ruby

2016-02-09

[12:25:55] linduxed: Ping timeout: 245 seconds
[12:31:04] linduxed: has joined #ruby
[12:33:19] linduxed: Client Quit
[12:33:58] linduxed: has joined #ruby
[12:49:36] linduxed: Ping timeout: 256 seconds
[13:34:21] linduxed: has joined #ruby

2016-02-01

[05:49:31] linduxed: *.net *.split
[05:58:15] linduxed: has joined #ruby