-
Список говнокодов пользователя Fike
Всего: 94
-
−2
- 1
- 2
- 3
- 4
- 5
- 6
This would raise the true nightmare. A type variable is a different beast than the actual type of a concrete instance.
A type variable could resolve to a, e.g. ? extends Comparator<? super Number> to name one (rather simple) example.
Providing the necessary meta information would imply that not only object allocation becomes much more expensive,
every single method invocation could impose these additional cost, to an even bigger extend as we are now not only
talking about the combination of generic classes with actual classes, but also every possible wildcarded combination,
even of nested generic types.
https://stackoverflow.com/a/38060012
Джавист-долбоеб с пеной у рта защищает type erasure, задавая вопросы "Does it [c#] have an equivalent of Function.identity()? " в комментариях и собирая плюсы таких же поехавших.
В качестве аргументов он предлагает:
1) сложна
2) хранить информацию о типах в рантайме означает что в рантайме придется хранить информацию о типах!!!
3) [s]ма-те-ма-ти-ка[/x] реф-лек-си-я
Причем ведь наверняка знает и про темплейты в крестах, и про то что шарп такой хуйней не страдает.
Fike,
05 Января 2021
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
In order to fund the development work on speeding CPython by a factor of five, something like $2M will be required.
This seems like a sizeable sum, but compared to the amount of money spent on Python development and the
cost of running Python applications, it is quite a modest sum.
---
The overall aim is to speed up CPython by a factor of (approximately) five. We aim to do this in four distinct stages,
each stage increasing the speed of CPython by (approximately) 50%.
1.5**4 ≈ 5
---
The interpreter will adapt to types and values during execution, exploiting [b]type stability[/b] in the program
---
Improved performance for [b]integers of less than one machine word[/b].
Improved peformance for [b]binary operators[/b].
---
Simple "JIT" compiler for small regions. Compile small regions of specialized code, using a relatively simple, fast compiler.
Extend regions for compilation. Enhance compiler to generate [b]superior machine code[/b].
питонисты готовят новую версию интерпретатора с революционной фичей - возможностью отъема денег у населения. Ожидается, что нововведение позволит языку быстро заработать очки на рынке пускания пыли в глаза.
https://github.com/markshannon/faster-cpython
Fike,
13 Ноября 2020
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
package java.util;
public final class Optional<T> {
public<U> Optional<U> map(Function<? super T, ? extends U> mapper) {
Objects.requireNonNull(mapper);
if (!isPresent())
return empty();
else {
return Optional.ofNullable(mapper.apply(value));
}
}
}
Они не только не знают, что else после if не нужен и лишь привносит лишний нестинг, они даже единый стиль расставления фигурных скобок выдержать не могут
Fike,
11 Ноября 2020
-
−1
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Возможно, вы разделите мою точку зрения насчёт того документа. Судите сами:
1. Это всё ещё Vue
2. Он закрывает основные потребности разработчиков
3. Разумеется, он избавляет от бойлерплейта
4. Документация — огонь
5. Большое, пассионарное сообщество
Спирт:
1. Его пьют
2. Вызывает эйфорию
3. Может использоваться в качестве жидкости
https://m.habr.com/ru/company/vdsina/blog/525382/
Fike,
04 Ноября 2020
-
−1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
https://www.npmjs.com/package/mkdirp
https://www.npmjs.com/package/mkdirp2
https://www.npmjs.com/package/mkdirp-classic
https://www.npmjs.com/package/mkdirp-infer-owner
https://www.npmjs.com/package/mkdirp-then
https://www.npmjs.com/package/mkdirp-promise
https://www.npmjs.com/package/mkdir-parents
https://www.npmjs.com/package/mkdir-p
https://www.npmjs.com/package/node-mkdir-p
https://www.npmjs.com/package/mkdir-p-bluebird
https://www.npmjs.com/package/mkdirt
https://www.npmjs.com/package/mkdir-native
Description:
Linux command mkdir -p.
Fike,
03 Ноября 2020
-
+2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
package java.nio.file;
public final class Files {
/**
* Convert a Closeable to a Runnable by converting checked IOException
* to UncheckedIOException
*/
private static Runnable asUncheckedRunnable(Closeable c) {
return () -> {
try {
c.close();
} catch (IOException e) {
throw new UncheckedIOException(e);
}
};
}
}
стандартные потрошки джавы это какая-то запредельная протомразь, нарушающая собственные законы физики и запрещающая делать это другим
Fike,
21 Октября 2020
-
0
- 1
- 2
- 3
- 4
- 5
- 6
// https://vk.com/login?u=2&to=YWxfZmVlZC5waHA-
$ echo YWxfZmVlZC5waHA- | base64 -d
al_feed.phpbase64: invalid input
$ echo -n al_feed.php | base64
YWxfZmVlZC5waHA=
Олимпиадники даже base64 умудрились пропатчить
Fike,
17 Октября 2020
-
+1
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
public static <T> Comparator<T> reverseOrder(Comparator<T> cmp) {
if (cmp == null)
return reverseOrder();
if (cmp instanceof ReverseComparator2)
return ((ReverseComparator2<T>)cmp).cmp;
return new ReverseComparator2<>(cmp);
}
кишки стандартной библиотеки йажи продолжают радовать, хорошо хоть нет ReverseComparatorFinal или ReverseComparatorBassBoostedByKirillXXL
Fike,
30 Сентября 2020
-
0
- 1
- 2
func verbMatches(p abac.Policy, a authorizer.Attributes) bool {
// TODO: match on verb
серёга, задолбал, давай уже в прод катить, потом свою авторизацию сделаешь
https://github.com/kubernetes/kubernetes/blob/master/pkg/auth/authorizer/abac/abac.go#L178
Fike,
28 Сентября 2020
-
+2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
REM I'm trying to do some simple webscraping in OpenOffice (I usually work in Excel but I'm trying to port
REM something over for a coworker that doesn't have Excel).
REM However, when I try to run something very similar to this, it keeps giving me this BASIC runtime error 1.
Sub Macro1
Dim explorer As Object
Set explorer = CreateObject("InternetExplorer.Application")
explorer.Visible = True
explorer.navigate("www.yahoo.com")
Const READYSTATE_COMPLETE As Long = 4
Do While explorer.Busy Or explorer.readyState <> READYSTATE_COMPLETE
Loop
dim page as object
set page = explorer.Document
dim mailButton as object
set mailButton = page.GetElementByID("ybar-navigation-item-mail") 'this is the line the error occurs on
mailButton.Click
End Sub
а чего бы нам не краулить сайты, запуская IE через BASIC в экселе
https://stackoverflow.com/questions/64010764/is-webscraping-with-openoffice-basic-even-possible
Fike,
22 Сентября 2020