No.6551
Yeah, the how was the simple part. It's the what that continues to elude me.
No.6554
Yes but I never do.
No.6555
i wish i didnt
No.6556
>>6555are you me? I'm so burnt out on the idea of programming I wish I never got into this field
No.6557
Yes I know how to program a little.
Currently reading automate the boring stuff with python so I can automate a couple of tasks.
No.6561
We had programming classes during one year in high school but I was really bad at it. We had to write a bunch of different scripts and hand them in at the end of the year but I just asked one of my friends for his and just changed the author to my name in all of them. Another friend of mine did the same but forgot to change that line in the scripts but our teacher didn't even notice. Fun times!
No.6718
>>6717Something like this?
http://pastebin.com/arTpUb7ZI don't really know javascript so there's almost certainly a better way to do it, but I think that solves your problem.
No.6719
>>6717
you could do it really easy with a regex i dont know any javascript though, or if it even supports regexs
No.6798
>>6792you cant parse all html with a regex, you should try to use an html parser next time instead, thats what theyre made for.
https://docs.python.org/2/library/htmlparser.htmlor whatever your language of choice has available
No.6822
>>6798>>6801I figured there was probably a faster way to achieve my goals so I went on a fool's errand to understand all of this for two whole days only to come up with nothing. All the examples I find for html parsers involve getting a tag or some other piece of html code or just stuff that extracts whole text instead of something specific. What I want is very specific and changes according to some input at the start of the program. And what I currently have works. The only way this could probably become any faster is if I learned how to use requests and urllib to insert and send the login information and deal with everything in plain text in the console instead of using selenium but I'm too dumb for that yet.
So yeah, I'm going to continue to use regex for this specific program to the despair of every programmer worth his salt.
Don't bother wasting time trying to help me, I'm just blogging…
No.6823
>>6822Oh yeah and I at least got it to work using firefox rather than chrome.
No.6832
>>6822Don't feel bad, you probably don't need to parse anything. You are just looking for a string that matches a pattern in a longer text, right? That's what regexes are for!
You only need to parse if you want to work with the structure of the HTML instead of just looking for a textual pattern. Like you want to extract the value of the "href" attribute of every "a" tag that is the third child of a "div" with the "class" of "button" and similar hard tasks.
No.6835
>>6832>You are just looking for a string that matches a pattern in a longer text, right? That's what regexes are for!Only if the pattern is regular…
No.6837
>>6822i just mentioned it since lots of browsers accept html that will choke a regex parser, i usually use regexs too since theyre faster
No.6933
>>6912>>6887yeah, but the 'i' is kinda clipped alot.
Im trying linux stuff too, I actually installed it for real, though im not trying to learn programming more because of it.
God though the fish shell is SUPER
cool すごいーーーーー
No.6936
New windows 10 includes the option to run integrated Linux stuff now so no need for a VM anymore!
No.6947
>>6936but then you'll be using windows 10
windows 10 No.6961
>>6936Linux can communicate directly with hardware and can be installed directly onto the disk so there never was a need for a VM!
No.6963
>>6961Is it easy to write programs that can control or read data from parallel or serial ports on old computers that still have them? I remember trying to figure out how to control a parallel port on windows and you needed some kind of bullshit to get around the nanny features, so I never really got very far on the project.
No.6966
>>6963I've never done that but Unix was basically designed for writing and running C programs, and that sounds like something you'd do in C.
I googled and found this.
http://tldp.org/HOWTO/IO-Port-Programming.html No.7043
anyone wanna be my programmer friend and talk about programmer things?
No.7053
>>7043I'd be your programmer friend but I know nothing about programming!
No.7526
>>7525Name it Kogasa! It seems fitting for how you got it.
No.7527
>>7526Ah! Thats a good idea.
And kogasa is very, very
cute, isn't she?
No.7530
>>7525>netbook that a relative found on the side of the road, having fell off a truck Whoa that's super
cool dude, I've always been a fan of "dumpster tech", especially cheap and junky netbooks and making them work like they're new again
you could try making it into a small and cheap server
No.7531
Getting really frustrated with HTTP requests lately.
No.7537
which should i learn first?
c or c++
No.7548
Is python worth learning? Is it very limited compared to more "professional" languages? I've been itching to putz around with ren'py ever since I rediscovered that I downloaded it a year ago and wrote a couple lines of text before forgetting about it.
No.7549
>>7548It's pretty good if you want to write up a quick script to automate something.
No.7552
>>7548Its good for small projects which is most of one you'll do on individual projects. It has really good library support too
No.7631
>>7630that it doesnt fix the bug in my use case*
No.9614
i dont want to program…
No.9621
>>9614if you dont enjoy it dont bother!
No.11309
I made a shell script that makes anime screenshot filenames a little prettier… h-here I go
#!/bin/sh
for x in \[*\]* ; do
xx="$(echo "$x" | cut -d" " -f2-)"
mv -n "$x" "$xx"
done
It checks for filenames starting with sub group brackets and then removes them
Please give me feedback!
No.11334
>>11328I'm confused. It doesn't seem like he ever actually distributed it maliciously. Is he really getting blamed just for developing something that could be misused and not pointlessly obfuscating the source? That is pretty dumb.
No.11341
>>11334That Twitter didn't even develop it, just posted about it.
No.11344
>>11341I know. I was talking about the guy that did write it. People were acting like he actually did something malicious when all I can find is that he posted some silly malware he made on github and it may have actually been used maliciously.
No.11350
>>11344well those people are 馬鹿s. He even posted a program to disable it.
No.11351
>>11328I don't see any flaming there.
No.12310
What type of mouse should I get nenpo? Thinking of a bluetooth one to save USB ports. The Logitech MX Master looks good.
No.12324
>>12310I use a wired mouse because I never move my computer so the cord never gets in the way.
No.12330
>>12310The Logitech M500 is
nice if you don't mind having a cord and don't need a ton of extra buttons for gaming. I'm able to copy/paste and move forward/back with the mouse, so it's very convenient for web browsing!
No.12749
WWDC was good, lots of cool stuff. Apple's new filesystem is interesting, and iOS 11 improves a lot on the iPad
No.12752
>>12749they have some really
cool stuff but also a lot of silly ideas. i guess thats what it takes to always be cutting edge though
No.12753
>>12749There was a Star Wars thing too!
No.12754
>>12752Interested to see how the iMac Pro is going to fare, everybody is saying it's going to be an overheating mess because of the insane specs and thin design.
No.12759
>>12754Yes, they also boasted about 2013 Mac Pro's
cooling and that didn't turn out well at all. I hope the iMac Pro doesn't have the same problem.
>>12753I thought it was really awkward…
Nothing really exciting about macOS High Sierra other than APFS so I'm not going to install the public beta when it gets released.
iOS 11 has some
cool changes. Files app seems great. I like how the dock doesn't have app names anymore, and how some of the redesigned icons look like. Interested to see how the new notifications/lock screen feels like but again I'm waiting for the stable release instead of trying out the beta.
No.12779
>>12759That's okay if its awkward, I just like Star Wars.
No.13599
Very ugly and un-graceful script to sort anime screencaps:
#!/bin/bash
for i in *.jpg;
do
ii=$(echo "$i" | tr "_" " " | cut -d"]" -f 2-);
mv "$i" "$ii"
done;
for u in *.jpg;
do
uu=$(echo $u | tr "-" " " | sed -n "s/\([0-9]\).*$//p");
mkdir "$uu";
mv "$u" "$uu";
done;
This script is meant to work across different types of anime filenaming schemes, for example HorribleSubs are usually
[HorribleSubs] Aho Girl - 02 [1080p].mkv
But Coalgirls releases are usually like
[Coalgirls]_Nichijou_03_(1920x1080_Blu-ray_FLAC)_[81999264].mkv
So I made this script to give the same results either way.
Obvious issues at first glance:
* The sed but cuts off filenames where a number begins, so it will cause problems with anime with a number in the title, such as "S2". I can't think of another way to produce the same results with a coalgirls filename as a HorribleSubs filename though so I'll have to mull it over for a while to come up with a better solution
* Doki tags their filenames with parenthesis instead of the regular square brackets so this won't work with them
* I don't know regex and the part with sed was basically produced through trial and error, so the scripts regex is probably a complete disaster to anybody who knows it
No.13602
>>13599Was going to post my screenshot script, but it seems it's too long. so here's a pastbin link
So basically It's written in Bash. Therefore Windows, zsh, and dash users beware. Works on any video file type. It can do Screenshots. It's an option though. It has a lot of option really
https://pastebin.com/CvXA6Mky No.13619
Here's my lazy Shutdownn script. I added an if else argument to it in case I want to execute a program prior to shutdown. 15 lines.
#!/usr/bin/env bash
declare -r time="$1"
declare -r options="$2"
if [ -z "$options" ];
then
sleep "$time"
shutdown
else
sleep "$time"
"$options"
shutdown
fi
No.13673
who wants to make nennenquest
No.13675
What's nennenquest??
No.13676
>>13675Whatever we want it to be!
No.13682
>>13660
Isn't it a bit weird to start college in july?
No.13684
>>13683
I don't like Java, it's really restrictive and the purists are really violent people.
I've never heard of a good CS teacher before anyway.
No.13686
>>13683
alright don't reply to me again if you write like this intentionally
No.13688
>>13684i like java. java 8 gave it lots of the stuff it was missing to be enjoyable to write in
No.13691
>>13683
If english is your second language you should take extra lessons here
www.englishpage.com
No.13694
>>13688what are the new features you like?
No.13698
>>13694The only big changes in it?
* lambdas, and alongside it functional interfaces
* Streams
No.13699
I don't like programming, I get really focused then I can't sleep the whole night.
No.13702
>>13683
Why is your teacher Japanese?
No.13703
I'm trying to teach myself python. It seem similar to bash in terms of syntax. ATM it's only a lake of motivation stopping me.
No.13754
>>13752I saw her first you
c u t i e No.13758
>>13757
I don't if that will be enough to make Shizuku and Nene get along.
No.13759
>>13754too late shes mine and asagohan would never cheat with a meany
No.13772
>>13759You will never be able to satisfy her with sex like I do you
c u t i e No.13777
>>13772I give her love, com
passion, and empathy like you never could irregardlessly of that
No.13779
>>13777That's why she's in my bed right now you
c u t i e No.13780
>>13772>>13779ban this meanie nenmin!
No.13781
>>13779>>13777But can either of you program? If not she may not want you.
No.13790
>>13779nenmin dont filter the c-word just make it an auto ban
No.13793
>>13790i think it was the b word not the c word
No.13801
Now every time someone calls me a cutie I will be afraid that they are secretly insulting me…
No.13802
>>13790Please no. I used the c-word a couple a days ago while drunk. Think of your drunk friends.
No.13804
>>13802you shouldnt it no matter the circumstances
No.13811
The new filter is c u t i ein'!
No.15853
im going to learn c like nene and asagohan did!
No.15854
>>15853I thought Nene learned C++. Well if you learn C++ you've already learned C so I guess it's okay.
No.15855
>>13811Whoa what's the word?? It's a P word?
Post
Programmer
pencil
polistes
probably
No.15857
im going to learn c++ like nene and asagohan did!
No.15858
>>15854>if you learn C++ you've already learned C misinfo misinfo do not spread!!
No.15862
>>15858hehehe just try and stop me
No.17573
>>17569all languages suck
No.17574
>>17569Do you need help with something?
No.18898
>>18897
xml should be left to die. yaml json or protobuf is good.
protobuf is faster than json but loses some readability.
yaml is less annoying to hand-edit if its for like a config file.
json is an in between I guess with better support than yaml.
realistically you're going to use a library to parse it into a data object anyways so it doesn't really matter, but I personally dislike xml
No.18899
>>18897
JSON, but if it's simple enough, CSV.
No.19096
>>18906You won't be able to run anything very intensive on it, it's fine if you need something small to browse the web but not to program, you'll also need to change the OS.
No.19098
>>19096it also cant probably stream hd. its really only good for typing emails and documents
No.19104
>>19098You can also post
cute things on /nen/ with it!
No.21160
>>21159they were probably too lazy to write a prepared statement and a rest endpoint for it. if you bug them they might add it but it probably didn't cross their mind.
No.21344
>>21343I've always been scared of doing those NSA proof security things in case I forgot the password… I hope you can break the password!
No.21377
>>21343Can't you just take the CMOS battery out and wait until it resets?
No.21389
>>21377No, it's stored in the motherboard and I can't open it anyways, it's a Macbook Air.
No.21575
>>21572What is this gibberish
How do you make a webm (in terms Kaguya Runa people would understand)
No.21576
>>21575ffmpeg is a program for doing video encodingy stuff you run from the command line.
if you dont want to figure out the command line just download one of those GUI wrapper + ffmpeg webm converter programs
No.21577
>>21576Is command line command prompt? I just download ffmpeg and put that stuff into cmd?
No.21578
>>21577First you install Gentoo.
Then install ffmpeg and copy paste that stuff.
No.21579
>>21577i'll post a guide please wait warmly.
No.21583
You can add ffmpeg to your path, but thats a little complicated for someone new to the command line so I'll skip that.
(Sorry my cmd is broken and uses yen symbols instead of backslashes, I don't know why, wherever you see me type a yen symbol, use a backslash)
Everything after 1:24 is me just waiting for it to finish processing, so you don't really have to watch after that.
Steps:
1. Copy ffmpeg.exe to folder with video
2. Open cmd (Search for cmd in the start menu)
3. Change directory to folder with the file(use "chdir")
4. Run ffmpeg with the right start and end times for your webm
"-ss START" is the start time in the format "HOURS:MINUTES:SECONDS", so if you want it to start the webm at 20 minutes and 2 seconds into the video you would use "-ss 00:20:02".
"-t DURATION" is the duration after the start you want it to go for. Start with small numbers at first to make sure you have your start time right, since even a 17 second webm can take a while to make as you see.
"-t 10" tells ffmpeg you want it to create a 10 second webm starting at your "-ss START" start time.
"-b:v 1M" tells ffmpeg the bitrate you want to use for the webm. Smaller numbers makes it process faster, with a smaller file size but the quality ends up worse. The default looks pretty terrible(if you leave this part out of the command ffmpeg chooses the default which is really low)
Once you know "START" and "DURATION" you should use:
ffmpeg.exe -ss START -i filename.mkv -c:v libvpx-vp9 -b:v 1M -t DURATION out.webm
(Make sure to replace START and DURATION with the right numbers)
If any of this is confusing feel free to ask any questions!
Final product!:
https://a.pomf.space/qpfuembnbuwr.webm No.21584
>>21583>You can add ffmpeg to your path, but thats a little complicatedIs Windows really that dumb because it's one command in unix.
No.21585
>>21584It's just
"set PATH=%PATH%;C:\ffmpegdir\bin"
but if you add an extra space, or forget a semicolon or something you can mess things up and its difficult to fix, which I assume is the same problem on linix.
No.21586
also for someone new to CLI I think its best to keep to as few commands as necessary (I hope henri can figure out what I meant to do with chdir because thats probably pretty confusing to someone new)
No.21587
>>21583Your cmd isn't broken. The '¥' is just there because you're on Japanese locale, or otherwise somehow changed your code page to 932. For whatever reason the identifier for '\' was considered the best place to put '¥' in the Japanese code page.
No.21588
>>21583This is why you use cygwin.
No.21589
>>21583a couple of notes!
- if you don't want to put ffmpeg into your PATH you can cd (change dir) where your ffmpeg.exe is, write ffmpeg.exe, and just drag and drop the input file into the cmd prompt (technically i guess you could also drag and drop ffmpeg.exe into cmd)
- you don't have to calculate the duration yourself if you use -ss and -to
- you can use milliseconds in HH:MM:SS.xxx format, e.g. -ss 00:01:03.450 -to 00:01:15.250. you can see milliseconds in mpv if you click the time elapsed text
pic has my personal ffmpeg notes but they might need some updating because i haven't looked at them in a while
No.21590
>>21589I do it that way because for big mkvs
ffmpeg -ss 00:20:00 -i … -t 15
seems much much faster than
ffmpeg -i … -ss 00:20:00 -to 00:20:15
No.21591
>>21588No need for Cygwin now that we have
Windows Subsystem for Linux[1]
[1]
https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux No.21592
>>21591i put off the free windows 10 update for too long now im abandoned on windows 7…
No.21593
>>21583>>21587Oh mine does that as well, I never realised that was because of my locale. I thought it was just some weird thing and that it did that for everyone
No.21596
Does the yen thing make a difference? \\\\
\\\\\
(these are currently visible as yen)
Sometimes it shows as the yen symbol but is still a back slash.
No.21597
>>21596What do you mean those are currently visible as yen? I thought the locale thing was just for things that aren't unicode. There's no reason why a backslash should look like a yen when viewing this site as far as I know.
But if a backslash does show as a yen it shouldn't make a difference, the computer still thinks it's a backslash, it's just displaying it to you as a yen.
At least I think this is how it works, I might be 100% wrong, so hopefully if I am someone will correct me
No.21598
>>21596I also found an easier way. If you hold SHIFT and right click in the windows explorer it lets you open a command window right there.
Then you can just type:
ffmpeg.exe -ss START -i "filename.mkv" -c:v libvpx-vp9 -b:v 1M -t DURATION output.webm
inside the new command window, replacing START, filename, and DURATION with whatever numbers fit.
No.21600
>>21598Woah I didn't know you could do that! How
cool and useful!
No.21618
Remember to tell ZUN and eroge developers to use industry stansard UTF-8 so pirates in the west don't have to go through this locale switching mess.
No.21725
>>21722You don't have to worry about being efficient if you're not very experienced. Just make stuff and over time you'll get better at doing it more efficiently. As long as what you make actually works it doesn't really matter.
Nobody will see the ugly spaghetti code in your
cute anime game anyway.
No.21726
Are there any fun and easy to understand guide to start learning programming? The books I've tried so far has me losing interest quickly.
No.21732
>>21726I had the same problem. It's hard to stick with it unless you have some kind of real goal to work toward. I guess this is where school helps, since you're forced to do assignments or else you fail.
No.21733
>>21726I found beej's guide to C programming fun and easy to follow.
No.21737
>>21726I don't even remember how I learned. There isnt that much to programming, once you understand branching, loops and variables. Then once you understand the basics of functional and object oriented its mostly just practice, and stumbling along until you figure out better/cleaner ways to make things. I will say that reading partway through an introductory book is important though, so you learn some jargon you can use to look up questions you have when writing programs.
>>21732Yeah, doing any of those daily programming websites is a good idea when you're starting out, since a lot of the problems I had were based on "you don't know what you don't know(and so you don't know how to look it up)".
No.21794
Wow minasan thank you for all the ii responses. I will look into the recommended resources and the other advices are all very helpful as well. I suppose I have been jumping into the whole subject without much thought or purpose, I will carefully reflect on it. And certainly, being clueless of where to start is a huge problem.
No.21838
>>21837Indeed!
You forgot one of the most important parts, namespaces!
In plan9, the way a process sees the file tree can be modified on the fly, you can make files from one place appear somewhere else. And you can do this transparantly on remote files, it works the same even if they're far away.
That '9GRID' thing is a subrio(you can start the window manager again in a window, so you do that instead of 'workspaces') with some remote resources mounted in its namespace, so people using them can chat by writing to a file they can all see and write, for example. Or, you can create a specialized workspace for yourself, then start a subrio to work in, for it. I did that fiddling with fonts a bit.
You can do the same kinds of things big heavy messes like docker provide people, special environments that only see what they need to and dont conflict with each other, just from one of the basic principles the system was built out of.
No.21842
>>21839Plan 9 is an operating system, like Windows 10, macOS or Android. Plan 9 has lots of unique features to connect your computer to other computers on the Network, including being able to 'share' your CPU (like your computers' brain, almost all processing goes through it). Then another computer can load it and use it like their own. A practical example of this would be loading a server's CPU onto your small netbook and then rendering a large movie on it, borrowing the processing power of the server while still rendering it locally on your own machine.
No.21845
>>21844No because the only thing that's being shared is the CPU; no data is actually saved onto the server to download back. Hosting and being connected to a CPU would use a lot of bandwidth though that's true, so its not really feasable to do that over the internet. Local networks (connecting to another computer on the same router) are plenty fast though with 10 gigabit becoming the standard on consumer hardware.
No.21848
And the fact that you can share your cpu like that is just a natural extension of the fact that you can share anything on your system like that! And other systems can use what you share from yours as though it was on theirs to begin with. They just see files, it doesnt matter if they happen to be located somewhere else in the world.
This pairs with the fact that everything is a file. Your audio is a file. You could have internet radio by using someone elses /dev/audio
No.21854
>>21850Nenman knows to only use png
cute.
No.21858
>>21794I think the most important is to just pick a book that seems
cool and stick with it until you finish it. Many people seem to give up at the first difficulties or spend all time time trying to find the perfect book.
No.21859
>>21858i dont think its important to finish a whole book. usually they have chapters that teachers will skip anyways, like dynamic programming, or using that languages database API
No.22886
https://news.ycombinator.com/item?id=16535886saving this link here in case anyone wants to learn a
cute cake language
No.22887
>>21859Why would you want to skip dynamic programming? (inb4 idk because I skipped it)
No.22890
>>22887It belongs in a book on algorithms, not a book about learning a language. Its more useful and easier to learn it in the context of pseudocode than an actual implementation in a language textbook. You also will probably almost never see a problem that has optimal substructure(and isn't premature optimization, AND isn't handled by your library) outside of "coding problem of the day" type questions.
No.22912
>>22908You should start with something easier first
No.22947
>>22946I use tags to get around this
No.22956
>>22947Would be much better if it allowed boolean searches on tags though. There's no way to select everything without the archive tag except by creating a tag or category that has all that stuff in it.
No.22959
>>22946>I've seen this sort of deadlock before with open source projects, where the devs don't personally see any need for something but there's obviously some set of the userbase that wants it.Well you can make your own fork! Just be sure to never fork GNU software, because it is harmful to the free software community by drawing attention and effort away from the GNU project.
No.22961
>>22959Remember to relicense your fork as GPL too!
No.23245
how do i learn how to use git
No.23257
>>23245you really only need to learn "branch", "add", "commit", and "push" and what they do
No.23262
>>23257fetch, pull, and rebase too!
No.25757
No.
No.25960
>>25950
The art is pretty, but yeah I agree that it looks like a flash game quality so I'm surprised people would pay 5$ for it
No.26273
>>21572>>21583>>21589Because I've been having trouble with this the past few days:
Remember to use "-vf format=yuv420p" or "-pix_fmt yuv420p" because some media players(firefox and apple grr!!) are silly and can't do yuv444p yet(or maybe they can I'm not too sure but 420p works so I'm sticking with it from now on
https://trac.ffmpeg.org/ticket/5276?cversion=0&cnum_hist=5)
yuv apple ffmpeg firefox corrupt file No.26343
>>26336
Phew lets see its been a while since algorithms class but this seems to mostly work:
public class MyLinkedList {
Node head;
int length;
public MyLinkedList() { }
public void add(int data) {
if (head == null) {
head = new Node(data);
length = 1;
} else {
Node temp = head;
while (temp.next != null) {
temp = temp.next;
}
temp.next = new Node(data);
length += 1;
}
}
// Sort ascending
public void sort() {
Node last = null;
Node curr = head;
boolean performedSwap = true;
while (performedSwap) {
performedSwap = false;
curr = head;
while (curr.next != last) {
if (curr.data > curr.next.data) {
// Swithc curr and next positions
swap(curr, curr.next);
performedSwap = true;
}
curr = curr.next;
}
last = curr;
}
}
@Override
public String toString() {
StringBuilder out = new StringBuilder();
out.append("[");
Node curr = head;
while (curr != null) {
out.append(curr.data);
curr =curr.next;
}
out.append("]");
return out.toString();
}
private void swap(Node first, Node second) {
int tempData = first.data;
first.data = second.data;
second.data = tempData;
}
public class Node {
int data;
Node next;
public Node(int data) {
this.data = data;
}
}
}
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
MyLinkedList list = new MyLinkedList();
list.add(3);
list.add(4);
list.add(5);
list.add(2);
list.add(1);
System.out.println(list.toString());
list.sort();
System.out.println(list.toString());
}
}
No.26345
If you need to do quicksort, mergesort or anything else nlgn then hopefully you have the CLRS algorithm book which has a nice chapter on sorting if I remember right
Also holy heck thank goodness for the Stream API and comparators and every other nice thing you get to use in real programming!
No.26390
Let's brainstorm some ways in which nenmin can implement an option for japanese/western post name ordering!
No.26391
>>26390A checkbox in the options menu, stored in a cookie. Wherever its generating the thread or whatever check for the flag and either use western or japanese order for the name.
Actually maybe not, because it probably picks the name whenever you insert a new row into whatever Post or Thread database table it uses.
I guess it could still work but you might accidentally swap the name order of someone who manually uses a characters name in Western order, but that's probably not too big of a deal.
Something like
<name>
<?php
$japOrderCookie && $NAMES->get(post->name) ? echo $JAPORDER_NAMES->get(post->name) : echo $WESTORDER_NAMES->get(post->name) ?>
</name>
I'm not actually sure if thats valid php but something like that could work.
No.26392
>>26391How about each post has an ID that queries the SQL teeburu and prints givenName and familyName in order according to client preferences?
Cons include a lot of queries per page load and it might be very intensive for nenmin's server-chan.
Perhaps you could have an implementation with php $_GET but it would have to be updated everytime someone posts and isn't much better.
Perhaps the best solution would be if the server had a default naming order and then the swap was processed client-side through JS or something!
I'm sorry, I'm still learning so I don't really know much about it. Sorry for my bad ideas.
No.26393
>>26392One thing to keep in mind is how vichan is already built, and trying to make your version not too forked so you can still update to new versions without having to deal with merge conflict.
Thats why I think the cookie approach is probably fine. You don't end up change too much of the php code thats creating post/thread html, and you don't mess with the database by adding new tables or changing columns around.
While it would be ideal to do it in javascript(so you wouldn't have to refresh after updating the cookie), keeping logic centralized in the php that builds the html is nice.
No.27758
I'm making HUEG spaghetti android app with java!
Wish me luck!!
No.27759
>>27758dont forget the pesto!
No.27935
Does anyone know a library or other way to get groovy and java compiler output in a machine readable form?
Right now I'm just dumping the Stream into a temp file and running javac/groovyc and reading exit codes and redirecting stderr.
No.28975
can /nen/ do K&R exercises?
In C, write a function that reverses a string in place recursively.
I'll post my solution and my favorite one from the solutions wiki if anyone else thinks of something.
No.28977
>>28975I gave up after the first segmentation fault
No.28979
>>28977I bet your code tried to read before the start or after the end of the string in consideration. だめです!
No.28981
>>28979I was getting segfaults on mine because I forgot about the difference between char var[] and char* var.
No.28984
>>28982That looks like a lot more code than one needs.
I'll post my solution and my favorite someone else did.
Don't look if you want to write your own, though.
https://pastebin.com/aqFq5FF8explanation:
One passes it two pointers to the beginning of the string. as it climbs up the stack, it collects each character of the string into a local variable to each call of the function. then as it cascades back down the stack, it assigns into the string. when f is at 5 in 12345, l+strlen(f)-1 will be 0, at 4, 2, and so on. No.28987
>>28975I couldn't think of anything really recursive, so I just transformed the iteration...
http://sprunge.us/0WckGE?c No.28988
>>28987Thats not bad at all! Its similar to the favorite solution on the wiki I posted.
No.29902
>>29898I installed Arch and it's pretty fun, but I wouldn't be able to do anything if I didn't use Google because figuratively almost everything was missing something or wasn't configured properly. As in installing bootloader for dualboot, Xorg, i3, and even the /home partition from my old Linux distro that I forgot to change owner and permissions so every time I tried to run something it wouldn't work.
Well, if you need anything just ask.
No.29904
>>29903software freedom and os level privacy are good reasons to use linux even if you intend to use a windows like system.
Besides, command line is an entirely different way of using the computer that has to be learned over time if what you leaned first was a windows style of computer use. It's to be done in incremental steps. Most people I see on imageboards who prefer it really miss the point anyway and just use GUI programs that happen to represent the GUI with text, or just memorize the usage of special purpose programs with too many options.
if you want to learn to use the command line, by the way, I recommend using the 'rc' shell.
No.29908
All I do with my computer is programming, browsing the web, watching anime and playing vns.
Linux is no good with vns so it doesn't satisfy my need, dual-booting is annoying I don't recommend it you'll end up always using the same OS.
No.29909
>>29908uh, I boot into Windows when I want to read my vns. You're the typical code monkey, can only do programming but doesn't know how to set dualbooting up.
No.29911
>>29909Well how much of a pain that is depends on how often you play VNs. I'd probably run windows by default if I played more wine-incompatible vidya more often, but wine works for most of my stuff so its fine.
>>29910excues me (´
・ω
・`)
No.29912
>>29909Rude but I don't want to stop everything I'm doing everytime I want to read a vn and I prefer to have things always ready.
No.29916
It's simply impossible to discuss programming nicely.
No.29946
Although I always put the opening brace on the next line, I believe I can be frens with those same-line weirdos!
No.29959
>>29954Plain WM's dont /necessarily/ require so much customization, depending on which ones. This is a problem with...I guess its a problem with the linux community, mostly.
I hear the BSDs are better about this. I just customized my system to a nice, usable state and havn't touched the configurations much at all since.
No.29962
>>29961They also exist in cmd scripting. findstr is sort of a barebones grep, but you can also install mingw32 or something equivalent to get access to the rest of the commands you would expect.
https://ss64.com/nt/syntax-redirection.html No.29966
>>29961
Oh you don't need to sell me on Powershell, I do love me some Powershell and even bought a hard copy of the Month of Lunches book for it, but it's a completely different ball game from sh scripting and has its weaknesses depending on what you want to do (I wouldn't use it to do any large scale file operations and obviously sh is better with streams of text)
No.30362
>>6550Does it mean that python and LISP for
gays crossdressers only?
No.30365
>>30362No, just that they're the best at it.
No.30372
>>30362Yes, whats the problem are you some kinda breeder?
No.30387
What text editor does nen use? I was thinking about trying out vscode again and maybe making a nen theme for it
No.30388
>>30387yucky
I use sam and/or vi.
No.30389
>>30388wow, way to be elitist about it...
No.30390
>>30387notepad++, it was the first one I found and I just stuck with it.
No.30391
>>30389We're talking about text editors. Elitism and text editors are inseparable.
No.30396
I bet nenmin already made the nen theme for their editor of choice so I'll just wait for their post
No.30399
>>30389I'm not implying im superior, just that vs is bad.
No.30403
>>30400>>30402I tend to do more with scripts actually though. I wrote a flashcard program with the same spaced repetition system as anki in rc.
No.30411
It's not /nen/ theme but emacs has a moe-theme which is very
cute:
https://github.com/kuanyui/moe-theme.el No.30414
>>30410Emacs is almost more like a lisp-based OS run as an applicaiton than just a text editor.
Some people say its bad because its too big and multifunctional, but it seems like thats missing the point, its not that dedicated emacs fans want a very intricate integrated editor, its that they want a lisp based computing environment.
I don't use it, but I might try it if I ever decide to learn a lisp.
No.30429
I'd like to use emacs but it looks hard
No.30438
>>30429You can do it, I believe in you!!
No.30453
>>30452Start emacs, press Control+h then press t.
No.30455
>>30452ctrl x, ctrl c hehe
No.31058
I see a lot of misconceptions in this thread about GNU Emacs so I'd like to make a few corrections!
First is the idea that Emacs is a text editing environment or more specifically a programming environment. It's more like an everything environment. Imagine if your text editor, spreadsheet software, mail reader, file browser and web browser all worked in one place, integrated with each other and all worked consistently in the same way. That is the joy of Emacs.
The other is that Emacs is a thing for lispers. The truth is that you don't have to care about Lisp at all to use Emacs. Of course knowing the fundamentals of lisp will enhance your experience, just like knowing to program will enhance your experience using GNU/Linux. I care to know only the very basic fundamentals of Lisp and get by fine with Emacs.
Finally is the idea that Emacs is hard. Emacs is one of the easiest pieces of text-based software ever written. It is extremely accommodating of new users, with evil-mode for users used to vi-keys to "CUA Mode" for people who have "Notepad Keys" still in their muscle memory (Ctrl+C Ctrl+V Ctrl+A for Copy, Paste and Select All respectively, for example). People complain that Emacs keybindings are difficult and arbitrary but the truth is that most keybindings are extremely stupid and arbitrary no matter what software you use (Ctrl+C to copy, okay, Ctrl+V because it's next to Ctrl+C? Cut is Ctrl+X because ???). Emacs has multiple keybindings for most common tasks though, so just use whatever you prefer. I much rather use arrow keys + Pg Up/Pg Down to navigate than M-v for page down.
For anybody who would like to use Emacs, I recommend not reading the tutorial on the startup page. It's older than the dinosaurs and better made for someone who is entirely new to computers. Read the documentation with `C-h r` (Ctrl+h r) and don't force yourself. Also I recommend adding "alias emacs='emacs -nw'" to your .bashrc to enable easy editing from a terminal.
No.31075
>>31058So its an operating system
No.31169
>>31075I'm of the opinion that the kernel is the OS so I would say it is not.
No.31240
>>31169Thats a silly opinion, the OS is the computing environment. UNIX utilities, shell features, and other userland things are just as important to it as an OS as kernel level things.
In the development of plan9, important functions will switch between the kernel and userspace libraries as the developers see fit, but the OS doesnt gain or lose features in that process. for another 9 example, the first code written that would become plan9 was a C compiler, a userspace program.
No.31241
>>6887>>6933>>6936>>21591>>29898>>29902>>29903>>29904>>29908>>29954>>29959I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
No.31457
Post the 'bugs' line of your /proc/cpuinfo file!
>bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mdsSome admins are reporting as much as a 25% hit to performance because of all of the CPU bug mitigations.
https://www.zdnet.com/article/fending-off-zombieload-attacks-will-crush-your-performance/CPUs were a mistake...
No.31460
>>31457>fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypassHrrmmnn
No.31469
>>31457Meltdown was the one with the really big performance hit, right?
No.31472
$ cat /proc/cpuinfo | grep bugs
bugs:
bugs:
bugs:
bugs:
No.31473
also i know i can just use grep I just got in the habit of using cat | grep
No.31474
>>31457bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mdsMy poor T61... at least it has a X9000.
No.31479
>>31458Very smart of you anon. I was looking on ebay and found a decades old Acer eee pc, absolutely hideous and probably a battery life of 2-3 minutes but at least I would be truly secure.
No.31483
I wonder if all these bugs are why my computer feels so slow now. It used to play games just fine a few years ago but even booting up those old games now they seem so choppy and slow
No.31485
I wonder if all these bugs are why my computer feels so slow now. It used to play games just fine a few years ago but even booting up those old games now they seem so choppy and slow
No.31488
>>31484
>>31486
Please try speaking in normal human language.
No.31490
>>31489
children what's that sound
No.31491
>>31486
yeah my cpu is a wibbly wobbly 10 years old, I probably need to get a newer one but then I'd have to get a new motherboard and ram and thats just a whole lot of money.
No.31494
>>31488uwu saikin my pc-chan is osoi to okiteru i wonder if she's getting tsukareterued because of her toshi wwwwwwwwwwww gets muzukashiier to miru my doggo dougas mainichi everyday wwwwwwwwww
No.31503
>>31500
nenning softly with pcfren
No.31505
>>31473Thats absolutely fine, it makes no difference
Dont listen to people who fuss over pedantic things like that.
No.32597
>>32594
learn C
No.32598
>>32597Do you have a good book to recommend for someone with no prior programming knowledge?
No.32599
>>32594
print(type(variable))
No.32613
>>32594
That's because Python is a crap language, you're getting tricked into thinking its a good or usable language because it was a fad language 10 years ago like Rust is today and there's a bunch of python code lying around that people have to maintain now. If you really want to learn a new language you should learn C++ or Perl.
No.32624
>>32598yes in fact
Beej's guide to C programming
First programming book that actually made sense or helped for me
https://beej.us/guide/bgc/ No.32626
>>32613Python, C, C++ and Perl are bad languages. Learn F#, Elixir, LISP and the like.
No.32633
pythons lambda syntax is atrocious and list comprehension is not a fine substitute because its literally unreadable, I want my map and filter to go on separate lines
No.32635
>>32626This is a functional programing nerd
Functional programming is
cool, but dont embrace everything and anything such people say blindly, they're too invested in one idea.
No.32948
So a few nights ago my wireless router's antennas fried and I had to get a new one. It was super old, one of those blue Linksys WRT routers that you could flash all sorts of firmware on. Anyways do your research and read reviews before buying routers, because there's some really crappy and quite frankly scary routers they sell at the stores. One of them was reported to transmit all your traffic to a 3rd party 'for your security' (Cheap ASUS thing). I got a TP-Link router that had some really weird stuff built in including a bittorrent client but thankfully it was extremely simple to flash DD-WRT onto it.
No.33645
>>33644I was told the rust compiler gave really good error information
No.33648
>>33644Rust is a mess and cant even compile itself, but the crab is
cute.
No.40577
I got a thinkpad T430, that usually have a low-res bad quality panel, and put a 2560x1440 screen in it.
this required a replacement lcd cable which has a little display converter daughterboard in between the screen and the computer, which I got off ebay, from a chinese vendor, with little documentation besides a list of compatible panels
it works!
im happy and suprised nothings gone wrong.
shes named after moriya suwako
No.40590
>>40577Thats very
cool, I've never tried to mess with the parts in a laptop since it always seemed to challenging compared to adding a hard drive to a tower or whatever.
No.40593
>>40590its mostly easy, except taking apart the plastic parts that fit in with snaps, on the main body and the screen. Thats tai tai taikirai every time.
No.40705
>>40704be careful to make sure you're grounded and don't damage anything with static shocks. otherwise its pretty much legos unless you're doing something really exotic like water
cooling or whatever.
No.40706
>>40704You're gonna snap your motherboard in two when your CPU
cooler doesn't want to fit and your RAM just won't seat rightly. Your graphics card will fall out of the slot.
Also your front USB hub won't work.
No.40707
>>40704Good luck! Make sure to assemble it
naked to minimize risk of static electricity buildup from clothing.
No.40708
I find it very hard to stomach that some people think building a pc is an achievement or skill. You are inserting cards into slots.
Just my 2 cents
No.40709
>>40708This seems a bit pessimistic. Theres nothing wrong with people feeling pride in accomplishing something. Do you feel the same about somebody baking a recipe and feeling good about making something tasty?
No.40710
>>40708Oh yeah well my mom is always very proud of me every time I upgrade her computer...
No.40716
I'm always anxious the first time I switch on a computer after I changed something inside it...
No.40813
>>40708No it's not a difficult task (except for the pins, the pins are tough) but it is still quite anxiety inducing because of how expensive all of the equipment is and there's a great sense of relief when the thing's finished and everything boots up.
>>40706I didn't buy a GPU I got a Ryzen 3 3200G APU because I'm still poor after all. It's a good PC though! It plays Slime Rancher, which is all I wanted...
No.40942
>>40941Maki committing election fraud...
No.41074
>>41040There are de-googled android forks which don't do much beyond the de-googling, idk what they're like though.
No.41088
>>41074I just decided to enable all of the google crap and quit fighting. It's too much work and I'm too tired to care about stuff like 'privacy' nowadays...
No.41099
>>41088Same here, I just gave up on trying.
No.41102
I just keep using an old phone and never update it. I'm on the last version of lollipop they launched (5.1 something) and can't be bothered going further. Everytime i had updated it in the past it changed something i didn't want. There are a few things that got patched but lots of i just don't like. I know my phone will eventually break or breakdown or wear out, but for now, I'm sticking with it.
No.41622
Quickly nen, i need urgent help, how i use vscode with bitbucket??
I'm complete gittard, I've only ever used it twice to make changes to this, once for class, and once for an open source game.
Company put aliases file on bitbucket now, I used to just have to open it in vim, do my change, then save and run newaliases. That's all automated now, how i use git commands??
So far I've:
>cloned the repo, making local copy
>made my change, saved the file, then i committed with a message as per etiquette.
Now what i do? My colleague who rolled it out just said "make change, then push", great glossing over everything important!! i try to push, but it say "can't push refs to remote. try running pull first to integrate your changes" so then i run pull but that does nothing. idk maybe it coz it bitbucket and is different or that I'm not authenticating right, (but i clone it just fine, so auth should be okay?)
I hate this i wish i was coding when i was a teenager and then I'd be actually fucking half decent with this shit by now I'm so disappointed in myself i see now it already been updated by a colleague, i could've done it 30 minutes ago and looked proactive and stuff, this is why I'll be stuck in shitty fucking helpdesk ticket monkey role forever I'm crying nen why am i like this? I can't I'm cry i just just I'm too old I'm dying i want to die everyone is so much better than me, i have nothing left to offer
No.41623
This is so unfair, I actually started coding when i was a kid, before a teen, I was 12, i started with Java, but people discouraged me because of the "IDE" i was using (it was judo - java for kids) and they never offered anything like this in my school later as a teenager and i should've just stuck with it but i was so discouraged and hurt and people bullied me for being a nerd and now I'm almost 30 and I'm a fucking loser with no achievements, no bf, no house, no car, no code, nothing. I'm sorry I'm sorry nen, i feel so hurt coz i couldn't edit a fucking text file.
No.41624
>>41099With uMatrix now being officially archived, and thus abandoned by gorhill, I am about ready to give up the battle too. It's a never ending, uphill battle with the browser stuff and I'm sick of having to change my whole setup every year.
No.43211
>>43205It turns all the anime girls into monsters
No.43219
>>43214mytosis, splendid1
No.44951
find -name "*.flac" -exec ffmpeg -i "{}" -ab 320k -map_metadata 0 -id3v2_version 3 "{}.mp3" \;
a nice one line script to convert all the files in a directory from flac to mp3 while preserving the metadata. Has been very useful while converting some of my playlists so I can fit them on my phone
No.44953
>>44951Why don't you use .opus? It is supported on android since ages, FOSS and takes up much less space
No.44971
>>44953all my songs are in mp3 or flac and i dont feel like converting hundreds of gigabytes of mp3 to opus
No.44973
oh and also im scared of lossy -> lossy transcodes and something going wrong and a whole album getting messed up and not noticing until I really want to listen to it
No.44975
>>44971>>44972you could just adopt it gradually and walk back on it if anything goes wrong, I'm not saying redo the whole library, just maybe go opus when you do a new batch and see if it works or not
No.45255
Hello, can someone please help me with c++? I'm learning but I'm used to other languages that are more loosely typed.
I just want to bundle my int arrays into another iterable container cleanly/minimally so i can go over all of them. They have arbitrary number of elements so I'd rather not have to literally count them up myself and hardcode them, which I'm learning seems to be the norm with simple things (let the compiler do the counting?).
There aren't code blocks on nen, sooo uhhh, aa?
int input0[] = {5, 3, 1};
int input1[] = {4, 2};
??? inputs[] = {input0, input1}; // ?????
pls don't bully me... (´・ω・`)
No.45267
>>45259Vector has a copy constructor, you could use that:
std::vector<int> v3{v1};Since C++11, you can iterate through the elements instead of having to write out the iterators:
for (int element : v3) {
std::cout << ' ' << element;
}
>>45255If you want to use arrays, this is how I would do it in C++:
#include <algorithm>
#include <array>
#include <iostream>
int main () {
std::array<int, 3> input0{5, 3, 1};
std::array<int, 2> input1{4, 2};
std::array<int, input0.size() + input1.size()> inputs{};
std::copy(begin(input0), end(input0), begin(inputs));
std::copy(begin(input1), end(input1), begin(inputs) + input0.size());
std::cout << "Elements of inputs:";
for (int element : inputs) {
std::cout << " " << element;
}
std::cout << std::endl;
return 0;
}
No.45277
>>45255consider yourself bullied
No.45291
>>45259>>45267>std::array<int, 3>>std::array<int, 2>hmm, but why do i have to count my elements like this? i'm lazy, and want the compiler to do it for me... is this just something I have to get used to?
I like the vector idea, it's about as compact as I'd like. But it looks like C++ just isn't like what I'd like it to be. That's fine too, I guess it will just take a bit of time to adjust to the language.
No.45298
>>45291Since C++17, you can actually write
std::array input0{5, 3, 1}; No.45340
>>45291yeah there isn't any sort of spread operator(what I assumed you were thinking about) in c++ as far as I'm aware
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax No.45791
>>45790that sounds awful, but don't delete, other users will probably like it...
No.45827
>>45790you can't run away from me