Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
animist
Aug 28, 2018
my current project is a webassembly -> verilog compiler in rust

this is almost certainly a terrible idea

Adbot
ADBOT LOVES YOU

animist
Aug 28, 2018

Bloody posted:

what the gently caress

(re: why the hell i'm writing a webassembly -> verilog compiler, from a few pages back)

mainly i just want to be able to write my high-level DSP cores in rust. i don't want to actually write a rust / llvm compiler backend tho, i find llvm IR kinda exhausting, so i figure i'll just work with webassembly instead, which rust can target. it's a reasonably lightweight IR format.

more broadly, i think most languages are going to end up with webassembly backends in the near future. all the JVM languages, haskell, and typescript have wasm targets in progress right now, and i figure other people are gonna follow suit, to try to get a slice of that sweet sweet frontend pie. so, i support a bunch of languages pretty easily.

and maybe, in the future, once there's an FPGA on every cpu die, Joe Doesn't Understand Hardware can write his code in TypeScript or whatever, and use my tool to accelerate parts of it on the FPGA.

or, y'know, not. but it's a fun side project.

animist
Aug 28, 2018

Bloody posted:

post the github

https://gitlab.com/kazimuth/brine

pay no attention to all those PDFs stored in git-lfs that I definitely didn't rip from sci-hub

animist
Aug 28, 2018

gonadic io posted:

the rules don't make much sense but as soon as you learn them all programming is really easy

animist
Aug 28, 2018

jony neuemonic posted:

matrices clicked for me this morning and it feels extremely good.

matrices are rad

i feel like every time i pick them up i learn some new weird property they have, and then immediately forget about it

animist
Aug 28, 2018
"serverless" means "spin up a docker container in someone else's kubernetes deployment, run one (1) javascript function, and then terminate the container, every time I hit this REST endpoint"

animist
Aug 28, 2018
the rare good shitpost from r/programming: a PCRE regex that matches "A B C" where A+B=C

https://regex101.com/r/YCTmCs/3

animist
Aug 28, 2018
jonathan blow is mad about rust:

https://www.youtube.com/watch?v=4t1K66dMhWk

dont watch the video. it's way too long. it sucks

animist
Aug 28, 2018

Symbolic Butt posted:

I'm beginning to suspect that she didn't really imply what he's saying she implied, that the "righteous borrow checker guided her to do the right design".

iirc the first half of the keynote was in c++, she showed how traditional OO poo poo completely falls apart for games, and why ECS is good design. then she moves over to rust, and shows that ECS has a bunch of benefits aside from working well with the borrow checker.

MrMoo posted:

Also, he's probably right.

:wrong:

animist
Aug 28, 2018
ctps: mildly concerned that the production URL of this web service starts with "staging"

animist
Aug 28, 2018
that's why I like J. most of its horrible linenoise operators are language builtins.

code:

quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)

(well, technically they might be in the standard library. Still, it's way more brazen than Haskell.)

animist
Aug 28, 2018

gonadic io posted:

I do actually have an unrelated hobby project that does depend on discords api, but because I never bothered writing tests luckily it can deploy just fine even if said api is down

:discourse:

reddit posted:

I don't think many people here are against the idea of a CoC in general. A few are, but most just seem to be opposed to the people pushing for heavier politicization of what we don't want to be political. Most people also aren't really fond of HR either, but you have to put up with them to keep your job.

luckily, enforced christianity isn't political

gently caress programmers tbh

animist
Aug 28, 2018
rip terry, and also the time cube guy. less terrible programmers than the rest of us

animist
Aug 28, 2018

DaTroof posted:

that was my first guess. possible bonus, someone added `rm -rf node_modules` to the start of the build because they couldn't figure out how else to resolve dependency changes

:thunk:

animist
Aug 28, 2018
my favorite json parser is the one that parses as little json as possible

animist
Aug 28, 2018

quote:

Not only are existing tests not very good, most things aren't tested at all. You might point out that the coverage stats for a lot of packages aren't so bad, but last time I looked, there was a bug in the coverage tool that caused it to only aggregate coverage statistics for functions with non-zero coverage. That is to say, code in untested functions doesn't count towards the coverage stats!

:laffo:

animist
Aug 28, 2018
game programming patterns is a good design patterns book that's mostly applicable outside games

Pie Colony posted:

"design pattern" is just a term to describe a way to overcome a deficiency in a programming language. the GOF design patterns book was written to overcome deficiencies in 1994 java. except people read it now and think sprinkling design patterns in their code makes their code better

i mean pretty much anything would make my code better

animist
Aug 28, 2018

Finster Dexter posted:

uh Service Locator and Event Queue patterns are trash garbage don't ever use those

Our Russian outsourcers love those and I loving hate them and their code so much right now

fwiw the 'event queue' the book describes is for a single system's input, e.g. a deduplicating audio queue, which seems reasonable to me

there's no excuse for service locator, though. it's just singletons but worse

animist
Aug 28, 2018

the talent deficit posted:

i wrote a rest api in 100% postgres for funsies

:eyepop:

animist
Aug 28, 2018
ctps: running

code:
$ cd ~/dev
$ rm -rf */node_modules */target/debug */target/release
just freed up 30gb of space on my tiny laptop ssd, lol

animist
Aug 28, 2018
god i wish

animist
Aug 28, 2018
looking through old projects and found the time I tried to stuff the xilinx verilog compiler into a docker image

that thing did not want to fit into sub-5-gigabytes, let me tell you

animist
Aug 28, 2018

Krankenstyle posted:

whew, think im finally starting to get the hang of tex scoping & expansion, a little

code:
	\ifcsdef{gtrDBbirthyear}{}{\ifcsdef{gtrDBbaptismyear}{}{%
		\edef\birthyear{}%
		\foreach \x in {census,enrolment} {%
			\gpr@if@defined{\x}{age}{%
				% not a fan of having to use stringx but im still not so clear on string manip
				\StrLeft{\gpr@subdb@value{\x}{date}}{4}[\eventyear]%
				\global\edef\birthyear{\expanded{\unexpanded{\the\numexpr} \eventyear - \gpr@subdb@value{\x}{age}}}%
			}{}%
		}%
		\ifdefempty{\birthyear}{}{%
			\gprEvents{birth- = {(caAD)\birthyear}}%
			\global\edef\birthyear{}%
		}%
	}}%

kinda glad i don't understand this post tbh

animist
Aug 28, 2018

NihilCredo posted:

can i call myself an architect yet?

google cache invalidation. you'll thank me later :smuggo:

animist
Aug 28, 2018

NihilCredo posted:

oh i have that, it's called alt-f4

ah yes, the "snowpiercer" approach to software development

animist
Aug 28, 2018
https://twitter.com/whitequark/status/1090281534114971649

animist
Aug 28, 2018
lol, because that worked so well for Go

edit: I'm legit baffled by this. Like npm is the only good thing about node, and weren't we all just excited about small self-contained executables?? Just release the pretty new stdlib as a package and use ts-node

animist fucked around with this message at 17:32 on Jan 30, 2019

animist
Aug 28, 2018

Sagacity posted:

and, like all developers, they've decided to not learn anything from past mistakes or from other languages. instead, they're going to poorly reinvent the wheel, yet again.

animist
Aug 28, 2018
npm's UX is easy to use and effective for hooking its target audience, frontend devs who wanna do some backend stuff

it's not good in the sense that it's well-made software, but there's like 3 pieces of well-made software so that's a moot point

animist
Aug 28, 2018

:eyepop:

animist
Aug 28, 2018
i had to maintain an ant/ivy project for years and i still shudder at the thought of executable xml

it may have just been that it was a poo poo project though. fifteen years of code written by college students in their spare time, held together with spit. eugh

animist
Aug 28, 2018
i remember nim having nice editor tooling last time I poked at it, which was a pleasant surprise

although it's possible my baseline for "nice" has been skewed by RLS which works approximately 1/10 of the tine

animist
Aug 28, 2018
typescript's type system is stupidly powerful. honestly i've never used another language with nicer unions:

code:
interface Banana {
   kind: "banana",
   color: string,
   peeled: boolean
};
interface Apple {
   kind: "apple",
   color: string,
   leaves: number
};
function examineFruit(fruit: Apple | Banana) {
   console.log(fruit.kind);
   console.log(fruit.color); // valid
   // console.log(fruit.peeled); // invalid; not all members of `Apple | Banana` have a `peeled` member
   if (fruit.kind == "banana") {
      console.log(fruit.peeled); // valid; fruit is now inferred to be `Banana`
   }
}
this works for unions of as many types as you want.

of course, it's still javascript, so it'll run slow and have weird edge cases. and also the type system is full of unsafe holes. but it works well enough for what it is

animist
Aug 28, 2018

Sapozhnik posted:

you are like a little baby, watch this



it's kind of hosed up how good typescript is

:hai:

animist
Aug 28, 2018

HoboMan posted:

also a javasript to rust converter.
bless his heart.

what??

animist
Aug 28, 2018

typescript has a better tooling/typesystem quality combo than any other language, change my mind

animist
Aug 28, 2018

Flat Daddy posted:

can I use ‘deleted X-hundred lines of lovely code’?

*refactored a large legacy codebase

animist
Aug 28, 2018
the more i attempt to use c++ metaprogramming the more i can feel my brain dribbling out my ears

animist
Aug 28, 2018

Phobeste posted:

c++ metaprogramming is incredibly good but unfortunately it requires a lovely perfectly smooth brain. marble-like, hard as a rock. this is enlightenment

:hmmyes:

Adbot
ADBOT LOVES YOU

animist
Aug 28, 2018
i love query builders but really any sort of janky metaprogramming bullshit is cocaine to me so my judgement probably shouldn't be trusted

HoboMan posted:

guess who got two thumbs and found plaintext passwords in the database?

hows that going for you

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply