Glorious old thread What are you working on, Sup Forums?
/dpt/ - Daily Programming Thread
Idris is a reasonable language
I love ruby
JavaScript
It's ~ATH (pronounced "til death"), a made-up language from the webcomic Homestuck. It looks like pic related.
reposting to demand answers
#
>~ATH(you)
#
>~ath(this)
what fucking sepples-ass shitlang is this
elixir
oh
thank
Code is at: When I move I scan the tiles along the X and Y axis individually, and then offset in case of collision. I added ramps, they do work. But, if there are solid tiles near it, then some weird stuff happens. I think I can solve the issue if I purely ignore solid tiles if I am currently on a ramp. Because tiles go from left to right and up to down, my problem is what i've tried to implement only works in one direction and not the other. Any ideas?
R-Ruby Senpai, why are languages not Turing Complete in practice?
...
Java is Turing-complete.
Turing completeness requires infinite memory, nothing is turing complete lmao, its a hypothetical model
WRONG
r-ruby senpai... how do i learn lisp?
How do you write a garbage collector for a Turing machine?
Local variables need not be located on the stack (they can be in registers), and depending on the architecture, loading a variable from memory can also perform arithmetic in the same instruction.
A turing machine has infinite tape. No computer has infinite memory. Programming languages are designed to make programs that run on computers, and not on hypothetical machines that might not even be possible. There is a limit to how far we can see in the universe. Beyond this point, space is expanding faster than light is traveling, so we can't really tell if there's nothing there, or if there is something there, but we'd never know. It is possible that the universe is infinite, and thus a real turing machine is possible (although constructing it would be an engineering miracle). It is also possible that the universe is finite, and as such, no turing machine is possible. A cluster of super efficient finite-tape turing-like machines is as good as any. Because let's be honest: while plenty of useful programs require infinite time, how many require infinite space?
Is there a standards document for or guide to this language?
If not, can I write one?
Also, how come in the webcomic we saw a bunch of ~ATH but never any ^CAKE? Supposedly the latter is good for game development. Also wasn't SBURB written in it
>Beyond this point, space is expanding faster than light is traveling, so we can't really tell if there's nothing there, or if there is something there, but we'd never know.
Not how the edge of the observable universe works, I'm fairly certain.
For someone wanting to get into programming, what language is good to start with? It's getting to the point that it's overwhelming with all the different languages there are. Also, any learning resources you guys would recommend to total noob?
You don't, why would you ever need to reclaim memory during program execution, or at all for that matter, if your computer is a Turing machine
Scheme
If space is expanding faster than light is traveling, and time can only propagate as fast as light, then wouldn't there be nothing there relative to us?
A Turing machine uses tape memory, so you have to take seek time into account. In some cases the overhead of garbage collection might be less than the seek time to the nearest memory block of sufficient size.
Well, astronomy isn't my specialty. That's just how I'm interpreting what I've read thus far. If someone can explain it better, feel free to do so.
>Is there a standards document for or guide to this language?
Not to my knowledge.
>If not, can I write one?
Is your name Andrew Hussie?
>Also, how come in the webcomic we saw a bunch of ~ATH but never any ^CAKE? Supposedly the latter is good for game development. Also wasn't SBURB written in it
The comic was long enough as is. I'm certain that there are plenty of things Hussie could have went more in depth on.
To learn any programming language:
1. Find a tutorial online or some book to learn the syntax.
2. Read some open source programs written in this language to get an idea of how programs in it should be written.
3. Write programs in this language until you consider yourself reasonably proficient in it.
Is scheme a scripting language? I don't think I've ever heard of it at all.
Define scripting language, user.
The idea is that every bit of space is expanding at a certain rate, the cosmological constant, so the expansion of distance between two points is c * distance.
He's actually right. We estimate the age of the universe by the inverse of the cosmological constant.
Scheme is like Lisp, but simpler and more purely functional, and you don't have to distinguish between functions and function values, because funcall and #' are both always implicit.
I don't know, similar to Ruby, Perl, and Python I guess? Like I said I'm a total noob.
Some Scheme implementations can be run as an interpreter, if that's what you're getting at.
Almost every dialect of scheme can be run as a script, but it's not really used like python or bash are. It's best lisp.
It's wonderful. You can do beautiful things.
To the rest of the thread, prove you're not a brainlet by telling me this code's output:
(use srfi-1 amb amb-extras)
(let ((deck (map (lambda (x) (amb #t #f)) (make-list 52))))
(required (= 13 (count-member #t deck eq?)))
(let ((hand (map not (take deck 13)))
(table (drop deck 13)))
(required (not (= (count-member #t hand eq?) (count-member #t table eq?))))
(print "You aren't a brainlet.")))
You mean interpreted, not scripting.
Which languages are slow and old fashioned?
...
Okay, interpreted then. Is Scheme something that has good documentation or learning resources freely available online?
SICP
>Any idea how size_t is defined in C90 implementations for 64-bit Windows? Long is 32 bits, there's no long long in C90, so what would they typedef size_t to?
__int64. You shouldn't use C90 though. Decent C11 compilers exist for Windows. If you need to use Visual Studio, there's an extension for it to use Clang instead of CL. Even if you are targetting embedded devices, GCC, Clang, and the Small Device C Compiler (SDCC) all support C11.
>With C it's iffy, since pointers do need to have some defined size, and an infinite-memory machine would need to have infinite sized pointers, which wouldn't really work.
It wouldn't be pragmatic, but it could be made to work.
Scheme has many different implementations, each with their own documentation. But yes, it is easy to learn given the resources freely available online.
>Cherry picking to defend your autism language
>It wouldn't be pragmatic, but it could be made to work.
I think the only way it would work is with bignums, though it would make sizeof(void *) undefined. It couldn't be fixed-size pointers since they'd be of infinite size, in which case a single pointer would take up the entire address space.
A "systems"-oriented language should be crushing Haskell in every benchmark.
i need help figuring out how to get this java maze program to work, its supposed to take in information from a text file, and then recursively determine if the maze is solvable, and my ide isnt providing any solutions pastebin.com
I'm not sure if sizeof(void*) would be undefined.
Turing machines I think only need an unbound amount of memory, not an infinite amount of memory.
In our magical C compiler, sizeof(void) would be resolved at compile time to what the program needs based on its length, which is finite, but unbounded.
he got carried away with the timelines thing and the pandering to his fandom, he fucked up.
It could have been his magnum opus, but it wasnt.
>moving goalposts
Hes not wrong though.
No. I never said Go was slow because it loses to Haskell in one benchmark.
Why the fuck would you want to learn Scheme? It's a dead language. Even COBOL would be a better language to learn.
C. Look into CS50 on edx
recursion is for brainlets
I see, no problem. I just read about it for a hobby, but my understanding is as follows:
At the Hubble length, objects recede at the speed of light, but this is within the observable universe
Past it, objects continue to recede at even faster "speeds" which aren't actually the result of faster than light travel, but rather that much space expanding per second between here and that object (which is why it's physically valid)
We can observe some of these objects because they were inside the Hubble length when the photon was originally emitted
The observable universe consists simply of the radius of distance where light has arrived to us
Even if the universe is infinite, assuming expansion continues, objects past the Hubble length can never be reached, so a universe Turing machine would have a finite amount of objects to work with
build a graph and use a bfs to find the solution node.
Just going to be kind and spoonfeed you: SICP is a Sup Forums meme. Don't waste your time trying to read it. Learn a language that is actually useful, not a dead one like Scheme.
What would you recommend then? For someone who's never done any programming?
C#, Java, or Python
or JavaScript if you're interested in web development
Haskell
Haskell is another /dpt/ meme. It's a dead language.
tiobe.com
Yeah you're spot on.
t. minor in physics.
don't samefag. also it wouldn't matter if scheme was a dead language because it has ffi to c and is highly flexible.
C or Scheme. Haskell is abstract algebra masturbation. Java is acceptable.
Listen to if you're looking for a career.
learn C, then read Introduction to OOP Patterns and then learn Java.
Read some algo books, build something, then learn all the shitty webshit and memelanguages you want.
>C
Dying.
>Scheme
Dead.
>Haskell
Dead.
>C
>dying
keep telling yourself that, brainlet
Tell me user where did the continuation touch you?
This is pretty good advice, I'd say C# over Java unless you're gonna try to go find a programming job ASAP
For your own sake, do not listen to the retards telling you to learn C. It is NOT useful outside of low-level development on kernels, drivers and embedded systems. Learning it as your first language would be stupid. Learn Java. It's portable (runs on everything) and it's easy as fuck to find anything you wish to know about it online. Plus it's what most Android apps are written in if you're interested in that.
Oh, and it's the most popular language at the moment, so it's easy to make a career out of it.
Yeah, but what if we had some sort of wormhole to reach those objects?
Unable to read graphs, pajeet?
Also, if the universe expands too fast, it's possible for a photon to never reach Earth even if it was originally emitted within the Hubble length.
Awesome, makes me feel like I wasn't wasting my time.
Sometimes I feel depressed when I look at the statistics for some languages
C# if you're on Windows, Java if you're on anything else
Nothing anytime soon, I'm currently in the navy, and got about 4 more years before I get out, I want skills more marketable than chipping paint and repainting.
i'll read it as soon as you give your sources on those (((ratings)))
tiobe.com
It doesn't matter that C is dying, if true, because it means the people left over will be competent. It's like Torvalds says in regards to C vs C++: he'd rather use C just for the fact it excludes C++ retards from contributing. The same applies to a "dead language".
If you want a marketable skill, don't learn C. Scheme or Haskell. That is probably the worst thing you could do.
>It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.
so, it's literally nothing then?
C is #2, is portable (runs on everything) and easy as fuck to find anything you want to know about online (because it's #2).
And I'm not sure if you knew this, but like, there's like, libraries for application development for C. And, most languages end up using that C code thinly wrapped and it feels clunky and awful calling them.
Are you retarded? It measures programming language popularity. C will drop out of the top 10 soon. Why? Because it's no longer needed. It's D E P R E C A T E D. Fucking dead. C. Has been. Replaced. Get it through your thick skull.
That stuff's too complicated for me. But it's probably impossible in the real world since pretty much any form of FTL travel involves violating causality.
what if recursion is a mandatory part of the program though
So you're resorting to lying now?
You do know that what they're talking about literally happened to COBOL, right? COBOL jobs are very high paying because very few people know it, yet despite being a "dead" language there's still a lot of legacy code written in it. Even if C is no longer popular as an applications language, it's still popular for implementing libraries, and those libraries will need to continue to be maintained.
C is dead.
>Replaced.
By what, exactly?
Where exactly did they lie?
I meant to type dfs, and the most common implementations are all recursive. I'm pretty sure the literal example for teaching dfs and graphs is to write a maze solver or generator.
Yeah, sure, show that link to Linus - I'm sure you'll make a sound argument for yourself and your abysmal language.
Here's term for people like you who think they're real programmers: en.wikipedia.org
Good luck getting one of those high-up jobs handling legacy code you teenage neckbeard. You're in for a shock once you enter the real world.
Yet you're using software written in C at this very moment.
Rust
you sound like a bitter failure why would anyone take advice from you?
What claim was "lying?" I cannot think of a system which has a java compiler which doesn't have a c compiler.
C has a million stackoverflow questions, an insane amount of documentation (more than java), and a million mailing lists.
There's 300 gorillion libraries for C too, and most languages do end up wrapping some of those libraries.
>>Replaced.
>By what, exactly?
C has been 100% replaced by Rust.
en.wikipedia.org
>Yet you're using software written in C at this very moment.
Actually I'm not. I intentionally do not use any software that came from a single line of C code.
Great job disproving your own argument then.
Daily reminder that the people who try to talk shit about OOP are literally too dumb to understand basic principles like inheritance and polymorphism.
Why would anyone take advice from YOU?
What's your OS then? Are you browsing Sup Forums on a commodore 64 or something user?
>Actually I'm not. I intentionally do not use any software that came from a single line of C code.
You're running Redox OS?
>I intentionally do not use any software that came from a single line of C code.