« first day (3542 days earlier)      last day (238 days later) » 

2:36 AM
Yes, the function's perspective on that block is that it is a body like any other..(it was COMPOSE'd before FUNC saw it). It is trying to help you...but it is only const, since it is the value looked up to (not "locked" as keys must be for maps to work with any efficiency). You can override it.
@rgchris Try mp/emit: func [val] compose/only [append mutable (mp/out: make block! 10) val]
Covered in CONST and MUTABLE forum post... remember that CONST is a property of value cells, while LOCK and PROTECT are properties of underlying series nodes.
@rgchris Are you using a version where you don't need /ONLY for ( ) to not splice, and (( )) to splice?
FUNC only sees you wrote func [val] [append [] val] and would be the kind of scenario where you might not realize you were accruing state by doing that, hence the help... it knows func is the kind of thing applied more than once. This all ties into the compromise mentioned in the post.
@iArnold I had a dream once where I was reading some thread of discussions on a thing like the c2 wiki where they were discussing Rebol and called it "the antisocial Forth".
 
 
7 hours later…
9:40 AM
I remember you telling about your experience with the "social" Forth community. ;-)
So definitively a dream.
All these alternatives https://www.slant.co/topics/983/~best-cross-platform-gui-toolkits and now GTK goes GTK4 (and deprecates stuff) so why bother with GTK3 and all distractions, people mowing their lawns, hammering away on their interior, drilling holes for numerous paintings and pictures on the wall.
And again off for some motivational letter for some job, deadline today :-/
 
 
5 hours later…
2:12 PM
@HostileForksaysdonttrustSE Yup, I'm flagging it more as a gotcha than a problem.
 
2:37 PM
@rgchris I feel like by and large, CONST is doing its job--staying out of the way and preventing some of the most casual mistakes. If anything it doesn't catch enough, e.g. evaluative products of quoting:
>> loop 2 [print mold append '[] 'x]
[x]
[x x]
Offhand I don't remember the justification for that, I'd have to look it up, but there is one.
Which reminds me of the other current option: mp/emit: func [val] compose/only [append '(mp/out: make block! 10) val]. I wouldn't rely on that just yet, because I remember being on the fence about this.
I think I was considering what a pain it would be in the API to have to put mutable everywhere, because essentially the API is always COMPOSEing...a C variable being spliced is much more like a COMPOSE than a WORD!-lookup.
REBVAL *block = rebValue("[a b c]");
rebElide("loop 2 [append", block, "'d]");
There is no block WORD! that would give that the appearance of anything other than loop 2 [append [] 'd]. So that is what it looks like, as opposed to the behavior of block: [a b c] then loop 2 [append block 'd], which would work if written as normal code (that wasn't embedded in a bigger loop/function/etc. body as a const context the block would have picked up)
So being able to say rebElide("loop 2 [append", rebQ(block), "'d]"); offers efficiency there. There's not really any other bit to fiddle on the block value itself to tell it "hey, after you go through evaluation, don't inherit your surrounding const environment". Or at least adding such another invisible bit seems onerous.
Anyway it's a little web of decisions which went along with "well, who quotes blocks anyway" and if you do, the worst you get is how it used to be. But of course people will quote GROUP!s, to get func [x] [group: '() append group x] so maybe this should be rethought.
This is an interesting thing called "build-anywhere": "These scripts build a toolchain/runtime that runs on almost every Linux distribution. The compilers can produce libraries and executables that also run on almost every Linux distribution. (anywhere (n). x86_64 Linux distributions that include a 2.13 (circa 2011+) or newer glibc.)"
 
 
4 hours later…
7:42 PM
Given the seeming impossibility to connect my REN-C with my MySQL database (sigh again) I wondered if I could use a PHP script for the databse stuff (connect and query) and just call it from REN-C.
Busy in redesign of my website. Minimalistic design with minimal db functionality first.
 
8:00 PM
@iArnold Given that I bothered to do the work and testing for the ODBC, then it might be worth it to help you figure out what is going on there, if you want to email me login info or something and show me where the scripts are I can take a shot at it.
Or a screen sharing thing of some kind, TeamViewer or whatever people use these days
 
I could setup a test database and email you the user/pswd
 
If other clients work, Ren-C should too.
@iArnold Well, first set it up with code that you think should work, that doesn't... can you log in to a shell and run the mysql client and log in to query it? Or is it hosted in some more abstract way that does not give you a shell?
I'll mention that I've had a relatively happy time on DigitalOcean with the $5/mo virtual host. Nothing high bandwidth or stressed, but good enough for basic file storage and blogs and experimenting. And you can ssh in and do whatever.
 
@HostileForksaysdonttrustSE It is Plesk hosted. So no shell.
 
@iArnold How would you put a ren-c exe and scripts on it, then?
 
Either use Filezilla or use the web interface.
The database can be manipulated using PHPAdmin
 
8:09 PM
@iArnold So you can put the executable on it, but how do web requests get translated into running Rebol scripts?
 
I put the .htaccess file in there with the .reb reference to call the executable renc.
arnoldvanhofwegen.com/pages/avhcom.php The picture of the cookie is generated by the REN-C script.
(The layout is generated by outdated php that determines the date and gets the seasonal layout for that day from the db)
 
8:24 PM
@iArnold Hmmm...so if you wanted debug output from the program, where would it go? A log file? I suppose the page being generated could also output log information (trapped errors?)
We are looking at some database dialect things, so revisiting ODBC is not the worst use of time; I still maintain it's one of the more interesting ODBC language client codebases I've seen.
 
@HostileForksaysdonttrustSE Guess so, there are some log files, usually not very informative. (And I think the connection would not work from outside the website these days, the database server is now referenced as localhost:3306)
Other useless info:
Server: Localhost via UNIX socket
Servertype: MariaDB
Serverversie: 10.2.32-MariaDB - MariaDB Server
Protocolversie: 10
 
@iArnold Well that's not MySQL. So the first thing to do is to try the basic test against a MariaDB with ODBC driver. Secondly to make sure that the connection you are using is actually ODBC-based, and the working PHP case you have isn't using a MariaDB-specific driver.
Most every database has its own native API. ODBC is a kind of lowest-common-denominator that people write adapters for, with each database. So, show me the code that works in PHP so I can be assured it is actually ODBC.
e.g. reverse what I said was first and second. :-)
 
The db connect is just the standard php function for connecting.
$link = mysqli_connect($Site_dbHost, $Site_dbUser, $Site_dbPwd, $Site_dbName);
$db = mysqli_select_db($link, $Site_dbName);
if (!$link)
die('Error:failed to connect database');
"Never walk the easy path, it is no fun at all."
I'll just fiddle some more. And connect to the servicedesk, demanding the expansion of possible ways to connect, or I will relocate my business.
 
8:43 PM
@iArnold Okay, so MariaDB is a fork of MySQL which is apparently supposed to be somewhat compatible...but this gets back to the original thing I was saying which is that is not the same thing as ODBC
There is an ODBC adapter for MySQL, and an ODBC adapter for SQL Server, and an ODBC adapter even for Excel, etc. etc.
When you use an ODBC API, then it will use the right adapter for the database you are talking to if you have it.
If you can find a PHP ODBC API, that you can get to talk to the MariaDB through an adapter, Ren-C should be able to use that too.
Those APIs begin with odbc_ and not mysql_: php.net/manual/en/ref.uodbc.php
If you prove a PHP program working using the odbc_ APIs, then that would be worthy of investigating why Ren-C wouldn't, because it should work.
It would be a reasonable investment of time to fix bugs in the ODBC adapter, but not to write MySQL or Sqlite/etc. specific adapters at this time.
 
8:57 PM
I'll go about that. (After those other job application are done tomorrow).
 

« first day (3542 days earlier)      last day (238 days later) »