u/Craftkorb - 121 Archived Voat Posts in v/programming - Page 2
u/Craftkorb
  • home
  • search

u/Craftkorb

10 posts · 111 comments · 121 total

Active in: v/programming (121)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • 1
  • 2
  • ›
  • ››
  • ›››
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

I'm just getting into it, and right now it's not much work at all to be honest. The community pretty much moderates itself already.

I've never moderated a big forum anywhere, and ended up in here more by accident than anything else; I've no idea how much work a fifty-fold increase of the userbase affects the needed moderation. But, I'm already trying to get full hold on this subvoat so I can manage moderators. What's annoying though is that voats moderation tools are not only bad (Like at reddit), they're non-existant. Mod mail? It's a stub. Want to report something? Good luck finding the button (There's none), and if you want to be helpful and thus report by mod mail, well, still a stub. If you now think "Well .. then let me message one of the mods", you have a chance of 87.5% of choosing a inactive moderator from the moderator list. How fucked up is that?

I thought about building a small bot, which goes through all comments and looks for "!report" as crude work-a-round. Well, as voat is currently "under attack", I can't write a HTML parsing one without having a real browser, and as there's no real API I can't use that one either.

I conclude: I try to get hold of the subverse (But no idea if Atko will read my message), the moderation work is currently perfectly doable, and the mod tools are not there.

0 16 Jul 2015 17:31 u/Craftkorb in v/programming
Comment on: New subverse - /v/NoobProgramming

Replying here again for better visibility

I'm not sure if /v/programming is the right place for newbie questions:

  1. Posts by newbies may be drowned by the stream of more upvoted techie submissions. If barely anyone sees it, what's the point in posting it in the first place?
  2. The target audience of both overlap to some degree, but are wildly different for many areas. People come here to read some kind of discussions, news, or what obscure programming language is the new cool kid on the block. Mixing these audiences may be bad for both.
  3. It may be intimidating to post here as newbie. "Oh my god, all those people who have a clue, and I'm here with my dumb questions"
  4. Redirecting users to a better place for their question is not bad. If they don't read, then it's the right moment to teach them that they do need to read to get anything done. It's a risk to be too lenient, as some people think that it's now ok to always not follow the rules. Had this more than enough in IRC channels.

For something like this we could abuse the flair system, but I'm sorry, as the sole mod I can't be in here every waking second to flair new stuff. I'm in the process of fixing the "sole mod" part, but that'll take time. My apologies.

2 16 Jul 2015 13:30 u/Craftkorb in v/programming
Comment on: New subverse - /v/NoobProgramming

Redirecting newbies is usually an impossible task since most don't read stickies or use the search feature

Then it's about time that they learn to read IMO, that'll help them much more on the long run. Having helped out in IRC programming channels, I think that these 'redirects' are welcomed by the asker as long it's said nicely.

So, I'm not entirely sure yet. I fear that newbies post get drowned by other content, which doesn't help them. I also think that the target audience of a newbie channel is quite different than a general-and-news-and-such channel.

Sorry for the late reply, but I had to wait for the voat spam limiter to unblock me here. No joke >_>

0 16 Jul 2015 13:22 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

Thanks. Actually I think I should shove that stuff into some kind of wiki, so I don't have to link to some random comment made by me at some point somewhere. Maybe for now it'd be a crude work-a-round to use a stickied thread, where each top-comment is a 'article' and people can comment on each of those. When we get a wiki, we can "simply" copy/paste it over.

On a related note, I actually think that subvoats should have shared wikis. There's no reason to have the information more than once after all. On that note, maybe we should create /v/programmers_wiki or so, disable user submissions and use text posts there. Still crude, but at least shared?

1 16 Jul 2015 01:08 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

E.g. this one: https://voat.co/v/programming/comments/281787 - Not on the shoot-down list right now, but I'm wondering if we want such one-line joke threads, or not. Really, I'm open for discussion, as long they don't get too much I'm fine with them.

It's not easy to not come off as too restrictive ("See? Just got the power and already abuses it!") but not too lenient either.

Edit: Or this one https://voat.co/v/programming/comments/286185 – I think that CSS is not really programming, and the OP is looking for /v/help or something I guess?

1 16 Jul 2015 00:37 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

I'm thinking about having like a weekly or monthly Q&A thread to discuss ideas. Maybe I could also, for now, post in there if I've removed any submission, with a short reason. Looking at the current "hot" threads in /v/programming, I see a selected few submissions where I ask myself if these kind of posts should be allowed in here or if there's a better subvoat for those. Ideas on this anyone?

1 15 Jul 2015 23:07 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

I don't really read a lot of papers, I do like to watch talks though. In general, I can recommend the archive of the Chaos Communication Congress. I was up until recently working at a telecommunications provider, and that's the reason I'd like to recommend this talk on SS7. This talk is about CS students in north korea. A talk I enjoyed few days ago was about the Volt Framework.

Edit: Right now I don't have the permission to make someone a moderator. Or I'm too stupid to find the button. Sent Atko a message, may take a while though

1 15 Jul 2015 22:45 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

Convenience reply for you to see the post in your inbox.

0 15 Jul 2015 22:32 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

What sort of things do you want to see on v/programming?

Philosophy and the Community

  1. I want /v/programming to be a general hub on programming related talk. It shall not be dedicated to specific programming languages.
  2. The only language restriction in this subvoat shall be the English language though. It's awesome if you write a well-written article on how to do something interesting in another language, but I want this place to be accessible for everyone.
  3. I'll remove anything that discourages people from learning. Stupid shit like "Wow ur so dumb u didn't even kno dat?!". We've all been there. We should do the opposite: If someone finds out something you took for granted, tell that user about related things (s)he may also be interested in!
  4. We all think that trolling is funny sometimes. But if it gets too much, I'll remove the comment, okay? If you're a serial offender, I think that banning the user is quite funny too. Programmers have humor. Some jokes are perfectly fine by me, and being laid back is fine too as long the discussion is productive in general. If there's a circle jerk in a thread, I'll leave it be as long others won't be too annoyed by it (Please report these!).

Content I want to see

  1. Educational content. This one's hard to find a balance between "Is not too obvious but well known so ok" and "Has been done to death and should be put somewhere else". An article showing off what crazy things you can do by abusing Hashes with blocks and all in ruby is ok. If you post an article stating that you can do { foo: 123 } in ruby, then I'd rather want to see that somewhere else.
  2. Technology. We all like the new stuff coming out. A new framework which lets you write a webchat in 3 lines of code? Bring it on! (But please don't repost D:)

Content I don't want to see (too often)

  1. "My program broke, please help". I think that /v/programming is a general hub on programming in general, and thus there are better forums on the internet for these questions. I will however not remove these posts as long they don't get too much, as they' can still be educational.
  2. Memes. Please no. We can have a separate subvoat for that. I'd probably subscribe to it! But /v/programming is not the place for it. Will be removed on sight.
  3. Advertising job offers, companies, discounts, etc. "FooBar Corp is hiring in Montreal!" Nice for them! Will be removed on sight though.
  4. Clickbait titles. Yes, I knew about these 10 facts, and no, fact 4 didn't blow my mind. Has a good chance of being removed.

Are you going to do anything to stop blog spam?

The distinction is not always easy. Clickbait titles may end up being removed. If the article is just talking about this cool new product by some company, then I count that as advertisement and will remove it. But I'll also say that I probably won't read everything. Reporting such submissions is appreciated.

What about a wiki or post or something for a FAQ?

Good idea, haven't thought anything about it yet. I think that this is a perfect thing to be done by the community with the moderators making sure it's useful information. As of yet, I think some links on "how to start programming" would be helpful, but I don't know any good articles nor books on that. Though I'd appreciate a wide range of them: Yes, a beginner can learn C. No, it's not too complicated. If you repeatedly tell them that it is, they'll of course never use it. Let them judge themselves! Other than that, I'm tbh clueless on this one.

7 15 Jul 2015 22:15 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

Sure! Design is something I've no real clue about, so any input there would be much appreciated. Do you happen to know a link or book you can recommend on this?

3 15 Jul 2015 22:05 u/Craftkorb in v/programming
Comment on: lets fix the CSS

And it's live. Thanks!

2 15 Jul 2015 22:01 u/Craftkorb in v/programming
Comment on: [META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA

In fact I have, though I didn't know its name. I've yet to find a real world requirement where a program should actually dump itself. I mean where it's supposed to do that, not a wrongly configured Apache server blurting out business secrets ;)

2 15 Jul 2015 21:57 u/Craftkorb in v/programming
Comment on: lets fix the CSS

Respond. Apologize and all. Thanks for your effort. Just for the record, are you fine with me dropping your CSS into the subverses' settings?

1 15 Jul 2015 21:52 u/Craftkorb in v/programming
Comment on: So I've spent 7 years to write an oss interpreter for a language that can pattern match webpages and is XQuery compatible, and then Reddit's mods just delete my submission

Why would you even consider removing it?

I? As I said, I don't consider removing this at all. Why should I? It doesn't break any rules. And it's highly relevant to the subvoat.

0 15 Jul 2015 21:42 u/Craftkorb in v/programming
[META] I'm the moderator of /v/programming and pledge to be more active from now on - AMA
36 32 comments 15 Jul 2015 21:37 u/Craftkorb (self.programming) in v/programming
Comment on: So I've spent 7 years to write an oss interpreter for a language that can pattern match webpages and is XQuery compatible, and then Reddit's mods just delete my submission

I can't say I really understand what the tool is doing ... no reason for me to remove it though. It's not against the rules and is relevant to the sub. If people don't like it, they'll probaby downvote it (Cough Which is not what voting is for but who cares Cough), and if they think it's awesome, upvote it. Who am I to interfere?

5 15 Jul 2015 21:18 u/Craftkorb in v/programming
Comment on: What programming language changed your outlook on creating software?

Depends on what you're trying to do. LLVM has the Kaleidoscope example which is quite impressive and comparably simple to use.

But on the other end it depends. You don't have to use LLVM, in fact, for a toy language, I doubt you actually need any framework under you. Learning Flex/Bison will take the most time of the project (Tip: I recommend using Lemon over Bison for C++). Then you should end up with a AST. Adding a "evaluate" method to the AST class is not that hard at the end. And this is the moment where LLVM would take over and do all those fancy bindings and optimizations.

I'd suggest starting without, creating a dumb interpret which walks the AST completely without LLVM or anything, and then you can - if you want - try to incorporate LLVM.

Reference: I implemented Twig in C++/Qt. Decided against LLVM because it's a huge dependency and the performance of a templating engine isn't the primary factor.

0 15 Jul 2015 21:11 u/Craftkorb in v/programming
Comment on: Does Voat have a python API?

Ruby implementation (If anyone wants to contribute, go ahead ..):

require 'net/http'
requre 'json'
JSON.parse(Net::HTTP.get URI 'https://voat.co/api/frontpage').map{|obj| "#{obj['Subverse']}: #{obj['Title']}"}.join("\n")
1 15 Jul 2015 20:55 u/Craftkorb in v/programming
Comment on: Does Voat have a python API?

As stated by others, you're confusing a library for Python to access the voat API with the API provided by voat for programmatic access to it.

You can find the API documentation here: https://voat.co/api/help (Linked in the footer of the page if you forget the link btw). The voat API uses HTTP as transport protocol and JSON data as storage format. Every somewhat decent language on the planet should offer implementations for both. The API scheme voat uses is, more or less, RESTful. As that scheme is wildly used by magnitudes of webservices, it's a good thing to know about.

If you're "new to this", and have never done such a thing, then I think just trying to write a minimal client yourself is actually a good idea. If you always hide behind the libraries, you won't get further with your skills. If you're an experienced Python developer, I guess that a python package (No idea how it's called over there, I use Ruby ..) would be appreciated.

Either way. Let's quickly implement a minimal client to show posts on the frontpage! As scripting language I'll use bash. We also need something which implements HTTP, and something that can parse JSON. For HTTP, we'll use curl. For JSON it'll be jq. Please make sure to have these installed. On a ArchLinux box, the command to install these is: sudo pacman -S curl jq. Other distributions may call these packages differently, Mac users may find this in homebrew, and Windows users .. Let's get to the code before we all go insane!

First step: Find out how we're supposed to access the frontpage. Looking at the documentation, we see GET api/frontpage This API returns 100 submissions which are currently shown on Voat frontpage. This sounds exactly what we're looking for.

Second step: After opening the docs on that API, we see a huge table and stuff. I suggest that you read it throughout! Just kidding.

Let's skip it for the moment. Let's say we want to display the title of the submission, and the subverse which it was posted to. The call needed to download this is: curl 'https://voat.co/api/frontpage'. Just run this command in your shell. Now that you almost tried to make sense out of that wall of text, run the command again, but pipe it through jq '' (Note the single quotes!): curl 'https://voat.co/api/frontpage | jq ''

Third step: Looks better already. If you don't know what JSON is, now's a good moment to read up on it. Really, it's easy, if you know what an array and a Object/Hash/Dictionary/AssociativeArray/Whatever-your-language-calls-it is you're good to go. A harder read is the man page of jq.

Fourth step: Ok, now we need to tell jq to turn the JSON into something we want to look at. In the following examples, I'll just write what to put between the single-quotes next to jq of the command above. So, we see that the response is a huge array of objects. First, get into the array: .[] (. means 'this object', [] means "all elements"). Good. Now, we need to read the title ("Title") and the subverse ("Subverse"). We do this by piping the 'this object' to a filter (jq speak): .[] | .Subverse + .Title (| the pipe symbol like in your shell, .something accesses 'something' in a object, + is the string concatenation operator).

Fifth step: Shit's about to get real! Now we have a simple view of the frontpage. I'd suggest making it a bit more readable: .[]| .Subverse + ": " + .Title. You can get rid of the surrounding "" by passing '-r' to jq. The complete one-liner now looks like this: curl 'https://voat.co/api/frontpage' | jq -r '.[]| .Subverse + ": " + .Title'

Congratulations, you've just learned how to use your shell to build a simplistic tool to access voat's API!

9 15 Jul 2015 20:49 u/Craftkorb in v/programming
Comment on: Hardest/craziest bug anecdotes?

What's wrong with doing *ptr = 8[ptr++] < ++*ptr ? ;)

1 10 Jul 2015 14:43 u/Craftkorb in v/programming
Comment on: Hardest/craziest bug anecdotes?

Sounds like rounding errors to me. If it was in C/C++ or a C inspired language, you have float and double as datatypes. If you want correctness over memory and potentially performance, go with double. If that's not enough, "long double" in C++, but that's really slow.

1 09 Jul 2015 13:36 u/Craftkorb in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • 1
  • 2
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.