« first day (2203 days earlier)      last day (2643 days later) » 

9:14 AM
hi all
are code-golf assembly questions acceptable?
oh do we have too few people who know assembly?
 
Anonymous
@Lembik Why wouldn't they be?
 
SQL is bad when something like SQL injection is real
Is MongoDB relatively better?
 
@Mego sometimes people don't like questions that restrict the language
 
Is there a quick way to make a dict like {'a':138, 'b':278} from string "a 138\nb 278" in python?
 
there have only ever been 14 assembly questions! codegolf.stackexchange.com/questions/tagged/assembly
 
9:19 AM
I need a good name for a really small lifeform other than cell
Like something a virus "generates" but it may or may not generate that in reality
 
virlet?
 
I need a simple name
 
that was quite simple :) Do you mean you want to use a real word?
 
@HelkaHomba Not exactly (AFAIK). By "quick" do you mean "golfy," or "built-in," or...?
 
@Lembik Yeah, preferably
If not I'll have to make do with organism
 
9:21 AM
@DLosc I guess I mean without for i in range(0, 2, len(inp)): stuff
golfy or built-in
@Qwerp-Derp microorganism
 
My initial stab:
d={}
for entry in inp.split('\n'):
 k,v=entry.split()
 d[k]=int(v)
 
oh, not bad
 
Not fully golfed. Might be shorter as a dictionary comprehension.
 
@HelkaHomba Too long
 
@Qwerp-Derp microbe
 
9:22 AM
@HelkaHomba Ooh that's a good one
 
or nanobe :P
 
This guy wrote a C compiler that only outputs mov instructions, and it works. github.com/xoreaxeaxeax/movfuscator
 
yoctobe
 
@betseg I've seen that a lot of times already
 
@Qwerp-Derp I haven't ;_;
 
9:24 AM
@betseg But it is cool
You didn't let me finish :(
 
Aww ;_;
 
@HelkaHomba dict(x.split()for x in"1 138\nb 278".split("\n"))
 
Is it efficient or inefficient? I'm curious
 
Obviously inefficient
 
But mov is fast isn't it?
It's inefficient of course, but not that inefficient I think
 
9:27 AM
Don't underestimate new processors :p
 
@betseg how do if statements work?
 
No idea.
 
@Lembik Watch the talk.
It's all explained from the ground up.
 
49:14!
like is too short :)
 
@wizzwizz4 Ah, nice. Only one caveat: this will make the values strings, whereas the original request had values as ints. Dunno if this makes a difference to what @HelkaHomba is doing with it.
 
9:29 AM
I wonder how they produced the video
actually if is explained at 8:50
 
@xnor this is what you look like in my new language, Kinetic Logic
.>.>
(-(-
.{}.
..{}
[--]
>+].
+)..
 
@HelkaHomba What's the lang about? The name seems underwhelming compared to other names like Stackylogic :P
We need a slightly punny name
 
@DLosc Oh. That's easy enough to fix: dict((x,int(y))for x,y in (x.split()for x in"1 138\nb 278".split("\n")))
 
... At which point, however, using an actual for loop is shorter. ;)
 
@Qwerp-Derp It's a language meant to be (relatively) easy to physically execute in real life with balls as bits that are directed down tubes and pathways
 
9:34 AM
@HelkaHomba Marbelous 2.0?
Uhh Grabity? The "bit" doesn't really stand out though
 
@Qwerp-Derp Not really. Physically implementing some marbelous commands looks tough or prohibitive
 
Also @HelkaHomba do you have a repository?
 
Sep 7 '16 at 21:00, by Helka Homba
I would still love to build an entire K'NEX computer the size of a gymnasium someday
@Qwerp-Derp not yet
 
@wizzwizz4 {x:int(y)for x,y in(e.split()for e in string.split("\n"))}
(May not work in older versions of Python, can't recall)
 
@DLosc Of course you can do that! :-/
 
9:37 AM
Domino computers are pretty cool, I saw Matt Parker's domino computer but I'm not sure if that's optimal
I also think I might have a way to put memory in dominoes? I'm not sure
 
That's the exact same length as
d={}
for e in string.split("\n"):k,v=e.split();d[k]=int(v)
Which one is shorter therefore depends on if you just need the dictionary once in an expression, or if you need it stored in a variable. Also, whether this is inside an indented block.
 
so my challenge would be simply to divide two complex numbers in assembly
code-golf
 
@DLosc That code hangs on my machine if the variables aren't defined.
 
Guys, I've got it good enough ;)
 
@HelkaHomba We inferred an implicit "CMC:" at the beginning of your request. ;)
@wizzwizz4 Which variables? string?
 
9:47 AM
CMC: Given 3 distinct 1-digit numbers (0-9) output the middle one. e.g. 4 2 9 -> 4
as in second largest
 
Given as a string? List? Whatever's most convenient?
 
Uhh what about a language that's based off of an infinite list of integers just going 1, 2, 3, 4... and you have to modify it to get what you want?
 
@DLosc whatev convenient
 
Fairly boring answer in Pip, 6 bytes: (SNa1) (where a is a 3-character string of the digits)
In pseudocode: sortNumeric(arg)[1]
Now for an answer in Acc!!
 
yeah, not too hard
 
9:53 AM
V, 5 bytes. (trailing newline in output) Try it online!
 
Anonymous
@HelkaHomba Actually, 2 bytes: S║
 
Maybe reduce commands weaved in there?
 
@DLosc I had no variables defined
 
Yeah, and my code assumes you've got the string in string. Modify accordingly.
 
9:55 AM
@HelkaHomba Brachylog, 3 bytes: o↺h
 
Anonymous
21 bytes in Python 3: lambda*x:sorted(x)[1]
 
@KritixiLithos Wait, that is wrong
 
Perl, 23 bytes $_=(sort{$a-$b}@F)[1] (+ -ap)
 
Loads of 3 bytes answers in fact, o↻t, obh, okt, o∋₁
 
My nerd score is 69
Which means
Ummmmm
idk
 
10:06 AM
Mine is >70
Probably would have increased since the last time I took the test
 
But, 69?
69????
FUUUUUUUUUU
 
Anonymous
@MatthewRoh That's not really necessary.
 
explodes into pieces
 
Nerd test what
 
@HelkaHomba Acc!!, first attempt, 133 bytes:
3600*N+60*N+N
Count i while i-2 {
Count j while j-2 {
_+(_/60^j%60-_/60/60^j%60)*60^j*59*(_/60^j%60/(_/60^j/60%60))
}
}
Write _/60%60
(Inputs three characters, runs two rounds of bubble sort, outputs the middle one)
Actually, unless the huge expression can be golfed further, I think that might be the shortest it gets. Subtracting out 48 to get the actual digits won't help much because all the 60s would only become 10s, not saving any bytes.
 
10:20 AM
Acoording to nerdtest 2.0 I am a nerd god
 
wtf i searched up nerd test and this came up:
Which of the following is not a real programming language?
BASIC
C++
PASCAL
Assembly
FORTRAN
COBOL
WTF all of these are programming languages
 
Assembly's technically a type of language, so considering that nothing else makes sense if I had to choose I'd go with that
 
Anonymous
There are two correct answers, from two different viewpoints
 
Anonymous
One is Assembly, for the reason Sp3000 has stated
 
{x:int(y)for x,y in map(str.split,"1 138\nb 278".split("\n"))}
 
10:28 AM
I'm assuming the other is COBOL?
 
Anonymous
An answer without a reason is much the same as a doorframe without a door
 
Actually no I don't know, just a random guess
 
Oh, I think I see what Mego's getting at. Similar reason, isn't it...
 
@Mego What's the other reason?
 
Anonymous
@Sp3000 I see what you think you see, and no, because that reason is technically incorrect (the worst kind of incorrect).
 
Anonymous
10:31 AM
@Qwerp-Derp The other answer is COBOL, and its reason is that COBOL is an instrument of torture, not a programming language.
 
@Mego Dammit Mego why do you have to do this :(
 
Anonymous
Sp thought I meant BASIC, because there are many types of BASIC, but there is actually a programming language named BASIC.
 
@Sp3000 Cue someone here creating an esolang and naming it Assembly
 
I was going to say "Oh I think I see why what I think you thought I thought was technically incorrect"... but yeah, had to look up BASIC because I thought it was a language but wanted to double check and got myself confused doing so
 
@DLosc Golfed 7 bytes:
Count i while i-3 {
_+N
Count j while j-2 {
_+_/60^j%60/(_/60^j/60%60)*(_/60^j%60-_/60/60^j%60)*60^j*59
}
}
Write _/60%60
 
Anonymous
10:36 AM
@Sp3000 It's good that you interrupted the recursion before it become incomprehensible.
 
Whoops, nvm, that gives a zero division error apparently.
 
10:59 AM
What about a language that worked on reduce functions?
 
Anonymous
11:10 AM
I can't fathom what made you think that was appropriate. Please consider your messages before posting them, not after.
2
 
Okay
I think PPCG is the place where most esolang has been born, do you think so too?
 
I don't have evidence to suggest otherwise.
Esolangs are, by nature, obscure. If many where created on some strange far away forum, We'd have no reason to know about it, and such, we couldn't determine if it were more or less than our current creation rate.
 
Anonymous
@MatthewRoh We're up against the esolangs wiki and Chris Pressey. That's some steep competition.
 
But acoording to the esolangs wiki, we did make a lot
 
A thousand brainfuck Derivatives is cheating.
 
11:19 AM
True, just ignore the non-clever-and-just-a-copy-of-bf ones
And that includes 420
Which is a direct copy of chicken
 
A Brainfuck derivative is to be considered a valid abstraction, and thus, valid Esolang, if the difference between itself and either brainfuck or another derivative is more than simply additional or modified command set.
 
Are electronic circuits valid as a language
 
Yes, but their generally non-competative.
It's hard to score
 
Anonymous
People have used Verilog and VHDL in the past, though I'm not sure if there was ever a consensus on how to score them
 
But if we can, it'd most likely be a matter of parts
Like logic gates
 
11:23 AM
Hard to determine if you validate random chips.
 
Hmm
 
import custom_chip doesn't work on Hardware.
 
So we should restrict the parts
 
Anonymous
NAND gate golfing would be cool - solve the task using as few NAND gates as possible
 
Nah, Restricting the parts kills a chunk of the fun.
 
11:26 AM
I interest in EE but EE + CS = X-Treme fun
So I dont really go pure EE
 
I'd like NAND golfing, but I'm not sure how I'd score it.
 
Wait... If there exists a binary file which takes a number input on STDIN and pushes to STDOUT whether or not it's prime, assuming it's older than the challange, would that be a 0 byte solution to the Primacy Challange?
 
Anonymous
@EriktheOutgolfer Number of NAND gates used would be the most obvious
 
The amounts of nand gates?
Umm, three posts simultaneously 😮
 
Anonymous
Here's an interesting idea for a EE hardware challenge: given a voltage difference N between two inputs, output a 5V difference if N is prime, and a 0V difference if not.
 
11:28 AM
In 2017 I shouldn't be startled by emoji suddenly being rendered everywhere, but I still am.
 
Anonymous
@ATaco Yes, but said binary file would also have to satisfy our definition of a programming language
 
Anonymous
@mınxomaτ Fuuuuutuuuuure...
 
That challenge in particular allows any langauge.
It specifies "Basically our method of TC testing"
 
Anonymous
@ATaco Yes, any programming language
 
I like this answer of mine, most likely one of the first approaches of golfing with cellular automatons
 
11:30 AM
Mego that is a rude abuse of my words.
 
Anonymous
@ATaco 1) They aren't your words. 2) That's neither rude nor an abuse.
 
I feel personally rude'd at.
 
Anonymous
I'm sorry you feel that way.
 
@Mego *Any turing-complete object/non-object things
 
I don't find anything rude there. It's just a clarification.
 
11:32 AM
I hope it's obvious I'm joking.
 
@Mego So your saying, if the input voltage is prime, output 5v, if not, output 0v?
 
Anonymous
@MatthewRoh Yep. I was being very specific, since a lot of people don't realize that voltage numbers are meaningless without a reference.
 
Anonymous
@ATaco It's really not.
 
My Apologies.
 
There should be some form of calculating the input voltage
But I cant find a way without getting crazy
So I'd rather say its near impossible
Well We could use some form of a microcontroller but that ruins the whole fun
 
11:39 AM
Let's just hard-code the first 500 values and leave it at that.
 
We can use binary input but detecting primes with that? No.
 
Anonymous
Alright, how about this: you get 3 inputs. One is ground, one is +1V, and one is +NV. Outputs are ground and either +5V if N is prime or +0V if N is not prime.
 
@ATaco 😞
 
The easiest way, surprisingly, to do this is to build a very small basically functioning computer.
 
idk, I dont see a way to really do that >_>
 
11:41 AM
Me neither.
I'm a software guy.
 
I'm a soft/hardware guy but understanding some math is sometimes hard as hell
 
I can't think of a way to do any kind of reliable math on a single line.
 
You eventually will learn things of those sorts
 
Hello
 
Anonymous
With transistors, you can make op-amps. With op-amps, you can do voltage addition and subtraction. From there, you can implement division, and use trial division for the primality test.
 
Anonymous
11:47 AM
For even greater simplification: output is either +1V or +0V
 
op-amps..
:|
 
 
1 hour later…
12:58 PM
Kinda reminds me of those chromosome charts
(For anyone wondering, it's the graph of the trajectory of a certain function)
 
user image
6
 
@betseg Where do they sell them? Also, what is the source of this image?
 
@EriktheOutgolfer found it on reddit ;_;
 
1:15 PM
I don't know if the image is completely true though, it might be a prank, because that is normally STDERR output.
 
1:30 PM
So what should be output to STDERR, was been output to STDFCOOKIE?
 
enum { stdin, stdout, stderr, stdfcookie } ;
 
@betseg Where on Reddit?
 
1:48 PM
Lel
We need a language where every output directs to stdfcookie
 
Question for native English speakers: are "necessary", "sufficient", "necessary and sufficient" standard ways of qualifying conditions in math?
 
Anonymous
@Fatalize Yep
 
Thanks
I really need to find a good translation dictionary for math stuff
 
Anonymous
I'm not sure that one exists outside of wading through Wikipedia and MathWorld articles.
 
2:05 PM
There's this or this but they mostly contain specific words and not phrases
 
2:36 PM
Yes, but this is English. Where "sufficient" means different stuff depending upon the context.
For example, "sufficient" in statistics doesn't mean exactly the same thing that "sufficient" does in logic.
 
which is my problem
 
"Sufficient" in statistics is more like the result. You've gotten as much information from this sample as you can, so this statistic is sufficient.
In logic, "necessary and sufficient" is an equivalent of "if and only if"
 
the second meaning is what I want
I just didn't know if "nécessaire et suffisant" tarnslated to English would be idiomatic
but seems like it is
 
Yeah, sounds like it works for what you're wanting.
 
0
Q: Can the “How to Answer” pop-up disregard the association bonus?

Martin EnderWe now have a custom “How to Answer” pop-up (yay!). However, this pop-up isn't shown to users who come here with the association bonus from other SE sites. In general, this behaviour makes sense: the pop-up is the same virtually everywhere and it teaches people how the Q&A platform in general wor...

 
Anonymous
2:52 PM
@NewMetaPosts Woohoo!
 
Anonymous
2
A: Let's customise the "How to Answer" pop-up

bluefeetThis was recently changed to the text proposed by coredump. New users who enter the Your Answer box will see:

7
 
@LegionMammal978 gel electrophoresis things?
 
@Downgoat Nope. Both are [esperɛ].
 
Ok cool thanks :D
now french teacher won't be able to tell if I get wrong or right :D
@Fatalize do note sufficient generally has a "close enough" connotation so I'd be careful using it in math contexts
 
But Mego told me that a "sufficient condition" was idiomatic in Math...
(and with a precise meaning)
 
Anonymous
3:03 PM
@Downgoat The meaning of "sufficient" in math is different from its meaning in common speaking usage, in that it has a well-defined meaning.
 
Anonymous
"P is a sufficient condition for Q" means "P -> Q"
 
@Mego well depends on usage context too "X plus Y is sufficiently close to Z" is eeehh
 
^^ I'm talking about that usage
and "P is necessary for Q" means "Q -> P"
 
@Downgoat HTTPS works, but the actual site doesn't. See the "ES6's Unique Symbols" link in this article. You might have to script a patch.
Better still, add a redirect; cool URIs don't change.
 
Anonymous
@Downgoat That's abs(X + Y - Z) < ε. It's an entirely different usage, and an entirely different meaning conveyed. There's no confusion.
 
3:08 PM
Your new URIs seem easier to not change, but the old ones must be kept.
 
any math geniuses in? I am trying to work out the asymptotic formula for {n+k-1 \choose k} when k grows with n
 
@Lembik What relation do you have between k and n?
 
n = k^c for some constant c >=1
 
Anonymous
@Lembik Not a math genius, but I play one on TV. Glad to try to help.
 
Anonymous
So it can be expressed as C(k**c+k-1,k) for some constant c >= 1
 
3:13 PM
yes
thanks!
 
Do you agree with this so far?
 
Anonymous
Which gives (k**c+k-1)!/k!(k**c-1)!
 
yes!
I like this route already
 
Anonymous
I might be an idiot, lemme double-check my work
 
really? No lower order terms?
 
3:14 PM
@Mego That seems overtly complex (i.e. hard to compute). What function is that for?
 
@wizzwizz4 that is weird it's loading from Wikipedia
 
Anonymous
Well, the numerator dominates the growth of the expression - (a+k)! is much larger than a!k! (for a = k**c-1)
 
that is true
 
@Downgoat ... Really? On my machine it just sent me to /index.php/date/datey/date/Article-Name
It should've sent me to /Article-Name.
 
@Mego I didn't mean it strictly mathematically, merely in a mathematical context "too "X plus Y is sufficiently close to Z to draw conclusion...."
 
3:18 PM
@Lembik Do you agree with this: latex.codecogs.com/…
 
@wizzwizz4 ah shit
Thanks for the note
 
Anonymous
@Downgoat But we're talking about strictly-mathematical definitions here, so your concern is tangential
 
@flawr let me thinkg
 
Anonymous
@flawr That's the simplification I was trying to make in my head but a lack of coffee was preventing me
 
@Mego is it correct? :)
 
3:20 PM
 
Anonymous
@Lembik It looks correct to me
 
@Downgoat I also think there might be a mistake in the git thing; it's using HEAD~ in the code, but the text implies that it should be HEAD, and says that the code does what HEAD does. I'm not a git wizard, so this might be a false positive.
 
Anonymous
So it's equivalent to k**(ck) - 1
 
Anonymous
As flawr already posted :P
 
I'd add some parenthesis in your pseudo code=)
 
3:23 PM
I am still working on checking this :)
 
@Mego Now I agree even less unless ** has a lower precedence than -
 
I have to go for 30 mins.Thanks so much for this. back soon
 
0
Q: Dynamic programming - decreasing number

user65134I am given a number n.How many operations will it take me to get 1? I can 1. divide it by 3. 2. divide it by 2. 3. Subtract 1 Examples: Input Output 1 0 5 3 10 3

 
@flawr There's no reason that it should...
 
Anonymous
@flawr I'm incapable of putting parentheses in the right place without coffee.
 
Anonymous
3:26 PM
This is why I don't try LISP in the morning
 
@Mego Then haskell might be a thing for you :D
 
Anonymous
Nonono, coffee is not the problem. Coffee is the solution.
 
Hm I just wanted to ping @Lynn, but it seem she hasn't been here recently.
 
Anonymous
Man, RO powers don't let me eleven my own messages. What even is the point?
 
dammit I can not find a powerline font where the triangle aligns with the rectabgle bit properly
 
3:29 PM
@Pavel Wait, I had the same problem, lemme look quickly.
 
@Mego oh congrats btw! @mınxomaτ @DJMcMayhem too!
 
DjaVu Sans Mono for Powerline works for me.
But I remember I use something else on linux...
 
I'll try that. At this point I'm ready for anything but courier new
 
Anonymous
@flawr Thanks :)
 
@Mego Contrary to popular belief room owner doesn't mean that you own the room but that the room owns you.
 
3:31 PM
@mınxomaτ Now the triangle is below the rectangle.
 
I'm at 10pt btw.
 
Anonymous
@flawr From what I've seen the other room owners have to deal with, I'm strongly inclined to agree.
 
Anonymous
I tried closing the tab but the close button is gone
 
@mınxomaτ Am I having deja vu, or was that link posted this morning?
 
3:37 PM
Timezones are a thing. I have no idea what you mean by "this morning".
 
@mınxomaτ I'm stupid. ~7 hours ago.
 
Dunno
 
Anonymous
@wizzwizz4 Nope
 
Searching for "Cousine" would have probably been enough. That's very specific.
 
Anonymous
 
@Pavel which font are you currently using?
 
Have I just implemented OOP in C?
 
@betseg What is oop about this?
 
ok im over-exaggerating, but i haven't.... and i saw your link
 
"over-exaggerating" is somehow self descriptive XD
 
3:54 PM
@betseg Oh. I've just worked out what your code does; that's instance methods, not class methods.
In C, people usually write functions that take a struct as the first parameter (a bit like Python's self) and the compiler will complain if you use other data types as input.
 
I once added OOP to a non-OOP language: github.com/turbo/OOPEAu3/wiki
 
> Javascript is a pestilence in the present days web and you open up for all bad you could imagine if you enable it feather-headed. And, sorry, but I had enough bad experiences with Microsoft in the past to not trust them running code on my system(s). -- some guy on a mailing list, complaining about Microsoft's websites
 
@AdmBorkBork They probably use Windows.
Either that or Mac...
 
macOS. Or OS X. Not Mac. It's not like anyone calls Windows "Surface".
 
I dunno. From some of his other posts, he seems like a greybeard RMS follower.
I mean, I'm obviously stereotyping, but that's the impression I get.
 

« first day (2203 days earlier)      last day (2643 days later) »