!zxuuIkGnkVsHmINNAq:grin.hu

Programozás

62 Members
Beszélgetés programnyelv-függetlenül a programozásról, algoritmusokról, a programnyelvekről. Programozási problémák és megoldásaik. Tér (space): #magyarul:matrix.org #programozok:matrix.org Közösség (community, flair) +magyarul:matrix.org +programozas:matrix.org | Hungarian/magyar12 Servers

Load older messages


SenderMessageTime
12 Mar 2024
@bkil:grin.hubkilJa, és persze mivel az optimalizáció adaptív, csak bizonyos régi és bizonyos új hosszaknál lép érvénybe, így tele lehet tűzdelni printekkel, hogy pontosan milyen ágak kombinációira futnak a tesztek. Nem is merek belegondolni, hogy ezt hogy volna értelmes assertálni, de mivel hobbiprojekt, teszek mellé hidd-el-jeleket (via Haskell).13:50:05
13 Mar 2024
@bkil:matrix.orgbkil changed their display name from bkilm to bkil.07:40:25
@bkil:grin.hubkil /via #gemiweb0
https://gitlab.com/bkil/gemiweb/-/commit/fc9a8d9623f5458e3d1bdefdb9b053c05e5c081c#222a1605028e62dd00b5499abd5e3976e756e3e2_542_542
I've finally pushed the exponentially resized string mutation optimization. If you ever find an exploit within the PoC, this will probably be the point where we introduced it. 🙄 As mentioned, it is quite involved combinatorically, so it may need fixups later.
All tests of course pass with flying colors. 0 leaks or memory erros were found by Valgrind. It works with the picobrowser, the knowledge quiz, memo card, rockpaper and a yet unreleased CSV/JSON parser & generator benchmark (reimplementing secuchart soon with JS0). Without this, string escaping took O(n*n) in time, so even for such short strings it caused a 8x speedup!
This new string concatenation optimization uses existing syntax, but relies on special circumstances. Some are generic enough to document as guidelines later. The left hand side string should not be referenced (i.e., captured) outside the statement, only a chain of primitive variables are allowed on the right and the statement should not produce more than double the size (best go by pieces).
21:18:24
@bkil:grin.hubkil
You may find it inspiring how I could micro-optimize almost threefold a hotspot that escapes strings within JSON using simple, but effective tricks: https://gitlab.com/bkil/gemiweb/-/commit/73147dffbbc90e1f5c8887a893a243f1000c28e0#7644d56a97b8df41bd6bf29a706b5228c7529847_234_237

Some of them rely on internals of the PoC, but the spirit of most should transfer to any non-JIT implementation: do as little as possible on happy path within tight loops, minimize variable lookups (by coelescing statements), use constants instead of variables where possible, prefill a data structure with logic outside the loop, mutate the string via trivial concatenation, reduce variable scope.
21:18:30
@bkil:grin.hubkil
Another trick was to use a String as a lookup table. Object and Array is implemented as dumb linked list as of now. According to experience, this isn't a bottleneck: Objects with a huge number of properties on a single level are rare. You can still implement an associative data structure on top of such nested Objects pretty efficiently in JS0! Will fix this before the release, though.
21:23:50
16 Mar 2024
@bkil:grin.hubkil /cc #Fun #Programozás https://en.wikipedia.org/wiki/Tree_swing_cartoon
https://www.businessballs.com/amusement-stress-relief/tree-swing-cartoon-pictures-early-versions/
https://www.businessballs.com/amusement-stress-relief/tree-swing-cartoons-new-versions/
18:51:30
24 Mar 2024
@bkil:grin.hubkil find_shit 🤐 https://github.com/EnergyMech/energymech/blob/master/src/shit.c 12:29:50
26 Mar 2024
@bkil:grin.hubkil https://github.com/codeinthedark/codeinthedark.github.io
Code in the Dark is a front-end (HTML, CSS) competition, originating from Tictail, where each contestant compete to implement a website design given only a screenshot. The catch is that no previews of the results are allowed during the implementation, and no measuring tools can be used. The winner is decided by the audience.
18:59:34
27 Mar 2024
@bkil:grin.hubkil https://digination.dev/self-host-your-static-assets-css-wizardry-web-performance-optimisation/
Self-Host Your Static Assets
Risk: Slowdowns and Outages, Service Shutdowns, Security Vulnerabilities, Subresource Integrity, Network Negotiation, preconnect, Loss of Prioritisation
Myth: Cross-Domain Caching, Access to a CDN
13:22:23
28 Mar 2024
@bkil:grin.hubkil My bestest first commit ever: LICENES, README: add 08:33:53
29 Mar 2024
@bkil:grin.hubkil Never trust StackExchange:
https://stackoverflow.com/questions/26004519/why-doesnt-my-node-js-process-terminate-once-all-listeners-have-been-removed
Odd how nobody replied that the real solution is process.stdin.pause() and anything else is just a hack. https://nodejs.org/api/stream.html#two-reading-modes
For backward compatibility reasons, removing 'data' event handlers will not automatically pause the stream.
22:44:42
31 Mar 2024
@bkil:grin.hubkil https://suckless.org/sucks/web/
For short: There is an industry which is specialized on extending the resource usage to display just some characters on your display. Millions of jobs are based on outputting HTML in an inefficient way.
21:50:01
2 Apr 2024
@bkil:grin.hubkil https://github.com/wheybags/DungeonsAndDirectories/blob/master/how.md /cc #Programozás #Open Gaming Hungary
A text adventure that you play in your file browser
the current version of the game create 41,514 directories, 152,041 files (mostly empty files with messages in their names), and 45,399 links, which makes it rather unplayable for those unfortunate enough to try running it on a mechanical hard drive.
14:08:24
4 Apr 2024
@bkil:grin.hubkil I know this is a FAQ. It's sometimes hilarious how random websites use totally random font size and line height with sometimes up to 4x (!) in difference. Same goes for cutting off screen width arbitrarily per site. What if we just left this alone at its browser default? I'm on the verge of installing a UserCss to override this everywhere. Too bad column formation usually uses so nasty nesting & markup that it can't be done through CSS-only alone. And reader mode extensions sometimes introduce bugs themselves that you would generally want to avoid if you are browsing random web pages (not necessarily spending most of your time reading one of the top news sites). It shows a grave lack of competence how CSS actually has font-size: smaller, bigger, etc. to customize the design to your heart's desire, but then the boss hires a Photoshop "professional" who throws together a mockup from random places and the frontend dev is commanded to reproduce that jpeg with pixel-perfect fidelity, basically "painting it" with HTML! /cc #Web Design / Development 10:15:59
5 Apr 2024
@bkil:grin.hubkilchanged room power levels.12:20:36
@bkil:grin.hubkilchanged room power levels.12:21:57
7 Apr 2024
@bkil:grin.hubkil Valahogy sosem lelek rá, legyen így akkor egyben itt egyszer:
https://dist-bugs.branchable.com/software/
https://github.com/go-gitea/gitea/issues/6519
https://github.com/dspinellis/git-issue
https://github.com/MichaelMure/git-bug/
https://github.com/neithernut/git-dit/
https://mrzv.org/software/artemis/
https://github.com/sit-fyi/sit
https://gitlab.com/monnier/bugit
https://github.com/jeffWelling/ticgit
https://github.com/ktf/git-issues
https://github.com/bartman/git-case
http://travisbrown.ca/projects/nitpick/docs/nitpick.html
https://www.eharning.us/wiki/stick/
https://www.npmjs.com/package/ssb-issues
https://github.com/bestpractical/SD
A probably incomplete list of distributed BTS software using Version Control
These store the bugs in a version control system (VCS), along with the software that has the bugs. This allows bugs to be closed when a commit is made, and in some cases allows bug status to follow branches and merges.
Git-based decentralized issue management
directory, folder, repository, offline, portable, export, independent, backend-optional, flat file database, text, project tracking, reporting, comments, discussions, branch, metadata, pull request, Mercurial, status
10:38:26
8 Apr 2024
@bkil:grin.hubkil https://thejh.net/misc/website-terminal-copy-paste
https://www.ush.it/team/ascii/hack-tricks_253C_CCC2008/wysinwyc/what_you_see_is_not_what_you_copy.txt
https://reddit.com/r/netsec/comments/1bv359/dont_copypaste_from_website_to_terminal_demo/
https://news.ycombinator.com/item?id=5508225
Don't Copy-Paste from Website to Terminal
User iteraction based exploitation: WYSINWYC (What you see is not what you copy)
20:51:33
9 Apr 2024
@bkil:grin.hubkil https://blogs.nasa.gov/voyager/2024/04/04/engineers-pinpoint-cause-of-voyager-1-issue-are-working-on-solution/
Engineers Pinpoint Cause of Voyager 1 Issue, Are Working on Solution
about 3% of the FDS memory has been corrupted
could have been hit by an energetic particle from space or that it simply may have worn out after 46 years.
it may take weeks or months, engineers are optimistic they can find a way for the FDS to operate normally without the unusable memory hardware /cc #Programozás #Szép korú gépek
08:31:18
10 Apr 2024
@bkil:grin.hubkil https://webkit.org/blog/15249/optimizing-webkit-safari-for-speedometer-3-0/
Speedometer 3.0, a major update that better reflects the Web of today. It’s built together by the developers of all major browser engines: Blink, Gecko, and WebKit with hundreds of contributions from companies like Apple, Google, Intel, Microsoft, and Mozilla
https://webkit.org/blog/15131/speedometer-3-0-the-best-way-yet-to-measure-browser-performance/
Optimizing WebKit & Safari for Speedometer 3.0
improve the overall Speedometer 3.0 score by ~60% between Safari 17.0 and Safari 17.4. Safari 17.4 is also ~13% faster than Safari 17.0 on Speedometer 2.1
19:03:14
13 Apr 2024
@bkil:grin.hubkil https://webaim.org/projects/million/
The WebAIM Million
The 2024 report on the accessibility of the top 1,000,000 home pages derived from the Tranco ranking
An average of 56.8 errors per page. The number of detected errors increased notably (13.6%) since 2023.
Home page complexity increased significantly in 12 months, from an average of 1050 elements in February 2023 to an average of 1173 elements per home page in February 2024—an 11.8% increase.
top 100,000 pages averaged 1,424 elements—45% more
95.9% of home pages had detected WCAG 2 failures: Low contrast text, Missing alternative text for images, Missing form input labels, Empty links, Empty buttons, Missing document language.
55.6 images per home page on average, a 28% increase
21:57:55
@bkil:grin.hubkil https://webaim.org/projects/screenreadersurvey10/#finding
Use the Find feature, Navigate through the links of the page, Navigate through the landmarks/regions of the page
88.8% of respondents find [heading levels] very or somewhat useful.
The survey asked respondents to select their most, second most, and third most problematic items from a list:
CAPTCHA, interactive elements, links or buttons, screens that change, lack of keyboard accessibility, images without alt text, complex forms, improper headings, too many links, complex tables, inaccessible search, lack of "skip to main content"
21:58:06
17 Apr 2024
@bkil:grin.hubkil https://developers.google.com/style/word-list
Google developer documentation style guide - Word list
11:09:15
@bkil:grin.hubkil Introducing ChatGPT0/AI0! Yeah, I'm joking, but it's a small random 3-gram based text generator in JavaScript0. It is training on its own source code, so it may become the next SkyNet sometime. 🤷 /cc #gemiweb0 #Web Design / Development
https://bkil.gitlab.io/static-wonders.js/game/markov.htm
15:02:47
@tewuzij:beeper.comNguyễn Trọng Cường joined the room.16:01:26
23 Apr 2024
@bkil:grin.hubkil Ez mit ír ki?
var s='2'; console.log(s++);
20:49:12
@bkil:matrix.orgbkil https://www.bleepingcomputer.com/news/security/github-comments-abused-to-push-malware-via-microsoft-repo-urls/
GitHub comments abused to push malware via Microsoft repo URLs
Instead of generating the URL after a comment is posted, GitHub automatically generates the download link after you add the file to an unsaved comment, as shown below. This allows threat actors to attach their malware to any repository without them knowing.
Even if you decide not to post the comment or delete it after it is posted, the files are not deleted from GitHub's CDN, and the download URLs continue to work forever.
21:58:50
24 Apr 2024
@bkil:grin.hubkilRedacted or Malformed Event15:04:19
@bkil:grin.hubkil Fun fact. This rephrased version (which is compatible with #gemiweb0 ) prints something else!
var s='2'; console.log(s = s + 1);
15:04:34
@bkil:grin.hubkil A last hint is this one prints a yet different number than the former two!
var s='2'; console.log(++s);
15:10:13

There are no newer messages yet.


Back to Room ListRoom Version: 5