« first day (2343 days earlier)      last day (2501 days later) » 

12:00 PM
@Lembik I don't really remember now, forget it
 
@Okx does that really work?
 
Okx
yes
dennis had a super advanced hello world in his TIO tests and i told him about that xD
 
@Okx ok :) How about assembly calling curl to get a url?
 
(is listening)
 
Okx
uh
 
12:01 PM
@Okx "uh" as in sounds tricky?
 
Okx
ye
 
too tricky for a ppcg challenge?
 
Okx
i'm no master
 
actually... how big would the executable be that was .print "Hello, World!"?
I mean if you actually wanted to be able run it?
I am wondering if we could have smallest-executable challenges
maybe there is too much opportunity for cheating
 
or maybe the shortest machine code
 
12:04 PM
a symlink to curl for example :)
 
for the assembly
 
@KritixiLithos yes that would be nice
@KritixiLithos but how do actually measure that in practice
 
@KritixiLithos That would make Assembly competitive :P
 
I mean #!/usr/bin/bash curl url
what length is that?
 
Is there any good way for me to get some file from the internet with the code waiting for it? (opposed to continuing)? (JS)
 
12:06 PM
In Python if you have multiple occurences of .split(), does s=split, x.s(), y.s() work?
 
Lembik: smallest executable is pretty tricky
 
@Lembik ... I don't know anything about machine code/assembly ¯\_(ツ)_/¯
 
@CensoredUsername I think so
 
No, it's str.split.
 
and it mostly comes down to executable compressors
 
12:06 PM
@ZacharyT Thx.
 
just see what they do in demoscene releases
 
@CensoredUsername it's hard to compress if it's really small as you have to decompress too
and the decompresser will be bigger than the code
 
well, there they have 4k executables that produce video and audio
 
right but I am trying to work out what you can do in 100 bytes :)
but that sound very impressive
 
Like this: s=str.split then call s('Hello World',' ')
 
12:08 PM
@ZacharyT Yeah, got it
 
@Lembik: this is a 4k executable output: youtube.com/watch?v=jB0vBmiTr6o
anyway I think that on linux you need at least 140 bytes to do something (just need syscalls after all), and on windows it's more like 1k (as you need to link parts of winapi)
 
@CensoredUsername 1k! Aargh
a symblink is smaller as I suggested :)
 
If you want to read about compression methods, start here: code4k.blogspot.nl/2010/12/…
with fun things like an 18-instruction x86 asm arithmetic coding decompressor
 
that's really quite bad
how do they squeeze linux onto embedded systems?
in the days of the ZX80 it was all so much more efficient ;)
 
I mean, I work with embedded systems that are <10 euro and have 256kB of program memory
flash chips aren't exactly that expensive either
 
12:15 PM
right.. I suppose no one codes for 16k systems any more
 
could always get the cheapest attiny you can find
2kB instruction mem, 128 bytes RAM
 
aha!
then the overhead might still be annoying
 
Used those a few times, and you can still do plenty of stuff with that
 
Am I allowed to dream?
 
well if you're going embedded there's no need for linker tables or executable headers
you need an interrupt vector table and code, that's all
 
12:17 PM
oh I see... so really it's not the same as writing an executable that runs in linux
 
course not
why would you run linux on something that doesn't even have the stack space to do a task switch >_>
 
more like writing for the zx80 :)
no I didn't mean you run linux on the tiny system
 
anyway linux is pretty efficient still
2
 
I was trying to understand why a minimal executable in linux can't look like a minimal executable on an embedded system
 
@Adám depends, if you are dead, no, otherwise sure
 
12:19 PM
there's a few reasons basically
in embedded executables, you compile code for a very specific target. It is usually set in stone at which memory address your code will be
next to it there's no silly stuff like sections in those executables, because memory protection is for people who actually have page tables
and stuff like attiny's are harvard architectures anywya
 
@dzaima use async/await
 
in a full operating system however, an executable needs a header section to tell the OS what it is
this includes stuff like "magic number, what memory address to put each section at, which protections to use for those sections, what processor mode the executable should execute in (x86/x64), where the entry point is, what kind of file it even is (relocatable, executable, etc)"
 
this is very interesting, thank you
 
and on x64 a bunch of these fields are 64-bit wide so that header will take up some space
 
got you
 
12:24 PM
now on windows there's the extra complication that a linker section is needed to do anything
 
ok going back to the other question.. do you know if you can call curl (say) in assembly in a small number of instructions?
 
on linux, to interact with the OS, you just set some registers and do a syscall
sure. just call the syscall to execute a child process
 
@CensoredUsername how many instructions is that?
 
depends on the exact syscall
at minimum it's 2, being "mov rax, syscallnumber; syscall"
(for x64 that is)
of course you might have to save other regs beforehand, and if you want to do it right you have to handle a bunch of things
like call the syscall again if you get EAGAIN back
(which is basically "kernel is busy atm, try again"
 
From a C perspective system() is easiest (stuff pointer to string into register, call), but that's section 3; if you want to stick to section 2 you need at least two syscalls (fork, exec) unless invoking curl is the last thing you plan on doing, I think.
execve(2), rather
@CensoredUsername yeah, I'm just not sure if the goal here is "minimize user-written instructions" or "minimize total executable size".
 
12:40 PM
true. either way vfork->exec doesn't require that much instructions either
 
CMC: does the given positive integer have more 1 than 0 in its binary representation without leading zeros?
 
lambda a:"0"in bin(a)
 
@CensoredUsername nope.
 
@LeakyNun APL: >/+/1 0∘.=2⊥⍣¯1⊢⎕
 
@Adám so lengthy
 
12:45 PM
@LeakyNun Jelly, 6 bytes: BĠL€</
 
misread it. Python: lambda a:bin(a).count("1")>=bin(a).count("0")
 
@CensoredUsername nice >=.
@EriktheOutgolfer what does it output for 15?
 
leading 0 in binary repr so needed to account for that
 
@CensoredUsername Shouldn't it be > rather than >?
 
no because bin(5) == "0b101"
 
12:46 PM
Ah
 
@LeakyNun 4, which is a truthy value in Jelly
 
@LeakyNun can we be passed the binary representation of the number?
 
@LeakyNun APL: >/(⊢∘≢⌸2⊥⍣¯1⊢)
 
@Mayube nope
 
welp, that's braingolf out then
 
12:47 PM
@Adám that's shorter
@Mayube isn't it turing complete?
 
@LeakyNun idk, probably. Not saying it can't convert a base10 int to base2, but fuck it'd be lengthy
 
@LeakyNun AGL: >/⊢∘≢⌸∘Ñ
 
@LeakyNun More or strictly more?
 
@Fatalize strictly
if I have 4 apples and you have 4 apples, do I have more apples than you do?
 
If you're French, yes
you also have less
 
12:50 PM
@Fatalize what?
 
@Adám AGL?
 
si j'ai 4 pommes et tu as 4 pommes, ai-je plus pommes que toi?
 
Long live turing tarpits for bit fiddling
 
@LeakyNun In French math, "plus que" (more than) means ≤, not <
 
12:52 PM
@LeakyNun CJam, 12 bytes: {2b$e`0f=:<}
 
< is "strictement plus que"
 
@Fatalize answer my question
@EriktheOutgolfer fork?
 
@LeakyNun what fork?
 
@EriktheOutgolfer is it a fork of the Jelly one?
 
12:53 PM
you mean port, well, yes
but this uses rle
 
I see
 
2b -> B, $e`0f= -> ĠL€, :< -> </
 
@LeakyNun DigitCount[#,2,0]<DigitCount[#,2,1]&
 
Jim
@LeakyNun Pyth, 13 bytes: >ssM.BQ/l.BQ2 or >/.BQ\1/.BQ\0
Using K could maybe save one or two bytes
 
Why do people ignore this great challenge?
5
Q: How much Mana do I need?

ArnauldDungeon Master was one of the first ever real-time role-playing games, originally released in 1987 on the Atari ST. Among other exciting things for the time, it offered a rather sophisticated spell system based on runes. Your task today is to write a program or function that evaluates the number...

Read it till the end, and you'll see it's not that hard complicated.
 
Jim
1:09 PM
What's the nuance between "hard" and "complicated" in this context?
 
@Jim "hard" was misused. I meant "Complicated" as in "long, bored to read it all, need a TL;DR"
 
@Jim Hard means it is hard to figure out and solve, complicated means that it takes a long time to figure out, but isn't too difficult to solve
 
the best challenges can be read and understood in less than half a minute
5
 
It really ain't hard.
 
Jim
@Mr.Xcoder @StepHen Okay, got it
 
1:16 PM
oh wow all the power rune names are in the SOGLs english dictionary
 
@dzaima I think sogl would be better at challenges though...
 
it is, just trying it for why not
I would've liked a challenge to draw that base cost ASCII table :p
 
does abusing specific interpreter overflows and bugs considered a loophole?
 
@LeakyNun Interestingly, that question can be rephrased as: Return the most common bit in the no-leading-zeros binary representation. (1 if equal)
 
meh, challenges that take 30 seconds to understand usually don't require any real thought to figure out, only code reduction. I like more algorithm-focussed challenges more (with answers in the 200-500 bytes range)
4
Uriel: as long as you mention the specific implementation and said flaw has been present since before the challenge I think it's fine
 
1:23 PM
@CensoredUsername not true. understanding the problem doesn't mean a quick solution
 
@CensoredUsername you can use @at_least_3_chars_of_username to ping other people...
 
I'm aware
 
And why do you use name: then?
 
Jim
@CensoredUsername This one takes 30 seconds to understand, and yet isn't trivial
 
username: doesn't ping
 
1:24 PM
cause I dislike being pinged for trivial answers that do not require a quick response myself
 
@CensoredUsername e.g. can every problem whose solution can be verified in polynomial time be solved in polynomial time?
I bet that would be unanswered long after TETRIS
 
I know there's good 30s challenges, I'm just saying that usually they do not require it
 
@CensoredUsername The community consensus, at least when I posted my thoughts on meta, is that more people like easy to solve, fun to golf challenges more than hard to solve challenges (more people like golfing than solving)
 
Over on Puzzling people like hard to solve things, though ;)
 
@Mithrandir There you go, have at it
 
1:36 PM
(I don't code. I'm here because I clicked on a link. Don't mind me.)
 
@Mithrandir That's not code :) that's Game of Life
 
Oh, I recognize Joe. Z.
...but I still have no idea what to do on this site in the slightest (except for if someone wiggles up a Scratch challenge. Might poke my head in to watch then.)
 
That goat is right side up.
 
debatable
 
1:41 PM
@Mithrandir Hi! Haven't seen you around here before :)
 
o/ welcome to TNB :P
 
Thanks :P
Maybe I'll get to know our gamers a bit better.
(speaking of which, been a while since there was a Spyfall game - anyone up?)
 
@HyperNeutrino btw thanks for the picture yesterday, I think it looks decent
 
@StepHen No problem! Looks great 10/10 :P
 
1:53 PM
CMC: Close exactly one open window (there will always be at least one), not including what is running your code
 
Idea: Press Alt-Tab, Press Alt-F4 :D
 
@HyperNeutrino Humans do not count as code :P
 
Too lazy to turn it into code :P
 
@StepHen open(window(named:'The Nineteenth Byte')) - That way you are sure it is always open
At least on Dennis' computer, it should run perfectly ^
 
@Mr.Xcoder Pseudo code: Open TNB, run code blocks in console until an error does not occur
 
1:56 PM
KeyScript, 37 bytes:
SEQUENCE 18 9 9 9
SEQUENCE 18 115 9 9
 
Mac: open(Safari(url: 'https://chat.stackexchange.com/rooms/240/the-nineteenth-byte'))
PSEUDOCODE ^
 
@Mr.Xcoder too ungolfed imo
 
Actually my code isn't guaranteed to close exactly one window.
 
maybe open(Safari(url:'http:chat.stackexchange.com/rooms/240'))
you'll be autoredirected to https
 
@EriktheOutgolfer You can specify http: but skip the //?
TIL
 
2:02 PM
URL shorteners are disallowed in general.
 
Not a shortener.
 
SHORTENER: https://goo.gl/x4T9SQ
For TNB
GTG
 
@HyperNeutrino: nice attempt at my challenge, I see you also went for recursive descent in the end?
 
cya o/
@CensoredUsername Thanks :) Yes. Ascent/backtracking wouldn't work easily because of the cannons :P
 
2:04 PM
Comments? <- Sandbox post. Is it post-worthy? Or is the idea just rubbish (four people have commented, but no upvotes, so I'm not sure).
 
Anyway, I got to go too. o/
 
although I can give you a slight spoiler: I took a hand at golfing my reference code for it, which is only 525 bytes of python 3
I think there's still a lot of improvement possible ;p
 
2:20 PM
@StewieGriffin Looks very nice. Couple of things:
I think you should allow the numbers to be whatever is the native format for the answer language. E.g. APL and TI-BASIC use ¯ for negative numbers, and J uses _.
 
2:32 PM
idk what did I do and now my local SOGL interpreter doesn't work
 
@dzaima rollback and forget about it
 
@EriktheOutgolfer idk what to rollback :/ there's nothing I did except add comments and copypaste
ig I could compare what else did I do
 
@dzaima just rollback everything
btw copy-paste might be the culprit, it's too often the culprit
 
It is theoretically possible to write an interpreter for a turing-complete language in any turing-complete language, correct?
 
fixed it
was testing why my program didn't work, so I broke the interpreter
intentionally
 
2:39 PM
It is theoretically possible to do anything in a turing-complete language, which of course includes interpreting turing-complete languages
 
@StepHen Yes
@CensoredUsername No there are plenty of things that cannot be done in Turing complete languages, the Halting problem is the most famous.
 
@CensoredUsername So you can (not should) write a Java compiler in BF?
 
if it has an infinte tape size, then yes
 
@StepHen Depending on how complex Java compilation is you probably do not even need your language to be TC to write a Java compiler.
 
@WheatWizard ok, to be more specific, you can compute anything that can actually be computed...
 
2:43 PM
@WheatWizard I think it's just complex enough to just not write it and then blame to the fact that your compiler is compiling...
@CensoredUsername so you can compute the outcome of feeding a java program in a java compiler...right?
 
@EriktheOutgolfer Someone should make an esolang where syntax or runtime errors cause infinite loops, but the program is usually really slow in the first place
 
@EriktheOutgolfer yes (and at that point, what you have is an alternate implementation of the java compiler)
 
that's called java
2
 
sometimes I really hate that I made the online interpreter in processing.js
 
anyway I think it'd be faster to write an x-to-brainfsck compiler, write your java interpreter in x, and then compile said interpreter to brainfsck
 
2:47 PM
@dzaima What's the regular interpreter in? the same?
 
processing java
 
@CensoredUsername brainfsck is brainfuck which does fsck on your drive?
 
0
A: Sandbox for Proposed Challenges

Kevin CruijssenQuestions for the Sandbox: Is this a dupe? I wouldn't be surprised if it is. Should I add/remove some of the mathematical operands which might make it too easy depending on the list of numbers? Math: Is the result Rad or Bad? code-golfarithmeticintegernumber Input You'll receive two inputs...

 
and the processing.js transpiler sucks sometimes so this mess was made
 
it's brainfuck but spelled in a way so it does not trigger hyperactive corporate proxy filters
 
2:49 PM
and now I'm adding to it
 
New project: write a standards-compliant C compiler that does rm -rf /* every time the user triggers undefined behaviour
 
@dzaima Wouldn't it be easier to get it on TIO, that way it's run on command line and you don't need to maintain the online interpreter?
@CensoredUsername I'll fork it and make it append "error\n" to the front of the source before it compiles it
 
@dzaima that's disgusting!
 
then it's not standards compliant anymore though
 
@EriktheOutgolfer I know
 
2:52 PM
the beauty about UB is that you're truly allowed to do whatever the fuck you want as compiler writer, like attempt to paint the users' moustache blue
 
@dzaima That is ... awful
 
@StepHen maybe, but dennis couldn't get processing to work on tio, and at some point there will then be need of ~3 versions of SOGL there
 
@dzaima oh :/
 
>parsing irregular languages with regular expressions
 
hey, it works
 
2:54 PM
@dzaima have you asked him? I wouldn't recommend tio atm...
 
it also summons cthulhu
 
@EriktheOutgolfer I had asked a while ago
 
@EriktheOutgolfer Wouldn't recommend what part of TIO
 
main issue is that TIO doesn't have version choosing for languages
 
@dzaima it has, but they're separate languages altogether
 
2:57 PM
@EriktheOutgolfer I'd prefer to not make 3 SOGLs on tio :p
 
and the bad thing is, well, the versions aren't even stable!
 
yep
 
I remember Dennis saying it will have version choosing in the future
 
faaaar future
 
Jim
@CensoredUsername Yes indeed
 
2:58 PM
well then I'm waiting for the future
or I'm making that mess
you choose
 
Wait, is there really not an esolang called Cthulhu yet?
 

« first day (2343 days earlier)      last day (2501 days later) »