Fork me on GitHub
#off-topic
<
2017-05-09
>
mobileink19:05:55

kooky: https://arstechnica.com/gadgets/2017/05/googles-fuchsia-smartphone-os-dumps-linux-has-a-wild-new-ui/ kinda anazing that people keep inventing new OSs. you'd think we would have that figgered out by now.

mobileink19:05:05

wonder why they didn't just use the HURD. 😉

akiroz19:05:51

because smart people enjoys reinventing the wheel? 😄

akiroz19:05:09

I guess it's always fun to play with new toys...... until your life depends on it 🙈

akiroz19:05:04

Still havent got time to play with their new Flutter mobile SDK that's based on Dart running on DartVM instead of Android's Java on Dalvik.....

akiroz19:05:28

and this new mobile SDK is suppose to work on both iOS and Android along with Fuchsia

mobileink19:05:43

flutter -> javascript?

mobileink19:05:01

or is there more to it?

mobileink19:05:00

anything there that clojurescript couldn't do?

akiroz19:05:11

@mobileink Dart is not JS, they are completely incompatable even though the v8 engine and DartVM teams share most devs and works similarly under the hood.

mobileink19:05:44

dart doesn't generate js?

akiroz19:05:19

Google tried pushing the DartVM into browsers before (Dartium browser), that kinda failed and now you can compile Dart to JS but they are just doing it for browser compatibility

akiroz19:05:41

Dart still mostly runs in its own VM

akiroz19:05:34

I've used Dart in production around a year ago and it has this JS FFI that kinda works but it's nowhere near Clojure-JS interop.... I ended up rewriting the whole code base in Clojure.

mobileink19:05:56

in the browser? seems like there are only 2 options: either the user installs a plugin (flash), or it all ends up as js (the machine code of the web). the former seems like a losing proposition.

akiroz19:05:19

but Flutter is a whole different beast.... the mobile OS seem to be running a DartVM directly just like Android's Dalvik

mobileink19:05:00

another compile target for clojure, i guess.

akiroz19:05:05

that's an option I guess.... if this thing ever takes off 😂

akiroz19:05:38

not sure how many people actually want to use this dart thing when it doesn't really work with any existing stuff..... then again, go worked so maybe this will too if google pushes hard enough

mobileink19:05:28

you mean Fuchsia is a whole 'nother beast? Flutter is an SDK according to the website, i guess that means a Dart SDK? As I understand it Dart is Just Another Language targeting js, originally, and now retargeted to Fuchsia.

qqq19:05:43

I just want a single language that lets me write web apps + native ios + native android apps.

qqq19:05:49

No, react-native is not the answer.

qqq19:05:03

I want: one runtime, one language, three 'system call apis'

mobileink19:05:12

that would be NetRexx. 😄

qqq19:05:48

I can't tell if it's a real language.

mobileink19:05:55

well except for the java bit, heh.

qqq19:05:00

It has good words, but why is there a picture of a king ?

mobileink19:05:23

Latin. Oedipus Rex.

akiroz19:05:39

I mean using Dart on Flutter VS Dart in the browser.

qqq19:05:41

Yeah, name a language after someone who killed their father and married their mother.

qqq19:05:31

web, ios, android are three platforms; I wonder why no one has taken the appraoch of "one language three apis"

mobileink19:05:33

no, that was an example. Rex means king, regnum, reign, etc.

qqq19:05:03

at the end of the day, I don't want to program vs the common parts of web, android, ios; I want to use all the apis of all three; and I want to do it from the comfort of clojure

qqq19:05:45

@mobileink : oh, so it's not named after Oedipus, the "Net Rexx" is meant to be "King of the Net" ?

qqq19:05:49

that makes a bit more sense

mobileink19:05:11

it was the first non-java language to target the jvm, believe it or not. Fabulous language, the inventor Cowlishaw is in Rich Hickey territory.

qqq20:05:05

I've never heard of this language.

qqq20:05:16

whitespace, brainfuck, and lolcode are probabaly better known

mobileink20:05:49

Rexx = REstructured eXtended eXecutor. Really! Invented at IBM back in the 80s.

qqq20:05:39

looking at the sample code, it slooks very imperative

qqq20:05:46

What innovations are there in the language?

mobileink20:05:16

yes, originally it was entirely imperative. NetRexx (like ObjectRexx) was of course adapted to OO.

mobileink20:05:09

It was designed as a language for humans, and is by a good margin the best I've ever seen on that count.

mobileink20:05:17

take a look at the "parse" examples at https://en.m.wikipedia.org/wiki/Rexx

akiroz20:05:20

reminds me of perl which is designed by a linguist

mobileink20:05:16

whoa, just the opposite of perl! Rexx was designed to be easy to read and write, and Cowlishaw was an IBM Fellow back when that was a big deal.

firstlast20:05:50

Ask HN: Who’s using Clojure, and to do what? https://news.ycombinator.com/item?id=14302762

akiroz20:05:57

I know perl is atroscious for being "write-only" but its flexible syntax actually allows you to craft perl code that reads like english...

mobileink20:05:40

as an example see the "strip" function at http://www.rexxinfo.org/html/functions.html and ask yourself why Clojure does not have such wonderfull stuff.

john20:05:58

Seems like a clj targeting wasm is some kind of inevitability, eventually, right? Even if fuschia wins out in the future and dart grows, wasm is likely to be performant there. It seems like most future languages will just target wasm in the future.

akiroz20:05:02

clojure.string/trim ? only works with whitespace though...

mobileink20:05:24

@akiroz rexx/strip also gives you the choice or leading, trailing, or both. a wonderful thing for people who just want to do that without dealing with algorithms. programming with a human face.

john20:05:02

Seems like that would be extremely trivial to implement in clojure though

mobileink20:05:34

clojure's string support is a little depressing, considering what a huge bang you gwt for your buck with noobs.

akiroz20:05:52

@mobileink trim = both triml = leading trimr = trailing 😉

akiroz20:05:31

but yeah, definitly not as easy as just throwing regexes at the problem like perl

mobileink20:05:33

of course it's trivial in clojure, but that's the point. if it's,so easy, why do i have to bother?

john20:05:08

right, I get you. It's allegedly a more human interface by default.

mobileink20:05:29

yes, definitely a matter of api aesthetics. RH is a minimalist, except when he's not. Threading macros?

john20:05:04

It's about high leverage idioms

john20:05:22

threading macros have high leverage

mobileink20:05:28

considering how common string ops are, it's mildly shocking to discover that clojure largely ignores them, while going to great lengths to sugar more complex stuff.

mobileink20:05:04

low hanging fruit.

john20:05:21

You could argue: Clojure doesn't solve trivial problems, it makes solving trivial problems trivial

jr20:05:05

ever since reader conditionals there has been an effort to port string interop to clojure.string functions

mobileink20:05:42

but it solves lots of "trivial" problems. again, threading macros.

mobileink20:05:14

@jr yes, it's getting better.

john20:05:15

good point re: interop. string handling is sometimes host dependent.

akiroz20:05:59

I'm actually a big fan of the string interpolation macro..... 🙂

john20:05:02

for instance, I'd argue a threading macro is of more utility than a strip function.

mobileink20:05:58

icon is another language optimized for string handling. personally i'd like to see clojure take stringiness more seriously and learn from both rexx and icon.

mobileink20:05:31

depends on your use case. why should clojure not be the string manip. language par excellance?

mobileink20:05:25

if i need to strip strings the threading macros don't help much.

john20:05:22

If you need to build a string stripper, threading macros might help.

john20:05:58

I get you though. Awesome string facilities are nice to have.

akiroz20:05:19

Good string handling would definitly be a nice thing to have, I'm still using perl as my de-facto string manipulation language (but also partly because it's pre-installed in many places)

mobileink20:05:09

hmm. maybe time to propose some fns for clojure.string.

john20:05:13

lol didn't some cisco hardware run perl?

akiroz20:05:41

I know many router's web UIs are written in either bash or perl....

mobileink20:05:43

another point: awesome and easy string handling is the gateway drug.

mobileink20:05:25

make it real easy for noobs to do fun stuff with strings painlessly and you get a whole bunch of afficianados.

fellshard22:05:56

> "Optional" is everywhere > > Most of the API changes in Jigsaw use java.util.Optional for getter return values as a substitute for null-checking. Opinions of this feature vary widely, and general usage of it in this sort of context remains controversial. Several changes to this class which are intended to address outstanding issues have been introduced in Java 9, and are not yet considered battle tested best practices. > > Quotes: > "Of course, people will do what they want. But we did have a clear intention when adding this feature, and it was not to be a general purpose Maybe or Some type, as much as many people would have liked us to do so. Our intention was to provide a limited mechanism for library method return types where there needed to be a clear way to represent "no result", and using null for such was overwhelmingly likely to cause errors. > > "For example, you probably should never use it for something that returns an array of results, or a list of results; instead return an empty array or list. You should almost never use it as a field of something or a method parameter. > > "I think routinely using it as a return value for getters would definitely be over-use." - Brian Goetz in this post to StackOverflow This just kills me, after all that folks warned about making this class anemic for any scenarios by not picking a side or hiding it if it was 'only for streams'. And then they go and use it in one of the cases they most strongly decried? I swear, the OpenJDK mailing list is a laughing stock where advice or warnings from Java users goes to die.