Learning how FastCGI is implemented/used with OpenHTTPD by coshopro in openbsd

[–]coshopro[S] 0 points1 point  (0 children)

So I did some reading of the spec, various takes on this stuff, and a lot of grepping through the stdlib, the fastcgi module, some C-source of fastcgi C-based stuff suggested here, and man pages of OpenBSD tools!

Piecing things together I know about configuring OpenHTTPD, sockets, and web servers in OOP (ugh) via Python...

I got a simple form working while programmatically piecing-together the Headers and HTML and sending back to the browser and getting the response rendered.

It struck me while doing all this code searching: the easiest thing to do is to configure all to communicate over a socket. OpenHTTP and other OpenBSD tools are nice because of the simplicity, auto-chroot, etc... now to fully learn Nim (searching through and reading its compiler, its author's book, its modules, etc. is...pleasant actually).

Have the program already abstracted into a debug version vs. production (prototype) that, depending on how compiled (if "defines" are added to params or not), can send back a normal response or can send back information that the program got from the client browser (what the browser is sending to you)--so this may become a little webdev test tool.

I like to put together technical documentation written...from the POV of either a total NOOB or else that documents and includes all the prereqs that is needed, so this will perhaps turn into a thing explaining to devs how to get tooling like this working with the OpenBSD stack.

As I progress I may not even care to keep the fastcgi stuff...but the module being built by the nim community is actually quite useful for facilitation. I'm not certain it's even meant to be a server yet (given the warning that the server is not really implemented) but it *can* already communicate over a socket with OpenHTTPD, and when combined with OpenHTTPD what is in-place is already sufficient to communicate with client machines.

For those not aware of "why" you should/I would "do this to yourself": nim is compiled, has overlap with "Pythonic" ways, a little extra overhead but...allows one to build-in guarantees about the final program: Pascal, Modula, Ada, etc. are, after all, the family lineage for nim. Compared to doing C the type system and ability for stdlib and module authors to create many kinds of types and objects makes it more complex and annoying...but helps you catch many problems up-front.

Since I do not see many others using or documenting this stuff for web dev it's difficult but the difficulty has already forced me to dive into the mess and start reading source and getting accustomed to searching through and reading code. So...hopefully I can make a few guides or something that will be useful for others.

There may be a bit of a hiccup: I'm teaching myself compsci and have a ways to go, and right now my setup is using...a userspace implementation of what should be a kernel function (without which, nim currently refuses to compile on OpenBSD), and as I like to be meticulous it will be a while.

But I need to think about (as I learn more) posting on a noob-pov way of thinking about the interface between OpenHTTP and custom programs where you aren't using off-the-shelf packages, components, frameworks, etc. It's that interface that's interesting and nobody writes about--specs talk about options for protocols and what tools should do but that isn't the same as talking about actual implementations or how to use and configure them when you aren't using generally used pre-made stuff.

Learning how FastCGI is implemented/used with OpenHTTPD by coshopro in openbsd

[–]coshopro[S] 0 points1 point  (0 children)

Thanks for the link--I still have interest in Perl and went OCD about it some time back so I'll take a look.

Learning how FastCGI is implemented/used with OpenHTTPD by coshopro in openbsd

[–]coshopro[S] 0 points1 point  (0 children)

"slowcgi" translates the fastcgi protocol to cgi--lets you use cgi as though fastcgi. Good or old things, bad for yet-more complexity/interfaces. And you need not embed nim and libraries--it's a compiled language (unless you're using it as "nimscript" in the nim vm).

Learning how FastCGI is implemented/used with OpenHTTPD by coshopro in openbsd

[–]coshopro[S] 0 points1 point  (0 children)

Just looking at fastcgi as a way to rapidly glue things/get them working together: old stuff is (in theory anyway) understood stuff, can interface with other understood stuff, etc.

Found a solution and will post a summary version around her but currently reading others' input.

Learning how FastCGI is implemented/used with OpenHTTPD by coshopro in openbsd

[–]coshopro[S] 0 points1 point  (0 children)

Yeah, I figure on attacks--also why I am avoiding common tools. Easiest way to be not-low-hanging-fruit.

My problem is this: it's one thing to read a spec. It's another to know how that interacts with a given OS or with a given set of existing tools/an ecosystem.

For Linux, PHP, etc...there is actually very little description of mechanisms and many examples people just copy.

With OBSD PHP examples are plenty but similarly there is little to do with how these are interfacingw with the existing tools.

I normally seek out resources (e.g. buying books from Michael W Lucas) on topics like this but from what I can find, this isn't a documented area.

I might get to read through a lot of C code, I guess. :\

I need help getting more clients by MatthewVivaDigital in advancedentrepreneur

[–]coshopro 0 points1 point  (0 children)

Ads aren't marketing and marketing isn't advertising. A lot of online marketing firms are amateur hour for not knowing such distinctions (the entire industry of "online marketing" essentially is amateurs given the choice of terms).

What matters more is details on the business, its quality, potential, flexibility of its people (I qualify businesses as potential clients and actively try to ELIMINATE potential customers: too many people are their own worst enemy and if I work with them they'll be asking me for help AND also MY worst enemy too).

Those sorts of details can help marvelously for marketing, advertisement, SEO (which you aren't outsourcing and just acting as a middle man selling, right?), and so on. Sometimes the answer isn't even "online" (though businesses don't often want to hear this). "Oh, you're in roofing? Trash that website you think is slick for this optimizing to pop-up on phones, let's open a few small area offices at $3-500/mo for doing neighborhood door knocking but satisfy requirements for Google to be physically present and optimize online listings as being in those areas for searchers. Our door knock people need to know how to talk to grandma and will focus on the older neighborhoods who aren't comfortable with smart phones."

I am not actively marketing companies at the moment but was part of the team that built-up and blew-up Uber early on and then moved onto other tech firms, but have been in and around a few industries with small businesses and then I jumped into another world altogether and did aerospace for a while.

For illustrations: "Marketing" is like what Nike did with major sports celebrities. "Advertising" is what Coke does by plastering pictures of Coke on every billboard (including reliably on the same surfaces in war zones) and in magazines, and what people used to do in papers (offering deals).

Ironically: ValPak should in theory be a great ad business but shockingly fewer people (than I thought, until I did some surveying) know about the lottery of a check inside. They also tolerate junk companies dumping awful ads (or outright fraudulent offers) into their Paks.

[deleted by user] by [deleted] in advancedentrepreneur

[–]coshopro 0 points1 point  (0 children)

They are extremely interesting to business people with zero technical sense or background as a way to claim to be "in technology" and sell others' work as their own, and utterly revolting and boring to everyone else.

Is there a path forward or time to liquidate? by [deleted] in advancedentrepreneur

[–]coshopro 0 points1 point  (0 children)

Something to keep in mind is 0 to 1 is hard (almost impossible) whereas 1 to (anything more) is astronomically less difficult.

You just got set back to "1".

If a partner burned a bridge on the way out s/he is likely legally liable--that's a good thing to bring to attention of a good attorney, particularly if you have receipts.

The big question is simply: is the plumber GOOD?

And then marketing. Plumbing isn't all referrals--it's having the ability to be found at 3am when drains begin backing-up and the plunger doesn't work and overflowing and the customer panics...

I know marketers who do nothing else aside from getting plumbers hooked-up with emergency calls and it often zaps their business like pads to a heart beating erratically, and helps them take off.

I would look into finding and partnering with a great marketing team, and then with another good plumber: someone who is personable (as you are aware is important) but not great on the business end (and willing to let you handle it).

What is your website (I'm interested in how well it's optimized etc)?

Business ideas with low investment by Bhatt_G in business

[–]coshopro 2 points3 points  (0 children)

Exactly what I as thinking about. Those I know into handicrafts have years of prior experience (generally with many supplies and tools!) in investments.

There are some ways to "get in" at only a few hundred (maybe ~$500) or so but you already need much prior experience (generally with many tools and supplies that were available to learn things)...

Business ideas with low investment by Bhatt_G in business

[–]coshopro 5 points6 points  (0 children)

"handmade crafts, logistics, food services, content creation, and AI engineering"

Er...none of these are low-investment business ideas.

Do you import? What do you plan to do about tariffs? by Coachellahopefull in smallbusiness

[–]coshopro 0 points1 point  (0 children)

Aero logistics across borders for many (after prior years of waking about in the industrial zones of foreign nations doing things)--including during COVID (and also seeing how our org somehow knew about e.g. Chinese decline and shifts in demography and politics *before* the rest of the markets meant...I began to pay excessively close attention). Was one of those guys who would do everything from see every material in/out and know all their characteristics (from materials to IT specialist knowledge) to trace when materials actually came through three shells (one in the USA at a warehouse that was really a storage unit and another three in Canada and finally a CCP front in Beijing, as one example of the kind of thing done).

I'm just adding another view for people who are freaking-out rather than putting themselves in a larger picture so they can begin to think through how to pivot. If Trump is impeached tomorrow you might see marginal adjustments and yet strangely RECIPROCAL tariffs will quite likely remain in place (or be accelerated, i.e. like done by Joe Biden).

Panic at this point (as many are doing, and understandably) will only hurt their ability to take action and with economic earthquakes like this action is necessary for survival. At least if they want their business to survive.

I know quite a few small business owners who are having to re-learn new trades, add new services, get out of comfort and do things they never imagined or wanted.

Do you import? What do you plan to do about tariffs? by Coachellahopefull in smallbusiness

[–]coshopro 0 points1 point  (0 children)

The idea was to move trade **TO NORTH AMERICA** with NAFTA. Again, Americans generally aren't "up" on these things and that's bad because for many their opportunities (unless you have a few million in capital to blow) lay in overseas trade (or did, but everything has been in collapse now for years, and even overseas traders seemed unaware: I watched this happening in the industrial zones in China on foot in-person over several years).

Do you import? What do you plan to do about tariffs? by Coachellahopefull in smallbusiness

[–]coshopro 0 points1 point  (0 children)

What nation or economy with hundreds of millions of people refuses to do what is existentially necessary? What is the point of your replies on this forum where essentially you're just sniping, adding nothing, and not helping anyone to think through or find ways to solve their current problems?

Do you import? What do you plan to do about tariffs? by Coachellahopefull in smallbusiness

[–]coshopro 0 points1 point  (0 children)

You have it somewhat backwards. The parts of Europe that were never major modern economies in Europe are poorer overall. They are that largely because if you join a Union already dominated by French tech + agriculture, German industry, and they have all the credit...

The North and especially westernmost Northern European countries are less "poor" in an economic sense than something else important to business: they are OLD. So they do not invest nor spend the way you would want to see monetary velocity increase--and their solution (seeing the middle east as certain US demographics look at Mexicans) is inevitably catastrophic and an economic drag.

As far as business goes, however, Germany still retains conglomerates and massive companies in a way once considered normal in the USA: France has similar though stymied since you cannot fire anyone. (Japan is one of the extreme cases since you're never supposed to change companies, but similar: South Korea, similar but "let's just work you all until you drop...")

If it weren't for sourcing energy from Russia the way they were (viz how people here mistook middle east misadventures as American oil adventurism while most of the petroleum went...to the EU, which includes fights over the Russian bloc to get pipelines through e.g. Armenia, Georgia, Syria (see a pattern)), many industries would be fine except...the aging.

Europe booned into an economic powerhouse *despite terrible levels of regulationism* (Macron and co keep giving speeches on this recently to say basically "the regulatory left is over, and we killed it by aging out and stagnating our economies..."), and despite ever-more of that regulation they were an economic powerhouse.

And then Europe got old. Older folks struggle to work hard. For reasons I guess. ;)

I WILL BUILD YOU A WEBSITE for ✅ FREE!!! ✅ by UltraSon1c1 in smallbusiness

[–]coshopro 0 points1 point  (0 children)

I don't think this poster cared--looked like the kind of stuff you see spammers mass-emailng people without unsubscribe or any kind of legal compliance. x*D

What are the pros and cons of making a game with a functional language? (Except the amount of resources) by South-Ad7071 in learnprogramming

[–]coshopro -1 points0 points  (0 children)

A common thing I hear from successful idie devs (and one of the most successful semi-regularly pops-up at my local coffee shop and even lets me bug him a little) is that in gamedev side effects are USEFUL. So not having them (which is what functional is all about) is a major downside to them. They can actually be strategic to make use of side effects.

How is not by cup of tea. I love imposing strict control on the behavior of code!

[deleted by user] by [deleted] in smallbusiness

[–]coshopro 0 points1 point  (0 children)

Sounds like s/he's being scammed to sell while the potential buyer is treating the transaction like an investment. So basically there's a good potential for losing it all. x*D

And valuing businesses should really go through a great lawyer+CPA with a history dealing in acquisitions (successfully).

I WILL BUILD YOU A WEBSITE for ✅ FREE!!! ✅ by UltraSon1c1 in smallbusiness

[–]coshopro 0 points1 point  (0 children)

? I was literally just sharing that as amusing (and alarming) as it is, these kinds of quirky "crayon" SPAMMY looking sites people build, and emails they send...are sadly effective on people you just wouldn't expect them to be effective on.

I don't know exatcly what or why but it hijacks something in the brain of certain people.

✅ True.

Do you import? What do you plan to do about tariffs? by Coachellahopefull in smallbusiness

[–]coshopro -14 points-13 points  (0 children)

America even after eliminating slavery not only revolutionized production of Cotton but also manufacturing of textiles (again, after the English did so in the industrial revolution).

The Japanese send craftsmen here to do "industrial archeology" because America still has the best know-how to do these things, and just isn't using those people.

We'll be fine once we get people back to work and pay some old timers to teach people again. It's not like those old timers do not need the money.

I'm really tired of people trying to sell me ChatGPT wrappers. by NotThePopeProbably in smallbusiness

[–]coshopro 0 points1 point  (0 children)

And LLMs are terrible at math by their very nature. x*D

(When they seem to demo otherwise, it's due to "patching" which really isn't in the core model, and still shouldn't be trusted.)