HNHacker News
TopNewBestAskShowJobs

kasbah

3,337 karma · joined May 8, 2011

Electronic engineer and software developer.

https://kaspar.systems

github.com/kasbah

hn@kaspar.systems ---

submissionscomments
kasbah··on F-Droid 1.0 released
Yes, I believe so. I use that to get auto-updates of f-droid apps
kasbah··on Ohm: Parsing Made Easy
I have been using Nearley.js [1] and have had a lot of fun using it. I actually quite liked being able to mix in the JS post-processing with the grammar definition in Nearley but could be convinced of the advantages of keeping the separate (checking out your paper on DSLs now).

How would you compare it to Nearley? Can Ohm handle ambiguous grammars?

[1]: http://nearley.js.org

kasbah··on Clojure/Conj 2017 – Opening Keynote by Rich Hickey [video]
I submitted this link before I had watched the whole thing. As someone who has only dabbled in Clojure I think there are a lot of interesting ideas in there but found the type-system bashing pretty off-putting.

I am now watching his "Simple Made Easy" talk [1] after I have heard it recommended on a few functional programming related podcasts. Again really interesting stuff but I encountered another cheap shot at typed functional programming ("You can't use monads for that! Hurr hurr hurr").

Given how well received these talks seem to be by people that enjoy programming with advanced type systems I would have have really expected a more balanced discussion and some acknowledgement of the trade-offs between dynamic and statically typed functional programming.

[1]: https://www.infoq.com/presentations/Simple-Made-Easy

kasbah··on A Quick Introduction to Graphviz
I agree with most of the issues the sibling commenter mentions though I haven't encountered all of them. It's a declarative language that has adopted a C/ALGOL style syntax. I find the way properties and declarations mutate and propagate quite unintuitive and I hate the boilerplate.

I haven't thought about it enough but I am a big fan of Elm's declarative graphics [1]. I think starting with something like that would be interesting.

    n1 = circle "node 1"
    n2 = square "node 2" |> outlined red
    main = graph [edge n1 n2, edge n2 n1]
[1]: https://csmith111.gitbooks.io/functional-reactive-programmin...
kasbah··on A Quick Introduction to Graphviz
I love Graphviz and use it a lot but can't help but think every time: there must be a better way to describe directed graphs. Does anyone know of any alternative DSLs that try to solve the same problem in a radically different way?
kasbah··on Duck Duck Go: Illusion of Privacy (2013)
I think YaCy didn't give me very good results last I tried it. It's not a fair comparison, as it has been a few years for sure, but if I had to guess then I would say that Searx, being just a search engine aggregator (it doesn't do crawling), gives better results.
kasbah··on Duck Duck Go: Illusion of Privacy (2013)
Recently I have been using the free and open source Searx more and more (admittedly mostly using the !searx shortcut from DDG). Results seem better than DDG sometimes. Would be interesting to try and host my own instance or write something that picks a random public instance.

https://asciimoo.github.io/searx/

kasbah··on Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
Seems like most of the parsing is done by JSDOM in this tutorial.
kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
It appears equality checks for objects is not supported i.e.:

    Immutable({a: 1}) !== Immutable({a: 1})
There is no built in equality function either [1] so that seems like that's a big advantage Immutable.js has over this. Maybe seamless-immutable-diff [2] could be a way to do it but I am not sure on the performance.

[1]: https://github.com/rtfeldman/seamless-immutable/issues/186 [2]: https://www.npmjs.com/package/seamless-immutable-diff

kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
You don't appear to be actually responding to my question but are giving unsolicited advice and plugging your projects :/
kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
So you would have your props be Immutable.js objects? I wasn't sure if doing that would be a good idea but sounds like that has worked out for you.
kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
Well if the onus is on the developer it kind of defeats the purpose no? As you likely know seemless-immutable also has a "production" mode that has better performance but doesn't ensure it. That seems like a good compromise to me, so that at least during development you get errors when things are being mutated.

The benchmarks in the Timm readme are interesting though. I would like to see a benchmark of seamless-immutable in production mode added to compare.

kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
Ah, wasn't aware. Good to know. Well, I never did get Immutable.js to play nicely with Flow which is kind of why I gave up on Flow.

I wondered if you might have something to say on performance issues. You didn't encounter anything of that sort?

kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
I have just started a React-Redux project using Immutable.js and am considering switching it over to this as I can see a lot of advantages in the compatibility with JS data. What downsides do you think I would encounter after switching?
kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
Not sure what you mean by primer but I prefer using immutable data structures because it eases programming in a functional style. I use Redux for server-side as well as front-end projects but using Redux without immutable data structures is a PITA because you have to constantly think about whether you are mutating things or not. I have been using immutable.js a lot but the difference from standard JS data types is kind of cumbersome and can become annoying so this project looks really neat. I am looking forward to giving it a try.
kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
seamless-immutable-diff and seamless-immutable-cursor look like neat add ons for this.

https://github.com/micnews/seamless-immutable-diff

https://github.com/MartinSnyder/seamless-immutable-cursor

kasbah··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
I believe it actually supports IE9+ but the tests are currently failing so they are marked red in the test array. I suspect that they are only failing for the development branch and everything works with IE9+ if you use the latest release.
kasbah··on The web, on this day 10 years ago
http://tenyearsago.io/news.ycombinator.com

>504 Gateway Time-out

>The server didn't respond in time.

kasbah··on Our Copyfish extension was stolen and adware-infested
Mozilla review every update. It means it take much longer to get releases out, sometimes months, but will avoid situations like this.
kasbah··on Ask HN: Heads up when patenting software product?
Don't!

https://www.gnu.org/philosophy/software-patents.html

kasbah··on Show HN: Kea – The power of Redux with the simplicity of MobX
Looks pretty neat. My initial reactions:

- I don't like the `@kea(...` because it's another bit of JS syntax I hadn't heard of before. Though I do like decorators in Python, I just feel like I have learned enough of JS syntax to be productive and they seem to keep adding unnecessary stuff.

- There is still duplication between the action names and the reducers. When using Redux I now always use these two functions:

    function makeReducer(reducerObject) {
      return (state, action) => {
        if (Object.keys(reducerObject).includes(action.type)) {
          return reducerObject[action.type](state, action.value)
        }
        return state
      }
    }
    
    function makeActions(reducerObject) {
      const actions = {}
      Object.keys(reducerObject).forEach(name => {
        actions[name] = value => {
          return {type: name, value}
        }
      })
      return actions
    }
So I can just declare a single object of reducers and can infer the action names and creators from that e.g.

   const reducerObject = {
      increment(state, value) {
         return state + 1
      },
      decrement(state, value) {
         return state - 1
      }
   }
 
   const reducer = makeReducer(reducerObject)
   const actions = makeActions(reducerObject)
kasbah··on OpenMoko: 10 Years After
The problem is these would be gonkai phones (see link). Within the western legal framework of "intellectual property" you can't open source what you don't own. The impedance miss-match between the two working methodologies makes any conversion a lot of work, e.g. the Fernvale effort to make a open hardware _dumb_ phone platform: https://www.bunniestudios.com/blog/?p=4297
kasbah··on Colorls – A Ruby script that beautifies the terminal's ls command
I agree with you. I set my $PS1 to just show the folder and the exit status of the previous command. I set the dirtrim to 2 so it looks something like this in action:

     0[~/.../a/folder]$ false
     1[~/.../a/folder]$
In my .bashrc:

    PROMPT_DIRTRIM=2
    PS1='\[\e]2;[\W]\$\a\]$(printf "%d" $?)[\w]\$ '
kasbah··on How I Took an API Side Project to 250M Daily Requests
That was my experience with freegeoip.net actually, which is why I host my own instance of it.
kasbah··on How I Took an API Side Project to 250M Daily Requests
Does anyone know how ipinfo compares to running your own instance of https://freegeoip.net?
kasbah··on Deconstructing the Google Analytics tracking script
Yes, and it's available on https://sandstorm.io so you don't have to host it yourself either.

I actually much prefer the Piwik interface, I don't need to dig through masses of menu options to find the data I actually care about. Not helping the Google panopticon is a bonus.

kasbah··on Snake in Elm with WebGL
Sorry, but there is nothing more explicit about using lambdas as you have done, it's simply redundant (notice the repetition of sublist and num arguments).
kasbah··on Ask HN: Why TensorFlow instead of Theano for deep learning?
I am kind of new to all of this but as far as I understood you can use Keras with TensorFlow as well.
kasbah··on Node v8.0.0 Released
Hm? It's not an external dependency. Superagent returns a promise.
kasbah··on Node v8.0.0 Released
>request = util.promisify('superagent')

I don't think that's required. Superagent already returns promises.

← PreviousPage 7 of 13Next →