Live data from Hacker News

Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.

news.ycombinator.com

141–150 of 165 posts

Re: Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.

#141
post #102
post #82

Earlier quoted context omitted.

Java will happily let you fill a list or hash with objects that could be of any type yet it is generally the quintessential blub language.

No, it doesn't. Elements of a Java collection must all be of the same type. The elements may be implicitly coerced to a common supertype, but if you want to get the original types back you have to downcast--which is basically explicit dynamic typing.

You can always downcast in the presence of an instanceof case statement:

   ArrayList myList = new ArrayList(new Object[] { "foo", 42, new Bar() });
   for(Object elem : myList) {
      if(elem instanceof String) doStringThing((String) elem);
      else if(elem instanceof Number) doNumberThing((Number) elem);
      else if(elem instanceof Bar) doBarThing((Bar) elem);
      else doObjectThing(elem);
   }
Or you could keep elements as Objects until you needed to perform a specific operation on them, then cast at the site and perform the operation, letting the ClassCastException propagate if you're wrong. This is basically what Arc does.

Re: Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.

#142
post #7

♫♪♫ to my ears. I ♥ unicode! To ∞ and beyond, ☺

How do I make the infinity? Actually where do I get all those symbols?

Ok, so I see infinity is U+221E(http://www.fileformat.info/info/unicode/char/221e/index.htm), now how do I go from that to posting it on a forum like this?

Re: Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.

#143
post #59
post #8

So. A note to all the "unicode makes this unusable" people - Apparently, while you were complaining, someone else was solving.

OK. Now how about database access (with support for prepared statements), regular expressions, and networking?

There is a public git repo anyone can push to (the so-called git "wiki", or anarki). It contains regular expressions. You could wrap some DB bindings for mzscheme with relative ease.

Re: Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.

#146
post #59
post #8

So. A note to all the "unicode makes this unusable" people - Apparently, while you were complaining, someone else was solving.

OK. Now how about database access (with support for prepared statements), regular expressions, and networking?

I'd love to see regular expressions as s-expressions in arc - not pasted on as interpreted strings.

Actually I think I have seen a library for MzScheme that does it this way.

Re: Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.

#148
post #146
post #59

Earlier quoted context omitted.

OK. Now how about database access (with support for prepared statements), regular expressions, and networking?

I'd love to see regular expressions as s-expressions in arc - not pasted on as interpreted strings. Actually I think I have seen a library for MzScheme that does it this way.

Also curious how this would look
Post reply on HN