Advertisement
Guest User

Untitled

a guest
Oct 7th, 2013
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. (17:41) (!) benkay [~benkay@75-175-58-24.ptld.qwest.net-] has joined #urbit
  2. (17:43) < mod6> i can understand with return codes: i.e. 0 = no error, so its state is balanced = Return OK. or 1 = Error, the state was unbalanced = Return Non-Zero. But what about with conditionals or what no. Does While(0)
  3. { stuff; } or if(0) { // true stuff } else { // false stuff } seem strange and counter intuitive?
  4. (17:43) < mod6> s/no/not
  5. (17:44) < kakobrekla> i have seen error = -1
  6. (17:44) < racnul-haldec> it won't really be an issue if we have %true and %fals.
  7. (17:44) < mtp> i don't even know how to represent a while loop in urbit
  8. (17:44) < racnul-haldec> do we?
  9. (17:44) < mtp> we have .y and .n
  10. (17:44) < mod6> sure, kakobrekla; this is normal. -1 is non-zero, so error.
  11. (17:44) (!) mnemnion ~mnemnion@108-67-66-15.lightspeed.sntcca.sbcglobal.net has quit [Remote host closed the connection]
  12. (17:45) < mtp> > `@ud`.n
  13. (17:45) < mtp> 1
  14. (17:45) < racnul-haldec> that works
  15. (17:45) (!) rrradical ~rrradical@c-107-3-80-74.hsd1.ct.comcast.net has quit [Remote host closed the connection]
  16. (17:45) < mod6> i don't know how to loop in hoon at all, but just because i don't doesn't mean i wont have to test conditions at some point. which means that im asking for bugs because the convention is flipped.
  17. (17:46) < mtp> but the convention isn't flipped
  18. (17:46) < mtp> sh -c "true; echo $?"
  19. (17:46) (!) benkay ~benkay@75-175-58-24.ptld.qwest.net has quit [Ping timeout: 268 seconds]
  20. (17:47) < mod6> are you trying to tell me that inany other language that "while(0) { // will get you here? }"
  21. (17:47) < racnul-haldec> it's different from basically every other programming languange
  22. (17:47) < mtp> except for shell
  23. (17:47) < mod6> but ask yourself "why did we make this different?" did you make it different for troll sake or just because it makes more sense?
  24. (17:47) < mtp> mod6' no, i'm trying to tell you that /your/ convention is flipped, not hoon's
  25. (17:48) < mod6> so what you're saying is that every other way that anyone has ever done anything is wrong. and this is actually correct?
  26. (17:48) < racnul-haldec> well the shell is written in C, and 0 is false in C, so... there?
  27. (17:48) < mtp> and i didn't make it different, so your premise is invalid, therefore monkeys and bananas
  28. (17:48) < mtp> racnul-haldec' 0 is true if you're comparing strings
  29. (17:48) < mtp> :)
  30. (17:48) < mtp> also vere is written in c, therefore,
  31. (17:48) < racnul-haldec> touche
  32. (17:48) < mtp> mod6' no, but further words on my part will just confuse you
  33. (17:49) < mod6> hhah apparently.
  34. (17:49) < mod6> im not smart enough for this.
  35. (17:50) < mtp> try learning it
  36. (17:50) < mod6> lol i am!
  37. (17:50) < mtp> i started with learning how to pronounce the symbols
  38. (17:50) < mod6> and im like O_O wtf?!
  39. (17:51) < mtp> other suggestions i've heard: try writing an adder; try running the code; try reading the kernel
  40. (17:51) < mod6> if im having a hard time making heads or tails of the mnumonics, i was hoping to rely on some sort of math based convention to get me past the symbolic wackyness
  41. (17:51) < mod6> mtp: ok. learn by doing on this one then huh.
  42. (17:52) < mtp> you said it, not me
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement