HNHacker News
TopNewBestAskShowJobs

thesunny

88 karma · joined September 8, 2010

submissionscomments
thesunny··on Show HN: Edna, note taking app for developers
This is a really cool idea. I especially like the math blocks where you can add blocks of information that actually do things. I could see this potentially even growing beyond math, but other types of functionality as well.

One optimization that might be interesting is to simply use Markdown as your main document all the time and then when you want to add special functionality like the math block to simply have that as a code block in Markdown. For example, using the triple back tick followed by the word math. Then anything inside of that math block works just like you already have.

This also makes it easy to add other types of blocks incrementally.

One challenge for me in reading the sample document was that it wasn’t clear that a math block was a math block without the comments that you wrote. Using the triple back tick with the block type would solve that problem

thesunny··on Daily.place
I really like the idea behind this. And the first impressions for me were that I loved it.

It has a few issues but should be fixable:

- Lofi needs to keep playing more than one song. I've read elsewhere, and I agree, that when the music becomes recognizable, it doesn't have the same effect in terms of helping to maintain focus.

- Loop of playlist for background noises shouldn't fade out/in before replaying

- The To Do list when entering, it doesn't wrap at all. And once it's entered, it doesn't wrap based on words so a word is split in two which is awkward.

These feel like they should be easy to fix though.

I'm keeping it bookmarked and will look for the updates. Good luck!

thesunny··on Show HN: I made an AI builder that lets you build AI web apps in minutes
Yes, I have plans to log user provided inputs and the responses from GPT. You can monitor these inputs/responses to see if the responses that are coming back are of high quality. If it feels like you can improve the prompt, you will be able to use a prompt engineering tool which will let you experiment with different prompts and run them against a bunch of user inputs. You can then compare the new responses to the old ones and see if it's an improvement.

If you're thinking of integrating into another app, one of the next steps is to be able to take the AI web app you built and turn it into a component that you can put into your own websites/web apps. Also, at this point, you will be able to have inputs that are not just user provided, but can also come from your website/web app (e.g. data from your database).

thesunny··on Show HN: I made an AI builder that lets you build AI web apps in minutes
I'm the creator and I'll be hanging out in the comments all day. If you have any feedback, I'd love to hear your thoughts. Thanks!
thesunny··on No More Free Work from Marak: Pay Me or Fork This
As a positive example, I was able to raise CAD $30,000 to add Android support to the Slate editor through a Kickstarter that was successful and most (maybe all?) the users were thankful: https://www.kickstarter.com/projects/sunnyhirai/add-android-...

To put that into context, it was a lot of work to set it up (and message it properly) and there was no guarantee it would have worked.

I think your conclusion that you should do this for your own benefit stands in either case. I believe in alignment of interests. All parties should get something positive out of a relationship.

thesunny··on Ask HN: 8 Days Left on SlateJS Android KickStarter. 50% Raised. How to Complete?
I'll be checking into the comments throughout the day. Please let me know if you have any suggestions, especially if you had some experience with open source fundraising.

While I've contributed to multiple open source projects, this is quite a different undertaking to raise funds. Thank you for any ideas or advice you have.

thesunny··on Macro-mind thinking
Switching context from, for example, focusing on a specific programming problem to taking a macro view about what you should be doing next in business can be challenging.

Over about ten years, I've come to a solution that works for me. My context is that I'm working on a startup. It's my third and I've had success previous ones (millions of dollars in annual revenue though not billions).

- Every morning, I spend 25 minutes outside my office to plan my day which includes asking questions about what I should be working on that brings value. Because it's the first thing I'm doing, I start with a clear mind. Once I know why and what I should be doing, it's pretty easy to get into focusing. The reverse is harder to do.

- Once a month, I take a day off outside the office to focus on strategy. I stay in a hotel though I recognize not everybody has the budget for it. Took a while to figure out this worked. I originally started with the idea of doing it when I think I needed it. Problem is that when you feel under pressure to complete something, is when you don't want to take the day to clear your mind and strategize but is precisely the thing that helps the most.

- Still trying to figure out the best for this, but 2-4 times a year I'll spend 3-5 days on big picture strategy.

It took a long while to have the discipline to take the time to clear my mind and strategize. The idea of I'll take it when I need it didn't work well but scheduling it did.

Eventually, I realized that not wanting to spend time to clear my mind and strategize is a signal that I should be doing precisely that. It's helped to force me to take the time.

That said, I don't think it's necessary to force oneself to do this as a hard rule. I do break the guidelines under situations, but when it becomes extended, it's a sign to take the time.

thesunny··on Managing a Secure JSON Web Token Implementation
In the article, they mention the refresh token needs to be revokable which I assume means that it is stored in a table in a database or other data store. When the user logs out, the refresh token is removed from the table (i.e. it is revoked).

The JWT server would check to see that the refresh token probably stored in the browser with a cookie or localStorage is valid before sending the new JWT.

thesunny··on AI Podcast: Elon Musk on Tesla Autopilot [video]
This is a biased article.

I do like that the article does some analysis to deduce that the NHTSA-FARS data is incorrect for Tesla and they make several well reasoned arguments why. Then using other data sources, they try to extrapolate what the correct data might be.

The problem is that the Tesla data in the NHTSA-FARS database is lower than expected. Yet they are comparing the "fixed" Tesla data with the rest of the data in the database that they take at face value.

It goes to reason if the NHTSA-FARS data for Tesla is easily proven to be underestimated (i.e. there are actually more fatal accidents than shown) that the data for other car manufacturers and models are also underestimated.

thesunny··on Editor.js – Block Styled Editor
I implemented Android support on Slate. It is currently the first release and I will be committing time to fixing the remaining bugs starting within this month most likely.
thesunny··on What's next for SemVer
Timely for me as well. Another reason for adding an additional version number component is this: I use an open source library that I need to fork. Since the library uses the `patch` number component, it's hard to release forked versions to NPM without having conflicting patch numbers.

For example, if the library is at `0.15.4` I don't want to release my updates as `0.15.5`, `0.15.6` etc. because when the main library updates to `0.15.5` we have conflict/confusion. Instead, I'd like to `0.15.4.1` to indicate my `.1` update to `0.15.4`. When they update to `0.15.5` I can merge and release a version at `0.15.5.1`

thesunny··on ProseMirror – A toolkit for building rich-text editors on the web
With respect to Slate, I've got a PR for mobile that works with Android 8 and 9. Will add 7 support later.

I just noticed the problem with the Gitbook plugins and have put up an issue. My hope is to have a de-forked version in mainline either officially or semi-officially supported.

Android is happening. The plugins issue is hopefully something we can resolve...

thesunny··on ProseMirror – A toolkit for building rich-text editors on the web
Hello, I’m the individual submitting the PR. It is a hard nut to crack for sure and took over a solid month of work.

If you are using React, Slate is IMO an excellent choice and the code quality/extensibility/community are great. I really appreciate DraftJS for coming out first and I contributed there as well, but Slate’s goals are overall better aligned to the needs of the community.

thesunny··on React v16.6.0: lazy, memo and contextType
contextType is a much needed shortcut but I wish instead of this:

  static contextType = SomeContext
they did something like:

  static contextMap = {
    form: FormContext,
    app: AppContext,
  }
as it seems limiting to only allow one context.

In the example above, the context values would be available in this.form and this.app

thesunny··on Today, Y Combinator sent me a rejection letter for Startup School… by mistake
Pretty big roller coaster today. Thought I'd post the reverse perspective of getting rejected for Startup School and then accepted and then everybody being accepted.
thesunny··on Show HN: Slate-md-editor – A markdown editor that allows live editing
I am a maintainer for Slate (the Editor framework this project is based on). I haven't looked at the code for this project but the most likely cause for the speed is the live HTML code view on the right. It might even be rendering and syntax highlighting the preview on every keystroke.

I use Slate and have many of the same features and some additional ones and it is more responsive so if you use this project in your code, you may not see the lag since you probably wouldn't have a live HTML view.

thesunny··on The $100B per year back pain industry is mostly a hoax
I'm the GP.

The reason why I'm replying is because I don't want people that can be helped by Acupuncture to reject it based on a misunderstanding of the claim.

I think there are several specific reasons why both the article which you link to can be true and also that acpuncture worked in my specific case and can work in cases that are similar.

First of all, as another reply alluded to, the article isn't testing for effectiveness for a specific problem. In fact, I believe, and continue to believe personally, that acupuncture may not solve for general problems. My half-joking, poke your foot to fix your liver being an example.

I would also like to point out that of all the things I tried, I had the least confidence in acupuncture. In terms of placebo, I was expecting and perhaps even hoping that it wouldn't work to prove myself right. In fact, I tried it almost mainly as a way to say that, "Hey! I tried everything. Even acupuncture! That's how you know I tried everything."

I had much higher confidence in everything else I tried.

I would also like to point out that the specific thing I think it solves is in releasing a muscle locked in spasm (though I may be getting the language wrong). I think if you don't have a muscle locked in spasm, it probably won't help.

My initial reaction to the improvement was that perhaps it was a coincidence. Although this seemed unlikely given that I had been trying for months with different practitioners and there was a difference before and after the session. I also thought that it was temporary and that maybe a day later things would revert, which they didn't.

I also felt that this was becoming more mainstream because I had some rehabilitation for an injured knee a few years later. Apparently I had a muscle locked in spasm (not the knee) and they used a needle to unlock it. Basically, put the needle into the locked muscle, move it a little, there is a physical jerk, and the muscle becomes unlocked.

Edit: Weakened some points to better reflect my position

thesunny··on The $100B per year back pain industry is mostly a hoax
I haven't posted in a while but had to jump in on this.

I had very bad back pain before my first daughter was born. I wanted to be able to carry my daughter when she was born so I decided to try everything, whether I believed it would work or not.

I had massages, shots injected directly in the back, manipulation, and basically lots of different doctors and specialists. Nothing worked.

Since I said I'd try everything, I made an appointment for accupuncture as a kind of last resort. I had zero faith that this would work but carrying on with the theme that I'd try everything, I tried it.

The session was extremely painful. Note that subsequent sessions afterwards have not been. I think this was a function of my muscles being locked in spasm during that first session or something. Anways, immediately after the session, there was a marked improvement. It was the only thing that worked. It only took a few more times before it was back to normal.

If you haven't tried it, even if you don't believe, please give it a try.

I think one clarification to make is that acupuncture directly into the problem points to release a spasm muscle is more mainstream. Acupuncture where you poke your foot to fix your liver is perhaps more controversial.

I'm sure I'm trivializing or getting some of this wrong but just wanted to share my experience with solving my back pain. I hope it will help others.

thesunny··on Why Zuckerberg’s Critics Are Wrong
The harsh criticism feels unwarranted to me as well.

It honestly feels to me like a little bit of misplaced self insecurity.

I kind of get it, but considering that there is no evidence of ill will, I get the sense that people are reacting to something other than what's actually happening here (like their dislike for Zuckerberg's fortunes, how he got it, Facebook privacy issues, etc.)

To put this into context, if a young mother dedicates 99% of her life (but not billions because she doesn't have it) into charity and she does so in the name of her children and their future, I doubt she would be receiving the sort of harsh criticism that Zuckerberg is receiving for the same thing.

It reminds of people's hatred for SUV's (seems to have died down more recently). It was always under the guise of the environment, but really other types of environmental waste were not really villified to the same extent. For example, it's far worse to own a non-SUV and decide to live out in the suburbs and drive to work than to live nearby work and have an SUV.

I'm not a Zuckerberg fan-club member, but what he did would be something I wish I could do someday and it doesn't seem weird at all to me to do this in dedication of my child. I also feel, from a pragmatic point of view, that we need to be encouraging people to donate.

thesunny··on Announcing Meteor 1.2 – ES2015, Angular, React, and More
This was my worst case and I did get it down to around 5-6 seconds by removing some Meteor packages (Meteor Toys in particular added a lot to build times but I also removed Velocity testing).

I believe they were incremental builds. Whatever happens by default when you make a change to a file.

thesunny··on Announcing Meteor 1.2 – ES2015, Angular, React, and More
Meteor+React is surprisingly good at what it does.

I'd highly recommend this new project for Meteor+React+Webpack:

https://github.com/thereactivestack/meteor-webpack-react-kic...

The only thing that I really disliked in Meteor was the reload/refresh for larger projects. This is typically a problem with anything Node related and refresh/reload times were around 10 seconds at its worst.

With the Webpack+React+Webpack, you get hot loading of only the module that has changed. Since much of the logic is on the client, your server code stays slim. Refresh times went from around 10 seconds to faster-than-I-can-notice.

Now if only there was a way to get hot module reloading working on the server...

thesunny··on Summernote – Super Simple WYSIWYG Editor on Bootstrap
Sadly, we built an editor that solved all of these problems but we got virtually any traction in terms of sales (it was $99). Was considering re-releasing it as a WYSIWYG markdown editor because I think the market is more clear.

I hear you with respect to the difficulty in getting it right. Sometimes we would have a few lines of code and then 50 lines describing why the code was necessary in order to get around weird edge case behavior in one version of one browser.

thesunny··on Hire this guy for love
Markupwand is no longer available but (full disclosure) we've built a Photoshop plugin that does high quality conversions.

The goal is to create HTML and CSS that is identical to what a designer creates by hand.

The plugin takes any Photoshop image and return a virtually identical web page.

I say virtually identical because every browser renders text slightly differently and it would not be proper HTML/CSS to absolutely position and size text exactly to the Photoshop file. In a browser, the exact height of text will vary on each browser/OS and the proper way to write the HTML/CSS is to use static positioning and floats to position items to handle this. In this manner, if there is an image below some text, if the text wraps shorter or longer, the elements below will shrink up or expand down to preserve the design.

It also automatically supports Google fonts. You can use any Google font and it will automatically link them into the file.

It also has CSS3, IE8 and IE9 compatibility levels for your taste. The CSS3 version creates a smaller web page because it can use rounded rectangles and gradients.

Also, some designers will always prefer to code by hand but some parts are rote (e.g. specifying width/height, font size, font family, etc). We can shave off most of the conversion time by generating all the assets and a reference sheet with all the CSS styling, the x/y positions so that you can have full control over your code but still save lots of time.

We can also generate a layout sheet that contains all the elements and styling except for the positioning so you can choose to float, absolute, relative position, etc.

We also export in HAML, Slim, Jade for HTML formats and LESS, SASS, SCSS and Stylus for CSS formats.

But at its simplest, open your image, and click one button and it will generate a web version of any Photoshop image.

www.webbsy.com

thesunny··on Webdesign tool Macaw raises $275k on Kickstarter, $200k more than original goal
Hi Proexploit,

That's a good question. And I'll address it but first I'd like to make a clarification.

You mention that if all the floating elements have fixed width and height, then what benefit is there versus simply using absolute positioning.

So, for clarity, if we did give widths and heights to all elements, then yes, apart from perhaps some code readability, there wouldn't be many other benefits; however, we don't actually give heights to text elements. This allows the browser to flow the text dynamically and because of this, it is possible that text will render shorter or longer than in the original Photoshop file because of where the text breaks at the end of the line. This can be exasperated when certain fonts like Arial may display as Helvetica and visa versa depending on the operating system.

Elements that are under the text will either pull up or push down as the text gets shorter or longer. There is also another benefit in that if you tie the code into something like a CMS where the images or text are editable, then the layout will reflow in the way you would expect.

The question was: How do we handle mobile devices or devices with different screen sizes?

There are actually ways that we can support this in the future and it might even take just a few days to write it. We currently have a full generated internal DOM that we convert to HTML and CSS. We also export to other formats. For example, I forgot to mention this earlier, but we also automatically export in LESS, HAML, Slim, Jade, Less, SASS, SCSS and Stylus.

I haven't thought this all the way through, but I don't think it will be difficult for us to export all of the elements so that they are always stacked for use in mobile devices and resize images to fit better. We can probably share the HTML code and then provide a different version of the CSS for mobile. There are some more details than that I can think of already, but they can probably all be overcome.

I would like to address that this isn't the typical use case if you are designing your website in Photoshop. In such a case where you wish to use identical code to support multiple screen sizes, you would probably hand write code with a grid to achieve this. Even in this scenario, however, our software can help you slice images, generate HTML and CSS styling code and put it in a reference page to make it much easier for you to code the final page. This will still massively accelerate your web page development, of course under the assumption you are using Photoshop. If you don't care to use Photoshop, and if you are more of a developer than a designer than there may not be much benefit in doing your prototyping this way, then our software is not a good choice for you.

Again, we think Macaw is cool, but you aren't, at this point anyways, going to get anything near the depth, maturity, familiarity and available knowledge on the web for an image editor as Photoshop. For designers, it is probably appealing to use a tool that they already know well and is very good at what it does. I don't think Macaw is trying to compete as an image editor though. So you'd probably build your image assets in something like Photoshop and then import and layout in Macaw. For some, they may prefer everything in a single tool.

thesunny··on Webdesign tool Macaw raises $275k on Kickstarter, $200k more than original goal
Full disclosure, my company just released a Photoshop plugin that converts Photoshop images into web sites.

First of all, I think the idea behind Macaw is great. A lot of the people at my company really admire their work and there is a solid target market that would want to use Macaw.

One of the things to keep in mind is that the target market is, likely, primarily designers and not developers. Important to keep in mind so we don't have a skewed developer perspective. Hand coding is a poor medium for prototyping or doing design mock ups, but can be quite fast if you know exactly what you are doing and you already have image assets.

Another under served market are designers that love using Photoshop, especially to do mock ups and prototypes, but cringe when it comes to turning those mock ups into actual web sites. Unfortunately, Photoshop has basically the worst tools, if you can call them that, for turning Photoshop images into a websites.

Our response is a tool we call Webbsy.

Basically, you just name any layer or layer group like a CSS selector like #header or .header. Run Webbsy, and it slices all the images and generates the HTML and CSS using the names you gave it.

Like Macaw, it generates clean HTML using static positioning and floats and divs with clear. It respects layer groupings as well so if your #logo layer is inside your #header layer, the HTML/CSS will do the same. It uses static positioning by default, but allows the use of absolute positioning as well. Actually, until I saw the Macaw video, I thought we were the only ones who had an algorithm for making code that doesn't use absolute positioning.

This is really important because in a real website, the lines of text may render shorter or longer depending on the font rendering engine. This can cause unsightly overlaps or too much white space.

Webbsy also allows slicing, linking, it automatically makes Google fonts work, converts rectangles into divs, text is preserved as text, etc.

We also are just about to release our reference sheet feature. If you are a coder but just don't want to spend all the time doing rote monkey work like copying over fonts, spacings, colors, etc. then use the reference sheet. It generates all the CSS styling (but not positioning/layout) and shows you thumbnails of all the assets. You then write all the layout and HTML by hand but still save hours on transposing code.

Our next feature, coming soon, is auto export so you don't have to do any renaming of layers. This has less control and selectors are generated automatically but is perfect for showing clients a work in progress without having to ship JPEG or PNG images through email. This also means you get real previews so your fonts look like they would in a website. One problem with mockups is that your 9px font looks fine using Photoshop's font rendering engine, but looks really bad in a browser rendering of a font. When a client asks for a few changes, you can make them in minutes and just re-build the site in Webbsy instead of wasting time trying to figure out how to modify the HTML/CSS.

Finally, we will be coming out with more modes and features that help designers that use Photoshop make conversions the way they want to. One of the things we recognize is that designers work in different ways. Some need to write all the code by hand (which is what our reference sheet is for) and others don't mind how the code looks as long as the web page looks right.

You can find us at www.webbsy.com

Sunny

thesunny··on Psd.rb
We've actually solved this and will be launching in about a week. We've been working on it for over a year now.

It runs inside Photoshop (there is no upload stage nor do you have to open up separate software) and it generates HTML and CSS that looks like a designer wrote it and slices up all your images. It also outputs LESS, SASS, HAML, Slim, Jade and I think there are some other formats I may be forgetting.

Text is output as text. If you use a Google font, it automatically links the fonts in for you.

It does not use absolute positioning so if you modify things like text and it grows taller or shrinks shorter, other items will be positioned properly (initially we did it with absolute positioning but later I figured out an algorithm to make it work the way it should, even with overlapping elements).

It's definitely not an easy problem to solve (hence why we've been working on it for over a year although not full time).

We've done some outputs now and the results are amazing.

I would link you to the website but it looks so bad right now that I don't want to show it. Anyways, we will launch in about a week so look for an announcement. If you have any questions about it, please leave a comment.

Sunny

thesunny··on Our tiny jQuery/Bootstrap rich text editor is now open-source
I'm not currently doing development on the software myself so I don't know the file size for sure at this moment; however, I believe it's similar to Redactor which is known for its small size (not sure if it's more or less now because we've just cut more size off of our deliverable).

As for number of files, I believe it is 1 Javascript file. The required HTML and CSS is compiled into the JS now to reduce number of files to transfer. I don't know how many images it is right now but if it is more than 1, then we will likely eventually compile it down to 1.

Sunny

thesunny··on Our tiny jQuery/Bootstrap rich text editor is now open-source
I realize your rolling your own, but if you are interested in an available editor, we have SnapEditor which does exactly that.

One of the core features is that it keeps the nesting of blocks and tables consistent. All P, H1, H2, etc. tags are always at the top level. If they are not (for example, after a Paste), we automatically fix the HTML so that it is. In this way, you always have consistent, predictable, HTML which makes it easy to style and reason about.

It also works both as a form-based editor (traditional) or an inline editor (like Aloha editor).

Sunny

thesunny··on Our tiny jQuery/Bootstrap rich text editor is now open-source
We have an editor, SnapEditor, (http://www.snapeditor.com/) and it will keep your HTML clean. You will get the output you expected.

You can even cut and paste from Microsoft Word or Google Docs and it will fix your HTML to the way you'd expect.

Sunny

thesunny··on Show HN: Your online WYSIWYG editor is broken
Thanks Badragon for the comment.

It's good to hear that people will pay for a good product, even with the availability of free alternatives. Of course, we would have to offer a superior product.

We already have the ability to add different classes than H1, H2, etc. and we can do this very elegantly. In fact, we support something called named styles. Here's a few definitions.

Title: div.title > Subtitle

Subtitle: div.subtitle > Normal

This tells us that we have a named style called "Title" that is represented by a DIV element with class "title" and that after you hit enter at the end of it, it will end up in the "Subtitle" named class. This is already implemented but not exposed because we haven't built the UI for selecting Named Styles as a dropdown in the beta. This will be in there for the production release though.

We will most likely have sets of "Named Styles" that are compatible with Twitter Bootstrap and other common frameworks at some point. You will also be able to easily create your own Named Styles, probably in an online UI that will build your editor for you.

Note that once you define the Named Styles, the editor whitelists to them so you can't get "illegal" element/class combinations which lets you (the developer) keep the HTML consistent for your needs instead of hoping your users won't break your styles.

We'll keep in mind the ability to add a target for links. We hadn't thought about the need for this until you mentioned it.

TheSunny

[edited for spacing]

Page 1 of 3Next →