Jump to content

corneliusdavid

Members
  • Content Count

    627
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by corneliusdavid


  1.  

    4 hours ago, dummzeuch said:

    And then explain what's wrong with the "fixed" version of the code generated by ChatGPT. That's going to be interesting.

    LOL! That's a great new use for AI coding--use the generated code as a challenge for others to figure out what's wrong!


  2. 23 hours ago, Ian Branch said:

    I am seeking opinions of the use of one.any of the AI's in the IDE v keeping it separate via a browser?

    I used ChatGPT a year ago. Then I heard about Claude and started using that with much better success so signed up for a web account.

     

    Then Delphi 12.2 added AI, so I added that but mostly for testing and demo purposes. I haven't used it very much yet but it does work and is kinda slick to highlight some code and have it explain it to you. I plan to use the integrated Claude with a few projects I inherited in the near future.

     

    So far, the web version is easier to use, partly because the interface in Delphi is brand new and doesn't dock well or remember it's position. You can drag-and-drop units to the web version and copy generated code so it's not difficult to use. I'm sure improvements are coming for AI integration in future versions of Delphi so my opinions may change.


  3. I'll second both previous comments. I'm helping my team upgrade a suite of old programs that used a mix of grids and controls; the new version is DevExpress Quantum grids to the mix. We wanted to support a "dark" mode and it took a lot of research to get everything to look decent together--or at least close. We had to pick both a VCL style and a DevEx skin that (mostly) work together. They're saved and applied in completely different ways.


  4. On 12/11/2024 at 3:00 PM, 357mag said:

    I'm considering working in Delphi for awhile, and I was looking through my books (I have four of them), and every book starts off right away with Windows programming

    I taught myself a new language a couple of years ago, so I think I understand where you're coming from.  When I learn a new language, I want to focus only on the language and what it can do, control loops, data structures, functions, parameters, etc. Having to learn event-driving programming and why you should use a TActionList hooked to a button instead of a button click, or which comes first, FormShow or FormActivate, ...  all that stuff will become important down the road but how do you just declare a variable and assign a value?  And what data types are there?  Getting stuck with a tutorial that jumps immediately into GUI programming can be frustrating.

     

    I don't have a good book selection for you but I recently wrote a bunch of console programs to solve programming puzzles for Advent of Code. You could look through those as examples if you want. They use a variety of constructs; I learn best by example so these may (or may not) be useful.


  5. On 1/5/2025 at 3:46 AM, David Schwartz said:

    Bill Gates publicly stated many times that he thought the internet was just a passing fad

    When was that? I have a book written by Bill Gates in 1995 called "The Road Ahead" where he talks a lot about the Internet being the next revolution in communication and technology. He clearly saw it's benefit 30 years ago


  6. 1 hour ago, Jason Nelson said:

    This supposed AI integration in 12.3

    Delphi 12.3 has not yet been released. The AI integration in 12.2 was the first version and will certainly be improved as this new frontier is explored further and they receive feedback.

    1 hour ago, Jason Nelson said:

    like NOBODY builds 32-bit apps anymore

    I build plug-ins and integrations for an old 32-bit retail POS system. There's still a LOT of 32-bit apps out there--and they work just fine.

    1 hour ago, Jason Nelson said:

    I've been using Delphi for 31 years

    Delphi turns 30 next month.

     

    1 hour ago, Jason Nelson said:

    VCL is fundamentally broken

    VCL is (mostly) a wrap-around for Windows API functions. Someone with more in-depth knowledge than I may chime in but my understanding is that there are so many apps out there already that rely on the VCL the way it is that changing anything would break a lot of stuff. Instead, people can create new apps using FireMonkey or use any of the several third-party GUI component sets that take advantage of new capabilities.

    • Like 1

  7. 45 minutes ago, JohnLM said:

    I liked the Day 19 and 23 puzzles.

    I haven't had time to get past #11, which I rewrote using a recursive function for part 2 but then found out that was foolish--I killed it after letting it run for 24 hours!

     

    My favorite (so far) was #3; if you know regular expressions, it was snap. I hope to have some time over the holidays to tackle a few more.


  8. 5 minutes ago, pmcgee said:

    The speed thing is addressed in the 'Behind the Scenes' video ... people who are the Olympic athletes at this event have entire solution systems pre-prepared for reading in and manipulating data, and then solving the puzzle.

    Yeah, that helped me not feel so bad! I'm not in this for a gold medal, I'm happy if I can figure it out on my own given the time constraints of job, family, etc.


  9. On 12/22/2024 at 6:33 AM, dummzeuch said:

    OK, no takers. What about testers?

    I hardly ever use the toolbars in Delphi. The only one I usually have up there is the Debug one--and even then, I use the hotkeys. One of the first things I do after installing Delphi, is removing all (or most) of the toolbars as they just take up space (been doing that over a decade). I can't remember what all those icons mean anyway and most all the functions I need are either a right+click or hot-key away.


  10. 28 minutes ago, JohnLM said:

    If you look at the Leaderboard for Day 1's puzzle, you will see a time reading of "1) Dec 01  00:00:04 - qianxyz (AoC++)".  No way anyone could complete it after reading, writing and submitting in 4 seconds. That's got to be 4 minutes.

    That's what I think--I just don't see how that can be.

     

    After initially looking at the leaderboards and trying a couple of puzzles with some faint hopes of my abilities, I quickly realized I would never make it anywhere close to a leaderboard and stopped looking at them! LOL!

     

    Now I'm just happy if I can SOLVE a puzzle; and especially happy if I also solve part 2!

     

    22 minutes ago, JohnLM said:

    I believe that the languages those people are using are a lot more sugar-coated in solving the puzzles

    I have come to believe that Delphi is not the best language for solving puzzles like this--at least in a contest of speed. The Pascal language is very type-strict and I find myself many times having to convert numbers to string or vice-versa. I get boxed in thinking only in terms of strings (then having to extract or convert a number) or thinking only in terms of number (then having to concatenate a string or something). Several additions to the RTL over the years have helped but I look at some of these 1- or 2-line Python or Go solutions and just shake my head, partially to try and understand them but also because you just can't always do stuff that succinctly in Delphi.

     

    Either that or I'm just so used to laying out variables and record structures and doing things in a "proper" way for code readability and maintainability that it's hard for me to get in the mind-set of being super terse and brief to solve a very specific problem where there's no need to do any checking of the input data.


  11. I was going to say, look in your "public documents" folder under Embarcadero\Studio\FireDAC (e.g. C:\Users\Public\Documents\Embarcadero\Studio\FireDAC) to see if there are backups of the connection definitions.  But then I re-read your question and you said the .ini file is unchanged.

     

    I guess I'd look in the Windows registry under HKEY_CURRENT_USER\Software\Embarcadero\FireDAC and make sure those paths and filenames look proper.


  12. Just now, JohnLM said:

    I don't understand you point on "input file".  what is it?  And for different users?

    Many people post their code solutions on Github to share and discuss with others; some include everything, even the input files and the instructions for the puzzle. This was a reminder on the Reddit site (where a lot of solutions are posted) not to include the instructions and input data. There are several different sets of input files and they generate different numbers; you're not supposed to share the input file generated for your unique login to AoC.

     

    5 minutes ago, JohnLM said:

    where are the second parts I keep reading about? 

    I read bits here and there about part 1 and part 2.  But I don't see them in any of the days I have seen aready, 1-3. Or do you have to be at the website at a certain time to see it?

    When you submit a correct answer to the first puzzle for a particular day, you get revealed a second puzzle for that day (there are only two per day). You don't see it until you correctly answer the first part--and the second one is always some twist to the first puzzle and uses the same input file. If you don't see any of them, then you haven't submitted any correct answers. You don't have to be at the website at a particular time but they aren't revealed ahead of the day for the puzzle.

    • Thanks 1

  13. I've been going slow, too (busy). I was stuck on Day 04 for quite awhile, thought I had it late last night and submitted an answer--but it was too low. :classic_sad:

     

    I finally decided to look at some of the other answers on Reddit and found I had been making it way too hard on myself--nearly every other answer (no matter the language) approached it in a similar way and much simpler than my attempt. I haven't had time yet to redo my program (nor the heart to throw away all that work--even though it's wrong).

     

    One thing I read on Reddit was a big note that reminded people that if you post your answer anywhere online, DO NOT post your input file! There are different input files for different users on Advent of Code and your input should not be shared with anyone else--solutions should work regardless of the input file and will have different answers. Also, don't post the puzzle text input (I need to go remove the texts from my repositories).


  14. Just now, aehimself said:

    We have ~1500 frames with at least 20-50 of these custom datasources on each and this problem only occures on one frame, two datasources (always the same 2). This makes me believe that fixing it won't be something generic - e.g. on component or project level.

    Oh, yeah, you mentioned this in the first post and I just skipped right over that--you're right, it'll be something specific about these two datasource components.

     

    So, then what is different about these datasources from all the rest?  Are they hooked to a different type of dataset or have any other properties set uniquely?  Does changing the creation order in the DFM have any effect?

    • Like 1

  15. I think I have seen this but it's been a while, like maybe in an older version of Delphi?  In what version is this happening?

     

    It may be that while Delphi is loading the DFM, it can't find the source for the component so it thinks it's an invalid or old property and removes it--somewhat like loading a form that has been descended from a custom base form but the base form is not part of the project. You do mention descendants, so maybe include all the ancestor frames in the project if they aren't already?


  16. 5 hours ago, JohnLM said:

    What is part 2 that you are talking about?  Another puzzle?

    There are two puzzles each day, the second is not revealed until you submit a correct answer for the first.

    5 hours ago, JohnLM said:

    I believe I have that part worked out.  This is not code, it is just my way for me to keep track of the logic for Inc/Dec directions, visually and mentally. 

    {

     given the array for levels [1 3 2 4 5 ] 

    1 and 3 = low to high is increase (RT) 
    3 and 2 = high to low is decrease (LT) 

    }

     

    But there are twists as you said.

    Yes, this works for these simple cases but what if the first number is higher than the second (making you think it's decreasing), but all the rest of the numbers after that are increasing? Well, it's an invalid row and you throw it out, right? What if there was a modification to that rule where in some cases you wouldn't throw that row out? It would change how you need determine increasing/decreasing.


  17. 3 hours ago, JohnLM said:

    about to start the real challenge of how to determine what level(s) are safe and unsafe

    The tricky part is to figure out whether the levels are increasing or decreasing for a particular line--this determination has a real twist in part 2. Have fun!


  18. 20 hours ago, pmcgee said:

    One thing that is part of the challenge, from my perspective ... is when you can deal with Part 2 with only a reasonably small modification of your Part 1 solution.

    Yeah, it trains you to modularize your solution to accommodate changes to the requirements, a real-world occurrence that programmers must continually face.

×