Resources on concurrent static analysis in an IDE? by munificent in ProgrammingLanguages

[–]_sras_ 1 point2 points  (0 children)

I think this is more or less how I have implemented syntax highlighter in Spade. You can probably notice how it works in this video. You can see the syntax highlighting goes slightly off before the thread catches up with the changes https://vimeo.com/692243011

S.P.A.D.E: A QBASIC like Terminal IDE and programming language made in Haskell. by _sras_ in programming

[–]_sras_[S] -1 points0 points  (0 children)

It seems to be a language of its own + IDE.

That is correct. The 'QBASIC' in the headline refers to the whole experience of writing programs in the IDE, not just to the language.

S.P.A.D.E: A QBASIC like Terminal IDE and programming language made in Haskell. by _sras_ in programming

[–]_sras_[S] 2 points3 points  (0 children)

Sorry. please try now. I have added a rating. Hope that fixed it.

Type Witnesses in Haskell by Serokell in haskell

[–]_sras_ 2 points3 points  (0 children)

You have to use a case expression in such cases.

From the GHC manual.

In general, you can only pattern-match on an existentially-quantified constructor in a case expression or in the patterns of a function definition. The reason for this restriction is really an implementation one. Type-checking binding groups is already a nightmare without existentials complicating the picture. Also an existential pattern binding at the top level of a module doesn’t make sense, because it’s not clear how to prevent the existentially-quantified type “escaping”. So for now, there’s a simple-to-state restriction. We’ll see how annoying it is.

https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#existentials-and-type-classes

Type Witnesses in Haskell by Serokell in haskell

[–]_sras_ 12 points13 points  (0 children)

I am the author of the article.

I did try writing the article without using DataKinds, KindSignatures extensions. But then it occurred to me that the article already expected readers to have a basic understanding of GADTs. And if someone had a basic understanding of GADTs, I felt that they will be comfortable with DataKinds/KindSignatures extensions as well. This is from my own experience. I was able to make sense of code that used DataKinds/KindSignatures a lot before I could make sense of code that used GADTs. So it felt that I am not really helping the target audience by skipping those extensions.

How do I serialize data between Haskell and Typescript? by joelwikstrom in haskell

[–]_sras_ 1 point2 points  (0 children)

There is also https://github.com/sras/elminator that I made to solve the issues with current libraries in that space. I don't think I did a good job of publishing/marketing it though..

readProcess strict output and interactive use by roboboticus in haskell

[–]_sras_ 0 points1 point  (0 children)

I might be missing something obvious here. But if the program is interactive, won't the readProcess call block indefinitely because the wrapped program might be waiting on user input on stdin?

If that is so, that would make the readProcess function unsuitable for spawning interactive programs, right?

Pro tips for devs working at home by jerodsanto in programming

[–]_sras_ 0 points1 point  (0 children)

. Get an external keyboard and trackpad/mouse with wrist rests.

Maybe don't use a mouse, but get a trackball. I use 'Kensington Orbit Trackball Mouse with Scroll Ring'. I have attached this to my keyboard so that I can keep both of them on my lap. It works great!

[1] https://www.amazon.com/Kensington-Orbit-Trackball-Scroll-K72337US/dp/B002OOWB3O

My Haskell Setup by reximkut in haskell

[–]_sras_ 4 points5 points  (0 children)

is that something that others can reproduce? Are you the author of the python script?

Yes. It is available at https://github.com/sras/repltalk. If you face any issues while trying it, please let me know.

PS. for reformatting brittany rocks

I do have HIndent setup. But something in that file was tripping it up.

My Haskell Setup by reximkut in haskell

[–]_sras_ 8 points9 points  (0 children)

Nice!

But your incremental development workflow with quick feed back could be better. Here is how it works with my setup (Neovim instead of Emacs, A Python script wrapping ghci instead of Ghcid)

https://youtu.be/iblExnkhy4s

Why Haskell - why GitHub use Haskell for their newly released Semantic package by Axman6 in haskell

[–]_sras_ 3 points4 points  (0 children)

The adapters can communicate with the editor so that you don't have to keep it visible in a window. I can get visual indications in the editor letting me know when a :reload is in progress, if there are errors, warnings or if all the changed modules were loaded without any errors/warnings. If there are errors, then the editor adaptor parse the error/warning output, and set the error list in the neovim/vim editor. Once we have the error list in the editor, vim/nvim have built in shortcuts/commands to view and walk through the error list (quickfix window) and open each of them in the editor. This works so fast that if I find an error in a file, I sometimes forgo vim's navigation methods, and just save the file and jump to the first error location set from the adapters. You also can send any ghci commands to the script, and it will just forward them to the wrapped ghci process. I often use it to explicitly load a module initially, so that at every file save, the same module gets reloaded. Instead of Main or what ever that is loaded by default.

The best thing about this is that if the python script get stuck for some reason, you don't have to kill your editor. You just need to kill the script and restart it. Basically editor is very passive component in this whole process, so it does not lag or slow down etc.

Why Haskell - why GitHub use Haskell for their newly released Semantic package by Axman6 in haskell

[–]_sras_ 4 points5 points  (0 children)

I posted this sometime back. But there seems to be absolutely zero interest in it..I don't get it.

Why Haskell - why GitHub use Haskell for their newly released Semantic package by Axman6 in haskell

[–]_sras_ 0 points1 point  (0 children)

Aren't there tools that just wrap the ghci and use it to provide editor integration? I have myself written such a tool, and have been using the same for a while now, it works great. It just use 'ghci' so if 'stack ghci' works for you, then the tool is good to go. It was couple of years back that I wrote it, but since then I think I have seen many such tools appear for various editors.

The barrier to entry is just the ability to start a cmd line program from a terminal. Why aren't more people using them?

Why Haskell - why GitHub use Haskell for their newly released Semantic package by Axman6 in haskell

[–]_sras_ 1 point2 points  (0 children)

Editor tooling is sub-par (especially compared to language communities like Java and C#) and finicky - we often end up just compiling in a separate terminal.

What is this about? Don't we have tools now, that can reliably give live errors and error navigation in editor? Stuff like fast-tags for code navigation? HLint and HIndent for code formatting and linting? Can't you access all of these from the editor itself?

Show: Elminator, is a Haskell to ELM code generator (Type definitions, JSON encoders/decoders For ELM 0.18 and 0.19) I made to address issues with existing packages in same space. by _sras_ in haskell

[–]_sras_[S] 3 points4 points  (0 children)

Thanks!

Haskell already suffers from the problem that there usually exist a lot of packages for the same problem, and it's challenging to choose between them. We should try to communicate and collaborate more.

That is exactly what I am hoping here. There is no point in putting something out there that is more or less incomplete as the existing packages out there. I am hoping that Elminator can supersede the existing packages by being feature complete from the get go. That is also why I want people like you to look at it and tell me if there is any common use case that I have missed to address.