[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]

/hob/ - Hobbies

Video game related hobbies go on /games/
Password (For file deletion.)

  [Go to bottom]   [Catalog]   [Return]   [Archive]

File: 1613143570126.jpg (515.77 KB, 1196x1178, 598:589, frog.jpg) ImgOps iqdb

 No.56871[View All]

158 posts and 24 image replies omitted. Click reply to view.


Yes. You can write korean, chinese and japanese without space and people will still be able to read and understand it.


File: 1644523353367.gif (1.03 MB, 500x550, 10:11, 1644444674460.gif) ImgOps iqdb

typedef struct closure {
    int (* lambda)(struct closure *);
    int id;
} closure;

int add(closure *e)
    return e->id += 1;

#define eval(e) e.lambda(&e)

int main()
    closure e = { add, 0 };

    printf("%d\n", eval(e));
    printf("%d\n", eval(e));

    return 0;

I'm the functional programmer now


One way to deal with the code versus floating image layout issue >>61137 is:

pre.code { clear: both; }



very 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


File: 1646064949937.png (398.35 KB, 757x1085, 757:1085, bwuh.png) ImgOps iqdb

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:


#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);



#include <sound.h>

private integer play_sound(sound a)
    return Mix_PlayMusic(a.sound, 1);

private void free_sound(sound a)

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.


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.


I 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.


File: 1646833162293.jpg (2.81 MB, 3000x3000, 1:1, 1646594109485.jpg) ImgOps iqdb

Scratch is the the strongest programming language.


File: 1646888135518.png (5.79 KB, 1000x500, 2:1, grasshopperLogo.png) ImgOps iqdb

This might a bit retarded but whatever, I have been wanting to learn coding/programming for a while now and it seems like the youtube algorithm has finally caught up with that because they keep recommending me this app for programing (pic related). Does anyone here know if it is good for beginners or is it trash?


I tried it, didn't help me
These "Learn this" apps aren't really helpful

You're better off starting with a bit of pseudocode


i dont get the python one


Thanks for the recommendation, anon.


The cable is a snake, the succubus is dancing to hypnotize the cable-snake. Like those pungi players charming snakes.


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


File: 1647701286742.png (679.98 KB, 1024x768, 4:3, 2022-03-19.png) ImgOps iqdb

>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
It'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.


File: 1648231227422.png (268.44 KB, 1024x768, 4:3, 2022-03-25.png) ImgOps iqdb

Added 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.


File: 1648571686107.png (861.55 KB, 1024x768, 4:3, 2022-03-29.png) ImgOps iqdb

Now 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 pressed
Anyway, I'm really happy now it's usable, this is much nicer to use than my first attempt.


the university should be able to offer significant help with finding an internship if it's a requirement


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.


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


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


File: 1650747502062.png (5.51 KB, 631x90, 631:90, ClipboardImage.png) ImgOps iqdb

i thought youtube-dl and youtube-dlc were just slow garbage but it seems youtube throttles them, because yt-dlp isn't throttled. never heard of yt-dlp but it works interchangeably with commands for both youtube-dl and dlc


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


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.


File: 1651153094473.png (602.69 KB, 1280x720, 16:9, debil.png) ImgOps iqdb

>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


man 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


in 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


yeah 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


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.


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.


File: 1654063439699-0.png (48.75 KB, 1243x682, 113:62, ClipboardImage.png) ImgOps iqdb

File: 1654063439699-1.gif (536 B, 16x16, 1:1, test side walk.gif) ImgOps iqdb

not hardcore but it is still programming. making a simple sprite character creator for myself. will have selection side and then a preview side. 18 graphics can produce an idle/walk animation for cardinal directions, with head/face/chest/legs sections. should be much more but you can flip the east/west sprites among other things. so you pick different body parts and it displays the character to the right, either idle or walking, and rotated facing whichever direction, then you can export that as a sprite sheet… to get a variety of parts to test i just hue shifted the colors from a single actual sprite. one problem i noticed though is that different skin tones don't work when you include clothing and bodyparts/skin together. i'm thinking just making skin color in the actual sprites 00FF00 and then basically chroma keying it to whatever color is selected. the alternative is doubling the graphics required and creating naked versions of everything so you have a layer of skin underneath the clothing but that sounds too annoying


File: 1654240164086.png (772 B, 64x64, 1:1, ClipboardImage.png) ImgOps iqdb

well it outputs correctly. using imagemagick to create all the graphics is fun. maybe because i did art long before learning programming, but the idea you can easily automate this sort of stuff with a few lines of code is just very cool and satisfying


File: 1654240891181-0.png (741 B, 64x64, 1:1, ClipboardImage.png) ImgOps iqdb

File: 1654240891181-1.png (824 B, 64x64, 1:1, ClipboardImage.png) ImgOps iqdb

File: 1654240891181-2.png (603 B, 64x64, 1:1, output.png) ImgOps iqdb

…well that is an interesting bug. first pic is copy/pasted from nomacs image viewer. second pic is copy/pasted from paint.NET. third is actual image upload. i can't explain how they are all different, but i can see them in the file attachment thumbnails as i type this


that's super neat


File: 1656598313969.jpeg (281.49 KB, 1200x671, 1200:671, 46a27943d330b372d0d2b033f….jpeg) ImgOps iqdb

>there's no difference between a c string and c array besides arrays can have 0s anywhere in them
>there's no difference between a lisp string and lisp symbol besides strings can have spaces or parens in them
more programmers need to ask about the sq (the string question)


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


File: 1656706915722.jpg (38.57 KB, 235x314, 235:314, Alonzo_Church.jpg) ImgOps iqdb

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. ;)


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


AdBlock? No Javascript? A function key like tilda is in an always-pressed state on your busted keyboard?


doesnt 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


File: 1657025978313.png (346.81 KB, 662x662, 1:1, 7bdcc21010f5b119ab46e69be9….png) ImgOps iqdb

that'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


the 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


it'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


damn this is cool


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.


Anyone here remember wizmud? I would like to revive it, maybe I should contact the dev? I would only take the models though.


oh nevermind I just digged and found there's a Patreon and it's alive-ish


File: 1660098546650.gif (2.72 MB, 600x338, 300:169, 1523886380191-0.gif) ImgOps iqdb

ah thats the fucking name. ive been trying to remember that thing for the past 3 years or something


I remember playing videos that I thought where cool when I was younger and annoying older wizards


anyone 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]
[Go to top] [Catalog] [Return][Post a Reply]
Delete Post [ ]
[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]