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
Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

FlapYoJacks posted:

F-strings should be used everywhere possible.

sure would be nice if they worked for binary strings. loving python

Adbot
ADBOT LOVES YOU

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

FlapYoJacks posted:

And floats for some reason.

don't they?

Python code:

>>> d = 1.01
>>> f"{d}"
'1.01'
>>> type(d)
<class 'float'>

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

FlapYoJacks posted:

Sorry, I meant precision:

Python code:
print(f"0x{255:8.8X}")

Oh, that. Yeah that sucks

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

indexing my arrays from 1, achieving smoothest brain possible

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

prisoner of waffles posted:

Uhhh, to get back on topic: maybe MATLAB etc. are weird because

  • they are tools made for actually doing numerical computations in support of engineering or scientific problems;
  • the people who are best qualified to make these tools well are applied mathematicians of a certain mindset;
  • apparently this mindset is rarer in applied mathematicians than you might think (because of "envy towards pure math"?)

so no wonder that MATLAB, Julia etc. are so janky.

So maybe I'm misunderstanding what you're saying, but: I don't think that applied mathematicians make the best PL designers or compiler devs. I think people who have experience in those fields do. It's important to note that being good and well-designed aren't really related to adoption and usage - just look at the popularity of javascript if you need an example how not.

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Dijkstracula posted:

also I think a big part of what makes haskell seem unapproachable is the extent to which it relies on partially-applied functions, type inference, and sugar like `<-` for do-notation and `.` and `$` for function application at different precedence levels, so if you don't have an editor that helps you fault that context back in your head as you need it, it can seem especially inscrutable

in other words, the problem is APL

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Dijkstracula posted:

more expressive types = better than

go agda or go home

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...
go: there have been no meaningful langauge developments since the 70s other than gc which you definitely want in a systems language

ffi? Never heard of it

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

FlapYoJacks posted:

Rust is excellent because of the borrow checker. If it's bopping you on the head with a newspaper, it's for a good reason. It is designed from the ground up to be an extremely safe language regarding thread and memory safety. If you have a multi-threaded program or a program that needs to be 100% secure, then you can be sure of those things if your program compiles. There's a reason why the kernel accepts rust and a lot of crypto applications are moving to or have moved to Rust.

made it most of the way through convinced you were serious. Well done

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

pseudorandom name posted:

C++ is asking the important question of how many different prefixes can we slap on "value" before the language is abandoned en masse

implying we'd ever abandon c++, and that we're not stuck with it forever

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Carthag Tuek posted:

imo the best garbage collector is aliasing the compiler name to rm -f

big fan of #!/bin/rm -f

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

mystes posted:

it's fine to have style preferences like that

It is not fine to have style preferences like that. It's reading a Dijkstra paper title without understanding what Dijkstra was actually mad about (goto that can change frames, which isn't what C has). It's perpetuating second-hand FUD, reading XKCD and nodding while repeating "the raptors won't get me this way". It's encouraging people to create complex state machines of sentinel variables to exit loops, and making GBS threads all over readability of function exit paths that need to deallocate memory. Blind "don't use that" doesn't teach anything, whether it be why a construct exists, or how to think about its tradeoffs.

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

eschaton posted:

just use prefix S-expressions

(now (have you (problems two)))

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Internet Janitor posted:

every graphical operating system has apis for opening a window, flipping a texture to that window, and obtaining keyboard and pointer events

smoothing out the differences between these apis to achieve a portable and reasonably performant common denominator is a gigantic pain in the rear end. multiple very complicated open source libraries exist to achieve this goal, with varying amounts of additional bells and whistles: SDL, raylib, allegro, etc

it would be nice if the creators of more languages and language ecosystems considered being able to do that sort of poo poo out of the box essential, rather than some kind of esoteric distraction from the real language approach of offering stdio and leaving users to write their own bindings to C libraries if they need anything else

except that it sucks when they build in a cross-plat interface, like Java did. poo poo looks like rear end

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

fart simpson posted:

programming language idea: java, but with html5 literals, and more support for functional programming so that someone could write a popular library that halfass emulates haskell

just VMs all the way down

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Dijkstracula posted:

don't forget to have the self-hosted compiler as dogshit slow as humanly possible

it's self-hosting, but only because the compiler was mechanically translated from another, faster language

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Cybernetic Vermin posted:


if it made an appreciable difference there would be a large movement to destyle websites.

Firefox's reader view is basically this. Also, having consistent look and feel is very important for accessibility - the wall of custom UI inhibits screenreaders, for instance

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Subjunctive posted:

they are sequences of 16-bit code units, but they are not necessarily UTF-16 in that they can contain unpaired surrogate units and other illegal constructs. you can have a Windows filename such that it cannot be expressed accurately in any other encoding. (some Windows APIs will reject paths with unpaired surrogates, but not all, so enjoy)

similarly, Linux just requires that paths contain no 0 bytes. you can have a filename on Linux that is not possible to decode as legal UTF-8

also worth noting that just because a path is valid to the rest of linux doesn't mean it's valid to the filesystem in question, so you can't necessarily perform file io just because the path is valid

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Subjunctive posted:

I worked on a filesystem but it was basically “what if networked filesystem but fully POSIX and you get extN’s core feature set because that’s what we’re wrapping” so we avoided the worst pits of design hell. still managed to gently caress up a lot of stuff, but apparently people are still using it!

on halloween do the trick-or-treaters come by your house dressed as locks

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

redleader posted:

im leaving that in the well-qualified hands of the unicode committee

yes, the people who brought us han unification surely won't gently caress this up in any way

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

abraham linksys posted:

apple open sourced a DSL for configuration, because we don't have enough config formats https://pkl-lang.org/index.html

it's a language that compiles to json/yaml/plist/properties and also generates static types for java/kotlin/swift/go and has plugins for intellij/vscode/neovim. i'm sure all of these things are supported equally and everything works consistently across the board

ah good, bindings for java, kotlin, swift, and go. you know, the languages people use

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Soricidus posted:

the languages people use where types and convenience matter, at least? if you use a plang then you can just shell out to the command line tool to generate json or yaml. if you use c++ or rust then you have chosen the path of suffering and deserve no sympathy.

if I wanted to use shell for things I'd be writing shell :)

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

mystes posted:

Start kids with c and make them think they always need to implement all data structures from scratch each time to convince them that programming sucks and scare them away

data structures are a mistake. everything that's not an array or packed struct is an affront to god

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Dijkstracula posted:

they don't work, that's the beauty of it

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Subjunctive posted:

this year is Java, which she’s a little more excited about, and for which I am certain that the tooling will be better

are you frequently disappointed, then?

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Internet Janitor posted:

i think processing is excellent for teaching programming

easy to install, good performance, low boilerplate but close enough to normal java to provide a smooth transition, a simple environment that doesn't immediately beat you over the head with distractions and unnecessary complexity, you can easily save multi-platform executables

and most importantly you can immediately draw images and play sounds and do lots of interesting things out of the box

plus the ide is terrible, which sets expectations for programming appropriately

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

bob dobbs is dead posted:

the way you do it w/ clojure nrepl is you just work in a text editor, select part of your program, because everything's a statement, you can select in text editor, gently caress w some part of the running program and rerun just that part of the program direct from the text editor and get the output in some other buffer

the way you do it w/ common lisp, you can even avoid actually filling in statements and use the nutso common lisp error handler to fill in the statement in your text editor / in the program simultaneously as you run

never really got the hang of slime, but I could sense there was power within

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Subjunctive posted:

do you do birthday parties?

nah, we can't agree on date representations

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Armitag3 posted:

party is over because someone brought a gift that was too big for the gift buffer

it overflowed into the pool and I am NOT cleaning that up

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Internet Janitor posted:

awk as an introductory programming language:

  • high performance
  • familiar, conventional c-like syntax
  • quality reference and tutorial materials are available
  • broadly used in professional environments
  • already installed on whatever posix os you're using

I love awk

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Nomnom Cookie posted:

they made a github repo and it does not solve this at all. the panic handler you get from them is loop{} with a FIXME to think about doing something sane. it also only lets you target the most recent KMDF version and makes heavy use of bindgen inside build.rs. im not holding my breath waiting for a solution from MS on this or it being a solution i'd be willing to adopt

is this about how Linux does it too? Kernel halting because of a naughty driver seems like several backward steps

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Nomnom Cookie posted:

linux doesnt try to unwind kernel stacks for one thing lmao. the linux kernel version of you did a fucky wucky with a pointer is an oops and actually it might do stack unwinding? i'm not sure? but you definitely don't get catch blocks. or ofc linux can panic

Yeah I could have phrased my question better. I was curious how the new Rust in Linux stuff handles panic()ing - like, whether it ties it into the unwinder somehow

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

crazypenguin posted:

iirc it's a kernel panic. i do not know the status of trying to change it at all.

most of the Rust for Linux concern with panics is over Rust API designs that allow for panics too easily, not what happens if a panic actually happens. I think they're shooting for the same C-like "panics should never happen actually" and working on more APIs that return results and whatnot (e.g. to handle allocation failure)

makes sense, thanks

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

echinopsis posted:

keep going keep going I am almost there

you waiting for the jvm to start up echi?

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Nomnom Cookie posted:

someone just wanted an excuse to run a linker in an initrd

Turns out there isn't all that much difference between a linker and a loader.

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Wheany posted:

this will lead to some programs relying on the randomness of syscalls

dare you play... syscall roulette?

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Nomnom Cookie posted:

rob pike wrote a linker* in 1994 for inferno and there's no way steve apples vanity project is more advanced than the successor to plan 9!!!!

*for all i know he hasn't even done that and the golang arrogance being discussed is completely unjustified instead of mostly unjustified but i'm trying to be as charitable as i can

plan 9 is in the galaxy brain "static link everything" camp. So if Pike wrote that, no wonder futuristic dynamic linking confuses golang

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Subjunctive posted:

making an ABI without a programming language in mind seems like it’ll result in a system that sucks to use from all languages, instead of all-but-one languages

good news, the C ABI already exists on your OS and if you're not targeting it you should be

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Nomnom Cookie posted:

another thing windows gets right is making unwinding part of the platform ABI and presenting segfaults to the process as exceptions

I don't hate the signal(7) interface but I also rarely want to do anything on SEGV other than dump core so :shrug:

Adbot
ADBOT LOVES YOU

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Cybernetic Vermin posted:

likely would have been better had dynamic linking been confined to a well-defined set of platform libraries a vendor is standing prepared to maintain forward compatibility for. the idea of more broadly randomly swapping out large chunks of programs from under them never worked and never will.

sure is a good thing for this argument that Linux distros don't exist

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