1
0

New version of patrick.net is live!


 invite response                
2017 Aug 20, 5:50pm   26,345 views  116 comments

by Patrick   ➕follow (58)   💰tip   ignore  

You should not notice all that much, maybe a few things will be slightly different, or broken!

Please tell me about broken things: p@patrick.net

Even better, if you know how to fix the broken things, send me a pull request! The source code is all at https://github.com/killelea/node.patrick.net

« First        Comments 92 - 116 of 116        Search these comments

92   Booger   2017 Sep 9, 2:14pm  

Patrick says
Crap, what happens? Do you see nothing, or does the submit button for comments fail to work, or what?


Usually the page just doesn't load, and I see nothing. On some occasions, the first page loads, but nothing else works.
93   Patrick   2017 Sep 9, 4:53pm  

Dan8267 says
So one hashtag per line then.


Only tags which start a new link will be linkified, and in a post (as opposed to a comment), the first one will set the post topic.

I tried to do more, but the regexp processing is kinda nasty because the hashmark could be part of a url, say. So it was simplest for now just to match a hashtag at the beginning of a line: https://github.com/killelea/node.patrick.net/blob/master/node/patrick_net.js#L302
Also, here are the currently acceptable html tags in a comment or post:

https://github.com/killelea/node.patrick.net/blob/master/node/patricknet.js#L340
94   Patrick   2017 Sep 9, 4:55pm  

Booger says
Patrick says
Crap, what happens? Do you see nothing, or does the submit button for comments fail to work, or what?


Usually the page just doesn't load, and I see nothing. On some occasions, the first page loads, but nothing else works.


Damn. Usually?

I have an old Android phone with Firefox and it works OK there. Are you on wifi or the phone data plan when this happens, or both?
95   Dan8267   2017 Sep 9, 5:55pm  

Patrick says
I tried to do more, but the regexp processing is kinda nasty because the hashmark could be part of a url,


Wouldn't that be solved simply by requiring whitespace, newline, or start of string to be before the hashtag?
96   Patrick   2017 Sep 9, 5:58pm  

I solved it by requiring the hashtag to be the first thing on a line:

let hashtagPattern = /^#(\w+)/gim

How would the regexp look to match whitespace, newline, or start of string?
97   Dan8267   2017 Sep 9, 6:09pm  

/(?<=[\s>]|^)#(\w*[A-Za-z_]+\w*)\b(?!;)

It's a bit longer, but it handles start of string, end of string, start of line, in mid-sentence, and filters out where # is not the start of the word (that's the \b). See this demo.
98   Booger   2017 Sep 10, 9:16am  

Patrick says
I have an old Android phone with Firefox and it works OK there. Are you on wifi or the phone data plan when this happens, or both?


Works on Wi-Fi, not when using mobile data.
99   Patrick   2017 Sep 10, 10:36am  

OK, that's really interesting!

Maybe your mobile provider is blocking patrick.net. I'm on TMobile and that works. Who are you on?
100   Booger   2017 Sep 11, 2:27pm  

Cricket. It's working right now. Difference is that it was trying to go to Patrick.net, so I tried typing in www.Patrick.net and it started working again. I have no fucking idea why this seemingly fixed it.
101   WookieMan   2017 Sep 20, 8:07pm  

Very, very minor thing, but I don't think the comment count on the user profile is accurate. See these screen shots. My comment count has stalled since the switch to node I believe.
102   Patrick   2017 Sep 20, 9:17pm  

WookieMan says
don't think the comment count on the user profile is accurate


You're right. Will fix. Thanks for pointing it out.
103   Patrick   2017 Sep 25, 8:10pm  

Patrick says
WookieMan says
don't think the comment count on the user profile is accurate


You're right. Will fix. Thanks for pointing it out.


OK, comment counts are now updated correctly on user pages.
104   WookieMan   2017 Sep 25, 8:36pm  

For some reason still not working for me. Cleared cache and restarted browser and comment count on user homepage is still the same. Click on the comments link and the pagination or whatever it's called for the comments shows 202 on that page vs. 129 on my user homepage.
105   WookieMan   2017 Sep 26, 7:40pm  

It's only on the users page when they are logged in that it doesn't add up. Again not a big issue at all. I can go to another user and their comment counts are correct. So it's only when you're looking at yourself logged in.
106   Patrick   2017 Sep 26, 8:11pm  

@WookieMan thanks for telling me. Maybe I failed to push the new code to the server!

What if you make one more comment? Does that update the count correctly?
107   WookieMan   2017 Sep 26, 8:19pm  

Let me check.
108   WookieMan   2017 Sep 26, 8:22pm  

Yes, the comment count from users own perspective is correct now. I appreciate your work here. But you've just solved one of the most useless things I've ever requested to be fixed. Kidding aside, thanks.
109   Patrick   2017 Sep 26, 10:11pm  

Happy to help. Tell me more important things to fix too.
110   Patrick   2017 Oct 3, 7:41pm  

Damn, registrations were broken for a week. Fixed now.
111   WookieMan   2017 Oct 5, 3:18pm  

Again, not a huge deal and not sure how I didn't catch it when comments weren't counting correctly, but posts don't seem to be adding up either. See screenshot. 5 on the screen and more below. Only 4 counted in my total.
112   missing   2018 Mar 13, 8:07am  

For me, computational physics - python + fortran or C++
113   Patrick   2018 Mar 13, 9:02pm  

Personally I think it's all over and Javascript is coming to everywhere, soon.

It has some flaws, but it's otherwise elegant, very high performance, and has a monopoly on the biggest platform in the world, which is all the browsers in the world.
114   mell   2018 Mar 13, 10:27pm  

Patrick says
Personally I think it's all over and Javascript is coming to everywhere, soon.

It has some flaws, but it's otherwise elegant, very high performance, and has a monopoly on the biggest platform in the world, which is all the browsers in the world.


For web stuff for sure. However core backend technologies will stay with strongly typed and better structured languages such as C(#++)/Java/Scala/Erlang/Python/Go. You can't write a massive scalable, safe, and mostly bug-free project in JS. Also multi-threading is cheap today and making a come-back. Also the survey is questionable as SQL and HTML are choices next to major programming languages. I would expect JS to be first since it is used heavily in front and back-end and even in some middle-ware. If you were only talking backend-technologies it would not be at the top.
115   Patrick   2018 Mar 14, 8:05am  

mell says
strongly typed and better structured languages


@mell You can always use https://flow.org/ to have strong types in Javascript, or assert() the typeof parameters at the beginning of each function.

For structure, yes, callbacks make code very hard to follow, but now that Javascript has async/await, you can write code that looks procedural. It's great and I use it all the time.
116   mell   2018 Mar 14, 8:23am  

Patrick says
mell says
strongly typed and better structured languages


@mell You can always use https://flow.org/ to have strong types in Javascript, or assert() the typeof parameters at the beginning of each function.

For structure, yes, callbacks make code very hard to follow, but now that Javascript has async/await, you can write code that looks procedural. It's great and I use it all the time.


Love async/await would not touch JS without it. Still stuff like flow or coffee feel like crutches. I would avoid it for very larger and non-web projects, for small to medium web-projects it's great.

« First        Comments 92 - 116 of 116        Search these comments

Please register to comment:

api   best comments   contact   latest images   memes   one year ago   random   suggestions