« first day (2733 days earlier)      last day (2118 days later) » 

12:09 AM
I don't use it for linux: Powershell was mostly just something to do in classes where I already knew the material and had access to a computer.
Same thing with Command Prompt
 
@NathanMerrill Yes what Quartata said
 
Hello
LOL these days I can't find how to install JS
@quartata Hello!
 
12:28 AM
@FreezePhoenix Step 1) Install a sane OS. Step 2) sudo dnf install nodejs
 
@Pavel That doesn't let me edit the sources tho :P
 
@FreezePhoenix Why would you want to edit the node source???
 
Wanna make a derived language
 
This Github issue is a prime example of everything wrong in JS open source: github.com/npm/npm/issues/2974
 
lol what the OP is saying there is "I'm to lazy to type cd <subdirectory> and am asking you to make this part of NPM"
 
12:35 AM
@Downgoat I really don't understand monorepos
 
@Pavel Because I want to make a language with similar syntax
 
write a babel plugin
You definitely do not want to edit V8
 
But... then I can't run my new language
 
do you know what Babel is
 
12:39 AM
so you know that you can write plugins for it to transpile whatever you want into ES5
 
It's a transpiler
@quartata But... then I can't run the raw un-transpiled code
 
And... what do I do with that
Looks like I run make
Realizes he has no clue how to use C++
 
i think you need ninja to build it but that wasnt the point per se
 
@quartata I can concur. 1000x worse than NPM source code
 
12:49 AM
I think your point is that it is massive
 
@FreezePhoenix no that's not how it works. you can't "CD" in a package location spec
 
The problem is that V8 is open-source... and therefore will be spaghetti code
 
Node.js is even worse (for self-explantory reasons): github.com/nodejs/node/blob/master/src/node.cc
bool SafeGetenv(const char* key, std::string* text) {
#if !defined(__CloudABI__) && !defined(_WIN32)
  if (linux_at_secure || getuid() != geteuid() || getgid() != getegid())
    goto fail;
#endif

  {
    Mutex::ScopedLock lock(environ_mutex);
    if (const char* value = getenv(key)) {
      *text = value;
      return true;
    }
  }

fail:
  text->clear();
  return false;
}
probably definition of spaghetti code
 
Also minified spaghetti code.
 
0
A: Sandbox for Proposed Challenges

Luis felipe De jesus MunozConverting romaji to hiragana A little bit of context first Hiragana is a Japanese syllabary, one component of the Japanese writing system. Hiragana is a kana system. With one or two minor exceptions, each sound in the Japanese language is represented by one character. This may be either a vowe...

 
12:52 AM
@Downgoat I hate languages that are indent-sensitive.
 
It looks like the node.js creators haven't discovered else blocks yet..
 
/shrug
if an if block returns, an else is implied
 
@Pavel *apt :P
 
@Zacharý no
Most dpkg-based systems are not what I would consider sane
 
Better than Windows :P
 
1:00 AM
Hello? Rasbian user!
 
@FreezePhoenix Enjoying your Python 3.5?
 
No. python2.7, and python3.4
Both already installed
 
Um. You should run apt-get update.
Even Rasbian has Python 3.5 by now
(The joke is that the current version of Python is 3.7)
 
Um, no, that doesn't work. I'm a Rasbian Jessie user. Jessie only supports node0.10 and python3.4 (I hacked node6.0 on)
 
Holy shit
How do you survive with such out of date software
 
1:04 AM
I installed newer versions
 
> node6.0
 
I mean, I've got chromium-browser version 54 :P
@Pavel That's what my packages need
jsdoc needs between 6.0 and 8.0
Well, 6.0.0 and 8.0.0
 
So, naturally, you went with the oldest acceptable version.
 
/shrugs I don't use node.js - I use vanilla js
 
That's basically what node is?
 
1:09 AM
Except for require and module and exports and a whole list of things
 
@Downgoat Actually there's a reason that code is written like that
 
@FreezePhoenix You're insane if you use "vanilla" js. "Vanilla" js (AKA pure ECMAScript) has NO I/O/
 
If you set it up as a not, then you'd need to repeat the ifdef to include the closing brace
Oh wait
No you don't
In fact, they already have it as a regular block...
I'm honestly not convinced that goto was there originally tbh
 
@Zacharý Ackchyually, it specifies a filesystem api
 
@Pavel ._._.
 
1:12 AM
@Zacharý Wrong. Sorry, but I meant browser JS
I just use the browser for I/O tho
 
@FreezePhoenix Same. Unless I'm hacking something together in JScript on the school computer :p
 
@Pavel The "Vanilla JS" langauge is maintained and run by TC39. Those FS APIs you're thinking of are either defined by Node or by W3C/WHATWG which browsers implement
 
I see
Which one of those is ECMA
 
Grr... 'use strict' makes it impossible to test whether a global object exists
@Pavel ECMA is the specification. Javascript is the language.
 
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
huh
 
1:16 AM
TC39 stands for ECMA Technical Committee 39
 
Ok... anyone got any clues as to how to test if a global exists in strict mode?
 
to answer your question
 
@Pavel ECMA-262 === ECMAScript === JavaScript. TC39 === ECMA TC39
 
ill have two number 262s
2
 
At least it's not behind a paywall
 
1:35 AM
@Zacharý What are you referring to with that statement?
 
APL
 
But most APLs are free
And the one that's actually good is
 
'use strict';
const _global = (0, eval)('this');
const Vector = (function(){
  const isNumber = (a) => { let t = Number(a); return t == t };
  const attemptConversion = (...args) => {
    if( args[0] instanceof Vector ) {
      return args[0].coords;
    };
    if( args[0].every(isNumber) ) {
      return args[0].map((item, _)=> {
        let res = Number(item);
        return typeof res === 'number' && res != res ? 0 : res;
      });
    }
    if( args[0][0] instanceof Array && args[0][0].every(isNumber) ) {
Any clue how to make line #2 less hacky?
 
1:54 AM
@FreezePhoenix do expression pls
 
 
2 hours later…
4:15 AM
0
Q: Is "Proof-Golf for proofs in general" on-topic?

BubblerI recently submitted a challenge proposal on the Sandbox, which is a kind of proof-golf. Here is the background section copied from the proposal: Compass-and-straightedge construction, a.k.a. classical construction, is the construction of lengths, angles, and other geometric figures us...

 
4:34 AM
@Pavel I'm talkin' about the ISO specs.
@Pavel yeah.
 
 
2 hours later…
6:18 AM
Does anyone know of a simple image editing program for Linux
Something that's like Gimp but that isn't Gimp
 
7:10 AM
raster or vector
 
7:37 AM
What do you all think about embedded development, compared to other kinds of software engineering. Is it interesting? Respected?
 
0
Q: Sort of numbers

Jo KingWithin the recesses of Unicode characters, there exists a Unicode block of (currently) 63 characters named "Number Forms", which consists of characters that have numerical values such as the roman numeral Ⅻ, vulgar fractions like ⅑ or ↉, or weird ones like ↊ (10) or ↈ (100000). Your task is to w...

 
 
1 hour later…
9:04 AM
@Pavel imagemagik :P
 
9:48 AM
@Pavel Why not GIMP?
 
 
2 hours later…
11:45 AM
0
A: Sandbox for Proposed Challenges

Beta DecayEinstein's Quicksort code-golf Challenge Given a list of integers and a velocity, \$v\$, implement a quicksort algorithm which simulates a program sorting the list from smallest to biggest at the given velocity. Einstein's Theory of Special Relativity What do I mean? Well assume your program...

 
@Pavel pinta is supposed to be like paint.net but I wasn't impressed, maybe it's got better
try krita
oh, it's for painting, maybe not a good match
 
12:33 PM
0
Q: Tips for golfing in TeaScript

Luis felipe De jesus MunozThis question is to list some TeaScript golfing tips

 
12:59 PM
What's a db or ki:
If there was a DB storing all images containing Blackhat, it would be doable. But do you really expect us to create a KI or so ? — LMD 9 mins ago
Regardless whatever LMD is talking about, I'm not doing anything different than any other image-based test battery challenge
 
Anonymous
@BetaDecay db = database; dunno about ki
 
huh I'll ask
Oh sorry - of course in English its AI - Artificial Intelligence... Sorry for using the German Abbrevation... — LMD 2 mins ago
 
1:31 PM
Unfortunately I don't have time anymore to improve this puzzle, sorry about that. Could someone take it over? — d33tah 2 hours ago
:-/
 
@BetaDecay There are a very limited number of comics featuring Blackhat compared to your 20, explainxkcd gives 146 comics with him, each probably with multiple panels.
 
Oh jeez TeaScript. I haven't heard that name in years...
 
the test battery doesn't need to include all of them, does it?
 
@dzaima Oh
I guess that doesn't really matter anymore
 
Oh I didn't see that challenge
I should give it a go
 
1:42 PM
also, I wouldn't suggest having a hidden list of tests as you could be just making up results. Though the workaround is kind of bad too - having the list hidden for a while, posting a hash in the mean time, which does open up hardcoding that while later (and while you could work around that with a competing limit, that's no fun (or maybe an accept time?))
 
You should definitely set aside some validation data
 
I see nothing wrong with having a hidden suite of test cases to prevent fitting against the test battery.
 
I'm going to have a tough time not hard coding (overfitting) if I'm only given 20 pictures and that's what I'm scored on
 
I'll hide the list until there is a draw and then upload the images I'll use
@quartata You've also got other images on xkcd.com to test with too
 
@AdmBorkBork if I were the challenge author, I could just say that your answer scored 0, while telling everyone else they've got 100%, which you wouldn't like
 
1:46 PM
But if you reveal the the test suite after revealing the scores, the score can then be verified
 
Exactly. It's not a "hidden forever" sort of deal.
 
@AdmBorkBork oh, I read your message as implying hidden forever as it's after my message suggesting a not hidden forever thing
 
Oh, I can see how that's confusing.
 
2:07 PM
y'know, it recently occured to me that, despite using node.js quite regularly, I have never once done any web development with it
 
I recently had to write a couple hundred lines of JS
But I did not check it into version control.
So I can try to pretend it never happened.
 
I've become quite enamored with typescript as of late
and the typescript compiler happens to be a node module
I've also been doing some work with discord bots using discord.js recently too
 
Sounds slow
 
it's actually pretty fast, I've yet to have a compilation take more than 0.5s
 
For 1 file?
 
2:11 PM
for.. 1 sec
42 files
 
Not bad
 
granted that's a total of 1726 lines of code
it's fast enough that I can set it up on "watch" mode (recompile every time it detects a source file change) and have no issues at all. Granted Typescript's "compilation" is more transpilation to JS
 
I was pissed yesterday after spending half an hour to find out that === does not work on strings.
But also, "2" == [[[[2]]]]
So how are you supposed to compare a string anyway?
 
in js?
 
Right
 
2:23 PM
"2" === [[[[2]]]] returns false, what kind of string comparison are you wanting?
 
But "a" === "a" also returns false.
 
no it doesn't
at least not in the JS of my chrome browser
 
Try "a"+"bc" === "abc" then.
 
also true
same result in TIO's node.js too
 
Stupid optimizations
I know I had a very simple test case like that that returned false (also in Chrome browser).
And a bug that was fixed by changing my string comparison from === to ==.
 
2:41 PM
@feersum maybe one side was wrapped - new String("abc")? Otherwise, === on equal strings should return true
 
 
2 hours later…
4:17 PM
This JS?
 
4:30 PM
@Zacharý yeah
 
[] + [] is "" ... JS lacks any common sense.
String("") !== ""
There's no == on arrays for crying out loud!
 
and then there's JSFuck
 
That's one good thing to come out of JS's "type" system. The other is the wat talk.
To all those interested: RAD's rewrite now supports assignment!
It's good because it can teach about security problems
 
4:47 PM
0
A: Sandbox for Proposed Challenges

l4m2Send the pairs Write two program A and B. A takes 1024 pairs of integers (a,b), where 0≤a<232, 0≤b<1024, and all as are different. Output a positive integer. B take the output of A and one a from the input pairs of A, and output its b. Smallest output of A under a same random test data win.

 
@Zacharý RAD on TIO when?
 
@Adám After I get a few more things done: namely representation (we don't want 0 to be 0+0i), a few more essential atoms (I still don't have a lot of structural atoms), and reading code from a file.
Never mind about assignment being fully supported: still have to fix stuff like A←1 2 3⋄A[1], which currently breaks the interpreter
 
5:13 PM
phew, for a moment there I thought I wasn't going to have the shortest Charcoal answer on Beta Decay's question
 
@Zacharý well it kind of makes sense - it's pretty useful that "2+2 = " + (2+2) works, casting the args to strings. The string representation of an empty array is "", so ""+"" = ""
@Zacharý String(...) is calling the String class constructor function without the new keyword so you're gonna get strange stuff, besides, what did that do that you didn't expect?
@Zacharý arrays are objects. If I did arr.foo = "bar" on an empty array, should [] == arr?
 
5:33 PM
I know the reasoning behind it, it's just weird.
 
IBM suing Groupon for stupid shit
 
I still need to fix indexed assignment, but I got A←1 2 3⋄A[1] to work
 
5:55 PM
@Poke All I can tell is a patent is being infringed
 
@Pavel It boils down to IBM suing Groupon for using SAML with user provisioning and selling things online
there are like 3 different patents
 
I'm not really seeing why it's stupid tbh
 
SAML existed for 7 years before IBM patented "user creation during SAML"
like just tack a thing on and file a new patent
 
Ah
So the patent itself is dumb
 
so my gripe is not so much that the lawsuit is ill-found
yes
that the patents are super dumb
The other one is like... creating session state over a stateless protocol (http)
which is what HTTP Cookies are
The actual counts on on pages 9-15
 
6:04 PM
I wonder if I can use Fedora Media Writer to burn an OpenSUSE iso
 
6:49 PM
I have no clue how to do indexed assignment in RAD.
 
ngn
7:07 PM
@Zacharý you can desugar it as amend
 
Amend is @, right?
 
ngn
@Zacharý yes
 
@Zacharý You mean like foo[x] = whatever?
 
@Pavel Yeah.
 
@Zacharý If every object has a pointer to itself, the operator = could be handled by the object itself modifying the data at its own address.
 
7:13 PM
@ngn I'm concerned about how ; would behave there.
 
ngn
@Zacharý the separator between indices? as in a[i;j]←b?
 
But that will work once @ is implemented, even if it is slow as heck.
@ngn Yes, ; is an index separator. I'm not that concerned about A[I;J]←B with I and J being scalars. I'm mostly concerned about how something like A[1 2;2 1]←B would get desugared.
@Pavel I had the same issue with trying to overload opIndexAssign. I had to basically do what @ngn said and do ammend on it (albeit, it was in D):
	public Value opIndexAssign(T, U)(T value, U index) { //TODO: SPEED THIS UP
		if(this.peek!(Value_[]) is null) {
			throw new Exception("RAD: INTERNAL ERROR");
		}
		Value_[] res;
		for(int i = 0; i < this.length; i++) {
			if(i == index) {
				res ~= Value(value).theValue;
			} else {
				res ~= this[i];
			}
		}
		if(index == this.length) {
			res ~= Value(value).theValue;
		}
		this = Value(res);
		return Value(value);
	}
 
ngn
@Zacharý that depends on how you define your amend, A[1 2;2 1]←B could be a combination of amend-each-amend or it could use a separate primitive for dmend (amend at depth)
but I wouldn't worry about it on first implementation :) a[i]←b is complex enough
 
Okay, I'm going to have to go through the same hell as I did with ;. I tried it in so many different ways, none worked correctly: I had to port the Python version and reduce using a constructor.
 
ngn
@Pavel AFAIK, RAD has no refcounting. I don't think he can modify in place, or else a←b←1 2 ⋄ a[1]←3 ⋄ b would be wrong.
 
7:24 PM
I'm pretty sure that's how C++ implements =
But IDK
 
ngn
@Pavel C++ has reference semantics, sane languages have value semantics - in the above example b should remain unchanged
 
7:37 PM
Part of my problem is just entirely my fault: doesn't even handle indexes right. It just assigns the name right away, so the namespace will have the inaccessible A[1] when A←1 2 3⋄A[1]←2 is called.
 
7:48 PM
that feeling when you golf over half the bytes of your answer because it was so bad before
 
ngn
8:03 PM
@Zacharý I've no idea what your last message means, but I think I should follow your lead and implement a[i]:b in ngn/k :)
 
@ngn And that'd be wrong regardless, anything that starts with lowercase is a function.
 
ngn
@Zacharý my examples are in APL and k, I'm not competent enough to write proper RAD
 
@ngn That's one of the only real differences, that along with being depth rather than rank, and / being somewhat switched with (scans too).
; indexes by depths as well. RAD isn't really different from APL (symbols) and K (rankless).
 
ngn
8:29 PM
@Zacharý well, if case matters for something being a function, it is different from both...
 
8:41 PM
I think I found out how to implement indexed assignment without using @.
@Adám, this gives me an idea for a new definition of ε⍵: εnumerate.
ε(1 2 (3 4 5)) => (,1) (,2) ((3 1)(3 2)(3 3))
 
Cryptol is a really interesting language. In many languages, a string is just an array of chars. In Cryptol, an int is just an array of bools, so 12 # [False] == 24 (where # is the concatenate operator)
 
@Pavel Cryptol has something to do with designing cryptography algorithms, right?
 
8:57 PM
@Potato44 Yeah, it's entirely a cryptography language. It has a lot of emphasis on manipulating bits, and it also has support for theorem solving.
It outputs everything in base 16 by default, and doesn't support negative numbers or floats.
 
I think I had a look at its website for a few minutes when I was looking for languages for the polyglot.
 
It got onto TIO yesterday
I don't think it'd be good for polyglotting
 
no, that's why it was only a few minutes, but it seems like an interesting language otherwise.
and one with a specific purpose
 
I don't think it can even do IO tbh
It just implicitly prints the result of every expression
 
now I'm imagining Sha1, but a version that outputs all the intermediate states over http
 
9:01 PM
Cryptol> 1+1
0
Cryptol> 1+1:[8]
2
When you don't specify a type, it assumes 1 is a 1 bit integer so 1+1 overflows. 1:[8] specifies 1 is an 8 bit integer
 
is + xor?
 
+ is integer addition
 
ah, size specifier that default to 1 bit
 
So 2+2 is also 0, but 3+3 is 2.
Since 3 is a 2 bit integer by default.
 
Do you mean 2-bit by default? otherwise that doesn't make sense
 
Yes
2 bits
 
Dang, that was fast
 
9:17 PM
1
Q: Generate an expression yielding near-equidistributed result

fgrieuIt is asked a program (any language) which, given an integer input m in range [1, 65535] outputs one or more C expressions that all: Uses a single variable x assumed of 32-bit unsigned type (e.g. uint32_t or unsigned ) Would evaluate to range [0, m) for any of the 232 possible x, reaching any o...

 
It probably assumes the lowest number of bits possible to represent the integer.
 
Right
 
Question you probably can't answer: is 0 zero or one bit?
It won't make a difference, since it's zero.
 
ngn
@Zacharý 0 is zero-bit. Harder question: how many bits is -1?
 
In cryptol?
 
9:20 PM
-1 is type {a} (fin a, a >= 1) => [a]
 
._.
 
ngn
@Pavel er... wat?
 
[a] means a-bit int, and a is specified to be finite and >= 1.
So -1 is 1 bit.
 
The amount of space values take up must be insanely small.
 
0 is {a} (fin a) => [a], so it is in fact 0 bits
The type of "foo" is [3][8], a length-3 sequence of 8-bit ints.
So "foo" and "foobar" have different types
{k} (2 >= k, k >= 5) => [k] is a valid type. That said, not value can actually have this type, but still.
 
9:38 PM
Speaking of types: imagine a language where types are first-class objects. so stuff like typeof(member)[number] value; is possible. That'd be one weird language.
 
I was just thinking that, but types are most useful for compile-time checks
That wouldn't be possible with first-class types
 
@Zacharý I'm having a hard time deciphering that syntax, but that sounds vaguely like dependent types. At least the first class bit
 
10:12 PM
It could be interpreted as well, making it even weirder.
It might be possible for type errors to occur at both run-time and compile times, depending on whether the type can be determined at compile-time or not.
 
@Zacharý is this the kind of thing you are looking for?
https://tio.run/##lVHBSuRAEL33V7zNxQQ24kEvgRECLqwgehhxDyLSJJWZhqQ7dnfGEZmbv@AP7o/MVqcjRj3IhtBd3e9VvXrVclXL/d70pKG63liP8ysxP55JLw8vpRdC5DkulPMOpkEvrVfV0EqLlvTKr5FuqPLGukzUnIIbqpCWKLAkn/H29@UV@Wk44XFNlgRwewcwEpgljvjiviju@eJZR/4uJJRhiRT9HqZuqKAzIZRu1NbiZMwdW/y19VZW3KV/6gmNNR02sh0IUteoLElPjK0JgVwZa8n1RtdKrxAdxET26HqqVKOoniwKxnPT5CPObU7udumWgzJLp7azyecH@nO5w5YdLN68xHkuvZ0Js@Y0zGOkIS0TbiTkodQkGybI3xdkgblecr1WDvxLRGLCNb@THOc012S5TzJzcIGkTFAUSGKxGJsm7pHoxsPtXXyah0GxBmkPb4pZqQMW@r77Of//tIP42dB1T@ik0iIsXMEOGmk/eJ4Ikt/UtuYn/hjb1j@SbL//Bw
 
10:29 PM
Something like that. It looks like Haskell
 
It says "HASKELL" in the debug
 
Yes, Agda's syntax is inspired by Haskell
 
(For what it's worth, Cryptol is written in Haskell)
 
@H.PWiz yeah, that's because some part of the standard library is apparantly using a depreciated part of the Haskell FFI
 
I have no clue what I'm doing wrong: on my local copy of RAD, A[1]←1 does A[1]←⍬ for some reason
 
10:38 PM
0
Q: Mixed Fraction Equality

StephenIn elementary school, children learn about proper fractions, where the numerator is less than the denominator, and thus the value of the fraction is less than one. Later, they are taught about fractions where the value of the fraction is greater than one, and two different ways to express these f...

 
Version with syntax closer to what Zacharý used as example.
https://tio.run/##lVFNi9RAEL33r3jmYgJGPOglMEJgFxREDysKDsPQJJVMQ6Y7dnfGGZa5@Rc871V/hCf/yfyR2ep01OgeXEPor3pV770q2dbyfDY9aahtb6zHyzdifr2QXj5@Lb0QIs/xSjnvYBr00npVDZ206Ei3foN0R5U31mWi5hS8owppiQJX5DPeTp@/IH8ebvi0IUsCWK4AjgRkiSf8sC6KNT9c64g/hoQyLBGifx9TN1TQmRBKN2pv8WzMHSVe7r2VFav0h57QWLPFTnYDQeoalSXpiWMbQgBXxlpyvdG10i2ig5jIHl1PlWoU1ZNFwfHcNPkYZ5mTu2O650OZpZPsbPL5B/y6PGLPDhY/vcR2Euts1Y6gPNKqM47gTTbKcwft5R4fZLWR9sd3uKFtyXmqRShomtPN1/Xp5ttyvbqPljs5C8zkjWKuvJ01gf1Pg32KNGAy4UZAHvKmFoRp8ncnssAvPiRvN8qBf4kISxAkcNnVv2jHuc15mfIvqnlwgaRMUBRIYrF4Nk3
 
11:37 PM
@quartata have you tried mixing emscripten and v8 before
 
11:50 PM
how should GC with observing callbacks work e.g.:
    class WatchAnimal {
        init(animal: Animal) {
             animal.position.didChange { newLocation: print("new location ${newLocation} from ${self}") }
        }
    }

    WatchAnimal(animal: globalAnimalObject)
so in that case it captures WatchAnimal. So do they now have same lifetime then?
 

« first day (2733 days earlier)      last day (2118 days later) »