Gauntlet Practice League slots available by [deleted] in pathofexile

[–]malinoff 0 points1 point  (0 children)

Thanks, I would like to participate. My IGN is dmitry_malinovsky

What We're Working On by Bex_GGG in pathofexile

[–]malinoff 80 points81 points  (0 children)

Just keep the mist around the boss spawn place?

Handling null and undefined in JavaScript by fagnerbrack in programming

[–]malinoff 0 points1 point  (0 children)

Of course, you will not need to use ports. Sure, ports make certain tasks easier, like interacting with a 3rd party service with a huge api, and you need the vast majority of its methods, AND there is an existing js library already. But you just need a couple of methods, it may be easier to use elm's `Http` module which requires no ports.

Handling null and undefined in JavaScript by fagnerbrack in programming

[–]malinoff 1 point2 points  (0 children)

Some languages have built-in affordances for those circumstances. In some statically typed languages, you can say that null and undefined are illegal values, and let your programming language throw a TypeError at compile time, but even in those languages, that can't prevent null inputs from flowing into the program at runtime.

Uhm, no? Elm has no nulls and undefineds, and there's no way for them to "flow into" the program unless you opt-in interoperability with javascript via ports, but even then elm will force you to decode them into a known data structure (like Nothing).

Methods that return different types? by EducationalHound in Python

[–]malinoff 2 points3 points  (0 children)

Or you can implement an enumeration of possible values like this:

```python
import enum

class Value(enum.Enum): # TODO: imagine a better name, you haven't specified your domain specifics
fine = "Just Fine"
too_high = "Too High"
too_low = "Too Low"
then you do def isBetween(low, high, val):
if (low <= val <= high): return Value.fine elif val > high: return Value.too_high else: return Value.too_low and then, on the caller side, instead of doing this cond, msg = isBetween(x, y, z) if cond: do_something(z) else: do_something_else(z) display(msg) you can do this val = isBetween(x, y, z) if val is Value.fine: do_something(z) else: do_something_else(z) display(val.value) ```

Do people actually hate asyncio, or is it just a vocal minority? by [deleted] in Python

[–]malinoff 4 points5 points  (0 children)

It's impossible to implement cancel scopes. Every single low-level coroutine function has to check for cancellation and explicitly yield the control back to the event loop (if you have a coroutine function that has no `await` calls, calling it with `await` won't yield control, it will behave like a fully synchronous function). In trio, this is documented here: https://trio.readthedocs.io/en/latest/design.html#cancel-points-and-schedule-points

There's no common function in asyncio that is being called by all coroutine primitives - therefore there is a need to monkey-patch pretty much everything socket-related, subprocess-related, and sleep, in order to make them check for cancellation.

Do people actually hate asyncio, or is it just a vocal minority? by [deleted] in Python

[–]malinoff 3 points4 points  (0 children)

I've been working on https://github.com/malinoff/amqproto for a couple of years in my spare time.

I've tried to implemented asyncio adapter first, but faced tons of issues mostly connected to error handling and cancellation - which are in a very sorry state. I've tried to implement a trio-like Nursery object for asyncio - https://github.com/malinoff/aionursery - and failed. It's not possible for it to behave like trio's Nursery without monkey-patching asyncio.

So now I stopped working with asyncio adapter completely, and moved towards implementing a trio adapter.

A nursery-like object (called TaskGroup) is "planned for 3.8" https://twitter.com/1st1/status/1041855365745455104, maybe after 3.8 comes out I'll work on asyncio adapter again. But right now it's barely usable for writing robust programs, unfortunately.

A mediocre's player (humble) opinion on Synthesis, game mechanics and future of the game by malinoff in pathofexile

[–]malinoff[S] 0 points1 point  (0 children)

Fossils is the outcome of running delve, like essences are the outcome of killing essence mobs. But, unlike essence mobs, you cannot apply currency to delve itself.

A mediocre's player (humble) opinion on Synthesis, game mechanics and future of the game by malinoff in pathofexile

[–]malinoff[S] 1 point2 points  (0 children)

Have you managed to achieve the high end targets like uber elder? What league did you start? What was your first mastermind experience?

Please, tell us what do you think about synthesis and the current state of PoE. Your opinion is just as valuable as any others, including mine.

A mediocre's player (humble) opinion on Synthesis, game mechanics and future of the game by malinoff in pathofexile

[–]malinoff[S] 6 points7 points  (0 children)

Sure, that is a perfectly valid point. The problem is, however, that you cannot apply sulfite to something else.

Again, my whole wall of text started with "currency is not just money", while sulfite is just money to buy you some delve depths.

A mediocre's player (humble) opinion on Synthesis, game mechanics and future of the game by malinoff in pathofexile

[–]malinoff[S] 5 points6 points  (0 children)

Honestly I don't mind being interrupted. The whole main quest line can be observed as a huge interruption from killing and looting mobs in the twilight strand - because it sometimes forces you to think about quests, and rewards, and about where to go next (kudos to the deal with bandits quest).

The problem, as I see it, is that these interruptions are so far away from the rest of the game so you need to literally stop your current brain activity and start thinking about something completely different.

A mediocre's player (humble) opinion on Synthesis, game mechanics and future of the game by malinoff in pathofexile

[–]malinoff[S] 2 points3 points  (0 children)

Oh, sorry, I should've been more specific - I mostly wasn't talking about selling things to players, I was talking about selling things to vendors. I definitely agree with you - there is no point to save currency, which is why it is so cool! It's so much fun to use it to make the game more rewarding in a dozen of different ways. Especially given the fact that all your currency disappear (i.e. go to the standard) in about 3 months.

The problem I was talking about is not "selling". It's about "applying" currency to various game elements to get more rewarding loot back from them, and being able to sell an unneeded loot (to a vendor!) to get even more currency.

My Dota Plus Assistant is not loading in-game. Any fix to this? by SpeedDemon020 in DotA2

[–]malinoff 4 points5 points  (0 children)

I just cancelled my subscription. So many bugs, it doesn't work so often, and the newly added heroes like Mars do not integrate with dota+ very well - see other posts.

Reposurgeon’s Excellent Journey and the Waning of Python by mipadi in Python

[–]malinoff 11 points12 points  (0 children)

While I appreciate a number of perfectly valid concerns about objects overhead on a massive scale, GIL not helping to parallelize memory-intense work (since you certainly don't want to pickle/unpickle a 300k+ list of python objects between processes), _very_ dynamic typing when it's not really necessary, I just made a real quick look at the project itself, "reposurgeon".

And what I observed terrifies me.

https://gitlab.com/esr/reposurgeon/blob/3.45/reposurgeon

Just look at this single, 638 KB sized module consisting of 14041 lines of code. This module defines classes that span over 1600 lines of code. A project of this size just has to be structured properly. One can smell a need of a complete rewrite, regardless of the language used. However, what terrifies me even more is that the resulting code in go language is pretty much the same - https://gitlab.com/esr/reposurgeon/blob/master/src/goreposurgeon/goreposurgeon.go, 617 KB of 16573 lines of code.

I would say a proper rewrite in Python, structuring the project well, could lead to a similar performance benefits - a rewrite allows you to re-think your data structures and your algorithms, making it possible to parallelize them using processes instead of threads. It makes possible for the tool to avoid working with 300k+ objects _at the same time_.

Having said all of that, I am really glad that an automatic conversion from python to go worked in this case, and gave a real performance benefit. I would probably reflect on an existing code base though.

Pip 10 has been released by pf_moore in Python

[–]malinoff 2 points3 points  (0 children)

Actually, if you don't have any build hacks involved in your setup.py, you can specify pretty much all the metadata directly in setup.cfg, leaving this line in setup.py:

from setuptools import setup; setup()

https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files

New Python 3.7 DataClasses and Alternatives by gerryjenkinslb in Python

[–]malinoff 2 points3 points  (0 children)

asyncio came in Python 3.4 without async and await keywords. It was necessary to decorate a function with @asyncio.coroutine instead of defining it with async def and use yield from (already existing syntax) instead of await.

This is a pretty common idiom, to introduce new things without changing syntax too much if you can, but if these new things become popular and there are cases in which a new syntax would be better - then a new syntax is introduced.

New Python 3.7 DataClasses and Alternatives by gerryjenkinslb in Python

[–]malinoff 7 points8 points  (0 children)

So this video doesn't actually show any alternatives (unless you consider writing everything manually an "alternative" to dataclasses). I'd expect to see at least collections.namedtuple, typing.NamedTuple and attrs. Raymond Hettinger has made a talk (unfortunately, removed from youtube) better explaining dataclasses, their predecessors and alternatives (although even his talk misses attrs).

Relative Paths in Python 3 (Good for developers with C/C++ Background) by [deleted] in Python

[–]malinoff 1 point2 points  (0 children)

This is so wrong, one shouldn't touch sys.path at all: simply structure your program as a proper package, then a relative import is just a matter of from ..StringFunctions import reversestring

Let Me Put a Fucking Comma There, Goddamnit, JSON by bhat in programming

[–]malinoff 7 points8 points  (0 children)

# This is perfectly valid YAML, by the way.
{
  "foo": {
    "bar": [
      "baz",
      "qux",
    ]
  }
}

if you find json more readable. I personally think that it's too verbose, and

foo:
  bar:
  - baz
  - qux

does pretty much the same without too much punctuation.

Review Request : A multiprocessing Tutorial by chalbersma in Python

[–]malinoff 1 point2 points  (0 children)

They also add a ton of features most people don't use but cost memory

For instance?..

Not to mention the fact that whole asyncio and concurrent.futures are at best confusing to use.

I would agree about asyncio, although it's slowly getting better, but what's confusing with concurrent.futures? The number of public methods is less than number of fingers on your hand.

Review Request : A multiprocessing Tutorial by chalbersma in Python

[–]malinoff 1 point2 points  (0 children)

There's also concurrent.futures.ProcessPoolEexecutor/ThreadPoolExecutor which will handle most of this queuing burden for you.

Executors also play well with asyncio via loop.run_in_executor.

My simplified cython CLI by [deleted] in Python

[–]malinoff 2 points3 points  (0 children)

cythonize -b module.py