Programming thread

Better way is to stick with CreateFile with windows.
CreateFileW!
MSDN said:
Starting with Windows 10, Version 1607, you can opt-in to remove the MAX_PATH limitation without prepending "\\?\". See the "Maximum Path Length Limitation" section of Naming Files, Paths, and Namespaces for details.
Oh yeah, \\?\ shenanigans, make sure to not blindly assume MAX_PATH length.
 
Oh yeah, \\?\ shenanigans, make sure to not blindly assume MAX_PATH length.
MAX_PATH has always been 260 characters pretty much since NT IIRC. Lots of file systems in IFS and including FAT are hardcoded to 260, assume every fs minifilter is too. In terms of usermode ShellApi is capped too which means plenty of software is transitively cucked. File explorer itself will be hardcoded at that limit too.
 
My enthusiasm was a little premature, I spent most of the day figuring out how to build an ocaml program with libraries, then pull that into a c static library compilation
I’m realizing that switching from a more state based parser like bison to a functional one is going to be tough, and that’s not helped by the fact that I’m also having to learn ocaml
That was probably me writing about Ocaml originally. If you have any questions, feel free to ask.
 
I have been bored recently, and recent events with 4chan outage inspired me to write a new imageboard. Since this is a hobby project, I decided to try CppCMS web framework. Using C++ for web may sound extremely retarded, rightly so, but I have read through the docs of this framework and it is well designed. Only issue is lack of WebSocket support. I plan to create two separate services, and will be using Caddy web server with Varnish HTTP accelerator. The imageboard will be behind varnish cache, and the CppCMS web server will simply build HTML pages. Another service, most likely written in Go will sit as middleware to handle the manage. sub domain for admin panel, bans, rate limit, SSE updates and more. Essentially I seperates concerns, and use both languages at what they are best with. The goal is a software that can scale to handle large amounts of (non-existent) traffic. Because I'm autistic like that :) I also maintain a fork, written in an awful language and it's killing me mentally and emotionally.
 
It's a shame Guile is so tied to a unixlike environment. I kinda wanted to mess around with some gamedev stuff using a Scheme (and maybe be able to have something my friends could run on windows), and a bytecode Scheme with a CLOS clone would be ideal. Guile meets those requirements and considering its limitations, it's a really solid implementation.

But it's super strongly tied to a linux/unix build environment. I'm sure windows ports exist or maybe you could fuck around with mingw if you wanted to, but it all sounds like a huge pain in the ass. Especially because I don't have immediate access to a windows install that easily.

It's been awhile since I fucked with it, but Guile's FFI is pretty nice too, btw. From within the repl, you can dynamically open shared libraries, grab function pointers and call them. You don't need to compile C wrapper code or anything like that.

I probably need to bite the bullet and get a windows install running in a vm or something if I want to play around with this stuff.
 
I have some questions:

I'm trying to learn how to code, I'm starting with Python and I got a "python for dummies" book (the big 7 in one book) is this a good resource?
The OP says I should move on to Javascript next, how will I know I'm ready to start leaning another language? Are there learning resources on Javascript that you guys recommend?
How much coding language do I need to get a job in the field?
I'm currently pursuing a computer science degree, is this a waste of time?
 
That depends on exactly what you'll be studying for this degree, how much you're paying for it, and what you hope to get out of the experience.
For what I'm studying it's mostly unrelated shit so far, history, english etc. I've only taken one actual computer science class and it fucking sucked. Overall I think the degree is pretty math heavy. Money wise I'm paying practically nothing, it's at a community college. What I want to get out of the experience is computer knowledge and marketable skills.
 
  • Like
Reactions: Marvin
I'm trying to learn how to code, I'm starting with Python and I got a "python for dummies" book (the big 7 in one book) is this a good resource?
If it's a legit X for Dummies book, the ones with the yellow covers, those tend to be good. If it's a knockoff with a similar premise, those also tend to be good.
The OP says I should move on to Javascript next, how will I know I'm ready to start leaning another language? Are there learning resources on Javascript that you guys recommend?
JavaScript is a gaynigger language. I would strongly recommend learning the ins and outs of Python to the point you're comfortable with it before moving to another language, for the only reason being that 95% of coding is language independant - once you know one language fairly well, the other languages come more easily, with the real remaining 5% of differences being syntactic sugar, that is to say, minor conveniences and quirks.
How much coding language do I need to get a job in the field?
I'm currently pursuing a computer science degree, is this a waste of time?
Depends on the job. If you want to be a network janny, you don't need all that much code. If you want to be a software engineer, then you're obviously going to need to be very comfortable with code. It's all a matter of degrees. Speaking of degrees - if you're getting a degree in comp-sci for basically free, you are setting yourself up for a reasonably cushy job experience once you actually find a job. The biggest problem in the field is how much it has been outsourced to low quality jeets, but thankfully Trump seems to be working on that problem.
Overall I think the degree is pretty math heavy.
Before people realized you can look at pictures of cats online, the original purpose of the computer was to solve complex equations, replacing the job of human computers - people really good at solving math equations. It tracks that Computer Science would be math heavy.

That being said, engineers (the superior breed) have and can do pretty much anything the mathematicians do in 1/10th the time and 1/4th the effort, but having the math background helps.
 
computer knowledge
what is "computer knowledge" to you? computer science isnt about teaching you programming, it is very math heavy, itll teach you shit like how to design algorithms and apply math to solve problems and just the basics of programming to let you put some of the theory into practice. now this is a marketable skill in the current it job market because most programmers are really just pajeet-like code monkeys who dont understand shit about fuck and cant do any kind of complex technical design or architecture or justify technical decisions they make. the downside is that you will not necessarily be well prepared to orient yourself in a programming project and all the mundane shit you have to do as part of the job so might be a bit of a rough start.
 
I would strongly recommend learning the ins and outs of Python to the point you're comfortable with it before moving to another language
How comfortable? Like what should I be able to do with the language by the time I'm ready to move on?
If you want to be a software engineer, then you're obviously going to need to be very comfortable with code
Yeah, that's what I really want to be. any tips one getting there? Do I need a degree in software engineering specifically?
The biggest problem in the field is how much it has been outsourced to low quality jeets,
Well that's kinda why I wanted to go for something high level like software engineering. People say there's a competency crisis in the country, so my reasoning is that if I can get really competent at something I'll have amazing job security.
 
For what I'm studying it's mostly unrelated shit so far, history, english etc. I've only taken one actual computer science class and it fucking sucked. Overall I think the degree is pretty math heavy. Money wise I'm paying practically nothing, it's at a community college. What I want to get out of the experience is computer knowledge and marketable skills.
It'd be worth checking if your college has any existing relationships with companies to take students as interns, or if any company you're interested in will do that. Pretty much every place I've worked had a program like that with local colleges and personally my degree was never very useful (albeit it's not a 4 year CompSci) except as a "we won't reject you immediately" check. The internship on the other hand, while incredibly shit pay, immediately opened doors and while that was a long time ago I know even in the current brown hellscape my company still picks up interns from both the 4 year and the 2 year colleges nearby.
 
It'd be worth checking if your college has any existing relationships with companies to take students as interns, or if any company you're interested in will do that. Pretty much every place I've worked had a program like that with local colleges and personally my degree was never very useful (albeit it's not a 4 year CompSci) except as a "we won't reject you immediately" check. The internship on the other hand, while incredibly shit pay, immediately opened doors and while that was a long time ago I know even in the current brown hellscape my company still picks up interns from both the 4 year and the 2 year colleges nearby.
I did some looking and it looks like my college doesn't offer that. I've looked at some internships before and none of them are available to me at my current level of experience, all the more reason for me to put my nose to the grindstone and learn this shit myself.
 
If you do it this way then be aware how Python limits the amount of recursive calls you can do. See: https://stackoverflow.com/questions...aximum-recursion-depth-and-how-to-increase-it
>doesn't guarantee unlimited tail calls
SHIT LANGUAGE
It's a shame Guile is so tied to a unixlike environment. I kinda wanted to mess around with some gamedev stuff using a Scheme (and maybe be able to have something my friends could run on windows), and a bytecode Scheme with a CLOS clone would be ideal. Guile meets those requirements and considering its limitations, it's a really solid implementation.

But it's super strongly tied to a linux/unix build environment. I'm sure windows ports exist or maybe you could fuck around with mingw if you wanted to, but it all sounds like a huge pain in the ass. Especially because I don't have immediate access to a windows install that easily.

It's been awhile since I fucked with it, but Guile's FFI is pretty nice too, btw. From within the repl, you can dynamically open shared libraries, grab function pointers and call them. You don't need to compile C wrapper code or anything like that.

I probably need to bite the bullet and get a windows install running in a vm or something if I want to play around with this stuff.
maybe try racket? idk if it has a good ffi or clos clone though, but afaik it's pretty fast and portable and c-free
 
  • Like
Reactions: Marvin
also iirc scheme clos-like object systems aren't really that implementation-specific, you might be able to find a somewhat portable one and violently hammer it into chez or something
this is scheme; you can make it your bitch with complete ease, since it's explicitly designed to be a language that you can make your bitch
 
  • Agree
Reactions: Marvin
also iirc scheme clos-like object systems aren't really that implementation-specific, you might be able to find a somewhat portable one and violently hammer it into chez or something
this is scheme; you can make it your bitch with complete ease, since it's explicitly designed to be a language that you can make your bitch
Oh totally. And actually, I've implemented my own shitty CLOS clone before. Inspired by ScmObj, but sorta trying to emulate Chicken's coops, syntax-wise.

I started to do that again, but I think I kinda want to try to pick an implementation that has as much of this stuff already handled for me. Not that I'm shy about hacking stuff together myself, and I'm sure I'll need to do some of that, but I want to pick something that has as much of these features as off-the-shelf components as possible before diving in.

I might actually try this with Chicken. Chicken is a great implementation, but I just wonder if cross-compiling with it will be a pain in the ass or not.
 
Back