John Carmack to work on artificial general intelligence
1 0 comments 23 Nov 2019 21:27 u/svipbo (..) in v/programmingCore Debian developer summarily banned from project for referring to a transgender person with a non-approved pronoun
216 153 comments 03 Feb 2019 12:37 u/svipbo (..) in v/programmingWhich Unicode character should represent the English apostrophe? (And why the Unicode committee is very wrong.)
2 0 comments 01 Feb 2019 18:03 u/svipbo (..) in v/programmingC Portability Lessons from Weird Machines
1 0 comments 01 Dec 2018 20:36 u/svipbo (..) in v/programming"Holy Grail" Bugs in Emulation, Part 1
1 0 comments 27 Aug 2017 18:02 u/svipbo (..) in v/programmingThe world in which IPv6 was a good design
13 0 comments 11 Aug 2017 18:08 u/svipbo (..) in v/programmingTwo Commits That Wrecked the User Experience of Git
3 0 comments 09 Jul 2017 10:50 u/svipbo (..) in v/programmingRoland McGrath bows out as glibc maintainer
2 0 comments 09 Jul 2017 10:46 u/svipbo (..) in v/programmingReverse engineering the 76477 "Space Invaders" sound effect chip from die photos
4 0 comments 21 Jun 2017 18:32 u/svipbo (..) in v/programmingComment on: Only 36% of Indian engineers can write compilable code: study
Miscegenation with low-caste Dravidians.
Comment on: Nasa runs competition to help make old Fortran code faster
A straight rewrite in a language other than Fortran will very likely make it slower. What language did you have in mind?
How to not invent kernel interfaces (2007) [PDF]
6 0 comments 14 May 2017 10:21 u/svipbo (..) in v/programmingEngineering Integrity vs. Workplace Marxism
2 0 comments 20 Apr 2017 17:08 u/svipbo (..) in v/programmingWhy some NES games have artifacts at the edge of the screen
11 2 comments 08 Mar 2017 18:07 u/svipbo (..) in v/programmingComment on: BASIC v2.0 / Commodore programming help. C128/64 hobby refinement
A very thorough look at the C64. https://www.youtube.com/watch?v=ZsRRCnque2E
Comment on: Nigerian "software engineer" handed written test at New York airport to prove he really is one
I'd like to see a film of this.
Nigerian "software engineer" handed written test at New York airport to prove he really is one
5 2 comments 01 Mar 2017 20:56 u/svipbo (..) in v/programmingOracle euthanizes Solaris 12, expunging it from roadmap
1 1 comment 19 Jan 2017 20:37 u/svipbo (..) in v/programmingComment on: Do you expect computers to move to a 128-bit architecture during your lifetime?
This is why the x32 ABI was created for Linux. https://en.wikipedia.org/wiki/X32_ABI
Comment on: xmake: The Automatic Cross-platform Build Tool is released
Because writing a new build system appears easier than learning how to use the existing ones.
Comment on: Bored? Go over this text-based RPG I'm making. Tell me exactly how awful my coding is.
Here's one thing:
Self-explanatory, really. In other words, it would be easier to understand if you stored this logic in a data structure instead of using "print" statements. But's that's really a very minor point: it's easy to understand as it is.
A bit confusing here. You use a global variable to store a list of the scenes, but then you also have a parameter to say which list to use:
If you can't create a scene that isn't in the global list, then one wonders what the point of the parameter is.
Generally I don't see global variables as that bad. You'll know that they are bad when you start to get confused by the code.
With global variables like these, one thing you can do to make the code easier to understand is to comment extensively about (a) where the variable is set, and (b) where the variable is read. This way, when you see a function accessing it, you will have a better idea what code set the value of the variable.
Seems a bit strange to use exception handling to know whether the command is recognized or not.
One question is how to read the code. So I see there is an exception here called KeyError. What throws this exception? Is it caught elsewhere? I thought I could look through this file for this KeyError but it only appears twice in the file and neither place gives me a clue. This shows a basic principle of what makes code easy to understand: put stuff near each other in the source code so you don't have to look across many locations in the source code to understand the logic, and when this isn't the case, comments help.
stuff and stuff_split are bad variable names. Maybe input_line and input_arguments or something?
So you have the all_spells variable which you access in a few places in this file. I looked at the spells.py file where the all_spells variable is initialized. But I wasn't sure if spells were added elsewhere as well. I think it would be hard to tell without looking through the rest of the source code.
Comment on: Old School Color Cycling with HTML5
Probably some information in the links on this page https://news.ycombinator.com/item?id=11506431 that I got the submission from. I don't tend to watch videos though so couldn't say what was in them.
Comment on: We need more programming challenges. We should start off small: First non-repeating character of a string. Any language you like.
I thought something like that, but tooth is supposed to be h. It isn't t, because t appears twice, even though the two t's aren't next to each other. I think it means the first character that doesn't appear in the string twice.
Comment on: We need more programming challenges. We should start off small: First non-repeating character of a string. Any language you like.
C version fails for input aba. The code here prints a even though a is a duplicate.
For aabbc, it thinks the answer is b.
Comment on: We need more programming challenges. We should start off small: First non-repeating character of a string. Any language you like.
Here's my shitty C:
char
first_non_repeating (char *s)
{
char *p;
int dup;
characters with '0'. */
for (; *s; s++) {
if (*s == '0') {
continue;
}
dup = 0;
for (p = s + 1; *p; p++) {
if (*p == *s) {
*p = '0';
dup = 1;
}
}
if (!dup) {
return *s;
}
}
return 0;
}
int
main ()
{
char strings[] = "yellow\0tooth";
char *s;
for (s = strings; s < strings + sizeof (strings);
s += strlen (s), s++) {
printf ("%s ", s);
printf ("%c\n", first_non_repeating (s));
}
}
Serious Sam's Serious Engine source code released under GPL
2 0 comments 12 Mar 2016 19:17 u/svipbo (..) in v/programmingComment on: Another bigot joining Github. Inclusiveness doesn't include white men.
This guy? OMG. He was responsible for this: https://github.com/opal/opal/issues/941. Makes my blood boil.
Comment on: Usborne 1980s computer books, free to download for personal use
I love these, I had one when younger, and still have it!
Results of the 2015 Underhanded C Contest
9 0 comments 04 Feb 2016 08:41 u/svipbo (..) in v/programmingOpenSSH and the dangers of unused code
22 10 comments 28 Jan 2016 19:27 u/svipbo (..) in v/programmingComment on: A computer has beaten a human professional for the first time at Go, the ancient board game
Just found a link to full paper: https://storage.googleapis.com/deepmind-data/assets/papers/deepmind-mastering-go.pdf
Comment on: A computer has beaten a human professional for the first time at Go, the ancient board game
Yes, but can a computer ride a unicycle? Checkmate, atheists.
The 1986 ACM Conference on the History of Personal Workstations (links to videos included)
7 1 comment 28 Jan 2016 08:15 u/svipbo (..) in v/programmingComment on: Echo in 879 bytes (Assembly)
je _removenl ;If they are equal remove the newline
jmp _main
_removenl:
could jne _main instead.
jmp _main
_main:
jmp unnecessary.
Marvin Minsky, father of artificial intelligence, dies at 88
13 1 comment 27 Jan 2016 21:15 u/svipbo (..) in v/programmingA computer has beaten a human professional for the first time at Go, the ancient board game
18 8 comments 27 Jan 2016 21:12 u/svipbo (..) in v/programmingComment on: Reflections on difficulties using object-oriented design methodology
Here's an article that discusses different meanings of class inheritance: Go and Rust - objects without class.
Reflections on difficulties using object-oriented design methodology
12 5 comments 20 Jan 2016 21:45 u/svipbo (..) in v/programminglibcurl developer blamed for Instagram hack by luser because his licence notice was present
13 2 comments 20 Jan 2016 21:20 u/svipbo (..) in v/programmingComment on: Learn to Code. It's a LOT Harder Than You Think
Dunning-Kruger effect? If someone says they know C++, they likely know less of it than someone who says they partially know C++ but they're worried they don't understand some of the darker areas.
Elementary Human Interface Guidelines - Advice on UI and software design
6 3 comments 14 Jan 2016 10:07 u/svipbo (..) in v/programmingT_PAAMAYIM_NEKUDOTAYIM v Sanity (2013)
4 2 comments 09 Jan 2016 22:30 u/svipbo (..) in v/programmingComment on: Best Html5 Courses
83 submissions to ReportSpammers
Great work!
I wondered how long people have been using the "modern" prefix to revitalise programming languages . . .
1 0 comments 09 Jan 2016 11:13 u/svipbo (..) in v/programmingComment on: How to C (as of 2016)
I know, you want a number, just use an int. I mean, int32_t is more visually complicated - how does using that communicate your intentions any better, either to another person or to the computer?
If you pedantically claim that you should use the largest integer type to avoid the risk of integer overflow, I'll pedantically retort that you should use a bignum library for all of your "int"s.
Who's going to remember what intptr_t actually means? Not me.
Comment on: How to C (as of 2016)
I always use -O0 because I got sick of getting value optimized out in gdb.
edit: most of this article is fascist garbage, I'd take it all with a pinch of salt
Comment on: The Website Obesity Crisis
Use an AdBlock software and turn off JavaScript for all but a few chosen websites and you'll have a better experience.
Comment on: In Memoriam: Ian Murdock (founder of Debian)
His last posts on Twitter before he died. Holy crap!
In Memoriam: Ian Murdock (founder of Debian)
44 7 comments 31 Dec 2015 09:43 u/svipbo (..) in v/programmingDomTerm is a combined terminal emulator and REPL console using web technologies
1 1 comment 28 Dec 2015 16:45 u/svipbo (..) in v/programmingComment on: Optimization of Computer Programs in C
A word of warning: this article is quite old (1999), but most of it appears to be still valid.
Optimization of Computer Programs in C
19 3 comments 28 Dec 2015 11:09 u/svipbo (..) in v/programmingThe Awesome Power of Theory - Explorations in the Untyped Lambda Calculus
3 0 comments 28 Dec 2015 11:07 u/svipbo (..) in v/programmingComment on: The Fall and Rise of SVG
LOL well spotted.
Screenshots from developers: 2002 vs. 2015
37 6 comments 12 Dec 2015 21:44 u/svipbo (..) in v/programmingIt Probably Works - Probabilistic Algorithms are All Around Us
20 3 comments 12 Dec 2015 21:39 u/svipbo (..) in v/programmingA scheme for chess move representation
6 0 comments 11 Nov 2015 23:22 u/svipbo (..) in v/programmingAnrdei Alexandrescu (co-creator of D) on D, Go and Rust
6 0 comments 10 Nov 2015 22:22 u/svipbo (..) in v/programmingComment on: What's new in TeX
Part 2 here: https://lwn.net/Articles/662053/.
Comment on: xkcd comic: Git
I thought that comic was an exaggeration! The point is it's wasteful of network bandwidth to be downloading an entire repository because something broke. Of course it's possible to fix it, it's just reading the manpages to find out how, which would be difficult, depressing and time-consuming.
Comment on: golang code of conduct proposal
By restricting the discussion Of this proposal to 1:1 conversations between myself and members of the Community, I hope to better hear everyone’s specific concerns without generating unnecessary noise
Good idea.
An explicit goal of this proposal is to promote cultural diversity within our community and make it more welcoming and inclusive.
Who cares?
Diversity is critical to the project; for Go to become a success, it needs contributors and users from all backgrounds. (See Go, Open Source, Community.)
Uh, no it doesn't. Not really. What it needs is competent people.
If someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize.
I knew that would be in there somewhere.
You know, all this stuff is a good idea:
Be friendly and welcoming Be patient Remember that people have varying communication styles, and that not everyone speaks English fluently. Be respectful In particular, respect differences of opinion. Be charitable Interpret the arguments of others in good faith, do not seek to disagree. When we do disagree, try to understand why.
But you know it's a foil for suppression of free speech and affirmative action.
Go was created by Rob Pike and Ken Thompson, wasn't it? Why can't they be dictators of the project? Instead we have this:
Reporting issues
The Code of Conduct Working Group are a group of people that represent the Go community. They are responsible for handling code-related issues. They are:
And a committee of people who'll decide if what you said was inappropriate.
If you encounter a Code of Conduct-related issue, you should report it to the Code of Conduct Working Group using the process described below. Do not post about the issue publicly or try to rally sentiment against a particular individual or group.
This I can agree with. Too often complaints about harassment turn into harassment themselves.
Furthermore, if your conduct outside the Go community is against our values (below), it may affect your ability to participate within our community.
This is a fucking disgrace. It means someone could be excluded from the Go community for voting for the wrong political party, for example!
J responds to D by asking them to "butt out". S emails J privately, noting that J's reaction was uncalled-for, and suggests that J apologize to D.
I might do this myself, although probably wouldn't suggest an apology, I'd just say it was inappropriate. Again keeping this private is the best idea.
Go’s type system is so simple even my grandma could understand it.
Well, it's true that most people's grandmas aren't interested in computer programming.
All in all I don't think that people being rude to each other is that much of a problem in free software or open source. I read a lot of email threads as well and don't see it.
Inside The Programming Evolution of GPU Computing
8 1 comment 30 Oct 2015 10:46 u/svipbo (..) in v/programmingPermissive licenses, community, and copyleft
6 0 comments 22 Oct 2015 17:10 u/svipbo (..) in v/programmingGetting a full PDF from a DRM-encumbered online textbook
24 3 comments 22 Oct 2015 13:08 u/svipbo (..) in v/programmingstrscpy and the hazards of improved interfaces
1 1 comment 17 Oct 2015 15:23 u/svipbo (..) in v/programmingComment on: "Tomato" versus "#FF6347" - the tragicomic history of CSS color names
Truth be told I'd never realised that these were obsolete.
"Tomato" versus "#FF6347" - the tragicomic history of CSS color names
22 3 comments 15 Oct 2015 22:07 u/svipbo (..) in v/programmingInterview with Bjarne Stroustrup on the 30th anniversary of the first C++ compiler
11 0 comments 15 Oct 2015 14:54 u/svipbo (..) in v/programmingComment on: Encryption with Console Application in C#
Please just fuck off.
Structural and Semantic Deficiencies in the systemd Architecture
1 0 comments 11 Oct 2015 21:52 u/svipbo (..) in v/programmingWhy Intel added cache partitioning in Broadwell, and how it can increase performance by 1.3x to 3x
1 0 comments 06 Oct 2015 00:36 u/svipbo (..) in v/programmingwisp: a parenthesis-free syntax for Lisp s-expressions, remiscent of Python
2 0 comments 03 Oct 2015 17:29 u/svipbo (..) in v/programmingComment on: The Rust Code of Conduct contains this
If I had a code of conduct for my project, it would be "All are welcome to contribute. Keep conversation technical, and please avoid any political garbage. Anyone trying to harass a contributor for their activities outside of the project, or because they allegedly said something offensive, will be taken out and shot with a hollow-point bullet."
Comment on: 'goto' in Python by re-writing the bytecode
That's just a loop, right?
Even worse:
if (condition) {
goto do_it;
}
if (condition2) {
thing1();
if (condition3) {
thing2();
do_it:
thing3();
}
}
Comment on: 'goto' in Python by re-writing the bytecode
In case that wasn't a rhetorical question, constructs using goto can be equivalent to a tail-recursive function call, and can also be used to simulate a return from a function, and even a return from multiple functions, as with setjmp or exception handling. Usually you wouldn't need this, but it can be useful in a language without coroutines, where you maintain what would be a separate call stack as an explicit data structure. It's also useful in languages without continuations for implementing backtracking algorithms, where you want your program to, in a sense, go back in time. If you're interested in exploring this subject, read Donald Knuth's paper "Structured Programming with Goto Statements", and look into.the Lambda Papers by Steele and Sussman, for example "Lambda the Ultimate GOTO".
Comment on: 'goto' in Python by re-writing the bytecode
Surely all you need is a call stack to implement functions that can be called more than once at a single time?
invariably end up looking like spaghetti to the untrained eye
IIRC the function call procedure in the machine language used by Donald Knuth in his Art of Computer Programming books (MIX) modified the jump instruction at the end of the function to jump back to the function call site.
I guess early compilers for FORTRAN that didn't allow recursion must have done something similar.
I honestly don't know but I am guessing it is because integers are Python objects, so when an integer constant appears in the source code the interpreter has to get a data structure representing this integer. This would allow methods to be called on the object.