HNHacker News
TopNewBestAskShowJobs

daneelsan

178 karma · joined August 27, 2020

submissionscomments
daneelsan··on Why do arrays start at 0?
In Mathematica/Wolfram Languege, the part 0 of an expression is reserved for the head of the expression: f[x, y, z][[0]] == f. Or g[f][x, y][[0, 1]] == f.
daneelsan··on Picking up free lithium cells off the street and making them safe for use
Scott's thots part 2
daneelsan··on Zig and WASM
And just now console.log() :) https://github.com/daneelsan/zig-wasm-logger
daneelsan··on Zig and WASM
I am also trying to learn wasm via the zig route:

* A minimal example showing how HTML5's canvas, wasm memory and zig can interact: https://github.com/daneelsan/minimal-zig-wasm-canvas

* This mini game shows how Zig, WASM, Javascript and HTML5 canvas can interact: https://github.com/daneelsan/Dodgeballz

* WEFX is a simple graphics drawing package using Zig, WASM, and an HTML canvas: https://github.com/daneelsan/zig-wefx

daneelsan··on Music for Programming
My goto right now is to listen to One Piece OST.
daneelsan··on Khan Academy launches Khan World School online high school
There is a difference between online education because there is no other way as there is a pandemic (are the students and the institution ready to switch to online, are the courses even designed to be imparted online, etc.), and online education because it's a choice.
daneelsan··on We’ve got a science opportunity overload: Launching the Wolfram Institute
OK bud
daneelsan··on We’ve got a science opportunity overload: Launching the Wolfram Institute
Would it be profitable, though?
daneelsan··on We’ve got a science opportunity overload: Launching the Wolfram Institute
I'm not sure why comments mention CA. His physics theory and the multicomputation stuff does not make use of CA's (at least no more than any other abstract machine).
daneelsan··on We’ve got a science opportunity overload: Launching the Wolfram Institute
Didn't he invent a numbering schema for classifying CA? That should count as an achievement.
daneelsan··on We’ve got a science opportunity overload: Launching the Wolfram Institute
> it's nothing more than noodling cellular automata in ways that have had no effect whatsoever on chemistry, physics, or biology.

I mean, you could at least read a bit about what his Multicomputation stuff is really studying. CA are not being noodled there.

daneelsan··on Is there a functional reason for wizards to live in towers so often?
Yes
daneelsan··on Stephen Wolfram: A New Kind of Science
Simple rules do not necessarily mean simple behavior. Explore where observation leads in various different systems and rules.
daneelsan··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
Interesting...
daneelsan··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
I see what you mean, simpler indeed!
daneelsan··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
It has GC, e.g. DataStructures (https://reference.wolfram.com/language/guide/DataStructures....) are GC'd. IIRC it uses refcounting for this.
daneelsan··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
Tom is the current main developer of the new Wolfram Compiler. Search in YouTube "wolfram compiler" and you'll see almost all the talks are his.
daneelsan··on A simple defer feature for C
Yeah, I do want some kind of defer.
daneelsan··on A simple defer feature for C
Some say they don't like it because it it's implicit control flow, i.e. I don't like that my code is being put into the end of the function without it being in the end of the function. I mean OK, but that's what for loops so right? The i++ is put at the end of the "while" loop, together with the exit condition. I think the more important problems are: 1) why be function scoped and not block scoped? 2)why should it be so tied up with lambdas?

1) I don't se why they chose function over scoped so please enlighten me 2) the proposal said there were debates whether defer free(ptr) refers to the ptr where the defer first appears, or to the current ptr that appears when the defer block is being executed. As someone mentioned, gotos already work in the latter way. Same goes with i++ in a for loop, I could do whatever I wanted with the i inside the for, and the i++ or the exit condition would use the latest value of i, not the value at the start of the block.

daneelsan··on A simple defer feature for C
Huh that's a good point.
daneelsan··on A simple defer feature for C
Why ado you think namespaces make it a no brainer? I would argue the only thing I would want from C++ it's operator overloading, and I'm not even conviced about that.
daneelsan··on PiDP-11 – Recreating PDP-11/70 with Raspberry Pi
That sounds really interesting!
daneelsan··on How to implement a hash table in C
That seems like the thing I'm looking for! Thanks for the info
daneelsan··on How to implement a hash table in C
I guess that can be solved by creating an Expression type
daneelsan··on How to implement a hash table in C
Yes. At some point i encountered this trie with payloads (which would act as t he field values).
daneelsan··on How to implement a hash table in C
Sorry if I wasn't clear enough. Yes I want something like an object in javascript, like a struct in C but at runtime. But I want to implement this myself. At first I thought a hash table was the right choice. But I don't need the insert delete increase capacity that this data structure typically needs to implement. I want to implement this in Mathematica. The language doesn't have native objects given that the main idea is for things to be immutable. But I still can program data structures, so I'm looking for one...
daneelsan··on How to implement a hash table in C
This might not be the best place to ask but: I'm wondering what the best data structure is for these needs: * there are fields and values, similar to a struct * I know at initialization time what fields there are (assume a string) * at run time I want to be able to get this values accessing via the key/field * also I want to update those values * what I don't care about is inserting/deleting fields because that's now allowed,

I guess what I want is a struct like data structure, but in an interpreted language

Mightve typed to fast...

daneelsan··on J one-page interpreter fragment (1992)
I don't get why the 5 in '5 + tr(...)'. t+r+d[3] is 5, I guess? The verb function should return an I and not an A. e->tokens in the wd function.
daneelsan··on J one-page interpreter fragment (1992)
Thanks for this!
daneelsan··on Combinators: A Centennial View
Also, lots of functions were added to the repository: https://resources.wolframcloud.com/FunctionRepository/search...
Page 1 of 2Next →