To be fair, the only language I actively code in is Java, where only != == <= >= // /* */ apply 99% of the time, and those have nice symbols in Fira Code.
Question: As a High School student, anyone have idea on where I should attempt to apply for like internship or something. It seems like good idea but I am not having like PhD so Google does not have any opportunity :(
According to Google, you should:
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Optimize images
Prioritize visible content
Leverage browser caching
You know, since this is something that you'd have to ask your parents about anyways, I'm sure they'd be happy to help you find things. If they work in the Bay Area I wouldn't be surprised if they had connections or at least knew some places
All the technical details have been nicely covered in the other answers. I just want to share a simple analogy that I think nicely illustrates the difference between a class and an instance:
A class is like the blueprint of a house: You only have one blueprint and (usually) you can't do that m...
package com.qwerpderp.blackhole;
import java.util.Scanner;
public class Main {
private Scanner reader = new Scanner(System.in);
private int players;
private Game game;
public static void main(String[] args) {
init();
loop();
}
public void init() {
System.out.println("Enter amount of players: ");
players = reader.nextInt();
game = new Game(players);
}
}
@quartata Do you know how hard it would be to make a survival Minecraft mod where the F3 menu only shows player coordinates, so all the other stuff isn't in the way? Or alternatively, a mod where you can type e.g. /location and it will return x y z of player coords?
@Qwerp-Derp Because it's hypothetical. I haven't tested it at all, I just put that there as a guide so that I know what an example call might look like.
Does Mathematica Have a builtin?
Mathematica has a lot of builtins.
Your task is to take in a question by either its question id, its name or both; and to guess whether or not Mathematica has a builtin that solves that question.
Rules
Your code must be less than 100 bytes long
You may access...
Hello, can I enlist some people to find questions where mathematica has a builtin? It doesn't matter how simple or complex I just was hoping to find a bunch of examples and I could only find 7
so, many chess engines look forward X moves, and give a score to a particular chess configuration. Is there anyway I can capture that last step of scoring a particular chess configuration without requiring them to do the recursive search?
(in a challenge)
the problem is that you can't say "no looking X moves ahead" because that is so hard to define (and is largely non-observable)
@NathanMerrill If you want generic chess state "scoring", I'd say no. But you could ask for basic, non-recursive metrics, like how many pieces are attacking/being attacked
yeah, but I feel like there are tons of ways to score those things, and I was hoping for competition to be in that space, rather than a code-golf challenge
tinylisp
Factoid:
tinylisp is a language made by @DLosc for an "interpret this language" challenge. Its intent is to demonstrate what a Lisp-like language can do using only very few builtins.
Here is an interpreter.
Snippet 1:
d
This single character is perhaps the most used builtin in tin...
@Dennis annoying thing about TIO: when you have a permalink, click the little "TIO" link/button in the top left, it takes you to the tio about page not the nexus
I want to test more code in a different lang, but now I have to figure out where the little nexus link is on the new page
@Downgoat Command-line arguments don't seem to be doing anything. They also don't resize with input, making anything longer than two characters extremely hard to read. And there's no debug field, so when anything goes wrong, there's no easy way to figure out what it is.
@Riker Right, I see how that can be annoying.
Ah, finally figured out why my shutdown answer works.
I can't really add CLAs ATM because I previously inspected what binary data was being sent to server and now that you are using different backend. I first have to try to understand what is happening now.
@Downgoat Of course. That's the first thing I do when to tell me to try something again.
But run-legacy is still the same backend...
Anyway, if they're not supposed to be working, remove the textarea or add a notice. Trying to work with CLAs that are simply ignored is just frustrating.
Should the -D compile flag in C be a standard loophole, as proposed by Mego in this comment? If so, are there similar features in other languages that should fall in the same category?
@NathanMerrill That's basically the point of the meta question: what is the "source code" of a quine, when command-line flags are an integral part of making the code work the way it does?
right, but Mego's answer is on point: the flags are not part of the source code at all
if it is part of the source code, then you would have to output it as part of your quine. If its not part of the source code, then a -D quine doesn't work, because there isn't this encoding-a-different-part-of-the-source-code
I just wanted to know if it is 100% possible, if my language is turing-complete, to write a program in it that prints itself out (of course not using a file reading function)
So if the language just has the really necessary things in order to make it turing complete (I would prove that by transl...
@NathanMerrill Something like code AB, flags -D'A=main(){' -D'B=printf("AB");}'. The B in the code encodes both the A and the B, right? (And the A is just needed to make the B part run.)
@Qwerp-Derp That's what's really going on with named functions, too: when you do (d succ (q ((n) (s 1 (s 0 n))))), you're binding the name succ to a lambda function, and when you call (succ 1) it evaluates succ to that function and calls it on 1.
@Qwerp-Derp Given that it's not an object-oriented language, I think your best bet is to make a library of functions that take 2-element lists and do math on them as if they were fractions.
Probably the easiest way is to make a helping function/macro that takes a list as an argument, do all your recursive stuff in there, and then call it with args from your main function/macro.
Actually, I would use the name len for a function that takes a single list, not variadic arguments.
Right. The problem is that your recursive call is passed to a couple of s calls after it returns, so the interpreter can't optimize it into a loop. You'll hit the recursion limit for large lists.