urbit / archaeology

An Operating Function
www.urbit.org
330 stars 41 forks source link

Can't add 4 digit integers! #67

Closed sukiari closed 11 years ago

sukiari commented 11 years ago

~rammud-lagfer/try=> (add 1000 1000) ~ <syntax error at [1 9]> ~rammud-lagfer/try=> (add 999 999) 1.998 ~rammud-lagfer/try=>

Am I missing something here?

abliss commented 11 years ago

1.000

The separator is mandatory. On Oct 29, 2013 12:43 PM, "sukiari" notifications@github.com wrote:

~rammud-lagfer/try=> (add 1000 1000) ~ ~rammud-lagfer/try=> (add 999 999) 1.998 ~rammud-lagfer/try=>

Am I missing something here?

— Reply to this email directly or view it on GitHubhttps://github.com/urbit/urbit/issues/67 .

philipcmonk commented 11 years ago

What Adam said. That's why 1.998 is written like it is. Incidentally, binary and hex group in fours and base32 and base64 group in fives, as in the following examples:

0b10.0011.1100 0xaf.0478.f3d4 0vafh.542r7.83nmb 0wty~.52gUr.RW341

Philip Monk

On Mon, Oct 28, 2013 at 10:43 PM, sukiari notifications@github.com wrote:

~rammud-lagfer/try=> (add 1000 1000) ~ ~rammud-lagfer/try=> (add 999 999) 1.998 ~rammud-lagfer/try=>

Am I missing something here?

— Reply to this email directly or view it on GitHubhttps://github.com/urbit/urbit/issues/67 .

sukiari commented 11 years ago

Thanks for the swift responses, I guess I have a lot to learn! I'm working through the videos for now.

cgyarvin commented 11 years ago

I myself am bitten by this one regularly - so a case could be made for relaxing the linguistic sphincter and allowing 4 and even 5 decimal places without the separator.

But it also serves as a nice reminder that we're not on Earth (though we could be in Germany, I guess). Note that all our atom syntaces are URL-safe, which is why the dot and not the comma. And it is very nice to enforce on longer decimals, which are just unreadable without a separator.

On Mon, Oct 28, 2013 at 11:01 PM, sukiari notifications@github.com wrote:

Closed #67 https://github.com/urbit/urbit/issues/67.

— Reply to this email directly or view it on GitHubhttps://github.com/urbit/urbit/issues/67 .

cgyarvin commented 11 years ago

Could Hoon, at some point, apply Postel's Law? That is, parse and sync Hoon code so that niceties like copy-pasting long integers get transformed accordingly by the time they show up on deck?

I've been deeply tempted to fulfil the "APL for nouns" premise of Hoon and map the runes to Unicode points. It would be easy to give into this temptation if there were a hoonfmt sitting between my weird ideas and shareable code...

cheers, -Sam.

On Tue, Oct 29, 2013 at 10:29 AM, Curtis Yarvin curtis.yarvin@gmail.comwrote:

I myself am bitten by this one regularly - so a case could be made for relaxing the linguistic sphincter and allowing 4 and even 5 decimal places without the separator.

But it also serves as a nice reminder that we're not on Earth (though we could be in Germany, I guess). Note that all our atom syntaces are URL-safe, which is why the dot and not the comma. And it is very nice to enforce on longer decimals, which are just unreadable without a separator.

On Mon, Oct 28, 2013 at 11:01 PM, sukiari notifications@github.comwrote:

Closed #67 https://github.com/urbit/urbit/issues/67.

— Reply to this email directly or view it on GitHubhttps://github.com/urbit/urbit/issues/67 .

-- You received this message because you are subscribed to the Google Groups "urbit" group. To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+unsubscribe@googlegroups.com. To post to this group, send email to urbit-dev@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

cgyarvin commented 11 years ago

I am very hesitant to get into the Go thing of actually modifying the sourcecode. Certainly not for something this trivial. And we can't do gofmt because formatting Hoon is really AI-complete.

Postel's Law works very poorly, I think, for programming languages. Lenient parsing is generally a mistake - witness HTML fixer-uppers, JS optional semicolons, etc.

As for funky Unicode codepoints, I want to use them for things like output symbols where you don't need to enter them from the keyboard. Displaying Unicode is not the hard part - typing it is. But when it comes to error messages, etc, astrology symbols and the like are teh bomb.

On Tue, Oct 29, 2013 at 11:12 AM, Sam Putman atmanistan@gmail.com wrote:

Could Hoon, at some point, apply Postel's Law? That is, parse and sync Hoon code so that niceties like copy-pasting long integers get transformed accordingly by the time they show up on deck?

I've been deeply tempted to fulfil the "APL for nouns" premise of Hoon and map the runes to Unicode points. It would be easy to give into this temptation if there were a hoonfmt sitting between my weird ideas and shareable code...

cheers, -Sam.

On Tue, Oct 29, 2013 at 10:29 AM, Curtis Yarvin curtis.yarvin@gmail.comwrote:

I myself am bitten by this one regularly - so a case could be made for relaxing the linguistic sphincter and allowing 4 and even 5 decimal places without the separator.

But it also serves as a nice reminder that we're not on Earth (though we could be in Germany, I guess). Note that all our atom syntaces are URL-safe, which is why the dot and not the comma. And it is very nice to enforce on longer decimals, which are just unreadable without a separator.

On Mon, Oct 28, 2013 at 11:01 PM, sukiari notifications@github.comwrote:

Closed #67 https://github.com/urbit/urbit/issues/67.

— Reply to this email directly or view it on GitHubhttps://github.com/urbit/urbit/issues/67 .

-- You received this message because you are subscribed to the Google Groups "urbit" group. To unsubscribe from this group and stop receiving emails from it, send an email to urbit-dev+unsubscribe@googlegroups.com. To post to this group, send email to urbit-dev@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

adavies42 commented 11 years ago

Postel's Law works very poorly, I think, for programming languages.

IMAO you can leave out the last three words. See e.g. this XSS Filter Evasion Cheat Sheet, better described as “100 ways Postel gets your website hacked”. I keep hoping someone will write a definitive “Postel’s Law Considered Harmful”, but so far no joy.