DeeJayh

Activity Graph

Page 1 of 2 | Next »

2018-02-04

[22:44:41] DeeJayh: has joined #ruby
[22:47:18] DeeJayh: Client Quit

2017-07-29

[03:49:43] DeeJayh: Remote host closed the connection
[03:49:55] DeeJayh: has joined #ruby
[04:02:26] DeeJayh: Read error: Connection reset by peer

2017-07-28

[21:11:45] DeeJayh: has joined #ruby

2017-07-22

[12:00:00] DeeJayh: Read error: Connection reset by peer

2017-07-16

[14:44:13] DeeJayh: has joined #ruby

2017-07-15

[18:57:10] DeeJayh: has joined #ruby
[19:08:49] DeeJayh: Ping timeout: 248 seconds
[19:23:42] DeeJayh: has joined #ruby
[20:02:10] DeeJayh: Ping timeout: 240 seconds

2017-07-11

[19:02:32] DeeJayh: Ping timeout: 268 seconds

2017-07-10

[19:17:17] DeeJayh: has joined #ruby

2017-07-03

[20:00:53] DeeJayh: has joined #ruby
[20:57:20] DeeJayh: Read error: Connection reset by peer

2017-07-02

[18:01:22] DeeJayh: has joined #ruby
[19:19:58] DeeJayh: Read error: Connection reset by peer

2017-06-15

[04:26:57] DeeJayh: Ping timeout: 240 seconds

2017-06-13

[05:09:57] DeeJayh: Ping timeout: 240 seconds
[05:20:57] DeeJayh: has joined #ruby
[05:25:10] DeeJayh: Ping timeout: 240 seconds
[05:37:19] DeeJayh: has joined #ruby
[05:44:21] DeeJayh: Ping timeout: 258 seconds
[08:57:26] DeeJayh: has joined #ruby
[23:08:34] DeeJayh: Remote host closed the connection
[23:08:54] DeeJayh: has joined #ruby

2017-06-11

[19:29:59] DeeJayh: Read error: Connection reset by peer
[19:31:18] DeeJayh: has joined #ruby

2017-06-10

[01:21:33] DeeJayh: Read error: Connection reset by peer
[03:11:18] DeeJayh: has joined #ruby

2017-06-09

[02:24:53] DeeJayh: Read error: Connection reset by peer
[02:45:02] DeeJayh: has joined #ruby
[14:12:42] DeeJayh: Ping timeout: 260 seconds
[14:14:27] DeeJayh: has joined #ruby
[14:19:42] DeeJayh: Ping timeout: 260 seconds
[14:30:39] DeeJayh: has joined #ruby
[14:35:18] DeeJayh: Ping timeout: 260 seconds
[16:47:55] DeeJayh: has joined #ruby
[19:59:28] DeeJayh: Ping timeout: 255 seconds
[21:58:39] DeeJayh: has joined #ruby

2017-06-07

[16:20:49] DeeJayh: has joined #ruby
[20:26:09] DeeJayh: Read error: Connection reset by peer
[20:30:18] DeeJayh: has joined #ruby

2017-06-05

[04:32:19] DeeJayh: Ping timeout: 240 seconds

2017-06-01

[00:24:45] DeeJayh: has joined #ruby
[00:29:23] DeeJayh: Ping timeout: 240 seconds
[21:26:45] DeeJayh: has joined #ruby

2017-05-31

[00:42:40] DeeJayh: has joined #ruby
[00:47:17] DeeJayh: Ping timeout: 246 seconds

2017-05-25

[16:52:14] DeeJayh: has joined #ruby
[16:56:40] DeeJayh: Ping timeout: 246 seconds

2017-05-23

[01:28:35] DeeJayh: Ping timeout: 260 seconds
[02:00:32] DeeJayh: has joined #ruby
[02:24:08] DeeJayh: Ping timeout: 240 seconds
[02:29:18] DeeJayh: has joined #ruby
[02:53:32] DeeJayh: Ping timeout: 260 seconds
[03:35:48] DeeJayh: has joined #ruby
[04:00:07] DeeJayh: Ping timeout: 268 seconds
[04:02:12] DeeJayh: has joined #ruby
[04:26:17] DeeJayh: Ping timeout: 260 seconds
[05:42:57] DeeJayh: has joined #ruby
[06:07:12] DeeJayh: Ping timeout: 260 seconds
[10:02:20] DeeJayh: has joined #ruby
[10:26:47] DeeJayh: Ping timeout: 260 seconds
[10:32:38] DeeJayh: has joined #ruby
[11:16:08] DeeJayh: Ping timeout: 260 seconds
[13:15:22] DeeJayh: has joined #ruby
[21:04:05] DeeJayh: Ping timeout: 240 seconds

2017-05-22

[00:12:02] DeeJayh: has joined #ruby
[00:35:56] DeeJayh: Ping timeout: 246 seconds
[01:01:23] DeeJayh: has joined #ruby
[01:24:57] DeeJayh: Ping timeout: 240 seconds
[02:18:38] DeeJayh: has joined #ruby
[03:09:22] DeeJayh: Ping timeout: 246 seconds
[03:49:46] DeeJayh: has joined #ruby
[11:23:55] DeeJayh: Remote host closed the connection
[11:24:20] DeeJayh: has joined #ruby
[11:48:18] DeeJayh: Ping timeout: 258 seconds
[11:57:36] DeeJayh: has joined #ruby
[12:21:35] DeeJayh: Ping timeout: 240 seconds
[12:30:41] DeeJayh: has joined #ruby
[12:54:42] DeeJayh: Ping timeout: 260 seconds
[13:05:37] DeeJayh: has joined #ruby
[13:29:13] DeeJayh: Ping timeout: 246 seconds
[13:48:29] DeeJayh: has joined #ruby
[14:13:10] DeeJayh: Ping timeout: 268 seconds
[14:19:14] DeeJayh: has joined #ruby
[14:43:58] DeeJayh: Ping timeout: 240 seconds
[14:49:15] DeeJayh: has joined #ruby
[15:13:11] DeeJayh: Ping timeout: 255 seconds
[15:19:24] DeeJayh: has joined #ruby

2017-05-21

[12:08:04] DeeJayh: Ping timeout: 268 seconds
[12:17:30] DeeJayh: has joined #ruby
[12:41:54] DeeJayh: Ping timeout: 272 seconds
[13:59:03] DeeJayh: has joined #ruby
[14:22:48] DeeJayh: Ping timeout: 240 seconds
[14:30:25] DeeJayh: has joined #ruby
[18:21:41] DeeJayh: Ping timeout: 246 seconds
[18:31:45] DeeJayh: has joined #ruby
[18:56:00] DeeJayh: Ping timeout: 260 seconds
[18:59:41] DeeJayh: has joined #ruby
[19:23:37] DeeJayh: Ping timeout: 246 seconds
[19:32:32] DeeJayh: has joined #ruby
[19:56:48] DeeJayh: Ping timeout: 260 seconds
[20:06:45] DeeJayh: has joined #ruby
[20:51:28] DeeJayh: Ping timeout: 246 seconds
[21:06:42] DeeJayh: has joined #ruby
[21:30:40] DeeJayh: Ping timeout: 246 seconds
[22:03:43] DeeJayh: has joined #ruby
[22:27:45] DeeJayh: Ping timeout: 272 seconds

2017-05-20

[00:32:48] DeeJayh: Ping timeout: 240 seconds
[00:41:10] DeeJayh: has joined #ruby
[11:18:27] DeeJayh: Ping timeout: 240 seconds
[11:26:04] DeeJayh: has joined #ruby
[11:49:52] DeeJayh: Ping timeout: 255 seconds
[12:57:00] DeeJayh: has joined #ruby
[13:21:16] DeeJayh: Ping timeout: 260 seconds
[14:48:13] DeeJayh: has joined #ruby
[15:10:56] DeeJayh: Remote host closed the connection
[15:11:21] DeeJayh: has joined #ruby
[15:35:32] DeeJayh: Ping timeout: 246 seconds
[15:50:57] DeeJayh: has joined #ruby
[16:14:45] DeeJayh: Ping timeout: 258 seconds
[16:18:12] DeeJayh: has joined #ruby
[16:42:18] DeeJayh: Ping timeout: 260 seconds
[18:54:31] DeeJayh: has joined #ruby
[19:19:12] DeeJayh: Ping timeout: 260 seconds
[20:16:04] DeeJayh: has joined #ruby
[20:40:06] DeeJayh: Ping timeout: 240 seconds
[21:38:50] DeeJayh: has joined #ruby
[22:02:28] DeeJayh: Ping timeout: 240 seconds
[23:27:31] DeeJayh: has joined #ruby

2017-05-19

[00:01:38] DeeJayh: Ping timeout: 240 seconds
[00:02:26] DeeJayh: has joined #ruby
[23:44:19] DeeJayh: Remote host closed the connection
[23:44:42] DeeJayh: has joined #ruby

2017-05-18

[12:11:24] DeeJayh: Ping timeout: 268 seconds
[12:16:18] DeeJayh: has joined #ruby
[12:39:48] DeeJayh: Ping timeout: 240 seconds
[12:41:19] DeeJayh: has joined #ruby
[13:06:31] DeeJayh: Ping timeout: 246 seconds
[13:07:04] DeeJayh: has joined #ruby
[13:31:16] DeeJayh: Ping timeout: 260 seconds
[13:37:27] DeeJayh: has joined #ruby
[16:36:13] DeeJayh: Remote host closed the connection
[16:36:38] DeeJayh: has joined #ruby
[17:00:25] DeeJayh: Ping timeout: 246 seconds
[17:08:29] DeeJayh: has joined #ruby
[19:17:30] DeeJayh: Remote host closed the connection
[19:17:56] DeeJayh: has joined #ruby
[19:41:46] DeeJayh: Ping timeout: 240 seconds
[19:48:35] DeeJayh: has joined #ruby
[20:12:34] DeeJayh: Ping timeout: 246 seconds
[20:36:09] DeeJayh: has joined #ruby
[21:01:38] DeeJayh: Ping timeout: 240 seconds
[21:06:38] DeeJayh: has joined #ruby
[21:28:46] DeeJayh: Remote host closed the connection
[21:29:11] DeeJayh: has joined #ruby
[21:53:08] DeeJayh: Ping timeout: 240 seconds
[21:58:34] DeeJayh: has joined #ruby
[22:22:47] DeeJayh: Ping timeout: 260 seconds
[22:33:32] DeeJayh: has joined #ruby
[22:57:28] DeeJayh: Ping timeout: 260 seconds
[23:02:11] DeeJayh: has joined #ruby
[23:26:03] DeeJayh: Ping timeout: 260 seconds
[23:38:07] DeeJayh: has joined #ruby

2017-05-17

[06:05:51] DeeJayh: has joined #ruby
[06:07:41] DeeJayh: I have a custome method that adds text to a log file, the text is PRINTed in sections, and there's two threads that are using the method. What would be a good way to queue up each addLog() so that only one is ever handled at a time, thus guaranteeing newlines and keeping the log from becoming a jumbled, unreadable mess.
[06:11:56] DeeJayh: I've been thinking of Queue, but the only examples I see are used to pop information between threads... I just want to do them one at a time to prevent issues.
[06:41:55] DeeJayh: https://gist.github.com/Ruined1/ccea3669dde66ae6f2f48462ad58ba8b
[06:43:32] DeeJayh: so you can see where you would want it to output Stuff1Thing1\nStuff2Thing2\n infinitely, but instead it gets jumbled because both threads are writing simultaneously and this causes one to happen in the middle of another before the newline
[07:29:16] DeeJayh: Nevermind, figured it out. I setup a thread to pop the queue constantly and redirected the log calls to add the value to the queue.
[07:38:31] DeeJayh: because it's a server, hosting multiple different services that I want running in sync, and they all print to the same console
[07:40:30] DeeJayh: run the code, and notice that the log gets crossfed
[07:40:55] DeeJayh: meaning that sometimes before procA finishes writing it's second half of the log, procB starts writing it's first half
[07:41:04] DeeJayh: jumbling up the log
[07:41:53] DeeJayh: Not a clue
[07:42:09] DeeJayh: the problem isn't necessarily the calls
[07:42:13] DeeJayh: it's the way my logger works
[07:42:18] DeeJayh: it prints the time
[07:42:27] DeeJayh: then prints the event type
[07:42:31] DeeJayh: then prints the game type
[07:42:37] DeeJayh: then PUTS the message
[07:42:53] DeeJayh: I have to do it that way because of something specific to my case
[07:43:02] DeeJayh: and in-between those prints, other prints can be made
[07:43:07] DeeJayh: from the other proc
[07:44:20] DeeJayh: now, instead, they queue the information they wants to write to the log all at once, then one queue item at a time is processed.
[07:44:24] DeeJayh: problem solved
[07:50:01] DeeJayh: ljarvis, but then I am writing the same code twice...
[07:50:35] DeeJayh: one moment, I'll share some code with you, all should become clear
[07:57:00] DeeJayh: see how each line of the log is pieced together, and even colored differently, based on the options given each time addLog is called?
[07:57:57] DeeJayh: I don't know how to do that with color-console while keeping the seperate colors where I want them. That's why it was so convoluted
[07:58:14] DeeJayh: Basically I hacked my way around the problem, rather than addressing it directly
[07:59:54] DeeJayh: It still does, very effectively, what I want it to do, which is to be able to color output regardless of the OS/cli
[08:05:02] DeeJayh: ljarvis, I'm pretty stuck on using tabs, sorry, it's engrained in my mind... believe it or not however, 90% of my code in snake_case, that method was one that got away from a late night of coding
[08:05:36] DeeJayh: I always appreciate the tips though
[08:06:49] DeeJayh: HOW DOES EVERYONE ALWAYS KNOW?
[08:10:16] DeeJayh: Worst part is, btw, that I used headlessCamelCase
[08:10:25] DeeJayh: Apparently that makes some people cringe
[08:10:40] DeeJayh: (when I do slip up and use it once in a blue moon)
[08:12:31] DeeJayh: CamelCase is CamelCase, thisIsHeadlessCamelCase
[08:12:54] DeeJayh: where the first word isn't capitalized (headless)
[08:27:59] DeeJayh: guardianJ, rather, I should say, that's my understanding, I didn't confirm that, but I've always understood it that way

2017-05-16

[09:22:20] DeeJayh: I'd expect it to end
[09:22:22] DeeJayh: but it doesnt
[09:22:35] DeeJayh: it just keeps looping inside roulette
[09:24:03] DeeJayh: I've updated it as shown in the gist
[09:24:08] DeeJayh: if you refresh the page
[09:24:24] DeeJayh: and it just does betting1roll1betting1roll1 infinitely
[09:25:44] DeeJayh: that's the problem the rest of the main thread is never called! it gets stuck on roulette infinitely, Thread.new { crash.betting } never gets called, the main thread never exits
[09:26:06] DeeJayh: version is irrelevent, I tried ruby 2.3.3, jruby (mine uses 2.3.1) both on windows
[09:26:21] DeeJayh: see, what you're saying it should do, is what I EXPECT it to do
[09:26:25] DeeJayh: but it isnt...
[09:26:50] DeeJayh: repl.it does the same thing
[09:26:56] DeeJayh: https://repl.it/languages/ruby
[09:27:18] DeeJayh: it uses 2.3.1p112
[09:29:18] DeeJayh: I'm seeing this now with my new test
[09:29:24] DeeJayh: that's how it's supposed to work right?
[09:29:40] DeeJayh: Threads are non-blocking
[09:30:44] DeeJayh: one thing is, it seems like the roulette thread eventually dies on it's own on REPL
[09:31:07] DeeJayh: https://gist.github.com/Ruined1/6fea662e1bdadf5410569ad91c4446f9
[09:31:34] DeeJayh: if you run that in repl.it, the roll1betting1 will eventually die out and it will just print TEST every 5 seconds
[09:31:54] DeeJayh: also, why does it never print the crash? there's never any roll2 or betting 2
[09:34:20] DeeJayh: I'm afraid I don't understand how to implement that, let me search google
[09:35:22] DeeJayh: stack level too deep
[09:36:41] DeeJayh: ok so you cannot use method calls to create an infinite thread is what that's telling me
[09:37:04] DeeJayh: cant call b from a then a from b etc etc
[09:38:33] DeeJayh: what about Thread.new { loop { roulette.betting } }
[09:39:18] DeeJayh: can I JUST call betting, then have betting call roll, then when there's no instructions left in roll the thread will just die on it's own?
[09:39:32] DeeJayh: or rather start over, because of the loop?
[09:39:55] DeeJayh: well I guess there's one way to find out lol
[09:39:59] DeeJayh: thank you for the assistance
[09:40:15] DeeJayh: going to play around with it, I'll come back if I'm too dense to comprehend it
[09:40:21] DeeJayh: ljarvis, thank you very much
[09:44:03] DeeJayh: Yup, nailed it, my journey continues!
[09:54:54] DeeJayh: does anyone know why jruby refuses to take a range for a random number?
[09:55:25] DeeJayh: In regular ruby I can do SecureRandom.random_number(50..100)In regular ruby I can do SecureRandom.random_number(50..100)
[09:55:48] DeeJayh: but in JRuby it throws an error stating I'm using a Range for a fixnum
[09:58:28] DeeJayh: jruby uses 2.3.1 if I'm not mistaken, repl.it, too, uses 2.3.1 and it works fine.
[09:58:40] DeeJayh: Probably a bug
[09:58:57] DeeJayh: any alternative tricky way beat it for now?
[09:59:01] DeeJayh: I'm stumped :(
[10:00:32] DeeJayh: I should probably also open an issue there then while I'm at it
[10:00:38] DeeJayh: About the bug
[10:03:43] DeeJayh: yup I just compared it against the stdlib/securerandom copy included in my current version of ruby and I see exactly what is missing. I'll fork it, fix it, and submit a pull request
[10:51:02] DeeJayh: Ping timeout: 246 seconds