|
I did it! I found the worst thing! https://github.com/ajlopez/CobolScript/blob/master/samples/mysqlweb/database.cobp Its HTML, with embedded COBOL. Running on Node.
|
# ? Jan 19, 2016 16:26 |
|
|
# ? May 14, 2024 13:51 |
duck monster posted:I did it! I found the worst thing! All the bad parts of PHP, COBOL, and Node.js, in one neat package!
|
|
# ? Jan 19, 2016 17:14 |
|
duck monster posted:I did it! I found the worst thing! ...connecting to and dumping a MySQL database. It's actually pretty readable. A little syntax highlighting and it'd look a lot like VB. Maybe COBOL isn't so bad when you don't have old-school limits on variable names and line length.
|
# ? Jan 19, 2016 17:23 |
|
Munkeymon posted:...connecting to and dumping a MySQL database. Congratulations, you may have what it takes to maintain software for the US banking system in perpetuity!
|
# ? Jan 19, 2016 17:41 |
|
Pavlov posted:Congratulations, you may have what it takes to maintain software for the US banking system in perpetuity! US or elsewhere. And you are assuming the code style is more modern than COBOL-74. Yuck!
|
# ? Jan 19, 2016 18:44 |
|
COBOL isn't really a horrible language when you get down to it. The real pain is the thing it's pretty much exclusively used for - 40 years' worth of the most tangled, tedious cruft most developers will ever see.
|
# ? Jan 19, 2016 20:02 |
|
Amberskin posted:US or elsewhere. Now that I think about it, what I said can be restated as "COBOL isn't so bad when you make it less terrible"
|
# ? Jan 19, 2016 20:04 |
|
daft punk railroad posted:COBOL isn't really a horrible language when you get down to it. The real pain is the thing it's pretty much exclusively used for - 40 years' worth of the most tangled, tedious cruft most developers will ever see. From COBOL-85 onwards it is a pretty standard imperative language. You CAN write decent and readable code in COBOL as well as you can do it in FORTRAN or PL/I. If your problem consists on processing flat, fixed field files you won't find anything better for the job (except, perhaps, PL/I, which is the jack of all trades). Previously to COBOL-85. it is horrible (there is an intermediate COBOL-81 which is so-so). You MUST use GOTOs to implement logic, there is no concept of nested programs (and all the storage used is static), and you can enjoy things as evil as ALTER xxxx TO PROCEED TO yyyy (and yes, this makes what it seems to make: modifies a "label" so any GOTO addressed to that label goes to another one instead). The main problem is the old-school COBOL programmers kept writing COBOL-74 codes even under the more modern compilers. And kept the traditional formatting with the dreaded A, B and C areas invented when everyone was using punched cards. Post COBOL-81, the source is more or less free format (the only constraint is you have to indent the actual code four spaces to the right to difference it from the labels).
|
# ? Jan 19, 2016 22:30 |
|
Every time I see a discussion describing semantic indentation as a "more modern" style of syntax than using words or symbols as delimiters I giggle a little bit. More people should try FORTRAN and COBOL if only to gain a better perspective on the history of programming languages.
|
# ? Jan 20, 2016 00:21 |
|
Internet Janitor posted:Every time I see a discussion describing semantic indentation as a "more modern" style of syntax than using words or symbols as delimiters I giggle a little bit. More people should try FORTRAN and COBOL if only to gain a better perspective on the history of programming languages. Tell me your thoughts about Python.
|
# ? Jan 20, 2016 00:28 |
|
Python is a depressingly mediocre language. There are slower languages, more dangerous languages and worse-designed languages, but it is a master of nothing. Wouldn't bother me as much if it weren't for so many people trying to push it as a language for education. From syntax to semantics it is riddled with inconsistencies and "convenient" special cases. There are considerably smaller, simpler and more internally consistent languages (Pascal or Logo, for example) which are much easier to learn.
|
# ? Jan 20, 2016 00:43 |
|
Munkeymon posted:Now that I think about it, what I said can be restated as "COBOL isn't so bad when you make it less terrible" It's more that if you took any language, and wrote a program in it 40 years ago with the other limitations of the day, you would have a miserable time dealing with it right now. And if you re-implemented that same 40 year old program with modern limits it'd probably be a lot clearer. At some point in the not too distant future, there's going to be people dealing with a 40 year old PHP program.
|
# ? Jan 20, 2016 01:43 |
|
fishmech posted:It's more that if you took any language, and wrote a program in it 40 years ago with the other limitations of the day, you would have a miserable time dealing with it right now. And if you re-implemented that same 40 year old program with modern limits it'd probably be a lot clearer. ...and it wouldn't work.
|
# ? Jan 20, 2016 01:45 |
|
Internet Janitor posted:Python is a depressingly mediocre language. There are slower languages, more dangerous languages and worse-designed languages, but it is a master of nothing. python has two major advantages: - people who like perl can usually be persuaded to adopt python - people who like matlab can usually be persuaded to adopt numpy it's not a good language exactly, but it's managing to displace some far worse things, and that is holy work
|
# ? Jan 20, 2016 03:04 |
|
Soricidus posted:python has two major advantages: As someone who had to transition from Python to Java, I will also add to that list a refreshing minimum of boilerplate. Don't underestimate how important minimization of boilerplate is for an educational language, either: you want your lesson code to be as minimal as possible while still being functional. "int main(int argc, char** argv)" is pretty drat inscrutable for a newbie. And whoever thought Java was a good introductory programming language was out of their loving mind.
|
# ? Jan 20, 2016 03:52 |
|
Internet Janitor posted:Python is a depressingly mediocre language. There are slower languages, more dangerous languages and worse-designed languages, but it is a master of nothing.
|
# ? Jan 20, 2016 03:53 |
|
Soricidus posted:python has two major advantages: Yep. I don't know whether Python is "good," and I don't personally enjoy using it at all, but it seems to be an incredible productivity multiplier for researchers who are more interested in their research than the programming their research requires.
|
# ? Jan 20, 2016 05:15 |
|
I just wish those researchers would stop developing and testing Python at small scale, and when they deploy it to a cluster of 200+ workers and start hitting file descriptor limits they stop acting mystified that such a thing could ever happen.
|
# ? Jan 20, 2016 05:25 |
|
All the best stories start with "let's put Lua in production, where it will process millions of requests per day".
|
# ? Jan 20, 2016 05:28 |
|
Subjunctive posted:All the best stories start with "let's put Lua in production, where it will process millions of requests per day". Bah you misspelled billions there...
|
# ? Jan 20, 2016 06:00 |
|
Hughlander posted:Bah you misspelled billions there... The service I had the conversation about is low-8-digits, so maybe there's still time.
|
# ? Jan 20, 2016 06:04 |
|
Cloudflare claims 10 digits, but I guess they probably don't use lua for everything.
|
# ? Jan 20, 2016 06:22 |
|
PowerDNS has a Lua backend, I wonder how many QPS it does.
|
# ? Jan 20, 2016 06:25 |
|
Plorkyeran posted:Cloudflare claims 10 digits, but I guess they probably don't use lua for everything. Do you think they run Lua in their CDN asset serving code path? They might, CDN systems usually have CPU to spare.
|
# ? Jan 20, 2016 06:49 |
|
Volte posted:Seems like a great place to start then. Learning to deal with mediocrity and special cases early on seems better than the usual method of teaching in a perfect vacuum and then throwing students to the sharks eventually when real-world problems start making an appearance. I'd rather deal with junior developers who have a strong grasp of fundamentals like iteration, recursion, bread-and-butter algorithms and complexity analysis taught in a "perfect vacuum" than junior devs who only know about the ephemeral quirks of frameworks and tooling and can barely piece together a trivial loop. In practice we end up with loads of people who have a grasp of neither. I think that learning to program and learning a language are largely orthogonal tasks which simply tend to happen at a similar time for beginners. If you learn to program, you can pick up any language in the same general paradigm with a minimum of effort. If you learn a language without fundamental skills, you're a cargo-cult programmer. Thus, learning to program is the skill which matters. Small, simple languages allow that initial focus to be heavily weighted towards fundamentals. Eventually you are going to have to learn to deal with the ugliness of the real world, but I don't see the value in hobbling and discouraging beginners.
|
# ? Jan 20, 2016 07:05 |
|
Internet Janitor posted:I'd rather deal with junior developers who have a strong grasp of fundamentals like iteration, recursion, bread-and-butter algorithms and complexity analysis taught in a "perfect vacuum" than junior devs who only know about the ephemeral quirks of frameworks and tooling and can barely piece together a trivial loop. Nobody here is defending this dichotomy.
|
# ? Jan 20, 2016 07:14 |
|
What language would you recommend they learn, though? I'm not aware of any language that everyone enjoys. Out of the plangs (PHP, Perl, Python, Ruby, JavaScript) Python seems to be least worst of them.
|
# ? Jan 20, 2016 07:16 |
|
Python is a pretty flawed language with an ecosystem that's better than most of them. I only use it either for the slap-rashest of slap-dash stuff or to use django. I'd probably never run it again if a Haskell web framework that was not Yesod but not as loose goose as Happstack shows up... I guess it goes to me to do the work of writing one, maybe. I honestly think that most people's first languages should either be low-level C or Haskell.
|
# ? Jan 20, 2016 07:18 |
|
For absolute beginners, I think Logo or Pascal could be good choices. Even a classical BASIC could be an effective tool- it could teach a few bad habits, but it has brutally simple syntax and semantics. I've worked with kids in BASIC in the past and students very quickly grasped how to trace out BASIC programs by hand and understand how they work. BASIC is pretty much working at the level of assembly language with friendlier syntax and it makes a decent gateway drug to low-level programming. If I had to choose a mainstream plang, I would probably go with JavaScript. For all its warts, it is possible to use JS as a fairly nice functional programming language. By building on a good core, it is possible to ameliorate many shortcomings of the language through libraries. Python, on the other hand, is very deliberately designed without good building blocks for this style of programming. Anonymous functions and and Python's concept of scope and closure are very limiting. Internet Janitor fucked around with this message at 07:59 on Jan 20, 2016 |
# ? Jan 20, 2016 07:39 |
|
Internet Janitor posted:Python, on the other hand, is very deliberately designed without good building blocks for this style of programming. quote:filter(P, S) is almost always written clearer as [x for x in S if P(x)]
|
# ? Jan 20, 2016 07:55 |
|
It makes more sense for things that aren't actual functions or when you don't want just the item from the sequence: Python code:
|
# ? Jan 20, 2016 08:00 |
|
Also, replace those [] with () and it generates it lazily.
|
# ? Jan 20, 2016 08:03 |
|
No Safe Word posted:It makes more sense for things that aren't actual functions or when you don't want just the item from the sequence: For things that aren't filters, then, you should write something other than "filter". If you want something that's not the item from the sequence, you map, optionally after filtering.
|
# ? Jan 20, 2016 08:03 |
|
Subjunctive posted:For things that aren't filters, then, you should write something other than "filter". If you want something that's not the item from the sequence, you map, optionally after filtering. Well yes or I can use the comprehension syntax which is more expressive and powerful
|
# ? Jan 20, 2016 08:06 |
|
No Safe Word posted:Well yes or I can use the comprehension syntax which is more expressive and powerful It is both of those things, but that doesn't make it clearer. In fact, "more powerful" usually means "more opaque" when it comes to syntax.
|
# ? Jan 20, 2016 08:07 |
|
Subjunctive posted:
It's interesting to note, after you understand something, how difficult it can be to remember how... unclear things seemed when you didn't understand them. I've seen and worked with list comprehensions before, so the second form of notation made immediate sense, and I was wondering what the problem with understanding it was. I guess it's a less extreme form of how, now that I can read, it seems to be impossible for me to look at English letters and not recognize them. I can't look at letters and see strange and meaningless markings, like I do if I look at Chinese, Japanese, Arabic, Hindi, etc... characters.
|
# ? Jan 20, 2016 08:11 |
|
Seems like a good point in spacetime to post this: https://github.com/robpike/filter quote:I wanted to see how hard it was to implement this sort of thing in Go, with as nice an API as I could manage. It wasn't hard.
|
# ? Jan 20, 2016 08:20 |
|
nuvan posted:It's interesting to note, after you understand something, how difficult it can be to remember how... unclear things seemed when you didn't understand them. I've seen and worked with list comprehensions before, so the second form of notation made immediate sense, and I was wondering what the problem with understanding it was. Well, I've implemented array comprehensions, and I think I have a pretty good handle on them. I still went ahead and implemented filter/map in the language in question, because I and many others felt that doing so made for clearer expression of those specific (nearly language-universal) operations. That language had grown around first-class functions and closures in a way that Python didn't, but I don't think that was the source of the difference in clarity. (Matching the expectations of others coming to the language from functional ones which had the usual filter/map/fold/foldr/any/all/each operations was part of the motivation, too.)
|
# ? Jan 20, 2016 08:22 |
|
sarehu posted:Seems like a good point in spacetime to post this: I'm not sure what my favourite part of that is. The wafting Go aroma of interface {}, or that he decided to name the map operation "apply".
|
# ? Jan 20, 2016 08:25 |
|
|
# ? May 14, 2024 13:51 |
|
Didn't Python's built-in HTTP library not actually verify HTTPS certificates by default for a long time, or am I thinking of something else?
|
# ? Jan 20, 2016 08:26 |