« first day (706 days earlier)      last day (2549 days later) » 

12:18 AM
everything can be solved by indirection, except for the problem of too much indirection ;)
 
 
5 hours later…
5:16 AM
DAMN IT. Out with former coworkers, by the time I remember AOC on the train home, the leaderboard is full.
 
 
5 hours later…
10:10 AM
Oh, it's the coin change problem.
Wait... it's not, is it.
 
10:54 AM
 
 
1 hour later…
12:10 PM
Good morning, all.
 
Good morning
 
12:38 PM
Is there a shortcut in ruby for the last evaluated value?
 
In irb, yes: _. Otherwise, no.
 
12:55 PM
Okay, thanks
Threw a solution into irb for day 17 and noticed it wanted the length
 
1:06 PM
It'll be fun to see what three lines of code you used to do it. I over-engineered, as usual. Couldn't resist the shiny enumerator.
 
Wow part 2 rolled off my solution for part 1
I wonder if I can one line this
 
1:22 PM
@Cereal Good golly that's pretty.
 
\o/
1 message moved to Trash can
Figure I shouldn't have the one liner as the latest
 
I think I'll give up programming.
 
Anonymous
@WayneConrad And do what?
 
Hm, I've been trying to use #map(&:method) for a couple of days, and ruby keeps telling me map doesn't accept an argument
Oh you know what, I was probably forgetting the ampersand
@WayneConrad D=
 
@HunterStevens Hmm, beats me. Watch the Cartoon Network, I guess.
@Cereal That'd do it.
 
Anonymous
1:29 PM
@WayneConrad Definitely, since Samurai Jack is coming back
 
It is? That'll make SWMBO happy.
 
I hope I'm not the only one that reads that as swimbo
 
Anonymous
What's (swimbo) swmbo?
 
Anonymous
Ha!
 
@Cereal Haha!
 
Anonymous
BTW, IDK if we could get this to work because of the chat's closed API, but here is a chatbot that can be programmed in Ruby:
 
I'm almost 100% positive any bot for this room would need to be written specifically for this room
Some ruby solutions from reddit
 
Anonymous
^Thank you -- post the link instead, as to not spoil :-)
 
Anonymous
mutes cereal because he posted a lot of links
 
Posting a lot of links isn't against the rules ~
 
Anonymous
I am just kidding
 
I know
Chat's auto scrolling me down when I try to scroll up :(
@meagar Can you post your solution?
Todays aoc was almost exactly the same as a project euler problem I couldn't solve a couple years ago
 
2:13 PM
I've been out sick for two days, now I'm 3 days behind on puzzles D:
 
Anonymous
@CuddleBunny Why not do them at home? Wouldn't that be the optimal time, then?
 
Still had to do some work from home for job and for freelance, any other time I was sleeping
I started to do one but then decided a nap would be more productive
 
Anonymous
Welp, I have only done, fully, up to 4. I did Part A of 5 and 6. everything else is empty
 
If I can't catch up there is always holiday break
 
2:55 PM
Day 15 makes me wish I took that stats class...
 
@CuddleBunny I think @WayneConrad did that with math
I brute forced it
 
yeah, I am probably going to brute force it too
 
I didn't use math. I brute-forced it like Cereal, but with a more sophisticated iteration algorithm that applies a little less brute force.
 
Just by looking at the ingredients list I can tell that there must be more of certain ingredients than others though
I'm wondering if I can use a pathfinding algorithm instead
 
There's a link in here from a day or two back that I posted to a reddit message that has the algorithm I used to enumerate the possible combinations of ingredient amounts.
 
3:24 PM
@Cereal My solution is nothing special :|
It's particularly gross, as I was on a train after a night of excessive drinking and remembered AOC at 12:15
Related: I do not feel well :(
eagarm ~/Autodesk/colab (annotations) $ cat test.rb
$inputs = [11, 30, 47, 31, 32, 36, 3, 1, 5, 3, 32, 36, 15, 11, 46, 26, 28, 1, 19, 3]

$num_solutions = 0

$ways = Hash.new(0)

def check(total, i, c)
  return unless $inputs[i] && total < 150
  if total + $inputs[i] == 150
    $num_solutions += 1
    $ways[c + 1] += 1
  end

  check(total + $inputs[i], i + 1, c + 1)
  check(total, i + 1, c)
end

check(0, 0, 0)

p $num_solutions

p $ways[$ways.keys.min]
Don't judge me :|
 
I've been battling this FactoryGirl anomaly since yesterday.
 
@WayneConrad is there a way to step through the compiler? I know you can in Visual Studio/C#
 
Yeah, I know which line of code in FactoryGirl is at the scene of the crime. I just don't know if it's the criminal.
 
I just mean because if you can step through it you'll get a stack trace and the state of all the variables
 
    def ensure_attribute_not_self_referencing!(attribute)
      if attribute.respond_to?(:factory) && attribute.factory == @name
        raise AssociationDefinitionError, "Self-referencing association '#{attribute.name}' in '#{attribute.factory}'"
      end
    end
 
3:44 PM
yay "Too much recursion" =.=
 
Oops. Had errors disabled on the live site
"x created successfully" (jk)
 
KABOOM! Don't try to work around "too much recursion" with setTimeout it makes things die.
 
@CuddleBunny That's horrifying o.o
 
4:06 PM
it ran for about 40 seconds then Firefox was using 8GB of RAM and then crashed...
 
setTimeout adds the function to the stack, so yeah
 
yeah, but it breaks the recursion counter so I thought I'd try it... I guess when it told me there was too much it wasn't kidding.
oh, it might help if my recursive function had an escape clause...
XD
 
4:48 PM
solution, let it run till I run out of recursion and the put highest score it already found in works...
 
@CuddleBunny That's awesome
 
hi anyone used mailboxer please ?
 
Hi @jony, welcome. You'll probably do better to make a good SO question... it's kind of rare for someone to have used a specific specialty gem. Go ahead and ask your question and maybe someone will know. In any case, please feel free to hang out.
 
I want to add a field in my message. Actually I have by default 2 fields: subject and body. I want to add a new field :listing_url but it doesn't work.. if someone have screenhero or skype, I can show my code. my mail is jonscher@hotmail.com
 
Actually since I added the escape clause I no longer run out of recursion, I stopped it after 150k combinations and figured that answer was correct, and it was...
 
Anonymous
5:00 PM
@jony If it is a public repository, link us to it. If it is company-sensitive material, be careful what you share.
 
Mine finishes pretty quick. Probably 1 or 2 seconds
Surprised me
 
Anonymous
It's best to instead provide a link to a gist or pastebin
 
I let it run to completion and it came up with 168290 combinations, if stopping at 10% progress finds the correct solution it's gotta be easier...
mine takes ~12 minutes
let me push it
 
Anonymous
I spent the last four hours with my glasses off... The world looks so clear now!
 
it might just be slow because it is JS...
 
5:07 PM
Holy cow, I think I found my bug (not FactoryGirl's)
FactoryGirl's gorram magic made it look like a FactoryGirl bug.
 
I'm not a fan of magic :(
 
f.association :primary_franchise, factory: dest_franchise is where my bug is. dest)franchise should be a symbol (:dest_franchise). It's a method call, but factory girl is doing some kind of method_missing magic that causes it to respond to the method call, and then do horrible things.
I'm sure this is the kind of thing that makes the statically-typed camp glad they have the compiler watching their backs.
Half a day figuring it out. ;_;
@Cereal I love that emoticon, by the way.
 
Isn't it great? It just sums up all my feelings so well
 
Anyone ever get HTTPI::SSLError: certificate verify failed when connecting to an https?
double checked I have openssl installed but still no bueno
 
Sounds like the ssl cert isn't valid
 
5:23 PM
facts... just tried with that site's production URL instead of dev and that just works fine. Time to go tell someone to go update some thangs
 
5:34 PM
maybe it will be faster if I choose the strongest ingredient first...
 
Moonshine first, then bourbon, then cordials, then wine, etc.
2
 
Anonymous
Are those the actual ingredients in the challenge?
 
yeah, in my list Chocolate is obviously the strongest because it is the only ingredient that is required to exist in higher quantities than the others because of the negatives, so if I compare all the combinations of [28, 24, 24, 24] I get the strongest ingredient, and I'll start building recipes with [0,0,0,0][indexOfStrongestIngredient] = 100 or something.
mine is sprinkles, butterscotch, chocolate, and candy
 
5:49 PM
@HunterStevens If I had written it :)
 
Tonight is the night. I will be up at midnight and clear-headed enough to get on the AoC leaderboard.
(More likely I will forget again and miss it)
 
The leaderboard just shows who's up at midnight.
 
Technically it shows who solved it the fastest
 
@meagar I'm just banking on there being less than 100 people left by the 25th puzzle
 
If you can't solve it before 100 other people, it doesn't matter if you're up at midnight
 
5:52 PM
If you can solve it in a minute but you don't start the challenge until 1am, you're not on the leaderboard.
It doesn't show who finished it the fastest, it shows who got a result earliest.
 
My times have consistently been top-25 material, if I can actually be awake and on the site when the new puzzle goes live :|
@WayneConrad Yeah, it's a little silly
They could just rank everybody based on the time elapsed between first accessing your input file and submitting an answer
 
Anonymous
I think it should be from the time you click to get your input, and how long it takes to get both parts right.
 
Yeah
 
Anonymous
You beat me to it, @meagar
 
It's such a easy and obvious ranking system
@WayneConrad I suppose the real problem is that, after even 30 minutes, people start posting their solutions
So if you rank people based on who is fastest, the leaderboard would be all cheaters who just punched their own input into somebody else's solution
 
5:56 PM
Which is the other problem with the leaderboard. Too many programmers with weak moral fiber.
 
Hah!
 
hmm, still takes 6 minutes =.=
 
I put my question there. If you have an idea :stackoverflow.com/questions/34341329/add-field-to-mailboxer-gem
 
6:13 PM
I hate windows
Won't let me delete my own folder because it wants permission from me
Not only am I me. I'm also an admin!
Lets see how long mine takes.
 
@jony The reason I asked for a stack trace is that I am having trouble imagining how the line of view code you showed can cause your error.
 
3 minutes
 
hmm, if Ruby takes 3 minutes maybe 6 minutes isn't so bad.
oh wait, the optimization that made it 6 minutes is wrong... D:
 
6:29 PM
@WayneConrad I updated my question.. but it's a gem very complicate. To change a small thing you have to change a lot of file..
 
@jony there's not enough there for someone to be able to help. Is the controller line you posted the very top-most line of your code (excluding gems) that was mentioned in the stack trace?
 
the stack trace is that :
NoMethodError - undefined method `listing_id=' for #<Mailboxer::Conversation:0x9377730>:
activemodel (4.2.0) lib/active_model/attribute_methods.rb:433:in `method_missing'
mailboxer (0.13.0) app/builders/mailboxer/base_builder.rb:12:in `block (2 levels) in build'
mailboxer (0.13.0) app/builders/mailboxer/base_builder.rb:11:in `block in build'
mailboxer (0.13.0) app/builders/mailboxer/base_builder.rb:10:in `build'
mailboxer (0.13.0) lib/mailboxer/models/messageable.rb:72:in `send_message'
app/controllers/messages_controller.rb:11:in `create'
 
Part B takes 9.2 minutes... I'll take it =x
 
@jony Well done. I'm afraid I still can't help, but the chances of someone being able to help has improved.
 
ok thank you for your advises ;)
 
Anonymous
7:02 PM
@Cereal I do not understand that either with Windows. I am an admin, under my account, but it acts like semi-root access
 
No one is root by default in Windows since Vista.
 
Anonymous
I mean, I cannot even cp a file somewhere without windows being all WHO ARE YOU????
 
Then you tell it who you are, and it doesn't believe you
 
Anonymous
7:36 PM
I just thought of a much easier way to do part A of the lights challenge. Instead of doing 0/1, just do true/false. THEN when you have "toggle", you just do !some_value
 
Which screws up part B
 
Anonymous
Part B akready requires a whole other program though, so it is fine
 
I don't think I used a different program
lemme look
 
I used the same program for part 1 and 2
 
Which day is that ._.
 
7:42 PM
I lucked out because I mutated all my input from "turn off"/"turn on"/"toggle" to 0/1/2
So all I wound up doing was changing "turn off" to -1, and then I could use the exact same code and "add" the command to each position in the grid
 
Anonymous
I mean, the same file, sure, but pretty much different methods
 
@HunterStevens I used booleans in part A as well
 
Oh, I basically used the same program. Everything relied on the update method.
I just sugared like 9 methods around it
 
Day 14 was the only other time when part B made my previous solution mostly useless.
 
7:51 PM
My day 6 part 1 and day 6 part 2 are essentially identical
 
So short
;_;
 
Anonymous
But remember, meager parsed the data to 0,1,2 then the coordinates.... before he even started his program
 
Yeah
VIM ftw
 
Anonymous
I love vim. :-)
 
the general consensus on Reddit is that those who don't parse their inputs in code solve faster... though I think my method of document.body.firstElement.textContent.split is pretty straightforward every time.
 
Anonymous
8:07 PM
Parsing the raw input will of course add time to execution
 
I meant time to solve
from first seeing the input
 
Anonymous
8:43 PM
WE GOT VIDEO CONFERENCING WORKING WITH ASTERISK! (on the most basic level)
 
Anonymous
8:54 PM
Can I change that to half working? (My end only)
 
... how does one half conference
 
Anonymous
I see myself, but if another person joins. it looks like Bing threw up gray and pink chunks everywhere
 
Its for 'security'. Have to obfuscate your attendees
:P
 
Anonymous
#anonymous is watching
 
Anonymous
9:15 PM
@Jared interresting thing you said, because the distortion may be related to only one side being encrypted (the sipml5 webrtc demo), while my phone was not.
 
Anonymous
I;ve basically been looking at myself (in the corner of my eye) for half an hour.... My eyebrows are uneven ;_;
 
@CuddleBunny But, once you've got document.body.firstElement.textContent.split, you still have to iterate and extract data from each line
 
10:03 PM
@meagar yeah, I'm just banking on being able to write the code that does so in ~30 seconds each time. Which hasn't always been the case. But usually it is just splitting the whole text by newline and then spaces.
 

« first day (706 days earlier)      last day (2549 days later) »