Wollantine

9.1K posts

Wollantine banner
Wollantine

Wollantine

@wollantine

Channel about Elm, JS, and React best practices. React developer. Functional Programming advocate.

Katılım Kasım 2018
332 Takip Edilen336 Takipçiler
Sabitlenmiş Tweet
Wollantine
Wollantine@wollantine·
I'm going to follow in the footsteps of @Aron_Adler and uninstall Twitter from my phone. I hope this helps me focus more on the important stuff, both in here and out.
English
0
0
4
200
Wollantine retweetledi
undefined behavior
undefined behavior@undebeha·
on my language wishlist is a language that makes it super easy to describe type level checklists. i think this sort of exists already but im not sure how clean it is. like im thinking about opengl rn. shader programs will often have some global values, like positions for lights or cameras. each time you switch shaders you gotta configure whatever uniform data the program needs before you start using it to render objects. you can modify this data, but it is usually an error to not initialize it. the naive fix is to wrap up all of opengl in something functional. each invocation of a shader program could have these values as parameters. which would totally work and make everything type safe but now you are sending data to the GPU for every single draw call. if you only need to configure the shader once and are gonna reuse the config on 1000 different objects then you are sending a lot of redundant info on the wire. you could alternatively try to do some sort of reactive programming system, where you have the trad functional API but under the hood the program checks if there has been a state transition and skips the data upload if there isn't a change to the shader config. but this is pretty hard to get right. and i suspect it is really hard to get the compiler to eliminate all the checks for changed data at comptime, so there is still some runtime overhead what seems like a nice lightweight alternative would be some kind of type level checklist. in order to run a shader program you need to provide evidence of initialization of each of the relevant uniform data fields. the signature for the shader execution would be something like `runShader : ShaderProgramID -> ProofThatLightingIsConfigured -> ProofThatCoordinateTransformIsConfigured -> IO ()`. in order to obtain evidence you'd have to run other programs, like `configureLighting : LightData -> IO ProofThatLightingIsConfigured`. in principle all this evidence should be erasable at compile time. so no overhead. but it also guarantees that the shader is configured before it is used. also opens the door to things like skipping the data upload. it is technically legit to skip configuration; opengl initializes unconfigured uniform buffers to predictable default values. but imo it's still good practice to be explicit. so you could add a `useDefaultLightingConfiguration : ProofThatLightingIsConfigured` and now it is clearly documented and checked by the type system that you wanna use the defaults. i know there are things out there like this. idk ATS at all but i get the vibe that this is the sort of thing ATS is all about. also seems probably pretty easy to implement a crude version of this with linear type systems + phantom types otoh i don't see a lot of implementations of this sort of system and so that makes me wonder if there is a reason for that. given it doesn't seem terribly sophisticated i'd expect to see it show up places if it were actually useful maybe the devex isn't that great? it kind of seems like modeling a state machine at the type level with a million phantom types could feel very cluttered. maybe with the right syntax support this would be useful? or maybe its the kind of thing that you can get stuck admiring and improving your fancy type level model instead of getting work done. maybe its the sort of thing where the amount of time spent building the evidence management system eclipses the time spent debugging and so economy suggests not doing it so idk maybe this is a dumb idea. but i really love checklists and so i imagine id love a good system for representing them at the type level
English
3
3
14
963
Tom Sydney Kerckhove
Tom Sydney Kerckhove@kerckhove_ts·
Do you prefer bash-flavoured bools or C-flavoured bools?
English
4
0
2
659
Wollantine
Wollantine@wollantine·
@kerckhove_ts This might come as a surprise for C and bash developers, but 0 is not a boolean, it's an integer.
English
1
1
5
266
Wollantine
Wollantine@wollantine·
@DjMolehill @nicbarkeragain But it's not "the actual concepts", it's "the C concepts", and it's good that people stop learning the C concepts.
English
1
0
1
26
DJ Molehill
DJ Molehill@DjMolehill·
@wollantine @nicbarkeragain I think Nic is saying that misusing terms makes it harder for people to understand the actual concepts, not that it's a pro
English
1
0
0
26
Nic Barker
Nic Barker@nicbarkeragain·
There's been a lot of damage done by high level programming languages overloading technical terms with a new meaning. An "array" in javascript is often not an actual array. "Objects" are actually hashmaps. Array.slice doesn't produce a slice, it allocates a new array and copies.
English
43
50
1.2K
53.7K
Wollantine
Wollantine@wollantine·
@itsfarseen A hidden storage. Like a concealed box of weapons, or a hole where a squirrel would hide the nuts it found so it wouldn't need to go searching when it gets hungry.
English
1
0
0
12
Farseen
Farseen@itsfarseen·
C doesn't have the monopoly. Computer science does. Besides it's nice to have certain terms mean standard things across languages. JS being weird is a JS problem.
Wollantine@wollantine

@nicbarkeragain C doesn't have the monopoly on the meaning of words. An array is an ordered series. A slice is what's between two cuts of a long thing. An object is whatever the fuck you want because it's as abstract as "thing".

English
2
0
1
43
Wollantine
Wollantine@wollantine·
@kmdrfx Lol "manure" instead of "demure". Spot on!
English
0
0
2
27
kmdr
kmdr@kmdrfx·
Terminals are where browsers were 25 years ago. Everything is different just eeeever so slightly. And then there are the proprietary features. Very mindful, very manure.
Tommy D. Rossi@__morse

@kmdrfx here is standard line height and relaxed (the default in Zed)

English
6
1
75
11.1K
Wollantine
Wollantine@wollantine·
@iamtexture @zack_overflow Yes. We circle back to my first post. What if their personal beliefs include ceding the language to other maintainers once it gains traction?
English
0
0
0
558
Texture
Texture@iamtexture·
You can just use logic. Ask yourself the question: "Why would someone create a programming language given that so many already exist?" And the answer is "To make a programming language that doesn't exist, based on their own personal beliefs about what a programming language should be."
English
1
0
10
610
zack
zack@zack_overflow·
Zig devs: Can we have private fields pls Creator of Zig: No just name them really, really carefully and hope for the best
zack tweet media
English
177
67
3K
355.5K
Wollantine
Wollantine@wollantine·
@iamtexture @zack_overflow I think the sample size is way too small and we're doomed to shoot our subjective impressions. I propose we wait until a thousand more autists have made popular PLs.
English
1
0
0
573
Texture
Texture@iamtexture·
@wollantine @zack_overflow Actually, there's a good chance he'll just stop letting other people use it if they bother him too much.
English
3
0
36
2.2K
Wollantine
Wollantine@wollantine·
@iamtexture @zack_overflow Nothing stops that autistic man's manifest ideology from being "a language should cater to its audience".
English
1
0
5
2.2K
Texture
Texture@iamtexture·
@zack_overflow When a single person creates a programming language, you should realize that you are in one autistic man's manifest ideology about what a programming language should be. He's not going to be taking requests.
English
19
37
1.5K
48.8K
Wollantine
Wollantine@wollantine·
@mattpocockuk @dillon_mulroy @FlavioCorpa Not having .ap() means you can't apply an Effect of a function to an Effect of a value. In that case, Effect would be designed as a wrapper of values exclusively, and not treating functions as a first class citizen. Thus, it wouldn't be FP.
English
2
0
3
80
Matt Pocock
Matt Pocock@mattpocockuk·
@dillon_mulroy @FlavioCorpa Effect should not be making TS more palatable to FP people Effect should be making FP more palatable to TS people
English
3
1
20
1.2K
Wollantine
Wollantine@wollantine·
@davesnx To hell with abbreviations, I say! And don't get me started with single letter variables!
English
0
0
1
48
David Sancho
David Sancho@davesnx·
them: "I'm a functional programmer, I love abbreviations, code clean makes me happy" me: Sure, let's play a game
David Sancho tweet media
English
6
2
15
2.2K
Andreas Kling
Andreas Kling@awesomekling·
mfw reading @ladybirdbrowser commit messages "Atlassian login gets the base URL for its module scripts by throwing an error and pulling out the current script's URL from error.stack with regex."
Andreas Kling tweet media
English
92
209
3.7K
206.2K
Wollantine
Wollantine@wollantine·
@Aron_Adler Well, they can't offer help with Lean, or you would be sure they are phishing, can they?
English
0
0
1
28
aron
aron@Aron_Adler·
these targeted emails are getting wild
aron tweet media
English
1
0
4
369
Wollantine
Wollantine@wollantine·
Addendum: Slop is Senior Level Objective Programming.
English
0
0
2
38
Wollantine
Wollantine@wollantine·
To make goop you just need Go and Objective Programming.
English
1
0
2
70