7 ms·
Show HN: Beef, a new performance-oriented programming language
- adamc 7y agoLooks like another C/C++ language-family product for sure. What I want is a Lisp with Python-level libraries.
- Areading314 7y agoHy
- codezero 7y agoHave you looked at Hy? https://github.com/hylang/hy https://github.com/hylang/hy
- phyrex 7y agoClojure? The java ecosystem is the only thing that rivals the python one, and Clojure integrates very well.
- TeMPOraL 7y agoYup. And not necessarily a new Lisp - Common Lisp, with SBCL implementation, is plenty fast enough. It's just the library and tooling ecosystem that's lacking.
- kensai 7y agoJulia. Not exactly Lisp, but the concepts are there. Plays well with Python.
- sesuximo 7y agoI would like to have an excuse to use Julia in 2020
- ubertakter 7y agoI've been learning and using Julia the last few weeks (coming from an OOP background). I highly recommend it. I mainly write highly mathematical programs and utilities to process some data or another. So far I've knocked out some smaller programs and started translating a larger library to learn about the type system. I haven't dug in to UI bindings yet.
- AnimalMuppet 7y agoThen you're probably not looking in the "performance-oriented" category.
- TeMPOraL 7y agoWhy? SBCL implementation of Common Lisp is very usable for performance-oriented tasks; it compiles to native code, and with sufficient nudges, you can get pretty tight assembly out of it. Clasp implementation of CL would be another choice, it leverages LLVM for compilation. The problem is with the library and tooling ecosystem.
- AnimalMuppet 7y agoIf you're going to do SIMD, you have to care about memory alignment. If you're going to do high-performance without SIMD, you still wind up caring about things like cache misses. So you'd want a Lisp that 1) lets you control memory alignment, and probably 2) that doesn't garbage collect. At that point, is it really a Lisp? Now, you may say that "performance-oriented" doesn't have to go as far as SIMD or caching tweaks. And that's true. But if you want a performance-oriented language that can reach all the way up the performance curve, I don't see it being Lisp.
- TeMPOraL 7y agoDepends on which parts of Lisp you're interested in. You can go as far as writing Lispy assembly (SBCL does), which gives you control over memory and is not garbage collected. As someone desiring a performance-oriented Lisp, this is something I'd like. At runtime, I can handle memory myself ($deity knows I often do that when writing performant code). What I want to have is the friendly, homoiconic Lispy syntax, the ability (and the ease) to write code that writes code, and perhaps to have these facilities available at runtime.
- WorldMaker 7y agoAlso, memory alignment isn't an entirely foreign concept to Lisp, it just rarely has been a focus. The long living irony that the etymology of the names of very common Lisp functions `car` and `cdr` themselves are a lingering artifact of 36-bit word memory alignment on an ancient IBM system architecture.
- draklor40 7y agoClojure. Faster than Python, just as good libraries.
- adamc 7y agoMy experience with Clojure was that you spend a lot of time looking at Java-level exceptions. It doesn't really hide the Java dependencies. It's an OK lisp if you want to combine it with Java, but if you don't... not so good.
- scott00 7y agoLove the concept. If the author is hanging around, are you working on this full time, or is this a side project?
- metaculus 7y agoHow is it "Performance-oriented"? Is there a special language construct that is exclusively for performance?
- JeremyBanks 7y agoCrappy name and branding. Not a fan.
- 49para 7y agoYes, why ensure that you will never be able to raise this with senior management as a serious option ? From then on you will be known as the "where's the beef guy" https://www.youtube.com/watch?v=Ug75diEyiA0 https://www.youtube.com/watch?v=Ug75diEyiA0
- brobits 7y agohttps://en.wikipedia.org/wiki/Deadbeef https://en.wikipedia.org/wiki/Deadbeef it's very relevant if you've ever done low level debugging, which is likely what you'll spend your time doing developing games
- gravypod 7y agoIt looks like the author of this language is using it for game development. What features does Beef provide that other languages don't from a performance perspective? It looks like it has a class & object style. Does it give you tools to control memory layout of those allocations for performance? I know some game devs have commented that the reason C++ classes aren't used in their entity system is memory locality & latency issues.
- beefdev 7y agoThere's a split between class and struct. Classes are reference types and have more 'features', and structs are a lot like C structs - you have complete control over their layout and allocation. There's future plans to add more high-perf sugars like automating some SoA and AoSoA layouts, but you can do all that manually right now.
- tsukurimashou 7y agoYou should probably do some perf analysis to show how Beef performs vs C / C++ for game related tasks. Also it would be awesome for you to make a few code samples / tutorials on how to get started with game development with Beef. I'm sure it would attract a lot of people to your language if you show some "proof" it is a nice language for gamedev!
- Lerc 7y agoThis seems very similar to the FreePascal approach. It's tempting to give this a go, but there are so many languages out there... Maybe I'll try a Ludum Dare in it.
- ossworkerrights 7y agoWould be interesting to describe in more detail what makes it performance oriented.
- beefdev 7y agoPerformance-oriented implies a type of tradeoff made during design decisions - that tradeoff also means the language is weaker is certain ways than languages such as Javascript, Python, Ruby, etc. Generally that would mean: - More static, less dynamic - No GC - Lighter abstractions - More directly conforms to hardware (even when it create a 'less clean' interface)
- 0xBA5ED 7y agoI'm guessing they were asking for some _specific_ features/techniques of Beef that contribute to achieving your design goal. The design goal itself is made very clear.
- themacguffinman 7y agoNot the author but a few I gathered from reading the docs: - no exceptions - mutable strings with optional pointer access - no GC
- beefdev 7y agoAuthor here. I'm the engineering co-founder of PopCap Games. I left PopCap after the EA acquisition, and I've been working on this project mostly full-time for the last five years. Before Beef, I was developing game code in C# and engine code in C++ and I felt C# was just much more pleasant to work with - faster compile times, better IDE tooling, better errors, etc. Then it struck me that none of the things I liked about C# really had anything to do with the JIT or the GC, and it may be possible to create a "best of" merging between C# and C++. I know there are other "C replacement" contenders out there - the differences are probably best explained through Beef's specific design goals listed at https://www.beeflang.org/docs/foreward/ https://www.beeflang.org/docs/foreward/
- badsectoracula 7y agoLooks nice, unlike pretty much every other language i see posted here and in proggit it has a full tool suite (with IDE, debugger and even profiler) and documentation. It does look like a professional quality product. EDIT: i think you need to add some information about which systems exactly are supported, especially for Windows where not everyone is running the latest version. Also what about backwards compatibility? It might be too soon considering a 0.x release but how often does the language break existing code and what are the plans for after 1.0? No break at all no matter the cost, breaks every major version, total breakage regardless of version, ?
- beefdev 7y agoGreat question - I've thought a lot about backward compatibility but I don't have a good answer yet. The whole Python 2 vs 3 nightmare has given me a couple sleepless nights though.
- earenndil 7y agoMay I recommend d's scheme? I personally find it works quite well. Essentially, breaking features are introduced as a 'preview' that you have to opt into with a compiler flag. After a period of some time, it is changed so that the old and new behaviours can co-exist, but a deprecation warning is issued where the old behaviour is found. After some more time, the warning is changed to an error, but with an option flag to change it back to a deprecation. Then, finally, it is removed completely for the compiler. This makes the maintainers' job a bit harder, but not by a lot, and as a user I find it a nice medium of stability and progress.
- vmchale 7y agoIt looks like it's not memory safe? What does this offer over existing options?
- beefdev 7y agoThere are some optional memory safeties, including real-time leak detection, but this language targets an audience who value performance over total memory safety. For someone looking for a C replacement where memory safety is absolutely critical (ie- open server applications) then Rust may be a better fit.
- vmchale 7y ago> value performance over total memory safety Is there any evidence this is a tradeoff? What of linear types?
- NilsIRL 7y ago> Is there any evidence this is a tradeoff? Bound checking often is the reason rust performs worse on some benchmarks. Though I wouldn't consider this a problem at all since it can be disabled.
- zozbot234 7y agoIt's better to manually hoist the bound checks so that they happen before any critical loop. The compiler often can't do this because it has to preserve the partial effects of where the failed bounds check happens, but that's generally not what you really want; if anything, you'd rather fail fast.
- PeCaN 7y agoLinear types (and affine types, as in Rust) only buy you some memory safety (preventing use-after-frees, and memory leaks although that's not really a safety issue). The more important part of memory safety is preventing out-of-bounds accesses. Rust, Ada, and (it seems) Beef sacrifice performance for memory safety here by having runtime bounds checking. (Though there is not much performance cost to this and all of those have options to turn off runtime bounds checking anyway.) The only performance-oriented language I'm aware of that is fully memory-safe at compile time is ATS‚ via a combination of linear types and dependent types, and using ATS is… cumbersome.
- pjmlp 7y ago> Memory management in Beef is manual, No thanks. We already have enough of those.
- maerF0x0 7y agoAnother "tip" for helping your language grow. I highly recommend you look at how the golang bootstrapped itself and aim to replicate. Golang provided: * a tour of go + go playground to allow easy testing of the language + immutable sharing links * effective go to explain how to use the language beyond the syntax/grammar * strong opinionated choices on things that dont matter (go fmt) * a strong opinion about non-breaking changes in the language + stdlib and a number of other things. IMO a language is only as good as it's community.
- kotrunga 7y agoThis is a great comment. Look at success stories, especially recent ones, and learn from them!
- patrickaljord 7y agoAll these 4 points are valid and did help golang but I think what took golang to the moon was: - the immense success of docker based on it which made everyone build their devops tools in go (kubernetes helped too later) - a very solid and stable http library included in stdlib (plus other networking goodies to easily run your own ssh endpoint in a few lines of code) tl;dr to get your language some traction, make it solve at least one problem much better than the competition and have someone build a super popular open source project on it.
- giancarlostoro 7y agoI think also out of the box standard library features. You can make production ready web apps. Also their initial approach to getting / sharing packages imho is useful. So a decent package manager would do wonders. Rust has Cargo which does builds and packages. D has dub as well. Definitely recommend making code sharing / reuse a breeze.
- beefdev 7y agoThanks- A Cargo-like system is the long-term trajectory the language is on now.
- mathgladiator 7y agoAwesome, I love seeing new languages (and I hope to share mine in good time). I didn't see it, but a good tutorial introducing new ideas would be good.
- mathgladiator 7y agoAlso, I love the name. Is it anyway in relation to a strip club?
- reaperducer 7y agoI took it as "beef" as in "complaint." Like he had complaints about other languages, and instead of moaning about them on the internet, he went out and made his own language.
- skohan 7y ago> but a good tutorial introducing new ideas would be good. Even a few code examples of some language features right there in the README would go a long way
- sbussard 7y agoThe code might be brilliant but the biggest obstacle to adoption is probably the name and the logo. All I can think is "beef begins to smell after a couple of weeks" and it's hard to overlook that mental imagery when evaluating the vast array of good options in the programming language space. It may also be considered culturally insensitive to a noticeable percentage of software engineers, which could hurt the adoption rate.
- Chris2048 7y ago> It may also be considered culturally insensitive Everyone has their opinion; If the author does not consider it culturally insensitive, then there is no problem. I think there may be a hidden benefit in pre-filtering the community for "developers who flip their shit over naming"..
- jedberg 7y ago> If the author does not consider it culturally insensitive, then there is no problem. The author can do what he wants, but if he wants adoption, then it would behoove him to consider cultural sensitivity, especially if it is offensive to enough people to stifle adoption.
- Chris2048 7y agoIn which case see paragraph 2
- jedberg 7y agoI would say that paragraph 2 is completely wrong. Why would you want to filter out people who are culturally sensitive from your community? Because you don't want to have to consider alternate viewpoints?
- Chris2048 7y agoYou're putting words in my mouth, I didn't say "people who are culturally sensitive" - that wasn't my euphemism. Arguing over meat-related naming is exactly the kind of "alternative viewpoint" I have no time for, i.e I would say it's completely wrong.
- 0xBA5ED 7y agoThis project would benefit greatly from a bulleted feature list with the best features at the top. The lofty goals should be _under_ that imo.
- Scarbutt 7y agohttps://www.beeflang.org/docs/foreward/ https://www.beeflang.org/docs/foreward/
- _bxg1 7y agoIs there planned console support? I assume that's the hardest group of platforms for any engine to target, and is part of why Unity and Unreal have such a stranglehold on the market.
- beefdev 7y agoConsole support important. That being said, there's a question of what console support means. For a programming language, that generally just means the compiler needs to be capable of generating binaries for the given target processor. The issue of how to interact with the hardware itself and how to participate in the toolchain provided by the console vendor is much more difficult and is outside the scope of the language/compiler. The ideal case is for an engine such to embrace Beef and work through those issues. Chucklefish was an early(ish) adopter of Rust and tried to maintain an XBox/PS4/Switch toolchain but eventually abandoned it. Rust is probably a good example of a popular "alternative language" that may pave the way for BeefLang and others to work their way into those spaces.
- speps 7y agoFellow dev here, I think you're wrong on this part: > The issue of how to interact with the hardware itself and how to participate in the toolchain provided by the console vendor is much more difficult and is outside the scope of the language/compiler. I've been looking for a language that would allow gradual transition from C++ for example. If you have a C++ SDK, you could still write your whole engine or just some modules in Beef.
- beefdev 7y agoI was speaking more about when you have to conform to Nintendo's Switch build system (whatever that looks like - NDA) and you can't control much of that. If you do have more control then you're in a much better situation, but crossing language boundaries can still be tricky. Generally you end up having to write "wrapper" code to make those language boundaries palatable. There are code generators like SWIG to handle those things, and some languages like Zig handle importing of c headers, but if the C++ library your trying to use is returning a std::shared_ptr then that's not going to be a very pleasant construct for you to attempt to work with in any language besides C++. If you can split your code sections into simple and clean C-like interfaces then the job becomes much, much easier.
- crucio 7y agoWhy celebrate and embrace animal cruelty by using this name? It's very off putting
- brobits 7y agoOP isn't celebrating or embracing animal cruelty. eating animals to survive is not cruel, it is nature and how our bodies have evolved. second, this name was likely influence from a programmer meme that's probably older than you: https://en.wikipedia.org/wiki/Deadbeef https://en.wikipedia.org/wiki/Deadbeef please quit being so sensitive for no reason.
- ixtli 7y agoA deep ethical concern for the treatment of animals is far older than computing: http://www.jewfaq.org/animals.htm http://www.jewfaq.org/animals.htm . The cow is sacred to hindus, of which there are 1.08 billion. stop assuming the problem is with people who care deeply about something and not people who tell them to shut up in public.
- crucio 7y agoYou are almost certainly not eating animals to survive, you are doing it because you think it's normal and are either not aware that there is another way, or have chosen to ignore it. It is absolutely unnecessary for most people in first world countries to consume meat, there are easy to access alternatives that are better for the environment, animals, and quite possibly your health. If you look at the screenshots it is clearly referencing dead animal flesh with the IDE icons.
- dang 7y ago"Eschew flamebait. Don't introduce flamewar topics unless you have something genuinely new to say. Avoid unrelated controversies and generic tangents." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- 7y ago
- TristanDaCunha 7y agoDoes it have to be named after dead animal flesh?
- reaperducer 7y agoThere are at least three other meanings of the word "beef." Four, now that it's a programming language.
- mottosso 7y agoThe logo is an image of a steak. :) https://github.com/beefytech https://github.com/beefytech
- celticmusic 7y agoHow does this compare/compete with Jonathan Blow's language?
- Arcanum-XIII 7y agoIt does exist in the open.
- beefdev 7y agoThere's a lot of overlap ideologically. One major difference is that I'm an IDE fan and Jonathan dislikes IDEs. That can really percolate through a language. BeefLang had an IDE on day one, and I think it'll show. One of my goals was to show how good a good IDE experience can actually be to someone who is used to working in C/C++.
- jcelerier 7y ago> One of my goals was to show how good a good IDE experience can actually be to someone who is used to working in C/C++. I wonder what you find lacking in the current C++ experience. e.g. with the IDE I use (QtCreator), I can quickly refactor things across million-lines codebases, perform a decent set of more advanced refactors (https://doc.qt.io/qtcreator/creator-editor-refactoring.html https://doc.qt.io/qtcreator/creator-editor-refactoring.html), auto-generate boilerplate code, I get in-line hints, lints and warnings while I type all with clang-based auto-completion...
- RazrFalcon 7y agoI'm using QtC daily too, and it's far from perfect. - It still can't handle most of the CMake projects. - Refactoring/autocompletion/go-to-definition doesn't work on a heavy-templated code. - Clang must be patched to work correctly (at least code analyzer doesn't work out of the box). - Code generation sometimes produces malformed code. - No ANSI escape codes support in terminal/output. - Random crashes. IDEA with Rust plugin is years ahead.
- 7y ago
- daenz 7y agoI haven't reviewed your language, but from a fellow software engineer, congrats on your work! It takes a lot of grit to make a programming language. I hope to make one as well one day. If you blog about your experiences about the non-technical challenges, I would definitely read it.
- brlewis 7y agoFor those who don't like the name, think of it as the verb.
- fmakunbound 7y agoDoes it have interactive features? Like messing with game state in a REPL while the game's running? The IDE looks really nice... made me wonder if it had something interactive as well.
- exikyut 7y agoNot OP, but I can definitely +1 this idea. It's a sorely missed component that must be thought through and implemented/specialized for literally every project (done in C/C++/etc anyway).
- beefdev 7y agoHm- maybe your experiences are different, but for projects I've worked on, the game state is way too complicated to be usefully inspected and manipulated with a REPL. Especially if you are doing any sort of data-oriented design such as SoA or ECS. There are quite a lot of other complicated factors such as "what thread does this run on?" and "when?". When you are debugging and hit a breakpoint then you basically have a REPL in the Immediate window...
- auiya 7y agoNot to be confused with BeEF, the long-running Browser Exploitation Framework. https://beefproject.com/ https://beefproject.com/
- zadkey 7y agoLooks pretty cool.
- skohan 7y agoI love the concept of this language! Even though a lot of attempts have been made, I think no one has really filled the "more ergonomic C" slot yet, and I would be happy if this manages. I am sorry to see semicolons though. I have never missed semicolons after moving to languages where they're not required, and it's always a bummer going in the opposite direction.
- TheSockStealer 7y agoPeople who write Go are Gophers. People who write in Rust are Rustaceans. People who write in Beef are Beefeaters? Carnivores? Asking the tough questions here.
- sonofaplum 7y agoMeatheads? Beefy Boys?
- 1wd 7y agoBeefcakes?
- ilikehurdles 7y agoI like this one the most.
- ilikehurdles 7y agoBovines?
- nknealk 7y agoBeefalos? Keeping with the animal theme here
- amelius 7y agoBeef Jerkies.
- hostcontroller 7y agoBeefitarians
- SeekingMeaning 7y agoBeefheads
- moron4hire 7y agoPeople?
- 7y ago
- karmakaze 7y agoWhat's the concurrency model and what thread/coroutine support is available or planned? I see some supporting classes in the System.Threading namespace.
- beefdev 7y agoThe most obvious choice would be async/await support - no specific plans yet, though. The concurrency model is, like C++ or even C#: sequential consistency for data-race-free programs (SC-DRF). No green threads or anything crazy, no 'message passing', just normal system threads, normal locks, you control how you access memory yourself. You do synchronization just like you'd do in C/C++.
- AndyKelley 7y agoIf you go the route of async/await support - I went through the arduous process of figuring this out for zig (for which I think our design goals are nearly identical), and went through a couple different iterations. I have experience with using LLVM's coroutines API and abandoning it to codegen them manually. Would be happy to have a brainstorming chat with you sometime if you're interested.
- anonymoushn 7y agoHello, I would appreciate it if more languages had something like ucontext_t or byuu/co, because I don't enjoy tagging every call site with "await" whenever I change a method to do something that might consume some time (and every call site of those functions containing call sites too, and so on), and because I do enjoy being able to write code that uses speculative execution (like for time-travel netcode for a 2d fighting game) without manually converting all my imperative code to a state machine like a compiler should do. I am a bit of a snob, maybe, but I've come to think one of the bare minimum features for any language is copyable coroutines.
- Gene_Parmesan 7y agoCongrats on the release. This looks like the first C and/or C++ replacement I might actually give a significant whirl. I enjoy programming in C as a hobby-grade thing, but it gets challenging organizationally fairly quickly for the sort of full applications I usually build. And I'm also a big fan of the C# "mouthfeel," so to speak. I have tried Rust, and while I'm a fan of its design goals, etc., fully wrapping my mind around the ownership/lifetime system is just not something I have the mental capacity for right now. I don't use these systems langs enough professionally (read: at all) to justify the labor cost. This also seems pretty damn polished for it being the first time anyone publicly has gotten a look at it. I mean, a full IDE on day one is nuts. I know Beef seems sharply tuned for game dev (another hobby of mine), but do you see Beef as being usable for general purpose systems/application development? Is there anything about it that would discourage its use for a standard desktop GUI app? And because I'm curious and haven't seen this answered elsewhere, is the Beef IDE also written in Beef, for some tasty beefy dogfood? edit: Nevermind on that last question, I found it answered in the guide (in the affirmative). Nice!
- mwcampbell 7y ago> Is there anything about it that would discourage its use for a standard desktop GUI app? Complete lack of accessibility support, particularly for blind users via screen readers, in the included GUI toolkit. Please don't use this for any application that people will be required to use in their job or education.
- beefdev 7y agoAlso, to be clear- the custom GUI library that the IDE uses is NOT a general-purpose GUI library; it is a support library for the IDE and other BeefLang tools. A true general-purpose GUI would be quite a lot more flexible and also much more complicated... which is not something that is intended for this particular GUI library. This is mentioned on https://www.beeflang.org/docs/corlib/ https://www.beeflang.org/docs/corlib/ but should perhaps be more predominantly stated.
- mwcampbell 7y ago
- deleted 7y ago[deleted]
- AndyKelley 7y agoZig author here. Welcome to the club. How do you solve the IDE features ("fast and trustworthy refactorability (ie: renaming symbols)") in the presence of conditional compilation? btw your name is an anagram of "beefitrian"
- beefdev 7y agoHi Andrew- of course I've been following Zig. Thanks for your trailblazing efforts in the "C replacement" space. It's true that symbols in 'false' preprocessor blocks will not be caught. Maybe it's best said "if the compiler will find the symbol when you compile, then the symbol renamer will find it when you rename". Which is definitely not true for most symbol renames I dare to attempt in C++ IDEs.
- AndyKelley 7y agoDamn, sorry, wasn't trying to call you out; rather hoping that you had thought of something I didn't that I could steal from you. I think starting with an IDE from the very beginning was a smart move. For what it's worth, here is my current vaporware plan to solve this problem: https://github.com/ziglang/zig/issues/3028 https://github.com/ziglang/zig/issues/3028 I would be curious to see your thoughts on this, especially if you end up trying to tackle this problem in Beef.
- beefdev 7y agoAh- for BeefLang that's less of a problem since even unreachable code is typechecked (without code generation). But yeah your problem sounds very hard. I guess I don't fully understand why you would only want reachable functions to be listed in documentation...
- rishav_sharan 7y agoAndrew, while you are here- can you please make smaller monthly zig releases instead of very large releases. 0.6 has been in the oven for a while now.
- novok 7y agoDo you think you will add nullability / optionals into the the type system along with ADT types? (Think swift enum's with associated types). I think structurally they are fairly simple, but very powerful.
- beefdev 7y agoThere are nullables (like C# nullables), same syntax: "int? a = null;". There's also algebraic data types like Swift's enum. Quite a lot like Swift's enum, actually. See bottom example in enum section: https://www.beeflang.org/docs/language-guide/datatypes/#enums https://www.beeflang.org/docs/language-guide/datatypes/#enum...
- maxilevi 7y agoThis looks like it has all the missing performance oriented features I wish I had while I was developing the engine of my game[0] using C#. I will definitely try it out for my next game/prototype! [0] https://store.steampowered.com/app/1009960/Project_Hedra/ https://store.steampowered.com/app/1009960/Project_Hedra/
- sida 7y agoMay I ask something that could be rude, how have you been paying the bills if you have been working on a language full time for the last 5 years?
- beefdev 7y agoI'm a co-founder of PopCap Games. Sold to EA in 2011.
- wallawe 7y agoFrom wikipedia[0]: "Electronic Arts announced it was acquiring PopCap for $650 million with an additional $100 million stock option." He's probably got enough runway for a couple centuries.. [0] https://en.wikipedia.org/wiki/PopCap_Games https://en.wikipedia.org/wiki/PopCap_Games
- sida 7y agoWhat is the long term vision for this language? For us to pick up a new language and potentially use it for work, I need the confidence that this language is going to stick around and have a user base. Go and Rust benefitted from being backed by Google / Mozilla. Whereas, Beef doesn’t even have a corresponding game engine. Have you thought about you will grow the language usebase?
- blacksqr 7y agoAny performance benchmarks vs. competitors?
- beefdev 7y agoIt's as fast as C, since anything you can express in C can be expressed in BeefLang. The real question is how fast an idiomatic expression of an identical complex program is in both language. Well, that might not even be the question- it may be more like "if presented with a problem that requires writing a program, what are the characteristics of the solution to that problem if the language chosen is X vs Y". Maybe? Anyway, I don't think anyone has figured out how to properly compare programming languages yet in that way other than "try it and see if it works better for you than other things you've tried before".
- blacksqr 7y agoHow about starting with something simple, like a fibonacci sequence calculation? More examples: https://benchmarksgame-team.pages.debian.net/benchmarksgame/ https://benchmarksgame-team.pages.debian.net/benchmarksgame/
- kaetemi 7y agoLooks nice.
- HoppyHaus 7y agoLooking lightly at some of the code and the screenshot provided, I'd like to compliment on the look of the language. A lot of the newer languages coming out mess with the "normal syntax" way too much, which discourages me from learning it. Beef actually looks like I could sit down, and learn the features of the language, rather than relearning a new syntax that wouldn't translate well. I wish you luck!
- zelly 7y agoWhat is your opinion on Blow's Jai programming language?
- beefdev 7y agoSeems great - I'll copy as many good ideas as I can. The root goals are very similar, but some issues in preference have resulted in very different approaches to meeting those goals.
- mntmoss 7y agoHello - the IDE focus looks very attractive from an indie-engine developer's perspective(small scale development always gains the most from having unified, consistent tooling). Will this be a customizable environment to e.g. assist working with asset dependencies? At a glance I don't have any other major remarks. It looks very much like it's on the same general trajectory as Zig, which is probably a good sign that that design space is in the right ballpark for low-level real-time systems. There is some attraction in having automatic memory available for application-level tasks with more indefinite boundaries(editing tools tend to develop compiler-like qualities which in turn creates a need for more introspective style), though it's probably outside the scope of this language and might be suitable for a scripting-layer approach instead.
- jariel 7y agoThis looks amazing. Questions: 1) Why your own IDE and not VSCode or something? 2) Can you tell us how this varies from Rust in terms of practical applications? 3) C++ integration support? 4) MacOS? I really like your pragmatic ethos on this, it looks like it was designed to be used not talked about.
- beefdev 7y ago1) VSCode was not able to accomplish the development experience I wanted, but I would certainly support a BeefLang language server for VSCode (and other editors/IDEs). 2) Like C, BeefLang idiomatically allows certain types of safe data patterns that the Rust checker would disallow since they cannot be reasonably statically proven to be safe. If you want to conform to Rust patterns then use Rust. If you don't, then BeefLang is another choice for you. 3) Do you mean if the IDE supports C++? It used to support Clang autocompletion and such, but it just wasn't anywhere near the quality of VS Intellisense so I just took it out and I still use VS for C++ editing. 4) Command-line compiler only.
- jariel 7y agoThanks. By c++ integration support I meant able to use C++ headers and link to C++ binaries. This is really a great project, very pragmatically oriented, I wish you well. It's hard for any new language to gain momentum without underlying platform buy-in (i.e. Kotlin became 'a thing' when Google adopted it for Android). But I hope you can find an angle.
- PudgePacket 7y agoI love it. Curious if you have written up anywhere your thoughts on Rust, and how you think Beef differs in the development of Games. Best of luck, looking forward to following it's progress!
- animex 7y agoWhy a custom IDE vs. a VSCode integration? Or is that the business model? License the IDE?
- lyrachord 7y agoMaybe there is no why. And why why?
- dj2503 7y agoAt the language level, it feels that Beef has more concepts and is more complicated than Jai. I don't know which one is more expressive and more readable when actually used.
- lyrachord 7y agoa brilliant point: for(var < end) loop !!
- skrebbel 7y agoFWIW, hats off for the installer UI design.
- skrebbel 7y agoI'm blown away by the completeness of this. The IDE is extremely full featured, albeit a little weird in places (eg scrolling with my laptop touchpad basically doesn't work). Love the Windows installer. But wow, go to definition, refactorings, debugger with great UX, callstack, etc. Also love the example game. It's written so cleanly that I learned a thing or two about 2d gamedev just from scrolling through the code. I love the little pragmatisms in the language, eg: for (let entity in gGameApp.mEntities) { if (let enemy = entity as Enemy) { // .. do something with each enemy } } That if/let/as combo there is something I'd have loved to have in many languages. Also hats off for switch/case without break. Finally! I also love how you're mixing C/C++ "global enum value names" convenience with namespaced safety: public static Result<(char32, int32)> TryDecode(char8* buf, int bufSize) { ... return .Err; // not Result.Err, because the return type is given in the signature } I know that these little syntactical things are not the key challenges of language design, but obviously they're the first things I see, and I like the amount of attention you've given them. You really only have the opportunity to get them right at the very beginning. I think the docs are a little sparse still (but that can be expected, of course). Eg: - I found it hard to parse this: public Random mRand = new Random() ~ delete _; There's docs about it here https://www.beeflang.org/docs/language-guide/datatypes/initialization/#destruction https://www.beeflang.org/docs/language-guide/datatypes/initi..., but the "delete _" part isn't really explained. What's that underscore? I can infer that it probably means "this value", but I can't find it back. I love that you made it easy to destruct fields like that, right there in the initializer expression, btw. Will probably kill the need for 90% of destructor methods out there. - Apparently this converts floats to ints: (.)(mX - entity.mX) Or at least it does in HeroBullet.bf:15. I'm thinking maybe this does something similar as `.Err`, in that the dot makes it cast to whatever the expected type is in the function being called? I'm not sure though, it looks like a super powerful feature, maybe :-) Finally, I believe .bf is also used for that other super convenient and performant language, Brainfuck. I doubt that causes any practical problems, but then again, why not just .beef?
- beefdev 7y agoThanks for the checking out the language thoroughly, that's appreciated. With "delete _", you are correct, the "_" refers to "the value in question", which is mRand in that case. When you have a switch statement, the "_" refers to the value being switched over. The "." type is a special type meaning "the expected type here". So that's explicitly casting to the expected type, since an implicit cast from float to int is not allowed. And yes, my apologies to Urban Müller for overloading his file extension, but it seemed the chances of that actually being a problem for someone were acceptably low and I really really preferred ".bf".
- rishav_sharan 7y agoCan you add a scoop based installer for windows? That way it will be easy to update the compiler.
- axilmar 7y agoSorry but I cannot stand the separation of structs/classes and 'classes' being 'by reference' and structs by value types. It's the reason I don't like D. C++ makes a lot more sense: the type declaration is not coupled to specific allocation patterns by default, which to me is a lot better choice than structs and classes ala D.
- gmueckl 7y agoRhis distinction also appears in C# in exactly the same way and I don't find it that hard to use. Also, Beef allows you to explicitly allocate objects on the stack via "scope:". So being by vale or by reference is a default rather than set in stone.
- rhodysurf 7y agoI feel the complete opposite. Ever since discovering this in Swift I wish more languages had the same documented separation
- MauranKilom 7y agoC++ is my bread and butter, but even I consider "struct and class are exactly the same except for default access specifiers" to be pointlessly redundant. I mean, the language could get rid of one of them, but I think the options offered here make sense.
- NonEUCitizen 7y agoDo you support P/Invoke?
- gmueckl 7y agoNo. This language isn't running on .NET. Interop with other libraries is accomplished via C function call conventions. This goes both ways in Beef.
- beefdev 7y agoThis is correct - P/Invoke is not required because all interop datatypes can be expressed in BeefLang, whereas C# does not allow certain types of datatypes in structs (IE: pointers to structs, statically sized arrays).
- pingyong 7y agoThe way append allocations work makes me think that you can't have classes on the stack? That seems at odds with the design goals of making the language suitable for high performance applications - I mean sure you can use structs for everything but at that point you're kinda giving up the benefit of using a modern language.
- DarkWiiPlayer 7y ago(Note: I'm not complaining about this in general, just giving my opinion based on the way I happen to do programming) > which has been built hand-in-hand with its IDE environment This is a red flag for me. What this implies is that the design of the language is likely heavily based on the expectatio that it will be used with the given IDE. Basing a language on C and C# in 2020 seems like a very uninformed choice to me. Sure, C is a great language, and C# is very successful, so they must be good right? But I suspect that line of thinking is also what made the languages as successful as they ultimately became. In a world where even javascript treats 0 as false, because it's what C did, whenever I see a programming language doing things "the C way", I just assume it's cargo cult language design, because most often that's what it is. That's not to say that there can't be good reasons for doing things the way C did them; after all, C did most of them for a good reason. As for the C# part; other than it also falling into the cargo cult language category that copies C without understanding C, I don't really like it's idea of object orientation (which is really just javas idea of OO with a fresh coat of paint). What syntax it copied from C is acceptable, but tell me a modern language that doesn't have somewhat acceptable syntax. Even functional languages don't look like lisp anymore (except lisp itself, of course, which makes up for its inconvenient syntax with other advantages).
- MattRix 7y agoThese are really bad reasons to not use a language. Anyone who makes a language that is not like a popular language (ex C or C#) should have to do a lot of justification for it, not the other way around. Change for change's sake is bad. In other words, if you can make a language that does something new, without having to have new syntax or paradigms, that is much better.
- DarkWiiPlayer 7y ago> Anyone who makes a language that is not like a popular language (ex C or C#) should have to do a lot of justification for it Of course; but that's expected. My point is that this always applies, but sometimes "C does it, so I'm doing it as well" is treated as a good reason for things when it really isn't. Javascript, for example, treats 0 as false in if conditions. This made sense in C, which had no dedicated Nil-value and used the Nullpointer for that purpose, so 0 meant both the numerical zero and nil. Javascript, however, has a dedicated nil-value, so 0 really only stands for the number zero, which isn't any less a value than any other number, and thus has way less reason to be treated as falsey. So, in this example, while C had a good reason to do a thing, that reason just doesn't apply to JS. Maybe there are other good reasons that do apply to JS, maybe they just did what C did without thinking, maybe a bit of both. But it does underline a opint: There should be a reasoning behind every language decision; one that specifically applies to the language in question. And I do believe this isn't the case with many C features.
- throwaway675438 7y agoWell done! A small suggestion to rename the language to "dogmeat" instead to align even better with your meat logo. Filename extension could be ".dm".
- MattRix 7y agoWhat are your thoughts on Unity's Burst compiler? It allows for writing C# code that is compiled to code that is (theoretically) as performant (or even more so!) than regular C/C++ code.
- kreco 7y agoA "perforance-oriented" language without benchmark. That's something.
- rhodydog 7y agoI like the idea of beef, c# like syntax but compiled. One question which I couldn’t find a answer to on the website, can beef be used to create shared libraries such as dlls? I’m thinking this could be a serious replacement for C/C++. I’ve tried go, it’s interoperability with the outside is not very good, and rust requires too much of a learning curve.
- beefdev 7y agoYes- the Windows installer actually does this -- the UI is a BeefLang DLL that is extracted and dynamically loaded. Source code for that part is at https://github.com/beefytech/Beef_website/tree/master/BeefTools/BeefInstall/StubUI https://github.com/beefytech/Beef_website/tree/master/BeefTo...
- deleted 7y ago[deleted]