arne

Activity Graph

Page 1 of 3 | Next »

2018-07-11

[08:15:36] arne: has joined #ruby

2018-07-10

[09:04:49] arne: has joined #ruby
[09:05:20] arne: can anyone lead me into a good direction for generating captchas?
[09:14:42] arne: like.. labels << [item[:count]]
[09:14:51] arne: labels << item[:count]*
[09:16:56] arne: but your code is odd, does item look like this? {0=>something1,:value=>something2,:count=>something3}
[09:17:16] arne: well, item is an array i guess
[09:17:26] arne: how does "item" look
[09:17:57] arne: is it [{:count=>3},{:value=>2}]
[09:18:12] arne: well print it in line 4
[09:18:42] arne: pls show us "datapoints" otherwise it's hard to help you
[09:20:32] arne: it doesn't help really
[09:20:35] arne: just print datapoints
[09:22:23] arne: so, what info you want to extract from that?
[09:22:26] arne: only "data"?
[09:23:02] arne: i guess that's what get_value does?
[09:24:59] arne: ... well
[09:25:07] arne: labels << count
[09:25:09] arne: maybe :D ?
[09:25:39] arne: since count is a local variable there, and it gets incremented a line blow
[09:26:29] arne: it's fine, that code is super confusing, and the json object aswell
[09:27:27] arne: im sure it will work out fine
[09:33:04] arne: is there maybe something like a "captchaPrint"
[09:33:13] arne: like, i give a function an input
[09:33:24] arne: "a94jn" and it amkes a captcha out of it? :D
[09:37:01] arne: that's great
[09:37:35] arne: well i just googled gems, and they all did weird stuff
[09:37:41] arne: this one looks like what i want
[09:38:04] arne: i guess i was missing the generator part :)
[09:50:07] arne: why are we living in a world with bots
[09:50:09] arne: so annoying
[09:51:34] arne: well, are u behind a tor node? because that never happens to me
[09:54:03] arne: BACK TO TOPIC

2018-06-27

[09:30:21] arne: has joined #ruby

2018-06-26

[08:53:18] arne: 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:24:02] arne: but i like namespaces
[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:26:20] arne: well, what is a build tool in terms of ruby?
[09:27:51] arne: well, i use docker, idc
[09:28:24] arne: well, gems don't collide, as long as you don't use these 2 in ONE project
[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:32:34] arne: so your suggestion is not to use namespaces?
[09:33:09] arne: well, that also sucks, i did that in my biggest project
[09:33:10] arne: and i hate it
[09:34:10] arne: yah, naming things is fun
[09:34:24] arne: well, luckily in this project im doing it either way
[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:42:51] arne: dminuoso: you really do rails :o?
[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:44:21] arne: i know, but if you're a normal person you would use them together
[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:14] arne: is there http2 for ruby yet?
[09:45:58] arne: i don't wanna learn elixir
[09:46:58] arne: i wished there was something good :(
[09:47:05] arne: but nothing makes me happy
[09:48:10] arne: that gives ma terrible earwig
[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
[10:02:30] arne: well, but if you fuckup in design, you won't be able to hack things in as easily
[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: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: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: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:37] arne: and ecosystem isn't as devfeloped as rubygems for example, that would slow me down af also
[10:07:07] arne: dminuoso: well, if i want to do something, ther eis always something
[10:07:13] arne: want to patch elf files? ruby has you covered
[10:07:18] arne: want to write pdf? ruby has you covered
[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.
[11:13:03] arne: is there some geo-type to use for ruby?
[11:38:32] arne: i agree, but still, it sounds like hell before you'd be able to do that
[11:39:07] arne: RougeR: like on what side of the table?
[11:39:30] arne: RougeR: uhhh good luck
[11:39:43] arne: dminuoso: everything seems simple when you grasped it
[11:40:27] arne: transactions are a lot of things
[11:40:33] arne: but intuitive?
[11:52:04] arne: i agree, i know all that, still learning that is crazy, find masochist employees who do that impossible
[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:21] arne: dminuoso: i wish i could, but all i know about them, i learned from you
[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:56:02] arne: there does not seem to be one

2018-06-21

[08:48:48] arne: some general software design question
[08:49:21] arne: i want a specific format for a ssl key, and i use it often
[08:49:47] arne: ssl_key.to_s.lines[1..-1].map(&:strip).join
[08:49:55] arne: now ih ave that code, where do i put it?
[08:50:14] arne: utility class? do i monkeypatch PKey::RSA? do i put it in a proc?
[08:53:17] arne: do i rewrite it in every class i program?
[09:00:35] arne: so it's a clojure monkeypatch?
[09:10:01] arne: is there a short version for class.method?
[09:10:18] arne: (calling a method of the class, inside of an instance of said class)
[09:10:22] arne: just wondering
[09:11:42] arne: would that be cool?
[09:11:43] arne: guess not
[09:13:00] arne: for what its worth OOP is the wrong abstraction
[09:13:58] arne: whats wrong about namespaced functions tho
[09:15:40] arne: well, whats the difference between standalone functions & not
[09:45:07] arne: Ping timeout: 256 seconds
[09:58:07] arne: has joined #ruby
[10:12:19] arne: Ping timeout: 256 seconds
[10:23:05] arne: has joined #ruby
[10:33:22] arne: dminuoso: sorry, our primary internet line died
[11:43:27] arne: Ping timeout: 240 seconds
[11:45:28] arne: has joined #ruby
[14:02:11] arne: Ping timeout: 256 seconds
[15:08:48] arne: has joined #ruby

2018-06-20

[09:52:44] arne: how do i get the name of the module i am in
[09:55:30] arne: will i get problems if i overload .name of a module/class
[09:56:35] arne: haha that is odd
[12:57:51] arne: how would one cut a 16 byte string into 4 4 pieces?
[12:58:02] arne: i can't come up with something better than each_cons and join
[12:59:15] arne: oh and thats even wrong
[12:59:37] arne: im stupid, nvm
[13:02:55] arne: "Cr24\x02\x00\x00\x00&\x01\x00\x00\x00\x01\x00\x00"
[13:03:06] arne: s[0...16].each_char.each_slice(4).to_a.map(&:join)[3].unpack("V")
[13:03:11] arne: this what i was searching
[13:04:51] arne: dminuoso: yes
[13:04:56] arne: dminuoso: because i am stupid
[13:05:01] arne: forgot unpack works block-wise, too
[13:07:11] arne: why doesnt every language has something like (un)pack
[13:07:21] arne: as an internal feature, jesus
[13:07:51] arne: who wants to a[0] == x && a[1] == y...
[14:36:18] arne: i need a name for a ruby project, the software should DO EVERYTHING a developer does besides writing lines of codes
[14:36:32] arne: so it's a eierlegende wollmilchsau, how would i name ith
[14:36:49] arne: well make it less german
[14:36:58] arne: i mean the name can be funny
[14:37:00] arne: like, rails.
[14:38:09] arne: no for real
[14:38:15] arne: and it has to be short
[14:38:20] arne: one guess i had was "shed" as in toolshed
[14:38:33] arne: and that i thought it would be funny if it was named "chad"
[14:38:40] arne: like it's your mate, doing your work with you
[14:39:20] arne: no, anyone? :(
[14:40:24] arne: well, yeh it can
[14:41:23] arne: im open for ideas, pliz help
[19:23:12] arne: havenwood: i will show you

2018-06-19

[13:47:22] arne: has joined #ruby
[13:48:35] arne: anyone got an idea how i would create a relatively short hash out of a 2 numbers and a domain?
[13:48:46] arne: that does not collide easily
[13:54:09] arne: not crypto
[13:54:19] arne: length of bits, it has to be a dns entry
[13:54:27] arne: meaning encoded in hex or whatever
[13:55:55] arne: users can add domains in my software, and they get dns entries that they need to insert
[13:56:07] arne: and i want circumvent, that another user.. just adds the same domain to his account
[13:56:24] arne: and it's added as valid domain (because the required key is already set)
[13:57:38] arne: dminuoso: well, i can do both steps in one: add the domain & check if the user is the owner of the domain
[13:58:03] arne: kinda like the google site authentication
[13:58:24] arne: canton7: yeah, but that might even be possible.
[13:58:43] arne: well, i don't care if someone can recreate that hash
[13:58:55] arne: i care if someone creates AND sets that domain key with the hash as a name
[13:59:20] arne: and that would only be possible, when he/she owns the domain
[13:59:28] arne: dminuoso: i mind :D don't want to be judged
[14:00:39] arne: yeah i remember slighty, but i haven't implemented it, since then
[14:00:59] arne: basicially, you can add your domain to my software, and you will receive emails from that (sub)domain
[14:01:39] arne: that requires me to add DKIM keys, example: #{selector}._domainkey.domain.de IN TXT p=#{public_rsa_key}
[14:02:02] arne: and when someone adds a domain, i can tell the user "add this domainkey"
[14:02:22] arne: the domainkey will serve as: a) a domainkey b) verficiation that the user is the owner of the domain
[14:02:44] arne: so if i make selector a hash that has [user_id,domain] i get both
[14:03:37] arne: user might get emails from his own domain, it's SAAS-like
[14:04:27] arne: i guess, bug trackers do it that way?
[14:06:06] arne: i guess i could do this
[14:06:09] arne: Hashids.encode([471,*"beispiel.de".each_byte.to_a])
[14:06:24] arne: resulting in "rvwigGSb1u8wc05TXYi1YCyVsaRsV3cLESVR", which would be a pretty ugly subdomain
[14:07:16] arne: sure, user has to set spf, too
[14:07:21] arne: but i can't use that for authentication
[14:07:43] arne: uhm... well the spf value is pretty fixed
[14:07:52] arne: it has to be a list of ips/hosts that is allowed to send mails for that domain
[14:08:18] arne: i can't put the information in there which user added that domain
[14:08:28] arne: so if you add your superawesomedomain.de to my software
[14:08:48] arne: you might add the right spf key, which i use for authentication. Then another malicious user comes.. add superawesomedomain.de
[14:08:58] arne: and it's valid
[14:09:49] arne: right now i have no authorization, and i start to get big companies as customers
[14:10:19] arne: and if someone else comes, and adds quelle.de to my software, he might be able to send emails for that domain
[14:10:31] arne: dminuoso: you can have multiple (named) dkim keys per domain
[14:10:46] arne: so i can define name and value of the domainkey
[14:11:42] arne: if the second malicous user comes, he can add the domain.. but he will never be able to add #{hash}._domainkey.quelle.de
[14:12:21] arne: so hash has to be short enough for subdomain, and only contain chars allowed in subdomains
[14:13:47] arne: so, as an input for my hash-function i would have [user_id,domain_id(in case of deletion & reinsert),domain(as string)]
[14:15:36] arne: no, that is not silly but minimal less secure than a hash
[14:16:42] arne: catphish could be namespacing, do you have 2 classes named User?
[14:17:18] arne: well, why would you do that
[14:17:51] arne: well, i am sorry
[14:18:14] arne: that sounds awful
[14:18:16] arne: fuck rails
[14:20:10] arne: well there might be code that does something like
[14:20:17] arne: something = Model::SomeClass
[14:20:34] arne: i guess that would not dereference that class, no matter how many times u overload Model::SomeClass
[14:22:51] arne: are those in the same namespace?
[14:24:03] arne: is there a possibility that those worked their way down in the namespace?
[14:25:36] arne: lul rails
[14:36:10] arne: dminuoso: thanks for the timestamp approach, i guess that would be enough
[14:37:28] arne: putting a sleep in there for security :>
[14:37:46] arne: dminuoso: when 2 people add quelle.de at the same time :D
[14:37:57] arne: "same time"
[14:38:31] arne: BUT COLLISIONS, jk
[14:39:21] arne: you don't want to know what makes that impossible for me
[14:39:30] arne: please sit down and i tell you
[14:39:48] arne: i have a one-database-per-user sharding-model
[14:40:07] arne: long story short, not a good idea
[14:40:28] arne: well, would be more work, i guess
[14:40:53] arne: and very bug-prone
[14:41:29] arne: having transactions on 2 datbases.. one fails.. the other one commits, yaddayadda
[14:42:15] arne: i don't know any of these words
[14:42:50] arne: bundesrechtsanwaltskammer?
[14:42:56] arne: thatgermanword.jpg
[14:43:24] arne: well, no that would be no business for me
[14:43:32] arne: law, ewww
[14:43:52] arne: that one-database-per-user thing was not a requirement, that was my own shitty idea

2018-06-11

[08:52:01] arne: uhm, when i do something like
[08:52:21] arne: class Test;some_method;def some_method;"hello";end;end
[08:52:32] arne: it works, why is that exactly, does ruby honor definitions first?
[08:54:33] arne: asm>> class Test;some_method;def some_method;"hello";end;end

2018-06-08

[09:30:38] arne: working on a dead project as of now, but i still get paid so what
[09:35:55] arne: dminuoso: yeah something like that, sounds good
[09:40:58] arne: something like that works :o?
[09:41:03] arne: exists*?
[09:41:27] arne: uhh and that thing blocks when it's full?
[09:42:02] arne: i wonder about that one too
[11:32:32] arne: wow, you're still going