Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 2016 03:24
    @PeterWAWood banned @Vexercizer
ralfwenske
@ralfwenske
I now have observed in my original app that when I open a small view before the main view, the main view flashes and disappears. When I don’t open the small view everything works fine as expected.
(btw. modal was a destraction and probably doesn’t play a role in this)
Oldes Huhuman
@Oldes
@ralfwenske you probably want to use view/no-wait for the first 2 (help view is your friend)
But you are probably having other problem as I see now... but I must say that here (Windows) it is working as expected. First I see one window, when I close it there is just second and finally the third.
Jose Luis
@planetsizecpu
Just tested a bit my game (at work now hehe) with last automatic update available and runs as normal.
@Oldes that is the normal behavior I think, so as @ralfwenske says it is strange, don't evaluate the last line, just waits for enter key
Oldes Huhuman
@Oldes
It is strange if both win1 and win2 open at once. Sounds like a bug.
Jose Luis
@planetsizecpu
@ralfwenske @Oldes Seems a console related issue, if you write the code in a .red file it runs as normal, also the last line. But if you paste the code on console, then last line wait for enter key.
Nenad Rakocevic
@dockimbel
@ralfwenske Cannot reproduce your issue on Win10, win2 opens after win1 is closed, as expected. If you can reproduce it consistently on macOS, then open a ticket for it.
Oldes Huhuman
@Oldes
Is there simple way how to make an image from raw ARGB binary? I think that this is bad result:
>> i: make image! [2x1 #{01020304 05060708}]
== make image! [2x1 #{010203040506}]
Is it a good idea to have ARGB and RGBA codecs?
Hm... this works:
>> i: make image! 2x1 i/argb:  #{0102030405060708} i
== make image! [2x1 #{030201070605} #{
FBF7}]
Oldes Huhuman
@Oldes
Although it looks that the order is wrong:
>> i/1
== 3.2.1.251
The binary value is in BGRO or (BRGA?) format
zxq2233
@zxq2233
I am trying to make a simple notepad using red-lang.
Can I use the Windows Explorer window to open the file and get the path? Does the GUI control do it all?win-common-dlg-image2.png
Gregg Irwin
@greggirwin
Request-file is the function you want.
Use ? request-file to see details, and play in the console with it, to see how the refinements work. You can also do ? request to see the other requestors that are available.
zxq2233
@zxq2233
@greggirwin Thank you!
Rudolf Meijer
@meijeru
Here is an interesting example of Red's code = data property: with five LOC I add a new item to the console's menu
; get console face
cons: first head system/view/screens/1/pane

; add to console menu
append last cons/menu ["Check for updates" check-update]

; modify the body of the on-menu actor function
body: body-of :cons/actors/on-menu
insert third body [check-update [do %check-update.red]]

; rebuild the function from the spec and the modified body
cons/actors/on-menu: func spec-of :cons/actors/on-menu body
Toomas Vooglaid
@toomasv
@meijeru Beautiful! :+1:
Petr Krenzelok
@pekr
Really cool!
Gregg Irwin
@greggirwin
Very cool indeed.
Can you post the code for %check-updates.red as well?
Gregg Irwin
@greggirwin
Ah, I see your gist in the other room now. Thanks!
Jose Luis
@planetsizecpu
@meijeru Wow, useful!
Galen Ivanov
@GalenIvanov
Something I'm currently working on: Hamiltonian cycles generator
Galen Ivanov
@GalenIvanov
I need to improve the code, because the program crashes when I try bigger sizes. I don't know if this due to memory leak or recursion.
Hamilton_cycles.png
Boleslav Březovský
@rebolek
@GalenIvanov try recycle/off, it may be some GC bug.
Galen Ivanov
@GalenIvanov
@rebolek Thanks, I'll try it.
Gregg Irwin
@greggirwin
@GalenIvanov cool. Thanks for posting.
Galen Ivanov
@GalenIvanov
@greggirwin Thank you! It's just a WIP, I'll post the source of the finished projects on Github - I have ideas for 2 games based on this.
Galen Ivanov
@GalenIvanov
@rebolek A quick update: I decided to see if the program crashes when compiled. Surprisingly it doesn't crash. In the console it starts crashing with inputs around 16x16; the compiled one successfully generated a hamiltonian cycle on a grid of 40x40 points.
Boleslav Březovský
@rebolek
@GalenIvanov interesting, I'll check how my crashing stuff behaves when compiled because there's certainly some GC error in the interpreter.
Galen Ivanov
@GalenIvanov
@rebolek OK, thanks! I'll post my source when I'm ready - I don't rule out the possibility of more mistakes from my side.
By the way, success with 70x70 (it took maybe 15 minutes, but proves that my concept works) - I'll need much smaller grids, but was annoyed by the crashes.
Boleslav Březovský
@rebolek
@GalenIvanov crash is definitely not your problem. You should get an error, if your code is wrong, but not a crash.
Galen Ivanov
@GalenIvanov
@rebolek Yes, exactly!
Boleslav Březovský
@rebolek
definitely NOT...sorry for the typo :)
Galen Ivanov
@GalenIvanov
:)
Semseddin Moldibi
@endo64
@GalenIvanov "In the console it starts crashing with inputs around 16x16" is it on GUI console or both GUI and CLI?
Vladimir Vasilyev
@9214
@qtxie :point_up: I can't recall if garbage collection for image!s was implemented?
Qingtian
@qtxie
@9214 Not yet.
Vladimir Vasilyev
@9214
I generated FASS curves and L-system trees of quite a monstrous size back in the day, and haven't seen any crashes, only errors due to pair! overflow, which were expected.
Galen Ivanov
@GalenIvanov
@endo64 I only tested it on the GUI console
Vladimir Vasilyev
@9214
GUI / CLI difference has no bearing here, it's interpreter issue. @GalenIvanov you ought to provide at least some error or debug message, if you want it to be resolved. "It crashes" isn't terribly useful.
Galen Ivanov
@GalenIvanov
@9214 I'm aware that it could be entirely my fault. I just realized the big difference between the code inerpreted in the GUI console and the compiled code. Unfortunately I didn't receive any error message. I tried to naively debug the code with printing/probing some values, but when the program crashed in the console, I never got any error message. I'll post a link to my code tomorrow. Thank you all for your feedback.
@9214 BTW, here is my take on L-systems. I also didn't get any crashes.
Vladimir Vasilyev
@9214
@GalenIvanov it 's our fault that Red crashes, not yours :wink: Try to compile console in debug mode (-d flag) and launch it from command line, then paste here stack trace that you'll see after crash.
Galen Ivanov
@GalenIvanov
@9214 Thank you for your support. In the meantime I updated Red to the automated build - red-25sep19-f753e25c.exe - and there is no problem anymore, not a single crash. Sorry for wasting your time and not trying the most obvious thing. The version I have been using until now was really old - built on 22 Nov 2018.
Gregg Irwin
@greggirwin
:+1:
Gregg Irwin
@greggirwin
Does anyone remember why drop-list doesn't have a readable text facet? i.e., it's not set on selection.