These are chat archives for arenanet/api-cdi

29th
Oct 2017
Eearslya Sleiarion
@Eearslya
Oct 29 2017 05:53
@windwarrior I watched a presentation yesterday on all the steps taken to render a single frame of Star Citizen
that is frightening
I will never understand how it can all happen in under 16ms
BoyC
@BoyC
Oct 29 2017 11:01
@windwarrior ask away I can tell you all about the Demoscene :)
@codemasher have a look at all the remakes and remixes :) http://www.pouet.net/prod.php?which=63
windwarrior
@windwarrior
Oct 29 2017 12:06
I figured @BoyC
@Eearslya you have more of those
I think I saw a dissection of a frame of GTA V once
smiley
@codemasher
Oct 29 2017 12:44
@BoyC thank you! :+1:
smiley
@codemasher
Oct 29 2017 12:52

lol, someone asked the exact same question almost 18 years ago :D

I am wondering one thing. When will I see the Second Reality for the modern computers?

tbh, someone should - for the 25th anniversary of it!
BoyC
@BoyC
Oct 29 2017 12:59
@codemasher - pouet.net is THE demoscene portal, virtually every release ever that hasn't been lost can be found there
if you don't mind the occasional language it's a nice resource :)
here's an interesting article
smiley
@codemasher
Oct 29 2017 13:23
thanks! i think i've seen that site once before - ages ago
but tbh, i'm more interested in things like https://kotaku.com/5975610/the-exceptional-beauty-of-doom-3s-source-code ;)
BoyC
@BoyC
Oct 29 2017 13:23
my ex flatmate coded it :D
smiley
@codemasher
Oct 29 2017 13:23
:D
BoyC
@BoyC
Oct 29 2017 13:24
well, the new version at least :)
smiley
@codemasher
Oct 29 2017 13:25
heh
BoyC
@BoyC
Oct 29 2017 13:27
pouet was originally written by a french dude with 0 web knowledge, and it became a mess
after about 10ish years of fighting Gargaj took over and rewrote the whole thing in 2 months
they even created a passport type system for all scene related websites, went all out on it :)
smiley
@codemasher
Oct 29 2017 13:34
looking at how old that site is... noone had web knowledge back then :P
smiley
@codemasher
Oct 29 2017 16:00
POLL: switch(...){} or if(){}else{}?
(asking because switches turn out to be horrible in code coverage)
smiley
@codemasher
Oct 29 2017 18:42
seems y'all got stong opinions on that... :D
Archomeda
@Archomeda
Oct 29 2017 19:13
lol
well, it depends really
some languages don't support variable statements in switches
well... most actually
smiley
@codemasher
Oct 29 2017 19:14
switch(true) ?
which is similar to if/else if/else
Archomeda
@Archomeda
Oct 29 2017 19:15
generally if it becomes too many cases for if-else statements, or if i need to run the same code for multiple cases, i switch over to switch
smiley
@codemasher
Oct 29 2017 19:15
i've reverted the switch to if/else for the 3rd time or so now
every time i se stuff like that in my code , i think "oh hey, a switch could do that too"
Archomeda
@Archomeda
Oct 29 2017 19:16
well... i meant e.g. php that supports having function calls in a case statement
smiley
@codemasher
Oct 29 2017 19:16
and then the code coverage vomits at me
Archomeda
@Archomeda
Oct 29 2017 19:17
but, i generally dislike having if-else cases if there are more than 2 or 3 else ifs
smiley
@codemasher
Oct 29 2017 19:17
also, php seems to behave strange with switches, as in, it evaluates all cases before running through it
Archomeda
@Archomeda
Oct 29 2017 19:17
i suppose that's to support what i just mentioned
smiley
@codemasher
Oct 29 2017 19:18
yea
Archomeda
@Archomeda
Oct 29 2017 19:18
many other languages only support pre-evaluated things, or static statements
smiley
@codemasher
Oct 29 2017 19:18
and it acts weird in rare cases
Archomeda
@Archomeda
Oct 29 2017 19:18
or... constant statements rather, or w/e it's called
then again, i haven't done much in php the past few years
i just dislike that my linter for javascript wants me to include a default case for every switch...
i suppose i could disable it
oh well
smiley
@codemasher
Oct 29 2017 19:19
heh
Archomeda
@Archomeda
Oct 29 2017 19:20
but yeah, as i said, personally i dislike having long if-else's, and at the same time, i generally dislike short switches with only 1 or 2 cases as well
except when i plan on extending those short switches later on
smiley
@codemasher
Oct 29 2017 19:22
i tend to use switches on short exits only just to avoid the stupid break as it makes the code messier
if/else looks way cleaner, no matter what
Archomeda
@Archomeda
Oct 29 2017 19:23
i guess it's a personal preference :D
i don't think it has many performance differences
smiley
@codemasher
Oct 29 2017 19:23
clean code should everyone's personal preference xD
Archomeda
@Archomeda
Oct 29 2017 19:24
yeah... but that can be different for everyone ;)
smiley
@codemasher
Oct 29 2017 19:24
it has (at least in php), that's why i'm always tempted to use switches
Archomeda
@Archomeda
Oct 29 2017 19:24
hmm really? is it that different?
smiley
@codemasher
Oct 29 2017 19:25
(tbh, i haven't checked switch performance in php7 yet as it is crazy fast anyway compared to 5.6)
Archomeda
@Archomeda
Oct 29 2017 19:25
i guess maybe for jumps... but i don't know how it works under the hood
smiley
@codemasher
Oct 29 2017 19:26
guess php7's JIT works some wonders here
Archomeda
@Archomeda
Oct 29 2017 19:26
maybe
it's definitely cleaner
windwarrior
@windwarrior
Oct 29 2017 20:36
@codemasher
Ehh, fat finger sorry
@archomeda match statements are cool
Archomeda
@Archomeda
Oct 29 2017 20:38
match? is that what's these php catch statements are called that codemasher has changed in that commit?
smiley
@codemasher
Oct 29 2017 20:41
or maybe js String.match()? :D
btw. since when is flattr owned by eyeo? D:
Archomeda
@Archomeda
Oct 29 2017 20:43
but, that's just regular regex
i hate it so much >.<
windwarrior
@windwarrior
Oct 29 2017 20:58
Nah I meant the functional equivalent of switch statements, pattern matching
Such as rust’s match-
Phones :(
Archomeda
@Archomeda
Oct 29 2017 20:58
i never used that language, so yeah..
smiley
@codemasher
Oct 29 2017 20:59
me neither because i'm too lazy to learn another language as long as i don't need to :D
Archomeda
@Archomeda
Oct 29 2017 20:59
i guess i'm the same lol
windwarrior
@windwarrior
Oct 29 2017 20:59
You should try a functional languag tho
smiley
@codemasher
Oct 29 2017 20:59
uhh php?
windwarrior
@windwarrior
Oct 29 2017 21:00
Really useful knowledge
smiley
@codemasher
Oct 29 2017 21:00
js?
Archomeda
@Archomeda
Oct 29 2017 21:00
i mostly use javascript, c# and occasionally c++
mostly self-taught c++ because my uni learned me how to java only...
smiley
@codemasher
Oct 29 2017 21:01
php used to be a functional only language until v4 or so
windwarrior
@windwarrior
Oct 29 2017 21:01
No, functional, not imperative
Archomeda
@Archomeda
Oct 29 2017 21:01
scala is functional
but java based... :/
windwarrior
@windwarrior
Oct 29 2017 21:02
Ala Haskell
Archomeda
@Archomeda
Oct 29 2017 21:02
we were taught how to scala as well... but i hate the way they taught it to us...
smiley
@codemasher
Oct 29 2017 21:02
are you @lye ? :D
Archomeda
@Archomeda
Oct 29 2017 21:02
since then i've got a grudge against functional languages
windwarrior
@windwarrior
Oct 29 2017 21:03
Scala is not as religiously functional as Haskell is
Archomeda
@Archomeda
Oct 29 2017 21:03
i guess,
i never looked at haskell
way before my time
never had a reason to use or learn it either
windwarrior
@windwarrior
Oct 29 2017 21:04
Still actively developing
smiley
@codemasher
Oct 29 2017 21:04
i'm so glad i've never studied that, so i never got indoctrinated with stupid paradigms
windwarrior
@windwarrior
Oct 29 2017 21:04
I am not saying that functional is the be all end all
It helped me see the drawbacks of OO
And in turn made me a better OO programmer
Archomeda
@Archomeda
Oct 29 2017 21:06
the biggest difference is that in functional languages, everything is supposed to be immutable, right?
i kind of hate that
smiley
@codemasher
Oct 29 2017 21:09
paradigms!
just go with the flow :D
Eearslya Sleiarion
@Eearslya
Oct 29 2017 21:11
the heck's a functional language
smiley
@codemasher
Oct 29 2017 21:11
the opposite of OO?
one that only allows "functional programming"
windwarrior
@windwarrior
Oct 29 2017 21:15
in a functional program language you have to be explicit about side effects
they separate "pure code" and "side effect code"
so consider for example 1 + 2 + 3 + 4, that code has no side effects
but now consider printf("Hello World"), that has side effects, namely something being printed to the console
this separation allows Haskell to do all sorts of optimisations
windwarrior
@windwarrior
Oct 29 2017 21:22
I dont know, its hard to explain exactly what makes a language functional, and why it is cool
but it really is :')
Eearslya Sleiarion
@Eearslya
Oct 29 2017 21:35
C vs C++?
windwarrior
@windwarrior
Oct 29 2017 21:35
I can't write either :P
why is it so hard to put all necessary info on a single page on the web, amazon?
not to mention that i found this doc only by browsing existing oauth libraries
smiley
@codemasher
Oct 29 2017 22:18
btw. this is what you're looking for if you want to register an amazon oauth app: https://sellercentral.amazon.com/gp/homepage.html
15 effing minutes wasted for this
smiley
@codemasher
Oct 29 2017 22:24
well, at least it works like a charm...