The Nineteenth Bakery

Trash for The Nineteenth Byte (commonly known as TN🍞)
13:09
0
Q: create joint ranking

Патрик Стар thing № property1 property2 1 5 6 2 7 9 3 6 10 4 1 7 5 2 5 6 3 4 7 4 3 8 8 2 9 10 1 10 9 8 lets say we have some 10 things. these things have property1 and property2, and we rank those things by property1 and property2 in in decreasing order respectively. now question:...

Mon 05:57
0
Q: Fashion Rupee Loan App customer care helpline number+) 9392893374//₹₹//9392893374+call.tt

Dhhdb BdbdbbFashion Rupee Loan App customer care helpline number+) 9392893374//₹₹//9392893374+call.Fashion Rupee Loan App customer care helpline number+) 9392893374//₹₹//9392893374+call.gh

Feb 11 07:04
0
Q: Sample integers that can be represented by long double randomly

SimdConsider the set of positive integers that can be represented recently by an 80 bit extended precision long double. The task is to output one chosen uniformly at random. Your code should output one of these integers uniformly at random. This means that each time it runs it should have the chance ...

Jan 30 21:49
0
Q: How can you overcome other skilled in

WatchFrom the money I have made how much do you think I should have

Jan 28 22:14
0
Q: Most brittle linked list implementation

Visual StudioThe Task Do you recall that chunk of brittle code where if you removed just one line, it broke everything? Well now is your time to shine! Your goal is to come up with a way to implement the logic to populate a linked list that will break with the fewest number of characters removed from the cod...

Jan 26 21:46
0
Q: Javascript program sending messages to Max MSP

TrixieI am trying to use this gesture recognition program to control a patch in Max MSP. I want to send a bang to max every time a new gesture is recognized. When the program is run, a bang is sent when the lastGesture variable is initialized, but not again even though I have tested the logic that upda...

 

 The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
yst 02:19
0
Q: 9 Queens and least obstacles

l4m2Position 9 queens and least obstacles on an 8×8 chessboard so that no two queens threaten each other. There's more than one solution. Output all of them. Shortest code in each language wins.

Wed 16:45
0
Q: Basic Uiua Planet Notation

noodle personUiua is a stack-based array programming language, and with the great power of a stack comes the great responsibility of having to manage it. In this task you will take on the role of the Uiua interpreter for a small subset of the language concerning the rearranging of values on the stack. If you'...

Tue 04:24
0
Q: Compute the infinite Pochhammer symbol

Parcly TaxelI saw the following problem on MathsSE: You try to do something and your probability of success is \$p\$. If you fail, you try again, but the probability of success falls down to \$p^2\$. If you fail again, you try again, but the probability of success is now down to \$p^3\$. If you fail, you ke...

Mon 13:12
0
Q: Snakes on a 2xN grid

noodle personA snake is defined as a path around a two dimensional grid which touches each square exactly once by repeatedly moving one up/down/left/right, starting at the square (0, 0). Below is an example of one snake of a 3x4 grid: 0 1 2 3 7 6 5 4 8 9 10 11 For any positive integer N, there are N s...

Sat 19:05
0
Q: N-step block pyramid for pharo

PlinyN-Step pyramid calculator. Calculate the number of blocks per column of an N step pyramid built using Y block, and return the number of blocks per column in a list. The build must use every single block, even if the result is an lopsided pyramid. The blocks can be placed in the right columns fir...

Feb 15 11:25
0
Q: Tips for golfing in Zig

138 AspenZig is a low-level, statically typed, and compiled systems programming language designed for safety, performance, and simplicity. It provides direct control over hardware with an emphasis on explicit memory management, zero-cost abstractions, and no hidden control flow. Zig's syntax is concise, a...

Feb 14 12:02
0
Q: Can you beat numpy convolve?

SimdThe task is to compute the convolution of an array with itself as quickly as possible. The array will contain 80-bit extended precision long doubles and I will specify how the array is to be created. In order to get a good range, the values will be sampled on a log scale and then scaled back up ...

Feb 10 18:28
0
Q: Does this standard loophole contain a loophole?

Wheat WizardThis standard loophole, disallows "Using the program name to store data without counting those bytes". However there is something curious about the "without counting those bytes" portion. Quoting from the answer: When using the filename to store data, add them as extra bytes to your solution sim...

Feb 10 07:22
0
Q: Max Island Area

PavelYou are given a two-dimensional array consisting of 0s and 1s. The number of rows and columns can vary. For example, 10 by 20. 0 represents water. 1 represents land. Your task is to find the area of the largest island. Example: [[0,0,0,0],[0,1,1,0],[0,1,1,0],[0,0,0,0]] Constraints and additional...

Feb 9 02:17
0
Q: Decide Equality of Closed Surfaces

Dannyu NDosObjective Given two closed surfaces (a.k.a. closed 2-manifolds), decide whether they're homeomorphic. Introduction In layman's terms, a closed surface is a shape that resembles a flat plane everywhere (say, when magnified very much). Familiar examples of a closed surface include a sphere and a to...

Feb 8 23:01
0
Q: Find the boolean logic to check if a number is prime!

FmbalbuenaYour task is to find a boolean expression that uses AND (\$\land\$), OR (\$\lor\$), XOR (\$\oplus\$), and NOT (\$\lnot\$) operators and binary digit positions (\$d_1,d_2,d_3,d_4,d_5,d_6,d_7,d_8,d_9,d_{10},\cdots\$) such that it successfully checks if any number is prime or not. Here are some clar...

Feb 8 05:49
0
Q: Is this number Ugly?

CrSb0001Related, but not dupe (Asking about the n-th k-smooth number whereas I'm only asking if a certain number is 5-smooth.)Source: Partially inspired by Leetcode's 5-smooth Number problem, but partially inpsired by my newfound interest in Befunge-93. Problem statement An "ugly number" (also commonly ...

Feb 7 04:16
0
Q: Half Price for Every Second Pizza

tataPizzaTata is a popular restaurant specializing in pizza delivery. Customers can order pizzas by phone. And each order is charged by the sum of pizza prices and the delivery fee. Pizza Prices: The cost of each individual pizza. Delivery Fee: A fixed fee per order, regardless of the number of pizz...

Feb 6 21:40
0
Q: Unap***peel***ing permutations

Jonathan AllanGiven the height, \$h\$, and width, \$w\$, describing a rectangle of the first \$hw\$ natural numbers in row-major order produce the numbers in the order they are encountered by repeatedly removing a strip of the outermost numbers, each time starting with the top-rightmost and ending with the bot...

Feb 5 11:49
0
Q: The Graphing Calculator 4: The Final Challenge

NatelolzzzPT 1 PT 2 PT 3 PT 4 Look how time flies! Long time, no see. This is the final post in my "Graphing Calculator" Series, designed to be a series of 4 increasingly complex code golf challenges... This time, can you put together your PT 3 solution, and add a general input field? So instead of passing...

Feb 5 02:54
0
Q: Determine Centrosymmetric String

tshLet's define a centrosymmetric string as follows: First, add spaces to the end of each line to make the input a rectangle \$ A_{m×n} \$, the number of spaces added should be minimized and possible be zero. The input is "centrosymmetric" string if and only if you get the original rectangle if you...

Feb 4 05:41
0
Q: Do Not Find the Fox in all possible ways

Parcly TaxelDo Not Find the Fox is a non-game where you repeat the following up to 16 times: Pick an empty square in a 4×4 grid Draw a tile from a bag – there are 5 Fs, 6 Os and 5 Xs at first – and place it in the picked square (you pick the square before drawing the tile) You win iff you fill the grid with...

Feb 4 00:05
0
Q: Can anyone Golf this code so small as possible. It can be 64 Bytes small. Now its 125 Bytes

user127064i=input L=int(i()) exec('t=[L*[27,ord(c)%32][c.isalpha()]for c in i()]'+";r=i();print(''.join(r[j-L:j]for j in t))"*int(i()))

Feb 3 21:41
0
Q: Challenge: Basic Shell

Nobody NobodyChallenge: Basic Shell Make a basic shell that has: Flow control The equivalent of cd, touch, ls, mkdir, cat, mv, and rm A way to edit files Basic programming, such as echo, data types, etc. Leaderboards Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners b...

Feb 3 18:13
0
Q: Card-Jitsu Part 2: Make a Card-Jitsu clone

Weird GlyphsPart 1 is available here. Card-Jitsu was a mini card-game based on Rock, Paper, Scissors available on the children MMO game Club Penguin. A lot of footage of this game is available online, and may be useful if you want to know what the actual game looks like. However, you obviously don't need to ...

Jan 29 18:50
0
Q: Index into a Fibonacci tiling

emanresu AThe Cartesian plane can be tiled with increasingly large squares like so: This tiling can be generated by starting with a square of side length 1, placed at the origin 0, 0, and then repeatedly adding a square to the side of the resulting rectangle clockwise of the previous square, starting on t...

Jan 29 12:04
0
Q: Is it France, Netherlands or Poland?

ArnauldBelow are simplified versions of the flags of France, Netherlands and Poland respectively, as 9x6 pixels: (Many other flags use this color scheme, but I think a smaller number of flags allows for more creative solutions.) Task Given a pair \$(x,y)\$ of coordinates within the flag matrix and a co...

Jan 27 17:07
0
Q: The steps of sorting a stack of disks on three pegs

bigyihsuanYou have a Tower of Hanoi-esque set of 3 pegs. There is a stack of unsorted disks labelled from 1 to n (inclusive) on one of these pegs. The other two pegs are empty. The only move allowed is to move the top k disks from a peg A to another peg B, without changing the order of the moved disks. (Th...

Jan 27 09:44
0
Q: Card-Jitsu Part 1: Find all winning sets of three cards

Weird GlyphsCard-Jitsu was a mini card-game based on Rock, Paper, Scissors available on the children MMO game Club Penguin. I first wrote a challenge where you needed to implement a clone of this game, but I figured that the winning conditions alone were complex enough to deserve their own challenge as a min...

Jan 26 13:10
0
Q: Repetition-restricted strings

Jonathan AllanGiven an alphabet's cardinality, \$n>0\$, and an occurrence limit, \$k>0\$, produce the number, \$a(n, k)\$, of strings that may be constructed from the \$n\$ letters in the alphabet which have no more than \$k\$ occurrences of any letter. Count the empty string, or don't, it's up to you. This is...

Jan 26 06:34
0
Q: Malfatti circle radii

Parcly TaxelConsider a triangle \$ABC\$ whose sides \$BC,CA,AB\$ have lengths \$a,b,c\$ respectively. In this triangle we can construct circles \$G_A,G_B,G_C\$ such that \$G_A\$ is tangent to \$CA,AB,G_B,G_C\$ \$G_B\$ is tangent to \$AB,BC,G_C,G_A\$ \$G_C\$ is tangent to \$BC,CA,G_A,G_B\$ These are the Ma...

Jan 26 04:13
0
Q: Determine if a rational number is a integer, without divition

Gabriel TellezDetermine if a rational number is also an integer, without any form of dividing. The input should be any pair of numerator and denominator. Don't forget to consider negative numbers, and division by zero. Dividing is defined as any operation/function that gives a quotient or reminder, even if it ...

 
Feb 15 15:32
0
Q: Decimal point as a binary operation

Марат РамазановI wonder if anyone has tried implementing the decimal point as a binary operation a.b = $f(a, b) = a+b/10^{1+floor(log_{10} b)}$ That would simplify the PL design, and add new possibilities. For example, (-2).34 is equal to -1.66, 3.(1+6*5) is 3.31

Feb 13 18:50
0
Q: How do modern compilers choose which variables to put in registers?

CPlusC has the register keyword, originally designed as a hint to the compiler that a variable should be placed in a register rather than on the stack. However this is generally considered an unneeded feature in this day and age: Most modern compilers do that automatically, and are better at picking ...

Feb 12 14:54
0
Q: Modifers vs annotations (aka pragma/attributes): when to use which?

ice1000In Java we have modifiers like private, static, etc., and annotations like @Override, @SuppressWarnings, etc. Apparently, it's a bad idea to have @Override being an annotation, so Kotlin turned it into a modifier override. It looks like when the modifier/annotation affects on the semantics, then ...

Feb 12 14:37
0
Q: Modifers vs annotations (aka pragma/attributes): when to use which?

ice1000In Java we have modifiers like private, static, etc., and annotations like @Override, @SuppressWarnings, etc. Apparently, it's a bad idea to have @Override being an annotation, so Kotlin turned it into a modifier override. It looks like when the modifier/annotation affects on the semantics, then ...

Feb 11 21:24
0
Q: Language constructs to reduce inadvertent interface implementation in purely structural type systems?

Kyohei KanekoIn a structural type system there may be cases where an inappropriate object is passed to an function because it implements the interface by chance. For example, class Chicken { private Breed breed; private Weight weight; private Date dateOfBirth; private Length wingspan; } class...

Feb 6 01:43
0
Q: Why did C99 have to add the underscored keywords for _Bool _Complex _Imaginary but not for inline or restrict?

CPlusC99 introduced the following keywords: _Bool _Complex _Imaginary inline restrict Why _Bool _Complex and _Imaginary instead of just bool complex and imaginary? To preserve backwards compatibility for existing codebases that might use bool complex or imaginary. However, if that was a problem, why w...

Feb 5 11:25
0
Q: How does the GNU Assembler deal with the directives from changing the syntax from AT&T to Intel or vice versa if those directives are in if-branching?

FlatAssemblerGNU Assembler, when targetting x86, has directives .att_syntax and .intel_syntax for switching between Intel Syntax and AT&T Syntax, and they can be put anywhere in the assembly language source file. That includes the if-statements. So I am asking, how does it handle them inside the if-statements...

Jan 31 23:42
0
Q: What optimizations are possible with unsequenced operators?

CPlusIn C, most binary operators do not specify which operand will not be evaluated first: int x(void) { putchar('x'); return 10; } int y(void) { putchar('y'); return 10; } // ... x()+y(); // Unspecified behavior, may print xy or yx Many other languages make guarantees that the oper...

Jan 30 19:42
0
Q: I want criticism for my interpreter written in Java

buzzbuzz20xxWorking on my open source interpreted programing language samir_script, It's interpreter is completely written in Java, Still in very early stages but right now you can create variables with the 'let' keyword followed by an identifier and an equals sign and then store an arithmetic expression in ...

Jan 30 16:56
0
Q: Why does the `target` attribute in HTML require a string starting with an underscore, such as `"_blank"`? Why not simply `"blank"`?

FlatAssemblerTo specify in HTML that an <a> link needs to opened in a new tab or a new window, you use the following syntax: <a href="https://example.com/" target="_blank">link</a> So, what is the underscore _ before "blank" doing? And why is it called "blank" instead of something like "new_window"? Is there...

Jan 30 16:45
0
Q: Why does the `target` attribute in HTML require a string starting with an underscore, such as `"_blank"`? Why not simply `"blank"`?

FlatAssemblerTo specify in HTML that an <a> link needs to opened in a new tab or a new window, you use the following syntax: <a href="https://example.com/" target="_blank">link</a> So, what is the underscore _ before "blank" doing? And why is it called "blank" instead of something like "new_window"? Is there...

Jan 30 16:21
0
Q: Are there OO languages which implement classes as persistent data-structures?

Kyohei KanekoI am an object-oriented developer professionally, but I have researched functional programming and (believe that) I understand the key principles which to varying degrees are applied in FP languages. I've seen how languages which are not FP only have been bringing some of the FP ideas into their ...

Jan 27 16:47
0
Q: Line continuation marks

supercatIn the first high-level language (FORTRAN), lines of text would by default be treated as indiviudal statements, except that a card which contained something other than an asterisk or C in column 1 and something other than a blank or zero in column 7 would be treated as a continuation of the previ...

Jan 25 10:05
0
Q: ISO 9899:2024 Sequenced before and pair-wise relation

Black MonkParagraph 5.2.2.4 of mentioned standard says Sequenced before is an asymmetric, transitive, pair-wise relation between evaluations executed by a single thread... What does the pair-wise relation mean? Is it a binary operator relation?

 

  The Garbage Disposal

Trash, garbage, and other miscellaneous cruft for Programming ...
Feb 10 11:28
0
Q: need help. how do i get a compiler installed?

Prajan Kunwarso I recently started doing c and programming as a whole and I cant seem to find a good way to install a compiler for programming, I got the basics down but don't have a compiler

Jan 31 20:20
0
Q: Converting program from 2d arraylist to 2d queue

Alfonso DeasonI have original form of this program in arraylist but I needed to convert it to queue how ever when reading and mutating/changing the queue I get an "ConcurrentModificationException" in my program what should I change import java.io.BufferedReader; import java.io.FileReader; import java.io.IOExce...

Jan 27 08:52
0
Q: Can DNA nutrition make a difference in your health and fitness goals?

bioflowproCan DNA nutrition make a difference in your health and fitness goals?