No.444
>>434Frontend is hell. It doesn't require any intelligence or though, and so the tools are not only made by retards but also for retards. It's bloat on top of bloat with the underlying logic ranging from non-existent to inconsistent.
I hope I'll never have to touch it again in my life.
No.447
>>444And everyone and their mom has an option and a new framework.
At least people have mostly settled on React for now, the worst was back in the early/mid-10s when it was just new toys every other week. At least I have a good job now and don't have to worry about that shit anymore.
(am a front-end dev, been regretting my life choices for years now)
No.449
>>444I personally wish to believe the issue was that we were given a very tight schedule. If I was given a bit more time, i would have been able to understand most of the things that I did fairly well.
I got the thing done now, so that makes me feel at peace. But personally I believe I should at least have been given more time to work with.
Also, I share your sentiment. JS is not for me.
No.2297
So I just got my fresh Openbsd7.5 installed.As you can see, I'm very new at using this OS. It's still in barebone condition with fvwm running as default gui. The best part about this OpenBSD installer is that It came together with mandatory full disk encryption setup. Though, I'm still not used to some of the commands. Like for instance, how do you look up for all the openbsd packages that already been installed?
Anyway, according to guide I followed here
https://www.tumfatig.net/2024/openbsd-workstation-for-the-people/, I need a proper DE for my computer. All the DE that are available in Openbsd doesn't seem to suit the taste of my liking. I like my DE to be extreamly low resource usage. That DE where I'm looking forward to use is known as the Equinox Desktop Environment (EDE).
Let me tell you some my experiance using EDE on archlinux. Unforunately I didn't manage to get it running properly. It was borked from the get go where all the application I have from the start menu were not functioning. I was quite dissapointed by it, although I do read somewhere that there were success story of anon running it on Devuan. Maybe that is why I shouldn't give up just yet because I really want this DE up running flawlessly.
So given the option here, It looks like theres 2 methods on how to get this EDE installed on Openbsd.
The 1st one is to compile from source according to instruction here
https://edeproject.org/wiki/installingfromsourceThe 2nd one is by using their install script called netinstall. Everything about netinstall is decribe here
https://edeproject.org/wiki/netinstallThe 2nd option looks a lot easier, but I dont know whether this actually works. Well, I think it doesn't matter whichever of the options here, wish me luck anon.
No.2298
>>447>>449start working in typescript, guys! it's nicer to work with than JS!
>>2297huh... that seems kind of hard. EDE reminds me of windows 95. why not use a DE like XFCE, though?
No.2300
>>419I only have 100gb storage for my computer. After the installation,that has reduced the unused capacity and gave me the remaining 30 gb each on root and home directory. I don"t want anymore bloat hogging my free space.Other than that, xfce sometimes have its quirks with dbus which make DE to stalled on some rare situation. I have to restart my display manager if that happens.I have also used xfce for very long time, I think want another flavor of DE.
No.2304
My tower has finally broken. After half a decade of steady sevice and four operating systems it's finally kill. Ethernet port (built directly into the motheboard) broke mysteriously and I can't get any internet period (currently phonefagging at work). Though it was having serious overheating and regular freezing for a long time, I really should have replaced it long ago. Thinking of getting a laptop/dock combo to replace it, any recommendations? I don't need much power, but enough to do light compiling and video encoding without completely locking up. I also want hardware that will run linux hassle free (I never want to deal with nividia drivers again) and isnt completely locked down, that last ones the real kicker; it's so hard to find modern laptops that you can even replace the battery on. I remember hearing about a company making modular laptops that as I recal sound perfect for me, but I can't remember their name; currently trying to find that.
No.2310
>>2309>>2307>>2306>>2305>>2304Damn it this is why I hate phone posting. Admin please fix.
No.2312
>>2300Not a DE but one of those super ligt WMs like DWM is your best bet if you want yo really minimize resource usage. Takes some configuring but you could always just take the source from larbs.xyz (or hell, port the whole script to Openbsd).
No.2313
>>2304>it's so hard to find modern laptopsThat's the real problem. If you don't want all the shitty drm locking up your hardware, you have sacrifice from using modern hardware. I still using AMD Desktop pre 2013 era and I maintain in a good condition. Even my laptops runs on old amd processors from 2009. Of course you need a good CPU fan and thermal paste for your pc to be resistant from overheating. A big desktop casing also helps the air flow ventilation and keep the tempature of your pc under control.
>it was having regular freezing for a long timeYou also need to check whether your PSU or your power supply are powering enough voltage. In your bios, you could see the voltage status for 12V 3.3V and 5V. If for instance, your 12V doesnt reach enough threshold (e.g 11.734v). You're going to have freezing problem. To mitigate this, you can try tune the voltage usage up by 0.01v for vcore and nothbridge until you reach the stability of 12V threshold.
No.2314
>>2300this post were refering to this anon
>>2298 No.2315
>>2312Can window manager like DWM handles systray indicator? I have some application that needs systray panel for indication. If possible, I dont want to use a saperate program just get systray panel at the corner of the screen.
No.2327
Stopped my decade long procrastination streak and started learning c++
Random side note, I've been on kde for a while and it's not bad (it freezes sometimes) but if/when cosmic reaches debian stable's repos (good luck with that) I'll definitely switch
No.2329
>>2313I would suggest going a bit forward, up to Broadwell (Broadwell is a hard limit, Skylake is where things came downhill) most intel are quite usable nowadays, I have a desktop with a Haswell xeon and works quite well.
No.2338
Quadposter here to say thanks for the suggestions and that I've found the brand of modular laptops I was rembering: Framework. They do seem really nice on paper but I wonder if their build quality is up to having whole sections like the keyboard being removable. Also doesn't seem them or system76 make the drop in docks I was hoping for. And in looking into laptops I'v realized I really like bulky my 100% keyboards and laptops just don't have them. Maybe I should just get a new desktop instead. Or follow the hype and look for an old thinkpad on ebay.
I'm over reluctant to buy things at the best of times, combined with decision paralysis and the fact that I have do do all my research and eventual buying on my phone is making me put this off far too much. I should just buy something dirt cheap and get something else if it doesn't work.
No.2356
>>2338I think Panasonic Toughbook's over past few years do modularity better than Framework because the modules arent all same size so they allow more options. Some laptops do have 100% keyboards, unless you mean a mechanical keyboard then that would have to be custom made.
No.2365
>>2363You know I actually hadn't thought of that. And there's a library just a ten minutes walk away.
No.2366
>>2356Toughbooks do look really nice. But that price... T_T At least for new ones; will look into used later. If they're half as durable as claimed should be a great choice.
No.2375
>>2315https://dwm.suckless.org/patches/systray/i3wm provides tray out of the box, if you use the built-in bar
https://i3wm.org/docs/userguide.html#_tray_outputAlso any standalone task bar should have a way to display such tray.
No.2384
>>2338>>2356True desktop replacement gaming laptops have mechanical keyboards.
No.2397
>>2388I like System76 for trying to be the Apple of the Linux world. I really like their Thelio desktop line.
No.2519
>>2517> grep - print lines that match patternsIt works only with lines. "grep -v lat" does not print anything for you because you only have one line and that has "lat" in it. Try:
> printf "what\nwat\nlat\n" | grep -v latIt will print both "what" and "wat" but not "lat".
What are you trying to do?
No.2520
>>2519Is there a way to make the invert result for word within one line? I think it has to use some sort of regex for it but I don't like remembering those complicated characters in regex just invoke the the invert result functionality. I would prefer a 1 liner solution if that possible.
No.2521
>>2520I'm not sure I understand, do you want to highlight everything but "lat"?
No.2522
>>2521yeah, discard the "lat" word and highlight the rest.
No.2523
>>2522This is a surprisingly hard problem... I think it can be done with PCRE, which is supported by grep, but it's not nice.
First, match for all words:
> $ echo what wat lat latte blat | grep -P '\b\w+\b'> what wat lat latte blatI bolded the whole but the spaces are actually not highlighted!!\w means "word" character, so not whitespace, and \b means the beginning or end of a word. Next, try a negative lookahead. It looks like "(?!PATTERN)" and means that whatever comes next, cannot match PATTERN.
> $ echo what wat lat latte blat | grep -P '\b(?!lat)\w+\b'> what wat lat latte blatThis did not catch "latte", because it starts with "lat"... Maybe a negative lookbehind would work? It look like "(?<!PATTERN)" and means that anything you matched before, cannot match PATTERN.
> $ echo what wat lat latte blat | grep -P '\b\w+(?<!lat)\b'> what wat lat latte blatThis did not catch "blat", because it ends with "lat"...
My solution would be to say, if it is three letters long and those three letters are "lat", don't match. The only way I know to express is to have three cases: less than three letters, exactly three letters, more than three letters. I ended up with this:
> $ echo what wat lat latte blat la | grep -P '\b(\w{1,2}|(?!lat)\w{3}|\w{4,})\b'> what wat lat latte blat laWhich is ugly as hell but matches words expect for "lat". Which might not be what you actually wanted...
The problem is that if it's not matching words, "lat" will inevitably get included in two parts, like first matching "what wat l" and then "at latte blat la", or something. Maybe there's an easier way...
Why do you want to do this?
No.2524
>>2523I finally figure it out. Sorry for bringing you into this hurdle. Im just trying to find what is the ideal solution on using grep -v in this situation. Isn't grep -P derive from Pearl regex? lol, there's no way I'm gonna use all these wierd syntax.
Anyway here's my take on this. I think the best method to discard any word that has lat from sentance or paragraph is by using sed. Convert all the spaces into a newline with sed and then, invoke the grep -v lat. Now every lat word has been discarded but I need to convert the non disacarded lines back into sentance. So the best way to do this is by piping it wih xargs, and there you have it.
>echo what wat lat latte blat la | sed 's/ /\n/g' | grep -v lat | xargs>what wat la No.2550
>>2520you could try to first pass it through sed and replace ' ' with '\n' so reverse grep can work
No.2729
That's how you do it kiddos
[code]
echo what wat lat latte blat la | awk '{ for (i = 1; i <= NF; i++) { if ($i !~ /.*lat.*/) { str = str OFS $i OFS } }; $0 = str; $1 = $1; print }'
[/code]
No.2730
>>2729Awksome! I wonder if it's possible just by changing the record separator, like this:
> echo what wat lat latte blat la | awk -v RS='[\n ]' -v ORS=' ' '/lat/ { next; } { print $0 }'But it prints and extra space at the end…
No.2733
>>2730It wouldn't be smart, because it wouldn't work correctly with multiline input. If you persist, you may do this
echo what wat lat latte blat la |
awk -v RS='[[:space:]]' '!/.*lat.*/ { str = str " " $0;} END { $0 = str; $1 = $1; print }'
This is inferior to the original solution, not even more readable or short or easy to understand.
No.2737
>>2734Don't worry friend I am not smart either
No.2798
>>2796You need to update CHOUR and CMINUTE in the loop, otherwise they will always have the value that you gave them at the start.
Another thing is that "date +%H | tr -dc '[:digit:]'" right now gives me 08, which is interpreted as an octal number by bash because of the zero at the start, and it complains that no octal number can have 8 in it. You can add a - to the date format to not have the zeros there, like "date +%-H".
No.2799
>>2798>"date +%-H"wow, that double qoute is really that important. Why it is like that dispite having piping to tr -dc '[:digit:]' would certainly get rid of all the non-numerics.
No.2800
Wait, there's still error
alarm.sh: line 10: date +%-H: command not found
alarm.sh: line 11: date +%-M: command not found
No.2803
>>2800Alright finally got this right, kind of confuse in the if statement that you need double square bracket dispite the variables are an expression of integer result. Aren't double brackets are for numbers arithmetic?
#!/bin/bash
IFS=":" read -p "Set alarm clock Hh:Mm " SHour SMinute
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " The Alarm is set at $SHour:$SMinute "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
while true; do
CHOUR=$(date +%-H | tr -dc '[:digit:]')
CMINUTE=$(date +%-M | tr -dc '[:digit:]')
if [[ $SHour -eq $CHOUR ]] && [[ $SMinute -eq $CMINUTE ]];then
mpv ring.webm -loop=inf -volume=400
else
sleep 10
fi
done
No.2804
>>2803For (( you need to use == instead of -eq.
No.2806
>>2803Uhh..I think this script is a bit broken, what if I have to input Hour and Minute that has octal number?? So I add some more code that would solve this issue for good. Basically this update would remove octal number on the input side. I hope this will fix everything that I needed it.
#!/bin/bash
IFS=":" read -p "Set alarm clock Hh:Mm " SHour SMinute
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " The Alarm is set at $SHour:$SMinute "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
conoctH=$(echo $SHour | cut -c -1 | tr -dc '[:digit:]')
conoctM=$(echo $SMinute | cut -c -1 | tr -dc '[:digit:]')
if (( $conoctH == 0 ));then
SHour=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')
elif (( $conoctM == 0 ));then
SMinute=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')
fi
while true; do
CHOUR=$(date +%-H | tr -dc '[:digit:]')
CMINUTE=$(date +%-M | tr -dc '[:digit:]')
if (( $SHour == $CHOUR )) && (( $SMinute == $CMINUTE ));then
mpv ring.webm -loop=inf -volume=400
else
sleep 10
fi
done
No.2807
>>2799>>2800Sorry about the quotes, I only added them to indicate that it's a single thing, but as you have already figured out, they shouldn't be added in bash.
>>2806Looking good, but what if the input is 08:08? Because you are using elif, only the hour will be fixed! What if someone sets the alarm for 25:64?
By the way, if you are feeling brave you could do the whole zero removing stuff in bash. Look for "${parameter:offset:length}" and "${parameter//pattern/string}" here:
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html No.2808
>>2807#!/bin/bash
while true; do
IFS=":" read -p "Set alarm clock Hh:Mm " SHour SMinute
if (( $SHour > 23 )) || (( $SMinute > 59 )) || [[ ! "$SHour" =~ ^[0-9]+$ ]] || [[ ! "$SMinute" =~ ^[0-9]+$ ]];then
echo "Illegal input"
else
break
fi
done
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " The Alarm is set at $SHour:$SMinute "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
conoctH=$(echo $SHour | cut -c -1 | tr -dc '[:digit:]')
conoctM=$(echo $SMinute | cut -c -1 | tr -dc '[:digit:]')
if (( $conoctH == 0 )) && (( $conoctM == 0 ));then
SHour=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')
SMinute=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')
elif (( $conoctH == 0 )) && (( $conoctM != 0 ));then
SHour=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')
elif (( $conoctH != 0 )) && (( $conoctM == 0 ));then
SMinute=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')
fi
while true; do
CHOUR=$(date +%-H | tr -dc '[:digit:]')
CMINUTE=$(date +%-M | tr -dc '[:digit:]')
if (( $SHour == $CHOUR )) && (( $SMinute == $CMINUTE ));then
mpv ring.webm -loop=inf -volume=400
else
sleep 10
fi
done
No.2810
>>2808Almost there, but you left a small copy-paste error in:
> SMinute=$(echo $SHour | sed -e 's|0||' | tr -dc '[:digit:]')The echo should be $SMinute, no? You repeat this twice.
No.2811
>>2808anon you should be using an actual programming language, with bash you will only keep bashing your head
No.2839
>>2812hrm. that pic sounds like a fun DIY project…
>>2814it's good to learn both. i'd rather just program in kotlin, though…
No.2907
>>2906When an integer reaches the limit of its type, it's called an integer overflow/underflow. On some CPUs this will cause a fault, but usually it just wraps around. Wrapping around means that with an unsigned 8-bit integer type, 255 + 1 = 0, 255 + 2 = 1, 255 + 3 = 2, and so on (also 254 + 2 = 0, 254 + 3 = 1, you get it). With signed integers, wrapping works the same way, but it starts with the negative value. For a signed 8-bit integer, 127 + 1 = -128, 127 + 2 = -127. And the other way, too: -128 - 1 = 127. You can look at how CPUs implement addition/subtraction to see why, it's just this is the easiest and fastest way to do it.
A buffer overflow just means that you wrote more to a buffer that it can hold, and you overwrote whatever was next to the buffer. If you have an array of 128 uint8_t, for example, but wrote 200 bytes to it, it will overwrite whatever happens to be next to it in the memory. If you are lucky, your program will just crash, but otherwise anything might happen. If you are lucky, a talented attacker could craft the input in such a way that it overwrites the next stuff with just the right thing to cause all sorts of nefarious things, in the worst case maybe even executing the attacker's own code. You need to check if your input will fit its destination and careless handling of integers is often a source of too lenient checks. But you can have a buffer overflow due to other issues, too, it's not necessarily linked to integer woes.
No.2908
>>2907 (cont.)
These are usually only a concern with low-level languages like C and C++. I don't know how much of an issue is it for Crystal because I never used it, but looking at the Learn X in Y minutes page for it I could check this at least:
> num1 = 255_u8> puts num1.class> num1 += 1_u8> puts num1.classAnd it looks like in Crystal integer overflows are actually faulting, and not wrapping!
But you can ask it to wrap:
> num1 = 255_u8> puts num1.class> num1 &+= 1_u8> puts num1.class> puts num1And this behaves as described above. Fancy!
I hope this actually helps and does not confuse you even more…
No.2944
>>2942Buffer overflows can happen even when there are no integer types involved. For example in C:
char small[12];
char * large = "A string longer than 11 characters.";
strcpy(small, large);
is a classic example of a buffer overflow.
No.3708
Hey anon it's me again
>>2808I'm trying to make an additional mod of my alarm bash script with ading an argument feature instead. Instead of kick in the input traditionally after running the program. I would like to set up alarm clock as argument, something like this:
bash alarm.sh 7:13
I tried to add additional code so that It can be input either in argument mode or traditional running program mode but it seems like it doesnt work. Could you help me spot the bug in this bash script. It seems like program kind of stuck in a input loop when I try to set alarm as argument. Here's my script I posted here
https://bpa.st/JN6A No.3714
>>3713>–volume=400You're the best[,] friend!
No.3746
>>3745Just don't ever catbox then. That thing is behind cloudflare bully, there's no way you can upload your file anonymously. It also needs a web browser. Command line though terminal wont do.
Here, use this instead
https://p.fuwafuwa.moe/nojs.html