<teepee>
I suppose it would be useful to get some basic string handling
<teepee>
I would assume it's not coming up that often because strings are not a common thing in most geometry
<JordanBrown>
Yeah, but that one-word thought is also why having some of that stuff built-in makes sense.
<JordanBrown>
DIY isalpha is find if you're only talking ASCII, but silly if you're talking Unicode.
<teepee>
yep
<JordanBrown>
And some other stuff like substring extraction is not made harder by Unicode, at least once you've gotten over the whole multi-byte thing (as OpenSCAD has).
<JordanBrown>
I'm surprised that OpenSCAD doesn't have list[range] and string[range] as slicing mechanisms.
<teepee>
range is not good
<JordanBrown>
Only, as I type it, those would have to be syntactic, since ranges require [] and you wouldn't want it to have to be list[[range]] to keep the brackets that belong to the list access from the brackets that belong to the range.
<JordanBrown>
Why do you say "not good"? Because the step isn't necessarily 1?
<JordanBrown>
Slicing lists isn't too hard with list comprehensions, but you can't slice strings that way.
<linext>
should i switch to it instead of compressing with 7z or RAR?
<linext>
is it a new standard
<JordanBrown>
I searched for "string" in the titles of issues, but not in the titles of PRs. Reading.
<teepee>
depending on the data it's better, there's never going to be a perfect compression algorithm as the code golf people have proven
<JordanBrown>
I have a compression algorithm that can compress an arbitrarily large file down to one bit. But it only works for one file.
<teepee>
JordanBrown: that PR tried to do too much in one go, it probably would be useful to get the non-step slicing merged, skipping half open ranges and step-in-slicing for now
<teepee>
yes, that what the code golf does with meta languages, they invent language-12593 which compiles to the expected result if the input is an empty string
<teepee>
that said zstd with a clever defined dictionary can be extremely powerful, as shown by scanlime with that old robot game thingy
<JordanBrown>
I'm dimly remembering that slicing proposal.
<JordanBrown>
I didn't like the magic syntax for half-open intervals at all.
<JordanBrown>
For slicing (but not for ranges in general) it seems like -1 works OK.
<JordanBrown>
that is: s[0:len(s)-1]
<teepee>
lol, I think I just found a 12 year old bug that causes a program to block for 20 minutes on startup while doing nothing useful iterating over 30 mio data rows searching for duplicates that can't happen as there's a unique constraint \o/
<teepee>
yes, but python style slicing is much easier to use and can reverse the result too
<teepee>
that's what in the PR
<teepee>
e.g. last char is [-1:0]
<teepee>
oops [-1:]
<teepee>
sure, you always can do that using len() but it gets pretty annoying and verbose, especially for recursion where you need to split off the first or last element
TheAssassin has quit [Ping timeout: 258 seconds]
GNUmoon2 has quit [Ping timeout: 258 seconds]
<JordanBrown>
Yes, being able to leave off the beginning or end is good. I was using len(s) because it was the first example that came to mind where you wanted a half-open interval.
TheAssassin has joined #openscad
<teepee>
the half open range would be nice, but it's a different topic, so if I ever find the time I'd try to just get the slicing separated and merged
<teepee>
even the step is probably a rare case and it should be possible to add later if needed
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
qeed has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 244 seconds]
qeed has joined #openscad
fling has quit [Write error: Connection reset by peer]
teepee has quit [Remote host closed the connection]
GNUmoon2 has quit [Read error: Connection reset by peer]
GNUmoon2 has joined #openscad
fling has joined #openscad
<JordanBrown>
Recent builds seem to be automatically previewing the program on load. Is that a new thing?
teepee has joined #openscad
<J1A8486>
that would be a terrible idea
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
<JordanBrown>
I agree, and yet I think that is what I am seeing. I will double check.
fling_ has joined #openscad
<JordanBrown>
I thought I saw a preview, but now all I am seeing is that the program is parsed. Strangely, I don't see *errors* from the parse. But I added printfs to the parser, and it's definitely getting called.
<teepee>
JordanBrown: good night... that initial compile without preview is normal and is doing it for the customizer - also errors are indeed suppressed at this point
ali12341 has joined #openscad
ali1234 has quit [Ping timeout: 268 seconds]
TheAssassin has quit [Ping timeout: 258 seconds]
TheAssassin has joined #openscad
ur5us has joined #openscad
lastrodamo has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
castaway has joined #openscad
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #openscad
aisa has quit [Ping timeout: 260 seconds]
aisa has joined #openscad
Guest8398 has joined #openscad
zauberfisch_ is now known as zauberfisch
whlook has joined #openscad
whlook has quit [Client Quit]
whlook has joined #openscad
Guest8398 has quit [Quit: Client closed]
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
hervyqa has joined #openscad
qeed has quit [Ping timeout: 268 seconds]
snakedGT has joined #openscad
snaked has quit [Ping timeout: 248 seconds]
whlook has quit [Ping timeout: 244 seconds]
ur5us_ has joined #openscad
ur5us has quit [*.net *.split]
LordOfBikes has quit [*.net *.split]
TheCoffeMaker has quit [*.net *.split]
foul_owl has quit [*.net *.split]
peepsalot has quit [*.net *.split]
JakeSays has quit [*.net *.split]
hrberg has quit [*.net *.split]
mlaga97 has quit [*.net *.split]
voxpelli has quit [*.net *.split]
pie_ has quit [*.net *.split]
cbmuser_ has quit [*.net *.split]
foul_owl has joined #openscad
mlaga97 has joined #openscad
pie_ has joined #openscad
TheCoffeMaker has joined #openscad
cbmuser_ has joined #openscad
hrberg has joined #openscad
LordOfBikes has joined #openscad
peepsalot has joined #openscad
JakeSays has joined #openscad
voxpelli has joined #openscad
foul_owl has quit [Max SendQ exceeded]
foul_owl has joined #openscad
ur5us_ has quit [Ping timeout: 248 seconds]
snakedLX has joined #openscad
snakedGT has quit [Ping timeout: 252 seconds]
N4buc0 has quit [Ping timeout: 260 seconds]
N4buc0 has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
teepee_ has joined #openscad
teepee_ has quit [Remote host closed the connection]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
hervyqa has quit [Quit: Konversation terminated!]
qeed has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
hisacro has quit [Ping timeout: 260 seconds]
hisacro has joined #openscad
aisa has quit [Ping timeout: 264 seconds]
aisa has joined #openscad
<JordanBrown>
thanks.
<JordanBrown>
made it a little awkward while I had introduced a bug into the compiler that caused it to crash.
<teepee>
right, don't do that :P
<teepee>
maybe it's worth updating the object-literals branch, part of it is already in master anyway
la1yv_j has quit [Remote host closed the connection]
la1yv_j has joined #openscad
<JordanBrown>
Touching Expression.h seems to rebuild most of the world. I have to wonder why it ends up included in the GUI, for instance.
<JordanBrown>
But that is a question for another day.
<InPhase>
Probably the classic case of include chains getting out of control.
<InPhase>
Nope, that's a direct include. :)
aiyion has quit [Remote host closed the connection]
TheAssassin has quit [Read error: Connection reset by peer]
fling has quit [Read error: Connection reset by peer]
teepee has quit [Remote host closed the connection]
califax has quit [Remote host closed the connection]
aiyion has joined #openscad
fling has joined #openscad
teepee has joined #openscad
<InPhase>
Oh, and then an include chain getting out of control putting it in everything.
<JordanBrown>
It seemed virtually certain that there was an include chain out of control somewhere.
TheAssassin has joined #openscad
teepee has quit [Remote host closed the connection]
<InPhase>
Hmm. And I think it's not even used in ParameterObject.h
<InPhase>
That seems to be a vestigial include from some past code state of the customizer.
<JordanBrown>
I'll try taking it ou.
<JordanBrown>
out.
<InPhase>
Nope, not in the past. Added by peeps in March.
<InPhase>
But it's unclear to me why.
<JordanBrown>
My build errors will tell us :-)
<InPhase>
Perhaps. :)
<InPhase>
ParameterSet.h was added with the same commit.
<JordanBrown>
By any chance do you know what eventually deletes a ModuleInstantiation?
teepee has joined #openscad
<InPhase>
peepsalot deserves no blame. All he did was change "expression.h" to "Expression.h" while cleaning up a bunch of filenames to be more standardized. So it has in fact been there for a while.
<JordanBrown>
Well, we'll see if the build blows up.
<JordanBrown>
Ka-pow. ParameterObject.cc blows up looking for "Literal".
<JordanBrown>
But perhaps that could be a direct include.
<InPhase>
Put it in the .cc then
<JordanBrown>
Did the standard indentation change from 4 spaces to 2 spaces at some point? I remembered 4, and my vi configuration file remembered 4, but now it seems to be 2.
<InPhase>
I thought we had it all set to 4. Although I sure prefer 2.
<JordanBrown>
I'm in Expression.cc at the moment, and it seems to be 2 there.
<InPhase>
So in 2016, the ParameterObject.h's content used ValuePtr and such directly, so it needed that include. But this was radically changed later.
<InPhase>
Yeah, everything looks like 2 to me right now, but I didn't notice until you said. I'm used to reading with 2, so I glazed over it.
<JordanBrown>
I'm used to 8 from work, with 4 for continuations. I don't like 8, especially in JavaScript, and prefer 4. But all of that experience means that 4 still seems ... tight, and makes 2 seem really tight.
<InPhase>
Oh wait, we must have changed to 2.
<InPhase>
In my .vimrc I have a setting for 4 commented out, and a setting for 2 uncommented.
<InPhase>
Specific to my openscad repositories.
<InPhase>
Config file last modified Feb 6th...
<JordanBrown>
Updated my vimrc...
<JordanBrown>
Rest of the build ran OK without that include in the header file.
<InPhase>
Feb 6 is indeed when 2 spaces was set. Found it in the log for here.
<InPhase>
I participated in the conversation, I just forgot. :)
<JordanBrown>
I need to buy a new computer.
<JordanBrown>
My 2013 $600 desktop just doesn't do large builds fast enough.
castaway has quit [Ping timeout: 252 seconds]
<JordanBrown>
That did *dramatically* reduce the blast radius associated with changing Expression.h.
<teepee>
nice
<JordanBrown>
23 files now
<JordanBrown>
from ~50.
<JordanBrown>
Of course, my test case parse still gets a SIGSEGV :-)
<JordanBrown>
By any chance do you know what eventually deletes a ModuleInstantiation?
<InPhase>
shared_ptr?
<JordanBrown>
Doesn't seem to be, but maybe I'm just missing it.
<JordanBrown>
I really only know how to spell C... C++, not so much.
<InPhase>
Yeah, seems to be that way in core/LocalScope.h, which is fed by core/parser.y
<InPhase>
The new is in parser.y, then the LocalScope deletes it at clean-up.
<InPhase>
shared_ptr has the delete in its destructor, if that's part of what you mean by only spelling C. :)
<JordanBrown>
Yes, I more or less understand shared_ptr. And I don't see any shared_ptr in the picture, but maybe I am missing something because I don't know how to spell languages with punctuation in their names.
<JordanBrown>
Thanks.
<InPhase>
This line: std::vector<shared_ptr<ModuleInstantiation>> moduleInstantiations;
<JordanBrown>
I'm adding a "new ModuleInstantiation" that doesn't precisely follow the existing pattern (because it's embedded inside an expression), so I need to ensure that I clean it up.
<InPhase>
Well, is it being added to some sort of context for storage/
<InPhase>
Or is it a transient object?
<JordanBrown>
It's at parse time, which I think means it survives through execution.
<JordanBrown>
But I must go now. Thanks for the help.
epony has quit [Ping timeout: 252 seconds]
epony has joined #openscad
pah has quit [Ping timeout: 268 seconds]
pah has joined #openscad
<linext>
can web assembly openscad generate the preview 3d model?
<teepee>
no
<J1A8486>
there is no preview in wasm .. it is a render
<J1A8486>
and with three and a color 3mf render we could have colors Ü
<teepee>
in that sense we *could* have a preview too :)
<J1A8486>
without z-fighting
<teepee>
I'm not sure that is possible in the general case
<J1A8486>
well not for the parts but it should eliminate the flicker in intersections and differences
<J1A8486>
evilgeniuslabs.org .. nice LED gadgets
<peepsalot>
<InPhase> peepsalot deserves no blame.
<peepsalot>
and don't you forget it :P
qeed_ has joined #openscad
qeed has quit [Ping timeout: 252 seconds]
<InPhase>
lol
<InPhase>
Wasn't my fault! git blame said it.
<InPhase>
Then I checked the man page for that "--ignore-rev" flag to manually not blame peepsalot. :)
<linext>
so i'm thinking 3dcustomizer.net is a good domain
<linext>
web assembly and letting users render 3d models for each other from a customizer
<peepsalot>
InPhase: I actually find the github interface pretty handy for the "view blame prior to this change" links. don't think I ever used --ignore-revs
<InPhase>
I usually do my git blame runs locally. Habit I suppose.
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
la1yv_k has joined #openscad
la1yv_j has quit [Ping timeout: 252 seconds]
la1yv_k is now known as la1yv_j
lastrodamo has quit [Quit: Leaving]
<peepsalot>
yeah, i think the other times i've used a similar UI feature in vscode, with the right extension
<teepee>
we may need a dedicated workshop announcement section soon :)
paddymahoney has quit [Ping timeout: 252 seconds]
N4buc0 has quit [Remote host closed the connection]
<peepsalot>
i've been thinking it would be nice to have a builtin convex_decompose module
<peepsalot>
I'm wondering how that fits in with all the recent work and discussion on object literal, module references, etc.
<linext>
hmm... looks like my ornament maker isn't working after the server upgrade
<peepsalot>
like, there would need to be a way to iterate over the results for it to be useful
<peepsalot>
children() has already been established to iterate over the AST based nodes, rather than any calculated number of values, so that mechanism can't be used. would an object literal which contains geometry be able to be iterated over?
buZz has quit [Ping timeout: 268 seconds]
<peepsalot>
i have a hard time keeping track of all the related discussions on github issues, PRs, wiki, mailing lists, etc.
<linext>
why does this occur in Windows: ERROR: Could not find My Documents location
<linext>
the exec() command is: c:/xampp/htdocs/customizer/openscad/openscad.exe --render -o c:/xampp/htdocs/customizer/data/text05fb94b6.stl c:/xampp/htdocs/customizer/data/text05fb94b6.scad 2>&1
<linext>
c:/Program Files/VCG/MeshLab/meshlabserver.exe exited on WEBSERVER2020 with error code -1073741502.
ur5us_ has quit [Remote host closed the connection]
<peepsalot>
no idea what meshlab server is for
<linext>
i was using it to combine two STL files more quickly than OpenSCAD could (at the time)
ur5us has joined #openscad
<JordanBrown>
peepsalot the current thinking (well, my current thinking, with some push from InPhase) on the geometry-as-data project is that the geometry would be a black box, or maybe go direct to colored polyhedra.
<InPhase>
linext: Probably a modestly clever adaptation will get you a png from the generated stl with that.
<InPhase>
Which, I know, shamefully uses javascript and not proper webasm. :) But sadly that's where most of the preexisting code is.
qeed has joined #openscad
qeed_ has quit [Ping timeout: 268 seconds]
pah has quit [Ping timeout: 252 seconds]
pah has joined #openscad
la1yv_a has joined #openscad
la1yv has quit [Ping timeout: 268 seconds]
la1yv_a is now known as la1yv
<linext>
InPhase, cool
<linext>
i wonder if it's possible to give it X, Y, Z views
ccox has quit [Remote host closed the connection]
ccox has joined #openscad
<peepsalot>
JordanBrown: i wouldn't mind if geometry were a black box in this case. I just want to have some way to operate on individual black boxes, in the case where something "returns" multiple geometries (like convex_decompose theoretically would)
<JordanBrown>
Good input. It was already clear that it needed to handle multiple geometries, to support multi-color / multi-material mechanisms, but more general support is interesting.
<JordanBrown>
Right now I'm just trying to get it to execute :-).
ccox has quit [Ping timeout: 260 seconds]
<peepsalot>
also I'm not sure how the "return" would even hypothetically work, is it a module that can return geometry literal, or a builtin function that operates on geometries? or would it use some other children()-like thing such as "geometries()"
<peepsalot>
i guess its kind of the same issue that stalled out lazy-union working over loops etc
<peepsalot>
JordanBrown: what specific aspect/proposal are you working on?
<JordanBrown>
It's intended to be a merger of the "object literal" proposal and the "data = render() ..." proposal.
<peepsalot>
i'm kind of partial to JSON-like syntax for literals: commas instead of semicolons, and semicolons instead of equals, but not a huge deal either way.
<peepsalot>
i think you had also mentioned basing it off of Javascript in some ways
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
teepee_ has joined #openscad
aiyion has quit [Ping timeout: 258 seconds]
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
teepee_ has joined #openscad
<JordanBrown>
Some aspects are JavaScript-esque - in particular, the notion that you can access a member of an object using either obj.name syntax or obj["name"] syntax.
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
<JordanBrown>
The syntax started out in my head looking more like JavaScript (and thus JSON), along the lines of { a: 1, b: 2 }, but then I said "hey, we already have a syntax that has braces and assigning values to names; we shouldn't have another one that is slightly different".
<JordanBrown>
And when I got the idea to merge it with the "data = render() ..." mechanism that solidified further, so that it became "o = { ordinary OpenSCAD syntax }", with o getting both the name-value pairs and the generated geometry.
califax has quit [Ping timeout: 258 seconds]
califax has joined #openscad
<JordanBrown>
Now the question is how possible it is to glue the various parts together like that :-)