The point is that in other languages setting up exceptions is much more expensive than in C++, and actually throwing them is relatively cheaper. Common Lisp is an example. Sadly.
My beef with C++ is that the amount of writings you have to consume to just use many of there features. Obviously for this you don't read the lawyerisms. The point being that the purely practical side is large.
Just don't use exceptions for regular flow control. Apart from bad style it is also horribly slow to actually throw exceptions (as opposed to just setting them up). This is also unique to C++, the fact that unthrown exceptions are very fast...
94970 goto to 5990 uniques label, top 10 gives a serious clue about what goto is used for:
14543 err
14159 out
7788 fail
5162 end
4774 done
3715 cleanup
3663 error
1707 bad
1016 Exit
766 failed
Disabling Skia and enabling HW acceleration on Windows LibreOffice was a cool trick; latest surprised me a bit by not allowing it :p
Changelog covered it though: https://wiki.documentfoundation.org/ReleaseNotes/26.2#Graphics
Skia/HW-disabled...
So am I. They allow writing code much more clearly, because correct error raising and handling becomes either very concise (just say throw Exception('foo bar wen wrong')), or even invisible (most functions don't need try/catch blocks, because...
xterm -geometry 1920x1200+0+0 work for me.
Milkytracker save the window resolution if it's used in fullscreen with a WM, it start in fullscreen without WM.
blender -W also work
Windowmaker can do what you want. Right click on titlebar, then you can choose window attributes and have options to switch off all window decorations including borders, and you can set 'start maximised'. The next time you start the program it...
Ok let me first depict what is the target. The program 86Box is an emulator that has a static non resizable window with a menu, toolbar, and virtual machine graphics output - the window size will be at the resolution of the emulated display *...
I'm a big fan of exceptions. And its often annoying that a lot of "safety" subsets always tend to think that the language is magically safer without them (sometimes it is but not always).
That said, I have seen some crappy parsers throw...
Defer is useful for dealing with temporary stuff. e.g "sharedVar.Lock(); defer sharedVar.Unlock()". Not when you want an effect to persist past a function return. If for example you must return 3 open files from a function or none in case of...
Just for my own clarification, can someone explain how all the functions refer to each other since I'm not clear how to identify an individual host or its location.
I notice that FreeBSD does not include nslookup. Why is that? What to use...
Turns out I haven't got relay_domains set - using virtual_alias_domains instead! Once I pointed fast_flush_domains to that it worked!
Thanks for all your help.
I would note that on this public forums, all of our words are going through an AI system anyway, likely multiple.
The important bit is which end its going in and which end its coming out.
Every page it processes, it becomes a little less fun at...
Indeed. I think that proposal is for a rollback.
https://thephd.dev/c2y-the-defer-technical-specification-its-time-go-go-go
Hopefully not too difficult for compiler vendors to implement. Time will tell!
In many cases, if a function is fully successful, you don't want cleanup. You return the newly allocated memory / resource as well as the other allocations underpinning it. Whereas a defer would incorrectly clean it up, even on success leading to...
Goto in C++ is rarely needed. Instead RAII should "undo" memory / resources allocated for unhealthy codepaths.
However for C, it can help to avoid a lot of repetitive (and thus potentially erroneous) code. For example in a function that...
balanga You're talking about creating an MCP server. There are many online resources and likely some working open source implementations out there.
For example, https://github.com/executeautomation/mcp-database-server
Well not only to jump to a cleanup section, but to a place where many jumps converge, forward or backward.
It seems these trivial things are not clear to those that never programmed something like FORTRAN / assembler.
It's not because you (and the compiler) know that the goto does not jump to e.g. another function, or backwards, or other nasty things.
Also, at least in the Common Lisp version of this you can return a value from such a block.
To bad the guests are not running FreeBSD 15.0.
Just tested in a 15.0-RELEASE bhyve guest (on a 15.0 host). A increase in disk size (truncate), while the vm is running, is picked up immediately:
Chris I. , FreeBSD developers familiar with...
I am trying to setup my laptop with FreeBSD so I can work while I am away from home. I have FreeBSD 14.3 (before 14.2), and installed in VirtualBox Windows 10 for setup my Fortinet VPN. Everything work fines except for the slowness of windows, so...
To bad the guests are not running FreeBSD 15.0.
Just tested in a 15.0-RELEASE bhyve guest (on a 15.0 host). A increase in disk size (truncate), while the vm is running, is picked up immediately:
Chris I. , FreeBSD developers familiar with...
If I'm understanding it correctly, FreeBSD 15 works like Linux according to this:
https://www.freebsd.org/releases/15.0R/relnotes/#storage-general
It says: "Add support for dynamically resizing NVMe namespaces. The nvd(4) and nda(4) drivers now...
Sure, all you have to do is have a special block with a name and then do a "break" or "return" with that name.
http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/speope_return-from.html
I haven't tried this myself, so YMMV, on the off chance that it's not out of date or wrong, the handbook does talk about this and explicitly notes how to do it without unmounting. I can't even find information on the -e switch, so this may very...
One of that constructs is break, but for only one level.
There are of course choices, but makes the flow more complicated.
Is there such a construct as general and simple as goto?
In C you have no real choice. You need goto to jump out of nested loops and you need it to skip to a cleanup section at the end of a function.
Both would be easily avoided with language constructs but alas they are not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.