« first day (953 days earlier)      last day (2827 days later) » 

12:35 AM
@HostileFork why can't you use free tools ? xoslab.com/efl.html
 
12:55 AM
@GrahamChiu Well, that's the wrong sense of the word "lock"; that's "hide". The programs that tend to operate in the space of which I speak would call themselves "syncing software"
 
1:42 AM
I wrote some replication software a few years ago but not syncing. For web servers I just used a temp file as a file lock.
 
 
7 hours later…
8:41 AM
@PeterWAWood Hi. Get your web server sorted?
 
9:04 AM
It works fine thanks Graham. I just suspect there is a better way.
 
 
4 hours later…
1:28 PM
Useful 1-pager on the github site describing most of the things I needed to get done just now - help.github.com/articles/fork-a-repo
I had not realised that you can explicitly add a remote upstream to allow you to pull in updates from the original site you forked from
 
@johnk hi
 
@kannan hi
 
@kannan Welcome to the Rebol and Red room. See our FAQ. Cool, you have a reputation score of 142 so chat away!
 
and a welcome from our bot as well
have you heard of the languages rebol or red before?
 
@johnk hi do u know .net
sorry no
 
1:37 PM
@kannan I haven't really played with .net before
Would you like to learn some rebol?
@rebolbot
print "Hello @kannan"
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> print "Hello @kannan"
Hello @kannan
 
@rebolbot
somecode: [ "Hello @kannan" print ]
do reverse somecode
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> somecode: ["Hello @kannan" print] do reverse somecode
Hello @kannan
 
Notice how you can treat code as data very simply
and many useful datatypes are available
@rebolbot do type? 12/2/2013
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> type? 12-Feb-2013
== date!
 
1:44 PM
@rebolbot do 12/2/2013 + 1
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> 12-Feb-2013 + 1
== 13-Feb-2013
 
Looking at your SO interests it doesn't yet run on the iPhone, but it does run on Android
 
@RebolBot @johnk any one know web service in .net
 
@kannan Can you elaborate on that?
 
GOD
2:40 PM
@kannan dot wut bro !
 
3:07 PM
Interesting/cool that the bot does the profile post for new people, but I hope there's logic in thee that won't do it for everyone who stops by. Some critical mass of information in their profile? Picture, some # of questions answered... etc?
 
4:02 PM
guys, i need a little advice. i wanted to create a country boundary image with a county / city highlighted in it, but i dont need the roads, nor satellite image, nor text labels
can you recommend any tool which allows me to do such an image?
i tried josm, got the country boundary on its own, but i can't control how it is drawing the boundary. it is full of little boxes for editing the vertexes
im downloading merkaartor, but i just got this message:
merkaartor-0.18.1.zip The download was taking too long and was stopped by the network.
it's "just" 56MB... and my network is 4Mbit/s, so the problem is not on my side
i was wondering what teachers use for preparing blind maps for exam papers...
openstreetmap.org/?relation=270056 the boundary looks okay on this map but i dont need anything in the background...
 
@onetom I've just tried download of Win version (0.17.2) and it took just few seconds.
 
okay, thx. maybe i will download on a remote server 1st then...
but still, i suspect it wont solve my problem
but it's ridiculous that the data is there on open street map, but it's not easily processable
i remember a few months ago i was trying some google api tester webpage and i could highlight countries on a world map, but now i just need china and 2 provinces
at a very low resolution actually, coz it's just meant to be a presentation backdrop
 
Aren't there some blind maps available with Google Image Search?
 
4:19 PM
the best blind map is maps.baidu.com except for china... ;)
but i need the polygons for 2 regions within china overlaid on the country border and i would like to have it as vector graphics, so i can stretch nicely
i remember there was a javascript (maybe jquery?) widget which we have processed into an angular app w a friend...
 
4:46 PM
@onetom Perhaps not relevant to your case, but having dealt with this kind of thing before, do bear in mind that there are political arguments on whether countries exist or not/etc. You can make people very mad.
My knowledge is dated though, old ARC/info GIS systems. :-)
No Javascript or Ajax maps!
 
but china do exist for sure. i've been there ;D
 
@onetom But Taiwan doesn't. We have to remove it from Chinese localization of Windows when I was at Moravia Worldwide :)
 
i tried to joke about it once w a taiwanese gal... u dont wanna do that... :)
 
:)
 
and my current boss is an environmental activist and she was jailed in taiwan (just to protect her from the live stock smuggling mafia)
so the island itself very much exists if u ask her :)
at least the island. no debate about that, i guess :)
 
5:02 PM
:)
 
5:41 PM
@onetom Have you tried TileMill?
Think you can produce map tiles without labels...
 
5:59 PM
I'm not entirely certain if the answer to this is in @BrianH's answer to my question on module namespaces:
>> import module [Title: "Test" Exports: [test]][test: func [str][uppercase form str]]
>> import module [Title: "Test2" Exports: [test2]][test2: func [str][test str]]
>> test $1
== "$1"

>> test2 $1
** Script error: test word is not bound to a context
** Where: test2
** Near: test2 $1
Is there a way to make 'test available within 'test2 without naming the first module?
It seems when you create a module, the body block is not bound to 'lib?
 
6:22 PM
Ack, no—import sets the word in system/contexts/user...
 
@rgchris let me go backwards, in answering your questions.
 
@BrianH Thks—am still reading and re-reading. I'm not even certain this is the best way to organise my code...
 
OK. When you export a private module, it doesn't go through lib, it gets imported directly. When you just call IMPORT, it by default imports into the script context (system/contexts/user). The IMPORT function without options is for scripts; you have to use fancy tricks to use it for modules, for various technical reasons that are obvious in retrospect when you think about it. For modules, use the Needs header.
2
@rgchris nope, it's bound to lib, but the exports of the first module don't go through lib.
@rgchris not really, unless you keep a reference to the module somewhere. Remember, a name is just a way to refer to something. You can replace it with other ways to refer to something, but if you don't have a way to refer to it then you can't access it. The constraints of the module system are simpler than people think.
 
I wonder—is the specific problem here that using the 'module function unbinds the block from the user context?
@RebolBot source module
 
url-encode: make function! [[text [any-string!]][
    either parse/all text: form text [
        any [
            some ch | end | change " " "+" |
            mk: (mk: percent-encode mk/1)
            change skip mk
        ]
    ] [to-string text] [""]
]]    speak-debug: make function! [[message /local err][
    if error? set/any 'err try [
        to string! write chat-debug-target-url compose/deep copy/deep [
            POST
            [(header)]
            (rejoin ["text=" url-encode message "&fkey=" bot-fkey])
 
6:37 PM
@RebolBot do source module
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> source module
module: make function! [[
    "Creates a new module."
    spec [block!] "The header block of the module (modified)"
    body [block!] "The body block of the module (modified)"
    /mixin "Mix in words from other modules"
    words [object!] "Words collected into an object"
][
    make module! unbind/deep reduce pick [[spec body] [spec body words]] not mixin
]]
 
@rgchris nope, that's not a problem, it's intentional. Modules are supposed to be isolated from scripts.
The main thing to realize is that Rebol doesn't have nested contexts, it just fakes them when it can. You might think that the code in a module is actually in a module, but you'd be wrong. IMPORT can't really know where it is called from, it doesn't know it's called from a script. Actually, the only reason it is possible for IMPORT to access the script context at all is because that context is referenced from a global variable. Module contexts can't be accessed that way.
 
If I were to create a similar function: make-module: func [spec body][make module! reduce [spec body]] then I don't have the above problem. I'm probably creating problems...
@RebolBot do
make-module: func [spec body][make module! reduce [spec body]]
import module [Title: "Test" Exports: [test]][test: func [str][uppercase form str]]
import module [Title: "Test2" Exports: [test2]][test2: func [str][test str]]
test2 "sTrInG"
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/script-not-defined.html
>> make-module: func [spec body] [make module! reduce [spec body]] import module [Title: "Test" Exports: [test]] [test: func [str] [uppercase form str]] import module [Title: "Test2" Exports: [test2]] [test2: func [str] [test str]] test2 "sTrInG"
*** ERROR
** Script error: test word is not bound to a context
** Where: test2
** Near: test2 "sTrInG"
 
@RebolBot do
make-module: func [spec body][make module! reduce [spec body]]
import make-module [Title: "Test" Exports: [test]][test: func [str][uppercase form str]]
import make-module [Title: "Test2" Exports: [test2]][test2: func [str][test str]]
test2 "sTrInG"
 
6:41 PM
; Brought to you by: tryrebol.esperconsultancy.nl
>> make-module: func [spec body] [make module! reduce [spec body]] import make-module [Title: "Test" Exports: [test]] [test: func [str] [uppercase form str]] import make-module [Title: "Test2" Exports: [test2]] [test2: func [str] [test str]] test2 "sTrInG"
== "STRING"
 
Or you could just call make module! directly. There's a reason we put the unbind in module, not in sys/make-module* - module is meant to replicate how modules work normally.
bbl
 
Ok, thks—food for thought :)
 
6:57 PM
The main thing is that when you are using modules to organize things, if you don't give them names then there is no way to know whether they are loaded already - you check for that by checking whether a module of that name is loaded. The name isn't just an inconvenience, it's a name.
2
The whole point of exports from regular modules is to put stuff into lib, which is a global side effect. Not having a name means that you can't know whether it was loaded, and thus whether the side effects of it being loaded have happened yet. The way that you indicate this is by giving it a name, which is simply something to look for to determine whether it is loaded already.
2
 
If I do module [...][...] —named or not—it's not the same as do http://reb4.me/r3/altjson
 
If it doesn't have a name, it's not safe for it to have global side effects (unless you can test for those easily another way), so we skip the global and make the side effects local. This can be useful if you think of those local side effects as being "private", hence "private" modules.
 
Or at least doesn't appear to—the 'Exports words are neither in lib or user for the inline one.
@RebolBot
do module [Name: i-have-a-name Exports: [name]][name: func [str][uppercase form str]]
name "Chris"
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/script-no-value.html
>> do module [Name: i-have-a-name Exports: [name]] [name: func [str] [uppercase form str]] name "Chris"
*** ERROR
** Script error: name has no value
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
The behavioral model of scripts is different than that of modules, so they generally need to be written differently. The module function is meant to allow you to embed modules that act like regular modules within other modules or scripts - it's more meant to be a target for tools like Ladislav's include, or for when you want to split your script into modules while staying in one file.
However, there are certain things that they can't do for technical reasons, like the Needs header, so that has to be replicated using external code. The /mixin option allows you to implement private module import without having Needs.
@rgchris in general, you don't DO a module, you load it with Needs or IMPORT. Being able to DO a module is just for people who want to DO a script, but don't realize that it was written to be a module, and so would break if it were run with the script semantic model. When you call MODULE it performs the code block as part of its process, so its result is an already-made module, which there is no point to DO.
 
7:16 PM
I should ask this way then, what is the best practice for adding mezzanines from inline modules? Or are modules not the best way to do this inline?
Functions that I'd want to be available like those in 'lib.
 
It's annoying that the fonts used for code on this site, when shown on a Mac browser, are hard to distinguish from the regular text. Sorry for switching to the uppercase style as a result.
 
That's fine, it's clear enough. There is a ticket somewhere to highlight code snippets the way they are in SO Q/A.
 
It worked fine on Windows browsers. It's the Mac's fault for choosing a bad fixed-width default font, and SO's for not overriding the default font more insistently.
@rgchris in general, the main reason to put stuff in modules is that you want to organize your code in modules. Part of organizing is giving your parts names, so you can tell if they're loaded. That especially goes for collections of functions that you want added to the runtime library (lib), since you don't want them loaded more than once, or in some cases loaded at all before they are needed.
It's no different for inline modules, except that since their Needs headers don't work, you have to manage the order of import yourself in order to make sure that the stuff you need to be in lib is there before you need it, and the stuff you need to be available privately is collected for your use.
 
So in the above case, how do I get 'import to import words into 'lib?
 
Give the module a name. Or perform the import yourself manually and never check whether the module is loaded. If the group of functions and other stuff in the module is not intended to be optional, there will be never be a reason to check if the module is loaded.
The plan for the module system has always been to have Ladislav's include, or something else like it, convert these multi-file modular code projects into single files with inline modules, or exe resources, whatever. You shouldn't have to do this manually, Ladislav's include should be able to do it for you.
The whole system was built to be processed with a system like the R2 SDK's prebol and encap.
 
7:33 PM
Ok, mea culpa—I could swear I'd tried 'import and 'module with a name. It does indeed work.
 
Good to hear :)
 
But I still learned more from having made this mistake :)
 
There is that :)
 
12
A: How are words bound within a Rebol module?

BrianHOK, this is going to be a little tricky. In Rebol 3 there are no such things as system words, there are just words. Some words have been added to the runtime library lib, and set is one of those words, which happens to have a function assigned to it. Modules import words from lib, though what "i...

just in case anyone wonders where all this info is :)
 
 
1 hour later…
8:45 PM
@HostileFork Arc GIS is still going strong :)
 
9:01 PM
I just got kicked off AltME Rebol4. When I try to log back in it says "Invalid username or password". I didn't change it. Is anyone else having problems connecting?
 
9:25 PM
I just experience exactly the same symptoms ...
 
I've also seen this problem several times over the last few days.
 
Maybe Gregg needs to restart the AltME world...
Does anyone have Kaj's email address?
 
The world's still running.
(At least it was when I tried 5 minutes ago.)
 
9:43 PM
Yeah, I can get to the world, it just won't let me log in.
 

« first day (953 days earlier)      last day (2827 days later) »