HNHacker News
TopNewBestAskShowJobs

yogsototh

2,489 karma · joined June 7, 2010

- https://yannesposito.com - https://her.esy.fun
submissionscomments
yogsototh··on Programming Algorithms: A Crash Course in Lisp
I earn money for working in Clojure. And I feel it provide a huge advantage.

I do Haskell in my spare time too. Once you’re used to FP, going back to imperative languages feel like a terrible regression.

yogsototh··on Quiet Hacker News (2017)
My current cure to news binge is to use RSS inside emacs with elfeed[1]. Emacs has the great advantage to be quiet by nature. I use spacemacs[2] more precisely. So in the morning I simply type `SPC a f` then `g r`. That's it.

And very important I use HN feed filtered by number of points (thanks to hnrss.org): https://hnrss.org/newest?points=500

[1]: https://github.com/skeeto/elfeed [2]: http://spacemacs.org

yogsototh··on Tolkien was right: Scholars conclude Beowulf likely the work of single author
It was already known that a simple Markov Chain was used to detect another author had written a chapter inside a book. It was in 2003 I think, unfortunately I cannot find a reference about this. Just to tell that Markov chains are a very basic and old ML method quite efficient for this kind of task.
yogsototh··on How Inefficient Can a Sort Algorithm Be? (2012) [pdf]
relevant:

https://byorgey.wordpress.com/2019/02/16/worstsort/

yogsototh··on Ask HN: What made you change your mind about a programming language/paradigm?
In Haskell there is a ghc flag to defer type errors.

https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_gui...

yogsototh··on Securing your users' authentication
That was exactly what Persona was for. It was marvelous to use. It's a shame that project hasn't gained sufficient traction and closed.

https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Per...

yogsototh··on Telegram: 200M Monthly Active Users
After the slack irc apocalypse, we switched to matrix.org and riot with my friends. I must say, I'm really impressed by the quality of the product.

Regarding its popularity I would have expected a lower quality product. In fact the UX and the UI are superior to slack.

Furthermore while not needed, it was _very_ easy to host my own matrix server and to use bridges to access my preferred IRC channels. So my server keep track of the messages written when I'm not logged in.

Really its just great and I recommend everyone to give it a try.

yogsototh··on Cleaver – 30-second slideshows for hackers
Shameless plug. I made a very similar tool a few time ago:

https://github.com/yogsototh/mkdocs

Mostly a very minimal script which use pandoc. From markdown generate presentations (html with reveal.js/pdf with beamer) and documents (html/pdf).

yogsototh··on Ask HN: Who is hiring? (October 2016)
ThreatGRID/Cisco | US / France | Full Time REMOTE

Available Positions

Senior Clojure Developer

Role

Design and implement RESTish API services Develop a multi-product data exchange platform Support other teams integration with that platform Requirements

- Experience with Clojure, Ruby and other JVM languages - Experience designing domain-driven data models - Experience with large scale data processing systems - Experience with ElasticSearch - Experience with CQRS/ES is a plus - Experience with Kafka, Onyx or Storm is a plus

UI Developer

Role

Implement UI for large-scale data exchange and presentation system Support other teams' UI efforts when integrating with our platform Build tools and document patterns for others to use

Requirements:

- Extensive experience with multiple JS UI frameworks - Strong web security experience - Experience with React and Om is a plus - Experience with Ruby and Clojure is a plus

I'm part of the hiring company, and I really enjoy it!

More informations and main contact here:

https://gist.github.com/yogsototh/07eff4d49b00d7505bfea87e4b...

yogsototh··on Marp: Markdown Presentation Writer
Another shameless plug: I use this. Thanks pandoc.

https://github.com/yogsototh/mkdocs

It generates presentations from markdown with reveal.js and beamer. It also generates documents both HTML and PDF.

yogsototh··on Ask HN: Who is hiring? (February 2016)
Vigiglobe | Sophia Antipolis, France (in the French Riviera, near Nice). ON SITE or REMOTE.

Real time social media analytics. Mostly we need a full stack Clojure/Clojurescript engineer.

The existing code is mostly Clojure, there is also some bit of Haskell.

More informations here: https://www.vigiglobe.com/jobs/

jobs@vigiglobe.com

yogsototh··on Criticisms of Angular
We use reagent with success. We still have some legacy code in Angular. Each time we need to change something in that old code, it reminds us how Angular has done a lot of things wrong.

We often qualify Angular as the J2EE of the front.

yogsototh··on Ask HN: Why learn non-JS languages/framework?
Each framework, programming language can learn you something new. Many framework/languages feel very similar.

If you really want your mind to learn something you can get back to your JS code, you should try to use a functional language:

- Clojure (I recommand compojure-api for the server and reagent in clojure script for the frontend)

If you really want to blow your mind:

- Haskell (scotty if you want to start small, Yesod if you want all batteries included) for the back and Elm (for the frontend)

It will make your code cleaner in the end, and you'll start to focus on the important stuff instead of just the syntax.

yogsototh··on Optimize for readability first. What slows down developers when reading code
For the syntax, this article might help you:

http://blog.ezyang.com/2011/11/how-to-read-haskell/

I personally continue to find many Haskell library code hard to read. But if you make some effort you own code can be quite readable.

Unfortunately I don't know if there is any guideline to make your Haskell code more readable.

For example, I'll be glad to get some advices regarding the following questions:

- When to use type synonyms/data/records/tuples/lists for containers?

- How to name your variables, type variables?

- When to split your code between a long one-line or many small named functions?

- When to split your code in many different modules?

- etc...

yogsototh··on Why Python is Slow: Looking Under the Hood
The type system enforce some kind of usage.

    myObject[ someFunction() ] = 1;
No compiler in the world would be able to detect if myObject.field should exists or not.

In a (good) type system oriented language, you have to declare that myObject is a Map, and therefore when you want to access "field" you know this access could be "Nothing". The type system alert you if you don't handle the "Nothing" value.

yogsototh··on Why Python is Slow: Looking Under the Hood
Static typing à la C,C++,Java,js,etc... is from my experience inferior to dynamic typing.

On the other hand, the Haskell typing is superior in many ways to dynamic typing. Because you lose very few power of expression but you gain a lot of time in your workflow (and also security).

Concrete example (I'll use js):

    function showField(data) {
       console.log(data.field1.filed2);
    }
you relaunch your application, you click on three to four elements, then you enter your name and a password. You click on the button, and "BAM, filed2 doesn't exists". Correct the typo or add a test and replay the game of executing your new code.

Static typing:

    showField : ConcreteData -> IO ()
    showField data = putStrLn $ filed2 (field1 data)
Try to compile, get the error: showField : filed2 doesn't exists, may be you mean "field2".

correct your code. Now you're done.

Here is another example:

Dynamic typing:

    function showField(data) {
      if (data.field) { console.log("OK"); } 
      else { console.log("Not OK")}
    }
    
    ...
    
    showField(myData);
Try it using all manipulations to reach the test case, then: ERROR, couldn't find field for null. :-| replace by if (data && data.field).

In static typing:

    showField data = if (field data) 
                        then putStrLn "OK"
                        else putStrLn "Not OK"
compile: could not match String with (Maybe String) at ... now:

    showField data 
      | field data == Nothing = putStrLn "Not OK"
      | otherwise = putStrLn "OK"
You fixed it, but you didn't had to lose your time searching the error.

The BIG bonus is that you detect the error before you discover it at runtime. Imagine you didn't detected the error during your test (even with unit tests). This is why it is so easy to push this kind of error in production in a dynamic typed language.

And I only scratched the surface.

I program mostly in JS now, and I love even more when I am doing Haskell.

yogsototh··on Why I am excited about Clojure
One of little secret of Clojure is that you almost never use Java based library. Because it forces you not to use idiomatic Clojure. So, most library you'll use in Clojure are in fact Clojure made. From this point of view of number of libraries, Haskell and Clojure are in fact at the same level.

I was sold in part by the JVM argument. But in reality, in practice, I found it to be more a burden than a delight. First, the stack trace errors. To deploy your application, it is not just a "copy your jar in Tomcat". You have to serve using Clojure. So in reality, you don't get all advantages provided by the JVM environment, only some.

Clojure is fast, but, Haskell is at least as fast as Clojure.

Up until here, I had all packages I needed. There are all here[1]. I made mostly Web oriented programming, but using MongoDB worked extremely well for example.

And the most important aspect (from my experience):

When your program growth, in Clojure the time you spend to add another feature growth rapidly (it is better in clojure than most other languages thought), but in Haskell, each new feature doesn't cost so much, even in a medium to big project.

So when you need to change something fast without breaking something (the without breaking something is the important part), nothing beat the Haskell type system (or may be Idris, but I didn't played with it enough).

Furthermore, the ability to minimize the number of bugs, gives me a good feeling about the quality of the libraries. Of course, Haskell is not magic, you still have to pay attention to bugs, to test your code. But Haskell helps a lot in not falling into dumb bugs.

[1]: http://hackage.haskell.org

yogsototh··on Why I am excited about Clojure
So the two languages have all their strength and weaknesses. I start with Haskell, and I try Clojure, time to time.

After working a while, I finally give a clear advantage to Haskell. Yes, Math people are chatty in Haskell, but you can do _a lot_ with very few Math.

In fact, with Haskell, the more your project growth, the more time you spend on interesting things. While in Clojure (and most dynamic languages), you'll lose your precious time with undetected syntax errors, and all standard unitype errors.

But for _very_ simple projects, Clojure is great in term of productivity.

So in general, I try to use the right tool for the right job.

- If you want to make a dirty thing, use a shell script or Perl. - If you want to make a prototype, Clojure is great. - If you want to make a project for production, then Haskell is the clear winner here (in term of bugs/efficiency/time).

One thing I get with Haskell I didn't got with Clojure is "code scalability". In Haskell, my code tend to be more reusable than in Clojure.

yogsototh··on Clojure web security is worse than you think
Apparently you don't know yesod[1].

[1] http://yesodweb.com

yogsototh··on Quick tip for developers who use OS X
OK, so for vim users with zsh:

bindkey -v

Now be happy, hit <ESC> and, use ^ and $ but also f<letter> t<letter> and also ,;.

You can copy/paste with dd, Y, etc...

yogsototh··on A Public Statement Regarding Ubiquitous Encryption on the XMPP Network
A simple comment to share Jitsi[1]. It uses XMPP but also many other protocols. It encrypt text/audio/video and even have a share and control screen feature.

I discovered it Friday. Our team will certainly use it as a secure replacement for Hangouts and Skype. My only complain is that it doesn't use my already existing gpg keys.

[1]: https://jitsi.org

yogsototh··on Shell script mistakes
The problem with file name is the main reason I use zsh.

    for fic in **/*(.); do
        doSomethingWith $fic
    done
will take way more time than using find, but will work even with files with stranges chars.
yogsototh··on Measuring the Haskell Gap [pdf]
I would be interested to see how jhc [1] compare to ghc. I am not sure Repa could be easily compiled with jhc thought.

[1]: http://repetae.net/computer/jhc/

yogsototh··on Why to use Twitter, Facebook and Google Plus share links and not buttons
I made a similar article recently. I provide a complete block which you could copy/paste on your website directly. It uses javascript to create the right link using the current url.

http://yannesposito.com/Scratch/en/blog/Social-link-the-righ...

yogsototh··on Jekyll 1.0 Released
Also, I can't resist but to mention hakyll[1]. I switched from nanoc to hakyll[2]. The two of them are great to use.

[1] - http://jaspervdj.be/hakyll/

[2] - http://yannesposito.com/Scratch/en/blog/Hakyll-setup/

yogsototh··on Why Lift is My Favorite Web Framework
Concerning the cabal dependencies problem. I didn't tested it yet, but I believe a sane solution should be to use stackage[1].

I know fpcomplete use stackage for their School of Haskell[2]. This way, there is never any package dependency problem. Which gives them the incredible ability to execute yesod application directly on their server from the code of an user changing the code in the browser. If you haven't did it yet, you should really try it.

Also, concerning the deployment, having a single statically linked binary is very similar to having a single jar file. And this is very easy to deploy using heroku for example.

You can ask me more detail if you want to know how I deploy my application but this is mostly very well documented in the wiki.

[1]: https://github.com/fpco/stackage [2]: https://www.fpcomplete.com/school

yogsototh··on School of Haskell Goes Beta
I don't think it will be too easy. For a taste, you could take a look at my "Haskell Fast & Hard" tutorial. If you signed for the beta you can get try it here:

https://haskell.fpcomplete.com/user/yogsototh/haskell-fast-h...

If you don't already have a beta account. You can try the original non interactive version here:

http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way...

I had the chance to be an alpha user of School of Haskell and I copied the tutorial to it. Clearly the interactivity provide a clear benefit.

Concerning the difficulty of my tutorial, it goes like this:

1 - very easy 2 - easy 3 - medium 4 - hard 5 - very hard 6 - annex is kind of brutal difficulty

And actually, there is at least five more level of difficulty if you want to "master" some advanced feature of Haskell.

But one thing that no tutorial is able to give, is the feeling of joy when writing Haskell. It is something you experience only when doing your firsts non trivial programs.

yogsototh··on A Very Unusual Camera That Emphasizes Time Over Space
It reminds me "One year in one image":

http://eirikso.com/2011/01/04/one-year-in-one-image/

yogsototh··on Web Design is 95% Typography
Also, no ligature :/

I have ligature on my website by using:

    text-rendering: optimizelegibility
 
with Computer Modern.

For many technical reason, typography on the web is hard. I had written my though about it here (there are images, this is why I simply don't copy/paste):

http://yannesposito.com/Scratch/en/blog/Typography-and-the-W...

yogsototh··on The Tim Cook memo: line by line
You mentioned the difference between big and small company.

When Apple had clearly stolen the look and feel of Delicious Library to make iBook. The author was a "small company". He even show some happiness that his work was used by Apple.

The point is, he couldn't have sued Apple. Simply because, actually, a small company could certainly not win over a big one. The big one will use a lot of money to keep the trial as long as possible while continue to steal your stuff. Even if won, it would have last too long to save your business. And you had lost a lot of energy. This remember me the medieval justice were the richer always win.

Actual patent system only give an advantage to big companies. What if big player start to sue small startups because they used the double-click, the swipe, a wood texture that looks like a library?

← PreviousPage 2 of 6Next →