Dank n Edgy

The dorkest, edgist forums known to puny hoomans

You are not logged in.

Announcement

Welcome to DnE, the online psych facility. (Run by the inmates, for the inmates.)

#401 2019-02-12 07:32:15

loon_attic
Banned
Registered: 2012-06-08
Posts: 10,285

Re: Absent's Code Thread / Tech Blog

Yeah, I hate stupid old cargo cult shit.

All this TypeScript, lodash, Immutable.js, Redux. They're trying to twist JavaScript into doing things that are better integrated in other languages, like Reason. At least, I think React might've made it easier for me to understand Ur/Web.

I don't think a new language would be as hard as all these new libraries and frameworks and shit already are. But React isn't that bad, and all the new tools make it workable once you set them up and get used to them. Still kinda crappy though - https://news.ycombinator.com/item?id=19133015
but https://news.ycombinator.com/item?id=19145156


sloth wrote:

Comfy does not provide challenge, challenge provides success, success provides happiness. Our world is not comfy, although we tried to make it so. Slaves of our own inventions, yada, yada. Not only on a technological level, also on a social and political level. Nothing more but apes. Apes with psychosomatic disorders.

Online

#402 2019-02-12 10:33:18

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

I would definitely rather learn a new language but this seems to be the best way to land an entry level dev job without being really great with algorithms and all that, which is hard af for me.


Fucc

Offline

#403 2019-02-12 20:23:43

loon_attic
Banned
Registered: 2012-06-08
Posts: 10,285

Re: Absent's Code Thread / Tech Blog

i could criticize the industry forever

https://news.ycombinator.com/item?id=19143203
they overengineer everything, they make all sorts of arguments for why they need all these features to make it impossible for one person to understand even a small fraction of all the code powering bullshit like the web, Agile and open offices don't work for everyone, interviews and phones suck
itS NoT ME ITs THem
yh shit still isnt perfect

but it can be pretty good? i hope


sloth wrote:

Comfy does not provide challenge, challenge provides success, success provides happiness. Our world is not comfy, although we tried to make it so. Slaves of our own inventions, yada, yada. Not only on a technological level, also on a social and political level. Nothing more but apes. Apes with psychosomatic disorders.

Online

#404 2019-02-12 21:19:01

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

Honestly I don't even get the need for frameworks. You build a site from scratch and it's about as much work as doing it in the framework. I guess once you get good with the framework it might be faster to build new sites often, but how often does a corporation need to build a new site? And for what? Smoll business only needs a single site that's easy to manage, e.g. wordpress. Larger businesses need more advanced / professional stuff sometimes, but what do you need to build it in x or y framework for when it's as simple or simpler to build it without one?


None of it makes much sense to me but whatever, like most single page applications are just sites that could be whipped up in regular ass html, css, maybe bootstrap.


Fucc

Offline

#405 2019-02-13 00:47:45

sloth
WITNESS ME
From: Spurdoland
Registered: 2012-06-17
Posts: 7,905

Re: Absent's Code Thread / Tech Blog

WordPress is a security vulnerability. Framework exists mostly for people who write sites as their main job. Cooperation comes, wants a site, developer makes it. Uses framework cause it's faster for the developer to use, instead of writing from scratch.


Hindsight is always 20/20.

God wrote:

A surprising amount of insight can be gleamed from sitting on the toilet. More concerning, however, is the amount of nostalgia. neutral

When in doubt, move north. God bless suomi.

Offline

#406 2019-02-13 01:49:51

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

Okay so small business hires a developer to build a site in some framework. 2 years later they need to hire someone else to rewrite the whole shit because it's out of date, insecure, and if anything goes wrong and this random developer from 2 years ago isn't even around anymore. Wordpress is a security vulnerability if you don't update the plugins, themes, and core code. So's super out of date custom sites.


I run into people with custom built sites who call in for support all the time. Can't really help with some obscure site built in some obscure bullshit form 5 years ago. "You'll have to contact your developer", "my developer moved to PARIS!", too bad you're fucked. That's why super small businesses with little technical knowledge are better off on a widespread platform like wordpress. For larger businesses, I get the need to develop a site and tools, but if they're gonna build it themselves anyway, it's not much easier to do it with a framework than just building it with a backend lang + normal ass html + css + maybe something like bootstrap or whatever.


Idk maybe I'm full of shit but w/e


Fucc

Offline

#407 2019-02-18 21:12:21

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

Server is back up. Took me a while because I had to go get all the gpg private keys off my laptop with a dead screen by installing a 32 bit OS on a flash drive, wiring my laptop's drive to an old desktop, getting in through my encryption, getting that imported into gpa on new laptop (gpa is buggy for some reason on this), then I was having usb problems because the modules for mkinitrd changed, ended up finding out that the mkinitrd script that shows you what modules / what mkinitrd command you want to run has a -k option you can give it to determine which kernel version and which modules for the version you need. Perfect. Works now. And of course the 32 bit slackware I installed on usb wouldn't let me run anything in the 64 bit environment so I had to reinstall a 64 bit on the usb to get initrd.gz or whatever rebuilt. Ugh.


That was a pita.


Fucc

Offline

#408 2019-02-18 22:13:13

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

New plan for my server :

OpenBSD or slackware as a hypervisor, literally only set up for vm's. VM's are then used for everything, including video hosting. Hypervisor is not encrypted, everything on VM's is encrypted. This way if the server goes down it can come back up when the power comes back on / I can restart it remotely / etc.


Not ideal but it solves the problem of it going down while I'm away and also still has a fair bit of security since the vm's will be encrapted.


Won't be able to implement that this weekend but at some point I will.


Fucc

Offline

#409 2019-02-18 22:27:56

sloth
WITNESS ME
From: Spurdoland
Registered: 2012-06-17
Posts: 7,905

Re: Absent's Code Thread / Tech Blog

Sounds a lot like Qubes.


Hindsight is always 20/20.

God wrote:

A surprising amount of insight can be gleamed from sitting on the toilet. More concerning, however, is the amount of nostalgia. neutral

When in doubt, move north. God bless suomi.

Offline

#410 2019-02-19 16:28:15

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

Ya could use alpine or qubes for it, as long as I could set up slackware as a guest or whatever, and maybe openbsd?


Fucc

Offline

#411 2019-02-19 23:47:10

loon_attic
Banned
Registered: 2012-06-08
Posts: 10,285

Re: Absent's Code Thread / Tech Blog

Apparently OpenBSD's vmm virtualization thing isn't ready for production. Qubes should be able to host OpenBSD? Apparently as domU (using full virtualization only), although it is annoying and does not integrate with Qubes's desktop stuff or whatever idk

Although they did add PVHVM support. it might work fine, just weird that i can't find blog posts about it


sloth wrote:

Comfy does not provide challenge, challenge provides success, success provides happiness. Our world is not comfy, although we tried to make it so. Slaves of our own inventions, yada, yada. Not only on a technological level, also on a social and political level. Nothing more but apes. Apes with psychosomatic disorders.

Online

#412 2019-02-20 01:23:24

sloth
WITNESS ME
From: Spurdoland
Registered: 2012-06-17
Posts: 7,905

Re: Absent's Code Thread / Tech Blog

Qubes and OpenBSD might work. Better to search GoogleGroups, more information on Qubes there. Not an expert on virtualization though, sadly.

Last edited by sloth (2019-02-20 01:23:31)


Hindsight is always 20/20.

God wrote:

A surprising amount of insight can be gleamed from sitting on the toilet. More concerning, however, is the amount of nostalgia. neutral

When in doubt, move north. God bless suomi.

Offline

#413 2019-02-22 00:27:50

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

So, basically, what comes in handy building react stuff beforehand is: Knowledge of JS inheritance with classes, e.g. prototypical inheritance. Prototypical inheritance being a chain of objects from top to bottom (bottom being null). This, as opposed to classical inheritance, which has the "class as blueprint" model. But the whole thing gets really fucking annoying, because when the creator of JS created JS, he wanted it to look like java:

And we were pushing it as a little brother to Java, as a complementary language like Visual Basic was to C++ in Microsoft’s language families at the time.

https://stackoverflow.com/questions/280 … -classical

So there's two types of prototypical inheritance, prototypical-prototypical inheritance and prototypical inheritance using constructors. Which is fucked, but whatever. So the major difference in the forms of inheritance, at the end of the day, is that prototypical inheritance inherits shit form other objects, classical inheritance inherits shit from classes which create shit via constructors. So it gets really confusing having constructors in javascript because really it's just sugar on top of prototypical inheritance, however that works.


Anyway, the point is you gotta learn about classes in javascript to learn react, because react is largely based on classes. And classes alone are pretty fucking confusing in js once you get into using them heavy, or so I'm told. And ES6 reeally doubles down on that. To an extent that many tutorials just pretend it's really classical inheritance. So, really, if we beak it down, a constructor in javascript is literally just a function that sets properties of the object. There's no real classes, it's just objects. Indirection and shit. So let's steal some code form some guide:

class Developer {
  constructor(firstname, lastname) {
    this.firstname = firstname;
    this.lastname = lastname;
  }

  getName() {
    return this.firstname + ' ' + this.lastname;
  }
}

var me = new Developer('Robin', 'Wieruch');

console.log(me.getName());

That constructor is really just a function, that method getName is really more like, Developer.prototype.getName = function() { return this.firstname + ' ' + this.lastname;}, under the hood, and the new keyword is really calling Object.create() to copy an object and does some assigning of this and what not, I think. Fuck sake. San note that Developer.prototype, is simply defining an object function, like for example, if you did var test = [], you could call test.push() because push is a prototype of Array, which is an object. Haha fucking hell m8. Which is why you need the this keyword, incidentally. Once a class gets instantiated with new, you reference the actual object instance with this. This can't be a good explanation and I feel like I'm jumping around, but I'm trying to keep this garbage straight tin my head so...


Fucc

Offline

#414 2019-02-22 23:02:53

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

You know why I can't get a fucking programming job lol? I don't have any goddamn projects to my name. DnE HUD needs to be made. Fuck the algorithms until I can actually get a goddamn interview. DnE HUD needs made, and ocaml-pass needs finished. Which means I need to get done this goddamn book about react and start working on DnE HUD. Fuck everything else until:


1.) Finish react book
2.)  DnE HUD
3.) Finish Ocaml pass
4.) ??? Whatever other pojects I can do.


Doing algorithms and other shit is a waste of time, I need a portfolio. It pisses me off that I've been programming thousands of lines of code for years and years since I was fucking 18, all through college, tons of projects, and my dumbass has almost *nothing* to show for it. I made games in my game dev class, I built hundreds of goddamn algorithms and data structures, I worked on dozens of java projects, C++ projects, C# projects, python, web servers, command line, all kinds of shit. Should have made it all clean and kept it on github.


Fucc

Offline

#415 2019-02-23 00:48:53

loon_attic
Banned
Registered: 2012-06-08
Posts: 10,285

Re: Absent's Code Thread / Tech Blog

Fucking same, but most of what I did was for school ...


sloth wrote:

Comfy does not provide challenge, challenge provides success, success provides happiness. Our world is not comfy, although we tried to make it so. Slaves of our own inventions, yada, yada. Not only on a technological level, also on a social and political level. Nothing more but apes. Apes with psychosomatic disorders.

Online

#416 2019-02-23 11:05:26

sloth
WITNESS ME
From: Spurdoland
Registered: 2012-06-17
Posts: 7,905

Re: Absent's Code Thread / Tech Blog

Yeah. Being organized is good when you want a job. What's DNE HUD?


Hindsight is always 20/20.

God wrote:

A surprising amount of insight can be gleamed from sitting on the toilet. More concerning, however, is the amount of nostalgia. neutral

When in doubt, move north. God bless suomi.

Offline

#417 2019-02-23 23:10:40

loon_attic
Banned
Registered: 2012-06-08
Posts: 10,285

Re: Absent's Code Thread / Tech Blog

just a dashboard for DnE

Could have comments and stuff from werc, or help manage werc somehow

server status, requests, graphs, users


sloth wrote:

Comfy does not provide challenge, challenge provides success, success provides happiness. Our world is not comfy, although we tried to make it so. Slaves of our own inventions, yada, yada. Not only on a technological level, also on a social and political level. Nothing more but apes. Apes with psychosomatic disorders.

Online

#418 2019-03-01 22:34:16

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

These same 2 cunts from Amsterdam and China respectively have been brute forcing my shit for like months, obviously to no avail. Got fail2ban working again and it banned them right away. I allowed pw entry just to test fail 2 ban lol. Now I'll disable pw entry again and see if there's anything neat I can do with fail2ban besides just sshd stuff.


Fucc

Offline

#419 2019-03-01 22:55:14

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

According to last assuming no one tampered with logs, no one has ever logged into my server but me, unless someone was able to tamper with the logs n shit. Millions of attempts tho. Someone keeps trying to log in with literally random usernames. That's so inefficient lmao. They must occasionally get into something though.


Fucc

Offline

#420 2019-04-16 14:01:03

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

I updated punBB's "active topics" time to 1 week again in search.php
It didn't work this time lmao, gonna have to do some more digging :(


Fucc

Offline

#421 2019-04-16 16:01:39

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

JK it worked I just edited the wrong directory lmao, reverted change in original and kept change on here


Fucc

Offline

#422 2019-04-16 17:35:11

sloth
WITNESS ME
From: Spurdoland
Registered: 2012-06-17
Posts: 7,905

Re: Absent's Code Thread / Tech Blog

Milions of attempts is normal. The moment it comes online, chinese and russian hackers want in.


Hindsight is always 20/20.

God wrote:

A surprising amount of insight can be gleamed from sitting on the toilet. More concerning, however, is the amount of nostalgia. neutral

When in doubt, move north. God bless suomi.

Offline

#423 2019-04-17 21:57:07

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

Something as simple as an onClick handler in react uses higher order functions to "sneak in" an element ID, uses arrow functions to prevent auto-execution, and so ends up looking like this:

<button
onClick={() => this.onDismiss(item.objectID)}
type="button"
>
Dismiss
</button>

Kinda annoying.


Fucc

Offline

#424 2019-04-17 23:06:26

absentinsomniac
Administrator
Registered: 2012-06-09
Posts: 16,808

Re: Absent's Code Thread / Tech Blog

Seems like JS is so full of features that make it easier on experienced devs it's become somewhat difficult to actually learn it from the ground up. For example, destructuring probably shits all over readability, unless you know to look for it:

const { searchTerm, list } = this.state;

...

{list.filter(isSearched(searchTerm)).map(item =>

Instead of:

{this.state.list.filter(isSearched(this.state.searchTerm)).map(item =>

Could easily get confusing for me. There's also like, third party libraries that take away required norms and shit. Dropping that in my lap would have me scratching my head at how in the actual fuck they are doing some of this stuff.


Fucc

Offline

#425 2019-04-17 23:42:31

sloth
WITNESS ME
From: Spurdoland
Registered: 2012-06-17
Posts: 7,905

Re: Absent's Code Thread / Tech Blog

It's magic.


Hindsight is always 20/20.

God wrote:

A surprising amount of insight can be gleamed from sitting on the toilet. More concerning, however, is the amount of nostalgia. neutral

When in doubt, move north. God bless suomi.

Offline

Board footer

Powered by FluxBB