Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Adhemar
Jan 21, 2004

Kellner, da ist ein scheussliches Biest in meiner Suppe.

Dominoes posted:

Hey bros. Do you think it'd be fun/feasible to make a computer-generated fake financial or sports news site? Fake comments too? Mix and match details in templates, throw in key words etc. Maybe use SVM or ANN once more basic approaches are exhausted?

Do you think some of these sites are already AI-written?


*Fake news as in generic commentary, not outright lies.

Don't know about sports, but finance articles are very often generated: https://www.irmagazine.com/reporting/how-automated-financial-news-changing-quarterly-earnings-coverage

Adbot
ADBOT LOVES YOU

Hadlock
Nov 9, 2004

DoctorTristan posted:

Python and its environment/path fuckery is going to drive me to a killing spree one day.

I've been playing with Rust recently and am over the moon in love with Cargo build tool. Push button get program.

Charles 2 of Spain
Nov 7, 2017

baka kaba posted:

Are you using CMD or PowerShell? activate always seemed to work fine through the original command prompt, last I saw they were still trying to get it to work in PS (even though it's been the default Windows terminal for years) and people were posting hack scripts and everything

Try it in cmd.exe if you aren't already is what I'm saying, might work!

DoctorTristan posted:

Python and its environment/path fuckery is going to drive me to a killing spree one day.

Is your path the same before/after running activate/deactivate (try echo %PATH% before and after) ?

Is there possibly a naming conflict between the HTK files and something in your python path?

Speculating slightly here, but did you install Anaconda for all users or just for a single user?
Thanks for the advice. I'm using cmd.exe by the way. Powershell has the same issue.

I checked the paths and I think I know the problem. I'm using a Japanese computer, so the path to HTK contains "ドキュメント". On a clean console, this parses correctly. However, when I activate the environment the path becomes garbled I guess because of some encoding issues. Therefore it can't find the correct path variable. When I deactivate the same encoding problem happens. I guess the workaround is to put the binaries in a directory with no Japanese characters but man it's weird. On my old machine the directories were all in English (it is actually translated to 'Documents') so this never happened.

Erulisse
Feb 12, 2019

A bad poster trying to get better.
What is/are the best websites and languages to start learning programming like from total scratch? I'm so bad I can't even Excel properly and don't have any 'programming logic' or how one can call it.
Will try to redirect gaming time to learn a proper secondary skill for small freelance work in future. Or maybe to change careers totally.
ps pls don't start the language holy war.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
Python was originally designed to be a teaching language. The reason people use it for real work now is because everyone just fell in love with it. It’s easy.

Scratch is a language for kids, but it teaches you fundamentals that will carry over to any other language, and it’s a blast to use.

Dominoes
Sep 20, 2007

I second Python as a first language: It's easy to learn, and is versatile; ie it'll suit your needs for many projects you might decide to work on.

Later on, I recommend Rust as a partner language: It's very well-designed, has great tooling, great official docs and tutorial, and can fill in the gaps with things Python's not good at, (eg making executables, performance-critical code, fast Python extensions etc) I don't recommend it to start with, since it includes an ownership model that could be distracting from programming logic fundamentals.

Xerophyte
Mar 17, 2008

This space intentionally left blank

AntherUslessPoster posted:

What is/are the best websites and languages to start learning programming like from total scratch? I'm so bad I can't even Excel properly and don't have any 'programming logic' or how one can call it.
Will try to redirect gaming time to learn a proper secondary skill for small freelance work in future. Or maybe to change careers totally.
ps pls don't start the language holy war.

I think the next question you should ask isn't so much "what language do I learn?" as "what do I want to do?". Language tends to follow from domain. If you want learn to do website stuff then you'll want to learn modern HTML plus JavaScript/ECMAScript since it's what most of the web still runs on, far as I know someone who knows no JS and last did website stuff in ancient HTML 3.0. If your goal is coding for microcontrollers to help in your industrial design ambitions then you want to learn C.

Feel free to start tinkering in some Python tutorial first, it won't hurt, but I think you'll have a hard time sticking with just learning "programming" unless you have a more concrete goal to work towards.

For pure employability I think learning modern web stuff and JS to build some websites is probably the shortest path to entry, but I have no interest there and took a very different path so I really can't tell you where to start with it.

Hadlock
Nov 9, 2004

Check out MIT open courseware, it's their beginner -> computer genius computer science program for college freshmen, it's offered in Python:

https://ocw.mit.edu/courses/electri...thon-fall-2016/

I think it's using Python 2.7 but it might be 3.6+ but my buddy used this to make way more money than he ever thought possible

Erulisse
Feb 12, 2019

A bad poster trying to get better.
Thanks for the input. I thought something might have changed since the FAQ post that suggests python as a starter was last edited (2014). I'll start with python and will see where to go from there.


Xerophyte posted:

I think the next question you should ask isn't so much "what language do I learn?" as "what do I want to do?". Language tends to follow from domain. If you want learn to do website stuff then you'll want to learn modern HTML plus JavaScript/ECMAScript since it's what most of the web still runs on, far as I know someone who knows no JS and last did website stuff in ancient HTML 3.0. If your goal is coding for microcontrollers to help in your industrial design ambitions then you want to learn C.

Feel free to start tinkering in some Python tutorial first, it won't hurt, but I think you'll have a hard time sticking with just learning "programming" unless you have a more concrete goal to work towards.

For pure employability I think learning modern web stuff and JS to build some websites is probably the shortest path to entry, but I have no interest there and took a very different path so I really can't tell you where to start with it.

Thank you. It is more to peek behind the curtain of general programming and seeing if it will interest me. Was fascinated by programming 10 or 15 years ago but never came around to actually sit and learn.
Also having a 'secondary' craft just in case could be useful.

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

AntherUslessPoster posted:

What is/are the best websites and languages to start learning programming like from total scratch? I'm so bad I can't even Excel properly and don't have any 'programming logic' or how one can call it.
Will try to redirect gaming time to learn a proper secondary skill for small freelance work in future. Or maybe to change careers totally.
ps pls don't start the language holy war.

Programming is just the combination of understanding *how* to solve problems with *how* to describe your solution. Language is only the latter half. The former you can start to pick up from just redirecting gaming time from one game to another.
Human Resource Machine, for example, is basically Programming The Game.
Everything Zachtronics makes ranges from pure programming thinking (how to structure things to solve problems) out to *actual* programming - albeit at relatively low levels.
Screeps exists as literally 'Javascript, The Strategy Game'

If you pair some of that up with some time picking up the syntax of something like Python, you'll be picking up both halves of the puzzle.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Cuntpunch posted:

[programming games]

Large scale Factorio bases learned me to use API's (separate components connected through rail or belts) , libraries (blueprints) and to think in throughput when analysing complex systems. Admittedly, I started to play factorio at the same time I learned to program so some parallels might be far fetched.
Seriously, most systems I worked on in the last few years are not that different from a train mega-base...

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Cuntpunch posted:

Screeps exists as literally 'Javascript, The Strategy Game'

Oh, no... now I know this exists :ohdear:

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

Keetron posted:

Large scale Factorio bases learned me to use API's (separate components connected through rail or belts) , libraries (blueprints) and to think in throughput when analysing complex systems. Admittedly, I started to play factorio at the same time I learned to program so some parallels might be far fetched.
Seriously, most systems I worked on in the last few years are not that different from a train mega-base...

That's the thing. Lots of folks treat a language like some sort of system of magic. If they learn the magic keywords and the ceremonial incantations, they can Summon Software Daemons. Which is...slightly true. But a good chunk of programming is learning the art of breaking down problems and structuring solutions to minimize noise. It's agnostic to language, and is entirely conceptual, and yeah, stuff like Factorio handles it in a sneaky elegant way.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Really all you need is to know that you can do something, then you can go look up how to write the magic spell.

Erulisse
Feb 12, 2019

A bad poster trying to get better.
In big companies, does the 'how to solve the problem' fall into hands of production manager/architect of some kind? I remember reading someone's blog about how they transferred from home freelancing to a big company programming and literally half of the work week they were discussing and deciding on 'how to' and then straight away 2 days of coding without any other thought, no mistakes or anything. I might remember bad though :v:

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
No, that "how to solve the problem" decision is still usually in the hands of whatever individual contributor is tasked with implementing that solution. The exception is if you're a super junior, where perhaps a more senior developer is doing the bulk of that work and hand-holding you until you can stand on your own feet and do it yourself.

Of course, in a big company, you're often working on a big project - too big for one person to keep the entire thing in their head while also focusing on one small bit that they're working on. So even if you think you know the best way to proceed with something, it's often encouraged to run it past people who have knowledge of other parts of the project and have them gut-check that your plan is reasonable, are there any pitfalls you need to be aware of, if there's other related work going on that you could piggy-back on instead of doing it yourself, that sort of thing. And if you're working as a group of people on a single large feature, you'll generally have a discussion within your team and attempt to come up with the best way to proceed, rather than having everyone go off and write their own code at odds with each other.

Erulisse
Feb 12, 2019

A bad poster trying to get better.
Oh cool, got it. Thanks for the explanation, makes all the sense.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Cuntpunch posted:

Screeps exists as literally 'Javascript, The Strategy Game'

Just bear in mind that these kinds of games attract unemployed programmers like flies to honey, so don't feel bad if someone just utterly dominates you effortlessly since they do AI programming for a living.

Relevant Tangent
Nov 18, 2016

Tangentially Relevant

So I'm on an android and probably everyone knows this, but why does going to say Good link vs Bad link work? It's the .com. but while I understand that it works I'd like to know why.

mystes
May 31, 2006

Relevant Tangent posted:

So I'm on an android and probably everyone knows this, but why does going to say Good link vs Bad link work? It's the .com. but while I understand that it works I'd like to know why.
Adding a trailing dot makes it a different domain name (for reasons nobody really cares about but google "fully qualified domain name" or something if you want to know) so the cookies don't transfer over, which might be the reason if you have to read several articles before it shows the paywall.

mystes fucked around with this message at 03:11 on Feb 12, 2020

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Relevant Tangent posted:

So I'm on an android and probably everyone knows this, but why does going to say Good link vs Bad link work? It's the .com. but while I understand that it works I'd like to know why.

It's a very good question and it's not clear what's happening on the backend, but on the client side the host requested becomes "www.washingtonpost.com." and not "www.washingtonpost.com" as normal. This probably screws up whatever system they're using to determine whether to deploy the paywall or not.

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat
The reason is mostly likely because it's blocking cross site scripting. The java script that serves the ads and adblocking tech comes from washpo.com, but your browser goes to washpo.com. which is technically an entirely different domain. The .com. domain still resolves correctly because WP has it setup that way, but it has no way to trigger the .com code that does the ad block detection since technically that's cross site scripting.

Relevant Tangent
Nov 18, 2016

Tangentially Relevant

I appreciate the replies, I tried to look and all the answers were to questions like "what is the .com domain/what does .com mean" which was almost what I needed but not.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Anyone know of a tool I can use to check if some input matches with a given EBNF grammar? Preferably cross-platform, open source.

nielsm
Jun 1, 2009



peepsalot posted:

Anyone know of a tool I can use to check if some input matches with a given EBNF grammar? Preferably cross-platform, open source.

There's a ton of parser generators to choose from.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

nielsm posted:

There's a ton of parser generators to choose from.
Yeah, I don't want to generate source code for a parser though, was hoping for something self-contained that can just take EBNF + input and return if it pass/fails, maybe with a line number to the part of input that doesn't match.

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

peepsalot posted:

Yeah, I don't want to generate source code for a parser though, was hoping for something self-contained that can just take EBNF + input and return if it pass/fails, maybe with a line number to the part of input that doesn't match.

Clojure has instaparse, which takes in an (A/E)BNF grammar string, the string you want parsed, and will either return the parsed output, or has a few failure notation states.

Faith For Two
Aug 27, 2015
What are reasons for a Makefile to take a stupid long time to execute?

code:
time make some-target

real 1m8.673s
user 0m1.846s
sys 0m4.100s
When I try “make -d some-target”
It spends most of the time stuck on
“Reading makefile ‘Makefile’…”
And the rest of it executed pretty quickly. What’s going on?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Is it recursive?

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I'm looking at a situation that wants to go into some fantastically stupid configuration hell. I'm trying to represent a lot of stuff as metadata and give people with good technical sense but very little programming ability a fighting chance of arranging some functionality together. For the sake of making these files a bit more maintainable (I think) I'm trying to figure out how I might do something like import files into other files. This would have to come with some kind of conflict resolution and override methodology if I'm importing a config that collides with another one.

I'm just looking for general tips and advice right now. "Advice" can include "don't" and I'm actually inclined to turn around and say this whole thing is just beyond the scope of what we can reasonably expect to push. Like, I can achieve something fair that will be technically interesting and impressive, but I'm not even convinced it will have business value. The whole venture might be doomed since they'll just gently caress up the configuration files instead and the parsing errors won't explain a thing. However, I'd like to show an example of what it might look like if I used technologies out there to do this so I can ram it home.

Previously, I was using JSON for metadata but the lack of comments was definitely a problem and nobody here wants to go that way again. But, hey, HJSON is now A Thing and that's acceptable since it does give comments--among other things that we don't really care about. However, I suspect some of the more regular markup languages have better tools (ie "that actually exist") to do stuff like imports and overrides. XML has something but my recollections are that it's a kind of ham-fisted thing and I'm stuck still having to code a lot of stuff. We're also turned off with Tag Hell. We expect people to manually view and edit these files.

This is one of those situations I've already had in the past where I've learned to stay the hell away from trying to turn a markup language into a Turing-complete programming language. Don't look at me like that! I never did it but I've seen it happen and I imagine some of you have had that little devil on your shoulder suggest it indirectly. There are warning signs for that and I think I'm staying ... close, but clear.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Rocko Bonaparte posted:

I'm trying to represent a lot of stuff as metadata and give people with good technical sense but very little programming ability a fighting chance of arranging some functionality together.

This is a fool's goal.

The thing you are asking them to do is programming. If they have enough programming knowledge and ability to plug things together in your configuration schema, they have enough to be able to muddle out how to do it in an actual programming language. If they don't, they will need to ask for help, and whoever ends up helping will end up frustrated by the limitations of what can be achieved in your schema.

The Fool
Oct 16, 2003


He’s making a game, so I’d say that’s a feature not a bug

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

The Fool posted:

He’s making a game, so I’d say that’s a feature not a bug

No this question is for work stuff and for work stuff I'm totally fine with going "aw gently caress no."

Everything I've seen that gives a lot of flexibility here is used in stuff like view frameworks like XAML or whatever, and they've always come across as delusional about not being programming. Politically, I think it'll be better if I stubbed out an example in some syntax and just rubbed into into everybody's faces that this isn't going to work out. So I'm generally with Jabor but I also know it's a thing and I'm fine with crawling into the rabbit hole for factfinding but implementation is something else.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

Rocko Bonaparte posted:

Politically, I think it'll be better if I stubbed out an example in some syntax and just rubbed into into everybody's faces that this isn't going to work out.

Let them eat Lisp.

Faith For Two
Aug 27, 2015

ultrafilter posted:

Is it recursive?

I’m not sure what you mean. No?

This issue affects all my Makefile targets regardless of what kind of work the targets actually do.

I don’t have numbers with me but for a target that compiles code instead of running shell commands, the stats might like this:

real 1h
sys 15m
usr 15m

Volguus
Mar 3, 2009

Rocko Bonaparte posted:

This is one of those situations I've already had in the past where I've learned to stay the hell away from trying to turn a markup language into a Turing-complete programming language. Don't look at me like that! I never did it but I've seen it happen and I imagine some of you have had that little devil on your shoulder suggest it indirectly. There are warning signs for that and I think I'm staying ... close, but clear.

I've seen it happen too (it was XML and they had if-like-statements and loops in there) and it's insane. Don't go there. If you need to do programming, use a programming language (lovely scripting one is fine, they're not gonna be long files anyway). If not, and it's just a config file, then whatever it doesn't mater, but it's nothing more than that.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Volguus posted:

I've seen it happen too (it was XML and they had if-like-statements and loops in there) and it's insane.

holy poo poo don't tell me there's more than one of these in the world

mystes
May 31, 2006

That's most templating languages so I suppose you could theoretically use any of them for your XML configuration files if you were really determined to. Heck, why not go all the way and use react with jsx!

mystes fucked around with this message at 14:57 on Feb 20, 2020

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

It sounds like you're trying to create an inner platform, which is generally an anti pattern. As others have said, people with technical know-how but few programming skills will still have trouble, and now you'll be responsible for maintaining this thing, possibly even bug-for-bug. You only really want to do this if you have a specific, limited goal, or you're willing and able to let clients eat poo poo frequently. You might want to consider something straightforward like exposing an API that can be hit with simple scripting languages like Lua or JavaScript.

Volmarias fucked around with this message at 16:03 on Feb 20, 2020

Adbot
ADBOT LOVES YOU

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I suppose I should add I'm interested in any preprocessor technologies for existing markup languages partially to read about everybody bitching about it.

On a more optimistic side, this is basically one extreme of how this could go and it could be swung back, but I want to construct an artificial example to ram it home anyways. The place in my example where I think it gets ugly is where I need to set up something conditionally. That's about where it might as well be programming. Nonetheless, I could still drift this away from Crazyland but not far enough and get something really compromised that everybody has convinced themselves is "balanced" instead.

The main motiviation for this is to get more reuse out of something whose previous attempt was definitely too rigid. The current standard I'm fighting was created by somebody that thought it was perfectly fine to create one object that ran itself in a parent mode to create multiple instances of itself in a child mode that it were into itself to run and manage. The whole thing was gated by conditionals on whether the instance was in a parent mode or a child mode. Actually, they didn't think it was fine to create one object. They would have preferred having none and just slapping the variables for arbitrary instances of the child in the module namespace. That's just one example from it.

Volmarias posted:

It sounds like you're trying to create an inner platform, which is generally an anti pattern.
Okay I think this is the magic term I'm looking for as a cudgel against going too "reusable."

dupersaurus posted:

holy poo poo don't tell me there's more than one of these in the world

Any sufficiently large organization--and probably several small ones--does this at least once. A decade-younger Rocko almost did this and managed to step back. But it's not just me. There was at least one other tool that definitely did this, and then redid itself as basically a graphical Python editor. Finally, somebody else decided to literally reinvent C++ and make a hundred other people try to write code in it.

Like what Volguus posted, a tell-tale sign is conditionals and loops. You're basically creating an abstract syntax tree in a markup language and then interpreting it... because that's easier for non-programmers or something.

ynohtna posted:

Let them eat Lisp.

I don't know if anybody else got how on-point this comment is. Imagine you're writing a "highly flexible JSON configuration syntax" and you just replace all the curly brackets with parentheses. Then you're pretty much halfway there.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply