« first day (2192 days earlier)      last day (2947 days later) » 
00:00 - 16:0016:00 - 00:00

00:01
I actually linked just MinGW previously, but I meant tdm-gcc. You said you have Code::Blocks installed? Then you already have GCC installed, too.
@mınxomaτ I don't, Code::Blocks fails to find any valid compiler.
It just does nothing.
That's weird.
Though I have only ever used Dev-Cpp, which is a C::B clone.
I think I'm going to hold off on learning C until I can use my main computer, which I'll be installing Linux on. Having admin privileges will be helpful.
Well, yes ಠ_ಠ. You can't install a compiler without admin privileges. The only C compiler I know that runs without an install is TCC.
@Pavel the GTX 1060 is 250 mm
00:11
@DJMcMayhem Do you want a compact case?
The DAN A4 supports all GTX 10-series cards and is tiny.
@DJMcMayhem Video cards are made by lots of different manufacturers. You could find a smaller card, most likely.
It also looks much better IMO.
@mınxomaτ that looks incredible, but they're not available now and I have no idea how much they cost
I'm probably going to go with this one: pcpartpicker.com/product/3MPfrH/deepcool-case-tesseractsw
Oh god, that looks terrible.
00:14
Like a 12 year old "designed" a case.
I recommend to take a look at the Lian Li cases.
@DJMcMayhem That's the one I have!
It's great!
Mine is red tho
ugh, there's always one more bug /o\
@mınxomaτ actually C::B was built much later by a Dev-Cpp user
Oh, ok. I meant it's generally pretty similar.
I helped bring C::B to Gentoo, then never tried it :p
But then again, the original Bloodshed branch of Dev-Cpp is long gone. The current one is Orwell. I don't know if Orwell is newer then C::B
TDM has been stale for over 6 months, too :/
00:20
@mınxomaτ Those do look pretty incredible, but they're a little out of the price range I was given (it isn't actually for me)
oh, I didn't know that; I used to be quite active in the "Bloodshed software forum" for several years
That's a great case, I pretty big though.
I assumed you wanted something smaller
I guess it shows how long ago I stopped doing stuff in C/C++ :p
@DJMcMayhem I'd urge you to not buy a cheap case. Especially painted steel cases will degrade pretty quickly. I had many bad experiences with initially great cases <$50.
00:25
Can confirm after a year no noticeable degradation on my case.
Hmm, that's a good point. The first case I ever bought was the Silverstone ps09b for $30, and it was absolute garbage
And the customer support was pretty bad. I'm never buying from them again
Anonymous
C::B only comes with gcc on Windows (mingw) if you select that download option
¯\_(ツ)_/¯
01:23
@Mego According to MinGW64, C::B uses MingGW64, not MinGW.
These are two different projects.
wat
wat
02:00
I think MinGW is cool
@DJMcMayhem yes, as in operating on your regex
to make it s/im/er/
Question: if in python I write for i in some_list:, would modifying i modify the corresponding element in the list?
:(
02:40
I'm writing a solution in SWI-Prolog for a challenge that asks "Produce a truthy or falsey result." Is it acceptable for my submission to define a predicate that accepts one argument, and treat success as truthy and failure as falsey? This is idiomatic in Prolog.
@DLosc Probably, yeah. It's equivalent to defining a function which returns a Boolean value, right?
I would argue that it is. On the other hand, you could also argue that it's equivalent to defining a void function that either returns or throws an error.
@DLosc Does it actually crash and print an error when given a value it doesn't accept?
Yes of course predicate resolution is fine. Hell in most modern Prolog interpreters that outputs true/false instead of yes/no
A predicate, by definition, outputs a boolean. If that's not allowed I don't know what is
Can I specify a file as an executable script so that it can be invoked directly as ./script.py instead of python script.py?
(I'm on Windows but I'm asking about unix, I want it to be cross-platform)
02:50
That's called a shebang. #!/usr/bin/python
First line
Cool! That's it?
Yes.
Thanks!
Well it has to be executable. But.
@quartata Ok, thanks. I'm not terribly experienced with Prolog, and running stuff on TIO was giving me results like this (open the debug pane to see the "warning" message). I wasn't sure if some actual output would be required.
02:52
chmod 755 script.py
But I reckon a predicate-only solution is equivalent to a function-only solution, which doesn't output anything when you type it into TIO either.
@quartata What's the default? I want people to be able to use it out of the box, not have to manually set permissions on it.
@Pavel are you making a koth?
No I am making a language
oh
because I think I need shebangs lol
02:53
@Pavel Git preserves executable bit
that'd probably help me
I wonder if I can set that on Windows?
how do I use subprocess.Popen to run a program with a shebang like ./foobar.py?
@Pavel You don't. Windows (or rather its file system) has no concept of that -- everything is executable. Which is stupid.
chmod +x blah.py to set executable bit. Windows doesn't know about that, because that's bound to the file system.
02:56
@DLosc When you provide the TIO link to people in your submission, you should add code in the header/footer that tests it.
@Pavel Oh, definitely.
I've open-sourced NanoCL (the C++ library on which turbo.js is based): github.com/turbo/NanoCL
@mınxomaτ I'm on Windows, but I need people on Unix who I give the file to to be able to use it.
@Pavel Unix people know they need to chmod +x scripts.
Ah, got it.
02:59
Would chmod +x in git bash do anything?
Besides I assume they would know it's a Python script
@DLosc git bash is just a bunch of aliases, so no.
Hm. I tried it on one of my files. It changed the permissions that ls is reporting, but now I can't chmod -x it back. :P
Maybe I could use LSW..?
Why?
You'd have to publish from the WSL file system to preserve attributes. That's inconvenient.
03:02
I can set up a GitHub repo with all my files in windows, clone it from WSL, change permissions, and push again.
@DLosc chmod only affects the file system where Windows 10 emulates a unix file system using NTFS properties.
CMC: given a directory name, switch to the folder with that name in the parent directory. E.g., for a file structure main -> [hello, world], given that the program is in folder hello, and given the input "world", cd into world.
Bash, 2 bytes: cd
I don't think you understand
Most likely.
03:07
main
 |-- hello  (you are here)
 `-- world  (given "world", you need to cd here)
Ah.
How about Bash, 9 bytes: cd"../$1"
that works
import os
os.system('cd ../'+input())
Python 3, 37 bytes
Is there any way to do that without just executing 'cd ../'+input() in the terminal, in any language?
03:15
Python 3, 33 bytes:
import os
os.chdir("../"+input())
I stand corrected.
I wouldn't have known that, except I've been working a lot with os lately trying to get tinylisp module loading to work.
some guy in out ToS game called the town dumb, after being investigator and saying someone was definitely mafia, and got lynched for it when they actually weren't
It's probably because of my Windows mindset, I didn't really see the purpose of having commands dedicated to getting/setting the working directory.
@DestructibleWatermelon Makes sense. There's always someone in every game who's just salty af about everything.
Technically I think the more proper way to do it would be:
import os
os.chdir(os.path.join("..",input()))
03:19
it was the dumbest thing though
not to mention we need to sanitize the input... but whatever.
"they can't be exe because exe is dead, so they must be godfather"
What gamemode?
when exe wasn't even mentioned in the text they would have received
@Pavel classic
Ah, I haven't played classic in a while.
03:20
@DLosc enters in `..\..\..`
dumbest town member ever
they were bodyguard
I play ranked, all, or custom
which is actually mentioned in investigator text
People in standard are stupid
so you guys mention using shebangs right?
03:21
Ok, I'm curious now. What's ToS stand for in this context?
Town of Salem
Town of salem
lag ninja
Great game, idiot community
It's basically mafia
so can I use shebangs to make running my koth easier?
meh game, horrible community
03:23
I'm usually rubbish at Mafia. When I suspect the right people I never manage to do anything about it.
ToS is the opposite
When you suspect someone, you say so, and they inevitably get lynched.
99% of the time.
And then you get lynched regardless of whether you were right or wrong.
So just be quiet and everything's okay. At least temporarily.
my best game was as serial killer who "only spoke french" and had image proof that I was who I said I was. lynched fourth night, and the image proof was a rickroll
I have yet to win as Serial Killer, ever
It's hard
The best you can do is mess with everyone as much as possible
@DLosc No, see, you can't be too quiet, or they'll get suspicious. Just occasionally participate in the meaningless blather.
like, "I think it's <the dude who everyone suspects> to" (misspell it on purpose)
03:30
I would be tempted to see how many games I could get manipulate the discussion to get myself lynched first. :P
That's called 'Jester'
SK is easiest if you pretend to be jester
Your win condition is to get lynched, but not murdered.
You then get to haunt to death someone who voted guilty on you.
@quartata this is true
My very first game I was jester, I was so confused.
03:32
That's no fun if they make it an actual win condition! I want to be anarchic, doggone it!
The best part is, I was also jailed night one, without any idea of what 'jailor' meant.
does anyone here know how to use eclipse (yes I know I'm slowly descending the chain of madness)
@ConorO'Brien 1. Uninstall Eclipse. 2. Install IntelliJ
> For Eclipse, create a workspace anywhere (though the easiest location is one level above your project folder). Then simply import your project folder as a project, everything will be done automatically.
@Pavel oh, ok
I waited 25 minutes for eclipse to install tho >_<
I know, but trust me. IntelliJ is better in every way.
03:34
ok
Eclipse is fine. There is little difference between IDEs
What part of the quote is confusing you?
how do I import a project folder as a project
In IntelliJ, you click 'open existing project' and select the folder you want to open.
Is it an Eclipse project or just a folder of code
I think it's just a folder
this, step 6
03:37
New Java Project then Import -> File System
IntelliJ has more features like Android and Kotlin support, a builtin GUI builder, a better interface, it's faster, intelligent code completion is far superior.
You need the EAP version if you want Java 9 though.
@Pavel Code completion is usually more of a nuisance the more intelligent it is.
I like it if you open it manually, not if it's enabled by default.
As for GUI builders I'm rather content with NetBeans's
@mınxomaτ You can do that in the settings.
03:43
That was a general comment on CC
wanna talk in the werewolf room
which is badly named tbh
Also the official Android SDK IDE is Eclipse. I've found anything else is usually missing things
Didn't Google make their own, IntelliJ based one at some point?
From Wikipedia:
> Based on JetBrains' IntelliJ IDEA software, Android Studio is designed specifically for Android development.
JetBrains makes the best IDEs
Oh damn, GCC 6.x breaks all my things. Ugh...
04:06
I hate being jester with dumb town sometimes, they never even question anything you do
noone suspects the guy who claimed doctor and escort...
why am I so good at executioner when i'm actually jester
Jester is easy as all hell. I often get myself lynched day 2
I find Exe to be the easiest role in the world.
Just fake whisper something or claim vig and say xyz has immunity on day 2
Ah yes the ever-famous .w 17 kill 12 tomorrow
@quartata dumb town is sometimes really hard though
like, you act as an exe
they just go
> git 'em (the accused)
then even though they are inno they keep believing them
04:17
@quartata This backfires when the one smart guy ask why you shot on day two.
@Pavel That's the point. You can't.
Oh, you were continuing your thought, I thought you were replying to my exe comment.
Back early from. Klondike Derby. So tired. Tomorrow I will be trying to answer some of the challenges in Jelly
Make sure you leave some for me Dennis
Talking about ToS
?
Ye
ok, so spy dead on night 2
lets see if they can figure out edward bishop is proven town
04:25
You could tell them that.
You were the spy?
Welp. Medium?
oh right
they should figure it out themselves though
oh wait i just remembered he could be sk or jester
but still proved non maf
still proven non-maf
04:31
How do you know? They tried to kill him, but he lived anyway?
no, the framer visited him
spy gets to know
town won anyway
Ah, right.
Could be exe too.
BTW, if you visit talk.tryitonline.net, TIO has every LISP now.
Clojure, Racket, CHEZ scheme, cLisp, eLisp, CHICKEN scheme, Guile scheme,
pyramid scheme?
ha-ha
is that "ha-ha funny" or "ha-ha I'm mad"?
04:38
That was a terrible pun
04:48
so "ha-ha I'm mad"
I'm not sure. Both?
I sense a new esolang.
@Dennis Like Scheme, but with angle pyramid brackets <>?
Hmm... maybe () aren't parsed at all, so you could polyglot with it in interesting ways.
@Pavel ... and tinylisp ;)
And PicoLisp.
05:01
I was just going to ask about that one
Does tr "(" "<" | tr ")" ">" | racket -e look right?
I'm not sure why you'd need two tr's and if racket reads code from STDIN.
Also, please don't make that a language.
I don't know how tr works
tr takes strings/lists of bytes, so tr "()" "<>" does the job.
That's backwards though. It replaces parens with angle brackets.
Oh yeah
05:08
<print <add <number 3> <number 4>>>
Seems about right.
I'm definitely making that a thing when I'm done with maverick
I can make that a thing as soon as I figure out how to pipe tr into a Scheme dialect.
cat $1 | tr "()" "<>" > $1.tmp
scheme-thingy $1.tmp
something like that
I was expecting it to look more like this:
  /\
 /+ \
/x y \
------
05:11
I like the way you think
or maybe:
   ^
  /+\
 ^---^
/3\ /4\
--- ---
That.
#!/usr/bin/env python3
import os, sys
os.system("/opt/racket/bin/racket "+sys.argv[1])
Wait, I forgot the tr
I think python has tr in a lib?
wouldn't that fail to work if you wanted to print "<>"?
05:16
(hint: create a "replace not in data" method. usually consists of simpleish iteration over the code)
#!/usr/bin/env python3
import os, sys, string
code=sys.argv[1].translate(string.maketrans("<>", "()"))
os.system("/opt/racket/bin/racket "+code)
@ConorO'Brien How do I do that?
idk, what are rackets data types and methods for escaping chars in strings
No idea
I think it's fine, remember, it's not a bug it's a feature.
Or, I'll call this v0.1, and fix it later.
Or someone can make a pull request here
Don't take the name with the boring tr one, make it with triangles :P
@Pavel call it AngleScheme instead
05:23
@feersum That seems hard.
I'll do it then. just rename yours to something else
:P
Refraining from publishing the tr one is hard?
@ConorO'Brien You do yours, and we'll add mine as a command-line option?
Aww.
05:24
they are completely separate languages
I renamed it to angle scheme
don't forget to modify the .py
Done
#!/usr/bin/env python3
import os, sys, string
code=sys.argv[1].translate(string.maketrans("<>", "()"))
os.system("/opt/racket/bin/racket "+code+" < "+sys.stdin.read())
I think I added input support, but I don't know how Bash works.
Can someone check?
why not just call it a compiler and let the user run the compiled code
That seems a little too low effort.
05:29
you wrote 4 lines of code, two of which are headers
4
Also, this way, there's a slim chance of me convincing Dennis of adding it to TIO.
can't that cause damage by code injection?
@Pavel Best case scenario, that's a file not found error.
I looked at your wrapper in TIO, it looks just like that
Eh, I'll look at it.
If it looked like that, it's unlikely any of the languages would be usable.
05:34
man racket is not helpful.
@Pavel It takes a filename, not code. You have to use -e and escape characters that are special to Bash.
Also, what if you want to print <this>? It will come out as (this).
It's not a bug, it's a feature.
@Pavel man, racket is not helpful
-e I can add, but what do you mean by escape characters?
Not working is a feature? :P
05:38
Converting <> even in strings is a feature.
os.system('echo "abc"') will echo abc, not "abc".
yeah, that only works on the superior command line environment batch
:P
:P means sarcasm because batch sucks right?
> superior
#!/usr/bin/env python3
import os, sys, string
code=sys.argv[1].translate(string.maketrans("<>", "()"))
with open("code.as", 'w') as f:
    f.write(code)
os.system("/opt/racket/bin/racket code.as < "+sys.stdin.read())
05:40
@DestructibleWatermelon yes
@Dennis what, you want to use bash? it can't even output things with echo without quotes!
^^^ also guards against code injection
And escape characters
Basically, it fixes everything but <> in strings, I think I can do that with regex.
@Pavel No, it does not. It also doesn't work since that's not how you use <.
Oh.
How do you use <?
With files. <<< is for here-strings, but then you have to escape again.
The best thing you can do with os.system is forget it exits.
But I'm fine with it existing because I don't need to do anything else afterwards
#!/usr/bin/env python3
import os, sys, string
code=sys.argv[1].translate(string.maketrans("<>", "()"))
with open("code.as", 'w') as f:
    f.write(code)
os.system("/opt/racket/bin/racket code.as <<< \""+sys.stdin.read().replace("\"","\\\"")+"\"")
Also backslashes
#!/usr/bin/env python3
import os, sys, string
code=sys.argv[1].translate(string.maketrans("<>", "()"))
with open("code.as", 'w') as f:
    f.write(code)
os.system("/opt/racket/bin/racket code.as <<< \""+sys.stdin.read().replace("\"","\\\"").replace("\\","\\\\")+"\"")
I think it's done now.
I'll make it kill all () that were in the original code tomorrow.
Ooh! I'll replace the maketrans with maketrans("<>()", "()<>")
07:01
@Pavel you can fix the string issue with the tokenizer module, its meant for things like this
 
1 hour later…
08:16
Is anyone on?
I'm on now
literally just got back lol
1 min difference
I need help with Clojure stuff (Leiningen and Ring, to be exact)
08:32
Is there a thread somewhere on meta that says how to count bytes for a finite state automata ?
@LyndonWhite Which one are you referring to?
I was thinking a FST
Probably made with HFST, but maybe would convert to OpenFST or Foma
Could output it in AT&T syntax and then byte count it.
maybe?
Or could output the binary version, and byte count that.
Or there is probably an equation to convert number of states into information theoretic notion of a byte of information.
gotta have an implementation
08:48
Wait, thinking about it I'm not sure any FST counts as a progamming language.
I don't think it is turing complete
Finite automata can not represent natural numbers.
>A purported programming language should be accepted as such if and only if it is capable of addition of natural numbers and primality testing of natural numbers.
It's OK, a finite state-based programming language would be allowed.
But you have to have an interpreter that can actually run it, accept input and output.
09:05
damn that was close
sheriff investigated me but mafia killed them first
HFST, OpenFST, Foma all run finite state automomita,
But there is no one canonical input form.
You pick one of them, and use that form.
What if that form is not plain text?
The code file can be any series of bytes.
fair enough.
I still don't think it means our requirements for a programming language though.
Since it can't repressent natural numbers.
and thus can't add them or do a primality test
It can represent natural numbers up to any limit, and do a primality test on them.
But not natural numbers in general.
wat
wat
09:14
damn.
i just realized
i totally missed my friend's birthday. I was excited to come, he was excited about it...
shit
damn
how did you do that
09:49
@wat Too much PPCG?
10:11
hello
10:23
0
Q: Write a haiku-w detector

DomTheDeveloperA haiku is a poem with three lines, with a 5/7/5 syllable count, respectively. A haiku-w is poem with three lines, with a 5/7/5 word count, respectively. Challenge Write a program that will return true if the input is a haiku-w, and false if not. A valid haiku-w input must consist of 3 lines,...

There's a political shitstorm going on in meta SO.
758
Q: Time to take a stand

Joel SpolskyI am extremely upset by President Trump’s executive order on immigration. It is immoral, unconstitutional, and fundamentally un-American. The community on Stack Overflow is made up of users from all over the world. At least 100,000 posts on Stack Overflow were written by users from the seven cou...

IMO this question shouldn't even be on Meta SO, it's turning political now - despite it being made from the CEO of SO
This isn't the first time the SO staff gets political. That's their privilege.
0
Q: The program that will find the next biggest prime number

P. KtinosIntro: You accidentally corrupted the flow of time with a device you made for fun, that turned out to be a time machine. As a result, you got pushed to the far future. You realized that computing, processing power, and computers in general have been evolved by a huge amount, an infinite amoun...

10:39
@mınxomaτ True that, but if it wasn't Joel, it would be nuked immediately
yes, but it is Joel.
(I imagine a few others could do it to. eg Jon Skeet).
That's true
 
3 hours later…
13:21
0
Q: Kolmogorov Complexity Meta Golfer

Julian LachnietAt PPCG, we pride ourselves in writing programs to solve problems. However, it's very time consuming to write the programs to solve problems. Instead we should write programs to write programs to solve problems! In this case, the problem is Kolmogorov Complexity. You must write a program that go...

14:18
0
A: Sandbox for Proposed Challenges

Rohan JhunjhunwalaChicken No, before you ask,this challenge is not about the language. Chicken is a game played with two cars (or two computers) where two drivers face each-other on a street. Each car may swerve or stay fixed in its path. Here is an idealized payoff matrix Player 1 ...

15:16
TIL J/K/L are transport hotkeys in YouTube.
15:36
Down up right?
@DJMcMayhem j is 15 secs back, k is pause/play, l is 15 secs forward
15:50
that doesn't match vikeys :-( it should be h for back
I created a directory under and already existing dir (which was already a git repo). I wanted this new dir to be a separate repo, but I messed up and I merged them both
@quartata I stopped dog residue farming and on a friend's advice, turns out you can buy cloudy glasses from gerson and sell them for a 20 gold per purchase profit
much greater than dog residue
buy for 30/sell for 50
00:00 - 16:0016:00 - 00:00

« first day (2192 days earlier)      last day (2947 days later) »