teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
<teepee> nothing happens
<InPhase> Hmm. Okay.
<InPhase> So then nothing should happen to pip in the same run mode, right?
<InPhase> Except for it being unsupported and scheduled to be deprecated.
<teepee> yep, that is strange, as your code did prevent it from exiting
<teepee> or maybe it was just a random crash in the first case
<teepee> me messing with imports
mtm has quit [Ping timeout: 245 seconds]
<ali1234> pip doesnt even support being run from code like that
<ali1234> it can be done but you have to go out of your way to do it
<ali1234> and they deliberately make it harder to do
mtm has joined #openscad
val has quit [Ping timeout: 265 seconds]
<ali1234> could you make it so that the openscad executable works like a normal python interpreter if argv[0] is "python"? then the symlink in the venv will support "-m pip" and you can just subprocess it...
<ali1234> this is just a crazy idea and not necessarily the right way to handle it
<teepee> I would not mind that feature, but it should be easy from GUI too
<ali1234> GUI can then invoke it as a subprocess
<ali1234> then it can exit normally
<ali1234> as intended
<ali1234> but then the GUI has to be aware of the venv
<ali1234> although i guess it does anyway
<ali1234> down this path, you're building a general purpose python IDE
<ali1234> i would say - just make sure that it works as a module with regular python interpreters, and then people can use whatever IDE they prefer if they want to have a venv
val has joined #openscad
<teepee> ok, posted, I wonder what the feedback will be. It's not actually new, but I don't know how many people have seen the python stuff yet
<teepee> flatpak is a go, snap extra slow today
misterfish has quit [Ping timeout: 252 seconds]
<InPhase> teepee: openscad --unsupported-python-run -m pip
<teepee> :)
<InPhase> teepee: Add an unsupported run mode to fight fire with fire. ;)
<teepee> openscad --never-use-this-flag ...
<InPhase> Although actually, fork would do the job.
<InPhase> Well, assuming that libpython supports this adequately after a fork.
<teepee> I assume it would be best to just re-init from scratch
<teepee> or init at all, at this point the python init should not have happened yet
<teepee> in GUI mode, that's different of course
<InPhase> Right. I was looking at the sort of calls that would do this, but I think starting clean is both the goal of the restriction, and a good idea.
<InPhase> A special flag would do the job, crazy as that sounds.
<InPhase> And actually, maybe not make it entirely undocumented. Some people do this sort of stuff purely script-based. They'll want a way to create the venv.
<InPhase> If we have to implement it, might as well let those people have at it.
<teepee> yep
<InPhase> There could be other useful things that we can't imagine yet. The worst that could happen is it becomes a disaster.
mmu_man has quit [Ping timeout: 265 seconds]
<teepee> haha, yes, that option is alway there
<ali1234> the restriction is also there to stop people writing programs that try to automatically install their dependencies at run-time by invoking pip, rather than packaging them properly (setup.py, requirements.txt etc)
<ali1234> "try: import x; except ImportError: import pip; pip.install('x')"
<ali1234> they specifically wanted to prevent people writing code like that
<teepee> same thing with subprocess is better how?
<teepee> but it's fine, we should be ok with the official way
<ali1234> it's not if your program is not an IDE or a venv management tool or something
<ali1234> but they only had to make it harder than packaging properly, not impossible
<teepee> people copy paste that lines from stackoverflow (or now chatgpt) anyway
<teepee> so it does not matter much what the exact code looks like
teepee_ has joined #openscad
<InPhase> ali1234: I've implemented numerous variations of automatically handling dependencies, in large part because Python's package management process is ridiculously unfriendly for enduser distribution. End-users want to just run things, not become developers themselves.
<InPhase> ali1234: Some of them have been broken, because upstream keeps shuffling around randomly how these sorts of things work.
J25k36 has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
<InPhase> But that's just par for the course. Eventually I gave up on the notion of Python for enduser code. I don't even try anymore. I currently distribute python to programmers, or write in another language.
<InPhase> But I guess our task here is to try to find a stable way to hide the chaos from the OpenSCAD users.
J25k41 has quit [Ping timeout: 240 seconds]
<gbruno> [github] kintel edited pull request #5701 (Squashed some clang-tidy warnings, slightly adjusted clang-tidy config) https://github.com/openscad/openscad/pull/5701
<gbruno> [github] kintel closed pull request #5704 (Fix issue #5695) https://github.com/openscad/openscad/pull/5704
<gbruno> [github] kintel pushed 5 modifications (Fix issue #5695 (#5704) The implemention is now more unified with an effort in factoring code. The rubberband states are the following: - when a window menu entry (next/prev or jump to) is hovered, the rubberband indicates which dock will be the one activated - when a window menu entry (next/prev or jump to) is triggered, the dock is ativated and the rubbedband hides. The shortcut Ctrl+K and Ctrl+H have been implemen
snaked has joined #openscad
sparsh-n has quit [Quit: Client closed]
sparsh-n has joined #openscad
L29Ah has quit [Ping timeout: 244 seconds]
joso has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
ccox has quit [Ping timeout: 252 seconds]
foul_owl has quit [Ping timeout: 244 seconds]
snaked has quit [Quit: Leaving]
snaked has joined #openscad
ccox has joined #openscad
foul_owl has joined #openscad
LordOfBikes has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
stealth_ has quit [Quit: Leaving]
snaked has quit [Ping timeout: 272 seconds]
sparsh-n has quit [Quit: Client closed]
JakeSays_ has joined #openscad
JakeSays has quit [Ping timeout: 252 seconds]
misterfish has joined #openscad
mmu_man has joined #openscad
arebil has quit [Quit: arebil]
arebil has joined #openscad
<gbruno> [github] gsohler opened pull request #5705 (completing all legacy functions which are available with my fork) https://github.com/openscad/openscad/pull/5705
mmu_man has quit [Ping timeout: 272 seconds]
guso78k has joined #openscad
<guso78k> teepee, i like your teaser.  but there are yet more convienciene function which can make the code shorter and even more readable
<teepee> I'm not a huge fan of too much of that, but if it's common to python, that's cool
<guso78k> nope thats not "pythonic"
<guso78k> basically i was referring to "right"  instead of "translate"
<teepee> the challange is probably to find the right balance, adding some convenience features is nice, but too much magic can make it difficult to extend things later
<teepee> but "right" depends on camera location?
<guso78k> nope, right(x) is just synonym of translate([x,0,0])
<teepee> yes, and depending on how you rotated, the object will move left or right in viewport
<teepee> I mean the camera rotation, not object rotation
<teepee> I think people have used x(10) too
<teepee> but that would mean you can't have c = cube([1,2,3]); x = c.x
<guso78k> yep.  python stuff only affect  the model, not camera (yet)
<teepee> that's fine, and probably also correct
<guso78k> no: cube does not have an x attribute .
<teepee> still potentially confusing
<teepee> it does not right now, question is if it would be useful to have
<guso78k> what should x attribute of cube shall represent ? x location ? x size ?
<lockywolf> MCAD does not have Bézier curves?
<teepee> I'm not sure it can be location. but good point, it could be c.size.x :)
<teepee> lockywolf: I don't remember seeing those. BOSL very likely has them (it has everything basically :-)
<teepee> hmm, if objects/nodes are always cloned, it might be possible to always have a location?
<guso78k> in my very latest version, any object which is child of a translation can retrieve "matrix" attribute
<guso78k> sorry, need to change task now ;)
<teepee> all good
<teepee> and it always should have the matrix, I think :)
<teepee> like default to identity so it's always usable
<teepee> my coffee break is also coming to an end :D
<guso78k> yes, i plan, that ll obejcts have an origin property  which defaults to identity
mmu_man has joined #openscad
JakeSays has joined #openscad
JakeSays_ has quit [Ping timeout: 245 seconds]
<gbruno> [github] t-paul pushed 2 modifications (Python: Remaining functions; Add python-reinit fix (#5705) Co-authored-by: Guenther Sohler <guenther.sohler@photeon.com>) https://github.com/openscad/openscad/commit/6c5e83c9b72bbbb76ab11048714c062ee726f16b
<gbruno> [github] t-paul closed pull request #5705 (completing all legacy functions which are available with my fork) https://github.com/openscad/openscad/pull/5705
<ali1234> i think the python api should stay close to the openscad api
<teepee> agreed
<ali1234> but i really would still like the ability for scad() to expose modules
<ali1234> that's the last piece missing for complete interop
<teepee> but it can optionally have more stuff as python has much more features
<teepee> but the overlap should be as similar as possible
<lockywolf> Colors don't appear on renders, right?
<guso78k> yes, mesh() function e.g. if SCAD could accept the the data, this would be great
<guso78k> mesh() is opposite of polyhedron
<ali1234> lockywolf: not on stable. they might do on nightly/manifest?
<guso78k> only with manifold enabled
<ali1234> *manifold, yes
<ali1234> teepee: i think the interesting extra features of python come for free as part of the language... things like comprehensions and generally nicer list handling. if you're going to add "right()" in python it should be in scad too
<teepee> opposite of polyhedron? like turn geometry into lists of numbers?
<guso78k> try it!
<guso78k> a=cube([1,2,3])
<guso78k> v, t = a.mesh()
<guso78k> b=polyhedron(v,t)
<teepee> that's what the render() PR does
<teepee> the interesting point here is the data structure
<teepee> once that is out in the world, it's essentially not changeable anymore
<guso78k> yes,   in my understanding render() is just for optimizing preview, right ?
<ali1234> currently yes but the PR makes it actually return geometry you can use - i think
<lockywolf> Is there a "canned" version of this method: https://openhome.cc/eGossip/OpenSCAD/2DtoCylinder.html ?
<guso78k> the point of mesh() was the data structure
nomike has quit [Remote host closed the connection]
<guso78k> i think next thing is copying the ctests ? ( i might have to filter them little bit)
<guso78k> lockywolf yes, pythonscad has a "wrap" function,  but not sure if openscad wants to adopt that
<lockywolf> interesting
<guso78k> basically input is a long,  thin 3d object towards positive x axis and wrap wraps that around a virtual cylinder with radius given
<guso78k> of course it has to split the object multiple times to achieve the "round"
<lockywolf> the pythonscad thing is interesting
<gbruno> [github] damienmarchal opened pull request #5706 (Clean MainWindow show/hide action) https://github.com/openscad/openscad/pull/5706
<gbruno> [github] damienmarchal edited pull request #5706 (Clean MainWindow show/hide action) https://github.com/openscad/openscad/pull/5706
<gbruno> [github] damienmarchal synchronize pull request #5706 (Clean MainWindow show/hide action) https://github.com/openscad/openscad/pull/5706
<teepee> I guess we don't want to copy all the tests
<teepee> a couple of dedicated tests using the core functionality would be a good start
<teepee> wrap does what?
<guso78k> wrap does basically , what lockywolf describes here: https://openhome.cc/eGossip/OpenSCAD/2DtoCylinder.html
<guso78k> The effect is the same, the algorithm is different
<guso78k> teepee, i just have 2 tests: one test which performs all function "at once"  and another tests, which tries to use pythonscad in the most silly way - bascially causing each error to appear once
<teepee> did you try rotate(0) ?
<teepee> but yes, 2 initial tests are a start
Guest39 has joined #openscad
Guest39 has quit [Client Quit]
mtm has quit [Ping timeout: 252 seconds]
mtm has joined #openscad
L29Ah has joined #openscad
L29Ah has left #openscad [#openscad]
L29Ah has joined #openscad
L29Ah has left #openscad [#openscad]
<gbruno> [github] yannickbattail opened issue #5707 (cli option export-format = param not in the help) https://github.com/openscad/openscad/issues/5707
<gbruno> [github] yannickbattail edited issue #5707 (cli option export-format = param not in the help) https://github.com/openscad/openscad/issues/5707
L29Ah has joined #openscad
<guso78k> i did not test rotate(0) exactly,but its a nop, and should  even create a parsing error. did you find a crash ?
misterfish has quit [Ping timeout: 244 seconds]
<guso78k> yes,its a crash, i will look into it
J25k36 has quit [Quit: Client closed]
J25k36 has joined #openscad
<teepee> yep, it crashes for me
<gbruno> [github] gsohler opened pull request #5708 (Python pr6) https://github.com/openscad/openscad/pull/5708
guso78k has quit [Quit: Client closed]
guso78k has joined #openscad
teepee_ has joined #openscad
<gbruno> [github] t-paul pushed 1 modifications (Python: Fix rotate() (#5708) --------- Co-authored-by: Guenther Sohler <guenther.sohler@photeon.com>) https://github.com/openscad/openscad/commit/ec89895d47ff0a1897ff4ce5f54e0b0502e6da87
<gbruno> [github] t-paul closed pull request #5708 (Python pr6) https://github.com/openscad/openscad/pull/5708
L29Ah has quit [Read error: Connection reset by peer]
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
RichardPotthoff has joined #openscad
RichardPotthoff has quit [Changing host]
RichardPotthoff has joined #openscad
L29Ah has joined #openscad
misterfish has joined #openscad
stealth_ has joined #openscad
aiyion4 has quit [Remote host closed the connection]
aiyion4 has joined #openscad
bertronika has joined #openscad
<gbruno> [github] erjoalgo opened issue #5709 (3D Navigation style) https://github.com/openscad/openscad/issues/5709
J25k36 has quit [Quit: Client closed]
J25k36 has joined #openscad
<othx> stealth_ linked to YouTube video "[#39] DVUI - David Vanderson" => 1 IRC mentions
guso78k has quit [Ping timeout: 240 seconds]
<teepee> it says immediate mode
<teepee> so who repeated that old nonsens debian is old software?
<teepee> I just checked what python I have, it's 3.13.2
<teepee> released 2025-02-04
<gbruno> [github] damienmarchal synchronize pull request #5706 (Clean MainWindow show/hide action) https://github.com/openscad/openscad/pull/5706
<L29Ah> teepee: people usually get debian stable that has ancient everything, python 3.11 rn
<teepee> if you need stable, then thats good
<teepee> complaining about *options* is bad faith
<L29Ah> it's not a bad faith, just ignorance
califax_ has joined #openscad
califax has quit [Ping timeout: 264 seconds]
<L29Ah> iirc you can't get rolling debian out of the box like you do with distros like gentoo
califax_ is now known as califax
<teepee> rolling, no. something similar, yes
<stealth_> https://cachyos.org/ is crazy good and fast
<stealth_> cachy browser for example is optimized firefox no bs out of box features.
<gbruno> [github] damienmarchal closed issue #5695 (RubberBand problem when switching windows using the "Next window" menu entry.) https://github.com/openscad/openscad/issues/5695
califax has quit [Ping timeout: 264 seconds]
califax has joined #openscad
L29Ah has quit [Read error: Connection reset by peer]
L29Ah has joined #openscad
guso78k has joined #openscad
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #openscad
misterfish has quit [Ping timeout: 248 seconds]
misterfish has joined #openscad
guso78k has quit [Quit: Client closed]
misterfish has quit [Ping timeout: 244 seconds]
guso78k has joined #openscad
misterfish has joined #openscad
misterfish has quit [Ping timeout: 252 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
nomike has joined #openscad
Guest27 has joined #openscad
Guest27 has quit [Client Quit]
<gbruno> [github] gsohler pushed 4 additions 4 modifications (added 1st ctests, added missing import function, scintilla comment char) https://github.com/openscad/openscad/commit/28be34a0ea248485b178f7c291b0a69e4ca9836d
<gbruno> [github] gsohler opened pull request #5710 (added 1st ctests, added missing import function, scintilla comment char) https://github.com/openscad/openscad/pull/5710
<church_> There is no stop button for F5. How about adding possibility to stop rendering after excessive warning count (eg. 100)? It's still not "stop after first warning", but won't make it wait for ages if due some typo (eg. removal of needed constant, that's used in lot of places) now one needs for few thousands of warnings to be echoed :/
guso78k70 has joined #openscad
<guso78k> not sure, why my ctests failed. they are pass locally
<teepee> stderr output: Python Engine enabled
<teepee> AttributeError: module '__main__' has no attribute 'fs'. Did you mean: 'fn'?
<teepee> if you go to the overview page, you can download the logs, e.g. https://github.com/openscad/openscad/actions/runs/13554064520?pr=5710
<stealth_> teepee, do you have the source to the problem?
<teepee> what problem?
<teepee> oh what I just posted is reply to guso78k
<stealth_> ... o
<stealth_> did you guys add python to openscad or something?
<teepee> yes, guso78k did
<guso78k70> thank you for the hint. still puzzling, but i will backtrack
<stealth_> hmm.. are you converting openscad to python?
<guso78k70> teepee, do you know, which test output this message ?
<teepee> stealth_: no
<teepee> I think that was the first one, not the one with the errors
<teepee> the log html even includes the images if there's a difference
<teepee> stealth_: it allows using either scad scripts or python, at some point also mixing both in one model
<stealth_> teepee, you mean using python syntax?
<teepee> well, actual python with all it provides
<stealth_> do you have a link?
<stealth_> o, you are adding pythonscad into openscad? hmm..
<teepee> pythonscad *is* openscad, a fork guso78k70 worked on the last year or two
<teepee> we "just" merge things back to the main version
<stealth_> o, that might make things easy for a long of ppl to work with openscad now.
<stealth_> *lot of ppl
<stealth_> would have made things easy for me as well. darn, why was i under the impression that pythonscad was a dead project? weird.
<teepee> maybe for some people. it certainly gives many crazy new options like generating a model reading data directly from a database or web service :)
<stealth_> YEAH!!! python bring in all kinds of options.
<stealth_> brings*
<stealth_> it would be cool if you can make openscad render work in sublime text :p hahaha i like their editor.
<ali1234> that guy trying to implement hash functions in openscad will be able to do it easily now
<teepee> sublime is only free as in beer, so not possible I guess
<teepee> on mastodon 27 boosts / 48 favorites seems to indicate *some* interrest :)
<stealth_> its and amazing editor, even now other editor are trying to catch up
<teepee> zed?
<stealth_> its trying to catch up to sublime as well.
<stealth_> you know sublime is created using python! and its done very well, the person who did it knows how to really use python to get the best speed out of it.
<guso78k70> teepee, the issue is in pyopenscad.cc in line 269: it should be "fs" instead of "fn".  git does not llike me today, the pr does not get  updated
<teepee> a single char you can maybe edit directly from the web gui :)
<guso78k70> not sure, its not part of the change set
<teepee> does it show the edit button in the PR?
<teepee> oh
<stealth_> Before zed they did the whole atom thing using some browser engine, since it was doomed to fail, they went... we need speed!!! so Rust. Lets go with Rust. lol
<stealth_> GitHub should have just went up to sublime and went here take the $$$ give us the damn editor. problem solved.
<teepee> hmm, if I do it separately, it will not fix the PR
<guso78k70> ok
<ali1234> in-ide previes should be possible in pycharm, after all there is already a plugin that does it
<teepee> let me see if I can get the PR
<guso78k70> i can reschedule the pr
<teepee> oh, you closed it
<gbruno> [github] gsohler closed pull request #5710 (added 1st ctests, added missing import function, scintilla comment char) https://github.com/openscad/openscad/pull/5710
<gbruno> [github] gsohler opened pull request #5711 (added 1st ctests, added missing import function, scintilla comment char) https://github.com/openscad/openscad/pull/5711
<guso78k70> hm the change is not included
<guso78k70> anyway too late, will try tomorrow
<teepee> yep. same here :)
<teepee> I'll push a mini update with include fix and the fn->fs fix