I’ve been #programming in #VB6 #python #rust and the occasional easy #c project for close to two decades.
Still can’t figure out how #css works.
Кстати о. Есть ещё один способ получить даже более вдохновляющие результаты. Однажды мне потребовалось написать функцию, которая берёт байтовый буфер и форматирует его как в Hex просмотрщиках. Через строку всё делается очень просто, но очень долго. Всякие оптимизации не давали прямо радикального ускорения. Поэтому я написала функцию, которая сначала вычисляет размер байтового буфера, в котором будет содержаться ANSI строка, а потом по байтикам собирает эту самую строку. Быстродействие в результате такое, что даже реально большие массивы (по паре сотен метров) форматируются за считанные секунды. Главный минус – читается это не очень хорошо, нужно напрягать мозг после перерыва, чтобы понять, что происходит. Я хотела сделать такое же, но для генерации UUE, но до сих пор духа не хватает, хотя вариант со строками написала быстро и даже оптимизировала в итоге. #программизм #vb6
В последнее время я начала присматриваться к быстродействию своих программ в части операций с коллекциями и строками. Одну библиотеку радикально оптимизировала, например, применив новый для себя метод перечисления сразу двух коллекций одновременно (функциями из MSVBVM60.DLL, которые на самом деле стоят за For-Each, но избавляют от прямого взаимодействия с IEnumVARIANT). А началось с того, что меня до ужаса достала программа, парсящая логи ownCloud. Она сначала читает из файла идентификаторы обработанных сообщений в логах, потом парсит необработанные сообщения в файле лога, делая из JSON'ов в JSON'ах читаемые сообщения, сохраняет их в файлы сообщений и снова записывает файл с обновлёнными идентификаторами. И пока всё это продолжается, скрытое окно программы не обрабатывает сообщения, и всякие проводники, рассылающие широковещательные сообщения, вешаются при попытке открыться. Ранее я уже в программе снижала приоритет, чтобы не так грузило процессор. В этот раз я решила напихать DoEvents между обработкой JSON'ов, кою считала основной проблемой. Но оказалось, что загрузка списка занимала меньше секунды, парсинг – меньше секунды, сохранение списка – две-три минуты. Да, там была коллекция, которая долго перечислялась через индекс, а текст наращивался простым «TXT = TXT & Item». Поэтому я сделала так чтобы перечисление шло через «For Each», а текст собирала через Mid() в заранее выделенную строку, длину которой вычисляла отдельным перечислением. В результате программа вместо нескольких минут работает в районе секунды. Можно сказать, вдохновляющий результат! #программизм #vb6
The following table contains possible examples of msvbvm60.dll being misused. While msvbvm60.dll is not inherently malicious, its legitimate functionality can be abused for malicious purposes.strontic.github.io
Reverse engineering VB binaries will often involve reverse engineering VB internals for various VB APIs, a task dreaded by many. The entry point of a VB program diverts from the typical C/C++ or even Borland Delphi binary. There is no mainCRTStartup or WinMainCRTStartup function that initializes the C runtime and calls the developer defined main or WinMain function.rel="nofollow">blog.talosintelligence.com
I know I'm very much reinventing the wheel here, especially because the wheel has been abandoned and whatever they're calling wheels these days require a supercar and a subscription at minimum to use and no one can build a wheel any more without a hundred people and a plan to burn money until a vulture swoops in to buy the burning husk for how bright it doth shine.
I *wish* this wasn't necessary, like I could just write some UI code and it'll run on any platform and it'll continue to do so forever no matter what new thing they add further down the line. Oh, wait, that already exists! It's called Visual Basic 6! I could write a GUI [to track the IP] in VB6 right now and it would run on Windows 95 through Windows 11 and via WINE on *nix.
Microsoft went on a bit of a bender in the 90s with COM, their object model, but they had the right idea if only lacking in execution (ActiveX...). If you want to embed a web-browser in your app you hook into the COM object and you're away. Different programming language? Doesn't matter. Different OS? Doesn't matter. Different *Endiness*!? Doesn't matter. Different physical location than the object? Doesn't matter, it works over the network!
Software is less modular than ever before; now "modular" just means the programmers used folders this time! Want to render a LibreOffice document inside your app? A PDF? A media player? How many years you got left?
I first wrote my own text editor around 2001 using Visual Basic 6 and I used that editor, on Windows, *until VSCode was released in 2016* because #VSCode was the first non-crap Windows editor, and that might seem like a weird thing to say nowadays but in the Before Times, the best text editors in the world were on #Mac because that was the only market where developers cared about software quality and people would actually pay money for it, at all.
Windows was known for piracy and open-source software was basically unusable on the platform. We really, really have come a long way. Remember Atom? They asked the question "what if we wrote a text-editor in JavaScript?" (even worse, coffescript) and the answer was, unsurprisingly, a text-editor slower and less responsive than a teletype. VSCode was literally the first text editor on Windows to successfully copy TextMate.
But even now, one reason I stuck to my editor for so long was because it's the only editor, before or since, where the list of folders and list of files are separate which prevents things jumping around like crazy all the time and it's a feature I still lament the loss of.
Programadores quejándose porque los asistentes con IA les aturden con sugerencias al escribir el código y yo, aquí, añadiendo funcionalidades a una aplicación en #VB6 😅
https://www.windows98.website
visual basic 6, faithfully recreated for the web
#vb #win98 #nostalgia #visualbasic #vb6 #windows #windows98 #vb6 #netart #demo #nerdlife
BTW Here’s a modern open-source, regularly updated, portable image editor written in Visual Basic 6 that runs on XP and up and outperforms GIMP: https://photodemon.org/
I’m building a #VB6-style interpreter in #FreePascal! 🎉
It parses & runs `.BAS`-like code with support for classic keywords like `Dim`, `If`, `For`, `Sub`, `Goto`, `Print`, and more.
✅ Done:
`If/Then/Else`, `Goto`, `Sub`, `Call`, `Input`, `Print`, `For/Next`, `Do While`, etc.
🔧 In progress: `ElseIf`, `Select Case`, `Exit Sub`, `Const`, loops
🚧 Next: `Function`, `Return`, `Gosub`, `File I/O`, `Type`, `Error Handling`
@babble_endanger #FreePascal runs on #MSDOS, 9x, XP and up, #PowerPC MacOS and lots more. Heck, VisualBasic 6 #VB6 runs on 9x thru Win11 and is more stable an ABI on #Linux via Wine than Linux apps have. #Rust ’s problem is a matter of will; a turning up of the nose of anything that isn’t “current” — a moniker they haven’t realised they don’t control; that’s in the hands of Microsoft, Apple, Google etc.
Не, я знаю, что For Each, не смотря на использование варианта, работает быстрее, чем просто For с индексом, но чтобы настолько... Коллекция, 240 тысяч элементов типа Long, с которым в цикле производятся действия (коллекция перегоняется в массив). For с индексом пережёвывает коллекцию за тридцать-сорок секунд. For Each проносится по коллекции за 0.12 секунд. #программизм #vb6
amazing day at work today!!!
setup vb6 enterprise in a virtual machine (💀) so myself and my coworkers can actually make bug fixes for one of our apps we maintain
because im so cool, i got it working in 6hr and fixed the CI/CD scripts because someone deleted them by accident
(for context, that piece of software is extremely important at my work and is at least a few years older than me. and it's so god damn fucking cursed)
Я тут пишу кое-что, и снова столкнулась с такими мерзкими, но неизбежными вещами, как байтовые буферы, в том числе запихнутые в строки. Всвязи с чем два наблюдения.
1. У VB нет встроенных механизмов, чтобы скопировать часть одного байтового буфера в другой. CopyMemory().
2. Строки в VB – юникодные, но могут быть ANSI, если хорошо попросить. Понять, в каком формате строка, очень трудно, но сам VB знает, что там внутри. #программизм #vb6