This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Phage

Pages: [1] 2 3 ... 42
1
Science / Re: [URGENT] Chemistry Homework Help
« on: January 12, 2016, 11:48:39 PM »
I actually got a tiny bit mad when reading this post.

What the fuck kind of mentality is that?! First, you're asking someone else to do your homework... NOT help, but DO!

Then, you fucking dare to tell people not explain to you how they did it?! You deserve to fail that class. Please pack your logins and leave this place. That mentality is of no use here.

Insanity, you're waaay to kind!

2
C - C++ / Re: Issues with understanding recursion
« on: January 08, 2016, 11:33:27 PM »
My simple reply: http://stackoverflow.com/questions/717725/understanding-recursion

Get on IRC if you want an in-depth talk about it.

3
Beginner's Corner / Re: I made a Flappy Bird game with code.org
« on: January 08, 2016, 06:37:51 PM »
#1 It should get progressively harder.
#2 Don't use the Original Flappy Bird start page.
#3 Code.org, really?

I hope you decide to move on to real programming at some point. This is fine for understanding the logic, though.

4
Found it on the Webs / Re: Debian
« on: January 01, 2016, 08:54:51 PM »
If you spent just 10 minutes on Google, you'd have known what happened already.

5
Found it on the Webs / Re: Debian
« on: January 01, 2016, 05:54:27 PM »

6
General discussion / Re: What were your Christmas presents?
« on: January 01, 2016, 12:30:20 PM »
You press it to drink. It opens the drink hole. There is also a lock button on the top to prevent the mug from leaking. I tested it on a 7 hour journey and it works great so far.

That's neat! I might need a new mug, my current one is leaking.

7
General discussion / Re: What were your Christmas presents?
« on: December 29, 2015, 06:04:06 PM »
I got this for my coffee



That looks neat, what does the button do?

8
General discussion / Re: Current Careers & Aspirations
« on: December 29, 2015, 12:54:22 PM »
Do you take speed so that you don't have to sleep or what?

Nope, no drugs. But I don't have much free time on my hands.

9
General discussion / Re: Current Careers & Aspirations
« on: December 28, 2015, 10:09:00 PM »
I do a few things.

#1 I'm currently employed as IT-project manager in a decent company. Currently working on getting two web shops ready for post-christmas sale and developing a payment solution with BTC to our eCommerce software.

#2 Styding Informations Technology at university.

#3 F16 simulator instructor. These are military grade simulators.

#4 Tacher in a youth club. This job is two evenings a week, where I mainly hang out with the kids, play some playstation, table tennis etc.

10
General discussion / Re: What were your Christmas presents?
« on: December 28, 2015, 10:02:39 PM »
Everyone here seems to really like lockpicking sets.

Eheh, maybe ill buy one for me too, i just donĀ“t know where to use them!

Emm... You know... Locks?

11
General discussion / Re: What were your Christmas presents?
« on: December 27, 2015, 02:45:17 AM »

12
General discussion / Re: What were your Christmas presents?
« on: December 26, 2015, 11:44:25 PM »
My mom wouldn't let me only ask for books, and since I wear shirts almost every day, I added that to the list.

13
General discussion / Re: What were your Christmas presents?
« on: December 26, 2015, 11:24:49 PM »
I got some pretty awesome gifts.

Books:
    - TCP/IP Bible
    - Eloquent Ruby
    - Introduction to Algorithms
    - Applied Cryptography: Protocols, Algorithms and Source Code in C

Clothes:
    - A shirt

And a trip to the cinema, with soda and popcorn, to watch a movie of my choice.

14
Hardware / Re: Recommendations for Android Phones.
« on: December 26, 2015, 11:16:30 PM »
I have a few thoughts I'd like to share with you.

#1 I don't believe Android phones are purely for tech savy users. My mom is what you can tall a non-tech savy person without offending anyone. She's been using an Android phone ever since she moved to smart phones a few years back. Sure, there have been a few question, but nothing I wouldn't expect receiving from a person new to iOS either.

#2 I believe OP simply wanted our opinion as another factor in his/her decision.

#3 In my opinion, both systems have come to a pretty decent standard these days. The iPhone 6s is a pretty decent phone (I've had the iPhone 6 and it served me more than well). If you have the money, and like the Apple universe, go for this. I just recently moved to Android, getting the Nexus 5x as my first Android phone - I've had the Nexus 7 tablet before I got my iPad Air 2. The 5x is performing pretty well the it's a pleassure to use. The reason I went for the 5x was to get the pure Android experience from Google. I dislike the custom UI most vendors are adding to their phones these days.

If you're into Apple tech and have the money, get the iPhone. If you like to be in charge of evey single bit of your system (in both good and bad) and have no particular reason to pick an iPhone, I'd say get an Android phone. My recommendation would here be, the 5x.

15
Other / [IRC LOGS] Fibonacci and recursion with thewormkill.
« on: November 22, 2015, 10:29:55 PM »
Quote
2015-11-22 21:49:00   thewormkill   lets go
2015-11-22 21:49:10   thewormkill   fibbonacci numbers are a so-called sequence
2015-11-22 21:49:28   @phil   I will stay silent and only break in if I get lost, ok?
2015-11-22 21:49:31   thewormkill   which is just a function f: N -> A where N are the natural numbers 1,2,3,4....
2015-11-22 21:49:36   thewormkill   okay, phil
2015-11-22 21:49:51   thewormkill   so we basically map one element of A to every element of N
2015-11-22 21:49:56   thewormkill   that's a function
2015-11-22 21:50:13   thewormkill   in this case, it is also a sequence, because we map from the natural numbers
2015-11-22 21:50:30   thewormkill   now, A = N because all fibbonacci numbers are natural numbers
2015-11-22 21:50:36   thewormkill   so: f: N -> N
2015-11-22 21:51:05   thewormkill   now, you need a way to find appropriate elemnents
2015-11-22 21:51:18   thewormkill   so we define: f_1 = 1, f_2 = 1
2015-11-22 21:51:27   thewormkill   those are our first two elements
2015-11-22 21:51:33   thewormkill   lol
2015-11-22 21:51:43   thewormkill   please no chitchat
2015-11-22 21:51:49   @phil   ^
2015-11-22 21:52:00   thewormkill   so, phil, so far everything clear?
2015-11-22 21:52:14   @phil   I think so, yeah
2015-11-22 21:52:15   thewormkill   now we define f_n = f_(n-1) + f_(n+)
2015-11-22 21:52:19   thewormkill   now we define f_n = f_(n-1) + f_(n+2)
2015-11-22 21:52:28   thewormkill   so n >= 3
2015-11-22 21:52:36   thewormkill   because we defined f_1 and f_2 already
2015-11-22 21:52:47   thewormkill   now let's get to code, okay?
2015-11-22 21:53:05   @phil   Wait
2015-11-22 21:53:08   thewormkill   we will apply the recursive definition in a straightforward and dumb manner
2015-11-22 21:53:14   @phil   I thought it was f_(n-2) ?
2015-11-22 21:53:14   thewormkill   yeah, questions?
2015-11-22 21:53:22   thewormkill   sorry, typo
2015-11-22 21:53:26   @phil   Ah, okay :)
2015-11-22 21:53:29   @phil   Then proceed :)
2015-11-22 21:54:02   thewormkill   now, let's look at a python function, since I don't really know ruby
2015-11-22 21:54:10   thewormkill   def fib(n):
2015-11-22 21:54:25   thewormkill       if n == 1 or n == 2:
2015-11-22 21:54:33   thewormkill           return 1
2015-11-22 21:54:41   thewormkill       else:
2015-11-22 21:54:54   thewormkill           return fib(n-1) + fib(n-2)
2015-11-22 21:54:56   thewormkill   done
2015-11-22 21:55:12   thewormkill   phil: you see a direct correspondence between the code above and the deefinition
2015-11-22 21:55:16   @phil   I do now
2015-11-22 21:55:19   thewormkill   okay
2015-11-22 21:55:20   @phil   thanks :)
2015-11-22 21:55:24   thewormkill   the problem there is,
2015-11-22 21:55:28   @phil   Recursiveness has always been a mind-game to me
2015-11-22 21:55:29   thewormkill   it is not efficient
2015-11-22 21:55:35   thewormkill   it is slow af
2015-11-22 21:55:44   thewormkill   because we call fib() an enormous amount of time
2015-11-22 21:56:01   thewormkill   thus, the code you showed uses generators
2015-11-22 21:56:11   thewormkill   that was very brief, phil
2015-11-22 21:56:18   thewormkill   any more questions/wishes?
2015-11-22 21:57:03   @phil   Yeah, one
2015-11-22 21:57:04   @phil   4613732
2015-11-22 21:57:05   @phil   -.-
2015-11-22 21:57:18   @phil   a, b = b, a+b
2015-11-22 21:57:41   @phil   Care to explain how that works?
2015-11-22 21:57:45   thewormkill   sure
2015-11-22 21:57:59   thewormkill   you say that a and b are fib numbers already
2015-11-22 21:58:15   thewormkill   and they are adjacent
2015-11-22 21:58:29   thewormkill   so f^(-1)(b)-f^(-1)(b) = 1
2015-11-22 21:58:49   thewormkill   where f^(-1) maps from fibonacci numbers to their indices
2015-11-22 21:59:03   thewormkill   so the inverse of f
2015-11-22 21:59:15   thewormkill   now, if you want to have the next (so to say thrird) number, you add a + b
2015-11-22 21:59:39   @phil   Okay, you lost me compltely xD
2015-11-22 21:59:43   thewormkill   and to get the fourth, you add the 2nd (b) and that result...
2015-11-22 21:59:49   thewormkill   okay, where?
2015-11-22 22:00:12   @phil   "and they are adjacent"
2015-11-22 22:00:17   @phil   Adjacent numbers?
2015-11-22 22:00:22   thewormkill   no
2015-11-22 22:00:29   thewormkill   adjacent fibonaci numbers
2015-11-22 22:00:45   @phil   What do you mean by adjacent?
2015-11-22 22:00:47   thewormkill   the second and thrid fib number or the 7th and 8th... etc
2015-11-22 22:00:49   @phil   In the term of numbers?
2015-11-22 22:00:54   @phil   oh
2015-11-22 22:01:05   thewormkill   yeah, adjacent in the sequence
2015-11-22 22:01:11   @phil   I see
2015-11-22 22:01:19   @phil   f^(-1)(b)-f^(-1)(b) = 1
2015-11-22 22:01:53   @phil   ?
2015-11-22 22:02:01   thewormkill   yes, that is just a formal way of expressing the above
2015-11-22 22:02:12   thewormkill   we said that f maps from indices to fibonacci numbers
2015-11-22 22:02:25   thewormkill   f^(-1) maps from fibonacci numbers to their indices
2015-11-22 22:02:39   @phil   You're gonna have a hard time here  :P "maps from indices" ?
2015-11-22 22:03:19   thewormkill   okay, a function takes a parameter, right?
2015-11-22 22:03:34   @phil   yeah
2015-11-22 22:03:42   thewormkill   now, it returns a result
2015-11-22 22:03:49   @phil   yeah
2015-11-22 22:04:02   thewormkill   "mapping" is the process of giving a result for an input
2015-11-22 22:04:05   thewormkill   just a word
2015-11-22 22:04:14   thewormkill   it's like a dictionary
2015-11-22 22:04:16   <--   lenoch (~lenoch@over.the.edge) has left #fib (Leaving)
2015-11-22 22:04:18   thewormkill   as in python
2015-11-22 22:04:30   @phil   Oh
2015-11-22 22:04:42   thewormkill   d = {1:1,2:1,3:d[1]+d[2],...}
2015-11-22 22:04:50   thewormkill   see?
2015-11-22 22:05:10   @phil   I think so yeah...
2015-11-22 22:05:17   thewormkill   good
2015-11-22 22:05:28   thewormkill   now you got the second part I assume?
2015-11-22 22:05:36   thewormkill   can you guess why it is doen that way?
2015-11-22 22:07:16   thewormkill   phil: ^
2015-11-22 22:07:20   @phil   Yeah, no
2015-11-22 22:07:36   thewormkill   think abot recursion
2015-11-22 22:07:41   thewormkill   why do people fear it?
2015-11-22 22:08:04   @phil   No clue? I just find it weird that something can return the result of itself.
2015-11-22 22:10:19   thewormkill   that's not at all weird, but it seems to be to many
2015-11-22 22:10:26   thewormkill   but more importantly, it has a cost
2015-11-22 22:10:32   thewormkill   which cost you ask?
2015-11-22 22:10:40   @phil   I do :)
2015-11-22 22:10:44   thewormkill   well, do you know how function calls are organized?
2015-11-22 22:10:50   @phil   Not really?
2015-11-22 22:10:57   thewormkill   okay, you have a stack
2015-11-22 22:11:04   thewormkill   you know what that means?
2015-11-22 22:11:06   @phil   I do
2015-11-22 22:11:09   thewormkill   okay,
2015-11-22 22:11:19   thewormkill   this means that every function call sets up a new stackframe
2015-11-22 22:11:27   thewormkill   clear so far?
2015-11-22 22:11:30   @phil   Yup
2015-11-22 22:11:38   thewormkill   okay
2015-11-22 22:11:42   @phil   Oh, so you had a hell of a lot stackframes to the stack
2015-11-22 22:11:43   thewormkill   well, that takes memory
2015-11-22 22:11:46   thewormkill   yes
2015-11-22 22:11:46   @phil   meaning, longer execution time?
2015-11-22 22:11:53   thewormkill   no more memory usage
2015-11-22 22:11:57   @phil   Fair
2015-11-22 22:11:58   thewormkill   *no, more...
2015-11-22 22:11:59   @phil   I'm with ya
2015-11-22 22:12:11   thewormkill   yes and that's bad if you want the 20000000th fib number
2015-11-22 22:12:21   thewormkill   because you'll run out of memory
2015-11-22 22:12:25   @phil   That's obvious now, lol.
2015-11-22 22:12:36   thewormkill   so imperative programmers prefer loops and other controlflow
2015-11-22 22:12:50   thewormkill   wanna know how FP handles that where we have no loops?
2015-11-22 22:13:01   @phil   Sure, can't hurt
2015-11-22 22:13:35   thewormkill   okay, we don't have loops, so we have recursion everywhere
2015-11-22 22:13:41   thewormkill   how do we handle memory?
2015-11-22 22:13:46   @phil   I was just about to ask :p
2015-11-22 22:13:50   thewormkill   well, we don't have a callstack (sick)
2015-11-22 22:13:54   @phil   lol
2015-11-22 22:14:01   thewormkill   at least haskell hasn't
2015-11-22 22:14:14   thewormkill   this means, you have an entirely different concept
2015-11-22 22:14:23   thewormkill   haskell is lazily-evaluated
2015-11-22 22:14:38   thewormkill   so if you compute the result of a function you only do that when it is needed
2015-11-22 22:15:06   thewormkill   so you store a so-called thunk, which is basically a promise that the value will be there when asked for
2015-11-22 22:15:22   thewormkill   and have a whole load of thunks referencing each other
2015-11-22 22:15:59   thewormkill   if you want to compute the nth fib number you might get problems as well, but you can reorganize your code heavily to have less thunks by computing differently
2015-11-22 22:16:10   thewormkill   OR you can just make some parts of your program strict
2015-11-22 22:17:15   thewormkill   phil: clear so far?
2015-11-22 22:17:36   @phil   Strict?
2015-11-22 22:17:47   thewormkill   yes, as in not lazy
2015-11-22 22:18:07   @phil   So, it calculates it right away, or?
2015-11-22 22:18:14   thewormkill   if you want it to
2015-11-22 22:18:28   thewormkill   by default it does not, but you can force evaluation so to say
2015-11-22 22:18:45   @phil   Ah, that's neat
2015-11-22 22:18:54   thewormkill   yes :)
2015-11-22 22:19:00   thewormkill   now go the forums and post this log pls
2015-11-22 22:20:35   @phil   I'm still not one hundred percent sure how that; a,b = b, a+b thing works? :/
2015-11-22 22:20:54   thewormkill   it's mostly syntactic sugar
2015-11-22 22:21:04   thewormkill   you just calculate values based on a and b
2015-11-22 22:21:16   thewormkill   and then you assign them to a and b respectively
2015-11-22 22:21:48   thewormkill   in the recursive version we just had different a's and b's for each level of recursion so to say
2015-11-22 22:21:57   thewormkill   (those were our intermediate results)
2015-11-22 22:22:18   thewormkill   now, we just made the algorithm iterative
2015-11-22 22:22:20   thewormkill   and it works in-place
2015-11-22 22:22:39   thewormkill   phil: that's all there is to it, really
2015-11-22 22:22:59   @phil   So, instead of calling the function x times and having it do the calculation x times per function call
2015-11-22 22:23:13   @phil   you call it once, and it iterates over the numbers until it hit the result?
2015-11-22 22:23:18   thewormkill   yes :)

Pages: [1] 2 3 ... 42


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.