HNHacker News
TopNewBestAskShowJobs

grogs

79 karma · joined March 28, 2010

Scala developer in London

http://gregd.me

[ my public key: https://keybase.io/grogs; my proof: https://keybase.io/grogs/sigs/hlxfkKYLz7Lr8RKBGHsGaqpnugofrm61MpDRddt6LAY ]

submissionscomments
grogs··on New language features since Java 8 to 17
Scala 3 somewhat simplies implicits by the way. Especially w.r.t to extension methods, which are now a first class construct in the language: https://docs.scala-lang.org/scala3/reference/contextual/exte...
grogs··on Mill: Better Scala Builds
Kotlin is a better Java, or simpler Scala. Simpler can be better for plenty of teams, especially for those coming from Java. But I'll not be switching any time soon.
grogs··on Can You Afford It? Real-World Web Performance Budgets
Sounds like PJAX.
grogs··on Scala.JS 0.6.17 released
https://github.com/vmunier/play-with-scalajs-example
grogs··on How Do You Measure Leadership?
Sidenote: Mindfulness (AKA vipassana or insight) meditation can give you that gap between feeling something, an emotion in this case, and responding to it. It's potentially useful for a lot of usecases - the NHS have been offering mindfulness-based cognitive therapy for a while now - but what you're talking about sounds very relevant!
grogs··on Run Unix processes inside your browser
Can I use this to run Scala Native apps in the browser? Making Scala.js redundant. :P
grogs··on Open Source PaaS Built on Docker
Also deis and flynn. http://deis.io/ https://flynn.io/

There's quite a few options in this area. I've recently started using dokku for personal projects. My current plan is to migrate to deis in future if/when I want multiple nodes.

grogs··on Dotty: a next generation compiler for Scala
Which is what Dotty is attempting to do, but hopefully with minimal codebase breakage.

There's a tradeoff between breakage and improvement, but I'd like not to wait 10 years before I can use dotty (like python 2 to python 3). We can always have another dotty in 5 years time for another round of rationalisation/simplification.

grogs··on Ask HN: Relationship between OO and functional programming?
I think Scala is doing a decent job at bringing these concepts together. Scala ticks all the OOP points you made - even more than Java does (Java has special primitives for int/booleans etc, in Scala that's more hidden, really everything in an object). FP also likes Encapsulation as you decided it - pure functions, that don't do side effects (even logging) without it being explicit in the type signature.

FP can model relationships/interactions OK. They just have new tools/techniques to do it. For example, instead of mutating things, you create a copy with the change. You then push the actual state/mutation to the edges of your system (e.g. the database), and thus hopefully make it easier to reason about. But it can be slower or hard to change things deep in an object graph. For slowness - we have persistent collections which re-use unchanged parts of the collection and implement performant "copying". For deep structures, Haskell & Scala have lenses.

It's still an ongoing exploration, with people borrowing/discovering new techniques, but I think it's working quite well and I'm happy to keep exploring.

In the other direction, I've been following Rust. I find it very interesting that it's got a very good type system, but still has mutation. Instead of avoiding mutation, they track ownership in the type system, and thus keep it easier to reason about. By doing this, they make the the performance/memory management easier to reason about, without making it too hard to reason about where effects are happening.

grogs··on Scala Native
Yep, or drop the dependency. E.g. For joda specifically, you should probably move to Java 8 date API, which is more likely to be ported.

Bare in mind that scalajs has the same issue and a lot of work has already been done!

grogs··on Scala Native
When did you try it out? What didn't you like?

I ported a site written in vanilla Javascript. I decided to faithfully port it without any changes before introducing scala specific libraries. That was pretty painful. A bunch of manual casting for UndefOr and js.Function.

Since then I've started using some of the scalajs libraries/frameworks straight away on projects. It has been a much more pleasant experience!

grogs··on Scala Native
I believe that works against jvm bytecode, which you don't get for scalajs. Instead the compiler has a JS specific intermediate representation which the optimizations occur on.
grogs··on Scala Native
Your correct that it probably doesn't use scala.reflect, but it still uses reflection.

Jackson works using reflection. Play JSON therefore at least depends on reflection transatively.

grogs··on How we (kind of but not really) DoS-ed ourselves
The comments on MongoDB JIRA ticket pretty much sum it up. A hard arbitrary limit sucks. They say the real limit would be RAM, maybe they should change to that. If there's a threshold which will impact performance, then just warn..
grogs··on Show HN: Domcomp, a price comparison site for domain registrars
1&1 are just as bad as GoDaddy, in that they advertise $1.99 domains... Where you have to buy for 2 years and the second year price is much higher.

I take your point though, I should add them anyway, even if they're not the cheapest.

Are there any other providers that you think are worth adding?

grogs··on Show HN: Domcomp, a price comparison site for domain registrars
It's automated. With around 500 TLDs and 7 providers, manually maintaining it would be a nightmare.
grogs··on Show HN: Domcomp, a price comparison site for domain registrars
If you've ever bought a domain then you'll know that there are a number of providers, each with their own prices and pricing structures. I was surprised to find there isn't a price comparison website for domains, so I built one.

Hopefully it's something that would be useful to people on HN. Whilst building it, I realised I could have saved $20 on the .io domain I bought recently.

Any feedback would be much appreciated. The immediate plan is to show the prices for domain renew and transfer.

grogs··on Microsoft on GitHub
IntelliJ (by JetBrains, the company behind Resharper) has similar functionality, for all the VCSs it supports. Very nice feature!
grogs··on Practical Tmux
Odd, I'm doing that daily at work without any issue. (tmux 1.8.x, putty, screen-256colors I believe)
grogs··on Ask HN: Idea Sunday
Takipi may be of interest. It's only for JVM languages though - I'm not sure if equivalents exist for other languages.

Otherwise, look at building (or find existing) tooling on top of Log stash.

grogs··on Scaling Scala vs Java
Try gradle. It's written in groovy, but surprisingly nice to use with Scala & Java.
grogs··on A list of queueing libraries
IBM WebSphere MQ
grogs··on Coming Out as a Porn Addict
Women often consume different erotica, which is less video/hardcore based. Romance/erotic romance novels seems to be a growing market.

I do think more women avoid porn/erotica due to this 'disgust' towards porn in society.

Any remaining gap, I would assume is genuinely due to women having a lower libido.

grogs··on AngularJS Learning Resources
Install Batarang for debugging scope issues. Don't be afraid of looking at the source, it's a great way to learn. Write some directives and then look at the ones provided by angular - and realise they're not cryptic.
grogs··on HTML5 localStorage allows sites to fill up users' hard disks
Limit the total local storage space at a browser level. E.g. 1GB. Just like you might limit the total size of temporary internet files/cache.

Beyond that, just provide a good (simple) UI for deleting stuff. Which could suggest candidates for deletion based on heuristics like you suggest. E.g. iframes shouldn't need so much. Hopefully less visited sites would be suggested for deletion too.

grogs··on [dead]
It was only announced this month that spotify would add Metallica's back catalogue. They hardly have a complete library of music.
grogs··on Ask HN: What unknown technical blogs or sites do you read?
Planet Scala: http://www.planetscala.com/
grogs··on Thinking the unthinkable
And copying characters as they appear on your monitor probably isn't a great idea. You want to see the flow, fonts generally are not cursive, and the letter aren't really how you'd want to write them (less loops and too many serifs). The 'a' in pretty much every font looks completely different to the 'a' I was taught to write.

It's gonna be super weird when we get a generation which has terrible handwriting - it'll probably be soon.

grogs··on Leaving Microsoft
I think idiomatic Scala code should be FP. And although you can just quite Java-esque code in a slightly more concise way in Scala; I do think that people are starting to see that Scala is more than that - it introduces new ideas and idioms.
grogs··on The UK Court Sanctions Apple, Hopes "Lack of Integrity" Is Not "Typical"
Groupthink.
Page 1 of 3Next →