These are chat archives for arenanet/api-cdi

29th
Oct 2017
Eearslya Sleiarion
@Eearslya
Oct 29 2017 05:53 UTC
@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
@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 UTC
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 UTC
@BoyC thank you! :+1:
smiley
@codemasher
Oct 29 2017 12:52 UTC

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!
@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 UTC
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 ;)
my ex flatmate coded it :D
smiley
@codemasher
Oct 29 2017 13:23 UTC
:D
well, the new version at least :)
smiley
@codemasher
Oct 29 2017 13:25 UTC
heh
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 UTC
looking at how old that site is... noone had web knowledge back then :P
smiley
@codemasher
Oct 29 2017 16:00 UTC
POLL: switch(...){} or if(){}else{}?
(asking because switches turn out to be horrible in code coverage)
smiley
@codemasher
Oct 29 2017 18:42 UTC
seems y'all got stong opinions on that... :D
Archomeda
@Archomeda
Oct 29 2017 19:13 UTC
lol
well, it depends really
some languages don't support variable statements in switches
well... most actually
smiley
@codemasher
Oct 29 2017 19:14 UTC
switch(true) ?
which is similar to if/else if/else
Archomeda
@Archomeda
Oct 29 2017 19:15 UTC
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 UTC
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 UTC
well... i meant e.g. php that supports having function calls in a case statement
smiley
@codemasher
Oct 29 2017 19:16 UTC
and then the code coverage vomits at me
Archomeda
@Archomeda
Oct 29 2017 19:17 UTC
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 UTC
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 UTC
i suppose that's to support what i just mentioned
smiley
@codemasher
Oct 29 2017 19:18 UTC
yea
Archomeda
@Archomeda
Oct 29 2017 19:18 UTC
many other languages only support pre-evaluated things, or static statements
smiley
@codemasher
Oct 29 2017 19:18 UTC
and it acts weird in rare cases
Archomeda
@Archomeda
Oct 29 2017 19:18 UTC
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 UTC
heh
Archomeda
@Archomeda
Oct 29 2017 19:20 UTC
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 UTC
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 UTC
i guess it's a personal preference :D
i don't think it has many performance differences
smiley
@codemasher
Oct 29 2017 19:23 UTC
clean code should everyone's personal preference xD
Archomeda
@Archomeda
Oct 29 2017 19:24 UTC
yeah... but that can be different for everyone ;)
smiley
@codemasher
Oct 29 2017 19:24 UTC
it has (at least in php), that's why i'm always tempted to use switches
Archomeda
@Archomeda
Oct 29 2017 19:24 UTC
hmm really? is it that different?
smiley
@codemasher
Oct 29 2017 19:25 UTC
(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 UTC
i guess maybe for jumps... but i don't know how it works under the hood
smiley
@codemasher
Oct 29 2017 19:26 UTC
guess php7's JIT works some wonders here
Archomeda
@Archomeda
Oct 29 2017 19:26 UTC
maybe
it's definitely cleaner
windwarrior
@windwarrior
Oct 29 2017 20:36 UTC
@codemasher
Ehh, fat finger sorry
@archomeda match statements are cool
Archomeda
@Archomeda
Oct 29 2017 20:38 UTC
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 UTC
or maybe js String.match()? :D
btw. since when is flattr owned by eyeo? D:
Archomeda
@Archomeda
Oct 29 2017 20:43 UTC
but, that's just regular regex
i hate it so much >.<
windwarrior
@windwarrior
Oct 29 2017 20:58 UTC
Nah I meant the functional equivalent of switch statements, pattern matching
Such as rust’s match-
Phones :(
Archomeda
@Archomeda
Oct 29 2017 20:58 UTC
i never used that language, so yeah..
smiley
@codemasher
Oct 29 2017 20:59 UTC
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 UTC
i guess i'm the same lol
windwarrior
@windwarrior
Oct 29 2017 20:59 UTC
You should try a functional languag tho
smiley
@codemasher
Oct 29 2017 20:59 UTC
uhh php?
windwarrior
@windwarrior
Oct 29 2017 21:00 UTC
Really useful knowledge
smiley
@codemasher
Oct 29 2017 21:00 UTC
js?
Archomeda
@Archomeda
Oct 29 2017 21:00 UTC
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 UTC
php used to be a functional only language until v4 or so
windwarrior
@windwarrior
Oct 29 2017 21:01 UTC
No, functional, not imperative
Archomeda
@Archomeda
Oct 29 2017 21:01 UTC
scala is functional
but java based... :/
windwarrior
@windwarrior
Oct 29 2017 21:02 UTC
Ala Haskell
Archomeda
@Archomeda
Oct 29 2017 21:02 UTC
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 UTC
are you @lye ? :D
Archomeda
@Archomeda
Oct 29 2017 21:02 UTC
since then i've got a grudge against functional languages
windwarrior
@windwarrior
Oct 29 2017 21:03 UTC
Scala is not as religiously functional as Haskell is
Archomeda
@Archomeda
Oct 29 2017 21:03 UTC
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 UTC
Still actively developing
smiley
@codemasher
Oct 29 2017 21:04 UTC
i'm so glad i've never studied that, so i never got indoctrinated with stupid paradigms
windwarrior
@windwarrior
Oct 29 2017 21:04 UTC
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 UTC
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 UTC
paradigms!
just go with the flow :D
Eearslya Sleiarion
@Eearslya
Oct 29 2017 21:11 UTC
the heck's a functional language
smiley
@codemasher
Oct 29 2017 21:11 UTC
the opposite of OO?
one that only allows "functional programming"
windwarrior
@windwarrior
Oct 29 2017 21:15 UTC
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 UTC
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 UTC
C vs C++?
windwarrior
@windwarrior
Oct 29 2017 21:35 UTC
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 UTC
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 UTC
well, at least it works like a charm...