<< 02-10-2014 >>

00:01:12AraqJoe_knock: meh if we need something like this, we're doing it wrong
00:06:14*jagillion quit (Ping timeout: 258 seconds)
00:10:37Joe_knockAraq: Would it be cheating if I simply ported what is there over to Nimrod using Python code? :P
00:12:22*fowl quit (Ping timeout: 258 seconds)
00:13:08Araqport as much python code to nim as you want
00:13:14AraqI did the same years ago
00:13:27AraqI don't have any python code left
00:14:14Joe_knockNo, I mean using python itself to do this? :P If I can successfully replicate what that software does in Python, I can then transition it to Nimrod *slowly*
00:14:48Araqhrm?
00:15:07TingPingon devel install fails anyway =(
00:15:41Araqyou mean a virtual environment for Nim in python which has the 2-3 split problem?
00:16:54Joe_knockAraq: A nim language/environment manager written in Python to help solve the dependency issue/s (which will happen, especially after bigbreak)
00:17:54AraqJoe_knock: babel is renamed to nimble for bigbreak, that should mitigate problems
00:18:24Joe_knockThat could actually work for each new version :P new package manager :'D
00:20:18AraqTingPing: what's the problem?
00:20:40TingPingclang: error: no such file or directory: 'tools/niminst/nimcache/libzip_all.o'
00:23:28TingPingalso shouldn't the libdir be an include dir, it just installs .nim files?
00:24:36Araqhrm perhaps try -d:useLibzipSrc
00:25:02Araqor don't use useLibzipSrc
00:25:23AraqTingPing: dunno, I copied python iirc
00:25:33Araqpython uses lib too
00:25:36TingPingtrue
00:26:26TingPingbut include files are only used for building, python files are used at runtime, where a c lib is used at runtime
00:26:45AraqFPC uses lib as well
00:27:06Araqand that's a compiler
00:29:18TingPing -d:useLibzipSrc didnt change anything
00:34:51NimBotAraq/Nimrod bigbreak dcaba49 Araq [+0 ±1 -0]: deprecated '#[' comments for future multi-line comment feature
00:34:51NimBotAraq/Nimrod bigbreak e9dec2f Araq [+0 ±4 -0]: better lock level handling
00:34:51NimBotAraq/Nimrod bigbreak 2c1f3f7 Araq [+24 ±7 -0]: manual split up into multiple files; documented the new concurrency system
00:34:51NimBotAraq/Nimrod bigbreak 2011805 Araq [+0 ±2 -0]: Merge branch 'bigbreak' of https://github.com/Araq/Nimrod into bigbreak
00:35:37AraqTingPing: sorry I need to sleep now
00:36:02Araqgood night
00:36:09TingPinggn
00:58:20*brson quit (Quit: leaving)
00:58:35*tillzy_ joined #nimrod
00:58:35*tillzy_ is now known as tillzy
01:10:06*q66 quit (Quit: Leaving)
01:12:14TingPingAraq, not quite tested, nor do i know the far reaching effects of changinge a few dirs, but id like your opinion: https://github.com/TingPing/Nimrod/commit/19eeb28bab3ce5698281ecb4041bc576333c0ae4
01:12:35*francisl quit (Quit: francisl)
01:13:07*tillzy quit (Quit: tillzy)
01:14:03*francisl joined #nimrod
01:15:14*askatasuna joined #nimrod
01:18:37*bjz_ quit (Ping timeout: 260 seconds)
01:28:47*Joe_knock quit (Quit: Leaving)
01:29:52*johnsoft quit (Ping timeout: 250 seconds)
01:30:08*willwillson quit (Remote host closed the connection)
01:30:54*johnsoft joined #nimrod
01:33:59*BlueNinja joined #nimrod
01:34:08*BlueNinja left #nimrod ("Leaving")
01:58:56flaviu1TingPing: Not Araq, but I don't think I've ever seen a patch with that quality of commit message
02:06:54*saml_ joined #nimrod
02:15:30*saml_ quit (Ping timeout: 246 seconds)
02:18:10*francisl quit (Quit: francisl)
02:29:29*saml_ joined #nimrod
02:47:03*francisl joined #nimrod
02:48:00*saml_ quit (Ping timeout: 258 seconds)
02:54:30*filwit quit (Quit: Leaving)
03:01:53*saml_ joined #nimrod
03:05:04*darkf_ joined #nimrod
03:05:44*darkf quit (Disconnected by services)
03:05:46*darkf_ is now known as darkf
03:16:21*flaviu1 quit (Ping timeout: 272 seconds)
03:30:54*Fran__ joined #nimrod
03:33:37*Francisco quit (Ping timeout: 245 seconds)
03:35:21*fowl joined #nimrod
04:09:17*francisl quit (Quit: francisl)
04:14:38*saml_ quit (Ping timeout: 258 seconds)
04:25:23*darkf quit (Ping timeout: 272 seconds)
04:26:35*xenagi quit (Read error: Connection reset by peer)
04:36:01*askatasuna quit (Ping timeout: 260 seconds)
04:50:02*nande quit (Remote host closed the connection)
05:05:58*johnsoft quit (Ping timeout: 272 seconds)
05:06:44*johnsoft joined #nimrod
05:08:09*darkf joined #nimrod
05:11:47*dirkk0 joined #nimrod
05:40:51*nande joined #nimrod
05:52:12*skyfex quit (Quit: Computer has gone to sleep.)
05:52:46*skyfex joined #nimrod
06:09:46AraqTingPing: er ... that breaks everything.
06:10:27TingPingwho depends on those files?
06:15:30Araqwho knows
06:15:44Araqwhy did you even patch the compiler?
06:15:56*fowl quit (Quit: Leaving)
06:15:58Araqwhat's wrong with it?
06:16:04TingPingso it looks in the new paths..?
06:16:22TingPingi would assume nobody other than the compiler reads the compiler config file
06:16:51Araqwhich news paths?
06:17:05TingPingand the other compiler change was the stupid /usr/ or /usr/local checks
06:17:17TingPing- $prefix/etc > $prefix/etc/nimrod
06:17:47Araqso it'll produce /opt/etc/nimrod ?
06:18:00TingPingif you install into /opt yes
06:18:06Araqthat's not how opt works
06:18:33TingPingthis is how every build system ive ever used works, the actual value of the prefix should not matter to it
06:18:43Araqheck that's the reason why *prefix* makes no sense as a concept
06:19:21AraqI don't think I've ever seen /opt/etc ... maybe I'm wrong?
06:19:30TingPingwho the hell uses opt anyway?
06:19:47*johnsoft quit (Ping timeout: 245 seconds)
06:20:17*johnsoft joined #nimrod
06:20:18AraqI don't care, it's part of Unix
06:20:35Araqwho the hell uses /usr/local for that matter
06:20:39TingPingif you insist we could add a single /opt work around
06:20:46TingPingits the default prefix for every build system...
06:22:29Araqwell sorry. I won't accept a patch like this. It WILL cause problems and the endless bikeshedding of how to install Nim needs to stop.
06:23:35AraqI mean, what's the problem again? you didn't read the docs and got confused. Fair enough, it's not standard. But most people don't package Nim.
06:23:53TingPingno, its completely broken atm if you use any remotely non-standard prefix
06:24:06TingPingand it SHOULD follow standards even when it does 'work' by your definition
06:24:29TingPingmost people not packaging nim is a problem, not an excuse to be bad at packaging
06:24:29AraqI think any non-standard prefix should be treated like /opt
06:26:07TingPingwell im sorry to hear that
06:26:25*TingPing left #nimrod ("Leaving")
06:30:14Araqthese standards are brain damagingly stupid to begin with ...
06:30:40Araqnot following them is an act of wisdom.
06:38:05*BlaXpirit joined #nimrod
06:55:36*Matthias247 joined #nimrod
07:22:42*Matthias247 quit (Read error: Connection reset by peer)
07:25:41*Matthias247 joined #nimrod
07:26:49*Matthias247 quit (Read error: Connection reset by peer)
07:33:07*nande quit (Remote host closed the connection)
07:35:06*BlaXpirit quit (Quit: Quit Konversation)
07:36:21*BlaXpirit joined #nimrod
07:41:09*dirkk0 quit (Quit: Leaving)
07:55:33*bjz joined #nimrod
08:00:48*bjz quit (Ping timeout: 260 seconds)
08:11:21*dirkk0 joined #nimrod
08:32:55Trixar_zaAraq: +1
08:59:13*skyfex quit (Ping timeout: 260 seconds)
09:02:29*endou joined #nimrod
09:04:12*BlaXpirit quit (Quit: Quit Konversation)
09:06:33*BlaXpirit joined #nimrod
09:34:18*BlaXpirit quit (Quit: Quit Konversation)
09:58:53*vendethiel quit (Ping timeout: 240 seconds)
10:11:28*johnsoft quit (Ping timeout: 260 seconds)
10:11:47*johnsoft joined #nimrod
10:19:41*BitPuffin joined #nimrod
10:50:27*flaviu1 joined #nimrod
10:54:25*bjz joined #nimrod
10:55:53*flaviu1 quit (Ping timeout: 240 seconds)
10:58:18*dirkk0 quit (Quit: This computer has gone to sleep)
11:12:52*kuzy000_ joined #nimrod
11:17:37*dirkk0 joined #nimrod
11:21:41*dirkk0 quit (Client Quit)
11:53:31*EXetoC quit (Quit: WeeChat 1.0.1)
12:04:54*noam quit (Ping timeout: 246 seconds)
12:29:27*darkf quit (Quit: Leaving)
12:38:57*dirkk0 joined #nimrod
12:39:29*dirkk0 quit (Client Quit)
12:49:47*wan quit (Quit: WeeChat 1.0)
12:55:09*dirkk0 joined #nimrod
13:23:26*noam joined #nimrod
13:26:36*untitaker quit (Ping timeout: 250 seconds)
13:33:35*untitaker joined #nimrod
13:38:18*askatasuna joined #nimrod
13:44:56bogenpackaging Nim is not hard. I don't see the problem.
13:54:25*askatasuna quit (Ping timeout: 244 seconds)
13:58:55*nim joined #nimrod
13:58:55*nim quit (Client Quit)
14:04:55*io2 joined #nimrod
14:25:24*francisl_ joined #nimrod
14:30:05*francisl_ quit (Client Quit)
14:31:28*askatasuna joined #nimrod
14:38:11*bogen quit (Quit: Leaving.)
14:46:18*BlaXpirit joined #nimrod
14:51:45*willwillson joined #nimrod
14:55:45*prosper_ joined #nimrod
15:12:24*xcombelle joined #nimrod
15:36:42*prosper_ quit (Remote host closed the connection)
15:36:49*dirkk0 left #nimrod ("Leaving")
15:44:45*perturbation joined #nimrod
15:59:47*enquora joined #nimrod
16:01:14perturbationDoes anyone know of a way of recursively parsing (flattening) C header files? I was thinking of writing a wrapper for the C xchat plugin API in nimrod, and c2nim gets me 95% there, but the xchat-plugin.h includes <time.h> and that doesn't seem to get pulled in.
16:02:04perturbationIf I just wanted to do a one-off, I could wrap all of the data types/methods with {.importc, header: "xchat-plugin.h".} pragmas, but I'd rather just write a native nimrod module
16:06:08*rpag joined #nimrod
16:26:16*shodan45 joined #nimrod
16:29:09*johnsoft quit (Ping timeout: 246 seconds)
16:30:10*johnsoft joined #nimrod
16:51:38*brson joined #nimrod
16:55:42*willwillson quit (Ping timeout: 245 seconds)
17:01:24*bogen joined #nimrod
17:03:04*prosper_ joined #nimrod
17:04:23*dirkk0 joined #nimrod
17:05:52*prosper_ quit (Remote host closed the connection)
17:09:14*vendethiel joined #nimrod
17:12:01*skyfex joined #nimrod
17:12:59*prosper_ joined #nimrod
17:15:18*dom96 quit (Excess Flood)
17:16:46*dom96 joined #nimrod
17:25:37*prosper_ quit (Ping timeout: 245 seconds)
17:28:23*prosper_ joined #nimrod
17:47:36*Sht0 joined #nimrod
17:51:42*Ven joined #nimrod
17:54:07*BlaXpirit quit (Read error: Connection reset by peer)
17:54:49*BlaXpirit joined #nimrod
18:06:45*prosper_ quit (Remote host closed the connection)
18:09:39*BlaXpirit quit (Quit: Quit Konversation)
18:11:08*BlaXpirit joined #nimrod
18:15:11*EXetoC joined #nimrod
18:15:28*nande joined #nimrod
18:31:00*Fran__ is now known as Francisco
18:33:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:37:14*bogen left #nimrod (#nimrod)
18:37:52*quasinoxen joined #nimrod
18:46:54*rpag quit (Quit: Leaving)
18:48:55*BitPuffin quit (Ping timeout: 244 seconds)
18:51:29*wan joined #nimrod
18:54:45*willwillson joined #nimrod
18:57:26*Ven joined #nimrod
19:14:06*Trustable joined #nimrod
19:16:53*Matthias247 joined #nimrod
19:29:26*skyfex quit (Quit: Computer has gone to sleep.)
19:30:00*skyfex joined #nimrod
19:30:08*q66 joined #nimrod
19:30:44*hguux joined #nimrod
19:32:28Araqperturbation: you cannot reasonably c2nim time.h
19:32:37Araqit's already wrapped via times.nim
19:33:14Araqthat said, there is tools/cmerge for merging C files
19:36:05*Jehan_ joined #nimrod
19:37:35*Joe_knock joined #nimrod
19:38:41perturbationhmm... thanks Araq. I'll take a look. I was hoping I could just do the moral equivalent of 'cpp xchat-plugin.h | c2nim > xchatplugin.nim'
19:39:08perturbation(but the GNU pre-processor at least warps the file a bit such that c2nim then complains...)
19:43:22AraqJehan_: please read doc/manual/locking.txt
19:43:32Jehan_Araq: Will do.
19:43:49Jehan_By the way, after working through it on paper, your subtyping rule looks correct.
19:44:10Araqbrb
19:53:00Araqback
19:55:20Jehan_How do you actually assign lock levels to locks? The document is silent on that.
19:55:59Araqthere will be system.UncheckedLock and system.Lock[TLockLevel]
19:56:30Araqtype Lock[T: static[int]] = ...
19:57:06*flaviu1 joined #nimrod
19:57:13Araqthe implementation is hacky, it's simply checked if the type has a 'static T' generic parameter
19:57:15Jehan_Does the system support read-write locks?
19:57:58AraqI think so
19:58:11Araqsince "Lock" is not builtin at all
19:58:18Araqyou can create your own lock types
20:00:34Jehan_Yeah, but "access" means something completely different in each case.
20:00:55Araqit's up to you how to encapsulate the accesss
20:01:17Jehan_Hmm, I see.
20:01:39Araqhowever '.guard' is a problem for writing libraries
20:02:43Jehan_I guess one could ensure read-only access by making something a non-var parameter.
20:03:26Jehan_Also not sure how the system works with higher order functions that don't have a lock level.
20:04:21*dirkk0 quit (Quit: Leaving)
20:07:00*vezzy joined #nimrod
20:08:15*quasinoxen quit (Ping timeout: 246 seconds)
20:09:46*Mat3 joined #nimrod
20:09:48Mat3hello
20:11:53*woodgiraffe quit (Ping timeout: 240 seconds)
20:12:40Joe_knockHello folks.
20:15:05*Sht0 quit ()
20:15:21perturbationcmerge works fine, but xchat's C API is kind of broken... _xchat_list (among other types) are listed but not defined in xchat-plugin.h, which means I'd have to chase them down and redefine... ugh
20:16:23Joe_knockis dom96 around?
20:19:58AraqJoe_knock: no, he has a real life now ;-)
20:20:15Araqhi Mat3
20:20:37AraqJehan_: the effect system in general has special treatment for higher order functions
20:21:36Joe_knockAraq: School or teenage years? :P
20:23:09Jehan_College, as I understand it.
20:23:21*vezzy quit (Quit: No Ping reply in 180 seconds.)
20:23:44*quasinoxen joined #nimrod
20:26:01Mat3hi Araq and all
20:26:36Joe_knockI'd like to know, based on this: http://www.techempower.com/benchmarks/ why Jester is so weak in performance?
20:26:54Araqagain? that old benchmark?
20:27:01Mat3sorry, what kind of framework is Jester ?
20:27:14Araqit's not properly multi-threaded, that's why, Joe_knock
20:27:19*prosper_ joined #nimrod
20:27:38AraqMat3: super-duper awesome web framework
20:27:52Mat3ah, these one
20:28:10Joe_knockAraq: Is that a flaw in the framework or the test-code?
20:28:26*Celestic joined #nimrod
20:28:30CelesticHey all, anyone around?
20:28:42Araqhi Celestic
20:28:44CelesticLooking for some help with a PHP/javascript thing I'm doing.
20:28:46CelesticHello Araq.
20:28:54Mat3hello Celestric
20:28:54CelesticWhat's up?
20:29:25CelesticAnyone here into PHP/js? or have a background in it?
20:29:31CelesticI'm sure it's a fairly basic question, I'm just rather new to it.
20:29:39AraqJoe_knock: the benchmark doesn't really support multi-processing which is what jester used
20:30:04AraqCelestic: just ask
20:30:21Joe_knockCelestic: Throw them questions :P
20:30:22*xcombelle quit (Quit: Quitte)
20:30:50Joe_knockAraq: So what is the true performance then? Cause I see node.js ahead of a static language :'D
20:31:07CelesticI'm trying to implement something that'll work harmoniously with ajax/jquery (POST to a .php end-point) and then return back the HTML to another page.
20:32:37Joe_knockCelestic: A page link to another page?
20:32:47CelesticHere, let me show you..
20:32:48Celestic1sec
20:33:02Celestictitan.csit.rmit.edu.au/~e54061/wp/movie-service.php?filmID=RC&CRC=s300000
20:33:06CelesticI want to be able to query that
20:33:12Celesticwith RC/AC and other values
20:33:16Celesticand then have the HTML returned
20:33:21Celesticembedded/included on a page
20:33:25CelesticI can't think of a better way to describe it
20:33:43Celesticso let's say movie.php should query movie-service.php via POST using ajax/jquery and then present it back onto the page at movie.php
20:34:21CelesticI don't understand how that'll actually work, that's the issue I'm having.
20:34:37CelesticAm I storing the HTML in a var and then echoing that var?
20:36:30*prosper__ joined #nimrod
20:36:57AraqJoe_knock: I don't know. Nor do I care. the benchmark is stupid.
20:37:10*dom96_and joined #nimrod
20:37:39*prosper_ quit (Read error: Connection reset by peer)
20:37:46CelesticAnyone got any ideas?
20:37:49Celesticor is this not the right place to ask
20:37:49Joe_knockCelestic: Do you want to "scrape" that link and then embed it into your own web page?
20:37:56AraqCelestic: how come you're here and not in #php ?
20:38:11CelesticJoe_knock - yeah, using jquery/ajax.
20:38:16CelesticAraq - I haven't registered for a username
20:38:21Celesticmainly cause freenode gets rooted like once a month
20:38:31Celesticand I don't really have any interest in having my details on a DB dump
20:39:00dom96_andJoe_knock: it was slower because I didn't optimise it at all and the test implementation was done quickly too.
20:39:05Mat3understandable
20:39:27dom96_andPlease do benchmark the latest new_async (that's a branch) jester
20:39:27*prosper__ quit (Remote host closed the connection)
20:39:44Mat3hi dom96
20:39:56Joe_knockdom96_and: What is the true performance (IYO) ?
20:40:37Joe_knockCelestic, Are you trying to dynamically scrape links from another website? You need to actually use a web-scraper then.
20:40:42dom96_andThe problem is that it doesn't yet scale to multiple cores
20:41:04dom96_and On a single core it's equal to Golang
20:41:30dom96_andCelestic: #php
20:41:44CelesticJoe_knock
20:41:44Celesticno
20:41:59Celestictitan.csit.rmit.edu.au/~e54061/wp/movie-service.php?filmID=RC&CRC=s30000
20:42:04CelesticI want to request this one URL using jquery/ajax
20:42:08Celesticand then embed it in MY page
20:42:12Celesticit on MY page
20:42:14Joe_knockoh!!!
20:42:16Celesticyou know what I mean?
20:42:18Celestichtml/php
20:42:35Celesticand I'm not really sure how to do that.. I was just going to iframe it, but i was told that wouldn't be acceptable.
20:42:40Joe_knockHow do you want to embed it? Celestic
20:42:55Joe_knockaah, iframes was what I was going to suggest.
20:43:15CelesticI was trying to do something like this
20:43:16Celestic<div id='MS-film'> <div id='MS-image'><img src='http://titan.csit.rmit.edu.au/~e54061/wp/movie-service/<?php echo $imgs[$_REQUEST['filmID']]; ?>' alt='<?php echo $titles[$_REQUEST['filmID']]; ?> Poster' /></div> <div id='MS-title'><?php echo $titles[$_REQUEST['filmID']]; ?></div> <div id='MS-description'><?php echo $descriptions[$_REQUEST['filmID']]; ?></div> <div id='MS-rating'><?php echo $ratings[$_REQUEST['filmID']]; ?></di
20:43:53*Joe_knock scrubs my eyes
20:45:12*quasinoxen quit (Ping timeout: 245 seconds)
20:46:46Celestichttp://pastebin.com/ffkiKThG
20:46:51Celesticthat's the js I've done for it Joe_knock
20:50:08Joe_knockCelestic: Is this homework?
20:50:14CelesticYes. It is.
20:50:20Joe_knock"No CRC code found in the POST array. See tute-lab 6 activity 3 on page 2 for more information, but here is some code that almost works to help you get started:"
20:50:23CelesticI'm not wanting someone to do it for me
20:50:26CelesticI looked there
20:50:27Celesticit doesn't clear it up
20:50:34CelesticI'm simply wanting to work out how to print
20:50:38Celesticthe values from the query
20:50:40Celesticand then I can work out the rest
20:50:41Celestictbh
20:51:18dom96_andCelestic: why are you asking here?
20:51:27Joe_knockTry storing the the values into a variable first, then pushing that variable to something like a JSON object and then rendering it from JSON.
20:51:31CelesticIt's 4 AM, and I figured someone might know.
20:51:43CelesticJoe_knock - Thanks. I'll try that.
20:51:45CelesticThat's actually a good idea.
20:52:25Joe_knockCelestic: The real reason they're asking is because this is nimrod and we're so far away from PHP...
20:52:39CelesticYeah, fair enough.
20:52:47CelesticI'll try what you said
20:52:52Celesticthanks for the help though, I appreciate it.
20:54:27Joe_knockanytime Celestic.
20:57:30Mat3I can now compile with the SDL wrapper. The problem is now, that the SDL2 library is not found: "could not load: libSDL2.so"
20:57:41*Demos joined #nimrod
20:57:54Mat3if I try to execute the program
20:58:49Mat3whereby the SDL test programs supplied compile and execute fine
20:59:29*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:04:39Mat3the librarys are correctly installed
21:06:13*dom96_and quit (Ping timeout: 260 seconds)
21:06:54willwillsonwhereis libSDL2.so?
21:07:05Mat3/usr/local/lib
21:08:58Mat3it runs if I hardcode these path to sdl2.nim
21:10:20Mat3so some flag settings need to be fixed
21:11:18willwillsondoes it work if you add /usr/local/lib to LD_LIBRARY_PATH?
21:15:50Mat3yes ! thanks. I've found out that these shell variable was not updated by the make script after compilation (SDL library)
21:20:17Mat3instead pkg_config was used for compilation of the test programs (which returns hardcoded paths to the C compiler)
21:21:17willwillsonmaybe running ldconfig will help?
21:22:04Mat3I simply have forgotten to add the local library path to my shell entry script, it runs now fine
21:24:54willwillsoncool, I think dlopen will also check /etc/ld.so.cache, so if you have /usr/local/lib in your /etc/ld.so.conf and run ldconfig, it might also find it that way
21:28:37DemosHey Araq: I notice that our subranges and substrings are closed on both ends. I mentioned this to a python programmer friend of mine and he was somewhat appaled and figured it would result in ALL THE BUGS. I disagree but I wanted to ask what the motivation was for this?
21:29:30Mat3no, because the path is already existent in /etc/ld.so.conf/libc.conf, which is included
21:31:46Jehan_Demos: I'm not sure why (closed, open) intervals are inherently superior (I know Dijkstra's argument and I don't buy it).
21:31:59AraqDijkstra is simply wrong
21:32:07Jehan_I find these intervals actually sometimes difficult to reason about.
21:32:29Araqfor the simple reason that there might not be a high(x)+1 element
21:32:29*Mat3 thinks the ideas featured by ldconfig are quite mad
21:32:34Jehan_For most people, intervals that are closed on both sides are simply the natural way of doing things.
21:32:46DemosI do not know dijkstra's argument, but in general I find each choice of intervals for array indices and ranges has a different and pretty equal set of easy to make errors
21:33:10Jehan_Demos: It's about the same debate as 0- vs. 1-based array indexing.
21:33:12Demoshaving high(x) in Nimrod makes me not notice the range issues though
21:33:15Demosyeah
21:33:17Araqfor x in low(myenum)..high(myenum)
21:33:21Araqcase closed.
21:33:38Jehan_Whatever you're already used to looks better to you. Confirmation bias.
21:33:53Mat3some more syntax related discussion ? Fine
21:34:04AraqDijkstra's way implies weakly typed enums so that high(enum)+1 can be created
21:34:08DemosI have been learning Fortran recently and I am LOVING being able to choose any shape I like for arrays
21:34:36Jehan_Demos: It's why I always liked Pascal's way of doing arrays.
21:34:53DemosJehan_, is pascal's the same as nimrod where you can just choose
21:34:57Jehan_Yup.
21:35:06Jehan_array[first..last] of type.
21:35:19DemosI do think that you need some kind of special way to take any kind of array, like DIMENSION(:) or our openarrays
21:35:43Jehan_Wirth got rid of it in his later language designs, which I thought was misguided.
21:36:11Jehan_For example, if you write code that involves vectors and matrices, mathematicians are used to having indices start at 1.
21:36:44Jehan_Obviously, you can renumber those, but then you have to adjust them everywhere, which eventually leads to transcription errors.
21:37:25Jehan_As I said, people simply tend to find more natural what they are used to.
21:37:42Jehan_And then they usually construct ex post justifications why it's "objectively" better. :)
21:37:48Demosyeah, exactly. I do like how in fortran I think you can do stuff like INTEGER, DIMENSION(1:) :: x for a param and someone can pass you an array that is like DIMENSION(-5:2) and you would get one of DIMENSION(1:7)
21:38:22Jehan_Yes, that's because Fortran was pretty much designed for applied mathematics.
21:38:38DemosI am really liking fortran, it is just REALLY, REALLY hard to learn
21:38:45Jehan_Modern Fortran dialects are actually pretty neat languages.
21:39:03Jehan_Most people don't realize how different they are from Fortran 77.
21:39:15Demosand like the allocatable arrays have automatic deallocation
21:39:17EXetoCMat3: what about ldconfig? all I've ever had to do is add a dir to the path, and that's simple
21:39:26Jehan_Lack of automatic memory management sucks, but is better mitigated than in most other languages.
21:39:27Demosactually I think it is just really hard to leak memory in fortran
21:39:40Jehan_Demos: As soon as you use heap-allocated memory, easily.
21:39:51EXetoCbut then there's the quirkiness regarding searching in a relative path for example
21:39:59Jehan_The thing is more that it's easier to avoid having heap-allocated memory in Fortran.
21:40:01Mat3I like the Fortran syntax (specially the possibility to implicitly signal variable types and ranges)
21:40:24DemosI was under the impression that if I returned like INTEGER, ALLOCATABLE, DIMENSION(:) :: result from a function it would get de-allocated at the end of the calling scope
21:40:58*DiffuseStorm joined #nimrod
21:41:01Mat3eh, I mean all versions newer than Fortran 77?
21:41:10Demosand is has generics (sorta), good objects, good modules, really awesome parallel programming stuff, user defined operators, and so on
21:41:15Demosand it interops with C really well
21:41:16Jehan_Demos: Yes, Fortran essentially uses automatic memory semantics for a lot of stuff
21:41:28Jehan_Without having to write constructor/destructor boilerplate.
21:41:57DemosI would kill for a learn you a fortran 2008 though
21:42:02Jehan_But I was talking about actual heap allocations that don't follow these simple semantics.
21:42:33perturbationSpeaking as someone whose only exposure to Fortran was some relatively bad Fortran-77 code written by an (at-the-time) grad student... *shudder*
21:42:40perturbation*no* desire to revisit Fortran
21:42:54perturbationone of the languages created before the light of our lord(s) K&R
21:43:46Mat3you mean these two guys from Berkeley with a passion for Basic and LSD ?
21:43:57Jehan_perturbation: Fortran 2008 has pretty much nothing in common with Fortran 77 anymore.
21:44:08perturbationBerkeley == Unix + drugs... maybe related, maybe not
21:44:16Araqhe means the 2 guys who never groked type systems and so conflated pointers with arrays
21:44:17DemosAlso, I am not sure anyone actually has a Fortran 2008 compiler
21:44:28DemosI think intel Fortran just got full 2003 support like a month ago
21:45:08Jehan_Demos: I don't think so, either, but Gnu Fortran supports a decent subset of the new features last I checked.
21:45:23Jehan_Of course, I haven't written or read any actual Fortran code in years. :)
21:45:46Jehan_I still follow the language (same as with Ada).
21:45:51Araqanyway, it's nice that nobody listened to my point
21:46:09Araq[a, b) is downright broken for a strong type system
21:46:11perturbationAraq: but how do you get buffer overflow if arrays != pointers
21:46:28Araqit's not a matter of preferences
21:46:35DemosAda looked neat as well, but just so verbose.
21:46:46Araq[a, b] works, [a, b) does not
21:47:02Mat3Araq: The type system in C was only introduced as hint for the code generator, safety was not a goal
21:47:47*askatasuna quit (Ping timeout: 245 seconds)
21:47:52AraqMat3: the real problem with Unix and C is not that they are stupid to begin with.
21:48:01Araqthe real problem is that they never got fixed.
21:48:23Jehan_I think C can best be thought of as a portable assembly language still. I'm pretty sure that was also largely the design intent.
21:49:24Jehan_Araq: Hmm, I think the problem with Unix was more that it "got fixed", after a fashion, and got encumbered with several subsystems that don't cleanly fit together.
21:49:36Mat3Araq: Agree, except Plan 9 was planed as Unix right done
21:49:46Jehan_Let me only mention System V IPC … :)
21:49:58DemosI do like that C gives you few ways to do things, I like how you just write a bunch of functions, and don't worry about classes or methods. Nimrod is like this too
21:49:58Mat3BSD valloc
21:50:15Jehan_Overall, however, I don't see a fundamental problem with Unix's design.
21:50:33AraqI don't see anything that *works*
21:50:33Jehan_And given the limitations at the time, it was borderline brilliant.
21:50:44Jehan_Araq: Not sure I'm following you there.
21:51:13AraqJehan_: I see nothing that's been properly designed
21:51:27Jehan_Araq: Hmm, then we'll probably have to agree to disagree.
21:51:30Araqthe weird "nobody knows the grammar" shell languages
21:51:45Araqthe non-existent APIs
21:51:45Mat3Ehm, Unix was once created as quick and dirty replacement for Multics, primary for porting a game
21:52:03Araqthe root user is ridiculous
21:52:05Jehan_Define "non-existent APIs"?
21:52:23Araqshell escape sequences come immediatly to mind
21:52:32perturbationas opposed to what? Plan 9? OpenVMS? (Windows?)
21:52:41Joe_knockAre these syntax-level discussions encouraged?
21:52:50perturbationUnix is kind of hairy but (to misquote Churchill) its the worst thing except for everything else
21:52:58DemosI agree with that
21:53:38perturbationI *do* agree that 'POSIX-compliant' being ~= meaningless to true portability is a WTF
21:54:21Mat3its design choices are ironical similar to MSDOS which grows from QDOS (quick and dirty operating system as CP/M clone)
21:54:41Araqso what does Unix do in a particularly good way? don't give me that pipes bullshit
21:54:59Jehan_Demos: oddly enough, I consider the lack of classes one of Nim's weaknesses (no worries, I'm not going to advocate for their inclusion).
21:55:12AraqI've written the original osproc.nim, I know better
21:55:32perturbationerr... SIGINT, SIGTERM, SIGKILL as poor man's IPC?
21:55:32Araqit's all messy and broken
21:55:56Jehan_Araq: It has a relatively simple conceptual model that primarily relies on processes and files with a relatively simple set of operations for each.
21:56:26DemosJehan_, I mean not having interfaces beyound some "you can do it with macros" handwaving might be good, but I dont like the idea of a datastructure that "contains" functions
21:56:26AraqJehan_: it's all wrong from the ground up, but even if you think the principles are good
21:56:34Araqthe implementation is not.
21:56:38Jehan_Arguably, Plan 9 did that better. That's where my point about it growing poor subsystems comes into play.
21:56:39perturbationeverything-is-a-file?
21:57:21Jehan_Demos: Then you don't like modules, either? A class is simply a module that can have multiple instances.
21:57:49Joe_knockperturbation: yeah, it literally is that.
21:57:57Joe_knockfolders are files also.
21:57:57Jehan_Araq: As I said, we'll probably have to agree to disagree.
21:58:55Mat3anyhow; There exist no real choice beside Un*x and Windows for development at moment
21:59:07Araqhey, there is Haiku :P
21:59:14Araqan Nim runs on it ... I think
21:59:18Araq*and
21:59:26Jehan_Mat3: Pretty much. I'm actually happy that the OS landscape is not more diverse.
21:59:54Jehan_Any new OS may fix some warts that existing ones have, but only at the cost of introducing others.
22:00:19Araqwith that logic we shouldn't design new PLs either :P
22:00:22Araq*by that
22:00:27Araqso I disagree
22:00:36DemosJehan_, I think about modules differently myself, but I guess they are kinda that
22:00:39Jehan_Araq: That's different.
22:00:46AraqI think it's not even hard to design something better than what's out there
22:01:01Jehan_A new OS means a ton of porting work for thousands of developers.
22:01:10Jehan_A new language affects only those that use it.
22:01:12Mat3Araq: Haiku recreate a now ~20 Years old operating system and runs mainly on x86 CPU's (I know there exist an incomplete ARM and AMD64 port)
22:01:35AraqMat3: yes, but it's not Unix, so I like it ;-)
22:01:36Jehan_Araq: No, but you go and port a reasonably large software base over to it.
22:02:38DiffuseStormGuys I've written 1 piece of software that boots without an OS. Let me just make an Os out of it real quick.
22:02:43Jehan_Haiku has its own problems, such as being tied to C++.
22:03:21DiffuseStormThat actually was the original intent, a small OS to learn OS dev, just don't have the time
22:03:34Mat3there exist AROS :D
22:03:45Jehan_Not because C++ is bad, but because they're tied to what the C++ language committee cooks up.
22:04:59Jehan_Or having to support their own C++ dialect perpetually.
22:05:41*Mat3 just decide to create my own Computer from the ground up (with an TI DSP as main CPU)
22:06:53Demosone nice thing about C is that the ABI is always defined just because you have to do that to compile the language (pretty much)
22:07:10Demostrying to tie down an ABI for something more complex seems hopeless
22:07:19Mat3which API, ANSI C ?
22:07:30Jehan_ABI, not API.
22:07:38Araqoh not again
22:07:39Mat3sorry, makes sense
22:08:14Araqever wrapped a macro heavy piece of C code with lots of bitfields? ABI always defined my ass
22:08:26*Trustable quit (Remote host closed the connection)
22:08:34AraqABI only works for a subset of C
22:08:37DiffuseStormActually I do have the time I'm just disgusted with having to use either C or C++ pretty much for least friction. I want a replacement for C.
22:08:49Araqit's just like c++ except that the subset is much larger
22:08:54perturbationAraq: b/c of endianness?
22:08:55Jehan_Araq: Yeah, C could be simplified.
22:09:42*flaviu1 quit (Remote host closed the connection)
22:09:45AraqABI works when you're aware of how the compiler maps it down to the byte-level and the compiler doesn't change how it does it
22:09:56*flaviu1 joined #nimrod
22:10:29Araqmaybe Ocaml has a stable ABI too, who knows
22:12:04Jehan_ABI is more about memory layout and how function calls work.
22:12:13Araqyes
22:12:18Jehan_It's independent of most language features.
22:12:43Araqexactly, it's quite orthogonal to everything else
22:13:06Araqhence Ocaml could easily be ABI stable
22:13:37Araqthough I guess having a GC is a valid counter point
22:13:46*flaviu1 quit (Remote host closed the connection)
22:13:49Jehan_Yeah, I was thinking the same.
22:13:54*flaviu1 joined #nimrod
22:14:07*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:15:05*BlaXpirit quit (Quit: Quit Konversation)
22:15:49*Varriount_ joined #nimrod
22:18:16Demoswell the OS could provide the GC
22:18:30DiffuseStormThat's true.
22:18:32*Varriount quit (Ping timeout: 245 seconds)
22:22:26Jehan_Two problems with that:
22:22:27*flaviu1 quit (Remote host closed the connection)
22:22:40Jehan_(1) You usually need more than one GC implementation.
22:23:04Jehan_(2) GCs need to interact with the compiler, often in nontrivial ways.
22:23:27Jehan_You could do it, but I'm not sure it would be a good idea.
22:24:56*flaviu1 joined #nimrod
22:29:19AraqJehan_: I'm implementing a "mixed mode" for the compiler
22:29:30Jehan_Define "mixed mode"?
22:29:33Araqso that modules that use importcpp are compiled as c++
22:29:41Araqbut other modules are still compiled as C
22:29:45Jehan_Hmm, interesting.
22:29:50Araqand then its all linked together
22:30:03Araqit almost works
22:30:08Araqbut
22:30:16Jehan_But you'll have to wrap everything in extern "C" { … } so that name-mangling doesn't mess things up?
22:30:26Araqyou're quick
22:30:32Araqextern "C" is causing problems
22:30:50Jehan_I've just run into a similar problem before.
22:31:24Araqwell I'm tinkering with a complex solution
22:31:37*kuzy000_ quit (Ping timeout: 260 seconds)
22:31:51Araqwhere imported procs get the extern "C" if the module is compiled as C
22:32:18Araqbut I wonder if we can always generate NIM_EXTERNC instead
22:33:40Araqwhich is a macro that expands to nothing unless __cplusplus is defined
22:34:53Jehan_Araq: Hmm. Not 100% sure.
22:34:58*bogen joined #nimrod
22:35:19Jehan_Speaking of importc and friends, is there a way to have an importc require more than one header?
22:38:42Araqno. You have to hack around it with a dummy symbol that you actually use somehow
22:39:06*Mat3 quit (Quit: Verlassend)
22:39:43Araqhrm unfined reference to `__gxx_personality_sj0'
22:39:56Araqso the linking needs to be done with g++ ....
22:40:01*Araq sighs
22:41:02Jehan_Or probably link the C++ stdlib explicitly (not that that helps).
22:41:26Araqnot sure if that can be done in a portable way
22:41:37Jehan_Yeah, that's what I meant.
22:41:56Jehan_Do C++ exceptions in mixed mode use setjmp?
22:42:15Jehan_Because if you mix setjmp() and try, that may become interesting.
22:42:32Araqyeah ... that's what I'm trying
22:42:58Araqhowever for what I've in mind it should be fine
22:43:03Jehan_Anyhow, I'm off. See you. :)
22:43:10*Jehan_ quit (Quit: Leaving)
22:44:11*flaviu1 quit (Read error: No route to host)
22:44:24*flaviu1 joined #nimrod
22:46:10Araqhrm for bigbreak we can get rid of all these old C compiler configurations, right?
22:46:25DiffuseStormAraq: (I'm assuming you've written parsers) Where did you learn how to parse a programming language? It seems particularly tricky. I'm not sure how one would build a tree, given that errors can be anywhere.
22:46:40bogenwho uses the old C compiler configurations?
22:46:58Araqbogen: I don't know.
22:47:31DiffuseStormLexing is super easy, than x500 in difficuly xD
22:48:14AraqDiffuseStorm: I wrote my first interpreter for some domain specific language when I was 16 iirc
22:48:30DiffuseStormHmm not bad.
22:48:50Araqso I don't remember how I learned it
22:48:53DiffuseStormkk
22:49:59*Jesin quit (Quit: Leaving)
22:50:23*Jesin joined #nimrod
22:51:07TriplefoxI think I made progress by playing with PEG.js in college
22:51:16*Shoop joined #nimrod
22:51:22Araqthinking about it
22:51:43Araqthere was no clean separation between lexer and parser
22:51:45DiffuseStormAraq: what's the hardest stage?
22:51:49DiffuseStormI see
22:51:54TriplefoxPEGs are fun and pretty simple conceptually, from there I just started doing hand-written parsers that were combinations of state machine and recursive descent
22:52:06Araqand I did it with substring and "delete"
22:52:08Triplefoxit helped when i started adding more passes
22:52:44ShoopHi, beginner here. Im getting strange behavior from this program but im probably doing something stupid. It only prints a single '\n' instead of cba - http://pastebin.com/PkRZwPQc
22:52:52AraqDiffuseStorm: hardest is to implement somewhat efficient precedence handling
22:53:33Shoopoops i mean abc, i am going to make it reverse but i was running into strange errors
22:53:50AraqShoop: use newStringOfCap or don't use 'add' but result[i] = s[i] instead
22:53:56DiffuseStormThe only thing I have done so far related to parsing (when I was 17, now 20) was to parse Excel documents and generate a c# program from it. Then I created special commands within Excel I'd write to control how the program would be generated. It was a very specific solution to a data exploration quest.
22:54:09ShoopAraq: why doesnt add work?
22:54:38Araqit "works" but it adds after the len(s)s characters
22:54:41DiffuseStormBasically Excel specified a single 'test' and the program was then generated to run that test through tons of data.
22:54:53ShoopAraq: are strings of static length?
22:54:54Araqand so you have binary zeros in the string that 'echo' doesn't handle
22:55:10AraqShoop: no.
22:55:29ShoopAraq: then why doesnt add extend the length of the string?
22:55:36Araqit does.
22:55:46Araqbut you need to listen
22:56:06ShoopAraq: just curious about behind the scenes, your changes are correct
22:56:23Araqwell I already explained it to you
22:56:31Araqresult = newString(3)
22:56:35Araqproduces:
22:56:41Araq"\0\0\0"
22:56:49Araqthen you add to *that*
22:57:01Araqbut echo only prints up to the first \0
22:57:03ShoopAraq: so once i use newString to set the length of the string, echo will only print that many characters?
22:57:13ShoopAraq: oh wait nvm
22:57:22ShoopAraq: the \0 signals the end of the string
22:57:23*enquora quit (Quit: enquora)
22:57:31Demosno, echo prints till it sees a \0, I recomend you just say result = ""
22:57:35Demosand then add to that
22:57:56AraqShoop: not really but echo uses C's output functions
22:58:06Araqand so inherits that \0 behaviour
22:58:23Araqfixing it causes other problems
22:58:26ShoopAraq: ok i understand now, thanks for explaining :D. Really liking the language btw
22:59:16Araqbtw for reverse you should iterate from 0 to s.len div 2
22:59:34Araqotherwise you reverse twice and end up with nothing reversed
23:00:26ShoopAraq: ok, cool thanks
23:02:37ShoopAnd a random question, why not make 10..0 work so you can have decreasing range statements?
23:03:26AraqDiffuseStorm: parsing however, is the easy part of a compiler. everything after parsing is *much* harder
23:04:19AraqShoop: that cannot work in any reasonable way
23:05:05ShoopMake a..b where b < a = the reverse of b..a?
23:05:32DiffuseStormYeah I imagined so
23:06:29AraqShoop: so 0.. x.len-1 if x.len == 0 should iterate in reverse? that's madness
23:07:04Shoop0..0 is just 0 regardless
23:07:23Araqbut it's 0.. -1
23:07:25Shoopoh i see
23:07:42Shoopgood point
23:07:52Shoop*shuffles into corner
23:07:54*Shoop quit (Quit: Page closed)
23:17:29*perturbation quit (Quit: goodbye, all!)
23:22:04NimBotAraq/Nimrod bigbreak c99ec16 Araq [+0 ±4 -0]: deprecated string case statements without 'else'
23:22:04NimBotAraq/Nimrod bigbreak 4298553 Araq [+0 ±3 -0]: system.writeFile works at compile-time
23:22:04NimBotAraq/Nimrod bigbreak 2475794 Araq [+0 ±1 -0]: fixes a minor bug when 'type' is used in a wrong way
23:22:04NimBotAraq/Nimrod bigbreak 62ccf13 Araq [+0 ±2 -0]: 'try' works at compile-time
23:22:04NimBot3 more commits.
23:46:28*Matthias247 quit (Read error: Connection reset by peer)