Hacker Newsnew | past | comments | ask | show | jobs | submit | ptato's commentslogin

>You’re not exploring something. Asking for something. Acting on something. Why? Because it’s a bad idea.

No, it's because it is hard. If it is a bad idea, why would I want to do it?


Spain - most people wouldn't ask guests to take their shoes off


What is Kanban?



I've found enough Firefox-only bugs when doing things through spanish government sites that I started using Chrome for them preemptively.


Zig embeds clang to compile C code. This doesn't add a new dependency since Zig already depends on LLVM. If there is a future where the self-hosted Zig backend is good enough to not depend on LLVM anymore, there might be a reason to use a C compiler written in Zig (possibly https://github.com/Vexu/arocc)


Also worth noting that Zig embeds C stdlib source code (musl if I'm not mistaken). That means it is easier to cross compile C projects using zig since you don't need to install a cross toolchain. This is why some golang/rust projects use Zig when they need to cross compile.


It adds a new dependency - the c language frontend - aka clang - surely the zig compiler emits LLVM IR, not C code?


zig supports importing C headers via the special built-in `@cImport`. That feature requires a C language front end to operate. https://ziglang.org/documentation/0.10.1/#Import-from-C-Head...


Zig has a C backend that supports something like 99% of all Zig if I'm remembering the number correctly.

Zig has almost completely solved the bootstrap problem.


This isn't quite correct. Yes, it can output C code; however the result is not very readable at all, and fails the DFSG on generated code. It _is_ useful for compiling Zig code to targets which aren't supported by LLVM, however.


Do you have a reference for this? Does it use a C backend that is part of LLVM, or is it something Zig-specific? What are its limitations? Can it compile libraries to C, or only entire applications?

I have wanted Rust and Zig to support compile-to-C for a while, so this is exciting news for me.

One thing that would particularly interest me is if functions intended to be inlined could be emitted into .h files.


For Morrowind it didn't just upgrade the rendering, it completely changed the aesthetic of the scene. Is that on purpose? At that point you can't call the results better, only different.


It seems like the big change is that the light sources now actually emit light so the scene becomes a lot brighter. Maybe part of the process should be turning down global illumination? That might make dark corners even more dark however, and "hidden" clues that were supposed to be difficult to see may become outright invisible.


It seems you'd certainly be able to go in and just tweak the lighting without doing all the AI touchups, texture upscaling, and model swaps as they did in the video. Pretty wild stuff, either way.


It ended up looking similar to Oblivion. So I'd wager a guess that it was the intended aesthetic, only limited by the older technology.

The only authority here would be the original designers.


It is true that it changes the aesthetic a bit, and it is a change rather than a straight upgrade.

But the old rendering pipeline still exists I guess, and the new one look wicked cool.


Don't read too much into it. It's a tech demo for a tool. Modders are supposed to make those decisions.


Can you write GUIs with Janet?



And that is 379 LOC for an Asteroids clone which includes some inline defined math functions instead of an include to an external math lib. Raylib is great for the GuI stuff (it is an immediate mode GUI, because games), and it is written in C.


good enough


Yeah... he says you can learn the language in an afternoon, but his book is so long-winded... I just want a short intro so that I can start writing programs.


I really like the conversational style. If I wanted the quickest, driest way to get started in Janet, I'd probably go to https://learnxinyminutes.com/docs/janet/


Sadly that doesn't features such as modules, fibers, PEGs, macros, etc


How about the official Janet documentation? https://janet-lang.org/docs/index.html


The book (which I really like so far, 7 chapters in) is more of a deep dive which covers a lot of the gotchas and intricacies without shying away from the nastier parts of the language. The documentation on the official site should get you going in a couple of hours.


I've thought about setting up something like this before for myself. You might have given me the motivation I needed...


Built-in names are essentially reserved words, and there are dozens of them. The @ prefix ensures you don't step on user's variable names, and that you can add new built-ins without making breaking changes.


Why aren't they simply namespaced, like `core.some_function`?


Because there'd need to be a magical exception for the "core" namespace that makes it not just a file of Zig code somewhere like every other module.


Isn't there already a magical exception for "root" and "builtin"?


not really, those are two modules that are always available to you, but you still have to import them like any other Zig module `const builtin = @import("builtin");`


5 characters to type instead of 1.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: