[ 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/
Email
Comment
File
Embed
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[Last 50 Posts]

 No.56872

Any users of clojure around here? Apparently, it requires the fewest lines of code to write programs of any general-purpose language and has performance on par with Java. It utilizes the JVM and thus is multiplatform in the same manner as Java. It sounds very good on paper.

 No.56887

reddit has a json request thing. pretty convenient once you know. i was wondering how the fuck you scrape reddit or any other modern dynamic webpage bullshit.

i made something to scrape reddit porn videos so i can upload them to bitporno as an experiment. i do a json request for each subreddit and regex the particular video ids, check if its been downloaded before, then if not download them and log it. i added 30 subreddits. they were found on a redditlist website or something that shows nsfw reddits. i just went through the top ones and ctrl-f 'redgif' to see if they use it or not. some reddits dont, others are flooded with it, pretty weird. i ended up with some 12gb of 600 videos downloaded

i was wondering whether deliberate and accurately named videos matter. ill do a crude ab test with 100 vids i personally name, and then 100 vids that i try to scrape a name or maybe generate something. probably the time saved by auto naming and sheer bulk of uploads will more than make up for the decrease in individual views. but i will see

 No.56888

>>56872
it's some kind of lisp with awful error messages, you pretty much need to know java to make use of it

 No.56943

>>56872
It's been over a decade since I last ran a jvm/java program.
Android notwithstanding, which is Dalvik and not JVM and I am not aware of a clojure->dalvik compiler.

 No.56957

>>56888
>>56943
Ended up going with Haskell instead. Decided I wanted to try a pure functional language instead. Clojure "cheats" by being multi-paradigm. Haskell certainly is different from anything else I have used. The lack of loops is jarring, but the compiler magically makes recursion work somehow. Fewer lines of code are needed compared to using an imperative language. It's well suited to something like Project Euler. Some problems can be solved with a single line. Very little or no time is spent debugging (so far). I will have to try making something serious and see how painful of an experience it is.

 No.56960

File: 1613627548077.jpg (26.49 KB, 1280x720, 16:9, ebd39b53523038b14de47ef317….jpg) ImgOps iqdb

Any web developing wizards and do you do it as hobby or professionally?

I would like to collaborate in some small projects but I still feel to incompetent to collaborate on big open source things.

I could help you with tasks in your projects.

I work LAMP stack and JS as well as some basic Python, but basically I work laravel APIs and frontend JS most of the time

 No.56967

>>56957
look into tail call optimization for performant recursion (compiles into a normal loop)

 No.57048

Still debating whether or not to learn Haskell. The language most likely isn't going to land me a job ever (not that I could get one even if I did all the right things) nor am I convinced of its usefulness (if it were any good, home come nobody uses it?).

I've moved on to trying to create a utility to convert a directory of files into a .d64 (commodore 1541 drive) disk image. I'm certain tools already exist for this but I just want to see if I can do it. I'm trying out a c cross compiler for 6502-based systems and I want to see stdio.h file IO in action but I need a way to get text/binary files into a disk image. I will try to write my utility in C. I'm more and more drawn to languages with minimal syntax and small libraries that I could potentially memorize so I don't have to be googling answers or reading reference all the time. I don't think what I intend to write at any point in the near future would be complex enough to necessitate the use of something like C++.

 No.57082

>>57048
Definitely don't bother.

 No.57096

Ended up using an existing d64 editor. I then spent several hours trying to figure out why my program wasn't loading a text file properly. Turns out, you have to edit the text in an editor designed specifically for C64 SEQ files. Using a standard editor in Windows causes byte-order information to be prepended to the file and zeros to be injected between letters and no amount of fiddling with vim or xxd seemed to remedy this.

The library code needed to do a simple fopen is almost 7K. Such is the cost of convenience.

 No.57275

File: 1615024842441.gif (172.07 KB, 600x69, 200:23, lines.gif) ImgOps iqdb

Just starting learning C, also curses (library for terminal graphics).

https://pastebin.com/APQgLRA6
compiled on linux with gcc -l cursesw [file]

 No.57276

>>57275
Nice. Might want to declare the return type of your functions. You're dividing by zero at both ends of your i loop. And do you really need the second string.h?

 No.57279

File: 1615052867362.jpg (117.83 KB, 1024x1024, 1:1, tsugu.jpg) ImgOps iqdb

>>57096
>The library code needed to do a simple fopen is almost 7K.
The load routine from the c64's rom is located at ffd5. Basic's diskette load routine is at e168-e1bd, 85 bytes. You may be able to invoke the routine directly, in which case the read file will start from where the load vector at 0330 points, or you could port it to your program in inline assembly. You wouldn't have access to fseek, ftell, etc, the file would just be a array of bytes, but it'd be simpler.

https://www.pagetable.com/c64ref/kernal/#LOAD

 No.57280

>>57279
Are you the wizard that makes money by salvaging electronics and reselling the parts online?

 No.57285

File: 1615123061780.png (29.72 KB, 258x247, 258:247, 1611907411949.png) ImgOps iqdb

How can I design a decentralized imageboard with one ruler/benevolent dictator? I'm developing a IB engine and want to make it decentralized, so anyone can host a engine node and share the imageboard database and files. All IPs are hashed with a secret key, the files can be shared across multiple nodes with IPFS and the database can be shared by a simple rsync-like protocol with checksum. Each node can act as gateway to the imageboard's contents (boards, threads, posts, files). It's how I thought it can be, however I still don't know how I can ensure that only one person, or a group, has control over banning and deleting posts, I don't want faggots to simply join the network and delete or ban content.

 No.57299

>>57279
>Basic's diskette load routine is at e168-e1bd, 85 bytes
This is precisely why I have already given up on trying to use C. I could always just include data right into my prg file and not even bother with loading anything from disk. I feel silly programming the c64 anyway. It's like the furthest thing from being practical that I could have chosen. I need to eat.

 No.57317

>>57285
I don't know the technical answer, but engineering a decentralized IB with a single point of failure doesn't seem wise. If you don't want a decentralized system taken over by those who would ban or censor, then don't give them that power to begin with.

 No.57318

>>57285
I might be out of my depth here, but have you considered using something like a blockchain?

You can treat the database as a chain of consecutive changes (transactions) on an imageboard. An imageboard is just a public-private key pair that an admin/owner can generate and use to sign and verify his ban/delete transactions.

(1) User posted 34 chars on imageboard with public key #123871237
(2) User posted 12 chars on imageboard with public key #123871237
(3) User posted 54 chars on imageboard with public key #123871237
(4) Admin removed transaction (2) on imageboard with public key #123871237 (signed with private key of imageboard)
(5) Admin banned IP hash #1987231 on imageboard with public key #123871237 (signed with private key of imageboard)
(6) User posted 127 chars on imageboard with public key #123871237

Nodes can receive transactions and relay it to other nodes. If it's an ADD transaction, they check the ban list before accepting and relaying. If it's a REMOVE or BAN transaction, they verify the message with the imageboard public key (which serves as its ID as well) and then relay it to other nodes. Clients can ask a node to send transactions from the beginning or from a certain version number and then build the current version of the imageboard database by stacking transactions (initially takes a while, but then relatively fast).

The problem is that removed transactions aren't really removed, but are simply hidden (the client can still choose to see deleted posts by ignoring REMOVE trans. and dishonest nodes could still relay messages from banned users). I guess it doesn't really solve your problem, but I think it's somewhat in the right direction as a solution.

 No.57349

>>57317
>engineering a decentralized IB with a single point of failure doesn't seem wise
Yes, I know, wizard. The purpuse of that decentralization is a little specific, I want to make it possible to anyone to copy the entire imageboard and host it by himself or just help the server by hosting an instance but not having administrative rights over it. Decentralization is not the purpose, but a feature. So even if the imageboard goes down someone with a copy could host it somewhere, he could host a new version and be it's administrator inheriting all the content from the previsious IB.

I thought: if I added a "decentralization layer" upon Vichan, how that would be? I want to know what I can achieve with that goal. However, I am not programming on Vichan, instead I am making the software from scratch.

>>57318
Yes, I considered using a blockchain, the problem I faced at first was that I do not knew how to determine the genuine chain out of each one, because anyone could remake the entire blockchain from scratch. Also, later I found that blockchains are slow and tend to be slower as the network grows, so I really don't know if I want to use a blockchain approach. What I am considering now is a database synchronization protocol approach.

Your solution is good and you gave me a direction, I think private-public key pair could solve the permissions problem, I just do not know how can I implement it. I need to learn more about asymmetric encryption.

 No.57382

found out facebook has a streaming service so i made a way to download vods

the audio and video mp4s and are split however which is gay but this will download them
ffmpeg -i "audio.mp4" -i "video.mp4" "combined.mp4"
…but in 40 minutes it's only encoded 998MB, not even the full video, i ended up just terminating it lol

im retrying with this
ffmpeg -i "video.mp4" -i "audio.mp4" -c copy -map 0:v -map 1:a "combined.mp4"
…and holy mother it finished before i even finished copying and pasting that shit above
less than a minute to do 1300MB

very important lesson learned i guess

 No.57421

>>57275
Hey wizzie, how's that going for you so far? May I ask how are you learning C, I started with c++ a couple of months ago using Bjarne's PPP book, but I'm moving very slow.

 No.57427

>>57421
not the guy you're asking but i'm learning C by reading the C programming language book and doing competitive programming problems.

 No.57428

>>57382
Now what kind of streams from Facebook would a wizard want to download?

 No.57436

>>57427
Hey buddy, do you mind sharing where you find these competitive problems? I am doing most of the end of the chapter questions, but i'm unsure whether doing them will eventually help me write semi-decent scripts.

 No.57439

>>57436
https://cses.fi/problemset/
I'm also thinking of looking at some programs I use that are written in C(vim, lynx, etc) and playing with the source code.

 No.57441

>>57421
It's going quite well, I feel like I can make computers do anything now. I've learned pointers and arrays now I'm working on using keyboard input while a program is doing other things (using keyboard buffer). Right now I'm making game of life with keyboard input, menus, saving/loading, mouse controls. I am using code of the previous program to have a heat map display of it.

I'm reading The C Programming Language and also the manuals for curses and everything else I use. I never really RTFM before this. I've also learned git, some comp sci and some other things from an android program called enki, it's good.

I'm going to do some little projects like these, please rec any cool ones if you know of em:
http://buildyourownlisp.com/
https://viewsourcecode.org/snaptoken/kilo/
I used to know of a cool site that explained how compositors or display servers work, anyone know it?

>>57439
>I'm also thinking of looking at some programs I use that are written in C(vim, lynx, etc) and playing with the source code.
I've been thinking about that lately too, I want to know how big projects work. Wiz hacker renaissance now.

 No.57569

>>57441
That one about the text editor is nice. Have this one https://craftinginterpreters.com/contents.html, it uses java first, bu the secund part uses C.

 No.57578

Who else is a brainlet trying to learn to program here? Things don't just come to me naturally or quickly and I lose motivation at any roadblock.

 No.57601

File: 1618249717078.png (133.7 KB, 254x261, 254:261, Doomed.png) ImgOps iqdb

>>57578
I'm with you, buddy. I live in a third world country, and the only way to make some money so I don't starve in the near future is to learn a useful skill to land a remote job or some freelances. I've been trying for some years now, but I was being too eager to give up. Now i started again using FreeCodeCamp, finished the HTML/CSS part and I'm moving on to Javascript. I'm reading "The Eloquent Javascript" and still using FreeCodeCamp. Well, this time I'm sticking to this language until I learn or until I give up completely, because I'm thinking that this was my problem before. Being dumb really sucks.

 No.57603

File: 1618267960142.jpg (98.41 KB, 750x751, 750:751, KingAbdullahIsGonnaKickYou….jpg) ImgOps iqdb

I feel like I spend 99% of my time just setting up configurations, dependencies (If I use library X then I can't use library Y, but if I use library Z then I can't use library A…), getting the links for a compiler to work, trying to hunt down one bit misallocation somewhere in a million lines, instead of normal encryption every app has its own little way to handle authentication that I have to learn a new one each time, missing up some minute aspect of syntax, etc.. I feel like I hardly spend any time actually programming or designing algos and it's really pissing me off. Any tips?

 No.57604

>>57601
We're on the same page then. I live in the US which is pretty third world if you're poor, so I too need to gain some kind of skill to make a living for myself.

 No.57612

every now and then i do programming problems on codeabbey. you can use whatever language you want which is why i like that site

i remember reading in the past that people used to do math for fun, and it wasn't uncommon. like bored housewives would pick up a mathematics book and solve the problems. all this technology and entertainment and stuff to consume and yet people are still doing that

 No.57639

I can see the value of the Maybe monad in Haskell. Maybe I will learn to appreciate the other types monads as well.

The first thing I chose to do for a research project was to make a chat client/server. The entire program so far is just imperative-style lists of instructions, IO operations and even mutation of state shared between threads (I'm not aware of any non-blocking versions of socket operations, so I used threads). It all just kind of looks like a C program. No use of monads, mapping, filtering or anything vaguely functional.

 No.57678

i submitted a report to twitter's bug bounty program. for twitter it says the minimum reward is $140 and the average is $560. very cool but maybe i did it wrong or something. will post updates about it i guess

 No.57684

Hmm. If you ignore the feature bloat in C++, it really is a nice language especially coming back to it from Haskell. Pure functional program forces you into these painful, unintuitive anti-patterns that are difficult to formulate, difficult to read and inelegant. In theory, pure functional programming reduces errors but it does not seem to reduce overall development time or even lines of code. It's astounding what a chore it is to make a simple Connect Four game in Haskell.

I think I have been filtered by Haskell (pun intended). Maybe I would get further with Scheme.

 No.57698

>>57678
well i'll be damned, i discovered a real problem, but someone else beat me to it so my report was simply closed for being a duplicate. that sucks, but at the same time it's encouraging for a few reasons. i might try intentionally looking for stuff now

 No.57709

>>57698
that's what they want you to do. Do work for less wage (140$ would maybe be 2 developer hours).

 No.57710

i am not, nor ever will be a developer or normaljobber, so you have to look at the money through the eyes of a neet

 No.57717

Anybody finding that they no longer find programming rewarding? As a hobby, I liken it to cooking. It's just the application of algorithms. Any time you need to solve a problem, you just look up the answer in the recipe book (Google).

I should have just studied literature or something in college. I don't think I have anything to gain intellectually or financially from programming. I don't have the aptitude to be a reliable employee nor do I have the creativity to employee myself. The indie game scene is now experiencing the equivalent of the video game crash of the 80's only this time there are heaps of gay furry dating simulators. The game and programming industries in general just sort of sicken me.

 No.57724

>>57578
I can program, I just never see myself being in a position where programming actually makes me any money. The software industry seems like an unnavigable sea of information. I don't know what to focus on to make programming worth my time and nobody will tell me. The path to success is kept secret from the forever-alone autists to make sure they never escape their forever-alone status. It's a conspiracy.

 No.57727

>>57717
Are you Australian?

 No.57728

>>57727
No, a mentally-ill, middle-class American suburbanite.

 No.57738

Alright. I think I will program even if it's a completely futile endeavor.

 No.57746

started learning intel 4004 assembly today

it is weir most instructions use the acc as like a super register and you are juggling shit around constantly. i found it fun making spaghetti juns and jcn loops

it seems there are a lot more instructions than what i found in the introduction and some double instructions (whatever they are called) require another instruction that i basically have to keep looking up what it means

i can now see why a single chip being able to do all this shit is so impresive, esoecially since it s now 50 years old

 No.57756

>>57603
That's what you get with loonix and C!

 No.57757

>>57603
This shit stops me in my tracks every time. I fantasize about C64 programming because dependencies are basically non-existent. Code size is small because you are limited to a very small amount of memory. The downside, of course, is having to program everything from scratch including operating system functions in assembly language with essentially zero debugging capability.

 No.57810

I made a small web app for watching multiple porn videos at once in a grid layout. You can embed up to 25 videos at once on a single monitor. This is much more convenient than switching tabs or having to manually resize multiple windows into a grid. Currently supports a bunch of normie porn sites, but it's fairly trivial to add support for new ones if you know how to match the video URL with regex and transform it into an embed link. For some sites, you can't use the normal link but have to copy the embed link itself, because the normal link doesn't have a proper ID or key param, which is slightly more inconvenient. Can't think of a solution other than having to scrape the embed link from the page.

https://voidxtech.github.io/coom-viewer/

Supported sites:
redtube (normal link)
pornhub (normal link)
xvideos (normal link)
ashemaletube (embed link)
xhamster (embed link)

I should probably add this info on the actual app.

 No.57811

File: 1619870836670.gif (22.26 KB, 236x260, 59:65, 1618426570044.gif) ImgOps iqdb

>>57810
>up
>to
>25
>3dpd
>videos
>at
>once
>ashemaletube

get the fuck out kike

 No.57812

>>57810
>watching multiple porn videos at once in a grid layout. You can embed up to 25 videos at once on a single monitor
what the…..

 No.57813

>>57811
What's wrong with dick succubi, my dude?

Anyway, you could easily watch up to 25 cartoon videos if that's what floats your boat. The technology is completely agnostic to your particular fetishes.

>>57812
The future is here. The 2x2 and 3x3 are more than enough for the average connoisseur, but the higher levels are available for those that can handle it.

 No.57814

>>57810
not bad

im weird so i just play it in vlc, set looping a-b points, crop it to the exact area im interested in, and then i either repeat to fill the rest of the space on my screen, or i look for images to display there

 No.57887

File: 1620435468550.jpg (78.63 KB, 1280x640, 2:1, brain.jpg) ImgOps iqdb

Lets say I was an AI who could simulate conscious minds and realistic bodies down to the atomic level or some shit. Would I still be a wizard if I fucked an extremely realistic succubus in my own mind?

 No.57888

>>57887
Imo, the job of a wizard is to slowly stifle the nature of his own sexuality through sheer willpower. Simulating sexual experiences would be against this. I can imagine it being an extremely popular thing amongst the majority of humans, though.

 No.57889

>>57887
You don't need to be a advanced AI to do that. Just get into lucid dreaming. I summoned and then wizfucked so many succubi, both real and not real. That was in the past though, i am over this beastly impulses and only use lucid dreaming for spiritual purposes.But that is a fact - you can recreate reality down to the feeling of wind on your face. Takes a while though

 No.57941

File: 1620756594759.png (24.62 KB, 379x748, 379:748, ClipboardImage.png) ImgOps iqdb

the fuck is this Kite shit
i thought i was installing a new IDE or something
it's just some kind of assistant that plugs into other things
rage uninstall

 No.58052

is CLRS algorithms or Sedgewick algorithms a better read if I did a course on it years ago but didn’t learn much?

 No.58053

>>57941
Upgrade to Kite Pro

 No.58056

Has anyone here read through Algorithms by Cormen et. al.? I bought this book thinking that it will teach me how to write algorithms but I'm in chapter 4 and so far all it's talking about is theories about optimizing the running time. I understand the importance of this, but it should not be the first topic to be discussed in such a book. also, should i bother to do the exercises from this book?

 No.58089

i know how to use curl pretty well now, for making requests and such. i still dont know jack shit about how the receiving end works

my understanding is that servers are just regular computers that have a program running that is listening to a certain port for correctly formatted requests coming from other computers. i dont understand how you can make a program that listens for these kinds of requests though. basically, i think i want to know specifically how server programs are listening for requests. in a windows environment also

i tried looking for info but all the knowledge is above me

 No.58090

>>58089
Well in Unix it is quite simple, I am sure in Windows it is much the same thing, too, because they all use the same underlying sockets technology, afaik.
The server process is run as what we call a daemon, that is a process that is detached from a terminal (so it's just the process with no front-end like a command line, gui, or anything), it opens a new socket, which is the standard implementation of all network operations. It is really, just like pipes and other IPC mechanisms, an object (ie. datastructure) in kernel space. Sockets are just that: a tool for IPC which is persistent, and provides a two-way communication channel, possibly reading and writing to a network device (it too a datastructure in the kernel).
Back to the server software, in order to service several requests concurrently, whenever it receives a request, it forks a child process in order to service that request, so it can keep on listening and servicing other requests. The functionality here is just as with any other process, the kernel has some chunk of data available for the program to read as input, process it and return some output. Sometimes the connection is persistent, sometimes it is readily dropped (I'm not sure how http does this, it is in principle a tcp connection, which would have to be explicitly terminated by either end, but it also can just serve a page and terminate, I guess implementations decide how long to keep a process listening for aditional requests, which is often the case (consider loading a page with several files, and having the user navigate the site.))
As for the rest of the process, it all happens on the network logic of the kernel, which encapsulates the details so as to run more or less as I just described. The server does not need to know about how the kernel multiplexes the network device into ports, or how tcp manages to keep data integrity, etc.

 No.58091

Finally getting the native c64 version of Turbo Macro Pro to cooperate with me. Using the 512k RAM expansion version cleared up issues where I couldn't get code to assemble if it included macros. I then struggled through the process of figuring out how to include files. They apparently have to exported to SEQ files before being included. Wrote some basic I/O routines like a print routine, a clear-screen routine, one that outputs a newline character, etc. Going to gradually make a connect 4 game. I even have 16-color text and a various petscii symbols so I can make a proper board with red and blue pieces if I so choose.

 No.58092

>>58090
so the million dollar keyword is sockets. not understanding sockets seems like my problem as of now

 No.58093

>>58092
If you can read C code you might want to read this one:
http://beej.us/guide/bgnet/

 No.58102

File: 1622037081927.png (2.35 KB, 267x195, 89:65, ClipboardImage.png) ImgOps iqdb

>>58093
using that as a guide i made something, though it's not in c. i think i understand it somewhat now. was able to start up tcp on both server/client, make a listening socket and wait for client to connect and then receive the message it sends

to get it to working beyond my local network though and to use my public ip i think it will require port forwarding, and then i need to reserve my local ip to stop it changing since dhcp is enabled

this is very cool

 No.58105

Learning c64 programming makes me feel like I am insane or retarded (which I am). To be able call a machine language subroutine from BASIC that I wrote in an assembler, I have to assemble to disk, reboot the system, go into a machine language monitor, load the routine into memory, exit to BASIC and then load and/or write the BASIC program that calls the routine. If you try to load more than program into memory directly from BASIC, programs clobber each other. They don't load neatly into the memory locations you would expect them to load into.

 No.58106

>>58105
load more than one program into memory directly*

 No.58107

>>58105
i get the fun/puzzle aspect in building low level stuff, but that just seems kinda annoying

 No.58111

>>58107
I think there's actually a "load-to" command in the assembler that can be used to put a routine/data in a specific location without rebooting. I learn something new all the time. There's also multiple banks of memory inside of the RAM expansion unit also but I don't know if they can be accessed from BASIC. One step at a time.

 No.58112

File: 1622126212429.jpg (2.14 MB, 1800x1800, 1:1, nitori_shinmyoumaru.jpg) ImgOps iqdb

>>58052
>is CLRS algorithms or Sedgewick algorithms a better read if I did a course on it years ago but didn’t learn much?
CLRS is more academic, Sedgewick is more informal. If you've already done a course on it then CLRS will be the better read. You can preview both on libgen.

>>58105
>Learning c64 programming makes me feel like I am insane or retarded (which I am). To be able call a machine language subroutine from BASIC that I wrote in an assembler, I have to assemble to disk, reboot the system, go into a machine language monitor, load the routine into memory, exit to BASIC and then load and/or write the BASIC program that calls the routine. If you try to load more than program into memory directly from BASIC, programs clobber each other. They don't load neatly into the memory locations you would expect them to load into.
You're thinking too hard about this. Remember that the basic load function is itself just an assembly routine, which is built on top of kernel routines from the c64 rom. The basic load function likely maintains its own pointer to where it thinks free memory is, like how malloc/sbrk does, which is where the ambiguity is being introduced. You can read the load disassembly here https://www.pagetable.com/c64ref/c64disasm/

How can you break out of this? If the basic load function calls your own load routine then you can do what you want. Alternatively, you could use the kernel routines like basic does. If you can get bytes into memory you don't need to reboot the machine, they can be immediately executed. Now, because you're dealing with a machine with expanded memory there's an additional annoyance, but all that means is you must flip some bits in the memory controller to access the page from banked memory you want. As far as the CPU is concerned there's only one address space limited by the physical width of the address bus.

 No.58133

are markov chains just a way to, for example when dealing with strings of characters, to select the next char based on the previous char according to the pair frequency

 No.58140

>>58112
I'm realizing that the problem isn't the LOAD routine, it's the fact that BASIC frees memory the moment it thinks it is no longer needed such as when you modify the program stored at Start Of BASIC. To get a ml program to run at all from BASIC, the bare minimum requirement is to assemble a header of bytes at *=$801 which translates to

10 SYS 4096 (or wherever the ml program actually starts)

At this point, you can actually start it with a RUN or a SYS call. The moment you try to modify the one-line BASIC program to something like

10 FOR I=0 TO 10
20 SYS 4096
30 NEXT I
40 END

the routine stored at 4096 disappears. I think the magic may lie in moving various pointers around and/or changing the header to contain a different line number.

None of this really matters unless I want to write BASIC programs that call machine language routines. The C64 Programmer's Reference Guide might explain it.

 No.58141

Hmm. Without the BASIC header, LOAD puts an assembly language program at $801 regardless of whether or not it belongs there. With the header, the actual assembly code gets put in the correct location. However, once you make any modifications to the BASIC program, the machine code gets displaced. BASIC thinks everything between $801 and the end of the machine language is one big BASIC program. Moving the top-of-memory pointer does nothing to prevent code from getting moved.

It does seem like writing a short assembly program to load the real code into memory is necessary, possibly in conjunction with using the top-of-memory pointer to protect the code from being eaten by BASIC.

 No.58144

Learned many things about BASIC today such as how to create and delete files and write data to SEQ files. Made a short script that creates a table of pre-computed random bytes that can be included into an assembly program and a sprite editor. The table generator could be modified to generate tables of trig functions for instance. The sprite editor works by editing DATA statements in a BASIC listing. A nested FOR loop can be incredibly slow in a scripted language running on a CPU from the mid-seventies. I could maybe optimize by making the inner loop machine code. Going to make a screensaver by making differently-colored circles bounce around the screen randomly. Maybe I will try sprite multiplexing. Or try loading the sprite data from disk in machine language instead of just building it into the code.

 No.58177

I think I killed this thread but I will continue to blog. Have tried multiple C compilers for the c64 and they don't work. Files always end up getting corrupted somehow. Even with accurate disk emulation enabled. I'm using the c64 "maxi" btw which is pretty neat and generally works as intended but not the C compilers. Forth, on the other hand, works pretty well. The binaries that it builds are huge because it builds the compiler, forth kernel, assembler, text editor and various libraries into the binary by default. I will have to figure out how to trim things down. Durex forth is, according to its creator "50 times faster than BASIC" which puts it on the same level as C (about half as fast as assembly). It's nice to have a "high-level" language that doesn't poke along (pun intended) like a horse and buggy.

 No.58183

>>58177
It's not you who killed the thread. Wizchan is dead. Simple as.

Bracing for sage-wizzie to scold me with his usual grumpy snark.

 No.58186

File: 1622760993756.jpg (35.05 KB, 854x530, 427:265, gendo.jpg) ImgOps iqdb

>>58177
>>58183
I've been reading your posts and will post eventually. I've been dabbling in assembly for a few months while studying comp sci. I have a c64 emulator set up but I haven't used it yet for anything other than trying out c64 software.

 No.58187

>>58186
c64 programming is rewarding but also maddening. I got the C compiler to work by switching to PAL mode but it only works with accurate disk emulation which is painfully. To compile and link a program, you must insert the compiler disk, then the source disk, then the compiler disk again, then the object disk, then the compiler disk again, then the object disk, then the library disk then the binary disk. I might be able to eliminate a few steps by using the RAM Expansion unit and a single disk for souce/object/binary but I think it will fuck it up somehow. All this for a program that in the end will run at half the speed of an assembly program or slower because the computer doesn't have enough memory to optimize code.

Forth is interesting but also kind of stupid. A function that evaluates the expression "9a^2 - ba" is written "over 9 * swap - *" and it is essentially a sequence of operations on a stack. I can't figure out how to make my programs launch automatically which means that they have to be invoked through the interpreter which means I can't strip the interpreter out of the binary which means that my program has a debug console built into it that can't be removed.

Fuck.

 No.58188

painfully slow*

 No.58189

Hmm, I think I will put the c64 in the closet and use the table it sits on to draw or something instead. Better use of space and time. Antiquated technology is one thing but shit emulation is something else entirely. Poor investment of money. I get what I deserve buying an emulator box.

 No.58209

Does anyone here work as a programmer and do things outside of work, or are you doing it solely as a hobby?

 No.58210

>>58209
I went to college to learn programming but I do not work. I squander my limited abilities on pet projects that rarely get completed.

 No.58238

>>58209
I used to like programming for it's own sake, but now I see it as a tool to get a job done, that job is to automate some task. It might be fun to model some scenario, but ultimately it's a means to and end.

 No.58301

Welp. Turns out you can load machine language routines into their correct memory locations with LOAD "<program name>",8,1 as opposed to LOAD "<program name>",8. If you omit the 1, the program always begins at start of BASIC and ends at the end of the range it was assembled into.

 No.58311

>>58210
I finished a masters degree about 3 years ago then did nothing

 No.58433

>>58432
You can't bypass google captcha unless you pay a team of pajeets to solve them by hand, as far as I'm aware. Even then, it's tricky.

On old style captchas that were just typing words, you could try to clean it up, then put it through OCR, or more reliably, just save the image, then have a hivemind of people solve them for 1-2 cents each. If two or more pajeets give the same answer, you can be 99% sure it's correct.

But google captchas are more sophisticated, they make you select certain images and also require you to act like a real user, so any sudden, robotic movements of the mouse, doing things too fast or too slow, or just not having a real browser signature, immediately flags your IP. Also, if you use known VPN proxies or TOR, it makes their captchas more difficult.

 No.58435

>>58434
it's doable without image recognition
https://github.com/dessant/buster

 No.58437

>>58436
kinda, you have to block/clear cookies and cache every time you do it, maybe change user-agent and block trackers. your browser is easily fingerprintable, although privacy.resistFingerprinting on firefox would mitigate that to some extent.

 No.58439

>>58438
Well, I'm no expert by any means but you could take a look at this book automatetheboringstuff.com and after that learn how to control the selenium engine. Or you could also learn JavaScript and write some scripts for violentmonkey that run in the browser along with some extensions like (buster).

 No.58440

>>58438
if what >>58437 said is true, just have addon buttons for clearing cookies, cache, and setting a new random user agent so you can click them. you can probably get away with just stuff like autohotkey or autoit to automate clicks and entering text.

 No.58453

https://magcius.github.io/xplain/article/

Found this website I was looking for xplaining display servers. I know what I'll be doing all day today.

 No.58469

Now I'm in a course to learn programming, I hope that's not off topic because it isn't a hobby in my case.
I learnt quite a bit 10 years ago before I dropped out of university.
I've been keeping up with the course pretty well but I haven't done last week's assignment which had a deadline yesterday.
I wish it was in a physical location instead of online "school". They normally have a location but I was extremely unlucky and happened to start when it was online.
Now it will require a lot of discipline which is exactly what went wrong in the past.

 No.58634

File: 1626095917020.gif (194.09 KB, 500x600, 5:6, preview.gif) ImgOps iqdb

Lately I've been working on a flashcard program to learn Japanese after being disappointed with how big and slow anki was. It's a 500 line C program using SDL: https://github.com/wusho/flash

It's really made for loonix users but there's a precompiled version released for wangbows if any wiz wants to test it.

 No.58833

File: 1627222981564.png (10.85 KB, 600x700, 6:7, 2021-07-25.png) ImgOps iqdb

>>58634
I made a new wangbows release that includes the Core 2k deck: https://github.com/wusho/flash/releases
You can use it either by changing your config or by running `flash -d data/core2k.txt'

 No.58890

File: 1627519685366.jpg (1.42 MB, 1811x2245, 1811:2245, 1627510351697.jpg) ImgOps iqdb

I have momentarily regained the clarity required to program. I probably have at most two weeks before I begin to deteriorate again.

 No.58892

>>58890
When "Flowers for Algernon" is a documentary.

 No.58935

File: 1627842002943.jpg (131.62 KB, 1092x1039, 1092:1039, wizblock.jpg) ImgOps iqdb

My first completed C64 game. Uses some cool 6502 features like binary-coded decimal arithmetic for keeping score. The blocks were originally black and white but I found that I could easily make the blocks have color by switching to extended background color mode and inserting a few instructions here and there. I fixed an issue with the ball carving tunnels through the blocks by using raycasting in four directions. I could optimize the code to only perform collision detection when a ray intersects a section of screen that could potentially have a block in it with little modification.

 No.58962

>>58935
Nice. Did you make your own bitmap font?

 No.58963

>>58935
wow that’s pretty awesome wiz, I always wanted to do something like that, was it hard, how long did it take

 No.58964

>>58962
I made the ball and paddle sprites and copied an edited version of the character ROM into RAM so that I could have graphics for the blocks (each block is just two text characters next to each other). You are limited to only 64 possible characters in extended color mode.

>>58963
I spent weeks beforehand learning about graphics programming and input and just getting used to using an assembler. When I actually sat down to do it, the time taken was probably 4-5 days. It's not as hard as you might think if you already have prior CS knowledge.

 No.58969

File: 1627933387255.jpg (44.13 KB, 640x401, 640:401, pacman.jpg) ImgOps iqdb

Spent some time painstakingly recreating the maze from Pacman using PETSCII characters.

 No.59074

It has taken an embarrassing amount of time to make pacman move halfway close to the way he's supposed to move. He's stays centered in the passageways, doesn't clip through walls. Doesn't eat holes through walls, moves between 1 and 5/4 of a pixel per frame (you can have fractional move speeds without floating point, fixed point or anything other than integers). All of the stuff is programmed in aside from a high score screen, sound and the ghosts. There are people who can make a game like this in assembly in an afternoon which makes me die inside a little.

 No.59724

I'm getting into coding, using freecodecamp to learn, and I'm pretty new and I know this might sound stupid but I'm wondering what plagiarism means when it comes to coding, I know what it means when it comes to writing, but coding? Isn't it mostly problem solving? If you want to build a motor you have to use copper wires and magnets (or metal) whatever needs to be used to make the thing work. I suppose you are plagiarizing Edison or Tesla. I get it when it's blatantly stealing when it could've been done a different way, but if you're using the same programming language how do you not use the same stuff to make a similar or same product? I don't know am I being an idiot, do I just not understand coding enough to tell the difference, what's going on? Can some one explain.

 No.59725

>>59724
depends who you ask

in the old days there used to be books filled with coding solutions and algorithms, and having bought the book you were allowed to just type it in and use their solutions

most people do that still in the form of copy/pasting stack overflow or other documentation sources, they modify things to fit their application

i dont think anyone has a problem with using snippets. it's mainly using entire files with minor changes that irks people now. or using open source stuff without releasing your project's code. weird license things

 No.59727

>>59725
I see, thanks.

 No.59735

>>59724
In a university setting it depends on the situation. If you're doing a project to implement an algorithm from scratch and you just copy paste code then it defeats the point of the exercise. In real world situations it depends on the licensing of the product you are copying; it can be just like writing where you are in some absurd situation such that you have to paraphrase. You are supposed to cite sources just like writing. But


[Last 50 Posts]
[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 ]