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
J23k70 has quit [Quit: Client closed]
J23k70 has joined #openscad
guso78k has quit [Quit: Client closed]
erectus has quit [Ping timeout: 240 seconds]
erectus has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
fling has quit [Ping timeout: 240 seconds]
fling has joined #openscad
<teepee> ok, arcade buttons v2 finished - https://imgur.com/a/dDX8zLF
fling has quit [Remote host closed the connection]
fling has joined #openscad
LordOfBikes has quit [Ping timeout: 245 seconds]
<pca006132> guso78: people rarely use incremental builds on CI
<pca006132> it is pretty important to make sure it is a clean build
<pca006132> but you can cache dependencies though
LordOfBikes has joined #openscad
mmu_man has joined #openscad
<pca006132> btw wonder if CGAL compilation can be speed up by using PCH or something
hyperair has quit [Remote host closed the connection]
kintel has joined #openscad
<kintel> pca006132 For copyright, one way of looking at it is the copyright header. I think smaller contibutions/bugfixes wouldn't really constitute claiming copyright on said changes, and we could change copyright headers of key files to make it easier to establish a new parser. ..and by browsing history we could see if there are larger chunks where we should ping a few people.
<kintel> In the earlier days of OpenSCAD, we effectively required copyright transfer for contributions, but at some point I dropped the ball on it. I would think the vast majority of the parser+AST is written by Claire (aka. Clifford), me and teepee. All of Claire's contributions can be considered 0-clause BSD or equivalent and I'd be happy to do the same for a parser/AST library.
J23k28 has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
J23k70 has quit [Ping timeout: 250 seconds]
hyperair has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
<pca006132> ok
<pca006132> just let me know when I can change the license, I am not very familiar with this kind of license stuff...
<pca006132> btw when reading the license related stuff, just found that Apache license 2.0 (the one that manifold uses) is incompatible with GPLv2, so the result binary must be released under GPLv3
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
<JordanBrown1> [catching up, necro-responses to follow...]
<JordanBrown1> pca006132 - echo has a hack to be treated as a module identifier, because echo *is* a module.  It's a keyword because it's magic in other contexts. (teepee mentions list comprehensions, but also the expression-context echo.)
<pca006132> but why it is magic in other contexts?
<pca006132> in the expression context it is just a function, no?
<JordanBrown1> guso78k - with respect to your problem where you were duplicating a cube and only one showed:  there's an "index" field in the node that needs to be unique, so you need to clone the CSG tree when you drop it into the model from a variable. No, I don't know what it's for, but I tried to splice in duplicates as part of PR#4478.
<JordanBrown1> pca006132 no, it's not a normal function, it's magic.
<JordanBrown1> x = echo("hello") 5;
<pca006132> ah
<pca006132> too magical
<JordanBrown1> Probably, but it's what we're stuck with.
<pca006132> anyway thanks
<JordanBrown1> pca006132 - that parser looks plenty different enough to me.  I don't know whether it's been decided whether languages are copyrightable, but GNU would be in no position to complain about copying the language, and aside from a few production names here and there what you've got there is the same only in that all parsers for a particular language will be similar.  (I have not analyzed it for whether it parses the same language.)
<pca006132> it does not parse the same language for now
<pca006132> not completed yet
<pca006132> I guess I can change to Apache 2.0 then
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<JordanBrown1> Theoretically we could add a mechanism for user-defined ... subroutines ... that fit into the same niche as expression-context echo(), let(), and assert(), but I'm not sure how much of a use case there would be.
J23k28 has quit [Quit: Client closed]
J23k28 has joined #openscad
<JordanBrown1> myFancyEcho(), maybe.
guso78k has joined #openscad
<guso78k> JordanBrown1, will you grant me to reuse your node clone code in case its useful to me ?
misterfish has joined #openscad
misterfish has quit [Ping timeout: 256 seconds]
arebil has joined #openscad
misterfish has joined #openscad
misterfish has quit [Ping timeout: 264 seconds]
misterfish has joined #openscad
pa has quit [Ping timeout: 252 seconds]
othx has quit [Read error: Connection reset by peer]
othx has joined #openscad
epony has quit [Remote host closed the connection]
misterfish has quit [Ping timeout: 256 seconds]
RoyK^ is now known as RoyK
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
erectus has quit [Read error: Connection reset by peer]
<pca006132> OK changed the license to Apache 2.0
erectus has joined #openscad
pah has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
TheAssassin has quit [Remote host closed the connection]
guso78k has quit [Quit: Client closed]
TheAssassin has joined #openscad
J23k28 has quit [Quit: Client closed]
J23k28 has joined #openscad
adigitoleo has quit [Remote host closed the connection]
adigitoleo has joined #openscad
little_blossom has quit [Quit: little_blossom]
little_blossom has joined #openscad
epony has joined #openscad
little_blossom has quit [Ping timeout: 276 seconds]
RoyK has quit [Ping timeout: 245 seconds]
RoyK has joined #openscad
J23k28 has quit [Quit: Client closed]
J23k28 has joined #openscad
arebil has quit [Quit: arebil]
misterfish has joined #openscad
cart_ has joined #openscad
mmu_man has joined #openscad
teepee_ has joined #openscad
little_blossom has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
TheAssassin has quit [Remote host closed the connection]
JordanBrown has joined #openscad
JordanBrown1 has quit [Ping timeout: 252 seconds]
cart_ has quit [Ping timeout: 246 seconds]
TheAssassin has joined #openscad
snaked has quit [Ping timeout: 268 seconds]
snaked has joined #openscad
snakedGT has joined #openscad
snakedLX has joined #openscad
snaked has quit [Ping timeout: 256 seconds]
snakedGT has quit [Ping timeout: 252 seconds]
snakedGT has joined #openscad
snakedLX has quit [Ping timeout: 252 seconds]
snakedGT has quit [Quit: Leaving]
mmu_man has quit [Ping timeout: 256 seconds]
<gbruno> [github] kintel assigned issue #4861 (Weird rendering issue with difference() in "F5 Preview" after using "F6 Render") https://github.com/openscad/openscad/issues/4861
mmu_man has joined #openscad
ril3y has joined #openscad
<ril3y> guso78 that demo is awesome!
<pca006132> https://github.com/pca006132/sscad/blob/main/src/vm/values.h I am starting to dive into the C world...
<pca006132> not entirely sure if this is the right design
<pca006132> the idea here is to keep the bytecode small and efficient, but small and efficient requires compact memory representation, and C++ does not support dynamically-sized type
<pca006132> and things like alignments necessitate a structure-of-vectors approach to storage... otherwise we will be wasting precious space
<pca006132> curious what others think about, better performance vs more idiomatic c++
<InPhase> pca006132: There is a time and a place to do low level code. But what I find very important is to take those performance critical components that require low level optimized code, and after testing them very extensively and reviewing them very carefully, isolate them carefully with a clean interface so that nothing about this low level code nature escapes into the rest of the program.
<InPhase> pca006132: And also, be attentive to the minimal amount of code that actually needs to be written in that manner, under "do not prematurely optimize" principles.
<InPhase> i.e., recognize that every bit of code done in that style is a maintenance burden and a code robustness hazard, so be mindful of those tradeoffs and focus it on performance critical bits where you determine it is a clear meritorious benefit, and small enough that the correctness can be carefully validated given the increased complexity of validating such code.
<InPhase> It is like a Pareto style problem, except with code it can be very often more exteme like 95%/5% instead of 80%/20%, and only some of those critical bits even benefit significantly from low level style code.
<InPhase> teepee: I found the evil tab user. ;)
<InPhase> teepee: You leaked mixed tabs into SnubDodecahedron.scad. My visible tabs vim setup caught you.
<pca006132> indeed, I do plan to keep that small and isolated
<pca006132> thinking about it, I guess only numerical arrays require this level of storage optimization to minimize pointer chasing for every access
<pca006132> people probably don't care that much about string and heterogeneous list performance
<pca006132> and for some reason it is easy for me to get loss in thinking about various potential optimizations I can do, as I am experienced in this and related compiler optimizations (and is generally very excited about performance gains, a weird hobby)
<pca006132> one easy thing to optimize in this kind of bytecode vm is to add instructions for commonly used, simple operations with constant operands, e.g. addition and vector indexing
epony has quit [Remote host closed the connection]
epony has joined #openscad
<teepee> oops :)
misterfish has quit [Ping timeout: 260 seconds]
mmu_man has quit [Ping timeout: 264 seconds]
califax has quit [Ping timeout: 240 seconds]
erectus has quit [Ping timeout: 240 seconds]
califax has joined #openscad
TheAssassin has quit [Ping timeout: 240 seconds]
TheAssassin has joined #openscad
<teepee> so for the record, the DIY part of the framework computer is trivial, considering that's 220€ it's probably worth it :)
erectus has joined #openscad
Guest96 has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
<InPhase> teepee: Do repository changes auto-propagate to the page?
<InPhase> teepee: I'm planning on pushing out a minor aesthetic update to the ice skater before it goes live tonight. :)
<teepee> for the calender? no, I'm using the sync.sh script to push updates
<teepee> no problem, I can update right before midnight UTC :)
<teepee> (if I'm not too distracted by the now debian-installed framework thingy :-)
<InPhase> :)
<InPhase> Perhaps I'll push it over lunch.
<InPhase> Which is not far away.
kintel has joined #openscad
<kintel> pca006132 Meh, the apache 2.0 vs. GPLv2 thing is annoying. My understanding of apache 2 is that it's most useful for enterprise usage where copyright holders want to play patent wars. Otherwise, BSD/MIT feels more flexible, at least for smaller utility libraries where patenting the core algos isn't so much of an issue
<teepee> oh, interesting, I had not really heard about that difference
califax has quit [Remote host closed the connection]
califax has joined #openscad
<kintel> Anyway, I'm very interested in splitting out the openscad parser+AST into a separate lib and/or rebasing on a new one, independently of any VM/bytecode explorations
<kintel> ..the caveat of course being that we want ~98% backwards compatibility with existing OpenSCAD code
mmu_man has joined #openscad
<pca006132> I think my current parser and AST design can also do the "traditional" kind of evaluation
<pca006132> i.e. visitor based
<pca006132> and I think parser compatibility should not be a hard issue...
misterfish has joined #openscad
<pca006132> it uses idiomatic c++ stuff, smart pointers, namespace, classes
<kintel> Awesome!
<kintel> Are you running or planning to run existing OpenSCAD parser tests against this?
<pca006132> I planned to run, but not yet there
<pca006132> I am deferring some syntax stuff later when I am thinking about the overall design
<kintel> I rewrote this code once, and did a lot of testing, so I think we've covered most bases
<kintel> ..but my rewrite wasn't as thorough as yours :)
<pca006132> well mine is nearly a clean room implementation
<pca006132> except I still have knowledge about the existing code and refer to its grammar
fling has quit [Ping timeout: 240 seconds]
<kintel> But since all our tests are black box tests, testing it should be trivial
<kintel> Also cool if you could give the MIT/BSD thing some thought, as that could help some people for whom GPLv3 might be tricky to user
<kintel> (I believe MIT or 2-clause BSD should be compatible with both gpl2 gpl3 apache2 etc., but obviously doesn't offer a patent litigation protection and such)
<kintel> I've long lost track of licensing strategies; there might be something new out there as well :/
<pca006132> oh I already switched to Apache, because it seems that you and JordanBrown think that it is fine to switch, Claire's contributions can be considered 0-clause BSD, and teepee did not say anything regarding the license
<pca006132> as long as none of you sue me it should be fine :)
<kintel> yeah, I was more thinking that if reintegrating back to OpenSCAD, the WASM build of OpenSCAD will become GPLv3
<kintel> ..unless we find a GPLv2-compatible license.
<pca006132> but manifold is Apache 2.0 as well
<pca006132> tbh I have not much idea about the differences between Apache 2.0, MIT and 2-clause BSD
<kintel> oh
germ has quit [Quit: ZNC 1.8.2 - https://znc.in]
abff has quit [Quit: everybody gets one]
<pca006132> and between GPLv2 and v3 (except the hardware related stuff)
<kintel> right, ianal, but that sounds like openscad+manifold wasm will be GPLv3, which may require web apps integrating this to be fully Open Source? That was the one thing I wanted to avoid, as it could stop people from experimenting in that domain
<pca006132> I think so
<kintel> Fully Open Source web apps would be a good thing of course, but not everyone agrees :)
<pca006132> but if it is just openscad - GUI + manifold, it can be Apache 2.0
<pca006132> need more work on things like model io though
<kintel> OpenSCAD itself is GPLv2, so it's would be GPLv3, as GPL always wins, AFAIU
<pca006132> if sscad (the thing I am writing) is becomes openscad - GUI - geometry backend, it can be Apache 2.0
<pca006132> will take a looong time though
<kintel> yeah, but there's quite a gap
<pca006132> btw, do your parser tests check the location of various AST nodes?
<pca006132> I want to test this specifically for unicode support
<pca006132> ah, thinking about it, the old parser does not support unicode properly
<kintel> Location as in file line+column?
Guest55 has joined #openscad
<pca006132> yeah, the span
Guest55 has quit [Client Quit]
<pca006132> I also track the stack of includes in case it is helpful in the error message
<pca006132> I am currently using grapheme cluster count to increment the column number
<kintel> No, the tests are black-box I/O tests
<pca006132> oh ok
<kintel> -> they write to existing file format
<kintel> The AST checks just serialize to .scad code: https://github.com/openscad/openscad/tree/master/tests/regression/astdumptest
<kintel> The dumptests, just dump the node graph: https://github.com/openscad/openscad/tree/master/tests/regression/dumptest
<kintel> ..but we could invent an "AST" file format with all the metadata
<kintel> One the AST is traversable using a public API, people could write all kinds of AST transformations. That could open a lot of fun doors
<kintel> (it could also be a good point to design some sort of internal versioning system..)
<pca006132> I am currently just dumping the parser result in an ugly way
<pca006132> If(cond=Binary(=, Binary(+, Number(1, loc=(1:6:5,1:6:6)), Number(1, loc=(1:6:7,1:6:8)), loc=(1:6:5,1:6:8)), Number(2, loc=(1:6:10,1:6:11)), loc=(1:6:5,1:6:11)), then=[ModuleCall(a, args=(), body=[], loc=(1:6:15,1:6:18))], else=[ModuleCall(b, args=(), body=[], loc=(1:6:29,1:6:32))], loc=(1:6:1,1:6:21))
<pca006132> would be nice if there is a file format that I can use to test against the current version of openscad
<pca006132> and btw, writing the code to dump the AST takes more lines than the parser...
<pca006132> I am probably using a stupid method though
<kintel> heh, and tests will be more LOC and the rest of the code ;)
<pca006132> oh, I don't count this as the LOC
<pca006132> I am cherry-picking the stats
<kintel> For testing the parser against existing OpenSCAD, I would just serialize back to source, and run all OpenSCAD ast-* tests
<kintel> Perhaps look at clang AST format or smth. similar for ideas of a future AST format
<pca006132> anyway, this is probably not in the plan before new year
<pca006132> my plan is to be able to run something before next year
<kintel> heh, pretty aggressive timeline. My plan is to tick off one or two boxes for the VBO work :)
abff has joined #openscad
<pca006132> it is actually not that aggressive
<pca006132> if the goal is just something that works for simple inputs
<pca006132> with no concern whatsoever about performance
germ has joined #openscad
<pca006132> the parser already works for modules, use and include, I just haven't implemented functions and list related stuff (because I need to write the AST definition for every constructs!)
<pca006132> the bytecode interpreter with not much specialization should be pretty easy
<pca006132> should be achievable
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
<pca006132> btw, one thing that is probably not very OOP (nor functional): my AST structure is mutable everywhere, the visitor can just mutate things while traversing, and the plan is to implement things like constant folding with the visitor
<pca006132> and the ASTs definitions are in a single header file, just POD, nothing fancy
<kintel> Yeah, when I rewrote this in JS, using POD made things extremely compact :)
<kintel> Did you implement include<> and use<> yet?
<pca006132> implemented
<kintel> How far away from OpenSCAD is your include<> implementation?
<kintel> I found that to be the hardest one to crack
<pca006132> I give up on path searching, I let the user give me a function to handle that
<kintel> I'd love for include<> and use<> to be AST nodes, but OpenSCAD implements it in the lexer I think
<pca006132> using FileResolver = std::function<FileHandle(std::string, FileHandle)>;
<teepee> yes, include is basically copy&paste in the lexert
<pca006132> I implemented it in the lexer as well
<kintel> I looked into it a bit, and I think it's possible to cover almost all use-cases as AST nodes
<teepee> that is bound to cause some compat issues, but I suppose there is not much alternative
<pca006132> I think it makes more sense to make use<> an AST node
<kintel> Yeah, use<> is easier
<pca006132> for include, I feel like people expect it to be handled by the preprocessor
<teepee> and importantly restricted to "on-top-only" right?
<kintel> just people knowing C :)
<pca006132> I feel that there are some people using include in the middle of their script
<pca006132> maybe to import some machine generated code or something
<pca006132> at least I did it in C
<pca006132> (and C++)
<teepee> yes, maybe it's ok to keep that
<kintel> Right now, include<> can just be partial code, which makes it incompatible with an AST node. Not sure people actually exploit that
<teepee> I believe you can even include<> stuff that is not sparately syntactically correct or complete
<pca006132> yes
<kintel> ^ yeah, that's what I meant.
<teepee> oh, I'm sure *some* people do
<kintel> We don't have any tests for it though
<pca006132> I think use is more well-behaved in this regard
<pca006132> but people just use include due to performance issues...
<teepee> there are alternatives for some of the include stuff though, e.g. importing json data
<kintel> anyway, this is the sort of stuff which we could be willing to break, just need some analysis
pca006132 has quit [Remote host closed the connection]
arebil has joined #openscad
pca006132 has joined #openscad
<pca006132> for my repo, I think https://github.com/pca006132/sscad/blob/main/src/frontend.h will be the public API, and I don't see anything to change (in this file) for now, maybe you can look at it and give some feedback
<pca006132> oh the TranslationUnit thing will be changed
pca006132 has quit [Client Quit]
pca006132 has joined #openscad
<pca006132> for builtin modules, the plan is to expose a dictionary for the user to add them, and users can override builtin modules (as they already can now)
<pca006132> (add builtin modules by the library user, not the final users)
<pca006132> the callback will not have anything related to the bytecode or AST, so if the plan is to support two evaluation modes, it is possible without code duplication
<teepee> not sure if that already makes sense in the current phase, but some extra info for literal assignments would be useful
<teepee> specifically for customizer use the full representation of a number as typed
<InPhase> teepee: Okay. I updated the ice skater for the calendar. Please run your script. :)
<InPhase> I trimmed a few unneeded lines out, and fixed up the transition timing for some smoother dynamics.
<JordanBrown> guso78k by all means you are free to use stuff from #4478. A couple of people contributed, so it might be best to ask who to credit, but the node clone stuff is all me.
mmu_man has quit [Ping timeout: 246 seconds]
<JordanBrown> The top-level call is at line 102 of GeometryLiteral.cc:
<JordanBrown> auto n = v.toGeometry().getNode()->clone();
<JordanBrown> pca006132: to be clear, I have no opinion on the merits of the various open-source licenses and how compatible they are and are not to each other. My opinion was limited to whether I thought that your parser was adequately independent of the base OpenSCAD parser to be considered new work.
misterfish has quit [Ping timeout: 260 seconds]
<JordanBrown> You can use include<> in the middle of a line.
bozo16 has joined #openscad
fling has joined #openscad
mmu_man has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
guso78k has joined #openscad
<guso78k> busy day, now available
<guso78k> teepee, thank you for publishing my model
fling has quit [Remote host closed the connection]
<teepee> of course, now maybe a couple hundred more people have heard about Snub Dodecahedron being something that actually exists :)
<guso78k> ri13y, you can find the latest status here : https://bpa.st/ICDQ  ,still experimenting ..
<InPhase> The most snubbed Archimedean solid.
<teepee> InPhase: updated
<guso78k> to be clear, i just replicated, archimedes was first ... :')
<teepee> yeah, and it's probably on the kitwallace site too
* teepee goes checking...
<guso78k> kitwallace ?
<teepee> "Great Inverted pentagonal Hexecontahedron"
<teepee> oh kay :)
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<guso78k> i see now, but just pasting coordinates is not as fun as constructing it ...
<guso78k> ok, maybe i am wrong '=D
<guso78k> JordanBrown, the cloneOne func is present 100x times, but this is probably only viable solution ..
GNUmoon has joined #openscad
<guso78k> i am  just wondering, why its workig with F6 instead. i feel it can be solved somewhere in GeometryEvaluator.cc by using  TransformNode not on original data(which may have more than one owner) but creating a copy instead ,.
<InPhase> teepee: Thanks. :)
<InPhase> teepee: 2382 lines, and it's not even correct unless you hull() it. :)
fling has joined #openscad
califax has quit [Ping timeout: 240 seconds]
<teepee> hull what? the ice skater? why?
<teepee> also clamps! https://imgur.com/a/zjQfYOk
califax has joined #openscad
erectus has quit [Ping timeout: 240 seconds]
GNUmoon has quit [Ping timeout: 240 seconds]
Guest96 has quit [Ping timeout: 250 seconds]
GNUmoon has joined #openscad
erectus has joined #openscad
<InPhase> teepee: lol, no, the kitwallace polyhedron code.
<InPhase> Although now I'm morbidly curious what the hulled ice skater would look like.
<InPhase> lol, yep. Like an ice skater in a spandex bag.
fling has quit [Remote host closed the connection]
fling has joined #openscad
<teepee> :)
<teepee> now I wonder how that captive nut stuff goes :)
little_blossom has quit [Quit: little_blossom]
little_blossom has joined #openscad
Guest40 has joined #openscad
<teepee> aha, just made it before midnight posting about todays calendar door
qeed_ has joined #openscad
qeed has quit [Read error: Connection reset by peer]
Ekho has quit [Quit: CORE ERROR, SYSTEM HALTED.]
ril3y has quit [Quit: Client closed]
Ekho has joined #openscad
Guest40 has quit [Ping timeout: 250 seconds]
ali1234 has quit [Remote host closed the connection]
ali12341 has joined #openscad