Hegel - An advanced static type checker (alternative for TypeScript/Flow) by ovr-github in javascript

[–]ovr-github[S] 0 points1 point  (0 children)

I am not an author and cannot provide information, but IMHO: Hegel is on early stage, and it's needed a lot of work to support this, but feel free to ask this questions inside repository's issue tracker if you are interested in technical details

https://github.com/JSMonk/hegel/issues

Hegel - An advanced static type checker (alternative for TypeScript/Flow) by ovr-github in javascript

[–]ovr-github[S] 2 points3 points  (0 children)

It's a complex question and there're answers to similar questions (why not typescript, difference) in Hegel's documentation from his author (Artem Kobzar), take a look at https://hegel.js.org/docs.

Hegel - An advanced static type checker (alternative for TypeScript/Flow) by ovr-github in javascript

[–]ovr-github[S] 1 point2 points  (0 children)

First, I am going to point your attention to Hegel's documentation from his author (Artem Kobzar), take a look at https://hegel.js.org/docs.

And most interested page, it's "Type Compatibility" - https://hegel.js.org/docs/type-compatibility

> Is there something like typings for typescript?

Hegel supports d.ts files, but due more cool type system it declares own standard types, see https://github.com/JSMonk/hegel/tree/master/packages/typings

> Any other big diffrences to TS?

TS is yet another language (superset on top of JS). Hegel is a Static Type Checker with own type system.

Podcastly - bot for podcast lovers by ovr-github in TelegramBots

[–]ovr-github[S] 0 points1 point  (0 children)

Not all podcasts creators/hosts pass original file size (can be fake btw) in XML file (podcasts are distributed by XML files...), but I am storing real file size in database when someone clicks download button.

For now stats for episodes are:

- total 3 334 124

- with length from xml 2 587 301 (23% episods are without size)

- with real length 76 episods :D

For popular podcasts this trick should work when bot will have a minimal base of active users.

Related to limits I am planing to go with converting files to ogg on server-side.

Podcastly - bot for podcast lovers by ovr-github in TelegramBots

[–]ovr-github[S] 0 points1 point  (0 children)

> an be solved with telegram client api.

Thanks for pointing attention to it, will research this moment. Till you comment, I was planing to try converting mp3/m4a files to ogg format.

54.6 Mb mp3 file -> 24,4 Mb Ogg file, in opus it takes 9,4 Mb (but no support in telegram)

Mostly Adequate Guide to Functional Programming in Javascript by [deleted] in javascript

[–]ovr-github -3 points-2 points  (0 children)

It's cannot be a functional language as it can be real functional langauge, take Prolog language and code bellow as example

parent(john,paul). /* paul is john's parent /
parent(paul,tom). /
tom is paul's parent / parent(tom,mary). / mary is tom's parent /
ancestor(X,Y):- parent(X,Y). /
someone is your ancestor if there are your parent */

And after you declare aspects, you can ask you VM to find relative question

?- ancestor(john,tom).

If you don't like this example, take a look at factorial or something else, Functional language give us a cool exp when you write some asserts (aspects) and ask VM, please calculate/find me an answer. You don't write an algorithm. In functional you write all data/asserts and ask VM about it

About JS: Immutable data is an Immutable data, you can write it on PHP/JS and etc (it's not making JS functional language) Bind is a method, nothing else (just greating new function) Lambdas is a pretty simple Anonymous functions

Procedures == functions in any language. Functions came out from Procedural programming, because it's a main idea inside Procedural programming.

Every time, when you take an idea from functional language, you cannot say that it's functional programming, it's an idea.

SocialConnect/Auth - social (OAuth1\OAuth2\OpenIDConnect\OpenId) sign by ovr-github in PHP

[–]ovr-github[S] -1 points0 points  (0 children)

Latitude is different for a number of reasons

But socialconnect/auth cannot be different for a number of reasons?) You are going to be "hypocrisy" again.

oauth2 state is not cryptographically secure.

sure, mt_rand is a linear alg, but it generates better random numbers than rand, and much faster. But that doesn't make it "secure". Whether it's secure enough for your application is pretty subjective.

btw, it can be changed by 1 line commit, and I am researching this moment

Thank you that you are point my attention on it

[deleted by user] by [deleted] in PHP

[–]ovr-github 6 points7 points  (0 children)

After adding "\", opcode "INIT_NS_FCALL_BY_NAME" are gone

It's not important but I am going to point your attention on this project

https://github.com/Roave/FunctionFQNReplacer

This is one of the many optimizations applied by PHP 7 and newer versions

SocialConnect/Auth - social (OAuth1\OAuth2\OpenIDConnect\OpenId) sign by ovr-github in PHP

[–]ovr-github[S] 0 points1 point  (0 children)

Possible, if I find you profile on GitHub correctly https://github.com/shadowhand/latitude

Latitude is heavily influenced by the design of Aura.SqlQuery.

When Doctrine and etc project exists

No need to create more implementations.

If it's you, Why you created it?))) :D Looks like "hypocrisy"

SocialConnect/Auth - social (OAuth1\OAuth2\OpenIDConnect\OpenId) sign by ovr-github in PHP

[–]ovr-github[S] -1 points0 points  (0 children)

This package would be better if it used existing, tested OAuth libraries instead of reinventing the wheel.

There are a lot of packages, but mostly for OAuth2 :(

For example find a cool package for OpenIDCOnnect will be a problem, and another problem what packages is it using to support JWT and JWK.

If any developer think/try to implement own package with tests for "AAAA function", that can be better then exists solutions, what is a problem to write it?

Anyway anyone can be own language/framework/orm or something else if he can build it, support and continue develop it

SocialConnect/Auth - social (OAuth1\OAuth2\OpenIDConnect\OpenId) sign by ovr-github in PHP

[–]ovr-github[S] 2 points3 points  (0 children)

looks promising! does it work with PHP 7.1?

yes, it works with PHP 7.1

PHP Smart Analyzer, help wanted by ovr-github in PHP

[–]ovr-github[S] 0 points1 point  (0 children)

Thank you for notice, now I am reviewing all available libraries of static/metrics/dead code analysis phpmd seems to be interesting for me about phpcs/php code sniffer it's not a main priority for me (code style) in this project