@Pavel So far, I have had to convert i-beams and a special syntax ; which allowed printing multiple arrays on a single line even though APL\360 didn't allow nested arrays or mixed data types in a single array.
@Riker I'm not sure when it was originally written. I can just see when the workspace (≈file) was last saved, and that was after it was ported from APL VS to APL\360… Anyway, it now works on the very newest APL system (due to be released this summer).
The goal of this challenge is to determine if a move is a legal (English) checkers move.
This challenge will use an 8x8 board. A moved piece should be treated as a man (not a king) that can only move diagonally forward. The board will have 0 or more black pieces and 1 or more white piece. One w...
@DIDIx13 sandbox = chat room 1, very easy to remember.
@MagicOctopusUrn '11.
@cairdcoinheringaahing If you find the community bad, can you leave some suggestion how do you think to make it better? We had some discussion about that and still can't understand what's wrong.
Challenge
Encode a string of bits as a single integer using primes.
How?
Hold a prime (starting with 2)
Have a list
For each bit in the input
If it's the same as the previous bit, add the prime you're holding to the list
If it's different, hold the next prime and add that to the list
Retur...
1.) Write a program that contains a main function and a custom, void function named show_larger that takes two random integers as parameters. This function should display which integer is larger and by how much. The difference must be expressed as a positive number if the random integers differ. ...
Challenge
Create a function that takes an string as a parameter. (Easy as far)
This string will contain
Single digit numbers
Letters from the alphabet
Question marks (Of course)
Your function will check if there are exactly 3 question marks between every pair of two numbers that add up to 1...
Cross posted from my anagolf post (note: may contain spoilers, post mortem).
Output the following text exactly.
You may have additional trailing whitespace on each line, and trailing newlines as well.
Shortest code, in bytes, wins.
...
Tensorflow's implementation of AdamOptimzer do not have params like ProximalAdamOptimizer, the l2_regularization_strength param, is it necessary to add l2 norm in AdamOptimzer?
Write the shortest code you can that produces an infinite output.
That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code wins.
Here's a list of answers that I think are really clever, so they can get credit:
The co...
Hmm for me clicking them will redirect there immediately for some reason, and I am definitely pressing as usual. I have no problems with the internet connection, too.
Make an upside down triangle of positive integers. Every number in the triangle must be distinct. Each number is the summation of its two parents (similar to how Pascal's triangle is constructed, but upside-down). Construct it in such a way that the bottom number is minimized.
For example, for i...
The history of video games spans a period of time between the invention of the first electronic games and today, covering a long period of invention and changes. Video gaming would not reach mainstream popularity until the 1970s and 1980s, when arcade video games, gaming consoles and home computer games were introduced to the general public. Since then, video gaming has become a popular form of entertainment and a part of modern culture in most parts of the world. The early history of video games, therefore, covers the period of time between the first interactive electronic game with an electronic...
The history of video games goes as far back as the early 1950s, when academic computer scientists began designing simple games and simulations as part of their research. Video gaming did not reach mainstream popularity until the 1970s and 1980s, when video arcade games and gaming consoles using joysticks, buttons, and other controllers, along with graphics on computer screens and home computer games were introduced to the general public. Since the 1980s, video gaming has become a popular form of entertainment and a part of modern popular culture in most parts of the world. One of the early games...
@Riley hi, I have a sed question, (spoilers(?) ahead) while looking into the sed solution to the ascii pylon on anagol, I noticed that the solution began with s/.*/stuff/;sssblahs, the second substitution command matched the entire pattern space somehow (having s/$/stuff/ instead of the first line doesn't allow the trick). Do you know why that happens?
The following list of text-based games is not to be considered an authoritative, comprehensive listing of all such games; rather, it is intended to represent a wide range of game styles and genres presented using the text mode display and their evolution across a long period.
== On mainframe computers ==
Years listed are those in which early mainframe games and others are believed to have originally appeared. Often these games were continually modified and played as a succession of versions for years after their initial posting. (For purposes of this list, minicomputers are considered mainframes...
@Cowsquack If you don't give a pattern to match it will use the pattern from the previous substitution. I didn't know this feature existed. I only realized it because I happened to run sss123s.
Challenge:
You'll be given an ASCII image of a pile of weights as input, and must output the combined weight of the pile.
Format:
There are 5 different weights, weighing 1, 2, 5, 10, 20 Passerees (or some other arbitrary unit).
The weights looks like this, in ascending order:
1: __
|...
@DJMcMayhem I mean like I could add a command line flag though that's probably not a good option because then people on both sides will use both and it will get confusing when you forget the flag so I might just keep it at 1-
That's one of my biggest complaints with vimscript actually. For example 'a' == 'A' may give 0 or 1 and there's no way to tell without looking up settings
@Soaku 443 isn't required for https; it's just the commonly used default. your python code shouldn't need to do anything special for an http request to be sent with ssl. that's all at the web server level
@Poke Python wiki says You will need "cacerts.txt" file that contains root certificates placed alongside the script. but which certificates? ca-bundle? crt? both? in what order?
@Poke I mean, what should python respond to HTTPS requests? How I make HTTPS work? Where should I send all these certificates? ._.
It seems like you have a self-signed cert on a webserver somewhere and you're trying to hit it from python and from a browser. In the browser you will probably get a cert error page where you can click a button to continue anyway or you can install the cert so it's trusted by your browser. In python this trust is set up via the cacerts file you mentioned earlier
A browser doesn't know if your website supports https. If you're making a request to an https url, it starts setting up the ssl connection. The certificate is sent from the server to say "this is who i am and this is who can confirm it".
https is just http that is encrypted
there's an extra step before you make a request and an extra step before you read the response
The browser, when it connects, will send its cipher suites as part of its handshake message. The server then sends its public key to the client, the client then uses that certificate to generate a secret. Here is some small details.
It will send the certificate (initially) just the same as if it were sending an image or some text. "Here's the certificate."
When you try to navigate to google.com, your browser sees that you're trying to use https. Instead of just sending your GET request right off the bat, it sends a CONNECT request with, as AdmBorkBork mentioned, your accepted cipher suites. Then google responds with its cert
I did create a script (previously shared in a gist) which, in theory, should start listening to HTTPS requests and respond with certificate, but I always get "took to long to respond" error
Without access to httpd.conf, you won't be able to configure Apache to use SSL/TLS. Or, if it's already configured for you, you won't be able to change the configuration.
I don't know enough Python to be able to debug your script, sorry. Basically, what needs to happen, is for the script to open a socket listener on 443, wait for a connect, receive the potential cipher suites, respond back with which one is appropriate, receive the pre-shared master key, and then utilize that key to encrypt traffic from there on.
Don't Cross the Beams
geometric graph code-golf
This challenge is heavily inspired by The Talos Principle. The game includes a number of puzzles with light beams which you can connect using connector objects. One interesting property is that beams cancel each other out if they cross. This cha...
the problem is that it might be reading the certificate correctly, read it correctly and do everything correctly. The problem is that while the script is on, no requests on my domain ever get a response. Even those handled by Apache
@Soaku If python is providing a means to create an http server that supports https, then all you should need to do is configure it. You shouldn't have to manually serve your certificate or respond to CONNECTs
...there's a repo that is serveral gigs big. I simply want to add a single file, and push a new branch (for a merge request). Is there anyway to do this without pulling the entire repo?
How Much Ya Bench?
Inspired by the challenge A pile of weights.
Challenge
Given an integer as a weight in pounds, output an ASCII barbell with the next highest valid weight. Weights will come in the form of the barbell (which will weigh 45lbs) and plates with the following weights: 45lbs, 35l...