paradoxiology

- friends
224 link karma
96 comment karma
send messageredditor for
what's this?

TROPHY CASE


  • One-Year Club

reddit is a source for what's new and popular online. vote on links that you like or dislike and help decide what's popular, or submit your own!

Why does squinting seem to improve our sight? by deRozin askscience

[–]paradoxiology 0 points1 point ago

Is that the principle of laser eye surgery? By burning eyeballs thinner thus reduces the refraction?

ELI5 how antivenom works. by daubergoatin explainlikeimfive

[–]paradoxiology 0 points1 point ago

When it is injected into an animal, their body generates antibodies that are specific to that venom which flag the venom molecules for destruction by the animals immune system.

Given an antigen/venom, what makes the animals' immune system capable of creating the antibody that can fight off the venom?

Would our immune system fail to create antibodies at all if the antigens are too complex? And what are some of the other reasons it can fail?

What are the factors that cause the delay of the antibody generation? I guess it takes time for the immune system system to figure out how to create the antidote, but how does the 'figuring out" work?

Try Vim, as rendered gorgeously in your browser. by sinecosinein vim

[–]paradoxiology 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Is it possible to get luakit on Windows or Mac OS X? or is there a plan to port it to platforms other than Linux?

Dear Redditor Vim-loving Haskeller(s): what cool vim plugins or features do you use? by rhdoengesin haskell

[–]paradoxiology 1 point2 points ago

sorry, this has been archived and can no longer be voted on

Simply copy the tagbar-haskell.vim from the util folder in lushtags source repo to your vim's pulgin folder, e.g. ~./vim/plugin/

This works for me

Treaps: The Magical Awesome Balanced Binary Tree by viktoriumin programming

[–]paradoxiology 0 points1 point ago

sorry, this has been archived and can no longer be voted on

By making some use of randomness, ... we'll code up a complete treap implementation in Lisp (particularly, pylisp) that is also fully functional.

How can the code be functional(as in pure functional programming) if the algorithm uses randomness.

Maybe I don't understand the syntax, but the function set doesn't seem to be pure at all due to the use of (random.randint 0 1000000000)?

Or does he mean functional as usable/working?

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Cool, thanks for the info.

Yeah it does seem to be an encoding issue, but it's interesting that the one I built doesn't crash but yours does. It might be due to the ghc I used was about two-year old and the bug was only introduced in a later version...

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

I actually used the exact same command to make the build, but also ran it through an exe compressor, which made the file much smaller.

As for the crashing, I'm afraid I can't offer any insight without knowing a bit more info. Have you tried downloading the pre-built exe, doe that crash on your machine too?

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Nice! Looking back at my own code, even my imperative mind thinks it's ugly :)

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

I'm sure those 'seq's are unnecessary, this part of the code was written a year back, at that time I was bitten pretty badly by space leaks from another project, which made me wary of any possible leaks for a short burst(pretty sure it is unnecessary and unjustified here)

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 1 point2 points ago*

sorry, this has been archived and can no longer be voted on

Hi Peaker, these are excellent, I can't thank you enough for all the suggestions, appreciate all the time and effort!

And then you wouldn't have to use head/tail, just x or xs. Avoid head/tail like the plague! Sure they will be correct in your use now. But what if you change something or move it around? No use getting a runtime crash as a result of a refactoring.

Point taken, they are two of the few functions from Prelude that can throw run time errors when encountering invalid inputs.

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Thanks for the info!

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 2 points3 points ago

sorry, this has been archived and can no longer be voted on

Sorry, I'll fix the bug in the next version, in the meantime please check out this thread

Just replace 'start' with 'open'(OS X) or 'xdg-open'(Linux) at line 197 of Navigation.hs

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 2 points3 points ago*

sorry, this has been archived and can no longer be voted on

Yeah, certainly, I'm alway learning Will definely run it through hlint. I'm sure there'll be pages of things to improve.

I started the project way back last year, worked on it for a week then stopped for a year without touching anything Haskell related, only very recently picked it up again and make it half polished and presentable.

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 4 points5 points ago

sorry, this has been archived and can no longer be voted on

Ouch, for *nix, just replace 'start' with 'open'

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Thanks again. I'll pull/merge with your and fryguybob's branches later today(out of town ATM) Take care!

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Thank you very much for the comprehensive compile guide, appreciate the effort. I should have cabalise it earlier, but this is my first presentable Haskell project, and I'm still in the process of understanding its ecosystem. Thanks!

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 2 points3 points ago

sorry, this has been archived and can no longer be voted on

Thanks for the response; in the future version I'm planning to make it more customisable, using either cmd opts or a separate file.

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 10 points11 points ago

sorry, this has been archived and can no longer be voted on

That would certainly be awsome, but no, it'll just open image links with your default browser.

A Command Line Reddit Viewer written in Haskell by paradoxiologyin programming

[–]paradoxiology[S] 53 points54 points ago*

sorry, this has been archived and can no longer be voted on

Screenshots

How to use

For best viewing results, please make sure the terminal/command line window to be at least 80-character wide and 50-character high

  • r : Go to the front page
  • r subreddit : Go to the specified subreddit
  • g submission_index : When in the list view, read the comments of the submission
  • enter/return key : Go to next page, applicable in both list and comment views
  • a submission_index : When in the list view, display the content text associated with the article (Relevant for text based reddit submissions)
  • a : When in the comment view, display the text associated with the current submission
  • open submission_index : When in the list view, open the link associated with the submission
  • open : When in the comment view, open the URL associated with the current submission
  • search keywords : Search reddit with the specified keywords
  • login username password : Login, currently only useful for viewing user's customised front page
  • back : Go back to the last page/view
  • forward : Go forwards one page
  • exit : What it says

edit: Added how to use

this subreddit truly is the only place for this. nsfl by kezzaNZin WTF

[–]paradoxiology 4 points5 points ago

sorry, this has been archived and can no longer be voted on

But she's so happy~~~

Open Source Journal: "Functional Programming with Haskell" ... by donsin haskell

[–]paradoxiology 2 points3 points ago

sorry, this has been archived and can no longer be voted on

It's just a photo. The photo was uploaded through an iPhone app(Instagram) to its image sharing website.

That's all.

Google Tech Talk: Andrei Alexandrescu - Three Cool Things About D by plulzin programming

[–]paradoxiology 2 points3 points ago

sorry, this has been archived and can no longer be voted on

I understand D has a more advanced compile-time code execution mechanism, so a couple of questions:

  • Obviously only side-effect free functions can be executed at compile-time, so how does the compiler guarantee that?(I can vaguely remeber D has a way to flag functions as pure?)

  • Is it possible to execute hash(string) at compile time? For example:

    const int h = hash("Hello World!");

How Boost FOR_EACH works, and the secrets of the ternary operator by gavinbin programming

[–]paradoxiology 8 points9 points ago

sorry, this has been archived and can no longer be voted on

Exactly, the other half of the sentence is:

"...except for the problem of too many layers of indirection." - David Wheeler

which is the biggest problem C++ suffers

How Boost FOR_EACH works, and the secrets of the ternary operator by gavinbin programming

[–]paradoxiology 14 points15 points ago

sorry, this has been archived and can no longer be voted on

All problems in computer science can be solved by another level of indirection. - David Wheeler

view more: next