by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    folkertk1
    @folkertk1
    I thought Archlinux was only available for x86_64
    matrixbot
    @matrixbot
    marcuse1w archlinuxarm.org 😀, Also Manjaro is availabe for several ARM devices
    folkertk1
    @folkertk1
    Do you guys know of any good free static code analyzers for Ada?
    Patrick Kelly
    @Entomy
    @matrixbot marcus1w, I've been trying to deal with that for years. It's very low priority for the team. Linux-linux same architecture cross builds are fairly easy to pull off though.
    @folkertk1 SPARK toolset. Otherwise they're all paid, afaik.
    matrixbot
    @matrixbot

    marcuse1w > <@gitter_entomy:matrix.org> @matrixbot marcus1w, I've been trying to deal with that for years. It's very low priority for the team. Linux-linux same architecture cross builds are fairly easy to pull off though.

    Thing is it works like a charm with Ubuntu/Debian. Can’t be that hard to transfer that, if you know what you are doing. Sadly it seems I don’t know, after some attempts failed

    Patrick Kelly
    @Entomy
    @matrixbot marcus1w, well, it's going to need to be cross compiled, not just transferred over. But yes, it's not the simplest. Unfortunately as much as Arch is my preferred Linux distro, I don't use it on ARM/AARCH64 for reasons like this. I don't have the time I can spare.
    folkertk1
    @folkertk1
    Oke, I'm going to need some help
    How do you distribute libraries with Ada
    for some reason besides the spec and .so a lot of project also include a .gpr'
    darkestkhan
    @darkestkhan
    .gpr files are project files , which are useful for compilation
    Patrick Kelly
    @Entomy
    It depends on the toolchain, I'm going to assume you mean for GNAT, in which case you need at least the spec and library object (.so, in this case, it seems). Furthermore, if the library has any components that need to be instantiated, so any generics, you will need the bodies for those specific packages.
    Simon Wright
    @simonjwright
    And the reason for providing a .gpr with library projects is that the .gpr makes it much easier for users of your library to compile against it (assuming they’re using a .gpr themselves)
    NOP0
    @NOP0
    Hi all, will Ada 2020 have the borrow checker like some articles mention? Thanks
    Fabien Chouteau
    @Fabien-Chouteau
    @NOP0 It was introduced in SPARK: https://blog.adacore.com/using-pointers-in-spark
    I'm not sure it will be in Ada2020. @raph-amiard ?
    matrixbot
    @matrixbot

    vrozsas > <@marcuse1w:matrix.org> Is there some beginners guide maybe?

    I did read this intro but also fall early about a seemingly different linker problem
    http://www.inspirel.com/articles/Ada_On_Cortex.html

    Try learn.adacore.com

    vrozsas > <@marcuse1w:matrix.org> Is there some beginners guide maybe?

    I did read this intro but also fall early about a seemingly different linker problem
    http://www.inspirel.com/articles/Ada_On_Cortex.html

    Sorry, I didn't read your previous message. I thought you meant a beginner's guide for Ada in general 😅

    Micah Waddoups
    @micahwelf_gitlab
    Please forgive me for introducing this idea so late in the finalization of Ada 2020, but I have been thinking through the code I have been writing and I discovered one notable missing piece to the Ada 2012 benefits of using Variable_Indexing and Constant_Indexing. This is that only one element can be referenced at a time. There is no allowance for ranges to be used as a parameter. One would have to modify the language standard to allow a similar declaration, distinct and separate from indexing, to allow ranges and only ranges, with no other kind of parameter of similar functionality. For instant, for a theoretical type, Unbounded_String with indexing set up we have these: U_String: Unbounded_String can give you direct access to it's characters with this code: U_String(3). Yet you have to use a function with some separation from the essential process if you want to give direct writing of a substring to the inner contained string Unbound_String(1)
    Micah Waddoups
    @micahwelf_gitlab
    Had to use restroom and timed out on edit... sorry my message messed up... So I was saying that with the proposed "with" attributes Constant_Range_Indexing and Variable_Range_Indexing ranges could be used as parameters to give whatever type is produced by the associated function, effectively a renaming of a sub-string of the internal string and then a direct access to that sub-string as if it was a plain array, so that Sub-string notation could be used on private types that may have record components not meant to be seen: U_String(1..3):="has" ... --> U_String contains "hasbro", but previously contain "manbro". This needs a way to define a range as a function return or parameter to make completely functional, but I hope the great over-all benefit to readability and efficient coding is obvious. How many times have we had to write elaborate code because we had to supplement the readable, efficient code with long if...elsif...else and procedure instructions when simplified, hidden operations are mostly operations on some range within a private type.
    Micah Waddoups
    @micahwelf_gitlab
    If I am being an absolute perfectionist on the idea, perhaps figuring a way to tie both a range and a multi-dimensional range to a hidden array would be preferable? If associating the range parameter with the internal array is all that is accomplished, one could skip the "use-as-parameter" or "produce-as-return" requirements, then the limitation is that the range indexing matches the array's indexing, multidimensional or not. The base of the idea is there, but the only core limitation to my idea is that it operate parallel to and completely separate from the existing Constant_Indexing and Variable_Indexing attributes because the type returned should be an array. Perhaps if this is still an unnecessary limitation, we could simply find a way to give general access to an untyped array that represents the sub-array/sub-string. The actual return object could be, maybe optionally, specified in the Reference_Type. I'd love to hear what refined analysis others may come up with. For now, if I want anything weirdly cool with this type of scenario to be handled by code both efficient and readable, I seem to be using procedures or rigging the Iteration process.
    Patrick Kelly
    @Entomy
    @micahwelf_gitlab I've been bringing this up 5ever and have gotten nowhere. Range should be an actual type, definable as values and usable as such. But there doesn't seem to be any interest in making it a first class type.
    NOP0
    @NOP0
    @Entomy really enjoyed your Ada videos, kinda random I know
    Patrick Kelly
    @Entomy
    @NOP0 Thanks!
    Micah Waddoups
    @micahwelf_gitlab
    @Entomy Thank you for mentioning it. I wish I had found your comments earlier and been able to provide a supporting voice. I have to agree that a range becoming a first class type radically alters the underlying workings for any run-time library because a first-class type has a lot of support in how it is handled and the nature of a range is to be associated with an existing type, so it's not that a want that to change, but there needs to be a handling of some kind to convey the range within the given language, but also to use in general programming, it needs to be flexible enough to provide any return type that is a situational requirement. Perhaps the creation of a special kind of subtype that does not have a range until the range is specified in the parameter. This and a null access type in the function that creates the reference type. I am currently experimenting, again, on using the current features to create different Reference_Type's accessed with different parameter types or different numbers of parameters. Perhaps creating spec-defined null access types that can only have a null value could be a way of conveying a type only for it's attributes in other future instances.
    Micah Waddoups
    @micahwelf_gitlab
    Maybe a new aspect that directly associates an input range with a function that takes a type that contains two discriminates. This way the low and high of the range is still completely manageable and usable as a value in function.
    Patrick Kelly
    @Entomy
    Well the great thing is, a lot of this work has basically already been done, just in a different language. (https://docs.microsoft.com/en-us/dotnet/api/system.range?view=netcore-3.1) It certainly shows the general approach is possible. The biggest barrier to adding this for .NET was compiler support, but Ada already has that side of things. It just needs the type to exist in the runtime, not just the compiler.
    Micah Waddoups
    @micahwelf_gitlab
    That is cool, though I find C# nearly as complicated as Java for all the libraries and identifiers I have to remember that were arbitrarily chosen by different people or different themes. I usually favor Ada as worth the effort, but even without much effort, the libraries and syntax are exceedingly well organized. This was one of my original reasons for exploring Ada.
    Patrick Kelly
    @Entomy
    Ehh, use either long enough and you'll find plenty of "wtf were they thinking?" decisions.
    Fabien Chouteau
    @Fabien-Chouteau
    @micahwelf_gitlab you should open the discussion here: https://github.com/AdaCore/ada-spark-rfcs
    Micah Waddoups
    @micahwelf_gitlab
    I have been trying to create addressing overlap of two very different types so that I can quickly encode or decode the contents My latest attempt, in hopes that I don't have to use the Address attribute declaration in every related function is experimenting with a protected type and also a record with a for... at ... range... bit placement declaration. It syntax scans as valid but I am a little ways off from true testing. Does anyone else have experience with this or a recommendation. The two types are the same size and convert both ways if I can implement it. Oh, yeah, and thankyou @Fabien-Chouteau I submitted my suggestion there. I hope it seems reasonable and functional enough to be considered. The accessibility of using a range in the indexing should be a great readability and efficiency improvement.
    Patrick Kelly
    @Entomy
    @micahwelf_gitlab there's a few uses for what I beleive you're trying to do, so let me throw out a few guesses. You're trying to compactly store data in the same memory location, which will only be used for one object at a time, and you'll have some way of keeping track of what datatype is there. You've got an encoding trick and are slicing data apart, such as with UTF-8, where there's a few bits of data and part of the payload in each packet (byte in this case). I would need to have at least some idea on what you're doing to give suggestions. But this kind of stuff, on either end, I've done a lot.
    Simon Wright
    @simonjwright
    Pragma or aspect Unchecked_Union?
    ...here
    Micah Waddoups
    @micahwelf_gitlab
    @Entomy @simonjwright Cool. I did lookup Unchecked_Union, but I couldn't see how it applied as more than a compatibility feature when working with C or C++. I don't actually care how it is implemented, but I am essentially dicing and slicing groups of bits in a block of concentric bytes dependant on which type is required in order to access or modify the data. On the one hand, I have a packed array with 6-bit elements and on the other hand 8-bit elements, and other paired types have a similar mis-match of bit length elements. It's easy enough to declare in a procedure that has an "in out" argument an object of the same byte-size and of the desired type, but I was hoping for something that was a little more obvious to a reader of the code, what the type is for and how it is meant to be used without looking up the related transformation procedure. The think with a Union in C is, you don't have to use a discriminant to specify what is in the struct-like variable. It also is not easy to define how the bits lineup or anything so cool as what can be done in Ada. Only, in Ada, having a discriminant as a component does sort of limit how I can I can use the variable. I am now pondering making the object conditional on a discriminant that is only defined on assignment, and thus changeable on reassignment, and then attempting a rename with different discriminant. I doubt it will work because it sort of defies all logic associated with strong typing, but per implementation I might satisfy a little curiosity by testing it. I am thinking manually overlaying one type on the other in-procedure is the most reliable way I have to go. I still prefer the translation of the access to inner elements to be by the initial variable type declaration, but either method will work fine and I have one other thing yet to consider. How will I make this work in a non-GNAT compiler? I understand that the supported private method of achieving Unchecked_Conversion is different in one compiler from another. If I can use on method that works in all modern and competent compilers, That would be the best.
    Micah Waddoups
    @micahwelf_gitlab
    @simonjwright I looked a little closer, since you brought it up, hoping I missed something that would be exactly what I was looking for and I am still not entirely certain, but this seems promising: "Any name that denotes a discriminant of an object of an unchecked union type shall occur within the declarative region of the type, and shall not occur within a record_representation_clause". What is record_representation_clause... when writing the representation clause, the discriminant is not allowed, so does that mean the discriminant is only tracked in the run-time and never actually a component of the record? If so, this is really does seem about right for my purpose, only now I have to try it out. Simon Wright, you are, once again, the most brilliant Ada programmer and advice giver I have ever met!
    Patrick Kelly
    @Entomy
    @micahwelf_gitlab you are correct in that Unchecked_Union is primarily for interfacing.
    @micahwelf_gitlab 13.5.1.3 (https://www.adaic.org/resources/add_content/standards/05aarm/html/AA-13-5-1.html) should be able to help you, and is the representation clause you're asking about.
    You'll want to map two fields to the same point, which is the same way unions work. Ada just lets you be extremely explicit about where exactly everything is.
    Simon Wright
    @simonjwright
    @micahwelf_gitlab Very kind of you to say so!!
    The discriminant isn’t tracked at all except in your head (of course, you might know in context what it ought to be).
    It’s a less-localised way of doing unchecked conversion.
    Amit Kumar
    @freeark1_twitter
    @ohenley Could you add https://github.com/ghdl/ghdl in your https://github.com/ohenley/awesome-ada? Sorry, I am unable to get into my Github account.
    ohenley
    @ohenley
    @freeark1_twitter Sure. To what section would you see fit?
    ohenley
    @ohenley
    @freeark1_twitter Done. Added to the simulation section. Thx for the heads-up!
    Amit Kumar
    @freeark1_twitter
    @ohenley I think it will be helpful for your 'awesome-ada' list. https://www.laeran.pl/adaplanet/p/i/
    ohenley
    @ohenley
    Thx @freeark1_twitter , will add.
    Amit Kumar
    @freeark1_twitter
    Some time ago, I raised an issue that CentOS 8 is not supporting GNAT. Then I got suggestions for using Docker images and I also tried. But today I applied my simple solution, I rsynced my Ubuntu desktop installation of AdaCore Community 2019 to my server and it's working like a charm.
    matrixbot
    @matrixbot

    marcuse1w > <@gitter_freeark1_twitter:matrix.org> Some time ago, I raised an issue that CentOS 8 is not supporting GNAT. Then I got suggestions for using Docker images and I also tried. But today I applied my simple solution, I rsynced my Ubuntu desktop installation of AdaCore Community 2019 to my server and it's working like a charm.

    Hi. Could you explain a bit more what you have done?

    Amit Kumar
    @freeark1_twitter
    1. Since my AdaCore GNAT Community edition is installed in $HOME/opt/GNAT.
      cd $HOME/opt/GNAT

    2. 2019 version resides in 2019 directory
      rsync -avzP 2019 <server-user>@<server-IP>:/home/<server-user>/<destination-directory-path>

    3. Login to your server and set PATH environment variable in $HOME/.bashrc file.
      NB: You need to logout and login again to be PATH effective. or, run command,

    source $HOME/.bashrc

    I wish it will help you and others.
    Sorry for being a bit late.