|
Star War Sex Parrot posted:void ** doesn't make much sense to me since I'm guessing that someone would try to use it to keep track of a 2d array. however, you can't do pointer arithmetic on void pointers which also means you can't index into this structure. c/c++ types can be a pain in the rear end to decode, but always remember the spiral rule: http://c-faq.com/decl/spiral.anderson.html don't read char** as "char pointer pointer" or "char star star", read it as "pointer to a pointer to a char". when you put it this way it is very obvious why "pointer to a pointer to a char" cannot be cast to a "pointer to a pointer to a void"
|
# ? Jun 2, 2016 18:02 |
|
|
# ? May 23, 2024 12:12 |
|
quiggy posted:c/c++ types can be a pain in the rear end to decode, but always remember the spiral rule: http://c-faq.com/decl/spiral.anderson.html this is awful
|
# ? Jun 2, 2016 18:31 |
|
also it is not obvious why pointer to a pointer to a char cannot be cast to a pointer to a pointer to a void
|
# ? Jun 2, 2016 18:32 |
|
Bloody posted:this is awful Welcome to the
|
# ? Jun 2, 2016 18:32 |
|
here is a good rule for c/c++: don't use c/c++. use java or c#
|
# ? Jun 2, 2016 18:33 |
|
yeah lemme just compile c# for a microprocessor with 512 bytes of ram
|
# ? Jun 2, 2016 18:34 |
|
c/c++ absolutely have their place, shaggar not saying java/c# don't also have their place, ofc
|
# ? Jun 2, 2016 18:34 |
|
Bloody posted:yeah lemme just compile c# for a microprocessor with 512 bytes of ram add more ram. ram is cheap
|
# ? Jun 2, 2016 18:40 |
|
Condiv posted:nah, scala is good the scala i write is good, the scala everyone else writes is atrocious uncurable mlady posted:most of the scala love I see around here is for akka akka is the worst. looks good in blogposts, is basically unuseable in real applications
|
# ? Jun 2, 2016 18:48 |
|
Shaggar posted:add more ram. ram is cheap
|
# ? Jun 2, 2016 18:57 |
|
ram is actually insanely expensive
|
# ? Jun 2, 2016 19:18 |
|
quiggy posted:c/c++ absolutely have their place, shaggar c has a place, c++'s place is the dumpster
|
# ? Jun 2, 2016 19:18 |
|
Bloody posted:c has a place, c++'s place is the dumpster i would love an actual competitor to c++'s combination of speed, deployability, and object-orientedness, but sadly there isnt one
|
# ? Jun 2, 2016 19:25 |
|
ADT's lol
|
# ? Jun 2, 2016 19:29 |
|
quiggy posted:i would love an actual competitor to c++'s combination of speed, deployability, and object-orientedness, but sadly there isnt one rust lol
|
# ? Jun 2, 2016 19:30 |
|
Bloody posted:rust lol
|
# ? Jun 2, 2016 19:30 |
|
Bloody posted:rust lol maybe one day we will enter that blessed future
|
# ? Jun 2, 2016 19:35 |
|
Bloody posted:rust unironically
|
# ? Jun 2, 2016 19:35 |
|
loaded up a rust tutorial because bossman is out today and im bored lmao why the gently caress are the print functions actually macros
|
# ? Jun 2, 2016 19:43 |
|
more like dICK posted:Are there still any red hat employees in here hi
|
# ? Jun 2, 2016 19:46 |
|
code:
|
# ? Jun 2, 2016 19:48 |
|
quote:The for in construct can be used to iterate through an Iterator. One of the easiest ways to create an iterator is to use the range notation a..b. This yields values from a (inclusive) to b (exclusive) in steps of one. lollin' real hard over here
|
# ? Jun 2, 2016 19:50 |
quiggy posted:loaded up a rust tutorial because bossman is out today and im bored Regular functions in Rust can't take a variable number of arguments. Also macros in Rust are not nearly the horrorshow that they are in C/C++ and you should not fear them.
|
|
# ? Jun 2, 2016 19:51 |
|
VikingofRock posted:Regular functions in Rust can't take a variable number of arguments. please, im dying
|
# ? Jun 2, 2016 19:53 |
Also the other stuff you posted is... not horrifying? Like it's different syntax than C, but who cares? It all compiles to the same thing and I don't really think the Rust syntax is any less readable.
|
|
# ? Jun 2, 2016 19:54 |
|
quiggy posted:
i want printing to be plang easy but I want the language to be type safe and memory safe. macros are a *good way to accomplish this.
|
# ? Jun 2, 2016 19:55 |
|
quiggy posted:loaded up a rust tutorial because bossman is out today and im bored rust is what happens when you let a bunch of ruby devs design a systems language
|
# ? Jun 2, 2016 19:59 |
|
most plangers don't really use runtime dynamism, they use dynamism to make writing code easier. you can use Marcos to allow dynamic language features without being dynamic at runtime . it's a good thing
|
# ? Jun 2, 2016 20:02 |
|
quiggy posted:i would love an actual competitor to c++'s combination of speed, deployability, and object-orientedness, but sadly there isnt one java or c#
|
# ? Jun 2, 2016 20:03 |
|
quiggy posted:loaded up a rust tutorial because bossman is out today and im bored said the user of the language that uses shift operators for stdio
|
# ? Jun 2, 2016 20:04 |
|
Shaggar posted:java or c# i may love c# but c# is not exactly performant. ffi is p easy tho so calling out to performant fortran/c libs (or anything c-like) is not that scary
|
# ? Jun 2, 2016 20:05 |
|
like almost every time I've written dynamic code in ruby, it's to implement some dsl thing that is resolved just after application initialization. with macros you get to push that stuff to compile time.
|
# ? Jun 2, 2016 20:05 |
|
ask me about the performance boost garbage-nn got from using native matrix libs vs managed code
|
# ? Jun 2, 2016 20:06 |
|
VikingofRock posted:Also the other stuff you posted is... not horrifying? Like it's different syntax than C, but who cares? It all compiles to the same thing and I don't really think the Rust syntax is any less readable. any language where you have to explicitly declare self/this or w/e is loving awful, hth Bloody posted:said the user of the language that uses shift operators for stdio technically those are insertion/extraction operators and are just spelled the same way anyway i use c++ daily because it pays my bills, not because i have any great love for the language Shaggar posted:java or c# *writes embedded code in java*
|
# ? Jun 2, 2016 20:06 |
Bloody posted:ram is actually insanely expensive
|
|
# ? Jun 2, 2016 20:08 |
|
there are costs other than money
|
# ? Jun 2, 2016 20:09 |
|
realtalk the module im currently writing at work has to parse ~2 million data points and generate meaningful information every tick. each tick is .1 seconds, and im lucky if im allotted 1/10th that for a single pass through my module. the code runs on embedded systems deployed in remote locations on a wide variety of hardware please tell me the language i should be using if not c/c++
|
# ? Jun 2, 2016 20:09 |
|
also in a lot of embedded contexts $4 on the bom is outrageously expensive
|
# ? Jun 2, 2016 20:09 |
|
quiggy posted:realtalk the module im currently writing at work has to parse ~2 million data points and generate meaningful information every tick. each tick is .1 seconds, and im lucky if im allotted 1/10th that for a single pass through my module. the code runs on embedded systems deployed in remote locations on a wide variety of hardware define embedded systems and meaningful information. 100ms is anywhere between a lifetime or an instant
|
# ? Jun 2, 2016 20:10 |
|
|
# ? May 23, 2024 12:12 |
|
why hasn't someone designed a strict subset of C or new language for embedded applications that takes inspiration from stuff like JPL's coding standards and MISRA-C that still would save some time over writing assembly is it because the range of constraints are still too broad to be defined rigidly for a "language for embedded systems" Bloody posted:define embedded systems and meaningful information. 100ms is anywhere between a lifetime or an instant
|
# ? Jun 2, 2016 20:14 |