These are chat archives for Ruhrpottpatriot/GW2.NET

27th
Dec 2015
Steven Liekens
@StevenLiekens
Dec 27 2015 13:38
https://www.nuget.org/packages/GW2NET/ this package is still 1.3.0 and installs v1.3.0 of all other packages when DependencyBehavior is 'Lowest' (default)
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 13:39
huh
ok
This message was deleted
fixing it
done
I didn't set 1.4 to visible
Steven Liekens
@StevenLiekens
Dec 27 2015 13:40
it's fine
Steven Liekens
@StevenLiekens
Dec 27 2015 14:11
one more suggestion
we use enum flags a lot (item flags, recipe flags)
and they are awkward to use
Recipe.CraftingDisciplines.HasFlag(CraftingDisciplines.Artificer)
instead of enum flags I would like to have a boolean property for each flag
Steven Liekens
@StevenLiekens
Dec 27 2015 14:59
it's amazing what you can do with a little bit of client side linq
I wrote a little tool for myself that compares my unlocked artificer recipes to all recipes in the API
and it shows me how many of each ingredient I need to discover every locked recipe for each rating
gonna need 175 Glob of Ectoplasm just for artificer recipes with rating 425 :(
Steven Liekens
@StevenLiekens
Dec 27 2015 15:04
it's even worse for ratings 400 and 500 :(
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:05
yeah
LINQ is totally awesome
but that's functional programming for you
Steven Liekens
@StevenLiekens
Dec 27 2015 15:13
vgws.png
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:14
dafuq?
the last two listings.
Steven Liekens
@StevenLiekens
Dec 27 2015 15:14
who in their right mind pays 10g listing tax for a level 10 scepter
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:14
dunno
Steven Liekens
@StevenLiekens
Dec 27 2015 15:14
it literally costs 2 silvers to craft
rating 0
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:15
hehe
Enum flags may be a bit awkward to use, but they are much faster than properties, since you can XOR them.
Steven Liekens
@StevenLiekens
Dec 27 2015 15:20
faster to write or faster to run?
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:20
faster to run
with enum flags all values must be stored as powers of 2
after that you simply can run an XOR between two flags
which is probably the fastest way to test
since it is only one comparison, regardless of how many properties the item has
read the accepted answer
Steven Liekens
@StevenLiekens
Dec 27 2015 15:27
string of bits... ugh
who does that?
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:27
nobody
Steven Liekens
@StevenLiekens
Dec 27 2015 15:28
that's just wrong
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:28
yep
Steven Liekens
@StevenLiekens
Dec 27 2015 15:29
I do like the idea of having extension methods for enum flags
for common combinations
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 15:30
might be an option down the road
still we should't remove flags and move to properties, those are vastly more ineficient and not recommended .
Steven Liekens
@StevenLiekens
Dec 27 2015 16:06
I found an item that you can buy for 75 bronze and salvages for 1-3 copper + essence of luck
copper is 1.5s right now
linq <3
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 16:08
^^
do you know Haskell?
Steven Liekens
@StevenLiekens
Dec 27 2015 16:13
nope
by name only
Robert Logiewa
@Ruhrpottpatriot
Dec 27 2015 16:13
It's great for such things
last semester we build a basic stock market app in Hasekell
Functional Programming is just perfect fo this kind of apps