|
whoops
|
# ? Jan 7, 2016 19:03 |
|
|
# ? May 31, 2024 04:15 |
|
nlog isnt logging anything wtf nlog
|
# ? Jan 7, 2016 19:59 |
|
All I know about scala is typesafe activator or whatever
|
# ? Jan 7, 2016 20:01 |
|
triple sulk posted:dont use scala
|
# ? Jan 7, 2016 20:12 |
|
like i don't understand. it's configured to log, but its just not. i enabled exception-throwing and internal logging, and just... nothing. nada. no exceptions, no internal logging. just not doing anything. this isnt even the first time ive used nlog, its always just worked in the past. wtf nlog
|
# ? Jan 7, 2016 20:14 |
|
years later you find a folder full of log files
|
# ? Jan 7, 2016 20:16 |
|
oh it was just not copying the config to the output so it had no config. lol wtf
|
# ? Jan 7, 2016 20:19 |
|
Bloody posted:nlog isnt logging anything u need to add teh fiber module
|
# ? Jan 7, 2016 20:34 |
|
what's the thing where someone tries to solve a problem "a" using method "b" and is fixated on how to achieve b instead of a better method of solving a? it's basically my life right now
|
# ? Jan 7, 2016 20:44 |
|
XY problem
|
# ? Jan 7, 2016 20:57 |
|
TacoHavoc posted:what's the thing where someone tries to solve a problem "a" using method "b" and is fixated on how to achieve b instead of a better method of solving a? product owner syndrome
|
# ? Jan 7, 2016 21:15 |
|
JawnV6 posted:XY problem misandrist
|
# ? Jan 7, 2016 21:19 |
|
I think I need an abstract class. I must have hosed up because I think I need an abstract class. gently caress
|
# ? Jan 7, 2016 21:26 |
|
spoilers: it's an interface
|
# ? Jan 7, 2016 21:28 |
|
interfaces suck because they just declare names, whereas abstract classes let you reuse code!!!
|
# ? Jan 7, 2016 21:29 |
|
two classes that are identical in every way but one method
|
# ? Jan 7, 2016 21:30 |
|
It may be the right tool, but would probably still be better to invert and have your would-be sub classes consume an instance of your would-be abstract class
|
# ? Jan 7, 2016 21:31 |
|
Clockwerk posted:It may be the right tool, but would probably still be better to invert and have your would-be sub classes consume an instance of your would-be abstract class hmm yes agreed. they're already both mostly just wrapping a subclass, might as well push more poo poo down the pipe iykwim
|
# ? Jan 7, 2016 21:32 |
|
Soricidus posted:interfaces suck because they just declare names, whereas abstract classes let you reuse code!!!
|
# ? Jan 7, 2016 21:33 |
|
time for some terrible algorithms problem: ok let's say I have a program with the purpose of sending random numbers to users every minute the numbers can be 1-100, and we don't want an user to receive repeated numbers so a better idea is to shuffle a list [1, 2, ..., 100] for each user and send them, when it ends just cycle the same shuffled list. but here's the catch: you can increase the number of possibilities in the middle of the process, from 1-100 to say 1-123 I don't want to reshuffle everything or risk getting a repeated number... but I also don't want to skewer the numbers by making 101-123 appear at the end of the first shuffle so... the best solution that I could come up with is to establish an upper bound, say we'll never increase beyond 1000, and then shuffle the list from [1, 2, ..., 1000], and then before I send a number I just check if the number is less than the current highest possibility... but this still sounds like a bad solution and that I'm missing something super obvious here I'm not used to shuffling poo poo ok
|
# ? Jan 7, 2016 21:35 |
|
gonadic io posted:If I had I would never have gone to therapy and that + the PhD would have probably literally killed me. So I'm pretty glad I left. i'm not saying phd programs are the healthiest thing to be in, i left with a master's too. really i'm just wondering why someone who's interested in startups would want to work in finance, or why someone who wants to work in finance would ever join a startup
|
# ? Jan 7, 2016 21:38 |
|
Symbolic Butt posted:time for some terrible algorithms problem: is your list a linked list, an array, something else? Maybe shuffle your new subset that you're going to add, then insert them into the list at random intervals? That would be relatively efficient with a linked list, but a pain in the rear end with an array.
|
# ? Jan 7, 2016 21:39 |
|
here's another terrible way you could do it give each user a list of numbers they have already received give a random number from the currently defined range, if it hasn't already been given to the user, do so now and update the list empty the list and start over if the list of used numbers is contained in the range, i guess, i dunno. this condition makes me want to not do a list and instead do a bool array of a given length so that you can check if it's been filled more quickly. it requires resizing each time their range changes, but that'll be faster than going through a list of ints Clockwerk fucked around with this message at 21:43 on Jan 7, 2016 |
# ? Jan 7, 2016 21:39 |
|
Symbolic Butt posted:we don't want an user to receive repeated numbers i take it you realise this is contradictory? things get simple if you can send repeated numbers but you just don't want them to be too close together, particularly if you can pick a fixed number for how close is "too close"
|
# ? Jan 7, 2016 21:45 |
|
JewKiller 3000 posted:i'm not saying phd programs are the healthiest thing to be in, i left with a master's too. really i'm just wondering why someone who's interested in startups would want to work in finance, or why someone who wants to work in finance would ever join a startup i am not particularly interested in either but i was looking to jump ship, the team (correctly) seemed competent, they were the first out of 5 interviews that offered, and they offered me £40k. seemed like a no brainer to me. and if the company doesn't make it then lots more doors are opened after that first job. also turns out that i like working here but that wasn't part of why i said yes obv
|
# ? Jan 7, 2016 21:45 |
|
i looked at some f# today and i like it
|
# ? Jan 7, 2016 22:03 |
|
e nm
coffeetable fucked around with this message at 23:04 on Jan 7, 2016 |
# ? Jan 7, 2016 22:20 |
|
what if the range is decreased?
|
# ? Jan 7, 2016 22:26 |
|
Symbolic Butt posted:time for some terrible algorithms problem: ah, the famous "shuffled playlist" problem. spotify still hasnt solved this
|
# ? Jan 7, 2016 22:29 |
|
code:
|
# ? Jan 7, 2016 22:31 |
|
Terrible programmer here, part suggestion part question. The first solution that occurred to me was not shuffling the list, but rather randomly selecting an index i < n, swapping L[i] with L[n-1], and then popping the element. That way, the random order doesn't need to be determined in advance, and you can add more possibilities at any point in the process. Would that solve the problem?
Fergus Mac Roich fucked around with this message at 23:20 on Jan 7, 2016 |
# ? Jan 7, 2016 23:01 |
|
also an acceptable answer depending on how you add new elements
|
# ? Jan 7, 2016 23:26 |
|
i didn't realize i had a song AND the mindless self indulgence cover of that song until whole-library-shuffle put them together
|
# ? Jan 7, 2016 23:26 |
|
JewKiller 3000 posted:i'm not saying phd programs are the healthiest thing to be in, i left with a master's too. really i'm just wondering why someone who's interested in startups would want to work in finance, or why someone who wants to work in finance would ever join a startup
|
# ? Jan 7, 2016 23:40 |
|
i stalled on my nintendo project and played a bunch of doom instead and thought of something else to do. unfortunately i figured around the time i had to go to wikipedia to figure out what the gently caress a tangent is that i was never going to make this work on my own so i have this guide http://www.permadi.com/tutorial/raycast/rayc7.html which i am trying to convert to this CastRay function without success https://github.com/Luigi30/raycaster/blob/master/Raycaster/MainWindow.xaml.cs i know this shouldn't be this hard but aaaaaaaaag i can't understand how these formulas work
|
# ? Jan 8, 2016 01:29 |
|
JawnV6 posted:i didn't realize i had a song AND the mindless self indulgence cover of that song until whole-library-shuffle put them together lol, you listen to mindless self indulgence
|
# ? Jan 8, 2016 01:31 |
|
abstract classes have valid uses when a rigid hierarchy makes sense
|
# ? Jan 8, 2016 01:56 |
|
Luigi Thirty posted:i stalled on my nintendo project and played a bunch of doom instead and thought of something else to do. unfortunately i figured around the time i had to go to wikipedia to figure out what the gently caress a tangent is that i was never going to make this work on my own In this article, the CastRay function is checking whether the shortest distance between the player and the wall is reached at the grid's X or Y first, and then rendering from there. Then it uses the coordinates from the shortest distance ( X = 151, Y = 127 ) and converts it into the grid's location by taking the floor of X/64, and Y/64 resulting in (2, 1). It checks for a wall there, but doesn't find one, so it extends the triangle by X + 36 units and Y + 64 units. It converts the new X, Y using the same formula as above, getting (2, 0). It finds a wall for grid loc (2, 0) and returns the X,Y coordinates. It doesn't actually render the wall in this function from what I can tell. I'm pretty sure the vertical part at the bottom is there because sometimes there will be a wall next to the player that won't be checked at certain viewing angles, so it could very well be an empty area until the camera pans enough for the CastRay function to tell that yes this player should see the wall on the screen and to render the correct side of the wall. For example, if there was a wall at grid coordinate (2,2) if only the horizontal part is implemented, it will tell the render to draw the part of the wall at box C, while with the horizontal and vertical checks implemented, it will render the side at box B. At least that's how it looks to me, I've never done this so I don't know if this helps. mekkanare fucked around with this message at 02:54 on Jan 8, 2016 |
# ? Jan 8, 2016 02:50 |
|
Symbolic Butt posted:time for some terrible algorithms problem: to solve exactly as stated, i think you can just insert each new element a random place in the list, adjusting your current index as you go: code:
|
# ? Jan 8, 2016 03:23 |
|
|
# ? May 31, 2024 04:15 |
|
Sagacity posted:Static site generators like Hugo and Jekyll are okay for that. Just let them generate your static site and host in on S3 for $0.05/month
|
# ? Jan 8, 2016 03:37 |