<< 14-07-2014 >>

00:04:10def-flaviu: oh, i also held a talk which was kind of nimrod-by-example. it's in german, but i guess the nimrod is still readable: http://felsin9.de/nnis/nimrod/nimrod-gpn14.pdf
00:10:42flaviudef-: Thanks, I'll take a look at that
00:11:16flaviuNice, beamer :P. I've been meaning to take a look at that for a while
00:13:54*Matthias247 quit (Quit: Matthias247)
00:16:51flaviuI wouldn't have mentioned END, it doesn't actually work :(. I tried GDB once with a UI, and its actually very very good.
00:17:34def-flaviu: i tried it a bit and stepping through worked at least
00:17:49flaviuI couldn't even get it to compile, maybe its been fixed
00:18:10flaviuanyway, since it was a talk, I'd assume there were questions, can you provide a few?
00:18:46def-"Why not just work with the projects that make Python compilable?"
00:19:17def-"Since many security bugs result from them, are buffer overflows and int overflows impossible by default?"
00:19:32def-"Is the compiled C code readable?"
00:19:59flaviumaybe we can do something about #3
00:20:42flaviuBut I have plenty to do, no time to jump into the compiler
00:21:11EXetoCbrilliant
00:21:38EXetoCgotta have readable generated code srsly
00:22:27flaviuIt'd make GDB much easier to use at least
00:22:50EXetoC-> readable asm -> readable machine code
00:23:34flaviuEXetoC: You do want readable ASM when your compiler messes up and gives wrong code
01:24:18*q66 quit (Ping timeout: 240 seconds)
02:12:48*grondilu joined #nimrod
02:13:40*girvo quit (Quit: This computer has gone to sleep)
02:15:58*grondilu left #nimrod (#nimrod)
02:18:14flaviudef-: I guess the lecture is wtfpl too?
02:18:24def-flaviu: sure
02:22:45*BlameStross joined #nimrod
02:23:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:38:24*X-Scale quit (Ping timeout: 260 seconds)
02:43:03*X-Scale joined #nimrod
02:46:27*kshlm joined #nimrod
02:47:37*bjz joined #nimrod
03:06:13*girvo joined #nimrod
03:12:34*EXetoC quit (Quit: WeeChat 0.4.3)
03:15:00*kemet joined #nimrod
03:17:44*adoniscik joined #nimrod
03:22:45*xenagi quit (Quit: Leaving)
03:25:30*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
03:46:04*girvo quit (Quit: This computer has gone to sleep)
03:50:14*girvo joined #nimrod
03:55:09*kshlm quit (Quit: Konversation terminated!)
04:09:27*Lorxu joined #nimrod
04:29:34*kshlm joined #nimrod
04:31:40*X-Scale left #nimrod (#nimrod)
04:50:36*Lorxu quit (Read error: Connection reset by peer)
04:51:45*Lorxu joined #nimrod
05:18:36*ARCADIVS joined #nimrod
05:25:03*bjz quit (Ping timeout: 240 seconds)
05:29:54*bjz joined #nimrod
05:32:00*bjz quit (Read error: Connection reset by peer)
05:32:01*bjz joined #nimrod
05:41:23*flaviu quit (Ping timeout: 264 seconds)
06:32:57*girvo quit (Quit: This computer has gone to sleep)
06:34:23*girvo joined #nimrod
06:36:44*zematis quit (Ping timeout: 240 seconds)
06:43:10*Demos quit (Read error: Connection reset by peer)
06:52:21*girvo quit (Quit: This computer has gone to sleep)
06:53:15*girvo joined #nimrod
07:33:56*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:35:35*kunev joined #nimrod
07:52:15*Matthias247 joined #nimrod
07:54:36*girvo quit (Quit: This computer has gone to sleep)
08:09:35*gsingh93 quit (Quit: Connection closed for inactivity)
08:17:03*q66 joined #nimrod
08:17:12*adoniscik quit (Ping timeout: 260 seconds)
08:50:07*kemet joined #nimrod
08:57:41*kemet quit (Read error: Connection reset by peer)
08:57:48*kemet1 joined #nimrod
08:59:02*kemet1 quit (Read error: Connection reset by peer)
09:04:09*Matthias247 quit (Read error: Connection reset by peer)
09:05:16*eigenlicht_ quit (Ping timeout: 260 seconds)
09:05:16*bastian__ quit (Ping timeout: 260 seconds)
09:05:23*bastian_ joined #nimrod
09:12:46*eigenlicht_ joined #nimrod
09:13:21*Trustable joined #nimrod
09:33:29*NimBot joined #nimrod
09:34:14*Trustable joined #nimrod
10:05:28*kshlm quit (Ping timeout: 260 seconds)
10:08:20*bjz quit (Ping timeout: 240 seconds)
10:15:51*bjz joined #nimrod
10:40:37*Puffin joined #nimrod
10:40:38*Ven joined #nimrod
10:43:00*girvo joined #nimrod
11:09:52*Puffin is now known as BitPuffin
11:17:35*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:21:36*ARCADIVS quit (Quit: WeeChat 0.4.3)
11:21:49*girvo quit (Quit: This computer has gone to sleep)
11:22:16*girvo joined #nimrod
11:55:10*BlameStross quit (Quit: BlameStross)
12:07:25*girvo quit (Quit: Leaving)
12:16:53*Ven joined #nimrod
12:27:54*BlameStross joined #nimrod
12:31:47*untitaker quit (Ping timeout: 264 seconds)
12:38:12*untitaker joined #nimrod
12:40:30*kemet joined #nimrod
12:55:16*EXetoC joined #nimrod
13:01:38*Lorxu quit (Ping timeout: 240 seconds)
13:03:09*Matthias247 joined #nimrod
13:07:58*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:09:45*Ven joined #nimrod
13:18:59*Varriount_ joined #nimrod
13:19:56*Varriount quit (Ping timeout: 240 seconds)
13:25:22*Lorxu joined #nimrod
13:31:16*vindolin joined #nimrod
13:53:47*darkf quit (Quit: Leaving)
13:54:50*AndChat|324564 joined #nimrod
13:54:50*Lorxu quit (Read error: Connection reset by peer)
13:55:17*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
14:00:49*Lorxu joined #nimrod
14:00:49*AndChat|324564 quit (Read error: Connection reset by peer)
14:07:06*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:28:12*bjz joined #nimrod
14:35:00*yoyoyoyo joined #nimrod
14:35:58yoyoyoyoyo!
14:37:07EXetoCyoyoyoyo yo
14:40:38*AndChat|324564 joined #nimrod
14:40:38*Lorxu quit (Read error: Connection reset by peer)
14:51:49*BitPuffin quit (Ping timeout: 240 seconds)
15:02:51*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:13:21*Araq_ joined #nimrod
15:13:50Araq_hi yoyoyoyo welcome
15:32:35*Lorxu joined #nimrod
15:32:35*AndChat|324564 quit (Read error: Connection reset by peer)
15:34:10yoyoyoyohey guys
15:34:19yoyoyoyoI have a quick question about Nimrod support
15:34:47yoyoyoyois it possible to create an Intellij plugin for Nimrod?
15:35:21yoyoyoyowith syntax support, or will Aporia gradually be built on?
15:39:48yoyoyoyosorry, am a total Nimrod newb :3 Currently looking to start making some projects and just love the JetBrains IDE :)
15:40:25*Demos joined #nimrod
15:43:03*vindolin quit (Ping timeout: 240 seconds)
15:44:08Matthias247yes, it is possible to do one :)
15:44:38Matthias247it yould build on the nimrod idetools plugin, just like the other plugins that are available
15:45:03Matthias247Demos is currently working on a visual studio plugin
15:46:02Demosdo note that nimrod requires less assistence than java in general.
15:46:42yoyoyoyothat sounds very promising :)
15:51:16yoyoyoyobtw, I just wanna say that Nimrod looks fantastic as a language, and I'm keen to get started in some mini projects! I come from a c++/python/delphi(pascal) background and feel like the language encapsulates the best qualities of these and more languages. Just wanted to say that all the devs are AWESOME for not putting up with the 'almost great' new languages that are currently out or being developed. I think there's a lot of us out t
15:51:41yoyoyoyointerest in Nimrod and all the great work you guys are doing :)
15:52:16yoyoyoyoI just want to say thankyou to you :)
15:56:31*Lorxu quit (Ping timeout: 256 seconds)
15:58:14*mwbrown joined #nimrod
16:02:12Araq_you
16:02:15Araq_are welcome
16:07:55*kunev quit (Quit: leaving)
16:11:37*yoyoyoyo quit (Ping timeout: 246 seconds)
16:25:47seuberteah
16:25:52seubertoops wrong window :|
16:28:24*adoniscik joined #nimrod
16:28:36*bjz quit (Read error: Connection reset by peer)
16:29:26*bjz joined #nimrod
16:30:57*bjz quit (Read error: Connection reset by peer)
16:30:58*bjz_ joined #nimrod
16:33:23*bjz_ quit (Read error: Connection reset by peer)
16:33:45*bjz joined #nimrod
16:35:04*bjz quit (Read error: Connection reset by peer)
16:37:03*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237])
16:43:42*bjz joined #nimrod
16:44:27*superfunc joined #nimrod
16:46:31*flaviu joined #nimrod
16:52:57*Lorxu joined #nimrod
16:53:00LorxuHi
16:53:23Demoshello Lorxu!
16:56:16LorxuIt's possible to pass a children object to proc arguments?
16:56:44*ics joined #nimrod
16:59:01Demossure, you are advised to use a ref though
16:59:57LorxuAnd put?
17:00:01LorxuSorry
17:00:12LorxuAnd ptr?
17:00:31Matthias247it's also possible to pass it by value. But that's slightly buggy
17:00:59LorxuOk
17:02:00LorxuThen I have to use a generic?
17:03:53Demosptr will probably work
17:04:16LorxuOk
17:04:49LorxuNot working for me or I don't know how to do it
17:05:17Demosin general I use generics when I want only same-type to same-type operations, and objects when I want to be able to mix types. You should post the failing code in a gist
17:05:55LorxuOk
17:05:59LorxuThanks
17:06:25Demosare the nimrod icons avalible
17:10:19*AndChat|324564 joined #nimrod
17:10:19*Lorxu quit (Read error: Connection reset by peer)
17:10:38*ics quit (Ping timeout: 240 seconds)
17:14:59*adoniscik quit (Ping timeout: 264 seconds)
17:16:01*brson joined #nimrod
17:16:08*kunev joined #nimrod
17:17:50AraqDemos: sure
17:17:54Araqnot in the repo?
17:18:14Demosoh maybe they are there... I did not realize to look in the repo (doh)
17:18:43Araqwell I have $nimrod\icons
17:18:52Araqdunno if it's in git though
17:19:08*ics joined #nimrod
17:27:00Demosit is in git
17:30:02*adoniscik joined #nimrod
17:35:35*gsingh93 joined #nimrod
17:37:50*io2 joined #nimrod
17:40:31*Lorxu joined #nimrod
17:40:31*AndChat|324564 quit (Read error: Connection reset by peer)
17:48:41*pafmaf joined #nimrod
17:55:51dom96hi
17:56:12Araqhohoho
17:56:31dom96I have a project for someone who's bored.
17:56:37dom96Async DB drivers.
17:57:24*Ven joined #nimrod
17:58:30*othello joined #nimrod
17:58:31EXetoCwhat about threading support?
17:59:07dom96I think I will leave that for later.
17:59:38dom96Would be nice if you guys tested async *now*
17:59:51Araqactually
18:00:05*shodan45 joined #nimrod
18:00:09Araqit would be nice if you guys tested async *now* with new_spawn
18:00:20dom96sure, that too.
18:02:43othellohello, is there any built-in way to read c-type structs from a file / stream in Nimrod?
18:03:03EXetoCok so you'd need to be able to poll, right? do most database engines operate on sockets?
18:04:15Araqothello: sure, read + cast
18:04:24dom96EXetoC: yeah.
18:04:31dom96EXetoC: Just google postgresql async or sqlite async
18:04:42othellook, thanks!
18:05:25Araqothello: stream.readData(addr someObj, sizeof(someObj))
18:09:46othellothanks, I had tried that, but I'm using array[n, char] as a replacement for char[n], which doesn't give me what's expected
18:10:29Demosothello, note that reading in a whole struct and just casting it is considered bad form, since endian-ness may differ and often you want to read a packed struct into padded memory
18:11:15othelloI know, I've actually written a few macros which take in a tuple and outputs a reading proc which maintains type safety
18:11:20othellobut it's a bit of a headache
18:11:23Demosallright, just making sure
18:12:23Demosthere are some standard endian related functions in the endians module
18:13:40othellothanks, but for my purposes (reading old DOS-era game data files on a x86 computer), I think endian-ness shouldn't be any trouble?
18:15:24Demosoh, yeah. That is true
18:19:13*pown5_ joined #nimrod
18:19:26Araqhi pown5_ welcome
18:19:50pown5_Hi! Excited to try Nimrod! Having issues compiling babel
18:20:03Araqothello: well array[n, char] is char[n], no idea why it causes problems for you
18:20:20Araqpown5_: use the devel version of the compiler
18:20:54othelloAraq: my mistake, everything's fine
18:21:06othellowith array[n, char]
18:21:07pown5_I think I am. I only see one branch (master) which is the one I am using. I installed nimrod from master branch as well.
18:21:22Araqpown5_: master != devel
18:21:36dom96ok, it's time to fix this.
18:21:49Araqdom96: told ya
18:22:00dom96Araq: you did? when?
18:22:17EXetoCpown5_: you specifically cloned master?
18:22:29dom96in fact, this is pretty bad.
18:22:37dom96We got like 5 people who complained
18:22:48dom96The number of people who just gave up worries me...
18:22:50pown5_EXEtoC, nope just cloned. I guess master is the default on github project
18:22:55pown5_I will try with the devel branch
18:23:05pown5_should I do the same with nimrod?
18:23:18EXetoCright, babel. nevermind
18:23:28pown5_(the master branch of nimrod also had an issue with rand which was easy enough to comment out)
18:23:29dom96oh. I thought this was the C sources issue heh.
18:23:35dom96yep, that's the one.
18:24:16pown5_ehm..
18:24:27pown5_there is no devel branch for babel
18:24:27*Lorxu quit (Read error: Connection reset by peer)
18:24:41*Lorxu joined #nimrod
18:24:50EXetoCno
18:25:05EXetoCjust master and two releases
18:25:32pown5_OK so when araq said "master != devel"...
18:25:56reactormonkpown5_, yup
18:26:10pown5_So where is the devel
18:26:20pown5_or... *what* is devel if not a branch?
18:26:27dom96pown5_: devel refers to the Nimrod compiler branch
18:26:44dom96You need a version of the nimrod compiler from the devel branch of the Nimrod git repo to compile Babel.
18:26:57pown5_:]
18:27:05pown5_Thanks.
18:31:44pown5_OK, not the same error. src/nimcache/stdlib_asyncdispatch.c:2004:151: error: use of undeclared identifier 'MSG_NOSIGNAL'
18:32:29*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:32:29pown5_(I recompiled nimrod on the devel branch, I recompiled babel on master branch, got error, added option --parallelBuild:1, this is the output, to be sure, I deleted nimcache and recompiled but same error)
18:32:57pown5_(im on os x)
18:36:00Araqget some real OS :P
18:36:19Araqinteresting how bad posix at compatibility is
18:36:29Araqit's as if it doesn't exist
18:36:56Araqperhaps we should remove 'defined(posix)' from the language
18:37:49Araqanyway dom96 can help you, I hope
18:37:52AraqI need to go, bbl
18:39:20pown5_yes. I think I see where the issue is
18:40:01dom96good
18:40:12*askatasuna joined #nimrod
18:40:13dom96Let me know so I can fix it.
18:40:55dom96I suppose it's asyncdispatch:758?
18:43:14*Ven joined #nimrod
18:43:32pown5_I thought it was asyncdispath:580
18:43:49pown5_that there would be needed a elif defined(mac): which defines MSG_NOSGINAL as SO_NOPIPE
18:45:58dom96I'll just make it equal 0x2000 in posix
18:46:55*pafmaf quit (Quit: This computer has gone to sleep)
18:46:59flyxthe osx equivalent of MSG_NOSIGNAL is MSG_HAVEMORE
18:47:55flyxmost code just does #define MSG_NOSiGNAL MSG_HAVEMORE when compiling for mac
18:48:09flyx*capital i
18:48:39dom96is MSG_HAVEMORE in sys/socket.h?
18:49:50*flyx looks it up
18:50:09flyxjup.
18:51:45pown5_flyx, ok, are you sure? I would have guessed it would be SO_NOSIGPIPE?
18:52:13flyx#define MSG_HAVEMORE 0x2000
18:52:30flyxit's exactly the same, yes
18:52:42pown5_ #define MSG_HAVEMORE 0x2000 /* Data ready to be read */
18:52:43pown5_ #define MSG_NOSIGNAL 0x2000 /* don't raise SIGPIPE */
18:52:57pown5_compared with:
18:52:58pown5_#define SO_NOSIGPIPE 0x1022 /* APPLE: No SIGPIPE on EPIPE */
18:53:18pown5_sounds to me MSG_NOSIGNAL corresponds to SO_NOSIGPIPE and not MSG_HAVEMORE?
18:53:32NimBotAraq/Nimrod devel e01c1f1 Dominik Picheta [+0 ±1 -0]: Fixes missing MSG_NOSIGNAL on Mac OS X.
18:54:03*AndChat|324564 joined #nimrod
18:54:06*AndChat|324564 quit (Read error: Connection reset by peer)
18:54:21dom96def-: Love the style of your slides, very nice.
18:54:29def-dom96: thanks
18:54:48dom96Wish I could understand German heh
18:55:12*Lorxu quit (Read error: Connection reset by peer)
18:55:42flyxpown5_: ah yes, the problem's deeper.
18:56:01*flyx didn't remember all of it
18:56:13dom96argh, did I just fix it incorrectly then?
18:56:22flyxyes, but it would also be wrong to use 0x2000 on OSX then
18:56:53flyxdamn, sorry
18:57:29*kunev quit (Quit: leaving)
18:57:42flyxstill, I saw that define a few times
18:58:05flyxbut if you link against apple's implementation, it does things differently
18:58:06pown5_OK gotta go to bed... 2 too small kids :) Thanks for the quick help and action. Awesome! :) Looking forward to learn nimrod!
18:58:40Demospown5_, awesome! Nimrod is really fun to learn
18:58:41*pafmaf joined #nimrod
18:58:56*pown5_ quit (Remote host closed the connection)
18:59:17reactormonkpown5_, IRC is the strong point. If you have a more complicated question, feel free to post it to stackoverflow and reference it here
18:59:32reactormonkActually, we should do that more.
19:00:55Demosyeah we should... good way to boost our SO internet numbers
19:02:01flyxgood point, yes
19:02:34Demoswho packages the nimrod releases for windows?
19:02:45reactormonkAraq, https://github.com/Araq/Nimrod/pull/1356 make your move
19:03:11NimBotAraq/Nimrod devel 089387c def [+0 ±1 -0]: Add missing sql proc for db_mysql
19:03:11NimBotAraq/Nimrod devel 8332e6e Simon Hafner [+0 ±1 -0]: Merge pull request #1358 from def-/db_mysql-sql... 2 more lines
19:03:28dom96Demos: Varriount_
19:04:23reactormonkand some more to be pulled
19:04:23DemosVarriount_, how does that work, do you know the deep magicks of msi and the long kept secrets of WiX?
19:05:14dom96Demos: NimInst can generate inno setups
19:05:55Demoswell my problem is with installing Visual Nimrod, I dont think you can actually deploy project extensions with templates using just VSIX
19:06:09Demosyou need to use an installer to install the VSIX then manually register the templates in the regsitry
19:06:13DemosI think
19:08:28dom96Try creating an installer using VS then.
19:08:44dom96It was pretty annoying the last time I tried it though.
19:08:52Demosthey dropped support for that in VS 2010
19:09:15Demosyou have to use the opensource Windows Installer XML toolset
19:09:52Demoshttp://wixtoolset.org/documentation/manual/v3/overview/tools.html should give an idea of how much stupid went into WiX
19:10:25flyxdom96: actually, the support for creating installers with VS was dropped after 2010
19:10:46dom96oh, good riddance :P
19:11:22Demosyou can "enable inno installers" but I think WiX is the way people deploy extensions. IronPythonStudio uses WiX so I figured I could copy/paste some code from them
19:11:49flyxI personally use NSIS if I have to, but only because CMake provides a good template for it
19:12:18Demosbut jesus christ when you need a compiler, linker, unittest program, and build system for your installer generation something is wrong
19:12:34Demoshmmmmmmm there is an idea
19:13:42dom96I have a certain old-school respect for Nullsoft, so I subjectively like NSIS.
19:13:50dom96Even though I don't exactly make a lot of installers.
19:14:39flyxit can certainly write registry entries and do all other sorts of stuff
19:14:43flaviuWhy not just use 7zip?
19:15:00flaviuCompile it, and stick it in a self extracting 7zip archive
19:15:21flaviuIIRC you can get those to run a bash script, so just fix path in the bash script
19:17:01flaviuYep, pretty much trivial: http://7zip.bugaco.com/7zip/MANUAL/switches/sfx.htm
19:18:56flaviuOh, this is talking about packaging for a plugin, I didn't read context
19:19:08flyxflaviu: all the examples that are shown just launch setup binaries
19:19:18OrionPKdom96 is the production forum now using your async stuff?
19:19:25OrionPKforum.nimrod-lang.org
19:19:26dom96OrionPK: nope
19:19:29OrionPKoh ok
19:19:41flaviuflyx: I don't see why the setup binary can't be a .bat file
19:19:58dom96OrionPK: Testing the new version on port 8080. It crashed today and i'm trying to figure out why.
19:20:00flaviuLet me test it though
19:21:24*Lorxu joined #nimrod
19:21:29*kunev joined #nimrod
19:22:10Lorxu cast is a runtime or complier function?
19:24:53reactormonkLorxu, what are you using casting for?
19:25:33dom96Lorxu: I don't think it will incur any runtime overhead if that's what you're wondering.
19:25:37*adoniscik quit (Ping timeout: 256 seconds)
19:25:37*zematis joined #nimrod
19:26:39*AndChat|324564 joined #nimrod
19:26:40*Lorxu quit (Read error: Connection reset by peer)
19:27:03AndChat|324564I'm trying to do a wrapper with pointer and cast
19:27:11AndChat|324564Ups
19:27:17AndChat|324564I'm lorxu
19:27:34*AndChat|324564 is now known as lorxu2
19:27:34reactormonkAndChat|324564, C interfacing=
19:28:29flaviudom96: It does on little-endian
19:28:39lorxu2That's why I ask about if cast make overhead
19:28:52lorxu2Thanks
19:29:04dom96flaviu: interesting
19:32:56dom96OrionPK: I was looking at your code and the move from templates to macros may cause you some bother
19:33:00dom96(in jester)
19:37:05OrionPKoh?
19:37:14OrionPKwhat specifically in my code
19:38:48dom96get_authed/post_authed
19:38:54dom96I'm not sure if that will work.
19:47:34*Matthias247 quit (Read error: Connection reset by peer)
19:48:49*Matthias247 joined #nimrod
19:48:49*Matthias247 quit (Read error: Connection reset by peer)
19:48:54OrionPKyou mean for ircfamiliar i take it
19:49:07dom96yeah
19:50:21dom96damn, zahary did a talk about Nimrod too.
19:53:12dom96It must be Nimrod's year :P
19:53:23*boydgreenfield joined #nimrod
19:56:49flyxmaybe someone should give a talk at the 31c3 then ^^
20:02:05dom96Nimrod is finally getting what it deserves.
20:02:35dom96Wish Northern Ireland had some developer conferences.
20:05:49boydgreenfieldSorry again — but could anybody point me to a good example of some multi-threading code using locks in Nimrod? I’d like to be able to modify a mostly-read-only sequence from within a `acquire()/release()` block, but am getting GC-related segfaults (and realize I probably shouldn’t be using a seq, but need something variably sized)
20:05:49*Johz joined #nimrod
20:05:58*kunev quit (Ping timeout: 240 seconds)
20:06:26NimBotAraq/Nimrod devel 41bb0bf Dominik Picheta [+0 ±1 -0]: Added debug code for futures.
20:07:52Araqboydgreenfield: sorry, seqs can't be shared
20:08:32*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:08:55Araqyou have to use allocShared/reallocShared/deallocShared
20:09:01boydgreenfieldAraq: No I understand that (even though it should theoretical be threadsafe within a lock, I realize that causes GC issues). Is there a different built-in (or external) data structure I should be looking towards for storing many variably sized lists across threads?
20:09:32boydgreenfieldAraq: Got it.
20:09:39Araqunfortunately the guy who started a promising lockfree hash table left for good
20:10:00Araqsucks but that's the reality of open source
20:11:24*Ven joined #nimrod
20:11:32Araqand I won't work on it anytime soon
20:11:50AraqI have better stuff in the pipeline though ;-) stay tuned.
20:13:29boydgreenfieldHaha ok sounds good. Appreciate the help and will get this working.
20:13:42dom96Guys, please test: http://forum.nimrod-lang.org:8080/
20:14:06dom96(Create accounts, spam it, do whatever, it won't cause any harm)
20:14:21dom96The purpose is to test the new async stuff
20:14:33Araqdom96: 'reply' button doesn't work anymore
20:14:57dom96interesting
20:15:26dom96must not be parsing the URL correctly or something
20:15:41dom96That's likely a jester or asynchttpserver issue
20:15:47dom96i.e. not related to async sockets
20:15:50Araqwell it generates action=reply#reply
20:16:18*Lorxu joined #nimrod
20:16:19*lorxu2 quit (Read error: Connection reset by peer)
20:16:40dom96yay it crashed
20:17:31flaviuI hope it was my fault :P. I sent a messed up packet
20:18:08Araqdom96: did you change URL parsing?
20:18:11dom96dunno who's fault it was but it crashed the way it crashed before
20:18:18dom96Araq: don't think so
20:18:57flaviuAh, I doubt it was mine then
20:21:00dom96flaviu: what did you send though?
20:21:42flaviuI made a password post with the contents being me mashing on the keyboard
20:22:11dom96did you telnet in or just used your browser?
20:22:26dom96I guess telnetting in to do that is unlikely
20:22:31flaviuBrowser, I took the normal post and edited it in the browser
20:27:02dom96flaviu: Can you try that again?
20:27:52flaviuOk
20:28:09dom96that wasn't it was it?
20:28:12flaviuI doubt thats it though, its staying up
20:28:31dom96ok, Araq: can you continue doing whatever you were doing? :P
20:29:09dom96flaviu: Is that you navigating very fast? lol
20:29:26dom96oh, it crashed
20:29:30flaviudom96: Yes
20:31:09*Jehan_ joined #nimrod
20:31:18dom96argh
20:31:25dom96This will not be easy to figure out
20:46:30*AndChat|324564 joined #nimrod
20:46:30*Lorxu quit (Read error: Connection reset by peer)
20:46:35*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
20:52:49*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:53:19*vendethiel quit (Quit: q+)
20:54:44*Lorxu joined #nimrod
20:54:44*AndChat|324564 quit (Read error: Connection reset by peer)
20:59:07*Lorxu quit (Ping timeout: 256 seconds)
20:59:59*zematis quit (Ping timeout: 264 seconds)
21:23:19*Mat3 joined #nimrod
21:23:22Mat3hello
21:23:36dom96hey Mat3
21:23:41superfuncsup Mat3
21:23:50Mat3hi dom96 and superfunc
21:45:10*Mat3 quit (Quit: Verlassend)
21:46:33*Matthias247 joined #nimrod
21:51:07*Trustable quit (Quit: Leaving)
21:55:41*othello quit (Quit: Page closed)
21:57:29*Johz quit (Quit: Leaving)
21:57:38*askatasuna quit (Ping timeout: 240 seconds)
22:03:43flaviuIs there some way to get the name of a type? eg `$T`
22:04:49EXetoCtypetraits.name?
22:07:46flaviuThanks, that works but I can't find it in the docs
22:17:04dom96The module's docs are likely not built.
22:19:47flaviu`^[a-zA-Z]+` should match `https:/`, right?
22:21:04flaviuYep, that looks like an actual bug.
22:22:19EXetoCif it's a search rather than a match
22:24:25EXetoCthe actual match will just be until the first non-alpha char starting from the beginning
22:24:37flaviuWell, its a match, but I expect it to match `⌊https⌋://`
22:24:53flaviu`⌞https⌟://`
22:25:10flaviukerning is crap, but the idea is clear
22:26:47*shodan45 quit (Quit: Konversation terminated!)
22:27:25EXetoCpegs? re?
22:27:35flaviupegs, re works fine
22:28:54EXetoCsame result for me. 0 is returned
22:29:17EXetoCassert pegs.find("https://", peg"^[a-zA-Z]+") == 0 - assert re.find("https://", re"^[a-zA-Z]+") == 0 ?
22:30:56flaviuWait, what? http://regex101.com/r/zA3mB8/1
22:32:54EXetoC?
22:33:32EXetoCit matches what it is supposed to match
22:33:32*mwbrown quit (Ping timeout: 260 seconds)
22:33:32flaviuOh, thought that 0 was the error condition
22:33:39EXetoCok
22:35:47flaviuBut "http://".match(peg"^[a-zA-Z]+") doesn't work
22:36:00flaviuReturns false
22:36:59Araqmaybe pegs are not regexes
22:37:24EXetoCyes because it's a match rather than a find operation
22:37:41Araqhttp surely starts with a-z so how should it match?
22:37:42EXetoCso you'll have to either add .* or something more specific
22:37:54Araqdon't use .* in a peg
22:38:02Araqit doesn't do what you think it does
22:38:10dom96Why oh why are you parsing URLs with pegs!?
22:38:22Araq'cause he's smarter than us
22:38:25EXetoCit... works :p
22:38:25flaviudom96: Whats wrong with it?
22:38:37Araqit's declarative so it must be good
22:39:23Jehan_Isn't match required to match the entire string?
22:39:38Jehan_Since the pattern doesn't capture the :// part, it should fail.
22:40:11EXetoCyes
22:40:19flaviuJehan_: You're right, that wasn't really clear from the docs
22:40:40Jehan_Are there even docs for pegs.nim? :)
22:40:53Araqyes there are
22:40:54flaviuJehan_: They are excellent actually
22:41:02flaviuhttp://build.nimrod-lang.org/docs/pegs.html
22:41:26Jehan_Oh, interesting, I never found them and reverse-engineered usage from pegs.nim ...
22:41:35EXetoCAraq: so what did I miss? it works in this case and I can't figure out what the difference is by reading the docs
22:42:10flaviuEXetoC: It doesn't give back. In this case, it is in fact fine
22:42:28flaviuPegs `.*` == regex `.*+`
22:43:45flaviudom96: I still want to know whats wrong with parsing urls with PEGs
22:45:23dom96flaviu: They are not as flexible as writing your own parser.
22:45:58dom96It's hard to tell what they will really match.
22:46:00EXetoCit's not all that difficult. you just need to grind parseutils or something a little bit
22:46:21dom96so you have to constantly test your pattern against different input and tweak it until it "works"
22:46:22flaviuHere is the nice thing about parsing uris with pegs: its trivial to translate ABNF to PEGs
22:46:34EXetoCI wonder what parseutils would look like in java ^_^
22:46:37flaviuAnd the standard just happens to use ABNF :)
22:47:19AraqI'm still pretty sure nobody gives a fuck about the standard ;-)
22:47:32Araqfor instance, URLs have a max length
22:47:56Araqguess how many sites generate longer URLs than that
22:48:31EXetoC9000?
22:49:09flaviuAraq: The spec doesn't specify a URI length
22:49:30Jehan_I thought there was no max length for URLs in the HTTP standard, but some browsers have a limit in practice?
22:49:30Araqflaviu: I'm pretty sure older versions did, at least
22:49:44flaviuIt says that the hostname may not be longer than 255 chars, and thats only because of compatibility with current DNS systems
22:50:07flaviuJehan_: Yep, like 3000
22:51:03flaviuI can't see a website using an url that long
22:51:29Jehan_I can. There are sites that encode content in the URL.
22:52:19dom96Yeah, like this: http://jbt.github.io/markdown-editor
22:53:07flaviuWow, thats insane
22:55:23EXetoCshould be run through a shortener I guess :p
22:55:33Araqwhat's a good general stack depth limit?
22:55:45Araq4000 calls?
22:55:52Jehan_Umm … context?
22:56:11Araqwe want to a give a nice error message for stack overflow
22:56:16flaviuWhen the nimrod compiler gets into infinite recursion, it tends to get stuck at ~700
22:56:28Jehan_Is that for the compiler or compiled code?
22:56:40Araqfor compiled code
22:56:55Jehan_That's hard to generalize.
22:57:07Jehan_Functional style code can easily go higher than that.
22:57:47flaviu2000 has been the max for java in my experience
22:57:52Jehan_On the other hand, one could argue that if you need more than a few thousand stack frames, then you should probably see an error earlier rather than later.
22:58:19Jehan_Related: Why tail recursion as a general looping construct is broken.
22:59:11Araqrecursion for looping in general is stupid
22:59:25Araqit violates the principle of least power
22:59:35Jehan_What principle is that?
22:59:48Araq"oh yeah, let's use the most powerful construct for everything"
23:00:23Jehan_My concern is more that if your tail recursion isn't actually tail recursion, you have a hidden stack overflow, and that's an easy mistake to make.
23:00:41Jehan_Araq: Hmm, recursion is a pretty basic construct in functional programming.
23:00:41Araqit's like using nimrod's "macro" for everything
23:01:32OrionPKdom96 we have a native markdown implementation yet?
23:02:14dom96OrionPK: no
23:02:25AraqOrionPK: the RST parser is good enough
23:03:41OrionPKyeah but i dont like RST as much as MD
23:03:59Araqyeah because these are totally different ... oh wait
23:04:02*Boscop quit (Read error: Connection reset by peer)
23:04:03OrionPKMD is simpler, you cant do as much obviously, but simpler
23:04:14*pafmaf quit (Quit: This computer has gone to sleep)
23:04:17Araqsimpler because it has no spec?
23:04:38*superfunc quit (Ping timeout: 240 seconds)
23:04:56OrionPKdont hate
23:05:20AraqJehan_: for i in N: for j in M: for k in P: doSomething() # N*M*P iterations
23:05:38Araqdo the same with tail recursions and see how long it takes you to figure out
23:05:53Araqthis fact
23:06:19flaviuAraq: https://guides.github.com/features/mastering-markdown/
23:06:33Jehan_Araq: Not too hard. And, in practice, you won't use explicit iteration much.
23:06:56dom96OrionPK: Write one, it should be fairly simple.
23:07:03Jehan_Not to mention that a functional language won't just do doSomething() purely for side effects.
23:07:18dom96OrionPK: Don't use pegs though :P
23:07:23Jehan_You'll see some combinations of map/foldl/etc.
23:07:25OrionPKlol
23:07:29flaviudom96: Its impossible to do anyways
23:07:30OrionPKidk. not a lot of time
23:07:36flaviuPegs only has 10 captures
23:07:50*askatasuna joined #nimrod
23:07:53dom96flaviu: another reason not to use it :P
23:07:56AraqJehan_: yes indeed. it's not tail recursive unless you force it into this structure
23:07:59Jehan_The problem with parsing MD is that HTML is a subset.
23:08:26flaviuJehan_: You can safely ignore the html tags
23:08:41Araqit's completey artificial to write recursions with accumulator parameters
23:08:49flaviuActually, parsing markdown might be really easy, and doable with PEGs!
23:08:56flaviuSlow, but who cares!
23:09:05Jehan_Araq: Umm, you're preaching to the choir there.
23:09:33flaviuOrionPK: Just a few find-replace rules, not hard
23:09:35AraqJehan_: alright then :-)
23:10:01Jehan_Araq: It's one of the reasons why I think pure functional programming is broken.
23:10:11*brson quit (Ping timeout: 264 seconds)
23:10:14flaviuCode blocks throw a damper into things, but there are ways to get around that
23:10:33Jehan_Well, I think "pure" anything is broken (which is why I'm a big fan of hybrid languages), but the reasons are different for each case.
23:10:41*darkf joined #nimrod
23:10:50dom96Guys, guys. Recursion is good. Keep telling everyone that because Rust doesn't support TCO, so people won't use it because of this illusion that they really need it!
23:11:01dom96or something
23:11:25Araqdom96: tail recursions are nice if they get some special syntax, IMO
23:11:29Jehan_dom96: TCO can have its uses.
23:11:43Araqso that the compiler can tell you if you screwed up
23:11:59Jehan_And what Araq said.
23:12:19dom96I see. But I was kidding anyway.
23:12:21Araqthe interesting tail recursions are mutual recursions btw
23:12:24Jehan_The problem is, once you have to convert recursion to tail call format, recursion quickly gets ugly.
23:12:34Jehan_Araq: Yeah, for example to implement a state machine.
23:12:35Araqnot this silly for loop replacement
23:12:39Araqyup
23:13:03dom96good nigh
23:13:06dom96t
23:14:03Jehan_Tail recursion works reasonably well in Prolog, though, but that's because it's easy to identify there.
23:17:27Araqugh I can never remember how merging works
23:17:48AraqI need to be in the branch that I want to pull stuff into, right?
23:18:52flaviuyes
23:18:58Jehan_Umm, I avoid merging in Git as much as I can and use other VCS.
23:19:17Jehan_But that's how it should work, if Git is semi-consistent with other VCS.
23:19:23Araqcan't avoid git, it's hosted on github :P
23:20:08Jehan_I use either Mercurial + hg-git or Bazaar for git repositories. Slower (because it uses a Git library written in Python), but I get to avoid Git mostly.
23:20:14flaviuI don't really understand why people dislike git
23:20:28Araqerror: Your local changes to the following files would be overwritten by merge:
23:20:30Araq examples/cross_calculator/android/scripts/jnibuild.sh
23:20:32Araq examples/cross_calculator/android/scripts/nimbuild.sh
23:20:33Araq examples/cross_calculator/android/scripts/tags.sh
23:20:35Araq examples/cross_calculator/ios/scripts/tags.sh
23:20:36Araq examples/cross_calculator/ios/scripts/xcode_prebuild.sh
23:20:38Araq lib/pure/unidecode/gen.py
23:20:38flaviuAraq: Git status first
23:20:39Araq tinyc/tests/gcctestsuite.sh
23:20:41Araq tinyc/texi2pod.pl
23:20:42AraqPlease, commit your changes or stash them before you can merge.
23:20:44AraqAborting
23:20:45Araqof course i didn't edit any of these
23:21:15flaviuOk, then just do `git reset` with I think --hard
23:21:41Jehan_git reset --hard will reset everything to a pristine version of the current commit.
23:21:42flaviuYep, `git reset --hard`
23:22:11Jehan_flaviu: To explain all the things I dislike about Git would probably take an hour or so.
23:22:34Araqwhat does 'reset hard' do with my uncommitted files?
23:22:44Araq*untracked files?
23:22:55flaviuIt resets the local directory to the repo's version
23:23:03flaviuit looses them
23:23:08Araqso it deletes them?
23:23:18flaviuYes
23:23:28flaviugit stash if you aren't sure you want that
23:23:35Araqwell good that I don't listen to you then
23:23:52AraqI'm sure what I want
23:24:06AraqI'm not sure git understands anything about file systems though
23:24:10Jehan_I don't think that git reset --hard deletes untracked files, it only reverts modified tracked files (I think, no guarantees).
23:24:32flaviuJehan_: No, you're right
23:24:38Araqmaybe I will run "git reset" without the --hard
23:25:02Jehan_Araq: That only resets the index.
23:25:54flaviuDo `git stash` and worry about all that stuff later
23:27:06Jehan_Does git stash handle untracked files or do you have to add it first?
23:27:11Araqgit checkout file doesn't reset the file changes
23:27:19Araq-.-
23:27:52Araqthis thing is like Go. People use it because of famous author.
23:28:15flaviuJehan_: Ignores them, apparently there is a command to include them too
23:28:51Jehan_Araq: In all fairness, this is about the user interface more than anything else (which is garbage, admittedly).
23:28:59EXetoCgit checkout -- file?
23:29:51flaviuThe biggest flaw in git is that it doesn't hide anything from you.
23:30:07flaviuUnfortunately, I don't see how thats a flaw
23:31:07Araqah so git checkout -- works
23:31:19Araqwith two minuses, pretty obvious
23:31:45AraqI need to decrement the checkout
23:31:52Jehan_It's because git checkout takes both commits and paths as arguments.
23:32:10Jehan_-- is to say "list of arguments and commits ends here".
23:32:20Araqwell no, you're wrong
23:32:26Jehan_Of course, normally it means "list of arguments ends here".
23:32:27Araqgit checkout single_file_here
23:32:34Araqdidn't do anything
23:32:44Araqit's something to do with file permissions
23:32:56Araqcause that's the only thing that has been changed
23:33:06Jehan_Araq: Possibly. I know more about Git internals than the UI, I have to admit.
23:33:23flaviu`git checkout file` not even throwing an error is pretty weird
23:34:31Araqnope I was wrong
23:34:41Araqgit status still lists these changes
23:34:48Araqand git checkout -- doesn't do anything
23:34:59Jehan_Araq: Huh, that is odd.
23:35:07flaviuAraq: What do you want merged?
23:35:21Araqwell it's consistent now
23:35:28Araqconsistently not working
23:35:32Jehan_Do you have to do "git merge --abort" first?
23:35:41flaviuJehan_: It already gave up
23:35:44flaviuno need
23:36:10flaviu"Please, commit your changes or stash them before you can merge. Aborting"
23:36:24Araqflaviu: I want to merge devel into master
23:36:39Araqso master is up to date again
23:36:46Jehan_Anyhow, I need to go to bed, and I fear I can't help much here. Night, folks!
23:36:51*Jehan_ quit (Quit: Leaving)
23:37:22*Boscop joined #nimrod
23:37:37flaviuHuh, it works fine for me
23:41:27flaviuAraq: Ok, PR made. Turns out that the merge is perfect, even the github UI will work
23:41:39Araqflaviu: thanks
23:41:46AraqI can't get it to work here ...
23:41:51flaviuAlready tested booting, work
23:42:20flaviuSure, no problem.
23:42:32NimBotAraq/Nimrod master 6d3fbf9 flaviut [+0 ±1 -0]: Allow for nil chaining in JSON
23:42:32NimBotAraq/Nimrod master 4ff5112 flaviut [+0 ±1 -0]: Add a couple words to docs
23:42:32NimBotAraq/Nimrod master db7fee6 flaviut [+0 ±1 -0]: Add tests for the nil passthrough
23:42:32NimBotAraq/Nimrod master 64d3b9a flaviut [+0 ±1 -0]: Fix subtle mistake in docs and formatting
23:42:32NimBot354 more commits.
23:42:58Araqha I knew it'd crash our testers
23:43:25Araqcan you run "nimrod c koch"?
23:46:52flaviuyes, that works fine for me
23:47:37Araqok
23:47:39Araqgood night
23:54:16*saml_ joined #nimrod
23:54:26*xenagi joined #nimrod