by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Dave Ackley
@DaveAckley
Gah!
Is there an official throw-an-error mechanism, or really no?
Andrew
@walpolea
there is, but not being typed, you're either already abusing that notion, or most of your code would be error throwing
Dave Ackley
@DaveAckley
Is there a 'return null' notion or anything?
Andrew
@walpolea
yeah, return undefined would be fine
Dave Ackley
@DaveAckley
I'd vote for that probably then.
Andrew
@walpolea
👍
Dave Ackley
@DaveAckley
Whew! :)
Andrew
@walpolea
since I am in Typescript, I will throw an error
if( num < 0 ) {
    throw new RangeError(`Range Error: Negative numbers cannot be Leximited`);
  }
Dave Ackley
@DaveAckley
Yum now we're talking.
Errors buy design freedom for the future.
Andrew
@walpolea
have you coded in Rust, or looked at it?
Dave Ackley
@DaveAckley
Read about it some, haven't even written hello world
Andrew
@walpolea
the thing about it, that everyone raves about, is how compilation errors not only say something is wrong, but tell you what's wrong, why and how to likely fix it
Dave Ackley
@DaveAckley
:) nice
Compiler error messages have gotten a ton better in the last decade or two.
Andrew
@walpolea
right, even if they have to resort to building an entire super-set language on top of a language, a la TypeScript.
Dave Ackley
@DaveAckley
gcc was entirely rewritten from being a shift-reduce parser to being a top-down parser, mainly (I gather) to make it easier to generate better error messages.
(Not that gcc error messages are anything close to state of the art. But by comparison to itself..)
Andrew
@walpolea
I got very intimate with the VisualStudio debugger in college, the errors were awful
Dave Ackley
@DaveAckley
Rite of passage.
Andrew
@walpolea
truth
Andrew
@walpolea
image.png
something is happening!
Dave Ackley
@DaveAckley
Sweet!
Andrew
@walpolea
image.png
Dave Ackley
@DaveAckley
Yup.
Hmm I guess it's really 'negative' that's a problem rather than non-positive. 0's okay.
Andrew
@walpolea
hmm, well in javascript, we do have -0 and 0
Dave Ackley
@DaveAckley
GAH
Andrew
@walpolea
I wrote it as non-positive integers to cover both negatives and non-integers
I could be clearer
Dave Ackley
@DaveAckley
'only non-negative integers can'..
Andrew
@walpolea
perfect
Andrew
@walpolea
thanks for the help!
Dave Ackley
@DaveAckley
thanks for going at it!
Luke Wilson
@l2wilson94
Nice!
And yes, the -0 and 0 thing comes from the IEEE 754 standard
Dave Ackley
@DaveAckley
..Because everything's float under the hood.
Luke Wilson
@l2wilson94
Yep :)
Andrew
@walpolea
Leximitedjs is on npm! Likely with bugs! But there nonetheless! https://www.npmjs.com/package/leximitedjs
Dave Ackley
@DaveAckley
Super!
AndreasS2501
@AndreasS2501
Hi Dave!
Some time ago you mentioned that you created a kind of Tutorial. I was wondering as I would try to get a better grasp of the T2 System if we could somehow organize a study group to go through your tutorial?. I talked today with Tim and he said he would be definitely interested in such a thing. May other from the channel would be also interested? What do you think?
Dave Ackley
@DaveAckley
Hi @AndreasS2501 ! I thought I'd driven you away with my determinism addiction discussion!
There isn't any super wonderful tutorial out there as yet.
There is the 'getting started' guide at https://github.com/elenasa/ULAM/wiki/Ulam-Programming-Language . That's getting a little dated but it should still work.
There's also http://robust.cs.unm.edu/doku.php?id=dev:clone_from_github to build the simulator from the github repo.
There's also a tutorial talk yet to exist that I'm trying to put together for this summer's ALIFE conference.