ar1a

Activity Graph

Page 1 of 2 | Next »

2017-08-27

[13:27:12] ar1a: Quit: WeeChat 1.9

2017-08-02

[00:55:21] ar1a: has joined #ruby
[00:55:22] ar1a: does ruby have unsigned types? lol
[03:55:16] ar1a: Quit: Idle timeout reached: 10800s
[03:57:29] ar1a: hey, im sort of looking for something like js callbacks or whatever, maybe promises? i checked out concurrent-ruby promises but they were quite confusing, and i couldnt find many articles about them. I'm porting some js libraries over :)
[03:57:29] ar1a: has joined #ruby
[03:59:47] ar1a: well, https://github.com/matrix-org/matrix-appservice-node/blob/master/lib/app-service.js#L63 is what im writing out
[04:00:08] ar1a: mostly https://github.com/matrix-org/matrix-appservice-node/blob/master/lib/app-service.js#L67-L74
[04:02:52] ar1a: I'm trying to port it over and looking for the equivelant of the js callback stuff
[04:03:15] ar1a: i really dont know how else to ask
[04:06:33] ar1a: arahael: yeah but with the error passing and whatnot
[04:07:59] ar1a: because i hate writing node.js, and i want to write my bridges in ruby
[04:09:13] ar1a: not sure whats wrong with rewriting it
[04:10:30] ar1a: well are there any writeups or whatever on that?
[04:12:49] ar1a: seems like a performance hit
[04:14:50] ar1a: only like 200
[04:14:55] ar1a: ive already implemented the other class
[04:17:28] ar1a: https://github.com/matrix-org/matrix-appservice-node/blob/master/lib/app-service.js#L58-L76 stuck on how i would implement this promise-type thing
[04:20:09] ar1a: Well, I could always do it another way
[04:20:20] ar1a: i just dont know what there is :p
[04:20:53] ar1a: actually judging by https://github.com/matrix-org/matrix-appservice-node, i would have to
[04:21:11] ar1a: not sure i can set instance functions to other things
[04:24:35] ar1a: i think they are
[04:25:09] ar1a: oh actually, https://github.com/matrix-org/matrix-js-sdk id have to write this out too
[04:25:11] ar1a: this is gonna be a big project :p
[07:26:20] ar1a: Quit: Idle timeout reached: 10800s

2017-07-31

[03:29:43] ar1a: whatre you stuck on
[03:29:43] ar1a: has joined #ruby
[06:46:19] ar1a: Quit: Idle timeout reached: 10800s

2017-07-30

[00:36:10] ar1a: Ping timeout: 240 seconds
[00:38:49] ar1a: has joined #ruby
[00:38:49] ar1a: has joined #RubyOnRails
[05:05:32] ar1a: Ping timeout: 260 seconds
[05:07:11] ar1a: has joined #ruby
[05:07:11] ar1a: has joined #RubyOnRails
[17:18:06] ar1a: Quit: ZNC 1.6.5 - http://znc.in

2017-07-29

[09:50:21] ar1a: Ping timeout: 268 seconds
[09:52:19] ar1a: has joined #ruby
[09:52:19] ar1a: has joined #RubyOnRails

2017-07-28

[06:42:58] ar1a: Ping timeout: 268 seconds
[06:46:28] ar1a: has joined #RubyOnRails
[06:46:29] ar1a: has joined #ruby
[12:03:19] ar1a: Ping timeout: 240 seconds
[12:04:00] ar1a: has joined #ruby
[12:04:00] ar1a: has joined #RubyOnRails
[15:30:57] ar1a: Ping timeout: 240 seconds
[15:32:52] ar1a: has joined #ruby
[15:32:52] ar1a: has joined #RubyOnRails

2017-07-27

[14:51:05] ar1a: Ping timeout: 240 seconds
[22:25:13] ar1a: has joined #ruby
[22:25:13] ar1a: has joined #RubyOnRails

2017-07-26

[16:37:25] ar1a: Ping timeout: 255 seconds
[16:38:52] ar1a: has joined #ruby
[16:38:52] ar1a: has joined #RubyOnRails
[19:25:21] ar1a: Ping timeout: 248 seconds
[19:29:10] ar1a: has joined #ruby
[19:29:10] ar1a: has joined #RubyOnRails

2017-07-25

[01:11:16] ar1a: has joined #ruby
[01:11:16] ar1a: has joined #RubyOnRails
[04:14:16] ar1a: Ping timeout: 260 seconds
[11:56:18] ar1a: has joined #ruby
[11:56:18] ar1a: has joined #RubyOnRails

2017-07-24

[01:16:24] ar1a: Ping timeout: 240 seconds
[01:20:05] ar1a: has joined #ruby
[01:20:05] ar1a: has joined #RubyOnRails
[04:31:24] ar1a: Ping timeout: 260 seconds
[04:32:27] ar1a: has joined #ruby
[04:32:27] ar1a: has joined #RubyOnRails
[15:36:51] ar1a: hey, i want to sandbox some code, make it safe
[15:36:55] ar1a: no system, file read/write etc
[15:36:58] ar1a: untrusted user code
[15:37:02] ar1a: is there a good gem to d othat ?
[15:37:25] ar1a: i checked out 'secure' but it used $SAFE and that errors. i also tried jruby_sandbox, but that gave me a nullpointerexception when i tried to run the demo
[15:40:59] ar1a: and SafeRuby doesn't share instances across evals, which i need to keep the variables around
[15:57:08] ar1a: irc bot, evals user code
[16:08:09] ar1a: i figured why jruby_sandbox was erroring
[16:08:14] ar1a: i was using the wrong version of jruby
[16:08:20] ar1a: im using the right version of jruby now but its not working
[16:08:23] ar1a: lol kill me
[17:37:31] ar1a: you mean like @variables?
[17:37:33] ar1a: if so, yes
[18:11:53] ar1a: Ping timeout: 240 seconds

2017-07-23

[14:09:27] ar1a: Ping timeout: 240 seconds
[16:52:09] ar1a: has joined #ruby
[16:52:09] ar1a: has joined #RubyOnRails
[23:35:27] ar1a: Ping timeout: 240 seconds
[23:36:56] ar1a: has joined #ruby
[23:36:56] ar1a: has joined #RubyOnRails

2017-07-22

[09:00:24] ar1a: Ping timeout: 260 seconds
[09:01:09] ar1a: has joined #ruby
[09:01:09] ar1a: has joined #RubyOnRails

2017-07-21

[15:34:08] ar1a: Ping timeout: 260 seconds
[23:07:08] ar1a: Ping timeout: 268 seconds
[23:08:02] ar1a: has joined #ruby
[23:08:02] ar1a: has joined #RubyOnRails

2017-07-20

[14:14:37] ar1a: has joined #ruby
[14:14:37] ar1a: has joined #RubyOnRails
[20:14:19] ar1a: Ping timeout: 255 seconds
[20:15:30] ar1a: has joined #ruby
[20:15:30] ar1a: has joined #RubyOnRails

2017-07-19

[13:25:38] ar1a: Ping timeout: 255 seconds

2017-07-18

[15:15:13] ar1a: Ping timeout: 248 seconds
[15:19:46] ar1a: has joined #ruby
[15:19:46] ar1a: has joined #RubyOnRails

2017-07-17

[13:01:35] ar1a: salutations
[13:19:01] ar1a: whats method currying? :o
[13:21:08] ar1a: care to expand??
[15:14:21] ar1a: whats the diff between sqlite and mysql apart from the fact sqlite uses a file
[15:34:36] ar1a: centrx: what do you mean
[15:34:38] ar1a: why is it only single user?
[16:07:46] ar1a: i can't seem to get my controller to change its layouts
[16:08:00] ar1a: class Admin::ApplicationController < ActionController::Base
[16:08:01] ar1a: layout 'admin/application'
[16:08:08] ar1a: and then
[16:08:10] ar1a: class Admin::PostsController < Admin::ApplicationController
[16:08:23] ar1a: but its still using the default application.html.erb
[16:08:32] ar1a: ya gist for more than 3 lines ;p
[16:08:36] ar1a: those are 2
[16:09:06] ar1a: alrighty fine hold on
[16:09:36] ar1a: http://paste.debian.net/976924/
[16:10:58] ar1a: no error
[16:12:10] ar1a: i dont get it
[16:14:43] ar1a: i restarted the server too, no dice
[16:15:18] ar1a: i just added the layout line into the index method and it threw an error saying layout doesnt exist
[16:15:23] ar1a: maybe it changed in rails 5, this guide is a bit outdated
[16:15:25] ar1a: time to check docs
[16:17:31] ar1a: no thats very strange, the thing is right (although it shouldnt be in the function, but the class)
[16:18:26] ar1a: hmm, want a local copy?
[16:19:20] ar1a: the def index
[16:19:22] ar1a: as a test
[16:20:06] ar1a: lemme just chuck this on github or whatever
[16:21:59] ar1a: ok then they left lol :p
[16:41:55] ar1a: yahooplex: hi
[16:43:31] ar1a: is mysql2 a proper thing? try mysql:// instead
[16:44:36] ar1a: welllllllllll we need more info
[16:44:37] ar1a: post the code
[16:45:32] ar1a: is mysql installed
[16:45:49] ar1a: we still need to see the code
[16:45:53] ar1a: sounds like i fixed it :v
[16:48:30] ar1a: idk then
[16:48:32] ar1a: im goin to bed
[21:24:30] ar1a: Ping timeout: 240 seconds
[21:27:28] ar1a: has joined #ruby
[21:27:28] ar1a: has joined #RubyOnRails
[23:49:40] ar1a: Ping timeout: 260 seconds
[23:50:16] ar1a: has joined #ruby
[23:50:16] ar1a: has joined #RubyOnRails

2017-07-15

[15:48:56] ar1a: has joined #ruby
[19:39:38] ar1a: has joined #RubyOnRails
[19:39:57] ar1a: hmm, i need some projects to do to familiarize myself with rails a bit more, try and improve my confidence. any ideas friends?
[19:53:25] ar1a: sometime previously im sure
[19:53:32] ar1a: i think i skimmed hartls tutorial
[19:53:34] ar1a: which one was it again
[19:56:41] ar1a: i've made a few things, mostly following tutorials
[19:56:55] ar1a: i was just looking for ideas of apps to create
[19:57:05] ar1a: instead of following along with crappy youtube things
[19:58:22] ar1a: sounds interesting, what's it do?
[20:24:25] ar1a: hm, how strange
[20:24:34] ar1a: im using postgresql, and the postgres db
[20:24:42] ar1a: i set the username in database.yml but it seems to ignore it
[20:25:41] ar1a: chucked it in default and it worked

2017-07-14

[13:42:57] ar1a: Ping timeout: 240 seconds

2017-07-13

[13:36:54] ar1a: has joined #RubyOnRails
[14:25:54] ar1a: has left #RubyOnRails: ("WeeChat 1.9")

2017-07-12

[06:00:40] ar1a: Ping timeout: 246 seconds
[06:28:55] ar1a: has joined #ruby

2017-07-10

[10:47:28] ar1a: is there a way to get irb to re-include a file?
[10:47:41] ar1a: I want to make changes to my module and run it again, but i need to restart irb every time and require the file
[10:47:44] ar1a: it's gettin annoying
[10:50:58] ar1a: wait why do i need both?
[10:51:32] ar1a: -r is working fine, thanks
[10:51:37] ar1a: i feel silly for not checking man

2017-07-07

[12:25:05] ar1a: hi! im trying to use this lib (https://github.com/chrokh/normalizr). I'm following the example and try to make a schema, but ruby throws an error saying "uninitialized constnat mymodulehere::Schema (NameError)", so i tried using Normalizr::Schema but that failed too. I'll paste my code in a second
[12:25:33] ar1a: https://gist.github.com/Snorflake/da4996fe84ba4d289f29aa1be8103b8c
[12:29:57] ar1a: http://www.rubydoc.info/gems/normalizr.rb/Normalizr/Schema doc page
[12:45:10] ar1a: irb(main):010:0> Normalizr.constants
[12:45:13] ar1a: => [:VERSION, :RSpec, :Configuration, :MissingNormalizer, :Concern, :OptionsParser]
[12:45:15] ar1a: strange, the classes arent there
[12:47:28] ar1a: oh the lib has problems
[12:47:36] ar1a: cant require it
[12:47:40] ar1a: because it has a .rb
[12:48:34] ar1a: https://gist.github.com/67d1ae51f56f32ecd6ebc29d885e1d94
[12:48:38] ar1a: and no gemspec
[13:13:08] ar1a: i fixed that issue
[13:13:13] ar1a: now i just have to try and get it to work with my data

2017-07-04

[07:54:27] ar1a: there's an api that you can GET and it redirects you to an image. how can i chuck that into some ruby code and grab the url it redirects me to?
[07:55:16] ar1a: looking at httprb, that's about it
[07:57:25] ar1a: ah ok. got it
[07:57:29] ar1a: easier than i thought
[08:00:39] ar1a: easy question, in some cases a method on this object does not exist, and if so i want to call a different method
[08:00:47] ar1a: author = cmd.message.author.display_name || cmd.message.author.username
[08:00:52] ar1a: i thought that would be it, but it's not
[08:01:06] ar1a: is there an easier way of doing it other than rescuing the exception?
[08:01:27] ar1a: not my library
[08:18:53] ar1a: https://gist.github.com/Snorflake/04264ec1ec4b8cea592669ec6ef81352 how can I DRY this?
[08:25:34] ar1a: oh wow :) thanks
[08:27:43] ar1a: it works! it seems faster too :)
[08:28:54] ar1a: maybe so, i would think the regex is slower than .include?
[08:29:06] ar1a: appreciate it, im still learning ruby :)
[08:31:19] ar1a: fair enough. it's a chat bot anyways, it doesn't have to be idiomatic :p
[08:35:32] ar1a: oooh true
[08:37:41] ar1a: don't you mean $?
[11:31:13] ar1a: rapha: huh?
[11:31:17] ar1a: also what an OG name
[11:31:32] ar1a: shane hendrixson must hate you :P
[11:34:38] ar1a: Paste >3 lines of text to: https://gist.github.com
[11:36:54] ar1a: https://ruby-doc.org/core-2.3.0/Numeric.html#method-i-divmod
[11:38:01] ar1a: ChilledOut: if you would rather an easier method i found this on google https://codereview.stackexchange.com/questions/7937/roman-numeral-converter
[11:38:05] ar1a: with info
[11:38:20] ar1a: its a 1 not an l
[11:38:27] ar1a: original
[11:38:36] ar1a: pro quake player
[11:38:56] ar1a: https://www.youtube.com/watch?v=ojR_qedzzK8
[11:38:59] ar1a: what a coinkidink :p
[11:39:25] ar1a: my dumb way of saying coincidence
[11:39:32] ar1a: well in 95 he was 6
[11:41:02] ar1a: im not saying anything is wrong with it
[11:41:05] ar1a: i was just commenting
[14:49:46] ar1a: has left #ruby: ("WeeChat 1.9")

2017-07-03

[18:23:01] ar1a: so its like java now?
[18:23:32] ar1a: how is it different to an interpreter in ruby's case
[18:24:52] ar1a: ruby 3.0
[18:24:56] ar1a: haven't they been promising that for years! :p
[18:50:56] ar1a: debian 8 still on ruby 2.1.5
[18:51:39] ar1a: i think, at least
[19:48:07] ar1a: i don't see why not