No.61093
>>61082Yes. You can write korean, chinese and japanese without space and people will still be able to read and understand it.
No.61155
One way to deal with the code versus floating image layout issue
>>61137 is:
pre.code { clear: both; }
No.61278
https://pastebin.com/jUBzn7vCvery random but i wrote a bot for roblox tower defense simulator last night. it is a game i occasionally play with my sister's kids when i watch them over the weekends
the problems :
- you spawn into server in 1 of 8 random spots. i pixel search to orient the bot and then do a preprogrammed movement to reach a game lobby
- need to figure out what map you are playing on. i capture the map title region and imagemagick compare it to other map title images to figure what map is loading
- every map is different with different valid/invalid tower placements. for this i made an .ini with [sections] of each map containing valid tx and ty tower coordinates to place the tower on screen. so once map is figured out you get those coordinates.
then it is a matter of just continuing to upgrade the single tower, skip levels when prompted, and waiting for defeat since it is only a single tower. it earns 1000 coins per hour which is pretty good. so now i don't have to grind this game anymore to not disappoint the kiddos when i have shit towers. it wouldn't be too hard to add more valid tower placements but the coin/hour ratio is fine there's no reason to waste any more time on this
this reminded me when i used to make pixel searching bots for old school runescape, that's how i learned to program a long time ago
No.61333
What do you think of this style of C? Do you rike it?
#include <io.h>
#define symbol(name) name ## __LINE__
#define defer(begin, end) \
integer symbol(i) = 1; for (begin; symbol(i); --symbol(i), end)
integer main(integer count, byte **vector)
{
defer (file temp = open("meme.c"), close(temp))
{
defer (byte *buffer = malloc(temp.length), free(buffer))
{
fread(buffer, sizeof(byte), temp.length, temp);
// do thing with buffer
}
}
return no_error;
}
The defer macro pollutes the outer scope with names like i12 and i14, but it seems necessary to be able to make additional assignments within the for loop initializer.
for (integer i = (file temp = …, 1) doesn't work, for instance.
I've also been trying to isolate stuff better across header files:
include/sound.h
#ifndef SOUND_H
#define SOUND_H
#include <SDL2/SDL_mixer.h>
#include <io.h>
record sound {
integer (* play)(struct sound);
void (* free)(struct sound);
Mix_Music *sound;
} sound;
sound new_sound(string file);
#endif
include/sound.c
#include <sound.h>
private integer play_sound(sound a)
{
return Mix_PlayMusic(a.sound, 1);
}
private void free_sound(sound a)
{
Mix_FreeMusic(a.sound);
}
sound new_sound(string file)
{
return (sound)
{
.play = play_sound,
.free = free_sound,
.sound = Mix_LoadMUS(file),
};
}
So now you can say
defer (sound a = new_sound("bang.opus"), a.free(a)) { a.play(a) } and the sound carries its own methods and cleans itself up.
No.61334
is there a way using notepad++ to automatically correct specific words as i misspell them?
for example GameOBject > GameObject
i type it this way almost every time and my brain doesn't seem capable of telling my left thumb to release shift after typing O. the spellcheck plugin doesn't automatically correct. autocomplete is also weird i dont like tools that try to finish what im typing or show popups with text. that's the whole point im using notepad++ and not a fancy ide.
No.61366
>>61334I haven't used npp before but apparently it has a plugin system (
https://npp-user-manual.org/docs/plugins/#how-to-develop-a-plugin). Here's how I'd do it incrementally:
1. download example plugin, build and run it (probably hardest part)
2. modify plugin with an array like { "abc", "def", "ghi" }, insert a string from the array when you press a key
3. fuzzy match between strings in the array and text under cursor, insert closest match
4. populate array from ctags, which runs whenever you save a file
It may sound like too much effort to implement your own autocorrect, but once you've done it you can extend it to do whatever you want. You could also make npp jump to definitions from the ctags file, or open your browser to search text under the cursor, as examples.
No.61429
>>61421>>61421I tried it, didn't help me
These "Learn this" apps aren't really helpful
You're better off starting with a bit of pseudocode
https://pseudocode.deepjain.com/ No.61434
>>61408i dont get the python one
No.61441
>>61429Thanks for the recommendation, anon.
No.61444
>>61434The cable is a snake, the succubus is dancing to hypnotize the cable-snake. Like those pungi players charming snakes.
No.61515
twitter denied me a developer account years ago because "automatically downloading tons of porn" wasnt a good enough reason in their opinion. turns out you can just use other twitter front ends, and while i would like json output, at least these websites aren't single-page javascript turds like twitter. try to look at the html of twitter. it's not even human readable. Reactjs is fucking gay. it's also these javascript websites that have weirdly autogenerated obfuscated elements and names that make adblocking difficult sometimes
No.61556
>>61515>try to look at the html of twitter. it's not even human readable. Reactjs is fucking gay. it's also these javascript websites that have weirdly autogenerated obfuscated elements and namesIt's really bad. If you scroll down twitter the next block of posts is returned as a (deeply nested and garbled) json response based on scrollbar position, then that response is appended to the dom with javascript. It's designed to be slow and hard to scrape. Thankfully, like you say, people have made better public apis.
I've been porting my image/booru viewer from lisp to c. The initial port used sdl, but it's 2slow4me so I'm using plain opengl now. The first problem I encountered was managing the limited number of texture units on the gpu, which sdl does for you, because there are more image thumbnails than texture units. In the screenshot the 512:512 texture is uninitialized memory, then the unordered thumbnails are stamped in the texture using shelf next fit. Tomoko on the right is drawn using the normalized uv coordinates returned from the function.
Also, I like the opengl 1 api better than the newer versions. You should be able to open a port and stream instructions to the gpu, or do it the ogl 1 way. The newer stuff overcomplicates things. Different stages of the modern pipeline could be exposed as registers instead of the inout parameters in shaders for example, it would be simpler and faster.
No.61602
>>61556Added text stuff and asynchronous autocomplete with caching.
The main problem I had was my string pool used realloc to resize the pool, but I forgot you may lose anything that was pointing into the previous allocation, so my strings would get overwritten with server responses, and the async stuff would write into freed memory and crash the program. The fix was to expand the pool by putting new allocations in a list, so they don't change over the lifetime of the program.
No.61631
>>61602Now we can browse pages and download stuff.
There's not much new functionality. The program just extracts the necessary fields from each post (if they exist), compares them to a cache of posts, and if we don't have it download/decode the thumbnail, adding it to the texture atlas. The draw list just points into the cache and is assembled on the fly. Most of the speed improvement in this area is from using persistent connections and decoding jpegs in parallel, but we're ultimately limited by the speed of the server (200-300ms) unless the cache is hit.
The program is basically finished, but there are still lots of refinements to make:
>be able to navigate by rows (the program just blindly draws until it reaches the edge of the window, so it has no idea what a row is)>center thumbnails vertically>rendering is incredibly slow, we spend 3ms making 352 opengl calls just to draw a page, it can be sped up by throwing all vertices/uvs in an array>maybe prefetch the next page to make browsing faster>add a download queue, instead of blocking the program like a retard every time `d' is pressedAnyway, I'm really happy now it's usable, this is much nicer to use than my first attempt.
No.61690
>>61689
the university should be able to offer significant help with finding an internship if it's a requirement
No.61691
>>61689
I got 200 rejections and was only given the chance at one job interview that I also failed. 2:10 is an incredibly ratio imo.
No.61705
im figuring out the mes file format used in harvest moon and similar games. i googled it and can see other people have done this, but there doesnt seem to be anything working for river king on ps2 (harvest fishing). i already can mod the audio of this game, changing the dialogue now would be cool
No.61788
ffmpeg -y -f dshow -i video="webcam" -frames:v 1 "test.jpg"
this saves a photo from the first webcam connected to pc… ffmpeg always impresses me. literally anything to do with audio or video, it is possible using ffmpeg. and for images, imagemagick. i might build a little time lapse photography box thing and record plant growth or something fun
No.61895
how do i add this
https://github.com/dlemstra/Magick.NET to unity? i can't find any dll or binaries or anything. it says i need to either build it myself, or use nuget. i googled nuget and it's a website and i found magick.net on there but it downloaded a nupkg file. i googled what the hell is a nupkg and it says it's used by visual studio. do i really need to use that collossal bloatware garbage? i like using np++ to write code
No.61896
are there any boards out there that focus around technology/coding? something like /g/ but a whole chan for it, if there are any i'd love to hear about them.
No.61897
>>61895>it says i need to either build it myself, or use nuget.nuget is presumably a package manager for wangbows. all it will do is pull down the source and dependencies for imagemagick and build it. you can see what's happening at a high level by reading the build scripts in your link (for instance Magick.NET/src/Magick.Native/build/Build.cmd, install.ps1)
>it's used by visual studio. do i really need to use that collossal bloatware garbage?you don't need to use visual studio's compiler and linker (cl.exe), you can use whichever c compiler you want to build imagemagick. on wintoddler 10 this will likely be mingw or clang
the instructions for what you want to do are literally in your link, it's just a remarkably badly written wrapper library (i lost my patience when i saw xml in comments), so you'll have to invest some time into examining how dlemstra builds imagemagick and creates a c# binding for it to integrate it into unity. the main difference will be instead of using whatever datatype dlemstra defines for wrapping imagemagick's representation of images you will use unibabby textures instead
No.61899
>>61897man i hate the process of building from source. i know some people find that fun. i find it tedious and it pisses me off when people don't just include compiled builds with releases
i will probably just bundle imagemagick with my unity prject and use it by creating and running batch files. this breaks compatibility for linux and mac though
No.61901
>>61899in the case of a batch/shell script, you'd just check to see if the user has the program installed, but there are more efficient ways without invoking a shell: you could either run the program as a sub-process, or dynamically link against the imagemagick library (.dll on wangbows, .so on loonux) and use c#'s foreign function interface
No.61902
>>61901yeah i know how to run batch files on window as a subprocess and have the window and output hidden. i'm not going to bother trying to oop-ify the process of feeding parameters into an external program, the imagemagick commands are simple enough. thanks
No.62085
What are some cool things that I can do with C++ available libraries. I can’t really find much other than SFML and JUCE that doesn’t require knowledge in another field like ML or Embedded.
No.62145
I did a quick programming course that took 9 months and I've been working as a web developer for four years. I use an outdated technology and I sort of feel like an impostor compared to people who formally studied this in university.
No.62303
scheme@(guile-user)> (string->symbol "sp ace")
$1 = #{sp ace}#
scheme@(guile-user)> (symbol? $1)
$2 = #t
scheme@(guile-user)> (eq? $1 (string->symbol "sp ace"))
$3 = #t
solution for double escape: 08/24/21
https://wizchan.org/meta/res/60390.html#60449 (pruned) →
https://github.com/towards-a-new-leftypol/leftypol_lainchan/commit/217e873e88f595a0ad7fedfeff40b08924e0701d No.62308
Bit of harmless fun:
1. Outside code blocks:
scheme@(guile-user)> (string-any #\; "->")
$1 = #f
2. Inside code blocks:
scheme@(guile-user)> (string-any #\; "->")
$1 = #f
So as you can see, while untyped wizchan calculus might be consistent within its domain, it is inconsistent as a deductive system. You don't even need fixed-point combinators to prove this, all you need is a code block. ;)
No.62327
not programming, but there is no general tech/software thread. does anyone know what would cause drop down menus in firefox to stop working?
for example, when making a post on wizchan, the email selection has a dropdown. no menu displays for me though, i have to click somewhere on it, then press left/right arrow to select something. it's been like this for maybe 5 years so i'm used to it, but every now and then i am reminded of it. like signing up for websites, picking my country/state is always annoying. i have to type 'u' to jump to countries starting with u and then click right a few times to reach usa
No.62328
>>62327AdBlock? No Javascript? A function key like tilda is in an always-pressed state on your busted keyboard?
No.62335
>>62328doesnt seem to be adblock or any addon, persists with everything disabled. i don't think tilde is pressed i bind it for games often. i've changed keyboards within the last year also
No.62340
>>62327that's an unusual problem. you could have a look in about:config at dom.forms.select and see if anythings been changed, and some people using newer compositors suggest it may be hardware acceleration which you can try unchecking under settings > general > performance
i'd also check your userChrome.css and userContent.css (or any themes) to see if there's any styling that may interfere with select dropdowns
No.62341
>>62340the profile css stuff is fine. and that particular config is ok. i just have too many configs set it has to be one of them, if i check 'show only modified' it shows almost 1000. a lot of it is to disable telemetry, sensors, popups, notifications, pocket, etc but a number of problems including this dropdown thign have appeared, like being unable to update addons or the browser itself. the next logical troubleshooting step is probably just to reset the about:config to default to see if that fixes it
No.62342
>>62341it's normal to have so many configs changed, but it may just be after 5 years there's a config conflict as firefox has changed. you could save yourself some time by either trying help > troubleshoot mode to reset all settings temporarily, or go to about:profiles to try running firefox with a fresh profile (you can also do this by running firefox -p in a shell) if you're curious, about:about lists everything
or it could be something completely unrelated, like the doubleclick interval on your mouse being so short it opens/closes select menus instantly, but you would have probably noticed that long before
No.62343
>>62342>about:aboutdamn this is cool
No.62390
what’s a good way to host images? I want users to be able to upload images. I’m running a django back end btw hosted on postgre.
No.62509
Anyone here remember wizmud? I would like to revive it, maybe I should contact the dev? I would only take the models though.
No.62510
>>62509oh nevermind I just digged and found there's a Patreon and it's alive-ish
No.62526
>>62509I remember playing videos that I thought where cool when I was younger and annoying older wizards
No.62527
>>56871anyone curl into their netgear? there is a authorization popup thing that displays within browsers for logging in, i'm having trouble getting anything to work. i originally thought you could just pass the username/password with the url and from then on supply requests with whatever cookie or authorization info it returns for interacting with the rest of the site. not so
[View All]