HNHacker News
TopNewBestAskShowJobs

jkcxn

136 karma · joined May 22, 2013

jake.coxon@gmail.com
submissionscomments
jkcxn··on LinearMouse – A minimal app to get rid of scrolling acceleration on macOS
Were you using firefox by any chance? I get this on firefox after switching from chrome and its so annoying. no idea how to turn it off. every other scrollview in osx works fine but mozilla must have made changes to it
jkcxn··on Why I don't like Tailwind CSS
If you do it that way you have to give a name to everything. Imagine writing javascript but every expression has to have a name, its all globally scoped, and one expression cannot refer to another one by name. There's a lot of utility in not having to name everything
jkcxn··on Nuklear: A cross-platform GUI library in C
Not a serious attempt but I prototyped a single header library for macos and will attempt to make it work on windows too

example: https://pbs.twimg.com/media/EuQ-6vzXUAca_Ph?format=jpg&name=... (ignore the fact the UI goes from bottom to top, that will be fixed)

A cross platform gui library needs to have consistent layout across all platforms so it has uses basic flexbox layout algorithm instead of the native macos constraint system, I think this turns out better anyway because flexbox is a lot simpler in my mind. It decouples the layout algorithm from the UI code so you don't need to rerun your whole UI whenever the window changes size. It uses pure c++ native calls instead of objective-c which is kind of crazy but the library user never needs to interact with it

jkcxn··on SwiftGraphQL – A GraphQL client that lets you forget about GraphQL
> replace the dynamic properties of the more advanced REST-ful techniques (API discovery, link following, etc) in GraphQL

Isn't this exactly what GraphQL does? I may be missing something

jkcxn··on Github1s – One second to read GitHub code with VS Code
That's official, you're thinking of https://rawgit.com/
jkcxn··on Ask HN: What Lived Up to the Hype?
Have you heard they've returned to do another season?

https://news.sky.com/story/dexter-one-of-tvs-best-known-seri...

jkcxn··on The Import on Interaction Pattern
> Rather than eagerly loading the react-scroll dependency for this, they load it on interaction with the button, saving ~7KB:

My apologies for being negative but isn't it crazy it takes 7KB to scroll to the top of the page?

jkcxn··on The Vale Programming Language
Not to mention keywords such as ret, inl, imm, mut, mat and even yon - 'readable' is certainly subjective. Not to dissuade anybody from trying anything outside the norm but I wonder if calling it readable is accurate.
jkcxn··on Taking screenshots isn't allowed by the app after upgrading to Android 11
Are third party programs allowed to save screenshots unbeknown to the user in the first place??
jkcxn··on On Redis master-slave terminology (2018)
I agree with you but they seem to be changing the default 'master' in github because of this. https://twitter.com/natfriedman/status/1271253144442253312
jkcxn··on The use of `class` for things that should be simple free functions
I'm new to C++, what are lines 11-12 for? I see that it doesn't compile without it. It doesn't seem to be the new 'arrow return type' syntax because there's no auto keyword.

Edit: I found it - it's a 'template deduction guide' https://stackoverflow.com/questions/40951697/what-are-templa...

jkcxn··on Using VueJS Alongside Django
I totally agree. Full page rendered app are way easier to code. It's like an immutable function - request in, transform, html out. I think as soon as you want to add some niceties with React you end up setting up a load of front end stuff. You suddenly need APIs, create-react-app, webpack, babel, build scripts, redux, routing etc. And you also end up losing out on some of the Django side, forms+validation, templating, views, urls. And often you end up having business spilling over to your front end.

I'm working on a project that lets you build your Django app like you normally would with templates and views but you get a React app and all the benefits of a single page app. You don't need to write any APIs or use redux etc. It will have a bunch of components built in and if you don't need any more then you don't even need to build the javascript yourself, you just include the already built file. At the moment I have a sort of Django Admin equivalent example working and I'm looking for some feedback. If you or anyone else has any ideas about it I would love to hear, feel free to PM me (email in profile).

jkcxn··on John Carmack:“freedom to have your own style” in languages is counterproductive
> If conditional codepaths depending on whitespace/indentation makes diffs very hard to read

Wouldn’t this be the case in other languages too? Especially if you’re using an auto formatter

jkcxn··on Verb-Noun vs. Noun-Verb
There's no reason you couldn't type `noun.` and get autocomplete to `verb(noun)`
jkcxn··on The Lobster Programming Language
This looks really fun: https://github.com/aardappel/lobster/blob/master/lobster/sam...

Are the generators implemented entirely in user space using continuation passing style? And the coroutine function turns it into something pausable?

Edit: I can't wrap my head around how return returns out of all the generators

jkcxn··on Graceful Shutdown
Kotlin is doing something like this with coroutine cancellation. Not quite the same because the cancelation requires cooperation but I reckon you could add a timeout and get the composability that the article talks about

https://kotlinlang.org/docs/reference/coroutines/cancellatio...

jkcxn··on Show HN: How to write a recursive descent parser
Maybe a stupid question because I don't know much clojure but I'm curious. How can you be sure that -> is threading macro and my-object is what you think it is at compile time? Can't macros change the entire meaning of an expression?
jkcxn··on 3D Comics
Maybe you'd be interested in this experiment I did with straight lines a while ago. I project 3d points onto 2d and make lines out of rotated divs. But I don't use css 3d rotation because I want to keep the fixed width of the lines themselves.

There isn't proper occlusion but I fake it by applying a different style to edges that are facing away from the camera. You could also do like the OP and draw white polygons in the space between lines.

Have a look here https://jsfiddle.net/cyt0o7m9/

jkcxn··on Java Without If
Here is something similar I did in JS

https://gist.github.com/JakeCoxon/d78fa1debc13e46ae54a

jkcxn··on Why I No Longer Use MVC Frameworks
Yeah even _.extend
jkcxn··on The origin of zero-based array indexing
Imagine if we used different symbols for counting and indexing. I think Roman numerals would be good to use for indexing.

  arr[I + 0] = arr[I]
  arr[II + 3] = arr[V]
  arr[I - 10] = undefined
← PreviousPage 2 of 2