HNHacker News
TopNewBestAskShowJobs

x0re4x

58 karma · joined July 16, 2015

submissionscomments
x0re4x··on sp.h: Fixing C by giving it a high quality, ultra portable standard library
I suggest using a slightly different array operator syntax for fat pointer arrays: "char a[|..|]" instead of just "char a[..]" to make them visually distinct and indicate that element access has additional bounds check. (syntax inspired by ocaml)
x0re4x··on Just Use Go
Go language is explicit: identifiers starting with a capital letter are exported.

https://go.dev/ref/spec#Exported_identifiers

x0re4x··on I Built an Open-World Engine for the N64 [video]
There is a nice video by Kaze Emanuar demonstrating N64 easily pushing 300k shaded triangles per second without special optimizations in a game engine:

https://www.youtube.com/watch?v=GC_jLsxZ7nw

x0re4x··on I Built an Open-World Engine for the N64 [video]
It might be because he is not using nintendo's sdk anymore, particularly the "microcode" for RSP "coprocessor". Most N64 emulators usually do not emulate RSP properly, but detect which specific nintendo's microcode is used and then emulate it's behavior.
x0re4x··on Nvidia GeForce 256 is 25 years old
> TFA claims the GeForce 256 was "the world's first GPU", but why not consider the NVidia Riva TNT a real GPU?

GeForce 256 integrated hardware vertex processing (transform and lighting), which Riva TNT and others did not - the CPU had to do this part.

The RCP of the Nintendo 64 was probably the first modern GPU integrating RSP for vertex processing and RDP for rasterization into a single chip.

x0re4x··on Nord Stream 2 pipeline pressure collapses mysteriously overnight
There is no need to guess:

"There will be no longer a Nord Stream 2. We will bring an end to it."

https://twitter.com/townhallcom/status/1490791554088321024

x0re4x··on Ask HN: Good Resources to Learn and Implement a Parser (Compiler)
@LeSUTHU:

* if you want to design and play around with your grammar (builtin interpreter is very nice to try things out):

https://www.antlr3.org/works/

* once you want to actually implement your language:

https://cs3110.github.io/textbook/chapters/interp/intro.html

* some older tutorials:

https://web.archive.org/web/20051220013748/http://pllab.kais...

https://web.archive.org/web/20051220043933/http://pllab.kais...

NOTE: modern replacement for ocamlyacc: http://gallium.inria.fr/~fpottier/menhir/

x0re4x··on Undocumented x86 instructions to control the CPU at the microarchitecture level [pdf]
Probably using something like that: https://github.com/xoreaxeaxeax/sandsifter
x0re4x··on Multicore OCaml: May 2021
Try F#. It's not exactly ocaml, but close enough if you want to stay on windows.
x0re4x··on Book Summary: Why Nations Fail – Understanding why countries are rich or poor
"In a Time of Universal Deceit — Telling the Truth Is a Revolutionary Act"
x0re4x··on Book Summary: Why Nations Fail – Understanding why countries are rich or poor
Probably relevant: "IQ and National Success" https://youtu.be/8u0Lmp_jHw8?t=332
x0re4x··on Japan's all-male boards face rejection by foreign investors
Facts and evidence are the Tools Of The Patriarchy. You supposed to shut up and blindly belive. Do not question the western state ideology of progressivism.

(P.S.: as an unbeliver you won't be able to "see" the "Benefits™")

x0re4x··on Tell HN: C Experts Panel – Ask us anything about C
Take a look at "Modern C" :)

https://gforge.inria.fr/frs/download.php/latestfile/5298/Mod...

(Homepage: https://modernc.gforge.inria.fr/ )

x0re4x··on Enemy AI: chasing a player without Navigation2D or A* pathfinding
Hmm... pretty sure I already saw something like that long time ago: https://github.com/id-Software/Quake-2/blob/master/game/p_tr...
x0re4x··on U.S. Signs Peace Deal with Taliban
Huge profits for https://en.wikipedia.org/wiki/Military_industrial_complex
x0re4x··on OCaml 4.10
I have some more older links, ocaml changed a bit over time, but I think they are still relevant:

https://caml.inria.fr/pub/docs/oreilly-book/html/index.html

https://caml.inria.fr/pub/docs/u3-ocaml/

https://ocaml.github.io/ocamlunix/

x0re4x··on OCaml 4.10
See https://www.cs.cornell.edu/courses/cs3110/2020sp/textbook/
x0re4x··on D as a C Replacement
Thank you for clarification. I was looking at https://www.digitalmars.com/articles/betterC.html, https://dlang.org/spec/betterc.html is a better description.
x0re4x··on D as a C Replacement
> Consider C's Biggest Mistake

I do not think it is a significant problem in C. It might be more of a problem in C++.

> You can use D in -betterC mode, write code pretty much just like you would in C, and not have that problem.

D is an improved, more polished version of _C++_, not C; "-betterC" mode is misleading, it is more of a "betterC++" mode (features: classes, exceptions, RAII, templates).

"The simplicity of C is more useful than the additional features of C++." -- (Sam Watkins) s/C++/D/g

Don't get me wrong: D would be a great replacement for _C++_, but not C. For a better C I would look at a subset of Go (GC would have to go away).

x0re4x··on Go Slices Are Fat Pointers
I would interpret the silence of C people as "Thanks, but no, thanks." The success of C for such long time without having fat pointers, exceptions, RAII, etc... is probably an indication they weren't needed that much.

(Jonathan Blow: Ideas about a new programming language for games.) https://www.youtube.com/watch?v=TH9VCN6UkyQ&list=PLmV5I2fxai...

x0re4x··on MIPS R3000
You could always put NOPs into delay slots by default and replace them later with something more useful.
x0re4x··on Ask HN: Which RSS reader do you use?
Slick RSS (https://chrome.google.com/webstore/detail/slick-rss/ealjoljn...)
x0re4x··on Explaining Sex Rate Changes
Briffault's Law:

https://www.youtube.com/watch?v=UaFJ18aENkc https://www.youtube.com/watch?v=9W6wvHSMmzY https://www.youtube.com/watch?v=PqSCRnrq5I0

Some more:

"More" https://www.youtube.com/watch?v=Ud3PgQ_y170 "No Eligible Men" https://www.youtube.com/watch?v=tTxP7fPMnK4 "Seeing the hook" https://www.youtube.com/watch?v=Nv4jnWYCuEs "Remaining unplugged" https://www.youtube.com/watch?v=0KfQIEAGqhg "Hiding in morals" https://www.youtube.com/watch?v=RBslYOWiJlI

https://www.youtube.com/watch?v=LnWV4Yy6dOs

But hey, it may be just porn and videogames after all... who knows...

x0re4x··on Explaining Sex Rate Changes
> Explaining Sex Rate Changes

"An ironic side-effect of feminism is to free men from the burden of being the head of the house." https://www.youtube.com/watch?v=RPETpCVrH9Y

"Why you can't find a man: Hypergamy Floats" https://www.youtube.com/watch?v=4UWpmd1yjVc

x0re4x··on I disagree with Linus Torvalds about C++ (2009)
There is a good comment after the article: "The simplicity of C is more useful than the additional features of C++." -- (Sam Watkins)
x0re4x··on Go 1/2 Proposal: Immutable Types
Hi,

my humble opinion: how much would "Immutable Types" add to the language? How much complexity would it add? Things can already be made immutable from outside by hiding them in private variables/struct elements.

The question is: why did Go became successful without having "Immutable Types"? (or "Reference Types", ADTs too please?) Maybe those things are just frills, "nice to have" features.

Example like "type ImmutableMapAndKey const map[const * const Object] const * const Object" looks like really ugly Go to me... this is starting to look like C++...

https://www.youtube.com/watch?v=cQ7STILAS0M (why Golang is Sucessful by Creator of Golang Rob-pike)

P.S.: I wouldn't mind having "Immutable Types", "Reference Types", ADTs, etc. in Go. But not if it means abandoning simplicity of the language.

x0re4x··on C is the desert island language
No, GCC is still written mostly in C. Try:

git clone --depth=1 https://github.com/gcc-mirror/gcc.git

cloc gcc/gcc

x0re4x··on Should you learn C to “learn how the computer works”?
stack_ret.c:5:10: warning: function returns address of local variable [-Wreturn-local-addr] return new;
x0re4x··on Product Updates Based on Your Feedback
Well, putting:

{ "SyncDisabled": true }

into /etc/chromium/policies/managed/test_policy.json (for debian linux) seems to do the trick for now, unsure how long it lasts...

see: https://www.chromium.org/administrators/policy-list-3#SyncDi...

x0re4x··on The cost of forsaking C
Do you have a specific example? I wrote programs in Z80, AVR, x86/amd64 and MIPS assembly. In my experience writing C is MUCH easier.
Page 1 of 2Next →